wp_auth_check()
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.
Хуков нет.
Возвращает
Массив
. The Heartbeat response with 'wp-auth-check' value set.
Использование
wp_auth_check( $response );
- $response(массив) (обязательный)
- The Heartbeat response.
Заметки
- Global. int. $login_grace_period
Список изменений
С версии 3.6.0 | Введена. |
Код wp_auth_check() wp auth check WP 6.3.1
function wp_auth_check( $response ) { $response['wp-auth-check'] = is_user_logged_in() && empty( $GLOBALS['login_grace_period'] ); return $response; }