bp_blogs_total_blogs()
Get the total number of blogs being tracked by BuddyPress.
Description
Return
(int) $count Total blog count.
Source
File: bp-blogs/bp-blogs-functions.php
function bp_blogs_total_blogs() {
$count = wp_cache_get( 'bp_total_blogs', 'bp' );
if ( false === $count ) {
$blogs = BP_Blogs_Blog::get_all();
$count = $blogs['total'];
wp_cache_set( 'bp_total_blogs', $count, 'bp' );
}
return $count;
}
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.