Make WordPress Core

Changeset 16953


Ignore:
Timestamp:
12/15/2010 04:51:38 PM (14 years ago)
Author:
nacin
Message:

Allow actual DB fields in WP_User_Query orderby. props duck, see #15816.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/meta.php

    r16596 r16953  
    353353}
    354354
    355 /*
     355/**
    356356 * Given a meta query, generates SQL clauses to be appended to a main query
    357357 *
  • trunk/wp-includes/user.php

    r16916 r16953  
    413413        if ( in_array( $qv['orderby'], array('email', 'url', 'registered') ) ) {
    414414            $orderby = 'user_' . $qv['orderby'];
     415        } elseif ( in_array( $qv['orderby'], array('user_email', 'user_url', 'user_registered') ) ) {
     416            $orderby = $qv['orderby'];
    415417        } elseif ( 'name' == $qv['orderby'] || 'display_name' == $qv['orderby'] ) {
    416418            $orderby = 'display_name';
Note: See TracChangeset for help on using the changeset viewer.