Created
May 23, 2020 16:48
-
-
Save jmcausing/efedc456f24e64d830cd50b1832bff33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( wp_doing_ajax() ) | |
{ | |
echo "admin-ajax.php is here...<br>"; | |
// Check which action is using that ajax.. | |
$ajax_action = $_REQUEST['action']; | |
echo "It is calling this action: <br>" . $ajax_action . "<br>"; | |
// Is this called in admin? | |
$is_ajax_in_admin = is_admin(); | |
if ($is_ajax_in_admin == 1) { echo " this is called in Admin.."; } | |
// check url | |
echo $_SERVER['REQUEST_URI']; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment