LiteSpeed Cache - Version 2.1

Version Description

  • Mar 15 2018 =
  • [NEW FEATURE] Image Optimization Unlocked for non-LiteSpeed users.
  • [NEW FEATURE] Object Cache Unlocked for non-LiteSpeed users.
  • [NEW FEATURE] Crawler Unlocked for non-LiteSpeed users.
  • [NEW FEATURE] Database Cleaner and Optimizer Unlocked for non-LiteSpeed users.
  • [NEW FEATURE] Lazy Load Images Unlocked for non-LiteSpeed users.
  • [NEW FEATURE] CSS/JS/HTML Minify/Combine Optimize Unlocked for non-LiteSpeed users.
  • [IAPI] IAPI v2.0.
  • [IAPI] Increased max rows prefetch when client has additional credit.
  • [IMPROVEMENT] CDN Multiple domains may now be used.
  • [IMPROVEMENT] Report Added WP environment constants for better debugging.
  • [REFACTOR] Separated Cloudflare CDN class.
  • [BUGFIX] Image Optimization Fixed issue where certain MySQL version failed to create img_optm table. (@philippwidmer)
  • [BUGFIX] Image Optimization Fixed issue where callback validation failed when pulling and sending request simultaneously.
  • [GUI] Added Slack community banner.
  • [INTEGRATION] CDN compatibility with WPML multiple domains. (@egemensarica)
Download this release

Release Info

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

Code changes from version 2.0 to 2.1

Files changed (54) hide show
  1. admin/admin-api.class.php +9 -6
  2. admin/litespeed-cache-admin-display.class.php +14 -19
  3. admin/litespeed-cache-admin-error.class.php +0 -8
  4. admin/litespeed-cache-admin-report.class.php +35 -15
  5. admin/litespeed-cache-admin-settings.class.php +8 -4
  6. admin/litespeed-cache-admin.class.php +4 -4
  7. admin/tpl/crawler.php +1 -3
  8. admin/tpl/image_optimization.php +2 -6
  9. admin/tpl/import_export.php +0 -2
  10. admin/tpl/inc/banner_promo.php +1 -1
  11. admin/tpl/inc/banner_promo.slack.php +33 -0
  12. admin/tpl/inc/check_cache_disabled.php +41 -5
  13. admin/tpl/manage.php +1 -5
  14. admin/tpl/manage/manage_cdn.php +4 -4
  15. admin/tpl/manage/manage_purge.php +2 -0
  16. admin/tpl/setting/settings_cache.php +2 -0
  17. admin/tpl/setting/settings_cdn.php +2 -1
  18. admin/tpl/setting/settings_esi.php +1 -0
  19. admin/tpl/setting/settings_excludes.php +3 -0
  20. admin/tpl/setting/settings_general.php +2 -0
  21. admin/tpl/setting/settings_purge.php +2 -0
  22. admin/tpl/settings.php +1 -3
  23. css/litespeed.css +68 -1
  24. img/slack-logo.png +0 -0
  25. inc/activation.class.php +1 -1
  26. inc/cdn.class.php +53 -257
  27. inc/cdn/cloudflare.class.php +289 -0
  28. inc/config.class.php +37 -8
  29. inc/data_structure/img_optm.sql +1 -1
  30. inc/gui.class.php +87 -11
  31. inc/img_optm.class.php +5 -5
  32. inc/litespeed-cache.class.php +33 -25
  33. inc/litespeed.autoload.php +2 -1
  34. inc/log.class.php +1 -1
  35. inc/optimize.class.php +57 -1
  36. inc/purge.class.php +3 -0
  37. inc/router.class.php +18 -5
  38. inc/utility.class.php +21 -15
  39. includes/litespeed-cache-activation.class.php +1 -1
  40. includes/litespeed-cache-cdn.class.php +53 -257
  41. includes/litespeed-cache-config.class.php +37 -8
  42. includes/litespeed-cache-gui.class.php +87 -11
  43. includes/litespeed-cache-log.class.php +1 -1
  44. includes/litespeed-cache-optimize.class.php +57 -1
  45. includes/litespeed-cache-purge.class.php +3 -0
  46. includes/litespeed-cache-router.class.php +18 -5
  47. includes/litespeed-cache-utility.class.php +21 -15
  48. includes/litespeed-cache.class.php +33 -25
  49. includes/litespeed.autoload.php +2 -1
  50. js/litespeed-cache-admin.js +4 -0
  51. languages/litespeed-cache.pot +460 -439
  52. lib/litespeed/litespeed-file.class.php +16 -0
  53. litespeed-cache.php +1 -1
  54. readme.txt +160 -148
admin/admin-api.class.php CHANGED
@@ -206,7 +206,7 @@ class LiteSpeed_Cache_Admin_API
206
  * @access public
207
  * @param array $data
208
  */
209
- public static function post( $action, $data = false, $server = false )
210
  {
211
  $instance = self::get_instance() ;
212
 
@@ -218,7 +218,7 @@ class LiteSpeed_Cache_Admin_API
218
  $instance->_request_key() ;
219
  }
220
 
221
- return $instance->_post( $action, $data, $server ) ;
222
  }
223
 
224
  /**
@@ -269,11 +269,14 @@ class LiteSpeed_Cache_Admin_API
269
  * @access private
270
  * @param array $data
271
  */
272
- private function _post( $action, $data = false, $server = false )
273
  {
274
- $hash = Litespeed_String::rrand( 16 ) ;
275
- // store hash
276
- update_option( self::DB_API_KEY_HASH, $hash ) ;
 
 
 
277
 
278
  if ( $server == false ) {
279
  $server = 'https://wp.api.litespeedtech.com' ;
206
  * @access public
207
  * @param array $data
208
  */
209
+ public static function post( $action, $data = false, $server = false, $no_hash = false )
210
  {
211
  $instance = self::get_instance() ;
212
 
218
  $instance->_request_key() ;
219
  }
220
 
221
+ return $instance->_post( $action, $data, $server, $no_hash ) ;
222
  }
223
 
224
  /**
269
  * @access private
270
  * @param array $data
271
  */
272
+ private function _post( $action, $data = false, $server = false, $no_hash = false )
273
  {
274
+ $hash = 'no_hash' ;
275
+ if ( ! $no_hash ) {
276
+ $hash = Litespeed_String::rrand( 16 ) ;
277
+ // store hash
278
+ update_option( self::DB_API_KEY_HASH, $hash ) ;
279
+ }
280
 
281
  if ( $server == false ) {
282
  $server = 'https://wp.api.litespeedtech.com' ;
admin/litespeed-cache-admin-display.class.php CHANGED
@@ -65,9 +65,8 @@ class LiteSpeed_Cache_Admin_Display
65
  $manage = 'manage_options' ;
66
  }
67
  if ( current_user_can($manage) ) {
68
- if ( defined( 'LITESPEED_ON' ) ) {
69
- add_action( 'wp_before_admin_bar_render', array( LiteSpeed_Cache_GUI::get_instance(), 'backend_shortcut' ) ) ;
70
- }
71
  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
72
  }
73
 
@@ -217,7 +216,7 @@ class LiteSpeed_Cache_Admin_Display
217
  $localize_data[ 'ajax_url_dismiss_ruleconflict' ] = $ajax_url ;
218
  }
219
 
220
- if ( LiteSpeed_Cache_GUI::has_promo_msg() ) {
221
  $ajax_url_promo = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_DISMISS, LiteSpeed_Cache_GUI::TYPE_DISMISS_PROMO, true ) ;
222
  $localize_data[ 'ajax_url_promo' ] = $ajax_url_promo ;
223
  }
@@ -345,21 +344,6 @@ class LiteSpeed_Cache_Admin_Display
345
  require_once LSCWP_DIR . 'admin/tpl/inc/help_tabs.php' ;
346
  }
347
 
348
- /**
349
- * Check to make sure that caching is enabled.
350
- *
351
- * @since 1.0.0
352
- * @access public
353
- * @return mixed True if enabled, error message otherwise.
354
- */
355
- public function check_license()
356
- {
357
- if ( ! defined( 'LITESPEED_ALLOWED' ) ) {
358
- self::add_error(LiteSpeed_Cache_Admin_Error::E_SERVER) ;
359
- self::display_messages() ;
360
- }
361
- }
362
-
363
  /**
364
  * Builds the html for a single notice.
365
  *
@@ -665,6 +649,17 @@ class LiteSpeed_Cache_Admin_Display
665
  require_once LSCWP_DIR . 'admin/tpl/inc/show_error_cookie.php' ;
666
  }
667
 
 
 
 
 
 
 
 
 
 
 
 
668
  /**
669
  * Build a textarea
670
  *
65
  $manage = 'manage_options' ;
66
  }
67
  if ( current_user_can($manage) ) {
68
+ add_action( 'wp_before_admin_bar_render', array( LiteSpeed_Cache_GUI::get_instance(), 'backend_shortcut' ) ) ;
69
+
 
70
  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
71
  }
72
 
216
  $localize_data[ 'ajax_url_dismiss_ruleconflict' ] = $ajax_url ;
217
  }
218
 
219
+ if ( LiteSpeed_Cache_GUI::has_promo_msg() || LiteSpeed_Cache_GUI::has_promo_msg( 'slack' ) ) {
220
  $ajax_url_promo = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_DISMISS, LiteSpeed_Cache_GUI::TYPE_DISMISS_PROMO, true ) ;
221
  $localize_data[ 'ajax_url_promo' ] = $ajax_url_promo ;
222
  }
344
  require_once LSCWP_DIR . 'admin/tpl/inc/help_tabs.php' ;
345
  }
346
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
347
  /**
348
  * Builds the html for a single notice.
349
  *
649
  require_once LSCWP_DIR . 'admin/tpl/inc/show_error_cookie.php' ;
650
  }
651
 
652
+ /**
653
+ * Display warning if lscache is disabled
654
+ *
655
+ * @since 2.1
656
+ * @access public
657
+ */
658
+ public function cache_disabled_warning()
659
+ {
660
+ include LSCWP_DIR . "admin/tpl/inc/check_cache_disabled.php" ;
661
+ }
662
+
663
  /**
664
  * Build a textarea
665
  *
admin/litespeed-cache-admin-error.class.php CHANGED
@@ -52,8 +52,6 @@ class LiteSpeed_Cache_Admin_Error
52
 
53
  const E_LC_MISMATCH = 5000 ; // login cookie mismatch
54
 
55
- const E_SERVER = 6000 ;
56
-
57
  const E_CONF = 9000 ; // general config failed to write.
58
  const E_HTA_BU = 9010 ; // backup
59
  const E_HTA_PUT = 9020 ; // failed to put
@@ -188,12 +186,6 @@ class LiteSpeed_Cache_Admin_Error
188
  . __('Login cookies do not match.', 'litespeed-cache') . ' '
189
  . __('Please remove both and set the login cookie in LiteSpeed Cache advanced settings.', 'litespeed-cache') ;
190
 
191
- // Either running another server or doesn't have cache module.
192
- case self::E_SERVER:
193
- return __('Notice: This plugin requires a LiteSpeed Server with the LSCache Module enabled.', 'litespeed-cache') . ' '
194
- . __('If you are unable to change your server stack, please contact your hosting provider to request the required changes.', 'litespeed-cache') . ' '
195
- . __('This plugin will NOT work properly.', 'litespeed-cache') ;
196
-
197
  case self::E_CONF:
198
  return __('LiteSpeed Cache was unable to write to the wp-config.php file.', 'litespeed-cache') . ' '
199
  . sprintf(__('Please add the following to the wp-config.php file: %s', 'litespeed-cache'), '<br><pre>define(\'WP_CACHE\', true);</pre>') ;
52
 
53
  const E_LC_MISMATCH = 5000 ; // login cookie mismatch
54
 
 
 
55
  const E_CONF = 9000 ; // general config failed to write.
56
  const E_HTA_BU = 9010 ; // backup
57
  const E_HTA_PUT = 9020 ; // failed to put
186
  . __('Login cookies do not match.', 'litespeed-cache') . ' '
187
  . __('Please remove both and set the login cookie in LiteSpeed Cache advanced settings.', 'litespeed-cache') ;
188
 
 
 
 
 
 
 
189
  case self::E_CONF:
190
  return __('LiteSpeed Cache was unable to write to the wp-config.php file.', 'litespeed-cache') . ' '
191
  . sprintf(__('Please add the following to the wp-config.php file: %s', 'litespeed-cache'), '<br><pre>define(\'WP_CACHE\', true);</pre>') ;
admin/litespeed-cache-admin-report.class.php CHANGED
@@ -139,8 +139,10 @@ class LiteSpeed_Cache_Admin_Report
139
  'home_url' => home_url(),
140
  'locale' => get_locale(),
141
  'active theme' => $active_theme,
142
- 'active plugins' => $active_plugins,
143
  ) ;
 
 
 
144
  if ( is_null($options) ) {
145
  $options = LiteSpeed_Cache_Config::get_instance()->get_options() ;
146
  }
@@ -196,6 +198,25 @@ class LiteSpeed_Cache_Admin_Report
196
  $server_vars = array_intersect_key($server, $server_keys) ;
197
  $server_vars[] = "LSWCP_TAG_PREFIX = " . LSWCP_TAG_PREFIX ;
198
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  $buf = $this->format_report_section('Server Variables', $server_vars) ;
200
 
201
  $buf .= $this->format_report_section('Wordpress Specific Extras', $extras) ;
@@ -232,30 +253,29 @@ class LiteSpeed_Cache_Admin_Report
232
  * @param array $section An array of information to output
233
  * @return string The created report block.
234
  */
235
- private function format_report_section($section_header, $section)
236
  {
237
  $tab = ' ' ; // four spaces
238
- $nl = "\n" ;
239
 
240
- if ( empty($section) ) {
241
- return 'No matching ' . $section_header . $nl . $nl ;
242
  }
243
  $buf = $section_header ;
244
 
245
- foreach ( $section as $key=>$val ) {
246
- $buf .= $nl . $tab ;
247
- if ( ! is_numeric($key) ) {
248
- $buf .= $key . ' = ' ;
249
- }
250
 
251
- if ( ! is_string($val) ) {
252
- $buf .= var_export($val, true) ;
253
  }
254
- else {
255
- $buf .= $val ;
 
256
  }
 
 
257
  }
258
- return $buf . $nl . $nl ;
259
  }
260
 
261
  /**
139
  'home_url' => home_url(),
140
  'locale' => get_locale(),
141
  'active theme' => $active_theme,
 
142
  ) ;
143
+
144
+ $extras[ 'active plugins' ] = $active_plugins ;
145
+
146
  if ( is_null($options) ) {
147
  $options = LiteSpeed_Cache_Config::get_instance()->get_options() ;
148
  }
198
  $server_vars = array_intersect_key($server, $server_keys) ;
199
  $server_vars[] = "LSWCP_TAG_PREFIX = " . LSWCP_TAG_PREFIX ;
200
 
201
+ $consts = array(
202
+ 'WP_SITEURL',
203
+ 'WP_HOME',
204
+ 'WP_CONTENT_DIR',
205
+ 'SHORTINIT',
206
+ 'LSCWP_CONTENT_DIR',
207
+ 'LSCWP_DIR',
208
+ 'LITESPEED_TIME_OFFSET',
209
+ 'LITESPEED_SERVER_TYPE',
210
+ 'LITESPEED_CLI',
211
+ 'LITESPEED_ALLOWED',
212
+ 'LITESPEED_ON',
213
+ 'LITESPEED_ON_IN_SETTING',
214
+ 'LSCACHE_ADV_CACHE',
215
+ ) ;
216
+ foreach ( $consts as $v ) {
217
+ $server_vars[ $v ] = defined( $v ) ? constant( $v ) : NULL ;
218
+ }
219
+
220
  $buf = $this->format_report_section('Server Variables', $server_vars) ;
221
 
222
  $buf .= $this->format_report_section('Wordpress Specific Extras', $extras) ;
253
  * @param array $section An array of information to output
254
  * @return string The created report block.
255
  */
256
+ private function format_report_section( $section_header, $section )
257
  {
258
  $tab = ' ' ; // four spaces
 
259
 
260
+ if ( empty( $section ) ) {
261
+ return 'No matching ' . $section_header . "\n\n" ;
262
  }
263
  $buf = $section_header ;
264
 
265
+ foreach ( $section as $k => $v ) {
266
+ $buf .= "\n" . $tab ;
 
 
 
267
 
268
+ if ( ! is_numeric( $k ) ) {
269
+ $buf .= $k . ' = ' ;
270
  }
271
+
272
+ if ( ! is_string( $v ) ) {
273
+ $v = var_export( $v, true ) ;
274
  }
275
+
276
+ $buf .= $v ;
277
  }
278
+ return $buf . "\n\n" ;
279
  }
280
 
281
  /**
admin/litespeed-cache-admin-settings.class.php CHANGED
@@ -567,10 +567,14 @@ class LiteSpeed_Cache_Admin_Settings
567
  $id = LiteSpeed_Cache_Config::OPID_CDN_ORI ;
568
  $this->_options[ $id ] = $this->_input[ $id ] ;
569
  if ( $this->_options[ $id ] ) {
570
- $tmp = parse_url( $this->_options[ $id ] ) ;
571
- if ( ! empty( $tmp[ 'scheme' ] ) ) {
572
- $this->_options[ $id ] = str_replace( $tmp[ 'scheme' ] . ':', '', $this->_options[ $id ] ) ;
 
 
 
573
  }
 
574
  }
575
 
576
  $ids = array(
@@ -648,7 +652,7 @@ class LiteSpeed_Cache_Admin_Settings
648
 
649
  // If cloudflare API is on, refresh the zone
650
  if ( $this->_options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE ] && $cdn_cloudflare_changed ) {
651
- $zone = LiteSpeed_Cache_CDN::get_instance()->cloudflare_fetch_zone( $this->_options ) ;
652
  if ( $zone ) {
653
  $this->_options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_NAME ] = $zone[ 'name' ] ;
654
  $this->_options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_ZONE ] = $zone[ 'id' ] ;
567
  $id = LiteSpeed_Cache_Config::OPID_CDN_ORI ;
568
  $this->_options[ $id ] = $this->_input[ $id ] ;
569
  if ( $this->_options[ $id ] ) {
570
+ $ori_list = explode( ',', $this->_options[ $id ] ) ;
571
+ foreach ( $ori_list as $k => $v ) {
572
+ $tmp = parse_url( $v ) ;
573
+ if ( ! empty( $tmp[ 'scheme' ] ) ) {
574
+ $ori_list[ $k ] = str_replace( $tmp[ 'scheme' ] . ':', '', $v ) ;
575
+ }
576
  }
577
+ $this->_options[ $id ] = implode( ',', $ori_list ) ;
578
  }
579
 
580
  $ids = array(
652
 
653
  // If cloudflare API is on, refresh the zone
654
  if ( $this->_options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE ] && $cdn_cloudflare_changed ) {
655
+ $zone = LiteSpeed_Cache_CDN_Cloudflare::get_instance()->fetch_zone( $this->_options ) ;
656
  if ( $zone ) {
657
  $this->_options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_NAME ] = $zone[ 'name' ] ;
658
  $this->_options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_ZONE ] = $zone[ 'id' ] ;
admin/litespeed-cache-admin.class.php CHANGED
@@ -70,7 +70,7 @@ class LiteSpeed_Cache_Admin
70
  // check for upgrade
71
  // NOTE: upgrade checking needs to be before `register_setting` to avoid update_options() be checked by our filter
72
  $this->config->plugin_upgrade() ;
73
- if ( is_network_admin() && current_user_can('manage_network_options') ) {
74
  $this->config->plugin_site_upgrade() ;
75
  }
76
 
@@ -96,13 +96,13 @@ class LiteSpeed_Cache_Admin
96
  register_setting(LiteSpeed_Cache_Config::OPTION_NAME, LiteSpeed_Cache_Config::OPTION_NAME, array(LiteSpeed_Cache_Admin_Settings::get_instance(), 'validate_plugin_settings')) ;
97
  }
98
 
 
 
99
  // step out if plugin is not enabled
100
  if ( ! defined( 'LITESPEED_ON' ) ) {
101
  return ;
102
  }
103
 
104
- do_action( 'litspeed_after_admin_init' ) ;
105
-
106
  LiteSpeed_Cache_Control::set_nocache( 'Admin page' ) ;
107
 
108
  if ( LiteSpeed_Cache_Router::esi_enabled() ) {
@@ -168,7 +168,7 @@ class LiteSpeed_Cache_Admin
168
  // Save network settings
169
  case LiteSpeed_Cache::ACTION_SAVE_SETTINGS_NETWORK:
170
  $options = LiteSpeed_Cache_Admin_Settings::get_instance()->validate_network_settings() ;// todo: use wp network setting saving
171
- LiteSpeed_Cache_Admin_Report::get_instance()->generate_environment_report($options) ;
172
  break ;
173
 
174
  default:
70
  // check for upgrade
71
  // NOTE: upgrade checking needs to be before `register_setting` to avoid update_options() be checked by our filter
72
  $this->config->plugin_upgrade() ;
73
+ if ( is_network_admin() && current_user_can( 'manage_network_options' ) ) {
74
  $this->config->plugin_site_upgrade() ;
75
  }
76
 
96
  register_setting(LiteSpeed_Cache_Config::OPTION_NAME, LiteSpeed_Cache_Config::OPTION_NAME, array(LiteSpeed_Cache_Admin_Settings::get_instance(), 'validate_plugin_settings')) ;
97
  }
98
 
99
+ do_action( 'litspeed_after_admin_init' ) ;
100
+
101
  // step out if plugin is not enabled
102
  if ( ! defined( 'LITESPEED_ON' ) ) {
103
  return ;
104
  }
105
 
 
 
106
  LiteSpeed_Cache_Control::set_nocache( 'Admin page' ) ;
107
 
108
  if ( LiteSpeed_Cache_Router::esi_enabled() ) {
168
  // Save network settings
169
  case LiteSpeed_Cache::ACTION_SAVE_SETTINGS_NETWORK:
170
  $options = LiteSpeed_Cache_Admin_Settings::get_instance()->validate_network_settings() ;// todo: use wp network setting saving
171
+ // LiteSpeed_Cache_Admin_Report::get_instance()->generate_environment_report($options) ; // As we don't save env report, no need this anymore
172
  break ;
173
 
174
  default:
admin/tpl/crawler.php CHANGED
@@ -18,7 +18,7 @@ $is_running = time() - $meta[ 'is_running' ] <= $_options[LiteSpeed_Cache_Config
18
 
19
  $disabled = LiteSpeed_Cache_Router::can_crawl() ? '' : 'disabled' ;
20
 
21
- include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
22
  ?>
23
 
24
  <div class="wrap">
@@ -32,8 +32,6 @@ include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
32
 
33
  </div>
34
 
35
- <?php include_once LSCWP_DIR . "admin/tpl/inc/check_cache_disabled.php" ; ?>
36
-
37
  <div class="litespeed-wrap">
38
  <div class="litespeed-body">
39
  <h3 class="litespeed-title"><?php echo __('Crawler File', 'litespeed-cache') ; ?></h3>
18
 
19
  $disabled = LiteSpeed_Cache_Router::can_crawl() ? '' : 'disabled' ;
20
 
21
+ LiteSpeed_Cache_GUI::show_promo() ;
22
  ?>
23
 
24
  <div class="wrap">
32
 
33
  </div>
34
 
 
 
35
  <div class="litespeed-wrap">
36
  <div class="litespeed-body">
37
  <h3 class="litespeed-title"><?php echo __('Crawler File', 'litespeed-cache') ; ?></h3>
admin/tpl/image_optimization.php CHANGED
@@ -62,7 +62,7 @@ else {
62
  $finished_percentage = 0 ;
63
  }
64
 
65
- include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
66
  ?>
67
 
68
  <div class="wrap">
@@ -75,8 +75,6 @@ include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
75
  <hr class="wp-header-end">
76
  </div>
77
 
78
- <?php include_once LSCWP_DIR . "admin/tpl/inc/check_cache_disabled.php" ; ?>
79
-
80
  <div class="litespeed-wrap">
81
  <div class="litespeed-body">
82
  <?php if ( $current_step ) : ?>
@@ -121,9 +119,7 @@ include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
121
 
122
  <?php include_once LSCWP_DIR . "admin/tpl/inc/api_key.php" ; ?>
123
 
124
- <h3 class="litespeed-title"><?php echo __('Image Information', 'litespeed-cache') ; ?>
125
- <span class="litespeed-desc"><?php echo __('Beta Version', 'litespeed-cache') ; ?></span>
126
- </h3>
127
 
128
  <div class="litespeed-block-tiny">
129
  <div class="litespeed-col-auto">
62
  $finished_percentage = 0 ;
63
  }
64
 
65
+ LiteSpeed_Cache_GUI::show_promo() ;
66
  ?>
67
 
68
  <div class="wrap">
75
  <hr class="wp-header-end">
76
  </div>
77
 
 
 
78
  <div class="litespeed-wrap">
79
  <div class="litespeed-body">
80
  <?php if ( $current_step ) : ?>
119
 
120
  <?php include_once LSCWP_DIR . "admin/tpl/inc/api_key.php" ; ?>
121
 
122
+ <h3 class="litespeed-title"><?php echo __('Image Information', 'litespeed-cache') ; ?></h3>
 
 
123
 
124
  <div class="litespeed-block-tiny">
125
  <div class="litespeed-col-auto">
admin/tpl/import_export.php CHANGED
@@ -14,8 +14,6 @@ $log = get_option( LiteSpeed_Cache_Import::DB_IMPORT_LOG, array() ) ;
14
  <hr class="wp-header-end">
15
  </div>
16
 
17
- <?php include_once LSCWP_DIR . "admin/tpl/inc/check_cache_disabled.php" ; ?>
18
-
19
  <div class="litespeed-wrap">
20
  <div class="litespeed-body">
21
  <h3 class="litespeed-title"><?php echo __('Export Settings', 'litespeed-cache') ; ?></h3>
14
  <hr class="wp-header-end">
15
  </div>
16
 
 
 
17
  <div class="litespeed-wrap">
18
  <div class="litespeed-body">
19
  <h3 class="litespeed-title"><?php echo __('Export Settings', 'litespeed-cache') ; ?></h3>
admin/tpl/inc/banner_promo.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  if ( ! defined( 'WPINC' ) ) die ;
3
 
4
- if ( ! LiteSpeed_Cache_GUI::has_promo_msg() ) {
5
  return ;
6
  }
7
 
1
  <?php
2
  if ( ! defined( 'WPINC' ) ) die ;
3
 
4
+ if ( ! LiteSpeed_Cache_GUI::should_show_promo() ) {
5
  return ;
6
  }
7
 
admin/tpl/inc/banner_promo.slack.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>
admin/tpl/inc/check_cache_disabled.php CHANGED
@@ -1,12 +1,48 @@
1
  <?php
2
  if ( ! defined( 'WPINC' ) ) die ;
3
 
4
- if ( defined( 'LITESPEED_ON' ) ) {
5
- return ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  }
 
 
7
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
- <div class="litespeed-callout-warning">
10
- <h4><?php echo __('WARNING: LiteSpeed cache is disabled. The functionalities here can not work.', 'litespeed-cache'); ?></h4>
11
- </div>
 
12
 
 
 
1
  <?php
2
  if ( ! defined( 'WPINC' ) ) die ;
3
 
4
+ $reasons = array() ;
5
+
6
+ if ( ! defined( 'LITESPEED_ALLOWED' ) ) {
7
+ $reasons[] = array(
8
+ 'title' => __( 'LSCache Module is disabled.', 'litespeed-cache' ),
9
+ 'link' => 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache#prerequisites',
10
+ ) ;
11
+ }
12
+
13
+ if ( ! defined( 'LITESPEED_ON_IN_SETTING' ) ) {
14
+ $reasons[] = array(
15
+ 'title' => __( 'LiteSpeed cache is disabled in setting.', 'litespeed-cache' ) ,
16
+ 'link' => 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:general#enable_litespeed_cache',
17
+ ) ;
18
+ }
19
+
20
+ if ( ! $reasons && ! defined( 'LITESPEED_ON' ) ) {
21
+ $reasons[] = array(
22
+ 'title' => __( 'LiteSpeed cache is disabled.', 'litespeed-cache' ) ,
23
+ 'link' => 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:general#enable_litespeed_cache',
24
+ ) ;
25
  }
26
+
27
+ if ( $reasons ) :
28
  ?>
29
+ <div class="litespeed-callout-danger">
30
+
31
+ <h4><?php echo __( 'WARNING', 'litespeed-cache' ) ; ?></h4>
32
+
33
+ <p>
34
+ <?php echo __( 'The functionalities here can not work due to:', 'litespeed-cache' ) ; ?>
35
+ </p>
36
+
37
+ <ul class="litespeed-list">
38
+ <?php foreach ( $reasons as $v ) : ?>
39
+ <li>
40
+ <?php echo $v[ 'title' ] ; ?>
41
 
42
+ <a href="<?php echo $v[ 'link' ] ; ?>" target="_blank" class="litespeed-learn-more"><?php echo __( 'How to fix it?', 'litespeed-cache' ) ; ?></a>
43
+ </li>
44
+ <?php endforeach ; ?>
45
+ </ul>
46
 
47
+ </div>
48
+ <?php endif ;
admin/tpl/manage.php CHANGED
@@ -1,8 +1,6 @@
1
  <?php
2
  if (!defined('WPINC')) die;
3
 
4
- LiteSpeed_Cache_Admin_Display::get_instance()->check_license();
5
-
6
  $menu_list = array(
7
  'purge' => __('Purge', 'litespeed-cache'),
8
  'db' => __('DB Optimizer', 'litespeed-cache'),
@@ -12,7 +10,7 @@ if ( ! is_network_admin() ) {
12
  $menu_list[ 'cdn' ] = __( 'CDN', 'litespeed-cache' ) ;
13
  }
14
 
15
- include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
16
  ?>
17
 
18
  <div class="wrap">
@@ -44,8 +42,6 @@ include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
44
  ?>
45
  </h2>
46
 
47
- <?php include_once LSCWP_DIR . "admin/tpl/inc/check_cache_disabled.php" ; ?>
48
-
49
  <div class="litespeed-body">
50
  <?php
51
 
1
  <?php
2
  if (!defined('WPINC')) die;
3
 
 
 
4
  $menu_list = array(
5
  'purge' => __('Purge', 'litespeed-cache'),
6
  'db' => __('DB Optimizer', 'litespeed-cache'),
10
  $menu_list[ 'cdn' ] = __( 'CDN', 'litespeed-cache' ) ;
11
  }
12
 
13
+ LiteSpeed_Cache_GUI::show_promo() ;
14
  ?>
15
 
16
  <div class="wrap">
42
  ?>
43
  </h2>
44
 
 
 
45
  <div class="litespeed-body">
46
  <?php
47
 
admin/tpl/manage/manage_cdn.php CHANGED
@@ -24,13 +24,13 @@ $curr_status = get_option( LiteSpeed_Cache_Config::ITEM_CLOUDFLARE_STATUS, array
24
 
25
  <p>
26
  <b><?php echo __( 'Development Mode', 'litespeed-cache' ) ; ?>:</b>
27
- <a href="<?php echo LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_CDN, LiteSpeed_Cache_CDN::TYPE_CLOUDFLARE_SET_DEVMODE_ON ) ; ?>" class="litespeed-btn-warning">
28
  <?php echo __( 'Turn ON', 'litespeed-cache' ) ; ?>
29
  </a>
30
- <a href="<?php echo LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_CDN, LiteSpeed_Cache_CDN::TYPE_CLOUDFLARE_SET_DEVMODE_OFF ) ; ?>" class="litespeed-btn-warning">
31
  <?php echo __( 'Turn OFF', 'litespeed-cache' ) ; ?>
32
  </a>
33
- <a href="<?php echo LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_CDN, LiteSpeed_Cache_CDN::TYPE_CLOUDFLARE_GET_DEVMODE ) ; ?>" class="litespeed-btn-success">
34
  <?php echo __( 'Check Status', 'litespeed-cache' ) ; ?>
35
  </a>
36
 
@@ -66,7 +66,7 @@ $curr_status = get_option( LiteSpeed_Cache_Config::ITEM_CLOUDFLARE_STATUS, array
66
  <?php if ( ! $cf_on ) : ?>
67
  <a href="#" class="litespeed-btn-default disabled">
68
  <?php else : ?>
69
- <a href="<?php echo LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_CDN, LiteSpeed_Cache_CDN::TYPE_CLOUDFLARE_PURGE_ALL ) ; ?>" class="litespeed-btn-danger">
70
  <?php endif ; ?>
71
  <?php echo __( 'Purge Everything', 'litespeed-cache' ) ; ?>
72
  </a>
24
 
25
  <p>
26
  <b><?php echo __( 'Development Mode', 'litespeed-cache' ) ; ?>:</b>
27
+ <a href="<?php echo LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_CDN_CLOUDFLARE, LiteSpeed_Cache_CDN_Cloudflare::TYPE_SET_DEVMODE_ON ) ; ?>" class="litespeed-btn-warning">
28
  <?php echo __( 'Turn ON', 'litespeed-cache' ) ; ?>
29
  </a>
30
+ <a href="<?php echo LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_CDN_CLOUDFLARE, LiteSpeed_Cache_CDN_Cloudflare::TYPE_SET_DEVMODE_OFF ) ; ?>" class="litespeed-btn-warning">
31
  <?php echo __( 'Turn OFF', 'litespeed-cache' ) ; ?>
32
  </a>
33
+ <a href="<?php echo LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_CDN_CLOUDFLARE, LiteSpeed_Cache_CDN_Cloudflare::TYPE_GET_DEVMODE ) ; ?>" class="litespeed-btn-success">
34
  <?php echo __( 'Check Status', 'litespeed-cache' ) ; ?>
35
  </a>
36
 
66
  <?php if ( ! $cf_on ) : ?>
67
  <a href="#" class="litespeed-btn-default disabled">
68
  <?php else : ?>
69
+ <a href="<?php echo LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_CDN_CLOUDFLARE, LiteSpeed_Cache_CDN_Cloudflare::TYPE_PURGE_ALL ) ; ?>" class="litespeed-btn-danger">
70
  <?php endif ; ?>
71
  <?php echo __( 'Purge Everything', 'litespeed-cache' ) ; ?>
72
  </a>
admin/tpl/manage/manage_purge.php CHANGED
@@ -93,6 +93,8 @@ if ( ! is_multisite() || is_network_admin() ) {
93
 
94
  ?>
95
 
 
 
96
  <h3 class="litespeed-title"><?php echo __('Purge', 'litespeed-cache'); ?></h3>
97
 
98
  <div class="litespeed-panel-wrapper">
93
 
94
  ?>
95
 
96
+ <?php include_once LSCWP_DIR . "admin/tpl/inc/check_cache_disabled.php" ; ?>
97
+
98
  <h3 class="litespeed-title"><?php echo __('Purge', 'litespeed-cache'); ?></h3>
99
 
100
  <div class="litespeed-panel-wrapper">
admin/tpl/setting/settings_cache.php CHANGED
@@ -7,6 +7,8 @@ if ( ! defined( 'WPINC' ) ) die ;
7
  <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cache" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
8
  </h3>
9
 
 
 
10
  <table><tbody>
11
  <tr>
12
  <th><?php echo __( 'Cache Logged-in Users', 'litespeed-cache' ) ; ?></th>
7
  <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cache" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
8
  </h3>
9
 
10
+ <?php $this->cache_disabled_warning() ; ?>
11
+
12
  <table><tbody>
13
  <tr>
14
  <th><?php echo __( 'Cache Logged-in Users', 'litespeed-cache' ) ; ?></th>
admin/tpl/setting/settings_cdn.php CHANGED
@@ -128,6 +128,7 @@ if ( ! $cdn_mapping ) {
128
  <div class="litespeed-desc">
129
  <?php echo sprintf( __( 'Site URL to be served through the CDN. Beginning with %1$s. For example, %2$s.', 'litespeed-cache' ), '<code>//</code>', '<code>' . $home_url . '</code>' ) ; ?>
130
  <br /><?php echo sprintf( __( 'Wildcard %1$s supported (match zero or more characters). For example, to match %2$s and %3$s, use %4$s.', 'litespeed-cache' ), '<code>*</code>', '<code>//www.aa.com</code>', '<code>//aa.com</code>', '<code>//*aa.com</code>' ) ; ?>
 
131
  </div>
132
  </td>
133
  </tr>
@@ -179,7 +180,7 @@ if ( ! $cdn_mapping ) {
179
  <div class="litespeed-desc">
180
  <?php echo sprintf( __( 'Use %s API functionality.', 'litespeed-cache' ), 'Quic Cloud' ) ; ?>
181
 
182
- <a id='litespeed_modal_href' href="<?php echo LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_QUIC_CLOUD ) ; ?>">
183
  <?php if ( ! empty( $_options[ LiteSpeed_Cache_Config::OPID_CDN_QUIC_EMAIL ] ) ) : ?>
184
  Login API
185
  <?php else : ?>
128
  <div class="litespeed-desc">
129
  <?php echo sprintf( __( 'Site URL to be served through the CDN. Beginning with %1$s. For example, %2$s.', 'litespeed-cache' ), '<code>//</code>', '<code>' . $home_url . '</code>' ) ; ?>
130
  <br /><?php echo sprintf( __( 'Wildcard %1$s supported (match zero or more characters). For example, to match %2$s and %3$s, use %4$s.', 'litespeed-cache' ), '<code>*</code>', '<code>//www.aa.com</code>', '<code>//aa.com</code>', '<code>//*aa.com</code>' ) ; ?>
131
+ <br /><?php echo sprintf( __( 'Separate multiple original URLs with a %s.', 'litespeed-cache' ), '<code>,</code>' ) ; ?>
132
  </div>
133
  </td>
134
  </tr>
180
  <div class="litespeed-desc">
181
  <?php echo sprintf( __( 'Use %s API functionality.', 'litespeed-cache' ), 'Quic Cloud' ) ; ?>
182
 
183
+ <a id='litespeed_modal_href' href="<?php echo LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_CDN_QUICCLOUD ) ; ?>">
184
  <?php if ( ! empty( $_options[ LiteSpeed_Cache_Config::OPID_CDN_QUIC_EMAIL ] ) ) : ?>
185
  Login API
186
  <?php else : ?>
admin/tpl/setting/settings_esi.php CHANGED
@@ -8,6 +8,7 @@ if ( ! defined( 'WPINC' ) ) die ;
8
  <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:esi" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
9
  </h3>
10
 
 
11
 
12
  <div class="litespeed-desc">
13
  <p><?php echo __('With ESI (Edge Side Includes), pages may be served from cache for logged-in users.', 'litespeed-cache'); ?></p>
8
  <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:esi" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
9
  </h3>
10
 
11
+ <?php $this->cache_disabled_warning() ; ?>
12
 
13
  <div class="litespeed-desc">
14
  <p><?php echo __('With ESI (Edge Side Includes), pages may be served from cache for logged-in users.', 'litespeed-cache'); ?></p>
admin/tpl/setting/settings_excludes.php CHANGED
@@ -6,6 +6,9 @@ if ( ! defined( 'WPINC' ) ) die ;
6
  <?php echo __('Do Not Cache Settings', 'litespeed-cache'); ?>
7
  <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:excludes" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
8
  </h3>
 
 
 
9
  <table><tbody>
10
  <tr>
11
  <th><?php echo __( 'Do Not Cache URIs', 'litespeed-cache' ) ; ?></th>
6
  <?php echo __('Do Not Cache Settings', 'litespeed-cache'); ?>
7
  <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:excludes" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
8
  </h3>
9
+
10
+ <?php $this->cache_disabled_warning() ; ?>
11
+
12
  <table><tbody>
13
  <tr>
14
  <th><?php echo __( 'Do Not Cache URIs', 'litespeed-cache' ) ; ?></th>
admin/tpl/setting/settings_general.php CHANGED
@@ -8,6 +8,8 @@ if (!defined('WPINC')) die;
8
  <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:general" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
9
  </h3>
10
 
 
 
11
  <table><tbody>
12
  <tr>
13
  <th><?php echo __('Enable LiteSpeed Cache', 'litespeed-cache'); ?></th>
8
  <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:general" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
9
  </h3>
10
 
11
+ <?php $this->cache_disabled_warning() ; ?>
12
+
13
  <table><tbody>
14
  <tr>
15
  <th><?php echo __('Enable LiteSpeed Cache', 'litespeed-cache'); ?></th>
admin/tpl/setting/settings_purge.php CHANGED
@@ -8,6 +8,8 @@ if (!defined('WPINC')) die;
8
  <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:purge" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
9
  </h3>
10
 
 
 
11
  <?php
12
  $purge_options = LiteSpeed_Cache_Config::get_instance()->get_purge_options();
13
  $optionArr = array(
8
  <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:purge" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
9
  </h3>
10
 
11
+ <?php $this->cache_disabled_warning() ; ?>
12
+
13
  <?php
14
  $purge_options = LiteSpeed_Cache_Config::get_instance()->get_purge_options();
15
  $optionArr = array(
admin/tpl/settings.php CHANGED
@@ -1,8 +1,6 @@
1
  <?php
2
  if (!defined('WPINC')) die ;
3
 
4
- $this->check_license() ;
5
-
6
  $menu_list = array(
7
  'general' => __('General', 'litespeed-cache'),
8
  'cache' => __('Cache', 'litespeed-cache'),
@@ -87,7 +85,7 @@ foreach ( $wp_roles->roles as $k => $v ) {
87
  }
88
  ksort( $roles ) ;
89
 
90
- include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
91
 
92
  /**
93
  * Switch basic/advanced mode
1
  <?php
2
  if (!defined('WPINC')) die ;
3
 
 
 
4
  $menu_list = array(
5
  'general' => __('General', 'litespeed-cache'),
6
  'cache' => __('Cache', 'litespeed-cache'),
85
  }
86
  ksort( $roles ) ;
87
 
88
+ LiteSpeed_Cache_GUI::show_promo() ;
89
 
90
  /**
91
  * Switch basic/advanced mode
css/litespeed.css CHANGED
@@ -700,6 +700,11 @@ h3 .litespeed-learn-more {
700
  right: 0px;
701
  }
702
 
 
 
 
 
 
703
  /********************************* label *******************************/
704
  [class*="litespeed-label-"] {
705
  display: inline;
@@ -1157,11 +1162,17 @@ ul.litespeed-shell-body {
1157
  }
1158
 
1159
  /********************************* promo banner *******************************/
1160
- .litespeed-banner-promo{
 
1161
  display: flex;
1162
  padding: 10px;
1163
  }
1164
 
 
 
 
 
 
1165
  .litespeed-banner-promo-logo{
1166
  background-image: url("../img/lscwp-logo_256x256.png") ;
1167
  background-size: contain;
@@ -1172,10 +1183,64 @@ ul.litespeed-shell-body {
1172
  display: inline-block;
1173
  }
1174
 
 
 
 
 
 
1175
  .litespeed-banner-promo-content{
1176
  margin-left: 20px;
1177
  }
1178
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1179
  /********************************* admin -> media lib icon *******************************/
1180
  .litespeed-media-href {
1181
  display: inline-table;
@@ -1260,8 +1325,10 @@ circle.litespeed-pie_circle {
1260
  g.litespeed-pie_info text{
1261
  alignment-baseline: central;
1262
  text-anchor: middle;
 
1263
  }
1264
 
 
1265
  /********************************* block and columns *******************************/
1266
  .litespeed-block,
1267
  .litespeed-block-tiny {
700
  right: 0px;
701
  }
702
 
703
+ .litespeed-list li:before {
704
+ content: '>' ;
705
+ color: #cc3d6a ;
706
+ }
707
+
708
  /********************************* label *******************************/
709
  [class*="litespeed-label-"] {
710
  display: inline;
1162
  }
1163
 
1164
  /********************************* promo banner *******************************/
1165
+ .litespeed-banner-promo,
1166
+ .litespeed-banner-promo-full{
1167
  display: flex;
1168
  padding: 10px;
1169
  }
1170
 
1171
+ .litespeed-banner-promo-full{
1172
+ margin:0px;
1173
+ padding: 0px;
1174
+ }
1175
+
1176
  .litespeed-banner-promo-logo{
1177
  background-image: url("../img/lscwp-logo_256x256.png") ;
1178
  background-size: contain;
1183
  display: inline-block;
1184
  }
1185
 
1186
+ .litespeed-banner-promo-full .litespeed-banner-promo-logo {
1187
+ margin: 0px;
1188
+ width: 170px;
1189
+ }
1190
+
1191
  .litespeed-banner-promo-content{
1192
  margin-left: 20px;
1193
  }
1194
 
1195
+ .litespeed-banner-promo-full .litespeed-banner-promo-content {
1196
+ width: 100%;
1197
+ }
1198
+
1199
+ .litespeed-banner-promo-content h1{
1200
+ font-weight: 600;
1201
+ color:#538ac6;
1202
+ margin-top: 10px;
1203
+ }
1204
+
1205
+ .litespeed-banner-promo-slacklogo{
1206
+ background-image: url("../img/slack-logo.png") ;
1207
+ background-size: contain;
1208
+ width: 75px;
1209
+ height: 75px;
1210
+ background-repeat: no-repeat;
1211
+ display: inline-block;
1212
+ padding:0px;
1213
+ flex: 0 0 5%;
1214
+ }
1215
+
1216
+ .litespeed-banner-promo .litespeed-banner-promo-slack-line1{
1217
+ font-size: 18px;
1218
+ margin-top:0px;
1219
+ line-height: 21px;
1220
+ }
1221
+
1222
+ .litespeed-banner-promo .litespeed-banner-promo-slack-textlink{
1223
+ color: #e59544;
1224
+ text-decoration: none;
1225
+ }
1226
+
1227
+ .litespeed-banner-promo .litespeed-banner-promo-slack-textlink:hover{
1228
+ opacity: 0.8;
1229
+ }
1230
+
1231
+ .litespeed-banner-promo-slack-line2{
1232
+ font-size: 18px;
1233
+ margin: 0px;
1234
+ }
1235
+
1236
+ .litespeed-banner-promo-slack-link{
1237
+ color: #888888;
1238
+ }
1239
+
1240
+ a.litespeed-btn-xs.litespeed-banner-promo-slack-btn{
1241
+ margin:0px 50px 0px 50px;
1242
+ }
1243
+
1244
  /********************************* admin -> media lib icon *******************************/
1245
  .litespeed-media-href {
1246
  display: inline-table;
1325
  g.litespeed-pie_info text{
1326
  alignment-baseline: central;
1327
  text-anchor: middle;
1328
+ font-size: 11px ;
1329
  }
1330
 
1331
+
1332
  /********************************* block and columns *******************************/
1333
  .litespeed-block,
1334
  .litespeed-block-tiny {
img/slack-logo.png ADDED
Binary file
inc/activation.class.php CHANGED
@@ -38,7 +38,7 @@ class LiteSpeed_Cache_Activation
38
  }
39
  do_action( 'litespeed_cache_api_load_thirdparty' ) ;
40
  LiteSpeed_Cache_Config::get_instance()->plugin_activation( $count ) ;
41
- LiteSpeed_Cache_Admin_Report::get_instance()->generate_environment_report() ;
42
 
43
  if ( defined( 'LSCWP_PLUGIN_NAME' ) ) {
44
  set_transient( LiteSpeed_Cache::WHM_TRANSIENT, LiteSpeed_Cache::WHM_TRANSIENT_VAL ) ;
38
  }
39
  do_action( 'litespeed_cache_api_load_thirdparty' ) ;
40
  LiteSpeed_Cache_Config::get_instance()->plugin_activation( $count ) ;
41
+ // LiteSpeed_Cache_Admin_Report::get_instance()->generate_environment_report() ;
42
 
43
  if ( defined( 'LSCWP_PLUGIN_NAME' ) ) {
44
  set_transient( LiteSpeed_Cache::WHM_TRANSIENT, LiteSpeed_Cache::WHM_TRANSIENT_VAL ) ;
inc/cdn.class.php CHANGED
@@ -16,11 +16,6 @@ class LiteSpeed_Cache_CDN
16
 
17
  const BYPASS = 'LITESPEED_BYPASS_CDN' ;
18
 
19
- const TYPE_CLOUDFLARE_PURGE_ALL = 'cloudflare_purge_all' ;
20
- const TYPE_CLOUDFLARE_GET_DEVMODE = 'cloudflare_get_devmode' ;
21
- const TYPE_CLOUDFLARE_SET_DEVMODE_ON = 'cloudflare_set_devmode_on' ;
22
- const TYPE_CLOUDFLARE_SET_DEVMODE_OFF = 'cloudflare_set_devmode_off' ;
23
-
24
  private $content ;
25
 
26
  private $cfg_cdn ;
@@ -126,6 +121,8 @@ class LiteSpeed_Cache_CDN
126
  LiteSpeed_Cache_Log::debug2( 'CDN: translated rule is ' . $this->cfg_url_ori ) ;
127
  }
128
 
 
 
129
  $this->cfg_cdn_exclude = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_EXCLUDE ) ;
130
  $this->cfg_cdn_exclude = explode( "\n", $this->cfg_cdn_exclude ) ;
131
 
@@ -184,18 +181,6 @@ class LiteSpeed_Cache_CDN
184
  $type = LiteSpeed_Cache_Router::verify_type() ;
185
 
186
  switch ( $type ) {
187
- case self::TYPE_CLOUDFLARE_PURGE_ALL :
188
- $instance->_cloudflare_purge_all() ;
189
- break ;
190
-
191
- case self::TYPE_CLOUDFLARE_GET_DEVMODE :
192
- $instance->_cloudflare_get_devmode() ;
193
- break ;
194
-
195
- case self::TYPE_CLOUDFLARE_SET_DEVMODE_ON :
196
- case self::TYPE_CLOUDFLARE_SET_DEVMODE_OFF :
197
- $instance->_cloudflare_set_devmode( $type ) ;
198
- break ;
199
 
200
  default:
201
  break ;
@@ -225,23 +210,6 @@ class LiteSpeed_Cache_CDN
225
  return false ;
226
  }
227
 
228
- /**
229
- * Check if the host is the CDN internal host
230
- *
231
- * @since 1.2.3
232
- *
233
- */
234
- public static function internal( $host )
235
- {
236
- if ( defined( self::BYPASS ) ) {
237
- return false ;
238
- }
239
-
240
- $instance = self::get_instance() ;
241
-
242
- return in_array( $host, $instance->cdn_mapping_hosts ) ;
243
- }
244
-
245
  /**
246
  * Run CDN process
247
  * NOTE: As this is after cache finalized, can NOT set any cache control anymore
@@ -506,9 +474,11 @@ class LiteSpeed_Cache_CDN
506
  }
507
 
508
  // Check if is external url
509
- if ( ! empty( $url_parsed[ 'host' ] ) && ! LiteSpeed_Cache_Utility::internal( $url_parsed[ 'host' ] ) ) {
510
- LiteSpeed_Cache_Log::debug2( 'CDN: rewriting failed: host not internal' ) ;
511
- return false ;
 
 
512
  }
513
 
514
  if ( $this->cfg_cdn_exclude ) {
@@ -551,11 +521,13 @@ class LiteSpeed_Cache_CDN
551
  }
552
 
553
  // Now lets replace CDN url
554
- if ( strpos( $this->cfg_url_ori, '*' ) !== false ) {
555
- $url = preg_replace( '#' . $scheme . $this->cfg_url_ori . '#iU', $final_url, $url ) ;
556
- }
557
- else {
558
- $url = str_replace( $scheme . $this->cfg_url_ori, $final_url, $url ) ;
 
 
559
  }
560
  LiteSpeed_Cache_Log::debug2( 'CDN: after rewritten: ' . $url ) ;
561
 
@@ -563,248 +535,75 @@ class LiteSpeed_Cache_CDN
563
  }
564
 
565
  /**
566
- * Remote load jQuery remotely
567
- *
568
- * @since 1.5
569
- * @access public
570
- */
571
- public function load_jquery_remotely()
572
- {
573
- // default jq version
574
- $v = '1.12.4' ;
575
-
576
- // load wp's jq version
577
- global $wp_scripts ;
578
- if ( isset( $wp_scripts->registered[ 'jquery' ]->ver ) ) {
579
- $v = $wp_scripts->registered[ 'jquery' ]->ver ;
580
- }
581
-
582
- $src = $this->cfg_cdn_remote_jquery === LiteSpeed_Cache_Config::VAL_ON ? "//ajax.googleapis.com/ajax/libs/jquery/$v/jquery.min.js" : "//cdnjs.cloudflare.com/ajax/libs/jquery/$v/jquery.min.js" ;
583
-
584
- LiteSpeed_Cache_Log::debug2( 'CDN: load_jquery_remotely: ' . $src ) ;
585
-
586
- wp_deregister_script( 'jquery' ) ;
587
-
588
- wp_register_script( 'jquery', $src, false, $v ) ;
589
- }
590
-
591
- /**
592
- * Get Cloudflare development mode
593
  *
594
- * @since 1.7.2
595
  * @access private
596
  */
597
- private function _cloudflare_get_devmode( $show_msg = true )
598
  {
599
- LiteSpeed_Cache_Log::debug( 'CDN: _cloudflare_get_devmode' ) ;
600
-
601
- $zone = $this->_cloudflare_zone() ;
602
- if ( ! $zone ) {
603
- return ;
604
- }
605
-
606
- $url = 'https://api.cloudflare.com/client/v4/zones/' . $zone . '/settings/development_mode' ;
607
- $res = $this->_cloudflare_call( $url, 'GET', false, false, $show_msg ) ;
608
-
609
- if ( ! $res ) {
610
- return ;
611
- }
612
- LiteSpeed_Cache_Log::debug( 'CDN: _cloudflare_get_devmode result ', $res ) ;
613
-
614
- $curr_status = get_option( LiteSpeed_Cache_Config::ITEM_CLOUDFLARE_STATUS, array() ) ;
615
- $curr_status[ 'devmode' ] = $res[ 'value' ] ;
616
- $curr_status[ 'devmode_expired' ] = $res[ 'time_remaining' ] + time() ;
617
-
618
- // update status
619
- update_option( LiteSpeed_Cache_Config::ITEM_CLOUDFLARE_STATUS, $curr_status ) ;
620
-
621
- }
622
-
623
- /**
624
- * Set Cloudflare development mode
625
- *
626
- * @since 1.7.2
627
- * @access private
628
- */
629
- private function _cloudflare_set_devmode( $type )
630
- {
631
- LiteSpeed_Cache_Log::debug( 'CDN: _cloudflare_set_devmode' ) ;
632
-
633
- $zone = $this->_cloudflare_zone() ;
634
- if ( ! $zone ) {
635
- return ;
636
- }
637
-
638
- $url = 'https://api.cloudflare.com/client/v4/zones/' . $zone . '/settings/development_mode' ;
639
- $new_val = $type == self::TYPE_CLOUDFLARE_SET_DEVMODE_ON ? 'on' : 'off' ;
640
- $data = array( 'value' => $new_val ) ;
641
- $res = $this->_cloudflare_call( $url, 'PATCH', $data ) ;
642
-
643
- if ( ! $res ) {
644
- return ;
645
- }
646
-
647
- $res = $this->_cloudflare_get_devmode( false ) ;
648
-
649
- if ( $res ) {
650
- $msg = sprintf( __( 'Notified Cloudflare to set development mode to %s successfully.', 'litespeed-cache' ), strtoupper( $new_val ) ) ;
651
- LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
652
- }
653
-
654
- }
655
-
656
- /**
657
- * Purge Cloudflare cache
658
- *
659
- * @since 1.7.2
660
- * @access private
661
- */
662
- private function _cloudflare_purge_all()
663
- {
664
- LiteSpeed_Cache_Log::debug( 'CDN: _cloudflare_purge_all' ) ;
665
 
666
- $cf_on = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE ) ;
667
- if ( ! $cf_on ) {
668
- $msg = __( 'Cloudflare API is set to off.', 'litespeed-cache' ) ;
669
- LiteSpeed_Cache_Admin_Display::error( $msg ) ;
670
- return ;
671
- }
672
 
673
- $zone = $this->_cloudflare_zone() ;
674
- if ( ! $zone ) {
675
- return ;
 
 
 
 
 
 
 
 
 
676
  }
677
 
678
- $url = 'https://api.cloudflare.com/client/v4/zones/' . $zone . '/purge_cache' ;
679
- $data = array( 'purge_everything' => true ) ;
680
-
681
- $res = $this->_cloudflare_call( $url, 'DELETE', $data ) ;
682
-
683
- if ( $res ) {
684
- $msg = __( 'Notified Cloudflare to purge all successfully.', 'litespeed-cache' ) ;
685
- LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
686
- }
687
  }
688
 
689
  /**
690
- * Get current Cloudflare zone from cfg
691
  *
692
- * @since 1.7.2
693
- * @access private
694
- */
695
- private function _cloudflare_zone()
696
- {
697
- $zone = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_ZONE ) ;
698
- if ( ! $zone ) {
699
- $msg = __( 'No available Cloudflare zone', 'litespeed-cache' ) ;
700
- LiteSpeed_Cache_Admin_Display::error( $msg ) ;
701
- return false ;
702
- }
703
-
704
- return $zone ;
705
- }
706
-
707
- /**
708
- * Get Cloudflare zone settings
709
  *
710
- * @since 1.7.2
711
- * @access public
712
  */
713
- public function cloudflare_fetch_zone( $options )
714
  {
715
- $kw = $options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_NAME ] ;
716
-
717
- $url = 'https://api.cloudflare.com/client/v4/zones?status=active&match=all' ;
718
-
719
- // Try exact match first
720
- if ( $kw && strpos( $kw, '.' ) ) {
721
- $zones = $this->_cloudflare_call( $url . '&name=' . $kw, 'GET', false, $options, false ) ;
722
- if ( $zones ) {
723
- LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone exact matched' ) ;
724
- return $zones[ 0 ] ;
725
- }
726
- }
727
-
728
- // Can't find, try to get default one
729
- $zones = $this->_cloudflare_call( $url, 'GET', false, $options, false ) ;
730
-
731
- if ( ! $zones ) {
732
- LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone no zone' ) ;
733
  return false ;
734
  }
735
 
736
- if ( ! $kw ) {
737
- LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone no set name, use first one by default' ) ;
738
- return $zones[ 0 ] ;
739
- }
740
-
741
- foreach ( $zones as $v ) {
742
- if ( strpos( $v[ 'name' ], $kw ) !== false ) {
743
- LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone matched ' . $kw . ' [name] ' . $v[ 'name' ] ) ;
744
- return $v ;
745
- }
746
- }
747
 
748
- // Can't match current name, return default one
749
- LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone failed match name, use first one by default' ) ;
750
- return $zones[ 0 ] ;
751
  }
752
 
753
  /**
754
- * Cloudflare API
755
  *
756
- * @since 1.7.2
757
- * @access private
758
  */
759
- private function _cloudflare_call( $url, $method = 'GET', $data = false, $token = false, $show_msg = true )
760
  {
761
- LiteSpeed_Cache_Log::debug( "CDN: _cloudflare_call \t\t[URL] $url" ) ;
 
762
 
763
- $header = array(
764
- 'Content-Type: application/json',
765
- ) ;
766
- if ( $token ) {
767
- LiteSpeed_Cache_Log::debug2( 'CDN: _cloudflare_call use param token' ) ;
768
- $header[] = 'X-Auth-Email: ' . $token[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_EMAIL ] ;
769
- $header[] = 'X-Auth-Key: ' . $token[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_KEY ] ;
770
- }
771
- else {
772
- $header[] = 'X-Auth-Email: ' . LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_EMAIL ) ;
773
- $header[] = 'X-Auth-Key: ' . LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_KEY ) ;
774
- }
775
-
776
- $ch = curl_init() ;
777
- curl_setopt( $ch, CURLOPT_URL, $url ) ;
778
- curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, $method ) ;
779
- curl_setopt( $ch, CURLOPT_HTTPHEADER, $header ) ;
780
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ) ;
781
- if ( $data ) {
782
- if ( is_array( $data ) ) {
783
- $data = json_encode( $data ) ;
784
- }
785
- curl_setopt( $ch, CURLOPT_POSTFIELDS, $data ) ;
786
  }
787
- $result = curl_exec( $ch ) ;
788
 
789
- $json = json_decode( $result, true ) ;
790
-
791
- if ( $json && $json[ 'success' ] && $json[ 'result' ] ) {
792
- LiteSpeed_Cache_Log::debug( "CDN: _cloudflare_call called successfully" ) ;
793
- if ( $show_msg ) {
794
- $msg = __( 'Communicated with Cloudflare successfully.', 'litespeed-cache' ) ;
795
- LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
796
- }
797
 
798
- return $json[ 'result' ] ;
799
- }
800
 
801
- LiteSpeed_Cache_Log::debug( "CDN: _cloudflare_call called failed: $result" ) ;
802
- if ( $show_msg ) {
803
- $msg = __( 'Failed to communicate with Cloudflare', 'litespeed-cache' ) ;
804
- LiteSpeed_Cache_Admin_Display::error( $msg ) ;
805
- }
806
 
807
- return false ;
808
  }
809
 
810
  /**
@@ -816,7 +615,7 @@ class LiteSpeed_Cache_CDN
816
  */
817
  public static function get_instance()
818
  {
819
- if ( ! isset(self::$_instance) ) {
820
  self::$_instance = new self() ;
821
  }
822
 
@@ -824,6 +623,3 @@ class LiteSpeed_Cache_CDN
824
  }
825
 
826
  }
827
-
828
-
829
-
16
 
17
  const BYPASS = 'LITESPEED_BYPASS_CDN' ;
18
 
 
 
 
 
 
19
  private $content ;
20
 
21
  private $cfg_cdn ;
121
  LiteSpeed_Cache_Log::debug2( 'CDN: translated rule is ' . $this->cfg_url_ori ) ;
122
  }
123
 
124
+ $this->cfg_url_ori = explode( ',', $this->cfg_url_ori ) ;
125
+
126
  $this->cfg_cdn_exclude = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_EXCLUDE ) ;
127
  $this->cfg_cdn_exclude = explode( "\n", $this->cfg_cdn_exclude ) ;
128
 
181
  $type = LiteSpeed_Cache_Router::verify_type() ;
182
 
183
  switch ( $type ) {
 
 
 
 
 
 
 
 
 
 
 
 
184
 
185
  default:
186
  break ;
210
  return false ;
211
  }
212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  /**
214
  * Run CDN process
215
  * NOTE: As this is after cache finalized, can NOT set any cache control anymore
474
  }
475
 
476
  // Check if is external url
477
+ if ( ! empty( $url_parsed[ 'host' ] ) ) {
478
+ if ( ! LiteSpeed_Cache_Utility::internal( $url_parsed[ 'host' ] ) && ! $this->_is_ori_url( $url ) ) {
479
+ LiteSpeed_Cache_Log::debug2( 'CDN: rewriting failed: host not internal' ) ;
480
+ return false ;
481
+ }
482
  }
483
 
484
  if ( $this->cfg_cdn_exclude ) {
521
  }
522
 
523
  // Now lets replace CDN url
524
+ foreach ( $this->cfg_url_ori as $v ) {
525
+ if ( strpos( $v, '*' ) !== false ) {
526
+ $url = preg_replace( '#' . $scheme . $v . '#iU', $final_url, $url ) ;
527
+ }
528
+ else {
529
+ $url = str_replace( $scheme . $v, $final_url, $url ) ;
530
+ }
531
  }
532
  LiteSpeed_Cache_Log::debug2( 'CDN: after rewritten: ' . $url ) ;
533
 
535
  }
536
 
537
  /**
538
+ * Check if is orignal URL of CDN or not
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
539
  *
540
+ * @since 2.1
541
  * @access private
542
  */
543
+ private function _is_ori_url( $url )
544
  {
545
+ $url_parsed = parse_url( $url ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
546
 
547
+ $scheme = ! empty( $url_parsed[ 'scheme' ] ) ? $url_parsed[ 'scheme' ] . ':' : '' ;
 
 
 
 
 
548
 
549
+ foreach ( $this->cfg_url_ori as $v ) {
550
+ $needle = $scheme . $v ;
551
+ if ( strpos( $v, '*' ) !== false ) {
552
+ if( preg_match( '#' . $needle . '#iU', $url ) ) {
553
+ return true ;
554
+ }
555
+ }
556
+ else {
557
+ if ( strpos( $url, $needle ) === 0 ) {
558
+ return true ;
559
+ }
560
+ }
561
  }
562
 
563
+ return false ;
 
 
 
 
 
 
 
 
564
  }
565
 
566
  /**
567
+ * Check if the host is the CDN internal host
568
  *
569
+ * @since 1.2.3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
570
  *
 
 
571
  */
572
+ public static function internal( $host )
573
  {
574
+ if ( defined( self::BYPASS ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
575
  return false ;
576
  }
577
 
578
+ $instance = self::get_instance() ;
 
 
 
 
 
 
 
 
 
 
579
 
580
+ return in_array( $host, $instance->cdn_mapping_hosts ) ;// todo: can add $this->_is_ori_url() check in future
 
 
581
  }
582
 
583
  /**
584
+ * Remote load jQuery remotely
585
  *
586
+ * @since 1.5
587
+ * @access public
588
  */
589
+ public function load_jquery_remotely()
590
  {
591
+ // default jq version
592
+ $v = '1.12.4' ;
593
 
594
+ // load wp's jq version
595
+ global $wp_scripts ;
596
+ if ( isset( $wp_scripts->registered[ 'jquery' ]->ver ) ) {
597
+ $v = $wp_scripts->registered[ 'jquery' ]->ver ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
598
  }
 
599
 
600
+ $src = $this->cfg_cdn_remote_jquery === LiteSpeed_Cache_Config::VAL_ON ? "//ajax.googleapis.com/ajax/libs/jquery/$v/jquery.min.js" : "//cdnjs.cloudflare.com/ajax/libs/jquery/$v/jquery.min.js" ;
 
 
 
 
 
 
 
601
 
602
+ LiteSpeed_Cache_Log::debug2( 'CDN: load_jquery_remotely: ' . $src ) ;
 
603
 
604
+ wp_deregister_script( 'jquery' ) ;
 
 
 
 
605
 
606
+ wp_register_script( 'jquery', $src, false, $v ) ;
607
  }
608
 
609
  /**
615
  */
616
  public static function get_instance()
617
  {
618
+ if ( ! isset( self::$_instance ) ) {
619
  self::$_instance = new self() ;
620
  }
621
 
623
  }
624
 
625
  }
 
 
 
inc/cdn/cloudflare.class.php ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * The cloudflare CDN class.
5
+ *
6
+ * @since 2.1
7
+ * @package LiteSpeed_Cache
8
+ * @subpackage LiteSpeed_Cache/inc/cdn
9
+ * @author LiteSpeed Technologies <info@litespeedtech.com>
10
+ */
11
+
12
+ class LiteSpeed_Cache_CDN_Cloudflare
13
+ {
14
+ private static $_instance ;
15
+
16
+ const TYPE_PURGE_ALL = 'purge_all' ;
17
+ const TYPE_GET_DEVMODE = 'get_devmode' ;
18
+ const TYPE_SET_DEVMODE_ON = 'set_devmode_on' ;
19
+ const TYPE_SET_DEVMODE_OFF = 'set_devmode_off' ;
20
+
21
+ /**
22
+ * Handle all request actions from main cls
23
+ *
24
+ * @since 1.7.2
25
+ * @access public
26
+ */
27
+ public static function handler()
28
+ {
29
+ $instance = self::get_instance() ;
30
+
31
+ $type = LiteSpeed_Cache_Router::verify_type() ;
32
+
33
+ switch ( $type ) {
34
+ case self::TYPE_PURGE_ALL :
35
+ $instance->_purge_all() ;
36
+ break ;
37
+
38
+ case self::TYPE_GET_DEVMODE :
39
+ $instance->_get_devmode() ;
40
+ break ;
41
+
42
+ case self::TYPE_SET_DEVMODE_ON :
43
+ case self::TYPE_SET_DEVMODE_OFF :
44
+ $instance->_set_devmode( $type ) ;
45
+ break ;
46
+
47
+ default:
48
+ break ;
49
+ }
50
+
51
+ LiteSpeed_Cache_Admin::redirect() ;
52
+ }
53
+
54
+ /**
55
+ * Get Cloudflare development mode
56
+ *
57
+ * @since 1.7.2
58
+ * @access private
59
+ */
60
+ private function _get_devmode( $show_msg = true )
61
+ {
62
+ LiteSpeed_Cache_Log::debug( '[Cloudflare] _get_devmode' ) ;
63
+
64
+ $zone = $this->_zone() ;
65
+ if ( ! $zone ) {
66
+ return ;
67
+ }
68
+
69
+ $url = 'https://api.cloudflare.com/client/v4/zones/' . $zone . '/settings/development_mode' ;
70
+ $res = $this->_cloudflare_call( $url, 'GET', false, false, $show_msg ) ;
71
+
72
+ if ( ! $res ) {
73
+ return ;
74
+ }
75
+ LiteSpeed_Cache_Log::debug( '[Cloudflare] _get_devmode result ', $res ) ;
76
+
77
+ $curr_status = get_option( LiteSpeed_Cache_Config::ITEM_CLOUDFLARE_STATUS, array() ) ;
78
+ $curr_status[ 'devmode' ] = $res[ 'value' ] ;
79
+ $curr_status[ 'devmode_expired' ] = $res[ 'time_remaining' ] + time() ;
80
+
81
+ // update status
82
+ update_option( LiteSpeed_Cache_Config::ITEM_CLOUDFLARE_STATUS, $curr_status ) ;
83
+
84
+ }
85
+
86
+ /**
87
+ * Set Cloudflare development mode
88
+ *
89
+ * @since 1.7.2
90
+ * @access private
91
+ */
92
+ private function _set_devmode( $type )
93
+ {
94
+ LiteSpeed_Cache_Log::debug( '[Cloudflare] _set_devmode' ) ;
95
+
96
+ $zone = $this->_zone() ;
97
+ if ( ! $zone ) {
98
+ return ;
99
+ }
100
+
101
+ $url = 'https://api.cloudflare.com/client/v4/zones/' . $zone . '/settings/development_mode' ;
102
+ $new_val = $type == self::TYPE_SET_DEVMODE_ON ? 'on' : 'off' ;
103
+ $data = array( 'value' => $new_val ) ;
104
+ $res = $this->_cloudflare_call( $url, 'PATCH', $data ) ;
105
+
106
+ if ( ! $res ) {
107
+ return ;
108
+ }
109
+
110
+ $res = $this->_get_devmode( false ) ;
111
+
112
+ if ( $res ) {
113
+ $msg = sprintf( __( 'Notified Cloudflare to set development mode to %s successfully.', 'litespeed-cache' ), strtoupper( $new_val ) ) ;
114
+ LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
115
+ }
116
+
117
+ }
118
+
119
+ /**
120
+ * Purge Cloudflare cache
121
+ *
122
+ * @since 1.7.2
123
+ * @access private
124
+ */
125
+ private function _purge_all()
126
+ {
127
+ LiteSpeed_Cache_Log::debug( '[Cloudflare] _purge_all' ) ;
128
+
129
+ $cf_on = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE ) ;
130
+ if ( ! $cf_on ) {
131
+ $msg = __( 'Cloudflare API is set to off.', 'litespeed-cache' ) ;
132
+ LiteSpeed_Cache_Admin_Display::error( $msg ) ;
133
+ return ;
134
+ }
135
+
136
+ $zone = $this->_zone() ;
137
+ if ( ! $zone ) {
138
+ return ;
139
+ }
140
+
141
+ $url = 'https://api.cloudflare.com/client/v4/zones/' . $zone . '/purge_cache' ;
142
+ $data = array( 'purge_everything' => true ) ;
143
+
144
+ $res = $this->_cloudflare_call( $url, 'DELETE', $data ) ;
145
+
146
+ if ( $res ) {
147
+ $msg = __( 'Notified Cloudflare to purge all successfully.', 'litespeed-cache' ) ;
148
+ LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
149
+ }
150
+ }
151
+
152
+ /**
153
+ * Get current Cloudflare zone from cfg
154
+ *
155
+ * @since 1.7.2
156
+ * @access private
157
+ */
158
+ private function _zone()
159
+ {
160
+ $zone = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_ZONE ) ;
161
+ if ( ! $zone ) {
162
+ $msg = __( 'No available Cloudflare zone', 'litespeed-cache' ) ;
163
+ LiteSpeed_Cache_Admin_Display::error( $msg ) ;
164
+ return false ;
165
+ }
166
+
167
+ return $zone ;
168
+ }
169
+
170
+ /**
171
+ * Get Cloudflare zone settings
172
+ *
173
+ * @since 1.7.2
174
+ * @access public
175
+ */
176
+ public function fetch_zone( $options )
177
+ {
178
+ $kw = $options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_NAME ] ;
179
+
180
+ $url = 'https://api.cloudflare.com/client/v4/zones?status=active&match=all' ;
181
+
182
+ // Try exact match first
183
+ if ( $kw && strpos( $kw, '.' ) ) {
184
+ $zones = $this->_cloudflare_call( $url . '&name=' . $kw, 'GET', false, $options, false ) ;
185
+ if ( $zones ) {
186
+ LiteSpeed_Cache_Log::debug( '[Cloudflare] fetch_zone exact matched' ) ;
187
+ return $zones[ 0 ] ;
188
+ }
189
+ }
190
+
191
+ // Can't find, try to get default one
192
+ $zones = $this->_cloudflare_call( $url, 'GET', false, $options, false ) ;
193
+
194
+ if ( ! $zones ) {
195
+ LiteSpeed_Cache_Log::debug( '[Cloudflare] fetch_zone no zone' ) ;
196
+ return false ;
197
+ }
198
+
199
+ if ( ! $kw ) {
200
+ LiteSpeed_Cache_Log::debug( '[Cloudflare] fetch_zone no set name, use first one by default' ) ;
201
+ return $zones[ 0 ] ;
202
+ }
203
+
204
+ foreach ( $zones as $v ) {
205
+ if ( strpos( $v[ 'name' ], $kw ) !== false ) {
206
+ LiteSpeed_Cache_Log::debug( '[Cloudflare] fetch_zone matched ' . $kw . ' [name] ' . $v[ 'name' ] ) ;
207
+ return $v ;
208
+ }
209
+ }
210
+
211
+ // Can't match current name, return default one
212
+ LiteSpeed_Cache_Log::debug( '[Cloudflare] fetch_zone failed match name, use first one by default' ) ;
213
+ return $zones[ 0 ] ;
214
+ }
215
+
216
+ /**
217
+ * Cloudflare API
218
+ *
219
+ * @since 1.7.2
220
+ * @access private
221
+ */
222
+ private function _cloudflare_call( $url, $method = 'GET', $data = false, $token = false, $show_msg = true )
223
+ {
224
+ LiteSpeed_Cache_Log::debug( "[Cloudflare] _cloudflare_call \t\t[URL] $url" ) ;
225
+
226
+ $header = array(
227
+ 'Content-Type: application/json',
228
+ ) ;
229
+ if ( $token ) {
230
+ LiteSpeed_Cache_Log::debug2( '[Cloudflare] _cloudflare_call use param token' ) ;
231
+ $header[] = 'X-Auth-Email: ' . $token[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_EMAIL ] ;
232
+ $header[] = 'X-Auth-Key: ' . $token[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_KEY ] ;
233
+ }
234
+ else {
235
+ $header[] = 'X-Auth-Email: ' . LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_EMAIL ) ;
236
+ $header[] = 'X-Auth-Key: ' . LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_KEY ) ;
237
+ }
238
+
239
+ $ch = curl_init() ;
240
+ curl_setopt( $ch, CURLOPT_URL, $url ) ;
241
+ curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, $method ) ;
242
+ curl_setopt( $ch, CURLOPT_HTTPHEADER, $header ) ;
243
+ curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ) ;
244
+ if ( $data ) {
245
+ if ( is_array( $data ) ) {
246
+ $data = json_encode( $data ) ;
247
+ }
248
+ curl_setopt( $ch, CURLOPT_POSTFIELDS, $data ) ;
249
+ }
250
+ $result = curl_exec( $ch ) ;
251
+
252
+ $json = json_decode( $result, true ) ;
253
+
254
+ if ( $json && $json[ 'success' ] && $json[ 'result' ] ) {
255
+ LiteSpeed_Cache_Log::debug( "[Cloudflare] _cloudflare_call called successfully" ) ;
256
+ if ( $show_msg ) {
257
+ $msg = __( 'Communicated with Cloudflare successfully.', 'litespeed-cache' ) ;
258
+ LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
259
+ }
260
+
261
+ return $json[ 'result' ] ;
262
+ }
263
+
264
+ LiteSpeed_Cache_Log::debug( "[Cloudflare] _cloudflare_call called failed: $result" ) ;
265
+ if ( $show_msg ) {
266
+ $msg = __( 'Failed to communicate with Cloudflare', 'litespeed-cache' ) ;
267
+ LiteSpeed_Cache_Admin_Display::error( $msg ) ;
268
+ }
269
+
270
+ return false ;
271
+ }
272
+
273
+ /**
274
+ * Get the current instance object.
275
+ *
276
+ * @since 1.2.3
277
+ * @access public
278
+ * @return Current class instance.
279
+ */
280
+ public static function get_instance()
281
+ {
282
+ if ( ! isset( self::$_instance ) ) {
283
+ self::$_instance = new self() ;
284
+ }
285
+
286
+ return self::$_instance ;
287
+ }
288
+
289
+ }
inc/config.class.php CHANGED
@@ -229,6 +229,9 @@ class LiteSpeed_Cache_Config
229
  }
230
  else {
231
  $options = get_option( self::OPTION_NAME, $this->get_default_options() ) ;
 
 
 
232
  }
233
 
234
  $this->options = $options ;
@@ -238,12 +241,7 @@ class LiteSpeed_Cache_Config
238
  if ( $this->options[ self::OPID_ENABLED_RADIO ] === self::VAL_ON
239
  // || ( is_multisite() && is_network_admin() && current_user_can( 'manage_network_options' ) && $this->options[ LiteSpeed_Cache_Config::NETWORK_OPID_ENABLED ] ) todo: need to check when primary is off and network is on, if can manage
240
  ) {
241
- defined( 'LITESPEED_ALLOWED' ) && ! defined( 'LITESPEED_ON' ) && define( 'LITESPEED_ON', true ) ;
242
- }
243
-
244
- // Check advanced_cache set
245
- if ( isset( $this->options[ self::OPID_CHECK_ADVANCEDCACHE ] ) && $this->options[ self::OPID_CHECK_ADVANCEDCACHE ] === false && ! defined( 'LSCACHE_ADV_CACHE' ) ) {
246
- define( 'LSCACHE_ADV_CACHE', true ) ;
247
  }
248
 
249
  // Vary group settings
@@ -262,6 +260,35 @@ class LiteSpeed_Cache_Config
262
 
263
  }
264
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  /**
266
  * For multisite installations, the single site options need to be updated with the network wide options.
267
  *
@@ -273,6 +300,8 @@ class LiteSpeed_Cache_Config
273
  {
274
  $site_options = get_site_option( self::OPTION_NAME ) ;
275
 
 
 
276
  $options = get_option( self::OPTION_NAME, $this->get_default_options() ) ;
277
 
278
  /**
@@ -287,7 +316,7 @@ class LiteSpeed_Cache_Config
287
  // If don't have site options
288
  if ( ! $site_options || ! is_array( $site_options ) || ! is_plugin_active_for_network( 'litespeed-cache/litespeed-cache.php' ) ) {
289
  if ( $options[ self::OPID_ENABLED_RADIO ] === self::VAL_ON2 ) { // Default to cache on
290
- defined( 'LITESPEED_ALLOWED' ) && ! defined( 'LITESPEED_ON' ) && define( 'LITESPEED_ON', true ) ;
291
  }
292
  return $options ;
293
  }
@@ -307,7 +336,7 @@ class LiteSpeed_Cache_Config
307
 
308
  // If use network setting
309
  if ( $options[ self::OPID_ENABLED_RADIO ] === self::VAL_ON2 && $site_options[ self::NETWORK_OPID_ENABLED ] ) {
310
- defined( 'LITESPEED_ALLOWED' ) && ! defined( 'LITESPEED_ON' ) && define( 'LITESPEED_ON', true ) ;
311
  }
312
  // Set network eanble to on
313
  if ( $site_options[ self::NETWORK_OPID_ENABLED ] ) {
229
  }
230
  else {
231
  $options = get_option( self::OPTION_NAME, $this->get_default_options() ) ;
232
+
233
+ // Check advanced_cache set
234
+ $this->_check_adv_cache( $options ) ;
235
  }
236
 
237
  $this->options = $options ;
241
  if ( $this->options[ self::OPID_ENABLED_RADIO ] === self::VAL_ON
242
  // || ( is_multisite() && is_network_admin() && current_user_can( 'manage_network_options' ) && $this->options[ LiteSpeed_Cache_Config::NETWORK_OPID_ENABLED ] ) todo: need to check when primary is off and network is on, if can manage
243
  ) {
244
+ $this->_define_cache_on() ;
 
 
 
 
 
245
  }
246
 
247
  // Vary group settings
260
 
261
  }
262
 
263
+ /**
264
+ * Define `LSCACHE_ADV_CACHE` based on options setting
265
+ *
266
+ * NOTE: this must be before `LITESPEED_ON` defination
267
+ *
268
+ * @since 2.1
269
+ * @access private
270
+ */
271
+ private function _check_adv_cache( $options )
272
+ {
273
+ if ( isset( $options[ self::OPID_CHECK_ADVANCEDCACHE ] ) && $options[ self::OPID_CHECK_ADVANCEDCACHE ] === false && ! defined( 'LSCACHE_ADV_CACHE' ) ) {
274
+ define( 'LSCACHE_ADV_CACHE', true ) ;
275
+ }
276
+ }
277
+
278
+ /**
279
+ * Define `LITESPEED_ON`
280
+ *
281
+ * @since 2.1
282
+ * @access private
283
+ */
284
+ private function _define_cache_on()
285
+ {
286
+ defined( 'LITESPEED_ALLOWED' ) && defined( 'LSCACHE_ADV_CACHE' ) && ! defined( 'LITESPEED_ON' ) && define( 'LITESPEED_ON', true ) ;
287
+
288
+ // Use this for cache enabled setting check
289
+ ! defined( 'LITESPEED_ON_IN_SETTING' ) && define( 'LITESPEED_ON_IN_SETTING', true ) ;
290
+ }
291
+
292
  /**
293
  * For multisite installations, the single site options need to be updated with the network wide options.
294
  *
300
  {
301
  $site_options = get_site_option( self::OPTION_NAME ) ;
302
 
303
+ $this->_check_adv_cache( $site_options ) ;
304
+
305
  $options = get_option( self::OPTION_NAME, $this->get_default_options() ) ;
306
 
307
  /**
316
  // If don't have site options
317
  if ( ! $site_options || ! is_array( $site_options ) || ! is_plugin_active_for_network( 'litespeed-cache/litespeed-cache.php' ) ) {
318
  if ( $options[ self::OPID_ENABLED_RADIO ] === self::VAL_ON2 ) { // Default to cache on
319
+ $this->_define_cache_on() ;
320
  }
321
  return $options ;
322
  }
336
 
337
  // If use network setting
338
  if ( $options[ self::OPID_ENABLED_RADIO ] === self::VAL_ON2 && $site_options[ self::NETWORK_OPID_ENABLED ] ) {
339
+ $this->_define_cache_on() ;
340
  }
341
  // Set network eanble to on
342
  if ( $site_options[ self::NETWORK_OPID_ENABLED ] ) {
inc/data_structure/img_optm.sql CHANGED
@@ -1,6 +1,6 @@
1
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
2
  `post_id` bigint(20) unsigned NOT NULL DEFAULT '0',
3
- `optm_status` varchar(255) NOT NULL DEFAULT '',
4
  `src` varchar(1000) NOT NULL DEFAULT '',
5
  `srcpath_md5` varchar(128) NOT NULL DEFAULT '',
6
  `src_md5` varchar(128) NOT NULL DEFAULT '',
1
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
2
  `post_id` bigint(20) unsigned NOT NULL DEFAULT '0',
3
+ `optm_status` varchar(64) NOT NULL DEFAULT '',
4
  `src` varchar(1000) NOT NULL DEFAULT '',
5
  `srcpath_md5` varchar(128) NOT NULL DEFAULT '',
6
  `src_md5` varchar(128) NOT NULL DEFAULT '',
inc/gui.class.php CHANGED
@@ -95,6 +95,12 @@ class LiteSpeed_Cache_GUI
95
 
96
  }
97
 
 
 
 
 
 
 
98
  public static function dismiss()
99
  {
100
  switch ( LiteSpeed_Cache_Router::verify_type() ) {
@@ -107,7 +113,20 @@ class LiteSpeed_Cache_GUI
107
  break ;
108
 
109
  case self::TYPE_DISMISS_PROMO :
110
- update_option( 'litespeed-banner-promo', ! empty( $_GET[ 'done' ] ) ? 'done' : time() ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  break ;
112
 
113
  default:
@@ -142,6 +161,42 @@ class LiteSpeed_Cache_GUI
142
  return get_transient( LiteSpeed_Cache::WHM_TRANSIENT ) == LiteSpeed_Cache::WHM_TRANSIENT_VAL ;
143
  }
144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  /**
146
  * Check if has promotion notice
147
  *
@@ -149,11 +204,22 @@ class LiteSpeed_Cache_GUI
149
  * @access public
150
  * @return boolean
151
  */
152
- public static function has_promo_msg()
153
  {
154
- $promo = get_option( 'litespeed-banner-promo' ) ;
 
 
 
 
 
 
 
 
 
 
 
155
  if ( ! $promo ) {
156
- update_option( 'litespeed-banner-promo', time() - 86400 * 8 ) ;
157
  return false ;
158
  }
159
  if ( $promo == 'done' ) {
@@ -162,6 +228,7 @@ class LiteSpeed_Cache_GUI
162
  if ( $promo && time() - $promo < 864000 ) {
163
  return false ;
164
  }
 
165
  return true ;
166
  }
167
 
@@ -260,12 +327,21 @@ class LiteSpeed_Cache_GUI
260
  {
261
  global $wp_admin_bar ;
262
 
263
- $wp_admin_bar->add_menu( array(
264
- 'id' => 'litespeed-menu',
265
- 'title' => '<span class="ab-icon" title="' . __( 'LiteSpeed Cache Purge All', 'litespeed-cache' ) . '""></span>',
266
- 'href' => LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_PURGE_ALL ),
267
- 'meta' => array( 'tabindex' => 0, 'class' => 'litespeed-top-toolbar' ),
268
- ) ) ;
 
 
 
 
 
 
 
 
 
269
 
270
  $wp_admin_bar->add_menu( array(
271
  'parent' => 'litespeed-menu',
@@ -306,7 +382,7 @@ class LiteSpeed_Cache_GUI
306
  'parent' => 'litespeed-menu',
307
  'id' => 'litespeed-purge-cloudflare',
308
  'title' => __( 'Cloudflare Purge All', 'litespeed-cache' ),
309
- 'href' => LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_CDN, LiteSpeed_Cache_CDN::TYPE_CLOUDFLARE_PURGE_ALL ),
310
  'meta' => array( 'tabindex' => '0' ),
311
  ) );
312
  }
95
 
96
  }
97
 
98
+ /**
99
+ * Dismiss banner
100
+ *
101
+ * @since 1.0
102
+ * @access public
103
+ */
104
  public static function dismiss()
105
  {
106
  switch ( LiteSpeed_Cache_Router::verify_type() ) {
113
  break ;
114
 
115
  case self::TYPE_DISMISS_PROMO :
116
+
117
+ if ( ! empty( $_GET[ 'slack' ] ) ) {
118
+ // Update slack
119
+ update_option( 'litespeed-banner-promo-slack', 'done' ) ;
120
+
121
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Dismiss promo slack' ) ;
122
+ }
123
+ else {
124
+ // Update welcome banner
125
+ update_option( 'litespeed-banner-promo', ! empty( $_GET[ 'done' ] ) ? 'done' : time() ) ;
126
+
127
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Dismiss promo welcome' ) ;
128
+ }
129
+
130
  break ;
131
 
132
  default:
161
  return get_transient( LiteSpeed_Cache::WHM_TRANSIENT ) == LiteSpeed_Cache::WHM_TRANSIENT_VAL ;
162
  }
163
 
164
+ /**
165
+ * Display promo banner
166
+ *
167
+ * @since 2.1
168
+ * @access public
169
+ */
170
+ public static function show_promo()
171
+ {
172
+ include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
173
+ include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.slack.php" ;
174
+ }
175
+
176
+ /**
177
+ * Detect if need to display promo banner or not
178
+ *
179
+ * @since 2.1
180
+ * @access public
181
+ */
182
+ public static function should_show_promo( $banner = false )
183
+ {
184
+ // Only show one promo at one time
185
+ if ( defined( 'LITESPEED_PROMO_SHOWN' ) ) {
186
+ return false ;
187
+ }
188
+
189
+ if ( ! self::has_promo_msg( $banner ) ) {
190
+ return false ;
191
+ }
192
+
193
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Show promo ' . $banner ) ;
194
+
195
+ ! defined( 'LITESPEED_PROMO_SHOWN' ) && define( 'LITESPEED_PROMO_SHOWN', true ) ;
196
+
197
+ return true ;
198
+ }
199
+
200
  /**
201
  * Check if has promotion notice
202
  *
204
  * @access public
205
  * @return boolean
206
  */
207
+ public static function has_promo_msg( $banner = false )
208
  {
209
+ // How many days delayed to show the banner
210
+ $delay_days = 2 ;
211
+ if ( $banner == 'slack' ) {
212
+ $delay_days = 3 ;
213
+ }
214
+
215
+ $option_name = 'litespeed-banner-promo' ;
216
+ if ( $banner ) {
217
+ $option_name .= '-' . $banner ;
218
+ }
219
+
220
+ $promo = get_option( $option_name ) ;
221
  if ( ! $promo ) {
222
+ update_option( $option_name, time() - 86400 * ( 10 - $delay_days ) ) ;
223
  return false ;
224
  }
225
  if ( $promo == 'done' ) {
228
  if ( $promo && time() - $promo < 864000 ) {
229
  return false ;
230
  }
231
+
232
  return true ;
233
  }
234
 
327
  {
328
  global $wp_admin_bar ;
329
 
330
+ if ( defined( 'LITESPEED_ON' ) ) {
331
+ $wp_admin_bar->add_menu( array(
332
+ 'id' => 'litespeed-menu',
333
+ 'title' => '<span class="ab-icon" title="' . __( 'LiteSpeed Cache Purge All', 'litespeed-cache' ) . '""></span>',
334
+ 'href' => LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_PURGE_ALL ),
335
+ 'meta' => array( 'tabindex' => 0, 'class' => 'litespeed-top-toolbar' ),
336
+ ) ) ;
337
+ }
338
+ else {
339
+ $wp_admin_bar->add_menu( array(
340
+ 'id' => 'litespeed-menu',
341
+ 'title' => '<span class="ab-icon" title="' . __( 'LiteSpeed Cache', 'litespeed-cache' ) . '""></span>',
342
+ 'meta' => array( 'tabindex' => 0, 'class' => 'litespeed-top-toolbar' ),
343
+ ) ) ;
344
+ }
345
 
346
  $wp_admin_bar->add_menu( array(
347
  'parent' => 'litespeed-menu',
382
  'parent' => 'litespeed-menu',
383
  'id' => 'litespeed-purge-cloudflare',
384
  'title' => __( 'Cloudflare Purge All', 'litespeed-cache' ),
385
+ 'href' => LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_CDN_CLOUDFLARE, LiteSpeed_Cache_CDN_Cloudflare::TYPE_PURGE_ALL ),
386
  'meta' => array( 'tabindex' => '0' ),
387
  ) );
388
  }
inc/img_optm.class.php CHANGED
@@ -126,7 +126,7 @@ class LiteSpeed_Cache_Img_Optm
126
  ORDER BY a.ID DESC
127
  LIMIT %d
128
  " ;
129
- $q = $wpdb->prepare( $q, apply_filters( 'litespeed_img_optimize_max_rows', 100 ) ) ;
130
 
131
  $img_set = array() ;
132
  $list = $wpdb->get_results( $q ) ;
@@ -186,7 +186,7 @@ class LiteSpeed_Cache_Img_Optm
186
  $this->_save_missed_into_img_optm() ;
187
 
188
  if ( empty( $this->_img_in_queue ) ) {
189
- $msg = __( 'No image found.', 'litespeed-cache' ) ;
190
  LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
191
 
192
  LiteSpeed_Cache_Log::debug( '[Img_Optm] optimize bypass: empty _img_in_queue' ) ;
@@ -765,7 +765,7 @@ class LiteSpeed_Cache_Img_Optm
765
  'pid' => $row_img->post_id,
766
  'src_md5' => $row_img->src_md5,
767
  ) ;
768
- $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_PULL_IMG, $data, $server ) ;
769
  if ( empty( $json[ 'webp' ] ) ) {
770
  LiteSpeed_Cache_Log::debug( '[Img_Optm] Failed to pull optimized img: ', $json ) ;
771
  return ;
@@ -803,7 +803,7 @@ class LiteSpeed_Cache_Img_Optm
803
  $wpdb->query( $wpdb->prepare( $q, array( self::DB_IMG_OPTIMIZE_STATUS_FAILED, $row_img->id ) ) ) ;
804
 
805
  // Notify server to update status
806
- LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_PULL_IMG_FAILED, $data, $server ) ;
807
 
808
  return ;// exit from running pull process
809
  }
@@ -850,7 +850,7 @@ class LiteSpeed_Cache_Img_Optm
850
  $wpdb->query( $wpdb->prepare( $q, array( self::DB_IMG_OPTIMIZE_STATUS_FAILED, $row_img->id ) ) ) ;
851
 
852
  // Notify server to update status
853
- LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_PULL_IMG_FAILED, $data, $server ) ;
854
 
855
  return ; // exit from running pull process
856
  }
126
  ORDER BY a.ID DESC
127
  LIMIT %d
128
  " ;
129
+ $q = $wpdb->prepare( $q, apply_filters( 'litespeed_img_optimize_max_rows', 500 ) ) ;
130
 
131
  $img_set = array() ;
132
  $list = $wpdb->get_results( $q ) ;
186
  $this->_save_missed_into_img_optm() ;
187
 
188
  if ( empty( $this->_img_in_queue ) ) {
189
+ $msg = __( 'Requested successfully.', 'litespeed-cache' ) ;
190
  LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
191
 
192
  LiteSpeed_Cache_Log::debug( '[Img_Optm] optimize bypass: empty _img_in_queue' ) ;
765
  'pid' => $row_img->post_id,
766
  'src_md5' => $row_img->src_md5,
767
  ) ;
768
+ $json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_PULL_IMG, $data, $server, true ) ;
769
  if ( empty( $json[ 'webp' ] ) ) {
770
  LiteSpeed_Cache_Log::debug( '[Img_Optm] Failed to pull optimized img: ', $json ) ;
771
  return ;
803
  $wpdb->query( $wpdb->prepare( $q, array( self::DB_IMG_OPTIMIZE_STATUS_FAILED, $row_img->id ) ) ) ;
804
 
805
  // Notify server to update status
806
+ LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_PULL_IMG_FAILED, $data, $server, true ) ;
807
 
808
  return ;// exit from running pull process
809
  }
850
  $wpdb->query( $wpdb->prepare( $q, array( self::DB_IMG_OPTIMIZE_STATUS_FAILED, $row_img->id ) ) ) ;
851
 
852
  // Notify server to update status
853
+ LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_PULL_IMG_FAILED, $data, $server, true ) ;
854
 
855
  return ; // exit from running pull process
856
  }
inc/litespeed-cache.class.php CHANGED
@@ -19,7 +19,7 @@ class LiteSpeed_Cache
19
  private static $_instance ;
20
 
21
  const PLUGIN_NAME = 'litespeed-cache' ;
22
- const PLUGIN_VERSION = '2.0' ;
23
 
24
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
 
@@ -47,7 +47,8 @@ class LiteSpeed_Cache
47
  const ACTION_CRAWLER_CRON_ENABLE = 'crawler-cron-enable' ;
48
  const ACTION_DO_CRAWL = 'do-crawl' ;
49
  const ACTION_BLACKLIST_SAVE = 'blacklist-save' ;
50
- const ACTION_QUIC_CLOUD = 'quic_cloud' ;
 
51
 
52
  const ACTION_FRONT_PURGE = 'front-purge' ;
53
  const ACTION_FRONT_EXCLUDE = 'front-exclude' ;
@@ -86,13 +87,14 @@ class LiteSpeed_Cache
86
  private function __construct()
87
  {
88
  LiteSpeed_Cache_Config::get_instance() ;
 
89
  // Check if debug is on
90
- if ( defined( 'LITESPEED_ON' ) ) {
91
- $should_debug = intval(self::config(LiteSpeed_Cache_Config::OPID_DEBUG)) ;
92
- if ( $should_debug == LiteSpeed_Cache_Config::VAL_ON || ($should_debug == LiteSpeed_Cache_Config::VAL_ON2 && LiteSpeed_Cache_Router::is_admin_ip()) ) {
93
- LiteSpeed_Cache_Log::init() ;
94
- }
95
 
 
96
  // Load third party detection if lscache enabled.
97
  include_once LSCWP_DIR . 'thirdparty/lscwp-registry-3rd.php' ;
98
  }
@@ -108,9 +110,9 @@ class LiteSpeed_Cache
108
  // NOTE: this can't be moved under after_setup_theme, otherwise activation will be bypassed somehow
109
  if( is_admin() || defined( 'LITESPEED_CLI' ) ) {
110
  $plugin_file = LSCWP_DIR . 'litespeed-cache.php' ;
111
- register_activation_hook($plugin_file, array('LiteSpeed_Cache_Activation', 'register_activation' )) ;
112
- register_deactivation_hook($plugin_file, array('LiteSpeed_Cache_Activation', 'register_deactivation' )) ;
113
- register_uninstall_hook($plugin_file, 'LiteSpeed_Cache_Activation::uninstall_litespeed_cache') ;
114
  }
115
 
116
  add_action( 'after_setup_theme', array( $this, 'init' ) ) ;
@@ -163,12 +165,12 @@ class LiteSpeed_Cache
163
  LiteSpeed_Cache_Admin::get_instance() ;
164
  }
165
 
166
- if ( ! defined( 'LITESPEED_ON' ) || ! defined( 'LSCACHE_ADV_CACHE' ) || ! LSCACHE_ADV_CACHE ) {
167
- return ;
168
- }
169
-
170
  LiteSpeed_Cache_Router::get_instance()->is_crawler_role_simulation() ;
171
 
 
 
 
 
172
  ob_start( array( $this, 'send_headers_force' ) ) ;
173
  add_action( 'shutdown', array( $this, 'send_headers' ), 0 ) ;
174
  add_action( 'wp_footer', 'LiteSpeed_Cache::footer_hook' ) ;
@@ -342,10 +344,6 @@ class LiteSpeed_Cache
342
  $msg = LiteSpeed_Cache_Admin_API::handler() ;
343
  break ;
344
 
345
- case LiteSpeed_Cache::ACTION_CDN:
346
- $msg = LiteSpeed_Cache_CDN::handler() ;
347
- break ;
348
-
349
  case LiteSpeed_Cache::ACTION_LOG:
350
  $msg = LiteSpeed_Cache_Log::handler() ;
351
  break ;
@@ -358,8 +356,12 @@ class LiteSpeed_Cache
358
  $msg = LiteSpeed_Cache_Import::handler() ;
359
  break ;
360
 
361
- case LiteSpeed_Cache::ACTION_QUIC_CLOUD:
362
- $msg = LiteSpeed_Cache_QUIC_CLOUD::handler() ;
 
 
 
 
363
  break ;
364
 
365
  default:
@@ -587,17 +589,23 @@ class LiteSpeed_Cache
587
  if ( ! defined( 'LSCACHE_IS_ESI' ) ) {
588
  $this->footer_comment .= "\n" ;
589
  }
 
 
 
 
 
 
590
  $this->footer_comment .= sprintf(
591
  '<!-- %1$s %2$s by LiteSpeed Cache %4$s on %3$s -->',
592
  defined( 'LSCACHE_IS_ESI' ) ? 'Block' : 'Page',
593
- LiteSpeed_Cache_Control::is_cacheable() ? 'generated' : 'uncached',
594
  date( 'Y-m-d H:i:s', time() + LITESPEED_TIME_OFFSET ),
595
  self::PLUGIN_VERSION
596
  ) ;
597
  }
598
 
599
  // send Control header
600
- if ( $control_header ) {
601
  @header( $control_header ) ;
602
  if ( defined( 'LSCWP_LOG' ) ) {
603
  LiteSpeed_Cache_Log::debug( $control_header ) ;
@@ -606,7 +614,7 @@ class LiteSpeed_Cache
606
  }
607
  }
608
  }
609
- // send PURGE header
610
  if ( $purge_header ) {
611
  @header( $purge_header ) ;
612
  if ( defined( 'LSCWP_LOG' ) ) {
@@ -617,7 +625,7 @@ class LiteSpeed_Cache
617
  }
618
  }
619
  // send Vary header
620
- if ( $vary_header ) {
621
  @header( $vary_header ) ;
622
  if ( defined( 'LSCWP_LOG' ) ) {
623
  LiteSpeed_Cache_Log::debug( $vary_header ) ;
@@ -647,7 +655,7 @@ class LiteSpeed_Cache
647
  }
648
  else {
649
  // Control header
650
- if ( LiteSpeed_Cache_Control::is_cacheable() && $tag_header ) {
651
  @header( $tag_header ) ;
652
  if ( defined( 'LSCWP_LOG' ) ) {
653
  LiteSpeed_Cache_Log::debug( $tag_header ) ;
19
  private static $_instance ;
20
 
21
  const PLUGIN_NAME = 'litespeed-cache' ;
22
+ const PLUGIN_VERSION = '2.1' ;
23
 
24
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
 
47
  const ACTION_CRAWLER_CRON_ENABLE = 'crawler-cron-enable' ;
48
  const ACTION_DO_CRAWL = 'do-crawl' ;
49
  const ACTION_BLACKLIST_SAVE = 'blacklist-save' ;
50
+ const ACTION_CDN_CLOUDFLARE = 'cdn_cloudflare' ;
51
+ const ACTION_CDN_QUICCLOUD = 'cdn_quiccloud' ;
52
 
53
  const ACTION_FRONT_PURGE = 'front-purge' ;
54
  const ACTION_FRONT_EXCLUDE = 'front-exclude' ;
87
  private function __construct()
88
  {
89
  LiteSpeed_Cache_Config::get_instance() ;
90
+
91
  // Check if debug is on
92
+ $should_debug = intval( self::config( LiteSpeed_Cache_Config::OPID_DEBUG ) ) ;
93
+ if ( $should_debug == LiteSpeed_Cache_Config::VAL_ON || ( $should_debug == LiteSpeed_Cache_Config::VAL_ON2 && LiteSpeed_Cache_Router::is_admin_ip() ) ) {
94
+ LiteSpeed_Cache_Log::init() ;
95
+ }
 
96
 
97
+ if ( defined( 'LITESPEED_ON' ) ) {
98
  // Load third party detection if lscache enabled.
99
  include_once LSCWP_DIR . 'thirdparty/lscwp-registry-3rd.php' ;
100
  }
110
  // NOTE: this can't be moved under after_setup_theme, otherwise activation will be bypassed somehow
111
  if( is_admin() || defined( 'LITESPEED_CLI' ) ) {
112
  $plugin_file = LSCWP_DIR . 'litespeed-cache.php' ;
113
+ register_activation_hook( $plugin_file, array( 'LiteSpeed_Cache_Activation', 'register_activation' ) ) ;
114
+ register_deactivation_hook( $plugin_file, array('LiteSpeed_Cache_Activation', 'register_deactivation' ) ) ;
115
+ register_uninstall_hook( $plugin_file, 'LiteSpeed_Cache_Activation::uninstall_litespeed_cache' ) ;
116
  }
117
 
118
  add_action( 'after_setup_theme', array( $this, 'init' ) ) ;
165
  LiteSpeed_Cache_Admin::get_instance() ;
166
  }
167
 
 
 
 
 
168
  LiteSpeed_Cache_Router::get_instance()->is_crawler_role_simulation() ;
169
 
170
+ // if ( ! defined( 'LITESPEED_ON' ) || ! defined( 'LSCACHE_ADV_CACHE' ) || ! LSCACHE_ADV_CACHE ) {
171
+ // return ;
172
+ // }
173
+
174
  ob_start( array( $this, 'send_headers_force' ) ) ;
175
  add_action( 'shutdown', array( $this, 'send_headers' ), 0 ) ;
176
  add_action( 'wp_footer', 'LiteSpeed_Cache::footer_hook' ) ;
344
  $msg = LiteSpeed_Cache_Admin_API::handler() ;
345
  break ;
346
 
 
 
 
 
347
  case LiteSpeed_Cache::ACTION_LOG:
348
  $msg = LiteSpeed_Cache_Log::handler() ;
349
  break ;
356
  $msg = LiteSpeed_Cache_Import::handler() ;
357
  break ;
358
 
359
+ case LiteSpeed_Cache::ACTION_CDN_CLOUDFLARE:
360
+ $msg = LiteSpeed_Cache_CDN_Cloudflare::handler() ;
361
+ break ;
362
+
363
+ case LiteSpeed_Cache::ACTION_CDN_QUICCLOUD:
364
+ $msg = LiteSpeed_Cache_CDN_Quiccloud::handler() ;
365
  break ;
366
 
367
  default:
589
  if ( ! defined( 'LSCACHE_IS_ESI' ) ) {
590
  $this->footer_comment .= "\n" ;
591
  }
592
+
593
+ $cache_support = 'supported' ;
594
+ if ( defined( 'LITESPEED_ON' ) ) {
595
+ $cache_support = LiteSpeed_Cache_Control::is_cacheable() ? 'generated' : 'uncached' ;
596
+ }
597
+
598
  $this->footer_comment .= sprintf(
599
  '<!-- %1$s %2$s by LiteSpeed Cache %4$s on %3$s -->',
600
  defined( 'LSCACHE_IS_ESI' ) ? 'Block' : 'Page',
601
+ $cache_support,
602
  date( 'Y-m-d H:i:s', time() + LITESPEED_TIME_OFFSET ),
603
  self::PLUGIN_VERSION
604
  ) ;
605
  }
606
 
607
  // send Control header
608
+ if ( defined( 'LITESPEED_ON_IN_SETTING' ) && $control_header ) {
609
  @header( $control_header ) ;
610
  if ( defined( 'LSCWP_LOG' ) ) {
611
  LiteSpeed_Cache_Log::debug( $control_header ) ;
614
  }
615
  }
616
  }
617
+ // send PURGE header (Always send regardless of cache setting disabled/enabled)
618
  if ( $purge_header ) {
619
  @header( $purge_header ) ;
620
  if ( defined( 'LSCWP_LOG' ) ) {
625
  }
626
  }
627
  // send Vary header
628
+ if ( defined( 'LITESPEED_ON_IN_SETTING' ) && $vary_header ) {
629
  @header( $vary_header ) ;
630
  if ( defined( 'LSCWP_LOG' ) ) {
631
  LiteSpeed_Cache_Log::debug( $vary_header ) ;
655
  }
656
  else {
657
  // Control header
658
+ if ( defined( 'LITESPEED_ON_IN_SETTING' ) && LiteSpeed_Cache_Control::is_cacheable() && $tag_header ) {
659
  @header( $tag_header ) ;
660
  if ( defined( 'LSCWP_LOG' ) ) {
661
  LiteSpeed_Cache_Log::debug( $tag_header ) ;
inc/litespeed.autoload.php CHANGED
@@ -26,6 +26,8 @@ if ( !function_exists('_litespeed_autoload') ) {
26
  'LiteSpeed_Cache_Activation' => 'inc/activation.class.php',
27
  'LiteSpeed_Cache_API' => 'inc/api.class.php',
28
  'LiteSpeed_Cache_CDN' => 'inc/cdn.class.php',
 
 
29
  'LiteSpeed_Cache_Config' => 'inc/config.class.php',
30
  'LiteSpeed_Cache_Control' => 'inc/control.class.php',
31
  'LiteSpeed_Cache_Crawler' => 'inc/crawler.class.php',
@@ -40,7 +42,6 @@ if ( !function_exists('_litespeed_autoload') ) {
40
  'LiteSpeed_Cache_Object' => 'inc/object.class.php',
41
  'LiteSpeed_Cache_Optimize' => 'inc/optimize.class.php',
42
  'LiteSpeed_Cache_Optimizer' => 'inc/optimizer.class.php',
43
- 'LiteSpeed_Cache_QUIC_CLOUD' => 'inc/quic_cloud.class.php',
44
  'LiteSpeed_Cache_Purge' => 'inc/purge.class.php',
45
  'LiteSpeed_Cache_Router' => 'inc/router.class.php',
46
  'LiteSpeed_Cache_Tag' => 'inc/tag.class.php',
26
  'LiteSpeed_Cache_Activation' => 'inc/activation.class.php',
27
  'LiteSpeed_Cache_API' => 'inc/api.class.php',
28
  'LiteSpeed_Cache_CDN' => 'inc/cdn.class.php',
29
+ 'LiteSpeed_Cache_CDN_Cloudflare' => 'inc/cdn/cloudflare.class.php',
30
+ 'LiteSpeed_Cache_CDN_Quiccloud' => 'inc/cdn/quiccloud.class.php',
31
  'LiteSpeed_Cache_Config' => 'inc/config.class.php',
32
  'LiteSpeed_Cache_Control' => 'inc/control.class.php',
33
  'LiteSpeed_Cache_Crawler' => 'inc/crawler.class.php',
42
  'LiteSpeed_Cache_Object' => 'inc/object.class.php',
43
  'LiteSpeed_Cache_Optimize' => 'inc/optimize.class.php',
44
  'LiteSpeed_Cache_Optimizer' => 'inc/optimizer.class.php',
 
45
  'LiteSpeed_Cache_Purge' => 'inc/purge.class.php',
46
  'LiteSpeed_Cache_Router' => 'inc/router.class.php',
47
  'LiteSpeed_Cache_Tag' => 'inc/tag.class.php',
inc/log.class.php CHANGED
@@ -313,7 +313,7 @@ class LiteSpeed_Cache_Log
313
  $params[] = 'Cookie _lscache_vary: ' . $_COOKIE[ '_lscache_vary' ] ;
314
  }
315
  if ( defined( 'LSCWP_LOG_MORE' ) ) {
316
- $params[] = 'X-LSCACHE: ' . ( $server[ 'X-LSCACHE' ] ? 'true' : 'false' ) ;
317
  }
318
  if( $server['LSCACHE_VARY_COOKIE'] ) {
319
  $params[] = 'LSCACHE_VARY_COOKIE: ' . $server['LSCACHE_VARY_COOKIE'] ;
313
  $params[] = 'Cookie _lscache_vary: ' . $_COOKIE[ '_lscache_vary' ] ;
314
  }
315
  if ( defined( 'LSCWP_LOG_MORE' ) ) {
316
+ $params[] = 'X-LSCACHE: ' . ( ! empty( $server[ 'X-LSCACHE' ] ) ? 'true' : 'false' ) ;
317
  }
318
  if( $server['LSCACHE_VARY_COOKIE'] ) {
319
  $params[] = 'LSCACHE_VARY_COOKIE: ' . $server['LSCACHE_VARY_COOKIE'] ;
inc/optimize.class.php CHANGED
@@ -218,6 +218,38 @@ class LiteSpeed_Cache_Optimize
218
  define( 'LITESPEED_MIN_FILE', true ) ;
219
 
220
  $file_type = substr( $match[ 1 ], strrpos( $match[ 1 ], '.' ) + 1 ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  $concat_only = ! ( $file_type === 'css' ? $this->cfg_css_minify : $this->cfg_js_minify ) ;
222
 
223
  $content = LiteSpeed_Cache_Optimizer::get_instance()->serve( $match[ 1 ], $concat_only ) ;
@@ -227,16 +259,40 @@ class LiteSpeed_Cache_Optimize
227
  exit ;
228
  }
229
 
 
 
 
 
 
 
 
230
  LiteSpeed_Cache_Control::set_cacheable() ;
231
  LiteSpeed_Cache_Control::set_public_forced( 'OPTM: min file ' . $match[ 1 ] ) ;
232
  LiteSpeed_Cache_Control::set_no_vary() ;
233
- LiteSpeed_Cache_Control::set_custom_ttl( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_OPTIMIZE_TTL ) ) ;
234
  LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_MIN ) ;
235
 
236
  echo $content ;
237
  exit ;
238
  }
239
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
  /**
241
  * Remove QS
242
  *
218
  define( 'LITESPEED_MIN_FILE', true ) ;
219
 
220
  $file_type = substr( $match[ 1 ], strrpos( $match[ 1 ], '.' ) + 1 ) ;
221
+
222
+ $ttl = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_OPTIMIZE_TTL ) ;
223
+
224
+ // Load file from file based cache if not enabled lscache
225
+ if ( ! defined( 'LITESPEED_ON' ) ) {
226
+ LiteSpeed_Cache_Log::debug( '[Optimize] Not enabled lscache, using file based cache' ) ;
227
+
228
+ $static_file = LSCWP_CONTENT_DIR . '/cache/' . $file_type . '/' . $match[ 1 ] ;
229
+ if ( file_exists( $static_file ) && time() - filemtime( $static_file ) <= $ttl ) {
230
+ $content = Litespeed_File::read( $static_file ) ;
231
+
232
+ // Output header first
233
+ $headers = array() ;
234
+ $headers[ 'Content-Length' ] = strlen( $content ) ;
235
+
236
+ if ( $file_type === 'css' ) {
237
+ $headers[ 'Content-Type' ] = 'text/css; charset=utf-8' ;
238
+ }
239
+ else {
240
+ $headers[ 'Content-Type' ] = 'application/x-javascript' ;
241
+ }
242
+
243
+ foreach ( $headers as $k => $v ) {
244
+ header( $k . ': ' . $v ) ;
245
+ LiteSpeed_Cache_Log::debug( '[Optimize] HEADER ' . $k . ': ' . $v ) ;
246
+ }
247
+
248
+ echo $content ;
249
+ exit ;
250
+ }
251
+ }
252
+
253
  $concat_only = ! ( $file_type === 'css' ? $this->cfg_css_minify : $this->cfg_js_minify ) ;
254
 
255
  $content = LiteSpeed_Cache_Optimizer::get_instance()->serve( $match[ 1 ], $concat_only ) ;
259
  exit ;
260
  }
261
 
262
+ // Save to file if not enabled lscache
263
+ if ( ! defined( 'LITESPEED_ON' ) ) {
264
+ LiteSpeed_Cache_Log::debug( '[Optimize] Saved cache to file [path] ' . $static_file ) ;
265
+
266
+ Litespeed_File::save( $static_file, $content, true ) ;
267
+ }
268
+
269
  LiteSpeed_Cache_Control::set_cacheable() ;
270
  LiteSpeed_Cache_Control::set_public_forced( 'OPTM: min file ' . $match[ 1 ] ) ;
271
  LiteSpeed_Cache_Control::set_no_vary() ;
272
+ LiteSpeed_Cache_Control::set_custom_ttl( $ttl ) ;
273
  LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_MIN ) ;
274
 
275
  echo $content ;
276
  exit ;
277
  }
278
 
279
+ /**
280
+ * Delete file-based cache folder
281
+ *
282
+ * @since 2.1
283
+ * @access public
284
+ */
285
+ public function rm_cache_folder()
286
+ {
287
+ if ( file_exists( LSCWP_CONTENT_DIR . '/cache/css' ) ) {
288
+ Litespeed_File::rrmdir( LSCWP_CONTENT_DIR . '/cache/css' ) ;
289
+ }
290
+
291
+ if ( file_exists( LSCWP_CONTENT_DIR . '/cache/js' ) ) {
292
+ Litespeed_File::rrmdir( LSCWP_CONTENT_DIR . '/cache/js' ) ;
293
+ }
294
+ }
295
+
296
  /**
297
  * Remove QS
298
  *
inc/purge.class.php CHANGED
@@ -244,6 +244,9 @@ class LiteSpeed_Cache_Purge
244
  public static function purge_cssjs()
245
  {
246
  self::add( LiteSpeed_Cache_Tag::TYPE_MIN ) ;
 
 
 
247
  }
248
 
249
  /**
244
  public static function purge_cssjs()
245
  {
246
  self::add( LiteSpeed_Cache_Tag::TYPE_MIN ) ;
247
+
248
+ // For non-ls users
249
+ LiteSpeed_Cache_Optimize::get_instance()->rm_cache_folder() ;
250
  }
251
 
252
  /**
inc/router.class.php CHANGED
@@ -166,14 +166,22 @@ class LiteSpeed_Cache_Router
166
  {
167
  if ( ! isset( self::$_can_crawl ) ) {
168
  self::$_can_crawl = false ;
 
169
  if ( isset( $_SERVER['X-LSCACHE'] ) && strpos( $_SERVER['X-LSCACHE'], 'crawler' ) !== false ) {
170
  self::$_can_crawl = true ;
171
  }
 
172
  // CLI will bypass this check as crawler library can always do the 428 check
173
  if ( defined( 'LITESPEED_CLI' ) ) {
174
  self::$_can_crawl = true ;
175
  }
 
 
 
 
 
176
  }
 
177
  return self::$_can_crawl ;
178
  }
179
 
@@ -340,7 +348,6 @@ class LiteSpeed_Cache_Router
340
 
341
  case LiteSpeed_Cache::ACTION_PURGE_FRONT:
342
  case LiteSpeed_Cache::ACTION_PURGE_PAGES:
343
- case LiteSpeed_Cache::ACTION_PURGE_CSSJS:
344
  case LiteSpeed_Cache::ACTION_PURGE_ERRORS:
345
  case LiteSpeed_Cache::ACTION_PURGE_ALL:
346
  case LiteSpeed_Cache::ACTION_PURGE_BY:
@@ -351,8 +358,14 @@ class LiteSpeed_Cache_Router
351
  }
352
  return ;
353
 
 
 
 
 
 
 
354
  case LiteSpeed_Cache::ACTION_DB_OPTIMIZE:
355
- if ( defined( 'LITESPEED_ON' ) && ( $_can_network_option || $_can_option ) ) {
356
  self::$_action = $action ;
357
  }
358
  return ;
@@ -383,10 +396,10 @@ class LiteSpeed_Cache_Router
383
  case LiteSpeed_Cache::ACTION_MEDIA:
384
  case LiteSpeed_Cache::ACTION_IMG_OPTM:
385
  case LiteSpeed_Cache::ACTION_IAPI:
386
- case LiteSpeed_Cache::ACTION_CDN:
 
387
  case LiteSpeed_Cache::ACTION_IMPORT:
388
- case LiteSpeed_Cache::ACTION_QUIC_CLOUD:
389
- if ( defined( 'LITESPEED_ON' ) && $_can_option && ! $_is_network_admin ) {
390
  self::$_action = $action ;
391
  }
392
  return ;
166
  {
167
  if ( ! isset( self::$_can_crawl ) ) {
168
  self::$_can_crawl = false ;
169
+
170
  if ( isset( $_SERVER['X-LSCACHE'] ) && strpos( $_SERVER['X-LSCACHE'], 'crawler' ) !== false ) {
171
  self::$_can_crawl = true ;
172
  }
173
+
174
  // CLI will bypass this check as crawler library can always do the 428 check
175
  if ( defined( 'LITESPEED_CLI' ) ) {
176
  self::$_can_crawl = true ;
177
  }
178
+
179
+ // For non-ls users, they can use crawler
180
+ if ( ! defined( 'LITESPEED_ON' ) ) {
181
+ self::$_can_crawl = true ;
182
+ }
183
  }
184
+
185
  return self::$_can_crawl ;
186
  }
187
 
348
 
349
  case LiteSpeed_Cache::ACTION_PURGE_FRONT:
350
  case LiteSpeed_Cache::ACTION_PURGE_PAGES:
 
351
  case LiteSpeed_Cache::ACTION_PURGE_ERRORS:
352
  case LiteSpeed_Cache::ACTION_PURGE_ALL:
353
  case LiteSpeed_Cache::ACTION_PURGE_BY:
358
  }
359
  return ;
360
 
361
+ case LiteSpeed_Cache::ACTION_PURGE_CSSJS: // will clear non-ls users file-based cache folder too
362
+ if ( $_can_network_option || $_can_option || self::is_ajax() ) {
363
+ self::$_action = $action ;
364
+ }
365
+ return ;
366
+
367
  case LiteSpeed_Cache::ACTION_DB_OPTIMIZE:
368
+ if ( $_can_network_option || $_can_option ) {
369
  self::$_action = $action ;
370
  }
371
  return ;
396
  case LiteSpeed_Cache::ACTION_MEDIA:
397
  case LiteSpeed_Cache::ACTION_IMG_OPTM:
398
  case LiteSpeed_Cache::ACTION_IAPI:
399
+ case LiteSpeed_Cache::ACTION_CDN_CLOUDFLARE:
400
+ case LiteSpeed_Cache::ACTION_CDN_QUICCLOUD:
401
  case LiteSpeed_Cache::ACTION_IMPORT:
402
+ if ( $_can_option && ! $_is_network_admin ) {
 
403
  self::$_action = $action ;
404
  }
405
  return ;
inc/utility.class.php CHANGED
@@ -187,21 +187,6 @@ class LiteSpeed_Cache_Utility
187
  require_once LSCWP_DIR . 'lib/litespeed-php-compatibility.func.php' ;
188
  }
189
 
190
- /**
191
- * Check if the host is the internal host
192
- *
193
- * @since 1.2.3
194
- *
195
- */
196
- public static function internal( $host )
197
- {
198
- if ( ! defined( 'LITESPEED_FRONTEND_HOST' ) ) {
199
- define( 'LITESPEED_FRONTEND_HOST', parse_url( get_option( 'home' ), PHP_URL_HOST ) ) ;
200
- }
201
-
202
- return $host === LITESPEED_FRONTEND_HOST ;
203
- }
204
-
205
  /**
206
  * Convert URI to URL
207
  *
@@ -412,6 +397,27 @@ class LiteSpeed_Cache_Utility
412
  return $url ;
413
  }
414
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
415
  /**
416
  * Check if an URL is a internal existing file
417
  *
187
  require_once LSCWP_DIR . 'lib/litespeed-php-compatibility.func.php' ;
188
  }
189
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  /**
191
  * Convert URI to URL
192
  *
397
  return $url ;
398
  }
399
 
400
+ /**
401
+ * Check if the host is the internal host
402
+ *
403
+ * @since 1.2.3
404
+ *
405
+ */
406
+ public static function internal( $host )
407
+ {
408
+ if ( ! defined( 'LITESPEED_FRONTEND_HOST' ) ) {
409
+ if ( defined( 'WP_HOME' ) ) {
410
+ $home_host = WP_HOME ;// Also think of `WP_SITEURL`
411
+ }
412
+ else {
413
+ $home_host = get_option( 'home' ) ;
414
+ }
415
+ define( 'LITESPEED_FRONTEND_HOST', parse_url( $home_host, PHP_URL_HOST ) ) ;
416
+ }
417
+
418
+ return $host === LITESPEED_FRONTEND_HOST ;
419
+ }
420
+
421
  /**
422
  * Check if an URL is a internal existing file
423
  *
includes/litespeed-cache-activation.class.php CHANGED
@@ -38,7 +38,7 @@ class LiteSpeed_Cache_Activation
38
  }
39
  do_action( 'litespeed_cache_api_load_thirdparty' ) ;
40
  LiteSpeed_Cache_Config::get_instance()->plugin_activation( $count ) ;
41
- LiteSpeed_Cache_Admin_Report::get_instance()->generate_environment_report() ;
42
 
43
  if ( defined( 'LSCWP_PLUGIN_NAME' ) ) {
44
  set_transient( LiteSpeed_Cache::WHM_TRANSIENT, LiteSpeed_Cache::WHM_TRANSIENT_VAL ) ;
38
  }
39
  do_action( 'litespeed_cache_api_load_thirdparty' ) ;
40
  LiteSpeed_Cache_Config::get_instance()->plugin_activation( $count ) ;
41
+ // LiteSpeed_Cache_Admin_Report::get_instance()->generate_environment_report() ;
42
 
43
  if ( defined( 'LSCWP_PLUGIN_NAME' ) ) {
44
  set_transient( LiteSpeed_Cache::WHM_TRANSIENT, LiteSpeed_Cache::WHM_TRANSIENT_VAL ) ;
includes/litespeed-cache-cdn.class.php CHANGED
@@ -16,11 +16,6 @@ class LiteSpeed_Cache_CDN
16
 
17
  const BYPASS = 'LITESPEED_BYPASS_CDN' ;
18
 
19
- const TYPE_CLOUDFLARE_PURGE_ALL = 'cloudflare_purge_all' ;
20
- const TYPE_CLOUDFLARE_GET_DEVMODE = 'cloudflare_get_devmode' ;
21
- const TYPE_CLOUDFLARE_SET_DEVMODE_ON = 'cloudflare_set_devmode_on' ;
22
- const TYPE_CLOUDFLARE_SET_DEVMODE_OFF = 'cloudflare_set_devmode_off' ;
23
-
24
  private $content ;
25
 
26
  private $cfg_cdn ;
@@ -126,6 +121,8 @@ class LiteSpeed_Cache_CDN
126
  LiteSpeed_Cache_Log::debug2( 'CDN: translated rule is ' . $this->cfg_url_ori ) ;
127
  }
128
 
 
 
129
  $this->cfg_cdn_exclude = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_EXCLUDE ) ;
130
  $this->cfg_cdn_exclude = explode( "\n", $this->cfg_cdn_exclude ) ;
131
 
@@ -184,18 +181,6 @@ class LiteSpeed_Cache_CDN
184
  $type = LiteSpeed_Cache_Router::verify_type() ;
185
 
186
  switch ( $type ) {
187
- case self::TYPE_CLOUDFLARE_PURGE_ALL :
188
- $instance->_cloudflare_purge_all() ;
189
- break ;
190
-
191
- case self::TYPE_CLOUDFLARE_GET_DEVMODE :
192
- $instance->_cloudflare_get_devmode() ;
193
- break ;
194
-
195
- case self::TYPE_CLOUDFLARE_SET_DEVMODE_ON :
196
- case self::TYPE_CLOUDFLARE_SET_DEVMODE_OFF :
197
- $instance->_cloudflare_set_devmode( $type ) ;
198
- break ;
199
 
200
  default:
201
  break ;
@@ -225,23 +210,6 @@ class LiteSpeed_Cache_CDN
225
  return false ;
226
  }
227
 
228
- /**
229
- * Check if the host is the CDN internal host
230
- *
231
- * @since 1.2.3
232
- *
233
- */
234
- public static function internal( $host )
235
- {
236
- if ( defined( self::BYPASS ) ) {
237
- return false ;
238
- }
239
-
240
- $instance = self::get_instance() ;
241
-
242
- return in_array( $host, $instance->cdn_mapping_hosts ) ;
243
- }
244
-
245
  /**
246
  * Run CDN process
247
  * NOTE: As this is after cache finalized, can NOT set any cache control anymore
@@ -506,9 +474,11 @@ class LiteSpeed_Cache_CDN
506
  }
507
 
508
  // Check if is external url
509
- if ( ! empty( $url_parsed[ 'host' ] ) && ! LiteSpeed_Cache_Utility::internal( $url_parsed[ 'host' ] ) ) {
510
- LiteSpeed_Cache_Log::debug2( 'CDN: rewriting failed: host not internal' ) ;
511
- return false ;
 
 
512
  }
513
 
514
  if ( $this->cfg_cdn_exclude ) {
@@ -551,11 +521,13 @@ class LiteSpeed_Cache_CDN
551
  }
552
 
553
  // Now lets replace CDN url
554
- if ( strpos( $this->cfg_url_ori, '*' ) !== false ) {
555
- $url = preg_replace( '#' . $scheme . $this->cfg_url_ori . '#iU', $final_url, $url ) ;
556
- }
557
- else {
558
- $url = str_replace( $scheme . $this->cfg_url_ori, $final_url, $url ) ;
 
 
559
  }
560
  LiteSpeed_Cache_Log::debug2( 'CDN: after rewritten: ' . $url ) ;
561
 
@@ -563,248 +535,75 @@ class LiteSpeed_Cache_CDN
563
  }
564
 
565
  /**
566
- * Remote load jQuery remotely
567
- *
568
- * @since 1.5
569
- * @access public
570
- */
571
- public function load_jquery_remotely()
572
- {
573
- // default jq version
574
- $v = '1.12.4' ;
575
-
576
- // load wp's jq version
577
- global $wp_scripts ;
578
- if ( isset( $wp_scripts->registered[ 'jquery' ]->ver ) ) {
579
- $v = $wp_scripts->registered[ 'jquery' ]->ver ;
580
- }
581
-
582
- $src = $this->cfg_cdn_remote_jquery === LiteSpeed_Cache_Config::VAL_ON ? "//ajax.googleapis.com/ajax/libs/jquery/$v/jquery.min.js" : "//cdnjs.cloudflare.com/ajax/libs/jquery/$v/jquery.min.js" ;
583
-
584
- LiteSpeed_Cache_Log::debug2( 'CDN: load_jquery_remotely: ' . $src ) ;
585
-
586
- wp_deregister_script( 'jquery' ) ;
587
-
588
- wp_register_script( 'jquery', $src, false, $v ) ;
589
- }
590
-
591
- /**
592
- * Get Cloudflare development mode
593
  *
594
- * @since 1.7.2
595
  * @access private
596
  */
597
- private function _cloudflare_get_devmode( $show_msg = true )
598
  {
599
- LiteSpeed_Cache_Log::debug( 'CDN: _cloudflare_get_devmode' ) ;
600
-
601
- $zone = $this->_cloudflare_zone() ;
602
- if ( ! $zone ) {
603
- return ;
604
- }
605
-
606
- $url = 'https://api.cloudflare.com/client/v4/zones/' . $zone . '/settings/development_mode' ;
607
- $res = $this->_cloudflare_call( $url, 'GET', false, false, $show_msg ) ;
608
-
609
- if ( ! $res ) {
610
- return ;
611
- }
612
- LiteSpeed_Cache_Log::debug( 'CDN: _cloudflare_get_devmode result ', $res ) ;
613
-
614
- $curr_status = get_option( LiteSpeed_Cache_Config::ITEM_CLOUDFLARE_STATUS, array() ) ;
615
- $curr_status[ 'devmode' ] = $res[ 'value' ] ;
616
- $curr_status[ 'devmode_expired' ] = $res[ 'time_remaining' ] + time() ;
617
-
618
- // update status
619
- update_option( LiteSpeed_Cache_Config::ITEM_CLOUDFLARE_STATUS, $curr_status ) ;
620
-
621
- }
622
-
623
- /**
624
- * Set Cloudflare development mode
625
- *
626
- * @since 1.7.2
627
- * @access private
628
- */
629
- private function _cloudflare_set_devmode( $type )
630
- {
631
- LiteSpeed_Cache_Log::debug( 'CDN: _cloudflare_set_devmode' ) ;
632
-
633
- $zone = $this->_cloudflare_zone() ;
634
- if ( ! $zone ) {
635
- return ;
636
- }
637
-
638
- $url = 'https://api.cloudflare.com/client/v4/zones/' . $zone . '/settings/development_mode' ;
639
- $new_val = $type == self::TYPE_CLOUDFLARE_SET_DEVMODE_ON ? 'on' : 'off' ;
640
- $data = array( 'value' => $new_val ) ;
641
- $res = $this->_cloudflare_call( $url, 'PATCH', $data ) ;
642
-
643
- if ( ! $res ) {
644
- return ;
645
- }
646
-
647
- $res = $this->_cloudflare_get_devmode( false ) ;
648
-
649
- if ( $res ) {
650
- $msg = sprintf( __( 'Notified Cloudflare to set development mode to %s successfully.', 'litespeed-cache' ), strtoupper( $new_val ) ) ;
651
- LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
652
- }
653
-
654
- }
655
-
656
- /**
657
- * Purge Cloudflare cache
658
- *
659
- * @since 1.7.2
660
- * @access private
661
- */
662
- private function _cloudflare_purge_all()
663
- {
664
- LiteSpeed_Cache_Log::debug( 'CDN: _cloudflare_purge_all' ) ;
665
 
666
- $cf_on = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE ) ;
667
- if ( ! $cf_on ) {
668
- $msg = __( 'Cloudflare API is set to off.', 'litespeed-cache' ) ;
669
- LiteSpeed_Cache_Admin_Display::error( $msg ) ;
670
- return ;
671
- }
672
 
673
- $zone = $this->_cloudflare_zone() ;
674
- if ( ! $zone ) {
675
- return ;
 
 
 
 
 
 
 
 
 
676
  }
677
 
678
- $url = 'https://api.cloudflare.com/client/v4/zones/' . $zone . '/purge_cache' ;
679
- $data = array( 'purge_everything' => true ) ;
680
-
681
- $res = $this->_cloudflare_call( $url, 'DELETE', $data ) ;
682
-
683
- if ( $res ) {
684
- $msg = __( 'Notified Cloudflare to purge all successfully.', 'litespeed-cache' ) ;
685
- LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
686
- }
687
  }
688
 
689
  /**
690
- * Get current Cloudflare zone from cfg
691
  *
692
- * @since 1.7.2
693
- * @access private
694
- */
695
- private function _cloudflare_zone()
696
- {
697
- $zone = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_ZONE ) ;
698
- if ( ! $zone ) {
699
- $msg = __( 'No available Cloudflare zone', 'litespeed-cache' ) ;
700
- LiteSpeed_Cache_Admin_Display::error( $msg ) ;
701
- return false ;
702
- }
703
-
704
- return $zone ;
705
- }
706
-
707
- /**
708
- * Get Cloudflare zone settings
709
  *
710
- * @since 1.7.2
711
- * @access public
712
  */
713
- public function cloudflare_fetch_zone( $options )
714
  {
715
- $kw = $options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_NAME ] ;
716
-
717
- $url = 'https://api.cloudflare.com/client/v4/zones?status=active&match=all' ;
718
-
719
- // Try exact match first
720
- if ( $kw && strpos( $kw, '.' ) ) {
721
- $zones = $this->_cloudflare_call( $url . '&name=' . $kw, 'GET', false, $options, false ) ;
722
- if ( $zones ) {
723
- LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone exact matched' ) ;
724
- return $zones[ 0 ] ;
725
- }
726
- }
727
-
728
- // Can't find, try to get default one
729
- $zones = $this->_cloudflare_call( $url, 'GET', false, $options, false ) ;
730
-
731
- if ( ! $zones ) {
732
- LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone no zone' ) ;
733
  return false ;
734
  }
735
 
736
- if ( ! $kw ) {
737
- LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone no set name, use first one by default' ) ;
738
- return $zones[ 0 ] ;
739
- }
740
-
741
- foreach ( $zones as $v ) {
742
- if ( strpos( $v[ 'name' ], $kw ) !== false ) {
743
- LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone matched ' . $kw . ' [name] ' . $v[ 'name' ] ) ;
744
- return $v ;
745
- }
746
- }
747
 
748
- // Can't match current name, return default one
749
- LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone failed match name, use first one by default' ) ;
750
- return $zones[ 0 ] ;
751
  }
752
 
753
  /**
754
- * Cloudflare API
755
  *
756
- * @since 1.7.2
757
- * @access private
758
  */
759
- private function _cloudflare_call( $url, $method = 'GET', $data = false, $token = false, $show_msg = true )
760
  {
761
- LiteSpeed_Cache_Log::debug( "CDN: _cloudflare_call \t\t[URL] $url" ) ;
 
762
 
763
- $header = array(
764
- 'Content-Type: application/json',
765
- ) ;
766
- if ( $token ) {
767
- LiteSpeed_Cache_Log::debug2( 'CDN: _cloudflare_call use param token' ) ;
768
- $header[] = 'X-Auth-Email: ' . $token[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_EMAIL ] ;
769
- $header[] = 'X-Auth-Key: ' . $token[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_KEY ] ;
770
- }
771
- else {
772
- $header[] = 'X-Auth-Email: ' . LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_EMAIL ) ;
773
- $header[] = 'X-Auth-Key: ' . LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_KEY ) ;
774
- }
775
-
776
- $ch = curl_init() ;
777
- curl_setopt( $ch, CURLOPT_URL, $url ) ;
778
- curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, $method ) ;
779
- curl_setopt( $ch, CURLOPT_HTTPHEADER, $header ) ;
780
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ) ;
781
- if ( $data ) {
782
- if ( is_array( $data ) ) {
783
- $data = json_encode( $data ) ;
784
- }
785
- curl_setopt( $ch, CURLOPT_POSTFIELDS, $data ) ;
786
  }
787
- $result = curl_exec( $ch ) ;
788
 
789
- $json = json_decode( $result, true ) ;
790
-
791
- if ( $json && $json[ 'success' ] && $json[ 'result' ] ) {
792
- LiteSpeed_Cache_Log::debug( "CDN: _cloudflare_call called successfully" ) ;
793
- if ( $show_msg ) {
794
- $msg = __( 'Communicated with Cloudflare successfully.', 'litespeed-cache' ) ;
795
- LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
796
- }
797
 
798
- return $json[ 'result' ] ;
799
- }
800
 
801
- LiteSpeed_Cache_Log::debug( "CDN: _cloudflare_call called failed: $result" ) ;
802
- if ( $show_msg ) {
803
- $msg = __( 'Failed to communicate with Cloudflare', 'litespeed-cache' ) ;
804
- LiteSpeed_Cache_Admin_Display::error( $msg ) ;
805
- }
806
 
807
- return false ;
808
  }
809
 
810
  /**
@@ -816,7 +615,7 @@ class LiteSpeed_Cache_CDN
816
  */
817
  public static function get_instance()
818
  {
819
- if ( ! isset(self::$_instance) ) {
820
  self::$_instance = new self() ;
821
  }
822
 
@@ -824,6 +623,3 @@ class LiteSpeed_Cache_CDN
824
  }
825
 
826
  }
827
-
828
-
829
-
16
 
17
  const BYPASS = 'LITESPEED_BYPASS_CDN' ;
18
 
 
 
 
 
 
19
  private $content ;
20
 
21
  private $cfg_cdn ;
121
  LiteSpeed_Cache_Log::debug2( 'CDN: translated rule is ' . $this->cfg_url_ori ) ;
122
  }
123
 
124
+ $this->cfg_url_ori = explode( ',', $this->cfg_url_ori ) ;
125
+
126
  $this->cfg_cdn_exclude = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CDN_EXCLUDE ) ;
127
  $this->cfg_cdn_exclude = explode( "\n", $this->cfg_cdn_exclude ) ;
128
 
181
  $type = LiteSpeed_Cache_Router::verify_type() ;
182
 
183
  switch ( $type ) {
 
 
 
 
 
 
 
 
 
 
 
 
184
 
185
  default:
186
  break ;
210
  return false ;
211
  }
212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  /**
214
  * Run CDN process
215
  * NOTE: As this is after cache finalized, can NOT set any cache control anymore
474
  }
475
 
476
  // Check if is external url
477
+ if ( ! empty( $url_parsed[ 'host' ] ) ) {
478
+ if ( ! LiteSpeed_Cache_Utility::internal( $url_parsed[ 'host' ] ) && ! $this->_is_ori_url( $url ) ) {
479
+ LiteSpeed_Cache_Log::debug2( 'CDN: rewriting failed: host not internal' ) ;
480
+ return false ;
481
+ }
482
  }
483
 
484
  if ( $this->cfg_cdn_exclude ) {
521
  }
522
 
523
  // Now lets replace CDN url
524
+ foreach ( $this->cfg_url_ori as $v ) {
525
+ if ( strpos( $v, '*' ) !== false ) {
526
+ $url = preg_replace( '#' . $scheme . $v . '#iU', $final_url, $url ) ;
527
+ }
528
+ else {
529
+ $url = str_replace( $scheme . $v, $final_url, $url ) ;
530
+ }
531
  }
532
  LiteSpeed_Cache_Log::debug2( 'CDN: after rewritten: ' . $url ) ;
533
 
535
  }
536
 
537
  /**
538
+ * Check if is orignal URL of CDN or not
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
539
  *
540
+ * @since 2.1
541
  * @access private
542
  */
543
+ private function _is_ori_url( $url )
544
  {
545
+ $url_parsed = parse_url( $url ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
546
 
547
+ $scheme = ! empty( $url_parsed[ 'scheme' ] ) ? $url_parsed[ 'scheme' ] . ':' : '' ;
 
 
 
 
 
548
 
549
+ foreach ( $this->cfg_url_ori as $v ) {
550
+ $needle = $scheme . $v ;
551
+ if ( strpos( $v, '*' ) !== false ) {
552
+ if( preg_match( '#' . $needle . '#iU', $url ) ) {
553
+ return true ;
554
+ }
555
+ }
556
+ else {
557
+ if ( strpos( $url, $needle ) === 0 ) {
558
+ return true ;
559
+ }
560
+ }
561
  }
562
 
563
+ return false ;
 
 
 
 
 
 
 
 
564
  }
565
 
566
  /**
567
+ * Check if the host is the CDN internal host
568
  *
569
+ * @since 1.2.3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
570
  *
 
 
571
  */
572
+ public static function internal( $host )
573
  {
574
+ if ( defined( self::BYPASS ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
575
  return false ;
576
  }
577
 
578
+ $instance = self::get_instance() ;
 
 
 
 
 
 
 
 
 
 
579
 
580
+ return in_array( $host, $instance->cdn_mapping_hosts ) ;// todo: can add $this->_is_ori_url() check in future
 
 
581
  }
582
 
583
  /**
584
+ * Remote load jQuery remotely
585
  *
586
+ * @since 1.5
587
+ * @access public
588
  */
589
+ public function load_jquery_remotely()
590
  {
591
+ // default jq version
592
+ $v = '1.12.4' ;
593
 
594
+ // load wp's jq version
595
+ global $wp_scripts ;
596
+ if ( isset( $wp_scripts->registered[ 'jquery' ]->ver ) ) {
597
+ $v = $wp_scripts->registered[ 'jquery' ]->ver ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
598
  }
 
599
 
600
+ $src = $this->cfg_cdn_remote_jquery === LiteSpeed_Cache_Config::VAL_ON ? "//ajax.googleapis.com/ajax/libs/jquery/$v/jquery.min.js" : "//cdnjs.cloudflare.com/ajax/libs/jquery/$v/jquery.min.js" ;
 
 
 
 
 
 
 
601
 
602
+ LiteSpeed_Cache_Log::debug2( 'CDN: load_jquery_remotely: ' . $src ) ;
 
603
 
604
+ wp_deregister_script( 'jquery' ) ;
 
 
 
 
605
 
606
+ wp_register_script( 'jquery', $src, false, $v ) ;
607
  }
608
 
609
  /**
615
  */
616
  public static function get_instance()
617
  {
618
+ if ( ! isset( self::$_instance ) ) {
619
  self::$_instance = new self() ;
620
  }
621
 
623
  }
624
 
625
  }
 
 
 
includes/litespeed-cache-config.class.php CHANGED
@@ -229,6 +229,9 @@ class LiteSpeed_Cache_Config
229
  }
230
  else {
231
  $options = get_option( self::OPTION_NAME, $this->get_default_options() ) ;
 
 
 
232
  }
233
 
234
  $this->options = $options ;
@@ -238,12 +241,7 @@ class LiteSpeed_Cache_Config
238
  if ( $this->options[ self::OPID_ENABLED_RADIO ] === self::VAL_ON
239
  // || ( is_multisite() && is_network_admin() && current_user_can( 'manage_network_options' ) && $this->options[ LiteSpeed_Cache_Config::NETWORK_OPID_ENABLED ] ) todo: need to check when primary is off and network is on, if can manage
240
  ) {
241
- defined( 'LITESPEED_ALLOWED' ) && ! defined( 'LITESPEED_ON' ) && define( 'LITESPEED_ON', true ) ;
242
- }
243
-
244
- // Check advanced_cache set
245
- if ( isset( $this->options[ self::OPID_CHECK_ADVANCEDCACHE ] ) && $this->options[ self::OPID_CHECK_ADVANCEDCACHE ] === false && ! defined( 'LSCACHE_ADV_CACHE' ) ) {
246
- define( 'LSCACHE_ADV_CACHE', true ) ;
247
  }
248
 
249
  // Vary group settings
@@ -262,6 +260,35 @@ class LiteSpeed_Cache_Config
262
 
263
  }
264
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  /**
266
  * For multisite installations, the single site options need to be updated with the network wide options.
267
  *
@@ -273,6 +300,8 @@ class LiteSpeed_Cache_Config
273
  {
274
  $site_options = get_site_option( self::OPTION_NAME ) ;
275
 
 
 
276
  $options = get_option( self::OPTION_NAME, $this->get_default_options() ) ;
277
 
278
  /**
@@ -287,7 +316,7 @@ class LiteSpeed_Cache_Config
287
  // If don't have site options
288
  if ( ! $site_options || ! is_array( $site_options ) || ! is_plugin_active_for_network( 'litespeed-cache/litespeed-cache.php' ) ) {
289
  if ( $options[ self::OPID_ENABLED_RADIO ] === self::VAL_ON2 ) { // Default to cache on
290
- defined( 'LITESPEED_ALLOWED' ) && ! defined( 'LITESPEED_ON' ) && define( 'LITESPEED_ON', true ) ;
291
  }
292
  return $options ;
293
  }
@@ -307,7 +336,7 @@ class LiteSpeed_Cache_Config
307
 
308
  // If use network setting
309
  if ( $options[ self::OPID_ENABLED_RADIO ] === self::VAL_ON2 && $site_options[ self::NETWORK_OPID_ENABLED ] ) {
310
- defined( 'LITESPEED_ALLOWED' ) && ! defined( 'LITESPEED_ON' ) && define( 'LITESPEED_ON', true ) ;
311
  }
312
  // Set network eanble to on
313
  if ( $site_options[ self::NETWORK_OPID_ENABLED ] ) {
229
  }
230
  else {
231
  $options = get_option( self::OPTION_NAME, $this->get_default_options() ) ;
232
+
233
+ // Check advanced_cache set
234
+ $this->_check_adv_cache( $options ) ;
235
  }
236
 
237
  $this->options = $options ;
241
  if ( $this->options[ self::OPID_ENABLED_RADIO ] === self::VAL_ON
242
  // || ( is_multisite() && is_network_admin() && current_user_can( 'manage_network_options' ) && $this->options[ LiteSpeed_Cache_Config::NETWORK_OPID_ENABLED ] ) todo: need to check when primary is off and network is on, if can manage
243
  ) {
244
+ $this->_define_cache_on() ;
 
 
 
 
 
245
  }
246
 
247
  // Vary group settings
260
 
261
  }
262
 
263
+ /**
264
+ * Define `LSCACHE_ADV_CACHE` based on options setting
265
+ *
266
+ * NOTE: this must be before `LITESPEED_ON` defination
267
+ *
268
+ * @since 2.1
269
+ * @access private
270
+ */
271
+ private function _check_adv_cache( $options )
272
+ {
273
+ if ( isset( $options[ self::OPID_CHECK_ADVANCEDCACHE ] ) && $options[ self::OPID_CHECK_ADVANCEDCACHE ] === false && ! defined( 'LSCACHE_ADV_CACHE' ) ) {
274
+ define( 'LSCACHE_ADV_CACHE', true ) ;
275
+ }
276
+ }
277
+
278
+ /**
279
+ * Define `LITESPEED_ON`
280
+ *
281
+ * @since 2.1
282
+ * @access private
283
+ */
284
+ private function _define_cache_on()
285
+ {
286
+ defined( 'LITESPEED_ALLOWED' ) && defined( 'LSCACHE_ADV_CACHE' ) && ! defined( 'LITESPEED_ON' ) && define( 'LITESPEED_ON', true ) ;
287
+
288
+ // Use this for cache enabled setting check
289
+ ! defined( 'LITESPEED_ON_IN_SETTING' ) && define( 'LITESPEED_ON_IN_SETTING', true ) ;
290
+ }
291
+
292
  /**
293
  * For multisite installations, the single site options need to be updated with the network wide options.
294
  *
300
  {
301
  $site_options = get_site_option( self::OPTION_NAME ) ;
302
 
303
+ $this->_check_adv_cache( $site_options ) ;
304
+
305
  $options = get_option( self::OPTION_NAME, $this->get_default_options() ) ;
306
 
307
  /**
316
  // If don't have site options
317
  if ( ! $site_options || ! is_array( $site_options ) || ! is_plugin_active_for_network( 'litespeed-cache/litespeed-cache.php' ) ) {
318
  if ( $options[ self::OPID_ENABLED_RADIO ] === self::VAL_ON2 ) { // Default to cache on
319
+ $this->_define_cache_on() ;
320
  }
321
  return $options ;
322
  }
336
 
337
  // If use network setting
338
  if ( $options[ self::OPID_ENABLED_RADIO ] === self::VAL_ON2 && $site_options[ self::NETWORK_OPID_ENABLED ] ) {
339
+ $this->_define_cache_on() ;
340
  }
341
  // Set network eanble to on
342
  if ( $site_options[ self::NETWORK_OPID_ENABLED ] ) {
includes/litespeed-cache-gui.class.php CHANGED
@@ -95,6 +95,12 @@ class LiteSpeed_Cache_GUI
95
 
96
  }
97
 
 
 
 
 
 
 
98
  public static function dismiss()
99
  {
100
  switch ( LiteSpeed_Cache_Router::verify_type() ) {
@@ -107,7 +113,20 @@ class LiteSpeed_Cache_GUI
107
  break ;
108
 
109
  case self::TYPE_DISMISS_PROMO :
110
- update_option( 'litespeed-banner-promo', ! empty( $_GET[ 'done' ] ) ? 'done' : time() ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  break ;
112
 
113
  default:
@@ -142,6 +161,42 @@ class LiteSpeed_Cache_GUI
142
  return get_transient( LiteSpeed_Cache::WHM_TRANSIENT ) == LiteSpeed_Cache::WHM_TRANSIENT_VAL ;
143
  }
144
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  /**
146
  * Check if has promotion notice
147
  *
@@ -149,11 +204,22 @@ class LiteSpeed_Cache_GUI
149
  * @access public
150
  * @return boolean
151
  */
152
- public static function has_promo_msg()
153
  {
154
- $promo = get_option( 'litespeed-banner-promo' ) ;
 
 
 
 
 
 
 
 
 
 
 
155
  if ( ! $promo ) {
156
- update_option( 'litespeed-banner-promo', time() - 86400 * 8 ) ;
157
  return false ;
158
  }
159
  if ( $promo == 'done' ) {
@@ -162,6 +228,7 @@ class LiteSpeed_Cache_GUI
162
  if ( $promo && time() - $promo < 864000 ) {
163
  return false ;
164
  }
 
165
  return true ;
166
  }
167
 
@@ -260,12 +327,21 @@ class LiteSpeed_Cache_GUI
260
  {
261
  global $wp_admin_bar ;
262
 
263
- $wp_admin_bar->add_menu( array(
264
- 'id' => 'litespeed-menu',
265
- 'title' => '<span class="ab-icon" title="' . __( 'LiteSpeed Cache Purge All', 'litespeed-cache' ) . '""></span>',
266
- 'href' => LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_PURGE_ALL ),
267
- 'meta' => array( 'tabindex' => 0, 'class' => 'litespeed-top-toolbar' ),
268
- ) ) ;
 
 
 
 
 
 
 
 
 
269
 
270
  $wp_admin_bar->add_menu( array(
271
  'parent' => 'litespeed-menu',
@@ -306,7 +382,7 @@ class LiteSpeed_Cache_GUI
306
  'parent' => 'litespeed-menu',
307
  'id' => 'litespeed-purge-cloudflare',
308
  'title' => __( 'Cloudflare Purge All', 'litespeed-cache' ),
309
- 'href' => LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_CDN, LiteSpeed_Cache_CDN::TYPE_CLOUDFLARE_PURGE_ALL ),
310
  'meta' => array( 'tabindex' => '0' ),
311
  ) );
312
  }
95
 
96
  }
97
 
98
+ /**
99
+ * Dismiss banner
100
+ *
101
+ * @since 1.0
102
+ * @access public
103
+ */
104
  public static function dismiss()
105
  {
106
  switch ( LiteSpeed_Cache_Router::verify_type() ) {
113
  break ;
114
 
115
  case self::TYPE_DISMISS_PROMO :
116
+
117
+ if ( ! empty( $_GET[ 'slack' ] ) ) {
118
+ // Update slack
119
+ update_option( 'litespeed-banner-promo-slack', 'done' ) ;
120
+
121
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Dismiss promo slack' ) ;
122
+ }
123
+ else {
124
+ // Update welcome banner
125
+ update_option( 'litespeed-banner-promo', ! empty( $_GET[ 'done' ] ) ? 'done' : time() ) ;
126
+
127
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Dismiss promo welcome' ) ;
128
+ }
129
+
130
  break ;
131
 
132
  default:
161
  return get_transient( LiteSpeed_Cache::WHM_TRANSIENT ) == LiteSpeed_Cache::WHM_TRANSIENT_VAL ;
162
  }
163
 
164
+ /**
165
+ * Display promo banner
166
+ *
167
+ * @since 2.1
168
+ * @access public
169
+ */
170
+ public static function show_promo()
171
+ {
172
+ include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
173
+ include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.slack.php" ;
174
+ }
175
+
176
+ /**
177
+ * Detect if need to display promo banner or not
178
+ *
179
+ * @since 2.1
180
+ * @access public
181
+ */
182
+ public static function should_show_promo( $banner = false )
183
+ {
184
+ // Only show one promo at one time
185
+ if ( defined( 'LITESPEED_PROMO_SHOWN' ) ) {
186
+ return false ;
187
+ }
188
+
189
+ if ( ! self::has_promo_msg( $banner ) ) {
190
+ return false ;
191
+ }
192
+
193
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( '[GUI] Show promo ' . $banner ) ;
194
+
195
+ ! defined( 'LITESPEED_PROMO_SHOWN' ) && define( 'LITESPEED_PROMO_SHOWN', true ) ;
196
+
197
+ return true ;
198
+ }
199
+
200
  /**
201
  * Check if has promotion notice
202
  *
204
  * @access public
205
  * @return boolean
206
  */
207
+ public static function has_promo_msg( $banner = false )
208
  {
209
+ // How many days delayed to show the banner
210
+ $delay_days = 2 ;
211
+ if ( $banner == 'slack' ) {
212
+ $delay_days = 3 ;
213
+ }
214
+
215
+ $option_name = 'litespeed-banner-promo' ;
216
+ if ( $banner ) {
217
+ $option_name .= '-' . $banner ;
218
+ }
219
+
220
+ $promo = get_option( $option_name ) ;
221
  if ( ! $promo ) {
222
+ update_option( $option_name, time() - 86400 * ( 10 - $delay_days ) ) ;
223
  return false ;
224
  }
225
  if ( $promo == 'done' ) {
228
  if ( $promo && time() - $promo < 864000 ) {
229
  return false ;
230
  }
231
+
232
  return true ;
233
  }
234
 
327
  {
328
  global $wp_admin_bar ;
329
 
330
+ if ( defined( 'LITESPEED_ON' ) ) {
331
+ $wp_admin_bar->add_menu( array(
332
+ 'id' => 'litespeed-menu',
333
+ 'title' => '<span class="ab-icon" title="' . __( 'LiteSpeed Cache Purge All', 'litespeed-cache' ) . '""></span>',
334
+ 'href' => LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_PURGE_ALL ),
335
+ 'meta' => array( 'tabindex' => 0, 'class' => 'litespeed-top-toolbar' ),
336
+ ) ) ;
337
+ }
338
+ else {
339
+ $wp_admin_bar->add_menu( array(
340
+ 'id' => 'litespeed-menu',
341
+ 'title' => '<span class="ab-icon" title="' . __( 'LiteSpeed Cache', 'litespeed-cache' ) . '""></span>',
342
+ 'meta' => array( 'tabindex' => 0, 'class' => 'litespeed-top-toolbar' ),
343
+ ) ) ;
344
+ }
345
 
346
  $wp_admin_bar->add_menu( array(
347
  'parent' => 'litespeed-menu',
382
  'parent' => 'litespeed-menu',
383
  'id' => 'litespeed-purge-cloudflare',
384
  'title' => __( 'Cloudflare Purge All', 'litespeed-cache' ),
385
+ 'href' => LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_CDN_CLOUDFLARE, LiteSpeed_Cache_CDN_Cloudflare::TYPE_PURGE_ALL ),
386
  'meta' => array( 'tabindex' => '0' ),
387
  ) );
388
  }
includes/litespeed-cache-log.class.php CHANGED
@@ -313,7 +313,7 @@ class LiteSpeed_Cache_Log
313
  $params[] = 'Cookie _lscache_vary: ' . $_COOKIE[ '_lscache_vary' ] ;
314
  }
315
  if ( defined( 'LSCWP_LOG_MORE' ) ) {
316
- $params[] = 'X-LSCACHE: ' . ( $server[ 'X-LSCACHE' ] ? 'true' : 'false' ) ;
317
  }
318
  if( $server['LSCACHE_VARY_COOKIE'] ) {
319
  $params[] = 'LSCACHE_VARY_COOKIE: ' . $server['LSCACHE_VARY_COOKIE'] ;
313
  $params[] = 'Cookie _lscache_vary: ' . $_COOKIE[ '_lscache_vary' ] ;
314
  }
315
  if ( defined( 'LSCWP_LOG_MORE' ) ) {
316
+ $params[] = 'X-LSCACHE: ' . ( ! empty( $server[ 'X-LSCACHE' ] ) ? 'true' : 'false' ) ;
317
  }
318
  if( $server['LSCACHE_VARY_COOKIE'] ) {
319
  $params[] = 'LSCACHE_VARY_COOKIE: ' . $server['LSCACHE_VARY_COOKIE'] ;
includes/litespeed-cache-optimize.class.php CHANGED
@@ -218,6 +218,38 @@ class LiteSpeed_Cache_Optimize
218
  define( 'LITESPEED_MIN_FILE', true ) ;
219
 
220
  $file_type = substr( $match[ 1 ], strrpos( $match[ 1 ], '.' ) + 1 ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  $concat_only = ! ( $file_type === 'css' ? $this->cfg_css_minify : $this->cfg_js_minify ) ;
222
 
223
  $content = LiteSpeed_Cache_Optimizer::get_instance()->serve( $match[ 1 ], $concat_only ) ;
@@ -227,16 +259,40 @@ class LiteSpeed_Cache_Optimize
227
  exit ;
228
  }
229
 
 
 
 
 
 
 
 
230
  LiteSpeed_Cache_Control::set_cacheable() ;
231
  LiteSpeed_Cache_Control::set_public_forced( 'OPTM: min file ' . $match[ 1 ] ) ;
232
  LiteSpeed_Cache_Control::set_no_vary() ;
233
- LiteSpeed_Cache_Control::set_custom_ttl( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_OPTIMIZE_TTL ) ) ;
234
  LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_MIN ) ;
235
 
236
  echo $content ;
237
  exit ;
238
  }
239
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
  /**
241
  * Remove QS
242
  *
218
  define( 'LITESPEED_MIN_FILE', true ) ;
219
 
220
  $file_type = substr( $match[ 1 ], strrpos( $match[ 1 ], '.' ) + 1 ) ;
221
+
222
+ $ttl = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_OPTIMIZE_TTL ) ;
223
+
224
+ // Load file from file based cache if not enabled lscache
225
+ if ( ! defined( 'LITESPEED_ON' ) ) {
226
+ LiteSpeed_Cache_Log::debug( '[Optimize] Not enabled lscache, using file based cache' ) ;
227
+
228
+ $static_file = LSCWP_CONTENT_DIR . '/cache/' . $file_type . '/' . $match[ 1 ] ;
229
+ if ( file_exists( $static_file ) && time() - filemtime( $static_file ) <= $ttl ) {
230
+ $content = Litespeed_File::read( $static_file ) ;
231
+
232
+ // Output header first
233
+ $headers = array() ;
234
+ $headers[ 'Content-Length' ] = strlen( $content ) ;
235
+
236
+ if ( $file_type === 'css' ) {
237
+ $headers[ 'Content-Type' ] = 'text/css; charset=utf-8' ;
238
+ }
239
+ else {
240
+ $headers[ 'Content-Type' ] = 'application/x-javascript' ;
241
+ }
242
+
243
+ foreach ( $headers as $k => $v ) {
244
+ header( $k . ': ' . $v ) ;
245
+ LiteSpeed_Cache_Log::debug( '[Optimize] HEADER ' . $k . ': ' . $v ) ;
246
+ }
247
+
248
+ echo $content ;
249
+ exit ;
250
+ }
251
+ }
252
+
253
  $concat_only = ! ( $file_type === 'css' ? $this->cfg_css_minify : $this->cfg_js_minify ) ;
254
 
255
  $content = LiteSpeed_Cache_Optimizer::get_instance()->serve( $match[ 1 ], $concat_only ) ;
259
  exit ;
260
  }
261
 
262
+ // Save to file if not enabled lscache
263
+ if ( ! defined( 'LITESPEED_ON' ) ) {
264
+ LiteSpeed_Cache_Log::debug( '[Optimize] Saved cache to file [path] ' . $static_file ) ;
265
+
266
+ Litespeed_File::save( $static_file, $content, true ) ;
267
+ }
268
+
269
  LiteSpeed_Cache_Control::set_cacheable() ;
270
  LiteSpeed_Cache_Control::set_public_forced( 'OPTM: min file ' . $match[ 1 ] ) ;
271
  LiteSpeed_Cache_Control::set_no_vary() ;
272
+ LiteSpeed_Cache_Control::set_custom_ttl( $ttl ) ;
273
  LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_MIN ) ;
274
 
275
  echo $content ;
276
  exit ;
277
  }
278
 
279
+ /**
280
+ * Delete file-based cache folder
281
+ *
282
+ * @since 2.1
283
+ * @access public
284
+ */
285
+ public function rm_cache_folder()
286
+ {
287
+ if ( file_exists( LSCWP_CONTENT_DIR . '/cache/css' ) ) {
288
+ Litespeed_File::rrmdir( LSCWP_CONTENT_DIR . '/cache/css' ) ;
289
+ }
290
+
291
+ if ( file_exists( LSCWP_CONTENT_DIR . '/cache/js' ) ) {
292
+ Litespeed_File::rrmdir( LSCWP_CONTENT_DIR . '/cache/js' ) ;
293
+ }
294
+ }
295
+
296
  /**
297
  * Remove QS
298
  *
includes/litespeed-cache-purge.class.php CHANGED
@@ -244,6 +244,9 @@ class LiteSpeed_Cache_Purge
244
  public static function purge_cssjs()
245
  {
246
  self::add( LiteSpeed_Cache_Tag::TYPE_MIN ) ;
 
 
 
247
  }
248
 
249
  /**
244
  public static function purge_cssjs()
245
  {
246
  self::add( LiteSpeed_Cache_Tag::TYPE_MIN ) ;
247
+
248
+ // For non-ls users
249
+ LiteSpeed_Cache_Optimize::get_instance()->rm_cache_folder() ;
250
  }
251
 
252
  /**
includes/litespeed-cache-router.class.php CHANGED
@@ -166,14 +166,22 @@ class LiteSpeed_Cache_Router
166
  {
167
  if ( ! isset( self::$_can_crawl ) ) {
168
  self::$_can_crawl = false ;
 
169
  if ( isset( $_SERVER['X-LSCACHE'] ) && strpos( $_SERVER['X-LSCACHE'], 'crawler' ) !== false ) {
170
  self::$_can_crawl = true ;
171
  }
 
172
  // CLI will bypass this check as crawler library can always do the 428 check
173
  if ( defined( 'LITESPEED_CLI' ) ) {
174
  self::$_can_crawl = true ;
175
  }
 
 
 
 
 
176
  }
 
177
  return self::$_can_crawl ;
178
  }
179
 
@@ -340,7 +348,6 @@ class LiteSpeed_Cache_Router
340
 
341
  case LiteSpeed_Cache::ACTION_PURGE_FRONT:
342
  case LiteSpeed_Cache::ACTION_PURGE_PAGES:
343
- case LiteSpeed_Cache::ACTION_PURGE_CSSJS:
344
  case LiteSpeed_Cache::ACTION_PURGE_ERRORS:
345
  case LiteSpeed_Cache::ACTION_PURGE_ALL:
346
  case LiteSpeed_Cache::ACTION_PURGE_BY:
@@ -351,8 +358,14 @@ class LiteSpeed_Cache_Router
351
  }
352
  return ;
353
 
 
 
 
 
 
 
354
  case LiteSpeed_Cache::ACTION_DB_OPTIMIZE:
355
- if ( defined( 'LITESPEED_ON' ) && ( $_can_network_option || $_can_option ) ) {
356
  self::$_action = $action ;
357
  }
358
  return ;
@@ -383,10 +396,10 @@ class LiteSpeed_Cache_Router
383
  case LiteSpeed_Cache::ACTION_MEDIA:
384
  case LiteSpeed_Cache::ACTION_IMG_OPTM:
385
  case LiteSpeed_Cache::ACTION_IAPI:
386
- case LiteSpeed_Cache::ACTION_CDN:
 
387
  case LiteSpeed_Cache::ACTION_IMPORT:
388
- case LiteSpeed_Cache::ACTION_QUIC_CLOUD:
389
- if ( defined( 'LITESPEED_ON' ) && $_can_option && ! $_is_network_admin ) {
390
  self::$_action = $action ;
391
  }
392
  return ;
166
  {
167
  if ( ! isset( self::$_can_crawl ) ) {
168
  self::$_can_crawl = false ;
169
+
170
  if ( isset( $_SERVER['X-LSCACHE'] ) && strpos( $_SERVER['X-LSCACHE'], 'crawler' ) !== false ) {
171
  self::$_can_crawl = true ;
172
  }
173
+
174
  // CLI will bypass this check as crawler library can always do the 428 check
175
  if ( defined( 'LITESPEED_CLI' ) ) {
176
  self::$_can_crawl = true ;
177
  }
178
+
179
+ // For non-ls users, they can use crawler
180
+ if ( ! defined( 'LITESPEED_ON' ) ) {
181
+ self::$_can_crawl = true ;
182
+ }
183
  }
184
+
185
  return self::$_can_crawl ;
186
  }
187
 
348
 
349
  case LiteSpeed_Cache::ACTION_PURGE_FRONT:
350
  case LiteSpeed_Cache::ACTION_PURGE_PAGES:
 
351
  case LiteSpeed_Cache::ACTION_PURGE_ERRORS:
352
  case LiteSpeed_Cache::ACTION_PURGE_ALL:
353
  case LiteSpeed_Cache::ACTION_PURGE_BY:
358
  }
359
  return ;
360
 
361
+ case LiteSpeed_Cache::ACTION_PURGE_CSSJS: // will clear non-ls users file-based cache folder too
362
+ if ( $_can_network_option || $_can_option || self::is_ajax() ) {
363
+ self::$_action = $action ;
364
+ }
365
+ return ;
366
+
367
  case LiteSpeed_Cache::ACTION_DB_OPTIMIZE:
368
+ if ( $_can_network_option || $_can_option ) {
369
  self::$_action = $action ;
370
  }
371
  return ;
396
  case LiteSpeed_Cache::ACTION_MEDIA:
397
  case LiteSpeed_Cache::ACTION_IMG_OPTM:
398
  case LiteSpeed_Cache::ACTION_IAPI:
399
+ case LiteSpeed_Cache::ACTION_CDN_CLOUDFLARE:
400
+ case LiteSpeed_Cache::ACTION_CDN_QUICCLOUD:
401
  case LiteSpeed_Cache::ACTION_IMPORT:
402
+ if ( $_can_option && ! $_is_network_admin ) {
 
403
  self::$_action = $action ;
404
  }
405
  return ;
includes/litespeed-cache-utility.class.php CHANGED
@@ -187,21 +187,6 @@ class LiteSpeed_Cache_Utility
187
  require_once LSCWP_DIR . 'lib/litespeed-php-compatibility.func.php' ;
188
  }
189
 
190
- /**
191
- * Check if the host is the internal host
192
- *
193
- * @since 1.2.3
194
- *
195
- */
196
- public static function internal( $host )
197
- {
198
- if ( ! defined( 'LITESPEED_FRONTEND_HOST' ) ) {
199
- define( 'LITESPEED_FRONTEND_HOST', parse_url( get_option( 'home' ), PHP_URL_HOST ) ) ;
200
- }
201
-
202
- return $host === LITESPEED_FRONTEND_HOST ;
203
- }
204
-
205
  /**
206
  * Convert URI to URL
207
  *
@@ -412,6 +397,27 @@ class LiteSpeed_Cache_Utility
412
  return $url ;
413
  }
414
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
415
  /**
416
  * Check if an URL is a internal existing file
417
  *
187
  require_once LSCWP_DIR . 'lib/litespeed-php-compatibility.func.php' ;
188
  }
189
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  /**
191
  * Convert URI to URL
192
  *
397
  return $url ;
398
  }
399
 
400
+ /**
401
+ * Check if the host is the internal host
402
+ *
403
+ * @since 1.2.3
404
+ *
405
+ */
406
+ public static function internal( $host )
407
+ {
408
+ if ( ! defined( 'LITESPEED_FRONTEND_HOST' ) ) {
409
+ if ( defined( 'WP_HOME' ) ) {
410
+ $home_host = WP_HOME ;// Also think of `WP_SITEURL`
411
+ }
412
+ else {
413
+ $home_host = get_option( 'home' ) ;
414
+ }
415
+ define( 'LITESPEED_FRONTEND_HOST', parse_url( $home_host, PHP_URL_HOST ) ) ;
416
+ }
417
+
418
+ return $host === LITESPEED_FRONTEND_HOST ;
419
+ }
420
+
421
  /**
422
  * Check if an URL is a internal existing file
423
  *
includes/litespeed-cache.class.php CHANGED
@@ -19,7 +19,7 @@ class LiteSpeed_Cache
19
  private static $_instance ;
20
 
21
  const PLUGIN_NAME = 'litespeed-cache' ;
22
- const PLUGIN_VERSION = '2.0' ;
23
 
24
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
 
@@ -47,7 +47,8 @@ class LiteSpeed_Cache
47
  const ACTION_CRAWLER_CRON_ENABLE = 'crawler-cron-enable' ;
48
  const ACTION_DO_CRAWL = 'do-crawl' ;
49
  const ACTION_BLACKLIST_SAVE = 'blacklist-save' ;
50
- const ACTION_QUIC_CLOUD = 'quic_cloud' ;
 
51
 
52
  const ACTION_FRONT_PURGE = 'front-purge' ;
53
  const ACTION_FRONT_EXCLUDE = 'front-exclude' ;
@@ -86,13 +87,14 @@ class LiteSpeed_Cache
86
  private function __construct()
87
  {
88
  LiteSpeed_Cache_Config::get_instance() ;
 
89
  // Check if debug is on
90
- if ( defined( 'LITESPEED_ON' ) ) {
91
- $should_debug = intval(self::config(LiteSpeed_Cache_Config::OPID_DEBUG)) ;
92
- if ( $should_debug == LiteSpeed_Cache_Config::VAL_ON || ($should_debug == LiteSpeed_Cache_Config::VAL_ON2 && LiteSpeed_Cache_Router::is_admin_ip()) ) {
93
- LiteSpeed_Cache_Log::init() ;
94
- }
95
 
 
96
  // Load third party detection if lscache enabled.
97
  include_once LSCWP_DIR . 'thirdparty/lscwp-registry-3rd.php' ;
98
  }
@@ -108,9 +110,9 @@ class LiteSpeed_Cache
108
  // NOTE: this can't be moved under after_setup_theme, otherwise activation will be bypassed somehow
109
  if( is_admin() || defined( 'LITESPEED_CLI' ) ) {
110
  $plugin_file = LSCWP_DIR . 'litespeed-cache.php' ;
111
- register_activation_hook($plugin_file, array('LiteSpeed_Cache_Activation', 'register_activation' )) ;
112
- register_deactivation_hook($plugin_file, array('LiteSpeed_Cache_Activation', 'register_deactivation' )) ;
113
- register_uninstall_hook($plugin_file, 'LiteSpeed_Cache_Activation::uninstall_litespeed_cache') ;
114
  }
115
 
116
  add_action( 'after_setup_theme', array( $this, 'init' ) ) ;
@@ -163,12 +165,12 @@ class LiteSpeed_Cache
163
  LiteSpeed_Cache_Admin::get_instance() ;
164
  }
165
 
166
- if ( ! defined( 'LITESPEED_ON' ) || ! defined( 'LSCACHE_ADV_CACHE' ) || ! LSCACHE_ADV_CACHE ) {
167
- return ;
168
- }
169
-
170
  LiteSpeed_Cache_Router::get_instance()->is_crawler_role_simulation() ;
171
 
 
 
 
 
172
  ob_start( array( $this, 'send_headers_force' ) ) ;
173
  add_action( 'shutdown', array( $this, 'send_headers' ), 0 ) ;
174
  add_action( 'wp_footer', 'LiteSpeed_Cache::footer_hook' ) ;
@@ -342,10 +344,6 @@ class LiteSpeed_Cache
342
  $msg = LiteSpeed_Cache_Admin_API::handler() ;
343
  break ;
344
 
345
- case LiteSpeed_Cache::ACTION_CDN:
346
- $msg = LiteSpeed_Cache_CDN::handler() ;
347
- break ;
348
-
349
  case LiteSpeed_Cache::ACTION_LOG:
350
  $msg = LiteSpeed_Cache_Log::handler() ;
351
  break ;
@@ -358,8 +356,12 @@ class LiteSpeed_Cache
358
  $msg = LiteSpeed_Cache_Import::handler() ;
359
  break ;
360
 
361
- case LiteSpeed_Cache::ACTION_QUIC_CLOUD:
362
- $msg = LiteSpeed_Cache_QUIC_CLOUD::handler() ;
 
 
 
 
363
  break ;
364
 
365
  default:
@@ -587,17 +589,23 @@ class LiteSpeed_Cache
587
  if ( ! defined( 'LSCACHE_IS_ESI' ) ) {
588
  $this->footer_comment .= "\n" ;
589
  }
 
 
 
 
 
 
590
  $this->footer_comment .= sprintf(
591
  '<!-- %1$s %2$s by LiteSpeed Cache %4$s on %3$s -->',
592
  defined( 'LSCACHE_IS_ESI' ) ? 'Block' : 'Page',
593
- LiteSpeed_Cache_Control::is_cacheable() ? 'generated' : 'uncached',
594
  date( 'Y-m-d H:i:s', time() + LITESPEED_TIME_OFFSET ),
595
  self::PLUGIN_VERSION
596
  ) ;
597
  }
598
 
599
  // send Control header
600
- if ( $control_header ) {
601
  @header( $control_header ) ;
602
  if ( defined( 'LSCWP_LOG' ) ) {
603
  LiteSpeed_Cache_Log::debug( $control_header ) ;
@@ -606,7 +614,7 @@ class LiteSpeed_Cache
606
  }
607
  }
608
  }
609
- // send PURGE header
610
  if ( $purge_header ) {
611
  @header( $purge_header ) ;
612
  if ( defined( 'LSCWP_LOG' ) ) {
@@ -617,7 +625,7 @@ class LiteSpeed_Cache
617
  }
618
  }
619
  // send Vary header
620
- if ( $vary_header ) {
621
  @header( $vary_header ) ;
622
  if ( defined( 'LSCWP_LOG' ) ) {
623
  LiteSpeed_Cache_Log::debug( $vary_header ) ;
@@ -647,7 +655,7 @@ class LiteSpeed_Cache
647
  }
648
  else {
649
  // Control header
650
- if ( LiteSpeed_Cache_Control::is_cacheable() && $tag_header ) {
651
  @header( $tag_header ) ;
652
  if ( defined( 'LSCWP_LOG' ) ) {
653
  LiteSpeed_Cache_Log::debug( $tag_header ) ;
19
  private static $_instance ;
20
 
21
  const PLUGIN_NAME = 'litespeed-cache' ;
22
+ const PLUGIN_VERSION = '2.1' ;
23
 
24
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
 
47
  const ACTION_CRAWLER_CRON_ENABLE = 'crawler-cron-enable' ;
48
  const ACTION_DO_CRAWL = 'do-crawl' ;
49
  const ACTION_BLACKLIST_SAVE = 'blacklist-save' ;
50
+ const ACTION_CDN_CLOUDFLARE = 'cdn_cloudflare' ;
51
+ const ACTION_CDN_QUICCLOUD = 'cdn_quiccloud' ;
52
 
53
  const ACTION_FRONT_PURGE = 'front-purge' ;
54
  const ACTION_FRONT_EXCLUDE = 'front-exclude' ;
87
  private function __construct()
88
  {
89
  LiteSpeed_Cache_Config::get_instance() ;
90
+
91
  // Check if debug is on
92
+ $should_debug = intval( self::config( LiteSpeed_Cache_Config::OPID_DEBUG ) ) ;
93
+ if ( $should_debug == LiteSpeed_Cache_Config::VAL_ON || ( $should_debug == LiteSpeed_Cache_Config::VAL_ON2 && LiteSpeed_Cache_Router::is_admin_ip() ) ) {
94
+ LiteSpeed_Cache_Log::init() ;
95
+ }
 
96
 
97
+ if ( defined( 'LITESPEED_ON' ) ) {
98
  // Load third party detection if lscache enabled.
99
  include_once LSCWP_DIR . 'thirdparty/lscwp-registry-3rd.php' ;
100
  }
110
  // NOTE: this can't be moved under after_setup_theme, otherwise activation will be bypassed somehow
111
  if( is_admin() || defined( 'LITESPEED_CLI' ) ) {
112
  $plugin_file = LSCWP_DIR . 'litespeed-cache.php' ;
113
+ register_activation_hook( $plugin_file, array( 'LiteSpeed_Cache_Activation', 'register_activation' ) ) ;
114
+ register_deactivation_hook( $plugin_file, array('LiteSpeed_Cache_Activation', 'register_deactivation' ) ) ;
115
+ register_uninstall_hook( $plugin_file, 'LiteSpeed_Cache_Activation::uninstall_litespeed_cache' ) ;
116
  }
117
 
118
  add_action( 'after_setup_theme', array( $this, 'init' ) ) ;
165
  LiteSpeed_Cache_Admin::get_instance() ;
166
  }
167
 
 
 
 
 
168
  LiteSpeed_Cache_Router::get_instance()->is_crawler_role_simulation() ;
169
 
170
+ // if ( ! defined( 'LITESPEED_ON' ) || ! defined( 'LSCACHE_ADV_CACHE' ) || ! LSCACHE_ADV_CACHE ) {
171
+ // return ;
172
+ // }
173
+
174
  ob_start( array( $this, 'send_headers_force' ) ) ;
175
  add_action( 'shutdown', array( $this, 'send_headers' ), 0 ) ;
176
  add_action( 'wp_footer', 'LiteSpeed_Cache::footer_hook' ) ;
344
  $msg = LiteSpeed_Cache_Admin_API::handler() ;
345
  break ;
346
 
 
 
 
 
347
  case LiteSpeed_Cache::ACTION_LOG:
348
  $msg = LiteSpeed_Cache_Log::handler() ;
349
  break ;
356
  $msg = LiteSpeed_Cache_Import::handler() ;
357
  break ;
358
 
359
+ case LiteSpeed_Cache::ACTION_CDN_CLOUDFLARE:
360
+ $msg = LiteSpeed_Cache_CDN_Cloudflare::handler() ;
361
+ break ;
362
+
363
+ case LiteSpeed_Cache::ACTION_CDN_QUICCLOUD:
364
+ $msg = LiteSpeed_Cache_CDN_Quiccloud::handler() ;
365
  break ;
366
 
367
  default:
589
  if ( ! defined( 'LSCACHE_IS_ESI' ) ) {
590
  $this->footer_comment .= "\n" ;
591
  }
592
+
593
+ $cache_support = 'supported' ;
594
+ if ( defined( 'LITESPEED_ON' ) ) {
595
+ $cache_support = LiteSpeed_Cache_Control::is_cacheable() ? 'generated' : 'uncached' ;
596
+ }
597
+
598
  $this->footer_comment .= sprintf(
599
  '<!-- %1$s %2$s by LiteSpeed Cache %4$s on %3$s -->',
600
  defined( 'LSCACHE_IS_ESI' ) ? 'Block' : 'Page',
601
+ $cache_support,
602
  date( 'Y-m-d H:i:s', time() + LITESPEED_TIME_OFFSET ),
603
  self::PLUGIN_VERSION
604
  ) ;
605
  }
606
 
607
  // send Control header
608
+ if ( defined( 'LITESPEED_ON_IN_SETTING' ) && $control_header ) {
609
  @header( $control_header ) ;
610
  if ( defined( 'LSCWP_LOG' ) ) {
611
  LiteSpeed_Cache_Log::debug( $control_header ) ;
614
  }
615
  }
616
  }
617
+ // send PURGE header (Always send regardless of cache setting disabled/enabled)
618
  if ( $purge_header ) {
619
  @header( $purge_header ) ;
620
  if ( defined( 'LSCWP_LOG' ) ) {
625
  }
626
  }
627
  // send Vary header
628
+ if ( defined( 'LITESPEED_ON_IN_SETTING' ) && $vary_header ) {
629
  @header( $vary_header ) ;
630
  if ( defined( 'LSCWP_LOG' ) ) {
631
  LiteSpeed_Cache_Log::debug( $vary_header ) ;
655
  }
656
  else {
657
  // Control header
658
+ if ( defined( 'LITESPEED_ON_IN_SETTING' ) && LiteSpeed_Cache_Control::is_cacheable() && $tag_header ) {
659
  @header( $tag_header ) ;
660
  if ( defined( 'LSCWP_LOG' ) ) {
661
  LiteSpeed_Cache_Log::debug( $tag_header ) ;
includes/litespeed.autoload.php CHANGED
@@ -26,6 +26,8 @@ if ( !function_exists('_litespeed_autoload') ) {
26
  'LiteSpeed_Cache_Activation' => 'inc/activation.class.php',
27
  'LiteSpeed_Cache_API' => 'inc/api.class.php',
28
  'LiteSpeed_Cache_CDN' => 'inc/cdn.class.php',
 
 
29
  'LiteSpeed_Cache_Config' => 'inc/config.class.php',
30
  'LiteSpeed_Cache_Control' => 'inc/control.class.php',
31
  'LiteSpeed_Cache_Crawler' => 'inc/crawler.class.php',
@@ -40,7 +42,6 @@ if ( !function_exists('_litespeed_autoload') ) {
40
  'LiteSpeed_Cache_Object' => 'inc/object.class.php',
41
  'LiteSpeed_Cache_Optimize' => 'inc/optimize.class.php',
42
  'LiteSpeed_Cache_Optimizer' => 'inc/optimizer.class.php',
43
- 'LiteSpeed_Cache_QUIC_CLOUD' => 'inc/quic_cloud.class.php',
44
  'LiteSpeed_Cache_Purge' => 'inc/purge.class.php',
45
  'LiteSpeed_Cache_Router' => 'inc/router.class.php',
46
  'LiteSpeed_Cache_Tag' => 'inc/tag.class.php',
26
  'LiteSpeed_Cache_Activation' => 'inc/activation.class.php',
27
  'LiteSpeed_Cache_API' => 'inc/api.class.php',
28
  'LiteSpeed_Cache_CDN' => 'inc/cdn.class.php',
29
+ 'LiteSpeed_Cache_CDN_Cloudflare' => 'inc/cdn/cloudflare.class.php',
30
+ 'LiteSpeed_Cache_CDN_Quiccloud' => 'inc/cdn/quiccloud.class.php',
31
  'LiteSpeed_Cache_Config' => 'inc/config.class.php',
32
  'LiteSpeed_Cache_Control' => 'inc/control.class.php',
33
  'LiteSpeed_Cache_Crawler' => 'inc/crawler.class.php',
42
  'LiteSpeed_Cache_Object' => 'inc/object.class.php',
43
  'LiteSpeed_Cache_Optimize' => 'inc/optimize.class.php',
44
  'LiteSpeed_Cache_Optimizer' => 'inc/optimizer.class.php',
 
45
  'LiteSpeed_Cache_Purge' => 'inc/purge.class.php',
46
  'LiteSpeed_Cache_Router' => 'inc/router.class.php',
47
  'LiteSpeed_Cache_Tag' => 'inc/tag.class.php',
js/litespeed-cache-admin.js CHANGED
@@ -154,6 +154,10 @@ var _litespeed_dots ;
154
  $( '.litespeed-banner-promo' ).slideUp() ;
155
  $.get( litespeed_data.ajax_url_promo + '&later=1' ) ;
156
  } ) ;
 
 
 
 
157
 
158
  /** CDN mapping **/
159
  $( '#litespeed-cdn-mapping-add' ).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 **/
163
  $( '#litespeed-cdn-mapping-add' ).click(function(event) {
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.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
- "POT-Creation-Date: 2018-03-07 18:04:04+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -20,60 +20,60 @@ msgstr ""
20
  msgid "Reset IAPI key successfully."
21
  msgstr ""
22
 
23
- #: admin/admin-api.class.php:314
24
  msgid "Failed to communicate with LiteSpeed image server"
25
  msgstr ""
26
 
27
- #: admin/admin-api.class.php:322 admin/admin-api.class.php:330
28
  msgid "Message from LiteSpeed image server"
29
  msgstr ""
30
 
31
- #: admin/litespeed-cache-admin-display.class.php:152
32
- #: admin/tpl/setting/settings_cdn.php:203
33
- #: admin/tpl/setting/settings_cdn.php:246 inc/gui.class.php:273
34
- #: includes/litespeed-cache-gui.class.php:273
35
  msgid "Manage"
36
  msgstr ""
37
 
38
- #: admin/litespeed-cache-admin-display.class.php:154
39
- #: admin/litespeed-cache-admin-display.class.php:243 inc/gui.class.php:281
40
- #: includes/litespeed-cache-gui.class.php:281
41
  msgid "Settings"
42
  msgstr ""
43
 
44
- #: admin/litespeed-cache-admin-display.class.php:157
45
  msgid "Edit .htaccess"
46
  msgstr ""
47
 
48
- #: admin/litespeed-cache-admin-display.class.php:161 inc/gui.class.php:290
49
- #: includes/litespeed-cache-gui.class.php:290
50
  msgid "Image Optimization"
51
  msgstr ""
52
 
53
- #: admin/litespeed-cache-admin-display.class.php:162 admin/tpl/settings.php:24
54
  msgid "Crawler"
55
  msgstr ""
56
 
57
- #: admin/litespeed-cache-admin-display.class.php:163
58
  msgid "Report"
59
  msgstr ""
60
 
61
- #: admin/litespeed-cache-admin-display.class.php:164
62
  msgid "Import / Export"
63
  msgstr ""
64
 
65
- #: admin/litespeed-cache-admin-display.class.php:167
66
  #: admin/tpl/setting/settings_debug.php:13
67
  msgid "Debug Log"
68
  msgstr ""
69
 
70
- #: admin/litespeed-cache-admin-display.class.php:263
71
  msgid ""
72
  "It is recommended that LiteSpeed Cache be purged after updating a plugin."
73
  msgstr ""
74
 
75
- #: admin/litespeed-cache-admin-display.class.php:805
76
- #: admin/litespeed-cache-admin-display.class.php:890
77
  #: admin/tpl/setting/settings_inc.cache_mobile.php:67
78
  #: admin/tpl/setting/settings_media.php:73
79
  #: admin/tpl/setting/settings_optimize.php:160
@@ -82,19 +82,19 @@ msgstr ""
82
  msgid "ON"
83
  msgstr ""
84
 
85
- #: admin/litespeed-cache-admin-display.class.php:806
86
- #: admin/litespeed-cache-admin-display.class.php:894
87
  #: admin/tpl/setting/settings_inc.cache_object.php:149
88
  #: admin/tpl/setting/settings_tuning.php:18
89
  #: admin/tpl/setting/settings_tuning.php:54
90
  msgid "OFF"
91
  msgstr ""
92
 
93
- #: admin/litespeed-cache-admin-display.class.php:920
94
  msgid "Recommended value: %s"
95
  msgstr ""
96
 
97
- #: admin/litespeed-cache-admin-display.class.php:936
98
  #: admin/tpl/setting/settings_media.php:36
99
  #: admin/tpl/setting/settings_optimize.php:137
100
  #: admin/tpl/setting/settings_tuning.php:24
@@ -105,18 +105,18 @@ msgstr ""
105
  msgid "API"
106
  msgstr ""
107
 
108
- #: admin/litespeed-cache-admin-display.class.php:937
109
  msgid "Server variable(s) %s available to override this setting."
110
  msgstr ""
111
 
112
- #: admin/litespeed-cache-admin-display.class.php:939
113
- #: admin/tpl/image_optimization.php:154 admin/tpl/image_optimization.php:211
114
  #: admin/tpl/manage/manage_cdn.php:60
115
  #: admin/tpl/setting/settings_advanced.php:10
116
  #: admin/tpl/setting/settings_advanced.php:36
117
  #: admin/tpl/setting/settings_advanced.php:48
118
  #: admin/tpl/setting/settings_cache.php:7
119
- #: admin/tpl/setting/settings_cache.php:84
120
  #: admin/tpl/setting/settings_cdn.php:25
121
  #: admin/tpl/setting/settings_crawler.php:8
122
  #: admin/tpl/setting/settings_debug.php:8 admin/tpl/setting/settings_esi.php:8
@@ -133,235 +133,215 @@ msgstr ""
133
  msgid "Learn More"
134
  msgstr ""
135
 
136
- #: admin/litespeed-cache-admin-display.class.php:954
137
  msgid "%s groups"
138
  msgstr ""
139
 
140
- #: admin/litespeed-cache-admin-display.class.php:957
141
  msgid "%s images"
142
  msgstr ""
143
 
144
- #: admin/litespeed-cache-admin-display.class.php:967
145
  msgid "%s group"
146
  msgstr ""
147
 
148
- #: admin/litespeed-cache-admin-display.class.php:970
149
  msgid "%s image"
150
  msgstr ""
151
 
152
- #: admin/litespeed-cache-admin-error.class.php:87
153
  msgid "The installed PHP version is too old for the LiteSpeed Cache Plugin."
154
  msgstr ""
155
 
156
- #: admin/litespeed-cache-admin-error.class.php:89
157
  msgid "The LiteSpeed Cache Plugin requires at least PHP %s."
158
  msgstr ""
159
 
160
- #: admin/litespeed-cache-admin-error.class.php:91
161
  msgid ""
162
  "The currently installed version is PHP %s, which is out-dated and insecure."
163
  msgstr ""
164
 
165
- #: admin/litespeed-cache-admin-error.class.php:93
166
- #: admin/litespeed-cache-admin-error.class.php:102
167
  msgid ""
168
  "Please upgrade or go to <a href=\"%s\">active plugins</a> and deactivate the "
169
  "LiteSpeed Cache plugin to hide this message."
170
  msgstr ""
171
 
172
- #: admin/litespeed-cache-admin-error.class.php:98
173
  msgid ""
174
  "The installed WordPress version is too old for the LiteSpeed Cache Plugin."
175
  msgstr ""
176
 
177
- #: admin/litespeed-cache-admin-error.class.php:100
178
  msgid "The LiteSpeed Cache Plugin requires at least WordPress %s."
179
  msgstr ""
180
 
181
- #: admin/litespeed-cache-admin-error.class.php:107
182
  msgid "Something went wrong with the form! Please try again."
183
  msgstr ""
184
 
185
- #: admin/litespeed-cache-admin-error.class.php:110
186
  msgid "Tried to purge list with empty list."
187
  msgstr ""
188
 
189
- #: admin/litespeed-cache-admin-error.class.php:113
190
  msgid "Bad Purge By selected value."
191
  msgstr ""
192
 
193
- #: admin/litespeed-cache-admin-error.class.php:116
194
  msgid "Failed to purge by category, invalid category slug."
195
  msgstr ""
196
 
197
- #: admin/litespeed-cache-admin-error.class.php:119
198
  msgid "Failed to purge by tag, invalid tag slug."
199
  msgstr ""
200
 
201
- #: admin/litespeed-cache-admin-error.class.php:122
202
  msgid "Failed to purge by url, contained \"<\"."
203
  msgstr ""
204
 
205
- #: admin/litespeed-cache-admin-error.class.php:126
206
  msgid "Failed to purge by Post ID, given ID is not numeric: %s"
207
  msgstr ""
208
 
209
- #: admin/litespeed-cache-admin-error.class.php:129
210
  msgid ""
211
  "Failed to purge by Post ID, given ID does not exist or is not published: %s"
212
  msgstr ""
213
 
214
- #: admin/litespeed-cache-admin-error.class.php:133
215
  msgid "Failed to purge by url, invalid input: %s."
216
  msgstr ""
217
 
218
- #: admin/litespeed-cache-admin-error.class.php:136
219
  msgid "Failed to purge by category, does not exist: %s"
220
  msgstr ""
221
 
222
- #: admin/litespeed-cache-admin-error.class.php:139
223
  msgid "Failed to purge by tag, does not exist: %s"
224
  msgstr ""
225
 
226
- #: admin/litespeed-cache-admin-error.class.php:143
227
  msgid "Invalid data in Admin IPs."
228
  msgstr ""
229
 
230
- #: admin/litespeed-cache-admin-error.class.php:146
231
  msgid "Invalid data in Test IPs."
232
  msgstr ""
233
 
234
- #: admin/litespeed-cache-admin-error.class.php:149
235
  msgid "Invalid Site IP: %s"
236
  msgstr ""
237
 
238
- #: admin/litespeed-cache-admin-error.class.php:152
239
  msgid "Can not fetch Custom Sitemap: %s"
240
  msgstr ""
241
 
242
- #: admin/litespeed-cache-admin-error.class.php:155
243
  msgid "Can not parse custom sitemap xml file: %s."
244
  msgstr ""
245
 
246
- #: admin/litespeed-cache-admin-error.class.php:156
247
  msgid ""
248
  "Please make sure the file is xml format and the %s extension is installed on "
249
  "the server."
250
  msgstr ""
251
 
252
- #: admin/litespeed-cache-admin-error.class.php:161
253
- msgid "%1$s must be an integer between %2$d and %3$d"
254
- msgstr ""
255
-
256
- #: admin/litespeed-cache-admin-error.class.php:166
257
  msgid "Removed category \"%s\" from list, ID does not exist."
258
  msgstr ""
259
 
260
- #: admin/litespeed-cache-admin-error.class.php:171
261
  msgid "Removed tag \"%s\" from list, ID does not exist."
262
  msgstr ""
263
 
264
- #: admin/litespeed-cache-admin-error.class.php:175
265
  msgid "Invalid login cookie. Invalid characters found: %s"
266
  msgstr ""
267
 
268
- #: admin/litespeed-cache-admin-error.class.php:179
269
  msgid "Invalid Rewrite List."
270
  msgstr ""
271
 
272
- #: admin/litespeed-cache-admin-error.class.php:180
273
  msgid "Empty or invalid rule."
274
  msgstr ""
275
 
276
- #: admin/litespeed-cache-admin-error.class.php:181
277
  msgid "Rule: %1$s, list: %2$s"
278
  msgstr ""
279
 
280
- #: admin/litespeed-cache-admin-error.class.php:185
281
  msgid "Tried to parse for existing login cookie."
282
  msgstr ""
283
 
284
- #: admin/litespeed-cache-admin-error.class.php:186
285
  msgid "%s file not valid. Please verify contents."
286
  msgstr ""
287
 
288
- #: admin/litespeed-cache-admin-error.class.php:190
289
  msgid "Could not find %s."
290
  msgstr ""
291
 
292
- #: admin/litespeed-cache-admin-error.class.php:194
293
  msgid "This site is a subdirectory install."
294
  msgstr ""
295
 
296
- #: admin/litespeed-cache-admin-error.class.php:195
297
  msgid "Login cookies do not match."
298
  msgstr ""
299
 
300
- #: admin/litespeed-cache-admin-error.class.php:196
301
  msgid ""
302
  "Please remove both and set the login cookie in LiteSpeed Cache advanced "
303
  "settings."
304
  msgstr ""
305
 
306
- #: admin/litespeed-cache-admin-error.class.php:200
307
- msgid ""
308
- "Notice: This plugin requires a LiteSpeed Server with the LSCache Module "
309
- "enabled."
310
- msgstr ""
311
-
312
- #: admin/litespeed-cache-admin-error.class.php:201
313
- msgid ""
314
- "If you are unable to change your server stack, please contact your hosting "
315
- "provider to request the required changes."
316
- msgstr ""
317
-
318
- #: admin/litespeed-cache-admin-error.class.php:202
319
- msgid "This plugin will NOT work properly."
320
- msgstr ""
321
-
322
- #: admin/litespeed-cache-admin-error.class.php:205
323
- #: admin/litespeed-cache-admin-error.class.php:243
324
  msgid "LiteSpeed Cache was unable to write to the wp-config.php file."
325
  msgstr ""
326
 
327
- #: admin/litespeed-cache-admin-error.class.php:206
328
- #: admin/litespeed-cache-admin-error.class.php:244
329
  msgid "Please add the following to the wp-config.php file: %s"
330
  msgstr ""
331
 
332
- #: admin/litespeed-cache-admin-error.class.php:210
333
  msgid "Failed to back up file, aborted changes."
334
  msgstr ""
335
 
336
- #: admin/litespeed-cache-admin-error.class.php:213
337
  msgid "Failed to put contents into %s"
338
  msgstr ""
339
 
340
- #: admin/litespeed-cache-admin-error.class.php:216
341
  msgid "Failed to get %s file contents."
342
  msgstr ""
343
 
344
- #: admin/litespeed-cache-admin-error.class.php:219
345
  msgid "%s file not readable or not writable."
346
  msgstr ""
347
 
348
- #: admin/litespeed-cache-admin-error.class.php:222
349
  msgid "%s file not readable."
350
  msgstr ""
351
 
352
- #: admin/litespeed-cache-admin-error.class.php:225
353
  msgid "%s file not writable."
354
  msgstr ""
355
 
356
- #: admin/litespeed-cache-admin-error.class.php:228
357
  msgid "Failed to overwrite %s."
358
  msgstr ""
359
 
360
- #: admin/litespeed-cache-admin-error.class.php:232
361
  msgid "The %1$s file not writable for %2$s"
362
  msgstr ""
363
 
364
- #: admin/litespeed-cache-admin-error.class.php:236
365
  msgid "%s file did not find a place to insert define."
366
  msgstr ""
367
 
@@ -423,55 +403,63 @@ msgstr ""
423
  msgid "File Saved."
424
  msgstr ""
425
 
426
- #: admin/litespeed-cache-admin-settings.class.php:50
 
 
 
 
 
 
 
 
427
  msgid "'Use primary site settings' set by Network Administrator."
428
  msgstr ""
429
 
430
- #: admin/litespeed-cache-admin-settings.class.php:236
431
  msgid "Site options saved."
432
  msgstr ""
433
 
434
- #: admin/litespeed-cache-admin-settings.class.php:342
435
- #: admin/litespeed-cache-admin-settings.class.php:994
436
  msgid "Default Public Cache"
437
  msgstr ""
438
 
439
- #: admin/litespeed-cache-admin-settings.class.php:343
440
  msgid "Default Private Cache"
441
  msgstr ""
442
 
443
- #: admin/litespeed-cache-admin-settings.class.php:344
444
  msgid "Default Front Page"
445
  msgstr ""
446
 
447
- #: admin/litespeed-cache-admin-settings.class.php:345
448
  msgid "Feed"
449
  msgstr ""
450
 
451
- #: admin/litespeed-cache-admin-settings.class.php:844
452
  #: admin/tpl/setting/settings_debug.php:78
453
  msgid "Log File Size Limit"
454
  msgstr ""
455
 
456
- #: admin/litespeed-cache-admin-settings.class.php:917
457
  #: admin/tpl/setting/settings_crawler.php:13
458
  msgid "Delay"
459
  msgstr ""
460
 
461
- #: admin/litespeed-cache-admin-settings.class.php:918
462
  #: admin/tpl/setting/settings_crawler.php:37
463
  msgid "Run Duration"
464
  msgstr ""
465
 
466
- #: admin/litespeed-cache-admin-settings.class.php:919
467
  msgid "Cron Interval"
468
  msgstr ""
469
 
470
- #: admin/litespeed-cache-admin-settings.class.php:920
471
  msgid "Whole Interval"
472
  msgstr ""
473
 
474
- #: admin/litespeed-cache-admin-settings.class.php:921
475
  #: admin/tpl/setting/settings_crawler.php:73
476
  msgid "Threads"
477
  msgstr ""
@@ -504,177 +492,178 @@ msgstr ""
504
  msgid "LiteSpeed Cache Crawler"
505
  msgstr ""
506
 
507
- #: admin/tpl/crawler.php:39
508
  msgid "Crawler File"
509
  msgstr ""
510
 
511
- #: admin/tpl/crawler.php:41
512
  msgid "Generate Crawler File"
513
  msgstr ""
514
 
515
- #: admin/tpl/crawler.php:46
516
  msgid "Generated at %s"
517
  msgstr ""
518
 
519
- #: admin/tpl/crawler.php:50
520
  msgid ""
521
  "On click, this will create a crawler sitemap file in plugin directory %s."
522
  msgstr ""
523
 
524
- #: admin/tpl/crawler.php:60
525
  msgid "%d hours"
526
  msgstr ""
527
 
528
- #: admin/tpl/crawler.php:63
529
  msgid "%d hour"
530
  msgstr ""
531
 
532
- #: admin/tpl/crawler.php:70
533
  msgid "%d minutes"
534
  msgstr ""
535
 
536
- #: admin/tpl/crawler.php:73
537
  msgid "%d minute"
538
  msgstr ""
539
 
540
- #: admin/tpl/crawler.php:79
541
  msgid "Crawler Cron"
542
  msgstr ""
543
 
544
- #: admin/tpl/crawler.php:87 admin/tpl/setting/settings_general.php:34
545
  msgid "Enable"
546
  msgstr ""
547
 
548
- #: admin/tpl/crawler.php:87 admin/tpl/esi_widget_edit.php:56
549
- #: admin/tpl/setting/settings_general.php:28
550
  msgid "Disable"
551
  msgstr ""
552
 
553
- #: admin/tpl/crawler.php:94 admin/tpl/manage/manage_cdn.php:15
554
- #: admin/tpl/setting/settings_optimize.php:13 admin/tpl/settings.php:165
 
555
  msgid "WARNING"
556
  msgstr ""
557
 
558
- #: admin/tpl/crawler.php:95
559
  msgid ""
560
  "The crawler feature is not enabled on the LiteSpeed server. Please consult "
561
  "your server admin."
562
  msgstr ""
563
 
564
- #: admin/tpl/crawler.php:96
565
  msgid ""
566
  "See <a %s>Introduction for Enabling the Crawler</a> for detailed infomation."
567
  msgstr ""
568
 
569
- #: admin/tpl/crawler.php:103
570
  msgid "Current sitemap crawl started at"
571
  msgstr ""
572
 
573
- #: admin/tpl/crawler.php:109
574
  msgid "The next complete sitemap crawl will start at"
575
  msgstr ""
576
 
577
- #: admin/tpl/crawler.php:117
578
  msgid "Last complete run time for all crawlers"
579
  msgstr ""
580
 
581
- #: admin/tpl/crawler.php:118 admin/tpl/crawler.php:125
582
  msgid "%d seconds"
583
  msgstr ""
584
 
585
- #: admin/tpl/crawler.php:124
586
  msgid "Run time for previous crawler"
587
  msgstr ""
588
 
589
- #: admin/tpl/crawler.php:131
590
  msgid "Current crawler started at"
591
  msgstr ""
592
 
593
- #: admin/tpl/crawler.php:138
594
  msgid "Last interval"
595
  msgstr ""
596
 
597
- #: admin/tpl/crawler.php:145
598
  msgid "Ended reason"
599
  msgstr ""
600
 
601
- #: admin/tpl/crawler.php:152
602
  msgid "<b>Last crawled:</b> %s item(s)"
603
  msgstr ""
604
 
605
- #: admin/tpl/crawler.php:156
606
  msgid "Reset position"
607
  msgstr ""
608
 
609
- #: admin/tpl/crawler.php:159
610
  msgid "Manually run"
611
  msgstr ""
612
 
613
- #: admin/tpl/crawler.php:166
614
  msgid "Cron Name"
615
  msgstr ""
616
 
617
- #: admin/tpl/crawler.php:167
618
  msgid "Run Frequency"
619
  msgstr ""
620
 
621
- #: admin/tpl/crawler.php:168
622
  msgid "Size"
623
  msgstr ""
624
 
625
- #: admin/tpl/crawler.php:169 admin/tpl/setting/settings_inc.cache_object.php:70
626
  msgid "Status"
627
  msgstr ""
628
 
629
- #: admin/tpl/crawler.php:195
630
  msgid "running"
631
  msgstr ""
632
 
633
- #: admin/tpl/crawler.php:205
634
  msgid "Run frequency is set by the Interval Between Runs setting."
635
  msgstr ""
636
 
637
- #: admin/tpl/crawler.php:206
638
  msgid "Only one crawler can run concurrently."
639
  msgstr ""
640
 
641
- #: admin/tpl/crawler.php:207
642
  msgid ""
643
  "If both the cron and manual run start at a similar time, the first one to "
644
  "start will run."
645
  msgstr ""
646
 
647
- #: admin/tpl/crawler.php:208
648
  msgid ""
649
  "Please follow <a %s>Hooking WP-Cron Into the System Task Scheduler</a> to "
650
  "create the system cron task."
651
  msgstr ""
652
 
653
- #: admin/tpl/crawler.php:213
654
  msgid "Watch Crawler Status"
655
  msgstr ""
656
 
657
- #: admin/tpl/crawler.php:220
658
  msgid "Show crawler status"
659
  msgstr ""
660
 
661
- #: admin/tpl/crawler.php:238
662
  msgid "No crawler meta file generated yet"
663
  msgstr ""
664
 
665
- #: admin/tpl/crawler.php:243
666
  msgid "Sitemap Generation Blacklist"
667
  msgstr ""
668
 
669
- #: admin/tpl/crawler.php:252 admin/tpl/edit_htaccess.php:69
670
  msgid "Save"
671
  msgstr ""
672
 
673
- #: admin/tpl/crawler.php:256
674
  msgid "Current blacklist has %s item(s)."
675
  msgstr ""
676
 
677
- #: admin/tpl/crawler.php:257
678
  msgid ""
679
  "All Urls which returned no-cache tags will be added here, after the initial "
680
  "crawling."
@@ -722,7 +711,7 @@ msgid ""
722
  "changed."
723
  msgstr ""
724
 
725
- #: admin/tpl/esi_widget_edit.php:30 admin/tpl/setting/settings_esi.php:36
726
  msgid "Enable ESI"
727
  msgstr ""
728
 
@@ -741,13 +730,13 @@ msgstr ""
741
  #: admin/tpl/esi_widget_edit.php:69 admin/tpl/setting/settings_crawler.php:40
742
  #: admin/tpl/setting/settings_crawler.php:52
743
  #: admin/tpl/setting/settings_crawler.php:64
744
- #: admin/tpl/setting/settings_general.php:63
745
- #: admin/tpl/setting/settings_general.php:75
746
- #: admin/tpl/setting/settings_general.php:87
747
- #: admin/tpl/setting/settings_general.php:99
748
- #: admin/tpl/setting/settings_general.php:112
749
- #: admin/tpl/setting/settings_general.php:125
750
- #: admin/tpl/setting/settings_general.php:138
751
  #: admin/tpl/setting/settings_inc.cache_browser.php:24
752
  #: admin/tpl/setting/settings_inc.cache_object.php:63
753
  #: admin/tpl/setting/settings_optimize.php:111
@@ -802,13 +791,13 @@ msgstr ""
802
  msgid "Click the %s button."
803
  msgstr ""
804
 
805
- #: admin/tpl/image_optimization.php:52 admin/tpl/image_optimization.php:116
806
- #: admin/tpl/image_optimization.php:152
807
  msgid "Update Status"
808
  msgstr ""
809
 
810
- #: admin/tpl/image_optimization.php:53 admin/tpl/image_optimization.php:149
811
- #: admin/tpl/image_optimization.php:157
812
  msgid "Send Optimization Request"
813
  msgstr ""
814
 
@@ -816,7 +805,7 @@ msgstr ""
816
  msgid "Click the %s button or wait for the cron job to finish the pull action."
817
  msgstr ""
818
 
819
- #: admin/tpl/image_optimization.php:54 admin/tpl/image_optimization.php:194
820
  msgid "Pull Images"
821
  msgstr ""
822
 
@@ -828,164 +817,160 @@ msgstr ""
828
  msgid "LiteSpeed Cache Image Optimization"
829
  msgstr ""
830
 
831
- #: admin/tpl/image_optimization.php:83
832
  msgid "How to Level Up"
833
  msgstr ""
834
 
835
- #: admin/tpl/image_optimization.php:86
836
  msgid "Optimization Summary"
837
  msgstr ""
838
 
839
- #: admin/tpl/image_optimization.php:119
840
  msgid ""
841
  "This will communicate with LiteSpeed's Image Optimization Server and "
842
  "retrieve the most recent status."
843
  msgstr ""
844
 
845
- #: admin/tpl/image_optimization.php:124
846
  msgid "Image Information"
847
  msgstr ""
848
 
849
- #: admin/tpl/image_optimization.php:125
850
- msgid "Beta Version"
851
- msgstr ""
852
-
853
- #: admin/tpl/image_optimization.php:135
854
  msgid "Images total"
855
  msgstr ""
856
 
857
- #: admin/tpl/image_optimization.php:137
858
  msgid "What is a group?"
859
  msgstr ""
860
 
861
- #: admin/tpl/image_optimization.php:140
862
  msgid "Images not yet requested"
863
  msgstr ""
864
 
865
- #: admin/tpl/image_optimization.php:152
866
  msgid "Please press the %s button before sending a new request."
867
  msgstr ""
868
 
869
- #: admin/tpl/image_optimization.php:160
870
  msgid ""
871
  "This will send the optimization request and the images to LiteSpeed's Image "
872
  "Optimization Server."
873
  msgstr ""
874
 
875
- #: admin/tpl/image_optimization.php:161
876
  msgid "You can send at most %s images at once."
877
  msgstr ""
878
 
879
- #: admin/tpl/image_optimization.php:169
880
  msgid "Images requested"
881
  msgstr ""
882
 
883
- #: admin/tpl/image_optimization.php:174
884
  msgid "Images failed to optimize"
885
  msgstr ""
886
 
887
- #: admin/tpl/image_optimization.php:179
888
  msgid "Image files missing"
889
  msgstr ""
890
 
891
- #: admin/tpl/image_optimization.php:184
892
  msgid ""
893
  "After LiteSpeed's Image Optimization Server finishes optimization, it will "
894
  "notify your site to pull the optimized images."
895
  msgstr ""
896
 
897
- #: admin/tpl/image_optimization.php:185
898
  msgid "This process is automatic."
899
  msgstr ""
900
 
901
- #: admin/tpl/image_optimization.php:188
902
  msgid "Images notified to pull"
903
  msgstr ""
904
 
905
- #: admin/tpl/image_optimization.php:197
906
  msgid "Only press the button if the pull cron job is disabled."
907
  msgstr ""
908
 
909
- #: admin/tpl/image_optimization.php:198
910
  msgid "Images will be pulled automatically if the cron job is running."
911
  msgstr ""
912
 
913
- #: admin/tpl/image_optimization.php:202
914
  msgid "Last pull initiated by cron at %s."
915
  msgstr ""
916
 
917
- #: admin/tpl/image_optimization.php:207
918
  msgid "Images optimized and pulled"
919
  msgstr ""
920
 
921
- #: admin/tpl/image_optimization.php:216
922
  msgid "Revert Optimization"
923
  msgstr ""
924
 
925
- #: admin/tpl/image_optimization.php:219
926
  msgid ""
927
  "Switch all images in the media library back to their original unoptimized "
928
  "versions."
929
  msgstr ""
930
 
931
- #: admin/tpl/image_optimization.php:225
932
  msgid "Undo Optimization"
933
  msgstr ""
934
 
935
- #: admin/tpl/image_optimization.php:228
936
  msgid "Revert all optimized images back to their original versions."
937
  msgstr ""
938
 
939
- #: admin/tpl/image_optimization.php:234
940
  msgid "Re-do Optimization"
941
  msgstr ""
942
 
943
- #: admin/tpl/image_optimization.php:237
944
  msgid "Switch back to using optimized images."
945
  msgstr ""
946
 
947
- #: admin/tpl/image_optimization.php:242
948
  msgid "Results can be checked in <a %s>Media Library</a>."
949
  msgstr ""
950
 
951
- #: admin/tpl/image_optimization.php:246
952
  msgid "Send New Thumbnail Requests"
953
  msgstr ""
954
 
955
- #: admin/tpl/image_optimization.php:249
956
  msgid ""
957
  "Scan for any new unoptimized image thumbnail sizes and resend necessary "
958
  "image optimization requests."
959
  msgstr ""
960
 
961
- #: admin/tpl/image_optimization.php:254
962
  msgid "Reset IAPI Key"
963
  msgstr ""
964
 
965
- #: admin/tpl/image_optimization.php:257
966
  msgid ""
967
  "The current IAPI key must be reset after changing home URL or domain before "
968
  "making any further optimization requests."
969
  msgstr ""
970
 
971
- #: admin/tpl/image_optimization.php:262
972
  msgid "Destroy All Optimization Data!"
973
  msgstr ""
974
 
975
- #: admin/tpl/image_optimization.php:265
976
  msgid ""
977
  "Remove all previous image optimization requests/results, revert completed "
978
  "optimizations, and delete all optimization files."
979
  msgstr ""
980
 
981
- #: admin/tpl/image_optimization.php:267
982
  #: admin/tpl/setting/settings_advanced.php:50
983
  #: admin/tpl/setting/settings_cdn.php:97
984
  #: admin/tpl/setting/settings_crawler.php:22
985
  #: admin/tpl/setting/settings_crawler.php:95
986
  #: admin/tpl/setting/settings_crawler.php:100
987
- #: admin/tpl/setting/settings_excludes.php:63
988
- #: admin/tpl/setting/settings_excludes.php:101
989
  #: admin/tpl/setting/settings_inc.cache_browser.php:12
990
  #: admin/tpl/setting/settings_inc.cache_favicon.php:13
991
  #: admin/tpl/setting/settings_inc.cache_mobile.php:17
@@ -1000,13 +985,13 @@ msgstr ""
1000
  msgid "NOTE"
1001
  msgstr ""
1002
 
1003
- #: admin/tpl/image_optimization.php:268
1004
  msgid ""
1005
  "If there are unfinished requests in progress, the requests' credits will NOT "
1006
  "be recovered."
1007
  msgstr ""
1008
 
1009
- #: admin/tpl/image_optimization.php:268
1010
  #: admin/tpl/setting/settings_optimize.php:87
1011
  #: admin/tpl/setting/settings_optimize.php:163
1012
  msgid "JS Combine"
@@ -1016,36 +1001,36 @@ msgstr ""
1016
  msgid "LiteSpeed Cache Import / Export"
1017
  msgstr ""
1018
 
1019
- #: admin/tpl/import_export.php:21
1020
  msgid "Export Settings"
1021
  msgstr ""
1022
 
1023
- #: admin/tpl/import_export.php:24
1024
  msgid "Export"
1025
  msgstr ""
1026
 
1027
- #: admin/tpl/import_export.php:29
1028
  msgid "Last exported"
1029
  msgstr ""
1030
 
1031
- #: admin/tpl/import_export.php:34
1032
  msgid ""
1033
  "This will export all current LiteSpeed Cache settings and save as a file."
1034
  msgstr ""
1035
 
1036
- #: admin/tpl/import_export.php:37
1037
  msgid "Import Settings"
1038
  msgstr ""
1039
 
1040
- #: admin/tpl/import_export.php:46
1041
  msgid "Import"
1042
  msgstr ""
1043
 
1044
- #: admin/tpl/import_export.php:52
1045
  msgid "Last imported"
1046
  msgstr ""
1047
 
1048
- #: admin/tpl/import_export.php:57
1049
  msgid ""
1050
  "This will import settings from a file and override all current LiteSpeed "
1051
  "Cache settings."
@@ -1055,9 +1040,10 @@ msgstr ""
1055
  msgid "Rate %s on %s"
1056
  msgstr ""
1057
 
1058
- #. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.0) #-#-#-#-#
1059
  #. Plugin Name of the plugin/theme
1060
- #: admin/tpl/inc/admin_footer.php:6
 
1061
  msgid "LiteSpeed Cache"
1062
  msgstr ""
1063
 
@@ -1077,7 +1063,7 @@ msgstr ""
1077
  msgid "This will also generate an API key from LiteSpeed's Server."
1078
  msgstr ""
1079
 
1080
- #: admin/tpl/inc/banner_promo.php:14
1081
  msgid "Welcome to LiteSpeed"
1082
  msgstr ""
1083
 
@@ -1109,9 +1095,36 @@ msgstr ""
1109
  msgid "Maybe later"
1110
  msgstr ""
1111
 
1112
- #: admin/tpl/inc/check_cache_disabled.php:10
1113
- msgid ""
1114
- "WARNING: LiteSpeed cache is disabled. The functionalities here can not work."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1115
  msgstr ""
1116
 
1117
  #: admin/tpl/inc/help_tabs.php:7
@@ -1437,8 +1450,8 @@ msgstr ""
1437
  msgid "Are you sure you want to purge all?"
1438
  msgstr ""
1439
 
1440
- #: admin/tpl/manage/manage_purge.php:61 inc/gui.class.php:318
1441
- #: includes/litespeed-cache-gui.class.php:318
1442
  msgid "Object Cache Purge All"
1443
  msgstr ""
1444
 
@@ -1446,8 +1459,8 @@ msgstr ""
1446
  msgid "Purge all the object caches"
1447
  msgstr ""
1448
 
1449
- #: admin/tpl/manage/manage_purge.php:71 inc/gui.class.php:328
1450
- #: includes/litespeed-cache-gui.class.php:328
1451
  msgid "Opcode Cache Purge All"
1452
  msgstr ""
1453
 
@@ -1481,35 +1494,35 @@ msgstr ""
1481
  msgid "If only the WordPress site should be purged, use purge all."
1482
  msgstr ""
1483
 
1484
- #: admin/tpl/manage/manage_purge.php:96 admin/tpl/manage.php:7
1485
- #: admin/tpl/network_settings.php:7 admin/tpl/settings.php:9
1486
  msgid "Purge"
1487
  msgstr ""
1488
 
1489
- #: admin/tpl/manage/manage_purge.php:127
1490
  msgid "Purge By..."
1491
  msgstr ""
1492
 
1493
- #: admin/tpl/manage/manage_purge.php:129
1494
  msgid "Select below for \"Purge by\" options."
1495
  msgstr ""
1496
 
1497
- #: admin/tpl/manage/manage_purge.php:130
1498
- #: admin/tpl/setting/settings_cache.php:71
1499
- #: admin/tpl/setting/settings_cache.php:88
1500
  #: admin/tpl/setting/settings_cdn.php:116
1501
- #: admin/tpl/setting/settings_cdn.php:142
1502
  #: admin/tpl/setting/settings_crawler.php:132
1503
- #: admin/tpl/setting/settings_excludes.php:22
1504
- #: admin/tpl/setting/settings_excludes.php:36
1505
- #: admin/tpl/setting/settings_excludes.php:59
1506
- #: admin/tpl/setting/settings_excludes.php:97
1507
  #: admin/tpl/setting/settings_inc.cache_object.php:114
1508
  #: admin/tpl/setting/settings_inc.cache_object.php:122
1509
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:19
1510
  #: admin/tpl/setting/settings_media.php:34
1511
  #: admin/tpl/setting/settings_optimize.php:177
1512
- #: admin/tpl/setting/settings_purge.php:83
1513
  #: admin/tpl/setting/settings_tuning.php:38
1514
  #: admin/tpl/setting/settings_tuning.php:74
1515
  #: admin/tpl/setting/settings_tuning.php:146
@@ -1517,83 +1530,83 @@ msgstr ""
1517
  msgid "One per line."
1518
  msgstr ""
1519
 
1520
- #: admin/tpl/manage/manage_purge.php:157
1521
  msgid "Category"
1522
  msgstr ""
1523
 
1524
- #: admin/tpl/manage/manage_purge.php:163
1525
  msgid "Post ID"
1526
  msgstr ""
1527
 
1528
- #: admin/tpl/manage/manage_purge.php:169
1529
  msgid "Tag"
1530
  msgstr ""
1531
 
1532
- #: admin/tpl/manage/manage_purge.php:175
1533
  msgid "URL"
1534
  msgstr ""
1535
 
1536
- #: admin/tpl/manage/manage_purge.php:181
1537
  msgid ""
1538
  "Purge pages by category name - e.g. %2$s should be used for the URL %1$s."
1539
  msgstr ""
1540
 
1541
- #: admin/tpl/manage/manage_purge.php:186
1542
  msgid "Purge pages by post ID."
1543
  msgstr ""
1544
 
1545
- #: admin/tpl/manage/manage_purge.php:190
1546
  msgid "Purge pages by tag name - e.g. %2$s should be used for the URL %1$s."
1547
  msgstr ""
1548
 
1549
- #: admin/tpl/manage/manage_purge.php:195
1550
  msgid "Purge pages by relative or full URL."
1551
  msgstr ""
1552
 
1553
- #: admin/tpl/manage/manage_purge.php:196
1554
  msgid "e.g. Use %s or %s."
1555
  msgstr ""
1556
 
1557
- #: admin/tpl/manage/manage_purge.php:209
1558
  msgid "Purge List"
1559
  msgstr ""
1560
 
1561
- #: admin/tpl/manage.php:8
1562
  msgid "DB Optimizer"
1563
  msgstr ""
1564
 
1565
- #: admin/tpl/manage.php:12 admin/tpl/setting/settings_cdn.php:203
1566
- #: admin/tpl/setting/settings_cdn.php:246 admin/tpl/settings.php:14
1567
  msgid "CDN"
1568
  msgstr ""
1569
 
1570
- #: admin/tpl/manage.php:22
1571
  msgid "LiteSpeed Cache Network Management"
1572
  msgstr ""
1573
 
1574
- #: admin/tpl/manage.php:25
1575
  msgid "LiteSpeed Cache Management"
1576
  msgstr ""
1577
 
1578
  #: admin/tpl/network_settings.php:5 admin/tpl/setting/settings_general.php:7
1579
- #: admin/tpl/settings.php:7
1580
  msgid "General"
1581
  msgstr ""
1582
 
1583
- #: admin/tpl/network_settings.php:6 admin/tpl/settings.php:8
1584
  msgid "Cache"
1585
  msgstr ""
1586
 
1587
- #: admin/tpl/network_settings.php:8 admin/tpl/settings.php:10
1588
  msgid "Excludes"
1589
  msgstr ""
1590
 
1591
- #: admin/tpl/network_settings.php:9 admin/tpl/settings.php:13
1592
  msgid "Media"
1593
  msgstr ""
1594
 
1595
  #: admin/tpl/network_settings.php:10 admin/tpl/setting/settings_debug.php:68
1596
- #: admin/tpl/settings.php:16
1597
  msgid "Advanced"
1598
  msgstr ""
1599
 
@@ -1757,78 +1770,78 @@ msgstr ""
1757
  msgid "Cache Control Settings"
1758
  msgstr ""
1759
 
1760
- #: admin/tpl/setting/settings_cache.php:12
1761
  msgid "Cache Logged-in Users"
1762
  msgstr ""
1763
 
1764
- #: admin/tpl/setting/settings_cache.php:16
1765
  msgid "Privately cache frontend pages for logged-in users. (LSWS %s required)"
1766
  msgstr ""
1767
 
1768
- #: admin/tpl/setting/settings_cache.php:22
1769
  msgid "Cache Commenters"
1770
  msgstr ""
1771
 
1772
- #: admin/tpl/setting/settings_cache.php:26
1773
  msgid ""
1774
  "Privately cache commenters that have pending comments. Disabling this option "
1775
  "will serve non-cacheable pages to commenters. (LSWS %s required)"
1776
  msgstr ""
1777
 
1778
- #: admin/tpl/setting/settings_cache.php:32
1779
  msgid "Cache REST API"
1780
  msgstr ""
1781
 
1782
- #: admin/tpl/setting/settings_cache.php:36
1783
  msgid "Cache requests made by WordPress REST API calls."
1784
  msgstr ""
1785
 
1786
- #: admin/tpl/setting/settings_cache.php:42
1787
  msgid "Cache Login Page"
1788
  msgstr ""
1789
 
1790
- #: admin/tpl/setting/settings_cache.php:46
1791
  msgid "Disabling this option may negatively affect performance."
1792
  msgstr ""
1793
 
1794
- #: admin/tpl/setting/settings_cache.php:60
1795
  msgid "Private Cached URIs"
1796
  msgstr ""
1797
 
1798
- #: admin/tpl/setting/settings_cache.php:64
1799
  msgid "URI Paths containing these strings will NOT be cached as public."
1800
  msgstr ""
1801
 
1802
- #: admin/tpl/setting/settings_cache.php:65
1803
- #: admin/tpl/setting/settings_excludes.php:16
1804
  msgid "The URLs will be compared to the REQUEST_URI server variable."
1805
  msgstr ""
1806
 
1807
- #: admin/tpl/setting/settings_cache.php:66
1808
- #: admin/tpl/setting/settings_excludes.php:17
1809
  #: admin/tpl/setting/settings_tuning.php:174
1810
  msgid "For example, for %s, %s can be used here."
1811
  msgstr ""
1812
 
1813
- #: admin/tpl/setting/settings_cache.php:69
1814
- #: admin/tpl/setting/settings_excludes.php:20
1815
  msgid "To match the beginning, add %s to the beginning of the item."
1816
  msgstr ""
1817
 
1818
- #: admin/tpl/setting/settings_cache.php:70
1819
- #: admin/tpl/setting/settings_excludes.php:21
1820
  msgid "To do an exact match, add %s to the end of the URL."
1821
  msgstr ""
1822
 
1823
- #: admin/tpl/setting/settings_cache.php:78
1824
  msgid "Drop Query String"
1825
  msgstr ""
1826
 
1827
- #: admin/tpl/setting/settings_cache.php:82
1828
  msgid "Ignore certain query strings when caching."
1829
  msgstr ""
1830
 
1831
- #: admin/tpl/setting/settings_cache.php:83
1832
  msgid "For example, to drop parameters beginning with %s, %s can be used here."
1833
  msgstr ""
1834
 
@@ -1923,92 +1936,96 @@ msgid ""
1923
  "match %2$s and %3$s, use %4$s."
1924
  msgstr ""
1925
 
1926
- #: admin/tpl/setting/settings_cdn.php:136
 
 
 
 
1927
  msgid "Exclude Path"
1928
  msgstr ""
1929
 
1930
- #: admin/tpl/setting/settings_cdn.php:141
1931
  msgid "Paths containing these strings will not be served from the CDN."
1932
  msgstr ""
1933
 
1934
- #: admin/tpl/setting/settings_cdn.php:148
1935
  msgid "Load JQuery Remotely"
1936
  msgstr ""
1937
 
1938
- #: admin/tpl/setting/settings_cdn.php:154
1939
  #: admin/tpl/setting/settings_debug.php:19
1940
  msgid "Off"
1941
  msgstr ""
1942
 
1943
- #: admin/tpl/setting/settings_cdn.php:170
1944
  msgid ""
1945
  "Improve page load time by loading jQuery from a remote CDN service instead "
1946
  "of locally."
1947
  msgstr ""
1948
 
1949
- #: admin/tpl/setting/settings_cdn.php:176
1950
  msgid "Quic Cloud API"
1951
  msgstr ""
1952
 
1953
- #: admin/tpl/setting/settings_cdn.php:180
1954
- #: admin/tpl/setting/settings_cdn.php:245
1955
  msgid "Use %s API functionality."
1956
  msgstr ""
1957
 
1958
- #: admin/tpl/setting/settings_cdn.php:203
1959
- #: admin/tpl/setting/settings_cdn.php:246
1960
  msgid "This can be managed from <a %2$s>%1$s</a>."
1961
  msgstr ""
1962
 
1963
- #: admin/tpl/setting/settings_cdn.php:207
1964
- #: admin/tpl/setting/settings_cdn.php:250
1965
  msgid "Email Address"
1966
  msgstr ""
1967
 
1968
- #: admin/tpl/setting/settings_cdn.php:211
1969
- #: admin/tpl/setting/settings_cdn.php:254
1970
  msgid "Your Email address on %s."
1971
  msgstr ""
1972
 
1973
- #: admin/tpl/setting/settings_cdn.php:216
1974
  msgid "User API Key"
1975
  msgstr ""
1976
 
1977
- #: admin/tpl/setting/settings_cdn.php:220
1978
- #: admin/tpl/setting/settings_cdn.php:263
1979
  msgid "Your API key is used to access %s APIs."
1980
  msgstr ""
1981
 
1982
- #: admin/tpl/setting/settings_cdn.php:221
1983
- #: admin/tpl/setting/settings_cdn.php:264
1984
  msgid "Get it from <a %1$s>%2$s</a>."
1985
  msgstr ""
1986
 
1987
- #: admin/tpl/setting/settings_cdn.php:226
1988
  msgid "Site Domain"
1989
  msgstr ""
1990
 
1991
- #: admin/tpl/setting/settings_cdn.php:232
1992
- #: admin/tpl/setting/settings_cdn.php:277
1993
  msgid "You can just type part of the domain."
1994
  msgstr ""
1995
 
1996
- #: admin/tpl/setting/settings_cdn.php:233
1997
- #: admin/tpl/setting/settings_cdn.php:278
1998
  msgid ""
1999
  "Once saved, it will be matched with the current list and completed "
2000
  "automatically."
2001
  msgstr ""
2002
 
2003
- #: admin/tpl/setting/settings_cdn.php:241
2004
  msgid "Cloudflare API"
2005
  msgstr ""
2006
 
2007
- #: admin/tpl/setting/settings_cdn.php:259
2008
  msgid "Global API Key"
2009
  msgstr ""
2010
 
2011
- #: admin/tpl/setting/settings_cdn.php:269
2012
  msgid "Domain"
2013
  msgstr ""
2014
 
@@ -2349,13 +2366,13 @@ msgstr ""
2349
  msgid "ESI Settings"
2350
  msgstr ""
2351
 
2352
- #: admin/tpl/setting/settings_esi.php:13
2353
  msgid ""
2354
  "With ESI (Edge Side Includes), pages may be served from cache for logged-in "
2355
  "users."
2356
  msgstr ""
2357
 
2358
- #: admin/tpl/setting/settings_esi.php:14
2359
  msgid ""
2360
  "ESI allows you to designate parts of your dynamic page as separate fragments "
2361
  "that are then assembled together to make the whole page. In other words, ESI "
@@ -2364,46 +2381,46 @@ msgid ""
2364
  "cached at all."
2365
  msgstr ""
2366
 
2367
- #: admin/tpl/setting/settings_esi.php:16
2368
  msgid "Learn more about public cache vs. private cache <a %s>on our blog</a>."
2369
  msgstr ""
2370
 
2371
- #: admin/tpl/setting/settings_esi.php:21
2372
  msgid "<a %s>ESI sample for developers</a>."
2373
  msgstr ""
2374
 
2375
- #: admin/tpl/setting/settings_esi.php:30
2376
  msgid "Available in LiteSpeed Enterprise version"
2377
  msgstr ""
2378
 
2379
- #: admin/tpl/setting/settings_esi.php:40
2380
  msgid ""
2381
  "Enable caches public pages for logged in users and serves the Admin Bar and "
2382
  "Comment Form via ESI blocks. These two blocks will be uncached unless "
2383
  "enabled below."
2384
  msgstr ""
2385
 
2386
- #: admin/tpl/setting/settings_esi.php:46
2387
  msgid "Cache Admin Bar"
2388
  msgstr ""
2389
 
2390
- #: admin/tpl/setting/settings_esi.php:50
2391
  msgid "Cache the build-in Admin Bar ESI block."
2392
  msgstr ""
2393
 
2394
- #: admin/tpl/setting/settings_esi.php:56
2395
  msgid "Cache Comment Form"
2396
  msgstr ""
2397
 
2398
- #: admin/tpl/setting/settings_esi.php:60
2399
  msgid "Cache the build-in Comment Form ESI block."
2400
  msgstr ""
2401
 
2402
- #: admin/tpl/setting/settings_esi.php:66
2403
  msgid "Vary Group"
2404
  msgstr ""
2405
 
2406
- #: admin/tpl/setting/settings_esi.php:81
2407
  msgid ""
2408
  "If your site contains public content that certain user roles can see but "
2409
  "other roles cannot, you can specify a Vary Group for those user roles. For "
@@ -2416,181 +2433,181 @@ msgstr ""
2416
  msgid "Do Not Cache Settings"
2417
  msgstr ""
2418
 
2419
- #: admin/tpl/setting/settings_excludes.php:11
2420
  msgid "Do Not Cache URIs"
2421
  msgstr ""
2422
 
2423
- #: admin/tpl/setting/settings_excludes.php:15
2424
  msgid "Paths containing these strings will not be cached."
2425
  msgstr ""
2426
 
2427
- #: admin/tpl/setting/settings_excludes.php:29
2428
  msgid "Do Not Cache Query Strings"
2429
  msgstr ""
2430
 
2431
- #: admin/tpl/setting/settings_excludes.php:33
2432
  msgid "Query string containing these parameters will not be cached."
2433
  msgstr ""
2434
 
2435
- #: admin/tpl/setting/settings_excludes.php:34
2436
  msgid "For example, for %s, %s and %s can be used here."
2437
  msgstr ""
2438
 
2439
- #: admin/tpl/setting/settings_excludes.php:43
2440
  msgid "Do Not Cache Categories"
2441
  msgstr ""
2442
 
2443
- #: admin/tpl/setting/settings_excludes.php:56
2444
  msgid "All categories are cached by default."
2445
  msgstr ""
2446
 
2447
- #: admin/tpl/setting/settings_excludes.php:57
2448
- #: admin/tpl/setting/settings_excludes.php:95
2449
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:16
2450
  #: admin/tpl/setting/settings_inc.exclude_useragent.php:15
2451
  msgid "To prevent %s from being cached, enter it here."
2452
  msgstr ""
2453
 
2454
- #: admin/tpl/setting/settings_excludes.php:57
2455
  msgid "categories"
2456
  msgstr ""
2457
 
2458
- #: admin/tpl/setting/settings_excludes.php:65
2459
  msgid ""
2460
  "If the category slug is not found, the category will be removed from the "
2461
  "list on save."
2462
  msgstr ""
2463
 
2464
- #: admin/tpl/setting/settings_excludes.php:66
2465
- #: admin/tpl/setting/settings_excludes.php:104
2466
  msgid "To exclude %1$s, insert %2$s."
2467
  msgstr ""
2468
 
2469
- #: admin/tpl/setting/settings_excludes.php:74
2470
  msgid "Do Not Cache Tags"
2471
  msgstr ""
2472
 
2473
- #: admin/tpl/setting/settings_excludes.php:94
2474
  msgid "All tags are cached by default."
2475
  msgstr ""
2476
 
2477
- #: admin/tpl/setting/settings_excludes.php:95
2478
  msgid "tags"
2479
  msgstr ""
2480
 
2481
- #: admin/tpl/setting/settings_excludes.php:103
2482
  msgid ""
2483
  "If the tag slug is not found, the tag will be removed from the list on save."
2484
  msgstr ""
2485
 
2486
- #: admin/tpl/setting/settings_excludes.php:124
2487
  msgid "Do Not Cache Roles"
2488
  msgstr ""
2489
 
2490
- #: admin/tpl/setting/settings_excludes.php:130
2491
  msgid "Selected roles will be excluded from cache."
2492
  msgstr ""
2493
 
2494
- #: admin/tpl/setting/settings_general.php:13
2495
  msgid "Enable LiteSpeed Cache"
2496
  msgstr ""
2497
 
2498
- #: admin/tpl/setting/settings_general.php:42
2499
  msgid "Use Network Admin Setting"
2500
  msgstr ""
2501
 
2502
- #: admin/tpl/setting/settings_general.php:48
2503
  msgid "Please visit the <a %s>Information</a> page on how to test the cache."
2504
  msgstr ""
2505
 
2506
- #: admin/tpl/setting/settings_general.php:51
2507
  #: admin/tpl/setting/settings_optimize.php:19
2508
  msgid "NOTICE"
2509
  msgstr ""
2510
 
2511
- #: admin/tpl/setting/settings_general.php:51
2512
  msgid ""
2513
  "When disabling the cache, all cached entries for this blog will be purged."
2514
  msgstr ""
2515
 
2516
- #: admin/tpl/setting/settings_general.php:53
2517
  msgid "The network admin setting can be overridden here."
2518
  msgstr ""
2519
 
2520
- #: admin/tpl/setting/settings_general.php:60
2521
  msgid "Default Public Cache TTL"
2522
  msgstr ""
2523
 
2524
- #: admin/tpl/setting/settings_general.php:65
2525
  msgid ""
2526
  "Specify how long, in seconds, public pages are cached. Minimum is 30 seconds."
2527
  msgstr ""
2528
 
2529
- #: admin/tpl/setting/settings_general.php:72
2530
  msgid "Default Private Cache TTL"
2531
  msgstr ""
2532
 
2533
- #: admin/tpl/setting/settings_general.php:77
2534
  msgid ""
2535
  "Specify how long, in seconds, private pages are cached. Minimum is %1$s "
2536
  "seconds. Maximum is %2$s seconds."
2537
  msgstr ""
2538
 
2539
- #: admin/tpl/setting/settings_general.php:84
2540
  msgid "Default Front Page TTL"
2541
  msgstr ""
2542
 
2543
- #: admin/tpl/setting/settings_general.php:89
2544
  msgid ""
2545
  "Specify how long, in seconds, the front page is cached. Minimum is 30 "
2546
  "seconds."
2547
  msgstr ""
2548
 
2549
- #: admin/tpl/setting/settings_general.php:96
2550
  msgid "Default Feed TTL"
2551
  msgstr ""
2552
 
2553
- #: admin/tpl/setting/settings_general.php:101
2554
  msgid "Specify how long, in seconds, feeds are cached."
2555
  msgstr ""
2556
 
2557
- #: admin/tpl/setting/settings_general.php:102
2558
  msgid "If this is set to a number less than 30, feeds will not be cached."
2559
  msgstr ""
2560
 
2561
- #: admin/tpl/setting/settings_general.php:109
2562
  msgid "Default 404 Page TTL"
2563
  msgstr ""
2564
 
2565
- #: admin/tpl/setting/settings_general.php:114
2566
  msgid "Specify how long, in seconds, 404 pages are cached."
2567
  msgstr ""
2568
 
2569
- #: admin/tpl/setting/settings_general.php:115
2570
  msgid "If this is set to a number less than 30, 404 pages will not be cached."
2571
  msgstr ""
2572
 
2573
- #: admin/tpl/setting/settings_general.php:122
2574
  msgid "Default 403 Page TTL"
2575
  msgstr ""
2576
 
2577
- #: admin/tpl/setting/settings_general.php:127
2578
  msgid "Specify how long, in seconds, 403 pages are cached."
2579
  msgstr ""
2580
 
2581
- #: admin/tpl/setting/settings_general.php:128
2582
  msgid "If this is set to a number less than 30, 403 pages will not be cached."
2583
  msgstr ""
2584
 
2585
- #: admin/tpl/setting/settings_general.php:135
2586
  msgid "Default 500 Page TTL"
2587
  msgstr ""
2588
 
2589
- #: admin/tpl/setting/settings_general.php:140
2590
  msgid "Specify how long, in seconds, 500 pages are cached."
2591
  msgstr ""
2592
 
2593
- #: admin/tpl/setting/settings_general.php:141
2594
  msgid "If this is set to a number less than 30, 500 pages will not be cached."
2595
  msgstr ""
2596
 
@@ -3265,106 +3282,106 @@ msgstr ""
3265
  msgid "Purge Settings"
3266
  msgstr ""
3267
 
3268
- #: admin/tpl/setting/settings_purge.php:14
3269
  msgid "All pages"
3270
  msgstr ""
3271
 
3272
- #: admin/tpl/setting/settings_purge.php:15
3273
  msgid "Front page"
3274
  msgstr ""
3275
 
3276
- #: admin/tpl/setting/settings_purge.php:16
3277
  msgid "Home page"
3278
  msgstr ""
3279
 
3280
- #: admin/tpl/setting/settings_purge.php:17
3281
  msgid "Pages"
3282
  msgstr ""
3283
 
3284
- #: admin/tpl/setting/settings_purge.php:19
3285
  msgid "All pages with Recent Posts Widget"
3286
  msgstr ""
3287
 
3288
- #: admin/tpl/setting/settings_purge.php:21
3289
  msgid "Author archive"
3290
  msgstr ""
3291
 
3292
- #: admin/tpl/setting/settings_purge.php:22
3293
  msgid "Post type archive"
3294
  msgstr ""
3295
 
3296
- #: admin/tpl/setting/settings_purge.php:24
3297
  msgid "Yearly archive"
3298
  msgstr ""
3299
 
3300
- #: admin/tpl/setting/settings_purge.php:25
3301
  msgid "Monthly archive"
3302
  msgstr ""
3303
 
3304
- #: admin/tpl/setting/settings_purge.php:26
3305
  msgid "Daily archive"
3306
  msgstr ""
3307
 
3308
- #: admin/tpl/setting/settings_purge.php:28
3309
  msgid "Term archive (include category, tag, and tax)"
3310
  msgstr ""
3311
 
3312
- #: admin/tpl/setting/settings_purge.php:48
3313
  msgid "Auto Purge Rules For Publish/Update"
3314
  msgstr ""
3315
 
3316
- #: admin/tpl/setting/settings_purge.php:51
3317
  #: thirdparty/lscwp-3rd-woocommerce.cls.php:858
3318
  msgid "Note"
3319
  msgstr ""
3320
 
3321
- #: admin/tpl/setting/settings_purge.php:53
3322
  msgid ""
3323
  "Select \"All\" if there are dynamic widgets linked to posts on pages other "
3324
  "than the front or home pages."
3325
  msgstr ""
3326
 
3327
- #: admin/tpl/setting/settings_purge.php:54
3328
  msgid "Other checkboxes will be ignored."
3329
  msgstr ""
3330
 
3331
- #: admin/tpl/setting/settings_purge.php:55
3332
  msgid ""
3333
  "Select only the archive types that are currently used, the others can be "
3334
  "left unchecked."
3335
  msgstr ""
3336
 
3337
- #: admin/tpl/setting/settings_purge.php:71
3338
  msgid ""
3339
  "Select which pages will be automatically purged when posts are published/"
3340
  "updated."
3341
  msgstr ""
3342
 
3343
- #: admin/tpl/setting/settings_purge.php:77
3344
- #: admin/tpl/setting/settings_purge.php:94
3345
  msgid "Scheduled Purge URLs"
3346
  msgstr ""
3347
 
3348
- #: admin/tpl/setting/settings_purge.php:81
3349
  msgid ""
3350
  "The URLs here (one per line) will be purged automatically at the time set in "
3351
  "the option \"%s\"."
3352
  msgstr ""
3353
 
3354
- #: admin/tpl/setting/settings_purge.php:81
3355
- #: admin/tpl/setting/settings_purge.php:89
3356
  msgid "Scheduled Purge Time"
3357
  msgstr ""
3358
 
3359
- #: admin/tpl/setting/settings_purge.php:82
3360
  msgid "Both %1$s and %2$s are acceptable."
3361
  msgstr ""
3362
 
3363
- #: admin/tpl/setting/settings_purge.php:94
3364
  msgid "Specify the time to purge the \"%s\" list."
3365
  msgstr ""
3366
 
3367
- #: admin/tpl/setting/settings_purge.php:95
3368
  msgid "Current server time is %s."
3369
  msgstr ""
3370
 
@@ -3520,49 +3537,49 @@ msgstr ""
3520
  msgid "Selected roles will be excluded from all optimizations."
3521
  msgstr ""
3522
 
3523
- #: admin/tpl/settings.php:11
3524
  msgid "Optimize"
3525
  msgstr ""
3526
 
3527
- #: admin/tpl/settings.php:12
3528
  msgid "Tuning"
3529
  msgstr ""
3530
 
3531
- #: admin/tpl/settings.php:15
3532
  msgid "ESI"
3533
  msgstr ""
3534
 
3535
- #: admin/tpl/settings.php:17
3536
  msgid "Debug"
3537
  msgstr ""
3538
 
3539
- #: admin/tpl/settings.php:21
3540
  msgid "Compatibilities"
3541
  msgstr ""
3542
 
3543
- #: admin/tpl/settings.php:129
3544
  msgid "LiteSpeed Cache Settings"
3545
  msgstr ""
3546
 
3547
- #: admin/tpl/settings.php:135
3548
  msgid "Basic View"
3549
  msgstr ""
3550
 
3551
- #: admin/tpl/settings.php:136
3552
  msgid "Advanced View"
3553
  msgstr ""
3554
 
3555
- #: admin/tpl/settings.php:167
3556
  msgid "The network admin selected use primary site configs for all subsites."
3557
  msgstr ""
3558
 
3559
- #: admin/tpl/settings.php:168
3560
  msgid ""
3561
  "The following options are selected, but are not editable in this settings "
3562
  "page."
3563
  msgstr ""
3564
 
3565
- #: admin/tpl/settings.php:190 admin/tpl/settings.php:193
3566
  msgid "Save Changes"
3567
  msgstr ""
3568
 
@@ -3582,27 +3599,27 @@ msgstr ""
3582
  msgid "Purged the tags!"
3583
  msgstr ""
3584
 
3585
- #: inc/cdn.class.php:650 includes/litespeed-cache-cdn.class.php:650
3586
  msgid "Notified Cloudflare to set development mode to %s successfully."
3587
  msgstr ""
3588
 
3589
- #: inc/cdn.class.php:668 includes/litespeed-cache-cdn.class.php:668
3590
  msgid "Cloudflare API is set to off."
3591
  msgstr ""
3592
 
3593
- #: inc/cdn.class.php:684 includes/litespeed-cache-cdn.class.php:684
3594
  msgid "Notified Cloudflare to purge all successfully."
3595
  msgstr ""
3596
 
3597
- #: inc/cdn.class.php:699 includes/litespeed-cache-cdn.class.php:699
3598
  msgid "No available Cloudflare zone"
3599
  msgstr ""
3600
 
3601
- #: inc/cdn.class.php:794 includes/litespeed-cache-cdn.class.php:794
3602
  msgid "Communicated with Cloudflare successfully."
3603
  msgstr ""
3604
 
3605
- #: inc/cdn.class.php:803 includes/litespeed-cache-cdn.class.php:803
3606
  msgid "Failed to communicate with Cloudflare"
3607
  msgstr ""
3608
 
@@ -3637,37 +3654,37 @@ msgstr ""
3637
  msgid "Guest"
3638
  msgstr ""
3639
 
3640
- #: inc/gui.class.php:210 includes/litespeed-cache-gui.class.php:210
3641
  msgid "Purge this page"
3642
  msgstr ""
3643
 
3644
- #: inc/gui.class.php:218 includes/litespeed-cache-gui.class.php:218
3645
  msgid "Mark this page as "
3646
  msgstr ""
3647
 
3648
- #: inc/gui.class.php:225 includes/litespeed-cache-gui.class.php:225
3649
  msgid "Non cacheable"
3650
  msgstr ""
3651
 
3652
- #: inc/gui.class.php:232 includes/litespeed-cache-gui.class.php:232
3653
  msgid "Private cache"
3654
  msgstr ""
3655
 
3656
- #: inc/gui.class.php:239 includes/litespeed-cache-gui.class.php:239
3657
  msgid "No optimization"
3658
  msgstr ""
3659
 
3660
- #: inc/gui.class.php:246 includes/litespeed-cache-gui.class.php:246
3661
  msgid "More settings"
3662
  msgstr ""
3663
 
3664
- #: inc/gui.class.php:265 inc/gui.class.php:299
3665
- #: includes/litespeed-cache-gui.class.php:265
3666
- #: includes/litespeed-cache-gui.class.php:299
3667
  msgid "LiteSpeed Cache Purge All"
3668
  msgstr ""
3669
 
3670
- #: inc/gui.class.php:308 includes/litespeed-cache-gui.class.php:308
3671
  msgid "Cloudflare Purge All"
3672
  msgstr ""
3673
 
@@ -3679,8 +3696,8 @@ msgstr ""
3679
  msgid "Communicated with LiteSpeed Image Optimization Server successfully."
3680
  msgstr ""
3681
 
3682
- #: inc/img_optm.class.php:134 inc/img_optm.class.php:189
3683
- #: inc/img_optm.class.php:1154 inc/img_optm.class.php:1219
3684
  msgid "No image found."
3685
  msgstr ""
3686
 
@@ -3688,6 +3705,10 @@ msgstr ""
3688
  msgid "Number of images in one image group (%s) exceeds the credit (%s)"
3689
  msgstr ""
3690
 
 
 
 
 
3691
  #: inc/img_optm.class.php:209
3692
  msgid "Optimized successfully."
3693
  msgstr ""
@@ -3734,35 +3755,35 @@ msgstr ""
3734
  msgid "Imported setting file %s successfully."
3735
  msgstr ""
3736
 
3737
- #: inc/litespeed-cache.class.php:262 includes/litespeed-cache.class.php:262
3738
  msgid "Crawler blacklist is saved."
3739
  msgstr ""
3740
 
3741
- #: inc/litespeed-cache.class.php:267 includes/litespeed-cache.class.php:267
3742
  msgid "Notified LiteSpeed Web Server to purge the front page."
3743
  msgstr ""
3744
 
3745
- #: inc/litespeed-cache.class.php:272 includes/litespeed-cache.class.php:272
3746
  msgid "Notified LiteSpeed Web Server to purge pages."
3747
  msgstr ""
3748
 
3749
- #: inc/litespeed-cache.class.php:277 includes/litespeed-cache.class.php:277
3750
  msgid "Notified LiteSpeed Web Server to purge CSS/JS entries."
3751
  msgstr ""
3752
 
3753
- #: inc/litespeed-cache.class.php:282 includes/litespeed-cache.class.php:282
3754
  msgid "Notified LiteSpeed Web Server to purge error pages."
3755
  msgstr ""
3756
 
3757
- #: inc/litespeed-cache.class.php:288 includes/litespeed-cache.class.php:288
3758
  msgid "Notified LiteSpeed Web Server to purge all caches."
3759
  msgstr ""
3760
 
3761
- #: inc/litespeed-cache.class.php:295 includes/litespeed-cache.class.php:295
3762
  msgid "Notified LiteSpeed Web Server to purge everything."
3763
  msgstr ""
3764
 
3765
- #: inc/litespeed-cache.class.php:310 includes/litespeed-cache.class.php:310
3766
  msgid "Notified LiteSpeed Web Server to purge the list."
3767
  msgstr ""
3768
 
@@ -3810,19 +3831,19 @@ msgstr ""
3810
  msgid "Purge all object caches successfully."
3811
  msgstr ""
3812
 
3813
- #: inc/purge.class.php:291 includes/litespeed-cache-purge.class.php:291
3814
  msgid "Purge category %s"
3815
  msgstr ""
3816
 
3817
- #: inc/purge.class.php:318 includes/litespeed-cache-purge.class.php:318
3818
  msgid "Purge Post ID %s"
3819
  msgstr ""
3820
 
3821
- #: inc/purge.class.php:347 includes/litespeed-cache-purge.class.php:347
3822
  msgid "Purge tag %s"
3823
  msgstr ""
3824
 
3825
- #: inc/purge.class.php:381 includes/litespeed-cache-purge.class.php:381
3826
  msgid "Purge url %s"
3827
  msgstr ""
3828
 
@@ -3870,24 +3891,24 @@ msgstr ""
3870
  msgid "Stopped due to load over limit"
3871
  msgstr ""
3872
 
3873
- #: lib/litespeed/litespeed-file.class.php:115
3874
  msgid "Folder does not exist: %s"
3875
  msgstr ""
3876
 
3877
- #: lib/litespeed/litespeed-file.class.php:124
3878
  msgid "Can not create folder: %1$s. Error: %2$s"
3879
  msgstr ""
3880
 
3881
- #: lib/litespeed/litespeed-file.class.php:132
3882
  msgid "Folder is not writable: %s."
3883
  msgstr ""
3884
 
3885
- #: lib/litespeed/litespeed-file.class.php:139
3886
- #: lib/litespeed/litespeed-file.class.php:144
3887
  msgid "File %s is not writable."
3888
  msgstr ""
3889
 
3890
- #: lib/litespeed/litespeed-file.class.php:149
3891
  msgid "Failed to write to %s."
3892
  msgstr ""
3893
 
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.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
+ "POT-Creation-Date: 2018-03-15 15:02:49+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
20
  msgid "Reset IAPI key successfully."
21
  msgstr ""
22
 
23
+ #: admin/admin-api.class.php:317
24
  msgid "Failed to communicate with LiteSpeed image server"
25
  msgstr ""
26
 
27
+ #: admin/admin-api.class.php:325 admin/admin-api.class.php:333
28
  msgid "Message from LiteSpeed image server"
29
  msgstr ""
30
 
31
+ #: admin/litespeed-cache-admin-display.class.php:151
32
+ #: admin/tpl/setting/settings_cdn.php:204
33
+ #: admin/tpl/setting/settings_cdn.php:247 inc/gui.class.php:349
34
+ #: includes/litespeed-cache-gui.class.php:349
35
  msgid "Manage"
36
  msgstr ""
37
 
38
+ #: admin/litespeed-cache-admin-display.class.php:153
39
+ #: admin/litespeed-cache-admin-display.class.php:242 inc/gui.class.php:357
40
+ #: includes/litespeed-cache-gui.class.php:357
41
  msgid "Settings"
42
  msgstr ""
43
 
44
+ #: admin/litespeed-cache-admin-display.class.php:156
45
  msgid "Edit .htaccess"
46
  msgstr ""
47
 
48
+ #: admin/litespeed-cache-admin-display.class.php:160 inc/gui.class.php:366
49
+ #: includes/litespeed-cache-gui.class.php:366
50
  msgid "Image Optimization"
51
  msgstr ""
52
 
53
+ #: admin/litespeed-cache-admin-display.class.php:161 admin/tpl/settings.php:22
54
  msgid "Crawler"
55
  msgstr ""
56
 
57
+ #: admin/litespeed-cache-admin-display.class.php:162
58
  msgid "Report"
59
  msgstr ""
60
 
61
+ #: admin/litespeed-cache-admin-display.class.php:163
62
  msgid "Import / Export"
63
  msgstr ""
64
 
65
+ #: admin/litespeed-cache-admin-display.class.php:166
66
  #: admin/tpl/setting/settings_debug.php:13
67
  msgid "Debug Log"
68
  msgstr ""
69
 
70
+ #: admin/litespeed-cache-admin-display.class.php:262
71
  msgid ""
72
  "It is recommended that LiteSpeed Cache be purged after updating a plugin."
73
  msgstr ""
74
 
75
+ #: admin/litespeed-cache-admin-display.class.php:800
76
+ #: admin/litespeed-cache-admin-display.class.php:885
77
  #: admin/tpl/setting/settings_inc.cache_mobile.php:67
78
  #: admin/tpl/setting/settings_media.php:73
79
  #: admin/tpl/setting/settings_optimize.php:160
82
  msgid "ON"
83
  msgstr ""
84
 
85
+ #: admin/litespeed-cache-admin-display.class.php:801
86
+ #: admin/litespeed-cache-admin-display.class.php:889
87
  #: admin/tpl/setting/settings_inc.cache_object.php:149
88
  #: admin/tpl/setting/settings_tuning.php:18
89
  #: admin/tpl/setting/settings_tuning.php:54
90
  msgid "OFF"
91
  msgstr ""
92
 
93
+ #: admin/litespeed-cache-admin-display.class.php:915
94
  msgid "Recommended value: %s"
95
  msgstr ""
96
 
97
+ #: admin/litespeed-cache-admin-display.class.php:931
98
  #: admin/tpl/setting/settings_media.php:36
99
  #: admin/tpl/setting/settings_optimize.php:137
100
  #: admin/tpl/setting/settings_tuning.php:24
105
  msgid "API"
106
  msgstr ""
107
 
108
+ #: admin/litespeed-cache-admin-display.class.php:932
109
  msgid "Server variable(s) %s available to override this setting."
110
  msgstr ""
111
 
112
+ #: admin/litespeed-cache-admin-display.class.php:934
113
+ #: admin/tpl/image_optimization.php:150 admin/tpl/image_optimization.php:207
114
  #: admin/tpl/manage/manage_cdn.php:60
115
  #: admin/tpl/setting/settings_advanced.php:10
116
  #: admin/tpl/setting/settings_advanced.php:36
117
  #: admin/tpl/setting/settings_advanced.php:48
118
  #: admin/tpl/setting/settings_cache.php:7
119
+ #: admin/tpl/setting/settings_cache.php:86
120
  #: admin/tpl/setting/settings_cdn.php:25
121
  #: admin/tpl/setting/settings_crawler.php:8
122
  #: admin/tpl/setting/settings_debug.php:8 admin/tpl/setting/settings_esi.php:8
133
  msgid "Learn More"
134
  msgstr ""
135
 
136
+ #: admin/litespeed-cache-admin-display.class.php:949
137
  msgid "%s groups"
138
  msgstr ""
139
 
140
+ #: admin/litespeed-cache-admin-display.class.php:952
141
  msgid "%s images"
142
  msgstr ""
143
 
144
+ #: admin/litespeed-cache-admin-display.class.php:962
145
  msgid "%s group"
146
  msgstr ""
147
 
148
+ #: admin/litespeed-cache-admin-display.class.php:965
149
  msgid "%s image"
150
  msgstr ""
151
 
152
+ #: admin/litespeed-cache-admin-error.class.php:84
153
  msgid "The installed PHP version is too old for the LiteSpeed Cache Plugin."
154
  msgstr ""
155
 
156
+ #: admin/litespeed-cache-admin-error.class.php:86
157
  msgid "The LiteSpeed Cache Plugin requires at least PHP %s."
158
  msgstr ""
159
 
160
+ #: admin/litespeed-cache-admin-error.class.php:88
161
  msgid ""
162
  "The currently installed version is PHP %s, which is out-dated and insecure."
163
  msgstr ""
164
 
165
+ #: admin/litespeed-cache-admin-error.class.php:90
166
+ #: admin/litespeed-cache-admin-error.class.php:99
167
  msgid ""
168
  "Please upgrade or go to <a href=\"%s\">active plugins</a> and deactivate the "
169
  "LiteSpeed Cache plugin to hide this message."
170
  msgstr ""
171
 
172
+ #: admin/litespeed-cache-admin-error.class.php:95
173
  msgid ""
174
  "The installed WordPress version is too old for the LiteSpeed Cache Plugin."
175
  msgstr ""
176
 
177
+ #: admin/litespeed-cache-admin-error.class.php:97
178
  msgid "The LiteSpeed Cache Plugin requires at least WordPress %s."
179
  msgstr ""
180
 
181
+ #: admin/litespeed-cache-admin-error.class.php:104
182
  msgid "Something went wrong with the form! Please try again."
183
  msgstr ""
184
 
185
+ #: admin/litespeed-cache-admin-error.class.php:107
186
  msgid "Tried to purge list with empty list."
187
  msgstr ""
188
 
189
+ #: admin/litespeed-cache-admin-error.class.php:110
190
  msgid "Bad Purge By selected value."
191
  msgstr ""
192
 
193
+ #: admin/litespeed-cache-admin-error.class.php:113
194
  msgid "Failed to purge by category, invalid category slug."
195
  msgstr ""
196
 
197
+ #: admin/litespeed-cache-admin-error.class.php:116
198
  msgid "Failed to purge by tag, invalid tag slug."
199
  msgstr ""
200
 
201
+ #: admin/litespeed-cache-admin-error.class.php:119
202
  msgid "Failed to purge by url, contained \"<\"."
203
  msgstr ""
204
 
205
+ #: admin/litespeed-cache-admin-error.class.php:123
206
  msgid "Failed to purge by Post ID, given ID is not numeric: %s"
207
  msgstr ""
208
 
209
+ #: admin/litespeed-cache-admin-error.class.php:126
210
  msgid ""
211
  "Failed to purge by Post ID, given ID does not exist or is not published: %s"
212
  msgstr ""
213
 
214
+ #: admin/litespeed-cache-admin-error.class.php:130
215
  msgid "Failed to purge by url, invalid input: %s."
216
  msgstr ""
217
 
218
+ #: admin/litespeed-cache-admin-error.class.php:133
219
  msgid "Failed to purge by category, does not exist: %s"
220
  msgstr ""
221
 
222
+ #: admin/litespeed-cache-admin-error.class.php:136
223
  msgid "Failed to purge by tag, does not exist: %s"
224
  msgstr ""
225
 
226
+ #: admin/litespeed-cache-admin-error.class.php:140
227
  msgid "Invalid data in Admin IPs."
228
  msgstr ""
229
 
230
+ #: admin/litespeed-cache-admin-error.class.php:143
231
  msgid "Invalid data in Test IPs."
232
  msgstr ""
233
 
234
+ #: admin/litespeed-cache-admin-error.class.php:146
235
  msgid "Invalid Site IP: %s"
236
  msgstr ""
237
 
238
+ #: admin/litespeed-cache-admin-error.class.php:149
239
  msgid "Can not fetch Custom Sitemap: %s"
240
  msgstr ""
241
 
242
+ #: admin/litespeed-cache-admin-error.class.php:152
243
  msgid "Can not parse custom sitemap xml file: %s."
244
  msgstr ""
245
 
246
+ #: admin/litespeed-cache-admin-error.class.php:153
247
  msgid ""
248
  "Please make sure the file is xml format and the %s extension is installed on "
249
  "the server."
250
  msgstr ""
251
 
252
+ #: admin/litespeed-cache-admin-error.class.php:157
 
 
 
 
253
  msgid "Removed category \"%s\" from list, ID does not exist."
254
  msgstr ""
255
 
256
+ #: admin/litespeed-cache-admin-error.class.php:162
257
  msgid "Removed tag \"%s\" from list, ID does not exist."
258
  msgstr ""
259
 
260
+ #: admin/litespeed-cache-admin-error.class.php:166
261
  msgid "Invalid login cookie. Invalid characters found: %s"
262
  msgstr ""
263
 
264
+ #: admin/litespeed-cache-admin-error.class.php:170
265
  msgid "Invalid Rewrite List."
266
  msgstr ""
267
 
268
+ #: admin/litespeed-cache-admin-error.class.php:171
269
  msgid "Empty or invalid rule."
270
  msgstr ""
271
 
272
+ #: admin/litespeed-cache-admin-error.class.php:172
273
  msgid "Rule: %1$s, list: %2$s"
274
  msgstr ""
275
 
276
+ #: admin/litespeed-cache-admin-error.class.php:176
277
  msgid "Tried to parse for existing login cookie."
278
  msgstr ""
279
 
280
+ #: admin/litespeed-cache-admin-error.class.php:177
281
  msgid "%s file not valid. Please verify contents."
282
  msgstr ""
283
 
284
+ #: admin/litespeed-cache-admin-error.class.php:181
285
  msgid "Could not find %s."
286
  msgstr ""
287
 
288
+ #: admin/litespeed-cache-admin-error.class.php:185
289
  msgid "This site is a subdirectory install."
290
  msgstr ""
291
 
292
+ #: admin/litespeed-cache-admin-error.class.php:186
293
  msgid "Login cookies do not match."
294
  msgstr ""
295
 
296
+ #: admin/litespeed-cache-admin-error.class.php:187
297
  msgid ""
298
  "Please remove both and set the login cookie in LiteSpeed Cache advanced "
299
  "settings."
300
  msgstr ""
301
 
302
+ #: admin/litespeed-cache-admin-error.class.php:190
303
+ #: admin/litespeed-cache-admin-error.class.php:228
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
304
  msgid "LiteSpeed Cache was unable to write to the wp-config.php file."
305
  msgstr ""
306
 
307
+ #: admin/litespeed-cache-admin-error.class.php:191
308
+ #: admin/litespeed-cache-admin-error.class.php:229
309
  msgid "Please add the following to the wp-config.php file: %s"
310
  msgstr ""
311
 
312
+ #: admin/litespeed-cache-admin-error.class.php:195
313
  msgid "Failed to back up file, aborted changes."
314
  msgstr ""
315
 
316
+ #: admin/litespeed-cache-admin-error.class.php:198
317
  msgid "Failed to put contents into %s"
318
  msgstr ""
319
 
320
+ #: admin/litespeed-cache-admin-error.class.php:201
321
  msgid "Failed to get %s file contents."
322
  msgstr ""
323
 
324
+ #: admin/litespeed-cache-admin-error.class.php:204
325
  msgid "%s file not readable or not writable."
326
  msgstr ""
327
 
328
+ #: admin/litespeed-cache-admin-error.class.php:207
329
  msgid "%s file not readable."
330
  msgstr ""
331
 
332
+ #: admin/litespeed-cache-admin-error.class.php:210
333
  msgid "%s file not writable."
334
  msgstr ""
335
 
336
+ #: admin/litespeed-cache-admin-error.class.php:213
337
  msgid "Failed to overwrite %s."
338
  msgstr ""
339
 
340
+ #: admin/litespeed-cache-admin-error.class.php:217
341
  msgid "The %1$s file not writable for %2$s"
342
  msgstr ""
343
 
344
+ #: admin/litespeed-cache-admin-error.class.php:221
345
  msgid "%s file did not find a place to insert define."
346
  msgstr ""
347
 
403
  msgid "File Saved."
404
  msgstr ""
405
 
406
+ #: admin/litespeed-cache-admin-settings.class.php:40
407
+ msgid "%1$s must be an integer larger than %2$d"
408
+ msgstr ""
409
+
410
+ #: admin/litespeed-cache-admin-settings.class.php:43
411
+ msgid "%1$s must be an integer between %2$d and %3$d"
412
+ msgstr ""
413
+
414
+ #: admin/litespeed-cache-admin-settings.class.php:62
415
  msgid "'Use primary site settings' set by Network Administrator."
416
  msgstr ""
417
 
418
+ #: admin/litespeed-cache-admin-settings.class.php:248
419
  msgid "Site options saved."
420
  msgstr ""
421
 
422
+ #: admin/litespeed-cache-admin-settings.class.php:354
423
+ #: admin/litespeed-cache-admin-settings.class.php:1010
424
  msgid "Default Public Cache"
425
  msgstr ""
426
 
427
+ #: admin/litespeed-cache-admin-settings.class.php:355
428
  msgid "Default Private Cache"
429
  msgstr ""
430
 
431
+ #: admin/litespeed-cache-admin-settings.class.php:356
432
  msgid "Default Front Page"
433
  msgstr ""
434
 
435
+ #: admin/litespeed-cache-admin-settings.class.php:357
436
  msgid "Feed"
437
  msgstr ""
438
 
439
+ #: admin/litespeed-cache-admin-settings.class.php:860
440
  #: admin/tpl/setting/settings_debug.php:78
441
  msgid "Log File Size Limit"
442
  msgstr ""
443
 
444
+ #: admin/litespeed-cache-admin-settings.class.php:933
445
  #: admin/tpl/setting/settings_crawler.php:13
446
  msgid "Delay"
447
  msgstr ""
448
 
449
+ #: admin/litespeed-cache-admin-settings.class.php:934
450
  #: admin/tpl/setting/settings_crawler.php:37
451
  msgid "Run Duration"
452
  msgstr ""
453
 
454
+ #: admin/litespeed-cache-admin-settings.class.php:935
455
  msgid "Cron Interval"
456
  msgstr ""
457
 
458
+ #: admin/litespeed-cache-admin-settings.class.php:936
459
  msgid "Whole Interval"
460
  msgstr ""
461
 
462
+ #: admin/litespeed-cache-admin-settings.class.php:937
463
  #: admin/tpl/setting/settings_crawler.php:73
464
  msgid "Threads"
465
  msgstr ""
492
  msgid "LiteSpeed Cache Crawler"
493
  msgstr ""
494
 
495
+ #: admin/tpl/crawler.php:37
496
  msgid "Crawler File"
497
  msgstr ""
498
 
499
+ #: admin/tpl/crawler.php:39
500
  msgid "Generate Crawler File"
501
  msgstr ""
502
 
503
+ #: admin/tpl/crawler.php:44
504
  msgid "Generated at %s"
505
  msgstr ""
506
 
507
+ #: admin/tpl/crawler.php:48
508
  msgid ""
509
  "On click, this will create a crawler sitemap file in plugin directory %s."
510
  msgstr ""
511
 
512
+ #: admin/tpl/crawler.php:58
513
  msgid "%d hours"
514
  msgstr ""
515
 
516
+ #: admin/tpl/crawler.php:61
517
  msgid "%d hour"
518
  msgstr ""
519
 
520
+ #: admin/tpl/crawler.php:68
521
  msgid "%d minutes"
522
  msgstr ""
523
 
524
+ #: admin/tpl/crawler.php:71
525
  msgid "%d minute"
526
  msgstr ""
527
 
528
+ #: admin/tpl/crawler.php:77
529
  msgid "Crawler Cron"
530
  msgstr ""
531
 
532
+ #: admin/tpl/crawler.php:85 admin/tpl/setting/settings_general.php:36
533
  msgid "Enable"
534
  msgstr ""
535
 
536
+ #: admin/tpl/crawler.php:85 admin/tpl/esi_widget_edit.php:56
537
+ #: admin/tpl/setting/settings_general.php:30
538
  msgid "Disable"
539
  msgstr ""
540
 
541
+ #: admin/tpl/crawler.php:92 admin/tpl/inc/check_cache_disabled.php:31
542
+ #: admin/tpl/manage/manage_cdn.php:15
543
+ #: admin/tpl/setting/settings_optimize.php:13 admin/tpl/settings.php:163
544
  msgid "WARNING"
545
  msgstr ""
546
 
547
+ #: admin/tpl/crawler.php:93
548
  msgid ""
549
  "The crawler feature is not enabled on the LiteSpeed server. Please consult "
550
  "your server admin."
551
  msgstr ""
552
 
553
+ #: admin/tpl/crawler.php:94
554
  msgid ""
555
  "See <a %s>Introduction for Enabling the Crawler</a> for detailed infomation."
556
  msgstr ""
557
 
558
+ #: admin/tpl/crawler.php:101
559
  msgid "Current sitemap crawl started at"
560
  msgstr ""
561
 
562
+ #: admin/tpl/crawler.php:107
563
  msgid "The next complete sitemap crawl will start at"
564
  msgstr ""
565
 
566
+ #: admin/tpl/crawler.php:115
567
  msgid "Last complete run time for all crawlers"
568
  msgstr ""
569
 
570
+ #: admin/tpl/crawler.php:116 admin/tpl/crawler.php:123
571
  msgid "%d seconds"
572
  msgstr ""
573
 
574
+ #: admin/tpl/crawler.php:122
575
  msgid "Run time for previous crawler"
576
  msgstr ""
577
 
578
+ #: admin/tpl/crawler.php:129
579
  msgid "Current crawler started at"
580
  msgstr ""
581
 
582
+ #: admin/tpl/crawler.php:136
583
  msgid "Last interval"
584
  msgstr ""
585
 
586
+ #: admin/tpl/crawler.php:143
587
  msgid "Ended reason"
588
  msgstr ""
589
 
590
+ #: admin/tpl/crawler.php:150
591
  msgid "<b>Last crawled:</b> %s item(s)"
592
  msgstr ""
593
 
594
+ #: admin/tpl/crawler.php:154
595
  msgid "Reset position"
596
  msgstr ""
597
 
598
+ #: admin/tpl/crawler.php:157
599
  msgid "Manually run"
600
  msgstr ""
601
 
602
+ #: admin/tpl/crawler.php:164
603
  msgid "Cron Name"
604
  msgstr ""
605
 
606
+ #: admin/tpl/crawler.php:165
607
  msgid "Run Frequency"
608
  msgstr ""
609
 
610
+ #: admin/tpl/crawler.php:166
611
  msgid "Size"
612
  msgstr ""
613
 
614
+ #: admin/tpl/crawler.php:167 admin/tpl/setting/settings_inc.cache_object.php:70
615
  msgid "Status"
616
  msgstr ""
617
 
618
+ #: admin/tpl/crawler.php:193
619
  msgid "running"
620
  msgstr ""
621
 
622
+ #: admin/tpl/crawler.php:203
623
  msgid "Run frequency is set by the Interval Between Runs setting."
624
  msgstr ""
625
 
626
+ #: admin/tpl/crawler.php:204
627
  msgid "Only one crawler can run concurrently."
628
  msgstr ""
629
 
630
+ #: admin/tpl/crawler.php:205
631
  msgid ""
632
  "If both the cron and manual run start at a similar time, the first one to "
633
  "start will run."
634
  msgstr ""
635
 
636
+ #: admin/tpl/crawler.php:206
637
  msgid ""
638
  "Please follow <a %s>Hooking WP-Cron Into the System Task Scheduler</a> to "
639
  "create the system cron task."
640
  msgstr ""
641
 
642
+ #: admin/tpl/crawler.php:211
643
  msgid "Watch Crawler Status"
644
  msgstr ""
645
 
646
+ #: admin/tpl/crawler.php:218
647
  msgid "Show crawler status"
648
  msgstr ""
649
 
650
+ #: admin/tpl/crawler.php:236
651
  msgid "No crawler meta file generated yet"
652
  msgstr ""
653
 
654
+ #: admin/tpl/crawler.php:241
655
  msgid "Sitemap Generation Blacklist"
656
  msgstr ""
657
 
658
+ #: admin/tpl/crawler.php:250 admin/tpl/edit_htaccess.php:69
659
  msgid "Save"
660
  msgstr ""
661
 
662
+ #: admin/tpl/crawler.php:254
663
  msgid "Current blacklist has %s item(s)."
664
  msgstr ""
665
 
666
+ #: admin/tpl/crawler.php:255
667
  msgid ""
668
  "All Urls which returned no-cache tags will be added here, after the initial "
669
  "crawling."
711
  "changed."
712
  msgstr ""
713
 
714
+ #: admin/tpl/esi_widget_edit.php:30 admin/tpl/setting/settings_esi.php:37
715
  msgid "Enable ESI"
716
  msgstr ""
717
 
730
  #: admin/tpl/esi_widget_edit.php:69 admin/tpl/setting/settings_crawler.php:40
731
  #: admin/tpl/setting/settings_crawler.php:52
732
  #: admin/tpl/setting/settings_crawler.php:64
733
+ #: admin/tpl/setting/settings_general.php:65
734
+ #: admin/tpl/setting/settings_general.php:77
735
+ #: admin/tpl/setting/settings_general.php:89
736
+ #: admin/tpl/setting/settings_general.php:101
737
+ #: admin/tpl/setting/settings_general.php:114
738
+ #: admin/tpl/setting/settings_general.php:127
739
+ #: admin/tpl/setting/settings_general.php:140
740
  #: admin/tpl/setting/settings_inc.cache_browser.php:24
741
  #: admin/tpl/setting/settings_inc.cache_object.php:63
742
  #: admin/tpl/setting/settings_optimize.php:111
791
  msgid "Click the %s button."
792
  msgstr ""
793
 
794
+ #: admin/tpl/image_optimization.php:52 admin/tpl/image_optimization.php:114
795
+ #: admin/tpl/image_optimization.php:148
796
  msgid "Update Status"
797
  msgstr ""
798
 
799
+ #: admin/tpl/image_optimization.php:53 admin/tpl/image_optimization.php:145
800
+ #: admin/tpl/image_optimization.php:153
801
  msgid "Send Optimization Request"
802
  msgstr ""
803
 
805
  msgid "Click the %s button or wait for the cron job to finish the pull action."
806
  msgstr ""
807
 
808
+ #: admin/tpl/image_optimization.php:54 admin/tpl/image_optimization.php:190
809
  msgid "Pull Images"
810
  msgstr ""
811
 
817
  msgid "LiteSpeed Cache Image Optimization"
818
  msgstr ""
819
 
820
+ #: admin/tpl/image_optimization.php:81
821
  msgid "How to Level Up"
822
  msgstr ""
823
 
824
+ #: admin/tpl/image_optimization.php:84
825
  msgid "Optimization Summary"
826
  msgstr ""
827
 
828
+ #: admin/tpl/image_optimization.php:117
829
  msgid ""
830
  "This will communicate with LiteSpeed's Image Optimization Server and "
831
  "retrieve the most recent status."
832
  msgstr ""
833
 
834
+ #: admin/tpl/image_optimization.php:122
835
  msgid "Image Information"
836
  msgstr ""
837
 
838
+ #: admin/tpl/image_optimization.php:131
 
 
 
 
839
  msgid "Images total"
840
  msgstr ""
841
 
842
+ #: admin/tpl/image_optimization.php:133
843
  msgid "What is a group?"
844
  msgstr ""
845
 
846
+ #: admin/tpl/image_optimization.php:136
847
  msgid "Images not yet requested"
848
  msgstr ""
849
 
850
+ #: admin/tpl/image_optimization.php:148
851
  msgid "Please press the %s button before sending a new request."
852
  msgstr ""
853
 
854
+ #: admin/tpl/image_optimization.php:156
855
  msgid ""
856
  "This will send the optimization request and the images to LiteSpeed's Image "
857
  "Optimization Server."
858
  msgstr ""
859
 
860
+ #: admin/tpl/image_optimization.php:157
861
  msgid "You can send at most %s images at once."
862
  msgstr ""
863
 
864
+ #: admin/tpl/image_optimization.php:165
865
  msgid "Images requested"
866
  msgstr ""
867
 
868
+ #: admin/tpl/image_optimization.php:170
869
  msgid "Images failed to optimize"
870
  msgstr ""
871
 
872
+ #: admin/tpl/image_optimization.php:175
873
  msgid "Image files missing"
874
  msgstr ""
875
 
876
+ #: admin/tpl/image_optimization.php:180
877
  msgid ""
878
  "After LiteSpeed's Image Optimization Server finishes optimization, it will "
879
  "notify your site to pull the optimized images."
880
  msgstr ""
881
 
882
+ #: admin/tpl/image_optimization.php:181
883
  msgid "This process is automatic."
884
  msgstr ""
885
 
886
+ #: admin/tpl/image_optimization.php:184
887
  msgid "Images notified to pull"
888
  msgstr ""
889
 
890
+ #: admin/tpl/image_optimization.php:193
891
  msgid "Only press the button if the pull cron job is disabled."
892
  msgstr ""
893
 
894
+ #: admin/tpl/image_optimization.php:194
895
  msgid "Images will be pulled automatically if the cron job is running."
896
  msgstr ""
897
 
898
+ #: admin/tpl/image_optimization.php:198
899
  msgid "Last pull initiated by cron at %s."
900
  msgstr ""
901
 
902
+ #: admin/tpl/image_optimization.php:203
903
  msgid "Images optimized and pulled"
904
  msgstr ""
905
 
906
+ #: admin/tpl/image_optimization.php:212
907
  msgid "Revert Optimization"
908
  msgstr ""
909
 
910
+ #: admin/tpl/image_optimization.php:215
911
  msgid ""
912
  "Switch all images in the media library back to their original unoptimized "
913
  "versions."
914
  msgstr ""
915
 
916
+ #: admin/tpl/image_optimization.php:221
917
  msgid "Undo Optimization"
918
  msgstr ""
919
 
920
+ #: admin/tpl/image_optimization.php:224
921
  msgid "Revert all optimized images back to their original versions."
922
  msgstr ""
923
 
924
+ #: admin/tpl/image_optimization.php:230
925
  msgid "Re-do Optimization"
926
  msgstr ""
927
 
928
+ #: admin/tpl/image_optimization.php:233
929
  msgid "Switch back to using optimized images."
930
  msgstr ""
931
 
932
+ #: admin/tpl/image_optimization.php:238
933
  msgid "Results can be checked in <a %s>Media Library</a>."
934
  msgstr ""
935
 
936
+ #: admin/tpl/image_optimization.php:242
937
  msgid "Send New Thumbnail Requests"
938
  msgstr ""
939
 
940
+ #: admin/tpl/image_optimization.php:245
941
  msgid ""
942
  "Scan for any new unoptimized image thumbnail sizes and resend necessary "
943
  "image optimization requests."
944
  msgstr ""
945
 
946
+ #: admin/tpl/image_optimization.php:250
947
  msgid "Reset IAPI Key"
948
  msgstr ""
949
 
950
+ #: admin/tpl/image_optimization.php:253
951
  msgid ""
952
  "The current IAPI key must be reset after changing home URL or domain before "
953
  "making any further optimization requests."
954
  msgstr ""
955
 
956
+ #: admin/tpl/image_optimization.php:258
957
  msgid "Destroy All Optimization Data!"
958
  msgstr ""
959
 
960
+ #: admin/tpl/image_optimization.php:261
961
  msgid ""
962
  "Remove all previous image optimization requests/results, revert completed "
963
  "optimizations, and delete all optimization files."
964
  msgstr ""
965
 
966
+ #: admin/tpl/image_optimization.php:263
967
  #: admin/tpl/setting/settings_advanced.php:50
968
  #: admin/tpl/setting/settings_cdn.php:97
969
  #: admin/tpl/setting/settings_crawler.php:22
970
  #: admin/tpl/setting/settings_crawler.php:95
971
  #: admin/tpl/setting/settings_crawler.php:100
972
+ #: admin/tpl/setting/settings_excludes.php:66
973
+ #: admin/tpl/setting/settings_excludes.php:104
974
  #: admin/tpl/setting/settings_inc.cache_browser.php:12
975
  #: admin/tpl/setting/settings_inc.cache_favicon.php:13
976
  #: admin/tpl/setting/settings_inc.cache_mobile.php:17
985
  msgid "NOTE"
986
  msgstr ""
987
 
988
+ #: admin/tpl/image_optimization.php:264
989
  msgid ""
990
  "If there are unfinished requests in progress, the requests' credits will NOT "
991
  "be recovered."
992
  msgstr ""
993
 
994
+ #: admin/tpl/image_optimization.php:264
995
  #: admin/tpl/setting/settings_optimize.php:87
996
  #: admin/tpl/setting/settings_optimize.php:163
997
  msgid "JS Combine"
1001
  msgid "LiteSpeed Cache Import / Export"
1002
  msgstr ""
1003
 
1004
+ #: admin/tpl/import_export.php:19
1005
  msgid "Export Settings"
1006
  msgstr ""
1007
 
1008
+ #: admin/tpl/import_export.php:22
1009
  msgid "Export"
1010
  msgstr ""
1011
 
1012
+ #: admin/tpl/import_export.php:27
1013
  msgid "Last exported"
1014
  msgstr ""
1015
 
1016
+ #: admin/tpl/import_export.php:32
1017
  msgid ""
1018
  "This will export all current LiteSpeed Cache settings and save as a file."
1019
  msgstr ""
1020
 
1021
+ #: admin/tpl/import_export.php:35
1022
  msgid "Import Settings"
1023
  msgstr ""
1024
 
1025
+ #: admin/tpl/import_export.php:44
1026
  msgid "Import"
1027
  msgstr ""
1028
 
1029
+ #: admin/tpl/import_export.php:50
1030
  msgid "Last imported"
1031
  msgstr ""
1032
 
1033
+ #: admin/tpl/import_export.php:55
1034
  msgid ""
1035
  "This will import settings from a file and override all current LiteSpeed "
1036
  "Cache settings."
1040
  msgid "Rate %s on %s"
1041
  msgstr ""
1042
 
1043
+ #. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.1) #-#-#-#-#
1044
  #. Plugin Name of the plugin/theme
1045
+ #: admin/tpl/inc/admin_footer.php:6 inc/gui.class.php:341
1046
+ #: includes/litespeed-cache-gui.class.php:341
1047
  msgid "LiteSpeed Cache"
1048
  msgstr ""
1049
 
1063
  msgid "This will also generate an API key from LiteSpeed's Server."
1064
  msgstr ""
1065
 
1066
+ #: admin/tpl/inc/banner_promo.php:14 admin/tpl/inc/banner_promo.slack.php:13
1067
  msgid "Welcome to LiteSpeed"
1068
  msgstr ""
1069
 
1095
  msgid "Maybe later"
1096
  msgstr ""
1097
 
1098
+ #: admin/tpl/inc/banner_promo.slack.php:21
1099
+ msgid "Want to connect with other LiteSpeed users?"
1100
+ msgstr ""
1101
+
1102
+ #: admin/tpl/inc/banner_promo.slack.php:22
1103
+ msgid "Join the %s community."
1104
+ msgstr ""
1105
+
1106
+ #: admin/tpl/inc/banner_promo.slack.php:27
1107
+ msgid "Join Us on Slack"
1108
+ msgstr ""
1109
+
1110
+ #: admin/tpl/inc/check_cache_disabled.php:8
1111
+ msgid "LSCache Module is disabled."
1112
+ msgstr ""
1113
+
1114
+ #: admin/tpl/inc/check_cache_disabled.php:15
1115
+ msgid "LiteSpeed cache is disabled in setting."
1116
+ msgstr ""
1117
+
1118
+ #: admin/tpl/inc/check_cache_disabled.php:22
1119
+ msgid "LiteSpeed cache is disabled."
1120
+ msgstr ""
1121
+
1122
+ #: admin/tpl/inc/check_cache_disabled.php:34
1123
+ msgid "The functionalities here can not work due to:"
1124
+ msgstr ""
1125
+
1126
+ #: admin/tpl/inc/check_cache_disabled.php:42
1127
+ msgid "How to fix it?"
1128
  msgstr ""
1129
 
1130
  #: admin/tpl/inc/help_tabs.php:7
1450
  msgid "Are you sure you want to purge all?"
1451
  msgstr ""
1452
 
1453
+ #: admin/tpl/manage/manage_purge.php:61 inc/gui.class.php:394
1454
+ #: includes/litespeed-cache-gui.class.php:394
1455
  msgid "Object Cache Purge All"
1456
  msgstr ""
1457
 
1459
  msgid "Purge all the object caches"
1460
  msgstr ""
1461
 
1462
+ #: admin/tpl/manage/manage_purge.php:71 inc/gui.class.php:404
1463
+ #: includes/litespeed-cache-gui.class.php:404
1464
  msgid "Opcode Cache Purge All"
1465
  msgstr ""
1466
 
1494
  msgid "If only the WordPress site should be purged, use purge all."
1495
  msgstr ""
1496
 
1497
+ #: admin/tpl/manage/manage_purge.php:98 admin/tpl/manage.php:5
1498
+ #: admin/tpl/network_settings.php:7 admin/tpl/settings.php:7
1499
  msgid "Purge"
1500
  msgstr ""
1501
 
1502
+ #: admin/tpl/manage/manage_purge.php:129
1503
  msgid "Purge By..."
1504
  msgstr ""
1505
 
1506
+ #: admin/tpl/manage/manage_purge.php:131
1507
  msgid "Select below for \"Purge by\" options."
1508
  msgstr ""
1509
 
1510
+ #: admin/tpl/manage/manage_purge.php:132
1511
+ #: admin/tpl/setting/settings_cache.php:73
1512
+ #: admin/tpl/setting/settings_cache.php:90
1513
  #: admin/tpl/setting/settings_cdn.php:116
1514
+ #: admin/tpl/setting/settings_cdn.php:143
1515
  #: admin/tpl/setting/settings_crawler.php:132
1516
+ #: admin/tpl/setting/settings_excludes.php:25
1517
+ #: admin/tpl/setting/settings_excludes.php:39
1518
+ #: admin/tpl/setting/settings_excludes.php:62
1519
+ #: admin/tpl/setting/settings_excludes.php:100
1520
  #: admin/tpl/setting/settings_inc.cache_object.php:114
1521
  #: admin/tpl/setting/settings_inc.cache_object.php:122
1522
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:19
1523
  #: admin/tpl/setting/settings_media.php:34
1524
  #: admin/tpl/setting/settings_optimize.php:177
1525
+ #: admin/tpl/setting/settings_purge.php:85
1526
  #: admin/tpl/setting/settings_tuning.php:38
1527
  #: admin/tpl/setting/settings_tuning.php:74
1528
  #: admin/tpl/setting/settings_tuning.php:146
1530
  msgid "One per line."
1531
  msgstr ""
1532
 
1533
+ #: admin/tpl/manage/manage_purge.php:159
1534
  msgid "Category"
1535
  msgstr ""
1536
 
1537
+ #: admin/tpl/manage/manage_purge.php:165
1538
  msgid "Post ID"
1539
  msgstr ""
1540
 
1541
+ #: admin/tpl/manage/manage_purge.php:171
1542
  msgid "Tag"
1543
  msgstr ""
1544
 
1545
+ #: admin/tpl/manage/manage_purge.php:177
1546
  msgid "URL"
1547
  msgstr ""
1548
 
1549
+ #: admin/tpl/manage/manage_purge.php:183
1550
  msgid ""
1551
  "Purge pages by category name - e.g. %2$s should be used for the URL %1$s."
1552
  msgstr ""
1553
 
1554
+ #: admin/tpl/manage/manage_purge.php:188
1555
  msgid "Purge pages by post ID."
1556
  msgstr ""
1557
 
1558
+ #: admin/tpl/manage/manage_purge.php:192
1559
  msgid "Purge pages by tag name - e.g. %2$s should be used for the URL %1$s."
1560
  msgstr ""
1561
 
1562
+ #: admin/tpl/manage/manage_purge.php:197
1563
  msgid "Purge pages by relative or full URL."
1564
  msgstr ""
1565
 
1566
+ #: admin/tpl/manage/manage_purge.php:198
1567
  msgid "e.g. Use %s or %s."
1568
  msgstr ""
1569
 
1570
+ #: admin/tpl/manage/manage_purge.php:211
1571
  msgid "Purge List"
1572
  msgstr ""
1573
 
1574
+ #: admin/tpl/manage.php:6
1575
  msgid "DB Optimizer"
1576
  msgstr ""
1577
 
1578
+ #: admin/tpl/manage.php:10 admin/tpl/setting/settings_cdn.php:204
1579
+ #: admin/tpl/setting/settings_cdn.php:247 admin/tpl/settings.php:12
1580
  msgid "CDN"
1581
  msgstr ""
1582
 
1583
+ #: admin/tpl/manage.php:20
1584
  msgid "LiteSpeed Cache Network Management"
1585
  msgstr ""
1586
 
1587
+ #: admin/tpl/manage.php:23
1588
  msgid "LiteSpeed Cache Management"
1589
  msgstr ""
1590
 
1591
  #: admin/tpl/network_settings.php:5 admin/tpl/setting/settings_general.php:7
1592
+ #: admin/tpl/settings.php:5
1593
  msgid "General"
1594
  msgstr ""
1595
 
1596
+ #: admin/tpl/network_settings.php:6 admin/tpl/settings.php:6
1597
  msgid "Cache"
1598
  msgstr ""
1599
 
1600
+ #: admin/tpl/network_settings.php:8 admin/tpl/settings.php:8
1601
  msgid "Excludes"
1602
  msgstr ""
1603
 
1604
+ #: admin/tpl/network_settings.php:9 admin/tpl/settings.php:11
1605
  msgid "Media"
1606
  msgstr ""
1607
 
1608
  #: admin/tpl/network_settings.php:10 admin/tpl/setting/settings_debug.php:68
1609
+ #: admin/tpl/settings.php:14
1610
  msgid "Advanced"
1611
  msgstr ""
1612
 
1770
  msgid "Cache Control Settings"
1771
  msgstr ""
1772
 
1773
+ #: admin/tpl/setting/settings_cache.php:14
1774
  msgid "Cache Logged-in Users"
1775
  msgstr ""
1776
 
1777
+ #: admin/tpl/setting/settings_cache.php:18
1778
  msgid "Privately cache frontend pages for logged-in users. (LSWS %s required)"
1779
  msgstr ""
1780
 
1781
+ #: admin/tpl/setting/settings_cache.php:24
1782
  msgid "Cache Commenters"
1783
  msgstr ""
1784
 
1785
+ #: admin/tpl/setting/settings_cache.php:28
1786
  msgid ""
1787
  "Privately cache commenters that have pending comments. Disabling this option "
1788
  "will serve non-cacheable pages to commenters. (LSWS %s required)"
1789
  msgstr ""
1790
 
1791
+ #: admin/tpl/setting/settings_cache.php:34
1792
  msgid "Cache REST API"
1793
  msgstr ""
1794
 
1795
+ #: admin/tpl/setting/settings_cache.php:38
1796
  msgid "Cache requests made by WordPress REST API calls."
1797
  msgstr ""
1798
 
1799
+ #: admin/tpl/setting/settings_cache.php:44
1800
  msgid "Cache Login Page"
1801
  msgstr ""
1802
 
1803
+ #: admin/tpl/setting/settings_cache.php:48
1804
  msgid "Disabling this option may negatively affect performance."
1805
  msgstr ""
1806
 
1807
+ #: admin/tpl/setting/settings_cache.php:62
1808
  msgid "Private Cached URIs"
1809
  msgstr ""
1810
 
1811
+ #: admin/tpl/setting/settings_cache.php:66
1812
  msgid "URI Paths containing these strings will NOT be cached as public."
1813
  msgstr ""
1814
 
1815
+ #: admin/tpl/setting/settings_cache.php:67
1816
+ #: admin/tpl/setting/settings_excludes.php:19
1817
  msgid "The URLs will be compared to the REQUEST_URI server variable."
1818
  msgstr ""
1819
 
1820
+ #: admin/tpl/setting/settings_cache.php:68
1821
+ #: admin/tpl/setting/settings_excludes.php:20
1822
  #: admin/tpl/setting/settings_tuning.php:174
1823
  msgid "For example, for %s, %s can be used here."
1824
  msgstr ""
1825
 
1826
+ #: admin/tpl/setting/settings_cache.php:71
1827
+ #: admin/tpl/setting/settings_excludes.php:23
1828
  msgid "To match the beginning, add %s to the beginning of the item."
1829
  msgstr ""
1830
 
1831
+ #: admin/tpl/setting/settings_cache.php:72
1832
+ #: admin/tpl/setting/settings_excludes.php:24
1833
  msgid "To do an exact match, add %s to the end of the URL."
1834
  msgstr ""
1835
 
1836
+ #: admin/tpl/setting/settings_cache.php:80
1837
  msgid "Drop Query String"
1838
  msgstr ""
1839
 
1840
+ #: admin/tpl/setting/settings_cache.php:84
1841
  msgid "Ignore certain query strings when caching."
1842
  msgstr ""
1843
 
1844
+ #: admin/tpl/setting/settings_cache.php:85
1845
  msgid "For example, to drop parameters beginning with %s, %s can be used here."
1846
  msgstr ""
1847
 
1936
  "match %2$s and %3$s, use %4$s."
1937
  msgstr ""
1938
 
1939
+ #: admin/tpl/setting/settings_cdn.php:131
1940
+ msgid "Separate multiple original URLs with a %s."
1941
+ msgstr ""
1942
+
1943
+ #: admin/tpl/setting/settings_cdn.php:137
1944
  msgid "Exclude Path"
1945
  msgstr ""
1946
 
1947
+ #: admin/tpl/setting/settings_cdn.php:142
1948
  msgid "Paths containing these strings will not be served from the CDN."
1949
  msgstr ""
1950
 
1951
+ #: admin/tpl/setting/settings_cdn.php:149
1952
  msgid "Load JQuery Remotely"
1953
  msgstr ""
1954
 
1955
+ #: admin/tpl/setting/settings_cdn.php:155
1956
  #: admin/tpl/setting/settings_debug.php:19
1957
  msgid "Off"
1958
  msgstr ""
1959
 
1960
+ #: admin/tpl/setting/settings_cdn.php:171
1961
  msgid ""
1962
  "Improve page load time by loading jQuery from a remote CDN service instead "
1963
  "of locally."
1964
  msgstr ""
1965
 
1966
+ #: admin/tpl/setting/settings_cdn.php:177
1967
  msgid "Quic Cloud API"
1968
  msgstr ""
1969
 
1970
+ #: admin/tpl/setting/settings_cdn.php:181
1971
+ #: admin/tpl/setting/settings_cdn.php:246
1972
  msgid "Use %s API functionality."
1973
  msgstr ""
1974
 
1975
+ #: admin/tpl/setting/settings_cdn.php:204
1976
+ #: admin/tpl/setting/settings_cdn.php:247
1977
  msgid "This can be managed from <a %2$s>%1$s</a>."
1978
  msgstr ""
1979
 
1980
+ #: admin/tpl/setting/settings_cdn.php:208
1981
+ #: admin/tpl/setting/settings_cdn.php:251
1982
  msgid "Email Address"
1983
  msgstr ""
1984
 
1985
+ #: admin/tpl/setting/settings_cdn.php:212
1986
+ #: admin/tpl/setting/settings_cdn.php:255
1987
  msgid "Your Email address on %s."
1988
  msgstr ""
1989
 
1990
+ #: admin/tpl/setting/settings_cdn.php:217
1991
  msgid "User API Key"
1992
  msgstr ""
1993
 
1994
+ #: admin/tpl/setting/settings_cdn.php:221
1995
+ #: admin/tpl/setting/settings_cdn.php:264
1996
  msgid "Your API key is used to access %s APIs."
1997
  msgstr ""
1998
 
1999
+ #: admin/tpl/setting/settings_cdn.php:222
2000
+ #: admin/tpl/setting/settings_cdn.php:265
2001
  msgid "Get it from <a %1$s>%2$s</a>."
2002
  msgstr ""
2003
 
2004
+ #: admin/tpl/setting/settings_cdn.php:227
2005
  msgid "Site Domain"
2006
  msgstr ""
2007
 
2008
+ #: admin/tpl/setting/settings_cdn.php:233
2009
+ #: admin/tpl/setting/settings_cdn.php:278
2010
  msgid "You can just type part of the domain."
2011
  msgstr ""
2012
 
2013
+ #: admin/tpl/setting/settings_cdn.php:234
2014
+ #: admin/tpl/setting/settings_cdn.php:279
2015
  msgid ""
2016
  "Once saved, it will be matched with the current list and completed "
2017
  "automatically."
2018
  msgstr ""
2019
 
2020
+ #: admin/tpl/setting/settings_cdn.php:242
2021
  msgid "Cloudflare API"
2022
  msgstr ""
2023
 
2024
+ #: admin/tpl/setting/settings_cdn.php:260
2025
  msgid "Global API Key"
2026
  msgstr ""
2027
 
2028
+ #: admin/tpl/setting/settings_cdn.php:270
2029
  msgid "Domain"
2030
  msgstr ""
2031
 
2366
  msgid "ESI Settings"
2367
  msgstr ""
2368
 
2369
+ #: admin/tpl/setting/settings_esi.php:14
2370
  msgid ""
2371
  "With ESI (Edge Side Includes), pages may be served from cache for logged-in "
2372
  "users."
2373
  msgstr ""
2374
 
2375
+ #: admin/tpl/setting/settings_esi.php:15
2376
  msgid ""
2377
  "ESI allows you to designate parts of your dynamic page as separate fragments "
2378
  "that are then assembled together to make the whole page. In other words, ESI "
2381
  "cached at all."
2382
  msgstr ""
2383
 
2384
+ #: admin/tpl/setting/settings_esi.php:17
2385
  msgid "Learn more about public cache vs. private cache <a %s>on our blog</a>."
2386
  msgstr ""
2387
 
2388
+ #: admin/tpl/setting/settings_esi.php:22
2389
  msgid "<a %s>ESI sample for developers</a>."
2390
  msgstr ""
2391
 
2392
+ #: admin/tpl/setting/settings_esi.php:31
2393
  msgid "Available in LiteSpeed Enterprise version"
2394
  msgstr ""
2395
 
2396
+ #: admin/tpl/setting/settings_esi.php:41
2397
  msgid ""
2398
  "Enable caches public pages for logged in users and serves the Admin Bar and "
2399
  "Comment Form via ESI blocks. These two blocks will be uncached unless "
2400
  "enabled below."
2401
  msgstr ""
2402
 
2403
+ #: admin/tpl/setting/settings_esi.php:47
2404
  msgid "Cache Admin Bar"
2405
  msgstr ""
2406
 
2407
+ #: admin/tpl/setting/settings_esi.php:51
2408
  msgid "Cache the build-in Admin Bar ESI block."
2409
  msgstr ""
2410
 
2411
+ #: admin/tpl/setting/settings_esi.php:57
2412
  msgid "Cache Comment Form"
2413
  msgstr ""
2414
 
2415
+ #: admin/tpl/setting/settings_esi.php:61
2416
  msgid "Cache the build-in Comment Form ESI block."
2417
  msgstr ""
2418
 
2419
+ #: admin/tpl/setting/settings_esi.php:67
2420
  msgid "Vary Group"
2421
  msgstr ""
2422
 
2423
+ #: admin/tpl/setting/settings_esi.php:82
2424
  msgid ""
2425
  "If your site contains public content that certain user roles can see but "
2426
  "other roles cannot, you can specify a Vary Group for those user roles. For "
2433
  msgid "Do Not Cache Settings"
2434
  msgstr ""
2435
 
2436
+ #: admin/tpl/setting/settings_excludes.php:14
2437
  msgid "Do Not Cache URIs"
2438
  msgstr ""
2439
 
2440
+ #: admin/tpl/setting/settings_excludes.php:18
2441
  msgid "Paths containing these strings will not be cached."
2442
  msgstr ""
2443
 
2444
+ #: admin/tpl/setting/settings_excludes.php:32
2445
  msgid "Do Not Cache Query Strings"
2446
  msgstr ""
2447
 
2448
+ #: admin/tpl/setting/settings_excludes.php:36
2449
  msgid "Query string containing these parameters will not be cached."
2450
  msgstr ""
2451
 
2452
+ #: admin/tpl/setting/settings_excludes.php:37
2453
  msgid "For example, for %s, %s and %s can be used here."
2454
  msgstr ""
2455
 
2456
+ #: admin/tpl/setting/settings_excludes.php:46
2457
  msgid "Do Not Cache Categories"
2458
  msgstr ""
2459
 
2460
+ #: admin/tpl/setting/settings_excludes.php:59
2461
  msgid "All categories are cached by default."
2462
  msgstr ""
2463
 
2464
+ #: admin/tpl/setting/settings_excludes.php:60
2465
+ #: admin/tpl/setting/settings_excludes.php:98
2466
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:16
2467
  #: admin/tpl/setting/settings_inc.exclude_useragent.php:15
2468
  msgid "To prevent %s from being cached, enter it here."
2469
  msgstr ""
2470
 
2471
+ #: admin/tpl/setting/settings_excludes.php:60
2472
  msgid "categories"
2473
  msgstr ""
2474
 
2475
+ #: admin/tpl/setting/settings_excludes.php:68
2476
  msgid ""
2477
  "If the category slug is not found, the category will be removed from the "
2478
  "list on save."
2479
  msgstr ""
2480
 
2481
+ #: admin/tpl/setting/settings_excludes.php:69
2482
+ #: admin/tpl/setting/settings_excludes.php:107
2483
  msgid "To exclude %1$s, insert %2$s."
2484
  msgstr ""
2485
 
2486
+ #: admin/tpl/setting/settings_excludes.php:77
2487
  msgid "Do Not Cache Tags"
2488
  msgstr ""
2489
 
2490
+ #: admin/tpl/setting/settings_excludes.php:97
2491
  msgid "All tags are cached by default."
2492
  msgstr ""
2493
 
2494
+ #: admin/tpl/setting/settings_excludes.php:98
2495
  msgid "tags"
2496
  msgstr ""
2497
 
2498
+ #: admin/tpl/setting/settings_excludes.php:106
2499
  msgid ""
2500
  "If the tag slug is not found, the tag will be removed from the list on save."
2501
  msgstr ""
2502
 
2503
+ #: admin/tpl/setting/settings_excludes.php:127
2504
  msgid "Do Not Cache Roles"
2505
  msgstr ""
2506
 
2507
+ #: admin/tpl/setting/settings_excludes.php:133
2508
  msgid "Selected roles will be excluded from cache."
2509
  msgstr ""
2510
 
2511
+ #: admin/tpl/setting/settings_general.php:15
2512
  msgid "Enable LiteSpeed Cache"
2513
  msgstr ""
2514
 
2515
+ #: admin/tpl/setting/settings_general.php:44
2516
  msgid "Use Network Admin Setting"
2517
  msgstr ""
2518
 
2519
+ #: admin/tpl/setting/settings_general.php:50
2520
  msgid "Please visit the <a %s>Information</a> page on how to test the cache."
2521
  msgstr ""
2522
 
2523
+ #: admin/tpl/setting/settings_general.php:53
2524
  #: admin/tpl/setting/settings_optimize.php:19
2525
  msgid "NOTICE"
2526
  msgstr ""
2527
 
2528
+ #: admin/tpl/setting/settings_general.php:53
2529
  msgid ""
2530
  "When disabling the cache, all cached entries for this blog will be purged."
2531
  msgstr ""
2532
 
2533
+ #: admin/tpl/setting/settings_general.php:55
2534
  msgid "The network admin setting can be overridden here."
2535
  msgstr ""
2536
 
2537
+ #: admin/tpl/setting/settings_general.php:62
2538
  msgid "Default Public Cache TTL"
2539
  msgstr ""
2540
 
2541
+ #: admin/tpl/setting/settings_general.php:67
2542
  msgid ""
2543
  "Specify how long, in seconds, public pages are cached. Minimum is 30 seconds."
2544
  msgstr ""
2545
 
2546
+ #: admin/tpl/setting/settings_general.php:74
2547
  msgid "Default Private Cache TTL"
2548
  msgstr ""
2549
 
2550
+ #: admin/tpl/setting/settings_general.php:79
2551
  msgid ""
2552
  "Specify how long, in seconds, private pages are cached. Minimum is %1$s "
2553
  "seconds. Maximum is %2$s seconds."
2554
  msgstr ""
2555
 
2556
+ #: admin/tpl/setting/settings_general.php:86
2557
  msgid "Default Front Page TTL"
2558
  msgstr ""
2559
 
2560
+ #: admin/tpl/setting/settings_general.php:91
2561
  msgid ""
2562
  "Specify how long, in seconds, the front page is cached. Minimum is 30 "
2563
  "seconds."
2564
  msgstr ""
2565
 
2566
+ #: admin/tpl/setting/settings_general.php:98
2567
  msgid "Default Feed TTL"
2568
  msgstr ""
2569
 
2570
+ #: admin/tpl/setting/settings_general.php:103
2571
  msgid "Specify how long, in seconds, feeds are cached."
2572
  msgstr ""
2573
 
2574
+ #: admin/tpl/setting/settings_general.php:104
2575
  msgid "If this is set to a number less than 30, feeds will not be cached."
2576
  msgstr ""
2577
 
2578
+ #: admin/tpl/setting/settings_general.php:111
2579
  msgid "Default 404 Page TTL"
2580
  msgstr ""
2581
 
2582
+ #: admin/tpl/setting/settings_general.php:116
2583
  msgid "Specify how long, in seconds, 404 pages are cached."
2584
  msgstr ""
2585
 
2586
+ #: admin/tpl/setting/settings_general.php:117
2587
  msgid "If this is set to a number less than 30, 404 pages will not be cached."
2588
  msgstr ""
2589
 
2590
+ #: admin/tpl/setting/settings_general.php:124
2591
  msgid "Default 403 Page TTL"
2592
  msgstr ""
2593
 
2594
+ #: admin/tpl/setting/settings_general.php:129
2595
  msgid "Specify how long, in seconds, 403 pages are cached."
2596
  msgstr ""
2597
 
2598
+ #: admin/tpl/setting/settings_general.php:130
2599
  msgid "If this is set to a number less than 30, 403 pages will not be cached."
2600
  msgstr ""
2601
 
2602
+ #: admin/tpl/setting/settings_general.php:137
2603
  msgid "Default 500 Page TTL"
2604
  msgstr ""
2605
 
2606
+ #: admin/tpl/setting/settings_general.php:142
2607
  msgid "Specify how long, in seconds, 500 pages are cached."
2608
  msgstr ""
2609
 
2610
+ #: admin/tpl/setting/settings_general.php:143
2611
  msgid "If this is set to a number less than 30, 500 pages will not be cached."
2612
  msgstr ""
2613
 
3282
  msgid "Purge Settings"
3283
  msgstr ""
3284
 
3285
+ #: admin/tpl/setting/settings_purge.php:16
3286
  msgid "All pages"
3287
  msgstr ""
3288
 
3289
+ #: admin/tpl/setting/settings_purge.php:17
3290
  msgid "Front page"
3291
  msgstr ""
3292
 
3293
+ #: admin/tpl/setting/settings_purge.php:18
3294
  msgid "Home page"
3295
  msgstr ""
3296
 
3297
+ #: admin/tpl/setting/settings_purge.php:19
3298
  msgid "Pages"
3299
  msgstr ""
3300
 
3301
+ #: admin/tpl/setting/settings_purge.php:21
3302
  msgid "All pages with Recent Posts Widget"
3303
  msgstr ""
3304
 
3305
+ #: admin/tpl/setting/settings_purge.php:23
3306
  msgid "Author archive"
3307
  msgstr ""
3308
 
3309
+ #: admin/tpl/setting/settings_purge.php:24
3310
  msgid "Post type archive"
3311
  msgstr ""
3312
 
3313
+ #: admin/tpl/setting/settings_purge.php:26
3314
  msgid "Yearly archive"
3315
  msgstr ""
3316
 
3317
+ #: admin/tpl/setting/settings_purge.php:27
3318
  msgid "Monthly archive"
3319
  msgstr ""
3320
 
3321
+ #: admin/tpl/setting/settings_purge.php:28
3322
  msgid "Daily archive"
3323
  msgstr ""
3324
 
3325
+ #: admin/tpl/setting/settings_purge.php:30
3326
  msgid "Term archive (include category, tag, and tax)"
3327
  msgstr ""
3328
 
3329
+ #: admin/tpl/setting/settings_purge.php:50
3330
  msgid "Auto Purge Rules For Publish/Update"
3331
  msgstr ""
3332
 
3333
+ #: admin/tpl/setting/settings_purge.php:53
3334
  #: thirdparty/lscwp-3rd-woocommerce.cls.php:858
3335
  msgid "Note"
3336
  msgstr ""
3337
 
3338
+ #: admin/tpl/setting/settings_purge.php:55
3339
  msgid ""
3340
  "Select \"All\" if there are dynamic widgets linked to posts on pages other "
3341
  "than the front or home pages."
3342
  msgstr ""
3343
 
3344
+ #: admin/tpl/setting/settings_purge.php:56
3345
  msgid "Other checkboxes will be ignored."
3346
  msgstr ""
3347
 
3348
+ #: admin/tpl/setting/settings_purge.php:57
3349
  msgid ""
3350
  "Select only the archive types that are currently used, the others can be "
3351
  "left unchecked."
3352
  msgstr ""
3353
 
3354
+ #: admin/tpl/setting/settings_purge.php:73
3355
  msgid ""
3356
  "Select which pages will be automatically purged when posts are published/"
3357
  "updated."
3358
  msgstr ""
3359
 
3360
+ #: admin/tpl/setting/settings_purge.php:79
3361
+ #: admin/tpl/setting/settings_purge.php:96
3362
  msgid "Scheduled Purge URLs"
3363
  msgstr ""
3364
 
3365
+ #: admin/tpl/setting/settings_purge.php:83
3366
  msgid ""
3367
  "The URLs here (one per line) will be purged automatically at the time set in "
3368
  "the option \"%s\"."
3369
  msgstr ""
3370
 
3371
+ #: admin/tpl/setting/settings_purge.php:83
3372
+ #: admin/tpl/setting/settings_purge.php:91
3373
  msgid "Scheduled Purge Time"
3374
  msgstr ""
3375
 
3376
+ #: admin/tpl/setting/settings_purge.php:84
3377
  msgid "Both %1$s and %2$s are acceptable."
3378
  msgstr ""
3379
 
3380
+ #: admin/tpl/setting/settings_purge.php:96
3381
  msgid "Specify the time to purge the \"%s\" list."
3382
  msgstr ""
3383
 
3384
+ #: admin/tpl/setting/settings_purge.php:97
3385
  msgid "Current server time is %s."
3386
  msgstr ""
3387
 
3537
  msgid "Selected roles will be excluded from all optimizations."
3538
  msgstr ""
3539
 
3540
+ #: admin/tpl/settings.php:9
3541
  msgid "Optimize"
3542
  msgstr ""
3543
 
3544
+ #: admin/tpl/settings.php:10
3545
  msgid "Tuning"
3546
  msgstr ""
3547
 
3548
+ #: admin/tpl/settings.php:13
3549
  msgid "ESI"
3550
  msgstr ""
3551
 
3552
+ #: admin/tpl/settings.php:15
3553
  msgid "Debug"
3554
  msgstr ""
3555
 
3556
+ #: admin/tpl/settings.php:19
3557
  msgid "Compatibilities"
3558
  msgstr ""
3559
 
3560
+ #: admin/tpl/settings.php:127
3561
  msgid "LiteSpeed Cache Settings"
3562
  msgstr ""
3563
 
3564
+ #: admin/tpl/settings.php:133
3565
  msgid "Basic View"
3566
  msgstr ""
3567
 
3568
+ #: admin/tpl/settings.php:134
3569
  msgid "Advanced View"
3570
  msgstr ""
3571
 
3572
+ #: admin/tpl/settings.php:165
3573
  msgid "The network admin selected use primary site configs for all subsites."
3574
  msgstr ""
3575
 
3576
+ #: admin/tpl/settings.php:166
3577
  msgid ""
3578
  "The following options are selected, but are not editable in this settings "
3579
  "page."
3580
  msgstr ""
3581
 
3582
+ #: admin/tpl/settings.php:188 admin/tpl/settings.php:191
3583
  msgid "Save Changes"
3584
  msgstr ""
3585
 
3599
  msgid "Purged the tags!"
3600
  msgstr ""
3601
 
3602
+ #: inc/cdn/cloudflare.class.php:113
3603
  msgid "Notified Cloudflare to set development mode to %s successfully."
3604
  msgstr ""
3605
 
3606
+ #: inc/cdn/cloudflare.class.php:131
3607
  msgid "Cloudflare API is set to off."
3608
  msgstr ""
3609
 
3610
+ #: inc/cdn/cloudflare.class.php:147
3611
  msgid "Notified Cloudflare to purge all successfully."
3612
  msgstr ""
3613
 
3614
+ #: inc/cdn/cloudflare.class.php:162
3615
  msgid "No available Cloudflare zone"
3616
  msgstr ""
3617
 
3618
+ #: inc/cdn/cloudflare.class.php:257
3619
  msgid "Communicated with Cloudflare successfully."
3620
  msgstr ""
3621
 
3622
+ #: inc/cdn/cloudflare.class.php:266
3623
  msgid "Failed to communicate with Cloudflare"
3624
  msgstr ""
3625
 
3654
  msgid "Guest"
3655
  msgstr ""
3656
 
3657
+ #: inc/gui.class.php:277 includes/litespeed-cache-gui.class.php:277
3658
  msgid "Purge this page"
3659
  msgstr ""
3660
 
3661
+ #: inc/gui.class.php:285 includes/litespeed-cache-gui.class.php:285
3662
  msgid "Mark this page as "
3663
  msgstr ""
3664
 
3665
+ #: inc/gui.class.php:292 includes/litespeed-cache-gui.class.php:292
3666
  msgid "Non cacheable"
3667
  msgstr ""
3668
 
3669
+ #: inc/gui.class.php:299 includes/litespeed-cache-gui.class.php:299
3670
  msgid "Private cache"
3671
  msgstr ""
3672
 
3673
+ #: inc/gui.class.php:306 includes/litespeed-cache-gui.class.php:306
3674
  msgid "No optimization"
3675
  msgstr ""
3676
 
3677
+ #: inc/gui.class.php:313 includes/litespeed-cache-gui.class.php:313
3678
  msgid "More settings"
3679
  msgstr ""
3680
 
3681
+ #: inc/gui.class.php:333 inc/gui.class.php:375
3682
+ #: includes/litespeed-cache-gui.class.php:333
3683
+ #: includes/litespeed-cache-gui.class.php:375
3684
  msgid "LiteSpeed Cache Purge All"
3685
  msgstr ""
3686
 
3687
+ #: inc/gui.class.php:384 includes/litespeed-cache-gui.class.php:384
3688
  msgid "Cloudflare Purge All"
3689
  msgstr ""
3690
 
3696
  msgid "Communicated with LiteSpeed Image Optimization Server successfully."
3697
  msgstr ""
3698
 
3699
+ #: inc/img_optm.class.php:134 inc/img_optm.class.php:1154
3700
+ #: inc/img_optm.class.php:1219
3701
  msgid "No image found."
3702
  msgstr ""
3703
 
3705
  msgid "Number of images in one image group (%s) exceeds the credit (%s)"
3706
  msgstr ""
3707
 
3708
+ #: inc/img_optm.class.php:189
3709
+ msgid "Requested successfully."
3710
+ msgstr ""
3711
+
3712
  #: inc/img_optm.class.php:209
3713
  msgid "Optimized successfully."
3714
  msgstr ""
3755
  msgid "Imported setting file %s successfully."
3756
  msgstr ""
3757
 
3758
+ #: inc/litespeed-cache.class.php:264 includes/litespeed-cache.class.php:264
3759
  msgid "Crawler blacklist is saved."
3760
  msgstr ""
3761
 
3762
+ #: inc/litespeed-cache.class.php:269 includes/litespeed-cache.class.php:269
3763
  msgid "Notified LiteSpeed Web Server to purge the front page."
3764
  msgstr ""
3765
 
3766
+ #: inc/litespeed-cache.class.php:274 includes/litespeed-cache.class.php:274
3767
  msgid "Notified LiteSpeed Web Server to purge pages."
3768
  msgstr ""
3769
 
3770
+ #: inc/litespeed-cache.class.php:279 includes/litespeed-cache.class.php:279
3771
  msgid "Notified LiteSpeed Web Server to purge CSS/JS entries."
3772
  msgstr ""
3773
 
3774
+ #: inc/litespeed-cache.class.php:284 includes/litespeed-cache.class.php:284
3775
  msgid "Notified LiteSpeed Web Server to purge error pages."
3776
  msgstr ""
3777
 
3778
+ #: inc/litespeed-cache.class.php:290 includes/litespeed-cache.class.php:290
3779
  msgid "Notified LiteSpeed Web Server to purge all caches."
3780
  msgstr ""
3781
 
3782
+ #: inc/litespeed-cache.class.php:297 includes/litespeed-cache.class.php:297
3783
  msgid "Notified LiteSpeed Web Server to purge everything."
3784
  msgstr ""
3785
 
3786
+ #: inc/litespeed-cache.class.php:312 includes/litespeed-cache.class.php:312
3787
  msgid "Notified LiteSpeed Web Server to purge the list."
3788
  msgstr ""
3789
 
3831
  msgid "Purge all object caches successfully."
3832
  msgstr ""
3833
 
3834
+ #: inc/purge.class.php:294 includes/litespeed-cache-purge.class.php:294
3835
  msgid "Purge category %s"
3836
  msgstr ""
3837
 
3838
+ #: inc/purge.class.php:321 includes/litespeed-cache-purge.class.php:321
3839
  msgid "Purge Post ID %s"
3840
  msgstr ""
3841
 
3842
+ #: inc/purge.class.php:350 includes/litespeed-cache-purge.class.php:350
3843
  msgid "Purge tag %s"
3844
  msgstr ""
3845
 
3846
+ #: inc/purge.class.php:384 includes/litespeed-cache-purge.class.php:384
3847
  msgid "Purge url %s"
3848
  msgstr ""
3849
 
3891
  msgid "Stopped due to load over limit"
3892
  msgstr ""
3893
 
3894
+ #: lib/litespeed/litespeed-file.class.php:131
3895
  msgid "Folder does not exist: %s"
3896
  msgstr ""
3897
 
3898
+ #: lib/litespeed/litespeed-file.class.php:140
3899
  msgid "Can not create folder: %1$s. Error: %2$s"
3900
  msgstr ""
3901
 
3902
+ #: lib/litespeed/litespeed-file.class.php:148
3903
  msgid "Folder is not writable: %s."
3904
  msgstr ""
3905
 
3906
+ #: lib/litespeed/litespeed-file.class.php:155
3907
+ #: lib/litespeed/litespeed-file.class.php:160
3908
  msgid "File %s is not writable."
3909
  msgstr ""
3910
 
3911
+ #: lib/litespeed/litespeed-file.class.php:165
3912
  msgid "Failed to write to %s."
3913
  msgstr ""
3914
 
lib/litespeed/litespeed-file.class.php CHANGED
@@ -22,6 +22,22 @@ class Litespeed_File
22
  // nothing to do here
23
  }
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  public static function count_lines($filename)
26
  {
27
  if ( ! file_exists($filename) ) {
22
  // nothing to do here
23
  }
24
 
25
+ /**
26
+ * Delete folder
27
+ *
28
+ * @since 2.1
29
+ */
30
+ public static function rrmdir( $dir ) {
31
+
32
+ $files = array_diff( scandir( $dir ), array( '.', '..' ) ) ;
33
+
34
+ foreach ( $files as $file ) {
35
+ is_dir( "$dir/$file" ) ? self::rrmdir( "$dir/$file" ) : unlink( "$dir/$file" ) ;
36
+ }
37
+
38
+ return rmdir( $dir ) ;
39
+ }
40
+
41
  public static function count_lines($filename)
42
  {
43
  if ( ! file_exists($filename) ) {
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: WordPress plugin to connect to LSCache on LiteSpeed Web Server.
18
- * Version: 2.0
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: WordPress plugin to connect to LSCache on LiteSpeed Web Server.
18
+ * Version: 2.1
19
  * Author: LiteSpeed Technologies
20
  * Author URI: https://www.litespeedtech.com
21
  * License: GPLv3
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === LiteSpeed Cache ===
2
  Contributors: LiteSpeedTech
3
- Tags: cache, wp-cache, litespeed, super cache, http2, total cache, optimize
4
  Requires at least: 4.0
5
  Tested up to: 4.9.4
6
- Stable tag: 2.0
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
@@ -11,143 +11,141 @@ Speed up your page-load times. Get a faster site with high-performance page cach
11
 
12
  == Description ==
13
 
14
- LiteSpeed Cache for WordPress (LSCWP) communicates with your LiteSpeed Web Server and its built-in page cache (LSCache) to deliver superior performance to your WordPress site.
15
 
16
- LSCache is a server-level cache, so it's faster than PHP-level caches. [Benchmarks: Comparison with other PHP-based caches](https://www.litespeedtech.com/benchmarks/wordpress).
17
-
18
- A page cache allows the server to bypass PHP and database queries altogether. LSCache, in particular, because of its close relationship with the server, can remember things about the cache entries that other plugins cannot, and it can analyze dependencies. It can utilize tags to manage the smart purging of the cache, and it can use vary cookies to serve multiple versions of cached content based on things like mobile vs. desktop, geographic location, and currencies.
19
-
20
- If all of that sounds complicated, no need to worry. LSCWP works right out of the box with default settings that are appropriate for most sites. And if you do need help, we're just [a forum post](https://wordpress.org/support/plugin/litespeed-cache/) away.
21
-
22
- LSCWP supports WordPress Multisite and is compatible with most popular plugins, including WooCommerce, bbPress, and Yoast SEO. Scroll down for a complete list.
23
-
24
- LSCWP includes additional optimization features, such as Database Optimization, Minification and Combination of CSS and JS files, HTTP/2 push CDN support, Browser Cache, Object Cache, Lazyload images and image optimization!
25
-
26
- Want to know more about caching in general, and LiteSpeed caching in particular? See [our Caching 101 blog series](https://blog.litespeedtech.com/tag/caching-101/).
27
-
28
- [Join our Slack community](https://goo.gl/FG9S4N).
29
-
30
- == Installation ==
31
-
32
- 1. Install [LiteSpeed Web Server Enterprise](https://www.litespeedtech.com/products/litespeed-web-server) with LSCache Module, [LiteSpeed Web ADC](https://www.litespeedtech.com/products/litespeed-web-adc), or [OpenLiteSpeed](https://www.litespeedtech.com/open-source/openlitespeed) with cache module [Free].
33
- 2. Install the LiteSpeed Cache for WordPress plugin and activate it.
34
- 3. From the WordPress Dashboard, navigate to *LiteSpeed Cache -> Settings*, make sure the option *Enable LiteSpeed Cache* is set to `Enable`.
35
- 4. Enjoy!
36
-
37
- = Notes for LiteSpeed Web Server Enterprise =
38
-
39
- * Make sure that your license includes the LSCache module. A [2-CPU trial license with LSCache module](https://www.litespeedtech.com/products/litespeed-web-server/download/get-a-trial-license "trial license") is available for free for 15 days.
40
- * The server must be configured to have caching enabled. If you are the server admin, [click here](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:common_installation#web_server_configuration) for instructions. Otherwise, please request that the server admin configure the cache root for the server.
41
-
42
- = Notes for OpenLiteSpeed =
43
-
44
- * This integration utilizes OpenLiteSpeed's cache module.
45
- * If it is a fresh OLS installation, the easiest way to integrate is to use [ols1clk](http://open.litespeedtech.com/mediawiki/index.php/Help:1-Click_Install). If using an existing WordPress installation, use the `--wordpresspath` parameter.
46
- * If OLS and WordPress are both already installed, please follow the instructions in [How To Set Up LSCache For WordPress](http://open.litespeedtech.com/mediawiki/index.php/Help:How_To_Set_Up_LSCache_For_WordPress).
47
 
48
  == Plugin Features ==
49
 
50
- LiteSpeed Web Server Enterprise, LiteSpeed Web ADC and OpenLiteSpeed:
51
 
52
  * Image optimization
53
- * WebP image format support
54
- * PageSpeed score optimization
55
  * Load CSS/JS Asynchronously
56
- * Lazyload images/iframes
57
  * Content Delivery Network support
 
 
 
58
  * Minify CSS, JavaScript, and HTML
59
  * Combine CSS and JavaScript
60
  * HTTP/2 Push for CSS and JS
61
- * Database Cleaner and Optimizer
62
  * Object Cache (Memcached/LSMCD/Redis)
63
- * OPcode Cache
64
- * Browser Cache
65
  * DNS Prefetch
66
  * Cloudflare API
 
 
 
 
 
 
 
 
 
 
 
 
67
  * Automatic page caching to greatly improve site performance
68
  * Automatic purge of related pages based on certain events
69
- * Smart preload crawler with support for SEO-friendly sitemap
70
  * Private cache for logged-in users
71
  * Caching of WordPress REST API calls
72
  * Separate caching of desktop and mobile views
73
- * Ability to schedule purge for specified URLs at specified time of day
74
- * Support for HTTP/2 & HTTPS out-of-box
75
- * Single Site and Multi Site ( Network ) support
76
- * Support for WooCommerce and bbPress
77
- * [WordPress CLI](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp#wordpress_cli)
78
- * Simple API system that enables other plugins to easily integrate with cache and operate cache functionalities.
79
- * No-Cache configuration by URI, Categories, Tags, Cookies, and User Agents
80
- * Import / Export settings
81
- * Basic / Advanced setting view
82
- * Attractive, easy-to-understand interface
83
 
84
- LiteSpeed Web Server Enterprise Edition and LiteSpeed Web ADC Only:
85
 
86
- * Support for clustered environments via LiteSpeed Web ADC
87
- * Supports [QUIC](https://blog.litespeedtech.com/2017/07/11/litespeed-announces-quic-support/) right out of the box
88
- * Supports ESI cache
89
 
90
- Please consider helping translate LiteSpeed Cache plugin at our [GlotPress project](https://translate.wordpress.org/projects/wp-plugins/litespeed-cache). Growing the LiteSpeed Cache plugin community means better software for everyone!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
 
92
- == Third Party Compatibility ==
 
 
 
 
 
93
 
94
- The vast majority of plugins and themes are compatible with LSCache. Our API is available for those that are not.
95
 
96
- = Developers =
97
 
98
- If you have a plugin or theme that you would like to make compatible with LSCWP, please see the following resources:
 
 
99
 
100
- * [LSCWP API Documentation for WordPress Plugin Developers](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:api)
101
- * [LSCWP GitHub](https://github.com/litespeedtech/lscache_wp/)
102
- * [ESI example: Use ESI for WordPress nonce with cache](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:esi_sample)
103
- * [ESI example: Make Caldera Form v1.5.6.1 work with cache](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:esi_replace)
104
- * [ESI example: Make Visual Composer's WordPress nonce work with cache](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:esi_nonce)
105
 
106
- If you have any API requirements, please inform us anytime in [WP Forum](https://wordpress.org/support/plugin/litespeed-cache) or [GitHub Issues](https://github.com/litespeedtech/lscache_wp/issues). We will add them ASAP.
107
 
108
- = Known Compatible Plugins and Themes =
 
109
 
110
- * [bbPress](https://wordpress.org/plugins/bbpress/)
111
- * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
112
- * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
113
- * [Google XML Sitemaps](https://wordpress.org/plugins/google-sitemap-generator/)
114
- * [Yoast SEO](https://wordpress.org/plugins/wordpress-seo/)
115
- * [Wordfence Security](https://wordpress.org/plugins/wordfence/)
116
- * [NextGen Gallery](https://wordpress.org/plugins/nextgen-gallery/)
117
- * [ShortPixel](https://shortpixel.com/h/af/CXNO4OI28044/)
118
- * Aelia CurrencySwitcher
119
- * [Fast Velocity Minify](https://wordpress.org/plugins/fast-velocity-minify/) - Thanks Raul Peixoto!
120
- * Autoptimize
121
- * [Better WP Minify](https://wordpress.org/plugins/bwp-minify/)
122
- * [WP Touch](https://wordpress.org/plugins/wptouch/)
123
- * [Theme My Login](https://wordpress.org/plugins/theme-my-login/)
124
- * [wpForo](https://wordpress.org/plugins/wpforo/)
125
- * [WPLister](https://www.wplab.com/plugins/wp-lister/)
126
- * [WP-PostRatings](https://wordpress.org/plugins/wp-postratings/)
127
- * [Avada 5.1 RC1+](https://avada.theme-fusion.com/)
128
- * [Elegant Themes Divi 3.0.67+](https://www.elegantthemes.com/gallery/divi/)
129
- * [Caldera Forms](https://wordpress.org/plugins/caldera-forms/) 1.5.6.2+
130
- * Login With Ajax
131
- * [Post Types Order 1.9.3.6+](https://wordpress.org/plugins/post-types-order/)
132
 
133
  == Frequently Asked Questions ==
134
 
135
- = Is the LiteSpeed Cache Plugin for WordPress free? =
 
136
 
137
- Yes, LSCWP will always be free and open source. That said, a LiteSpeed server is required, and there are fees associated with some LiteSpeed server editions (see question 2).
138
 
139
- = What server software is required for this plugin? =
 
 
 
 
 
 
 
 
140
 
141
- A LiteSpeed server is required in order to use this plugin.
142
 
143
- 1. LiteSpeed Web Server Enterprise with LSCache Module (v5.0.10+)
144
 
145
- 2. OpenLiteSpeed (v1.4.17+) - Free and open source!
146
 
147
- 3. LiteSpeed WebADC (v2.0+)
 
 
148
 
149
  Any single server or cluster including a LiteSpeed server will work.
150
 
 
 
151
  = Does this plugin work in a clustered environment? =
152
 
153
  The cache entries are stored at the LiteSpeed server level. The simplest solution is to use LiteSpeed WebADC, as the cache entries will be stored at that level.
@@ -156,7 +154,7 @@ If using another load balancer, the cache entries will only be stored at the bac
156
 
157
  The purges will also not be synchronized across the nodes, so this is not recommended.
158
 
159
- If a customized solution is required, please contact LiteSpeed Technologies at info@litespeedtech.com
160
 
161
  NOTICE: The rewrite rules created by this plugin must be copied to the Load Balancer.
162
 
@@ -168,11 +166,11 @@ Nothing is stored within the WordPress file structure.
168
 
169
  = Does LiteSpeed Cache for WordPress work with OpenLiteSpeed? =
170
 
171
- Yes it can work well with OpenLiteSpeed, although some features may not be supported. See **Plugin Features** above for details. Any setting changes that require modifying the .htaccess file will require a server restart.
172
 
173
  = Is WooCommerce supported? =
174
 
175
- In short, yes. However, for some woocommerce themes, the cart may not be updated correctly. Please [visit our blog](https://blog.litespeedtech.com/2017/05/31/wpw-fixing-lscachewoocommerce-conflicts/) for a quick tutorial on how to detect this problem and fix it if necessary.
176
 
177
  = My plugin has some pages that are not cacheable. How do I instruct the LiteSpeed Cache Plugin to not cache the page? =
178
 
@@ -186,20 +184,15 @@ Please see [our API wiki](https://www.litespeedtech.com/support/wiki/doku.php/li
186
 
187
  = Are my images optimized? =
188
 
189
- Yes we do. LSCWP v1.6+ can optimize your images.
190
 
191
  = How do I get WP-PostViews to display an updating view count? =
192
 
193
  1. Use: `<div id="postviews_lscwp"></div>`
194
-
195
  to replace
196
-
197
  `<?php if(function_exists('the_views')) { the_views(); } ?>`
198
-
199
  * NOTE: The id can be changed, but the div id and the ajax function must match.
200
-
201
- 2. Replace the ajax query in `wp-content/plugins/wp-postviews/postviews-cache.js` with
202
-
203
  `
204
  jQuery.ajax({
205
  type:"GET",
@@ -213,66 +206,86 @@ Yes we do. LSCWP v1.6+ can optimize your images.
213
  }
214
  });
215
  `
216
-
217
- 3. Purge the cache to use the updated pages.
218
 
219
  = How do I enable the crawler? =
220
 
221
  The crawler is disabled by default, and must be enabled by the server admin first.
222
 
223
- Once the crawler is enabled on the server side, navigate to **LiteSpeed Cache > Crawler** and set **Activation** to `Enable`.
224
 
225
- For more detailed information about crawler setup, please see [our blog post](https://blog.litespeedtech.com/2017/06/14/wpw-crawl-your-site-make-it-fly/).
226
 
227
  = Why are some settings tabs missing? =
228
 
229
- LSCWP has a "Basic View" and an "Advanced View." While in Basic View, you will see the following settings tabs: *General*, *Cache*, *Purge*, *Excludes*, and (optionally) *WooCommerce*. These are all that is necessary to manage the LiteSpeed Cache.
230
 
231
- Click on the `Advanced View` link at the top of the page, and several more tabs will be revealed: *Optimize*, *Tuning*, *Media*, *CDN*, *ESI*, *Advanced*, *Debug*, *Crawler*. These tabs contain more expert-level cache options as well as non-cache-related optimization functionality.
232
 
 
233
 
234
- == Screenshots ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
 
236
- 1. Plugin Benchmarks
237
- 2. Admin Settings - Cache
238
- 3. Admin Settings - Purge
239
- 4. Admin Settings - Excludes
240
- 5. Admin Settings - Optimize
241
- 6. Admin Settings - Tuning
242
- 7. Admin Settings - Media
243
- 8. Admin Settings - CDN
244
- 9. Admin Settings - ESI
245
- 10. Admin Settings - Crawler
246
- 11. Admin Settings - Thirdparty WooCommerce
247
- 12. Admin Management - Purge
248
- 13. Admin Management - DB Optimizer
249
- 14. Image Optimization
250
- 15. Admin Crawler Status Page
251
- 16. Cache Miss Example
252
- 17. Cache Hit Example
253
- 18. Frontend Adminbar Shortcut
254
 
255
  == Changelog ==
256
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  = 2.0 - Mar 7 2018 =
258
- * [NEW FEATURE] *Image Optimization* Added level up guidance.
259
- * [REFACTOR] *Image Optimization* Refactored Image Optimization class.
260
- * [IAPI] *Image Optimization* New European Image Optimization server (EU2).
261
- * [IMPROVEMENT] *Image Optimization* Manual pull action continues pulling until complete.
262
- * [IMPROVEMENT] *CDN* Multiple CDNs can now be randomized for a single resource.
263
- * [IMPROVEMENT] *Image Optimization* Improved compatibility of long src images.
264
- * [IMPROVEMENT] *Image Optimization* Reduced runtime load.
265
- * [IMPROVEMENT] *Image Optimization* Avoid potential loss/reset of notified images status when pulling.
266
- * [IMPROVEMENT] *Image Optimization* Avoid duplicated optimization for multiple records in Media that have the same image source.
267
- * [IMPROVEMENT] *Image Optimization* Fixed issue where phantom images continued to show in not-yet-requested queue.
268
- * [BUGFIX] *Core* Improved compatibility when upgrading outside of WP Admin. (@jikatal @TylorB)
269
- * [BUGFIX] *Crawler* Improved HTTP/2 compatibility to avoid erroneous blacklisting.
270
- * [BUGFIX] *Crawler* Changing Delay setting will use server variable for min value validation if set.
271
- * [UPDATE] *Crawler* Added HTTP/2 protocol switch in the Crawler settings.
272
  * [UPDATE] Removed unnecessary translation strings.
273
  * [GUI] Display translated role group name string instead of English values. (@Richard Hordern)
274
  * [GUI] Added Join LiteSpeed Slack link.
275
- * [GUI] *Import / Export* Cosmetic changes to Import Settings file field.
276
  * [INTEGRATION] Improved compatibility with WPML Media for Image Optimization. (@szmigieldesign)
277
 
278
  = 1.9.1.1 - February 20 2018 =
@@ -877,4 +890,3 @@ Click on the `Advanced View` link at the top of the page, and several more tabs
877
 
878
  = 1.0.0 - January 20 2016 =
879
  * Initial Release.
880
-
1
  === LiteSpeed Cache ===
2
  Contributors: LiteSpeedTech
3
+ Tags: cache, wp-cache, litespeed, super cache, http2, total cache, optimize, object cache, redis, memcached, lazy load, database cleaner
4
  Requires at least: 4.0
5
  Tested up to: 4.9.4
6
+ Stable tag: 2.1
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
11
 
12
  == Description ==
13
 
14
+ LiteSpeed Cache for WordPress (LSCWP) is an all-in-one site acceleration plugin, featuring an exclusive server-level cache and a collection of optimization features.
15
 
16
+ LSCWP supports WordPress Multisite and is compatible with most popular plugins, including WooCommerce, bbPress, and Yoast SEO.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  == Plugin Features ==
19
 
20
+ = General Features =
21
 
22
  * Image optimization
 
 
23
  * Load CSS/JS Asynchronously
 
24
  * Content Delivery Network support
25
+ * Database Cleaner and Optimizer
26
+ * OPcode Cache
27
+ * Lazyload images/iframes
28
  * Minify CSS, JavaScript, and HTML
29
  * Combine CSS and JavaScript
30
  * HTTP/2 Push for CSS and JS
 
31
  * Object Cache (Memcached/LSMCD/Redis)
 
 
32
  * DNS Prefetch
33
  * Cloudflare API
34
+ * Smart preload crawler with support for SEO-friendly sitemap
35
+ * Single Site and Multi Site (Network) support
36
+ * Import/Export settings
37
+ * Basic/Advanced setting view
38
+ * HTTP/2 & HTTPS support right out of the box
39
+ * Attractive, easy-to-understand interface
40
+ * WebP image format support
41
+
42
+ = LiteSpeed Exclusive Features =
43
+
44
+ * PageSpeed score optimization
45
+ * Browser Cache
46
  * Automatic page caching to greatly improve site performance
47
  * Automatic purge of related pages based on certain events
 
48
  * Private cache for logged-in users
49
  * Caching of WordPress REST API calls
50
  * Separate caching of desktop and mobile views
51
+ * Ability to schedule purge for specified URLs
52
+ * WooCommerce and bbPress support
53
+ * [WordPress CLI](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp#wordpress_cli) commands
54
+ * Simple API system for each cache integration
55
+ * Exclude from cache by URI, Category, Tag, Cookie, User Agent
56
+ * [QUIC](https://blog.litespeedtech.com/2017/07/11/litespeed-announces-quic-support/) support out of the box (Not available in OpenLiteSpeed)
57
+ * ESI (Edge Side Includes) support (Not available in OpenLiteSpeed)
 
 
 
58
 
59
+ NOTE: **LiteSpeed Exclusive Features** require the use of a LiteSpeed web server with cache module installed. **General Features** may be used by anyone with any web server.
60
 
61
+ == Screenshots ==
 
 
62
 
63
+ 1. Plugin Benchmarks
64
+ 2. Admin Settings - Cache
65
+ 3. Admin Settings - Purge
66
+ 4. Admin Settings - Excludes
67
+ 5. Admin Settings - Optimize
68
+ 6. Admin Settings - Tuning
69
+ 7. Admin Settings - Media
70
+ 8. Admin Settings - CDN
71
+ 9. Admin Settings - ESI
72
+ 10. Admin Settings - Crawler
73
+ 11. Admin Settings - Thirdparty WooCommerce
74
+ 12. Admin Management - Purge
75
+ 13. Admin Management - DB Optimizer
76
+ 14. Image Optimization
77
+ 15. Admin Crawler Status Page
78
+ 16. Cache Miss Example
79
+ 17. Cache Hit Example
80
+ 18. Frontend Adminbar Shortcut
81
 
82
+ == LSCWP Resources ==
83
+ [Join our Slack community](https://goo.gl/FG9S4N) to connect with other LiteSpeed users.
84
+ [Ask a question on our support forum](https://wordpress.org/support/plugin/litespeed-cache/).
85
+ [View detailed documentation on our wiki](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp).
86
+ [Read WordPress Wednesday tutorials on our blog](http://blog.litespeedtech.com/tag/wordpress-wednesday).
87
+ [Help translate LSCWP](https://translate.wordpress.org/projects/wp-plugins/litespeed-cache).
88
 
89
+ == Installation ==
90
 
91
+ [View detailed documentation on our wiki](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp).
92
 
93
+ = For Optimization Without a LiteSpeed Web Server =
94
+ 1. Install the LiteSpeed Cache for WordPress plugin and activate it.
95
+ 1. From the WordPress Dashboard, navigate to **LiteSpeed Cache -> Settings**. Click **Advanced View**, and enable the available optimization features in the various tabs.
96
 
97
+ = For Caching and Optimization With a LiteSpeed Web Server =
98
+ 1. Install [LiteSpeed Web Server Enterprise](https://www.litespeedtech.com/products/litespeed-web-server) with LSCache Module, [LiteSpeed Web ADC](https://www.litespeedtech.com/products/litespeed-web-adc), or [OpenLiteSpeed](https://www.litespeedtech.com/open-source/openlitespeed) with cache module [Free].
99
+ 1. Install the LiteSpeed Cache for WordPress plugin and activate it.
100
+ 1. From the WordPress Dashboard, navigate to **LiteSpeed Cache -> Settings**, make sure the option **Enable LiteSpeed Cache** is set to `Enable`.
101
+ 1. Click **Advanced View** to enable any desired optimization features in the various tabs.
102
 
103
+ = Notes for LiteSpeed Web Server Enterprise =
104
 
105
+ * Make sure that your license includes the LSCache module. A [2-CPU trial license with LSCache module](https://www.litespeedtech.com/products/litespeed-web-server/download/get-a-trial-license "trial license") is available for free for 15 days.
106
+ * The server must be configured to have caching enabled. If you are the server admin, [click here](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:common_installation#web_server_configuration) for instructions. Otherwise, please request that the server admin configure the cache root for the server.
107
 
108
+ = Notes for OpenLiteSpeed =
109
+
110
+ * This integration utilizes OpenLiteSpeed's cache module.
111
+ * If it is a fresh OLS installation, the easiest way to integrate is to use [ols1clk](http://open.litespeedtech.com/mediawiki/index.php/Help:1-Click_Install). If using an existing WordPress installation, use the `--wordpresspath` parameter.
112
+ * If OLS and WordPress are both already installed, please follow the instructions in [How To Set Up LSCache For WordPress](http://open.litespeedtech.com/mediawiki/index.php/Help:How_To_Set_Up_LSCache_For_WordPress).
113
+
114
+ == Third Party Compatibility ==
115
+
116
+ The vast majority of plugins and themes are compatible with LSCache. [Our API](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:api) is available for those that are not.
 
 
 
 
 
 
 
 
 
 
 
 
 
117
 
118
  == Frequently Asked Questions ==
119
 
120
+ = How do the Cache features of LSCache work? =
121
+ This plugin communicates with your LiteSpeed Web Server and its built-in page cache (LSCache) to deliver superior performance to your WordPress site.
122
 
123
+ 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).
124
 
125
+ A page cache allows the server to bypass PHP and database queries altogether. LSCache, in particular, because of its close relationship with the server, can remember things about the cache entries that other plugins cannot, and it can analyze dependencies. It can utilize tags to manage the smart purging of the cache, and it can use vary cookies to serve multiple versions of cached content based on things like mobile vs. desktop, geographic location, and currencies. [See our Caching 101 blog series](https://blog.litespeedtech.com/tag/caching-101/).
126
+
127
+ If all of that sounds complicated, no need to worry. LSCWP works right out of the box with default settings that are appropriate for most sites. [See the Beginner's Guide](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:beginner).
128
+
129
+ = What about the optimization features of LSCache? =
130
+
131
+ LSCWP includes additional optimization features, such as Database Optimization, Minification and Combination of CSS and JS files, HTTP/2 Push, CDN Support, Browser Cache, Object Cache, Lazy Load for Images, and Image Optimization! And now, many of these features do not require the use of a LiteSpeed web server.
132
+
133
+ = Is the LiteSpeed Cache Plugin for WordPress free? =
134
 
135
+ Yes, LSCWP will always be free and open source. That said, a LiteSpeed server is required for the **LiteSpeed Exclusive Features** (see the list above), and there are fees associated with some LiteSpeed server editions (see question 2).
136
 
137
+ = What server software is required for this plugin? =
138
 
139
+ A LiteSpeed web server is required in order to use the LiteSpeed Exclusive Features of this plugin. See **Plugin Features** above for details.
140
 
141
+ * LiteSpeed Web Server Enterprise with LSCache Module (v5.0.10+)
142
+ * OpenLiteSpeed (v1.4.17+) - Free and open source!
143
+ * LiteSpeed WebADC (v2.0+)
144
 
145
  Any single server or cluster including a LiteSpeed server will work.
146
 
147
+ The General Features may be used with any web server. LiteSpeed is not required.
148
+
149
  = Does this plugin work in a clustered environment? =
150
 
151
  The cache entries are stored at the LiteSpeed server level. The simplest solution is to use LiteSpeed WebADC, as the cache entries will be stored at that level.
154
 
155
  The purges will also not be synchronized across the nodes, so this is not recommended.
156
 
157
+ If a customized solution is required, please contact LiteSpeed Technologies at `info@litespeedtech.com`
158
 
159
  NOTICE: The rewrite rules created by this plugin must be copied to the Load Balancer.
160
 
166
 
167
  = Does LiteSpeed Cache for WordPress work with OpenLiteSpeed? =
168
 
169
+ Yes it can work well with OpenLiteSpeed, although some features may not be supported. See **Plugin Features** above for details. Any setting changes that require modifying the `.htaccess` file will require a server restart.
170
 
171
  = Is WooCommerce supported? =
172
 
173
+ In short, yes. However, for some WooCommerce themes, the cart may not be updated correctly. Please [visit our blog](https://blog.litespeedtech.com/2017/05/31/wpw-fixing-lscachewoocommerce-conflicts/) for a quick tutorial on how to detect this problem and fix it if necessary.
174
 
175
  = My plugin has some pages that are not cacheable. How do I instruct the LiteSpeed Cache Plugin to not cache the page? =
176
 
184
 
185
  = Are my images optimized? =
186
 
187
+ Not automatically. LSCWP v1.6+ can optimize your images by request. Navigate to **LiteSpeed Cache > Image Optimization**.
188
 
189
  = How do I get WP-PostViews to display an updating view count? =
190
 
191
  1. Use: `<div id="postviews_lscwp"></div>`
 
192
  to replace
 
193
  `<?php if(function_exists('the_views')) { the_views(); } ?>`
 
194
  * NOTE: The id can be changed, but the div id and the ajax function must match.
195
+ 1. Replace the ajax query in `wp-content/plugins/wp-postviews/postviews-cache.js` with
 
 
196
  `
197
  jQuery.ajax({
198
  type:"GET",
206
  }
207
  });
208
  `
209
+ 1. Purge the cache to use the updated pages.
 
210
 
211
  = How do I enable the crawler? =
212
 
213
  The crawler is disabled by default, and must be enabled by the server admin first.
214
 
215
+ Once the crawler is enabled on the server side, navigate to **LiteSpeed Cache > Crawler** and set *Activation* to `Enable`.
216
 
217
+ For more detailed information about crawler setup, please see [our wiki](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:enabling_the_crawler).
218
 
219
  = Why are some settings tabs missing? =
220
 
221
+ LSCWP has a "Basic View" and an "Advanced View." While in Basic View, you will see the following settings tabs: **General**, **Cache**, **Purge**, **Excludes**, and (optionally) **WooCommerce**. These are all that is necessary to manage the LiteSpeed Cache.
222
 
223
+ Click on the `Advanced View` link at the top of the page, and several more tabs will be revealed: **Optimize**, **Tuning**, **Media**, **CDN**, **ESI**, **Advanced**, **Debug**, **Crawler**. These tabs contain more expert-level cache options as well as non-cache-related optimization functionality.
224
 
225
+ = What are the known compatible plugins and themes? =
226
 
227
+ * [bbPress](https://wordpress.org/plugins/bbpress/)
228
+ * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
229
+ * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
230
+ * [Google XML Sitemaps](https://wordpress.org/plugins/google-sitemap-generator/)
231
+ * [Yoast SEO](https://wordpress.org/plugins/wordpress-seo/)
232
+ * [Wordfence Security](https://wordpress.org/plugins/wordfence/)
233
+ * [NextGen Gallery](https://wordpress.org/plugins/nextgen-gallery/)
234
+ * [ShortPixel](https://shortpixel.com/h/af/CXNO4OI28044/)
235
+ * Aelia CurrencySwitcher
236
+ * [Fast Velocity Minify](https://wordpress.org/plugins/fast-velocity-minify/) - Thanks Raul Peixoto!
237
+ * Autoptimize
238
+ * [Better WP Minify](https://wordpress.org/plugins/bwp-minify/)
239
+ * [WP Touch](https://wordpress.org/plugins/wptouch/)
240
+ * [Theme My Login](https://wordpress.org/plugins/theme-my-login/)
241
+ * [wpForo](https://wordpress.org/plugins/wpforo/)
242
+ * [WPLister](https://www.wplab.com/plugins/wp-lister/)
243
+ * [WP-PostRatings](https://wordpress.org/plugins/wp-postratings/)
244
+ * [Avada 5.1 RC1+](https://avada.theme-fusion.com/)
245
+ * [Elegant Themes Divi 3.0.67+](https://www.elegantthemes.com/gallery/divi/)
246
+ * [Caldera Forms](https://wordpress.org/plugins/caldera-forms/) 1.5.6.2+
247
+ * Login With Ajax
248
+ * [Post Types Order 1.9.3.6+](https://wordpress.org/plugins/post-types-order/)
249
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
 
251
  == Changelog ==
252
 
253
+ = 2.1 - Mar 15 2018 =
254
+ * [NEW FEATURE] <b>Image Optimization</b> Unlocked for non-LiteSpeed users.
255
+ * [NEW FEATURE] <b>Object Cache</b> Unlocked for non-LiteSpeed users.
256
+ * [NEW FEATURE] <b>Crawler</b> Unlocked for non-LiteSpeed users.
257
+ * [NEW FEATURE] <b>Database Cleaner and Optimizer</b> Unlocked for non-LiteSpeed users.
258
+ * [NEW FEATURE] <b>Lazy Load Images</b> Unlocked for non-LiteSpeed users.
259
+ * [NEW FEATURE] <b>CSS/JS/HTML Minify/Combine Optimize</b> Unlocked for non-LiteSpeed users.
260
+ * [IAPI] IAPI v2.0.
261
+ * [IAPI] Increased max rows prefetch when client has additional credit.
262
+ * [IMPROVEMENT] <b>CDN</b> Multiple domains may now be used.
263
+ * [IMPROVEMENT] <b>Report</b> Added WP environment constants for better debugging.
264
+ * [REFACTOR] Separated Cloudflare CDN class.
265
+ * [BUGFIX] <b>Image Optimization</b> Fixed issue where certain MySQL version failed to create img_optm table. (@philippwidmer)
266
+ * [BUGFIX] <b>Image Optimization</b> Fixed issue where callback validation failed when pulling and sending request simultaneously.
267
+ * [GUI] Added Slack community banner.
268
+ * [INTEGRATION] CDN compatibility with WPML multiple domains. (@egemensarica)
269
+
270
  = 2.0 - Mar 7 2018 =
271
+ * [NEW FEATURE] <b>Image Optimization</b> Added level up guidance.
272
+ * [REFACTOR] <b>Image Optimization</b> Refactored Image Optimization class.
273
+ * [IAPI] <b>Image Optimization</b> New European Image Optimization server (EU2).
274
+ * [IMPROVEMENT] <b>Image Optimization</b> Manual pull action continues pulling until complete.
275
+ * [IMPROVEMENT] <b>CDN</b> Multiple CDNs can now be randomized for a single resource.
276
+ * [IMPROVEMENT] <b>Image Optimization</b> Improved compatibility of long src images.
277
+ * [IMPROVEMENT] <b>Image Optimization</b> Reduced runtime load.
278
+ * [IMPROVEMENT] <b>Image Optimization</b> Avoid potential loss/reset of notified images status when pulling.
279
+ * [IMPROVEMENT] <b>Image Optimization</b> Avoid duplicated optimization for multiple records in Media that have the same image source.
280
+ * [IMPROVEMENT] <b>Image Optimization</b> Fixed issue where phantom images continued to show in not-yet-requested queue.
281
+ * [BUGFIX] <b>Core</b> Improved compatibility when upgrading outside of WP Admin. (@jikatal @TylorB)
282
+ * [BUGFIX] <b>Crawler</b> Improved HTTP/2 compatibility to avoid erroneous blacklisting.
283
+ * [BUGFIX] <b>Crawler</b> Changing Delay setting will use server variable for min value validation if set.
284
+ * [UPDATE] <b>Crawler</b> Added HTTP/2 protocol switch in the Crawler settings.
285
  * [UPDATE] Removed unnecessary translation strings.
286
  * [GUI] Display translated role group name string instead of English values. (@Richard Hordern)
287
  * [GUI] Added Join LiteSpeed Slack link.
288
+ * [GUI] <b>Import / Export</b> Cosmetic changes to Import Settings file field.
289
  * [INTEGRATION] Improved compatibility with WPML Media for Image Optimization. (@szmigieldesign)
290
 
291
  = 1.9.1.1 - February 20 2018 =
890
 
891
  = 1.0.0 - January 20 2016 =
892
  * Initial Release.