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

Fix: Prevent exclude from search filter from being applied to admin queries #3156

Merged
merged 2 commits into from
Nov 28, 2022

Conversation

burhandodhy
Copy link
Contributor

Description of the Change

This PR fixes the issue where the exclude from search filter is being applied to admin queries. The problem was that WP_QUERY doesn't have is_admin() method. Despite the query being run in the admin dashboard, it always returns false. 

Closes #

How to test the Change

  1. Set the Exclude from search option for post.
  2. Go to admin dashboard -> all posts. Search for that post

Credits

Props @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.

@burhandodhy burhandodhy added this to the 4.4.0 milestone Nov 24, 2022
@felipeelia felipeelia merged commit f39c582 into develop Nov 28, 2022
@felipeelia felipeelia deleted the fix/check-for-admin branch November 28, 2022 11:38
felipeelia added a commit that referenced this pull request Nov 29, 2022
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