Make WordPress Core

Changeset 61250


Ignore:
Timestamp:
11/16/2025 07:31:02 PM (2 months ago)
Author:
SergeyBiryukov
Message:

Bootstrap/Load: Only override the $table_prefix global if not already defined.

This aims to provide more flexibility in preloading some environment settings before initializing WordPress.

Follow-up to [18993], [57748].

Props ninos-ego, dd32, swissspidy, SergeyBiryukov.
Fixes #63627.

File:
1 edited

Legend:

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

    r61178 r61250  
    141141 * @global string $table_prefix The database table prefix.
    142142 */
    143 $GLOBALS['table_prefix'] = $table_prefix;
     143if ( ! isset( $GLOBALS['table_prefix'] ) ) {
     144    $GLOBALS['table_prefix'] = $table_prefix;
     145}
    144146
    145147// Set the database table prefix and the format specifiers for database table columns.
Note: See TracChangeset for help on using the changeset viewer.