WP_Http_Cookie::getHeaderValue() WordPress Method
The WP_Http_Cookie::getHeaderValue() method is used to get the value of a cookie header. This is useful for retrieving the value of a cookie set by a server.
WP_Http_Cookie::getHeaderValue() #
Convert cookie name and value back to header string.
Return
(string) Header encoded cookie name and value.
Source
File: wp-includes/class-wp-http-cookie.php
public function getHeaderValue() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid if ( ! isset( $this->name ) || ! isset( $this->value ) ) { return ''; } /** * Filters the header-encoded cookie value. * * @since 3.4.0 * * @param string $value The cookie value. * @param string $name The cookie name. */ return $this->name . '=' . apply_filters( 'wp_http_cookie_value', $this->value, $this->name ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |