From 82b673d043fe55dbc6f453eeb56aabaa8dfbbc66 Mon Sep 17 00:00:00 2001 From: desrosj Date: Mon, 30 Sep 2019 18:53:00 +0000 Subject: [PATCH] Site Health: Revert [46323-46325] for further discussion of how the admin email verification should be filtered. See #48153. Built from https://develop.svn.wordpress.org/trunk@46361 git-svn-id: http://core.svn.wordpress.org/trunk@46160 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-login.php | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index d0cc780888..0541ef24ad 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-beta1-46360'; +$wp_version = '5.3-beta1-46361'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-login.php b/wp-login.php index 58b99b1b23..04e546ea64 100644 --- a/wp-login.php +++ b/wp-login.php @@ -590,7 +590,7 @@ switch ( $action ) { /** * Filters the interval for redirecting the user to the admin email confirmation screen. - * If `0` (zero), or any "falsey" value is returned, the user will not be redirected. + * If `0` (zero) is returned, the user will not be redirected. * * @since 5.3.0 * @@ -1232,19 +1232,12 @@ switch ( $action ) { exit; } - /** - * Filters the capability required for displaying the admin email check screen. - * - * @since 5.3.0 - * - * @param string $capability The capability required to display the admin email check screen. - */ - $admin_check_cap = apply_filters( 'admin_email_check_cap', 'manage_options' ); - // Check if it is time to add a redirect to the admin email confirmation screen. - if ( is_a( $user, 'WP_User' ) && $user->exists() && $user->has_cap( $admin_check_cap ) ) { + if ( is_a( $user, 'WP_User' ) && $user->exists() && $user->has_cap( 'manage_options' ) ) { $admin_email_lifespan = (int) get_option( 'admin_email_lifespan' ); + // If `0` (or anything "falsey" as it is cast to int) is returned, the user will not be redirected + // to the admin email confirmation screen. /** This filter is documented in wp-login.php */ $admin_email_check_interval = (int) apply_filters( 'admin_email_check_interval', 6 * MONTH_IN_SECONDS );