Ticket #25709: 25709.diff
File 25709.diff, 824 bytes (added by , 11 years ago) |
---|
-
src/wp-includes/query.php
1979 1979 1980 1980 $stopwords = $this->get_search_stopwords(); 1981 1981 1982 $pcre_utf8 = (bool) @preg_match( '/\pL/u', 'w' ); 1983 1982 1984 foreach ( $terms as $term ) { 1983 1985 // keep before/after spaces when term is for exact match 1984 1986 if ( preg_match( '/^".+"$/', $term ) ) … … 1987 1989 $term = trim( $term, "\"' " ); 1988 1990 1989 1991 // \p{L} matches a single letter that is not a Chinese, Japanese, etc. char 1990 if ( ! $term || @preg_match( '/^\p{L}$/u', $term) )1992 if ( ! $term || ( $pcre_utf8 && preg_match( '/^\p{L}$/u', $term ) ) ) 1991 1993 continue; 1992 1994 1993 1995 if ( in_array( call_user_func( $strtolower, $term ), $stopwords, true ) )