Don't pass action ID to the ajax actions to avoid possible back compat problems. Props sivel. fixes #20699
git-svn-id: http://core.svn.wordpress.org/trunk@20857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f35fdc678f
commit
5ed25d4725
|
@ -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