Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
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
You can’t perform that action at this time.