mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
use cached data in ms-admin.php stats, props ddebernardy, fixes #11772
git-svn-id: http://svn.automattic.com/wordpress/trunk@13114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d8490aeea2
commit
1d5b49f6f8
@ -18,8 +18,8 @@ if ( !is_super_admin() )
|
||||
wp_die( __('You do not have permission to access this page.') );
|
||||
|
||||
global $wpdb;
|
||||
$c_users = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->users}");
|
||||
$c_blogs = $wpdb->get_var("SELECT COUNT(blog_id) FROM {$wpdb->blogs}");
|
||||
$c_users = get_user_count();
|
||||
$c_blogs = get_blog_count();
|
||||
|
||||
$user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) );
|
||||
$blog_text = sprintf( _n( '%s blog', '%s blogs', $c_blogs ), number_format_i18n( $c_blogs ) );
|
||||
|
Loading…
Reference in New Issue
Block a user