WPMU Functions/get blog count
Description
Returns the number of active blogs on this WPMU install or specific site.
Parameters
- $id
- (integer) (Optional) The ID of the site (listed in wp_site) to return the count of blogs within. Excluding this argument (or setting it to 0) returns a count of all blogs on this WPMU install.
- Default: $wpdb->siteid
Return values
- (integer)
- The number of active blogs hosted by this WPMU install or specific site.
Usage
<?php get_blog_count($id) ?>
Examples
<?php
$blog_count = get_blog_count();
echo 'There are currently '.$blog_count.' blogs running on this server.';
?>
Notes
Uses update_site_option() and get_site_option() to set and return value.