Make WordPress Core


Ignore:
Timestamp:
10/17/2014 01:36:36 AM (12 years ago)
Author:
boonebgorges
Message:

Support date_query by user_registered in WP_User_Query.

Props ChriCo, nacin.
Fixes #27283.

File:
1 edited

Legend:

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

    r29933 r29934  
    452452                $valid_columns = array(
    453453                        'post_date', 'post_date_gmt', 'post_modified',
    454                         'post_modified_gmt', 'comment_date', 'comment_date_gmt'
     454                        'post_modified_gmt', 'comment_date', 'comment_date_gmt',
     455                        'user_registered',
    455456                );
    456457
     
    464465                         * @param array $valid_columns An array of valid date query columns. Defaults
    465466                         *                             are 'post_date', 'post_date_gmt', 'post_modified',
    466                          *                             'post_modified_gmt', 'comment_date', 'comment_date_gmt'
     467                         *                             'post_modified_gmt', 'comment_date', 'comment_date_gmt',
     468                         *                             'user_registered'
    467469                         */
    468470                        if ( ! in_array( $column, apply_filters( 'date_query_valid_columns', $valid_columns ) ) ) {
     
    481483                                        'comment_date_gmt',
    482484                                ),
     485                                $wpdb->users => array(
     486                                        'user_registered',
     487                                ),
    483488                        );
    484489
Note: See TracChangeset for help on using the changeset viewer.