Ticket #48153: 48153.2.diff
File 48153.2.diff, 1.5 KB (added by , 5 years ago) |
---|
-
src/wp-login.php
590 590 591 591 /** 592 592 * Filters the interval for redirecting the user to the admin email confirmation screen. 593 * If `0` (zero) is returned, the user will not be redirected.593 * If `0` (zero) (or any :falsey" value) is returned, the user will not be redirected. 594 594 * 595 595 * @since 5.3.0 596 596 * … … 1230 1230 exit; 1231 1231 } 1232 1232 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 1233 1242 // 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 ) ) { 1235 1244 $admin_email_lifespan = (int) get_option( 'admin_email_lifespan' ); 1236 1245 1237 // If `0` (or anything "falsey" as it is cast to int) is returned, the user will not be redirected1238 // to the admin email confirmation screen.1239 1246 /** This filter is documented in wp-login.php */ 1240 1247 $admin_email_check_interval = (int) apply_filters( 'admin_email_check_interval', 6 * MONTH_IN_SECONDS ); 1241 1248