Requests_Cookie::normalize()

Normalize cookie and attributes


Description Description


Return Return

(boolean) Whether the cookie was successfully normalized


Top ↑

Source Source

File: wp-includes/Requests/Cookie.php

	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;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.