Make WordPress Core


Ignore:
Timestamp:
07/16/2023 12:14:47 PM (5 months ago)
Author:
SergeyBiryukov
Message:

Bootstrap/Load: Require wp-includes/compat.php in src/index.php.

This allows for using polyfill functions if src/index.php is the entry point (this file exists as a reminder to build the assets, and is different from the actual index.php file that gets built and boots WordPress).

Includes:

  • Moving the check for the required PHP and MySQL versions earlier.
  • Making the load order consistent between src/index.php, wp-load.php, and wp-settings.php.

Follow-up to [46183], [56006], [56007].

Props westonruter, Presskopp, joemcgill, SergeyBiryukov.
See #58206.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-load.php

    r56006 r56241  
    6060
    6161    define( 'WPINC', 'wp-includes' );
     62    require_once ABSPATH . WPINC . '/version.php';
     63    require_once ABSPATH . WPINC . '/compat.php';
    6264    require_once ABSPATH . WPINC . '/load.php';
     65
     66    // Check for the required PHP version and for the MySQL extension or a database drop-in.
     67    wp_check_php_mysql_versions();
    6368
    6469    // Standardize $_SERVER variables across setups.
    6570    wp_fix_server_vars();
    6671
    67     require_once ABSPATH . WPINC . '/compat.php';
     72    define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
    6873    require_once ABSPATH . WPINC . '/functions.php';
    6974
     
    7681    }
    7782
    78     define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
    79     require_once ABSPATH . WPINC . '/version.php';
    80 
    81     wp_check_php_mysql_versions();
    8283    wp_load_translations_early();
    8384
Note: See TracChangeset for help on using the changeset viewer.