WP_Http_Encoding::is_available() public WP 2.8.0
Whether decompression and compression are supported by the PHP version.
Each function is tested instead of checking for the zlib extension, to ensure that the functions all exist in the PHP version and aren't disabled.
{} It's a method of the class: WP_Http_Encoding{}
No Hooks.
Return
true|false
. Null. Nothing.
Usage
$result = WP_Http_Encoding::is_available();
Changelog
Since 2.8.0 | Introduced. |
Code of WP_Http_Encoding::is_available() WP Http Encoding::is available WP 5.7.1
public static function is_available() {
return ( function_exists( 'gzuncompress' ) || function_exists( 'gzdeflate' ) || function_exists( 'gzinflate' ) );
}