wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_auth_check › WordPress Function

Da3.6.0
Deprecaton/a
› wp_auth_check ( $response )
Parametri:
  • (array) $response The Heartbeat response.
    Richiesto: Sì
Ritorna:
  • (array) The Heartbeat response with 'wp-auth-check' value set.
Definito a:
Codex:

Checks 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.


Sorgenti

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