It seems that there is a back door in the header of any wpmu installation which allows to see the number of blogs on it. I have posted it here:
http://www.ringofblogs.com/2007/08/30/back-door-to-see-the-number-of-blogs-on-a-mu-installation/
It seems that there is a back door in the header of any wpmu installation which allows to see the number of blogs on it. I have posted it here:
http://www.ringofblogs.com/2007/08/30/back-door-to-see-the-number-of-blogs-on-a-mu-installation/
simply edit your wpmu-functions.php in wp-includes. ~70 line in wpmu 1.0
if( defined( "WP_INSTALLING" ) == false ) {
header( "X-totalblogs: " . get_blog_count() );
header( "X-rootblog: http://" . $current_site->domain . $current_site->path );
header( "X-created-on: " . $current_blog->registered );
if( empty( $WPMU_date ) == false )
header( "X-wpmu-date: $WPMU_date" );
}
I just posted this on my own support forum and am waiting to hear back from my own clients who have wpmu. (all 18 of them)
I know one of them is a privacy freak. Can't wait to hear from her.
Granted it's really not a privacy issue. Most of us have a blog count on the front page, a link back to the root blog in the footer, and could care less when a site is created. But still....
byjournal, see the post for removal instructions. Its line 77
How could I access this function since 1.3 ?
enseignement, it seems that the function was removed in 1.3.
Is there any way to know how many blogs do we have in the admin panel ?
If you just want to know the number of blogs, there is a function in wpmu-functions.php called get_sitestats(). I use the following to show the number of blogs in a couple of different places on my site. For example, I have this in wp-admin/index.php to show the number in the dashboard.
<?php $stats = get_sitestats();
echo "<em><small>We are currently hosting ".$stats[ 'blogs' ]." blogs</em></small>";
?>
For reference: http://trac.mu.wordpress.org/changeset/1063
You could probably return that code if you wanted to.
As a note, it wasn't a function. It was automatically sent in the headers to the browser. It wasn't something (by the lines removed) that was displayed on a page.