wp_http_cookie_value
Filters the header-encoded cookie value.
Использование
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(строка)
- The cookie value.
- $name(строка)
- The cookie name.
Список изменений
С версии 3.4.0 | Введена. |
Где вызывается хук
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 );