Requests_Transport_fsockopen::accept_encoding() WordPress Method

The accept_encoding() method of the Requests_Transport_fsockopen class is used to retrieve the value of the Accept-Encoding header from a request.

Requests_Transport_fsockopen::accept_encoding() #

Retrieve the encodings we can accept


Return

(string) Accept-Encoding header value


Top ↑

Source

File: wp-includes/Requests/Transport/fsockopen.php

	protected static function accept_encoding() {
		$type = array();
		if (function_exists('gzinflate')) {
			$type[] = 'deflate;q=1.0';
		}

		if (function_exists('gzuncompress')) {
			$type[] = 'compress;q=0.5';
		}

		$type[] = 'gzip;q=0.5';

		return implode(', ', $type);
	}

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.