get_sitestats

Gets the network's site and user counts.

Description

(array) get_sitestats(); 

Returns (array)

Site and user count for the network.


Usage

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

Defined (1)

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

/wp-includes/ms-functions.php  
  1. function get_sitestats() { 
  2. $stats = array( 
  3. 'blogs' => get_blog_count(),  
  4. 'users' => get_user_count(),  
  5. ); 
  6.  
  7. return $stats;