-
Notifications
You must be signed in to change notification settings - Fork 313
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
is_admin() checks and AJAX context #2148
Comments
Hi @felipeelia, Regarding the issue description:
Just to keep this correct: no weighting fields are included in this case. Also fuzziness is not changed! I found another issue occurring regarding the
|
Hi @felipeelia, will this be fixed with the release of 3.6.0? |
Based on https://core.trac.wordpress.org/browser/tags/5.7.1/src/wp-includes/load.php#L951 core convention seems to be: // Protect the admin backend.
if ( is_admin() && ! wp_doing_ajax() ) {
return true;
} |
Unfortunately, it wasn't @moritzlang . We've been actively working on it though, as it'll be needed to a feature we are creating but probably it'll be merged only for 3.7.0. Stay tuned! |
@JakePT Do you have an update on this? Does this overlap with the work you're doing on the modal search? |
@mckdemps I did implement something for this for that feature. I'll look into how feasible it is to maybe pull it out and merge it separately. |
May I ask when you are planning to release version 3.7.0? |
@danielecelsa the new function will be part of 3.6.2 planned for the next couple of days. Stay tuned! |
Describe the bug
As shared in #2114 by @moritzlang, several of our conditionals for
is_admin()
should take into account AJAX requests, whereis_admin()
istrue
.We already have the
ep_ajax_wp_query_integration
filter that could (and should) be used in those tests. To keep things clean, we can create a new utils function calledis_admin_or_ajax()
that would contain both conditionals in it.Steps to Reproduce
Run a WP_Query with
ep_integrate
in an AJAX request and see that even the weighting fields are included.Expected behavior
Queries running via AJAX should mimic the behavior of the front end, especially when
ep_ajax_wp_query_integration
is true.Additional context
Places we've identified that should use that new function:
Probably there are others.
The text was updated successfully, but these errors were encountered: