Gets the number of active sites on the installation.
The count is cached and updated twice daily. This is not a live count.
$network_idint|nulloptional
Default:null
function get_blog_count( $network_id = null ) {
return get_network_option( $network_id, 'blog_count' );
}
| Version | Description |
|---|---|
| MU (3.0.0) | MU (3.0.0) |
| 4.8.0 | The $network_id parameter is now being used. |
| 3.7.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_blog_count