wp_maybe_update_network_user_counts

Update the network-wide users count.

Description

wp_maybe_update_network_user_counts(); 

If enabled through the filter, update the users count on a network when a user is created or its status is updated.


Usage

  1. if ( !function_exists( 'wp_maybe_update_network_user_counts' ) ) { 
  2. require_once ABSPATH . WPINC . '/ms-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wp_maybe_update_network_user_counts(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/ms-functions.php  
  1. function wp_maybe_update_network_user_counts() { 
  2. $is_small_network = ! wp_is_large_network( 'users' ); 
  3.  
  4. /** This filter is documented in wp-includes/ms-functions.php */ 
  5. if ( ! apply_filters( 'enable_live_network_counts', $is_small_network, 'users' ) ) 
  6. return; 
  7.