diff --git wp-includes/compat.php wp-includes/compat.php
index cb2a559..9d01933 100644
|
|
|
if ( !function_exists('json_decode') ) { |
| 94 | 94 | return is_array($data) ? array_map(__FUNCTION__, $data) : $data; |
| 95 | 95 | } |
| 96 | 96 | } |
| | 97 | |
| | 98 | if ( !function_exists( 'str_getcsv' ) ) { |
| | 99 | function str_getcsv( $input, $delimiter = ',', $enclosure = '"', $escape = "\\" ) { |
| | 100 | $fp = fopen( 'php://temp/', 'r+' ); |
| | 101 | fputs( $fp, $input ); |
| | 102 | rewind( $fp ); |
| | 103 | $data = fgetcsv( $fp, strlen( $input ), $delimiter, $enclosure ); |
| | 104 | fclose( $fp ); |
| | 105 | return $data; |
| | 106 | } |
| | 107 | } |
| | 108 | |
diff --git wp-includes/functions.php wp-includes/functions.php
index 726eebb..dbc0d1f 100644
|
|
|
function get_file_data( $file, $default_headers, $context = '' ) { |
| 3399 | 3399 | } |
| 3400 | 3400 | |
| 3401 | 3401 | /** |
| 3402 | | * Used internally to tidy up the search terms. |
| 3403 | | * |
| 3404 | | * @access private |
| 3405 | | * @since 2.9.0 |
| 3406 | | * |
| 3407 | | * @param string $t |
| 3408 | | * @return string |
| 3409 | | */ |
| 3410 | | function _search_terms_tidy($t) { |
| 3411 | | return trim($t, "\"'\n\r "); |
| 3412 | | } |
| 3413 | | |
| 3414 | | /** |
| 3415 | 3402 | * Returns true. |
| 3416 | 3403 | * |
| 3417 | 3404 | * Useful for returning true to filters easily. |
diff --git wp-includes/query.php wp-includes/query.php
index 303a395..78ba230 100644
|
|
|
class WP_Query { |
| 2180 | 2180 | if ( !empty($q['sentence']) ) { |
| 2181 | 2181 | $q['search_terms'] = array($q['s']); |
| 2182 | 2182 | } else { |
| 2183 | | preg_match_all('/".*?("|$)|((?<=[\r\n\t ",+])|^)[^\r\n\t ",+]+/', $q['s'], $matches); |
| 2184 | | $q['search_terms'] = array_map('_search_terms_tidy', $matches[0]); |
| | 2183 | $q['search_terms'] = array_filter( str_getcsv( $q['s'], ' ' ) ); |
| 2185 | 2184 | } |
| 2186 | 2185 | $n = !empty($q['exact']) ? '' : '%'; |
| 2187 | 2186 | $searchand = ''; |