Requests_Cookie::uri_matches( Requests_IRI $uri )

Check if a cookie is valid for a given URI


Description Description


Parameters Parameters

$uri

(Requests_IRI) (Required) URI to check


Top ↑

Return Return

(boolean) Whether the cookie is valid for the given URI


Top ↑

Source Source

File: wp-includes/Requests/Cookie.php

	public function uri_matches(Requests_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';
	}


Top ↑

User Contributed Notes User Contributed Notes

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