Make WordPress Core

Ticket #40385: 40385.diff

File 40385.diff, 981 bytes (added by flixos90, 8 years ago)
  • src/wp-includes/ms-functions.php

     
    23302330 * on a network when a user is created or its status is updated.
    23312331 *
    23322332 * @since 3.7.0
     2333 * @since 4.8.0 The $network_id parameter has been added.
     2334 *
     2335 * @param int|null $network_id ID of the network. Default is the current network.
    23332336 */
    2334 function wp_maybe_update_network_user_counts() {
    2335         $is_small_network = ! wp_is_large_network( 'users' );
     2337function wp_maybe_update_network_user_counts( $network_id = null ) {
     2338        $is_small_network = ! wp_is_large_network( 'users', $network_id );
    23362339
    23372340        /** This filter is documented in wp-includes/ms-functions.php */
    23382341        if ( ! apply_filters( 'enable_live_network_counts', $is_small_network, 'users' ) )
    23392342                return;
    23402343
    2341         wp_update_network_user_counts();
     2344        wp_update_network_user_counts( $network_id );
    23422345}
    23432346
    23442347/**