diff --git wp-admin/export.php wp-admin/export.php
index 8257b51..033fe4b 100644
|
|
|
if ( !current_user_can('export') ) |
| 16 | 16 | require_once('./includes/export.php'); |
| 17 | 17 | $title = __('Export'); |
| 18 | 18 | |
| 19 | | function add_js() { |
| | 19 | function add_js_for_wp_admin_export() { |
| 20 | 20 | ?> |
| 21 | 21 | <script type="text/javascript"> |
| 22 | 22 | //<![CDATA[ |
| … |
… |
function add_js() { |
| 36 | 36 | </script> |
| 37 | 37 | <?php |
| 38 | 38 | } |
| 39 | | add_action( 'admin_head', 'add_js' ); |
| | 39 | add_action( 'admin_head', 'add_js_for_wp_admin_export' ); |
| 40 | 40 | |
| 41 | 41 | get_current_screen()->add_help_tab( array( |
| 42 | 42 | 'id' => 'overview', |
diff --git wp-admin/install.php wp-admin/install.php
index e39d1f4..0e2db82 100644
|
|
|
$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0; |
| 50 | 50 | * @package WordPress |
| 51 | 51 | * @subpackage Installer |
| 52 | 52 | */ |
| 53 | | function display_header() { |
| | 53 | function display_install_header() { |
| 54 | 54 | header( 'Content-Type: text/html; charset=utf-8' ); |
| 55 | 55 | ?> |
| 56 | 56 | <!DOCTYPE html> |
| … |
… |
function display_header() { |
| 64 | 64 | <h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png?ver=20120216" /></h1> |
| 65 | 65 | |
| 66 | 66 | <?php |
| 67 | | } // end display_header() |
| | 67 | } // end display_install_header() |
| 68 | 68 | |
| 69 | 69 | /** |
| 70 | 70 | * Display installer setup form. |
| … |
… |
function display_setup_form( $error = null ) { |
| 141 | 141 | |
| 142 | 142 | // Let's check to make sure WP isn't already installed. |
| 143 | 143 | if ( is_blog_installed() ) { |
| 144 | | display_header(); |
| | 144 | display_install_header(); |
| 145 | 145 | die( '<h1>' . __( 'Already Installed' ) . '</h1><p>' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '</p><p class="step"><a href="../wp-login.php" class="button">' . __('Log In') . '</a></p></body></html>' ); |
| 146 | 146 | } |
| 147 | 147 | |
| … |
… |
elseif ( !$mysql_compat ) |
| 158 | 158 | $compat = sprintf( __( 'You cannot install because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.' ), $wp_version, $required_mysql_version, $mysql_version ); |
| 159 | 159 | |
| 160 | 160 | if ( !$mysql_compat || !$php_compat ) { |
| 161 | | display_header(); |
| | 161 | display_install_header(); |
| 162 | 162 | die( '<h1>' . __( 'Insufficient Requirements' ) . '</h1><p>' . $compat . '</p></body></html>' ); |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | if ( ! is_string( $wpdb->base_prefix ) || '' === $wpdb->base_prefix ) { |
| 166 | | display_header(); |
| | 166 | display_install_header(); |
| 167 | 167 | die( '<h1>' . __( 'Configuration Error' ) . '</h1><p>' . __( 'Your <code>wp-config.php</code> file has an empty database table prefix, which is not supported.' ) . '</p></body></html>' ); |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | switch($step) { |
| 171 | 171 | case 0: // Step 1 |
| 172 | 172 | case 1: // Step 1, direct link. |
| 173 | | display_header(); |
| | 173 | display_install_header(); |
| 174 | 174 | ?> |
| 175 | 175 | <h1><?php _ex( 'Welcome', 'Howdy' ); ?></h1> |
| 176 | 176 | <p><?php printf( __( 'Welcome to the famous five minute WordPress installation process! You may want to browse the <a href="%s">ReadMe documentation</a> at your leisure. Otherwise, just fill in the information below and you’ll be on your way to using the most extendable and powerful personal publishing platform in the world.' ), '../readme.html' ); ?></p> |
| … |
… |
switch($step) { |
| 185 | 185 | if ( ! empty( $wpdb->error ) ) |
| 186 | 186 | wp_die( $wpdb->error->get_error_message() ); |
| 187 | 187 | |
| 188 | | display_header(); |
| | 188 | display_install_header(); |
| 189 | 189 | // Fill in the data we gathered |
| 190 | 190 | $weblog_title = isset( $_POST['weblog_title'] ) ? trim( stripslashes( $_POST['weblog_title'] ) ) : ''; |
| 191 | 191 | $user_name = isset($_POST['user_name']) ? trim( stripslashes( $_POST['user_name'] ) ) : 'admin'; |
diff --git wp-admin/options-general.php wp-admin/options-general.php
index d8a8b80..65fdd0d 100644
|
|
|
$timezone_format = _x('Y-m-d G:i:s', 'timezone date format'); |
| 23 | 23 | * @package WordPress |
| 24 | 24 | * @subpackage General_Settings_Screen |
| 25 | 25 | */ |
| 26 | | function add_js() { |
| | 26 | function add_js_for_wp_admin_general_options() { |
| 27 | 27 | ?> |
| 28 | 28 | <script type="text/javascript"> |
| 29 | 29 | //<![CDATA[ |
| … |
… |
function add_js() { |
| 56 | 56 | </script> |
| 57 | 57 | <?php |
| 58 | 58 | } |
| 59 | | add_action('admin_head', 'add_js'); |
| | 59 | add_action('admin_head', 'add_js_for_wp_admin_general_options'); |
| 60 | 60 | |
| 61 | 61 | $options_help = '<p>' . __('The fields on this screen determine some of the basics of your site setup.') . '</p>' . |
| 62 | 62 | '<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>'; |
diff --git wp-admin/options-permalink.php wp-admin/options-permalink.php
index 9ccb62f..8d79a92 100644
|
|
|
get_current_screen()->set_help_sidebar( |
| 52 | 52 | * @package WordPress |
| 53 | 53 | * @subpackage Permalink_Settings_Screen |
| 54 | 54 | */ |
| 55 | | function add_js() { |
| | 55 | function add_js_for_wp_admin_permalink_options() { |
| 56 | 56 | ?> |
| 57 | 57 | <script type="text/javascript"> |
| 58 | 58 | //<![CDATA[ |
| … |
… |
jQuery(document).ready(function() { |
| 70 | 70 | </script> |
| 71 | 71 | <?php |
| 72 | 72 | } |
| 73 | | add_filter('admin_head', 'add_js'); |
| | 73 | add_filter('admin_head', 'add_js_for_wp_admin_permalink_options'); |
| 74 | 74 | |
| 75 | 75 | include('./admin-header.php'); |
| 76 | 76 | |
diff --git wp-admin/options-reading.php wp-admin/options-reading.php
index d1ff70f..7cf203c 100644
|
|
|
$parent_file = 'options-general.php'; |
| 21 | 21 | * @package WordPress |
| 22 | 22 | * @subpackage Reading_Settings_Screen |
| 23 | 23 | */ |
| 24 | | function add_js() { |
| | 24 | function add_js_for_wp_admin_reading_options() { |
| 25 | 25 | ?> |
| 26 | 26 | <script type="text/javascript"> |
| 27 | 27 | //<![CDATA[ |
| … |
… |
function add_js() { |
| 39 | 39 | </script> |
| 40 | 40 | <?php |
| 41 | 41 | } |
| 42 | | add_action('admin_head', 'add_js'); |
| | 42 | add_action('admin_head', 'add_js_for_wp_admin_reading_options'); |
| 43 | 43 | |
| 44 | 44 | get_current_screen()->add_help_tab( array( |
| 45 | 45 | 'id' => 'overview', |
diff --git wp-admin/setup-config.php wp-admin/setup-config.php
index 6201b00..ead58d6 100644
|
|
|
$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : 0; |
| 83 | 83 | * @package WordPress |
| 84 | 84 | * @subpackage Installer_WP_Config |
| 85 | 85 | */ |
| 86 | | function display_header() { |
| | 86 | function display_setup_config_header() { |
| 87 | 87 | global $wp_version; |
| 88 | 88 | |
| 89 | 89 | header( 'Content-Type: text/html; charset=utf-8' ); |
| … |
… |
function display_header() { |
| 99 | 99 | <body<?php if ( is_rtl() ) echo ' class="rtl"'; ?>> |
| 100 | 100 | <h1 id="logo"><img alt="WordPress" src="images/wordpress-logo.png?ver=20120216" /></h1> |
| 101 | 101 | <?php |
| 102 | | }//end function display_header(); |
| | 102 | }//end function display_setup_config_header(); |
| 103 | 103 | |
| 104 | 104 | switch($step) { |
| 105 | 105 | case 0: |
| 106 | | display_header(); |
| | 106 | display_setup_config_header(); |
| 107 | 107 | ?> |
| 108 | 108 | |
| 109 | 109 | <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> |
| … |
… |
switch($step) { |
| 122 | 122 | break; |
| 123 | 123 | |
| 124 | 124 | case 1: |
| 125 | | display_header(); |
| | 125 | display_setup_config_header(); |
| 126 | 126 | ?> |
| 127 | 127 | <form method="post" action="setup-config.php?step=2"> |
| 128 | 128 | <p><?php _e( "Below you should enter your database connection details. If you're not sure about these, contact your host." ); ?></p> |
| … |
… |
switch($step) { |
| 251 | 251 | unset( $line ); |
| 252 | 252 | |
| 253 | 253 | if ( ! is_writable(ABSPATH) ) : |
| 254 | | display_header(); |
| | 254 | display_setup_config_header(); |
| 255 | 255 | ?> |
| 256 | 256 | <p><?php _e( "Sorry, but I can't write the <code>wp-config.php</code> file." ); ?></p> |
| 257 | 257 | <p><?php _e( 'You can create the <code>wp-config.php</code> manually and paste the following text into it.' ); ?></p> |
| … |
… |
switch($step) { |
| 270 | 270 | } |
| 271 | 271 | fclose($handle); |
| 272 | 272 | chmod(ABSPATH . 'wp-config.php', 0666); |
| 273 | | display_header(); |
| | 273 | display_setup_config_header(); |
| 274 | 274 | ?> |
| 275 | 275 | <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…" ); ?></p> |
| 276 | 276 | |