mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@30093 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user