LiteSpeed Cache - Version 2.6.2

Version Description

  • Oct 11 2018 =
  • Setting: Automatically correct invalid numeric values in configuration settings upon submit.
  • Media: Fixed the issue where iframe lazy load was broken by latest Chrome release. (@ofmarconi)
  • : Fixed an issue with Multisite where subsites failed to purge when only primary site has WooCommerce . (@kierancalv)
Download this release

Release Info

Developer LiteSpeedTech
Plugin Icon 128x128 LiteSpeed Cache
Version 2.6.2
Comparing to
See all releases

Code changes from version 2.6.1 to 2.6.2

admin/litespeed-cache-admin-settings.class.php CHANGED
@@ -33,21 +33,6 @@ class LiteSpeed_Cache_Admin_Settings
33
  {
34
  }
35
 
36
- /**
37
- * Display err msg for ttl
38
- *
39
- * @since 2.0
40
- * @access private
41
- */
42
- private function _show_ttl_err( $desc, $min, $max )
43
- {
44
- if ( ! $max ) {
45
- return sprintf( __( '%1$s must be an integer larger than %2$d', 'litespeed-cache' ), $desc, $min ) ;
46
- }
47
-
48
- return sprintf( __( '%1$s must be an integer between %2$d and %3$d', 'litespeed-cache' ), $desc, $min, $max ) ;
49
- }
50
-
51
  /**
52
  * Callback function that will validate any changes made in the settings page.
53
  *
@@ -354,26 +339,21 @@ class LiteSpeed_Cache_Admin_Settings
354
 
355
  // TTL check
356
  $ids = array(
357
- LiteSpeed_Cache_Config::OPID_PUBLIC_TTL => array( __( 'Default Public Cache', 'litespeed-cache' ), 30, $this->_max_int ),
358
- LiteSpeed_Cache_Config::OPID_PRIVATE_TTL => array( __( 'Default Private Cache', 'litespeed-cache' ), 60, 3600 ),
359
- LiteSpeed_Cache_Config::OPID_FRONT_PAGE_TTL => array( __( 'Default Front Page', 'litespeed-cache' ), 30, $this->_max_int ),
360
- LiteSpeed_Cache_Config::OPID_FEED_TTL => array( __( 'Feed', 'litespeed-cache' ), 0, $this->_max_int, 30 ),
361
- LiteSpeed_Cache_Config::OPID_404_TTL => array( '404', 0, $this->_max_int, 30 ),
362
- LiteSpeed_Cache_Config::OPID_403_TTL => array( '403', 0, $this->_max_int, 30 ),
363
- LiteSpeed_Cache_Config::OPID_500_TTL => array( '500', 0, $this->_max_int, 30 ),
364
  ) ;
365
  foreach ( $ids as $id => $v ) {
366
- list( $desc, $min, $max ) = $v ;
367
- if ( ! $this->_check_ttl( $this->_input, $id, $min, $max ) ) {
368
- $this->_err[] = $this->_show_ttl_err( $desc, $min, $max ) ;
369
- }
370
- else {
371
- if ( ! empty( $v[ 3 ] ) && $this->_input[ $id ] < $v[ 3 ] ) {
372
- $this->_options[ $id ] = 0 ;
373
- }
374
- else {
375
- $this->_options[ $id ] = $this->_input[ $id ] ;
376
- }
377
  }
378
  }
379
 
@@ -763,10 +743,7 @@ class LiteSpeed_Cache_Admin_Settings
763
  }
764
 
765
  $id = LiteSpeed_Cache_Config::OPID_OPTIMIZE_TTL ;
766
- if ( ! $this->_check_ttl( $this->_input, $id, 3600 ) ) {
767
- $this->_input[ $id ] = 3600 ;
768
- }
769
- $this->_options[ $id ] = $this->_input[ $id ] ;
770
 
771
  // Update critical css
772
  update_option( LiteSpeed_Cache_Config::ITEM_OPTM_CSS, $this->_input[ LiteSpeed_Cache_Config::ITEM_OPTM_CSS ] ) ;
@@ -897,12 +874,7 @@ class LiteSpeed_Cache_Admin_Settings
897
  $this->_options[ $id ] = self::is_checked_radio( $this->_input[ $id ] ) ;
898
 
899
  $id = LiteSpeed_Cache_Config::OPID_LOG_FILE_SIZE ;
900
- if ( ! $this->_check_ttl( $this->_input, $id, 3, 3000 ) ) {
901
- $this->_err[] = $this->_show_ttl_err( __( 'Log File Size Limit', 'litespeed-cache' ), 3, 3000 ) ;
902
- }
903
- else {
904
- $this->_options[ $id ] = $this->_input[ $id ] ;
905
- }
906
 
907
  $ids = array(
908
  LiteSpeed_Cache_Config::OPID_DEBUG_DISABLE_ALL,
@@ -983,20 +955,16 @@ class LiteSpeed_Cache_Admin_Settings
983
  $usleep_max = null ;
984
  }
985
  $ids = array(
986
- LiteSpeed_Cache_Config::CRWL_USLEEP => array( __( 'Delay', 'litespeed-cache' ), $usleep_min, $usleep_max ),
987
- LiteSpeed_Cache_Config::CRWL_RUN_DURATION => array( __( 'Run Duration', 'litespeed-cache' ), 0, $this->_max_int ),
988
- LiteSpeed_Cache_Config::CRWL_RUN_INTERVAL => array( __( 'Cron Interval', 'litespeed-cache' ), 60, $this->_max_int ),
989
- LiteSpeed_Cache_Config::CRWL_CRAWL_INTERVAL => array( __( 'Whole Interval', 'litespeed-cache' ), 0, $this->_max_int ),
990
- LiteSpeed_Cache_Config::CRWL_THREADS => array( __( 'Threads', 'litespeed-cache' ), 1, 16 ),
991
  ) ;
992
  foreach ( $ids as $id => $v ) {
993
- list( $desc, $min, $max ) = $v ;
994
- if ( ! $this->_check_ttl( $this->_input, $id, $min, $max ) ) {
995
- $this->_err[] = $this->_show_ttl_err( $desc, $min, $max ) ;
996
- }
997
- else {
998
- $this->_options[ $id ] = $this->_input[ $id ] ;
999
- }
1000
  }
1001
 
1002
 
@@ -1059,19 +1027,8 @@ class LiteSpeed_Cache_Admin_Settings
1059
  }
1060
 
1061
  // TTL check
1062
- $ids = array(
1063
- LiteSpeed_Cache_Config::OPID_CACHE_BROWSER_TTL => array( __( 'Default Public Cache', 'litespeed-cache' ), 30, $this->_max_int ),
1064
- ) ;
1065
- foreach ( $ids as $id => $v ) {
1066
- list( $desc, $min, $max ) = $v ;
1067
- if ( ! $this->_check_ttl( $this->_input, $id, $min, $max ) ) {
1068
- $this->_err[] = $this->_show_ttl_err( $desc, $min, $max ) ;
1069
- }
1070
- else {
1071
- $new_options[ $id ] = $this->_input[ $id ] ;
1072
- }
1073
- }
1074
-
1075
 
1076
  // check mobile agents
1077
  $id = LiteSpeed_Cache_Config::ID_MOBILEVIEW_LIST ;
@@ -1268,6 +1225,7 @@ class LiteSpeed_Cache_Admin_Settings
1268
  * Helper function to validate TTL settings. Will check if it's set, is an integer, and is greater than 0 and less than INT_MAX.
1269
  *
1270
  * @since 1.0.12
 
1271
  * @access private
1272
  * @param array $input Input array
1273
  * @param string $id Option ID
@@ -1277,24 +1235,25 @@ class LiteSpeed_Cache_Admin_Settings
1277
  */
1278
  private function _check_ttl( $input, $id, $min = false, $max = null )
1279
  {
1280
- if ( ! isset( $input[ $id ] ) ) {
1281
- return false ;
1282
- }
1283
 
1284
- $val = $input[ $id ] ;
1285
-
1286
- $ival = intval( $val ) ;
1287
- $sval = strval( $val ) ;
1288
 
1289
- if( $min && $ival < $min ) {
1290
- return false ;
1291
  }
1292
 
1293
  if ( $max === null ) {
1294
  $max = $this->_max_int ;
1295
  }
1296
 
1297
- return ctype_digit( $sval ) && $ival >= 0 && $ival <= $max ;
 
 
 
 
1298
  }
1299
 
1300
  /**
33
  {
34
  }
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  /**
37
  * Callback function that will validate any changes made in the settings page.
38
  *
339
 
340
  // TTL check
341
  $ids = array(
342
+ LiteSpeed_Cache_Config::OPID_PUBLIC_TTL => array( 30, null ),
343
+ LiteSpeed_Cache_Config::OPID_PRIVATE_TTL => array( 60, 3600 ),
344
+ LiteSpeed_Cache_Config::OPID_FRONT_PAGE_TTL => array( 30, null ),
345
+ LiteSpeed_Cache_Config::OPID_FEED_TTL => array( 0, null, 30 ),
346
+ LiteSpeed_Cache_Config::OPID_404_TTL => array( 0, null, 30 ),
347
+ LiteSpeed_Cache_Config::OPID_403_TTL => array( 0, null, 30 ),
348
+ LiteSpeed_Cache_Config::OPID_500_TTL => array( 0, null, 30 ),
349
  ) ;
350
  foreach ( $ids as $id => $v ) {
351
+ list( $min, $max ) = $v ;
352
+
353
+ $this->_options[ $id ] = $this->_check_ttl( $this->_input, $id, $min, $max ) ;
354
+
355
+ if ( ! empty( $v[ 2 ] ) && $this->_options[ $id ] < $v[ 2 ] ) {
356
+ $this->_options[ $id ] = 0 ;
 
 
 
 
 
357
  }
358
  }
359
 
743
  }
744
 
745
  $id = LiteSpeed_Cache_Config::OPID_OPTIMIZE_TTL ;
746
+ $this->_options[ $id ] = $this->_check_ttl( $this->_input, $id, 3600 ) ;
 
 
 
747
 
748
  // Update critical css
749
  update_option( LiteSpeed_Cache_Config::ITEM_OPTM_CSS, $this->_input[ LiteSpeed_Cache_Config::ITEM_OPTM_CSS ] ) ;
874
  $this->_options[ $id ] = self::is_checked_radio( $this->_input[ $id ] ) ;
875
 
876
  $id = LiteSpeed_Cache_Config::OPID_LOG_FILE_SIZE ;
877
+ $this->_options[ $id ] = $this->_check_ttl( $this->_input, $id, 3, 3000 ) ;
 
 
 
 
 
878
 
879
  $ids = array(
880
  LiteSpeed_Cache_Config::OPID_DEBUG_DISABLE_ALL,
955
  $usleep_max = null ;
956
  }
957
  $ids = array(
958
+ LiteSpeed_Cache_Config::CRWL_USLEEP => array( $usleep_min, $usleep_max ),
959
+ LiteSpeed_Cache_Config::CRWL_RUN_DURATION => array( 0, null ),
960
+ LiteSpeed_Cache_Config::CRWL_RUN_INTERVAL => array( 60, null ),
961
+ LiteSpeed_Cache_Config::CRWL_CRAWL_INTERVAL => array( 0, null ),
962
+ LiteSpeed_Cache_Config::CRWL_THREADS => array( 1, 16 ),
963
  ) ;
964
  foreach ( $ids as $id => $v ) {
965
+ list( $min, $max ) = $v ;
966
+
967
+ $this->_options[ $id ] = $this->_check_ttl( $this->_input, $id, $min, $max ) ;
 
 
 
 
968
  }
969
 
970
 
1027
  }
1028
 
1029
  // TTL check
1030
+ $id = LiteSpeed_Cache_Config::OPID_CACHE_BROWSER_TTL ;
1031
+ $new_options[ $id ] = $this->_check_ttl( $this->_input, $id, 30 ) ;
 
 
 
 
 
 
 
 
 
 
 
1032
 
1033
  // check mobile agents
1034
  $id = LiteSpeed_Cache_Config::ID_MOBILEVIEW_LIST ;
1225
  * Helper function to validate TTL settings. Will check if it's set, is an integer, and is greater than 0 and less than INT_MAX.
1226
  *
1227
  * @since 1.0.12
1228
+ * @since 2.6.2 Automatically correct number
1229
  * @access private
1230
  * @param array $input Input array
1231
  * @param string $id Option ID
1235
  */
1236
  private function _check_ttl( $input, $id, $min = false, $max = null )
1237
  {
1238
+ $v = isset( $input[ $id ] ) ? (int) $input[ $id ] : 0 ;
 
 
1239
 
1240
+ if ( $min && $v < $min ) {
1241
+ return $min ;
1242
+ }
 
1243
 
1244
+ if ( $v < 0 ) {
1245
+ return 0 ;
1246
  }
1247
 
1248
  if ( $max === null ) {
1249
  $max = $this->_max_int ;
1250
  }
1251
 
1252
+ if ( $v > $max ) {
1253
+ return $max ;
1254
+ }
1255
+
1256
+ return $v ;
1257
  }
1258
 
1259
  /**
inc/config.class.php CHANGED
@@ -514,8 +514,16 @@ class LiteSpeed_Cache_Config extends LiteSpeed_Cache_Const
514
  public function plugin_upgrade()
515
  {
516
  $default_options = $this->get_default_options() ;
517
-
518
- if ( $this->options[ self::OPID_VERSION ] == $default_options[ self::OPID_VERSION ] && count( $default_options ) == count( $this->options ) ) {
 
 
 
 
 
 
 
 
519
  return ;
520
  }
521
 
514
  public function plugin_upgrade()
515
  {
516
  $default_options = $this->get_default_options() ;
517
+ $site_options = $this->get_site_options() ;
518
+
519
+ // Skip count check if Use Primary Site Configurations is on
520
+ if (
521
+ $this->options[ self::OPID_VERSION ] == $default_options[ self::OPID_VERSION ] &&
522
+ (
523
+ ( ! is_main_site() && ! empty ( $site_options[ self::NETWORK_OPID_USE_PRIMARY ] ) ) ||
524
+ count( $default_options ) == count( $this->options )
525
+ )
526
+ ) {
527
  return ;
528
  }
529
 
inc/litespeed-cache.class.php CHANGED
@@ -25,7 +25,7 @@ class LiteSpeed_Cache
25
 
26
  const NAME = 'LiteSpeed Cache' ;
27
  const PLUGIN_NAME = 'litespeed-cache' ;
28
- const PLUGIN_VERSION = '2.6.1' ;
29
 
30
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
31
 
25
 
26
  const NAME = 'LiteSpeed Cache' ;
27
  const PLUGIN_NAME = 'litespeed-cache' ;
28
+ const PLUGIN_VERSION = '2.6.2' ;
29
 
30
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
31
 
includes/litespeed-cache-config.class.php CHANGED
@@ -514,8 +514,16 @@ class LiteSpeed_Cache_Config extends LiteSpeed_Cache_Const
514
  public function plugin_upgrade()
515
  {
516
  $default_options = $this->get_default_options() ;
517
-
518
- if ( $this->options[ self::OPID_VERSION ] == $default_options[ self::OPID_VERSION ] && count( $default_options ) == count( $this->options ) ) {
 
 
 
 
 
 
 
 
519
  return ;
520
  }
521
 
514
  public function plugin_upgrade()
515
  {
516
  $default_options = $this->get_default_options() ;
517
+ $site_options = $this->get_site_options() ;
518
+
519
+ // Skip count check if Use Primary Site Configurations is on
520
+ if (
521
+ $this->options[ self::OPID_VERSION ] == $default_options[ self::OPID_VERSION ] &&
522
+ (
523
+ ( ! is_main_site() && ! empty ( $site_options[ self::NETWORK_OPID_USE_PRIMARY ] ) ) ||
524
+ count( $default_options ) == count( $this->options )
525
+ )
526
+ ) {
527
  return ;
528
  }
529
 
includes/litespeed-cache.class.php CHANGED
@@ -25,7 +25,7 @@ class LiteSpeed_Cache
25
 
26
  const NAME = 'LiteSpeed Cache' ;
27
  const PLUGIN_NAME = 'litespeed-cache' ;
28
- const PLUGIN_VERSION = '2.6.1' ;
29
 
30
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
31
 
25
 
26
  const NAME = 'LiteSpeed Cache' ;
27
  const PLUGIN_NAME = 'litespeed-cache' ;
28
+ const PLUGIN_VERSION = '2.6.2' ;
29
 
30
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
31
 
js/lazyload.lib.js CHANGED
@@ -203,7 +203,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
203
  var settings = this._settings;
204
  var onIntersection = function onIntersection(entries) {
205
  entries.forEach(function (entry) {
206
- if (entry.intersectionRatio > 0) {
 
 
207
  var element = entry.target;
208
  revealElement(element, settings);
209
  _this._observer.unobserve(element);
@@ -258,4 +260,4 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
258
  }
259
 
260
  return LazyLoad;
261
- });
203
  var settings = this._settings;
204
  var onIntersection = function onIntersection(entries) {
205
  entries.forEach(function (entry) {
206
+
207
+ //entry.intersectionRatio is not enough alone because it could be 0 on some intersecting elements
208
+ if (entry.isIntersecting || entry.intersectionRatio > 0) {
209
  var element = entry.target;
210
  revealElement(element, settings);
211
  _this._observer.unobserve(element);
260
  }
261
 
262
  return LazyLoad;
263
+ });
js/lazyload.min.js CHANGED
@@ -1 +1 @@
1
- var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.LazyLoad=t()}(this,function(){"use strict";var e={elements_selector:"img",container:document,threshold:300,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",class_loading:"loading",class_loaded:"loaded",class_error:"error",callback_load:null,callback_error:null,callback_set:null},t=function(e,t){return e.getAttribute("data-"+t)},n=function(e,t,n){return e.setAttribute("data-"+t,n)},s=function(e){return e.filter(function(e){return!t(e,"was-processed")})},r=function(e,t){var n=new e(t),s=new CustomEvent("LazyLoad::Initialized",{detail:{instance:n}});window.dispatchEvent(s)},o=function(e,n){var s=n.data_srcset,r=n.data_sizes,o=e.parentElement;if("PICTURE"===o.tagName)for(var a,i=0;a=o.children[i];i+=1)if("SOURCE"===a.tagName){var c=t(a,s);c&&a.setAttribute("srcset",c);var l=t(a,r);l&&a.setAttribute("sizes",l)}},a=function(e,n){var s=n.data_src,r=n.data_srcset,a=n.data_sizes,i=e.tagName,c=t(e,s);if("IMG"===i){o(e,n);var l=t(e,r);l&&e.setAttribute("srcset",l);var u=t(e,a);return u&&e.setAttribute("sizes",u),void(c&&e.setAttribute("src",c))}"IFRAME"!==i?c&&(e.style.backgroundImage='url("'+c+'")'):c&&e.setAttribute("src",c)},i="classList"in document.createElement("p"),c=function(e,t){i?e.classList.add(t):e.className+=(e.className?" ":"")+t},l=function(e,t){i?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},u=function(e,t){e&&e(t)},d=function(e,t,n){e.removeEventListener("load",t),e.removeEventListener("error",n)},f=function(e,t){var n=function n(r){_(r,!0,t),d(e,n,s)},s=function s(r){_(r,!1,t),d(e,n,s)};e.addEventListener("load",n),e.addEventListener("error",s)},_=function(e,t,n){var s=e.target;l(s,n.class_loading),c(s,t?n.class_loaded:n.class_error),u(t?n.callback_load:n.callback_error,s)},v=function(e,t){["IMG","IFRAME"].indexOf(e.tagName)>-1&&(f(e,t),c(e,t.class_loading)),a(e,t),n(e,"was-processed",!0),u(t.callback_set,e)},m=function(t,n){this._settings=_extends({},e,t),this._setObserver(),this.update(n)};m.prototype={_setObserver:function(){var e=this;if("IntersectionObserver"in window){var t=this._settings;this._observer=new IntersectionObserver(function(n){n.forEach(function(n){if(n.intersectionRatio>0){var s=n.target;v(s,t),e._observer.unobserve(s)}}),e._elements=s(e._elements)},{root:t.container===document?null:t.container,rootMargin:t.threshold+"px"})}},update:function(e){var t=this,n=this._settings,r=e||n.container.querySelectorAll(n.elements_selector);this._elements=s(Array.prototype.slice.call(r)),this._observer?this._elements.forEach(function(e){t._observer.observe(e)}):(this._elements.forEach(function(e){v(e,n)}),this._elements=s(this._elements))},destroy:function(){var e=this;this._observer&&(s(this._elements).forEach(function(t){e._observer.unobserve(t)}),this._observer=null),this._elements=null,this._settings=null}};var b=window.lazyLoadOptions;return b&&function(e,t){if(t.length)for(var n,s=0;n=t[s];s+=1)r(e,n);else r(e,t)}(m,b),m});!function(e,t){"use strict";var n,a,d=function(){n=new LazyLoad({elements_selector:"[data-lazyloaded]"}),a=function(){n.update()},e.MutationObserver&&new MutationObserver(a).observe(t.documentElement,{childList:!0,subtree:!0,attributes:!0})};e.addEventListener?e.addEventListener("load",d,!1):e.attachEvent("onload",d)}(window,document);
1
+ var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.LazyLoad=t()}(this,function(){"use strict";var s={elements_selector:"img",container:document,threshold:300,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",class_loading:"loading",class_loaded:"loaded",class_error:"error",callback_load:null,callback_error:null,callback_set:null},c="data-",l=function(e,t){return e.getAttribute(c+t)},r=function(e){return e.filter(function(e){return!l(e,"was-processed")})},o=function(e,t){var s=new e(t),n=new CustomEvent("LazyLoad::Initialized",{detail:{instance:s}});window.dispatchEvent(n)},u=function(e,t){var s=t.data_src,n=t.data_srcset,r=t.data_sizes,o=e.tagName,a=l(e,s);if("IMG"===o){!function(e,t){var s=t.data_srcset,n=t.data_sizes,r=e.parentElement;if("PICTURE"===r.tagName)for(var o,a=0;o=r.children[a];a+=1)if("SOURCE"===o.tagName){var i=l(o,s);i&&o.setAttribute("srcset",i);var c=l(o,n);c&&o.setAttribute("sizes",c)}}(e,t);var i=l(e,n);i&&e.setAttribute("srcset",i);var c=l(e,r);return c&&e.setAttribute("sizes",c),void(a&&e.setAttribute("src",a))}"IFRAME"!==o?a&&(e.style.backgroundImage='url("'+a+'")'):a&&e.setAttribute("src",a)},a="classList"in document.createElement("p"),d=function(e,t){a?e.classList.add(t):e.className+=(e.className?" ":"")+t},f=function(e,t){e&&e(t)},_="load",v="error",m=function(e,t,s){e.removeEventListener(_,t),e.removeEventListener(v,s)},b=function(e,t,s){var n,r,o=e.target;n=o,r=s.class_loading,a?n.classList.remove(r):n.className=n.className.replace(new RegExp("(^|\\s+)"+r+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,""),d(o,t?s.class_loaded:s.class_error),f(t?s.callback_load:s.callback_error,o)},i=function(e,t){var s,n,r,o,a,i;-1<["IMG","IFRAME"].indexOf(e.tagName)&&(n=t,r=function e(t){b(t,!0,n),m(s,e,o)},o=function e(t){b(t,!1,n),m(s,r,e)},(s=e).addEventListener(_,r),s.addEventListener(v,o),d(e,t.class_loading)),u(e,t),a="was-processed",i=!0,e.setAttribute(c+a,i),f(t.callback_set,e)},e=function(e,t){this._settings=_extends({},s,e),this._setObserver(),this.update(t)};e.prototype={_setObserver:function(){var s=this;if("IntersectionObserver"in window){var n=this._settings;this._observer=new IntersectionObserver(function(e){e.forEach(function(e){if(e.isIntersecting||0<e.intersectionRatio){var t=e.target;i(t,n),s._observer.unobserve(t)}}),s._elements=r(s._elements)},{root:n.container===document?null:n.container,rootMargin:n.threshold+"px"})}},update:function(e){var t=this,s=this._settings,n=e||s.container.querySelectorAll(s.elements_selector);this._elements=r(Array.prototype.slice.call(n)),this._observer?this._elements.forEach(function(e){t._observer.observe(e)}):(this._elements.forEach(function(e){i(e,s)}),this._elements=r(this._elements))},destroy:function(){var t=this;this._observer&&(r(this._elements).forEach(function(e){t._observer.unobserve(e)}),this._observer=null),this._elements=null,this._settings=null}};var t=window.lazyLoadOptions;return t&&function(e,t){if(t.length)for(var s,n=0;s=t[n];n+=1)o(e,s);else o(e,t)}(e,t),e});!function(e,t){"use strict";var n,a,d=function(){n=new LazyLoad({elements_selector:"[data-lazyloaded]"}),a=function(){n.update()},e.MutationObserver&&new MutationObserver(a).observe(t.documentElement,{childList:!0,subtree:!0,attributes:!0})};e.addEventListener?e.addEventListener("load",d,!1):e.attachEvent("onload",d)}(window,document);
languages/litespeed-cache.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the LiteSpeed Cache package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: LiteSpeed Cache 2.6.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
- "POT-Creation-Date: 2018-10-04 18:56:42+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -476,67 +476,14 @@ msgstr ""
476
  msgid "File Saved."
477
  msgstr ""
478
 
479
- #: admin/litespeed-cache-admin-settings.class.php:45
480
- msgid "%1$s must be an integer larger than %2$d"
481
- msgstr ""
482
-
483
- #: admin/litespeed-cache-admin-settings.class.php:48
484
- msgid "%1$s must be an integer between %2$d and %3$d"
485
- msgstr ""
486
-
487
- #: admin/litespeed-cache-admin-settings.class.php:67
488
  msgid "'Use primary site settings' set by Network Administrator."
489
  msgstr ""
490
 
491
- #: admin/litespeed-cache-admin-settings.class.php:257
492
  msgid "Site options saved."
493
  msgstr ""
494
 
495
- #: admin/litespeed-cache-admin-settings.class.php:357
496
- #: admin/litespeed-cache-admin-settings.class.php:1063
497
- msgid "Default Public Cache"
498
- msgstr ""
499
-
500
- #: admin/litespeed-cache-admin-settings.class.php:358
501
- msgid "Default Private Cache"
502
- msgstr ""
503
-
504
- #: admin/litespeed-cache-admin-settings.class.php:359
505
- msgid "Default Front Page"
506
- msgstr ""
507
-
508
- #: admin/litespeed-cache-admin-settings.class.php:360
509
- msgid "Feed"
510
- msgstr ""
511
-
512
- #: admin/litespeed-cache-admin-settings.class.php:901
513
- #: admin/tpl/setting/settings_debug.php:88
514
- msgid "Log File Size Limit"
515
- msgstr ""
516
-
517
- #: admin/litespeed-cache-admin-settings.class.php:986
518
- #: admin/tpl/setting/settings_crawler.php:13
519
- msgid "Delay"
520
- msgstr ""
521
-
522
- #: admin/litespeed-cache-admin-settings.class.php:987
523
- #: admin/tpl/setting/settings_crawler.php:37
524
- msgid "Run Duration"
525
- msgstr ""
526
-
527
- #: admin/litespeed-cache-admin-settings.class.php:988
528
- msgid "Cron Interval"
529
- msgstr ""
530
-
531
- #: admin/litespeed-cache-admin-settings.class.php:989
532
- msgid "Whole Interval"
533
- msgstr ""
534
-
535
- #: admin/litespeed-cache-admin-settings.class.php:990
536
- #: admin/tpl/setting/settings_crawler.php:73
537
- msgid "Threads"
538
- msgstr ""
539
-
540
  #: admin/litespeed-cache-admin.class.php:221
541
  msgid ""
542
  "If this is the case, the network admin may uncheck \"Check Advanced Cache\" "
@@ -911,7 +858,7 @@ msgstr ""
911
  msgid "Rate %s on %s"
912
  msgstr ""
913
 
914
- #. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.6.1) #-#-#-#-#
915
  #. Plugin Name of the plugin/theme
916
  #: admin/tpl/inc/admin_footer.php:6 inc/gui.class.php:353
917
  #: includes/litespeed-cache-gui.class.php:353
@@ -2237,6 +2184,10 @@ msgstr ""
2237
  msgid "Crawler Settings"
2238
  msgstr ""
2239
 
 
 
 
 
2240
  #: admin/tpl/setting/settings_crawler.php:16
2241
  msgid "microseconds"
2242
  msgstr ""
@@ -2250,6 +2201,10 @@ msgstr ""
2250
  msgid "Server allowed min value"
2251
  msgstr ""
2252
 
 
 
 
 
2253
  #: admin/tpl/setting/settings_crawler.php:42
2254
  msgid "Specify time in seconds for the duration of the crawl interval."
2255
  msgstr ""
@@ -2274,6 +2229,10 @@ msgid ""
2274
  "entire sitemap again."
2275
  msgstr ""
2276
 
 
 
 
 
2277
  #: admin/tpl/setting/settings_crawler.php:78
2278
  msgid "Specify Number of Threads to use while crawling."
2279
  msgstr ""
@@ -2443,6 +2402,10 @@ msgstr ""
2443
  msgid "Advanced level will log more details."
2444
  msgstr ""
2445
 
 
 
 
 
2446
  #: admin/tpl/setting/settings_debug.php:91
2447
  #: admin/tpl/setting/settings_tuning.php:88
2448
  msgid "MB"
2
  # This file is distributed under the same license as the LiteSpeed Cache package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: LiteSpeed Cache 2.6.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
+ "POT-Creation-Date: 2018-10-11 19:29:29+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
476
  msgid "File Saved."
477
  msgstr ""
478
 
479
+ #: admin/litespeed-cache-admin-settings.class.php:52
 
 
 
 
 
 
 
 
480
  msgid "'Use primary site settings' set by Network Administrator."
481
  msgstr ""
482
 
483
+ #: admin/litespeed-cache-admin-settings.class.php:242
484
  msgid "Site options saved."
485
  msgstr ""
486
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
487
  #: admin/litespeed-cache-admin.class.php:221
488
  msgid ""
489
  "If this is the case, the network admin may uncheck \"Check Advanced Cache\" "
858
  msgid "Rate %s on %s"
859
  msgstr ""
860
 
861
+ #. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.6.2) #-#-#-#-#
862
  #. Plugin Name of the plugin/theme
863
  #: admin/tpl/inc/admin_footer.php:6 inc/gui.class.php:353
864
  #: includes/litespeed-cache-gui.class.php:353
2184
  msgid "Crawler Settings"
2185
  msgstr ""
2186
 
2187
+ #: admin/tpl/setting/settings_crawler.php:13
2188
+ msgid "Delay"
2189
+ msgstr ""
2190
+
2191
  #: admin/tpl/setting/settings_crawler.php:16
2192
  msgid "microseconds"
2193
  msgstr ""
2201
  msgid "Server allowed min value"
2202
  msgstr ""
2203
 
2204
+ #: admin/tpl/setting/settings_crawler.php:37
2205
+ msgid "Run Duration"
2206
+ msgstr ""
2207
+
2208
  #: admin/tpl/setting/settings_crawler.php:42
2209
  msgid "Specify time in seconds for the duration of the crawl interval."
2210
  msgstr ""
2229
  "entire sitemap again."
2230
  msgstr ""
2231
 
2232
+ #: admin/tpl/setting/settings_crawler.php:73
2233
+ msgid "Threads"
2234
+ msgstr ""
2235
+
2236
  #: admin/tpl/setting/settings_crawler.php:78
2237
  msgid "Specify Number of Threads to use while crawling."
2238
  msgstr ""
2402
  msgid "Advanced level will log more details."
2403
  msgstr ""
2404
 
2405
+ #: admin/tpl/setting/settings_debug.php:88
2406
+ msgid "Log File Size Limit"
2407
+ msgstr ""
2408
+
2409
  #: admin/tpl/setting/settings_debug.php:91
2410
  #: admin/tpl/setting/settings_tuning.php:88
2411
  msgid "MB"
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.6.1
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.6.2
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: 4.9.8
6
- Stable tag: 2.6.1
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
@@ -275,6 +275,11 @@ Click on the `Advanced View` link at the top of the page, and several more tabs
275
 
276
  == Changelog ==
277
 
 
 
 
 
 
278
  = 2.6.1 - Oct 4 2018 =
279
  * 🌱 Ability to generate separate Critical CSS Cache for Post Types & URIs.
280
  * <strong>API</strong>: Filter `litespeed_frontend_htaccess` for frontend htaccess path.
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: 4.9.8
6
+ Stable tag: 2.6.2
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
275
 
276
  == Changelog ==
277
 
278
+ = 2.6.2 - Oct 11 2018 =
279
+ * <strong>Setting</strong>: Automatically correct invalid numeric values in configuration settings upon submit.
280
+ * 🐞<strong>Media</strong>: Fixed the issue where iframe lazy load was broken by latest Chrome release. (@ofmarconi)
281
+ * 🐞: Fixed an issue with Multisite where subsites failed to purge when only primary site has WooCommerce . (@kierancalv)
282
+
283
  = 2.6.1 - Oct 4 2018 =
284
  * 🌱 Ability to generate separate Critical CSS Cache for Post Types & URIs.
285
  * <strong>API</strong>: Filter `litespeed_frontend_htaccess` for frontend htaccess path.