Make WordPress Core

Changeset 60923


Ignore:
Timestamp:
10/11/2025 11:39:47 PM (6 months ago)
Author:
SergeyBiryukov
Message:

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

Per the Naming Conventions:

Don’t abbreviate variable names unnecessarily; let the code be unambiguous and self-documenting.

Follow-up to mu:1940, [12712].

Props costdev, mukesh27.
See #63168.

File:
1 edited

Legend:

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

    r59634 r60923  
    7373     */
    7474    if ( apply_filters( 'do_mu_upgrade', true ) ) {
    75         $c = get_blog_count();
     75        $blog_count = get_blog_count();
    7676
    7777        /*
     
    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' ),
     
    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}
Note: See TracChangeset for help on using the changeset viewer.