Ticket #15888: 15888.diff
File 15888.diff, 994 bytes (added by , 14 years ago) |
---|
-
wp-includes/author-template.php
284 284 285 285 $return = ''; 286 286 287 $authors = get_users( wp_array_slice_assoc( $args, array( 'orderby', 'order', 'number' ) ) ); 287 $query_args = wp_array_slice_assoc( $args, array( 'orderby', 'order', 'number' ) ); 288 $query_args['fields'] = 'ids'; 289 $authors = get_users( $query_args ); 288 290 289 291 $author_count = array(); 290 292 foreach ( (array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE post_type = 'post' AND " . get_private_posts_cap_sql( 'post' ) . " GROUP BY post_author") as $row ) 291 293 $author_count[$row->post_author] = $row->count; 292 294 293 foreach ( $authors as $author ) { 295 foreach ( $authors as $author_id ) { 296 $author = get_userdata( $author_id ); 294 297 295 298 if ( $exclude_admin && 'admin' == $author->display_name ) 296 299 continue;