Make WordPress Core

Changeset 16775


Ignore:
Timestamp:
12/07/2010 08:54:04 PM (14 years ago)
Author:
nacin
Message:

Don't check post counts in the network admin. props scribu, fixes #15699.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-users-list-table.php

    r16573 r16775  
    181181    function display_rows() {
    182182        // Query the post counts for this page
    183         $post_counts = count_many_users_posts( array_keys( $this->items ) );
     183        if ( $this->is_site_users )
     184            $post_counts = count_many_users_posts( array_keys( $this->items ) );
    184185
    185186        $style = '';
     
    191192
    192193            $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"';
    193             echo "\n\t", $this->single_row( $user_object, $style, $role, $post_counts[ $userid ] );
     194            echo "\n\t", $this->single_row( $user_object, $style, $role, isset( $post_counts ) ? $post_counts[ $userid ] : 0 );
    194195        }
    195196    }
Note: See TracChangeset for help on using the changeset viewer.