From db84578f2472ec5596f93866331eec069d0f32a0 Mon Sep 17 00:00:00 2001 From: dd32 Date: Sun, 28 Feb 2010 07:47:11 +0000 Subject: [PATCH] Initialise Search related query vars. Props scribu. Fixes #11480 git-svn-id: http://svn.automattic.com/wordpress/trunk@13492 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 07e2132ef..650a1a90e 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1200,6 +1200,8 @@ class WP_Query { , 'meta_key' , 'meta_value' , 'preview' + , 's' + , 'sentence' ); foreach ($keys as $key) { @@ -1775,7 +1777,7 @@ class WP_Query { $searchand = ' AND '; } $term = esc_sql($q['s']); - if (empty($q['sentence']) && count($q['search_terms']) > 1 && $q['search_terms'][0] != $q['s'] ) + if ( empty($q['sentence']) && count($q['search_terms']) > 1 && $q['search_terms'][0] != $q['s'] ) $search .= " OR ($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}')"; if ( !empty($search) ) {