wp_auth_check_load

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

WordPress Version: 6.1

/**
 * Loads the auth check for monitoring whether the user is still logged in.
 *
 * Can be disabled with remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' );
 *
 * This is disabled for certain screens where a login screen could cause an
 * inconvenient interruption. A filter called {@see 'wp_auth_check_load'} can be used
 * for fine-grained control.
 *
 * @since 3.6.0
 */
function wp_auth_check_load()
{
    if (!is_admin() && !is_user_logged_in()) {
        return;
    }
    if (defined('IFRAME_REQUEST')) {
        return;
    }
    $screen = get_current_screen();
    $hidden = array('update', 'update-network', 'update-core', 'update-core-network', 'upgrade', 'upgrade-network', 'network');
    $show = !in_array($screen->id, $hidden, true);
    /**
     * Filters whether to load the authentication check.
     *
     * Returning a falsey value from the filter will effectively short-circuit
     * loading the authentication check.
     *
     * @since 3.6.0
     *
     * @param bool      $show   Whether to load the authentication check.
     * @param WP_Screen $screen The current screen object.
     */
    if (apply_filters('wp_auth_check_load', $show, $screen)) {
        wp_enqueue_style('wp-auth-check');
        wp_enqueue_script('wp-auth-check');
        add_action('admin_print_footer_scripts', 'wp_auth_check_html', 5);
        add_action('wp_print_footer_scripts', 'wp_auth_check_html', 5);
    }
}

WordPress Version: 5.5

/**
 * Load the auth check for monitoring whether the user is still logged in.
 *
 * Can be disabled with remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' );
 *
 * This is disabled for certain screens where a login screen could cause an
 * inconvenient interruption. A filter called {@see 'wp_auth_check_load'} can be used
 * for fine-grained control.
 *
 * @since 3.6.0
 */
function wp_auth_check_load()
{
    if (!is_admin() && !is_user_logged_in()) {
        return;
    }
    if (defined('IFRAME_REQUEST')) {
        return;
    }
    $screen = get_current_screen();
    $hidden = array('update', 'update-network', 'update-core', 'update-core-network', 'upgrade', 'upgrade-network', 'network');
    $show = !in_array($screen->id, $hidden, true);
    /**
     * Filters whether to load the authentication check.
     *
     * Returning a falsey value from the filter will effectively short-circuit
     * loading the authentication check.
     *
     * @since 3.6.0
     *
     * @param bool      $show   Whether to load the authentication check.
     * @param WP_Screen $screen The current screen object.
     */
    if (apply_filters('wp_auth_check_load', $show, $screen)) {
        wp_enqueue_style('wp-auth-check');
        wp_enqueue_script('wp-auth-check');
        add_action('admin_print_footer_scripts', 'wp_auth_check_html', 5);
        add_action('wp_print_footer_scripts', 'wp_auth_check_html', 5);
    }
}

WordPress Version: 4.6

/**
 * Load the auth check for monitoring whether the user is still logged in.
 *
 * Can be disabled with remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' );
 *
 * This is disabled for certain screens where a login screen could cause an
 * inconvenient interruption. A filter called {@see 'wp_auth_check_load'} can be used
 * for fine-grained control.
 *
 * @since 3.6.0
 */
function wp_auth_check_load()
{
    if (!is_admin() && !is_user_logged_in()) {
        return;
    }
    if (defined('IFRAME_REQUEST')) {
        return;
    }
    $screen = get_current_screen();
    $hidden = array('update', 'update-network', 'update-core', 'update-core-network', 'upgrade', 'upgrade-network', 'network');
    $show = !in_array($screen->id, $hidden);
    /**
     * Filters whether to load the authentication check.
     *
     * Passing a falsey value to the filter will effectively short-circuit
     * loading the authentication check.
     *
     * @since 3.6.0
     *
     * @param bool      $show   Whether to load the authentication check.
     * @param WP_Screen $screen The current screen object.
     */
    if (apply_filters('wp_auth_check_load', $show, $screen)) {
        wp_enqueue_style('wp-auth-check');
        wp_enqueue_script('wp-auth-check');
        add_action('admin_print_footer_scripts', 'wp_auth_check_html', 5);
        add_action('wp_print_footer_scripts', 'wp_auth_check_html', 5);
    }
}

WordPress Version: 4.0

/**
 * Load the auth check for monitoring whether the user is still logged in.
 *
 * Can be disabled with remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' );
 *
 * This is disabled for certain screens where a login screen could cause an
 * inconvenient interruption. A filter called wp_auth_check_load can be used
 * for fine-grained control.
 *
 * @since 3.6.0
 */
function wp_auth_check_load()
{
    if (!is_admin() && !is_user_logged_in()) {
        return;
    }
    if (defined('IFRAME_REQUEST')) {
        return;
    }
    $screen = get_current_screen();
    $hidden = array('update', 'update-network', 'update-core', 'update-core-network', 'upgrade', 'upgrade-network', 'network');
    $show = !in_array($screen->id, $hidden);
    /**
     * Filter whether to load the authentication check.
     *
     * Passing a falsey value to the filter will effectively short-circuit
     * loading the authentication check.
     *
     * @since 3.6.0
     *
     * @param bool      $show   Whether to load the authentication check.
     * @param WP_Screen $screen The current screen object.
     */
    if (apply_filters('wp_auth_check_load', $show, $screen)) {
        wp_enqueue_style('wp-auth-check');
        wp_enqueue_script('wp-auth-check');
        add_action('admin_print_footer_scripts', 'wp_auth_check_html', 5);
        add_action('wp_print_footer_scripts', 'wp_auth_check_html', 5);
    }
}

WordPress Version: 3.9

/**
 * Load the auth check for monitoring whether the user is still logged in.
 *
 * Can be disabled with remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' );
 *
 * This is disabled for certain screens where a login screen could cause an
 * inconvenient interruption. A filter called wp_auth_check_load can be used
 * for fine-grained control.
 *
 * @since 3.6.0
 */
function wp_auth_check_load()
{
    if (!is_admin() && !is_user_logged_in()) {
        return;
    }
    if (defined('IFRAME_REQUEST')) {
        return;
    }
    $screen = get_current_screen();
    $hidden = array('update', 'update-network', 'update-core', 'update-core-network', 'upgrade', 'upgrade-network', 'network');
    $show = !in_array($screen->id, $hidden);
    /**
     * Filter whether to load the authentication check.
     *
     * @since 3.6.0
     *
     * @param bool      $show   Whether to load the authentication check.
     * @param WP_Screen $screen The current screen object.
     */
    if (apply_filters('wp_auth_check_load', $show, $screen)) {
        wp_enqueue_style('wp-auth-check');
        wp_enqueue_script('wp-auth-check');
        add_action('admin_print_footer_scripts', 'wp_auth_check_html', 5);
        add_action('wp_print_footer_scripts', 'wp_auth_check_html', 5);
    }
}

WordPress Version: 3.7

/**
 * Load the auth check for monitoring whether the user is still logged in.
 *
 * Can be disabled with remove_action( 'admin_enqueue_scripts', 'wp_auth_check_load' );
 *
 * This is disabled for certain screens where a login screen could cause an
 * inconvenient interruption. A filter called wp_auth_check_load can be used
 * for fine-grained control.
 *
 * @since 3.6.0
 */
function wp_auth_check_load()
{
    if (!is_admin() && !is_user_logged_in()) {
        return;
    }
    if (defined('IFRAME_REQUEST')) {
        return;
    }
    $screen = get_current_screen();
    $hidden = array('update', 'update-network', 'update-core', 'update-core-network', 'upgrade', 'upgrade-network', 'network');
    $show = !in_array($screen->id, $hidden);
    if (apply_filters('wp_auth_check_load', $show, $screen)) {
        wp_enqueue_style('wp-auth-check');
        wp_enqueue_script('wp-auth-check');
        add_action('admin_print_footer_scripts', 'wp_auth_check_html', 5);
        add_action('wp_print_footer_scripts', 'wp_auth_check_html', 5);
    }
}