mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Remove duplicated create_function calls an use a private _search_terms_tidy function instead for tidying up the post/page searching when looking to attach orphans to a parent post or page.
git-svn-id: https://develop.svn.wordpress.org/trunk@12052 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1747,7 +1747,7 @@ class WP_Query {
|
||||
$q['search_terms'] = array($q['s']);
|
||||
} else {
|
||||
preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $q['s'], $matches);
|
||||
$q['search_terms'] = array_map(create_function('$a', 'return trim($a, "\\"\'\\n\\r ");'), $matches[0]);
|
||||
$q['search_terms'] = array_map('_search_terms_tidy', $matches[0]);
|
||||
}
|
||||
$n = !empty($q['exact']) ? '' : '%';
|
||||
$searchand = '';
|
||||
|
||||
Reference in New Issue
Block a user