Disable sorting by post count for now. See #15861
git-svn-id: http://svn.automattic.com/wordpress/trunk@17024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8a261e59e2
commit
c1e19baef8
|
@ -169,7 +169,6 @@ class WP_Users_List_Table extends WP_List_Table {
|
||||||
'username' => 'login',
|
'username' => 'login',
|
||||||
'name' => 'name',
|
'name' => 'name',
|
||||||
'email' => 'email',
|
'email' => 'email',
|
||||||
'posts' => 'post_count',
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( $this->is_site_users )
|
if ( $this->is_site_users )
|
||||||
|
|
|
@ -431,6 +431,7 @@ class WP_User_Query {
|
||||||
} elseif ( 'name' == $qv['orderby'] || 'display_name' == $qv['orderby'] ) {
|
} elseif ( 'name' == $qv['orderby'] || 'display_name' == $qv['orderby'] ) {
|
||||||
$orderby = 'display_name';
|
$orderby = 'display_name';
|
||||||
} elseif ( 'post_count' == $qv['orderby'] ) {
|
} elseif ( 'post_count' == $qv['orderby'] ) {
|
||||||
|
// todo: avoid the JOIN
|
||||||
$where = get_posts_by_author_sql('post');
|
$where = get_posts_by_author_sql('post');
|
||||||
$this->query_from .= " LEFT OUTER JOIN (
|
$this->query_from .= " LEFT OUTER JOIN (
|
||||||
SELECT post_author, COUNT(*) as post_count
|
SELECT post_author, COUNT(*) as post_count
|
||||||
|
|
Loading…
Reference in New Issue