wp_auth_check_html

The timeline below displays how wordpress function wp_auth_check_html has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.3

/**
 * Outputs the HTML that shows the wp-login dialog when the user is no longer logged in.
 *
 * @since 3.6.0
 */
function wp_auth_check_html()
{
    $login_url = wp_login_url();
    $current_domain = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'];
    $same_domain = str_starts_with($login_url, $current_domain);
    /**
     * Filters whether the authentication check originated at the same domain.
     *
     * @since 3.6.0
     *
     * @param bool $same_domain Whether the authentication check originated at the same domain.
     */
    $same_domain = apply_filters('wp_auth_check_same_domain', $same_domain);
    $wrap_class = $same_domain ? 'hidden' : 'hidden fallback';
    ?>
	<div id="wp-auth-check-wrap" class="<?php 
    echo $wrap_class;
    ?>">
	<div id="wp-auth-check-bg"></div>
	<div id="wp-auth-check">
	<button type="button" class="wp-auth-check-close button-link"><span class="screen-reader-text">
		<?php 
    /* translators: Hidden accessibility text. */
    _e('Close dialog');
    ?>
	</span></button>
	<?php 
    if ($same_domain) {
        $login_src = add_query_arg(array('interim-login' => '1', 'wp_lang' => get_user_locale()), $login_url);
        ?>
		<div id="wp-auth-check-form" class="loading" data-src="<?php 
        echo esc_url($login_src);
        ?>"></div>
		<?php 
    }
    ?>
	<div class="wp-auth-fallback">
		<p><b class="wp-auth-fallback-expired" tabindex="0"><?php 
    _e('Session expired');
    ?></b></p>
		<p><a href="<?php 
    echo esc_url($login_url);
    ?>" target="_blank"><?php 
    _e('Please log in again.');
    ?></a>
		<?php 
    _e('The login page will open in a new tab. After logging in you can close it and return to this page.');
    ?></p>
	</div>
	</div>
	</div>
	<?php 
}

WordPress Version: 6.2

/**
 * Outputs the HTML that shows the wp-login dialog when the user is no longer logged in.
 *
 * @since 3.6.0
 */
function wp_auth_check_html()
{
    $login_url = wp_login_url();
    $current_domain = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'];
    $same_domain = strpos($login_url, $current_domain) === 0;
    /**
     * Filters whether the authentication check originated at the same domain.
     *
     * @since 3.6.0
     *
     * @param bool $same_domain Whether the authentication check originated at the same domain.
     */
    $same_domain = apply_filters('wp_auth_check_same_domain', $same_domain);
    $wrap_class = $same_domain ? 'hidden' : 'hidden fallback';
    ?>
	<div id="wp-auth-check-wrap" class="<?php 
    echo $wrap_class;
    ?>">
	<div id="wp-auth-check-bg"></div>
	<div id="wp-auth-check">
	<button type="button" class="wp-auth-check-close button-link"><span class="screen-reader-text">
		<?php 
    /* translators: Hidden accessibility text. */
    _e('Close dialog');
    ?>
	</span></button>
	<?php 
    if ($same_domain) {
        $login_src = add_query_arg(array('interim-login' => '1', 'wp_lang' => get_user_locale()), $login_url);
        ?>
		<div id="wp-auth-check-form" class="loading" data-src="<?php 
        echo esc_url($login_src);
        ?>"></div>
		<?php 
    }
    ?>
	<div class="wp-auth-fallback">
		<p><b class="wp-auth-fallback-expired" tabindex="0"><?php 
    _e('Session expired');
    ?></b></p>
		<p><a href="<?php 
    echo esc_url($login_url);
    ?>" target="_blank"><?php 
    _e('Please log in again.');
    ?></a>
		<?php 
    _e('The login page will open in a new tab. After logging in you can close it and return to this page.');
    ?></p>
	</div>
	</div>
	</div>
	<?php 
}

WordPress Version: 6.1

/**
 * Outputs the HTML that shows the wp-login dialog when the user is no longer logged in.
 *
 * @since 3.6.0
 */
function wp_auth_check_html()
{
    $login_url = wp_login_url();
    $current_domain = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'];
    $same_domain = strpos($login_url, $current_domain) === 0;
    /**
     * Filters whether the authentication check originated at the same domain.
     *
     * @since 3.6.0
     *
     * @param bool $same_domain Whether the authentication check originated at the same domain.
     */
    $same_domain = apply_filters('wp_auth_check_same_domain', $same_domain);
    $wrap_class = $same_domain ? 'hidden' : 'hidden fallback';
    ?>
	<div id="wp-auth-check-wrap" class="<?php 
    echo $wrap_class;
    ?>">
	<div id="wp-auth-check-bg"></div>
	<div id="wp-auth-check">
	<button type="button" class="wp-auth-check-close button-link"><span class="screen-reader-text"><?php 
    _e('Close dialog');
    ?></span></button>
	<?php 
    if ($same_domain) {
        $login_src = add_query_arg(array('interim-login' => '1', 'wp_lang' => get_user_locale()), $login_url);
        ?>
		<div id="wp-auth-check-form" class="loading" data-src="<?php 
        echo esc_url($login_src);
        ?>"></div>
		<?php 
    }
    ?>
	<div class="wp-auth-fallback">
		<p><b class="wp-auth-fallback-expired" tabindex="0"><?php 
    _e('Session expired');
    ?></b></p>
		<p><a href="<?php 
    echo esc_url($login_url);
    ?>" target="_blank"><?php 
    _e('Please log in again.');
    ?></a>
		<?php 
    _e('The login page will open in a new tab. After logging in you can close it and return to this page.');
    ?></p>
	</div>
	</div>
	</div>
	<?php 
}

WordPress Version: 5.1

/**
 * Output the HTML that shows the wp-login dialog when the user is no longer logged in.
 *
 * @since 3.6.0
 */
function wp_auth_check_html()
{
    $login_url = wp_login_url();
    $current_domain = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'];
    $same_domain = strpos($login_url, $current_domain) === 0;
    /**
     * Filters whether the authentication check originated at the same domain.
     *
     * @since 3.6.0
     *
     * @param bool $same_domain Whether the authentication check originated at the same domain.
     */
    $same_domain = apply_filters('wp_auth_check_same_domain', $same_domain);
    $wrap_class = $same_domain ? 'hidden' : 'hidden fallback';
    ?>
	<div id="wp-auth-check-wrap" class="<?php 
    echo $wrap_class;
    ?>">
	<div id="wp-auth-check-bg"></div>
	<div id="wp-auth-check">
	<button type="button" class="wp-auth-check-close button-link"><span class="screen-reader-text"><?php 
    _e('Close dialog');
    ?></span></button>
	<?php 
    if ($same_domain) {
        $login_src = add_query_arg(array('interim-login' => '1', 'wp_lang' => get_user_locale()), $login_url);
        ?>
		<div id="wp-auth-check-form" class="loading" data-src="<?php 
        echo esc_url($login_src);
        ?>"></div>
		<?php 
    }
    ?>
	<div class="wp-auth-fallback">
		<p><b class="wp-auth-fallback-expired" tabindex="0"><?php 
    _e('Session expired');
    ?></b></p>
		<p><a href="<?php 
    echo esc_url($login_url);
    ?>" target="_blank"><?php 
    _e('Please log in again.');
    ?></a>
		<?php 
    _e('The login page will open in a new tab. After logging in you can close it and return to this page.');
    ?></p>
	</div>
	</div>
	</div>
	<?php 
}

WordPress Version: 4.9

/**
 * Output the HTML that shows the wp-login dialog when the user is no longer logged in.
 *
 * @since 3.6.0
 */
function wp_auth_check_html()
{
    $login_url = wp_login_url();
    $current_domain = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'];
    $same_domain = strpos($login_url, $current_domain) === 0;
    /**
     * Filters whether the authentication check originated at the same domain.
     *
     * @since 3.6.0
     *
     * @param bool $same_domain Whether the authentication check originated at the same domain.
     */
    $same_domain = apply_filters('wp_auth_check_same_domain', $same_domain);
    $wrap_class = $same_domain ? 'hidden' : 'hidden fallback';
    ?>
	<div id="wp-auth-check-wrap" class="<?php 
    echo $wrap_class;
    ?>">
	<div id="wp-auth-check-bg"></div>
	<div id="wp-auth-check">
	<button type="button" class="wp-auth-check-close button-link"><span class="screen-reader-text"><?php 
    _e('Close dialog');
    ?></span></button>
	<?php 
    if ($same_domain) {
        $login_src = add_query_arg(array('interim-login' => '1', 'wp_lang' => get_user_locale()), $login_url);
        ?>
		<div id="wp-auth-check-form" class="loading" data-src="<?php 
        echo esc_url($login_src);
        ?>"></div>
		<?php 
    }
    ?>
	<div class="wp-auth-fallback">
		<p><b class="wp-auth-fallback-expired" tabindex="0"><?php 
    _e('Session expired');
    ?></b></p>
		<p><a href="<?php 
    echo esc_url($login_url);
    ?>" target="_blank"><?php 
    _e('Please log in again.');
    ?></a>
		<?php 
    _e('The login page will open in a new window. After logging in you can close it and return to this page.');
    ?></p>
	</div>
	</div>
	</div>
	<?php 
}

WordPress Version: 4.6

/**
 * Output the HTML that shows the wp-login dialog when the user is no longer logged in.
 *
 * @since 3.6.0
 */
function wp_auth_check_html()
{
    $login_url = wp_login_url();
    $current_domain = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'];
    $same_domain = strpos($login_url, $current_domain) === 0;
    /**
     * Filters whether the authentication check originated at the same domain.
     *
     * @since 3.6.0
     *
     * @param bool $same_domain Whether the authentication check originated at the same domain.
     */
    $same_domain = apply_filters('wp_auth_check_same_domain', $same_domain);
    $wrap_class = $same_domain ? 'hidden' : 'hidden fallback';
    ?>
	<div id="wp-auth-check-wrap" class="<?php 
    echo $wrap_class;
    ?>">
	<div id="wp-auth-check-bg"></div>
	<div id="wp-auth-check">
	<button type="button" class="wp-auth-check-close button-link"><span class="screen-reader-text"><?php 
    _e('Close dialog');
    ?></span></button>
	<?php 
    if ($same_domain) {
        ?>
		<div id="wp-auth-check-form" class="loading" data-src="<?php 
        echo esc_url(add_query_arg(array('interim-login' => 1), $login_url));
        ?>"></div>
		<?php 
    }
    ?>
	<div class="wp-auth-fallback">
		<p><b class="wp-auth-fallback-expired" tabindex="0"><?php 
    _e('Session expired');
    ?></b></p>
		<p><a href="<?php 
    echo esc_url($login_url);
    ?>" target="_blank"><?php 
    _e('Please log in again.');
    ?></a>
		<?php 
    _e('The login page will open in a new window. After logging in you can close it and return to this page.');
    ?></p>
	</div>
	</div>
	</div>
	<?php 
}

WordPress Version: 4.5

/**
 * Output the HTML that shows the wp-login dialog when the user is no longer logged in.
 *
 * @since 3.6.0
 */
function wp_auth_check_html()
{
    $login_url = wp_login_url();
    $current_domain = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'];
    $same_domain = strpos($login_url, $current_domain) === 0;
    /**
     * Filter whether the authentication check originated at the same domain.
     *
     * @since 3.6.0
     *
     * @param bool $same_domain Whether the authentication check originated at the same domain.
     */
    $same_domain = apply_filters('wp_auth_check_same_domain', $same_domain);
    $wrap_class = $same_domain ? 'hidden' : 'hidden fallback';
    ?>
	<div id="wp-auth-check-wrap" class="<?php 
    echo $wrap_class;
    ?>">
	<div id="wp-auth-check-bg"></div>
	<div id="wp-auth-check">
	<button type="button" class="wp-auth-check-close button-link"><span class="screen-reader-text"><?php 
    _e('Close dialog');
    ?></span></button>
	<?php 
    if ($same_domain) {
        ?>
		<div id="wp-auth-check-form" class="loading" data-src="<?php 
        echo esc_url(add_query_arg(array('interim-login' => 1), $login_url));
        ?>"></div>
		<?php 
    }
    ?>
	<div class="wp-auth-fallback">
		<p><b class="wp-auth-fallback-expired" tabindex="0"><?php 
    _e('Session expired');
    ?></b></p>
		<p><a href="<?php 
    echo esc_url($login_url);
    ?>" target="_blank"><?php 
    _e('Please log in again.');
    ?></a>
		<?php 
    _e('The login page will open in a new window. After logging in you can close it and return to this page.');
    ?></p>
	</div>
	</div>
	</div>
	<?php 
}

WordPress Version: 4.0

/**
 * Output the HTML that shows the wp-login dialog when the user is no longer logged in.
 *
 * @since 3.6.0
 */
function wp_auth_check_html()
{
    $login_url = wp_login_url();
    $current_domain = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'];
    $same_domain = strpos($login_url, $current_domain) === 0;
    /**
     * Filter whether the authentication check originated at the same domain.
     *
     * @since 3.6.0
     *
     * @param bool $same_domain Whether the authentication check originated at the same domain.
     */
    $same_domain = apply_filters('wp_auth_check_same_domain', $same_domain);
    $wrap_class = $same_domain ? 'hidden' : 'hidden fallback';
    ?>
	<div id="wp-auth-check-wrap" class="<?php 
    echo $wrap_class;
    ?>">
	<div id="wp-auth-check-bg"></div>
	<div id="wp-auth-check">
	<div class="wp-auth-check-close" tabindex="0" title="<?php 
    esc_attr_e('Close');
    ?>"></div>
	<?php 
    if ($same_domain) {
        ?>
		<div id="wp-auth-check-form" data-src="<?php 
        echo esc_url(add_query_arg(array('interim-login' => 1), $login_url));
        ?>"></div>
		<?php 
    }
    ?>
	<div class="wp-auth-fallback">
		<p><b class="wp-auth-fallback-expired" tabindex="0"><?php 
    _e('Session expired');
    ?></b></p>
		<p><a href="<?php 
    echo esc_url($login_url);
    ?>" target="_blank"><?php 
    _e('Please log in again.');
    ?></a>
		<?php 
    _e('The login page will open in a new window. After logging in you can close it and return to this page.');
    ?></p>
	</div>
	</div>
	</div>
	<?php 
}

WordPress Version: 3.9

/**
 * Output the HTML that shows the wp-login dialog when the user is no longer logged in.
 *
 * @since 3.6.0
 */
function wp_auth_check_html()
{
    $login_url = wp_login_url();
    $current_domain = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'];
    $same_domain = strpos($login_url, $current_domain) === 0;
    if ($same_domain && force_ssl_login() && !force_ssl_admin()) {
        $same_domain = false;
    }
    /**
     * Filter whether the authentication check originated at the same domain.
     *
     * @since 3.6.0
     *
     * @param bool $same_domain Whether the authentication check originated at the same domain.
     */
    $same_domain = apply_filters('wp_auth_check_same_domain', $same_domain);
    $wrap_class = $same_domain ? 'hidden' : 'hidden fallback';
    ?>
	<div id="wp-auth-check-wrap" class="<?php 
    echo $wrap_class;
    ?>">
	<div id="wp-auth-check-bg"></div>
	<div id="wp-auth-check">
	<div class="wp-auth-check-close" tabindex="0" title="<?php 
    esc_attr_e('Close');
    ?>"></div>
	<?php 
    if ($same_domain) {
        ?>
		<div id="wp-auth-check-form" data-src="<?php 
        echo esc_url(add_query_arg(array('interim-login' => 1), $login_url));
        ?>"></div>
		<?php 
    }
    ?>
	<div class="wp-auth-fallback">
		<p><b class="wp-auth-fallback-expired" tabindex="0"><?php 
    _e('Session expired');
    ?></b></p>
		<p><a href="<?php 
    echo esc_url($login_url);
    ?>" target="_blank"><?php 
    _e('Please log in again.');
    ?></a>
		<?php 
    _e('The login page will open in a new window. After logging in you can close it and return to this page.');
    ?></p>
	</div>
	</div>
	</div>
	<?php 
}

WordPress Version: 3.7

/**
 * Output the HTML that shows the wp-login dialog when the user is no longer logged in.
 *
 * @since 3.6.0
 */
function wp_auth_check_html()
{
    $login_url = wp_login_url();
    $current_domain = (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'];
    $same_domain = strpos($login_url, $current_domain) === 0;
    if ($same_domain && force_ssl_login() && !force_ssl_admin()) {
        $same_domain = false;
    }
    // Let plugins change this if they know better.
    $same_domain = apply_filters('wp_auth_check_same_domain', $same_domain);
    $wrap_class = $same_domain ? 'hidden' : 'hidden fallback';
    ?>
	<div id="wp-auth-check-wrap" class="<?php 
    echo $wrap_class;
    ?>">
	<div id="wp-auth-check-bg"></div>
	<div id="wp-auth-check">
	<div class="wp-auth-check-close" tabindex="0" title="<?php 
    esc_attr_e('Close');
    ?>"></div>
	<?php 
    if ($same_domain) {
        ?>
		<div id="wp-auth-check-form" data-src="<?php 
        echo esc_url(add_query_arg(array('interim-login' => 1), $login_url));
        ?>"></div>
		<?php 
    }
    ?>
	<div class="wp-auth-fallback">
		<p><b class="wp-auth-fallback-expired" tabindex="0"><?php 
    _e('Session expired');
    ?></b></p>
		<p><a href="<?php 
    echo esc_url($login_url);
    ?>" target="_blank"><?php 
    _e('Please log in again.');
    ?></a>
		<?php 
    _e('The login page will open in a new window. After logging in you can close it and return to this page.');
    ?></p>
	</div>
	</div>
	</div>
	<?php 
}