Changeset 29934
- Timestamp:
- 10/17/2014 01:36:36 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/date.php
r29933 r29934 452 452 $valid_columns = array( 453 453 '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', 455 456 ); 456 457 … … 464 465 * @param array $valid_columns An array of valid date query columns. Defaults 465 466 * 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' 467 469 */ 468 470 if ( ! in_array( $column, apply_filters( 'date_query_valid_columns', $valid_columns ) ) ) { … … 481 483 'comment_date_gmt', 482 484 ), 485 $wpdb->users => array( 486 'user_registered', 487 ), 483 488 ); 484 489 -
trunk/src/wp-includes/user.php
r29843 r29934 741 741 $ids = implode( ',', wp_parse_id_list( $qv['exclude'] ) ); 742 742 $this->query_where .= " AND $wpdb->users.ID NOT IN ($ids)"; 743 } 744 745 // Date queries are allowed for the user_registered field. 746 if ( ! empty( $qv['date_query'] ) && is_array( $qv['date_query'] ) ) { 747 $date_query = new WP_Date_Query( $qv['date_query'], 'user_registered' ); 748 $this->query_where .= $date_query->get_sql(); 743 749 } 744 750
Note: See TracChangeset
for help on using the changeset viewer.