get_blog_count
The number of active sites on your installation.
Description
(int) get_blog_count( (int) $network_id = 0 );
The count is cached and updated twice daily. This is not a live count.
Returns (int)
Parameters (1)
- 0. $network_id — Optional. (int)
- Deprecated, not supported.
Usage
if ( !function_exists( 'get_blog_count' ) ) { require_once ABSPATH . WPINC . '/ms-functions.php'; } // Deprecated, not supported. $network_id = -1; // NOTICE! Understand what this does before running. $result = get_blog_count($network_id);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/ms-functions.php
- function get_blog_count( $network_id = 0 ) {
- if ( func_num_args() )
- _deprecated_argument( __FUNCTION__, '3.1.0' );
- return get_site_option( 'blog_count' );
- }