WP_Http_Encoding::is_available()
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.
Метод класса: WP_Http_Encoding{}
Хуков нет.
Возвращает
true|false
.
Использование
$result = WP_Http_Encoding::is_available();
Список изменений
С версии 2.8.0 | Введена. |
Код WP_Http_Encoding::is_available() WP Http Encoding::is available WP 6.2.2
public static function is_available() { return ( function_exists( 'gzuncompress' ) || function_exists( 'gzdeflate' ) || function_exists( 'gzinflate' ) ); }