Skip to content

Commit e1008a3

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@60923 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ecb5067 commit e1008a3

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/wp-admin/admin.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,26 +72,30 @@
7272
* @param bool $do_mu_upgrade Whether to perform the Multisite upgrade routine. Default true.
7373
*/
7474
if ( apply_filters( 'do_mu_upgrade', true ) ) {
75-
$c = get_blog_count();
75+
$blog_count = get_blog_count();
7676

7777
/*
7878
* If there are 50 or fewer sites, run every time. Otherwise, throttle to reduce load:
7979
* attempt to do no more than threshold value, with some +/- allowed.
8080
*/
81-
if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int) ( $c / 50 ) ) === 1 ) ) {
81+
if ( $blog_count <= 50 || ( $blog_count > 50 && mt_rand( 0, (int) ( $blog_count / 50 ) ) === 1 ) ) {
8282
require_once ABSPATH . WPINC . '/http.php';
83+
8384
$response = wp_remote_get(
8485
admin_url( 'upgrade.php?step=1' ),
8586
array(
8687
'timeout' => 120,
8788
'httpversion' => '1.1',
8889
)
8990
);
91+
9092
/** This action is documented in wp-admin/network/upgrade.php */
9193
do_action( 'after_mu_upgrade', $response );
94+
9295
unset( $response );
9396
}
94-
unset( $c );
97+
98+
unset( $blog_count );
9599
}
96100
}
97101

0 commit comments

Comments
 (0)