Make WordPress Core


Ignore:
Timestamp:
10/18/2009 11:50:59 AM (15 years ago)
Author:
westi
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r11998 r12052  
    17481748            } else {
    17491749                preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $q['s'], $matches);
    1750                 $q['search_terms'] = array_map(create_function('$a', 'return trim($a, "\\"\'\\n\\r ");'), $matches[0]);
     1750                $q['search_terms'] = array_map('_search_terms_tidy', $matches[0]);
    17511751            }
    17521752            $n = !empty($q['exact']) ? '' : '%';
Note: See TracChangeset for help on using the changeset viewer.