Make WordPress Core


Ignore:
Timestamp:
09/10/2013 11:09:10 PM (10 years ago)
Author:
wonderboymusic
Message:

Support orderby => meta_value in WP_User_Query. Adds unit test.

Props wpsmith.
Fixes #21581.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r25231 r25331  
    436436        } elseif ( 'ID' == $qv['orderby'] || 'id' == $qv['orderby'] ) {
    437437            $orderby = 'ID';
     438        } elseif ( 'meta_value' == $qv['orderby'] ) {
     439            $orderby = "$wpdb->usermeta.meta_value";
    438440        } else {
    439441            $orderby = 'user_login';
Note: See TracChangeset for help on using the changeset viewer.