Allow actual DB fields in WP_User_Query orderby. props duck, see #15816.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -412,6 +412,8 @@ class WP_User_Query {
|
||||
// sorting
|
||||
if ( in_array( $qv['orderby'], array('email', 'url', 'registered') ) ) {
|
||||
$orderby = 'user_' . $qv['orderby'];
|
||||
} elseif ( in_array( $qv['orderby'], array('user_email', 'user_url', 'user_registered') ) ) {
|
||||
$orderby = $qv['orderby'];
|
||||
} elseif ( 'name' == $qv['orderby'] || 'display_name' == $qv['orderby'] ) {
|
||||
$orderby = 'display_name';
|
||||
} elseif ( 'post_count' == $qv['orderby'] ) {
|
||||
|
||||
Reference in New Issue
Block a user