Created
March 4, 2015 17:45
-
-
Save thefrosty/9bdb8e43597c52ab065c to your computer and use it in GitHub Desktop.
For testing perposes. This responds with 'heartbeat' when running. But when Clicking 'insert into post' or insert custom link (nav menu) among a few others the POST action never get's triggered. In my console I get 302 found, then a GET request to the home page. Example video: http://quick.as/1oovhyzj
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 ( ! empty( $_POST['action'] ) && in_array( $_POST['action'], $core_actions_post ) ) { | |
die($_POST['action']); | |
add_action( 'wp_ajax_' . $_POST['action'], 'wp_ajax_' . str_replace( '-', '_', $_POST['action'] ), 1 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment