diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index b2cbd63931..e024789052 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -2354,14 +2354,17 @@ function wp_update_network_site_counts( $network_id = null ) { * Update the network-wide user count. * * @since 3.7.0 + * @since 4.8.0 The $network_id parameter has been added. * * @global wpdb $wpdb WordPress database abstraction object. + * + * @param int|null $network_id ID of the network. Default is the current network. */ -function wp_update_network_user_counts() { +function wp_update_network_user_counts( $network_id = null ) { global $wpdb; $count = $wpdb->get_var( "SELECT COUNT(ID) as c FROM $wpdb->users WHERE spam = '0' AND deleted = '0'" ); - update_site_option( 'user_count', $count ); + update_network_option( $network_id, 'user_count', $count ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 3be5d05964..6b9e9f4b88 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-40484'; +$wp_version = '4.8-alpha-40485'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.