auth_cookie_malformed хук-событиеWP 2.7.0

Fires if an authentication cookie is malformed.

Использование

add_action( 'auth_cookie_malformed', 'wp_kama_auth_cookie_malformed_action', 10, 2 );

/**
 * Function for `auth_cookie_malformed` action-hook.
 * 
 * @param string $cookie Malformed auth cookie.
 * @param string $scheme Authentication scheme. Values include 'auth', 'secure_auth', or 'logged_in'.
 *
 * @return void
 */
function wp_kama_auth_cookie_malformed_action( $cookie, $scheme ){

	// action...
}
$cookie(строка)
Malformed auth cookie.
$scheme(строка)
Authentication scheme. Values include 'auth', 'secure_auth', or 'logged_in'.

Список изменений

С версии 2.7.0 Введена.

Где вызывается хук

wp_validate_auth_cookie()
auth_cookie_malformed
wp-includes/pluggable.php 705
do_action( 'auth_cookie_malformed', $cookie, $scheme );

Где используется хук в WordPress

wp-includes/default-filters.php 322
add_action( 'auth_cookie_malformed', 'rest_cookie_collect_status' );