Make WordPress Core

Changeset 56241 for trunk/src/index.php


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/index.php

    r54650 r56241  
    2222
    2323define( 'WPINC', 'wp-includes' );
     24require_once ABSPATH . WPINC . '/version.php';
     25require_once ABSPATH . WPINC . '/compat.php';
    2426require_once ABSPATH . WPINC . '/load.php';
     27
     28// Check for the required PHP version and for the MySQL extension or a database drop-in.
     29wp_check_php_mysql_versions();
    2530
    2631// Standardize $_SERVER variables across setups.
    2732wp_fix_server_vars();
    2833
     34define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
    2935require_once ABSPATH . WPINC . '/functions.php';
    30 define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
    31 require_once ABSPATH . WPINC . '/version.php';
    3236
    33 wp_check_php_mysql_versions();
    3437wp_load_translations_early();
    3538
Note: See TracChangeset for help on using the changeset viewer.