The MU forums have moved to WordPress.org

Backdoor: see the number of blogs on wpmu (10 posts)

  1. selad
    Member
    Posted 16 years ago #

    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/

  2. byjournal
    Member
    Posted 16 years ago #

    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" );
    }

  3. drmiketemp
    Member
    Posted 16 years ago #

    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....

  4. selad
    Member
    Posted 16 years ago #

    byjournal, see the post for removal instructions. Its line 77

  5. enseignement
    Member
    Posted 16 years ago #

    How could I access this function since 1.3 ?

  6. selad
    Member
    Posted 16 years ago #

    enseignement, it seems that the function was removed in 1.3.

  7. enseignement
    Member
    Posted 16 years ago #

    Is there any way to know how many blogs do we have in the admin panel ?

  8. ekusteve
    Member
    Posted 16 years ago #

    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>";
    ?>
  9. theapparatus
    Member
    Posted 16 years ago #

    For reference: http://trac.mu.wordpress.org/changeset/1063

    You could probably return that code if you wanted to.

  10. lunabyte
    Member
    Posted 16 years ago #

    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.

About this Topic