GC_Http_Cookie::getHeaderValue()

最后更新于:2021-12-01 11:13:20

GC_()

Convert cookie name and value back to header string.

响应

(string) Header encoded cookie name and value.

源文件

文件: gc-includes/class-gc-http-cookie.php

	public function getHeaderValue() { // phpcs:ignore GeChiUI.NamingConventions.ValidFunctionName.MethodNameInvalid
		if ( ! isset( $this->name ) || ! isset( $this->value ) ) {
			return '';
		}

		/**
		 * Filters the header-encoded cookie value.
		 *
		 * @since 3.4.0
		 *
		 * @param string $value The cookie value.
		 * @param string $name  The cookie name.
		 */
		return $this->name . '=' . apply_filters( 'gc_http_cookie_value', $this->value, $this->name );
	}