mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-07 22:24:36 +00:00
Docs: Add a comment for stripping the leading AND from SQL clauses in some query classes.
Follow-up to [30084], [34529], [34542], [36598], [37477], [37572], [43010]. See #55646. git-svn-id: https://develop.svn.wordpress.org/trunk@53503 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -911,7 +911,9 @@ class WP_Comment_Query {
|
||||
}
|
||||
|
||||
if ( ! empty( $this->query_vars['date_query'] ) && is_array( $this->query_vars['date_query'] ) ) {
|
||||
$this->date_query = new WP_Date_Query( $this->query_vars['date_query'], 'comment_date' );
|
||||
$this->date_query = new WP_Date_Query( $this->query_vars['date_query'], 'comment_date' );
|
||||
|
||||
// Strip leading 'AND'.
|
||||
$this->sql_clauses['where']['date_query'] = preg_replace( '/^\s*AND\s*/', '', $this->date_query->get_sql() );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user