Don't check post counts in the network admin. props scribu, fixes #15699.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
057ed950e7
commit
944f37cd3e
|
@ -180,7 +180,8 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||||
|
|
||||||
function display_rows() {
|
function display_rows() {
|
||||||
// Query the post counts for this page
|
// 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 = '';
|
$style = '';
|
||||||
foreach ( $this->items as $userid => $user_object ) {
|
foreach ( $this->items as $userid => $user_object ) {
|
||||||
|
@ -190,7 +191,7 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
$style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"';
|
$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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue