Requests_Cookie::normalize()publicWP 1.0

Normalize cookie and attributes

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

Хуков нет.

Возвращает

true|false. Whether the cookie was successfully normalized

Использование

$Requests_Cookie = new Requests_Cookie();
$Requests_Cookie->normalize();

Код Requests_Cookie::normalize() WP 6.0.2

public function normalize() {
	foreach ($this->attributes as $key => $value) {
		$orig_value = $value;
		$value      = $this->normalize_attribute($key, $value);
		if ($value === null) {
			unset($this->attributes[$key]);
			continue;
		}

		if ($value !== $orig_value) {
			$this->attributes[$key] = $value;
		}
	}

	return true;
}