Ability to disable hyphen-based exclusion in searches
|Reported by:||chriseverson||Owned by:||dlh|
In 4.4.0, the ability to prepend a search term with hyphen to indicate exclusion was added to the codebase.
This behavior is awesome 99.9% of the time, however I recently found myself working on site where this behavior is problematic due to the fact that their products are named, quite often, using hyphens, in the same fashion.
https://sunrisescience.com/?s=PABA&post_type=product is an example of this need in action. Searching PABA returns all products with "PABA" in the title, however, the project requirements in this case require the ability to search for "-PABA" in the title and not "PABA" without the preceding hyphen.
I'd propose a new filter to toggle this functionality on and off, and will send a patch for that as soon as I find some time over the next day or two.
Change History (25)
7 months ago
- Keywords needs-unit-tests needs-refresh added
- Milestone changed from Awaiting Review to 4.7
- Owner set to chriseverson
- Status changed from new to assigned
6 months ago
- Owner changed from boonebgorges to dlh
- Status changed from reopened to assigned