From 6b5087812cc7224a6845d7b5d9a301b2e01cb56f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 26 Apr 2020 13:14:06 +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. Built from https://develop.svn.wordpress.org/trunk@47625 git-svn-id: http://core.svn.wordpress.org/trunk@47400 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-comment-query.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-comment-query.php b/wp-includes/class-wp-comment-query.php index 486faa4e88..ae176bc510 100644 --- a/wp-includes/class-wp-comment-query.php +++ b/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; diff --git a/wp-includes/version.php b/wp-includes/version.php index 9410fa6605..5272d1647b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-47623'; +$wp_version = '5.5-alpha-47625'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.