Rename duplicately defined internal functions (add_js, display_header) for documentation purposes. props bpetty, fixes #21564.

git-svn-id: https://develop.svn.wordpress.org/trunk@21856 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-09-15 19:49:21 +00:00
parent 322919eb1c
commit eea7a4b8d3
5 changed files with 14 additions and 14 deletions

View File

@ -16,7 +16,7 @@ if ( !current_user_can('export') )
require_once('./includes/export.php'); require_once('./includes/export.php');
$title = __('Export'); $title = __('Export');
function add_js() { function export_add_js() {
?> ?>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
@ -36,7 +36,7 @@ function add_js() {
</script> </script>
<?php <?php
} }
add_action( 'admin_head', 'add_js' ); add_action( 'admin_head', 'export_add_js' );
get_current_screen()->add_help_tab( array( get_current_screen()->add_help_tab( array(
'id' => 'overview', 'id' => 'overview',

View File

@ -23,7 +23,7 @@ $timezone_format = _x('Y-m-d G:i:s', 'timezone date format');
* @package WordPress * @package WordPress
* @subpackage General_Settings_Screen * @subpackage General_Settings_Screen
*/ */
function add_js() { function options_general_add_js() {
?> ?>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
@ -56,7 +56,7 @@ function add_js() {
</script> </script>
<?php <?php
} }
add_action('admin_head', 'add_js'); add_action('admin_head', 'options_general_add_js');
$options_help = '<p>' . __('The fields on this screen determine some of the basics of your site setup.') . '</p>' . $options_help = '<p>' . __('The fields on this screen determine some of the basics of your site setup.') . '</p>' .
'<p>' . __('Most themes display the site title at the top of every page, in the title bar of the browser, and as the identifying name for syndicated feeds. The tagline is also displayed by many themes.') . '</p>'; '<p>' . __('Most themes display the site title at the top of every page, in the title bar of the browser, and as the identifying name for syndicated feeds. The tagline is also displayed by many themes.') . '</p>';

View File

@ -52,7 +52,7 @@ get_current_screen()->set_help_sidebar(
* @package WordPress * @package WordPress
* @subpackage Permalink_Settings_Screen * @subpackage Permalink_Settings_Screen
*/ */
function add_js() { function options_permalink_add_js() {
?> ?>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
@ -70,7 +70,7 @@ jQuery(document).ready(function() {
</script> </script>
<?php <?php
} }
add_filter('admin_head', 'add_js'); add_filter('admin_head', 'options_permalink_add_js');
include('./admin-header.php'); include('./admin-header.php');

View File

@ -21,7 +21,7 @@ $parent_file = 'options-general.php';
* @package WordPress * @package WordPress
* @subpackage Reading_Settings_Screen * @subpackage Reading_Settings_Screen
*/ */
function add_js() { function options_reading_add_js() {
?> ?>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[
@ -39,7 +39,7 @@ function add_js() {
</script> </script>
<?php <?php
} }
add_action('admin_head', 'add_js'); add_action('admin_head', 'options_reading_add_js');
get_current_screen()->add_help_tab( array( get_current_screen()->add_help_tab( array(
'id' => 'overview', 'id' => 'overview',

View File

@ -85,7 +85,7 @@ $step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0;
* @package WordPress * @package WordPress
* @subpackage Installer_WP_Config * @subpackage Installer_WP_Config
*/ */
function display_header() { function setup_config_display_header() {
global $wp_version; global $wp_version;
header( 'Content-Type: text/html; charset=utf-8' ); header( 'Content-Type: text/html; charset=utf-8' );
@ -101,11 +101,11 @@ function display_header() {
<body<?php if ( is_rtl() ) echo ' class="rtl"'; ?>> <body<?php if ( is_rtl() ) echo ' class="rtl"'; ?>>
<h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png?ver=20120216" /></h1> <h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png?ver=20120216" /></h1>
<?php <?php
}//end function display_header(); } // end function setup_config_display_header();
switch($step) { switch($step) {
case 0: case 0:
display_header(); setup_config_display_header();
?> ?>
<p><?php _e( 'Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.' ) ?></p> <p><?php _e( 'Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.' ) ?></p>
@ -124,7 +124,7 @@ switch($step) {
break; break;
case 1: case 1:
display_header(); setup_config_display_header();
?> ?>
<form method="post" action="setup-config.php?step=2"> <form method="post" action="setup-config.php?step=2">
<p><?php _e( "Below you should enter your database connection details. If you're not sure about these, contact your host." ); ?></p> <p><?php _e( "Below you should enter your database connection details. If you're not sure about these, contact your host." ); ?></p>
@ -254,7 +254,7 @@ switch($step) {
unset( $line ); unset( $line );
if ( ! is_writable(ABSPATH) ) : if ( ! is_writable(ABSPATH) ) :
display_header(); setup_config_display_header();
?> ?>
<p><?php _e( "Sorry, but I can't write the <code>wp-config.php</code> file." ); ?></p> <p><?php _e( "Sorry, but I can't write the <code>wp-config.php</code> file." ); ?></p>
<p><?php _e( 'You can create the <code>wp-config.php</code> manually and paste the following text into it.' ); ?></p> <p><?php _e( 'You can create the <code>wp-config.php</code> manually and paste the following text into it.' ); ?></p>
@ -273,7 +273,7 @@ switch($step) {
} }
fclose($handle); fclose($handle);
chmod(ABSPATH . 'wp-config.php', 0666); chmod(ABSPATH . 'wp-config.php', 0666);
display_header(); setup_config_display_header();
?> ?>
<p><?php _e( "All right sparky! You've made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to&hellip;" ); ?></p> <p><?php _e( "All right sparky! You've made it through this part of the installation. WordPress can now communicate with your database. If you are ready, time now to&hellip;" ); ?></p>