From e58993fe2ec240f232042b8d0189e7fbc5686f96 Mon Sep 17 00:00:00 2001 From: scribu Date: Fri, 17 Dec 2010 10:25:27 +0000 Subject: [PATCH] Disable sorting by post count for now. See #15861 git-svn-id: https://develop.svn.wordpress.org/trunk@17024 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/class-wp-users-list-table.php | 1 - wp-includes/user.php | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-users-list-table.php b/wp-admin/includes/class-wp-users-list-table.php index f264fa243e..68ced7c785 100644 --- a/wp-admin/includes/class-wp-users-list-table.php +++ b/wp-admin/includes/class-wp-users-list-table.php @@ -169,7 +169,6 @@ class WP_Users_List_Table extends WP_List_Table { 'username' => 'login', 'name' => 'name', 'email' => 'email', - 'posts' => 'post_count', ); if ( $this->is_site_users ) diff --git a/wp-includes/user.php b/wp-includes/user.php index 042fc9151c..d08c95713b 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -431,6 +431,7 @@ class WP_User_Query { } elseif ( 'name' == $qv['orderby'] || 'display_name' == $qv['orderby'] ) { $orderby = 'display_name'; } elseif ( 'post_count' == $qv['orderby'] ) { + // todo: avoid the JOIN $where = get_posts_by_author_sql('post'); $this->query_from .= " LEFT OUTER JOIN ( SELECT post_author, COUNT(*) as post_count