Filter hook 'admin_email_check_interval'

in WP Core File wp-login.php at line 1399

View Source

admin_email_check_interval

Filter Hook
Description
do_action( 'login_footer' ); if ( $customize_login ) { ob_start(); ?> 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.

Hook Information

File Location wp-login.php View on GitHub
Hook Type Filter
Line Number 1399

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

Basic Usage
<?php
// Hook into admin_email_check_interval
add_filter('admin_email_check_interval', 'my_custom_filter');

function my_custom_filter() {
    // Your custom filtering logic here
    return 'modified_value';
}

Source Code Context

wp-login.php:1399 - How this hook is used in WordPress core
<?php
1394  				/*
1395  				 * If `0` (or anything "falsey" as it is cast to int) is returned, the user will not be redirected
1396  				 * to the admin email confirmation screen.
1397  				 */
1398  				/** This filter is documented in wp-login.php */
1399  				$admin_email_check_interval = (int) apply_filters( 'admin_email_check_interval', 6 * MONTH_IN_SECONDS );
1400  
1401  				if ( $admin_email_check_interval > 0 && time() > $admin_email_lifespan ) {
1402  					$redirect_to = add_query_arg(
1403  						array(
1404  							'action'  => 'confirm_admin_email',

PHP Documentation

<?php
/** This action is documented in wp-login.php */
				do_action( 'login_footer' );

				if ( $customize_login ) {
					ob_start();
					?>
					<script>setTimeout( function(){ new wp.customize.Messenger({ url: '<?php echo wp_customize_url(); ?>', channel: 'login' }).send('login') }, 1000 );</script>
					<?php
					wp_print_inline_script_tag( wp_remove_surrounding_empty_script_tags( ob_get_clean() ) );
				}

				?>
				</body></html>
				<?php

				exit;
			}

			// Check if it is time to add a redirect to the admin email confirmation screen.
			if ( $user instanceof 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.
				 */
Quick Info
  • Hook Type: Filter
  • Parameters: 0
  • File: wp-login.php
Related Hooks

Related hooks will be displayed here in future updates.