Skip to content

Instantly share code, notes, and snippets.

@anthonybudd
Created February 27, 2017 16:15
Show Gist options
  • Save anthonybudd/af616268d661c088fd0bce61f2bed740 to your computer and use it in GitHub Desktop.
Save anthonybudd/af616268d661c088fd0bce61f2bed740 to your computer and use it in GitHub Desktop.
<?php //functions.php
add_action("wp_ajax_example", "exampleAJAX");
add_action("wp_ajax_nopriv_example", "exampleAJAX");
function exampleAJAX(){
echo "Success!";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment