WordPress.org

Make WordPress Core

Ticket #37528: 37528.patch

File 37528.patch, 798 bytes (added by PieWP, 3 years ago)

Patch file

  • wp-includes/ms-functions.php

     
    22582258 *
    22592259 * @since 3.7.0
    22602260 *
    2261  * @global wpdb $wpdb WordPress database abstraction object.
     2261 * @param int $network_id Optional. Id of the network to calculate the site count for. Defaults to active network id.
    22622262 */
    2263 function wp_update_network_site_counts() {
    2264         global $wpdb;
     2263function wp_update_network_site_counts( $network_id = null ) {
    22652264
     2265        if ( !$network_id ) {
     2266                $network_id = get_current_network_id();
     2267        }
     2268       
    22662269        $count = get_sites( array(
    2267                 'network_id' => $wpdb->siteid,
     2270                'network_id' => $network_id,
    22682271                'spam'       => 0,
    22692272                'deleted'    => 0,
    22702273                'archived'   => 0,