WordPress.org

Make WordPress Core

Changeset 40591


Ignore:
Timestamp:
05/09/2017 03:59:39 PM (21 months ago)
Author:
flixos90
Message:

Multisite: Add $network_id parameter to wp_maybe_update_network_site_counts().

This allows calling the function for a specific network correctly, for example after a site has been created for it or been removed from it.

Fixes #40384. See #38699.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-functions.php

    r40590 r40591  
    23012301 *
    23022302 * @since 3.7.0
    2303  */
    2304 function wp_maybe_update_network_site_counts() {
    2305     $is_small_network = ! wp_is_large_network( 'sites' );
     2303 * @since 4.8.0 The $network_id parameter has been added.
     2304 */
     2305function wp_maybe_update_network_site_counts( $network_id = null ) {
     2306    $is_small_network = ! wp_is_large_network( 'sites', $network_id );
    23062307
    23072308    /**
     
    23182319        return;
    23192320
    2320     wp_update_network_site_counts();
     2321    wp_update_network_site_counts( $network_id );
    23212322}
    23222323
Note: See TracChangeset for help on using the changeset viewer.