WordPress.org

Make WordPress Core

Ticket #21316: 21316.6.patch

File 21316.6.patch, 6.5 KB (added by SergeyBiryukov, 3 years ago)
  • wp-admin/index.php

     
    22/** 
    33 * Dashboard Administration Screen 
    44 * 
     5 * @internal This file must be parsable by PHP4. 
     6 * 
    57 * @package WordPress 
    68 * @subpackage Administration 
    79 */ 
     
    3234 
    3335$help = '<p>' . __( 'Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab in the upper corner.' ) . '</p>'; 
    3436 
    35 get_current_screen()->add_help_tab( array( 
     37$current_screen = get_current_screen(); 
     38$current_screen->add_help_tab( array( 
    3639        'id'      => 'overview', 
    3740        'title'   => __( 'Overview' ), 
    3841        'content' => $help, 
     
    4346$help  = '<p>' . __('The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.') . '</p>'; 
    4447$help .= '<p>' . __('Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.') . '</p>'; 
    4548 
    46 get_current_screen()->add_help_tab( array( 
     49$current_screen->add_help_tab( array( 
    4750        'id'      => 'help-navigation', 
    4851        'title'   => __('Navigation'), 
    4952        'content' => $help, 
     
    5457$help .= '<p>' . __('<strong>Drag and Drop</strong> - To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.') . '</p>'; 
    5558$help .= '<p>' . __('<strong>Box Controls</strong> - Click the title bar of the box to expand or collapse it. In addition, some box have configurable content, and will show a &#8220;Configure&#8221; link in the title bar if you hover over it.') . '</p>'; 
    5659 
    57 get_current_screen()->add_help_tab( array( 
     60$current_screen->add_help_tab( array( 
    5861        'id'      => 'help-layout', 
    5962        'title'   => __('Layout'), 
    6063        'content' => $help, 
     
    7881if ( current_user_can( 'edit_theme_options' ) ) 
    7982        $help .= '<p>' . __('<strong>Welcome</strong> - Shows links for some of the most common tasks when setting up a new site.') . '</p>'; 
    8083 
    81 get_current_screen()->add_help_tab( array( 
     84$current_screen->add_help_tab( array( 
    8285        'id'      => 'help-content', 
    8386        'title'   => __('Content'), 
    8487        'content' => $help, 
     
    8689 
    8790unset( $help ); 
    8891 
    89 get_current_screen()->set_help_sidebar( 
     92$current_screen->set_help_sidebar( 
    9093        '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . 
    9194        '<p>' . __( '<a href="http://codex.wordpress.org/Dashboard_Screen" target="_blank">Documentation on Dashboard</a>' ) . '</p>' . 
    9295        '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>' ) . '</p>' 
  • wp-admin/setup-config.php

     
    5454wp_unregister_GLOBALS(); 
    5555 
    5656require_once(ABSPATH . WPINC . '/compat.php'); 
     57require_once(ABSPATH . WPINC . '/functions.php'); 
    5758require_once(ABSPATH . WPINC . '/class-wp-error.php'); 
    5859require_once(ABSPATH . WPINC . '/formatting.php'); 
    5960 
     
    217218        } 
    218219 
    219220        $key = 0; 
    220         foreach ( $config_file as &$line ) { 
     221        foreach ( $config_file as $line_num => $line ) { 
    221222                if ( '$table_prefix  =' == substr( $line, 0, 16 ) ) { 
    222                         $line = '$table_prefix  = \'' . addcslashes( $prefix, "\\'" ) . "';\r\n"; 
     223                        $config_file[ $line_num ] = '$table_prefix  = \'' . addcslashes( $prefix, "\\'" ) . "';\r\n"; 
    223224                        continue; 
    224225                } 
    225226 
     
    234235                        case 'DB_USER'     : 
    235236                        case 'DB_PASSWORD' : 
    236237                        case 'DB_HOST'     : 
    237                                 $line = "define('" . $constant . "'," . $padding . "'" . addcslashes( constant( $constant ), "\\'" ) . "');\r\n"; 
     238                                $config_file[ $line_num ] = "define('" . $constant . "'," . $padding . "'" . addcslashes( constant( $constant ), "\\'" ) . "');\r\n"; 
    238239                                break; 
    239240                        case 'AUTH_KEY'         : 
    240241                        case 'SECURE_AUTH_KEY'  : 
     
    244245                        case 'SECURE_AUTH_SALT' : 
    245246                        case 'LOGGED_IN_SALT'   : 
    246247                        case 'NONCE_SALT'       : 
    247                                 $line = "define('" . $constant . "'," . $padding . "'" . $secret_keys[$key++] . "');\r\n"; 
     248                                $config_file[ $line_num ] = "define('" . $constant . "'," . $padding . "'" . $secret_keys[ $key++ ] . "');\r\n"; 
    248249                                break; 
    249250                } 
    250251        } 
  • wp-includes/load.php

     
    105105        $php_version = phpversion(); 
    106106        if ( version_compare( $required_php_version, $php_version, '>' ) ) { 
    107107                wp_load_translations_early(); 
    108                 wp_die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) ); 
     108                die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) ); 
    109109        } 
    110110 
    111111        if ( ! extension_loaded( 'mysql' ) && ! file_exists( WP_CONTENT_DIR . '/db.php' ) ) { 
    112112                wp_load_translations_early(); 
    113                 wp_die( __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ) ); 
     113                die( __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ) ); 
    114114        } 
    115115} 
    116116 
     
    685685        require_once ABSPATH . WPINC . '/locale.php'; 
    686686 
    687687        // General libraries 
    688         require_once ABSPATH . WPINC . '/functions.php'; 
    689688        require_once ABSPATH . WPINC . '/plugin.php'; 
    690689 
    691690        $locales = $locations = array(); 
  • wp-load.php

     
    5252        wp_check_php_mysql_versions(); 
    5353 
    5454        // Die with an error message 
     55        require_once( ABSPATH . WPINC . '/functions.php' ); 
    5556        $die  = __( "There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started." ) . '</p>'; 
    5657        $die .= '<p>' . __( "Need more help? <a href='http://codex.wordpress.org/Editing_wp-config.php'>We got it</a>." ) . '</p>'; 
    5758        $die .= '<p>' . __( "You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file." ) . '</p>';