mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 04:04:35 +00:00
Fix 'count' in WP_Comment_Query when using 'meta_query'.
Props heshiming, desaiuditd. Fixes #23369. git-svn-id: https://develop.svn.wordpress.org/trunk@30026 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -559,7 +559,10 @@ class WP_Comment_Query {
|
||||
$clauses = $this->meta_query->get_sql( 'comment', $wpdb->comments, 'comment_ID', $this );
|
||||
$join .= $clauses['join'];
|
||||
$where .= $clauses['where'];
|
||||
$groupby = "{$wpdb->comments}.comment_ID";
|
||||
|
||||
if ( ! $this->query_vars['count'] ) {
|
||||
$groupby = "{$wpdb->comments}.comment_ID";
|
||||
}
|
||||
}
|
||||
|
||||
$date_query = $this->query_vars['date_query'];
|
||||
|
||||
Reference in New Issue
Block a user