WpOrg\Requests
Cookie::normalize
Normalize cookie and attributes
Method of the class: Cookie{}
No Hooks.
Returns
true|false. Whether the cookie was successfully normalized
Usage
$Cookie = new Cookie(); $Cookie->normalize();
Cookie::normalize() Cookie::normalize code WP 7.0
public function normalize() {
foreach ($this->attributes as $key => $value) {
$orig_value = $value;
if (is_string($key)) {
$value = $this->normalize_attribute($key, $value);
}
if ($value === null) {
unset($this->attributes[$key]);
continue;
}
if ($value !== $orig_value) {
$this->attributes[$key] = $value;
}
}
return true;
}