Make WordPress Core

Ticket #48059: 48059.diff

File 48059.diff, 3.0 KB (added by SergeyBiryukov, 5 years ago)
  • src/wp-includes/load.php

     
    131131        $php_version = phpversion();
    132132
    133133        if ( version_compare( $required_php_version, $php_version, '>' ) ) {
    134                 wp_load_translations_early();
    135 
    136134                $protocol = wp_get_server_protocol();
    137135                header( sprintf( '%s 500 Internal Server Error', $protocol ), true, 500 );
    138136                header( 'Content-Type: text/html; charset=utf-8' );
    139                 /* translators: 1: Current PHP version number, 2: WordPress version number, 3: Minimum required PHP version number. */
    140                 printf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version );
     137                printf( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.', $php_version, $wp_version, $required_php_version );
    141138                exit( 1 );
    142139        }
    143140
  • src/wp-settings.php

     
    1515 */
    1616define( 'WPINC', 'wp-includes' );
    1717
     18/*
     19 * These can't be directly globalized in version.php. When updating,
     20 * we're including version.php from another installation and don't want
     21 * these values to be overridden if already set.
     22 */
     23global $wp_version, $wp_db_version, $tinymce_version, $required_php_version, $required_mysql_version, $wp_local_package;
     24require( ABSPATH . WPINC . '/version.php' );
     25require( ABSPATH . WPINC . '/load.php' );
     26
     27// Check for the required PHP version and for the MySQL extension or a database drop-in.
     28wp_check_php_mysql_versions();
     29
    1830// Include files required for initialization.
    19 require( ABSPATH . WPINC . '/load.php' );
    2031require( ABSPATH . WPINC . '/class-wp-paused-extensions-storage.php' );
    2132require( ABSPATH . WPINC . '/class-wp-fatal-error-handler.php' );
    2233require( ABSPATH . WPINC . '/class-wp-recovery-mode-cookie-service.php' );
     
    2839require( ABSPATH . WPINC . '/default-constants.php' );
    2940require_once( ABSPATH . WPINC . '/plugin.php' );
    3041
    31 /*
    32  * These can't be directly globalized in version.php. When updating,
    33  * we're including version.php from another installation and don't want
    34  * these values to be overridden if already set.
    35  */
    36 global $wp_version, $wp_db_version, $tinymce_version, $required_php_version, $required_mysql_version, $wp_local_package;
    37 require( ABSPATH . WPINC . '/version.php' );
    38 
    3942/**
    4043 * If not already configured, `$blog_id` will default to 1 in a single site
    4144 * configuration. In multisite, it will be overridden by default in ms-settings.php.
     
    5154// Make sure we register the shutdown handler for fatal errors as soon as possible.
    5255wp_register_fatal_error_handler();
    5356
    54 // Check for the required PHP version and for the MySQL extension or a database drop-in.
    55 wp_check_php_mysql_versions();
    56 
    5757// WordPress calculates offsets from UTC.
    5858date_default_timezone_set( 'UTC' );