Heartbeat API: add nopriv actions, add JS 'heartbeat-send' event, see #23216
git-svn-id: http://core.svn.wordpress.org/trunk@23481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -67,6 +67,7 @@ if ( ! empty( $_POST['action'] ) && in_array( $_POST['action'], $core_actions_po
|
||||
add_action( 'wp_ajax_' . $_POST['action'], 'wp_ajax_' . str_replace( '-', '_', $_POST['action'] ), 1 );
|
||||
|
||||
add_action( 'wp_ajax_nopriv_autosave', 'wp_ajax_nopriv_autosave', 1 );
|
||||
add_action( 'wp_ajax_nopriv_heartbeat', 'wp_ajax_nopriv_heartbeat', 1 );
|
||||
|
||||
if ( is_user_logged_in() )
|
||||
do_action( 'wp_ajax_' . $_REQUEST['action'] ); // Authenticated actions
|
||||
|
||||
Reference in New Issue
Block a user