Requests_Cookie::uri_matches()publicWP 1.0

Check if a cookie is valid for a given URI

{} Это метод класса: Requests_Cookie{}

Хуков нет.


true|false. Whether the cookie is valid for the given URI


$Requests_Cookie = new Requests_Cookie();
$Requests_Cookie->uri_matches( $uri );
$uri(Requests_IRI) (обязательный)
URI to check

Код Requests_Cookie::uri_matches() WP 6.1.1

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';