You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 2, 2021. It is now read-only.
I found it necessary in one circumstance to hook mlp_redirect_url and prevent redirects during an XHR.
Specifically this occurs with plugins that do not use wp-admin/admin-ajax.php to provide data to the front end. The case here was the use of the Infinite Scroll plugin, part of Jetpack.
In any case, I believe the definitive determination of whether or not we are in an ajax call should be when DOING_AJAX is true, not is_admin(). It's possible to handle XHR outside of wp-admin/admin-ajax.php, and at the very least DOING_AJAX should be set if you care for other code to be able cope with it.