WordPress.org

Make WordPress Core

Ticket #40384: 40384.diff

File 40384.diff, 941 bytes (added by flixos90, 3 years ago)
  • src/wp-includes/ms-functions.php

     
    23002300 * on a network when a site is created or its status is updated.
    23012301 *
    23022302 * @since 3.7.0
     2303 * @since 4.8.0 The $network_id parameter has been added.
    23032304 */
    2304 function wp_maybe_update_network_site_counts() {
    2305         $is_small_network = ! wp_is_large_network( 'sites' );
     2305function wp_maybe_update_network_site_counts( $network_id = null ) {
     2306        $is_small_network = ! wp_is_large_network( 'sites', $network_id );
    23062307
    23072308        /**
    23082309         * Filters whether to update network site or user counts when a new site is created.
     
    23172318        if ( ! apply_filters( 'enable_live_network_counts', $is_small_network, 'sites' ) )
    23182319                return;
    23192320
    2320         wp_update_network_site_counts();
     2321        wp_update_network_site_counts( $network_id );
    23212322}
    23222323
    23232324/**