Filter hook 'secure_logged_in_cookie'

in WP Core File wp-includes/pluggable.php at line 1036

View Source

secure_logged_in_cookie

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

Hook Information

File Location wp-includes/pluggable.php View on GitHub
Hook Type Filter
Line Number 1036

Hook Parameters

Type Name Description
bool $secure_logged_in_cookie Whether the logged in cookie should only be sent over HTTPS.
int $user_id User ID.
bool $secure Whether the auth cookie should only be sent over HTTPS.

Usage Examples

Basic Usage
<?php
// Hook into secure_logged_in_cookie
add_filter('secure_logged_in_cookie', 'my_custom_filter', 10, 3);

function my_custom_filter($secure_logged_in_cookie, $user_id, $secure) {
    // Your custom filtering logic here
    return $secure_logged_in_cookie;
}

Source Code Context

wp-includes/pluggable.php:1036 - How this hook is used in WordPress core
<?php
1031  		 *
1032  		 * @param bool $secure_logged_in_cookie Whether the logged in cookie should only be sent over HTTPS.
1033  		 * @param int  $user_id                 User ID.
1034  		 * @param bool $secure                  Whether the auth cookie should only be sent over HTTPS.
1035  		 */
1036  		$secure_logged_in_cookie = apply_filters( 'secure_logged_in_cookie', $secure_logged_in_cookie, $user_id, $secure );
1037  
1038  		if ( $secure ) {
1039  			$auth_cookie_name = SECURE_AUTH_COOKIE;
1040  			$scheme           = 'secure_auth';
1041  		} else {

PHP Documentation

<?php
/**
		 * Filters whether the logged in cookie should only be sent over HTTPS.
		 *
		 * @since 3.1.0
		 *
		 * @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.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-includes/pluggable.php
Related Hooks

Related hooks will be displayed here in future updates.