secure_signon_cookie хук-фильтрWP 3.1.0

Filters whether to use a secure sign-on cookie.

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

add_filter( 'secure_signon_cookie', 'wp_kama_secure_signon_cookie_filter', 10, 2 );

/**
 * Function for `secure_signon_cookie` filter-hook.
 * 
 * @param bool  $secure_cookie Whether to use a secure sign-on cookie.
 * @param array $credentials   Array of entered sign-on data.
 *
 * @return bool
 */
function wp_kama_secure_signon_cookie_filter( $secure_cookie, $credentials ){

	// filter...
	return $secure_cookie;
}
$secure_cookie(true|false)
Whether to use a secure sign-on cookie.
$credentials(массив)

Array of entered sign-on data.

  • user_login(строка)
    Username.

  • user_password(строка)
    Password entered.

  • remember(true|false)
    Whether to 'remember' the user. Increases the time that the cookie will be kept.
    По умолчанию: false

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

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

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

wp_signon()
secure_signon_cookie
wp-includes/user.php 99
$secure_cookie = apply_filters( 'secure_signon_cookie', $secure_cookie, $credentials );

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

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