Don't pass action ID to the ajax actions to avoid possible back compat problems. Props sivel. fixes #20699
git-svn-id: https://develop.svn.wordpress.org/trunk@20857 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
74653b1dbc
commit
18c7acb94b
@ -63,9 +63,9 @@ if ( ! empty( $_POST['action'] ) && in_array( $_POST['action'], $core_actions_po
|
||||
add_action( 'wp_ajax_nopriv_autosave', 'wp_ajax_nopriv_autosave', 1 );
|
||||
|
||||
if ( is_user_logged_in() )
|
||||
do_action( 'wp_ajax_' . $_REQUEST['action'], $_REQUEST['action'] ); // Authenticated actions
|
||||
do_action( 'wp_ajax_' . $_REQUEST['action'] ); // Authenticated actions
|
||||
else
|
||||
do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'], $_REQUEST['action'] ); // Non-admin actions
|
||||
do_action( 'wp_ajax_nopriv_' . $_REQUEST['action'] ); // Non-admin actions
|
||||
|
||||
// Default status
|
||||
die( '0' );
|
||||
|
Loading…
Reference in New Issue
Block a user