From 03a9059cdcfa8bc9db7bfad95a66d7cbef8f5b36 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 1 Oct 2012 15:31:40 +0000 Subject: [PATCH] Restore the behavior of the 'all' status for comment queries. Props SergeyBiryukov. see #21101 git-svn-id: https://develop.svn.wordpress.org/trunk@22090 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index d0223b7666..d8ca7859da 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -263,7 +263,7 @@ class WP_Comment_Query { $approved = "comment_approved = '0'"; elseif ( 'approve' == $status ) $approved = "comment_approved = '1'"; - elseif ( ! empty( $status ) ) + elseif ( ! empty( $status ) && 'all' != $status ) $approved = $wpdb->prepare( "comment_approved = %s", $status ); else $approved = "( comment_approved = '0' OR comment_approved = '1' )";