Coding Standards: Move $wp_db_version declaration to the top of wp-admin/network/upgrade.php.

Includes removing a duplicate DocBlock.

Follow-up to [12603], [25191], [60095].

See #63168.
Built from https://develop.svn.wordpress.org/trunk@60103


git-svn-id: http://core.svn.wordpress.org/trunk@59439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2025-03-28 16:30:27 +00:00
parent 8def2a9414
commit 6c67cb8408
2 changed files with 7 additions and 9 deletions

View File

@@ -12,6 +12,11 @@ require_once __DIR__ . '/admin.php';
require_once ABSPATH . WPINC . '/http.php';
/**
* @global int $wp_db_version WordPress database version.
*/
global $wp_db_version;
// Used in the HTML title tag.
$title = __( 'Upgrade Network' );
$parent_file = 'upgrade.php';
@@ -49,10 +54,6 @@ switch ( $action ) {
$n = ( isset( $_GET['n'] ) ) ? (int) $_GET['n'] : 0;
if ( $n < 5 ) {
/**
* @global int $wp_db_version WordPress database version.
*/
global $wp_db_version;
update_site_option( 'wpmu_upgrade_site', $wp_db_version );
}
@@ -135,10 +136,7 @@ switch ( $action ) {
break;
case 'show':
default:
/**
* @global int $wp_db_version WordPress database version.
*/
if ( (int) get_site_option( 'wpmu_upgrade_site' ) !== $GLOBALS['wp_db_version'] ) :
if ( (int) get_site_option( 'wpmu_upgrade_site' ) !== $wp_db_version ) :
?>
<h2><?php _e( 'Database Update Required' ); ?></h2>
<p><?php _e( 'WordPress has been updated! Next and final step is to individually upgrade the sites in your network.' ); ?></p>

View File

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