Ticket #23498: 23498.diff
File 23498.diff, 937 bytes (added by , 11 years ago) |
---|
-
wp-includes/author-template.php
335 335 336 336 $query_args = wp_array_slice_assoc( $args, array( 'orderby', 'order', 'number' ) ); 337 337 $query_args['fields'] = 'ids'; 338 339 if( $exclude_admin == true ) { 340 $exclude = get_users( array( 'role' => 'administrator' ) ); 341 foreach ( $exclude as $admin ) { 342 $exclude_ids[] = $admin->ID; 343 } 344 $query_args['exclude'] = $exclude_ids; 345 } 346 338 347 $authors = get_users( $query_args ); 339 348 340 349 $author_count = array(); … … 344 353 foreach ( $authors as $author_id ) { 345 354 $author = get_userdata( $author_id ); 346 355 347 if ( $exclude_admin && 'admin' == $author->display_name )348 continue;349 350 356 $posts = isset( $author_count[$author->ID] ) ? $author_count[$author->ID] : 0; 351 357 352 358 if ( !$posts && $hide_empty )