Jar::normalize_cookie( string|WpOrgRequestsCookie $cookie, string $key =  ): WpOrgRequestsCookie

In this article

Normalise cookie data into a \WpOrg\Requests\Cookie

Parameters

$cookiestring|WpOrgRequestsCookierequired
Cookie header value, possibly pre-parsed (object).
$keystringoptional
The name for this cookie.

Default:''

Return

WpOrgRequestsCookie

Source

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

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

User Contributed Notes

You must log in before being able to contribute a note or feedback.