I18N: Add wp_search_term filter to allow per-term normalization#12578
I18N: Add wp_search_term filter to allow per-term normalization#12578SainathPoojary wants to merge 2 commits into
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
ed93a07 to
4c8ed24
Compare
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Trac ticket: #25585
Adds a new
wp_search_termfilter toWP_Query::parse_search_terms(). This allows plugins to normalize individual search terms (e.g., stripping Arabic diacritics/Hamza variants) or completely remove specific terms from a search query by returning an empty string.Testing Instructions:
npm run test:php -- tests/phpunit/tests/query/search.php