The MU forums have moved to WordPress.org

$stats[ 'blogs' ] question (5 posts)

  1. andrewbillits
    Member
    Posted 16 years ago #

    does $stats[ 'blogs' ]; count the total blogs every time it is called or does it use some kind of cache?

  2. TomK32
    Member
    Posted 16 years ago #

    it's defined in wp-includes/wpmu-functions.php get_sitestats() and as it seems it's counting it every time. as I can see it's only used in wp-admin/wpmu-admin.php and it's a very simple SQL-query anyways.

  3. andrewbillits
    Member
    Posted 16 years ago #

    you can also use it on your main page for stats. I guess i'm going to have to write a cache script.

  4. sskhalsa
    Member
    Posted 16 years ago #

    Hey andrew, did you ever make one?
    I am using this:
    '
    <?php
    $stats = get_sitestats();
    print "<h2></h2>".$stats[ 'blogs' ]." blogs and ".$stats[ 'users' ]." users<h2></h2>";
    ;?>'

    But ever since i updated to the new build (12-2-05) It only updates the number of users.

  5. Kilmarac
    Member
    Posted 16 years ago #

    Have you gotten anything for showing New Blogs, last updated and such.

    Ive looked at the functions, but I cant seem to get them to show up on the front page.

About this Topic

  • Started 16 years ago by andrewbillits
  • Latest reply from Kilmarac