mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01: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. Built from https://develop.svn.wordpress.org/trunk@44615 git-svn-id: http://core.svn.wordpress.org/trunk@44446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5ed802faf4
commit
4fa5437fc1
@ -31,7 +31,7 @@ do_action( 'admin_init' );
|
|||||||
|
|
||||||
$action = empty( $_REQUEST['action'] ) ? '' : $_REQUEST['action'];
|
$action = empty( $_REQUEST['action'] ) ? '' : $_REQUEST['action'];
|
||||||
|
|
||||||
if ( ! wp_validate_auth_cookie() ) {
|
if ( ! is_user_logged_in() ) {
|
||||||
if ( empty( $action ) ) {
|
if ( empty( $action ) ) {
|
||||||
/**
|
/**
|
||||||
* Fires on a non-authenticated admin post request where no action is supplied.
|
* Fires on a non-authenticated admin post request where no action is supplied.
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.1-beta1-44614';
|
$wp_version = '5.1-beta1-44615';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user