wp-includes/Requests/src/Cookie/Jar.php:148Add Cookie header to a request if we have any
$urlstring$headersarray$dataarray$typestring$optionsarray public function before_request($url, &$headers, &$data, &$type, &$options) { if (!$url instanceof Iri) { $url = new Iri($url); } if (!empty($this->cookies)) { $cookies = []; foreach ($this->cookies as $key => $cookie) { $cookie = $this->normalize_cookie($cookie, $key); // Skip expired cookies if ($cookie->is_expired()) { continue; } if ($cookie->domain_matches($url->host)) { $cookies[] = $cookie->format_for_header(); } } $headers['Cookie'] = implode('; ', $cookies); } }Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/Requests/src/Cookie/Jar.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.