LiteSpeed Cache - Version 2.9.8.7

Version Description

  • Oct 11 2019 =
  • 3rd: Enhanced WP stateless compatibility. (#PR143)
  • 3rd: Fixed a PHP warning caused by previous PR for AMP. (#PR176)
Download this release

Release Info

Developer hailite
Plugin Icon 128x128 LiteSpeed Cache
Version 2.9.8.7
Comparing to
See all releases

Code changes from version 2.9.8.6 to 2.9.8.7

inc/img_optm.class.php CHANGED
@@ -1077,7 +1077,7 @@ class LiteSpeed_Cache_Img_Optm
1077
  $bk_file = substr( $local_file, 0, -strlen( $extension ) ) . 'bk.' . $extension ;
1078
 
1079
  if ( ! $rm_ori_bkup ) {
1080
- rename( $local_file, $bk_file ) ;
1081
  }
1082
 
1083
  // Replace ori img
@@ -1085,14 +1085,14 @@ class LiteSpeed_Cache_Img_Optm
1085
 
1086
  LiteSpeed_Cache_Log::debug( '[Img_Optm] Pulled optimized img: ' . $local_file ) ;
1087
 
 
 
1088
  /**
1089
  * API Hook
1090
  * @since 2.9.5
1091
  */
1092
  do_action( 'litespeed_img_pull_ori', $row_img, $local_file ) ;
1093
 
1094
- $target_size = filesize( $local_file ) ;
1095
-
1096
  $total_pulled_ori ++ ;
1097
  }
1098
 
@@ -1126,6 +1126,8 @@ class LiteSpeed_Cache_Img_Optm
1126
 
1127
  LiteSpeed_Cache_Log::debug( '[Img_Optm] Pulled optimized img WebP: ' . $local_file . '.webp' ) ;
1128
 
 
 
1129
  /**
1130
  * API for WebP
1131
  * @since 2.9.5
@@ -1133,8 +1135,6 @@ class LiteSpeed_Cache_Img_Optm
1133
  */
1134
  do_action( 'litespeed_img_pull_webp', $row_img, $local_file . '.webp' ) ;
1135
 
1136
- $webp_size = filesize( $local_file . '.webp' ) ;
1137
-
1138
  $total_pulled_webp ++ ;
1139
  }
1140
 
1077
  $bk_file = substr( $local_file, 0, -strlen( $extension ) ) . 'bk.' . $extension ;
1078
 
1079
  if ( ! $rm_ori_bkup ) {
1080
+ file_exists( $local_file ) && rename( $local_file, $bk_file ) ;
1081
  }
1082
 
1083
  // Replace ori img
1085
 
1086
  LiteSpeed_Cache_Log::debug( '[Img_Optm] Pulled optimized img: ' . $local_file ) ;
1087
 
1088
+ $target_size = filesize( $local_file ) ;
1089
+
1090
  /**
1091
  * API Hook
1092
  * @since 2.9.5
1093
  */
1094
  do_action( 'litespeed_img_pull_ori', $row_img, $local_file ) ;
1095
 
 
 
1096
  $total_pulled_ori ++ ;
1097
  }
1098
 
1126
 
1127
  LiteSpeed_Cache_Log::debug( '[Img_Optm] Pulled optimized img WebP: ' . $local_file . '.webp' ) ;
1128
 
1129
+ $webp_size = filesize( $local_file . '.webp' ) ;
1130
+
1131
  /**
1132
  * API for WebP
1133
  * @since 2.9.5
1135
  */
1136
  do_action( 'litespeed_img_pull_webp', $row_img, $local_file . '.webp' ) ;
1137
 
 
 
1138
  $total_pulled_webp ++ ;
1139
  }
1140
 
inc/litespeed-cache.class.php CHANGED
@@ -26,7 +26,7 @@ class LiteSpeed_Cache
26
  const NAME = 'LiteSpeed Cache' ;
27
  const PLUGIN_NAME = 'litespeed-cache' ;
28
  const PLUGIN_FILE = 'litespeed-cache/litespeed-cache.php' ;
29
- const PLUGIN_VERSION = '2.9.8.6' ;
30
 
31
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
32
 
26
  const NAME = 'LiteSpeed Cache' ;
27
  const PLUGIN_NAME = 'litespeed-cache' ;
28
  const PLUGIN_FILE = 'litespeed-cache/litespeed-cache.php' ;
29
+ const PLUGIN_VERSION = '2.9.8.7' ;
30
 
31
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
32
 
includes/litespeed-cache.class.php CHANGED
@@ -26,7 +26,7 @@ class LiteSpeed_Cache
26
  const NAME = 'LiteSpeed Cache' ;
27
  const PLUGIN_NAME = 'litespeed-cache' ;
28
  const PLUGIN_FILE = 'litespeed-cache/litespeed-cache.php' ;
29
- const PLUGIN_VERSION = '2.9.8.6' ;
30
 
31
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
32
 
26
  const NAME = 'LiteSpeed Cache' ;
27
  const PLUGIN_NAME = 'litespeed-cache' ;
28
  const PLUGIN_FILE = 'litespeed-cache/litespeed-cache.php' ;
29
+ const PLUGIN_VERSION = '2.9.8.7' ;
30
 
31
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
32
 
litespeed-cache.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: LiteSpeed Cache
16
  * Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
17
  * Description: High-performance page caching and site optimization from LiteSpeed
18
- * Version: 2.9.8.6
19
  * Author: LiteSpeed Technologies
20
  * Author URI: https://www.litespeedtech.com
21
  * License: GPLv3
15
  * Plugin Name: LiteSpeed Cache
16
  * Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
17
  * Description: High-performance page caching and site optimization from LiteSpeed
18
+ * Version: 2.9.8.7
19
  * Author: LiteSpeed Technologies
20
  * Author URI: https://www.litespeedtech.com
21
  * License: GPLv3
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: LiteSpeedTech
3
  Tags: caching, optimize, performance, pagespeed, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
4
  Requires at least: 4.0
5
  Tested up to: 5.2.2
6
- Stable tag: 2.9.8.6
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
@@ -290,10 +290,14 @@ Click on the `Advanced View` link at the top of the page, and several more tabs
290
 
291
  == Changelog ==
292
 
 
 
 
 
293
  = 2.9.8.6 - Sep 24 2019 =
294
- * <strong>3rd</strong>: Bypassed page optimizations for AMP. (#359748 PR#169)
295
- * <strong>GUI</strong>: Firefox compatibility with radio button state when reloading pages. (#288940 PR#162)
296
- * <strong>GUI</strong>: Updated Slack invitation link. (PR#173)
297
 
298
  = 2.9.8.5 - Aug 21 2019 =
299
  * <strong>CCSS</strong>: Removed potential PHP notice when getting post_type. (@amcgiffert)
3
  Tags: caching, optimize, performance, pagespeed, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
4
  Requires at least: 4.0
5
  Tested up to: 5.2.2
6
+ Stable tag: 2.9.8.7
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
290
 
291
  == Changelog ==
292
 
293
+ = 2.9.8.7 - Oct 11 2019 =
294
+ * <strong>3rd</strong>: Enhanced WP stateless compatibility. (#PR143)
295
+ * <strong>3rd</strong>: Fixed a PHP warning caused by previous PR for AMP. (#PR176)
296
+
297
  = 2.9.8.6 - Sep 24 2019 =
298
+ * <strong>3rd</strong>: Bypassed page optimizations for AMP. (#359748 #PR169)
299
+ * <strong>GUI</strong>: Firefox compatibility with radio button state when reloading pages. (#288940 #PR162)
300
+ * <strong>GUI</strong>: Updated Slack invitation link. (#PR173)
301
 
302
  = 2.9.8.5 - Aug 21 2019 =
303
  * <strong>CCSS</strong>: Removed potential PHP notice when getting post_type. (@amcgiffert)
thirdparty/lscwp-3rd-amp-bypass.cls.php CHANGED
@@ -26,7 +26,8 @@ class LiteSpeed_Cache_ThirdParty_AMP_Bypass
26
  */
27
  public static function pre_load()
28
  {
29
- if ( ! function_exists( 'is_amp_endpoint' ) || ! is_amp_endpoint() ) return ;
 
30
  LiteSpeed_Cache_API::force_option( LiteSpeed_Cache_API::OPID_OPTM_CSS_ASYNC, false ) ;
31
  LiteSpeed_Cache_API::force_option( LiteSpeed_Cache_API::OPID_MEDIA_IMG_LAZY, false ) ;
32
  LiteSpeed_Cache_API::force_option( LiteSpeed_Cache_API::OPID_MEDIA_IFRAME_LAZY, false ) ;
26
  */
27
  public static function pre_load()
28
  {
29
+ if ( ! function_exists( 'is_amp_endpoint' ) || is_admin() || ! isset( $_GET[ 'amp' ] ) ) return ;
30
+
31
  LiteSpeed_Cache_API::force_option( LiteSpeed_Cache_API::OPID_OPTM_CSS_ASYNC, false ) ;
32
  LiteSpeed_Cache_API::force_option( LiteSpeed_Cache_API::OPID_MEDIA_IMG_LAZY, false ) ;
33
  LiteSpeed_Cache_API::force_option( LiteSpeed_Cache_API::OPID_MEDIA_IFRAME_LAZY, false ) ;