Title: secure_logged_in_cookie
Published: April 25, 2014
Last modified: May 20, 2026

---

# apply_filters( ‘secure_logged_in_cookie’, bool $secure_logged_in_cookie, int $user_id, bool $secure )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/secure_logged_in_cookie/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/secure_logged_in_cookie/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/secure_logged_in_cookie/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/secure_logged_in_cookie/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/secure_logged_in_cookie/?output_format=md#wp--skip-link--target)

Filters whether the logged in cookie should only be sent over HTTPS.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/secure_logged_in_cookie/?output_format=md#parameters)󠁿

 `$secure_logged_in_cookie`bool

Whether the logged in cookie should only be sent over HTTPS.

`$user_id`int

User ID.

`$secure`bool

Whether the auth cookie should only be sent over HTTPS.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/secure_logged_in_cookie/?output_format=md#source)󠁿

    ```php
    $secure_logged_in_cookie = apply_filters( 'secure_logged_in_cookie', $secure_logged_in_cookie, $user_id, $secure );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/pluggable.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/pluggable.php#L1121)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/pluggable.php#L1121-L1121)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/secure_logged_in_cookie/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_set_auth_cookie()](https://developer.wordpress.org/reference/functions/wp_set_auth_cookie/)`wp-includes/pluggable.php` |

Sets the authentication cookies for a given user ID.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/secure_logged_in_cookie/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.1.0](https://developer.wordpress.org/reference/since/3.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fsecure_logged_in_cookie%2F)
before being able to contribute a note or feedback.