WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/15/2010 08:13:31 PM (9 years ago)
Author:
scribu
Message:

use get_user_count() in get_sitestats()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/ms-functions.php

    r15595 r15621  
    1212
    1313    $stats['blogs'] = get_blog_count();
    14 
    15     $count_ts = get_site_option( 'user_count_ts' );
    16     if ( time() - $count_ts > 3600 ) {
    17         $count = $wpdb->get_var( "SELECT COUNT(ID) FROM $wpdb->users" );
    18         update_site_option( 'user_count', $count );
    19         update_site_option( 'user_count_ts', time() );
    20     } else {
    21         $count = get_site_option( 'user_count' );
    22     }
    23     $stats['users'] = $count;
     14    $stats['users'] = get_user_count();
     15
    2416    return $stats;
    2517}
Note: See TracChangeset for help on using the changeset viewer.