Make WordPress Core


Ignore:
Timestamp:
09/30/2019 06:51:30 PM (5 years ago)
Author:
desrosj
Message:

Site Health: Revert [46323-46325] for further discussion of how the admin email verification should be filtered.

See #48153.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r46334 r46361  
    591591            /**
    592592             * Filters the interval for redirecting the user to the admin email confirmation screen.
    593              * If `0` (zero), or any "falsey" value is returned, the user will not be redirected.
     593             * If `0` (zero) is returned, the user will not be redirected.
    594594             *
    595595             * @since 5.3.0
     
    12331233            }
    12341234
    1235             /**
    1236              * Filters the capability required for displaying the admin email check screen.
    1237              *
    1238              * @since 5.3.0
    1239              *
    1240              * @param string $capability The capability required to display the admin email check screen.
    1241              */
    1242             $admin_check_cap = apply_filters( 'admin_email_check_cap', 'manage_options' );
    1243 
    12441235            // Check if it is time to add a redirect to the admin email confirmation screen.
    1245             if ( is_a( $user, 'WP_User' ) && $user->exists() && $user->has_cap( $admin_check_cap ) ) {
     1236            if ( is_a( $user, 'WP_User' ) && $user->exists() && $user->has_cap( 'manage_options' ) ) {
    12461237                $admin_email_lifespan = (int) get_option( 'admin_email_lifespan' );
    12471238
     1239                // If `0` (or anything "falsey" as it is cast to int) is returned, the user will not be redirected
     1240                // to the admin email confirmation screen.
    12481241                /** This filter is documented in wp-login.php */
    12491242                $admin_email_check_interval = (int) apply_filters( 'admin_email_check_interval', 6 * MONTH_IN_SECONDS );
Note: See TracChangeset for help on using the changeset viewer.