mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Use get_query_var to get the search terms.
git-svn-id: https://develop.svn.wordpress.org/trunk@1714 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -297,6 +297,7 @@ class WP_Query {
|
||||
}
|
||||
if (!$q['sentence']) {
|
||||
$s_array = explode(' ',$q['s']);
|
||||
$q['search_terms'] = $s_array;
|
||||
$search .= '((post_title LIKE \''.$n.$s_array[0].$n.'\') OR (post_content LIKE \''.$n.$s_array[0].$n.'\'))';
|
||||
for ( $i = 1; $i < count($s_array); $i = $i + 1) {
|
||||
$search .= ' AND ((post_title LIKE \''.$n.$s_array[$i].$n.'\') OR (post_content LIKE \''.$n.$s_array[$i].$n.'\'))';
|
||||
|
||||
Reference in New Issue
Block a user