WpOrg\Requests\Transport
Fsockopen::accept_encoding
Retrieve the encodings we can accept
Method of the class: Fsockopen{}
No Hooks.
Returns
String. Accept-Encoding header value
Usage
$result = Fsockopen::accept_encoding();
Fsockopen::accept_encoding() Fsockopen::accept encoding code WP 7.0
private static function accept_encoding() {
$type = [];
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);
}