Support `orderby => meta_value` in `WP_User_Query`. Adds unit test.
Props wpsmith. Fixes #21581. Built from https://develop.svn.wordpress.org/trunk@25331 git-svn-id: http://core.svn.wordpress.org/trunk@25293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
988caeb9a7
commit
dbec80b469
|
@ -435,6 +435,8 @@ class WP_User_Query {
|
|||
$orderby = 'post_count';
|
||||
} elseif ( 'ID' == $qv['orderby'] || 'id' == $qv['orderby'] ) {
|
||||
$orderby = 'ID';
|
||||
} elseif ( 'meta_value' == $qv['orderby'] ) {
|
||||
$orderby = "$wpdb->usermeta.meta_value";
|
||||
} else {
|
||||
$orderby = 'user_login';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue