diff -r c7c34916027a -r 177826044cd9 wp/wp-admin/admin-post.php --- a/wp/wp-admin/admin-post.php Mon Oct 14 18:06:33 2019 +0200 +++ b/wp/wp-admin/admin-post.php Mon Oct 14 18:28:13 2019 +0200 @@ -13,15 +13,16 @@ define( 'WP_ADMIN', true ); } -if ( defined('ABSPATH') ) - require_once(ABSPATH . 'wp-load.php'); -else +if ( defined( 'ABSPATH' ) ) { + require_once( ABSPATH . 'wp-load.php' ); +} else { require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' ); +} /** Allow for cross-domain requests (from the front end). */ send_origin_headers(); -require_once(ABSPATH . 'wp-admin/includes/admin.php'); +require_once( ABSPATH . 'wp-admin/includes/admin.php' ); nocache_headers(); @@ -30,10 +31,10 @@ $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 was supplied. + * Fires on a non-authenticated admin post request where no action is supplied. * * @since 2.6.0 */ @@ -52,7 +53,7 @@ } else { if ( empty( $action ) ) { /** - * Fires on an authenticated admin post request where no action was supplied. + * Fires on an authenticated admin post request where no action is supplied. * * @since 2.6.0 */