Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New ep_facet_should_check_if_allowed filter #3430

Merged

Conversation

felipeelia
Copy link
Member

Description of the Change

This PR changes the way Meta fields Facets filter the results. Previously, it would be possible to filter simply by adding a parameter to the URL. Now, it will only filter results using meta fields selected in blocks.

Using add_filter( 'ep_facet_should_check_if_allowed', '__return_false' ); makes EP use the old behavior.

How to test the Change

Visit /?ep_meta_filter_= in a field that is not selected in a facet before and after checking out this PR.

Changelog Entry

Changed - Meta field facets now only filter based on fields selected on blocks. The new ep_facet_should_check_if_allowed filter reverts this behavior.

Credits

Props @felipeelia @burhandodhy

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@felipeelia felipeelia added this to the 4.5.1 milestone Apr 5, 2023
@burhandodhy burhandodhy assigned felipeelia and unassigned burhandodhy Apr 5, 2023
@felipeelia felipeelia merged commit 54b5110 into develop Apr 5, 2023
@felipeelia felipeelia deleted the feature/new-ep_facet_should_check_if_allowed-filter branch April 5, 2023 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants