On this page
Requests_Cookie::uri_matches( Requests_IRI $uri ): boolean
Check if a cookie is valid for a given URI
Parameters
$uriRequests_IRI Required-
URI to check
Return
boolean Whether the cookie is valid for the given URI
Source
File: wp-includes/Requests/Cookie.php. View all references
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';
}
Related
Uses
| Uses | Description |
|---|---|
| Requests_Cookie::domain_matches() wp-includes/Requests/Cookie.php | Check if a cookie is valid for a given domain |
| Requests_Cookie::path_matches() wp-includes/Requests/Cookie.php | Check if a cookie is valid for a given path |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_cookie/uri_matches