Filter hook 'wp_http_cookie_value'

in WP Core File wp-includes/class-wp-http-cookie.php at line 243

View Source

wp_http_cookie_value

Filter Hook
Description
Filters the header-encoded cookie value.

Hook Information

File Location wp-includes/class-wp-http-cookie.php View on GitHub
Hook Type Filter
Line Number 243

Hook Parameters

Type Name Description
string $value The cookie value.
string $name The cookie name.

Usage Examples

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

function my_custom_filter($value, $name) {
    // Your custom filtering logic here
    return $value;
}

Source Code Context

wp-includes/class-wp-http-cookie.php:243 - How this hook is used in WordPress core
<?php
 238  		 * @since 3.4.0
 239  		 *
 240  		 * @param string $value The cookie value.
 241  		 * @param string $name  The cookie name.
 242  		 */
 243  		return $this->name . '=' . apply_filters( 'wp_http_cookie_value', $this->value, $this->name );
 244  	}
 245  
 246  	/**
 247  	 * Retrieve cookie header for usage in the rest of the WordPress HTTP API.
 248  	 *

PHP Documentation

<?php
/**
		 * Filters the header-encoded cookie value.
		 *
		 * @since 3.4.0
		 *
		 * @param string $value The cookie value.
		 * @param string $name  The cookie name.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/class-wp-http-cookie.php
Related Hooks

Related hooks will be displayed here in future updates.