Ticket #17025: list-authors_filter_3.2.patch
| File list-authors_filter_3.2.patch, 874 bytes (added by kevinB, 2 years ago) |
|---|
-
wp-includes/author-template.php
291 291 $authors = get_users( $query_args ); 292 292 293 293 $author_count = array(); 294 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 )294 foreach ( (array) $wpdb->get_results( apply_filters( 'list_authors_query', "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", $args ) ) as $row ) 295 295 $author_count[$row->post_author] = $row->count; 296 296 297 297 foreach ( $authors as $author_id ) {
