secure_logged_in_cookie
Filters whether the logged in cookie should only be sent over HTTPS.
Usage
add_filter( 'secure_logged_in_cookie', 'wp_kama_secure_logged_in_cookie_filter', 10, 3 ); /** * Function for `secure_logged_in_cookie` filter-hook. * * @param bool $secure_logged_in_cookie Whether the logged in cookie should only be sent over HTTPS. * @param int $user_id User ID. * @param bool $secure Whether the auth cookie should only be sent over HTTPS. * * @return bool */ function wp_kama_secure_logged_in_cookie_filter( $secure_logged_in_cookie, $user_id, $secure ){ // filter... return $secure_logged_in_cookie; }
- $secure_logged_in_cookie(true|false)
- Whether the logged in cookie should only be sent over HTTPS.
- $user_id(int)
- User ID.
- $secure(true|false)
- Whether the auth cookie should only be sent over HTTPS.
Changelog
Since 3.1.0 | Introduced. |
Where the hook is called
secure_logged_in_cookie
wp-includes/pluggable.php 1021
$secure_logged_in_cookie = apply_filters( 'secure_logged_in_cookie', $secure_logged_in_cookie, $user_id, $secure );