From a38ca7ef4c66e798fe7cad83f4a0249530052399 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sun, 27 Oct 2013 20:53:09 +0000 Subject: [PATCH] Query stopwords: Only eliminate single A-Z letters as search terms. Merges [25954] to the 3.7 branch. Stop trying to match any single letters that are not East Asian characters, as this requires PCRE with UTF-8 support; and because it doesn't actually work. fixes #25709. Built from https://develop.svn.wordpress.org/branches/3.7@25955 git-svn-id: http://core.svn.wordpress.org/branches/3.7@25914 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index a9300329d1..93d57c2db8 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1986,8 +1986,8 @@ class WP_Query { else $term = trim( $term, "\"' " ); - // \p{L} matches a single letter that is not a Chinese, Japanese, etc. char - if ( ! $term || preg_match( '/^\p{L}$/u', $term ) ) + // Avoid single A-Z. + if ( ! $term || ( 1 === strlen( $term ) && preg_match( '/^[a-z]$/i', $term ) ) ) continue; if ( in_array( call_user_func( $strtolower, $term ), $stopwords, true ) )