mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-30 18:24:31 +00:00
Fire nopriv actions from post and ajax handlers when user is not logged in.
git-svn-id: https://develop.svn.wordpress.org/trunk@10720 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -16,14 +16,15 @@ else
|
||||
|
||||
require_once(ABSPATH . 'wp-admin/includes/admin.php');
|
||||
|
||||
if ( !wp_validate_auth_cookie() )
|
||||
wp_die(__('Cheatin’ uh?'));
|
||||
|
||||
nocache_headers();
|
||||
|
||||
do_action('admin_init');
|
||||
|
||||
$action = 'admin_post';
|
||||
|
||||
if ( !wp_validate_auth_cookie() )
|
||||
$action .= '_nopriv';
|
||||
|
||||
if ( !empty($_REQUEST['action']) )
|
||||
$action .= '_' . $_REQUEST['action'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user