From aff2844d753d4feb6dc91c32e0c9ad3ef5ebf3f4 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 26 Apr 2020 13:12:04 +0000 Subject: [PATCH] Comments: Restore inclusion of an empty comment type when building the `WHERE` clause in `WP_Comment_Query::get_comment_ids()`. This ensures that `get_comments( array( 'type' => 'comment' ) )` still includes comments that have not yet migrated to the `comment` type. Follow-up to [47597]. Props ocean90. See #49236. git-svn-id: https://develop.svn.wordpress.org/trunk@47625 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-comment-query.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-includes/class-wp-comment-query.php b/src/wp-includes/class-wp-comment-query.php index 486faa4e88..ae176bc510 100644 --- a/src/wp-includes/class-wp-comment-query.php +++ b/src/wp-includes/class-wp-comment-query.php @@ -741,6 +741,7 @@ class WP_Comment_Query { case 'comment': case 'comments': + $comment_types[ $operator ][] = "''"; $comment_types[ $operator ][] = "'comment'"; break;