From 1930427d3077b573e7c8431926b99c707ff5fca7 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Fri, 18 Dec 2020 00:17:32 +0000 Subject: [PATCH] Coding Standards: Minor fixes following [49830]. See #13509, #48968, #48556. git-svn-id: https://develop.svn.wordpress.org/trunk@49832 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-query.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php index 561aa747a756..e46ae817c18d 100644 --- a/src/wp-includes/class-wp-query.php +++ b/src/wp-includes/class-wp-query.php @@ -2524,7 +2524,6 @@ public function get_posts() { if ( ! empty( $where_status ) ) { $where .= " AND ($where_status)"; } - } elseif ( ! $this->is_singular ) { if ( 'any' === $post_type ) { $queried_post_types = get_post_types( array( 'exclude_from_search' => false ) ); @@ -2550,7 +2549,7 @@ public function get_posts() { // Public statuses. $public_statuses = get_post_stati( array( 'public' => true ) ); - $status_clauses = []; + $status_clauses = array(); foreach ( (array) $public_statuses as $public_status ) { $status_clauses[] = "{$wpdb->posts}.post_status = '$public_status'"; } @@ -2589,7 +2588,6 @@ public function get_posts() { } else { $where .= ' AND 1=0 '; } - } else { $where .= $post_type_where; }