Created
October 3, 2012 15:15
-
-
Save garyc40/3827496 to your computer and use it in GitHub Desktop.
WordPress AJAX hooks
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
// this hook is fired if the current viewer is not logged in | |
do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] ); | |
// if logged in: | |
do_action( 'wp_ajax_' . $_POST['action'] ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment