Uses
| Uses | Description |
|---|---|
| wp-includes/Requests/Cookie.php: Requests_Cookie::domain_matches() | Check if a cookie is valid for a given domain |
| wp-includes/Requests/Cookie.php: Requests_Cookie::path_matches() | Check if a cookie is valid for a given path |
Check if a cookie is valid for a given URI
(Requests_IRI) (Required) URI to check
(boolean) Whether the cookie is valid for the given URI
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';
}
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_cookie/uri_matches