From aa29bef29a9530197101af0afb12df197fcebc09 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 7 Dec 2010 20:54:04 +0000 Subject: [PATCH] Don't check post counts in the network admin. props scribu, fixes #15699. git-svn-id: https://develop.svn.wordpress.org/trunk@16775 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/class-wp-users-list-table.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-users-list-table.php b/wp-admin/includes/class-wp-users-list-table.php index 61b25cb211..0b33d4c304 100644 --- a/wp-admin/includes/class-wp-users-list-table.php +++ b/wp-admin/includes/class-wp-users-list-table.php @@ -180,7 +180,8 @@ class WP_Users_List_Table extends WP_List_Table { function display_rows() { // Query the post counts for this page - $post_counts = count_many_users_posts( array_keys( $this->items ) ); + if ( $this->is_site_users ) + $post_counts = count_many_users_posts( array_keys( $this->items ) ); $style = ''; foreach ( $this->items as $userid => $user_object ) { @@ -190,7 +191,7 @@ class WP_Users_List_Table extends WP_List_Table { continue; $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"'; - echo "\n\t", $this->single_row( $user_object, $style, $role, $post_counts[ $userid ] ); + echo "\n\t", $this->single_row( $user_object, $style, $role, isset( $post_counts ) ? $post_counts[ $userid ] : 0 ); } }