Check if a cookie is valid for a given URI
Parameters
$uri
WpOrgRequestsIrirequired- URI to check
Source
public function uri_matches(Iri $uri) {
if (!$this->domain_matches($uri->host)) {
return false;
}
if (!$this->path_matches($uri->path)) {
return false;
}
return empty($this->attributes['secure']) || $uri->scheme === 'https';
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.