WordPress at a glance
function is not described

wp_auth_check() WP 3.6.0

Check whether a user is still logged in, for the heartbeat.

Send a result that shows a log-in box if the user is no longer logged in, or if their cookie is within the grace period.

  • Global. Int. $login_grace_period

No Hooks.

Return

Array. $response The Heartbeat response with 'wp-auth-check' value set.

Usage

wp_auth_check( $response );
$response(array) (required)
The Heartbeat response.

Code of wp auth check: wp-includes/functions.php VER 5.0.3

<?php
function wp_auth_check( $response ) {
	$response['wp-auth-check'] = is_user_logged_in() && empty( $GLOBALS['login_grace_period'] );
	return $response;
}