Coding Standards: Rename $c to $blog_count in wp-admin/admin.php.

Per the [https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#naming-conventions Naming Conventions]:
> Don’t abbreviate variable names unnecessarily; let the code be unambiguous and self-documenting.

Follow-up to [https://mu.trac.wordpress.org/changeset/1940 mu:1940], [12712].

Props costdev, mukesh27.
See #63168.
Built from https://develop.svn.wordpress.org/trunk@60923


git-svn-id: http://core.svn.wordpress.org/trunk@60259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2025-10-11 23:41:32 +00:00
parent 7065ba5866
commit d5fbdf4f58
2 changed files with 8 additions and 4 deletions

View File

@@ -72,14 +72,15 @@ if ( get_option( 'db_upgraded' ) ) {
* @param bool $do_mu_upgrade Whether to perform the Multisite upgrade routine. Default true.
*/
if ( apply_filters( 'do_mu_upgrade', true ) ) {
$c = get_blog_count();
$blog_count = get_blog_count();
/*
* If there are 50 or fewer sites, run every time. Otherwise, throttle to reduce load:
* attempt to do no more than threshold value, with some +/- allowed.
*/
if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int) ( $c / 50 ) ) === 1 ) ) {
if ( $blog_count <= 50 || ( $blog_count > 50 && mt_rand( 0, (int) ( $blog_count / 50 ) ) === 1 ) ) {
require_once ABSPATH . WPINC . '/http.php';
$response = wp_remote_get(
admin_url( 'upgrade.php?step=1' ),
array(
@@ -87,11 +88,14 @@ if ( get_option( 'db_upgraded' ) ) {
'httpversion' => '1.1',
)
);
/** This action is documented in wp-admin/network/upgrade.php */
do_action( 'after_mu_upgrade', $response );
unset( $response );
}
unset( $c );
unset( $blog_count );
}
}

View File

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