WpOrg\Requests\Cookie

Jar::normalize_cookie()publicWP 1.0

Normalise cookie data into a \WpOrg\Requests\Cookie

Method of the class: Jar{}

No Hooks.

Return

\WpOrg\Requests\Cookie.

Usage

$Jar = new Jar();
$Jar->normalize_cookie( $cookie, $key );
$cookie(string|\WpOrg\Requests\Cookie) (required)
Cookie header value, possibly pre-parsed (object).
$key(string)
The name for this cookie.
Default: ''

Jar::normalize_cookie() code WP 6.6.2

public function normalize_cookie($cookie, $key = '') {
	if ($cookie instanceof Cookie) {
		return $cookie;
	}

	return Cookie::parse($cookie, $key);
}