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.
Built from https://develop.svn.wordpress.org/trunk@61250


git-svn-id: http://core.svn.wordpress.org/trunk@60562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2025-11-16 19:33:35 +00:00
parent 9152e42457
commit 10ce1b8521
2 changed files with 4 additions and 2 deletions

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '7.0-alpha-61249';
$wp_version = '7.0-alpha-61250';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -140,7 +140,9 @@ require_wp_db();
*
* @global string $table_prefix The database table prefix.
*/
$GLOBALS['table_prefix'] = $table_prefix;
if ( ! isset( $GLOBALS['table_prefix'] ) ) {
$GLOBALS['table_prefix'] = $table_prefix;
}
// Set the database table prefix and the format specifiers for database table columns.
wp_set_wpdb_vars();