Initialise Search related query vars. Props scribu. Fixes #11480
git-svn-id: http://svn.automattic.com/wordpress/trunk@13492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1b564b41f5
commit
db84578f24
|
@ -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) ) {
|
||||
|
|
Loading…
Reference in New Issue