diff --git src/wp-includes/query.php src/wp-includes/query.php
index 8bf292e..b5d7e43 100644
|
|
class WP_Query { |
2755 | 2755 | foreach ( $statuswheres as $index => $statuswhere ) |
2756 | 2756 | $statuswheres[$index] = "($statuswhere OR ($wpdb->posts.post_status = 'inherit' AND " . str_replace($wpdb->posts, 'p2', $statuswhere) . "))"; |
2757 | 2757 | } |
2758 | | foreach ( $statuswheres as $statuswhere ) |
2759 | | $where .= " AND $statuswhere"; |
| 2758 | $where_status = implode(' OR ', $statuswheres); |
| 2759 | if(!empty($where_status)) |
| 2760 | $where .= " AND ($where_status)"; |
2760 | 2761 | } elseif ( !$this->is_singular ) { |
2761 | 2762 | $where .= " AND ($wpdb->posts.post_status = 'publish'"; |
2762 | 2763 | |