Requests_Cookie::normalize

Advertisement

Summery Summery

Normalize cookie and attributes

Syntax Syntax

Requests_Cookie::normalize()

Return Return

(boolean) Whether the cookie was successfully normalized

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

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.