Make WordPress Core

Changeset 46323


Ignore:
Timestamp:
09/26/2019 03:40:10 PM (5 years ago)
Author:
desrosj
Message:

Site Health: Allow the capability required for the site admin email verification screen to be filtered.

Props desrosj, Clorith.
Fixes #48153.

File:
1 edited

Legend:

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

    r46319 r46323  
    12311231            }
    12321232
     1233            /**
     1234             * Filters the capability required for displaying the admin email check screen.
     1235             *
     1236             * @since 5.3.0
     1237             *
     1238             * @param string $capability The capability required to display the admn email check screen.
     1239             */
     1240            $admin_check_cap = apply_filters( 'admin_email_check_cap', 'manage_options' );
     1241
    12331242            // Check if it is time to add a redirect to the admin email confirmation screen.
    1234             if ( is_a( $user, 'WP_User' ) && $user->exists() && $user->has_cap( 'manage_options' ) ) {
     1243            if ( is_a( $user, 'WP_User' ) && $user->exists() && $user->has_cap( $admin_check_cap ) ) {
    12351244                $admin_email_lifespan = (int) get_option( 'admin_email_lifespan' );
    12361245
Note: See TracChangeset for help on using the changeset viewer.