From beaa3f69287938842a22bc0d3738b638f8e1091a Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Wed, 29 Oct 2014 19:51:23 +0000 Subject: [PATCH] Support an empty string passed as a status in `WP_Comment_Query`. The changes in [30084] broke backward compatibility with interfaces that manually passed an empty string for the value of 'status', such as on wp-admin/edit-comments.php. Fixes #29612. Built from https://develop.svn.wordpress.org/trunk@30093 git-svn-id: http://core.svn.wordpress.org/trunk@30093 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 4 +--- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index fb501142e8..76715f5f1f 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -355,9 +355,6 @@ class WP_Comment_Query { $statuses = preg_split( '/[\s,]+/', $statuses ); } - // Remove empty statuses. - $statuses = array_filter( $statuses ); - // 'any' overrides other statuses. if ( ! in_array( 'any', $statuses ) ) { foreach ( $statuses as $status ) { @@ -371,6 +368,7 @@ class WP_Comment_Query { break; case 'all' : + case '' : $status_clauses[] = "( comment_approved = '0' OR comment_approved = '1' )"; break; diff --git a/wp-includes/version.php b/wp-includes/version.php index 7d66665194..62a126c9d3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-30092'; +$wp_version = '4.1-alpha-30093'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.