Requests_Cookie_Jar::normalize_cookie() WordPress Method

The Requests_Cookie_Jar::normalize_cookie() method is used to normalize a cookie name and value. This is useful when you want to set a cookie with a name that is not a valid cookie name, or when you want to set a cookie with a value that is not a valid cookie value.

Requests_Cookie_Jar::normalize_cookie( string|Requests_Cookie $cookie,  $key = null ) #

Normalise cookie data into a Requests_Cookie


Parameters

$cookie

(string|Requests_Cookie)(Required)


Top ↑

Return

(Requests_Cookie)


Top ↑

Source

File: wp-includes/Requests/Cookie/Jar.php

	public function normalize_cookie($cookie, $key = null) {
		if ($cookie instanceof Requests_Cookie) {
			return $cookie;
		}

		return Requests_Cookie::parse($cookie, $key);
	}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.