LiteSpeed Cache - Version 2.9

Version Description

  • Dec 31 2018 =
  • Media: Lazy Load Image Classname Excludes. (@thinkmedia)
  • : New EU/AS cloud servers for faster image optimization handling.
  • : New EU/AS cloud servers for faster CCSS generation.
  • : New EU/AS cloud servers for faster responsive placeholder generation.
  • Conf: Ability to set single options via link.
  • Cache: Ability to add custom TTLs to Force Cache URIs.
  • Purge: Added post type to Purge tags.
  • Purge: Redefined CCSS page types.
  • Core: Using Exception for .htaccess R/W.
  • IAPI: New cloud servers added. Please whitelist the new IAPI IP List.
  • Optm: Trim BOM when detecting if the page is HTML.
  • GUI: Added PageSpeed Score comparison into promotion banner.
  • GUI: Refactored promotion banner logic.
  • GUI: Removed page optimized comment when ESI Silence is requested.
  • GUI: WHM transient changed to option instead of transient when storing.
  • GUI: Appending more descriptions to CDN filetype setting.
  • IAPI: Removed duplicate messages.
  • IAPI: Removed taken_failed/client_pull(duplicated) status.
  • Debug: Environment report no longer generates hash for validation.
  • 3rd: Non-cacheable pages no longer punch ESI holes for Divi compatibility.
  • Network: Added slashes for mobile rules when activating plugin.
  • CCSS: Eliminated a PHP notice when appending CCSS.
Download this release

Release Info

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

Code changes from version 2.8.1 to 2.9

Files changed (51) hide show
  1. admin/admin-api.class.php +142 -16
  2. admin/litespeed-cache-admin-display.class.php +27 -22
  3. admin/litespeed-cache-admin-report.class.php +1 -1
  4. admin/litespeed-cache-admin-rules.class.php +23 -27
  5. admin/litespeed-cache-admin-settings.class.php +4 -0
  6. admin/tpl/crawler.php +0 -1
  7. admin/tpl/edit_htaccess.php +10 -5
  8. admin/tpl/image_optimization.php +0 -1
  9. admin/tpl/inc/banner_promo.ajax.php +13 -0
  10. admin/tpl/inc/banner_promo.new_version.php +96 -0
  11. admin/tpl/inc/banner_promo.php +172 -18
  12. admin/tpl/inc/banner_promo.slack.php +21 -19
  13. admin/tpl/inc/img_optm.summary.php +4 -5
  14. admin/tpl/manage.php +0 -1
  15. admin/tpl/setting/settings_cdn.php +4 -0
  16. admin/tpl/setting/settings_esi.php +1 -1
  17. admin/tpl/setting/settings_excludes.php +2 -0
  18. admin/tpl/setting/settings_inc.cache_mobile.php +0 -2
  19. admin/tpl/setting/settings_media.php +12 -0
  20. admin/tpl/settings.php +0 -2
  21. css/litespeed.css +192 -32
  22. img/lscwp-logo_256x256.png +0 -0
  23. img/lscwp-logo_90x90.png +0 -0
  24. inc/activation.class.php +90 -3
  25. inc/config.class.php +75 -0
  26. inc/const.cls.php +2 -0
  27. inc/control.class.php +4 -1
  28. inc/css.cls.php +4 -50
  29. inc/esi.class.php +4 -0
  30. inc/gui.class.php +173 -59
  31. inc/img_optm.class.php +5 -21
  32. inc/litespeed-cache.class.php +57 -28
  33. inc/media.class.php +13 -13
  34. inc/optimizer.class.php +3 -1
  35. inc/router.class.php +10 -3
  36. inc/tag.class.php +2 -0
  37. inc/utility.class.php +216 -5
  38. includes/litespeed-cache-activation.class.php +90 -3
  39. includes/litespeed-cache-config.class.php +75 -0
  40. includes/litespeed-cache-control.class.php +4 -1
  41. includes/litespeed-cache-esi.class.php +4 -0
  42. includes/litespeed-cache-gui.class.php +173 -59
  43. includes/litespeed-cache-router.class.php +10 -3
  44. includes/litespeed-cache-tag.class.php +2 -0
  45. includes/litespeed-cache-utility.class.php +216 -5
  46. includes/litespeed-cache.class.php +57 -28
  47. js/litespeed-cache-admin.js +3 -7
  48. languages/litespeed-cache.pot +417 -359
  49. lib/litespeed/litespeed-file.class.php +5 -4
  50. litespeed-cache.php +1 -1
  51. readme.txt +38 -10
admin/admin-api.class.php CHANGED
@@ -17,8 +17,10 @@ class LiteSpeed_Cache_Admin_API
17
  private static $_instance ;
18
 
19
  private $_iapi_key ;
 
20
 
21
  const DB_API_KEY = 'litespeed_api_key' ;
 
22
  const DB_API_KEY_HASH = 'litespeed_api_key_hash' ;
23
 
24
  // For each request, send a callback to confirm
@@ -29,14 +31,16 @@ class LiteSpeed_Cache_Admin_API
29
  const TYPE_RESET_KEY = 'reset_key' ;
30
 
31
  const IAPI_ACTION_REQUEST_KEY = 'request_key' ;
 
32
  const IAPI_ACTION_MEDIA_SYNC_DATA = 'media_sync_data' ;
33
  const IAPI_ACTION_REQUEST_OPTIMIZE = 'request_optimize' ;
34
- const IAPI_ACTION_PULL_IMG = 'client_pull' ; // Deprecated
35
  const IAPI_ACTION_IMG_TAKEN = 'client_img_taken' ;
36
- const IAPI_ACTION_PULL_IMG_FAILED = 'client_pull_failed' ;
37
  const IAPI_ACTION_REQUEST_DESTROY = 'imgoptm_destroy' ;
38
  const IAPI_ACTION_REQUEST_DESTROY_UNFINISHED = 'imgoptm_destroy_unfinished' ;
39
  const IAPI_ACTION_ENV_REPORT = 'env_report' ;
 
 
 
40
 
41
  /**
42
  * Init
@@ -47,6 +51,7 @@ class LiteSpeed_Cache_Admin_API
47
  private function __construct()
48
  {
49
  $this->_iapi_key = get_option( self::DB_API_KEY ) ?: '' ;
 
50
  }
51
 
52
  /**
@@ -207,16 +212,44 @@ class LiteSpeed_Cache_Admin_API
207
  }
208
 
209
  /**
210
- * Post data to LiteSpeed image server
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
  *
212
  * @since 1.6
213
  * @access public
214
- * @param array $data
215
  */
216
- public static function post( $action, $data = false, $server = false, $no_hash = false )
217
  {
218
  $instance = self::get_instance() ;
219
 
 
 
 
 
 
 
 
 
220
  /**
221
  * All requests must have api_key first
222
  * @since 1.6.5
@@ -225,19 +258,23 @@ class LiteSpeed_Cache_Admin_API
225
  $instance->_request_key() ;
226
  }
227
 
228
- return $instance->_post( $action, $data, $server, $no_hash ) ;
229
  }
230
 
231
  /**
232
  * request key from LiteSpeed
233
  *
 
 
234
  * @since 1.5
235
  * @access private
236
  */
237
  private function _request_key()
238
  {
 
 
239
  // Send request to LiteSpeed
240
- $json = $this->_post( self::IAPI_ACTION_REQUEST_KEY, home_url() ) ;
241
 
242
  // Check if get key&server correctly
243
  if ( empty( $json[ 'auth_key' ] ) ) {
@@ -257,6 +294,52 @@ class LiteSpeed_Cache_Admin_API
257
  $this->_iapi_key = $json[ 'auth_key' ] ;
258
  }
259
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
260
  /**
261
  * delete key
262
  *
@@ -266,21 +349,60 @@ class LiteSpeed_Cache_Admin_API
266
  private function _reset_key()
267
  {
268
  delete_option( self::DB_API_KEY ) ;
269
- LiteSpeed_Cache_Log::debug( '[IAPI] delete auth_key' ) ;
 
270
 
271
  $msg = __( 'Reset IAPI key successfully.', 'litespeed-cache' ) ;
272
  LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
273
  }
274
 
275
  /**
276
- * Post data to LiteSpeed image server
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
  *
278
  * @since 1.6
279
  * @access private
280
- * @param array $data
281
  * @return string | array Must return an error msg string or json array
282
  */
283
- private function _post( $action, $data = false, $server = false, $no_hash = false )
284
  {
285
  $hash = 'no_hash' ;
286
  if ( ! $no_hash ) {
@@ -292,6 +414,9 @@ class LiteSpeed_Cache_Admin_API
292
  if ( $server == false ) {
293
  $server = 'https://wp.api.litespeedtech.com' ;
294
  }
 
 
 
295
 
296
  $url = $server . '/' . $action ;
297
 
@@ -299,6 +424,7 @@ class LiteSpeed_Cache_Admin_API
299
 
300
  $param = array(
301
  'auth_key' => $this->_iapi_key,
 
302
  'v' => LiteSpeed_Cache::PLUGIN_VERSION,
303
  'hash' => $hash,
304
  'data' => $data,
@@ -307,7 +433,7 @@ class LiteSpeed_Cache_Admin_API
307
  * Extended timeout to avoid cUrl 28 timeout issue as we need callback validation
308
  * @since 1.6.4
309
  */
310
- $response = wp_remote_post( $url, array( 'body' => $param, 'timeout' => 15 ) ) ;
311
 
312
  if ( is_wp_error( $response ) ) {
313
  $error_message = $response->get_error_message() ;
@@ -324,7 +450,7 @@ class LiteSpeed_Cache_Admin_API
324
  $msg = __( 'Failed to post via WordPress', 'litespeed-cache' ) . ': ' . $response[ 'body' ] ;
325
  LiteSpeed_Cache_Admin_Display::error( $msg ) ;
326
 
327
- return $response[ 'body' ] ;
328
  }
329
 
330
  if ( ! empty( $json[ '_err' ] ) ) {
@@ -332,7 +458,7 @@ class LiteSpeed_Cache_Admin_API
332
  $msg = __( 'Failed to communicate with LiteSpeed image server', 'litespeed-cache' ) . ': ' . $json[ '_err' ] ;
333
  $msg .= $this->_parse_link( $json ) ;
334
  LiteSpeed_Cache_Admin_Display::error( $msg ) ;
335
- return $json[ '_err' ] ;
336
  }
337
 
338
  if ( ! empty( $json[ '_503' ] ) ) {
@@ -342,7 +468,7 @@ class LiteSpeed_Cache_Admin_API
342
  $msg .= ' ' . $json[ '_503' ] ;
343
  LiteSpeed_Cache_Admin_Display::error( $msg ) ;
344
 
345
- return $json[ '_503' ] ;
346
  }
347
 
348
  if ( ! empty( $json[ '_info' ] ) ) {
@@ -379,7 +505,7 @@ class LiteSpeed_Cache_Admin_API
379
 
380
  $msg2 .= $this->_parse_link( $json ) ;
381
  LiteSpeed_Cache_Admin_Display::error( $msg . $msg2 ) ;
382
- return $msg ;
383
  }
384
 
385
  return $json ;
17
  private static $_instance ;
18
 
19
  private $_iapi_key ;
20
+ private $_iapi_cloud ;
21
 
22
  const DB_API_KEY = 'litespeed_api_key' ;
23
+ const DB_API_CLOUD = 'litespeed_api_cloud' ;
24
  const DB_API_KEY_HASH = 'litespeed_api_key_hash' ;
25
 
26
  // For each request, send a callback to confirm
31
  const TYPE_RESET_KEY = 'reset_key' ;
32
 
33
  const IAPI_ACTION_REQUEST_KEY = 'request_key' ;
34
+ const IAPI_ACTION_LIST_CLOUDS = 'list_clouds' ;
35
  const IAPI_ACTION_MEDIA_SYNC_DATA = 'media_sync_data' ;
36
  const IAPI_ACTION_REQUEST_OPTIMIZE = 'request_optimize' ;
 
37
  const IAPI_ACTION_IMG_TAKEN = 'client_img_taken' ;
 
38
  const IAPI_ACTION_REQUEST_DESTROY = 'imgoptm_destroy' ;
39
  const IAPI_ACTION_REQUEST_DESTROY_UNFINISHED = 'imgoptm_destroy_unfinished' ;
40
  const IAPI_ACTION_ENV_REPORT = 'env_report' ;
41
+ const IAPI_ACTION_PLACEHOLDER = 'placeholder' ;
42
+ const IAPI_ACTION_CCSS = 'ccss' ;
43
+ const IAPI_ACTION_PAGESCORE = 'pagescore' ;
44
 
45
  /**
46
  * Init
51
  private function __construct()
52
  {
53
  $this->_iapi_key = get_option( self::DB_API_KEY ) ?: '' ;
54
+ $this->_iapi_cloud = get_option( self::DB_API_CLOUD ) ?: '' ;
55
  }
56
 
57
  /**
212
  }
213
 
214
  /**
215
+ * Get data from LiteSpeed cloud server
216
+ *
217
+ * @since 2.9
218
+ * @access public
219
+ */
220
+ public static function get( $action, $data = array(), $server = false )
221
+ {
222
+ $instance = self::get_instance() ;
223
+
224
+ /**
225
+ * All requests must have closet cloud server too
226
+ * @since 2.9
227
+ */
228
+ if ( ! $instance->_iapi_cloud ) {
229
+ $instance->_detect_cloud() ;
230
+ }
231
+
232
+ return $instance->_get( $action, $data, $server ) ;
233
+ }
234
+
235
+ /**
236
+ * Post data to LiteSpeed cloud server
237
  *
238
  * @since 1.6
239
  * @access public
 
240
  */
241
+ public static function post( $action, $data = false, $server = false, $no_hash = false, $time_out = false )
242
  {
243
  $instance = self::get_instance() ;
244
 
245
+ /**
246
+ * All requests must have closet cloud server too
247
+ * @since 2.9
248
+ */
249
+ if ( ! $instance->_iapi_cloud ) {
250
+ $instance->_detect_cloud() ;
251
+ }
252
+
253
  /**
254
  * All requests must have api_key first
255
  * @since 1.6.5
258
  $instance->_request_key() ;
259
  }
260
 
261
+ return $instance->_post( $action, $data, $server, $no_hash, $time_out ) ;
262
  }
263
 
264
  /**
265
  * request key from LiteSpeed
266
  *
267
+ * This needs callback validation, so don't use for generic services which don't need security
268
+ *
269
  * @since 1.5
270
  * @access private
271
  */
272
  private function _request_key()
273
  {
274
+ LiteSpeed_Cache_Log::debug( '[IAPI] req auth_key' ) ;
275
+
276
  // Send request to LiteSpeed
277
+ $json = $this->_post( self::IAPI_ACTION_REQUEST_KEY, home_url(), true ) ;
278
 
279
  // Check if get key&server correctly
280
  if ( empty( $json[ 'auth_key' ] ) ) {
294
  $this->_iapi_key = $json[ 'auth_key' ] ;
295
  }
296
 
297
+ /**
298
+ * ping clouds from LiteSpeed
299
+ *
300
+ * @since 2.9
301
+ * @access private
302
+ */
303
+ private function _detect_cloud()
304
+ {
305
+ // Send request to LiteSpeed
306
+ $json = $this->_post( self::IAPI_ACTION_LIST_CLOUDS, home_url(), false, true ) ;
307
+
308
+ // Check if get list correctly
309
+ if ( empty( $json[ 'list' ] ) ) {
310
+ LiteSpeed_Cache_Log::debug( '[IAPI] request cloud list failed: ', $json ) ;
311
+
312
+ if ( $json ) {
313
+ $msg = sprintf( __( 'IAPI Error %s', 'litespeed-cache' ), $json ) ;
314
+ LiteSpeed_Cache_Admin_Display::error( $msg ) ;
315
+ }
316
+ return ;
317
+ }
318
+
319
+ // Ping closest cloud
320
+ $speed_list = array() ;
321
+ foreach ( $json[ 'list' ] as $v ) {
322
+ $speed_list[ $v ] = LiteSpeed_Cache_Utility::ping( $v ) ;
323
+ }
324
+ $min = min( $speed_list ) ;
325
+
326
+ if ( $min == 99999 ) {
327
+ LiteSpeed_Cache_Log::debug( '[IAPI] failed to ping all clouds' ) ;
328
+ return ;
329
+ }
330
+ $closest = array_search( $min, $speed_list ) ;
331
+
332
+ LiteSpeed_Cache_Log::debug( '[IAPI] Found closest cloud ' . $closest ) ;
333
+
334
+ // store data into option locally
335
+ update_option( self::DB_API_CLOUD, $closest ) ;
336
+
337
+ $this->_iapi_cloud = $closest ;
338
+
339
+ // sync API key
340
+ $this->_request_key() ;
341
+ }
342
+
343
  /**
344
  * delete key
345
  *
349
  private function _reset_key()
350
  {
351
  delete_option( self::DB_API_KEY ) ;
352
+ delete_option( self::DB_API_CLOUD ) ;
353
+ LiteSpeed_Cache_Log::debug( '[IAPI] delete auth_key & closest cloud' ) ;
354
 
355
  $msg = __( 'Reset IAPI key successfully.', 'litespeed-cache' ) ;
356
  LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
357
  }
358
 
359
  /**
360
+ * Get data from LiteSpeed cloud server
361
+ *
362
+ * @since 2.9
363
+ * @access private
364
+ */
365
+ private function _get( $action, $data = false, $server = false )
366
+ {
367
+
368
+ if ( $server == false ) {
369
+ $server = 'https://wp.api.litespeedtech.com' ;
370
+ }
371
+ elseif ( $server === true ) {
372
+ $server = $this->_iapi_cloud ;
373
+ }
374
+
375
+ $url = $server . '/' . $action ;
376
+
377
+ if ( $data ) {
378
+ $url .= '?' . http_build_query( $data ) ;
379
+ }
380
+
381
+ LiteSpeed_Cache_Log::debug( '[IAPI] getting from : ' . $url ) ;
382
+
383
+ $response = wp_remote_get( $url, array( 'timeout' => 15 ) ) ;
384
+
385
+ // Parse response data
386
+ if ( is_wp_error( $response ) ) {
387
+ $error_message = $response->get_error_message() ;
388
+ LiteSpeed_Cache_Log::debug( '[IAPI] failed to get: ' . $error_message ) ;
389
+ return false ;
390
+ }
391
+
392
+ $data = $response[ 'body' ] ;
393
+
394
+ return $data ;
395
+
396
+ }
397
+
398
+ /**
399
+ * Post data to LiteSpeed cloud server
400
  *
401
  * @since 1.6
402
  * @access private
 
403
  * @return string | array Must return an error msg string or json array
404
  */
405
+ private function _post( $action, $data = false, $server = false, $no_hash = false, $time_out = false )
406
  {
407
  $hash = 'no_hash' ;
408
  if ( ! $no_hash ) {
414
  if ( $server == false ) {
415
  $server = 'https://wp.api.litespeedtech.com' ;
416
  }
417
+ elseif ( $server === true ) {
418
+ $server = $this->_iapi_cloud ;
419
+ }
420
 
421
  $url = $server . '/' . $action ;
422
 
424
 
425
  $param = array(
426
  'auth_key' => $this->_iapi_key,
427
+ 'cloud' => $this->_iapi_cloud,
428
  'v' => LiteSpeed_Cache::PLUGIN_VERSION,
429
  'hash' => $hash,
430
  'data' => $data,
433
  * Extended timeout to avoid cUrl 28 timeout issue as we need callback validation
434
  * @since 1.6.4
435
  */
436
+ $response = wp_remote_post( $url, array( 'body' => $param, 'timeout' => $time_out ?: 15 ) ) ;
437
 
438
  if ( is_wp_error( $response ) ) {
439
  $error_message = $response->get_error_message() ;
450
  $msg = __( 'Failed to post via WordPress', 'litespeed-cache' ) . ': ' . $response[ 'body' ] ;
451
  LiteSpeed_Cache_Admin_Display::error( $msg ) ;
452
 
453
+ return false ;
454
  }
455
 
456
  if ( ! empty( $json[ '_err' ] ) ) {
458
  $msg = __( 'Failed to communicate with LiteSpeed image server', 'litespeed-cache' ) . ': ' . $json[ '_err' ] ;
459
  $msg .= $this->_parse_link( $json ) ;
460
  LiteSpeed_Cache_Admin_Display::error( $msg ) ;
461
+ return false ;
462
  }
463
 
464
  if ( ! empty( $json[ '_503' ] ) ) {
468
  $msg .= ' ' . $json[ '_503' ] ;
469
  LiteSpeed_Cache_Admin_Display::error( $msg ) ;
470
 
471
+ return false ;
472
  }
473
 
474
  if ( ! empty( $json[ '_info' ] ) ) {
505
 
506
  $msg2 .= $this->_parse_link( $json ) ;
507
  LiteSpeed_Cache_Admin_Display::error( $msg . $msg2 ) ;
508
+ return false ;
509
  }
510
 
511
  return $json ;
admin/litespeed-cache-admin-display.class.php CHANGED
@@ -21,7 +21,7 @@ class LiteSpeed_Cache_Admin_Display
21
  const NOTICE_GREEN = 'notice notice-success' ;
22
  const NOTICE_RED = 'notice notice-error' ;
23
  const NOTICE_YELLOW = 'notice notice-warning' ;
24
- const TRANSIENT_LITESPEED_MESSAGE = 'litespeed_messages' ;
25
 
26
  const PURGEBY_CAT = '0' ;
27
  const PURGEBY_PID = '1' ;
@@ -71,7 +71,8 @@ class LiteSpeed_Cache_Admin_Display
71
  if ( current_user_can($manage) ) {
72
  add_action( 'wp_before_admin_bar_render', array( LiteSpeed_Cache_GUI::get_instance(), 'backend_shortcut' ) ) ;
73
 
74
- add_action('admin_enqueue_scripts', array($this, 'check_messages')) ;// We can do this bcos admin_notices hook is after admin_enqueue_scripts hook in wp-admin/admin-header.php
 
75
  }
76
 
77
  /**
@@ -220,8 +221,9 @@ class LiteSpeed_Cache_Admin_Display
220
  $localize_data[ 'ajax_url_dismiss_ruleconflict' ] = $ajax_url ;
221
  }
222
 
223
- if ( LiteSpeed_Cache_GUI::has_promo_msg() || LiteSpeed_Cache_GUI::has_promo_msg( 'slack' ) ) {
224
- $ajax_url_promo = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_DISMISS, LiteSpeed_Cache_GUI::TYPE_DISMISS_PROMO, true ) ;
 
225
  $localize_data[ 'ajax_url_promo' ] = $ajax_url_promo ;
226
  }
227
 
@@ -469,10 +471,20 @@ class LiteSpeed_Cache_Admin_Display
469
  {
470
  // Bypass adding for CLI or cron
471
  if ( defined( 'LITESPEED_CLI' ) || defined( 'DOING_CRON' ) ) {
 
 
 
 
 
 
 
 
 
 
472
  return ;
473
  }
474
 
475
- $messages = (array)get_transient(self::TRANSIENT_LITESPEED_MESSAGE) ;
476
  if( ! $messages ) {
477
  $messages = array() ;
478
  }
@@ -484,7 +496,7 @@ class LiteSpeed_Cache_Admin_Display
484
  else {
485
  $messages[] = self::build_notice($color, $msg) ;
486
  }
487
- set_transient(self::TRANSIENT_LITESPEED_MESSAGE, $messages, 86400) ;
488
  }
489
 
490
  /**
@@ -495,7 +507,8 @@ class LiteSpeed_Cache_Admin_Display
495
  */
496
  public function display_messages()
497
  {
498
- $messages = get_transient(self::TRANSIENT_LITESPEED_MESSAGE) ;
 
499
  if( is_array($messages) ) {
500
  $messages = array_unique($messages) ;
501
 
@@ -509,22 +522,14 @@ class LiteSpeed_Cache_Admin_Display
509
  echo $msg ;
510
  }
511
  }
512
- delete_transient(self::TRANSIENT_LITESPEED_MESSAGE) ;
513
- }
 
 
 
 
 
514
 
515
- /**
516
- * Check if has new messages
517
- *
518
- * @since 1.1.0
519
- * @access public
520
- */
521
- public function check_messages()
522
- {
523
- $messages = get_transient(self::TRANSIENT_LITESPEED_MESSAGE) ;
524
- if( ! $messages ) {
525
- return ;
526
- }
527
- add_action(is_network_admin() ? 'network_admin_notices' : 'admin_notices', array($this, 'display_messages')) ;
528
  }
529
 
530
  /**
21
  const NOTICE_GREEN = 'notice notice-success' ;
22
  const NOTICE_RED = 'notice notice-error' ;
23
  const NOTICE_YELLOW = 'notice notice-warning' ;
24
+ const LITESPEED_MSG = 'litespeed_messages' ;
25
 
26
  const PURGEBY_CAT = '0' ;
27
  const PURGEBY_PID = '1' ;
71
  if ( current_user_can($manage) ) {
72
  add_action( 'wp_before_admin_bar_render', array( LiteSpeed_Cache_GUI::get_instance(), 'backend_shortcut' ) ) ;
73
 
74
+ // add_action('admin_enqueue_scripts', array($this, 'check_messages')) ;// We can do this bcos admin_notices hook is after admin_enqueue_scripts hook in wp-admin/admin-header.php
75
+ add_action( is_network_admin() ? 'network_admin_notices' : 'admin_notices', array( $this, 'display_messages' ) ) ;
76
  }
77
 
78
  /**
221
  $localize_data[ 'ajax_url_dismiss_ruleconflict' ] = $ajax_url ;
222
  }
223
 
224
+ $promo_tag = LiteSpeed_Cache_GUI::get_instance()->show_promo( true ) ;
225
+ if ( $promo_tag ) {
226
+ $ajax_url_promo = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_DISMISS, LiteSpeed_Cache_GUI::TYPE_DISMISS_PROMO, true, null, array( 'promo_tag' => $promo_tag ) ) ;
227
  $localize_data[ 'ajax_url_promo' ] = $ajax_url_promo ;
228
  }
229
 
471
  {
472
  // Bypass adding for CLI or cron
473
  if ( defined( 'LITESPEED_CLI' ) || defined( 'DOING_CRON' ) ) {
474
+ // WP CLI will show the info directly
475
+ if ( defined( 'WP_CLI' ) && WP_CLI ) {
476
+ $msg = strip_tags( $msg ) ;
477
+ if ( $color == self::NOTICE_RED ) {
478
+ WP_CLI::error( $msg ) ;
479
+ }
480
+ else {
481
+ WP_CLI::success( $msg ) ;
482
+ }
483
+ }
484
  return ;
485
  }
486
 
487
+ $messages = (array)get_option( self::LITESPEED_MSG ) ;
488
  if( ! $messages ) {
489
  $messages = array() ;
490
  }
496
  else {
497
  $messages[] = self::build_notice($color, $msg) ;
498
  }
499
+ update_option( self::LITESPEED_MSG, $messages ) ;
500
  }
501
 
502
  /**
507
  */
508
  public function display_messages()
509
  {
510
+ // One time msg
511
+ $messages = get_option( self::LITESPEED_MSG ) ;
512
  if( is_array($messages) ) {
513
  $messages = array_unique($messages) ;
514
 
522
  echo $msg ;
523
  }
524
  }
525
+ delete_option( self::LITESPEED_MSG ) ;
526
+
527
+ /**
528
+ * Check promo msg first
529
+ * @since 2.9
530
+ */
531
+ LiteSpeed_Cache_GUI::get_instance()->show_promo() ;
532
 
 
 
 
 
 
 
 
 
 
 
 
 
 
533
  }
534
 
535
  /**
admin/litespeed-cache-admin-report.class.php CHANGED
@@ -57,7 +57,7 @@ class LiteSpeed_Cache_Admin_Report
57
  'env' => $report_con,
58
  ) ;
59
 
60
- $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_ENV_REPORT, LiteSpeed_Cache_Utility::arr2str( $data ) ) ;
61
 
62
  if ( ! is_array( $json ) ) {
63
  LiteSpeed_Cache_Log::debug( 'Env: Failed to post to LiteSpeed server ', $json ) ;
57
  'env' => $report_con,
58
  ) ;
59
 
60
+ $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_ENV_REPORT, LiteSpeed_Cache_Utility::arr2str( $data ), false, true ) ;
61
 
62
  if ( ! is_array( $json ) ) {
63
  LiteSpeed_Cache_Log::debug( 'Env: Failed to post to LiteSpeed server ', $json ) ;
admin/litespeed-cache-admin-rules.class.php CHANGED
@@ -249,6 +249,7 @@ class LiteSpeed_Cache_Admin_Rules
249
  * Only when need to add error msg, this function is used, otherwise use file_get_contents directly
250
  *
251
  * @since 1.0.4
 
252
  * @access public
253
  * @param string $path The path to get the content from.
254
  * @return boolean True if succeeded, false otherwise.
@@ -261,14 +262,12 @@ class LiteSpeed_Cache_Admin_Rules
261
  return "\n" ;
262
  }
263
  if ( ! self::readable($kind) || ! self::writable($kind) ) {
264
- LiteSpeed_Cache_Admin_Display::add_error(LiteSpeed_Cache_Admin_Error::E_HTA_RW) ;
265
- return false ;
266
  }
267
 
268
  $content = file_get_contents($path) ;
269
  if ( $content === false ) {
270
- LiteSpeed_Cache_Admin_Display::add_error(LiteSpeed_Cache_Admin_Error::E_HTA_GET) ;
271
- return false ;
272
  }
273
 
274
  // Remove ^M characters.
@@ -298,29 +297,23 @@ class LiteSpeed_Cache_Admin_Rules
298
  $path = $this->htaccess_path($kind) ;
299
 
300
  if ( ! self::readable($kind) ) {
301
- LiteSpeed_Cache_Admin_Display::add_error(LiteSpeed_Cache_Admin_Error::E_HTA_R) ;
302
- return false ;
303
  }
304
 
305
  if ( ! self::writable($kind) ) {
306
- LiteSpeed_Cache_Admin_Display::add_error(LiteSpeed_Cache_Admin_Error::E_HTA_W) ;
307
- return false ;
308
  }
309
 
310
  //failed to backup, not good.
311
  if ( $backup && $this->htaccess_backup($kind) === false ) {
312
- LiteSpeed_Cache_Admin_Display::add_error(LiteSpeed_Cache_Admin_Error::E_HTA_BU) ;
313
- return false ;
314
  }
315
 
316
  // File put contents will truncate by default. Will create file if doesn't exist.
317
  $ret = file_put_contents($path, $content, LOCK_EX) ;
318
  if ( $ret === false ) {
319
- LiteSpeed_Cache_Admin_Display::add_error(LiteSpeed_Cache_Admin_Error::E_HTA_SAVE) ;
320
- return false ;
321
  }
322
-
323
- return true ;
324
  }
325
 
326
  /**
@@ -438,13 +431,13 @@ class LiteSpeed_Cache_Admin_Rules
438
  if( substr($rule, 0, strlen('RewriteRule .? - [E=')) !== 'RewriteRule .? - [E=' ) {//todo: use regex
439
  return false ;
440
  }
441
-
442
  $rule_cookie = substr( $rule, strlen( 'RewriteRule .? - [E=' ), -1 ) ;
443
 
444
  if ( LITESPEED_SERVER_TYPE === 'LITESPEED_SERVER_OLS' ) {
445
  return trim( $rule_cookie, '"' ) ;
446
  }
447
-
448
  return $rule_cookie ;
449
  }
450
 
@@ -1016,23 +1009,26 @@ class LiteSpeed_Cache_Admin_Rules
1016
  * Only admin can do this
1017
  *
1018
  * @since 1.0.4
 
1019
  * @access public
1020
  */
1021
  public function htaccess_editor_save()
1022
  {
1023
- if ( isset($_POST[self::EDITOR_TEXTAREA_NAME]) ) {
1024
- $content = LiteSpeed_Cache_Admin::cleanup_text($_POST[self::EDITOR_TEXTAREA_NAME]) ;
1025
- $msg = $this->htaccess_save($content) ;
1026
- if ( $msg === true ) {
1027
- $msg = __('File Saved.', 'litespeed-cache') ;
1028
- $color = LiteSpeed_Cache_Admin_Display::NOTICE_GREEN ;
1029
- }
1030
- else {
1031
- $color = LiteSpeed_Cache_Admin_Display::NOTICE_RED ;
1032
- }
1033
- LiteSpeed_Cache_Admin_Display::add_notice($color, $msg) ;
1034
  }
1035
 
 
 
1036
  }
1037
 
1038
  /**
249
  * Only when need to add error msg, this function is used, otherwise use file_get_contents directly
250
  *
251
  * @since 1.0.4
252
+ * @since 2.9 Used exception for failed reading
253
  * @access public
254
  * @param string $path The path to get the content from.
255
  * @return boolean True if succeeded, false otherwise.
262
  return "\n" ;
263
  }
264
  if ( ! self::readable($kind) || ! self::writable($kind) ) {
265
+ throw new Exception( LiteSpeed_Cache_Admin_Display::get_error( LiteSpeed_Cache_Admin_Error::E_HTA_RW ) ) ;
 
266
  }
267
 
268
  $content = file_get_contents($path) ;
269
  if ( $content === false ) {
270
+ throw new Exception( LiteSpeed_Cache_Admin_Display::get_error( LiteSpeed_Cache_Admin_Error::E_HTA_GET ) ) ;
 
271
  }
272
 
273
  // Remove ^M characters.
297
  $path = $this->htaccess_path($kind) ;
298
 
299
  if ( ! self::readable($kind) ) {
300
+ throw new Exception( LiteSpeed_Cache_Admin_Display::get_error( LiteSpeed_Cache_Admin_Error::E_HTA_R ) ) ;
 
301
  }
302
 
303
  if ( ! self::writable($kind) ) {
304
+ throw new Exception( LiteSpeed_Cache_Admin_Display::get_error( LiteSpeed_Cache_Admin_Error::E_HTA_W ) ) ;
 
305
  }
306
 
307
  //failed to backup, not good.
308
  if ( $backup && $this->htaccess_backup($kind) === false ) {
309
+ throw new Exception( LiteSpeed_Cache_Admin_Display::get_error( LiteSpeed_Cache_Admin_Error::E_HTA_BU ) ) ;
 
310
  }
311
 
312
  // File put contents will truncate by default. Will create file if doesn't exist.
313
  $ret = file_put_contents($path, $content, LOCK_EX) ;
314
  if ( $ret === false ) {
315
+ throw new Exception( LiteSpeed_Cache_Admin_Display::get_error( LiteSpeed_Cache_Admin_Error::E_HTA_SAVE ) ) ;
 
316
  }
 
 
317
  }
318
 
319
  /**
431
  if( substr($rule, 0, strlen('RewriteRule .? - [E=')) !== 'RewriteRule .? - [E=' ) {//todo: use regex
432
  return false ;
433
  }
434
+
435
  $rule_cookie = substr( $rule, strlen( 'RewriteRule .? - [E=' ), -1 ) ;
436
 
437
  if ( LITESPEED_SERVER_TYPE === 'LITESPEED_SERVER_OLS' ) {
438
  return trim( $rule_cookie, '"' ) ;
439
  }
440
+
441
  return $rule_cookie ;
442
  }
443
 
1009
  * Only admin can do this
1010
  *
1011
  * @since 1.0.4
1012
+ * @since 2.9 Used exception when saving
1013
  * @access public
1014
  */
1015
  public function htaccess_editor_save()
1016
  {
1017
+ if ( ! isset( $_POST[ self::EDITOR_TEXTAREA_NAME ] ) ) {
1018
+ return ;
1019
+ }
1020
+
1021
+ $content = LiteSpeed_Cache_Admin::cleanup_text($_POST[self::EDITOR_TEXTAREA_NAME]) ;
1022
+
1023
+ try {
1024
+ $this->htaccess_save($content) ;
1025
+ } catch( \Exception $e ) {
1026
+ LiteSpeed_Cache_Admin_Display::error( $e->getMessage() ) ;
1027
+ return ;
1028
  }
1029
 
1030
+ LiteSpeed_Cache_Admin_Display::succeed( __( 'File Saved.', 'litespeed-cache' ) ) ;
1031
+
1032
  }
1033
 
1034
  /**
admin/litespeed-cache-admin-settings.class.php CHANGED
@@ -757,6 +757,10 @@ class LiteSpeed_Cache_Admin_Settings
757
  $id = LiteSpeed_Cache_Config::ITEM_MEDIA_LAZY_IMG_EXC ;
758
  $this->_save_item( $id, 'uri' ) ;
759
 
 
 
 
 
760
  $id = LiteSpeed_Cache_Config::ITEM_MEDIA_WEBP_ATTRIBUTE ;
761
  $this->_save_item( $id ) ;
762
  }
757
  $id = LiteSpeed_Cache_Config::ITEM_MEDIA_LAZY_IMG_EXC ;
758
  $this->_save_item( $id, 'uri' ) ;
759
 
760
+ // Update lazyload image classname excludes
761
+ $id = LiteSpeed_Cache_Config::ITEM_MEDIA_LAZY_IMG_CLS_EXC ;
762
+ $this->_save_item( $id ) ;
763
+
764
  $id = LiteSpeed_Cache_Config::ITEM_MEDIA_WEBP_ATTRIBUTE ;
765
  $this->_save_item( $id ) ;
766
  }
admin/tpl/crawler.php CHANGED
@@ -18,7 +18,6 @@ $is_running = time() - $meta[ 'is_running' ] <= $_options[LiteSpeed_Cache_Config
18
 
19
  $disabled = LiteSpeed_Cache_Router::can_crawl() ? '' : 'disabled' ;
20
 
21
- LiteSpeed_Cache_GUI::show_promo() ;
22
  ?>
23
 
24
  <div class="wrap">
18
 
19
  $disabled = LiteSpeed_Cache_Router::can_crawl() ? '' : 'disabled' ;
20
 
 
21
  ?>
22
 
23
  <div class="wrap">
admin/tpl/edit_htaccess.php CHANGED
@@ -2,7 +2,15 @@
2
  if (!defined('WPINC')) die;
3
 
4
  $readonly = LiteSpeed_Cache_Admin_Rules::writable() ? '' : 'readonly';
5
- $content = LiteSpeed_Cache_Admin_Rules::get_instance()->htaccess_read();
 
 
 
 
 
 
 
 
6
  $htaccess_path = LiteSpeed_Cache_Admin_Rules::get_frontend_htaccess() ;
7
 
8
  // Check if there is `ExpiresDefault` in .htaccess
@@ -48,10 +56,7 @@ if ( defined( 'LITESPEED_ON' ) ) {
48
  <?php if (defined('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT): ?>
49
  <div class="litespeed-h3"><?php echo __('File editing is disabled in configuration.', 'litespeed-cache'); ?></div>
50
 
51
- <?php elseif($content === false): ?>
52
- <div class="litespeed-h3"><?php $this->display_messages(); ?></div>
53
-
54
- <?php else: ?>
55
 
56
  <form method="post" action="admin.php?page=<?php echo LiteSpeed_Cache::PAGE_EDIT_HTACCESS; ?>">
57
  <?php $this->form_action(LiteSpeed_Cache::ACTION_SAVE_HTACCESS); ?>
2
  if (!defined('WPINC')) die;
3
 
4
  $readonly = LiteSpeed_Cache_Admin_Rules::writable() ? '' : 'readonly';
5
+
6
+ $content = null ;
7
+ try {
8
+ $content = LiteSpeed_Cache_Admin_Rules::get_instance()->htaccess_read();
9
+ } catch( \Exception $e ) {
10
+ echo '<div class="notice notice-error is-dismissible"><p>'. $e->getMessage() . '</p></div>' ;
11
+ }
12
+
13
+
14
  $htaccess_path = LiteSpeed_Cache_Admin_Rules::get_frontend_htaccess() ;
15
 
16
  // Check if there is `ExpiresDefault` in .htaccess
56
  <?php if (defined('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT): ?>
57
  <div class="litespeed-h3"><?php echo __('File editing is disabled in configuration.', 'litespeed-cache'); ?></div>
58
 
59
+ <?php elseif( $content !== null ) : ?>
 
 
 
60
 
61
  <form method="post" action="admin.php?page=<?php echo LiteSpeed_Cache::PAGE_EDIT_HTACCESS; ?>">
62
  <?php $this->form_action(LiteSpeed_Cache::ACTION_SAVE_HTACCESS); ?>
admin/tpl/image_optimization.php CHANGED
@@ -19,7 +19,6 @@ else {
19
  $finished_percentage = 0 ;
20
  }
21
 
22
- LiteSpeed_Cache_GUI::show_promo() ;
23
  ?>
24
 
25
  <div class="wrap">
19
  $finished_percentage = 0 ;
20
  }
21
 
 
22
  ?>
23
 
24
  <div class="wrap">
admin/tpl/inc/banner_promo.ajax.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'WPINC' ) ) die ;
3
+
4
+ $url = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_UTIL, LiteSpeed_Cache_Utility::TYPE_SCORE_CHK, true ) ;
5
+ $url = htmlspecialchars_decode( $url ) ;
6
+ ?>
7
+ <script type='text/javascript'>
8
+ document.addEventListener( 'DOMContentLoaded', function( event ) {
9
+ jQuery(document).ready( function() {
10
+ jQuery.get( '<?php echo $url ?>' ) ;
11
+ } ) ;
12
+ } ) ;
13
+ </script>
admin/tpl/inc/banner_promo.new_version.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'WPINC' ) ) die ;
3
+
4
+ /**
5
+ * NOTE: Only show for single site
6
+ */
7
+ if ( is_multisite() ) {
8
+ return ;
9
+ }
10
+
11
+ if ( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPT_AUTO_UPGRADE ) ) {
12
+ return ;
13
+ }
14
+
15
+ $current = get_site_transient( 'update_plugins' ) ;
16
+ if ( ! isset( $current->response[ LiteSpeed_Cache::PLUGIN_FILE ] ) ) {
17
+ return ;
18
+ }
19
+
20
+ $last_check = empty( $_summary[ 'new_version.last_check' ] ) ? 0 : $_summary[ 'new_version.last_check' ] ;
21
+ // Check once in a half day
22
+ if ( time() - $last_check > 43200 ) {
23
+ $_summary[ 'new_version.last_check' ] = time() ;
24
+ $this->save_summary( $_summary ) ;
25
+
26
+ // Detect version
27
+ $auto_v = LiteSpeed_Cache_Utility::version_check() ;
28
+ $_summary[ 'new_version.v' ] = $auto_v ;
29
+ $this->save_summary( $_summary ) ;
30
+ // After detect, don't show, just return and show next time
31
+ return ;
32
+ }
33
+
34
+ if ( ! isset( $_summary[ 'new_version.v' ] ) ) {
35
+ return ;
36
+ }
37
+
38
+ // Check if current version is newer than auto_v or not
39
+ if ( LiteSpeed_Cache_API::v( $_summary[ 'new_version.v' ] ) ) {
40
+ return ;
41
+ }
42
+
43
+ //********** Can show now **********//
44
+
45
+ $this->_promo_true = true ;
46
+
47
+ if ( $check_only ) {
48
+ return ;
49
+ }
50
+
51
+ ?>
52
+ <div class="litespeed-wrap notice notice-success litespeed-banner-promo-full">
53
+ <div class="litespeed-banner-promo-logo"></div>
54
+
55
+ <div class="litespeed-banner-promo-content">
56
+ <h3 class="litespeed-banner-title litespeed-top15"><?php echo __( 'New Version Available!', 'litespeed-cache' ) ; ?></h3>
57
+ <div class="litespeed-banner-description">
58
+ <div class="litespeed-banner-description-padding-right-15">
59
+ <p class="litespeed-banner-desciption-content">
60
+ <?php echo sprintf( __( 'New release %s is available now.', 'litespeed-cache' ), 'v' . $_summary[ 'new_version.v' ] ) ; ?>
61
+ </p>
62
+ </div>
63
+ <div class="litespeed-row-flex litespeed-banner-description">
64
+ <div class="litespeed-banner-description-padding-right-15">
65
+ <?php $url = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_ACTIVATION, LiteSpeed_Cache_Activation::TYPE_UPGRADE ) ; ?>
66
+ <a href="<?php echo $url ; ?>" class="litespeed-btn-success litespeed-btn-mini">
67
+ <i class="dashicons dashicons-image-rotate">&nbsp;</i>
68
+ <?php echo __( 'Upgrade', 'litespeed-cache' ) ; ?>
69
+ </a>
70
+ </div>
71
+ <div class="litespeed-banner-description-padding-right-15">
72
+ <?php
73
+ $cfg = array( LiteSpeed_Cache_Config::TYPE_SET . '[' . LiteSpeed_Cache_Config::OPT_AUTO_UPGRADE . ']' => 1 ) ;
74
+ $url = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_CFG, LiteSpeed_Cache_Config::TYPE_SET, false, null, $cfg ) ;
75
+ ?>
76
+ <a href="<?php echo $url ; ?>" class="litespeed-btn-primary litespeed-btn-mini">
77
+ <i class="dashicons dashicons-update">&nbsp;</i>
78
+ <?php echo __( 'Turn On Auto Upgrade', 'litespeed-cache' ) ; ?>
79
+ </a>
80
+ </div>
81
+ <div class="litespeed-banner-description-padding-right-15">
82
+ <?php $url = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_DISMISS, LiteSpeed_Cache_GUI::TYPE_DISMISS_PROMO, false, null, array( 'promo_tag' => 'banner_promo.new_version' ) ) ; ?>
83
+ <a href="<?php echo $url ; ?>" class="litespeed-btn-warning litespeed-btn-mini">
84
+ <?php echo __( 'Maybe Later', 'litespeed-cache' ) ; ?>
85
+ </a>
86
+ </div>
87
+ </div>
88
+ </div>
89
+ </div>
90
+
91
+ <div>
92
+ <?php $dismiss_url = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_DISMISS, LiteSpeed_Cache_GUI::TYPE_DISMISS_PROMO, false, null, array( 'promo_tag' => 'banner_promo.new_version', 'later' => 1 ) ) ; ?>
93
+ <span class="screen-reader-text">Dismiss this notice.</span>
94
+ <a href="<?php echo $dismiss_url ; ?>" class="litespeed-notice-dismiss">X</a>
95
+ </div>
96
+ </div>
admin/tpl/inc/banner_promo.php CHANGED
@@ -1,33 +1,187 @@
1
  <?php
2
  if ( ! defined( 'WPINC' ) ) die ;
3
 
4
- if ( ! LiteSpeed_Cache_GUI::should_show_promo() ) {
 
 
 
 
 
5
  return ;
6
  }
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  ?>
9
- <div class="litespeed-wrap notice notice-info litespeed-banner-promo">
10
  <div class="litespeed-banner-promo-logo"></div>
11
 
12
  <div class="litespeed-banner-promo-content">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
- <h2><?php echo __( 'Welcome to LiteSpeed', 'litespeed-cache' ) ; ?></h2>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
- <p>
17
- <?php echo __( 'Thank you for using LiteSpeed.', 'litespeed-cache' ) ; ?>
18
- <?php echo sprintf(
19
- __( 'If you have any questions, please do not hesitate to let us know in <a %s>our support forum</a> or by <a %s>submitting a ticket with us</a>.', 'litespeed-cache' ),
20
- 'href="https://wordpress.org/support/plugin/litespeed-cache" target="_blank"',
21
- 'href="https://www.litespeedtech.com/support" target="_blank"'
22
- ) ; ?>
23
- </p>
24
 
25
- <p>
26
- <?php echo __( 'This plugin is created with love by LiteSpeed. Your rating is the simplest way to support us. We really appreciate it!', 'litespeed-cache' ) ; ?>
27
- </p>
28
 
29
- <a class="litespeed-btn-success litespeed-btn-xs" href="https://wordpress.org/support/plugin/litespeed-cache/reviews/?filter=5#new-post" target="_blank"><?php echo __( 'Sure I\'d love to!', 'litespeed-cache' ) ; ?></a>
30
- <button type="button" class="litespeed-btn-primary litespeed-btn-xs" id="litespeed-promo-done"><?php echo __( 'I\'ve already left a review', 'litespeed-cache' ) ; ?></button>
31
- <button type="button" class="litespeed-btn-warning litespeed-btn-xs" id="litespeed-promo-later"><?php echo __( 'Maybe later', 'litespeed-cache' ) ; ?></button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  </div>
33
- </div>
 
1
  <?php
2
  if ( ! defined( 'WPINC' ) ) die ;
3
 
4
+ $last_check = empty( $_summary[ 'score.last_check' ] ) ? 0 : $_summary[ 'score.last_check' ] ;
5
+ // Check once per 10 days
6
+ if ( time() - $last_check > 864000 ) {
7
+ // Generate the ajax code to check score in separate request
8
+ $this->_enqueue_score_req_ajax() ;
9
+ // After detect, don't show, just return and show next time
10
  return ;
11
  }
12
 
13
+ if ( ! isset( $_summary[ 'score.data' ] ) ) {
14
+ return ;
15
+ }
16
+
17
+ $_score = $_summary[ 'score.data' ] ;
18
+
19
+ if ( empty( $_score[ 'speed_before_cache' ] ) || empty( $_score[ 'speed_after_cache' ] ) || empty( $_score[ 'score_before_optm' ] ) || empty( $_score[ 'score_after_optm' ] ) ) {
20
+ return ;
21
+ }
22
+
23
+ // If speed is not reduced half or score is larger
24
+ if ( $_score[ 'speed_before_cache' ] < $_score[ 'speed_after_cache' ] * 2 || $_score[ 'score_before_optm' ] > $_score[ 'score_after_optm' ] ) {
25
+ return ;
26
+ }
27
+
28
+ //********** Can show now **********//
29
+ $this->_promo_true = true ;
30
+
31
+ if ( $check_only ) {
32
+ return ;
33
+ }
34
+
35
+ // Format loading time
36
+ $speed_before_cache = $_score[ 'speed_before_cache' ] / 1000 ;
37
+ if ( $speed_before_cache < 0.01 ) {
38
+ $speed_before_cache = 0.01 ;
39
+ }
40
+ $speed_before_cache = number_format( $speed_before_cache, 2 ) ;
41
+
42
+ $speed_after_cache = $_score[ 'speed_after_cache' ] / 1000 ;
43
+ if ( $speed_after_cache < 0.01 ) {
44
+ $speed_after_cache = number_format( $speed_after_cache, 3 ) ;
45
+ }
46
+ else {
47
+ $speed_after_cache = number_format( $speed_after_cache, 2 ) ;
48
+ }
49
+
50
+ $speed_improved = ( $_score[ 'speed_before_cache' ] - $_score[ 'speed_after_cache' ] ) * 100 / $_score[ 'speed_before_cache' ] ;
51
+ if ( $speed_improved > 99 ) {
52
+ $speed_improved = number_format( $speed_improved, 2 ) ;
53
+ }
54
+ else {
55
+ $speed_improved = number_format( $speed_improved ) ;
56
+ }
57
+
58
+ // Format PageSpeed Score
59
+ $score_improved = ( $_score[ 'score_after_optm' ] - $_score[ 'score_before_optm' ] ) * 100 / $_score[ 'score_after_optm' ] ;
60
+ if ( $score_improved > 99 ) {
61
+ $score_improved = number_format( $score_improved, 2 ) ;
62
+ }
63
+ else {
64
+ $score_improved = number_format( $score_improved ) ;
65
+ }
66
+
67
  ?>
68
+ <div class="litespeed-wrap notice notice-info litespeed-banner-promo-full">
69
  <div class="litespeed-banner-promo-logo"></div>
70
 
71
  <div class="litespeed-banner-promo-content">
72
+ <h3 class="litespeed-banner-title litespeed-banner-promo-content"><?php echo __( 'Thank You for Using the LiteSpeed Cache Plugin!', 'litespeed-cache' ) ; ?></h3>
73
+
74
+ <div class="litespeed-row-flex litespeed-banner-promo-content litespeed-margin-left-remove litespeed-flex-wrap">
75
+ <div class="litespeed-right50 litespeed-margin-bottom20">
76
+ <h2 class="litespeed-text-grey litespeed-margin-bottom-remove litespeed-top10">Page Load Time</h2>
77
+ <hr class="litespeed-margin-bottom-remove" />
78
+ <div class="litespeed-row-flex" style="margin-left: -10px;">
79
+ <div class="litespeed-width-1-3 litespeed-padding-space litespeed-margin-x5">
80
+ <div>
81
+ <p class="litespeed-text-grey litespeed-margin-y-remove">
82
+ Before
83
+ </p>
84
+ </div>
85
+ <div class="litespeed-top10 litespeed-text-jumbo litespeed-text-grey">
86
+ <?php echo $speed_before_cache ; ?><span class="litespeed-text-large">s</span>
87
+ </div>
88
+
89
+ </div>
90
+ <div class="litespeed-width-1-3 litespeed-padding-space litespeed-margin-x5">
91
+ <div>
92
+ <p class="litespeed-text-grey litespeed-margin-y-remove">
93
+ After
94
+ </p>
95
+ </div>
96
+ <div class="litespeed-top10 litespeed-text-jumbo litespeed-success">
97
+ <?php echo $speed_after_cache ; ?><span class="litespeed-text-large">s</span>
98
+ </div>
99
+ </div>
100
+ <div class="litespeed-width-1-3 litespeed-padding-space litespeed-margin-x5">
101
+ <div>
102
+ <p class="litespeed-text-grey litespeed-margin-y-remove" style="white-space: nowrap;">
103
+ Improved by
104
+ </p>
105
+ </div>
106
+ <div class="litespeed-top10 litespeed-text-jumbo litespeed-text-fern">
107
+ <?php echo $speed_improved ; ?><span class="litespeed-text-large">%</span>
108
+ </div>
109
+ </div>
110
+ </div>
111
+
112
+ </div>
113
 
114
+ <?php if ( $_score[ 'score_before_optm' ] < $_score[ 'score_after_optm' ] ) : ?>
115
+ <div class="litespeed-margin-bottom20">
116
+ <h2 class="litespeed-text-grey litespeed-margin-bottom-remove litespeed-top10">PageSpeed Score</h2>
117
+ <hr class="litespeed-margin-bottom-remove" />
118
+ <div class="litespeed-row-flex" style="margin-left: -10px;">
119
+ <div class="litespeed-width-1-3 litespeed-padding-space litespeed-margin-x5">
120
+ <div>
121
+ <p class="litespeed-text-grey litespeed-text-center litespeed-margin-y-remove">
122
+ Before
123
+ </p>
124
+ </div>
125
+ <div style="margin-top:-5px;">
126
+ <?php echo LiteSpeed_Cache_GUI::pie( $_score[ 'score_before_optm' ], 45, false, true, 'litespeed-pie-' . $this->get_cls_of_pagescore( $_score[ 'score_before_optm' ] ) ) ; ?>
127
+ </div>
128
+ </div>
129
+ <div class="litespeed-width-1-3 litespeed-padding-space litespeed-margin-x5">
130
+ <div>
131
+ <p class="litespeed-text-grey litespeed-text-center litespeed-margin-y-remove">
132
+ After
133
+ </p>
134
+ </div>
135
+ <div style="margin-top:-5px;">
136
+ <?php echo LiteSpeed_Cache_GUI::pie( $_score[ 'score_after_optm' ], 45, false, true, 'litespeed-pie-' . $this->get_cls_of_pagescore( $_score[ 'score_after_optm' ] ) ) ; ?>
137
+ </div>
138
+ </div>
139
+ <div class="litespeed-width-1-3 litespeed-padding-space litespeed-margin-x5">
140
+ <div>
141
+ <p class="litespeed-text-grey litespeed-margin-y-remove" style="white-space: nowrap;">
142
+ Improved by
143
+ </p>
144
+ </div>
145
+ <div class="litespeed-top10 litespeed-text-jumbo litespeed-text-fern">
146
+ <?php echo $score_improved ; ?><span class="litespeed-text-large">%</span>
147
+ </div>
148
+ </div>
149
+ </div>
150
 
151
+ </div>
152
+ <?php endif ; ?>
 
 
 
 
 
 
153
 
154
+ </div>
 
 
155
 
156
+ <div class="litespeed-row-flex litespeed-flex-wrap litespeed-margin-y5">
157
+ <div class="litespeed-banner-description-padding-right-15">
158
+
159
+ <a href="https://wordpress.org/support/plugin/litespeed-cache/reviews/?filter=5#new-post" target="_blank" style="text-decoration: none;">
160
+ <button class="litespeed-btn-success litespeed-btn-mini">
161
+ <?php echo __( 'Sure I\'d love to review!', 'litespeed-cache' ) ; ?>
162
+ ⭐⭐⭐⭐⭐
163
+ </button>
164
+ </a>
165
+ <button type="button" class="litespeed-btn-primary litespeed-btn-mini" id="litespeed-promo-done"> <?php echo __( 'I\'ve already left a review', 'litespeed-cache' ) ; ?></button>
166
+ <button type="button" class="litespeed-btn-warning litespeed-btn-mini" id="litespeed-promo-later"> <?php echo __( 'Maybe later', 'litespeed-cache' ) ; ?></button>
167
+ </div>
168
+ <div>
169
+ <p class="litespeed-text-small">
170
+ <?php echo __( 'Created with ❤️ by LiteSpeed team.', 'litespeed-cache' ) ; ?>
171
+ <?php echo sprintf(
172
+ __( '<a %s>Support forum</a> | <a %s>Submit a ticket</a>', 'litespeed-cache' ),
173
+ 'href="https://wordpress.org/support/plugin/litespeed-cache" target="_blank"',
174
+ 'href="https://www.litespeedtech.com/support" target="_blank"'
175
+ ) ; ?>
176
+ </p>
177
+ </div>
178
+ </div>
179
+ </div>
180
+
181
+ <div>
182
+ <?php $dismiss_url = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_DISMISS, LiteSpeed_Cache_GUI::TYPE_DISMISS_PROMO, false, null, array( 'promo_tag' => 'banner_promo', 'later' => 1 ) ) ; ?>
183
+ <span class="screen-reader-text">Dismiss this notice.</span>
184
+ <a href="<?php echo $dismiss_url ; ?>" class="litespeed-notice-dismiss">X</a>
185
  </div>
186
+
187
+ </div>
admin/tpl/inc/banner_promo.slack.php CHANGED
@@ -1,33 +1,35 @@
1
  <?php
2
  if ( ! defined( 'WPINC' ) ) die ;
3
-
4
- if ( ! LiteSpeed_Cache_GUI::should_show_promo( 'slack' ) ) {
5
- return ;
6
- }
7
-
8
  ?>
9
- <div class="litespeed-wrap notice notice-info litespeed-banner-promo-full is-dismissible" id="litespeed-banner-promo-slack">
10
  <div class="litespeed-banner-promo-logo"></div>
11
 
12
  <div class="litespeed-banner-promo-content">
13
- <h1><?php echo __( 'Welcome to LiteSpeed', 'litespeed-cache' ) ; ?></h1>
14
-
15
- <div class="litespeed-banner-promo">
16
-
17
- <div class="litespeed-banner-promo-slacklogo"></div>
18
-
19
- <div class="litespeed-banner-promo-content">
20
- <p class="litespeed-banner-promo-slack-line1">
21
  <?php echo __( 'Want to connect with other LiteSpeed users?', 'litespeed-cache' ) ; ?>
22
  <?php echo sprintf( __( 'Join the %s community.', 'litespeed-cache' ), '<a href="https://goo.gl/mrKuTw" target="_blank" class="litespeed-banner-promo-slack-textlink">LiteSpeed Slack</a>' ) ; ?>
23
  </p>
24
-
25
  <p class="litespeed-banner-promo-slack-line2">
26
- <span class="litespeed-banner-promo-slack-link">golitespeed.slack.com</span>
27
- <a href="https://goo.gl/mrKuTw" target="_blank" class="litespeed-btn-success litespeed-btn-xs litespeed-banner-promo-slack-btn"><?php echo __( 'Join Us on Slack', 'litespeed-cache' ) ; ?></a>
28
  </p>
29
  </div>
30
-
 
 
 
 
 
 
31
  </div>
32
  </div>
33
- </div>
 
 
 
 
 
 
 
1
  <?php
2
  if ( ! defined( 'WPINC' ) ) die ;
 
 
 
 
 
3
  ?>
4
+ <div class="litespeed-wrap notice notice-info litespeed-banner-promo-full" id="litespeed-banner-promo-slack">
5
  <div class="litespeed-banner-promo-logo"></div>
6
 
7
  <div class="litespeed-banner-promo-content">
8
+ <h3 class="litespeed-banner-title"><?php echo __( 'Welcome to LiteSpeed', 'litespeed-cache' ) ; ?></h3>
9
+ <div class="litespeed-banner-description">
10
+ <div class="litespeed-banner-description-padding-right-15">
11
+ <p class="litespeed-banner-desciption-content">
 
 
 
 
12
  <?php echo __( 'Want to connect with other LiteSpeed users?', 'litespeed-cache' ) ; ?>
13
  <?php echo sprintf( __( 'Join the %s community.', 'litespeed-cache' ), '<a href="https://goo.gl/mrKuTw" target="_blank" class="litespeed-banner-promo-slack-textlink">LiteSpeed Slack</a>' ) ; ?>
14
  </p>
 
15
  <p class="litespeed-banner-promo-slack-line2">
16
+ golitespeed.slack.com
 
17
  </p>
18
  </div>
19
+ <div>
20
+ <h3 class="litespeed-banner-button-link">
21
+ <a href="https://goo.gl/mrKuTw" target="_blank">
22
+ <?php echo __( 'Join Us on Slack', 'litespeed-cache' ) ; ?>
23
+ </a>
24
+ </h3>
25
+ </div>
26
  </div>
27
  </div>
28
+ <div>
29
+ <?php $dismiss_url = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_DISMISS, LiteSpeed_Cache_GUI::TYPE_DISMISS_PROMO, false, null, array( 'promo_tag' => 'banner_promo.slack' ) ) ; ?>
30
+ <span class="screen-reader-text">Dismiss this notice.</span>
31
+ <a href="<?php echo $dismiss_url ; ?>" class="litespeed-notice-dismiss">
32
+ Dismiss
33
+ </a>
34
+ </div>
35
+ </div>
admin/tpl/inc/img_optm.summary.php CHANGED
@@ -3,6 +3,7 @@ if ( ! defined( 'WPINC' ) ) {
3
  die ;
4
  }
5
 
 
6
  ?>
7
 
8
  <div class="litespeed-width-7-10">
@@ -19,6 +20,9 @@ if ( ! defined( 'WPINC' ) ) {
19
  <div class="litespeed-empty-space-small"></div>
20
 
21
  <div class="litespeed-desc">
 
 
 
22
  <?php echo __( 'This will send the optimization request and the images to LiteSpeed\'s Image Optimization Server.', 'litespeed-cache' ) ; ?>
23
  <?php echo sprintf( __( 'You can send at most %s images at once.', 'litespeed-cache' ), '<code>' . $optm_summary[ 'credit' ] . '</code>' ) ; ?>
24
  </div>
@@ -155,11 +159,6 @@ if ( ! defined( 'WPINC' ) ) {
155
  </p>
156
  <?php endif ; ?>
157
 
158
- <?php if ( ! empty( $optm_summary[ 'pull_failed' ] ) ) : ?>
159
- <p>
160
- <?php echo __( 'Images failed to pull', 'litespeed-cache' ) ; ?>: <code><?php echo $optm_summary[ 'pull_failed' ] ; ?></code>
161
- </p>
162
- <?php endif ; ?>
163
  </div>
164
 
165
  <p><a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:image-optimization#image_optimization_in_litespeed_cache_for_wordpress" target="_blank"><?php echo __('Learn More', 'litespeed-cache') ; ?></a></p>
3
  die ;
4
  }
5
 
6
+ $closet_server = get_option( LiteSpeed_Cache_Admin_API::DB_API_CLOUD ) ;
7
  ?>
8
 
9
  <div class="litespeed-width-7-10">
20
  <div class="litespeed-empty-space-small"></div>
21
 
22
  <div class="litespeed-desc">
23
+ <?php if ( $closet_server ) : ?>
24
+ <font title="<?php echo $closet_server ; ?>">☁️</font>
25
+ <?php endif ; ?>
26
  <?php echo __( 'This will send the optimization request and the images to LiteSpeed\'s Image Optimization Server.', 'litespeed-cache' ) ; ?>
27
  <?php echo sprintf( __( 'You can send at most %s images at once.', 'litespeed-cache' ), '<code>' . $optm_summary[ 'credit' ] . '</code>' ) ; ?>
28
  </div>
159
  </p>
160
  <?php endif ; ?>
161
 
 
 
 
 
 
162
  </div>
163
 
164
  <p><a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:image-optimization#image_optimization_in_litespeed_cache_for_wordpress" target="_blank"><?php echo __('Learn More', 'litespeed-cache') ; ?></a></p>
admin/tpl/manage.php CHANGED
@@ -10,7 +10,6 @@ if ( ! is_network_admin() ) {
10
  $menu_list[ 'cdn' ] = __( 'CDN', 'litespeed-cache' ) ;
11
  }
12
 
13
- LiteSpeed_Cache_GUI::show_promo() ;
14
  ?>
15
 
16
  <div class="wrap">
10
  $menu_list[ 'cdn' ] = __( 'CDN', 'litespeed-cache' ) ;
11
  }
12
 
 
13
  ?>
14
 
15
  <div class="wrap">
admin/tpl/setting/settings_cdn.php CHANGED
@@ -107,6 +107,10 @@ $cdn_mapping = $this->config->get_item( LiteSpeed_Cache_Config::ITEM_CDN_MAPPING
107
  <?php echo __('One per line.', 'litespeed-cache'); ?>
108
  <?php echo sprintf( __( 'This will affect all tags containing attributes: %s %s %s.', 'litespeed-cache' ), '<code>src=""</code>', '<code>data-src=""</code>', '<code>href=""</code>' ) ; ?>
109
  <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cdn#include_file_types', __( 'Default value', 'litespeed-cache' ) ) ; ?>
 
 
 
 
110
  </div>
111
 
112
  </td>
107
  <?php echo __('One per line.', 'litespeed-cache'); ?>
108
  <?php echo sprintf( __( 'This will affect all tags containing attributes: %s %s %s.', 'litespeed-cache' ), '<code>src=""</code>', '<code>data-src=""</code>', '<code>href=""</code>' ) ; ?>
109
  <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cdn#include_file_types', __( 'Default value', 'litespeed-cache' ) ) ; ?>
110
+
111
+ <br />
112
+ <?php echo sprintf( __( 'If you turn any of the above settings OFF, please remove the related file types from the %s box.' ), '<b>' . __( 'Include File Types', 'litespeed-cache' ) . '</b>' ) ; ?>
113
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cdn#include_file_types' ) ; ?>
114
  </div>
115
 
116
  </td>
admin/tpl/setting/settings_esi.php CHANGED
@@ -26,7 +26,7 @@ if ( ! defined( 'WPINC' ) ) die ;
26
  <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:esi:shortcode' ) ; ?>
27
  </p>
28
  <p>
29
- <?php $this->learn_more( 'href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:esi_sample', __( 'ESI sample for developers', 'litespeed-cache' ) ) ; ?>
30
  </p>
31
  </div>
32
 
26
  <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:esi:shortcode' ) ; ?>
27
  </p>
28
  <p>
29
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:esi_sample', __( 'ESI sample for developers', 'litespeed-cache' ) ) ; ?>
30
  </p>
31
  </div>
32
 
admin/tpl/setting/settings_excludes.php CHANGED
@@ -17,6 +17,8 @@ if ( ! defined( 'WPINC' ) ) die ;
17
  <div class="litespeed-desc">
18
  <?php echo __('Paths containing these strings will be cached regardless of no-cacheable settings.', 'litespeed-cache'); ?>
19
  <?php $this->_uri_usage_example() ; ?>
 
 
20
  </div>
21
  </td>
22
  </tr>
17
  <div class="litespeed-desc">
18
  <?php echo __('Paths containing these strings will be cached regardless of no-cacheable settings.', 'litespeed-cache'); ?>
19
  <?php $this->_uri_usage_example() ; ?>
20
+ <br /><?php echo __( 'To define a custom TTL for a URI, add a space followed by the TTL value to the end of the URI.', 'litespeed-cache' ) ; ?>
21
+ <?php echo sprintf( __( 'For example, %1$s defines a TTL of %2$s seconds for %3$s.', 'litespeed-cache' ), '<code>/mypath/mypage 300</code>', 300, '<code>/mypath/mypage</code>' ) ; ?>
22
  </div>
23
  </td>
24
  </tr>
admin/tpl/setting/settings_inc.cache_mobile.php CHANGED
@@ -34,8 +34,6 @@ if (!defined('WPINC')) die;
34
  // if enabled, check the setting in file
35
  if ( defined( 'LITESPEED_ON' ) ) {
36
 
37
- $this->display_messages() ;
38
-
39
  $mobile_agents = LiteSpeed_Cache_Admin_Rules::get_instance()->get_rewrite_rule_mobile_agents() ;
40
  if ( $mobile_agents !== $_options[ $id ] ) {
41
  echo '<div class="litespeed-callout-danger">'
34
  // if enabled, check the setting in file
35
  if ( defined( 'LITESPEED_ON' ) ) {
36
 
 
 
37
  $mobile_agents = LiteSpeed_Cache_Admin_Rules::get_instance()->get_rewrite_rule_mobile_agents() ;
38
  if ( $mobile_agents !== $_options[ $id ] ) {
39
  echo '<div class="litespeed-callout-danger">'
admin/tpl/setting/settings_media.php CHANGED
@@ -43,6 +43,18 @@ $last_responsive_placeholder_generated = LiteSpeed_Cache_Media::get_summary() ;
43
  </td>
44
  </tr>
45
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  <tr>
47
  <th><?php echo __( 'Lazy Load Image Placeholder', 'litespeed-cache' ) ; ?></th>
48
  <td>
43
  </td>
44
  </tr>
45
 
46
+ <tr>
47
+ <th><?php echo __( 'Lazy Load Image Class Name Excludes', 'litespeed-cache' ) ; ?></th>
48
+ <td>
49
+ <?php $this->build_textarea2( LiteSpeed_Cache_Config::ITEM_MEDIA_LAZY_IMG_CLS_EXC ) ; ?>
50
+ <div class="litespeed-desc">
51
+ <?php echo __( 'Images containing these class names will not be lazy loaded.', 'litespeed-cache' ) ; ?>
52
+ <?php echo __( 'Both full and partial strings can be used.', 'litespeed-cache' ) ; ?>
53
+ <?php echo __('One per line.', 'litespeed-cache'); ?>
54
+ </div>
55
+ </td>
56
+ </tr>
57
+
58
  <tr>
59
  <th><?php echo __( 'Lazy Load Image Placeholder', 'litespeed-cache' ) ; ?></th>
60
  <td>
admin/tpl/settings.php CHANGED
@@ -85,8 +85,6 @@ foreach ( $wp_roles->roles as $k => $v ) {
85
  }
86
  ksort( $roles ) ;
87
 
88
- LiteSpeed_Cache_GUI::show_promo() ;
89
-
90
  /**
91
  * Switch basic/advanced mode
92
  * @since 1.8.2
85
  }
86
  ksort( $roles ) ;
87
 
 
 
88
  /**
89
  * Switch basic/advanced mode
90
  * @since 1.8.2
css/litespeed.css CHANGED
@@ -30,6 +30,10 @@
30
  color: #a7a7a7!important;
31
  }
32
 
 
 
 
 
33
  .litespeed-success {
34
  color: #73b38d!important;
35
  }
@@ -43,29 +47,44 @@
43
  }
44
 
45
  .litespeed-left10 {
46
- margin-left: 10px;
 
 
 
47
  }
48
-
49
  .litespeed-right10 {
50
- margin-right: 10px;
51
  }
52
  .litespeed-right20 {
53
- margin-right: 20px;
54
  }
55
  .litespeed-right30 {
56
- margin-right: 30px;
 
 
 
57
  }
58
-
59
  .litespeed-top10 {
60
- margin-top: 10px;
 
 
 
61
  }
62
-
63
  .litespeed-top20 {
64
- margin-top: 20px;
65
  }
66
 
67
  .litespeed-top30 {
68
- margin-top: 30px;
 
 
 
 
 
 
 
 
 
69
  }
70
 
71
  .litespeed-wrap .litespeed-left20,
@@ -284,6 +303,12 @@ h3 .litespeed-learn-more {
284
  padding-right: 20px;
285
  }
286
 
 
 
 
 
 
 
287
  /********************************* nav tabs *******************************/
288
  .litespeed-wrap {
289
  margin: 10px 20px 0 2px;
@@ -616,6 +641,14 @@ h3 .litespeed-learn-more {
616
  min-width: 14px ;
617
  }
618
 
 
 
 
 
 
 
 
 
619
  /********************************* switch *******************************/
620
  .litespeed-switch {
621
  border: 1px solid #538ac6;
@@ -1238,7 +1271,7 @@ ul.litespeed-shell-body {
1238
  .litespeed-banner-promo,
1239
  .litespeed-banner-promo-full{
1240
  display: flex;
1241
- padding: 10px;
1242
  }
1243
 
1244
  .litespeed-banner-promo-full{
@@ -1246,27 +1279,26 @@ ul.litespeed-shell-body {
1246
  padding: 0px;
1247
  }
1248
 
1249
- .litespeed-banner-promo-logo{
1250
- background-image: url("../img/lscwp-logo_256x256.png") ;
1251
  background-size: contain;
1252
- width: 150px;
1253
- height: 150px;
1254
- margin: 5px;
1255
  background-repeat: no-repeat;
1256
  display: inline-block;
1257
  }
1258
 
1259
  .litespeed-banner-promo-full .litespeed-banner-promo-logo {
1260
  margin: 0px;
1261
- width: 170px;
 
1262
  }
1263
 
1264
  .litespeed-banner-promo-content{
1265
- margin-left: 20px;
1266
  }
1267
 
1268
  .litespeed-banner-promo-full .litespeed-banner-promo-content {
1269
- width: 100%;
1270
  }
1271
 
1272
  .litespeed-banner-promo-content h1{
@@ -1275,6 +1307,11 @@ ul.litespeed-shell-body {
1275
  margin-top: 10px;
1276
  }
1277
 
 
 
 
 
 
1278
  .litespeed-banner-promo-slacklogo{
1279
  background-image: url("../img/slack-logo.png") ;
1280
  background-size: contain;
@@ -1302,8 +1339,9 @@ ul.litespeed-shell-body {
1302
  }
1303
 
1304
  .litespeed-banner-promo-slack-line2{
1305
- font-size: 18px;
1306
  margin: 0px;
 
1307
  }
1308
 
1309
  .litespeed-banner-promo-slack-link{
@@ -1311,7 +1349,7 @@ ul.litespeed-shell-body {
1311
  }
1312
 
1313
  a.litespeed-btn-xs.litespeed-banner-promo-slack-btn{
1314
- margin:0px 50px 0px 50px;
1315
  }
1316
 
1317
  /********************************* admin -> media lib icon *******************************/
@@ -1371,6 +1409,8 @@ p.litespeed-txt-disabled {
1371
  margin: 5px;
1372
  }
1373
 
 
 
1374
  circle.litespeed-pie_bg {
1375
  stroke: #efefef;
1376
  stroke-width: 2;
@@ -1395,14 +1435,39 @@ circle.litespeed-pie_circle {
1395
  r: 15.91549431;
1396
  }
1397
 
 
 
 
 
 
 
 
 
 
 
 
 
1398
  g.litespeed-pie_info text{
1399
  alignment-baseline: central;
1400
  text-anchor: middle;
1401
- font-size: 11px ;
 
 
 
 
 
 
 
 
 
 
 
 
 
1402
  }
1403
 
1404
  g.litespeed-pie_info .litespeed-pie-done {
1405
- fill: #73b38d ;
1406
  }
1407
 
1408
 
@@ -1880,6 +1945,10 @@ input.litespeed-input-warning {
1880
  padding: 20px;
1881
 
1882
  }
 
 
 
 
1883
  .litespeed-width-7-10 {
1884
  width: 65%;
1885
  padding: 20px;
@@ -1890,35 +1959,39 @@ input.litespeed-input-warning {
1890
  }
1891
 
1892
  .litespeed-column-java {
1893
- background: #5CADAD;
1894
  }
1895
 
1896
  .litespeed-text-shipgrey {
1897
- color: #535342;
1898
  }
1899
 
1900
  .litespeed-text-dimgray {
1901
- color: #666666;
 
 
 
 
1902
  }
1903
 
1904
  .litespeed-text-whisper {
1905
- color: #E6E6E6;
1906
  }
1907
 
1908
  .litespeed-text-malibu {
1909
- color: #5CBDDE;
1910
  }
1911
 
1912
  .litespeed-text-morningglory {
1913
- color: #99CCCC;
1914
  }
1915
 
1916
  .litespeed-text-fern {
1917
- color: #66CC66;
1918
  }
1919
 
1920
  .litespeed-text-persiangreen {
1921
- color: #009999;
1922
  }
1923
 
1924
  .litespeed-text-right {
@@ -1928,7 +2001,21 @@ input.litespeed-input-warning {
1928
  .litespeed-text-center {
1929
  text-align: center;
1930
  }
 
 
 
 
 
 
 
1931
 
 
 
 
 
 
 
 
1932
  .litespeed-align-center {
1933
  margin-left: auto;
1934
  margin-right: auto;
@@ -2234,7 +2321,7 @@ input.litespeed-input-warning {
2234
  .litespeed-media-p a .dashicons-trash {
2235
  font-size: 2.25em;
2236
  vertical-align: middle;
2237
- display: inline;
2238
  border-radius: 50%;
2239
  line-height: 1.5em;
2240
  }
@@ -2256,3 +2343,76 @@ input.litespeed-input-warning {
2256
  background: rgba(236,242,249,0.1);
2257
  border-radius: 50%;
2258
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  color: #a7a7a7!important;
31
  }
32
 
33
+ .litespeed-primary {
34
+ color: #3366CC!important;
35
+ }
36
+
37
  .litespeed-success {
38
  color: #73b38d!important;
39
  }
47
  }
48
 
49
  .litespeed-left10 {
50
+ margin-left: 10px !important;
51
+ }
52
+ .litespeed-left20 {
53
+ margin-left: 20px !important;
54
  }
 
55
  .litespeed-right10 {
56
+ margin-right: 10px !important;
57
  }
58
  .litespeed-right20 {
59
+ margin-right: 20px !important;
60
  }
61
  .litespeed-right30 {
62
+ margin-right: 30px !important;
63
+ }
64
+ .litespeed-right50 {
65
+ margin-right: 50px !important;
66
  }
 
67
  .litespeed-top10 {
68
+ margin-top: 10px !important;
69
+ }
70
+ .litespeed-top15 {
71
+ margin-top: 15px !important;
72
  }
 
73
  .litespeed-top20 {
74
+ margin-top: 20px !important;
75
  }
76
 
77
  .litespeed-top30 {
78
+ margin-top: 30px !important;
79
+ }
80
+
81
+ .litespeed-margin-y5 {
82
+ margin-top: 5px !important;
83
+ margin-bottom: 5px !important;
84
+ }
85
+ .litespeed-margin-x5 {
86
+ margin-left: 5px !important;
87
+ margin-right: 5px !important;
88
  }
89
 
90
  .litespeed-wrap .litespeed-left20,
303
  padding-right: 20px;
304
  }
305
 
306
+ .litespeed-text-jumbo {
307
+ font-size: 3em !important;
308
+ }
309
+ .litespeed-text-large {
310
+ font-size: .75em !important;
311
+ }
312
  /********************************* nav tabs *******************************/
313
  .litespeed-wrap {
314
  margin: 10px 20px 0 2px;
641
  min-width: 14px ;
642
  }
643
 
644
+ .litespeed-wrap .litespeed-btn-mini {
645
+ padding: 2px 5px !important;
646
+ font-size: 12px !important;
647
+ font-weight: 600 !important;
648
+ margin: 5px !important;
649
+ }
650
+
651
+
652
  /********************************* switch *******************************/
653
  .litespeed-switch {
654
  border: 1px solid #538ac6;
1271
  .litespeed-banner-promo,
1272
  .litespeed-banner-promo-full{
1273
  display: flex;
1274
+ padding: 0px;
1275
  }
1276
 
1277
  .litespeed-banner-promo-full{
1279
  padding: 0px;
1280
  }
1281
 
1282
+ .litespeed-banner-promo-logo {
1283
+ background-image: url(../img/lscwp-logo_90x90.png);
1284
  background-size: contain;
1285
+ width: 90px;
 
 
1286
  background-repeat: no-repeat;
1287
  display: inline-block;
1288
  }
1289
 
1290
  .litespeed-banner-promo-full .litespeed-banner-promo-logo {
1291
  margin: 0px;
1292
+ width: 90px;
1293
+ height: 90px;
1294
  }
1295
 
1296
  .litespeed-banner-promo-content{
1297
+ margin-left: 25px;
1298
  }
1299
 
1300
  .litespeed-banner-promo-full .litespeed-banner-promo-content {
1301
+ width: 75%;
1302
  }
1303
 
1304
  .litespeed-banner-promo-content h1{
1307
  margin-top: 10px;
1308
  }
1309
 
1310
+ .litespeed-banner-title {
1311
+ font-size: 1.3em;
1312
+ margin: 8px 0px 5px 0px;
1313
+ }
1314
+
1315
  .litespeed-banner-promo-slacklogo{
1316
  background-image: url("../img/slack-logo.png") ;
1317
  background-size: contain;
1339
  }
1340
 
1341
  .litespeed-banner-promo-slack-line2{
1342
+ font-size: 15px;
1343
  margin: 0px;
1344
+ line-height: .75em;
1345
  }
1346
 
1347
  .litespeed-banner-promo-slack-link{
1349
  }
1350
 
1351
  a.litespeed-btn-xs.litespeed-banner-promo-slack-btn{
1352
+ margin:0px 5px;
1353
  }
1354
 
1355
  /********************************* admin -> media lib icon *******************************/
1409
  margin: 5px;
1410
  }
1411
 
1412
+
1413
+
1414
  circle.litespeed-pie_bg {
1415
  stroke: #efefef;
1416
  stroke-width: 2;
1435
  r: 15.91549431;
1436
  }
1437
 
1438
+ .litespeed-pie-success circle.litespeed-pie_circle {
1439
+ stroke: #178239;
1440
+ }
1441
+
1442
+ .litespeed-pie-warning circle.litespeed-pie_circle {
1443
+ stroke: #e67700;
1444
+ }
1445
+
1446
+ .litespeed-pie-danger circle.litespeed-pie_circle {
1447
+ stroke: #c7221f;
1448
+ }
1449
+
1450
  g.litespeed-pie_info text{
1451
  alignment-baseline: central;
1452
  text-anchor: middle;
1453
+ font-size: 14px;
1454
+ font-weight: 600;
1455
+ }
1456
+
1457
+ .litespeed-pie-success g.litespeed-pie_info text{
1458
+ fill: #178239;
1459
+ }
1460
+
1461
+ .litespeed-pie-warning g.litespeed-pie_info text{
1462
+ fill: #e67700;
1463
+ }
1464
+
1465
+ .litespeed-pie-danger g.litespeed-pie_info text{
1466
+ fill: #c7221f;
1467
  }
1468
 
1469
  g.litespeed-pie_info .litespeed-pie-done {
1470
+ fill: #73b38d;
1471
  }
1472
 
1473
 
1945
  padding: 20px;
1946
 
1947
  }
1948
+ .litespeed-width-1-3 {
1949
+ width: 30%;
1950
+ padding: 25px;
1951
+ }
1952
  .litespeed-width-7-10 {
1953
  width: 65%;
1954
  padding: 20px;
1959
  }
1960
 
1961
  .litespeed-column-java {
1962
+ background: #5CADAD !important;
1963
  }
1964
 
1965
  .litespeed-text-shipgrey {
1966
+ color: #535342 !important;
1967
  }
1968
 
1969
  .litespeed-text-dimgray {
1970
+ color: #666666 !important;
1971
+ }
1972
+
1973
+ .litespeed-text-grey {
1974
+ color: #999999 !important;
1975
  }
1976
 
1977
  .litespeed-text-whisper {
1978
+ color: #E6E6E6 !important;
1979
  }
1980
 
1981
  .litespeed-text-malibu {
1982
+ color: #5CBDDE !important;
1983
  }
1984
 
1985
  .litespeed-text-morningglory {
1986
+ color: #99CCCC !important;
1987
  }
1988
 
1989
  .litespeed-text-fern {
1990
+ color: #66CC66 !important;
1991
  }
1992
 
1993
  .litespeed-text-persiangreen {
1994
+ color: #009999 !important;
1995
  }
1996
 
1997
  .litespeed-text-right {
2001
  .litespeed-text-center {
2002
  text-align: center;
2003
  }
2004
+ .litespeed-text-bold {
2005
+ font-weight: 600;
2006
+ }
2007
+
2008
+ .litespeed-text-lead {
2009
+ font-size: 16px;
2010
+ }
2011
 
2012
+ .litespeed-text-small {
2013
+ font-size: 12px;
2014
+ line-height: 14px;
2015
+ }
2016
+ .litespeed-text-thin {
2017
+ font-weight: 100;
2018
+ }
2019
  .litespeed-align-center {
2020
  margin-left: auto;
2021
  margin-right: auto;
2321
  .litespeed-media-p a .dashicons-trash {
2322
  font-size: 2.25em;
2323
  vertical-align: middle;
2324
+ display: inline;
2325
  border-radius: 50%;
2326
  line-height: 1.5em;
2327
  }
2343
  background: rgba(236,242,249,0.1);
2344
  border-radius: 50%;
2345
  }
2346
+
2347
+ .litespeed-banner-description-padding-right-15 {
2348
+ padding-right: 15px;
2349
+ }
2350
+ .litespeed-banner-description {
2351
+ display: inline-flex;
2352
+ flex-wrap: wrap;
2353
+ }
2354
+ .litespeed-banner-desciption-content {
2355
+ margin: 0px;
2356
+ line-height: 1.25em;
2357
+ padding: 0px !important;
2358
+ }
2359
+
2360
+ .litespeed-row-flex {
2361
+ display: inline-flex;
2362
+
2363
+ }
2364
+ .litespeed-flex-wrap {
2365
+ flex-wrap: wrap;
2366
+ }
2367
+
2368
+ .litespeed-padding-space {
2369
+ padding: 5px 10px;
2370
+ }
2371
+ .litespeed-margin-bottom20 {
2372
+ margin-bottom: 20px;
2373
+ }
2374
+ .litespeed-margin-bottom-remove {
2375
+ margin-bottom: 0px !important;
2376
+ }
2377
+ .litespeed-margin-top-remove {
2378
+ margin-top: 0px !important;
2379
+ }
2380
+ .litespeed-margin-left-remove {
2381
+ margin-left: 0px !important;
2382
+ }
2383
+ .litespeed-margin-y-remove {
2384
+ margin-top: 0px !important;
2385
+ margin-bottom: 0px !important;
2386
+ }
2387
+
2388
+
2389
+ .litespeed-banner-button-link {
2390
+ white-space: nowrap;
2391
+ margin: 0px;
2392
+ line-height: 1.5em;
2393
+ padding-bottom: 5px;
2394
+ }
2395
+
2396
+
2397
+
2398
+ .litespeed-notice-dismiss{
2399
+ position: absolute;
2400
+ right: 25px;
2401
+ border: none;
2402
+ margin: 0;
2403
+ padding: 10px;
2404
+ background: none;
2405
+ cursor: pointer;
2406
+ color: #888888;
2407
+ display: block;
2408
+ height: 20px;
2409
+ text-align: center;
2410
+ -webkit-font-smoothing: antialiased;
2411
+ -moz-osx-font-smoothing: grayscale;
2412
+ font-weight: 600;
2413
+ text-decoration: none;
2414
+ }
2415
+
2416
+ .litespeed-notice-dismiss:hover, .litespeed-notice-dismiss:active, .litespeed-notice-dismiss:focus {
2417
+ color: #CC2929;
2418
+ }
img/lscwp-logo_256x256.png DELETED
Binary file
img/lscwp-logo_90x90.png ADDED
Binary file
inc/activation.class.php CHANGED
@@ -15,6 +15,10 @@ if ( ! defined( 'WPINC' ) ) {
15
 
16
  class LiteSpeed_Cache_Activation
17
  {
 
 
 
 
18
  const NETWORK_TRANSIENT_COUNT = 'lscwp_network_count' ;
19
 
20
  /**
@@ -79,6 +83,11 @@ class LiteSpeed_Cache_Activation
79
  $options[ $id ] = $__cfg->get_item( $id ) ;
80
  }
81
 
 
 
 
 
 
82
  LiteSpeed_Cache_Admin_Settings::get_instance()->validate_network_settings( $options, true ) ;
83
  return ;
84
  }
@@ -100,7 +109,7 @@ class LiteSpeed_Cache_Activation
100
  LiteSpeed_Cache_Admin_Settings::get_instance()->validate_plugin_settings( $options, true ) ;
101
 
102
  if ( defined( 'LSCWP_PLUGIN_NAME' ) ) {
103
- set_transient( LiteSpeed_Cache::WHM_TRANSIENT, LiteSpeed_Cache::WHM_TRANSIENT_VAL ) ;
104
  }
105
 
106
  // Register crawler cron task
@@ -305,15 +314,93 @@ class LiteSpeed_Cache_Activation
305
  }
306
 
307
  /**
308
- * Delete whm transient msg tag
309
  *
310
  * @since 1.1.1
311
  * @access public
312
  */
313
  public static function dismiss_whm()
314
  {
315
- delete_transient( LiteSpeed_Cache::WHM_TRANSIENT ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
316
  }
317
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
318
 
319
  }
15
 
16
  class LiteSpeed_Cache_Activation
17
  {
18
+ private static $_instance ;
19
+
20
+ const TYPE_UPGRADE = 'upgrade' ;
21
+
22
  const NETWORK_TRANSIENT_COUNT = 'lscwp_network_count' ;
23
 
24
  /**
83
  $options[ $id ] = $__cfg->get_item( $id ) ;
84
  }
85
 
86
+ if ( ! empty($options[ LiteSpeed_Cache_Config::ID_MOBILEVIEW_LIST ]) ) {
87
+ $options[ LiteSpeed_Cache_Config::ID_MOBILEVIEW_LIST ] =
88
+ addslashes( $options[ LiteSpeed_Cache_Config::ID_MOBILEVIEW_LIST ] );
89
+ }
90
+
91
  LiteSpeed_Cache_Admin_Settings::get_instance()->validate_network_settings( $options, true ) ;
92
  return ;
93
  }
109
  LiteSpeed_Cache_Admin_Settings::get_instance()->validate_plugin_settings( $options, true ) ;
110
 
111
  if ( defined( 'LSCWP_PLUGIN_NAME' ) ) {
112
+ update_option( LiteSpeed_Cache::WHM_MSG, LiteSpeed_Cache::WHM_MSG_VAL ) ;
113
  }
114
 
115
  // Register crawler cron task
314
  }
315
 
316
  /**
317
+ * Delete whm msg tag
318
  *
319
  * @since 1.1.1
320
  * @access public
321
  */
322
  public static function dismiss_whm()
323
  {
324
+ delete_option( LiteSpeed_Cache::WHM_MSG ) ;
325
+ }
326
+
327
+ /**
328
+ * Upgrade LSCWP
329
+ *
330
+ * @since 2.9
331
+ * @access private
332
+ */
333
+ private function _upgrade()
334
+ {
335
+ $plugin = LiteSpeed_Cache::PLUGIN_FILE ;
336
+
337
+ /**
338
+ * @see wp-admin/update.php
339
+ */
340
+ include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ;
341
+ include_once ABSPATH . 'wp-admin/includes/file.php' ;
342
+ include_once ABSPATH . 'wp-admin/includes/misc.php' ;
343
+
344
+ try {
345
+ ob_start() ;
346
+ $skin = new \WP_Ajax_Upgrader_Skin() ;
347
+ $upgrader = new \Plugin_Upgrader( $skin ) ;
348
+ $result = $upgrader->upgrade( $plugin ) ;
349
+ if ( ! is_plugin_active( $plugin ) ) {// todo: upgrade should reactivate the plugin again by WP. Need to check why disabled after upgraded.
350
+ activate_plugin( $plugin ) ;
351
+ }
352
+ ob_end_clean() ;
353
+ } catch ( \Exception $e ) {
354
+ LiteSpeed_Cache_Admin_Display::error( __( 'Failed to upgrade.', 'litespeed-cache' ) ) ;
355
+ return ;
356
+ }
357
+
358
+ if ( is_wp_error( $result ) ) {
359
+ LiteSpeed_Cache_Admin_Display::error( __( 'Failed to upgrade.', 'litespeed-cache' ) ) ;
360
+ return ;
361
+ }
362
+
363
+ LiteSpeed_Cache_Admin_Display::succeed( __( 'Upgraded successfully.', 'litespeed-cache' ) ) ;
364
  }
365
 
366
+ /**
367
+ * Handle all request actions from main cls
368
+ *
369
+ * @since 2.9
370
+ * @access public
371
+ */
372
+ public static function handler()
373
+ {
374
+ $instance = self::get_instance() ;
375
+
376
+ $type = LiteSpeed_Cache_Router::verify_type() ;
377
+
378
+ switch ( $type ) {
379
+ case self::TYPE_UPGRADE :
380
+ $instance->_upgrade() ;
381
+ break ;
382
+
383
+ default:
384
+ break ;
385
+ }
386
+
387
+ LiteSpeed_Cache_Admin::redirect() ;
388
+ }
389
+
390
+ /**
391
+ * Get the current instance object.
392
+ *
393
+ * @since 2.9
394
+ * @access public
395
+ * @return Current class instance.
396
+ */
397
+ public static function get_instance()
398
+ {
399
+ if ( ! isset( self::$_instance ) ) {
400
+ self::$_instance = new self() ;
401
+ }
402
+
403
+ return self::$_instance ;
404
+ }
405
 
406
  }
inc/config.class.php CHANGED
@@ -19,6 +19,8 @@ class LiteSpeed_Cache_Config extends LiteSpeed_Cache_Const
19
  {
20
  private static $_instance ;
21
 
 
 
22
  protected $options ;
23
  protected $vary_groups ;
24
  protected $exclude_optimization_roles ;
@@ -718,6 +720,79 @@ class LiteSpeed_Cache_Config extends LiteSpeed_Cache_Const
718
 
719
  }
720
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
721
  /**
722
  * Get the current instance object.
723
  *
19
  {
20
  private static $_instance ;
21
 
22
+ const TYPE_SET = 'set' ;
23
+
24
  protected $options ;
25
  protected $vary_groups ;
26
  protected $exclude_optimization_roles ;
720
 
721
  }
722
 
723
+ /**
724
+ * Set one config value directly
725
+ *
726
+ * @since 2.9
727
+ * @access private
728
+ */
729
+ private function _set_cfg()
730
+ {
731
+ if ( empty( $_GET[ self::TYPE_SET ] ) || ! is_array( $_GET[ self::TYPE_SET ] ) ) {
732
+ return ;
733
+ }
734
+
735
+ $cfg = $cfg_v = false ;
736
+ foreach ( $_GET[ self::TYPE_SET ] as $k => $v ) {
737
+ if ( ! isset( $this->options[ $k ] ) ) {
738
+ continue ;
739
+ }
740
+
741
+ if ( is_bool( $this->options[ $k ] ) ) {
742
+ $v = (bool) $v ;
743
+ }
744
+
745
+ $cfg = $k ;
746
+ $cfg_v = $v ;
747
+ break ;// only allow one
748
+ }
749
+
750
+ if ( ! $cfg ) {
751
+ return ;
752
+ }
753
+
754
+ $options = $this->options ;
755
+ // Get items
756
+ foreach ( $this->stored_items() as $v ) {
757
+ $options[ $v ] = $this->get_item( $v ) ;
758
+ }
759
+
760
+ // Change value
761
+ $options[ $cfg ] = $cfg_v ;
762
+
763
+ $output = LiteSpeed_Cache_Admin_Settings::get_instance()->validate_plugin_settings( $options, true ) ;
764
+ $this->update_options( $output ) ;
765
+
766
+ LiteSpeed_Cache_Log::debug( '[Cfg] Changed cfg ' . $cfg . ' to ' . var_export( $cfg_v, true ) ) ;
767
+
768
+ $msg = __( 'Changed setting successfully.', 'litespeed-cache' ) ;
769
+ LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
770
+ }
771
+
772
+ /**
773
+ * Handle all request actions from main cls
774
+ *
775
+ * @since 2.9
776
+ * @access public
777
+ */
778
+ public static function handler()
779
+ {
780
+ $instance = self::get_instance() ;
781
+
782
+ $type = LiteSpeed_Cache_Router::verify_type() ;
783
+
784
+ switch ( $type ) {
785
+ case self::TYPE_SET :
786
+ $instance->_set_cfg() ;
787
+ break ;
788
+
789
+ default:
790
+ break ;
791
+ }
792
+
793
+ LiteSpeed_Cache_Admin::redirect() ;
794
+ }
795
+
796
  /**
797
  * Get the current instance object.
798
  *
inc/const.cls.php CHANGED
@@ -16,6 +16,7 @@ class LiteSpeed_Cache_Const
16
  const ITEM_OPTM_CSS = 'litespeed-optm-css' ;// separate critical css that should be stored in option table
17
  const ITEM_OPTM_JS_DEFER_EXC = 'litespeed-optm-js-defer-excludes' ;
18
  const ITEM_MEDIA_LAZY_IMG_EXC = 'litespeed-media-lazy-img-excludes' ;
 
19
  const ITEM_IMG_OPTM_NEED_PULL = 'litespeed-media-need-pull' ;
20
  const ITEM_ENV_REF = 'litespeed-env-ref' ;
21
  const ITEM_CACHE_DROP_QS = 'litespeed-cache-drop_qs' ;
@@ -246,6 +247,7 @@ class LiteSpeed_Cache_Const
246
  self::ITEM_OPTM_CSS,
247
  self::ITEM_OPTM_JS_DEFER_EXC,
248
  self::ITEM_MEDIA_LAZY_IMG_EXC,
 
249
  self::ITEM_IMG_OPTM_NEED_PULL,
250
  self::ITEM_ENV_REF,
251
  self::ITEM_CACHE_DROP_QS,
16
  const ITEM_OPTM_CSS = 'litespeed-optm-css' ;// separate critical css that should be stored in option table
17
  const ITEM_OPTM_JS_DEFER_EXC = 'litespeed-optm-js-defer-excludes' ;
18
  const ITEM_MEDIA_LAZY_IMG_EXC = 'litespeed-media-lazy-img-excludes' ;
19
+ const ITEM_MEDIA_LAZY_IMG_CLS_EXC = 'litespeed-media-lazy-img-cls-excludes' ;
20
  const ITEM_IMG_OPTM_NEED_PULL = 'litespeed-media-need-pull' ;
21
  const ITEM_ENV_REF = 'litespeed-env-ref' ;
22
  const ITEM_CACHE_DROP_QS = 'litespeed-cache-drop_qs' ;
247
  self::ITEM_OPTM_CSS,
248
  self::ITEM_OPTM_JS_DEFER_EXC,
249
  self::ITEM_MEDIA_LAZY_IMG_EXC,
250
+ self::ITEM_MEDIA_LAZY_IMG_CLS_EXC,
251
  self::ITEM_IMG_OPTM_NEED_PULL,
252
  self::ITEM_ENV_REF,
253
  self::ITEM_CACHE_DROP_QS,
inc/control.class.php CHANGED
@@ -522,10 +522,13 @@ class LiteSpeed_Cache_Control
522
  // Check if URI is forced cache
523
  $excludes = LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_FORCE_CACHE_URI ) ;
524
  if ( ! empty( $excludes ) ) {
525
- $result = LiteSpeed_Cache_Utility::str_hit_array( $_SERVER[ 'REQUEST_URI' ], $excludes ) ;
526
  if ( $result ) {
527
  self::force_cacheable() ;
528
  LiteSpeed_Cache_Log::debug( '[Ctrl] Forced cacheable due to setting: ' . $result ) ;
 
 
 
529
  }
530
  }
531
 
522
  // Check if URI is forced cache
523
  $excludes = LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_FORCE_CACHE_URI ) ;
524
  if ( ! empty( $excludes ) ) {
525
+ list( $result, $this_ttl ) = LiteSpeed_Cache_Utility::str_hit_array( $_SERVER[ 'REQUEST_URI' ], $excludes, true ) ;
526
  if ( $result ) {
527
  self::force_cacheable() ;
528
  LiteSpeed_Cache_Log::debug( '[Ctrl] Forced cacheable due to setting: ' . $result ) ;
529
+ if ( $this_ttl ) {
530
+ self::set_custom_ttl( $this_ttl ) ;
531
+ }
532
  }
533
  }
534
 
inc/css.cls.php CHANGED
@@ -34,7 +34,7 @@ class LiteSpeed_Cache_CSS
34
  $rules = self::get_instance()->_ccss() ;
35
 
36
  // Append default critical css
37
- $rules .= get_option( LiteSpeed_Cache_Config::ITEM_OPTM_CSS ) ;
38
 
39
  $html_head = '<style id="litespeed-optm-css-rules">' . $rules . '</style>' . $html_head ;
40
 
@@ -239,8 +239,6 @@ class LiteSpeed_Cache_CSS
239
  $this->_save_summary( $req_summary ) ;
240
 
241
  // Generate critical css
242
- $url = 'http://ccss.api.litespeedtech.com' ;
243
-
244
  $data = array(
245
  'home_url' => home_url(),
246
  'url' => $request_url,
@@ -249,32 +247,9 @@ class LiteSpeed_Cache_CSS
249
  'is_mobile' => $is_mobile ? 1 : 0,
250
  ) ;
251
 
252
- LiteSpeed_Cache_Log::debug( '[CSS] posting to : ' . $url, $data ) ;
253
-
254
- $param = array(
255
- 'v' => LiteSpeed_Cache::PLUGIN_VERSION,
256
- 'data' => $data,
257
- ) ;
258
-
259
- $response = wp_remote_post( $url, array( 'body' => $param, 'timeout' => 15 ) ) ;
260
-
261
- // Parse response data
262
- if ( is_wp_error( $response ) ) {
263
- $error_message = $response->get_error_message() ;
264
- LiteSpeed_Cache_Log::debug( '[CSS] failed to post: ' . $error_message ) ;
265
- return false ;
266
- }
267
 
268
- $json = json_decode( $response[ 'body' ], true ) ;
269
- if ( ! is_array( $json ) ) {
270
- LiteSpeed_Cache_Log::debug( '[CSS] failed to decode post json: ' . $response[ 'body' ] ) ;
271
- return false ;
272
- }
273
-
274
- if ( ! empty( $json[ '_err' ] ) ) {
275
- LiteSpeed_Cache_Log::debug( '[CSS] _err: ' . $json[ '_err' ] ) ;
276
- return false ;
277
- }
278
 
279
  if ( empty( $json[ 'ccss' ] ) ) {
280
  LiteSpeed_Cache_Log::debug( '[CSS] empty ccss ' ) ;
@@ -311,28 +286,7 @@ class LiteSpeed_Cache_CSS
311
  */
312
  private function _which_css()
313
  {
314
- $css = 'default' ;
315
- if ( is_404() ) {
316
- $css = '404' ;
317
- }
318
- elseif ( is_singular() ) {
319
- $css = get_post_type() ;
320
- }
321
- elseif ( is_home() && get_option( 'show_on_front' ) == 'page' ) {
322
- $css = 'home' ;
323
- }
324
- elseif ( is_front_page() ) {
325
- $css = 'front' ;
326
- }
327
- elseif ( is_tax() ) {
328
- $css = get_queried_object()->taxonomy ;
329
- }
330
- elseif ( is_category() ) {
331
- $css = 'category' ;
332
- }
333
- elseif ( is_tag() ) {
334
- $css = 'tag' ;
335
- }
336
 
337
  $unique = false ;
338
 
34
  $rules = self::get_instance()->_ccss() ;
35
 
36
  // Append default critical css
37
+ $rules .= LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_OPTM_CSS, true ) ;
38
 
39
  $html_head = '<style id="litespeed-optm-css-rules">' . $rules . '</style>' . $html_head ;
40
 
239
  $this->_save_summary( $req_summary ) ;
240
 
241
  // Generate critical css
 
 
242
  $data = array(
243
  'home_url' => home_url(),
244
  'url' => $request_url,
247
  'is_mobile' => $is_mobile ? 1 : 0,
248
  ) ;
249
 
250
+ LiteSpeed_Cache_Log::debug( '[CSS] Generating: ', $data ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
 
252
+ $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_CCSS, $data, true, false ) ;
 
 
 
 
 
 
 
 
 
253
 
254
  if ( empty( $json[ 'ccss' ] ) ) {
255
  LiteSpeed_Cache_Log::debug( '[CSS] empty ccss ' ) ;
286
  */
287
  private function _which_css()
288
  {
289
+ $css = LiteSpeed_Cache_Utility::page_type() ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
 
291
  $unique = false ;
292
 
inc/esi.class.php CHANGED
@@ -177,6 +177,10 @@ class LiteSpeed_Cache_ESI
177
  {
178
  do_action('litespeed_cache_is_not_esi_template') ;
179
 
 
 
 
 
180
  if ( LiteSpeed_Cache_Router::is_ajax() ) {
181
  return ;
182
  }
177
  {
178
  do_action('litespeed_cache_is_not_esi_template') ;
179
 
180
+ if ( ! LiteSpeed_Cache_Control::is_cacheable() ) {
181
+ return ;
182
+ }
183
+
184
  if ( LiteSpeed_Cache_Router::is_ajax() ) {
185
  return ;
186
  }
inc/gui.class.php CHANGED
@@ -19,10 +19,22 @@ class LiteSpeed_Cache_GUI
19
 
20
  private static $_clean_counter = 0 ;
21
 
 
 
 
 
 
 
 
 
 
 
22
  const TYPE_DISMISS_WHM = 'whm' ;
23
  const TYPE_DISMISS_EXPIRESDEFAULT = 'ExpiresDefault' ;
24
  const TYPE_DISMISS_PROMO = 'promo' ;
25
 
 
 
26
  /**
27
  * Init
28
  *
@@ -82,14 +94,16 @@ class LiteSpeed_Cache_GUI
82
  *
83
  * @since 1.6.6
84
  */
85
- public static function pie( $percent, $width = 50, $finished_tick = false )
86
  {
87
- $percentage = '<text x="16.91549431" y="15.5">' . $percent . '%</text>' ;
 
88
  if ( $percent == 100 && $finished_tick ) {
89
  $percentage = '<text x="16.91549431" y="15.5" class="litespeed-pie-done">&#x2713</text>' ;
90
  }
 
91
  return "
92
- <svg class='litespeed-pie' viewbox='0 0 33.83098862 33.83098862' width='$width' height='$width' xmlns='http://www.w3.org/2000/svg'>
93
  <circle class='litespeed-pie_bg' />
94
  <circle class='litespeed-pie_circle' stroke-dasharray='$percent,100' />
95
  <g class='litespeed-pie_info'>$percentage</g>
@@ -98,6 +112,52 @@ class LiteSpeed_Cache_GUI
98
 
99
  }
100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  /**
102
  * Dismiss banner
103
  *
@@ -106,6 +166,7 @@ class LiteSpeed_Cache_GUI
106
  */
107
  public static function dismiss()
108
  {
 
109
  switch ( LiteSpeed_Cache_Router::verify_type() ) {
110
  case self::TYPE_DISMISS_WHM :
111
  LiteSpeed_Cache_Activation::dismiss_whm() ;
@@ -116,28 +177,48 @@ class LiteSpeed_Cache_GUI
116
  break ;
117
 
118
  case self::TYPE_DISMISS_PROMO :
 
 
 
119
 
120
- if ( ! empty( $_GET[ 'slack' ] ) ) {
121
- // Update slack
122
- update_option( 'litespeed-banner-promo-slack', 'done' ) ;
123
 
124
- defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Dismiss promo slack' ) ;
 
125
  }
126
- else {
127
- // Update welcome banner
128
- update_option( 'litespeed-banner-promo', ! empty( $_GET[ 'done' ] ) ? 'done' : time() ) ;
129
 
130
- defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Dismiss promo welcome' ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  }
132
 
 
 
133
  break ;
134
 
135
  default:
136
  break ;
137
  }
138
 
139
- // All dismiss actions are considered as ajax call, so just exit
140
- exit( json_encode( array( 'success' => 1 ) ) ) ;
 
 
 
 
 
141
  }
142
 
143
  /**
@@ -161,80 +242,113 @@ class LiteSpeed_Cache_GUI
161
  */
162
  public static function has_whm_msg()
163
  {
164
- return get_transient( LiteSpeed_Cache::WHM_TRANSIENT ) == LiteSpeed_Cache::WHM_TRANSIENT_VAL ;
165
  }
166
 
167
  /**
168
- * Display promo banner
169
  *
170
- * @since 2.1
171
- * @access public
172
  */
173
- public static function show_promo()
174
  {
175
- include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
176
- include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.slack.php" ;
 
 
 
 
 
 
 
 
 
 
 
177
 
178
- include_once LSCWP_DIR . "admin/tpl/inc/disabled_all.php" ;
179
  }
180
 
181
  /**
182
- * Detect if need to display promo banner or not
183
  *
184
  * @since 2.1
185
  * @access public
186
  */
187
- public static function should_show_promo( $banner = false )
188
  {
189
- // Only show one promo at one time
190
- if ( defined( 'LITESPEED_PROMO_SHOWN' ) ) {
191
- return false ;
192
- }
193
 
194
- if ( ! self::has_promo_msg( $banner ) ) {
195
- return false ;
196
  }
197
 
198
- defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Show promo ' . $banner ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
 
200
- ! defined( 'LITESPEED_PROMO_SHOWN' ) && define( 'LITESPEED_PROMO_SHOWN', true ) ;
 
 
 
201
 
202
- return true ;
203
  }
204
 
205
  /**
206
- * Check if has promotion notice
207
  *
208
- * @since 1.3.2
209
- * @access public
210
- * @return boolean
211
  */
212
- public static function has_promo_msg( $banner = false )
213
  {
214
- // How many days delayed to show the banner
215
- $delay_days = 2 ;
216
- if ( $banner == 'slack' ) {
217
- $delay_days = 3 ;
218
- }
219
 
220
- $option_name = 'litespeed-banner-promo' ;
221
- if ( $banner ) {
222
- $option_name .= '-' . $banner ;
223
- }
224
-
225
- $promo = get_option( $option_name ) ;
226
- if ( ! $promo ) {
227
- update_option( $option_name, time() - 86400 * ( 10 - $delay_days ) ) ;
228
- return false ;
229
- }
230
- if ( $promo == 'done' ) {
231
- return false ;
232
- }
233
- if ( $promo && time() - $promo < 864000 ) {
234
- return false ;
235
- }
236
 
237
- return true ;
238
  }
239
 
240
  /**
19
 
20
  private static $_clean_counter = 0 ;
21
 
22
+ private $_promo_true ;
23
+
24
+ // [ file_tag => [ days, litespeed_only ], ... ]
25
+ private $_promo_list = array(
26
+ 'banner_promo.new_version' => array( 1, false ),
27
+ 'banner_promo' => array( 5, false ),
28
+ // 'banner_promo.slack' => array( 3, false ),
29
+ ) ;
30
+
31
+
32
  const TYPE_DISMISS_WHM = 'whm' ;
33
  const TYPE_DISMISS_EXPIRESDEFAULT = 'ExpiresDefault' ;
34
  const TYPE_DISMISS_PROMO = 'promo' ;
35
 
36
+ const GUI_SUMMARY = 'litespeed-gui-summary' ;
37
+
38
  /**
39
  * Init
40
  *
94
  *
95
  * @since 1.6.6
96
  */
97
+ public static function pie( $percent, $width = 50, $finished_tick = false, $without_percentage = false, $append_cls = false )
98
  {
99
+ $percentage = '<text x="16.91549431" y="15.5">' . $percent . ( $without_percentage ? '' : '%' ) . '</text>' ;
100
+
101
  if ( $percent == 100 && $finished_tick ) {
102
  $percentage = '<text x="16.91549431" y="15.5" class="litespeed-pie-done">&#x2713</text>' ;
103
  }
104
+
105
  return "
106
+ <svg class='litespeed-pie $append_cls' viewbox='0 0 33.83098862 33.83098862' width='$width' height='$width' xmlns='http://www.w3.org/2000/svg'>
107
  <circle class='litespeed-pie_bg' />
108
  <circle class='litespeed-pie_circle' stroke-dasharray='$percent,100' />
109
  <g class='litespeed-pie_info'>$percentage</g>
112
 
113
  }
114
 
115
+ /**
116
+ * Get classname of PageSpeed Score
117
+ *
118
+ * Scale:
119
+ * 90-100 (fast)
120
+ * 50-89 (average)
121
+ * 0-49 (slow)
122
+ *
123
+ * @since 2.9
124
+ * @access public
125
+ */
126
+ public function get_cls_of_pagescore( $score )
127
+ {
128
+ if ( $score >= 90 ) {
129
+ return 'success' ;
130
+ }
131
+
132
+ if ( $score >= 50 ) {
133
+ return 'warning' ;
134
+ }
135
+
136
+ return 'danger' ;
137
+ }
138
+
139
+ /**
140
+ * Read summary
141
+ *
142
+ * @since 2.9
143
+ * @access public
144
+ */
145
+ public function get_summary()
146
+ {
147
+ return get_option( self::GUI_SUMMARY, array() ) ;
148
+ }
149
+
150
+ /**
151
+ * Save summary
152
+ *
153
+ * @since 2.9
154
+ * @access public
155
+ */
156
+ public function save_summary( $data )
157
+ {
158
+ update_option( self::GUI_SUMMARY, $data ) ;
159
+ }
160
+
161
  /**
162
  * Dismiss banner
163
  *
166
  */
167
  public static function dismiss()
168
  {
169
+ $_instance = self::get_instance() ;
170
  switch ( LiteSpeed_Cache_Router::verify_type() ) {
171
  case self::TYPE_DISMISS_WHM :
172
  LiteSpeed_Cache_Activation::dismiss_whm() ;
177
  break ;
178
 
179
  case self::TYPE_DISMISS_PROMO :
180
+ if ( empty( $_GET[ 'promo_tag' ] ) ) {
181
+ break ;
182
+ }
183
 
184
+ $promo_tag = $_GET[ 'promo_tag' ] ;
 
 
185
 
186
+ if ( empty( $_instance->_promo_list[ $promo_tag ] ) ) {
187
+ break ;
188
  }
 
 
 
189
 
190
+ $summary = $_instance->get_summary() ;
191
+
192
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Dismiss promo ' . $promo_tag ) ;
193
+
194
+ // Forever dismiss
195
+ if ( ! empty( $_GET[ 'done' ] ) ) {
196
+ $summary[ $promo_tag ] = 'done' ;
197
+ }
198
+ elseif ( ! empty( $_GET[ 'later' ] ) ) {
199
+ // Delay the banner to half year later
200
+ $summary[ $promo_tag ] = time() + 86400 * 180 ;
201
+ }
202
+ else {
203
+ // Update welcome banner to 30 days after
204
+ $summary[ $promo_tag ] = time() + 86400 * 30 ;
205
  }
206
 
207
+ $_instance->save_summary( $summary ) ;
208
+
209
  break ;
210
 
211
  default:
212
  break ;
213
  }
214
 
215
+ if ( LiteSpeed_Cache_Router::is_ajax() ) {
216
+ // All dismiss actions are considered as ajax call, so just exit
217
+ exit( json_encode( array( 'success' => 1 ) ) ) ;
218
+ }
219
+
220
+ // Plain click link, redirect to referral url
221
+ LiteSpeed_Cache_Admin::redirect() ;
222
  }
223
 
224
  /**
242
  */
243
  public static function has_whm_msg()
244
  {
245
+ return get_option( LiteSpeed_Cache::WHM_MSG ) == LiteSpeed_Cache::WHM_MSG_VAL ;
246
  }
247
 
248
  /**
249
+ * Set current page a litespeed page
250
  *
251
+ * @since 2.9
 
252
  */
253
+ private function _is_litespeed_page()
254
  {
255
+ if ( ! empty( $_GET[ 'page' ] ) && in_array( $_GET[ 'page' ],
256
+ array(
257
+ 'lscache-settings',
258
+ 'lscache-dash',
259
+ LiteSpeed_Cache::PAGE_EDIT_HTACCESS,
260
+ 'lscache-optimization',
261
+ 'lscache-crawler',
262
+ 'lscache-import',
263
+ 'lscache-report',
264
+ ) )
265
+ ) {
266
+ return true ;
267
+ }
268
 
269
+ return false ;
270
  }
271
 
272
  /**
273
+ * Display promo banner
274
  *
275
  * @since 2.1
276
  * @access public
277
  */
278
+ public function show_promo( $check_only = false )
279
  {
280
+ $is_litespeed_page = $this->_is_litespeed_page() ;
 
 
 
281
 
282
+ if ( $is_litespeed_page && ! $check_only ) {
283
+ include_once LSCWP_DIR . "admin/tpl/inc/disabled_all.php" ;
284
  }
285
 
286
+ $_summary = $this->get_summary() ;
287
+
288
+ foreach ( $this->_promo_list as $promo_tag => $v ) {
289
+ list( $delay_days, $litespeed_page_only ) = $v ;
290
+
291
+ if ( $litespeed_page_only && ! $is_litespeed_page ) {
292
+ continue ;
293
+ }
294
+
295
+ // first time check
296
+ if ( empty( $_summary[ $promo_tag ] ) ) {
297
+ $_summary[ $promo_tag ] = time() + 86400 * $delay_days ;
298
+ $this->save_summary( $_summary ) ;
299
+
300
+ continue ;
301
+ }
302
+
303
+ $promo_timestamp = $_summary[ $promo_tag ] ;
304
+
305
+ // was ticked as done
306
+ if ( $promo_timestamp == 'done' ) {
307
+ continue ;
308
+ }
309
+
310
+ // Not reach the dateline yet
311
+ if ( time() < $promo_timestamp ) {
312
+ continue ;
313
+ }
314
+
315
+ // try to load, if can pass, will set $this->_promo_true = true
316
+ $this->_promo_true = false ;
317
+ include LSCWP_DIR . "admin/tpl/inc/$promo_tag.php" ;
318
+
319
+ // If not defined, means it didn't pass the display workflow in tpl.
320
+ if ( ! $this->_promo_true ) {
321
+ continue ;
322
+ }
323
+
324
+ if ( $check_only ) {
325
+ return $promo_tag ;
326
+ }
327
+
328
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Show promo ' . $promo_tag ) ;
329
 
330
+ // Only contain one
331
+ break ;
332
+
333
+ }
334
 
335
+ return false ;
336
  }
337
 
338
  /**
339
+ * Enqueue ajax call for score updating
340
  *
341
+ * @since 2.9
342
+ * @access private
 
343
  */
344
+ private function _enqueue_score_req_ajax()
345
  {
346
+ $_summary = $this->get_summary() ;
 
 
 
 
347
 
348
+ $_summary[ 'score.last_check' ] = time() ;
349
+ $this->save_summary( $_summary ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
 
351
+ include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.ajax.php" ;
352
  }
353
 
354
  /**
inc/img_optm.class.php CHANGED
@@ -95,7 +95,7 @@ class LiteSpeed_Cache_Img_Optm
95
  */
96
  private function _sync_data( $try_level_up = false )
97
  {
98
- $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_MEDIA_SYNC_DATA ) ;
99
 
100
  if ( ! is_array( $json ) ) {
101
  return ;
@@ -674,7 +674,7 @@ class LiteSpeed_Cache_Img_Optm
674
  ) ;
675
 
676
  // Push to LiteSpeed IAPI server
677
- $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_REQUEST_OPTIMIZE, LiteSpeed_Cache_Utility::arr2str( $data ), false, false ) ;
678
 
679
  // admin_api will handle common err
680
  if ( ! is_array( $json ) ) {
@@ -1040,17 +1040,6 @@ class LiteSpeed_Cache_Img_Optm
1040
  return ;
1041
  }
1042
 
1043
-
1044
- // send fetch request
1045
- // LiteSpeed_Cache_Log::debug( '[Img_Optm] Connecting IAPI server for [pid] ' . $row_img->post_id . ' [src_md5]' . $row_img->src_md5 ) ;
1046
- // $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_PULL_IMG, $data, $server, true ) ;
1047
-
1048
- // Check if data interrupt or not
1049
- // if ( empty( $json[ 'ok' ] ) ) {
1050
- // LiteSpeed_Cache_Log::debug( '[Img_Optm] Failed to pull optimized img: ', $json ) ;
1051
- // return ;
1052
- // }
1053
-
1054
  $local_file = $this->wp_upload_dir[ 'basedir' ] . '/' . $row_img->src ;
1055
 
1056
  // Save ori optm image
@@ -1080,9 +1069,6 @@ class LiteSpeed_Cache_Img_Optm
1080
  $q = "UPDATE $this->_table_img_optm SET optm_status = %s WHERE root_id = %d " ;
1081
  $wpdb->query( $wpdb->prepare( $q, array( self::DB_IMG_OPTIMIZE_STATUS_FAILED, $row_img->id ) ) ) ;
1082
 
1083
- // Notify server to update status
1084
- $res = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_PULL_IMG_FAILED, $server_info, $server, true ) ;
1085
-
1086
  return 'Md5 dismatch' ; // exit from running pull process
1087
  }
1088
 
@@ -1129,9 +1115,6 @@ class LiteSpeed_Cache_Img_Optm
1129
  $q = "UPDATE $this->_table_img_optm SET optm_status = %s WHERE root_id = %d " ;
1130
  $wpdb->query( $wpdb->prepare( $q, array( self::DB_IMG_OPTIMIZE_STATUS_FAILED, $row_img->id ) ) ) ;
1131
 
1132
- // Notify server to update status
1133
- LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_PULL_IMG_FAILED, $server_info, $server, true ) ;
1134
-
1135
  return 'WebP md5 dismatch' ; // exit from running pull process
1136
  }
1137
 
@@ -1161,6 +1144,7 @@ class LiteSpeed_Cache_Img_Optm
1161
  }
1162
 
1163
  // Notify IAPI images taken
 
1164
  foreach ( $server_list as $server => $img_list ) {
1165
  $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_IMG_TAKEN, $img_list, $server, true ) ;
1166
  }
@@ -1322,7 +1306,7 @@ class LiteSpeed_Cache_Img_Optm
1322
  LiteSpeed_Cache_Log::debug( '[Img_Optm] sending DESTROY_UNFINISHED cmd to LiteSpeed IAPI' ) ;
1323
 
1324
  // Push to LiteSpeed IAPI server and recover credit
1325
- $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_REQUEST_DESTROY_UNFINISHED ) ;
1326
 
1327
  // confirm link will be displayed by Admin_API automatically
1328
  if ( is_array( $json ) ) {
@@ -1377,7 +1361,7 @@ class LiteSpeed_Cache_Img_Optm
1377
  update_option( self::DB_IMG_OPTIMIZE_DESTROY, time() ) ;
1378
 
1379
  // Push to LiteSpeed IAPI server
1380
- $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_REQUEST_DESTROY ) ;
1381
 
1382
  // confirm link will be displayed by Admin_API automatically
1383
  if ( is_array( $json ) && $json ) {
95
  */
96
  private function _sync_data( $try_level_up = false )
97
  {
98
+ $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_MEDIA_SYNC_DATA, false, true ) ;
99
 
100
  if ( ! is_array( $json ) ) {
101
  return ;
674
  ) ;
675
 
676
  // Push to LiteSpeed IAPI server
677
+ $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_REQUEST_OPTIMIZE, LiteSpeed_Cache_Utility::arr2str( $data ), true, false ) ;
678
 
679
  // admin_api will handle common err
680
  if ( ! is_array( $json ) ) {
1040
  return ;
1041
  }
1042
 
 
 
 
 
 
 
 
 
 
 
 
1043
  $local_file = $this->wp_upload_dir[ 'basedir' ] . '/' . $row_img->src ;
1044
 
1045
  // Save ori optm image
1069
  $q = "UPDATE $this->_table_img_optm SET optm_status = %s WHERE root_id = %d " ;
1070
  $wpdb->query( $wpdb->prepare( $q, array( self::DB_IMG_OPTIMIZE_STATUS_FAILED, $row_img->id ) ) ) ;
1071
 
 
 
 
1072
  return 'Md5 dismatch' ; // exit from running pull process
1073
  }
1074
 
1115
  $q = "UPDATE $this->_table_img_optm SET optm_status = %s WHERE root_id = %d " ;
1116
  $wpdb->query( $wpdb->prepare( $q, array( self::DB_IMG_OPTIMIZE_STATUS_FAILED, $row_img->id ) ) ) ;
1117
 
 
 
 
1118
  return 'WebP md5 dismatch' ; // exit from running pull process
1119
  }
1120
 
1144
  }
1145
 
1146
  // Notify IAPI images taken
1147
+ $json = false ;
1148
  foreach ( $server_list as $server => $img_list ) {
1149
  $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_IMG_TAKEN, $img_list, $server, true ) ;
1150
  }
1306
  LiteSpeed_Cache_Log::debug( '[Img_Optm] sending DESTROY_UNFINISHED cmd to LiteSpeed IAPI' ) ;
1307
 
1308
  // Push to LiteSpeed IAPI server and recover credit
1309
+ $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_REQUEST_DESTROY_UNFINISHED, false, true ) ;
1310
 
1311
  // confirm link will be displayed by Admin_API automatically
1312
  if ( is_array( $json ) ) {
1361
  update_option( self::DB_IMG_OPTIMIZE_DESTROY, time() ) ;
1362
 
1363
  // Push to LiteSpeed IAPI server
1364
+ $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_REQUEST_DESTROY, false, true ) ;
1365
 
1366
  // confirm link will be displayed by Admin_API automatically
1367
  if ( is_array( $json ) && $json ) {
inc/litespeed-cache.class.php CHANGED
@@ -25,7 +25,8 @@ class LiteSpeed_Cache
25
 
26
  const NAME = 'LiteSpeed Cache' ;
27
  const PLUGIN_NAME = 'litespeed-cache' ;
28
- const PLUGIN_VERSION = '2.8.1' ;
 
29
 
30
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
31
 
@@ -50,6 +51,9 @@ class LiteSpeed_Cache
50
  const ACTION_BLACKLIST_SAVE = 'blacklist-save' ;
51
  const ACTION_CDN_CLOUDFLARE = 'cdn_cloudflare' ;
52
  const ACTION_CDN_QUIC = 'cdn_quic' ;
 
 
 
53
 
54
  const ACTION_FRONT_EXCLUDE = 'front-exclude' ;
55
 
@@ -67,8 +71,8 @@ class LiteSpeed_Cache
67
  const ACTION_SAPI_PASSIVE_CALLBACK = 'sapi_passive_callback' ;
68
  const ACTION_SAPI_AGGRESSIVE_CALLBACK = 'sapi_aggressive_callback' ;
69
 
70
- const WHM_TRANSIENT = 'lscwp_whm_install' ;
71
- const WHM_TRANSIENT_VAL = 'whm_install' ;
72
 
73
  const HEADER_DEBUG = 'X-LiteSpeed-Debug' ;
74
 
@@ -187,14 +191,24 @@ class LiteSpeed_Cache
187
  add_action( 'wp_footer', 'LiteSpeed_Cache::footer_hook' ) ;
188
 
189
  /**
190
- * Check lazy lib request in the very beginning
191
- * @since 1.4
192
- * Note: this should be before optimizer to avoid lazyload lib catched wrongly
193
  */
194
- LiteSpeed_Cache_Media::get_instance() ;
 
 
195
 
196
- // Check minify file request in the very beginning
197
- LiteSpeed_Cache_Optimize::get_instance() ;
 
 
 
 
 
 
 
 
 
198
 
199
  /**
200
  * Register vary filter
@@ -206,16 +220,20 @@ class LiteSpeed_Cache
206
  // 2. Init cacheable status
207
  LiteSpeed_Cache_Vary::get_instance() ;
208
 
209
- // Hook cdn for attachements
210
- LiteSpeed_Cache_CDN::get_instance() ;
 
 
211
 
212
  // Init Purge hooks
213
  LiteSpeed_Cache_Purge::get_instance() ;
214
 
215
  LiteSpeed_Cache_Tag::get_instance() ;
216
 
217
- // load cron tasks
218
- LiteSpeed_Cache_Task::get_instance() ;
 
 
219
 
220
  // Load 3rd party hooks
221
  add_action( 'wp_loaded', array( $this, 'load_thirdparty' ), 2 ) ;
@@ -244,19 +262,11 @@ class LiteSpeed_Cache
244
 
245
  add_filter( 'auto_update_plugin', function( $update, $item ) {
246
  if ( $item->slug == 'litespeed-cache' ) {
247
- // Check latest stable version allowed to upgrade
248
- $url = 'https://wp.api.litespeedtech.com/auto_upgrade_v' ;
249
- $response = wp_remote_get( $url, array( 'timeout' => 15 ) ) ;
250
- if ( ! is_array( $response ) || empty( $response[ 'body' ] ) ) {
251
- return false ;
252
- }
253
- $auto_v = $response[ 'body' ] ;
254
 
255
- if ( empty( $item->new_version ) || $auto_v !== $item->new_version ) {
256
- return false ;
257
  }
258
-
259
- return true ;
260
  }
261
 
262
  return $update; // Else, use the normal API response to decide whether to update or not
@@ -387,6 +397,18 @@ class LiteSpeed_Cache
387
  $msg = LiteSpeed_Cache_CDN_Quic::handler() ;
388
  break ;
389
 
 
 
 
 
 
 
 
 
 
 
 
 
390
  default:
391
  break ;
392
  }
@@ -481,6 +503,9 @@ class LiteSpeed_Cache
481
  $buffer = preg_replace( '|<!--.*?-->|s', '', $buffer ) ;
482
  }
483
  $buffer = trim( $buffer ) ;
 
 
 
484
  $is_html = stripos( $buffer, '<html' ) === 0 || stripos( $buffer, '<!DOCTYPE' ) === 0 ;
485
 
486
  if ( ! $is_html ) {
@@ -512,8 +537,10 @@ class LiteSpeed_Cache
512
  // Replace ESI preserved list
513
  $buffer = LiteSpeed_Cache_ESI::finalize( $buffer ) ;
514
 
515
- // Image lazy load check
516
- $buffer = LiteSpeed_Cache_Media::finalize( $buffer ) ;
 
 
517
 
518
  /**
519
  * Clean wrapper mainly for esi block
@@ -522,9 +549,11 @@ class LiteSpeed_Cache
522
  */
523
  $buffer = LiteSpeed_Cache_GUI::finalize( $buffer ) ;
524
 
525
- $buffer = LiteSpeed_Cache_Optimize::finalize( $buffer ) ;
 
526
 
527
- $buffer = LiteSpeed_Cache_CDN::finalize( $buffer ) ;
 
528
 
529
  $this->send_headers( true ) ;
530
 
25
 
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' ;
30
 
31
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
32
 
51
  const ACTION_BLACKLIST_SAVE = 'blacklist-save' ;
52
  const ACTION_CDN_CLOUDFLARE = 'cdn_cloudflare' ;
53
  const ACTION_CDN_QUIC = 'cdn_quic' ;
54
+ const ACTION_CFG = 'cfg' ;
55
+ const ACTION_ACTIVATION = 'activate' ;
56
+ const ACTION_UTIL = 'util' ;
57
 
58
  const ACTION_FRONT_EXCLUDE = 'front-exclude' ;
59
 
71
  const ACTION_SAPI_PASSIVE_CALLBACK = 'sapi_passive_callback' ;
72
  const ACTION_SAPI_AGGRESSIVE_CALLBACK = 'sapi_aggressive_callback' ;
73
 
74
+ const WHM_MSG = 'lscwp_whm_install' ;
75
+ const WHM_MSG_VAL = 'whm_install' ;
76
 
77
  const HEADER_DEBUG = 'X-LiteSpeed-Debug' ;
78
 
191
  add_action( 'wp_footer', 'LiteSpeed_Cache::footer_hook' ) ;
192
 
193
  /**
194
+ * Check if is non optm simulator
195
+ * @since 2.9
 
196
  */
197
+ if ( ! empty( $_GET[ LiteSpeed_Cache::ACTION_KEY ] ) && $_GET[ LiteSpeed_Cache::ACTION_KEY ] == 'before_optm' ) {
198
+ ! defined( 'LITESPEED_BYPASS_OPTM' ) && define( 'LITESPEED_BYPASS_OPTM', true ) ;
199
+ }
200
 
201
+ if ( ! defined( 'LITESPEED_BYPASS_OPTM' ) ) {
202
+ /**
203
+ * Check lazy lib request in the very beginning
204
+ * @since 1.4
205
+ * Note: this should be before optimizer to avoid lazyload lib catched wrongly
206
+ */
207
+ LiteSpeed_Cache_Media::get_instance() ;
208
+
209
+ // Check minify file request in the very beginning
210
+ LiteSpeed_Cache_Optimize::get_instance() ;
211
+ }
212
 
213
  /**
214
  * Register vary filter
220
  // 2. Init cacheable status
221
  LiteSpeed_Cache_Vary::get_instance() ;
222
 
223
+ if ( ! defined( 'LITESPEED_BYPASS_OPTM' ) ) {
224
+ // Hook cdn for attachements
225
+ LiteSpeed_Cache_CDN::get_instance() ;
226
+ }
227
 
228
  // Init Purge hooks
229
  LiteSpeed_Cache_Purge::get_instance() ;
230
 
231
  LiteSpeed_Cache_Tag::get_instance() ;
232
 
233
+ if ( ! defined( 'LITESPEED_BYPASS_OPTM' ) ) {
234
+ // load cron tasks
235
+ LiteSpeed_Cache_Task::get_instance() ;
236
+ }
237
 
238
  // Load 3rd party hooks
239
  add_action( 'wp_loaded', array( $this, 'load_thirdparty' ), 2 ) ;
262
 
263
  add_filter( 'auto_update_plugin', function( $update, $item ) {
264
  if ( $item->slug == 'litespeed-cache' ) {
265
+ $auto_v = LiteSpeed_Cache_Utility::version_check() ;
 
 
 
 
 
 
266
 
267
+ if ( $auto_v && ! empty( $item->new_version ) && $auto_v === $item->new_version ) {
268
+ return true ;
269
  }
 
 
270
  }
271
 
272
  return $update; // Else, use the normal API response to decide whether to update or not
397
  $msg = LiteSpeed_Cache_CDN_Quic::handler() ;
398
  break ;
399
 
400
+ case LiteSpeed_Cache::ACTION_CFG :
401
+ $msg = LiteSpeed_Cache_Config::handler() ;
402
+ break ;
403
+
404
+ case LiteSpeed_Cache::ACTION_ACTIVATION :
405
+ $msg = LiteSpeed_Cache_Activation::handler() ;
406
+ break ;
407
+
408
+ case LiteSpeed_Cache::ACTION_UTIL :
409
+ $msg = LiteSpeed_Cache_Utility::handler() ;
410
+ break ;
411
+
412
  default:
413
  break ;
414
  }
503
  $buffer = preg_replace( '|<!--.*?-->|s', '', $buffer ) ;
504
  }
505
  $buffer = trim( $buffer ) ;
506
+
507
+ $buffer = Litespeed_File::remove_zero_space( $buffer ) ;
508
+
509
  $is_html = stripos( $buffer, '<html' ) === 0 || stripos( $buffer, '<!DOCTYPE' ) === 0 ;
510
 
511
  if ( ! $is_html ) {
537
  // Replace ESI preserved list
538
  $buffer = LiteSpeed_Cache_ESI::finalize( $buffer ) ;
539
 
540
+ if ( ! defined( 'LITESPEED_BYPASS_OPTM' ) ) {
541
+ // Image lazy load check
542
+ $buffer = LiteSpeed_Cache_Media::finalize( $buffer ) ;
543
+ }
544
 
545
  /**
546
  * Clean wrapper mainly for esi block
549
  */
550
  $buffer = LiteSpeed_Cache_GUI::finalize( $buffer ) ;
551
 
552
+ if ( ! defined( 'LITESPEED_BYPASS_OPTM' ) ) {
553
+ $buffer = LiteSpeed_Cache_Optimize::finalize( $buffer ) ;
554
 
555
+ $buffer = LiteSpeed_Cache_CDN::finalize( $buffer ) ;
556
+ }
557
 
558
  $this->send_headers( true ) ;
559
 
inc/media.class.php CHANGED
@@ -511,6 +511,8 @@ eot;
511
  */
512
  $excludes = apply_filters( 'litespeed_cache_media_lazy_img_excludes', LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_MEDIA_LAZY_IMG_EXC ) ) ;
513
 
 
 
514
  $src_list = array() ;
515
  $html_list = array() ;
516
  $placeholder_list = array() ;
@@ -540,6 +542,11 @@ eot;
540
  continue ;
541
  }
542
 
 
 
 
 
 
543
  /**
544
  * Exclude from lazyload by setting
545
  * @since 1.5
@@ -907,20 +914,13 @@ eot;
907
  $this->_save_summary( $req_summary ) ;
908
 
909
  // Generate placeholder
910
- $url = 'https://wp.api.litespeedtech.com/placeholder/' . $size . '?v=' . LiteSpeed_Cache::PLUGIN_VERSION . '&c=' . $this->_cfg_placeholder_resp_color ;
911
-
912
- LiteSpeed_Cache_Log::debug( '[Media] posting to : ' . $url ) ;
913
-
914
- $response = wp_remote_get( $url, array( 'timeout' => 15 ) ) ;
915
-
916
- // Parse response data
917
- if ( is_wp_error( $response ) ) {
918
- $error_message = $response->get_error_message() ;
919
- LiteSpeed_Cache_Log::debug( '[Media] failed to post: ' . $error_message ) ;
920
- return false ;
921
- }
922
 
923
- $data = $response[ 'body' ] ;
924
 
925
  if ( strpos( $data, 'data:image/png;base64,' ) !== 0 ) {
926
  LiteSpeed_Cache_Log::debug( '[Media] failed to decode response: ' . $data ) ;
511
  */
512
  $excludes = apply_filters( 'litespeed_cache_media_lazy_img_excludes', LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_MEDIA_LAZY_IMG_EXC ) ) ;
513
 
514
+ $cls_excludes = apply_filters( 'litespeed_media_lazy_img_cls_excludes', LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_MEDIA_LAZY_IMG_CLS_EXC ) ) ;
515
+
516
  $src_list = array() ;
517
  $html_list = array() ;
518
  $placeholder_list = array() ;
542
  continue ;
543
  }
544
 
545
+ if ( ! empty( $attrs[ 'class' ] ) && $hit = LiteSpeed_Cache_Utility::str_hit_array( $attrs[ 'class' ], $cls_excludes ) ) {
546
+ LiteSpeed_Cache_Log::debug2( '[Media] lazyload image cls excludes [hit] ' . $hit ) ;
547
+ continue ;
548
+ }
549
+
550
  /**
551
  * Exclude from lazyload by setting
552
  * @since 1.5
914
  $this->_save_summary( $req_summary ) ;
915
 
916
  // Generate placeholder
917
+ $req_data = array(
918
+ 'size' => $size,
919
+ 'color' => $this->_cfg_placeholder_resp_color,
920
+ ) ;
921
+ $data = LiteSpeed_Cache_Admin_API::get( LiteSpeed_Cache_Admin_API::IAPI_ACTION_PLACEHOLDER, $req_data, true ) ;
 
 
 
 
 
 
 
922
 
923
+ LiteSpeed_Cache_Log::debug( '[Media] _generate_placeholder ' ) ;
924
 
925
  if ( strpos( $data, 'data:image/png;base64,' ) !== 0 ) {
926
  LiteSpeed_Cache_Log::debug( '[Media] failed to decode response: ' . $data ) ;
inc/optimizer.class.php CHANGED
@@ -52,7 +52,9 @@ class LiteSpeed_Cache_Optimizer
52
  try {
53
  $obj = new LiteSpeed_3rd_Lib\Minify_HTML( $content, $options ) ;
54
  $content_final = $obj->process() ;
55
- $content_final .= "\n" . '<!-- Page optimized by LiteSpeed Cache @' . date('Y-m-d H:i:s') . ' -->' ;
 
 
56
  return $content_final ;
57
 
58
  } catch ( Exception $e ) {
52
  try {
53
  $obj = new LiteSpeed_3rd_Lib\Minify_HTML( $content, $options ) ;
54
  $content_final = $obj->process() ;
55
+ if ( ! defined( 'LSCACHE_ESI_SILENCE' ) ) {
56
+ $content_final .= "\n" . '<!-- Page optimized by LiteSpeed Cache @' . date('Y-m-d H:i:s') . ' -->' ;
57
+ }
58
  return $content_final ;
59
 
60
  } catch ( Exception $e ) {
inc/router.class.php CHANGED
@@ -513,6 +513,9 @@ class LiteSpeed_Cache_Router
513
  case LiteSpeed_Cache::ACTION_IMPORT:
514
  case LiteSpeed_Cache::ACTION_REPORT:
515
  case LiteSpeed_Cache::ACTION_CSS:
 
 
 
516
  if ( $_can_option && ! $_is_network_admin ) {
517
  self::$_action = $action ;
518
  }
@@ -530,9 +533,13 @@ class LiteSpeed_Cache_Router
530
  return ;
531
 
532
  case LiteSpeed_Cache::ACTION_DISMISS:
533
- if ( self::is_ajax() ) {
534
- self::$_action = $action ;
535
- }
 
 
 
 
536
  return ;
537
 
538
  default:
513
  case LiteSpeed_Cache::ACTION_IMPORT:
514
  case LiteSpeed_Cache::ACTION_REPORT:
515
  case LiteSpeed_Cache::ACTION_CSS:
516
+ case LiteSpeed_Cache::ACTION_CFG:
517
+ case LiteSpeed_Cache::ACTION_ACTIVATION:
518
+ case LiteSpeed_Cache::ACTION_UTIL:
519
  if ( $_can_option && ! $_is_network_admin ) {
520
  self::$_action = $action ;
521
  }
533
  return ;
534
 
535
  case LiteSpeed_Cache::ACTION_DISMISS:
536
+ /**
537
+ * Non ajax call can dismiss too
538
+ * @since 2.9
539
+ */
540
+ // if ( self::is_ajax() ) {
541
+ self::$_action = $action ;
542
+ // }
543
  return ;
544
 
545
  default:
inc/tag.class.php CHANGED
@@ -245,6 +245,8 @@ class LiteSpeed_Cache_Tag
245
  {
246
  $tags = array() ;
247
 
 
 
248
  $tags[] = self::build_uri_tag() ;
249
 
250
  if ( is_front_page() ) {
245
  {
246
  $tags = array() ;
247
 
248
+ $tags[] = LiteSpeed_Cache_Utility::page_type() ;
249
+
250
  $tags[] = self::build_uri_tag() ;
251
 
252
  if ( is_front_page() ) {
inc/utility.class.php CHANGED
@@ -12,6 +12,159 @@ if ( ! defined( 'WPINC' ) ) {
12
 
13
  class LiteSpeed_Cache_Utility
14
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  /**
17
  * Set seconds/timestamp to readable format
@@ -156,32 +309,54 @@ class LiteSpeed_Cache_Utility
156
  * @param array $haystack
157
  * @return bool|string False if not found, otherwise return the matched string in haystack.
158
  */
159
- public static function str_hit_array( $needle, $haystack )
160
  {
 
 
161
  foreach( $haystack as $item ) {
162
  if ( ! $item ) {
163
  continue ;
164
  }
165
 
 
 
 
 
 
 
 
 
 
166
  if ( substr( $item, -1 ) === '$' ) {
167
  // do exact match
168
  if ( substr( $item, 0, -1 ) === $needle ) {
169
- return $item ;
 
170
  }
171
  }
172
  elseif ( substr( $item, 0, 1 ) === '^' ) {
173
  // match beginning
174
  if ( substr( $item, 1 ) === substr( $needle, 0, strlen( $item ) - 1 ) ) {
175
- return $item ;
 
176
  }
177
  }
178
  else {
179
  if ( strpos( $needle, $item ) !== false ) {
180
- return $item ;
 
181
  }
182
  }
183
  }
184
 
 
 
 
 
 
 
 
 
185
  return false ;
186
  }
187
 
@@ -572,7 +747,43 @@ class LiteSpeed_Cache_Utility
572
 
573
 
574
 
575
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
576
 
 
 
577
 
 
 
 
 
 
 
 
 
 
 
 
 
578
 
 
 
 
12
 
13
  class LiteSpeed_Cache_Utility
14
  {
15
+ private static $_instance ;
16
+
17
+ const TYPE_SCORE_CHK = 'score_chk' ;
18
+
19
+
20
+ /**
21
+ * Check page score
22
+ *
23
+ * @since 2.9
24
+ * @access private
25
+ */
26
+ private function _score_check()
27
+ {
28
+ $_gui = LiteSpeed_Cache_GUI::get_instance() ;
29
+
30
+ $_summary = $_gui->get_summary() ;
31
+
32
+ $_summary[ 'score.last_check' ] = time() ;
33
+ $_gui->save_summary( $_summary ) ;
34
+
35
+ $score = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_PAGESCORE, false, true, true, 600 ) ;
36
+ $_summary[ 'score.data' ] = $score ;
37
+ $_gui->save_summary( $_summary ) ;
38
+
39
+ LiteSpeed_Cache_Log::debug( '[Util] Saved page score ', $score ) ;
40
+
41
+ exit() ;
42
+ }
43
+
44
+ /**
45
+ * Check latest version
46
+ *
47
+ * @since 2.9
48
+ * @access public
49
+ */
50
+ public static function version_check()
51
+ {
52
+ // Check latest stable version allowed to upgrade
53
+ $url = 'https://wp.api.litespeedtech.com/auto_upgrade_v' ;
54
+
55
+ $response = wp_remote_get( $url, array( 'timeout' => 15 ) ) ;
56
+ if ( ! is_array( $response ) || empty( $response[ 'body' ] ) ) {
57
+ return false ;
58
+ }
59
+
60
+ return $response[ 'body' ] ;
61
+ }
62
+
63
+ /**
64
+ * Get current page type
65
+ *
66
+ * @since 2.9
67
+ */
68
+ public static function page_type()
69
+ {
70
+ global $wp_query ;
71
+ $page_type = 'default' ;
72
+
73
+ if ( $wp_query->is_page ) {
74
+ $page_type = is_front_page() ? 'front' : 'page' ;
75
+ }
76
+ elseif ( $wp_query->is_home ) {
77
+ $page_type = 'home' ;
78
+ }
79
+ elseif ( $wp_query->is_single ) {
80
+ // $page_type = $wp_query->is_attachment ? 'attachment' : 'single' ;
81
+ $page_type = get_post_type() ;
82
+ }
83
+ elseif ( $wp_query->is_category ) {
84
+ $page_type = 'category' ;
85
+ }
86
+ elseif ( $wp_query->is_tag ) {
87
+ $page_type = 'tag' ;
88
+ }
89
+ elseif ( $wp_query->is_tax ) {
90
+ $page_type = 'tax' ;
91
+ $page_type = get_queried_object()->taxonomy ;
92
+ }
93
+ elseif ( $wp_query->is_archive ) {
94
+ if ( $wp_query->is_day ) {
95
+ $page_type = 'day' ;
96
+ }
97
+ elseif ( $wp_query->is_month ) {
98
+ $page_type = 'month' ;
99
+ }
100
+ elseif ( $wp_query->is_year ) {
101
+ $page_type = 'year' ;
102
+ }
103
+ elseif ( $wp_query->is_author ) {
104
+ $page_type = 'author' ;
105
+ }
106
+ else {
107
+ $page_type = 'archive' ;
108
+ }
109
+ }
110
+ elseif ( $wp_query->is_search ) {
111
+ $page_type = 'search' ;
112
+ }
113
+ elseif ( $wp_query->is_404 ) {
114
+ $page_type = '404' ;
115
+ }
116
+
117
+ return $page_type;
118
+
119
+ // if ( is_404() ) {
120
+ // $page_type = '404' ;
121
+ // }
122
+ // elseif ( is_singular() ) {
123
+ // $page_type = get_post_type() ;
124
+ // }
125
+ // elseif ( is_home() && get_option( 'show_on_front' ) == 'page' ) {
126
+ // $page_type = 'home' ;
127
+ // }
128
+ // elseif ( is_front_page() ) {
129
+ // $page_type = 'front' ;
130
+ // }
131
+ // elseif ( is_tax() ) {
132
+ // $page_type = get_queried_object()->taxonomy ;
133
+ // }
134
+ // elseif ( is_category() ) {
135
+ // $page_type = 'category' ;
136
+ // }
137
+ // elseif ( is_tag() ) {
138
+ // $page_type = 'tag' ;
139
+ // }
140
+
141
+ // return $page_type ;
142
+ }
143
+
144
+ /**
145
+ * Get ping speed
146
+ *
147
+ * @since 2.9
148
+ */
149
+ public static function ping( $domain )
150
+ {
151
+ $domain = parse_url( $domain, PHP_URL_HOST ) ;
152
+ $starttime = microtime( true ) ;
153
+ $file = fsockopen( $domain, 80, $errno, $errstr, 10 ) ;
154
+ $stoptime = microtime( true ) ;
155
+ $status = 0 ;
156
+
157
+ if ( ! $file ) $status = 99999 ;// Site is down
158
+ else {
159
+ fclose( $file ) ;
160
+ $status = ( $stoptime - $starttime ) * 1000 ;
161
+ $status = floor( $status ) ;
162
+ }
163
+
164
+ LiteSpeed_Cache_Log::debug( "[Util] ping [Domain] $domain \t[Speed] $status" ) ;
165
+
166
+ return $status ;
167
+ }
168
 
169
  /**
170
  * Set seconds/timestamp to readable format
309
  * @param array $haystack
310
  * @return bool|string False if not found, otherwise return the matched string in haystack.
311
  */
312
+ public static function str_hit_array( $needle, $haystack, $has_ttl = false )
313
  {
314
+ $hit = false ;
315
+ $this_ttl = 0 ;
316
  foreach( $haystack as $item ) {
317
  if ( ! $item ) {
318
  continue ;
319
  }
320
 
321
+ if ( $has_ttl ) {
322
+ $this_ttl = 0 ;
323
+ $item = explode( ' ', $item ) ;
324
+ if ( ! empty( $item[ 1 ] ) ) {
325
+ $this_ttl = $item[ 1 ] ;
326
+ }
327
+ $item = $item[ 0 ] ;
328
+ }
329
+
330
  if ( substr( $item, -1 ) === '$' ) {
331
  // do exact match
332
  if ( substr( $item, 0, -1 ) === $needle ) {
333
+ $hit = $item ;
334
+ break ;
335
  }
336
  }
337
  elseif ( substr( $item, 0, 1 ) === '^' ) {
338
  // match beginning
339
  if ( substr( $item, 1 ) === substr( $needle, 0, strlen( $item ) - 1 ) ) {
340
+ $hit = $item ;
341
+ break ;
342
  }
343
  }
344
  else {
345
  if ( strpos( $needle, $item ) !== false ) {
346
+ $hit = $item ;
347
+ break ;
348
  }
349
  }
350
  }
351
 
352
+ if ( $hit ) {
353
+ if ( $has_ttl ) {
354
+ return array( $hit, $this_ttl ) ;
355
+ }
356
+
357
+ return $hit ;
358
+ }
359
+
360
  return false ;
361
  }
362
 
747
 
748
 
749
 
750
+ /**
751
+ * Handle all request actions from main cls
752
+ *
753
+ * @since 2.9
754
+ * @access public
755
+ */
756
+ public static function handler()
757
+ {
758
+ $instance = self::get_instance() ;
759
+
760
+ $type = LiteSpeed_Cache_Router::verify_type() ;
761
+
762
+ switch ( $type ) {
763
+ case self::TYPE_SCORE_CHK :
764
+ $instance->_score_check() ;
765
+ break ;
766
+
767
+ default:
768
+ break ;
769
+ }
770
 
771
+ LiteSpeed_Cache_Admin::redirect() ;
772
+ }
773
 
774
+ /**
775
+ * Get the current instance object.
776
+ *
777
+ * @since 2.9
778
+ * @access public
779
+ * @return Current class instance.
780
+ */
781
+ public static function get_instance()
782
+ {
783
+ if ( ! isset( self::$_instance ) ) {
784
+ self::$_instance = new self() ;
785
+ }
786
 
787
+ return self::$_instance ;
788
+ }
789
+ }
includes/litespeed-cache-activation.class.php CHANGED
@@ -15,6 +15,10 @@ if ( ! defined( 'WPINC' ) ) {
15
 
16
  class LiteSpeed_Cache_Activation
17
  {
 
 
 
 
18
  const NETWORK_TRANSIENT_COUNT = 'lscwp_network_count' ;
19
 
20
  /**
@@ -79,6 +83,11 @@ class LiteSpeed_Cache_Activation
79
  $options[ $id ] = $__cfg->get_item( $id ) ;
80
  }
81
 
 
 
 
 
 
82
  LiteSpeed_Cache_Admin_Settings::get_instance()->validate_network_settings( $options, true ) ;
83
  return ;
84
  }
@@ -100,7 +109,7 @@ class LiteSpeed_Cache_Activation
100
  LiteSpeed_Cache_Admin_Settings::get_instance()->validate_plugin_settings( $options, true ) ;
101
 
102
  if ( defined( 'LSCWP_PLUGIN_NAME' ) ) {
103
- set_transient( LiteSpeed_Cache::WHM_TRANSIENT, LiteSpeed_Cache::WHM_TRANSIENT_VAL ) ;
104
  }
105
 
106
  // Register crawler cron task
@@ -305,15 +314,93 @@ class LiteSpeed_Cache_Activation
305
  }
306
 
307
  /**
308
- * Delete whm transient msg tag
309
  *
310
  * @since 1.1.1
311
  * @access public
312
  */
313
  public static function dismiss_whm()
314
  {
315
- delete_transient( LiteSpeed_Cache::WHM_TRANSIENT ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
316
  }
317
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
318
 
319
  }
15
 
16
  class LiteSpeed_Cache_Activation
17
  {
18
+ private static $_instance ;
19
+
20
+ const TYPE_UPGRADE = 'upgrade' ;
21
+
22
  const NETWORK_TRANSIENT_COUNT = 'lscwp_network_count' ;
23
 
24
  /**
83
  $options[ $id ] = $__cfg->get_item( $id ) ;
84
  }
85
 
86
+ if ( ! empty($options[ LiteSpeed_Cache_Config::ID_MOBILEVIEW_LIST ]) ) {
87
+ $options[ LiteSpeed_Cache_Config::ID_MOBILEVIEW_LIST ] =
88
+ addslashes( $options[ LiteSpeed_Cache_Config::ID_MOBILEVIEW_LIST ] );
89
+ }
90
+
91
  LiteSpeed_Cache_Admin_Settings::get_instance()->validate_network_settings( $options, true ) ;
92
  return ;
93
  }
109
  LiteSpeed_Cache_Admin_Settings::get_instance()->validate_plugin_settings( $options, true ) ;
110
 
111
  if ( defined( 'LSCWP_PLUGIN_NAME' ) ) {
112
+ update_option( LiteSpeed_Cache::WHM_MSG, LiteSpeed_Cache::WHM_MSG_VAL ) ;
113
  }
114
 
115
  // Register crawler cron task
314
  }
315
 
316
  /**
317
+ * Delete whm msg tag
318
  *
319
  * @since 1.1.1
320
  * @access public
321
  */
322
  public static function dismiss_whm()
323
  {
324
+ delete_option( LiteSpeed_Cache::WHM_MSG ) ;
325
+ }
326
+
327
+ /**
328
+ * Upgrade LSCWP
329
+ *
330
+ * @since 2.9
331
+ * @access private
332
+ */
333
+ private function _upgrade()
334
+ {
335
+ $plugin = LiteSpeed_Cache::PLUGIN_FILE ;
336
+
337
+ /**
338
+ * @see wp-admin/update.php
339
+ */
340
+ include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ;
341
+ include_once ABSPATH . 'wp-admin/includes/file.php' ;
342
+ include_once ABSPATH . 'wp-admin/includes/misc.php' ;
343
+
344
+ try {
345
+ ob_start() ;
346
+ $skin = new \WP_Ajax_Upgrader_Skin() ;
347
+ $upgrader = new \Plugin_Upgrader( $skin ) ;
348
+ $result = $upgrader->upgrade( $plugin ) ;
349
+ if ( ! is_plugin_active( $plugin ) ) {// todo: upgrade should reactivate the plugin again by WP. Need to check why disabled after upgraded.
350
+ activate_plugin( $plugin ) ;
351
+ }
352
+ ob_end_clean() ;
353
+ } catch ( \Exception $e ) {
354
+ LiteSpeed_Cache_Admin_Display::error( __( 'Failed to upgrade.', 'litespeed-cache' ) ) ;
355
+ return ;
356
+ }
357
+
358
+ if ( is_wp_error( $result ) ) {
359
+ LiteSpeed_Cache_Admin_Display::error( __( 'Failed to upgrade.', 'litespeed-cache' ) ) ;
360
+ return ;
361
+ }
362
+
363
+ LiteSpeed_Cache_Admin_Display::succeed( __( 'Upgraded successfully.', 'litespeed-cache' ) ) ;
364
  }
365
 
366
+ /**
367
+ * Handle all request actions from main cls
368
+ *
369
+ * @since 2.9
370
+ * @access public
371
+ */
372
+ public static function handler()
373
+ {
374
+ $instance = self::get_instance() ;
375
+
376
+ $type = LiteSpeed_Cache_Router::verify_type() ;
377
+
378
+ switch ( $type ) {
379
+ case self::TYPE_UPGRADE :
380
+ $instance->_upgrade() ;
381
+ break ;
382
+
383
+ default:
384
+ break ;
385
+ }
386
+
387
+ LiteSpeed_Cache_Admin::redirect() ;
388
+ }
389
+
390
+ /**
391
+ * Get the current instance object.
392
+ *
393
+ * @since 2.9
394
+ * @access public
395
+ * @return Current class instance.
396
+ */
397
+ public static function get_instance()
398
+ {
399
+ if ( ! isset( self::$_instance ) ) {
400
+ self::$_instance = new self() ;
401
+ }
402
+
403
+ return self::$_instance ;
404
+ }
405
 
406
  }
includes/litespeed-cache-config.class.php CHANGED
@@ -19,6 +19,8 @@ class LiteSpeed_Cache_Config extends LiteSpeed_Cache_Const
19
  {
20
  private static $_instance ;
21
 
 
 
22
  protected $options ;
23
  protected $vary_groups ;
24
  protected $exclude_optimization_roles ;
@@ -718,6 +720,79 @@ class LiteSpeed_Cache_Config extends LiteSpeed_Cache_Const
718
 
719
  }
720
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
721
  /**
722
  * Get the current instance object.
723
  *
19
  {
20
  private static $_instance ;
21
 
22
+ const TYPE_SET = 'set' ;
23
+
24
  protected $options ;
25
  protected $vary_groups ;
26
  protected $exclude_optimization_roles ;
720
 
721
  }
722
 
723
+ /**
724
+ * Set one config value directly
725
+ *
726
+ * @since 2.9
727
+ * @access private
728
+ */
729
+ private function _set_cfg()
730
+ {
731
+ if ( empty( $_GET[ self::TYPE_SET ] ) || ! is_array( $_GET[ self::TYPE_SET ] ) ) {
732
+ return ;
733
+ }
734
+
735
+ $cfg = $cfg_v = false ;
736
+ foreach ( $_GET[ self::TYPE_SET ] as $k => $v ) {
737
+ if ( ! isset( $this->options[ $k ] ) ) {
738
+ continue ;
739
+ }
740
+
741
+ if ( is_bool( $this->options[ $k ] ) ) {
742
+ $v = (bool) $v ;
743
+ }
744
+
745
+ $cfg = $k ;
746
+ $cfg_v = $v ;
747
+ break ;// only allow one
748
+ }
749
+
750
+ if ( ! $cfg ) {
751
+ return ;
752
+ }
753
+
754
+ $options = $this->options ;
755
+ // Get items
756
+ foreach ( $this->stored_items() as $v ) {
757
+ $options[ $v ] = $this->get_item( $v ) ;
758
+ }
759
+
760
+ // Change value
761
+ $options[ $cfg ] = $cfg_v ;
762
+
763
+ $output = LiteSpeed_Cache_Admin_Settings::get_instance()->validate_plugin_settings( $options, true ) ;
764
+ $this->update_options( $output ) ;
765
+
766
+ LiteSpeed_Cache_Log::debug( '[Cfg] Changed cfg ' . $cfg . ' to ' . var_export( $cfg_v, true ) ) ;
767
+
768
+ $msg = __( 'Changed setting successfully.', 'litespeed-cache' ) ;
769
+ LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
770
+ }
771
+
772
+ /**
773
+ * Handle all request actions from main cls
774
+ *
775
+ * @since 2.9
776
+ * @access public
777
+ */
778
+ public static function handler()
779
+ {
780
+ $instance = self::get_instance() ;
781
+
782
+ $type = LiteSpeed_Cache_Router::verify_type() ;
783
+
784
+ switch ( $type ) {
785
+ case self::TYPE_SET :
786
+ $instance->_set_cfg() ;
787
+ break ;
788
+
789
+ default:
790
+ break ;
791
+ }
792
+
793
+ LiteSpeed_Cache_Admin::redirect() ;
794
+ }
795
+
796
  /**
797
  * Get the current instance object.
798
  *
includes/litespeed-cache-control.class.php CHANGED
@@ -522,10 +522,13 @@ class LiteSpeed_Cache_Control
522
  // Check if URI is forced cache
523
  $excludes = LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_FORCE_CACHE_URI ) ;
524
  if ( ! empty( $excludes ) ) {
525
- $result = LiteSpeed_Cache_Utility::str_hit_array( $_SERVER[ 'REQUEST_URI' ], $excludes ) ;
526
  if ( $result ) {
527
  self::force_cacheable() ;
528
  LiteSpeed_Cache_Log::debug( '[Ctrl] Forced cacheable due to setting: ' . $result ) ;
 
 
 
529
  }
530
  }
531
 
522
  // Check if URI is forced cache
523
  $excludes = LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_FORCE_CACHE_URI ) ;
524
  if ( ! empty( $excludes ) ) {
525
+ list( $result, $this_ttl ) = LiteSpeed_Cache_Utility::str_hit_array( $_SERVER[ 'REQUEST_URI' ], $excludes, true ) ;
526
  if ( $result ) {
527
  self::force_cacheable() ;
528
  LiteSpeed_Cache_Log::debug( '[Ctrl] Forced cacheable due to setting: ' . $result ) ;
529
+ if ( $this_ttl ) {
530
+ self::set_custom_ttl( $this_ttl ) ;
531
+ }
532
  }
533
  }
534
 
includes/litespeed-cache-esi.class.php CHANGED
@@ -177,6 +177,10 @@ class LiteSpeed_Cache_ESI
177
  {
178
  do_action('litespeed_cache_is_not_esi_template') ;
179
 
 
 
 
 
180
  if ( LiteSpeed_Cache_Router::is_ajax() ) {
181
  return ;
182
  }
177
  {
178
  do_action('litespeed_cache_is_not_esi_template') ;
179
 
180
+ if ( ! LiteSpeed_Cache_Control::is_cacheable() ) {
181
+ return ;
182
+ }
183
+
184
  if ( LiteSpeed_Cache_Router::is_ajax() ) {
185
  return ;
186
  }
includes/litespeed-cache-gui.class.php CHANGED
@@ -19,10 +19,22 @@ class LiteSpeed_Cache_GUI
19
 
20
  private static $_clean_counter = 0 ;
21
 
 
 
 
 
 
 
 
 
 
 
22
  const TYPE_DISMISS_WHM = 'whm' ;
23
  const TYPE_DISMISS_EXPIRESDEFAULT = 'ExpiresDefault' ;
24
  const TYPE_DISMISS_PROMO = 'promo' ;
25
 
 
 
26
  /**
27
  * Init
28
  *
@@ -82,14 +94,16 @@ class LiteSpeed_Cache_GUI
82
  *
83
  * @since 1.6.6
84
  */
85
- public static function pie( $percent, $width = 50, $finished_tick = false )
86
  {
87
- $percentage = '<text x="16.91549431" y="15.5">' . $percent . '%</text>' ;
 
88
  if ( $percent == 100 && $finished_tick ) {
89
  $percentage = '<text x="16.91549431" y="15.5" class="litespeed-pie-done">&#x2713</text>' ;
90
  }
 
91
  return "
92
- <svg class='litespeed-pie' viewbox='0 0 33.83098862 33.83098862' width='$width' height='$width' xmlns='http://www.w3.org/2000/svg'>
93
  <circle class='litespeed-pie_bg' />
94
  <circle class='litespeed-pie_circle' stroke-dasharray='$percent,100' />
95
  <g class='litespeed-pie_info'>$percentage</g>
@@ -98,6 +112,52 @@ class LiteSpeed_Cache_GUI
98
 
99
  }
100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  /**
102
  * Dismiss banner
103
  *
@@ -106,6 +166,7 @@ class LiteSpeed_Cache_GUI
106
  */
107
  public static function dismiss()
108
  {
 
109
  switch ( LiteSpeed_Cache_Router::verify_type() ) {
110
  case self::TYPE_DISMISS_WHM :
111
  LiteSpeed_Cache_Activation::dismiss_whm() ;
@@ -116,28 +177,48 @@ class LiteSpeed_Cache_GUI
116
  break ;
117
 
118
  case self::TYPE_DISMISS_PROMO :
 
 
 
119
 
120
- if ( ! empty( $_GET[ 'slack' ] ) ) {
121
- // Update slack
122
- update_option( 'litespeed-banner-promo-slack', 'done' ) ;
123
 
124
- defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Dismiss promo slack' ) ;
 
125
  }
126
- else {
127
- // Update welcome banner
128
- update_option( 'litespeed-banner-promo', ! empty( $_GET[ 'done' ] ) ? 'done' : time() ) ;
129
 
130
- defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Dismiss promo welcome' ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  }
132
 
 
 
133
  break ;
134
 
135
  default:
136
  break ;
137
  }
138
 
139
- // All dismiss actions are considered as ajax call, so just exit
140
- exit( json_encode( array( 'success' => 1 ) ) ) ;
 
 
 
 
 
141
  }
142
 
143
  /**
@@ -161,80 +242,113 @@ class LiteSpeed_Cache_GUI
161
  */
162
  public static function has_whm_msg()
163
  {
164
- return get_transient( LiteSpeed_Cache::WHM_TRANSIENT ) == LiteSpeed_Cache::WHM_TRANSIENT_VAL ;
165
  }
166
 
167
  /**
168
- * Display promo banner
169
  *
170
- * @since 2.1
171
- * @access public
172
  */
173
- public static function show_promo()
174
  {
175
- include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
176
- include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.slack.php" ;
 
 
 
 
 
 
 
 
 
 
 
177
 
178
- include_once LSCWP_DIR . "admin/tpl/inc/disabled_all.php" ;
179
  }
180
 
181
  /**
182
- * Detect if need to display promo banner or not
183
  *
184
  * @since 2.1
185
  * @access public
186
  */
187
- public static function should_show_promo( $banner = false )
188
  {
189
- // Only show one promo at one time
190
- if ( defined( 'LITESPEED_PROMO_SHOWN' ) ) {
191
- return false ;
192
- }
193
 
194
- if ( ! self::has_promo_msg( $banner ) ) {
195
- return false ;
196
  }
197
 
198
- defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Show promo ' . $banner ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
 
200
- ! defined( 'LITESPEED_PROMO_SHOWN' ) && define( 'LITESPEED_PROMO_SHOWN', true ) ;
 
 
 
201
 
202
- return true ;
203
  }
204
 
205
  /**
206
- * Check if has promotion notice
207
  *
208
- * @since 1.3.2
209
- * @access public
210
- * @return boolean
211
  */
212
- public static function has_promo_msg( $banner = false )
213
  {
214
- // How many days delayed to show the banner
215
- $delay_days = 2 ;
216
- if ( $banner == 'slack' ) {
217
- $delay_days = 3 ;
218
- }
219
 
220
- $option_name = 'litespeed-banner-promo' ;
221
- if ( $banner ) {
222
- $option_name .= '-' . $banner ;
223
- }
224
-
225
- $promo = get_option( $option_name ) ;
226
- if ( ! $promo ) {
227
- update_option( $option_name, time() - 86400 * ( 10 - $delay_days ) ) ;
228
- return false ;
229
- }
230
- if ( $promo == 'done' ) {
231
- return false ;
232
- }
233
- if ( $promo && time() - $promo < 864000 ) {
234
- return false ;
235
- }
236
 
237
- return true ;
238
  }
239
 
240
  /**
19
 
20
  private static $_clean_counter = 0 ;
21
 
22
+ private $_promo_true ;
23
+
24
+ // [ file_tag => [ days, litespeed_only ], ... ]
25
+ private $_promo_list = array(
26
+ 'banner_promo.new_version' => array( 1, false ),
27
+ 'banner_promo' => array( 5, false ),
28
+ // 'banner_promo.slack' => array( 3, false ),
29
+ ) ;
30
+
31
+
32
  const TYPE_DISMISS_WHM = 'whm' ;
33
  const TYPE_DISMISS_EXPIRESDEFAULT = 'ExpiresDefault' ;
34
  const TYPE_DISMISS_PROMO = 'promo' ;
35
 
36
+ const GUI_SUMMARY = 'litespeed-gui-summary' ;
37
+
38
  /**
39
  * Init
40
  *
94
  *
95
  * @since 1.6.6
96
  */
97
+ public static function pie( $percent, $width = 50, $finished_tick = false, $without_percentage = false, $append_cls = false )
98
  {
99
+ $percentage = '<text x="16.91549431" y="15.5">' . $percent . ( $without_percentage ? '' : '%' ) . '</text>' ;
100
+
101
  if ( $percent == 100 && $finished_tick ) {
102
  $percentage = '<text x="16.91549431" y="15.5" class="litespeed-pie-done">&#x2713</text>' ;
103
  }
104
+
105
  return "
106
+ <svg class='litespeed-pie $append_cls' viewbox='0 0 33.83098862 33.83098862' width='$width' height='$width' xmlns='http://www.w3.org/2000/svg'>
107
  <circle class='litespeed-pie_bg' />
108
  <circle class='litespeed-pie_circle' stroke-dasharray='$percent,100' />
109
  <g class='litespeed-pie_info'>$percentage</g>
112
 
113
  }
114
 
115
+ /**
116
+ * Get classname of PageSpeed Score
117
+ *
118
+ * Scale:
119
+ * 90-100 (fast)
120
+ * 50-89 (average)
121
+ * 0-49 (slow)
122
+ *
123
+ * @since 2.9
124
+ * @access public
125
+ */
126
+ public function get_cls_of_pagescore( $score )
127
+ {
128
+ if ( $score >= 90 ) {
129
+ return 'success' ;
130
+ }
131
+
132
+ if ( $score >= 50 ) {
133
+ return 'warning' ;
134
+ }
135
+
136
+ return 'danger' ;
137
+ }
138
+
139
+ /**
140
+ * Read summary
141
+ *
142
+ * @since 2.9
143
+ * @access public
144
+ */
145
+ public function get_summary()
146
+ {
147
+ return get_option( self::GUI_SUMMARY, array() ) ;
148
+ }
149
+
150
+ /**
151
+ * Save summary
152
+ *
153
+ * @since 2.9
154
+ * @access public
155
+ */
156
+ public function save_summary( $data )
157
+ {
158
+ update_option( self::GUI_SUMMARY, $data ) ;
159
+ }
160
+
161
  /**
162
  * Dismiss banner
163
  *
166
  */
167
  public static function dismiss()
168
  {
169
+ $_instance = self::get_instance() ;
170
  switch ( LiteSpeed_Cache_Router::verify_type() ) {
171
  case self::TYPE_DISMISS_WHM :
172
  LiteSpeed_Cache_Activation::dismiss_whm() ;
177
  break ;
178
 
179
  case self::TYPE_DISMISS_PROMO :
180
+ if ( empty( $_GET[ 'promo_tag' ] ) ) {
181
+ break ;
182
+ }
183
 
184
+ $promo_tag = $_GET[ 'promo_tag' ] ;
 
 
185
 
186
+ if ( empty( $_instance->_promo_list[ $promo_tag ] ) ) {
187
+ break ;
188
  }
 
 
 
189
 
190
+ $summary = $_instance->get_summary() ;
191
+
192
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Dismiss promo ' . $promo_tag ) ;
193
+
194
+ // Forever dismiss
195
+ if ( ! empty( $_GET[ 'done' ] ) ) {
196
+ $summary[ $promo_tag ] = 'done' ;
197
+ }
198
+ elseif ( ! empty( $_GET[ 'later' ] ) ) {
199
+ // Delay the banner to half year later
200
+ $summary[ $promo_tag ] = time() + 86400 * 180 ;
201
+ }
202
+ else {
203
+ // Update welcome banner to 30 days after
204
+ $summary[ $promo_tag ] = time() + 86400 * 30 ;
205
  }
206
 
207
+ $_instance->save_summary( $summary ) ;
208
+
209
  break ;
210
 
211
  default:
212
  break ;
213
  }
214
 
215
+ if ( LiteSpeed_Cache_Router::is_ajax() ) {
216
+ // All dismiss actions are considered as ajax call, so just exit
217
+ exit( json_encode( array( 'success' => 1 ) ) ) ;
218
+ }
219
+
220
+ // Plain click link, redirect to referral url
221
+ LiteSpeed_Cache_Admin::redirect() ;
222
  }
223
 
224
  /**
242
  */
243
  public static function has_whm_msg()
244
  {
245
+ return get_option( LiteSpeed_Cache::WHM_MSG ) == LiteSpeed_Cache::WHM_MSG_VAL ;
246
  }
247
 
248
  /**
249
+ * Set current page a litespeed page
250
  *
251
+ * @since 2.9
 
252
  */
253
+ private function _is_litespeed_page()
254
  {
255
+ if ( ! empty( $_GET[ 'page' ] ) && in_array( $_GET[ 'page' ],
256
+ array(
257
+ 'lscache-settings',
258
+ 'lscache-dash',
259
+ LiteSpeed_Cache::PAGE_EDIT_HTACCESS,
260
+ 'lscache-optimization',
261
+ 'lscache-crawler',
262
+ 'lscache-import',
263
+ 'lscache-report',
264
+ ) )
265
+ ) {
266
+ return true ;
267
+ }
268
 
269
+ return false ;
270
  }
271
 
272
  /**
273
+ * Display promo banner
274
  *
275
  * @since 2.1
276
  * @access public
277
  */
278
+ public function show_promo( $check_only = false )
279
  {
280
+ $is_litespeed_page = $this->_is_litespeed_page() ;
 
 
 
281
 
282
+ if ( $is_litespeed_page && ! $check_only ) {
283
+ include_once LSCWP_DIR . "admin/tpl/inc/disabled_all.php" ;
284
  }
285
 
286
+ $_summary = $this->get_summary() ;
287
+
288
+ foreach ( $this->_promo_list as $promo_tag => $v ) {
289
+ list( $delay_days, $litespeed_page_only ) = $v ;
290
+
291
+ if ( $litespeed_page_only && ! $is_litespeed_page ) {
292
+ continue ;
293
+ }
294
+
295
+ // first time check
296
+ if ( empty( $_summary[ $promo_tag ] ) ) {
297
+ $_summary[ $promo_tag ] = time() + 86400 * $delay_days ;
298
+ $this->save_summary( $_summary ) ;
299
+
300
+ continue ;
301
+ }
302
+
303
+ $promo_timestamp = $_summary[ $promo_tag ] ;
304
+
305
+ // was ticked as done
306
+ if ( $promo_timestamp == 'done' ) {
307
+ continue ;
308
+ }
309
+
310
+ // Not reach the dateline yet
311
+ if ( time() < $promo_timestamp ) {
312
+ continue ;
313
+ }
314
+
315
+ // try to load, if can pass, will set $this->_promo_true = true
316
+ $this->_promo_true = false ;
317
+ include LSCWP_DIR . "admin/tpl/inc/$promo_tag.php" ;
318
+
319
+ // If not defined, means it didn't pass the display workflow in tpl.
320
+ if ( ! $this->_promo_true ) {
321
+ continue ;
322
+ }
323
+
324
+ if ( $check_only ) {
325
+ return $promo_tag ;
326
+ }
327
+
328
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Show promo ' . $promo_tag ) ;
329
 
330
+ // Only contain one
331
+ break ;
332
+
333
+ }
334
 
335
+ return false ;
336
  }
337
 
338
  /**
339
+ * Enqueue ajax call for score updating
340
  *
341
+ * @since 2.9
342
+ * @access private
 
343
  */
344
+ private function _enqueue_score_req_ajax()
345
  {
346
+ $_summary = $this->get_summary() ;
 
 
 
 
347
 
348
+ $_summary[ 'score.last_check' ] = time() ;
349
+ $this->save_summary( $_summary ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
 
351
+ include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.ajax.php" ;
352
  }
353
 
354
  /**
includes/litespeed-cache-router.class.php CHANGED
@@ -513,6 +513,9 @@ class LiteSpeed_Cache_Router
513
  case LiteSpeed_Cache::ACTION_IMPORT:
514
  case LiteSpeed_Cache::ACTION_REPORT:
515
  case LiteSpeed_Cache::ACTION_CSS:
 
 
 
516
  if ( $_can_option && ! $_is_network_admin ) {
517
  self::$_action = $action ;
518
  }
@@ -530,9 +533,13 @@ class LiteSpeed_Cache_Router
530
  return ;
531
 
532
  case LiteSpeed_Cache::ACTION_DISMISS:
533
- if ( self::is_ajax() ) {
534
- self::$_action = $action ;
535
- }
 
 
 
 
536
  return ;
537
 
538
  default:
513
  case LiteSpeed_Cache::ACTION_IMPORT:
514
  case LiteSpeed_Cache::ACTION_REPORT:
515
  case LiteSpeed_Cache::ACTION_CSS:
516
+ case LiteSpeed_Cache::ACTION_CFG:
517
+ case LiteSpeed_Cache::ACTION_ACTIVATION:
518
+ case LiteSpeed_Cache::ACTION_UTIL:
519
  if ( $_can_option && ! $_is_network_admin ) {
520
  self::$_action = $action ;
521
  }
533
  return ;
534
 
535
  case LiteSpeed_Cache::ACTION_DISMISS:
536
+ /**
537
+ * Non ajax call can dismiss too
538
+ * @since 2.9
539
+ */
540
+ // if ( self::is_ajax() ) {
541
+ self::$_action = $action ;
542
+ // }
543
  return ;
544
 
545
  default:
includes/litespeed-cache-tag.class.php CHANGED
@@ -245,6 +245,8 @@ class LiteSpeed_Cache_Tag
245
  {
246
  $tags = array() ;
247
 
 
 
248
  $tags[] = self::build_uri_tag() ;
249
 
250
  if ( is_front_page() ) {
245
  {
246
  $tags = array() ;
247
 
248
+ $tags[] = LiteSpeed_Cache_Utility::page_type() ;
249
+
250
  $tags[] = self::build_uri_tag() ;
251
 
252
  if ( is_front_page() ) {
includes/litespeed-cache-utility.class.php CHANGED
@@ -12,6 +12,159 @@ if ( ! defined( 'WPINC' ) ) {
12
 
13
  class LiteSpeed_Cache_Utility
14
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  /**
17
  * Set seconds/timestamp to readable format
@@ -156,32 +309,54 @@ class LiteSpeed_Cache_Utility
156
  * @param array $haystack
157
  * @return bool|string False if not found, otherwise return the matched string in haystack.
158
  */
159
- public static function str_hit_array( $needle, $haystack )
160
  {
 
 
161
  foreach( $haystack as $item ) {
162
  if ( ! $item ) {
163
  continue ;
164
  }
165
 
 
 
 
 
 
 
 
 
 
166
  if ( substr( $item, -1 ) === '$' ) {
167
  // do exact match
168
  if ( substr( $item, 0, -1 ) === $needle ) {
169
- return $item ;
 
170
  }
171
  }
172
  elseif ( substr( $item, 0, 1 ) === '^' ) {
173
  // match beginning
174
  if ( substr( $item, 1 ) === substr( $needle, 0, strlen( $item ) - 1 ) ) {
175
- return $item ;
 
176
  }
177
  }
178
  else {
179
  if ( strpos( $needle, $item ) !== false ) {
180
- return $item ;
 
181
  }
182
  }
183
  }
184
 
 
 
 
 
 
 
 
 
185
  return false ;
186
  }
187
 
@@ -572,7 +747,43 @@ class LiteSpeed_Cache_Utility
572
 
573
 
574
 
575
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
576
 
 
 
577
 
 
 
 
 
 
 
 
 
 
 
 
 
578
 
 
 
 
12
 
13
  class LiteSpeed_Cache_Utility
14
  {
15
+ private static $_instance ;
16
+
17
+ const TYPE_SCORE_CHK = 'score_chk' ;
18
+
19
+
20
+ /**
21
+ * Check page score
22
+ *
23
+ * @since 2.9
24
+ * @access private
25
+ */
26
+ private function _score_check()
27
+ {
28
+ $_gui = LiteSpeed_Cache_GUI::get_instance() ;
29
+
30
+ $_summary = $_gui->get_summary() ;
31
+
32
+ $_summary[ 'score.last_check' ] = time() ;
33
+ $_gui->save_summary( $_summary ) ;
34
+
35
+ $score = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_PAGESCORE, false, true, true, 600 ) ;
36
+ $_summary[ 'score.data' ] = $score ;
37
+ $_gui->save_summary( $_summary ) ;
38
+
39
+ LiteSpeed_Cache_Log::debug( '[Util] Saved page score ', $score ) ;
40
+
41
+ exit() ;
42
+ }
43
+
44
+ /**
45
+ * Check latest version
46
+ *
47
+ * @since 2.9
48
+ * @access public
49
+ */
50
+ public static function version_check()
51
+ {
52
+ // Check latest stable version allowed to upgrade
53
+ $url = 'https://wp.api.litespeedtech.com/auto_upgrade_v' ;
54
+
55
+ $response = wp_remote_get( $url, array( 'timeout' => 15 ) ) ;
56
+ if ( ! is_array( $response ) || empty( $response[ 'body' ] ) ) {
57
+ return false ;
58
+ }
59
+
60
+ return $response[ 'body' ] ;
61
+ }
62
+
63
+ /**
64
+ * Get current page type
65
+ *
66
+ * @since 2.9
67
+ */
68
+ public static function page_type()
69
+ {
70
+ global $wp_query ;
71
+ $page_type = 'default' ;
72
+
73
+ if ( $wp_query->is_page ) {
74
+ $page_type = is_front_page() ? 'front' : 'page' ;
75
+ }
76
+ elseif ( $wp_query->is_home ) {
77
+ $page_type = 'home' ;
78
+ }
79
+ elseif ( $wp_query->is_single ) {
80
+ // $page_type = $wp_query->is_attachment ? 'attachment' : 'single' ;
81
+ $page_type = get_post_type() ;
82
+ }
83
+ elseif ( $wp_query->is_category ) {
84
+ $page_type = 'category' ;
85
+ }
86
+ elseif ( $wp_query->is_tag ) {
87
+ $page_type = 'tag' ;
88
+ }
89
+ elseif ( $wp_query->is_tax ) {
90
+ $page_type = 'tax' ;
91
+ $page_type = get_queried_object()->taxonomy ;
92
+ }
93
+ elseif ( $wp_query->is_archive ) {
94
+ if ( $wp_query->is_day ) {
95
+ $page_type = 'day' ;
96
+ }
97
+ elseif ( $wp_query->is_month ) {
98
+ $page_type = 'month' ;
99
+ }
100
+ elseif ( $wp_query->is_year ) {
101
+ $page_type = 'year' ;
102
+ }
103
+ elseif ( $wp_query->is_author ) {
104
+ $page_type = 'author' ;
105
+ }
106
+ else {
107
+ $page_type = 'archive' ;
108
+ }
109
+ }
110
+ elseif ( $wp_query->is_search ) {
111
+ $page_type = 'search' ;
112
+ }
113
+ elseif ( $wp_query->is_404 ) {
114
+ $page_type = '404' ;
115
+ }
116
+
117
+ return $page_type;
118
+
119
+ // if ( is_404() ) {
120
+ // $page_type = '404' ;
121
+ // }
122
+ // elseif ( is_singular() ) {
123
+ // $page_type = get_post_type() ;
124
+ // }
125
+ // elseif ( is_home() && get_option( 'show_on_front' ) == 'page' ) {
126
+ // $page_type = 'home' ;
127
+ // }
128
+ // elseif ( is_front_page() ) {
129
+ // $page_type = 'front' ;
130
+ // }
131
+ // elseif ( is_tax() ) {
132
+ // $page_type = get_queried_object()->taxonomy ;
133
+ // }
134
+ // elseif ( is_category() ) {
135
+ // $page_type = 'category' ;
136
+ // }
137
+ // elseif ( is_tag() ) {
138
+ // $page_type = 'tag' ;
139
+ // }
140
+
141
+ // return $page_type ;
142
+ }
143
+
144
+ /**
145
+ * Get ping speed
146
+ *
147
+ * @since 2.9
148
+ */
149
+ public static function ping( $domain )
150
+ {
151
+ $domain = parse_url( $domain, PHP_URL_HOST ) ;
152
+ $starttime = microtime( true ) ;
153
+ $file = fsockopen( $domain, 80, $errno, $errstr, 10 ) ;
154
+ $stoptime = microtime( true ) ;
155
+ $status = 0 ;
156
+
157
+ if ( ! $file ) $status = 99999 ;// Site is down
158
+ else {
159
+ fclose( $file ) ;
160
+ $status = ( $stoptime - $starttime ) * 1000 ;
161
+ $status = floor( $status ) ;
162
+ }
163
+
164
+ LiteSpeed_Cache_Log::debug( "[Util] ping [Domain] $domain \t[Speed] $status" ) ;
165
+
166
+ return $status ;
167
+ }
168
 
169
  /**
170
  * Set seconds/timestamp to readable format
309
  * @param array $haystack
310
  * @return bool|string False if not found, otherwise return the matched string in haystack.
311
  */
312
+ public static function str_hit_array( $needle, $haystack, $has_ttl = false )
313
  {
314
+ $hit = false ;
315
+ $this_ttl = 0 ;
316
  foreach( $haystack as $item ) {
317
  if ( ! $item ) {
318
  continue ;
319
  }
320
 
321
+ if ( $has_ttl ) {
322
+ $this_ttl = 0 ;
323
+ $item = explode( ' ', $item ) ;
324
+ if ( ! empty( $item[ 1 ] ) ) {
325
+ $this_ttl = $item[ 1 ] ;
326
+ }
327
+ $item = $item[ 0 ] ;
328
+ }
329
+
330
  if ( substr( $item, -1 ) === '$' ) {
331
  // do exact match
332
  if ( substr( $item, 0, -1 ) === $needle ) {
333
+ $hit = $item ;
334
+ break ;
335
  }
336
  }
337
  elseif ( substr( $item, 0, 1 ) === '^' ) {
338
  // match beginning
339
  if ( substr( $item, 1 ) === substr( $needle, 0, strlen( $item ) - 1 ) ) {
340
+ $hit = $item ;
341
+ break ;
342
  }
343
  }
344
  else {
345
  if ( strpos( $needle, $item ) !== false ) {
346
+ $hit = $item ;
347
+ break ;
348
  }
349
  }
350
  }
351
 
352
+ if ( $hit ) {
353
+ if ( $has_ttl ) {
354
+ return array( $hit, $this_ttl ) ;
355
+ }
356
+
357
+ return $hit ;
358
+ }
359
+
360
  return false ;
361
  }
362
 
747
 
748
 
749
 
750
+ /**
751
+ * Handle all request actions from main cls
752
+ *
753
+ * @since 2.9
754
+ * @access public
755
+ */
756
+ public static function handler()
757
+ {
758
+ $instance = self::get_instance() ;
759
+
760
+ $type = LiteSpeed_Cache_Router::verify_type() ;
761
+
762
+ switch ( $type ) {
763
+ case self::TYPE_SCORE_CHK :
764
+ $instance->_score_check() ;
765
+ break ;
766
+
767
+ default:
768
+ break ;
769
+ }
770
 
771
+ LiteSpeed_Cache_Admin::redirect() ;
772
+ }
773
 
774
+ /**
775
+ * Get the current instance object.
776
+ *
777
+ * @since 2.9
778
+ * @access public
779
+ * @return Current class instance.
780
+ */
781
+ public static function get_instance()
782
+ {
783
+ if ( ! isset( self::$_instance ) ) {
784
+ self::$_instance = new self() ;
785
+ }
786
 
787
+ return self::$_instance ;
788
+ }
789
+ }
includes/litespeed-cache.class.php CHANGED
@@ -25,7 +25,8 @@ class LiteSpeed_Cache
25
 
26
  const NAME = 'LiteSpeed Cache' ;
27
  const PLUGIN_NAME = 'litespeed-cache' ;
28
- const PLUGIN_VERSION = '2.8.1' ;
 
29
 
30
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
31
 
@@ -50,6 +51,9 @@ class LiteSpeed_Cache
50
  const ACTION_BLACKLIST_SAVE = 'blacklist-save' ;
51
  const ACTION_CDN_CLOUDFLARE = 'cdn_cloudflare' ;
52
  const ACTION_CDN_QUIC = 'cdn_quic' ;
 
 
 
53
 
54
  const ACTION_FRONT_EXCLUDE = 'front-exclude' ;
55
 
@@ -67,8 +71,8 @@ class LiteSpeed_Cache
67
  const ACTION_SAPI_PASSIVE_CALLBACK = 'sapi_passive_callback' ;
68
  const ACTION_SAPI_AGGRESSIVE_CALLBACK = 'sapi_aggressive_callback' ;
69
 
70
- const WHM_TRANSIENT = 'lscwp_whm_install' ;
71
- const WHM_TRANSIENT_VAL = 'whm_install' ;
72
 
73
  const HEADER_DEBUG = 'X-LiteSpeed-Debug' ;
74
 
@@ -187,14 +191,24 @@ class LiteSpeed_Cache
187
  add_action( 'wp_footer', 'LiteSpeed_Cache::footer_hook' ) ;
188
 
189
  /**
190
- * Check lazy lib request in the very beginning
191
- * @since 1.4
192
- * Note: this should be before optimizer to avoid lazyload lib catched wrongly
193
  */
194
- LiteSpeed_Cache_Media::get_instance() ;
 
 
195
 
196
- // Check minify file request in the very beginning
197
- LiteSpeed_Cache_Optimize::get_instance() ;
 
 
 
 
 
 
 
 
 
198
 
199
  /**
200
  * Register vary filter
@@ -206,16 +220,20 @@ class LiteSpeed_Cache
206
  // 2. Init cacheable status
207
  LiteSpeed_Cache_Vary::get_instance() ;
208
 
209
- // Hook cdn for attachements
210
- LiteSpeed_Cache_CDN::get_instance() ;
 
 
211
 
212
  // Init Purge hooks
213
  LiteSpeed_Cache_Purge::get_instance() ;
214
 
215
  LiteSpeed_Cache_Tag::get_instance() ;
216
 
217
- // load cron tasks
218
- LiteSpeed_Cache_Task::get_instance() ;
 
 
219
 
220
  // Load 3rd party hooks
221
  add_action( 'wp_loaded', array( $this, 'load_thirdparty' ), 2 ) ;
@@ -244,19 +262,11 @@ class LiteSpeed_Cache
244
 
245
  add_filter( 'auto_update_plugin', function( $update, $item ) {
246
  if ( $item->slug == 'litespeed-cache' ) {
247
- // Check latest stable version allowed to upgrade
248
- $url = 'https://wp.api.litespeedtech.com/auto_upgrade_v' ;
249
- $response = wp_remote_get( $url, array( 'timeout' => 15 ) ) ;
250
- if ( ! is_array( $response ) || empty( $response[ 'body' ] ) ) {
251
- return false ;
252
- }
253
- $auto_v = $response[ 'body' ] ;
254
 
255
- if ( empty( $item->new_version ) || $auto_v !== $item->new_version ) {
256
- return false ;
257
  }
258
-
259
- return true ;
260
  }
261
 
262
  return $update; // Else, use the normal API response to decide whether to update or not
@@ -387,6 +397,18 @@ class LiteSpeed_Cache
387
  $msg = LiteSpeed_Cache_CDN_Quic::handler() ;
388
  break ;
389
 
 
 
 
 
 
 
 
 
 
 
 
 
390
  default:
391
  break ;
392
  }
@@ -481,6 +503,9 @@ class LiteSpeed_Cache
481
  $buffer = preg_replace( '|<!--.*?-->|s', '', $buffer ) ;
482
  }
483
  $buffer = trim( $buffer ) ;
 
 
 
484
  $is_html = stripos( $buffer, '<html' ) === 0 || stripos( $buffer, '<!DOCTYPE' ) === 0 ;
485
 
486
  if ( ! $is_html ) {
@@ -512,8 +537,10 @@ class LiteSpeed_Cache
512
  // Replace ESI preserved list
513
  $buffer = LiteSpeed_Cache_ESI::finalize( $buffer ) ;
514
 
515
- // Image lazy load check
516
- $buffer = LiteSpeed_Cache_Media::finalize( $buffer ) ;
 
 
517
 
518
  /**
519
  * Clean wrapper mainly for esi block
@@ -522,9 +549,11 @@ class LiteSpeed_Cache
522
  */
523
  $buffer = LiteSpeed_Cache_GUI::finalize( $buffer ) ;
524
 
525
- $buffer = LiteSpeed_Cache_Optimize::finalize( $buffer ) ;
 
526
 
527
- $buffer = LiteSpeed_Cache_CDN::finalize( $buffer ) ;
 
528
 
529
  $this->send_headers( true ) ;
530
 
25
 
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' ;
30
 
31
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
32
 
51
  const ACTION_BLACKLIST_SAVE = 'blacklist-save' ;
52
  const ACTION_CDN_CLOUDFLARE = 'cdn_cloudflare' ;
53
  const ACTION_CDN_QUIC = 'cdn_quic' ;
54
+ const ACTION_CFG = 'cfg' ;
55
+ const ACTION_ACTIVATION = 'activate' ;
56
+ const ACTION_UTIL = 'util' ;
57
 
58
  const ACTION_FRONT_EXCLUDE = 'front-exclude' ;
59
 
71
  const ACTION_SAPI_PASSIVE_CALLBACK = 'sapi_passive_callback' ;
72
  const ACTION_SAPI_AGGRESSIVE_CALLBACK = 'sapi_aggressive_callback' ;
73
 
74
+ const WHM_MSG = 'lscwp_whm_install' ;
75
+ const WHM_MSG_VAL = 'whm_install' ;
76
 
77
  const HEADER_DEBUG = 'X-LiteSpeed-Debug' ;
78
 
191
  add_action( 'wp_footer', 'LiteSpeed_Cache::footer_hook' ) ;
192
 
193
  /**
194
+ * Check if is non optm simulator
195
+ * @since 2.9
 
196
  */
197
+ if ( ! empty( $_GET[ LiteSpeed_Cache::ACTION_KEY ] ) && $_GET[ LiteSpeed_Cache::ACTION_KEY ] == 'before_optm' ) {
198
+ ! defined( 'LITESPEED_BYPASS_OPTM' ) && define( 'LITESPEED_BYPASS_OPTM', true ) ;
199
+ }
200
 
201
+ if ( ! defined( 'LITESPEED_BYPASS_OPTM' ) ) {
202
+ /**
203
+ * Check lazy lib request in the very beginning
204
+ * @since 1.4
205
+ * Note: this should be before optimizer to avoid lazyload lib catched wrongly
206
+ */
207
+ LiteSpeed_Cache_Media::get_instance() ;
208
+
209
+ // Check minify file request in the very beginning
210
+ LiteSpeed_Cache_Optimize::get_instance() ;
211
+ }
212
 
213
  /**
214
  * Register vary filter
220
  // 2. Init cacheable status
221
  LiteSpeed_Cache_Vary::get_instance() ;
222
 
223
+ if ( ! defined( 'LITESPEED_BYPASS_OPTM' ) ) {
224
+ // Hook cdn for attachements
225
+ LiteSpeed_Cache_CDN::get_instance() ;
226
+ }
227
 
228
  // Init Purge hooks
229
  LiteSpeed_Cache_Purge::get_instance() ;
230
 
231
  LiteSpeed_Cache_Tag::get_instance() ;
232
 
233
+ if ( ! defined( 'LITESPEED_BYPASS_OPTM' ) ) {
234
+ // load cron tasks
235
+ LiteSpeed_Cache_Task::get_instance() ;
236
+ }
237
 
238
  // Load 3rd party hooks
239
  add_action( 'wp_loaded', array( $this, 'load_thirdparty' ), 2 ) ;
262
 
263
  add_filter( 'auto_update_plugin', function( $update, $item ) {
264
  if ( $item->slug == 'litespeed-cache' ) {
265
+ $auto_v = LiteSpeed_Cache_Utility::version_check() ;
 
 
 
 
 
 
266
 
267
+ if ( $auto_v && ! empty( $item->new_version ) && $auto_v === $item->new_version ) {
268
+ return true ;
269
  }
 
 
270
  }
271
 
272
  return $update; // Else, use the normal API response to decide whether to update or not
397
  $msg = LiteSpeed_Cache_CDN_Quic::handler() ;
398
  break ;
399
 
400
+ case LiteSpeed_Cache::ACTION_CFG :
401
+ $msg = LiteSpeed_Cache_Config::handler() ;
402
+ break ;
403
+
404
+ case LiteSpeed_Cache::ACTION_ACTIVATION :
405
+ $msg = LiteSpeed_Cache_Activation::handler() ;
406
+ break ;
407
+
408
+ case LiteSpeed_Cache::ACTION_UTIL :
409
+ $msg = LiteSpeed_Cache_Utility::handler() ;
410
+ break ;
411
+
412
  default:
413
  break ;
414
  }
503
  $buffer = preg_replace( '|<!--.*?-->|s', '', $buffer ) ;
504
  }
505
  $buffer = trim( $buffer ) ;
506
+
507
+ $buffer = Litespeed_File::remove_zero_space( $buffer ) ;
508
+
509
  $is_html = stripos( $buffer, '<html' ) === 0 || stripos( $buffer, '<!DOCTYPE' ) === 0 ;
510
 
511
  if ( ! $is_html ) {
537
  // Replace ESI preserved list
538
  $buffer = LiteSpeed_Cache_ESI::finalize( $buffer ) ;
539
 
540
+ if ( ! defined( 'LITESPEED_BYPASS_OPTM' ) ) {
541
+ // Image lazy load check
542
+ $buffer = LiteSpeed_Cache_Media::finalize( $buffer ) ;
543
+ }
544
 
545
  /**
546
  * Clean wrapper mainly for esi block
549
  */
550
  $buffer = LiteSpeed_Cache_GUI::finalize( $buffer ) ;
551
 
552
+ if ( ! defined( 'LITESPEED_BYPASS_OPTM' ) ) {
553
+ $buffer = LiteSpeed_Cache_Optimize::finalize( $buffer ) ;
554
 
555
+ $buffer = LiteSpeed_Cache_CDN::finalize( $buffer ) ;
556
+ }
557
 
558
  $this->send_headers( true ) ;
559
 
js/litespeed-cache-admin.js CHANGED
@@ -147,16 +147,12 @@ var _litespeed_dots ;
147
 
148
  /** Promo banner **/
149
  $( '#litespeed-promo-done' ).click( function( event ) {
150
- $( '.litespeed-banner-promo' ).slideUp() ;
151
  $.get( litespeed_data.ajax_url_promo + '&done=1' ) ;
152
  } ) ;
153
  $( '#litespeed-promo-later' ).click( function( event ) {
154
- $( '.litespeed-banner-promo' ).slideUp() ;
155
- $.get( litespeed_data.ajax_url_promo + '&later=1' ) ;
156
- } ) ;
157
- // Slack
158
- $(document).on('click', '#litespeed-banner-promo-slack .notice-dismiss', function () {
159
- $.get( litespeed_data.ajax_url_promo + '&slack=1' ) ;
160
  } ) ;
161
 
162
  /** CDN mapping **/
147
 
148
  /** Promo banner **/
149
  $( '#litespeed-promo-done' ).click( function( event ) {
150
+ $( '.litespeed-banner-promo-full' ).slideUp() ;
151
  $.get( litespeed_data.ajax_url_promo + '&done=1' ) ;
152
  } ) ;
153
  $( '#litespeed-promo-later' ).click( function( event ) {
154
+ $( '.litespeed-banner-promo-full' ).slideUp() ;
155
+ $.get( litespeed_data.ajax_url_promo ) ;
 
 
 
 
156
  } ) ;
157
 
158
  /** CDN mapping **/
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.8.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
- "POT-Creation-Date: 2018-12-05 15:11:19+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -12,89 +12,89 @@ msgstr ""
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: admin/admin-api.class.php:247
16
  msgid "IAPI Error %s"
17
  msgstr ""
18
 
19
- #: admin/admin-api.class.php:271
20
  msgid "Reset IAPI key successfully."
21
  msgstr ""
22
 
23
- #: admin/admin-api.class.php:324
24
  msgid "Failed to post via WordPress"
25
  msgstr ""
26
 
27
- #: admin/admin-api.class.php:332
28
  msgid "Failed to communicate with LiteSpeed image server"
29
  msgstr ""
30
 
31
- #: admin/admin-api.class.php:341
32
  msgid ""
33
  "We are working hard to improve your Image Optimization experience. The "
34
  "service will be unavailable while we work. We apologize for any "
35
  "inconvenience."
36
  msgstr ""
37
 
38
- #: admin/admin-api.class.php:350 admin/admin-api.class.php:358
39
  msgid "Message from LiteSpeed image server"
40
  msgstr ""
41
 
42
- #: admin/admin-api.class.php:366
43
  msgid "Good news from LiteSpeed image server"
44
  msgstr ""
45
 
46
- #: admin/admin-api.class.php:375
47
  msgid "%s plugin version %s required for this action."
48
  msgstr ""
49
 
50
- #: admin/litespeed-cache-admin-display.class.php:155
51
- #: admin/litespeed-cache-admin-display.class.php:246 inc/gui.class.php:369
52
- #: includes/litespeed-cache-gui.class.php:369
53
  msgid "Settings"
54
  msgstr ""
55
 
56
- #: admin/litespeed-cache-admin-display.class.php:157
57
- #: admin/tpl/setting/settings_cdn.php:230 inc/gui.class.php:361
58
- #: includes/litespeed-cache-gui.class.php:361
59
  msgid "Manage"
60
  msgstr ""
61
 
62
- #: admin/litespeed-cache-admin-display.class.php:160
63
  msgid "Edit .htaccess"
64
  msgstr ""
65
 
66
- #: admin/litespeed-cache-admin-display.class.php:164 inc/gui.class.php:378
67
- #: includes/litespeed-cache-gui.class.php:378
68
  msgid "Image Optimization"
69
  msgstr ""
70
 
71
- #: admin/litespeed-cache-admin-display.class.php:165 admin/tpl/settings.php:22
72
  msgid "Crawler"
73
  msgstr ""
74
 
75
- #: admin/litespeed-cache-admin-display.class.php:166
76
  msgid "Report"
77
  msgstr ""
78
 
79
- #: admin/litespeed-cache-admin-display.class.php:167
80
  msgid "Import / Export"
81
  msgstr ""
82
 
83
- #: admin/litespeed-cache-admin-display.class.php:170
84
  #: admin/tpl/setting/settings_debug.php:23
85
  msgid "Debug Log"
86
  msgstr ""
87
 
88
- #: admin/litespeed-cache-admin-display.class.php:266
89
  msgid ""
90
  "It is recommended that LiteSpeed Cache be purged after updating a plugin."
91
  msgstr ""
92
 
93
- #: admin/litespeed-cache-admin-display.class.php:814
94
- #: admin/litespeed-cache-admin-display.class.php:899
95
  #: admin/tpl/setting/settings_debug.php:35
96
- #: admin/tpl/setting/settings_inc.cache_mobile.php:67
97
- #: admin/tpl/setting/settings_media.php:90
98
  #: admin/tpl/setting/settings_optimize.php:138
99
  #: admin/tpl/setting/settings_optimize.php:152
100
  #: admin/tpl/setting/settings_optimize.php:153
@@ -104,12 +104,12 @@ msgstr ""
104
  msgid "ON"
105
  msgstr ""
106
 
107
- #: admin/litespeed-cache-admin-display.class.php:815
108
- #: admin/litespeed-cache-admin-display.class.php:903
109
- #: admin/tpl/setting/settings_cdn.php:25 admin/tpl/setting/settings_cdn.php:159
110
  #: admin/tpl/setting/settings_debug.php:29
111
  #: admin/tpl/setting/settings_inc.cache_object.php:149
112
- #: admin/tpl/setting/settings_media.php:93
113
  #: admin/tpl/setting/settings_optimize.php:152
114
  #: admin/tpl/setting/settings_optimize.php:164
115
  #: admin/tpl/setting/settings_tuning.php:18
@@ -117,11 +117,11 @@ msgstr ""
117
  msgid "OFF"
118
  msgstr ""
119
 
120
- #: admin/litespeed-cache-admin-display.class.php:938
121
  msgid "Recommended value: %s"
122
  msgstr ""
123
 
124
- #: admin/litespeed-cache-admin-display.class.php:954
125
  #: admin/tpl/setting/settings_media.php:38
126
  #: admin/tpl/setting/settings_optimize.php:140
127
  #: admin/tpl/setting/settings_tuning.php:24
@@ -133,51 +133,52 @@ msgstr ""
133
  msgid "API"
134
  msgstr ""
135
 
136
- #: admin/litespeed-cache-admin-display.class.php:955
137
  msgid "Server variable(s) %s available to override this setting."
138
  msgstr ""
139
 
140
- #: admin/litespeed-cache-admin-display.class.php:973
141
  #: admin/litespeed-cache-admin.class.php:228
142
  #: admin/tpl/inc/check_cache_disabled.php:49
143
  #: admin/tpl/inc/img_optm.initialize.php:29
144
- #: admin/tpl/inc/img_optm.summary.php:165 admin/tpl/manage/manage_cdn.php:60
145
  #: inc/doc.cls.php:39
146
  msgid "Learn More"
147
  msgstr ""
148
 
149
- #: admin/litespeed-cache-admin-display.class.php:987
150
  msgid "The URLs will be compared to the REQUEST_URI server variable."
151
  msgstr ""
152
 
153
- #: admin/litespeed-cache-admin-display.class.php:988
154
  msgid "For example, for %s, %s can be used here."
155
  msgstr ""
156
 
157
- #: admin/litespeed-cache-admin-display.class.php:990
158
  msgid "To match the beginning, add %s to the beginning of the item."
159
  msgstr ""
160
 
161
- #: admin/litespeed-cache-admin-display.class.php:991
162
  msgid "To do an exact match, add %s to the end of the URL."
163
  msgstr ""
164
 
165
- #: admin/litespeed-cache-admin-display.class.php:992
166
  #: admin/tpl/manage/manage_purge.php:152
167
  #: admin/tpl/setting/settings_cache.php:83
168
  #: admin/tpl/setting/settings_cdn.php:107
169
- #: admin/tpl/setting/settings_cdn.php:135
170
- #: admin/tpl/setting/settings_cdn.php:147
171
  #: admin/tpl/setting/settings_crawler.php:132
172
  #: admin/tpl/setting/settings_crawler.php:154
173
- #: admin/tpl/setting/settings_excludes.php:43
174
- #: admin/tpl/setting/settings_excludes.php:66
175
- #: admin/tpl/setting/settings_excludes.php:104
176
  #: admin/tpl/setting/settings_inc.cache_object.php:114
177
  #: admin/tpl/setting/settings_inc.cache_object.php:122
178
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:19
179
  #: admin/tpl/setting/settings_media.php:36
180
- #: admin/tpl/setting/settings_media.php:240
 
181
  #: admin/tpl/setting/settings_optimize.php:264
182
  #: admin/tpl/setting/settings_purge.php:85
183
  #: admin/tpl/setting/settings_tuning.php:38
@@ -186,19 +187,19 @@ msgstr ""
186
  msgid "One per line."
187
  msgstr ""
188
 
189
- #: admin/litespeed-cache-admin-display.class.php:1007
190
  msgid "%s groups"
191
  msgstr ""
192
 
193
- #: admin/litespeed-cache-admin-display.class.php:1010
194
  msgid "%s images"
195
  msgstr ""
196
 
197
- #: admin/litespeed-cache-admin-display.class.php:1020
198
  msgid "%s group"
199
  msgstr ""
200
 
201
- #: admin/litespeed-cache-admin-display.class.php:1023
202
  msgid "%s image"
203
  msgstr ""
204
 
@@ -446,13 +447,13 @@ msgstr ""
446
  msgid "Failed to push to LiteSpeed server: %s"
447
  msgstr ""
448
 
449
- #: admin/litespeed-cache-admin-rules.class.php:925
450
  msgid ""
451
  "<p>Please add/replace the following codes into the beginning of %1$s:</p> "
452
  "%2$s"
453
  msgstr ""
454
 
455
- #: admin/litespeed-cache-admin-rules.class.php:1027
456
  msgid "File Saved."
457
  msgstr ""
458
 
@@ -511,7 +512,7 @@ msgstr ""
511
  msgid "Or"
512
  msgstr ""
513
 
514
- #: admin/tpl/api/quic.login.php:30 admin/tpl/setting/settings_cdn.php:211
515
  msgid "User API Key"
516
  msgstr ""
517
 
@@ -531,182 +532,182 @@ msgstr ""
531
  msgid "Next"
532
  msgstr ""
533
 
534
- #: admin/tpl/crawler.php:26
535
  msgid "LiteSpeed Cache Crawler"
536
  msgstr ""
537
 
538
- #: admin/tpl/crawler.php:37
539
  msgid "Crawler File"
540
  msgstr ""
541
 
542
- #: admin/tpl/crawler.php:39
543
  msgid "Generate Crawler File"
544
  msgstr ""
545
 
546
- #: admin/tpl/crawler.php:44
547
  msgid "Generated at %s"
548
  msgstr ""
549
 
550
- #: admin/tpl/crawler.php:48
551
  msgid ""
552
  "On click, this will create a crawler sitemap file in plugin directory %s."
553
  msgstr ""
554
 
555
- #: admin/tpl/crawler.php:58
556
  msgid "%d hours"
557
  msgstr ""
558
 
559
- #: admin/tpl/crawler.php:61
560
  msgid "%d hour"
561
  msgstr ""
562
 
563
- #: admin/tpl/crawler.php:68
564
  msgid "%d minutes"
565
  msgstr ""
566
 
567
- #: admin/tpl/crawler.php:71
568
  msgid "%d minute"
569
  msgstr ""
570
 
571
- #: admin/tpl/crawler.php:77
572
  msgid "Crawler Cron"
573
  msgstr ""
574
 
575
- #: admin/tpl/crawler.php:85 admin/tpl/setting/settings_general.php:36
576
  msgid "Enable"
577
  msgstr ""
578
 
579
- #: admin/tpl/crawler.php:85 admin/tpl/esi_widget_edit.php:56
580
  #: admin/tpl/setting/settings_general.php:30
581
  msgid "Disable"
582
  msgstr ""
583
 
584
- #: admin/tpl/crawler.php:92 admin/tpl/inc/check_cache_disabled.php:38
585
  #: admin/tpl/manage/manage_cdn.php:15
586
- #: admin/tpl/setting/settings_optimize.php:15 admin/tpl/settings.php:185
587
  msgid "WARNING"
588
  msgstr ""
589
 
590
- #: admin/tpl/crawler.php:93
591
  msgid ""
592
  "The crawler feature is not enabled on the LiteSpeed server. Please consult "
593
  "your server admin."
594
  msgstr ""
595
 
596
- #: admin/tpl/crawler.php:94
597
  msgid ""
598
  "See <a %s>Introduction for Enabling the Crawler</a> for detailed information."
599
  msgstr ""
600
 
601
- #: admin/tpl/crawler.php:101
602
  msgid "Current sitemap crawl started at"
603
  msgstr ""
604
 
605
- #: admin/tpl/crawler.php:107
606
  msgid "The next complete sitemap crawl will start at"
607
  msgstr ""
608
 
609
- #: admin/tpl/crawler.php:115
610
  msgid "Last complete run time for all crawlers"
611
  msgstr ""
612
 
613
- #: admin/tpl/crawler.php:116 admin/tpl/crawler.php:123
614
  msgid "%d seconds"
615
  msgstr ""
616
 
617
- #: admin/tpl/crawler.php:122
618
  msgid "Run time for previous crawler"
619
  msgstr ""
620
 
621
- #: admin/tpl/crawler.php:129
622
  msgid "Current crawler started at"
623
  msgstr ""
624
 
625
- #: admin/tpl/crawler.php:136
626
  msgid "Last interval"
627
  msgstr ""
628
 
629
- #: admin/tpl/crawler.php:143
630
  msgid "Ended reason"
631
  msgstr ""
632
 
633
- #: admin/tpl/crawler.php:150
634
  msgid "<b>Last crawled:</b> %s item(s)"
635
  msgstr ""
636
 
637
- #: admin/tpl/crawler.php:154
638
  msgid "Reset position"
639
  msgstr ""
640
 
641
- #: admin/tpl/crawler.php:157
642
  msgid "Manually run"
643
  msgstr ""
644
 
645
- #: admin/tpl/crawler.php:164
646
  msgid "Cron Name"
647
  msgstr ""
648
 
649
- #: admin/tpl/crawler.php:165
650
  msgid "Run Frequency"
651
  msgstr ""
652
 
653
- #: admin/tpl/crawler.php:166
654
  msgid "Size"
655
  msgstr ""
656
 
657
- #: admin/tpl/crawler.php:167 admin/tpl/setting/settings_inc.cache_object.php:70
658
  msgid "Status"
659
  msgstr ""
660
 
661
- #: admin/tpl/crawler.php:190
662
  msgid "running"
663
  msgstr ""
664
 
665
- #: admin/tpl/crawler.php:200
666
  msgid "Run frequency is set by the Interval Between Runs setting."
667
  msgstr ""
668
 
669
- #: admin/tpl/crawler.php:201
670
  msgid "Only one crawler can run concurrently."
671
  msgstr ""
672
 
673
- #: admin/tpl/crawler.php:202
674
  msgid ""
675
  "If both the cron and manual run start at a similar time, the first one to "
676
  "start will run."
677
  msgstr ""
678
 
679
- #: admin/tpl/crawler.php:203
680
  msgid ""
681
  "Please follow <a %s>Hooking WP-Cron Into the System Task Scheduler</a> to "
682
  "create the system cron task."
683
  msgstr ""
684
 
685
- #: admin/tpl/crawler.php:208
686
  msgid "Watch Crawler Status"
687
  msgstr ""
688
 
689
- #: admin/tpl/crawler.php:215
690
  msgid "Show crawler status"
691
  msgstr ""
692
 
693
- #: admin/tpl/crawler.php:233
694
  msgid "No crawler meta file generated yet"
695
  msgstr ""
696
 
697
- #: admin/tpl/crawler.php:238
698
  msgid "Sitemap Generation Blacklist"
699
  msgstr ""
700
 
701
- #: admin/tpl/crawler.php:247 admin/tpl/edit_htaccess.php:69
702
  msgid "Save"
703
  msgstr ""
704
 
705
- #: admin/tpl/crawler.php:251
706
  msgid "Current blacklist has %s item(s)."
707
  msgstr ""
708
 
709
- #: admin/tpl/crawler.php:252
710
  msgid ""
711
  "All Urls which returned no-cache tags will be added here, after the initial "
712
  "crawling."
@@ -720,31 +721,31 @@ msgstr ""
720
  msgid "Clear Log"
721
  msgstr ""
722
 
723
- #: admin/tpl/edit_htaccess.php:31
724
  msgid "LiteSpeed Cache Edit .htaccess"
725
  msgstr ""
726
 
727
- #: admin/tpl/edit_htaccess.php:41
728
  msgid "This page is meant for advanced users."
729
  msgstr ""
730
 
731
- #: admin/tpl/edit_htaccess.php:43
732
  msgid "Any changes made to the .htaccess file may break the site."
733
  msgstr ""
734
 
735
- #: admin/tpl/edit_htaccess.php:44
736
  msgid "Please consult the host/server admin before making any changes."
737
  msgstr ""
738
 
739
- #: admin/tpl/edit_htaccess.php:49
740
  msgid "File editing is disabled in configuration."
741
  msgstr ""
742
 
743
- #: admin/tpl/edit_htaccess.php:59
744
  msgid "Current %s Contents"
745
  msgstr ""
746
 
747
- #: admin/tpl/edit_htaccess.php:61
748
  msgid "DO NOT EDIT ANYTHING WITHIN %s"
749
  msgstr ""
750
 
@@ -788,7 +789,7 @@ msgstr ""
788
  msgid "A TTL of 0 indicates do not cache."
789
  msgstr ""
790
 
791
- #: admin/tpl/image_optimization.php:27
792
  msgid "LiteSpeed Cache Image Optimization"
793
  msgstr ""
794
 
@@ -831,7 +832,7 @@ msgid ""
831
  "Cache settings."
832
  msgstr ""
833
 
834
- #: admin/tpl/import_export.php:58 admin/tpl/settings.php:218
835
  msgid "Reset All Settings"
836
  msgstr ""
837
 
@@ -851,10 +852,10 @@ msgstr ""
851
  msgid "Rate %s on %s"
852
  msgstr ""
853
 
854
- #. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.8.1) #-#-#-#-#
855
  #. Plugin Name of the plugin/theme
856
- #: admin/tpl/inc/admin_footer.php:6 inc/gui.class.php:353
857
- #: includes/litespeed-cache-gui.class.php:353
858
  msgid "LiteSpeed Cache"
859
  msgstr ""
860
 
@@ -874,47 +875,63 @@ msgstr ""
874
  msgid "This will also generate an API key from LiteSpeed's Server."
875
  msgstr ""
876
 
877
- #: admin/tpl/inc/banner_promo.php:14 admin/tpl/inc/banner_promo.slack.php:13
878
- msgid "Welcome to LiteSpeed"
879
  msgstr ""
880
 
881
- #: admin/tpl/inc/banner_promo.php:17
882
- msgid "Thank you for using LiteSpeed."
883
  msgstr ""
884
 
885
- #: admin/tpl/inc/banner_promo.php:19
886
- msgid ""
887
- "If you have any questions, please do not hesitate to let us know in <a "
888
- "%s>our support forum</a> or by <a %s>submitting a ticket with us</a>."
889
  msgstr ""
890
 
891
- #: admin/tpl/inc/banner_promo.php:26
892
- msgid ""
893
- "This plugin is created with love by LiteSpeed. Your rating is the simplest "
894
- "way to support us. We really appreciate it!"
895
  msgstr ""
896
 
897
- #: admin/tpl/inc/banner_promo.php:29
898
- msgid "Sure I'd love to!"
899
  msgstr ""
900
 
901
- #: admin/tpl/inc/banner_promo.php:30
 
 
 
 
 
 
 
 
902
  msgid "I've already left a review"
903
  msgstr ""
904
 
905
- #: admin/tpl/inc/banner_promo.php:31
906
  msgid "Maybe later"
907
  msgstr ""
908
 
909
- #: admin/tpl/inc/banner_promo.slack.php:21
 
 
 
 
 
 
 
 
 
 
 
 
910
  msgid "Want to connect with other LiteSpeed users?"
911
  msgstr ""
912
 
913
- #: admin/tpl/inc/banner_promo.slack.php:22
914
  msgid "Join the %s community."
915
  msgstr ""
916
 
917
- #: admin/tpl/inc/banner_promo.slack.php:27
918
  msgid "Join Us on Slack"
919
  msgstr ""
920
 
@@ -1028,232 +1045,229 @@ msgstr ""
1028
  msgid "Congratulations, all done!"
1029
  msgstr ""
1030
 
1031
- #: admin/tpl/inc/img_optm.summary.php:14
1032
  msgid "Send Optimization Request"
1033
  msgstr ""
1034
 
1035
- #: admin/tpl/inc/img_optm.summary.php:22
1036
  msgid ""
1037
  "This will send the optimization request and the images to LiteSpeed's Image "
1038
  "Optimization Server."
1039
  msgstr ""
1040
 
1041
- #: admin/tpl/inc/img_optm.summary.php:23
1042
  msgid "You can send at most %s images at once."
1043
  msgstr ""
1044
 
1045
- #: admin/tpl/inc/img_optm.summary.php:29
1046
  msgid "Only press the button if the pull cron job is disabled."
1047
  msgstr ""
1048
 
1049
- #: admin/tpl/inc/img_optm.summary.php:29
1050
  msgid "Images will be pulled automatically if the cron job is running."
1051
  msgstr ""
1052
 
1053
- #: admin/tpl/inc/img_optm.summary.php:30
1054
  msgid "Pull Images"
1055
  msgstr ""
1056
 
1057
- #: admin/tpl/inc/img_optm.summary.php:39
1058
  msgid "Current Stage Status"
1059
  msgstr ""
1060
 
1061
- #: admin/tpl/inc/img_optm.summary.php:52
1062
  msgid "Images requested"
1063
  msgstr ""
1064
 
1065
- #: admin/tpl/inc/img_optm.summary.php:59
1066
  msgid ""
1067
  "After LiteSpeed's Image Optimization Server finishes optimization, it will "
1068
  "notify your site to pull the optimized images."
1069
  msgstr ""
1070
 
1071
- #: admin/tpl/inc/img_optm.summary.php:60
1072
  msgid "This process is automatic."
1073
  msgstr ""
1074
 
1075
- #: admin/tpl/inc/img_optm.summary.php:66
1076
  msgid "Images notified to pull"
1077
  msgstr ""
1078
 
1079
- #: admin/tpl/inc/img_optm.summary.php:75
1080
  msgid "Last pull initiated by cron at %s."
1081
  msgstr ""
1082
 
1083
- #: admin/tpl/inc/img_optm.summary.php:88
1084
  msgid "Images optimized and pulled"
1085
  msgstr ""
1086
 
1087
- #: admin/tpl/inc/img_optm.summary.php:99 admin/tpl/inc/img_optm.summary.php:148
 
1088
  msgid "Images failed to fetch"
1089
  msgstr ""
1090
 
1091
- #: admin/tpl/inc/img_optm.summary.php:109
1092
  msgid "Images previously optimized"
1093
  msgstr ""
1094
 
1095
- #: admin/tpl/inc/img_optm.summary.php:119
1096
  msgid "Images failed with other errors"
1097
  msgstr ""
1098
 
1099
- #: admin/tpl/inc/img_optm.summary.php:129
1100
  msgid "Image files missing"
1101
  msgstr ""
1102
 
1103
- #: admin/tpl/inc/img_optm.summary.php:139
1104
  msgid "Images with wrong meta"
1105
  msgstr ""
1106
 
1107
- #: admin/tpl/inc/img_optm.summary.php:154
1108
  msgid "Images failed to notify"
1109
  msgstr ""
1110
 
1111
- #: admin/tpl/inc/img_optm.summary.php:160
1112
- msgid "Images failed to pull"
1113
- msgstr ""
1114
-
1115
- #: admin/tpl/inc/img_optm.summary.php:180
1116
  msgid "Storage Optimization"
1117
  msgstr ""
1118
 
1119
- #: admin/tpl/inc/img_optm.summary.php:182
1120
  msgid "Calculate Original Image Storage"
1121
  msgstr ""
1122
 
1123
- #: admin/tpl/inc/img_optm.summary.php:190
1124
  msgid "Last calculated"
1125
  msgstr ""
1126
 
1127
- #: admin/tpl/inc/img_optm.summary.php:194
1128
- #: admin/tpl/inc/img_optm.summary.php:221
1129
  msgid "Files"
1130
  msgstr ""
1131
 
1132
- #: admin/tpl/inc/img_optm.summary.php:197
1133
  msgid "Total"
1134
  msgstr ""
1135
 
1136
- #: admin/tpl/inc/img_optm.summary.php:204
1137
  msgid "Are you sure to remove all image backups?"
1138
  msgstr ""
1139
 
1140
- #: admin/tpl/inc/img_optm.summary.php:205
1141
  msgid "Remove Original Image Backups"
1142
  msgstr ""
1143
 
1144
- #: admin/tpl/inc/img_optm.summary.php:208
1145
  msgid "This will delete all of the backups of the original images."
1146
  msgstr ""
1147
 
1148
- #: admin/tpl/inc/img_optm.summary.php:211
1149
- #: admin/tpl/setting/settings_media.php:183
1150
  msgid "This is irreversible."
1151
  msgstr ""
1152
 
1153
- #: admin/tpl/inc/img_optm.summary.php:212
1154
- #: admin/tpl/setting/settings_media.php:184
1155
  msgid "You will be unable to Revert Optimization once the backups are deleted!"
1156
  msgstr ""
1157
 
1158
- #: admin/tpl/inc/img_optm.summary.php:218
1159
  msgid "Last ran"
1160
  msgstr ""
1161
 
1162
- #: admin/tpl/inc/img_optm.summary.php:224
1163
  msgid "Saved"
1164
  msgstr ""
1165
 
1166
- #: admin/tpl/inc/img_optm.summary.php:230
1167
  msgid "A backup of each image is saved before it is optimized."
1168
  msgstr ""
1169
 
1170
- #: admin/tpl/inc/img_optm.summary.php:231
1171
  msgid ""
1172
  "The refresh button will calculate the total amount of disk space used by "
1173
  "these backups."
1174
  msgstr ""
1175
 
1176
- #: admin/tpl/inc/img_optm.summary.php:246
1177
  msgid "Optimization Summary"
1178
  msgstr ""
1179
 
1180
- #: admin/tpl/inc/img_optm.summary.php:247
1181
  msgid "Update Status"
1182
  msgstr ""
1183
 
1184
- #: admin/tpl/inc/img_optm.summary.php:251
1185
  msgid "Total Reduction"
1186
  msgstr ""
1187
 
1188
- #: admin/tpl/inc/img_optm.summary.php:254
1189
  msgid "Images Pulled"
1190
  msgstr ""
1191
 
1192
- #: admin/tpl/inc/img_optm.summary.php:257
1193
  msgid "Last Request"
1194
  msgstr ""
1195
 
1196
- #: admin/tpl/inc/img_optm.summary.php:262
1197
  msgid "Revert Optimization"
1198
  msgstr ""
1199
 
1200
- #: admin/tpl/inc/img_optm.summary.php:265
1201
  msgid ""
1202
  "Switch all images in the media library back to their original unoptimized "
1203
  "versions."
1204
  msgstr ""
1205
 
1206
- #: admin/tpl/inc/img_optm.summary.php:269
1207
  msgid ""
1208
  "The current IAPI key must be reset after changing home URL or domain before "
1209
  "making any further optimization requests."
1210
  msgstr ""
1211
 
1212
- #: admin/tpl/inc/img_optm.summary.php:270
1213
  msgid "Reset IAPI Key"
1214
  msgstr ""
1215
 
1216
- #: admin/tpl/inc/img_optm.summary.php:273
1217
  msgid "Revert all optimized images back to their original versions."
1218
  msgstr ""
1219
 
1220
- #: admin/tpl/inc/img_optm.summary.php:274
1221
  msgid "Undo Optimization"
1222
  msgstr ""
1223
 
1224
- #: admin/tpl/inc/img_optm.summary.php:277
1225
  msgid "Switch back to using optimized images."
1226
  msgstr ""
1227
 
1228
- #: admin/tpl/inc/img_optm.summary.php:278
1229
  msgid "Re-do Optimization"
1230
  msgstr ""
1231
 
1232
- #: admin/tpl/inc/img_optm.summary.php:281
1233
  msgid ""
1234
  "Scan for any new unoptimized image thumbnail sizes and resend necessary "
1235
  "image optimization requests."
1236
  msgstr ""
1237
 
1238
- #: admin/tpl/inc/img_optm.summary.php:282
1239
  msgid "Send New Thumbnail Requests"
1240
  msgstr ""
1241
 
1242
- #: admin/tpl/inc/img_optm.summary.php:286
1243
  msgid "Results can be checked in <a %s>Media Library</a>."
1244
  msgstr ""
1245
 
1246
- #: admin/tpl/inc/img_optm.summary.php:300
1247
  msgid "Destroy All Optimization Data!"
1248
  msgstr ""
1249
 
1250
- #: admin/tpl/inc/img_optm.summary.php:304
1251
  msgid ""
1252
  "Remove all previous image optimization requests/results, revert completed "
1253
  "optimizations, and delete all optimization files."
1254
  msgstr ""
1255
 
1256
- #: admin/tpl/inc/img_optm.summary.php:307
1257
  msgid "This will also reset the credit level."
1258
  msgstr ""
1259
 
@@ -1336,8 +1350,8 @@ msgid ""
1336
  "dismissed. (<a %3$s>Learn More</a>)"
1337
  msgstr ""
1338
 
1339
- #: admin/tpl/manage/manage_cdn.php:11 inc/gui.class.php:412
1340
- #: includes/litespeed-cache-gui.class.php:412
1341
  msgid "Cloudflare"
1342
  msgstr ""
1343
 
@@ -1526,17 +1540,17 @@ msgstr ""
1526
  #: admin/tpl/manage/manage_purge.php:39 admin/tpl/manage/manage_purge.php:45
1527
  #: admin/tpl/manage/manage_purge.php:54 admin/tpl/manage/manage_purge.php:63
1528
  #: admin/tpl/manage/manage_purge.php:72 admin/tpl/manage/manage_purge.php:81
1529
- #: admin/tpl/manage/manage_purge.php:90 inc/gui.class.php:387
1530
- #: inc/gui.class.php:395 inc/gui.class.php:403 inc/gui.class.php:412
1531
- #: inc/gui.class.php:422 inc/gui.class.php:432 inc/gui.class.php:442
1532
- #: inc/gui.class.php:452 includes/litespeed-cache-gui.class.php:387
1533
- #: includes/litespeed-cache-gui.class.php:395
1534
- #: includes/litespeed-cache-gui.class.php:403
1535
- #: includes/litespeed-cache-gui.class.php:412
1536
- #: includes/litespeed-cache-gui.class.php:422
1537
- #: includes/litespeed-cache-gui.class.php:432
1538
- #: includes/litespeed-cache-gui.class.php:442
1539
- #: includes/litespeed-cache-gui.class.php:452
1540
  msgid "Purge All"
1541
  msgstr ""
1542
 
@@ -1544,8 +1558,8 @@ msgstr ""
1544
  msgid "Purge the litespeed cache entries created by this plugin"
1545
  msgstr ""
1546
 
1547
- #: admin/tpl/manage/manage_purge.php:45 inc/gui.class.php:403
1548
- #: includes/litespeed-cache-gui.class.php:403
1549
  msgid "CSS/JS Cache"
1550
  msgstr ""
1551
 
@@ -1554,8 +1568,8 @@ msgid "This will purge all minified/combined CSS/JS entries only"
1554
  msgstr ""
1555
 
1556
  #: admin/tpl/manage/manage_purge.php:54
1557
- #: admin/tpl/setting/settings_inc.cache_object.php:28 inc/gui.class.php:422
1558
- #: includes/litespeed-cache-gui.class.php:422
1559
  msgid "Object Cache"
1560
  msgstr ""
1561
 
@@ -1563,8 +1577,8 @@ msgstr ""
1563
  msgid "Purge all the object caches"
1564
  msgstr ""
1565
 
1566
- #: admin/tpl/manage/manage_purge.php:63 inc/gui.class.php:432
1567
- #: includes/litespeed-cache-gui.class.php:432
1568
  msgid "Opcode Cache"
1569
  msgstr ""
1570
 
@@ -1572,8 +1586,8 @@ msgstr ""
1572
  msgid "Reset the entire opcode cache"
1573
  msgstr ""
1574
 
1575
- #: admin/tpl/manage/manage_purge.php:72 inc/gui.class.php:442
1576
- #: includes/litespeed-cache-gui.class.php:442
1577
  msgid "Critical CSS"
1578
  msgstr ""
1579
 
@@ -1581,8 +1595,8 @@ msgstr ""
1581
  msgid "This will delete all generated critical CSS files"
1582
  msgstr ""
1583
 
1584
- #: admin/tpl/manage/manage_purge.php:81 inc/gui.class.php:452
1585
- #: includes/litespeed-cache-gui.class.php:452
1586
  msgid "Placeholder Cache"
1587
  msgstr ""
1588
 
@@ -1678,16 +1692,16 @@ msgstr ""
1678
  msgid "DB Optimizer"
1679
  msgstr ""
1680
 
1681
- #: admin/tpl/manage.php:10 admin/tpl/setting/settings_cdn.php:230
1682
  #: admin/tpl/settings.php:12
1683
  msgid "CDN"
1684
  msgstr ""
1685
 
1686
- #: admin/tpl/manage.php:20
1687
  msgid "LiteSpeed Cache Network Management"
1688
  msgstr ""
1689
 
1690
- #: admin/tpl/manage.php:23
1691
  msgid "LiteSpeed Cache Management"
1692
  msgstr ""
1693
 
@@ -1978,6 +1992,7 @@ msgid "Include JS"
1978
  msgstr ""
1979
 
1980
  #: admin/tpl/setting/settings_cdn.php:76 admin/tpl/setting/settings_cdn.php:105
 
1981
  msgid "Include File Types"
1982
  msgstr ""
1983
 
@@ -1985,8 +2000,8 @@ msgstr ""
1985
  #: admin/tpl/setting/settings_crawler.php:22
1986
  #: admin/tpl/setting/settings_crawler.php:95
1987
  #: admin/tpl/setting/settings_crawler.php:100
1988
- #: admin/tpl/setting/settings_excludes.php:70
1989
- #: admin/tpl/setting/settings_excludes.php:108
1990
  msgid "NOTE"
1991
  msgstr ""
1992
 
@@ -2025,102 +2040,108 @@ msgstr ""
2025
  msgid "Default value"
2026
  msgstr ""
2027
 
2028
- #: admin/tpl/setting/settings_cdn.php:116
2029
- msgid "Original URLs"
 
 
2030
  msgstr ""
2031
 
2032
  #: admin/tpl/setting/settings_cdn.php:120
 
 
 
 
2033
  msgid ""
2034
  "Site URL to be served through the CDN. Beginning with %1$s. For example, "
2035
  "%2$s."
2036
  msgstr ""
2037
 
2038
- #: admin/tpl/setting/settings_cdn.php:121
2039
  msgid ""
2040
  "Wildcard %1$s supported (match zero or more characters). For example, to "
2041
  "match %2$s and %3$s, use %4$s."
2042
  msgstr ""
2043
 
2044
- #: admin/tpl/setting/settings_cdn.php:122
2045
  msgid "Separate multiple original URLs with a %s."
2046
  msgstr ""
2047
 
2048
- #: admin/tpl/setting/settings_cdn.php:128
2049
  msgid "Included Directories"
2050
  msgstr ""
2051
 
2052
- #: admin/tpl/setting/settings_cdn.php:134
2053
  msgid "Only files within these directories will be pointed to the CDN."
2054
  msgstr ""
2055
 
2056
- #: admin/tpl/setting/settings_cdn.php:141
2057
  msgid "Exclude Path"
2058
  msgstr ""
2059
 
2060
- #: admin/tpl/setting/settings_cdn.php:146
2061
  msgid "Paths containing these strings will not be served from the CDN."
2062
  msgstr ""
2063
 
2064
- #: admin/tpl/setting/settings_cdn.php:153
2065
  msgid "Load JQuery Remotely"
2066
  msgstr ""
2067
 
2068
- #: admin/tpl/setting/settings_cdn.php:175
2069
  msgid ""
2070
  "Improve page load time by loading jQuery from a remote CDN service instead "
2071
  "of locally."
2072
  msgstr ""
2073
 
2074
- #: admin/tpl/setting/settings_cdn.php:181
2075
  msgid "Quic Cloud API"
2076
  msgstr ""
2077
 
2078
- #: admin/tpl/setting/settings_cdn.php:185
2079
- #: admin/tpl/setting/settings_cdn.php:229
2080
  msgid "Use %s API functionality."
2081
  msgstr ""
2082
 
2083
- #: admin/tpl/setting/settings_cdn.php:202
2084
- #: admin/tpl/setting/settings_cdn.php:234
2085
  msgid "Email Address"
2086
  msgstr ""
2087
 
2088
- #: admin/tpl/setting/settings_cdn.php:206
2089
- #: admin/tpl/setting/settings_cdn.php:238
2090
  msgid "Your Email address on %s."
2091
  msgstr ""
2092
 
2093
- #: admin/tpl/setting/settings_cdn.php:215
2094
- #: admin/tpl/setting/settings_cdn.php:247
2095
  msgid "Your API key is used to access %s APIs."
2096
  msgstr ""
2097
 
2098
- #: admin/tpl/setting/settings_cdn.php:216
2099
- #: admin/tpl/setting/settings_cdn.php:248
2100
  msgid "Get it from <a %1$s>%2$s</a>."
2101
  msgstr ""
2102
 
2103
- #: admin/tpl/setting/settings_cdn.php:225
2104
  msgid "Cloudflare API"
2105
  msgstr ""
2106
 
2107
- #: admin/tpl/setting/settings_cdn.php:230
2108
  msgid "This can be managed from <a %2$s>%1$s</a>."
2109
  msgstr ""
2110
 
2111
- #: admin/tpl/setting/settings_cdn.php:243
2112
  msgid "Global API Key"
2113
  msgstr ""
2114
 
2115
- #: admin/tpl/setting/settings_cdn.php:253
2116
  msgid "Domain"
2117
  msgstr ""
2118
 
2119
- #: admin/tpl/setting/settings_cdn.php:261
2120
  msgid "You can just type part of the domain."
2121
  msgstr ""
2122
 
2123
- #: admin/tpl/setting/settings_cdn.php:262
2124
  msgid ""
2125
  "Once saved, it will be matched with the current list and completed "
2126
  "automatically."
@@ -2571,78 +2592,88 @@ msgid ""
2571
  "settings."
2572
  msgstr ""
2573
 
2574
- #: admin/tpl/setting/settings_excludes.php:25
 
 
 
 
 
 
 
 
 
 
2575
  msgid "Do Not Cache URIs"
2576
  msgstr ""
2577
 
2578
- #: admin/tpl/setting/settings_excludes.php:29
2579
  msgid "Paths containing these strings will not be cached."
2580
  msgstr ""
2581
 
2582
- #: admin/tpl/setting/settings_excludes.php:36
2583
  msgid "Do Not Cache Query Strings"
2584
  msgstr ""
2585
 
2586
- #: admin/tpl/setting/settings_excludes.php:40
2587
  msgid "Query string containing these parameters will not be cached."
2588
  msgstr ""
2589
 
2590
- #: admin/tpl/setting/settings_excludes.php:41
2591
  msgid "For example, for %s, %s and %s can be used here."
2592
  msgstr ""
2593
 
2594
- #: admin/tpl/setting/settings_excludes.php:50
2595
  msgid "Do Not Cache Categories"
2596
  msgstr ""
2597
 
2598
- #: admin/tpl/setting/settings_excludes.php:63
2599
  msgid "All categories are cached by default."
2600
  msgstr ""
2601
 
2602
- #: admin/tpl/setting/settings_excludes.php:64
2603
- #: admin/tpl/setting/settings_excludes.php:102
2604
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:16
2605
  #: admin/tpl/setting/settings_inc.exclude_useragent.php:15
2606
  msgid "To prevent %s from being cached, enter it here."
2607
  msgstr ""
2608
 
2609
- #: admin/tpl/setting/settings_excludes.php:64
2610
  msgid "categories"
2611
  msgstr ""
2612
 
2613
- #: admin/tpl/setting/settings_excludes.php:72
2614
  msgid ""
2615
  "If the category slug is not found, the category will be removed from the "
2616
  "list on save."
2617
  msgstr ""
2618
 
2619
- #: admin/tpl/setting/settings_excludes.php:73
2620
- #: admin/tpl/setting/settings_excludes.php:111
2621
  msgid "To exclude %1$s, insert %2$s."
2622
  msgstr ""
2623
 
2624
- #: admin/tpl/setting/settings_excludes.php:81
2625
  msgid "Do Not Cache Tags"
2626
  msgstr ""
2627
 
2628
- #: admin/tpl/setting/settings_excludes.php:101
2629
  msgid "All tags are cached by default."
2630
  msgstr ""
2631
 
2632
- #: admin/tpl/setting/settings_excludes.php:102
2633
  msgid "tags"
2634
  msgstr ""
2635
 
2636
- #: admin/tpl/setting/settings_excludes.php:110
2637
  msgid ""
2638
  "If the tag slug is not found, the tag will be removed from the list on save."
2639
  msgstr ""
2640
 
2641
- #: admin/tpl/setting/settings_excludes.php:131
2642
  msgid "Do Not Cache Roles"
2643
  msgstr ""
2644
 
2645
- #: admin/tpl/setting/settings_excludes.php:137
2646
  msgid "Selected roles will be excluded from cache."
2647
  msgstr ""
2648
 
@@ -2810,7 +2841,7 @@ msgid ""
2810
  msgstr ""
2811
 
2812
  #: admin/tpl/setting/settings_inc.cache_mobile.php:8
2813
- #: admin/tpl/setting/settings_inc.cache_mobile.php:67
2814
  msgid "Cache Mobile"
2815
  msgstr ""
2816
 
@@ -2823,35 +2854,35 @@ msgid "A site built with responsive design does not need to check this."
2823
  msgstr ""
2824
 
2825
  #: admin/tpl/setting/settings_inc.cache_mobile.php:25
2826
- #: admin/tpl/setting/settings_inc.cache_mobile.php:67
2827
  msgid "List of Mobile User Agents"
2828
  msgstr ""
2829
 
2830
- #: admin/tpl/setting/settings_inc.cache_mobile.php:42
2831
  msgid "Htaccess did not match configuration option."
2832
  msgstr ""
2833
 
2834
- #: admin/tpl/setting/settings_inc.cache_mobile.php:43
2835
  msgid "Please re-enter the mobile view setting."
2836
  msgstr ""
2837
 
2838
- #: admin/tpl/setting/settings_inc.cache_mobile.php:44
2839
  msgid "List in WordPress database is: %s"
2840
  msgstr ""
2841
 
2842
- #: admin/tpl/setting/settings_inc.cache_mobile.php:60
2843
  msgid "SYNTAX: Each entry should be separated with a bar, %s."
2844
  msgstr ""
2845
 
2846
- #: admin/tpl/setting/settings_inc.cache_mobile.php:61
2847
  msgid "Any spaces should be escaped with a backslash before the space, %s."
2848
  msgstr ""
2849
 
2850
- #: admin/tpl/setting/settings_inc.cache_mobile.php:64
2851
  msgid "The default list WordPress uses is %s"
2852
  msgstr ""
2853
 
2854
- #: admin/tpl/setting/settings_inc.cache_mobile.php:67
2855
  msgid "If %1$s is %2$s, then %3$s must be populated!"
2856
  msgstr ""
2857
 
@@ -3140,7 +3171,7 @@ msgid "Load images only when they enter the viewport."
3140
  msgstr ""
3141
 
3142
  #: admin/tpl/setting/settings_media.php:20
3143
- #: admin/tpl/setting/settings_media.php:126
3144
  msgid "This can improve page loading time by reducing initial HTTP requests."
3145
  msgstr ""
3146
 
@@ -3179,106 +3210,118 @@ msgid "Elements with attribute %s in html code will be excluded."
3179
  msgstr ""
3180
 
3181
  #: admin/tpl/setting/settings_media.php:47
3182
- #: admin/tpl/setting/settings_media.php:91
3183
- msgid "Lazy Load Image Placeholder"
3184
  msgstr ""
3185
 
3186
  #: admin/tpl/setting/settings_media.php:51
 
 
 
 
 
 
 
 
 
 
 
 
 
3187
  msgid ""
3188
  "Specify a base64 image to be used as a placeholder while other images finish "
3189
  "loading."
3190
  msgstr ""
3191
 
3192
- #: admin/tpl/setting/settings_media.php:52
3193
  msgid ""
3194
  "This can be predefined in %2$s as well using constant %1$s, with this "
3195
  "setting taking priority."
3196
  msgstr ""
3197
 
3198
- #: admin/tpl/setting/settings_media.php:53
3199
  msgid "By default a gray image placeholder %s will be used."
3200
  msgstr ""
3201
 
3202
- #: admin/tpl/setting/settings_media.php:54
3203
  msgid "For example, %s can be used for a transparent placeholder."
3204
  msgstr ""
3205
 
3206
- #: admin/tpl/setting/settings_media.php:60
3207
- #: admin/tpl/setting/settings_media.php:87
3208
  msgid "Responsive Placeholder"
3209
  msgstr ""
3210
 
3211
- #: admin/tpl/setting/settings_media.php:64
3212
  msgid ""
3213
  "Responsive image placeholders can help to reduce layout reshuffle when "
3214
  "images are loaded."
3215
  msgstr ""
3216
 
3217
- #: admin/tpl/setting/settings_media.php:65
3218
  msgid ""
3219
  "This will generate the placeholder with same dimensions as the image if it "
3220
  "has the width and height attributes."
3221
  msgstr ""
3222
 
3223
- #: admin/tpl/setting/settings_media.php:71
3224
  msgid "Responsive Placeholder Background Color"
3225
  msgstr ""
3226
 
3227
- #: admin/tpl/setting/settings_media.php:76
3228
  msgid "Specify the placeholder color you want to use."
3229
  msgstr ""
3230
 
3231
- #: admin/tpl/setting/settings_media.php:83
3232
  msgid "Generate Reponsive Placeholder In Background"
3233
  msgstr ""
3234
 
3235
- #: admin/tpl/setting/settings_media.php:87
3236
  msgid "Automatically generate %s in the background via a cron-based queue."
3237
  msgstr ""
3238
 
3239
- #: admin/tpl/setting/settings_media.php:89
3240
  msgid ""
3241
  "If set to %1$s, before the placeholder is localized, the %2$s configuration "
3242
  "will be used."
3243
  msgstr ""
3244
 
3245
- #: admin/tpl/setting/settings_media.php:93
3246
  #: admin/tpl/setting/settings_optimize.php:164
3247
  msgid ""
3248
  "If set to %s this is done in the foreground, which may slow down page load."
3249
  msgstr ""
3250
 
3251
- #: admin/tpl/setting/settings_media.php:101
3252
  #: admin/tpl/setting/settings_optimize.php:172
3253
  msgid "Last generated"
3254
  msgstr ""
3255
 
3256
- #: admin/tpl/setting/settings_media.php:106
3257
  msgid "Size list in queue waiting for cron"
3258
  msgstr ""
3259
 
3260
- #: admin/tpl/setting/settings_media.php:112
3261
  #: admin/tpl/setting/settings_optimize.php:191
3262
  msgid "Run Queue Manually"
3263
  msgstr ""
3264
 
3265
- #: admin/tpl/setting/settings_media.php:121
3266
  msgid "Lazy Load Iframes"
3267
  msgstr ""
3268
 
3269
- #: admin/tpl/setting/settings_media.php:125
3270
  msgid "Load iframes only when they enter the viewport."
3271
  msgstr ""
3272
 
3273
- #: admin/tpl/setting/settings_media.php:132
3274
  msgid "Inline Lazy Load Images Library"
3275
  msgstr ""
3276
 
3277
- #: admin/tpl/setting/settings_media.php:136
3278
  msgid "Include the lazy load image Javascript library inline."
3279
  msgstr ""
3280
 
3281
- #: admin/tpl/setting/settings_media.php:137
3282
  #: admin/tpl/setting/settings_optimize.php:137
3283
  #: admin/tpl/setting/settings_optimize.php:238
3284
  #: admin/tpl/setting/settings_optimize.php:276
@@ -3289,102 +3332,102 @@ msgid ""
3289
  "PageSpeed."
3290
  msgstr ""
3291
 
3292
- #: admin/tpl/setting/settings_media.php:144
3293
  msgid "Optimize Automatically"
3294
  msgstr ""
3295
 
3296
- #: admin/tpl/setting/settings_media.php:148
3297
  msgid "Automatically request optimization via cron job."
3298
  msgstr ""
3299
 
3300
- #: admin/tpl/setting/settings_media.php:149
3301
  msgid "Requests can only be sent when recovered credits is %s or more."
3302
  msgstr ""
3303
 
3304
- #: admin/tpl/setting/settings_media.php:155
3305
  msgid "Optimization Cron"
3306
  msgstr ""
3307
 
3308
- #: admin/tpl/setting/settings_media.php:159
3309
  msgid ""
3310
  "Disabling this will stop the cron job responsible for fetching optimized "
3311
  "images from LiteSpeed's Image Server."
3312
  msgstr ""
3313
 
3314
- #: admin/tpl/setting/settings_media.php:165
3315
  msgid "Optimize Original Images"
3316
  msgstr ""
3317
 
3318
- #: admin/tpl/setting/settings_media.php:169
3319
  msgid "Optimize images and save backups of the originals in the same folder."
3320
  msgstr ""
3321
 
3322
- #: admin/tpl/setting/settings_media.php:175
3323
  msgid "Remove Original Backups"
3324
  msgstr ""
3325
 
3326
- #: admin/tpl/setting/settings_media.php:179
3327
  msgid ""
3328
  "Automatically remove the original image backups after fetching optimized "
3329
  "images."
3330
  msgstr ""
3331
 
3332
- #: admin/tpl/setting/settings_media.php:191
3333
  msgid "Optimize WebP Versions"
3334
  msgstr ""
3335
 
3336
- #: admin/tpl/setting/settings_media.php:195
3337
  msgid "Request WebP versions of original images when doing optimization."
3338
  msgstr ""
3339
 
3340
- #: admin/tpl/setting/settings_media.php:201
3341
  msgid "Optimize Losslessly"
3342
  msgstr ""
3343
 
3344
- #: admin/tpl/setting/settings_media.php:205
3345
  msgid "Optimize images using lossless compression."
3346
  msgstr ""
3347
 
3348
- #: admin/tpl/setting/settings_media.php:206
3349
  msgid ""
3350
  "This can improve quality but may result in larger images than lossy "
3351
  "compression will."
3352
  msgstr ""
3353
 
3354
- #: admin/tpl/setting/settings_media.php:212
3355
  msgid "Preserve EXIF data"
3356
  msgstr ""
3357
 
3358
- #: admin/tpl/setting/settings_media.php:216
3359
  msgid ""
3360
  "Preserve EXIF data (copyright, GPS, comments, keywords, etc) when optimizing."
3361
  msgstr ""
3362
 
3363
- #: admin/tpl/setting/settings_media.php:217
3364
  msgid "This will increase the size of optimized files."
3365
  msgstr ""
3366
 
3367
- #: admin/tpl/setting/settings_media.php:231
3368
  msgid "WebP Attribute To Replace"
3369
  msgstr ""
3370
 
3371
- #: admin/tpl/setting/settings_media.php:237
3372
  msgid "Specify which element attributes will be replaced with WebP."
3373
  msgstr ""
3374
 
3375
- #: admin/tpl/setting/settings_media.php:238
3376
  msgid "Only attributes listed here will be replaced."
3377
  msgstr ""
3378
 
3379
- #: admin/tpl/setting/settings_media.php:239
3380
  msgid "Use the format %1$s or %2$s (element is optional)."
3381
  msgstr ""
3382
 
3383
- #: admin/tpl/setting/settings_media.php:246
3384
  msgid "WebP For Extra srcset"
3385
  msgstr ""
3386
 
3387
- #: admin/tpl/setting/settings_media.php:250
3388
  msgid ""
3389
  "Enable replacement of WebP in %s elements that were generated outside of "
3390
  "WordPress logic."
@@ -3910,29 +3953,29 @@ msgstr ""
3910
  msgid "Compatibilities"
3911
  msgstr ""
3912
 
3913
- #: admin/tpl/settings.php:124
3914
  msgid "LiteSpeed Cache Settings"
3915
  msgstr ""
3916
 
3917
- #: admin/tpl/settings.php:174
3918
  msgid "Hide Advanced Options"
3919
  msgstr ""
3920
 
3921
- #: admin/tpl/settings.php:176
3922
  msgid "Show Advanced Options"
3923
  msgstr ""
3924
 
3925
- #: admin/tpl/settings.php:187
3926
  msgid "The network admin selected use primary site configs for all subsites."
3927
  msgstr ""
3928
 
3929
- #: admin/tpl/settings.php:188
3930
  msgid ""
3931
  "The following options are selected, but are not editable in this settings "
3932
  "page."
3933
  msgstr ""
3934
 
3935
- #: admin/tpl/settings.php:210 admin/tpl/settings.php:213
3936
  msgid "Save Changes"
3937
  msgstr ""
3938
 
@@ -3952,6 +3995,17 @@ msgstr ""
3952
  msgid "Purged the tags!"
3953
  msgstr ""
3954
 
 
 
 
 
 
 
 
 
 
 
 
3955
  #: inc/cdn/cloudflare.class.php:113
3956
  msgid "Notified Cloudflare to set development mode to %s successfully."
3957
  msgstr ""
@@ -3976,6 +4030,10 @@ msgstr ""
3976
  msgid "Failed to communicate with Cloudflare"
3977
  msgstr ""
3978
 
 
 
 
 
3979
  #: inc/crawler.class.php:102 includes/litespeed-cache-crawler.class.php:102
3980
  msgid "Can not find any form data for blacklist"
3981
  msgstr ""
@@ -4016,71 +4074,71 @@ msgid ""
4016
  "admin before their natural expiration, if necessary."
4017
  msgstr ""
4018
 
4019
- #: inc/gui.class.php:282 includes/litespeed-cache-gui.class.php:282
4020
  msgid "Purge this page"
4021
  msgstr ""
4022
 
4023
- #: inc/gui.class.php:290 includes/litespeed-cache-gui.class.php:290
4024
  msgid "Mark this page as "
4025
  msgstr ""
4026
 
4027
- #: inc/gui.class.php:297 includes/litespeed-cache-gui.class.php:297
4028
  msgid "Forced cacheable"
4029
  msgstr ""
4030
 
4031
- #: inc/gui.class.php:304 includes/litespeed-cache-gui.class.php:304
4032
  msgid "Non cacheable"
4033
  msgstr ""
4034
 
4035
- #: inc/gui.class.php:311 includes/litespeed-cache-gui.class.php:311
4036
  msgid "Private cache"
4037
  msgstr ""
4038
 
4039
- #: inc/gui.class.php:318 includes/litespeed-cache-gui.class.php:318
4040
  msgid "No optimization"
4041
  msgstr ""
4042
 
4043
- #: inc/gui.class.php:325 includes/litespeed-cache-gui.class.php:325
4044
  msgid "More settings"
4045
  msgstr ""
4046
 
4047
- #: inc/gui.class.php:345 includes/litespeed-cache-gui.class.php:345
4048
  msgid "LiteSpeed Cache Purge All"
4049
  msgstr ""
4050
 
4051
- #: inc/gui.class.php:345 inc/gui.class.php:395
4052
- #: includes/litespeed-cache-gui.class.php:345
4053
- #: includes/litespeed-cache-gui.class.php:395
4054
  msgid "LSCache"
4055
  msgstr ""
4056
 
4057
- #: inc/gui.class.php:470 includes/litespeed-cache-gui.class.php:470
4058
  msgid "Remove all previous unfinished image optimization requests."
4059
  msgstr ""
4060
 
4061
- #: inc/gui.class.php:471 includes/litespeed-cache-gui.class.php:471
4062
  msgid "Clean Up Unfinished Data"
4063
  msgstr ""
4064
 
4065
- #: inc/gui.class.php:490 includes/litespeed-cache-gui.class.php:490
4066
  msgid "Install %s"
4067
  msgstr ""
4068
 
4069
- #: inc/gui.class.php:491 includes/litespeed-cache-gui.class.php:491
4070
  msgid "Install Now"
4071
  msgstr ""
4072
 
4073
- #: inc/gui.class.php:511 includes/litespeed-cache-gui.class.php:511
4074
  msgid ""
4075
  "<a href=\"%1$s\" %2$s>View version %3$s details</a> or <a href=\"%4$s\" %5$s "
4076
  "target=\"_blank\">update now</a>."
4077
  msgstr ""
4078
 
4079
- #: inc/gui.class.php:514 includes/litespeed-cache-gui.class.php:514
4080
  msgid "View %1$s version %2$s details"
4081
  msgstr ""
4082
 
4083
- #: inc/gui.class.php:519 includes/litespeed-cache-gui.class.php:519
4084
  msgid "Update %s now"
4085
  msgstr ""
4086
 
@@ -4088,8 +4146,8 @@ msgstr ""
4088
  msgid "Communicated with LiteSpeed Image Optimization Server successfully."
4089
  msgstr ""
4090
 
4091
- #: inc/img_optm.class.php:167 inc/img_optm.class.php:1470
4092
- #: inc/img_optm.class.php:1535
4093
  msgid "No image found."
4094
  msgstr ""
4095
 
@@ -4120,41 +4178,41 @@ msgid ""
4120
  "automated."
4121
  msgstr ""
4122
 
4123
- #: inc/img_optm.class.php:1359
4124
  msgid "Destroy unfinished data successfully."
4125
  msgstr ""
4126
 
4127
- #: inc/img_optm.class.php:1573
4128
  msgid ""
4129
  "Pushed %1$s groups with %2$s images to LiteSpeed optimization server, "
4130
  "accepted %3$s groups with %4$s images."
4131
  msgstr ""
4132
 
4133
- #: inc/img_optm.class.php:1749
4134
  msgid "Removed %1$s images and saved %2$s successfully."
4135
  msgstr ""
4136
 
4137
- #: inc/img_optm.class.php:1944
4138
  msgid "Switched images successfully."
4139
  msgstr ""
4140
 
4141
- #: inc/img_optm.class.php:1975
4142
  msgid "Disabled WebP file successfully."
4143
  msgstr ""
4144
 
4145
- #: inc/img_optm.class.php:1981
4146
  msgid "Enabled WebP file successfully."
4147
  msgstr ""
4148
 
4149
- #: inc/img_optm.class.php:1997
4150
  msgid "Restored original file successfully."
4151
  msgstr ""
4152
 
4153
- #: inc/img_optm.class.php:2004
4154
  msgid "Switched to optimized file successfully."
4155
  msgstr ""
4156
 
4157
- #: inc/img_optm.class.php:2064
4158
  msgid "Reset the optimized data successfully."
4159
  msgstr ""
4160
 
@@ -4170,15 +4228,15 @@ msgstr ""
4170
  msgid "Reset successfully."
4171
  msgstr ""
4172
 
4173
- #: inc/litespeed-cache.class.php:310 includes/litespeed-cache.class.php:310
4174
  msgid "Crawler blacklist is saved."
4175
  msgstr ""
4176
 
4177
- #: inc/litespeed-cache.class.php:321 includes/litespeed-cache.class.php:321
4178
  msgid "Notified LiteSpeed Web Server to purge everything."
4179
  msgstr ""
4180
 
4181
- #: inc/litespeed-cache.class.php:331 includes/litespeed-cache.class.php:331
4182
  msgid "Notified LiteSpeed Web Server to purge the list."
4183
  msgstr ""
4184
 
@@ -4282,15 +4340,15 @@ msgstr ""
4282
  msgid "LiteSpeed Cache Custom Cron Crawler"
4283
  msgstr ""
4284
 
4285
- #: inc/utility.class.php:68 includes/litespeed-cache-utility.class.php:68
4286
  msgid "just now"
4287
  msgstr ""
4288
 
4289
- #: inc/utility.class.php:68 includes/litespeed-cache-utility.class.php:68
4290
  msgid "right now"
4291
  msgstr ""
4292
 
4293
- #: inc/utility.class.php:71 includes/litespeed-cache-utility.class.php:71
4294
  msgid " %s ago"
4295
  msgstr ""
4296
 
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.9\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
+ "POT-Creation-Date: 2018-12-31 14:22:12+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: admin/admin-api.class.php:284 admin/admin-api.class.php:313
16
  msgid "IAPI Error %s"
17
  msgstr ""
18
 
19
+ #: admin/admin-api.class.php:355
20
  msgid "Reset IAPI key successfully."
21
  msgstr ""
22
 
23
+ #: admin/admin-api.class.php:450
24
  msgid "Failed to post via WordPress"
25
  msgstr ""
26
 
27
+ #: admin/admin-api.class.php:458
28
  msgid "Failed to communicate with LiteSpeed image server"
29
  msgstr ""
30
 
31
+ #: admin/admin-api.class.php:467
32
  msgid ""
33
  "We are working hard to improve your Image Optimization experience. The "
34
  "service will be unavailable while we work. We apologize for any "
35
  "inconvenience."
36
  msgstr ""
37
 
38
+ #: admin/admin-api.class.php:476 admin/admin-api.class.php:484
39
  msgid "Message from LiteSpeed image server"
40
  msgstr ""
41
 
42
+ #: admin/admin-api.class.php:492
43
  msgid "Good news from LiteSpeed image server"
44
  msgstr ""
45
 
46
+ #: admin/admin-api.class.php:501
47
  msgid "%s plugin version %s required for this action."
48
  msgstr ""
49
 
50
+ #: admin/litespeed-cache-admin-display.class.php:156
51
+ #: admin/litespeed-cache-admin-display.class.php:248 inc/gui.class.php:483
52
+ #: includes/litespeed-cache-gui.class.php:483
53
  msgid "Settings"
54
  msgstr ""
55
 
56
+ #: admin/litespeed-cache-admin-display.class.php:158
57
+ #: admin/tpl/setting/settings_cdn.php:234 inc/gui.class.php:475
58
+ #: includes/litespeed-cache-gui.class.php:475
59
  msgid "Manage"
60
  msgstr ""
61
 
62
+ #: admin/litespeed-cache-admin-display.class.php:161
63
  msgid "Edit .htaccess"
64
  msgstr ""
65
 
66
+ #: admin/litespeed-cache-admin-display.class.php:165 inc/gui.class.php:492
67
+ #: includes/litespeed-cache-gui.class.php:492
68
  msgid "Image Optimization"
69
  msgstr ""
70
 
71
+ #: admin/litespeed-cache-admin-display.class.php:166 admin/tpl/settings.php:22
72
  msgid "Crawler"
73
  msgstr ""
74
 
75
+ #: admin/litespeed-cache-admin-display.class.php:167
76
  msgid "Report"
77
  msgstr ""
78
 
79
+ #: admin/litespeed-cache-admin-display.class.php:168
80
  msgid "Import / Export"
81
  msgstr ""
82
 
83
+ #: admin/litespeed-cache-admin-display.class.php:171
84
  #: admin/tpl/setting/settings_debug.php:23
85
  msgid "Debug Log"
86
  msgstr ""
87
 
88
+ #: admin/litespeed-cache-admin-display.class.php:268
89
  msgid ""
90
  "It is recommended that LiteSpeed Cache be purged after updating a plugin."
91
  msgstr ""
92
 
93
+ #: admin/litespeed-cache-admin-display.class.php:819
94
+ #: admin/litespeed-cache-admin-display.class.php:904
95
  #: admin/tpl/setting/settings_debug.php:35
96
+ #: admin/tpl/setting/settings_inc.cache_mobile.php:65
97
+ #: admin/tpl/setting/settings_media.php:102
98
  #: admin/tpl/setting/settings_optimize.php:138
99
  #: admin/tpl/setting/settings_optimize.php:152
100
  #: admin/tpl/setting/settings_optimize.php:153
104
  msgid "ON"
105
  msgstr ""
106
 
107
+ #: admin/litespeed-cache-admin-display.class.php:820
108
+ #: admin/litespeed-cache-admin-display.class.php:908
109
+ #: admin/tpl/setting/settings_cdn.php:25 admin/tpl/setting/settings_cdn.php:163
110
  #: admin/tpl/setting/settings_debug.php:29
111
  #: admin/tpl/setting/settings_inc.cache_object.php:149
112
+ #: admin/tpl/setting/settings_media.php:105
113
  #: admin/tpl/setting/settings_optimize.php:152
114
  #: admin/tpl/setting/settings_optimize.php:164
115
  #: admin/tpl/setting/settings_tuning.php:18
117
  msgid "OFF"
118
  msgstr ""
119
 
120
+ #: admin/litespeed-cache-admin-display.class.php:943
121
  msgid "Recommended value: %s"
122
  msgstr ""
123
 
124
+ #: admin/litespeed-cache-admin-display.class.php:959
125
  #: admin/tpl/setting/settings_media.php:38
126
  #: admin/tpl/setting/settings_optimize.php:140
127
  #: admin/tpl/setting/settings_tuning.php:24
133
  msgid "API"
134
  msgstr ""
135
 
136
+ #: admin/litespeed-cache-admin-display.class.php:960
137
  msgid "Server variable(s) %s available to override this setting."
138
  msgstr ""
139
 
140
+ #: admin/litespeed-cache-admin-display.class.php:978
141
  #: admin/litespeed-cache-admin.class.php:228
142
  #: admin/tpl/inc/check_cache_disabled.php:49
143
  #: admin/tpl/inc/img_optm.initialize.php:29
144
+ #: admin/tpl/inc/img_optm.summary.php:164 admin/tpl/manage/manage_cdn.php:60
145
  #: inc/doc.cls.php:39
146
  msgid "Learn More"
147
  msgstr ""
148
 
149
+ #: admin/litespeed-cache-admin-display.class.php:992
150
  msgid "The URLs will be compared to the REQUEST_URI server variable."
151
  msgstr ""
152
 
153
+ #: admin/litespeed-cache-admin-display.class.php:993
154
  msgid "For example, for %s, %s can be used here."
155
  msgstr ""
156
 
157
+ #: admin/litespeed-cache-admin-display.class.php:995
158
  msgid "To match the beginning, add %s to the beginning of the item."
159
  msgstr ""
160
 
161
+ #: admin/litespeed-cache-admin-display.class.php:996
162
  msgid "To do an exact match, add %s to the end of the URL."
163
  msgstr ""
164
 
165
+ #: admin/litespeed-cache-admin-display.class.php:997
166
  #: admin/tpl/manage/manage_purge.php:152
167
  #: admin/tpl/setting/settings_cache.php:83
168
  #: admin/tpl/setting/settings_cdn.php:107
169
+ #: admin/tpl/setting/settings_cdn.php:139
170
+ #: admin/tpl/setting/settings_cdn.php:151
171
  #: admin/tpl/setting/settings_crawler.php:132
172
  #: admin/tpl/setting/settings_crawler.php:154
173
+ #: admin/tpl/setting/settings_excludes.php:45
174
+ #: admin/tpl/setting/settings_excludes.php:68
175
+ #: admin/tpl/setting/settings_excludes.php:106
176
  #: admin/tpl/setting/settings_inc.cache_object.php:114
177
  #: admin/tpl/setting/settings_inc.cache_object.php:122
178
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:19
179
  #: admin/tpl/setting/settings_media.php:36
180
+ #: admin/tpl/setting/settings_media.php:53
181
+ #: admin/tpl/setting/settings_media.php:252
182
  #: admin/tpl/setting/settings_optimize.php:264
183
  #: admin/tpl/setting/settings_purge.php:85
184
  #: admin/tpl/setting/settings_tuning.php:38
187
  msgid "One per line."
188
  msgstr ""
189
 
190
+ #: admin/litespeed-cache-admin-display.class.php:1012
191
  msgid "%s groups"
192
  msgstr ""
193
 
194
+ #: admin/litespeed-cache-admin-display.class.php:1015
195
  msgid "%s images"
196
  msgstr ""
197
 
198
+ #: admin/litespeed-cache-admin-display.class.php:1025
199
  msgid "%s group"
200
  msgstr ""
201
 
202
+ #: admin/litespeed-cache-admin-display.class.php:1028
203
  msgid "%s image"
204
  msgstr ""
205
 
447
  msgid "Failed to push to LiteSpeed server: %s"
448
  msgstr ""
449
 
450
+ #: admin/litespeed-cache-admin-rules.class.php:918
451
  msgid ""
452
  "<p>Please add/replace the following codes into the beginning of %1$s:</p> "
453
  "%2$s"
454
  msgstr ""
455
 
456
+ #: admin/litespeed-cache-admin-rules.class.php:1030
457
  msgid "File Saved."
458
  msgstr ""
459
 
512
  msgid "Or"
513
  msgstr ""
514
 
515
+ #: admin/tpl/api/quic.login.php:30 admin/tpl/setting/settings_cdn.php:215
516
  msgid "User API Key"
517
  msgstr ""
518
 
532
  msgid "Next"
533
  msgstr ""
534
 
535
+ #: admin/tpl/crawler.php:25
536
  msgid "LiteSpeed Cache Crawler"
537
  msgstr ""
538
 
539
+ #: admin/tpl/crawler.php:36
540
  msgid "Crawler File"
541
  msgstr ""
542
 
543
+ #: admin/tpl/crawler.php:38
544
  msgid "Generate Crawler File"
545
  msgstr ""
546
 
547
+ #: admin/tpl/crawler.php:43
548
  msgid "Generated at %s"
549
  msgstr ""
550
 
551
+ #: admin/tpl/crawler.php:47
552
  msgid ""
553
  "On click, this will create a crawler sitemap file in plugin directory %s."
554
  msgstr ""
555
 
556
+ #: admin/tpl/crawler.php:57
557
  msgid "%d hours"
558
  msgstr ""
559
 
560
+ #: admin/tpl/crawler.php:60
561
  msgid "%d hour"
562
  msgstr ""
563
 
564
+ #: admin/tpl/crawler.php:67
565
  msgid "%d minutes"
566
  msgstr ""
567
 
568
+ #: admin/tpl/crawler.php:70
569
  msgid "%d minute"
570
  msgstr ""
571
 
572
+ #: admin/tpl/crawler.php:76
573
  msgid "Crawler Cron"
574
  msgstr ""
575
 
576
+ #: admin/tpl/crawler.php:84 admin/tpl/setting/settings_general.php:36
577
  msgid "Enable"
578
  msgstr ""
579
 
580
+ #: admin/tpl/crawler.php:84 admin/tpl/esi_widget_edit.php:56
581
  #: admin/tpl/setting/settings_general.php:30
582
  msgid "Disable"
583
  msgstr ""
584
 
585
+ #: admin/tpl/crawler.php:91 admin/tpl/inc/check_cache_disabled.php:38
586
  #: admin/tpl/manage/manage_cdn.php:15
587
+ #: admin/tpl/setting/settings_optimize.php:15 admin/tpl/settings.php:183
588
  msgid "WARNING"
589
  msgstr ""
590
 
591
+ #: admin/tpl/crawler.php:92
592
  msgid ""
593
  "The crawler feature is not enabled on the LiteSpeed server. Please consult "
594
  "your server admin."
595
  msgstr ""
596
 
597
+ #: admin/tpl/crawler.php:93
598
  msgid ""
599
  "See <a %s>Introduction for Enabling the Crawler</a> for detailed information."
600
  msgstr ""
601
 
602
+ #: admin/tpl/crawler.php:100
603
  msgid "Current sitemap crawl started at"
604
  msgstr ""
605
 
606
+ #: admin/tpl/crawler.php:106
607
  msgid "The next complete sitemap crawl will start at"
608
  msgstr ""
609
 
610
+ #: admin/tpl/crawler.php:114
611
  msgid "Last complete run time for all crawlers"
612
  msgstr ""
613
 
614
+ #: admin/tpl/crawler.php:115 admin/tpl/crawler.php:122
615
  msgid "%d seconds"
616
  msgstr ""
617
 
618
+ #: admin/tpl/crawler.php:121
619
  msgid "Run time for previous crawler"
620
  msgstr ""
621
 
622
+ #: admin/tpl/crawler.php:128
623
  msgid "Current crawler started at"
624
  msgstr ""
625
 
626
+ #: admin/tpl/crawler.php:135
627
  msgid "Last interval"
628
  msgstr ""
629
 
630
+ #: admin/tpl/crawler.php:142
631
  msgid "Ended reason"
632
  msgstr ""
633
 
634
+ #: admin/tpl/crawler.php:149
635
  msgid "<b>Last crawled:</b> %s item(s)"
636
  msgstr ""
637
 
638
+ #: admin/tpl/crawler.php:153
639
  msgid "Reset position"
640
  msgstr ""
641
 
642
+ #: admin/tpl/crawler.php:156
643
  msgid "Manually run"
644
  msgstr ""
645
 
646
+ #: admin/tpl/crawler.php:163
647
  msgid "Cron Name"
648
  msgstr ""
649
 
650
+ #: admin/tpl/crawler.php:164
651
  msgid "Run Frequency"
652
  msgstr ""
653
 
654
+ #: admin/tpl/crawler.php:165
655
  msgid "Size"
656
  msgstr ""
657
 
658
+ #: admin/tpl/crawler.php:166 admin/tpl/setting/settings_inc.cache_object.php:70
659
  msgid "Status"
660
  msgstr ""
661
 
662
+ #: admin/tpl/crawler.php:189
663
  msgid "running"
664
  msgstr ""
665
 
666
+ #: admin/tpl/crawler.php:199
667
  msgid "Run frequency is set by the Interval Between Runs setting."
668
  msgstr ""
669
 
670
+ #: admin/tpl/crawler.php:200
671
  msgid "Only one crawler can run concurrently."
672
  msgstr ""
673
 
674
+ #: admin/tpl/crawler.php:201
675
  msgid ""
676
  "If both the cron and manual run start at a similar time, the first one to "
677
  "start will run."
678
  msgstr ""
679
 
680
+ #: admin/tpl/crawler.php:202
681
  msgid ""
682
  "Please follow <a %s>Hooking WP-Cron Into the System Task Scheduler</a> to "
683
  "create the system cron task."
684
  msgstr ""
685
 
686
+ #: admin/tpl/crawler.php:207
687
  msgid "Watch Crawler Status"
688
  msgstr ""
689
 
690
+ #: admin/tpl/crawler.php:214
691
  msgid "Show crawler status"
692
  msgstr ""
693
 
694
+ #: admin/tpl/crawler.php:232
695
  msgid "No crawler meta file generated yet"
696
  msgstr ""
697
 
698
+ #: admin/tpl/crawler.php:237
699
  msgid "Sitemap Generation Blacklist"
700
  msgstr ""
701
 
702
+ #: admin/tpl/crawler.php:246 admin/tpl/edit_htaccess.php:74
703
  msgid "Save"
704
  msgstr ""
705
 
706
+ #: admin/tpl/crawler.php:250
707
  msgid "Current blacklist has %s item(s)."
708
  msgstr ""
709
 
710
+ #: admin/tpl/crawler.php:251
711
  msgid ""
712
  "All Urls which returned no-cache tags will be added here, after the initial "
713
  "crawling."
721
  msgid "Clear Log"
722
  msgstr ""
723
 
724
+ #: admin/tpl/edit_htaccess.php:39
725
  msgid "LiteSpeed Cache Edit .htaccess"
726
  msgstr ""
727
 
728
+ #: admin/tpl/edit_htaccess.php:49
729
  msgid "This page is meant for advanced users."
730
  msgstr ""
731
 
732
+ #: admin/tpl/edit_htaccess.php:51
733
  msgid "Any changes made to the .htaccess file may break the site."
734
  msgstr ""
735
 
736
+ #: admin/tpl/edit_htaccess.php:52
737
  msgid "Please consult the host/server admin before making any changes."
738
  msgstr ""
739
 
740
+ #: admin/tpl/edit_htaccess.php:57
741
  msgid "File editing is disabled in configuration."
742
  msgstr ""
743
 
744
+ #: admin/tpl/edit_htaccess.php:64
745
  msgid "Current %s Contents"
746
  msgstr ""
747
 
748
+ #: admin/tpl/edit_htaccess.php:66
749
  msgid "DO NOT EDIT ANYTHING WITHIN %s"
750
  msgstr ""
751
 
789
  msgid "A TTL of 0 indicates do not cache."
790
  msgstr ""
791
 
792
+ #: admin/tpl/image_optimization.php:26
793
  msgid "LiteSpeed Cache Image Optimization"
794
  msgstr ""
795
 
832
  "Cache settings."
833
  msgstr ""
834
 
835
+ #: admin/tpl/import_export.php:58 admin/tpl/settings.php:216
836
  msgid "Reset All Settings"
837
  msgstr ""
838
 
852
  msgid "Rate %s on %s"
853
  msgstr ""
854
 
855
+ #. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.9) #-#-#-#-#
856
  #. Plugin Name of the plugin/theme
857
+ #: admin/tpl/inc/admin_footer.php:6 inc/gui.class.php:467
858
+ #: includes/litespeed-cache-gui.class.php:467
859
  msgid "LiteSpeed Cache"
860
  msgstr ""
861
 
875
  msgid "This will also generate an API key from LiteSpeed's Server."
876
  msgstr ""
877
 
878
+ #: admin/tpl/inc/banner_promo.new_version.php:56
879
+ msgid "New Version Available!"
880
  msgstr ""
881
 
882
+ #: admin/tpl/inc/banner_promo.new_version.php:60
883
+ msgid "New release %s is available now."
884
  msgstr ""
885
 
886
+ #: admin/tpl/inc/banner_promo.new_version.php:68
887
+ msgid "Upgrade"
 
 
888
  msgstr ""
889
 
890
+ #: admin/tpl/inc/banner_promo.new_version.php:78
891
+ msgid "Turn On Auto Upgrade"
 
 
892
  msgstr ""
893
 
894
+ #: admin/tpl/inc/banner_promo.new_version.php:84
895
+ msgid "Maybe Later"
896
  msgstr ""
897
 
898
+ #: admin/tpl/inc/banner_promo.php:72
899
+ msgid "Thank You for Using the LiteSpeed Cache Plugin!"
900
+ msgstr ""
901
+
902
+ #: admin/tpl/inc/banner_promo.php:161
903
+ msgid "Sure I'd love to review!"
904
+ msgstr ""
905
+
906
+ #: admin/tpl/inc/banner_promo.php:165
907
  msgid "I've already left a review"
908
  msgstr ""
909
 
910
+ #: admin/tpl/inc/banner_promo.php:166
911
  msgid "Maybe later"
912
  msgstr ""
913
 
914
+ #: admin/tpl/inc/banner_promo.php:170
915
+ msgid "Created with ❤️ by LiteSpeed team."
916
+ msgstr ""
917
+
918
+ #: admin/tpl/inc/banner_promo.php:172
919
+ msgid "<a %s>Support forum</a> | <a %s>Submit a ticket</a>"
920
+ msgstr ""
921
+
922
+ #: admin/tpl/inc/banner_promo.slack.php:8
923
+ msgid "Welcome to LiteSpeed"
924
+ msgstr ""
925
+
926
+ #: admin/tpl/inc/banner_promo.slack.php:12
927
  msgid "Want to connect with other LiteSpeed users?"
928
  msgstr ""
929
 
930
+ #: admin/tpl/inc/banner_promo.slack.php:13
931
  msgid "Join the %s community."
932
  msgstr ""
933
 
934
+ #: admin/tpl/inc/banner_promo.slack.php:22
935
  msgid "Join Us on Slack"
936
  msgstr ""
937
 
1045
  msgid "Congratulations, all done!"
1046
  msgstr ""
1047
 
1048
+ #: admin/tpl/inc/img_optm.summary.php:15
1049
  msgid "Send Optimization Request"
1050
  msgstr ""
1051
 
1052
+ #: admin/tpl/inc/img_optm.summary.php:26
1053
  msgid ""
1054
  "This will send the optimization request and the images to LiteSpeed's Image "
1055
  "Optimization Server."
1056
  msgstr ""
1057
 
1058
+ #: admin/tpl/inc/img_optm.summary.php:27
1059
  msgid "You can send at most %s images at once."
1060
  msgstr ""
1061
 
1062
+ #: admin/tpl/inc/img_optm.summary.php:33
1063
  msgid "Only press the button if the pull cron job is disabled."
1064
  msgstr ""
1065
 
1066
+ #: admin/tpl/inc/img_optm.summary.php:33
1067
  msgid "Images will be pulled automatically if the cron job is running."
1068
  msgstr ""
1069
 
1070
+ #: admin/tpl/inc/img_optm.summary.php:34
1071
  msgid "Pull Images"
1072
  msgstr ""
1073
 
1074
+ #: admin/tpl/inc/img_optm.summary.php:43
1075
  msgid "Current Stage Status"
1076
  msgstr ""
1077
 
1078
+ #: admin/tpl/inc/img_optm.summary.php:56
1079
  msgid "Images requested"
1080
  msgstr ""
1081
 
1082
+ #: admin/tpl/inc/img_optm.summary.php:63
1083
  msgid ""
1084
  "After LiteSpeed's Image Optimization Server finishes optimization, it will "
1085
  "notify your site to pull the optimized images."
1086
  msgstr ""
1087
 
1088
+ #: admin/tpl/inc/img_optm.summary.php:64
1089
  msgid "This process is automatic."
1090
  msgstr ""
1091
 
1092
+ #: admin/tpl/inc/img_optm.summary.php:70
1093
  msgid "Images notified to pull"
1094
  msgstr ""
1095
 
1096
+ #: admin/tpl/inc/img_optm.summary.php:79
1097
  msgid "Last pull initiated by cron at %s."
1098
  msgstr ""
1099
 
1100
+ #: admin/tpl/inc/img_optm.summary.php:92
1101
  msgid "Images optimized and pulled"
1102
  msgstr ""
1103
 
1104
+ #: admin/tpl/inc/img_optm.summary.php:103
1105
+ #: admin/tpl/inc/img_optm.summary.php:152
1106
  msgid "Images failed to fetch"
1107
  msgstr ""
1108
 
1109
+ #: admin/tpl/inc/img_optm.summary.php:113
1110
  msgid "Images previously optimized"
1111
  msgstr ""
1112
 
1113
+ #: admin/tpl/inc/img_optm.summary.php:123
1114
  msgid "Images failed with other errors"
1115
  msgstr ""
1116
 
1117
+ #: admin/tpl/inc/img_optm.summary.php:133
1118
  msgid "Image files missing"
1119
  msgstr ""
1120
 
1121
+ #: admin/tpl/inc/img_optm.summary.php:143
1122
  msgid "Images with wrong meta"
1123
  msgstr ""
1124
 
1125
+ #: admin/tpl/inc/img_optm.summary.php:158
1126
  msgid "Images failed to notify"
1127
  msgstr ""
1128
 
1129
+ #: admin/tpl/inc/img_optm.summary.php:179
 
 
 
 
1130
  msgid "Storage Optimization"
1131
  msgstr ""
1132
 
1133
+ #: admin/tpl/inc/img_optm.summary.php:181
1134
  msgid "Calculate Original Image Storage"
1135
  msgstr ""
1136
 
1137
+ #: admin/tpl/inc/img_optm.summary.php:189
1138
  msgid "Last calculated"
1139
  msgstr ""
1140
 
1141
+ #: admin/tpl/inc/img_optm.summary.php:193
1142
+ #: admin/tpl/inc/img_optm.summary.php:220
1143
  msgid "Files"
1144
  msgstr ""
1145
 
1146
+ #: admin/tpl/inc/img_optm.summary.php:196
1147
  msgid "Total"
1148
  msgstr ""
1149
 
1150
+ #: admin/tpl/inc/img_optm.summary.php:203
1151
  msgid "Are you sure to remove all image backups?"
1152
  msgstr ""
1153
 
1154
+ #: admin/tpl/inc/img_optm.summary.php:204
1155
  msgid "Remove Original Image Backups"
1156
  msgstr ""
1157
 
1158
+ #: admin/tpl/inc/img_optm.summary.php:207
1159
  msgid "This will delete all of the backups of the original images."
1160
  msgstr ""
1161
 
1162
+ #: admin/tpl/inc/img_optm.summary.php:210
1163
+ #: admin/tpl/setting/settings_media.php:195
1164
  msgid "This is irreversible."
1165
  msgstr ""
1166
 
1167
+ #: admin/tpl/inc/img_optm.summary.php:211
1168
+ #: admin/tpl/setting/settings_media.php:196
1169
  msgid "You will be unable to Revert Optimization once the backups are deleted!"
1170
  msgstr ""
1171
 
1172
+ #: admin/tpl/inc/img_optm.summary.php:217
1173
  msgid "Last ran"
1174
  msgstr ""
1175
 
1176
+ #: admin/tpl/inc/img_optm.summary.php:223
1177
  msgid "Saved"
1178
  msgstr ""
1179
 
1180
+ #: admin/tpl/inc/img_optm.summary.php:229
1181
  msgid "A backup of each image is saved before it is optimized."
1182
  msgstr ""
1183
 
1184
+ #: admin/tpl/inc/img_optm.summary.php:230
1185
  msgid ""
1186
  "The refresh button will calculate the total amount of disk space used by "
1187
  "these backups."
1188
  msgstr ""
1189
 
1190
+ #: admin/tpl/inc/img_optm.summary.php:245
1191
  msgid "Optimization Summary"
1192
  msgstr ""
1193
 
1194
+ #: admin/tpl/inc/img_optm.summary.php:246
1195
  msgid "Update Status"
1196
  msgstr ""
1197
 
1198
+ #: admin/tpl/inc/img_optm.summary.php:250
1199
  msgid "Total Reduction"
1200
  msgstr ""
1201
 
1202
+ #: admin/tpl/inc/img_optm.summary.php:253
1203
  msgid "Images Pulled"
1204
  msgstr ""
1205
 
1206
+ #: admin/tpl/inc/img_optm.summary.php:256
1207
  msgid "Last Request"
1208
  msgstr ""
1209
 
1210
+ #: admin/tpl/inc/img_optm.summary.php:261
1211
  msgid "Revert Optimization"
1212
  msgstr ""
1213
 
1214
+ #: admin/tpl/inc/img_optm.summary.php:264
1215
  msgid ""
1216
  "Switch all images in the media library back to their original unoptimized "
1217
  "versions."
1218
  msgstr ""
1219
 
1220
+ #: admin/tpl/inc/img_optm.summary.php:268
1221
  msgid ""
1222
  "The current IAPI key must be reset after changing home URL or domain before "
1223
  "making any further optimization requests."
1224
  msgstr ""
1225
 
1226
+ #: admin/tpl/inc/img_optm.summary.php:269
1227
  msgid "Reset IAPI Key"
1228
  msgstr ""
1229
 
1230
+ #: admin/tpl/inc/img_optm.summary.php:272
1231
  msgid "Revert all optimized images back to their original versions."
1232
  msgstr ""
1233
 
1234
+ #: admin/tpl/inc/img_optm.summary.php:273
1235
  msgid "Undo Optimization"
1236
  msgstr ""
1237
 
1238
+ #: admin/tpl/inc/img_optm.summary.php:276
1239
  msgid "Switch back to using optimized images."
1240
  msgstr ""
1241
 
1242
+ #: admin/tpl/inc/img_optm.summary.php:277
1243
  msgid "Re-do Optimization"
1244
  msgstr ""
1245
 
1246
+ #: admin/tpl/inc/img_optm.summary.php:280
1247
  msgid ""
1248
  "Scan for any new unoptimized image thumbnail sizes and resend necessary "
1249
  "image optimization requests."
1250
  msgstr ""
1251
 
1252
+ #: admin/tpl/inc/img_optm.summary.php:281
1253
  msgid "Send New Thumbnail Requests"
1254
  msgstr ""
1255
 
1256
+ #: admin/tpl/inc/img_optm.summary.php:285
1257
  msgid "Results can be checked in <a %s>Media Library</a>."
1258
  msgstr ""
1259
 
1260
+ #: admin/tpl/inc/img_optm.summary.php:299
1261
  msgid "Destroy All Optimization Data!"
1262
  msgstr ""
1263
 
1264
+ #: admin/tpl/inc/img_optm.summary.php:303
1265
  msgid ""
1266
  "Remove all previous image optimization requests/results, revert completed "
1267
  "optimizations, and delete all optimization files."
1268
  msgstr ""
1269
 
1270
+ #: admin/tpl/inc/img_optm.summary.php:306
1271
  msgid "This will also reset the credit level."
1272
  msgstr ""
1273
 
1350
  "dismissed. (<a %3$s>Learn More</a>)"
1351
  msgstr ""
1352
 
1353
+ #: admin/tpl/manage/manage_cdn.php:11 inc/gui.class.php:526
1354
+ #: includes/litespeed-cache-gui.class.php:526
1355
  msgid "Cloudflare"
1356
  msgstr ""
1357
 
1540
  #: admin/tpl/manage/manage_purge.php:39 admin/tpl/manage/manage_purge.php:45
1541
  #: admin/tpl/manage/manage_purge.php:54 admin/tpl/manage/manage_purge.php:63
1542
  #: admin/tpl/manage/manage_purge.php:72 admin/tpl/manage/manage_purge.php:81
1543
+ #: admin/tpl/manage/manage_purge.php:90 inc/gui.class.php:501
1544
+ #: inc/gui.class.php:509 inc/gui.class.php:517 inc/gui.class.php:526
1545
+ #: inc/gui.class.php:536 inc/gui.class.php:546 inc/gui.class.php:556
1546
+ #: inc/gui.class.php:566 includes/litespeed-cache-gui.class.php:501
1547
+ #: includes/litespeed-cache-gui.class.php:509
1548
+ #: includes/litespeed-cache-gui.class.php:517
1549
+ #: includes/litespeed-cache-gui.class.php:526
1550
+ #: includes/litespeed-cache-gui.class.php:536
1551
+ #: includes/litespeed-cache-gui.class.php:546
1552
+ #: includes/litespeed-cache-gui.class.php:556
1553
+ #: includes/litespeed-cache-gui.class.php:566
1554
  msgid "Purge All"
1555
  msgstr ""
1556
 
1558
  msgid "Purge the litespeed cache entries created by this plugin"
1559
  msgstr ""
1560
 
1561
+ #: admin/tpl/manage/manage_purge.php:45 inc/gui.class.php:517
1562
+ #: includes/litespeed-cache-gui.class.php:517
1563
  msgid "CSS/JS Cache"
1564
  msgstr ""
1565
 
1568
  msgstr ""
1569
 
1570
  #: admin/tpl/manage/manage_purge.php:54
1571
+ #: admin/tpl/setting/settings_inc.cache_object.php:28 inc/gui.class.php:536
1572
+ #: includes/litespeed-cache-gui.class.php:536
1573
  msgid "Object Cache"
1574
  msgstr ""
1575
 
1577
  msgid "Purge all the object caches"
1578
  msgstr ""
1579
 
1580
+ #: admin/tpl/manage/manage_purge.php:63 inc/gui.class.php:546
1581
+ #: includes/litespeed-cache-gui.class.php:546
1582
  msgid "Opcode Cache"
1583
  msgstr ""
1584
 
1586
  msgid "Reset the entire opcode cache"
1587
  msgstr ""
1588
 
1589
+ #: admin/tpl/manage/manage_purge.php:72 inc/gui.class.php:556
1590
+ #: includes/litespeed-cache-gui.class.php:556
1591
  msgid "Critical CSS"
1592
  msgstr ""
1593
 
1595
  msgid "This will delete all generated critical CSS files"
1596
  msgstr ""
1597
 
1598
+ #: admin/tpl/manage/manage_purge.php:81 inc/gui.class.php:566
1599
+ #: includes/litespeed-cache-gui.class.php:566
1600
  msgid "Placeholder Cache"
1601
  msgstr ""
1602
 
1692
  msgid "DB Optimizer"
1693
  msgstr ""
1694
 
1695
+ #: admin/tpl/manage.php:10 admin/tpl/setting/settings_cdn.php:234
1696
  #: admin/tpl/settings.php:12
1697
  msgid "CDN"
1698
  msgstr ""
1699
 
1700
+ #: admin/tpl/manage.php:19
1701
  msgid "LiteSpeed Cache Network Management"
1702
  msgstr ""
1703
 
1704
+ #: admin/tpl/manage.php:22
1705
  msgid "LiteSpeed Cache Management"
1706
  msgstr ""
1707
 
1992
  msgstr ""
1993
 
1994
  #: admin/tpl/setting/settings_cdn.php:76 admin/tpl/setting/settings_cdn.php:105
1995
+ #: admin/tpl/setting/settings_cdn.php:112
1996
  msgid "Include File Types"
1997
  msgstr ""
1998
 
2000
  #: admin/tpl/setting/settings_crawler.php:22
2001
  #: admin/tpl/setting/settings_crawler.php:95
2002
  #: admin/tpl/setting/settings_crawler.php:100
2003
+ #: admin/tpl/setting/settings_excludes.php:72
2004
+ #: admin/tpl/setting/settings_excludes.php:110
2005
  msgid "NOTE"
2006
  msgstr ""
2007
 
2040
  msgid "Default value"
2041
  msgstr ""
2042
 
2043
+ #: admin/tpl/setting/settings_cdn.php:112
2044
+ msgid ""
2045
+ "If you turn any of the above settings OFF, please remove the related file "
2046
+ "types from the %s box."
2047
  msgstr ""
2048
 
2049
  #: admin/tpl/setting/settings_cdn.php:120
2050
+ msgid "Original URLs"
2051
+ msgstr ""
2052
+
2053
+ #: admin/tpl/setting/settings_cdn.php:124
2054
  msgid ""
2055
  "Site URL to be served through the CDN. Beginning with %1$s. For example, "
2056
  "%2$s."
2057
  msgstr ""
2058
 
2059
+ #: admin/tpl/setting/settings_cdn.php:125
2060
  msgid ""
2061
  "Wildcard %1$s supported (match zero or more characters). For example, to "
2062
  "match %2$s and %3$s, use %4$s."
2063
  msgstr ""
2064
 
2065
+ #: admin/tpl/setting/settings_cdn.php:126
2066
  msgid "Separate multiple original URLs with a %s."
2067
  msgstr ""
2068
 
2069
+ #: admin/tpl/setting/settings_cdn.php:132
2070
  msgid "Included Directories"
2071
  msgstr ""
2072
 
2073
+ #: admin/tpl/setting/settings_cdn.php:138
2074
  msgid "Only files within these directories will be pointed to the CDN."
2075
  msgstr ""
2076
 
2077
+ #: admin/tpl/setting/settings_cdn.php:145
2078
  msgid "Exclude Path"
2079
  msgstr ""
2080
 
2081
+ #: admin/tpl/setting/settings_cdn.php:150
2082
  msgid "Paths containing these strings will not be served from the CDN."
2083
  msgstr ""
2084
 
2085
+ #: admin/tpl/setting/settings_cdn.php:157
2086
  msgid "Load JQuery Remotely"
2087
  msgstr ""
2088
 
2089
+ #: admin/tpl/setting/settings_cdn.php:179
2090
  msgid ""
2091
  "Improve page load time by loading jQuery from a remote CDN service instead "
2092
  "of locally."
2093
  msgstr ""
2094
 
2095
+ #: admin/tpl/setting/settings_cdn.php:185
2096
  msgid "Quic Cloud API"
2097
  msgstr ""
2098
 
2099
+ #: admin/tpl/setting/settings_cdn.php:189
2100
+ #: admin/tpl/setting/settings_cdn.php:233
2101
  msgid "Use %s API functionality."
2102
  msgstr ""
2103
 
2104
+ #: admin/tpl/setting/settings_cdn.php:206
2105
+ #: admin/tpl/setting/settings_cdn.php:238
2106
  msgid "Email Address"
2107
  msgstr ""
2108
 
2109
+ #: admin/tpl/setting/settings_cdn.php:210
2110
+ #: admin/tpl/setting/settings_cdn.php:242
2111
  msgid "Your Email address on %s."
2112
  msgstr ""
2113
 
2114
+ #: admin/tpl/setting/settings_cdn.php:219
2115
+ #: admin/tpl/setting/settings_cdn.php:251
2116
  msgid "Your API key is used to access %s APIs."
2117
  msgstr ""
2118
 
2119
+ #: admin/tpl/setting/settings_cdn.php:220
2120
+ #: admin/tpl/setting/settings_cdn.php:252
2121
  msgid "Get it from <a %1$s>%2$s</a>."
2122
  msgstr ""
2123
 
2124
+ #: admin/tpl/setting/settings_cdn.php:229
2125
  msgid "Cloudflare API"
2126
  msgstr ""
2127
 
2128
+ #: admin/tpl/setting/settings_cdn.php:234
2129
  msgid "This can be managed from <a %2$s>%1$s</a>."
2130
  msgstr ""
2131
 
2132
+ #: admin/tpl/setting/settings_cdn.php:247
2133
  msgid "Global API Key"
2134
  msgstr ""
2135
 
2136
+ #: admin/tpl/setting/settings_cdn.php:257
2137
  msgid "Domain"
2138
  msgstr ""
2139
 
2140
+ #: admin/tpl/setting/settings_cdn.php:265
2141
  msgid "You can just type part of the domain."
2142
  msgstr ""
2143
 
2144
+ #: admin/tpl/setting/settings_cdn.php:266
2145
  msgid ""
2146
  "Once saved, it will be matched with the current list and completed "
2147
  "automatically."
2592
  "settings."
2593
  msgstr ""
2594
 
2595
+ #: admin/tpl/setting/settings_excludes.php:20
2596
+ msgid ""
2597
+ "To define a custom TTL for a URI, add a space followed by the TTL value to "
2598
+ "the end of the URI."
2599
+ msgstr ""
2600
+
2601
+ #: admin/tpl/setting/settings_excludes.php:21
2602
+ msgid "For example, %1$s defines a TTL of %2$s seconds for %3$s."
2603
+ msgstr ""
2604
+
2605
+ #: admin/tpl/setting/settings_excludes.php:27
2606
  msgid "Do Not Cache URIs"
2607
  msgstr ""
2608
 
2609
+ #: admin/tpl/setting/settings_excludes.php:31
2610
  msgid "Paths containing these strings will not be cached."
2611
  msgstr ""
2612
 
2613
+ #: admin/tpl/setting/settings_excludes.php:38
2614
  msgid "Do Not Cache Query Strings"
2615
  msgstr ""
2616
 
2617
+ #: admin/tpl/setting/settings_excludes.php:42
2618
  msgid "Query string containing these parameters will not be cached."
2619
  msgstr ""
2620
 
2621
+ #: admin/tpl/setting/settings_excludes.php:43
2622
  msgid "For example, for %s, %s and %s can be used here."
2623
  msgstr ""
2624
 
2625
+ #: admin/tpl/setting/settings_excludes.php:52
2626
  msgid "Do Not Cache Categories"
2627
  msgstr ""
2628
 
2629
+ #: admin/tpl/setting/settings_excludes.php:65
2630
  msgid "All categories are cached by default."
2631
  msgstr ""
2632
 
2633
+ #: admin/tpl/setting/settings_excludes.php:66
2634
+ #: admin/tpl/setting/settings_excludes.php:104
2635
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:16
2636
  #: admin/tpl/setting/settings_inc.exclude_useragent.php:15
2637
  msgid "To prevent %s from being cached, enter it here."
2638
  msgstr ""
2639
 
2640
+ #: admin/tpl/setting/settings_excludes.php:66
2641
  msgid "categories"
2642
  msgstr ""
2643
 
2644
+ #: admin/tpl/setting/settings_excludes.php:74
2645
  msgid ""
2646
  "If the category slug is not found, the category will be removed from the "
2647
  "list on save."
2648
  msgstr ""
2649
 
2650
+ #: admin/tpl/setting/settings_excludes.php:75
2651
+ #: admin/tpl/setting/settings_excludes.php:113
2652
  msgid "To exclude %1$s, insert %2$s."
2653
  msgstr ""
2654
 
2655
+ #: admin/tpl/setting/settings_excludes.php:83
2656
  msgid "Do Not Cache Tags"
2657
  msgstr ""
2658
 
2659
+ #: admin/tpl/setting/settings_excludes.php:103
2660
  msgid "All tags are cached by default."
2661
  msgstr ""
2662
 
2663
+ #: admin/tpl/setting/settings_excludes.php:104
2664
  msgid "tags"
2665
  msgstr ""
2666
 
2667
+ #: admin/tpl/setting/settings_excludes.php:112
2668
  msgid ""
2669
  "If the tag slug is not found, the tag will be removed from the list on save."
2670
  msgstr ""
2671
 
2672
+ #: admin/tpl/setting/settings_excludes.php:133
2673
  msgid "Do Not Cache Roles"
2674
  msgstr ""
2675
 
2676
+ #: admin/tpl/setting/settings_excludes.php:139
2677
  msgid "Selected roles will be excluded from cache."
2678
  msgstr ""
2679
 
2841
  msgstr ""
2842
 
2843
  #: admin/tpl/setting/settings_inc.cache_mobile.php:8
2844
+ #: admin/tpl/setting/settings_inc.cache_mobile.php:65
2845
  msgid "Cache Mobile"
2846
  msgstr ""
2847
 
2854
  msgstr ""
2855
 
2856
  #: admin/tpl/setting/settings_inc.cache_mobile.php:25
2857
+ #: admin/tpl/setting/settings_inc.cache_mobile.php:65
2858
  msgid "List of Mobile User Agents"
2859
  msgstr ""
2860
 
2861
+ #: admin/tpl/setting/settings_inc.cache_mobile.php:40
2862
  msgid "Htaccess did not match configuration option."
2863
  msgstr ""
2864
 
2865
+ #: admin/tpl/setting/settings_inc.cache_mobile.php:41
2866
  msgid "Please re-enter the mobile view setting."
2867
  msgstr ""
2868
 
2869
+ #: admin/tpl/setting/settings_inc.cache_mobile.php:42
2870
  msgid "List in WordPress database is: %s"
2871
  msgstr ""
2872
 
2873
+ #: admin/tpl/setting/settings_inc.cache_mobile.php:58
2874
  msgid "SYNTAX: Each entry should be separated with a bar, %s."
2875
  msgstr ""
2876
 
2877
+ #: admin/tpl/setting/settings_inc.cache_mobile.php:59
2878
  msgid "Any spaces should be escaped with a backslash before the space, %s."
2879
  msgstr ""
2880
 
2881
+ #: admin/tpl/setting/settings_inc.cache_mobile.php:62
2882
  msgid "The default list WordPress uses is %s"
2883
  msgstr ""
2884
 
2885
+ #: admin/tpl/setting/settings_inc.cache_mobile.php:65
2886
  msgid "If %1$s is %2$s, then %3$s must be populated!"
2887
  msgstr ""
2888
 
3171
  msgstr ""
3172
 
3173
  #: admin/tpl/setting/settings_media.php:20
3174
+ #: admin/tpl/setting/settings_media.php:138
3175
  msgid "This can improve page loading time by reducing initial HTTP requests."
3176
  msgstr ""
3177
 
3210
  msgstr ""
3211
 
3212
  #: admin/tpl/setting/settings_media.php:47
3213
+ msgid "Lazy Load Image Class Name Excludes"
 
3214
  msgstr ""
3215
 
3216
  #: admin/tpl/setting/settings_media.php:51
3217
+ msgid "Images containing these class names will not be lazy loaded."
3218
+ msgstr ""
3219
+
3220
+ #: admin/tpl/setting/settings_media.php:52
3221
+ msgid "Both full and partial strings can be used."
3222
+ msgstr ""
3223
+
3224
+ #: admin/tpl/setting/settings_media.php:59
3225
+ #: admin/tpl/setting/settings_media.php:103
3226
+ msgid "Lazy Load Image Placeholder"
3227
+ msgstr ""
3228
+
3229
+ #: admin/tpl/setting/settings_media.php:63
3230
  msgid ""
3231
  "Specify a base64 image to be used as a placeholder while other images finish "
3232
  "loading."
3233
  msgstr ""
3234
 
3235
+ #: admin/tpl/setting/settings_media.php:64
3236
  msgid ""
3237
  "This can be predefined in %2$s as well using constant %1$s, with this "
3238
  "setting taking priority."
3239
  msgstr ""
3240
 
3241
+ #: admin/tpl/setting/settings_media.php:65
3242
  msgid "By default a gray image placeholder %s will be used."
3243
  msgstr ""
3244
 
3245
+ #: admin/tpl/setting/settings_media.php:66
3246
  msgid "For example, %s can be used for a transparent placeholder."
3247
  msgstr ""
3248
 
3249
+ #: admin/tpl/setting/settings_media.php:72
3250
+ #: admin/tpl/setting/settings_media.php:99
3251
  msgid "Responsive Placeholder"
3252
  msgstr ""
3253
 
3254
+ #: admin/tpl/setting/settings_media.php:76
3255
  msgid ""
3256
  "Responsive image placeholders can help to reduce layout reshuffle when "
3257
  "images are loaded."
3258
  msgstr ""
3259
 
3260
+ #: admin/tpl/setting/settings_media.php:77
3261
  msgid ""
3262
  "This will generate the placeholder with same dimensions as the image if it "
3263
  "has the width and height attributes."
3264
  msgstr ""
3265
 
3266
+ #: admin/tpl/setting/settings_media.php:83
3267
  msgid "Responsive Placeholder Background Color"
3268
  msgstr ""
3269
 
3270
+ #: admin/tpl/setting/settings_media.php:88
3271
  msgid "Specify the placeholder color you want to use."
3272
  msgstr ""
3273
 
3274
+ #: admin/tpl/setting/settings_media.php:95
3275
  msgid "Generate Reponsive Placeholder In Background"
3276
  msgstr ""
3277
 
3278
+ #: admin/tpl/setting/settings_media.php:99
3279
  msgid "Automatically generate %s in the background via a cron-based queue."
3280
  msgstr ""
3281
 
3282
+ #: admin/tpl/setting/settings_media.php:101
3283
  msgid ""
3284
  "If set to %1$s, before the placeholder is localized, the %2$s configuration "
3285
  "will be used."
3286
  msgstr ""
3287
 
3288
+ #: admin/tpl/setting/settings_media.php:105
3289
  #: admin/tpl/setting/settings_optimize.php:164
3290
  msgid ""
3291
  "If set to %s this is done in the foreground, which may slow down page load."
3292
  msgstr ""
3293
 
3294
+ #: admin/tpl/setting/settings_media.php:113
3295
  #: admin/tpl/setting/settings_optimize.php:172
3296
  msgid "Last generated"
3297
  msgstr ""
3298
 
3299
+ #: admin/tpl/setting/settings_media.php:118
3300
  msgid "Size list in queue waiting for cron"
3301
  msgstr ""
3302
 
3303
+ #: admin/tpl/setting/settings_media.php:124
3304
  #: admin/tpl/setting/settings_optimize.php:191
3305
  msgid "Run Queue Manually"
3306
  msgstr ""
3307
 
3308
+ #: admin/tpl/setting/settings_media.php:133
3309
  msgid "Lazy Load Iframes"
3310
  msgstr ""
3311
 
3312
+ #: admin/tpl/setting/settings_media.php:137
3313
  msgid "Load iframes only when they enter the viewport."
3314
  msgstr ""
3315
 
3316
+ #: admin/tpl/setting/settings_media.php:144
3317
  msgid "Inline Lazy Load Images Library"
3318
  msgstr ""
3319
 
3320
+ #: admin/tpl/setting/settings_media.php:148
3321
  msgid "Include the lazy load image Javascript library inline."
3322
  msgstr ""
3323
 
3324
+ #: admin/tpl/setting/settings_media.php:149
3325
  #: admin/tpl/setting/settings_optimize.php:137
3326
  #: admin/tpl/setting/settings_optimize.php:238
3327
  #: admin/tpl/setting/settings_optimize.php:276
3332
  "PageSpeed."
3333
  msgstr ""
3334
 
3335
+ #: admin/tpl/setting/settings_media.php:156
3336
  msgid "Optimize Automatically"
3337
  msgstr ""
3338
 
3339
+ #: admin/tpl/setting/settings_media.php:160
3340
  msgid "Automatically request optimization via cron job."
3341
  msgstr ""
3342
 
3343
+ #: admin/tpl/setting/settings_media.php:161
3344
  msgid "Requests can only be sent when recovered credits is %s or more."
3345
  msgstr ""
3346
 
3347
+ #: admin/tpl/setting/settings_media.php:167
3348
  msgid "Optimization Cron"
3349
  msgstr ""
3350
 
3351
+ #: admin/tpl/setting/settings_media.php:171
3352
  msgid ""
3353
  "Disabling this will stop the cron job responsible for fetching optimized "
3354
  "images from LiteSpeed's Image Server."
3355
  msgstr ""
3356
 
3357
+ #: admin/tpl/setting/settings_media.php:177
3358
  msgid "Optimize Original Images"
3359
  msgstr ""
3360
 
3361
+ #: admin/tpl/setting/settings_media.php:181
3362
  msgid "Optimize images and save backups of the originals in the same folder."
3363
  msgstr ""
3364
 
3365
+ #: admin/tpl/setting/settings_media.php:187
3366
  msgid "Remove Original Backups"
3367
  msgstr ""
3368
 
3369
+ #: admin/tpl/setting/settings_media.php:191
3370
  msgid ""
3371
  "Automatically remove the original image backups after fetching optimized "
3372
  "images."
3373
  msgstr ""
3374
 
3375
+ #: admin/tpl/setting/settings_media.php:203
3376
  msgid "Optimize WebP Versions"
3377
  msgstr ""
3378
 
3379
+ #: admin/tpl/setting/settings_media.php:207
3380
  msgid "Request WebP versions of original images when doing optimization."
3381
  msgstr ""
3382
 
3383
+ #: admin/tpl/setting/settings_media.php:213
3384
  msgid "Optimize Losslessly"
3385
  msgstr ""
3386
 
3387
+ #: admin/tpl/setting/settings_media.php:217
3388
  msgid "Optimize images using lossless compression."
3389
  msgstr ""
3390
 
3391
+ #: admin/tpl/setting/settings_media.php:218
3392
  msgid ""
3393
  "This can improve quality but may result in larger images than lossy "
3394
  "compression will."
3395
  msgstr ""
3396
 
3397
+ #: admin/tpl/setting/settings_media.php:224
3398
  msgid "Preserve EXIF data"
3399
  msgstr ""
3400
 
3401
+ #: admin/tpl/setting/settings_media.php:228
3402
  msgid ""
3403
  "Preserve EXIF data (copyright, GPS, comments, keywords, etc) when optimizing."
3404
  msgstr ""
3405
 
3406
+ #: admin/tpl/setting/settings_media.php:229
3407
  msgid "This will increase the size of optimized files."
3408
  msgstr ""
3409
 
3410
+ #: admin/tpl/setting/settings_media.php:243
3411
  msgid "WebP Attribute To Replace"
3412
  msgstr ""
3413
 
3414
+ #: admin/tpl/setting/settings_media.php:249
3415
  msgid "Specify which element attributes will be replaced with WebP."
3416
  msgstr ""
3417
 
3418
+ #: admin/tpl/setting/settings_media.php:250
3419
  msgid "Only attributes listed here will be replaced."
3420
  msgstr ""
3421
 
3422
+ #: admin/tpl/setting/settings_media.php:251
3423
  msgid "Use the format %1$s or %2$s (element is optional)."
3424
  msgstr ""
3425
 
3426
+ #: admin/tpl/setting/settings_media.php:258
3427
  msgid "WebP For Extra srcset"
3428
  msgstr ""
3429
 
3430
+ #: admin/tpl/setting/settings_media.php:262
3431
  msgid ""
3432
  "Enable replacement of WebP in %s elements that were generated outside of "
3433
  "WordPress logic."
3953
  msgid "Compatibilities"
3954
  msgstr ""
3955
 
3956
+ #: admin/tpl/settings.php:122
3957
  msgid "LiteSpeed Cache Settings"
3958
  msgstr ""
3959
 
3960
+ #: admin/tpl/settings.php:172
3961
  msgid "Hide Advanced Options"
3962
  msgstr ""
3963
 
3964
+ #: admin/tpl/settings.php:174
3965
  msgid "Show Advanced Options"
3966
  msgstr ""
3967
 
3968
+ #: admin/tpl/settings.php:185
3969
  msgid "The network admin selected use primary site configs for all subsites."
3970
  msgstr ""
3971
 
3972
+ #: admin/tpl/settings.php:186
3973
  msgid ""
3974
  "The following options are selected, but are not editable in this settings "
3975
  "page."
3976
  msgstr ""
3977
 
3978
+ #: admin/tpl/settings.php:208 admin/tpl/settings.php:211
3979
  msgid "Save Changes"
3980
  msgstr ""
3981
 
3995
  msgid "Purged the tags!"
3996
  msgstr ""
3997
 
3998
+ #: inc/activation.class.php:354 inc/activation.class.php:359
3999
+ #: includes/litespeed-cache-activation.class.php:354
4000
+ #: includes/litespeed-cache-activation.class.php:359
4001
+ msgid "Failed to upgrade."
4002
+ msgstr ""
4003
+
4004
+ #: inc/activation.class.php:363
4005
+ #: includes/litespeed-cache-activation.class.php:363
4006
+ msgid "Upgraded successfully."
4007
+ msgstr ""
4008
+
4009
  #: inc/cdn/cloudflare.class.php:113
4010
  msgid "Notified Cloudflare to set development mode to %s successfully."
4011
  msgstr ""
4030
  msgid "Failed to communicate with Cloudflare"
4031
  msgstr ""
4032
 
4033
+ #: inc/config.class.php:768 includes/litespeed-cache-config.class.php:768
4034
+ msgid "Changed setting successfully."
4035
+ msgstr ""
4036
+
4037
  #: inc/crawler.class.php:102 includes/litespeed-cache-crawler.class.php:102
4038
  msgid "Can not find any form data for blacklist"
4039
  msgstr ""
4074
  "admin before their natural expiration, if necessary."
4075
  msgstr ""
4076
 
4077
+ #: inc/gui.class.php:396 includes/litespeed-cache-gui.class.php:396
4078
  msgid "Purge this page"
4079
  msgstr ""
4080
 
4081
+ #: inc/gui.class.php:404 includes/litespeed-cache-gui.class.php:404
4082
  msgid "Mark this page as "
4083
  msgstr ""
4084
 
4085
+ #: inc/gui.class.php:411 includes/litespeed-cache-gui.class.php:411
4086
  msgid "Forced cacheable"
4087
  msgstr ""
4088
 
4089
+ #: inc/gui.class.php:418 includes/litespeed-cache-gui.class.php:418
4090
  msgid "Non cacheable"
4091
  msgstr ""
4092
 
4093
+ #: inc/gui.class.php:425 includes/litespeed-cache-gui.class.php:425
4094
  msgid "Private cache"
4095
  msgstr ""
4096
 
4097
+ #: inc/gui.class.php:432 includes/litespeed-cache-gui.class.php:432
4098
  msgid "No optimization"
4099
  msgstr ""
4100
 
4101
+ #: inc/gui.class.php:439 includes/litespeed-cache-gui.class.php:439
4102
  msgid "More settings"
4103
  msgstr ""
4104
 
4105
+ #: inc/gui.class.php:459 includes/litespeed-cache-gui.class.php:459
4106
  msgid "LiteSpeed Cache Purge All"
4107
  msgstr ""
4108
 
4109
+ #: inc/gui.class.php:459 inc/gui.class.php:509
4110
+ #: includes/litespeed-cache-gui.class.php:459
4111
+ #: includes/litespeed-cache-gui.class.php:509
4112
  msgid "LSCache"
4113
  msgstr ""
4114
 
4115
+ #: inc/gui.class.php:584 includes/litespeed-cache-gui.class.php:584
4116
  msgid "Remove all previous unfinished image optimization requests."
4117
  msgstr ""
4118
 
4119
+ #: inc/gui.class.php:585 includes/litespeed-cache-gui.class.php:585
4120
  msgid "Clean Up Unfinished Data"
4121
  msgstr ""
4122
 
4123
+ #: inc/gui.class.php:604 includes/litespeed-cache-gui.class.php:604
4124
  msgid "Install %s"
4125
  msgstr ""
4126
 
4127
+ #: inc/gui.class.php:605 includes/litespeed-cache-gui.class.php:605
4128
  msgid "Install Now"
4129
  msgstr ""
4130
 
4131
+ #: inc/gui.class.php:625 includes/litespeed-cache-gui.class.php:625
4132
  msgid ""
4133
  "<a href=\"%1$s\" %2$s>View version %3$s details</a> or <a href=\"%4$s\" %5$s "
4134
  "target=\"_blank\">update now</a>."
4135
  msgstr ""
4136
 
4137
+ #: inc/gui.class.php:628 includes/litespeed-cache-gui.class.php:628
4138
  msgid "View %1$s version %2$s details"
4139
  msgstr ""
4140
 
4141
+ #: inc/gui.class.php:633 includes/litespeed-cache-gui.class.php:633
4142
  msgid "Update %s now"
4143
  msgstr ""
4144
 
4146
  msgid "Communicated with LiteSpeed Image Optimization Server successfully."
4147
  msgstr ""
4148
 
4149
+ #: inc/img_optm.class.php:167 inc/img_optm.class.php:1454
4150
+ #: inc/img_optm.class.php:1519
4151
  msgid "No image found."
4152
  msgstr ""
4153
 
4178
  "automated."
4179
  msgstr ""
4180
 
4181
+ #: inc/img_optm.class.php:1343
4182
  msgid "Destroy unfinished data successfully."
4183
  msgstr ""
4184
 
4185
+ #: inc/img_optm.class.php:1557
4186
  msgid ""
4187
  "Pushed %1$s groups with %2$s images to LiteSpeed optimization server, "
4188
  "accepted %3$s groups with %4$s images."
4189
  msgstr ""
4190
 
4191
+ #: inc/img_optm.class.php:1733
4192
  msgid "Removed %1$s images and saved %2$s successfully."
4193
  msgstr ""
4194
 
4195
+ #: inc/img_optm.class.php:1928
4196
  msgid "Switched images successfully."
4197
  msgstr ""
4198
 
4199
+ #: inc/img_optm.class.php:1959
4200
  msgid "Disabled WebP file successfully."
4201
  msgstr ""
4202
 
4203
+ #: inc/img_optm.class.php:1965
4204
  msgid "Enabled WebP file successfully."
4205
  msgstr ""
4206
 
4207
+ #: inc/img_optm.class.php:1981
4208
  msgid "Restored original file successfully."
4209
  msgstr ""
4210
 
4211
+ #: inc/img_optm.class.php:1988
4212
  msgid "Switched to optimized file successfully."
4213
  msgstr ""
4214
 
4215
+ #: inc/img_optm.class.php:2048
4216
  msgid "Reset the optimized data successfully."
4217
  msgstr ""
4218
 
4228
  msgid "Reset successfully."
4229
  msgstr ""
4230
 
4231
+ #: inc/litespeed-cache.class.php:320 includes/litespeed-cache.class.php:320
4232
  msgid "Crawler blacklist is saved."
4233
  msgstr ""
4234
 
4235
+ #: inc/litespeed-cache.class.php:331 includes/litespeed-cache.class.php:331
4236
  msgid "Notified LiteSpeed Web Server to purge everything."
4237
  msgstr ""
4238
 
4239
+ #: inc/litespeed-cache.class.php:341 includes/litespeed-cache.class.php:341
4240
  msgid "Notified LiteSpeed Web Server to purge the list."
4241
  msgstr ""
4242
 
4340
  msgid "LiteSpeed Cache Custom Cron Crawler"
4341
  msgstr ""
4342
 
4343
+ #: inc/utility.class.php:221 includes/litespeed-cache-utility.class.php:221
4344
  msgid "just now"
4345
  msgstr ""
4346
 
4347
+ #: inc/utility.class.php:221 includes/litespeed-cache-utility.class.php:221
4348
  msgid "right now"
4349
  msgstr ""
4350
 
4351
+ #: inc/utility.class.php:224 includes/litespeed-cache-utility.class.php:224
4352
  msgid " %s ago"
4353
  msgstr ""
4354
 
lib/litespeed/litespeed-file.class.php CHANGED
@@ -94,7 +94,7 @@ class Litespeed_File
94
 
95
  $content = file_get_contents( $filename ) ;
96
 
97
- $content = self::_remove_zero_space( $content ) ;
98
 
99
  return $content ;
100
  }
@@ -164,7 +164,7 @@ class Litespeed_File
164
  return $silence ? false : sprintf( __( 'File %s is not writable.', 'litespeed-cache' ), $filename ) ;
165
  }
166
 
167
- $data = self::_remove_zero_space( $data ) ;
168
 
169
  $ret = file_put_contents( $filename, $data, $append ? FILE_APPEND : LOCK_EX ) ;
170
  if ( $ret === false ) {
@@ -178,11 +178,12 @@ class Litespeed_File
178
  * Remove Unicode zero-width space <200b><200c>
179
  *
180
  * @since 2.1.2
 
181
  */
182
- private static function _remove_zero_space( $content )
183
  {
184
  if ( is_array( $content ) ) {
185
- $content = array_map( 'self::_remove_zero_space', $content ) ;
186
  return $content ;
187
  }
188
 
94
 
95
  $content = file_get_contents( $filename ) ;
96
 
97
+ $content = self::remove_zero_space( $content ) ;
98
 
99
  return $content ;
100
  }
164
  return $silence ? false : sprintf( __( 'File %s is not writable.', 'litespeed-cache' ), $filename ) ;
165
  }
166
 
167
+ $data = self::remove_zero_space( $data ) ;
168
 
169
  $ret = file_put_contents( $filename, $data, $append ? FILE_APPEND : LOCK_EX ) ;
170
  if ( $ret === false ) {
178
  * Remove Unicode zero-width space <200b><200c>
179
  *
180
  * @since 2.1.2
181
+ * @since 2.9 changed to public
182
  */
183
+ public static function remove_zero_space( $content )
184
  {
185
  if ( is_array( $content ) ) {
186
+ $content = array_map( 'self::remove_zero_space', $content ) ;
187
  return $content ;
188
  }
189
 
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.8.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.9
19
  * Author: LiteSpeed Technologies
20
  * Author URI: https://www.litespeedtech.com
21
  * License: GPLv3
readme.txt CHANGED
@@ -2,12 +2,12 @@
2
  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.8.1
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
10
- Speed up your page-load times. Get a faster site with high-performance page caching from LiteSpeed Cache. Easy to set up. Easy to use.
11
 
12
  == Description ==
13
 
@@ -18,7 +18,7 @@ LSCWP supports WordPress Multisite and is compatible with most popular plugins,
18
  == Requirements ==
19
  **General Features** may be used by anyone with any web server (LiteSpeed, Apache, NGiNX, etc.).
20
 
21
- **LiteSpeed Exclusive Features** require OpenLiteSpeed, commercial LiteSpeed products, or LiteSpeed-powered hosting.
22
 
23
  == Plugin Features ==
24
 
@@ -34,7 +34,6 @@ LSCWP supports WordPress Multisite and is compatible with most popular plugins,
34
  * Multiple CDN support
35
  * Load CSS/JS Asynchronously
36
  * Browser Cache
37
- * Smart preload crawler with support for SEO-friendly sitemap
38
  * Database Cleaner and Optimizer
39
  * PageSpeed score optimization
40
  * OPcode Cache
@@ -58,10 +57,15 @@ LSCWP supports WordPress Multisite and is compatible with most popular plugins,
58
  * Ability to schedule purge for specified URLs
59
  * WooCommerce and bbPress support
60
  * [WordPress CLI](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp#wordpress_cli) commands
61
- * Simple API system for each cache integration
62
  * Exclude from cache by URI, Category, Tag, Cookie, User Agent
63
- * HTTP/2 & [QUIC](https://blog.litespeedtech.com/2017/07/11/litespeed-announces-quic-support/) support (QUIC not available in OpenLiteSpeed)
64
- * ESI (Edge Side Includes) support (Not available in OpenLiteSpeed)
 
 
 
 
 
65
 
66
  == Screenshots ==
67
 
@@ -133,8 +137,8 @@ Please see [LiteSpeed’s Privacy Policy](https://www.litespeedtech.com/company/
133
 
134
  == Frequently Asked Questions ==
135
 
136
- = How do the Cache features of LSCache work? =
137
- This plugin communicates with your LiteSpeed Web Server and its built-in page cache (LSCache) to deliver superior performance to your WordPress site.
138
 
139
  LSCache is a server-level cache, so it's faster than PHP-level caches. [Compare with other PHP-based caches](https://www.litespeedtech.com/benchmarks/wordpress).
140
 
@@ -276,6 +280,30 @@ Click on the `Advanced View` link at the top of the page, and several more tabs
276
 
277
  == Changelog ==
278
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  = 2.8.1 - Dec 5 2018 =
280
  * 🐞🕷️: Fixed an activation warning related to cookie crawler. (@kacper3355 @rastel72)
281
  * 🐞<strong>Media</strong>: Replace safely by checking if pulled images is empty or not first. (@Monarobase)
2
  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.0.2
6
+ Stable tag: 2.9
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
10
+ All-in-one unbeatable acceleration & PageSpeed improvement: caching, image/CSS/JS optimization...
11
 
12
  == Description ==
13
 
18
  == Requirements ==
19
  **General Features** may be used by anyone with any web server (LiteSpeed, Apache, NGiNX, etc.).
20
 
21
+ **LiteSpeed Exclusive Features** require OpenLiteSpeed, commercial LiteSpeed products, or LiteSpeed-powered hosting. [Why?](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:faq#why_do_the_cache_features_require_litespeed_server)
22
 
23
  == Plugin Features ==
24
 
34
  * Multiple CDN support
35
  * Load CSS/JS Asynchronously
36
  * Browser Cache
 
37
  * Database Cleaner and Optimizer
38
  * PageSpeed score optimization
39
  * OPcode Cache
57
  * Ability to schedule purge for specified URLs
58
  * WooCommerce and bbPress support
59
  * [WordPress CLI](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp#wordpress_cli) commands
60
+ * API system for easy cache integration
61
  * Exclude from cache by URI, Category, Tag, Cookie, User Agent
62
+ * Smart preload crawler with support for SEO-friendly sitemap
63
+ * Multiple crawlers for cache varies
64
+ * HTTP/2 & [QUIC](https://blog.litespeedtech.com/2017/07/11/litespeed-announces-quic-support/) support<sup>*</sup>
65
+ * ESI (Edge Side Includes) support<sup>*</sup>
66
+ * Widgets and [Shortcodes](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:esi:shortcode) as ESI blocks<sup>*</sup>
67
+
68
+ <sup>*</sup> Feature not available in OpenLiteSpeed
69
 
70
  == Screenshots ==
71
 
137
 
138
  == Frequently Asked Questions ==
139
 
140
+ = Why do the cache features require LiteSpeed Server? =
141
+ This plugin communicates with your LiteSpeed Web Server and its built-in page cache (LSCache) to deliver superior performance to your WordPress site. The plugin's cache features indicate to the server that a page is cacheable and for how long, or they invalidate particular cached pages using tags.
142
 
143
  LSCache is a server-level cache, so it's faster than PHP-level caches. [Compare with other PHP-based caches](https://www.litespeedtech.com/benchmarks/wordpress).
144
 
280
 
281
  == Changelog ==
282
 
283
+ = 2.9 - Dec 31 2018 =
284
+ * 🌱<strong>Media</strong>: Lazy Load Image Classname Excludes. (@thinkmedia)
285
+ * 🌱: New EU/AS cloud servers for faster image optimization handling.
286
+ * 🌱: New EU/AS cloud servers for faster CCSS generation.
287
+ * 🌱: New EU/AS cloud servers for faster responsive placeholder generation.
288
+ * 🌱<strong>Conf</strong>: Ability to set single options via link.
289
+ * 🌱<strong>Cache</strong>: Ability to add custom TTLs to Force Cache URIs.
290
+ * <strong>Purge</strong>: Added post type to Purge tags.
291
+ * <strong>Purge</strong>: Redefined CCSS page types.
292
+ * <strong>Core</strong>: Using Exception for .htaccess R/W.
293
+ * <strong>IAPI</strong>: <strong>New cloud servers added. Please whitelist the new [IAPI IP List](https://wp.api.litespeedtech.com/ips).</strong>
294
+ * <strong>Optm</strong>: Trim BOM when detecting if the page is HTML.
295
+ * <strong>GUI</strong>: Added PageSpeed Score comparison into promotion banner.
296
+ * <strong>GUI</strong>: Refactored promotion banner logic.
297
+ * <strong>GUI</strong>: Removed page optimized comment when ESI Silence is requested.
298
+ * <strong>GUI</strong>: WHM transient changed to option instead of transient when storing.
299
+ * <strong>GUI</strong>: Appending more descriptions to CDN filetype setting.
300
+ * <strong>IAPI</strong>: Removed duplicate messages.
301
+ * <strong>IAPI</strong>: Removed taken_failed/client_pull(duplicated) status.
302
+ * <strong>Debug</strong>: Environment report no longer generates hash for validation.
303
+ * <strong>3rd</strong>: Non-cacheable pages no longer punch ESI holes for Divi compatibility.
304
+ * 🐞<strong>Network</strong>: Added slashes for mobile rules when activating plugin.
305
+ * 🐞<strong>CCSS</strong>: Eliminated a PHP notice when appending CCSS.
306
+
307
  = 2.8.1 - Dec 5 2018 =
308
  * 🐞🕷️: Fixed an activation warning related to cookie crawler. (@kacper3355 @rastel72)
309
  * 🐞<strong>Media</strong>: Replace safely by checking if pulled images is empty or not first. (@Monarobase)