mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 22:57:20 +00:00
Admin: Use is_user_logged_in() instead of wp_validate_auth_cookie() in admin-post.php.
This matches the authentication check in `admin-ajax.php`, and allows the authentication method to be filtered. Props jmdodd. Fixes #45475. git-svn-id: https://develop.svn.wordpress.org/trunk@44615 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -31,7 +31,7 @@ do_action( 'admin_init' );
|
||||
|
||||
$action = empty( $_REQUEST['action'] ) ? '' : $_REQUEST['action'];
|
||||
|
||||
if ( ! wp_validate_auth_cookie() ) {
|
||||
if ( ! is_user_logged_in() ) {
|
||||
if ( empty( $action ) ) {
|
||||
/**
|
||||
* Fires on a non-authenticated admin post request where no action is supplied.
|
||||
|
||||
Reference in New Issue
Block a user