secure_auth_cookie filter-hookWP 3.1.0

Filters whether the auth cookie should only be sent over HTTPS.

Usage

add_filter( 'secure_auth_cookie', 'wp_kama_secure_auth_cookie_filter', 10, 2 );

/**
 * Function for `secure_auth_cookie` filter-hook.
 * 
 * @param bool $secure  Whether the cookie should only be sent over HTTPS.
 * @param int  $user_id User ID.
 *
 * @return bool
 */
function wp_kama_secure_auth_cookie_filter( $secure, $user_id ){

	// filter...
	return $secure;
}
$secure(true|false)
Whether the cookie should only be sent over HTTPS.
$user_id(int)
User ID.

Changelog

Since 3.1.0 Introduced.

Where the hook is called

wp_set_auth_cookie()
secure_auth_cookie
wp-includes/pluggable.php 1010
$secure = apply_filters( 'secure_auth_cookie', $secure, $user_id );

Where the hook is used in WordPress

Usage not found.