Ticket #21744: 21744.patch
| File 21744.patch, 761 bytes (added by , 13 years ago) |
|---|
-
wp-includes/user.php
372 372 $this->query_vars = wp_parse_args( $query, array( 373 373 'blog_id' => $GLOBALS['blog_id'], 374 374 'role' => '', 375 'post-type' => '', 375 376 'meta_key' => '', 376 377 'meta_value' => '', 377 378 'meta_compare' => '', … … 432 433 $orderby = 'display_name'; 433 434 } elseif ( 'post_count' == $qv['orderby'] ) { 434 435 // todo: avoid the JOIN 435 $where = get_posts_by_author_sql( 'post');436 $where = get_posts_by_author_sql($qv['post-type']); 436 437 $this->query_from .= " LEFT OUTER JOIN ( 437 438 SELECT post_author, COUNT(*) as post_count 438 439 FROM $wpdb->posts