From 048b6ab9065ba85c73ca41cd56d00283bce081c2 Mon Sep 17 00:00:00 2001 From: Takahashi Fumiki Date: Thu, 11 Feb 2021 20:32:49 +0900 Subject: [PATCH] Using gzip is optional. In some environments like a shared folder, gzip is not reliable even if PHP has Gzip extension. --- src/parsers/class-wxr-parser-regex.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/parsers/class-wxr-parser-regex.php b/src/parsers/class-wxr-parser-regex.php index 4d2f240..ccf315f 100644 --- a/src/parsers/class-wxr-parser-regex.php +++ b/src/parsers/class-wxr-parser-regex.php @@ -19,7 +19,8 @@ class WXR_Parser_Regex { var $base_blog_url = ''; function __construct() { - $this->has_gzip = is_callable( 'gzopen' ); + $has_gzip = is_callable( 'gzopen' ); + $this->has_gzip = (bool) apply_filters( 'wp_import_has_gzip', $has_gzip ); } function parse( $file ) {