diff --git wp-includes/query.php wp-includes/query.php
index 04286aa..3c4db22 100644
|
|
|
class WP_Query { |
| 1478 | 1478 | $this->is_page = true; |
| 1479 | 1479 | $this->is_single = false; |
| 1480 | 1480 | } else { |
| 1481 | | // Look for archive queries. Dates, categories, authors, search, post type archives. |
| 1482 | 1481 | |
| 1483 | | if ( !empty($qv['s']) ) { |
| | 1482 | // Look for archive queries. Dates, categories, authors, search, post type archives. |
| | 1483 | if ( ! empty( $qv['s'] ) || ( $this->is_main_query() && isset( $qv['s'] ) ) ) |
| 1484 | 1484 | $this->is_search = true; |
| 1485 | | } |
| 1486 | 1485 | |
| 1487 | 1486 | if ( '' !== $qv['second'] ) { |
| 1488 | 1487 | $this->is_time = true; |
| … |
… |
class WP_Query { |
| 2210 | 2209 | if ( !is_user_logged_in() ) |
| 2211 | 2210 | $search .= " AND ($wpdb->posts.post_password = '') "; |
| 2212 | 2211 | } |
| | 2212 | } elseif ( $this->is_search ) { |
| | 2213 | $search = 'AND 0'; |
| 2213 | 2214 | } |
| 2214 | 2215 | |
| 2215 | 2216 | // Allow plugins to contextually add/remove/modify the search section of the database query |
| … |
… |
class WP_Query { |
| 2557 | 2558 | } |
| 2558 | 2559 | |
| 2559 | 2560 | // Comments feeds |
| 2560 | | if ( $this->is_comment_feed && ( $this->is_archive || $this->is_search || !$this->is_singular ) ) { |
| | 2561 | if ( $this->is_comment_feed && ( $this->is_archive || ( $this->is_search && ! empty( $q['s'] ) ) || !$this->is_singular ) ) { |
| 2561 | 2562 | if ( $this->is_archive || $this->is_search ) { |
| 2562 | 2563 | $cjoin = "JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) $join "; |
| 2563 | 2564 | $cwhere = "WHERE comment_approved = '1' $where"; |