Instead of interpreting $args['tax_query'] use WP_Query->tax_query #2419
+132
−181
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
While WordPress is parsing the WP_Query, it will get all taxonomy-related parameters like
taxonomy
,cat
,category__in
, etc., to build a bigtax_query
(see WP_Query::parse_tax_query()). This PR removes ElasticPress interpretation of those parameters to rely ultimately on thattax_query
, as WP would do.This PR is:1. Still a proof of concept and should not be considered ready to merge2. Should only be merged after we have all tests related to terms assuring we are really using ES.Alternate Designs
If we don't do it this way, we will have to (re)write all the tax parameters in the ES way, which doesn't seem to be needed.
Applicable Issues
Closes #2407
Changelog Entry
Changed: Taxonomy parameters now reflect the WordPress parsed
tax_query