wp_http_cookie_value
Filters the header-encoded cookie value.
Usage
add_filter( 'wp_http_cookie_value', 'wp_kama_http_cookie_value_filter', 10, 2 );
/**
* Function for `wp_http_cookie_value` filter-hook.
*
* @param string $value The cookie value.
* @param string $name The cookie name.
*
* @return string
*/
function wp_kama_http_cookie_value_filter( $value, $name ){
// filter...
return $value;
}
- $value(string)
- The cookie value.
- $name(string)
- The cookie name.
Changelog
| Since 3.4.0 | Introduced. |
Where the hook is called
wp_http_cookie_value
wp-includes/class-wp-http-cookie.php 243
return $this->name . '=' . apply_filters( 'wp_http_cookie_value', $this->value, $this->name );