mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 20:24:26 +00:00
Support date_query by user_registered in WP_User_Query.
Props ChriCo, nacin. Fixes #27283. git-svn-id: https://develop.svn.wordpress.org/trunk@29934 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -742,6 +742,12 @@ class WP_User_Query {
|
||||
$this->query_where .= " AND $wpdb->users.ID NOT IN ($ids)";
|
||||
}
|
||||
|
||||
// Date queries are allowed for the user_registered field.
|
||||
if ( ! empty( $qv['date_query'] ) && is_array( $qv['date_query'] ) ) {
|
||||
$date_query = new WP_Date_Query( $qv['date_query'], 'user_registered' );
|
||||
$this->query_where .= $date_query->get_sql();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires after the WP_User_Query has been parsed, and before
|
||||
* the query is executed.
|
||||
|
||||
Reference in New Issue
Block a user