[wp-trac] [WordPress Trac] #38099: Ability to disable hyphen-based exclusion in searches
WordPress Trac
noreply at wordpress.org
Fri Oct 14 20:05:42 UTC 2016
#38099: Ability to disable hyphen-based exclusion in searches
--------------------------------------+---------------------------
Reporter: chriseverson | Owner: boonebgorges
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.7
Component: Query | Version: 4.4
Severity: normal | Resolution: fixed
Keywords: has-unit-tests has-patch | Focuses:
--------------------------------------+---------------------------
Changes (by boonebgorges):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"38792"]:
{{{
#!CommitTicketReference repository="" revision="38792"
Query: Allow the hyphen-prefix-for-search-exclusion feature to be disabled
by filter.
WordPress 4.4 introduced "hyphen exclusion" for search terms, so that
"foo -bar" would return posts containing "foo" AND not containing "bar".
The new filter 'wp_query_use_hyphen_for_exclusion' allows developers
to disable this feature when it's known that their content will contain
semantically important leading hyphens.
Props chriseverson, choongsavvii.
Fixes #38099.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38099#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list