WordPress.org

Make WordPress Core

Changeset 16956


Ignore:
Timestamp:
12/15/10 17:18:04 (4 years ago)
Author:
nacin
Message:

Add user_nicename, nicename, ID to WP_User_Query orderby. props duck_, fixes #15816.

File:
1 edited

Legend:

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

    r16953 r16956  
    411411 
    412412        // sorting 
    413         if ( in_array( $qv['orderby'], array('email', 'url', 'registered') ) ) { 
     413        if ( in_array( $qv['orderby'], array('nicename', 'email', 'url', 'registered') ) ) { 
    414414            $orderby = 'user_' . $qv['orderby']; 
    415         } elseif ( in_array( $qv['orderby'], array('user_email', 'user_url', 'user_registered') ) ) { 
     415        } elseif ( in_array( $qv['orderby'], array('user_nicename', 'user_email', 'user_url', 'user_registered') ) ) { 
    416416            $orderby = $qv['orderby']; 
    417417        } elseif ( 'name' == $qv['orderby'] || 'display_name' == $qv['orderby'] ) { 
     
    427427            "; 
    428428            $orderby = 'post_count'; 
    429         } elseif ( 'id' == $qv['orderby'] ) { 
     429        } elseif ( 'ID' == $qv['orderby'] || 'id' == $qv['orderby'] ) { 
    430430            $orderby = 'ID'; 
    431431        } else { 
Note: See TracChangeset for help on using the changeset viewer.