LiteSpeed Cache - Version 2.8

Version Description

  • Nov 30 2018 =
  • : ESI shortcodes.
  • : Mobile crawler.
  • : Cookie crawler.
  • API: Can now add _litespeed_rm_qs=0 to bypass Remove Query Strings.
  • Optm: Removed error log when minify JS failed.
  • Core: Fixed a bug that caused network activation PHP warning.
  • Media: Removed canvas checking for WebP to support TOR. (@odeskumair)
  • Media: Eliminated potential image placeholder PHP warning.
  • 3rd: Bypassed Google recaptcha from Remove Query Strings for better compatibility.
  • IAPI: Showed destroy timeout details.
  • Debug: Moved Google Fonts log to advanced level.
  • GUI: Replaced all Learn More links for functions.
  • GUI: Cosmetic updates including Emoji.
  • : Removed duplicated data in sitemap and blacklist.
Download this release

Release Info

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

Code changes from version 2.7.3 to 2.8

Files changed (49) hide show
  1. admin/litespeed-cache-admin-display.class.php +10 -2
  2. admin/litespeed-cache-admin-settings.class.php +16 -1
  3. admin/tpl/crawler.php +1 -4
  4. admin/tpl/edit_htaccess.php +1 -1
  5. admin/tpl/import_export.php +1 -0
  6. admin/tpl/inc/img_optm.summary.php +2 -2
  7. admin/tpl/setting/settings_advanced.php +5 -7
  8. admin/tpl/setting/settings_cache.php +2 -2
  9. admin/tpl/setting/settings_cdn.php +2 -2
  10. admin/tpl/setting/settings_crawler.php +66 -1
  11. admin/tpl/setting/settings_debug.php +11 -7
  12. admin/tpl/setting/settings_esi.php +13 -7
  13. admin/tpl/setting/settings_excludes.php +1 -1
  14. admin/tpl/setting/settings_general.php +1 -1
  15. admin/tpl/setting/settings_inc.cache_browser.php +1 -1
  16. admin/tpl/setting/settings_inc.cache_favicon.php +1 -1
  17. admin/tpl/setting/settings_inc.cache_mobile.php +2 -2
  18. admin/tpl/setting/settings_inc.cache_object.php +4 -3
  19. admin/tpl/setting/settings_inc.cache_resources.php +1 -1
  20. admin/tpl/setting/settings_inc.check_adv_file.php +1 -1
  21. admin/tpl/setting/settings_inc.exclude_cookies.php +1 -1
  22. admin/tpl/setting/settings_inc.exclude_useragent.php +1 -1
  23. admin/tpl/setting/settings_inc.media_webp.php +1 -1
  24. admin/tpl/setting/settings_media.php +6 -6
  25. admin/tpl/setting/settings_optimize.php +3 -3
  26. admin/tpl/setting/settings_purge.php +1 -1
  27. admin/tpl/setting/settings_tuning.php +11 -3
  28. inc/const.cls.php +2 -0
  29. inc/crawler.class.php +127 -36
  30. inc/esi.class.php +74 -0
  31. inc/img_optm.class.php +2 -1
  32. inc/litespeed-cache.class.php +1 -1
  33. inc/log.class.php +1 -1
  34. inc/media.class.php +3 -1
  35. inc/optimize.class.php +10 -5
  36. inc/optimizer.class.php +1 -1
  37. inc/router.class.php +1 -1
  38. includes/litespeed-cache-crawler.class.php +127 -36
  39. includes/litespeed-cache-esi.class.php +74 -0
  40. includes/litespeed-cache-log.class.php +1 -1
  41. includes/litespeed-cache-optimize.class.php +10 -5
  42. includes/litespeed-cache-router.class.php +1 -1
  43. includes/litespeed-cache.class.php +1 -1
  44. js/lazyload.lib.js +5 -5
  45. js/lazyload.min.js +1 -1
  46. languages/litespeed-cache.pot +190 -198
  47. lib/litespeed/litespeed-crawler.class.php +16 -5
  48. litespeed-cache.php +1 -1
  49. readme.txt +17 -1
admin/litespeed-cache-admin-display.class.php CHANGED
@@ -963,9 +963,17 @@ class LiteSpeed_Cache_Admin_Display
963
  * @since 2.6.1
964
  * @access public
965
  */
966
- public function learn_more( $link )
967
  {
968
- echo ' <a href="' . $link . '" target="_blank">' . __( 'Learn More', 'litespeed-cache' ) . '</a>' ;
 
 
 
 
 
 
 
 
969
  }
970
 
971
  /**
963
  * @since 2.6.1
964
  * @access public
965
  */
966
+ public function learn_more( $link, $title = false, $class = false )
967
  {
968
+ if ( $class ) {
969
+ $class = " class='$class' " ;
970
+ }
971
+
972
+ if ( ! $title ) {
973
+ $title = __( 'Learn More', 'litespeed-cache' ) ;
974
+ }
975
+
976
+ echo " <a href='$link' target='_blank' $class>$title</a>" ;
977
  }
978
 
979
  /**
admin/litespeed-cache-admin-settings.class.php CHANGED
@@ -661,7 +661,7 @@ class LiteSpeed_Cache_Admin_Settings
661
 
662
  $cdn_mapping[] = $this_mapping ;
663
  }
664
- update_option( LiteSpeed_Cache_Config::ITEM_CDN_MAPPING, $cdn_mapping ) ;
665
 
666
  /**
667
  * Load jQuery from cdn
@@ -1053,6 +1053,21 @@ class LiteSpeed_Cache_Admin_Settings
1053
  $id = LiteSpeed_Cache_Config::ITEM_CRWL_AS_UIDS ;
1054
  $this->_save_item( $id ) ;
1055
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1056
  }
1057
 
1058
  /**
661
 
662
  $cdn_mapping[] = $this_mapping ;
663
  }
664
+ update_option( $id, $cdn_mapping ) ;
665
 
666
  /**
667
  * Load jQuery from cdn
1053
  $id = LiteSpeed_Cache_Config::ITEM_CRWL_AS_UIDS ;
1054
  $this->_save_item( $id ) ;
1055
 
1056
+ /**
1057
+ * Save cookie crawler
1058
+ * @since 2.8
1059
+ */
1060
+ $id = LiteSpeed_Cache_Config::ITEM_CRWL_COOKIES ;
1061
+ $cookie_crawlers = array() ;
1062
+ foreach ( $this->_input[ $id ][ 'name' ] as $k => $v ) {
1063
+ if ( ! $v ) {
1064
+ continue ;
1065
+ }
1066
+
1067
+ $cookie_crawlers[ $v ] = $this->_input[ $id ][ 'vals' ][ $k ] ;
1068
+ }
1069
+ update_option( $id, $cookie_crawlers ) ;
1070
+
1071
  }
1072
 
1073
  /**
admin/tpl/crawler.php CHANGED
@@ -178,10 +178,7 @@ LiteSpeed_Cache_GUI::show_promo() ;
178
  ?>
179
  </td>
180
  <td>
181
- <?php echo ucfirst( $v[ 'role_title' ] ) ; ?>
182
- <?php if ( $v[ 'webp' ] ) {
183
- echo ' - WebP' ;
184
- } ?>
185
  </td>
186
  <td><?php echo $recurrence ; ?></td>
187
  <td><?php echo "Size: $meta[list_size]" ; ?></td>
178
  ?>
179
  </td>
180
  <td>
181
+ <?php echo $v[ 'title' ] ; ?>
 
 
 
182
  </td>
183
  <td><?php echo $recurrence ; ?></td>
184
  <td><?php echo "Size: $meta[list_size]" ; ?></td>
admin/tpl/edit_htaccess.php CHANGED
@@ -38,7 +38,7 @@ if ( defined( 'LITESPEED_ON' ) ) {
38
  <div class="litespeed-wrap">
39
  <div class="litespeed-body">
40
  <div class="litespeed-callout-danger">
41
- <h4><?php echo __('WARNING: This page is meant for advanced users.', 'litespeed-cache'); ?></h4>
42
  <p>
43
  <?php echo __('Any changes made to the .htaccess file may break the site.', 'litespeed-cache'); ?>
44
  <?php echo __('Please consult the host/server admin before making any changes.', 'litespeed-cache'); ?>
38
  <div class="litespeed-wrap">
39
  <div class="litespeed-body">
40
  <div class="litespeed-callout-danger">
41
+ <h4>🚨 <?php echo __('This page is meant for advanced users.', 'litespeed-cache'); ?></h4>
42
  <p>
43
  <?php echo __('Any changes made to the .htaccess file may break the site.', 'litespeed-cache'); ?>
44
  <?php echo __('Please consult the host/server admin before making any changes.', 'litespeed-cache'); ?>
admin/tpl/import_export.php CHANGED
@@ -62,6 +62,7 @@ $log = get_option( LiteSpeed_Cache_Import::DB_IMPORT_LOG, array() ) ;
62
  </a>
63
 
64
  <div class="litespeed-desc">
 
65
  <?php echo __( 'This will reset all settings to default settings.', 'litespeed-cache' ) ; ?>
66
  </div>
67
 
62
  </a>
63
 
64
  <div class="litespeed-desc">
65
+ 🚨
66
  <?php echo __( 'This will reset all settings to default settings.', 'litespeed-cache' ) ; ?>
67
  </div>
68
 
admin/tpl/inc/img_optm.summary.php CHANGED
@@ -207,7 +207,7 @@ if ( ! defined( 'WPINC' ) ) {
207
  <div class="litespeed-desc">
208
  <?php echo __( 'This will delete all of the backups of the original images.', 'litespeed-cache' ) ; ?>
209
  <div class="litespeed-danger">
210
- <?php echo __('WARNING', 'litespeed-cache'); ?>:
211
  <?php echo __( 'This is irreversible.', 'litespeed-cache' ) ; ?>
212
  <?php echo __( 'You will be unable to Revert Optimization once the backups are deleted!', 'litespeed-cache' ) ; ?>
213
  </div>
@@ -303,7 +303,7 @@ if ( ! defined( 'WPINC' ) ) {
303
  <div class="litespeed-desc">
304
  <?php echo __( 'Remove all previous image optimization requests/results, revert completed optimizations, and delete all optimization files.', 'litespeed-cache' ) ; ?>
305
  <div class="litespeed-warning">
306
- <?php echo __('NOTE', 'litespeed-cache'); ?>:
307
  <?php echo __( 'This will also reset the credit level.', 'litespeed-cache' ) ; ?>
308
  </div>
309
  </div>
207
  <div class="litespeed-desc">
208
  <?php echo __( 'This will delete all of the backups of the original images.', 'litespeed-cache' ) ; ?>
209
  <div class="litespeed-danger">
210
+ 🚨
211
  <?php echo __( 'This is irreversible.', 'litespeed-cache' ) ; ?>
212
  <?php echo __( 'You will be unable to Revert Optimization once the backups are deleted!', 'litespeed-cache' ) ; ?>
213
  </div>
303
  <div class="litespeed-desc">
304
  <?php echo __( 'Remove all previous image optimization requests/results, revert completed optimizations, and delete all optimization files.', 'litespeed-cache' ) ; ?>
305
  <div class="litespeed-warning">
306
+ ⚠️
307
  <?php echo __( 'This will also reset the credit level.', 'litespeed-cache' ) ; ?>
308
  </div>
309
  </div>
admin/tpl/setting/settings_advanced.php CHANGED
@@ -7,7 +7,7 @@ if (!defined('WPINC')) die;
7
 
8
  <h3 class="litespeed-title-short">
9
  <?php echo __('Advanced Settings', 'litespeed-cache'); ?>
10
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:advanced" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
11
  </h3>
12
 
13
  <div class="litespeed-callout-danger">
@@ -36,8 +36,7 @@ if (!defined('WPINC')) die;
36
 
37
  <div class="litespeed-desc">
38
  <?php echo __( 'A Purge All will be executed when WordPress runs these hooks.', 'litespeed-cache' ) ; ?>
39
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:advanced#hooks_to_purge_all" target="_blank"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
40
-
41
  </div>
42
  </td>
43
  </tr>
@@ -48,8 +47,7 @@ if (!defined('WPINC')) die;
48
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_USE_HTTP_FOR_HTTPS_VARY ) ; ?>
49
  <div class="litespeed-desc">
50
  <?php echo __( 'Enable this option if you are using both HTTP and HTTPS in the same domain and are noticing cache irregularities.', 'litespeed-cache' ) ; ?>
51
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:advanced#improve_http_https_compatibility" target="_blank"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
52
-
53
  </div>
54
  </td>
55
  </tr>
@@ -60,9 +58,9 @@ if (!defined('WPINC')) die;
60
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_ADV_INSTANT_CLICK ) ; ?>
61
  <div class="litespeed-desc">
62
  <?php echo __( 'When a vistor hovers over a page link, preload that page. This will speed up the visit to that link.', 'litespeed-cache' ) ; ?>
63
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:advanced#instant_click" target="_blank"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
64
  <br /><font class="litespeed-danger">
65
- <?php echo __('NOTE', 'litespeed-cache'); ?>:
66
  <?php echo __('This will generate extra requests to the server, which will increase server load.', 'litespeed-cache'); ?>
67
  </font>
68
 
7
 
8
  <h3 class="litespeed-title-short">
9
  <?php echo __('Advanced Settings', 'litespeed-cache'); ?>
10
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:advanced', false, 'litespeed-learn-more' ) ; ?>
11
  </h3>
12
 
13
  <div class="litespeed-callout-danger">
36
 
37
  <div class="litespeed-desc">
38
  <?php echo __( 'A Purge All will be executed when WordPress runs these hooks.', 'litespeed-cache' ) ; ?>
39
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:advanced#hooks_to_purge_all' ) ; ?>
 
40
  </div>
41
  </td>
42
  </tr>
47
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_USE_HTTP_FOR_HTTPS_VARY ) ; ?>
48
  <div class="litespeed-desc">
49
  <?php echo __( 'Enable this option if you are using both HTTP and HTTPS in the same domain and are noticing cache irregularities.', 'litespeed-cache' ) ; ?>
50
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:advanced#improve_http_https_compatibility' ) ; ?>
 
51
  </div>
52
  </td>
53
  </tr>
58
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_ADV_INSTANT_CLICK ) ; ?>
59
  <div class="litespeed-desc">
60
  <?php echo __( 'When a vistor hovers over a page link, preload that page. This will speed up the visit to that link.', 'litespeed-cache' ) ; ?>
61
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:advanced#instant_click' ) ; ?>
62
  <br /><font class="litespeed-danger">
63
+ ⚠️
64
  <?php echo __('This will generate extra requests to the server, which will increase server load.', 'litespeed-cache'); ?>
65
  </font>
66
 
admin/tpl/setting/settings_cache.php CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'WPINC' ) ) die ;
4
 
5
  <h3 class="litespeed-title-short">
6
  <?php echo __('Cache Control Settings', 'litespeed-cache'); ?>
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() ; ?>
@@ -76,7 +76,7 @@ if ( ! defined( 'WPINC' ) ) die ;
76
  <div class="litespeed-desc">
77
  <?php echo __('Ignore certain query strings when caching.', 'litespeed-cache'); ?>
78
  <?php echo sprintf( __( 'For example, to drop parameters beginning with %s, %s can be used here.', 'litespeed-cache' ), '<code>utm</code>', '<code>utm*</code>' ) ; ?>
79
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:drop_query_string" target="_blank"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
80
 
81
  <br />
82
  <i>
4
 
5
  <h3 class="litespeed-title-short">
6
  <?php echo __('Cache Control Settings', 'litespeed-cache'); ?>
7
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cache', false, 'litespeed-learn-more' ) ; ?>
8
  </h3>
9
 
10
  <?php $this->cache_disabled_warning() ; ?>
76
  <div class="litespeed-desc">
77
  <?php echo __('Ignore certain query strings when caching.', 'litespeed-cache'); ?>
78
  <?php echo sprintf( __( 'For example, to drop parameters beginning with %s, %s can be used here.', 'litespeed-cache' ), '<code>utm</code>', '<code>utm*</code>' ) ; ?>
79
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:drop_query_string' ) ; ?>
80
 
81
  <br />
82
  <i>
admin/tpl/setting/settings_cdn.php CHANGED
@@ -12,7 +12,7 @@ $cdn_mapping = $this->config->get_item( LiteSpeed_Cache_Config::ITEM_CDN_MAPPING
12
 
13
  <h3 class="litespeed-title-short">
14
  <?php echo __('CDN Settings', 'litespeed-cache'); ?>
15
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cdn" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
16
  </h3>
17
 
18
  <table><tbody>
@@ -106,7 +106,7 @@ $cdn_mapping = $this->config->get_item( LiteSpeed_Cache_Config::ITEM_CDN_MAPPING
106
  <?php echo __( 'Static file type links to be replaced by CDN links.', 'litespeed-cache' ) ; ?>
107
  <?php echo __('One per line.', 'litespeed-cache'); ?>
108
  <?php echo sprintf( __( 'This will affect all tags containing attributes: %s %s %s.', 'litespeed-cache' ), '<code>src=""</code>', '<code>data-src=""</code>', '<code>href=""</code>' ) ; ?>
109
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cdn#include_file_types" target="_blank"><?php echo __('Default value', 'litespeed-cache') ; ?></a>
110
  </div>
111
 
112
  </td>
12
 
13
  <h3 class="litespeed-title-short">
14
  <?php echo __('CDN Settings', 'litespeed-cache'); ?>
15
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cdn', false, 'litespeed-learn-more' ) ; ?>
16
  </h3>
17
 
18
  <table><tbody>
106
  <?php echo __( 'Static file type links to be replaced by CDN links.', 'litespeed-cache' ) ; ?>
107
  <?php echo __('One per line.', 'litespeed-cache'); ?>
108
  <?php echo sprintf( __( 'This will affect all tags containing attributes: %s %s %s.', 'litespeed-cache' ), '<code>src=""</code>', '<code>data-src=""</code>', '<code>href=""</code>' ) ; ?>
109
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cdn#include_file_types', __( 'Default value', 'litespeed-cache' ) ) ; ?>
110
  </div>
111
 
112
  </td>
admin/tpl/setting/settings_crawler.php CHANGED
@@ -5,7 +5,7 @@ if ( !defined('WPINC') ) die;
5
 
6
  <h3 class="litespeed-title-short">
7
  <?php echo __('Crawler Settings', 'litespeed-cache'); ?>
8
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:crawler" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
9
  </h3>
10
 
11
  <table><tbody>
@@ -135,6 +135,71 @@ if ( !defined('WPINC') ) die;
135
  </td>
136
  </tr>
137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  <tr>
139
  <th><?php echo __('Custom Sitemap', 'litespeed-cache'); ?></th>
140
  <td>
5
 
6
  <h3 class="litespeed-title-short">
7
  <?php echo __('Crawler Settings', 'litespeed-cache'); ?>
8
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:crawler', false, 'litespeed-learn-more' ) ; ?>
9
  </h3>
10
 
11
  <table><tbody>
135
  </td>
136
  </tr>
137
 
138
+ <tr>
139
+ <th><?php echo __('Cookie Simulation', 'litespeed-cache'); ?></th>
140
+ <td>
141
+ <?php $id = LiteSpeed_Cache_Config::ITEM_CRWL_COOKIES ; ?>
142
+ <div id="cookie_crawler">
143
+ <div class="litespeed-block" v-for="( item, key ) in items">
144
+ <div class='litespeed-col-auto'>
145
+ <h4><?php echo __( 'Cookie Name', 'litespeed-cache' ) ; ?></h4>
146
+ </div>
147
+ <div class='litespeed-col-auto'>
148
+ <input type="text" v-model="item.name" name="litespeed-cache-conf[<?php echo $id ; ?>][name][]" class="litespeed-regular-text" style="margin-top:1.33em;" >
149
+ </div>
150
+ <div class='litespeed-col-auto'>
151
+ <h4><?php echo __( 'Cookie Values', 'litespeed-cache' ) ; ?></h4>
152
+ </div>
153
+ <div class='litespeed-col-auto'>
154
+ <textarea v-model="item.vals" rows="5" cols="40" name="litespeed-cache-conf[<?php echo $id ; ?>][vals][]" placeholder="<?php echo __( 'One per line.', 'litespeed-cache' ) ; ?>"></textarea>
155
+ </div>
156
+ <div class='litespeed-col-auto'>
157
+ <button type="button" class="litespeed-btn-danger litespeed-btn-tiny" @click="$delete( items, key )">X</button>
158
+ </div>
159
+ </div>
160
+
161
+ <button type="button" @click='add_row' class="litespeed-btn-success litespeed-btn-tiny">+</button>
162
+ </div>
163
+
164
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
165
+ <script type="text/javascript">
166
+ var cookie_crawler = new Vue( {
167
+ el: '#cookie_crawler',
168
+ data: {
169
+ counter: 0,
170
+ items : [
171
+ <?php
172
+ // Build the cookie crawler Vue data
173
+ $cookies = $this->config->get_item( $id ) ;
174
+ /**
175
+ * Data Src Structure: [ nameA => vals, nameB => vals ]
176
+ */
177
+ $list = array() ;
178
+ foreach ( $cookies as $k => $v ) {
179
+ $list[] = "{ name: '$k', vals: `$v` }" ;// $v contains line break
180
+ }
181
+ echo implode( ',', $list ) ;
182
+ ?>
183
+ ]
184
+ },
185
+ methods: {
186
+ add_row() {
187
+ this.items.push( {
188
+ id: ++ this.counter
189
+ } ) ;
190
+ }
191
+ }
192
+ } ) ;
193
+ </script>
194
+
195
+ <div class="litespeed-desc">
196
+ <?php echo __('To crawl for a particular cookie, enter the cookie name, and the values you wish to crawl for. Values should be one per line, and can include a blank line. There will be one crawler created per cookie value, per simulated role.', 'litespeed-cache'); ?>
197
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:crawler#cookie_simulation' ) ; ?>
198
+ </div>
199
+
200
+ </td>
201
+ </tr>
202
+
203
  <tr>
204
  <th><?php echo __('Custom Sitemap', 'litespeed-cache'); ?></th>
205
  <td>
admin/tpl/setting/settings_debug.php CHANGED
@@ -5,7 +5,7 @@ if ( ! defined( 'WPINC' ) ) die ;
5
 
6
  <h3 class="litespeed-title-short">
7
  <?php echo __('Developer Testing', 'litespeed-cache'); ?>
8
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:debug" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
9
  </h3>
10
 
11
  <table><tbody>
@@ -58,8 +58,10 @@ if ( ! defined( 'WPINC' ) ) die ;
58
  <?php echo __( 'Allows listed IPs (one per line) to perform certain actions from their browsers.', 'litespeed-cache' ) ; ?>
59
  <?php echo __( 'Your IP', 'litespeed-cache' ) ; ?>: <code><?php echo LiteSpeed_Cache_Router::get_ip() ; ?></code>
60
  <br />
61
- <?php echo sprintf( __( 'More information about the available commands can be found <a %s>here</a>.', 'litespeed-cache' ),
62
- 'href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:information:admin-ip-commands" target="_blank"' ) ; ?>
 
 
63
  </div>
64
  </td>
65
  </tr>
@@ -104,7 +106,8 @@ if ( ! defined( 'WPINC' ) ) die ;
104
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_HEARTBEAT ) ; ?>
105
  <div class="litespeed-desc">
106
  <?php echo __( 'Disable WordPress heartbeat to prevent AJAX calls from breaking debug logging.', 'litespeed-cache' ) ; ?>
107
- <font class="litespeed-warning"><?php echo __( 'WARNING', 'litespeed-cache' ) ; ?>:
 
108
  <?php echo __( 'Disabling this may cause WordPress tasks triggered by AJAX to stop working.', 'litespeed-cache' ) ; ?>
109
  </font>
110
  </div>
@@ -137,7 +140,8 @@ if ( ! defined( 'WPINC' ) ) die ;
137
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_LOG_FILTERS ) ; ?>
138
  <div class="litespeed-desc">
139
  <?php echo __( 'Log all WordPress filter hooks.', 'litespeed-cache' ) ; ?>
140
- <font class="litespeed-warning"><?php echo __( 'WARNING', 'litespeed-cache' ) ; ?>:
 
141
  <?php echo __( 'Enabling this option will cause log file size to grow quickly.', 'litespeed-cache' ) ; ?>
142
  </font>
143
  </div>
@@ -150,7 +154,7 @@ if ( ! defined( 'WPINC' ) ) die ;
150
  <?php $this->build_textarea2( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_FILTERS, 30 ) ; ?>
151
  <div class="litespeed-desc">
152
  <?php echo __( 'Listed filters (one per line) will not be logged.', 'litespeed-cache' ) ; ?>
153
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:debug#exclude_filters" target="_blank"><?php echo __('Recommended default value', 'litespeed-cache') ; ?></a>
154
  </div>
155
  </td>
156
  </tr>
@@ -161,7 +165,7 @@ if ( ! defined( 'WPINC' ) ) die ;
161
  <?php $this->build_textarea2( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_PART_FILTERS, 30 ) ; ?>
162
  <div class="litespeed-desc">
163
  <?php echo __( 'Filters containing these strings (one per line) will not be logged.', 'litespeed-cache' ) ; ?>
164
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:debug#exclude_part_filters" target="_blank"><?php echo __('Recommended default value', 'litespeed-cache') ; ?></a>
165
  </div>
166
  </td>
167
  </tr>
5
 
6
  <h3 class="litespeed-title-short">
7
  <?php echo __('Developer Testing', 'litespeed-cache'); ?>
8
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:debug', false, 'litespeed-learn-more' ) ; ?>
9
  </h3>
10
 
11
  <table><tbody>
58
  <?php echo __( 'Allows listed IPs (one per line) to perform certain actions from their browsers.', 'litespeed-cache' ) ; ?>
59
  <?php echo __( 'Your IP', 'litespeed-cache' ) ; ?>: <code><?php echo LiteSpeed_Cache_Router::get_ip() ; ?></code>
60
  <br />
61
+ <?php $this->learn_more(
62
+ 'href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:information:admin-ip-commands',
63
+ __( 'More information about the available commands can be found here.', 'litespeed-cache' )
64
+ ) ; ?>
65
  </div>
66
  </td>
67
  </tr>
106
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_HEARTBEAT ) ; ?>
107
  <div class="litespeed-desc">
108
  <?php echo __( 'Disable WordPress heartbeat to prevent AJAX calls from breaking debug logging.', 'litespeed-cache' ) ; ?>
109
+ <font class="litespeed-warning">
110
+ 🚨
111
  <?php echo __( 'Disabling this may cause WordPress tasks triggered by AJAX to stop working.', 'litespeed-cache' ) ; ?>
112
  </font>
113
  </div>
140
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_LOG_FILTERS ) ; ?>
141
  <div class="litespeed-desc">
142
  <?php echo __( 'Log all WordPress filter hooks.', 'litespeed-cache' ) ; ?>
143
+ <font class="litespeed-warning">
144
+ 🚨
145
  <?php echo __( 'Enabling this option will cause log file size to grow quickly.', 'litespeed-cache' ) ; ?>
146
  </font>
147
  </div>
154
  <?php $this->build_textarea2( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_FILTERS, 30 ) ; ?>
155
  <div class="litespeed-desc">
156
  <?php echo __( 'Listed filters (one per line) will not be logged.', 'litespeed-cache' ) ; ?>
157
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:debug#exclude_filters', __( 'Recommended default value', 'litespeed-cache' ) ) ; ?>
158
  </div>
159
  </td>
160
  </tr>
165
  <?php $this->build_textarea2( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_PART_FILTERS, 30 ) ; ?>
166
  <div class="litespeed-desc">
167
  <?php echo __( 'Filters containing these strings (one per line) will not be logged.', 'litespeed-cache' ) ; ?>
168
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:debug#exclude_part_filters', __( 'Recommended default value', 'litespeed-cache' ) ) ; ?>
169
  </div>
170
  </td>
171
  </tr>
admin/tpl/setting/settings_esi.php CHANGED
@@ -5,7 +5,7 @@ if ( ! defined( 'WPINC' ) ) die ;
5
 
6
  <h3 class="litespeed-title-short">
7
  <?php echo __('ESI Settings', 'litespeed-cache'); ?>
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() ; ?>
@@ -13,15 +13,21 @@ if ( ! defined( 'WPINC' ) ) die ;
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>
15
  <p><?php echo __('ESI allows you to designate parts of your dynamic page as separate fragments that are then assembled together to make the whole page. In other words, ESI lets you “punch holes” in a page, and then fill those holes with content that may be cached privately, cached publicly with its own TTL, or not cached at all.', 'litespeed-cache'); ?>
 
 
 
 
 
16
  <?php echo sprintf(
17
- __( 'Learn more about public cache vs. private cache <a %s>on our blog</a>.', 'litespeed-cache' ),
18
- 'href="https://blog.litespeedtech.com/2017/08/30/wpw-private-cache-vs-public-cache/" target="_blank"'
 
19
  ) ; ?>
 
 
 
 
20
  </p>
21
- <p><?php echo sprintf(
22
- __( '<a %s>ESI sample for developers</a>.', 'litespeed-cache' ),
23
- 'href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:esi_sample" target="_blank"'
24
- ) ; ?></p>
25
  </div>
26
 
27
  <div class="litespeed-relative">
5
 
6
  <h3 class="litespeed-title-short">
7
  <?php echo __('ESI Settings', 'litespeed-cache'); ?>
8
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:esi', false, 'litespeed-learn-more' ) ; ?>
9
  </h3>
10
 
11
  <?php $this->cache_disabled_warning() ; ?>
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>
15
  <p><?php echo __('ESI allows you to designate parts of your dynamic page as separate fragments that are then assembled together to make the whole page. In other words, ESI lets you “punch holes” in a page, and then fill those holes with content that may be cached privately, cached publicly with its own TTL, or not cached at all.', 'litespeed-cache'); ?>
16
+ <?php $this->learn_more( 'https://blog.litespeedtech.com/2017/08/30/wpw-private-cache-vs-public-cache/', __( 'WpW: Private Cache vs. Public Cache', 'litespeed-cache' ) ) ; ?>
17
+ </p>
18
+ <p>
19
+ 💡:
20
+ <?php echo __( 'You can turn shortcodes into ESI blocks.', 'litespeed-cache' ) ; ?>
21
  <?php echo sprintf(
22
+ __( 'Replace %1$s with %2$s.', 'litespeed-cache' ),
23
+ '<code>[shortcodeA att1="val1" att2="val2"]</code>',
24
+ '<code>[esi shortcodeA att1="val1" att2="val2"]</code>'
25
  ) ; ?>
26
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:esi:shortcode' ) ; ?>
27
+ </p>
28
+ <p>
29
+ <?php $this->learn_more( 'href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:esi_sample', __( 'ESI sample for developers', 'litespeed-cache' ) ) ; ?>
30
  </p>
 
 
 
 
31
  </div>
32
 
33
  <div class="litespeed-relative">
admin/tpl/setting/settings_excludes.php CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'WPINC' ) ) die ;
4
 
5
  <h3 class="litespeed-title-short">
6
  <?php echo __('Exclude 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() ; ?>
4
 
5
  <h3 class="litespeed-title-short">
6
  <?php echo __('Exclude Settings', 'litespeed-cache'); ?>
7
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:excludes', false, 'litespeed-learn-more' ) ; ?>
8
  </h3>
9
 
10
  <?php $this->cache_disabled_warning() ; ?>
admin/tpl/setting/settings_general.php CHANGED
@@ -5,7 +5,7 @@ if (!defined('WPINC')) die;
5
 
6
  <h3 class="litespeed-title-short">
7
  <?php echo __('General', 'litespeed-cache'); ?>
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() ; ?>
5
 
6
  <h3 class="litespeed-title-short">
7
  <?php echo __('General', 'litespeed-cache'); ?>
8
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:general', false, 'litespeed-learn-more' ) ; ?>
9
  </h3>
10
 
11
  <?php $this->cache_disabled_warning() ; ?>
admin/tpl/setting/settings_inc.cache_browser.php CHANGED
@@ -9,7 +9,7 @@ if ( ! defined( 'WPINC' ) ) die ;
9
  <div class="litespeed-desc">
10
  <?php echo __( 'Browser caching stores static files locally in the user\'s browser. Turn on this setting to reduce repeated requests for static files.', 'litespeed-cache' ) ; ?>
11
  <br /><font class="litespeed-warning">
12
- <?php echo __('NOTE', 'litespeed-cache'); ?>:
13
  <?php echo __('This setting will edit the .htaccess file.', 'litespeed-cache'); ?>
14
  </font>
15
  <br /><?php echo sprintf( __( 'You can turn on browser caching in server admin too. <a %s>Learn more about LiteSpeed browser cache setting</a>.', 'litespeed-cache' ), 'href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:browser_cache" target="_blank"' ) ; ?>
9
  <div class="litespeed-desc">
10
  <?php echo __( 'Browser caching stores static files locally in the user\'s browser. Turn on this setting to reduce repeated requests for static files.', 'litespeed-cache' ) ; ?>
11
  <br /><font class="litespeed-warning">
12
+ ⚠️
13
  <?php echo __('This setting will edit the .htaccess file.', 'litespeed-cache'); ?>
14
  </font>
15
  <br /><?php echo sprintf( __( 'You can turn on browser caching in server admin too. <a %s>Learn more about LiteSpeed browser cache setting</a>.', 'litespeed-cache' ), 'href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:browser_cache" target="_blank"' ) ; ?>
admin/tpl/setting/settings_inc.cache_favicon.php CHANGED
@@ -10,7 +10,7 @@ if (!defined('WPINC')) die;
10
  <?php echo __('favicon.ico is requested on most pages.', 'litespeed-cache'); ?>
11
  <?php echo __('Caching this resource may improve server performance by avoiding unnecessary PHP calls.', 'litespeed-cache'); ?>
12
  <br /><font class="litespeed-warning">
13
- <?php echo __('NOTE', 'litespeed-cache'); ?>:
14
  <?php echo __('This setting will edit the .htaccess file.', 'litespeed-cache'); ?>
15
  </font>
16
  </div>
10
  <?php echo __('favicon.ico is requested on most pages.', 'litespeed-cache'); ?>
11
  <?php echo __('Caching this resource may improve server performance by avoiding unnecessary PHP calls.', 'litespeed-cache'); ?>
12
  <br /><font class="litespeed-warning">
13
+ ⚠️
14
  <?php echo __('This setting will edit the .htaccess file.', 'litespeed-cache'); ?>
15
  </font>
16
  </div>
admin/tpl/setting/settings_inc.cache_mobile.php CHANGED
@@ -14,7 +14,7 @@ if (!defined('WPINC')) die;
14
  <?php echo __('When enabled, mobile views will be cached separately.', 'litespeed-cache'); ?>
15
  <?php echo __('A site built with responsive design does not need to check this.', 'litespeed-cache'); ?>
16
  <br /><font class="litespeed-warning">
17
- <?php echo __( 'NOTE', 'litespeed-cache' ) ; ?>:
18
  <?php echo __( 'This setting will edit the .htaccess file.', 'litespeed-cache' ) ; ?>
19
  </font>
20
  </div>
@@ -63,7 +63,7 @@ if (!defined('WPINC')) die;
63
  <br />
64
  <?php echo sprintf( __( 'The default list WordPress uses is %s', 'litespeed-cache' ), "<code>$wp_default_mobile</code>" ) ; ?>
65
  <br /><font class="litespeed-warning">
66
- <?php echo __( 'NOTE', 'litespeed-cache' ) ; ?>:
67
  <?php echo sprintf( __( 'If %1$s is %2$s, then %3$s must be populated!', 'litespeed-cache' ), '<code>' . __('Cache Mobile', 'litespeed-cache') . '</code>', '<code>' . __('ON', 'litespeed-cache') . '</code>', '<code>' . __('List of Mobile User Agents', 'litespeed-cache') . '</code>' ) ; ?>
68
  </font>
69
  </div>
14
  <?php echo __('When enabled, mobile views will be cached separately.', 'litespeed-cache'); ?>
15
  <?php echo __('A site built with responsive design does not need to check this.', 'litespeed-cache'); ?>
16
  <br /><font class="litespeed-warning">
17
+ ⚠️
18
  <?php echo __( 'This setting will edit the .htaccess file.', 'litespeed-cache' ) ; ?>
19
  </font>
20
  </div>
63
  <br />
64
  <?php echo sprintf( __( 'The default list WordPress uses is %s', 'litespeed-cache' ), "<code>$wp_default_mobile</code>" ) ; ?>
65
  <br /><font class="litespeed-warning">
66
+ ⚠️
67
  <?php echo sprintf( __( 'If %1$s is %2$s, then %3$s must be populated!', 'litespeed-cache' ), '<code>' . __('Cache Mobile', 'litespeed-cache') . '</code>', '<code>' . __('ON', 'litespeed-cache') . '</code>', '<code>' . __('List of Mobile User Agents', 'litespeed-cache') . '</code>' ) ; ?>
68
  </font>
69
  </div>
admin/tpl/setting/settings_inc.cache_object.php CHANGED
@@ -30,7 +30,7 @@ $hide_redis_options = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACH
30
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT ) ; ?>
31
  <div class="litespeed-desc">
32
  <?php echo __( 'Use object cache functionality.', 'litespeed-cache' ) ; ?>
33
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cache:object_cache" target="_blank"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
34
  </div>
35
  <div class="litespeed-block">
36
  <div class='litespeed-col-auto'>
@@ -72,7 +72,7 @@ $hide_redis_options = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACH
72
  <?php echo sprintf( __( '%s Extension', 'litespeed-cache' ), 'Memcached' ) ; ?>: <?php echo $mem_enabled ; ?><br />
73
  <?php echo sprintf( __( '%s Extension', 'litespeed-cache' ), 'Redis' ) ; ?>: <?php echo $redis_enabled ; ?><br />
74
  <?php echo __( 'Connection Test', 'litespeed-cache' ) ; ?>: <?php echo $mem_conn_desc ; ?>
75
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cache:object_cache#how_to_debug" target="_blank"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
76
  </div>
77
 
78
  <div class='litespeed-col-br'></div>
@@ -147,7 +147,8 @@ $hide_redis_options = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACH
147
  </div>
148
  <div class="litespeed-desc">
149
  <?php echo sprintf( __( 'Save transients in database when %1$s is %2$s.', 'litespeed-cache' ), '<code>' . __( 'Cache Wp-Admin', 'litespeed-cache' ) . '</code>', '<code>' . __( 'OFF', 'litespeed-cache' ) . '</code>' ) ; ?>
150
- <br /><a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cache:object_cache#store_transients" target="_blank"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
 
151
  </div>
152
  </div>
153
 
30
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT ) ; ?>
31
  <div class="litespeed-desc">
32
  <?php echo __( 'Use object cache functionality.', 'litespeed-cache' ) ; ?>
33
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cache:object_cache' ) ; ?>
34
  </div>
35
  <div class="litespeed-block">
36
  <div class='litespeed-col-auto'>
72
  <?php echo sprintf( __( '%s Extension', 'litespeed-cache' ), 'Memcached' ) ; ?>: <?php echo $mem_enabled ; ?><br />
73
  <?php echo sprintf( __( '%s Extension', 'litespeed-cache' ), 'Redis' ) ; ?>: <?php echo $redis_enabled ; ?><br />
74
  <?php echo __( 'Connection Test', 'litespeed-cache' ) ; ?>: <?php echo $mem_conn_desc ; ?>
75
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cache:object_cache#how_to_debug' ) ; ?>
76
  </div>
77
 
78
  <div class='litespeed-col-br'></div>
147
  </div>
148
  <div class="litespeed-desc">
149
  <?php echo sprintf( __( 'Save transients in database when %1$s is %2$s.', 'litespeed-cache' ), '<code>' . __( 'Cache Wp-Admin', 'litespeed-cache' ) . '</code>', '<code>' . __( 'OFF', 'litespeed-cache' ) . '</code>' ) ; ?>
150
+ <br />
151
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:cache:object_cache#store_transients' ) ; ?>
152
  </div>
153
  </div>
154
 
admin/tpl/setting/settings_inc.cache_resources.php CHANGED
@@ -11,7 +11,7 @@ if (!defined('WPINC')) die;
11
  <?php echo __('Some themes and plugins add resources via a PHP request.', 'litespeed-cache'); ?>
12
  <?php echo __('Caching these pages may improve server performance by avoiding unnecessary PHP calls.', 'litespeed-cache'); ?>
13
  <br /><font class="litespeed-warning">
14
- <?php echo __('NOTE', 'litespeed-cache'); ?>:
15
  <?php echo __('This setting will edit the .htaccess file.', 'litespeed-cache'); ?>
16
  </font>
17
  </div>
11
  <?php echo __('Some themes and plugins add resources via a PHP request.', 'litespeed-cache'); ?>
12
  <?php echo __('Caching these pages may improve server performance by avoiding unnecessary PHP calls.', 'litespeed-cache'); ?>
13
  <br /><font class="litespeed-warning">
14
+ ⚠️
15
  <?php echo __('This setting will edit the .htaccess file.', 'litespeed-cache'); ?>
16
  </font>
17
  </div>
admin/tpl/setting/settings_inc.check_adv_file.php CHANGED
@@ -15,7 +15,7 @@ if ( ! defined( 'WPINC' ) ) die ;
15
  </div>
16
  <p>
17
  <i><?php echo __( 'You may need to uncheck this option if you are using multiple optimization plugins.', 'litespeed-cache' ) ; ?></i>
18
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:customizations:multi-cache-plugins" target="_blank"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
19
  </p>
20
 
21
  </td>
15
  </div>
16
  <p>
17
  <i><?php echo __( 'You may need to uncheck this option if you are using multiple optimization plugins.', 'litespeed-cache' ) ; ?></i>
18
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:customizations:multi-cache-plugins' ) ; ?>
19
  </p>
20
 
21
  </td>
admin/tpl/setting/settings_inc.exclude_cookies.php CHANGED
@@ -19,7 +19,7 @@ if ( ! defined( 'WPINC' ) ) die ;
19
  <?php echo __('One per line.', 'litespeed-cache'); ?>
20
  </i>
21
  <br /><font class="litespeed-warning">
22
- <?php echo __('NOTE', 'litespeed-cache'); ?>:
23
  <?php echo __('This setting will edit the .htaccess file.', 'litespeed-cache'); ?>
24
  </font>
25
  </div>
19
  <?php echo __('One per line.', 'litespeed-cache'); ?>
20
  </i>
21
  <br /><font class="litespeed-warning">
22
+ ⚠️
23
  <?php echo __('This setting will edit the .htaccess file.', 'litespeed-cache'); ?>
24
  </font>
25
  </div>
admin/tpl/setting/settings_inc.exclude_useragent.php CHANGED
@@ -18,7 +18,7 @@ if (!defined('WPINC')) die;
18
  <?php echo sprintf( __( 'Spaces should have a backslash in front of them, %s.', 'litespeed-cache' ), '<code>\</code>' ) ; ?>
19
  </i>
20
  <br /><font class="litespeed-warning">
21
- <?php echo __('NOTE', 'litespeed-cache'); ?>:
22
  <?php echo __('This setting will edit the .htaccess file.', 'litespeed-cache'); ?>
23
  </font>
24
  </div>
18
  <?php echo sprintf( __( 'Spaces should have a backslash in front of them, %s.', 'litespeed-cache' ), '<code>\</code>' ) ; ?>
19
  </i>
20
  <br /><font class="litespeed-warning">
21
+ ⚠️
22
  <?php echo __('This setting will edit the .htaccess file.', 'litespeed-cache'); ?>
23
  </font>
24
  </div>
admin/tpl/setting/settings_inc.media_webp.php CHANGED
@@ -9,7 +9,7 @@ if ( ! defined( 'WPINC' ) ) die ;
9
  <div class="litespeed-desc">
10
  <?php echo sprintf( __( 'Significantly improve load time by replacing images with their optimized %s versions.', 'litespeed-cache' ), '.webp' ) ; ?>
11
  <br /><font class="litespeed-warning">
12
- <?php echo __('NOTE', 'litespeed-cache'); ?>:
13
  <?php echo __('This setting will edit the .htaccess file.', 'litespeed-cache'); ?>
14
  </font>
15
  </div>
9
  <div class="litespeed-desc">
10
  <?php echo sprintf( __( 'Significantly improve load time by replacing images with their optimized %s versions.', 'litespeed-cache' ), '.webp' ) ; ?>
11
  <br /><font class="litespeed-warning">
12
+ ⚠️
13
  <?php echo __('This setting will edit the .htaccess file.', 'litespeed-cache'); ?>
14
  </font>
15
  </div>
admin/tpl/setting/settings_media.php CHANGED
@@ -7,7 +7,7 @@ $last_responsive_placeholder_generated = LiteSpeed_Cache_Media::get_summary() ;
7
 
8
  <h3 class="litespeed-title-short">
9
  <?php echo __('Media Settings', 'litespeed-cache'); ?>
10
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:media" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
11
  </h3>
12
 
13
  <table><tbody>
@@ -19,7 +19,7 @@ $last_responsive_placeholder_generated = LiteSpeed_Cache_Media::get_summary() ;
19
  <?php echo __( 'Load images only when they enter the viewport.', 'litespeed-cache' ) ; ?>
20
  <?php echo __( 'This can improve page loading time by reducing initial HTTP requests.', 'litespeed-cache' ) ; ?>
21
  <br /><font class="litespeed-success">
22
- <?php echo __('Tip', 'litespeed-cache'); ?>:
23
  <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:media:lazy-load-style" target="_blank"><?php echo __('Adding Style to Your Lazy-Loaded Images', 'litespeed-cache') ; ?></a>
24
  </font>
25
  </div>
@@ -91,7 +91,7 @@ $last_responsive_placeholder_generated = LiteSpeed_Cache_Media::get_summary() ;
91
  __( 'Lazy Load Image Placeholder', 'litespeed-cache' )
92
  ) ; ?>
93
  <?php echo sprintf( __( 'If set to %s this is done in the foreground, which may slow down page load.', 'litespeed-cache' ), '<code>' . __('OFF', 'litespeed-cache') . '</code>' ) ; ?>
94
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:media#generate_responsive_placeholder" target="_blank"><?php echo __( 'Learn More', 'litespeed-cache' ) ; ?></a>
95
  </div>
96
 
97
  <?php if ( $last_responsive_placeholder_generated ) : ?>
@@ -135,7 +135,7 @@ $last_responsive_placeholder_generated = LiteSpeed_Cache_Media::get_summary() ;
135
  <div class="litespeed-desc">
136
  <?php echo __( 'Include the lazy load image Javascript library inline.', 'litespeed-cache' ) ; ?>
137
  <?php echo __( 'This can improve your speed score in services like Pingdom, GTmetrix and PageSpeed.', 'litespeed-cache' ) ; ?>
138
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:media#inline_lazy_load_images_library" target="_blank"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
139
  </div>
140
  </td>
141
  </tr>
@@ -179,7 +179,7 @@ $last_responsive_placeholder_generated = LiteSpeed_Cache_Media::get_summary() ;
179
  <?php echo __( 'Automatically remove the original image backups after fetching optimized images.', 'litespeed-cache' ) ; ?>
180
 
181
  <br /><font class="litespeed-danger">
182
- <?php echo __('WARNING', 'litespeed-cache'); ?>:
183
  <?php echo __( 'This is irreversible.', 'litespeed-cache' ) ; ?>
184
  <?php echo __( 'You will be unable to Revert Optimization once the backups are deleted!', 'litespeed-cache' ) ; ?>
185
  </font>
@@ -248,7 +248,7 @@ $last_responsive_placeholder_generated = LiteSpeed_Cache_Media::get_summary() ;
248
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPT_MEDIA_WEBP_REPLACE_SRCSET ) ; ?>
249
  <div class="litespeed-desc">
250
  <?php echo sprintf( __( 'Enable replacement of WebP in %s elements that were generated outside of WordPress logic.', 'litespeed-cache' ), '<code>srcset</code>' ) ; ?>
251
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:media#webp_for_extra_srcset" target="_blank"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
252
  </div>
253
  </td>
254
  </tr>
7
 
8
  <h3 class="litespeed-title-short">
9
  <?php echo __('Media Settings', 'litespeed-cache'); ?>
10
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:media', false, 'litespeed-learn-more' ) ; ?>
11
  </h3>
12
 
13
  <table><tbody>
19
  <?php echo __( 'Load images only when they enter the viewport.', 'litespeed-cache' ) ; ?>
20
  <?php echo __( 'This can improve page loading time by reducing initial HTTP requests.', 'litespeed-cache' ) ; ?>
21
  <br /><font class="litespeed-success">
22
+ 💡:
23
  <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:media:lazy-load-style" target="_blank"><?php echo __('Adding Style to Your Lazy-Loaded Images', 'litespeed-cache') ; ?></a>
24
  </font>
25
  </div>
91
  __( 'Lazy Load Image Placeholder', 'litespeed-cache' )
92
  ) ; ?>
93
  <?php echo sprintf( __( 'If set to %s this is done in the foreground, which may slow down page load.', 'litespeed-cache' ), '<code>' . __('OFF', 'litespeed-cache') . '</code>' ) ; ?>
94
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:media#generate_responsive_placeholder' ) ; ?>
95
  </div>
96
 
97
  <?php if ( $last_responsive_placeholder_generated ) : ?>
135
  <div class="litespeed-desc">
136
  <?php echo __( 'Include the lazy load image Javascript library inline.', 'litespeed-cache' ) ; ?>
137
  <?php echo __( 'This can improve your speed score in services like Pingdom, GTmetrix and PageSpeed.', 'litespeed-cache' ) ; ?>
138
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:media#inline_lazy_load_images_library' ) ; ?>
139
  </div>
140
  </td>
141
  </tr>
179
  <?php echo __( 'Automatically remove the original image backups after fetching optimized images.', 'litespeed-cache' ) ; ?>
180
 
181
  <br /><font class="litespeed-danger">
182
+ 🚨
183
  <?php echo __( 'This is irreversible.', 'litespeed-cache' ) ; ?>
184
  <?php echo __( 'You will be unable to Revert Optimization once the backups are deleted!', 'litespeed-cache' ) ; ?>
185
  </font>
248
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPT_MEDIA_WEBP_REPLACE_SRCSET ) ; ?>
249
  <div class="litespeed-desc">
250
  <?php echo sprintf( __( 'Enable replacement of WebP in %s elements that were generated outside of WordPress logic.', 'litespeed-cache' ), '<code>srcset</code>' ) ; ?>
251
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:media#webp_for_extra_srcset' ) ; ?>
252
  </div>
253
  </td>
254
  </tr>
admin/tpl/setting/settings_optimize.php CHANGED
@@ -7,7 +7,7 @@ $last_critical_css_generated = LiteSpeed_Cache_CSS::get_summary() ;
7
 
8
  <h3 class="litespeed-title-short">
9
  <?php echo __('Optimization Settings', 'litespeed-cache'); ?>
10
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:optimize" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
11
  </h3>
12
 
13
  <?php if ( ! LiteSpeed_Cache_Data::optm_available() ) : ?>
@@ -162,7 +162,7 @@ $last_critical_css_generated = LiteSpeed_Cache_CSS::get_summary() ;
162
  <div class="litespeed-desc">
163
  <?php echo __( 'Automatically generate critical CSS in the background via a cron-based queue.', 'litespeed-cache' ) ; ?>
164
  <?php echo sprintf( __( 'If set to %s this is done in the foreground, which may slow down page load.', 'litespeed-cache' ), '<code>' . __('OFF', 'litespeed-cache') . '</code>' ) ; ?>
165
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:optimize#generate_critical_css" target="_blank"><?php echo __( 'Learn More', 'litespeed-cache' ) ; ?></a>
166
  </div>
167
 
168
  <?php if ( $last_critical_css_generated ) : ?>
@@ -247,7 +247,7 @@ $last_critical_css_generated = LiteSpeed_Cache_CSS::get_summary() ;
247
  <div class="litespeed-desc">
248
  <?php echo sprintf( __( 'Improve compatibility with inline JS by preventing jQuery optimization. (Recommended Setting: %s)', 'litespeed-cache' ), __( 'ON', 'litespeed-cache' ) ) ; ?>
249
  <br /><font class="litespeed-warning">
250
- <?php echo __('NOTE', 'litespeed-cache'); ?>:
251
  <?php echo sprintf( __( 'If there is any JS error related to %1$s when enabled %2$s, please turn on this option.', 'litespeed-cache' ), 'jQuery', __( 'JS Combine', 'litespeed-cache' ) ) ; ?>
252
  </font>
253
  </div>
7
 
8
  <h3 class="litespeed-title-short">
9
  <?php echo __('Optimization Settings', 'litespeed-cache'); ?>
10
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:optimize', false, 'litespeed-learn-more' ) ; ?>
11
  </h3>
12
 
13
  <?php if ( ! LiteSpeed_Cache_Data::optm_available() ) : ?>
162
  <div class="litespeed-desc">
163
  <?php echo __( 'Automatically generate critical CSS in the background via a cron-based queue.', 'litespeed-cache' ) ; ?>
164
  <?php echo sprintf( __( 'If set to %s this is done in the foreground, which may slow down page load.', 'litespeed-cache' ), '<code>' . __('OFF', 'litespeed-cache') . '</code>' ) ; ?>
165
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:optimize#generate_critical_css' ) ; ?>
166
  </div>
167
 
168
  <?php if ( $last_critical_css_generated ) : ?>
247
  <div class="litespeed-desc">
248
  <?php echo sprintf( __( 'Improve compatibility with inline JS by preventing jQuery optimization. (Recommended Setting: %s)', 'litespeed-cache' ), __( 'ON', 'litespeed-cache' ) ) ; ?>
249
  <br /><font class="litespeed-warning">
250
+ ⚠️
251
  <?php echo sprintf( __( 'If there is any JS error related to %1$s when enabled %2$s, please turn on this option.', 'litespeed-cache' ), 'jQuery', __( 'JS Combine', 'litespeed-cache' ) ) ; ?>
252
  </font>
253
  </div>
admin/tpl/setting/settings_purge.php CHANGED
@@ -5,7 +5,7 @@ if (!defined('WPINC')) die;
5
 
6
  <h3 class="litespeed-title-short">
7
  <?php echo __('Purge Settings', 'litespeed-cache'); ?>
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() ; ?>
5
 
6
  <h3 class="litespeed-title-short">
7
  <?php echo __('Purge Settings', 'litespeed-cache'); ?>
8
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:purge', false, 'litespeed-learn-more' ) ; ?>
9
  </h3>
10
 
11
  <?php $this->cache_disabled_warning() ; ?>
admin/tpl/setting/settings_tuning.php CHANGED
@@ -5,7 +5,7 @@ if ( ! defined( 'WPINC' ) ) die ;
5
 
6
  <h3 class="litespeed-title-short">
7
  <?php echo __('Tuning Settings', 'litespeed-cache'); ?>
8
- <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:tuning" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
9
  </h3>
10
  <table><tbody>
11
 
@@ -17,7 +17,7 @@ if ( ! defined( 'WPINC' ) ) die ;
17
  <?php echo __( 'Load combined CSS files before other CSS files.', 'litespeed-cache' ) ; ?>
18
  <?php echo sprintf( __( 'Set to %s by default.', 'litespeed-cache' ), __( 'OFF', 'litespeed-cache' ) ) ; ?>
19
  <br /><font class="litespeed-warning">
20
- <?php echo __('NOTE', 'litespeed-cache'); ?>:
21
  <?php echo sprintf( __( 'Only set to %s when changing the order of combined and uncombined CSS is needed.', 'litespeed-cache'), __( 'ON', 'litespeed-cache' ) ) ; ?>
22
  </font>
23
  <br /><font class="litespeed-success">
@@ -53,7 +53,7 @@ if ( ! defined( 'WPINC' ) ) die ;
53
  <?php echo __( 'Load combined JS files before other JS files.', 'litespeed-cache' ) ; ?>
54
  <?php echo sprintf( __( 'Set to %s by default.', 'litespeed-cache' ), __( 'OFF', 'litespeed-cache' ) ) ; ?>
55
  <br /><font class="litespeed-warning">
56
- <?php echo __('NOTE', 'litespeed-cache'); ?>:
57
  <?php echo sprintf( __( 'Only set to %s when changing the order of combined and uncombined JS is needed.', 'litespeed-cache'), __( 'ON', 'litespeed-cache' ) ) ; ?>
58
  </font>
59
  <br /><font class="litespeed-success">
@@ -101,6 +101,14 @@ if ( ! defined( 'WPINC' ) ) die ;
101
  <div class="litespeed-desc">
102
  <?php echo __( 'Remove query strings from static resources.', 'litespeed-cache' ) ; ?>
103
  <?php echo __( 'This can improve your speed score in services like Pingdom, GTmetrix and PageSpeed.', 'litespeed-cache' ) ; ?>
 
 
 
 
 
 
 
 
104
  </div>
105
  </td>
106
  </tr>
5
 
6
  <h3 class="litespeed-title-short">
7
  <?php echo __('Tuning Settings', 'litespeed-cache'); ?>
8
+ <?php $this->learn_more( 'https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:tuning', false, 'litespeed-learn-more' ) ; ?>
9
  </h3>
10
  <table><tbody>
11
 
17
  <?php echo __( 'Load combined CSS files before other CSS files.', 'litespeed-cache' ) ; ?>
18
  <?php echo sprintf( __( 'Set to %s by default.', 'litespeed-cache' ), __( 'OFF', 'litespeed-cache' ) ) ; ?>
19
  <br /><font class="litespeed-warning">
20
+ ⚠️
21
  <?php echo sprintf( __( 'Only set to %s when changing the order of combined and uncombined CSS is needed.', 'litespeed-cache'), __( 'ON', 'litespeed-cache' ) ) ; ?>
22
  </font>
23
  <br /><font class="litespeed-success">
53
  <?php echo __( 'Load combined JS files before other JS files.', 'litespeed-cache' ) ; ?>
54
  <?php echo sprintf( __( 'Set to %s by default.', 'litespeed-cache' ), __( 'OFF', 'litespeed-cache' ) ) ; ?>
55
  <br /><font class="litespeed-warning">
56
+ ⚠️
57
  <?php echo sprintf( __( 'Only set to %s when changing the order of combined and uncombined JS is needed.', 'litespeed-cache'), __( 'ON', 'litespeed-cache' ) ) ; ?>
58
  </font>
59
  <br /><font class="litespeed-success">
101
  <div class="litespeed-desc">
102
  <?php echo __( 'Remove query strings from static resources.', 'litespeed-cache' ) ; ?>
103
  <?php echo __( 'This can improve your speed score in services like Pingdom, GTmetrix and PageSpeed.', 'litespeed-cache' ) ; ?>
104
+ <br /><font class="litespeed-warning">
105
+ ⚠️
106
+ <?php echo __( 'Google reCAPTCHA will be bypassed automatically.', 'litespeed-cache' ) ; ?>
107
+ </font>
108
+ <br /><font class="litespeed-success">
109
+ <?php echo __('API', 'litespeed-cache'); ?>:
110
+ <?php echo sprintf( __( 'Append query string %s to the resources to bypass this action.', 'litespeed-cache' ), '<code>&_litespeed_rm_qs=0</code>' ) ; ?>
111
+ </font>
112
  </div>
113
  </td>
114
  </tr>
inc/const.cls.php CHANGED
@@ -27,6 +27,7 @@ class LiteSpeed_Cache_Const
27
  const ITEM_OBJECT_GLOBAL_GROUPS = 'litespeed-object_global_groups' ;
28
  const ITEM_OBJECT_NON_PERSISTENT_GROUPS = 'litespeed-object_non_persistent_groups' ;
29
  const ITEM_CRWL_AS_UIDS = 'litespeed-crawler-as-uids' ;
 
30
  const ITEM_ADV_PURGE_ALL_HOOKS = 'litespeed-adv-purge_all_hooks' ;
31
  const ITEM_CDN_ORI_DIR = 'litespeed-cdn-ori_dir' ;
32
  const ITEM_MEDIA_WEBP_ATTRIBUTE = 'litespeed-media-webp_attribute' ;
@@ -257,6 +258,7 @@ class LiteSpeed_Cache_Const
257
  self::ITEM_OBJECT_GLOBAL_GROUPS,
258
  self::ITEM_OBJECT_NON_PERSISTENT_GROUPS,
259
  self::ITEM_CRWL_AS_UIDS,
 
260
  self::ITEM_ADV_PURGE_ALL_HOOKS,
261
  self::ITEM_FORCE_CACHE_URI,
262
  self::ITEM_CACHE_URI_PRIV,
27
  const ITEM_OBJECT_GLOBAL_GROUPS = 'litespeed-object_global_groups' ;
28
  const ITEM_OBJECT_NON_PERSISTENT_GROUPS = 'litespeed-object_non_persistent_groups' ;
29
  const ITEM_CRWL_AS_UIDS = 'litespeed-crawler-as-uids' ;
30
+ const ITEM_CRWL_COOKIES = 'litespeed-crawler-cookies' ;
31
  const ITEM_ADV_PURGE_ALL_HOOKS = 'litespeed-adv-purge_all_hooks' ;
32
  const ITEM_CDN_ORI_DIR = 'litespeed-cdn-ori_dir' ;
33
  const ITEM_MEDIA_WEBP_ATTRIBUTE = 'litespeed-media-webp_attribute' ;
258
  self::ITEM_OBJECT_GLOBAL_GROUPS,
259
  self::ITEM_OBJECT_NON_PERSISTENT_GROUPS,
260
  self::ITEM_CRWL_AS_UIDS,
261
+ self::ITEM_CRWL_COOKIES,
262
  self::ITEM_ADV_PURGE_ALL_HOOKS,
263
  self::ITEM_FORCE_CACHE_URI,
264
  self::ITEM_CACHE_URI_PRIV,
inc/crawler.class.php CHANGED
@@ -22,6 +22,8 @@ class LiteSpeed_Cache_Crawler
22
  private $_home_url ;
23
  const CRWL_BLACKLIST = 'crawler_blacklist' ;
24
 
 
 
25
  /**
26
  * Initialize crawler, assign sitemap path
27
  *
@@ -42,6 +44,8 @@ class LiteSpeed_Cache_Crawler
42
  }
43
  $this->_blacklist_file = $this->_sitemap_file . '.blacklist' ;
44
 
 
 
45
  LiteSpeed_Cache_Log::debug('Crawler: Initialized') ;
46
  }
47
 
@@ -101,7 +105,7 @@ class LiteSpeed_Cache_Crawler
101
  }
102
  $content = $_POST[ self::CRWL_BLACKLIST ] ;
103
  $content = array_map( 'trim', explode( "\n", $content ) ) ;// remove space
104
- $content = implode( "\n", array_filter( $content ) ) ;
105
 
106
  // save blacklist file
107
  $ret = Litespeed_File::save( $this->_blacklist_file, $content, true, false, false ) ;
@@ -135,6 +139,7 @@ class LiteSpeed_Cache_Crawler
135
  $ori_list = array_merge( $ori_list, $list ) ;
136
  $ori_list = array_map( 'trim', $ori_list ) ;
137
  $ori_list = array_filter( $ori_list ) ;
 
138
  $content = implode( "\n", $ori_list ) ;
139
 
140
  // save blacklist
@@ -255,7 +260,7 @@ class LiteSpeed_Cache_Crawler
255
  protected function _generate_sitemap()
256
  {
257
  // use custom sitemap
258
- if ( $sitemap = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::CRWL_CUSTOM_SITEMAP ) ) {
259
  $sitemap_urls = $this->parse_custom_sitemap( $sitemap ) ;
260
  $urls = array() ;
261
  $offset = strlen( $this->_home_url ) ;
@@ -266,6 +271,7 @@ class LiteSpeed_Cache_Crawler
266
  }
267
  }
268
  }
 
269
  }
270
  else {
271
  $urls = LiteSpeed_Cache_Crawler_Sitemap::get_instance()->generate_data() ;
@@ -379,13 +385,11 @@ class LiteSpeed_Cache_Crawler
379
  }
380
  }
381
 
382
- $options = LiteSpeed_Cache_Config::get_instance()->get_options() ;
383
-
384
  $crawler = new Litespeed_Crawler($this->_sitemap_file) ;
385
  // if finished last time, regenerate sitemap
386
  if ( $last_fnished_at = $crawler->get_done_status() ) {
387
  // check whole crawling interval
388
- if ( ! $force && time() - $last_fnished_at < $options[LiteSpeed_Cache_Config::CRWL_CRAWL_INTERVAL] ) {
389
  LiteSpeed_Cache_Log::debug('Crawler: Cron abort: cache warmed already.') ;
390
  // if not reach whole crawling interval, exit
391
  return;
@@ -394,20 +398,20 @@ class LiteSpeed_Cache_Crawler
394
  $this->_generate_sitemap() ;
395
  }
396
  $crawler->set_base_url($this->_home_url) ;
397
- $crawler->set_run_duration($options[LiteSpeed_Cache_Config::CRWL_RUN_DURATION]) ;
398
 
399
  /**
400
  * Limit delay to use server setting
401
  * @since 1.8.3
402
  */
403
- $usleep = $options[ LiteSpeed_Cache_Config::CRWL_USLEEP ] ;
404
  if ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] ) && $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] > $usleep ) {
405
  $usleep = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] ;
406
  }
407
  $crawler->set_run_delay( $usleep ) ;
408
- $crawler->set_threads_limit( $options[ LiteSpeed_Cache_Config::CRWL_THREADS ] ) ;
409
 
410
- $server_load_limit = $options[ LiteSpeed_Cache_Config::CRWL_LOAD_LIMIT ] ;
411
  if ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ) ) {
412
  $server_load_limit = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ;
413
  }
@@ -415,8 +419,8 @@ class LiteSpeed_Cache_Crawler
415
  $server_load_limit = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT ] ;
416
  }
417
  $crawler->set_load_limit( $server_load_limit ) ;
418
- if ( $options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP] ) {
419
- $crawler->set_domain_ip($options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP]) ;
420
  }
421
 
422
  // Get current crawler
@@ -431,30 +435,53 @@ class LiteSpeed_Cache_Crawler
431
  $curr_crawler_pos = 0 ;
432
  }
433
  $current_crawler = $crawlers[ $curr_crawler_pos ] ;
 
 
434
  /**
435
  * Set role simulation
436
  * @since 1.9.1
437
  */
438
- if ( $current_crawler[ 'uid' ] ) {
439
  // Get role simulation vary name
440
  $vary_inst = LiteSpeed_Cache_Vary::get_instance() ;
441
  $vary_name = $vary_inst->get_vary_name() ;
442
  $vary_val = $vary_inst->finalize_default_vary( $current_crawler[ 'uid' ] ) ;
443
- $cookies = array(
444
- $vary_name => $vary_val,
445
- 'litespeed_role' => $current_crawler[ 'uid' ],
446
- ) ;
447
 
 
 
 
 
 
 
 
 
 
 
 
 
 
448
  $crawler->set_cookies( $cookies ) ;
449
  }
 
450
  /**
451
  * Set WebP simulation
452
  * @since 1.9.1
453
  */
454
- if ( $current_crawler[ 'webp' ] ) {
455
  $crawler->set_headers( array( 'Accept: image/webp,*/*' ) ) ;
456
  }
457
 
 
 
 
 
 
 
 
 
458
  $ret = $crawler->engine_start() ;
459
 
460
  // merge blacklist
@@ -487,28 +514,34 @@ class LiteSpeed_Cache_Crawler
487
  */
488
  public function list_crawlers( $count_only = false )
489
  {
490
- // Get roles set
491
- $roles = LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_CRWL_AS_UIDS ) ;
 
 
 
 
 
 
 
 
 
 
492
 
493
- // WebP on/off
494
- $webp = LiteSpeed_Cache_Media::webp_enabled() ;
495
 
496
- if ( $count_only ) {
497
- $count = count( $roles ) + 1 ;
498
- if ( $webp ) {
499
- $count *= 2 ;
500
- }
501
- return $count ;
502
  }
503
 
504
- $crawler_list = array(
505
- array( 'uid' => 0, 'role_title' => __( 'Guest', 'litespeed-cache' ), 'webp' => 0 ),
506
- ) ;
507
-
508
- if ( $webp ) {
509
- $crawler_list[] = array( 'uid' => 0, 'role_title' => __( 'Guest', 'litespeed-cache' ), 'webp' => 1 ) ;
510
  }
511
 
 
 
512
  // List all roles
513
  foreach ( $roles as $v ) {
514
  $role_title = '' ;
@@ -520,15 +553,73 @@ class LiteSpeed_Cache_Crawler
520
  if ( ! $role_title ) {
521
  continue ;
522
  }
523
- $crawler_list[] = array( 'uid' => $v, 'role_title' => $role_title, 'webp' => 0 ) ;
524
 
525
- if ( $webp ) {
526
- $crawler_list[] = array( 'uid' => $v, 'role_title' => $role_title, 'webp' => 1 ) ;
 
 
 
 
 
 
 
 
 
 
 
 
527
  }
528
  }
529
 
 
 
 
 
 
 
 
530
  return $crawler_list ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
531
 
 
532
  }
533
 
534
  /**
22
  private $_home_url ;
23
  const CRWL_BLACKLIST = 'crawler_blacklist' ;
24
 
25
+ private $_options ;
26
+
27
  /**
28
  * Initialize crawler, assign sitemap path
29
  *
44
  }
45
  $this->_blacklist_file = $this->_sitemap_file . '.blacklist' ;
46
 
47
+ $this->_options = LiteSpeed_Cache_Config::get_instance()->get_options() ;
48
+
49
  LiteSpeed_Cache_Log::debug('Crawler: Initialized') ;
50
  }
51
 
105
  }
106
  $content = $_POST[ self::CRWL_BLACKLIST ] ;
107
  $content = array_map( 'trim', explode( "\n", $content ) ) ;// remove space
108
+ $content = implode( "\n", array_unique( array_filter( $content ) ) ) ;
109
 
110
  // save blacklist file
111
  $ret = Litespeed_File::save( $this->_blacklist_file, $content, true, false, false ) ;
139
  $ori_list = array_merge( $ori_list, $list ) ;
140
  $ori_list = array_map( 'trim', $ori_list ) ;
141
  $ori_list = array_filter( $ori_list ) ;
142
+ $ori_list = array_unique( $ori_list ) ;
143
  $content = implode( "\n", $ori_list ) ;
144
 
145
  // save blacklist
260
  protected function _generate_sitemap()
261
  {
262
  // use custom sitemap
263
+ if ( $sitemap = $this->_options[ LiteSpeed_Cache_Config::CRWL_CUSTOM_SITEMAP ] ) {
264
  $sitemap_urls = $this->parse_custom_sitemap( $sitemap ) ;
265
  $urls = array() ;
266
  $offset = strlen( $this->_home_url ) ;
271
  }
272
  }
273
  }
274
+ $urls = array_unique( $urls ) ;
275
  }
276
  else {
277
  $urls = LiteSpeed_Cache_Crawler_Sitemap::get_instance()->generate_data() ;
385
  }
386
  }
387
 
 
 
388
  $crawler = new Litespeed_Crawler($this->_sitemap_file) ;
389
  // if finished last time, regenerate sitemap
390
  if ( $last_fnished_at = $crawler->get_done_status() ) {
391
  // check whole crawling interval
392
+ if ( ! $force && time() - $last_fnished_at < $this->_options[LiteSpeed_Cache_Config::CRWL_CRAWL_INTERVAL] ) {
393
  LiteSpeed_Cache_Log::debug('Crawler: Cron abort: cache warmed already.') ;
394
  // if not reach whole crawling interval, exit
395
  return;
398
  $this->_generate_sitemap() ;
399
  }
400
  $crawler->set_base_url($this->_home_url) ;
401
+ $crawler->set_run_duration($this->_options[LiteSpeed_Cache_Config::CRWL_RUN_DURATION]) ;
402
 
403
  /**
404
  * Limit delay to use server setting
405
  * @since 1.8.3
406
  */
407
+ $usleep = $this->_options[ LiteSpeed_Cache_Config::CRWL_USLEEP ] ;
408
  if ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] ) && $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] > $usleep ) {
409
  $usleep = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] ;
410
  }
411
  $crawler->set_run_delay( $usleep ) ;
412
+ $crawler->set_threads_limit( $this->_options[ LiteSpeed_Cache_Config::CRWL_THREADS ] ) ;
413
 
414
+ $server_load_limit = $this->_options[ LiteSpeed_Cache_Config::CRWL_LOAD_LIMIT ] ;
415
  if ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ) ) {
416
  $server_load_limit = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ;
417
  }
419
  $server_load_limit = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT ] ;
420
  }
421
  $crawler->set_load_limit( $server_load_limit ) ;
422
+ if ( $this->_options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP] ) {
423
+ $crawler->set_domain_ip($this->_options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP]) ;
424
  }
425
 
426
  // Get current crawler
435
  $curr_crawler_pos = 0 ;
436
  }
437
  $current_crawler = $crawlers[ $curr_crawler_pos ] ;
438
+
439
+ $cookies = array() ;
440
  /**
441
  * Set role simulation
442
  * @since 1.9.1
443
  */
444
+ if ( ! empty( $current_crawler[ 'uid' ] ) ) {
445
  // Get role simulation vary name
446
  $vary_inst = LiteSpeed_Cache_Vary::get_instance() ;
447
  $vary_name = $vary_inst->get_vary_name() ;
448
  $vary_val = $vary_inst->finalize_default_vary( $current_crawler[ 'uid' ] ) ;
449
+ $cookies[ $vary_name ] = $vary_val ;
450
+ $cookies[ 'litespeed_role' ] = $current_crawler[ 'uid' ] ;
451
+ }
 
452
 
453
+ /**
454
+ * Check cookie crawler
455
+ * @since 2.8
456
+ */
457
+ foreach ( $current_crawler as $k => $v ) {
458
+ if ( strpos( $k, 'cookie:') !== 0 ) {
459
+ continue ;
460
+ }
461
+
462
+ $cookies[ substr( $k, 7 ) ] = $v ;
463
+ }
464
+
465
+ if ( $cookies ) {
466
  $crawler->set_cookies( $cookies ) ;
467
  }
468
+
469
  /**
470
  * Set WebP simulation
471
  * @since 1.9.1
472
  */
473
+ if ( ! empty( $current_crawler[ 'webp' ] ) ) {
474
  $crawler->set_headers( array( 'Accept: image/webp,*/*' ) ) ;
475
  }
476
 
477
+ /**
478
+ * Set mobile crawler
479
+ * @since 2.8
480
+ */
481
+ if ( ! empty( $current_crawler[ 'mobile' ] ) ) {
482
+ $crawler->set_ua( 'Mobile' ) ;
483
+ }
484
+
485
  $ret = $crawler->engine_start() ;
486
 
487
  // merge blacklist
514
  */
515
  public function list_crawlers( $count_only = false )
516
  {
517
+ /**
518
+ * Data structure:
519
+ * [
520
+ * tagA => [
521
+ * valueA => titleA,
522
+ * valueB => titleB
523
+ * ...
524
+ * ],
525
+ * ...
526
+ * ]
527
+ */
528
+ $crawler_factors = array() ;
529
 
530
+ // Add default Guest crawler
531
+ $crawler_factors[ 'uid' ] = array( 0 => __( 'Guest', 'litespeed-cache' ) ) ;
532
 
533
+ // WebP on/off
534
+ if ( LiteSpeed_Cache_Media::webp_enabled() ) {
535
+ $crawler_factors[ 'webp' ] = array( 0 => '', 1 => 'WebP' ) ;
 
 
 
536
  }
537
 
538
+ // Mobile crawler
539
+ if ( $this->_options[ LiteSpeed_Cache_Config::OPID_CACHE_MOBILE ] ) {
540
+ $crawler_factors[ 'mobile' ] = array( 0 => '', 1 => '<font title="Mobile">📱</font>' ) ;
 
 
 
541
  }
542
 
543
+ // Get roles set
544
+ $roles = LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_CRWL_AS_UIDS ) ;
545
  // List all roles
546
  foreach ( $roles as $v ) {
547
  $role_title = '' ;
553
  if ( ! $role_title ) {
554
  continue ;
555
  }
 
556
 
557
+ $crawler_factors[ 'uid' ][ $v ] = ucfirst( $role_title ) ;
558
+ }
559
+
560
+ // Cookie crawler
561
+ $cookie_crawlers = LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_CRWL_COOKIES ) ;
562
+ foreach ( $cookie_crawlers as $k => $v ) {
563
+
564
+ $this_cookie_key = 'cookie:' . $k ;
565
+
566
+ $crawler_factors[ $this_cookie_key ] = array() ;
567
+
568
+ foreach ( explode( "\n", $v ) as $v2 ) {
569
+ $v2 = trim( $v2 ) ;
570
+ $crawler_factors[ $this_cookie_key ][ $v2 ] = "<font title='Cookie'>🍪</font>$k=$v2" ;
571
  }
572
  }
573
 
574
+ // Crossing generate the crawler list
575
+ $crawler_list = $this->_recursive_build_crawler( $crawler_factors ) ;
576
+
577
+ if ( $count_only ) {
578
+ return count( $crawler_list ) ;
579
+ }
580
+
581
  return $crawler_list ;
582
+ }
583
+
584
+
585
+ /**
586
+ * Build a crawler list recursively
587
+ *
588
+ * @since 2.8
589
+ * @access private
590
+ */
591
+ private function _recursive_build_crawler( $crawler_factors, $group = array(), $i = 0 )
592
+ {
593
+ $current_factor = array_keys( $crawler_factors )[ $i ] ;
594
+
595
+ $if_touch_end = $i + 1 >= count( $crawler_factors ) ;
596
+
597
+ $final_list = array() ;
598
+
599
+ foreach ( $crawler_factors[ $current_factor ] as $k => $v ) {
600
+
601
+ // Don't alter $group bcos of loop usage
602
+ $item = $group ;
603
+ $item[ 'title' ] = ! empty( $group[ 'title' ] ) ? $group[ 'title' ] : '' ;
604
+ if ( $v ) {
605
+ if ( $item[ 'title' ] ) {
606
+ $item[ 'title' ] .= ' - ' ;
607
+ }
608
+ $item[ 'title' ] .= $v ;
609
+ }
610
+ $item[ $current_factor ] = $k ;
611
+
612
+ if ( $if_touch_end ) {
613
+ $final_list[] = $item ;
614
+ }
615
+ else {
616
+ // Inception: next layer
617
+ $final_list = array_merge( $final_list, $this->_recursive_build_crawler( $crawler_factors, $item, $i + 1 ) ) ;
618
+ }
619
+
620
+ }
621
 
622
+ return $final_list ;
623
  }
624
 
625
  /**
inc/esi.class.php CHANGED
@@ -63,6 +63,42 @@ class LiteSpeed_Cache_ESI
63
  }
64
  }
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  }
67
 
68
  /**
@@ -124,6 +160,7 @@ class LiteSpeed_Cache_ESI
124
  add_action('litespeed_cache_load_esi_block-comment-form', array($this, 'load_comment_form_block')) ;
125
 
126
  add_action('litespeed_cache_load_esi_block-lscwp_nonce_esi', array( $this, 'load_nonce_block' ) ) ;
 
127
  }
128
 
129
  /**
@@ -534,6 +571,43 @@ class LiteSpeed_Cache_ESI
534
  echo wp_create_nonce( $action ) ;
535
  }
536
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
537
  /**
538
  * Hooked to the comment_form_defaults filter.
539
  * Stores the default comment form settings.
63
  }
64
  }
65
 
66
+ /**
67
+ * Shortcode ESI
68
+ *
69
+ * To use it, just change the origianl shortcode as below:
70
+ * old: [someshortcode aa='bb']
71
+ * new: [esi someshortcode aa='bb' cache='private,no-vary' ttl='600']
72
+ *
73
+ * 1. `cache` attribute is optional, default to 'public,no-vary'.
74
+ * 2. `ttl` attribute is optional, default is your public TTL setting.
75
+ *
76
+ * @since 2.8`
77
+ */
78
+ add_shortcode( 'esi', array( $this, 'shortcode' ) ) ;
79
+ }
80
+
81
+ /**
82
+ * Shortcode ESI
83
+ *
84
+ * @since 2.8
85
+ * @access public
86
+ */
87
+ public function shortcode( $atts )
88
+ {
89
+ if ( empty( $atts[ 0 ] ) ) {
90
+ LiteSpeed_Cache_Log::debug( '[ESI] ===shortcode wrong format', $atts ) ;
91
+ return 'Wrong shortcode esi format' ;
92
+ }
93
+
94
+ $cache = 'public,no-vary' ;
95
+ if ( ! empty( $atts[ 'cache' ] ) ) {
96
+ $cache = $atts[ 'cache' ] ;
97
+ unset( $atts[ 'cache' ] ) ;
98
+ }
99
+
100
+ // Show ESI link
101
+ return self::sub_esi_block( 'esi', 'esi-shortcode', $atts, $cache ) ;
102
  }
103
 
104
  /**
160
  add_action('litespeed_cache_load_esi_block-comment-form', array($this, 'load_comment_form_block')) ;
161
 
162
  add_action('litespeed_cache_load_esi_block-lscwp_nonce_esi', array( $this, 'load_nonce_block' ) ) ;
163
+ add_action('litespeed_cache_load_esi_block-esi', array( $this, 'load_esi_shortcode' ) ) ;
164
  }
165
 
166
  /**
571
  echo wp_create_nonce( $action ) ;
572
  }
573
 
574
+ /**
575
+ * Show original shortcode
576
+ *
577
+ * @access public
578
+ * @since 2.8
579
+ */
580
+ public function load_esi_shortcode( $params )
581
+ {
582
+ unset( $params[ self::PARAM_BLOCK_ID ] ) ;
583
+
584
+ if ( isset( $params[ 'ttl' ] ) ) {
585
+ if ( ! $params[ 'ttl' ] ) {
586
+ LiteSpeed_Cache_Control::set_nocache( 'ESI shortcode att ttl=0' ) ;
587
+ }
588
+ else {
589
+ LiteSpeed_Cache_Control::set_custom_ttl( $params[ 'ttl' ] ) ;
590
+ }
591
+ unset( $params[ 'ttl' ] ) ;
592
+ }
593
+
594
+ // Replace to original shortcode
595
+ $shortcode = $params[ 0 ] ;
596
+ $atts_ori = array() ;
597
+ foreach ( $params as $k => $v ) {
598
+ if ( $k === 0 ) {
599
+ continue ;
600
+ }
601
+
602
+ $atts_ori[] = is_string( $k ) ? "$k='" . addslashes( $v ) . "'" : $v ;
603
+ }
604
+
605
+ LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_ESI . "esi.$shortcode" ) ;
606
+
607
+ // Output original shortcode final content
608
+ echo do_shortcode( "[$shortcode " . implode( ' ', $atts_ori ) . " ]" ) ;
609
+ }
610
+
611
  /**
612
  * Hooked to the comment_form_defaults filter.
613
  * Stores the default comment form settings.
inc/img_optm.class.php CHANGED
@@ -33,6 +33,7 @@ class LiteSpeed_Cache_Img_Optm
33
  const DB_IMG_OPTIMIZE_DESTROY = 'litespeed-optimize-destroy' ;
34
  const DB_IMG_OPTIMIZE_DATA = 'litespeed-optimize-data' ;
35
  const DB_IMG_OPTIMIZE_STATUS = 'litespeed-optimize-status' ;
 
36
  const DB_IMG_OPTIMIZE_STATUS_REQUESTED = 'requested' ;
37
  const DB_IMG_OPTIMIZE_STATUS_NOTIFIED = 'notified' ;
38
  const DB_IMG_OPTIMIZE_STATUS_PULLED = 'pulled' ;
@@ -1399,7 +1400,7 @@ class LiteSpeed_Cache_Img_Optm
1399
  $request_time = get_option( self::DB_IMG_OPTIMIZE_DESTROY ) ;
1400
  if ( time() - $request_time > 300 ) {
1401
  LiteSpeed_Cache_Log::debug( '[Img_Optm] terminate DESTROY process due to timeout' ) ;
1402
- exit( 'Destroy callback timeout ( 300 seconds )' ) ;
1403
  }
1404
 
1405
  // Start deleting files
33
  const DB_IMG_OPTIMIZE_DESTROY = 'litespeed-optimize-destroy' ;
34
  const DB_IMG_OPTIMIZE_DATA = 'litespeed-optimize-data' ;
35
  const DB_IMG_OPTIMIZE_STATUS = 'litespeed-optimize-status' ;
36
+ const DB_IMG_OPTIMIZE_STATUS_PREPARE = 'prepare' ;
37
  const DB_IMG_OPTIMIZE_STATUS_REQUESTED = 'requested' ;
38
  const DB_IMG_OPTIMIZE_STATUS_NOTIFIED = 'notified' ;
39
  const DB_IMG_OPTIMIZE_STATUS_PULLED = 'pulled' ;
1400
  $request_time = get_option( self::DB_IMG_OPTIMIZE_DESTROY ) ;
1401
  if ( time() - $request_time > 300 ) {
1402
  LiteSpeed_Cache_Log::debug( '[Img_Optm] terminate DESTROY process due to timeout' ) ;
1403
+ exit( 'Destroy callback timeout ( 300 seconds )[' . time() . " - $request_time]" ) ;
1404
  }
1405
 
1406
  // Start deleting files
inc/litespeed-cache.class.php CHANGED
@@ -25,7 +25,7 @@ class LiteSpeed_Cache
25
 
26
  const NAME = 'LiteSpeed Cache' ;
27
  const PLUGIN_NAME = 'litespeed-cache' ;
28
- const PLUGIN_VERSION = '2.7.3' ;
29
 
30
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
31
 
25
 
26
  const NAME = 'LiteSpeed Cache' ;
27
  const PLUGIN_NAME = 'litespeed-cache' ;
28
+ const PLUGIN_VERSION = '2.8' ;
29
 
30
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
31
 
inc/log.class.php CHANGED
@@ -37,7 +37,7 @@ class LiteSpeed_Cache_Log
37
  private function __construct()
38
  {
39
  self::$log_path = LSCWP_CONTENT_DIR . '/debug.log' ;
40
- if ( ! empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) && $_SERVER[ 'HTTP_USER_AGENT' ] === Litespeed_Crawler::FAST_USER_AGENT ) {
41
  self::$log_path = LSCWP_CONTENT_DIR . '/crawler.log' ;
42
  }
43
 
37
  private function __construct()
38
  {
39
  self::$log_path = LSCWP_CONTENT_DIR . '/debug.log' ;
40
+ if ( ! empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) && strpos( $_SERVER[ 'HTTP_USER_AGENT' ], Litespeed_Crawler::FAST_USER_AGENT ) === 0 ) {
41
  self::$log_path = LSCWP_CONTENT_DIR . '/crawler.log' ;
42
  }
43
 
inc/media.class.php CHANGED
@@ -934,7 +934,9 @@ eot;
934
  $req_summary[ 'last_spent' ] = time() - $req_summary[ 'curr_request' ] ;
935
  $req_summary[ 'last_request' ] = $req_summary[ 'curr_request' ] ;
936
  $req_summary[ 'curr_request' ] = 0 ;
937
- unset( $req_summary[ 'queue' ][ array_search( $size, $req_summary[ 'queue' ] ) ] ) ;
 
 
938
 
939
  $this->_save_summary( $req_summary ) ;
940
 
934
  $req_summary[ 'last_spent' ] = time() - $req_summary[ 'curr_request' ] ;
935
  $req_summary[ 'last_request' ] = $req_summary[ 'curr_request' ] ;
936
  $req_summary[ 'curr_request' ] = 0 ;
937
+ if ( ! empty( $req_summary[ 'queue' ] ) && in_array( $size, $req_summary[ 'queue' ] ) ) {
938
+ unset( $req_summary[ 'queue' ][ array_search( $size, $req_summary[ 'queue' ] ) ] ) ;
939
+ }
940
 
941
  $this->_save_summary( $req_summary ) ;
942
 
inc/optimize.class.php CHANGED
@@ -261,9 +261,14 @@ class LiteSpeed_Cache_Optimize
261
  */
262
  public function remove_query_strings( $src )
263
  {
264
- if ( strpos( $src, '.js?' ) !== false || strpos( $src, '.css?' ) !== false ) {
265
- $src = preg_replace( '/\?.*/', '', $src ) ;
266
- }
 
 
 
 
 
267
  return $src ;
268
  }
269
 
@@ -606,7 +611,7 @@ class LiteSpeed_Cache_Optimize
606
  return ;
607
  }
608
 
609
- LiteSpeed_Cache_Log::debug( '[Optm] google fonts async found: ', $this->_ggfonts_urls ) ;
610
 
611
  $html = '<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />' ;
612
 
@@ -1050,7 +1055,7 @@ class LiteSpeed_Cache_Optimize
1050
  // Check Google fonts hit
1051
  if ( $this->cfg_ggfonts_rm || $this->cfg_ggfonts_async ) {
1052
  if ( strpos( $attrs[ 'href' ], 'fonts.googleapis.com' ) !== false ) {
1053
- LiteSpeed_Cache_Log::debug( '[Optm] rm css snippet [Google fonts] ' . $attrs[ 'href' ] ) ;
1054
  $this->content = str_replace( $match[ 0 ], '', $this->content ) ;
1055
 
1056
  /**
261
  */
262
  public function remove_query_strings( $src )
263
  {
264
+ if ( strpos( $src, '_litespeed_rm_qs=0' ) || strpos( $src, '/recaptcha' ) ) {
265
+ return $src ;
266
+ }
267
+
268
+ if ( strpos( $src, '.js?' ) !== false || strpos( $src, '.css?' ) !== false ) {
269
+ $src = preg_replace( '/\?.*/', '', $src ) ;
270
+ }
271
+
272
  return $src ;
273
  }
274
 
611
  return ;
612
  }
613
 
614
+ LiteSpeed_Cache_Log::debug2( '[Optm] google fonts async found: ', $this->_ggfonts_urls ) ;
615
 
616
  $html = '<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />' ;
617
 
1055
  // Check Google fonts hit
1056
  if ( $this->cfg_ggfonts_rm || $this->cfg_ggfonts_async ) {
1057
  if ( strpos( $attrs[ 'href' ], 'fonts.googleapis.com' ) !== false ) {
1058
+ LiteSpeed_Cache_Log::debug2( '[Optm] rm css snippet [Google fonts] ' . $attrs[ 'href' ] ) ;
1059
  $this->content = str_replace( $match[ 0 ], '', $this->content ) ;
1060
 
1061
  /**
inc/optimizer.class.php CHANGED
@@ -230,7 +230,7 @@ class LiteSpeed_Cache_Optimizer
230
  return $data ;
231
  } catch ( Exception $e ) {
232
  LiteSpeed_Cache_Log::debug( '******[Optmer] minify_js failed: ' . $e->getMessage() ) ;
233
- error_log( '****** LiteSpeed Optimizer minify_js failed: ' . $e->getMessage() ) ;
234
  return $data ;
235
  }
236
  }
230
  return $data ;
231
  } catch ( Exception $e ) {
232
  LiteSpeed_Cache_Log::debug( '******[Optmer] minify_js failed: ' . $e->getMessage() ) ;
233
+ // error_log( '****** LiteSpeed Optimizer minify_js failed: ' . $e->getMessage() ) ;
234
  return $data ;
235
  }
236
  }
inc/router.class.php CHANGED
@@ -168,7 +168,7 @@ class LiteSpeed_Cache_Router
168
  LiteSpeed_Cache_Log::debug( '[Router] starting crawler role validation' ) ;
169
 
170
  // Check if is from crawler
171
- if ( empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) || $_SERVER[ 'HTTP_USER_AGENT' ] !== Litespeed_Crawler::FAST_USER_AGENT ) {
172
  LiteSpeed_Cache_Log::debug( '[Router] user agent not match' ) ;
173
  return ;
174
  }
168
  LiteSpeed_Cache_Log::debug( '[Router] starting crawler role validation' ) ;
169
 
170
  // Check if is from crawler
171
+ if ( empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) || strpos( $_SERVER[ 'HTTP_USER_AGENT' ], Litespeed_Crawler::FAST_USER_AGENT ) !== 0 ) {
172
  LiteSpeed_Cache_Log::debug( '[Router] user agent not match' ) ;
173
  return ;
174
  }
includes/litespeed-cache-crawler.class.php CHANGED
@@ -22,6 +22,8 @@ class LiteSpeed_Cache_Crawler
22
  private $_home_url ;
23
  const CRWL_BLACKLIST = 'crawler_blacklist' ;
24
 
 
 
25
  /**
26
  * Initialize crawler, assign sitemap path
27
  *
@@ -42,6 +44,8 @@ class LiteSpeed_Cache_Crawler
42
  }
43
  $this->_blacklist_file = $this->_sitemap_file . '.blacklist' ;
44
 
 
 
45
  LiteSpeed_Cache_Log::debug('Crawler: Initialized') ;
46
  }
47
 
@@ -101,7 +105,7 @@ class LiteSpeed_Cache_Crawler
101
  }
102
  $content = $_POST[ self::CRWL_BLACKLIST ] ;
103
  $content = array_map( 'trim', explode( "\n", $content ) ) ;// remove space
104
- $content = implode( "\n", array_filter( $content ) ) ;
105
 
106
  // save blacklist file
107
  $ret = Litespeed_File::save( $this->_blacklist_file, $content, true, false, false ) ;
@@ -135,6 +139,7 @@ class LiteSpeed_Cache_Crawler
135
  $ori_list = array_merge( $ori_list, $list ) ;
136
  $ori_list = array_map( 'trim', $ori_list ) ;
137
  $ori_list = array_filter( $ori_list ) ;
 
138
  $content = implode( "\n", $ori_list ) ;
139
 
140
  // save blacklist
@@ -255,7 +260,7 @@ class LiteSpeed_Cache_Crawler
255
  protected function _generate_sitemap()
256
  {
257
  // use custom sitemap
258
- if ( $sitemap = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::CRWL_CUSTOM_SITEMAP ) ) {
259
  $sitemap_urls = $this->parse_custom_sitemap( $sitemap ) ;
260
  $urls = array() ;
261
  $offset = strlen( $this->_home_url ) ;
@@ -266,6 +271,7 @@ class LiteSpeed_Cache_Crawler
266
  }
267
  }
268
  }
 
269
  }
270
  else {
271
  $urls = LiteSpeed_Cache_Crawler_Sitemap::get_instance()->generate_data() ;
@@ -379,13 +385,11 @@ class LiteSpeed_Cache_Crawler
379
  }
380
  }
381
 
382
- $options = LiteSpeed_Cache_Config::get_instance()->get_options() ;
383
-
384
  $crawler = new Litespeed_Crawler($this->_sitemap_file) ;
385
  // if finished last time, regenerate sitemap
386
  if ( $last_fnished_at = $crawler->get_done_status() ) {
387
  // check whole crawling interval
388
- if ( ! $force && time() - $last_fnished_at < $options[LiteSpeed_Cache_Config::CRWL_CRAWL_INTERVAL] ) {
389
  LiteSpeed_Cache_Log::debug('Crawler: Cron abort: cache warmed already.') ;
390
  // if not reach whole crawling interval, exit
391
  return;
@@ -394,20 +398,20 @@ class LiteSpeed_Cache_Crawler
394
  $this->_generate_sitemap() ;
395
  }
396
  $crawler->set_base_url($this->_home_url) ;
397
- $crawler->set_run_duration($options[LiteSpeed_Cache_Config::CRWL_RUN_DURATION]) ;
398
 
399
  /**
400
  * Limit delay to use server setting
401
  * @since 1.8.3
402
  */
403
- $usleep = $options[ LiteSpeed_Cache_Config::CRWL_USLEEP ] ;
404
  if ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] ) && $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] > $usleep ) {
405
  $usleep = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] ;
406
  }
407
  $crawler->set_run_delay( $usleep ) ;
408
- $crawler->set_threads_limit( $options[ LiteSpeed_Cache_Config::CRWL_THREADS ] ) ;
409
 
410
- $server_load_limit = $options[ LiteSpeed_Cache_Config::CRWL_LOAD_LIMIT ] ;
411
  if ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ) ) {
412
  $server_load_limit = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ;
413
  }
@@ -415,8 +419,8 @@ class LiteSpeed_Cache_Crawler
415
  $server_load_limit = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT ] ;
416
  }
417
  $crawler->set_load_limit( $server_load_limit ) ;
418
- if ( $options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP] ) {
419
- $crawler->set_domain_ip($options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP]) ;
420
  }
421
 
422
  // Get current crawler
@@ -431,30 +435,53 @@ class LiteSpeed_Cache_Crawler
431
  $curr_crawler_pos = 0 ;
432
  }
433
  $current_crawler = $crawlers[ $curr_crawler_pos ] ;
 
 
434
  /**
435
  * Set role simulation
436
  * @since 1.9.1
437
  */
438
- if ( $current_crawler[ 'uid' ] ) {
439
  // Get role simulation vary name
440
  $vary_inst = LiteSpeed_Cache_Vary::get_instance() ;
441
  $vary_name = $vary_inst->get_vary_name() ;
442
  $vary_val = $vary_inst->finalize_default_vary( $current_crawler[ 'uid' ] ) ;
443
- $cookies = array(
444
- $vary_name => $vary_val,
445
- 'litespeed_role' => $current_crawler[ 'uid' ],
446
- ) ;
447
 
 
 
 
 
 
 
 
 
 
 
 
 
 
448
  $crawler->set_cookies( $cookies ) ;
449
  }
 
450
  /**
451
  * Set WebP simulation
452
  * @since 1.9.1
453
  */
454
- if ( $current_crawler[ 'webp' ] ) {
455
  $crawler->set_headers( array( 'Accept: image/webp,*/*' ) ) ;
456
  }
457
 
 
 
 
 
 
 
 
 
458
  $ret = $crawler->engine_start() ;
459
 
460
  // merge blacklist
@@ -487,28 +514,34 @@ class LiteSpeed_Cache_Crawler
487
  */
488
  public function list_crawlers( $count_only = false )
489
  {
490
- // Get roles set
491
- $roles = LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_CRWL_AS_UIDS ) ;
 
 
 
 
 
 
 
 
 
 
492
 
493
- // WebP on/off
494
- $webp = LiteSpeed_Cache_Media::webp_enabled() ;
495
 
496
- if ( $count_only ) {
497
- $count = count( $roles ) + 1 ;
498
- if ( $webp ) {
499
- $count *= 2 ;
500
- }
501
- return $count ;
502
  }
503
 
504
- $crawler_list = array(
505
- array( 'uid' => 0, 'role_title' => __( 'Guest', 'litespeed-cache' ), 'webp' => 0 ),
506
- ) ;
507
-
508
- if ( $webp ) {
509
- $crawler_list[] = array( 'uid' => 0, 'role_title' => __( 'Guest', 'litespeed-cache' ), 'webp' => 1 ) ;
510
  }
511
 
 
 
512
  // List all roles
513
  foreach ( $roles as $v ) {
514
  $role_title = '' ;
@@ -520,15 +553,73 @@ class LiteSpeed_Cache_Crawler
520
  if ( ! $role_title ) {
521
  continue ;
522
  }
523
- $crawler_list[] = array( 'uid' => $v, 'role_title' => $role_title, 'webp' => 0 ) ;
524
 
525
- if ( $webp ) {
526
- $crawler_list[] = array( 'uid' => $v, 'role_title' => $role_title, 'webp' => 1 ) ;
 
 
 
 
 
 
 
 
 
 
 
 
527
  }
528
  }
529
 
 
 
 
 
 
 
 
530
  return $crawler_list ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
531
 
 
532
  }
533
 
534
  /**
22
  private $_home_url ;
23
  const CRWL_BLACKLIST = 'crawler_blacklist' ;
24
 
25
+ private $_options ;
26
+
27
  /**
28
  * Initialize crawler, assign sitemap path
29
  *
44
  }
45
  $this->_blacklist_file = $this->_sitemap_file . '.blacklist' ;
46
 
47
+ $this->_options = LiteSpeed_Cache_Config::get_instance()->get_options() ;
48
+
49
  LiteSpeed_Cache_Log::debug('Crawler: Initialized') ;
50
  }
51
 
105
  }
106
  $content = $_POST[ self::CRWL_BLACKLIST ] ;
107
  $content = array_map( 'trim', explode( "\n", $content ) ) ;// remove space
108
+ $content = implode( "\n", array_unique( array_filter( $content ) ) ) ;
109
 
110
  // save blacklist file
111
  $ret = Litespeed_File::save( $this->_blacklist_file, $content, true, false, false ) ;
139
  $ori_list = array_merge( $ori_list, $list ) ;
140
  $ori_list = array_map( 'trim', $ori_list ) ;
141
  $ori_list = array_filter( $ori_list ) ;
142
+ $ori_list = array_unique( $ori_list ) ;
143
  $content = implode( "\n", $ori_list ) ;
144
 
145
  // save blacklist
260
  protected function _generate_sitemap()
261
  {
262
  // use custom sitemap
263
+ if ( $sitemap = $this->_options[ LiteSpeed_Cache_Config::CRWL_CUSTOM_SITEMAP ] ) {
264
  $sitemap_urls = $this->parse_custom_sitemap( $sitemap ) ;
265
  $urls = array() ;
266
  $offset = strlen( $this->_home_url ) ;
271
  }
272
  }
273
  }
274
+ $urls = array_unique( $urls ) ;
275
  }
276
  else {
277
  $urls = LiteSpeed_Cache_Crawler_Sitemap::get_instance()->generate_data() ;
385
  }
386
  }
387
 
 
 
388
  $crawler = new Litespeed_Crawler($this->_sitemap_file) ;
389
  // if finished last time, regenerate sitemap
390
  if ( $last_fnished_at = $crawler->get_done_status() ) {
391
  // check whole crawling interval
392
+ if ( ! $force && time() - $last_fnished_at < $this->_options[LiteSpeed_Cache_Config::CRWL_CRAWL_INTERVAL] ) {
393
  LiteSpeed_Cache_Log::debug('Crawler: Cron abort: cache warmed already.') ;
394
  // if not reach whole crawling interval, exit
395
  return;
398
  $this->_generate_sitemap() ;
399
  }
400
  $crawler->set_base_url($this->_home_url) ;
401
+ $crawler->set_run_duration($this->_options[LiteSpeed_Cache_Config::CRWL_RUN_DURATION]) ;
402
 
403
  /**
404
  * Limit delay to use server setting
405
  * @since 1.8.3
406
  */
407
+ $usleep = $this->_options[ LiteSpeed_Cache_Config::CRWL_USLEEP ] ;
408
  if ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] ) && $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] > $usleep ) {
409
  $usleep = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] ;
410
  }
411
  $crawler->set_run_delay( $usleep ) ;
412
+ $crawler->set_threads_limit( $this->_options[ LiteSpeed_Cache_Config::CRWL_THREADS ] ) ;
413
 
414
+ $server_load_limit = $this->_options[ LiteSpeed_Cache_Config::CRWL_LOAD_LIMIT ] ;
415
  if ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ) ) {
416
  $server_load_limit = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ;
417
  }
419
  $server_load_limit = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT ] ;
420
  }
421
  $crawler->set_load_limit( $server_load_limit ) ;
422
+ if ( $this->_options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP] ) {
423
+ $crawler->set_domain_ip($this->_options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP]) ;
424
  }
425
 
426
  // Get current crawler
435
  $curr_crawler_pos = 0 ;
436
  }
437
  $current_crawler = $crawlers[ $curr_crawler_pos ] ;
438
+
439
+ $cookies = array() ;
440
  /**
441
  * Set role simulation
442
  * @since 1.9.1
443
  */
444
+ if ( ! empty( $current_crawler[ 'uid' ] ) ) {
445
  // Get role simulation vary name
446
  $vary_inst = LiteSpeed_Cache_Vary::get_instance() ;
447
  $vary_name = $vary_inst->get_vary_name() ;
448
  $vary_val = $vary_inst->finalize_default_vary( $current_crawler[ 'uid' ] ) ;
449
+ $cookies[ $vary_name ] = $vary_val ;
450
+ $cookies[ 'litespeed_role' ] = $current_crawler[ 'uid' ] ;
451
+ }
 
452
 
453
+ /**
454
+ * Check cookie crawler
455
+ * @since 2.8
456
+ */
457
+ foreach ( $current_crawler as $k => $v ) {
458
+ if ( strpos( $k, 'cookie:') !== 0 ) {
459
+ continue ;
460
+ }
461
+
462
+ $cookies[ substr( $k, 7 ) ] = $v ;
463
+ }
464
+
465
+ if ( $cookies ) {
466
  $crawler->set_cookies( $cookies ) ;
467
  }
468
+
469
  /**
470
  * Set WebP simulation
471
  * @since 1.9.1
472
  */
473
+ if ( ! empty( $current_crawler[ 'webp' ] ) ) {
474
  $crawler->set_headers( array( 'Accept: image/webp,*/*' ) ) ;
475
  }
476
 
477
+ /**
478
+ * Set mobile crawler
479
+ * @since 2.8
480
+ */
481
+ if ( ! empty( $current_crawler[ 'mobile' ] ) ) {
482
+ $crawler->set_ua( 'Mobile' ) ;
483
+ }
484
+
485
  $ret = $crawler->engine_start() ;
486
 
487
  // merge blacklist
514
  */
515
  public function list_crawlers( $count_only = false )
516
  {
517
+ /**
518
+ * Data structure:
519
+ * [
520
+ * tagA => [
521
+ * valueA => titleA,
522
+ * valueB => titleB
523
+ * ...
524
+ * ],
525
+ * ...
526
+ * ]
527
+ */
528
+ $crawler_factors = array() ;
529
 
530
+ // Add default Guest crawler
531
+ $crawler_factors[ 'uid' ] = array( 0 => __( 'Guest', 'litespeed-cache' ) ) ;
532
 
533
+ // WebP on/off
534
+ if ( LiteSpeed_Cache_Media::webp_enabled() ) {
535
+ $crawler_factors[ 'webp' ] = array( 0 => '', 1 => 'WebP' ) ;
 
 
 
536
  }
537
 
538
+ // Mobile crawler
539
+ if ( $this->_options[ LiteSpeed_Cache_Config::OPID_CACHE_MOBILE ] ) {
540
+ $crawler_factors[ 'mobile' ] = array( 0 => '', 1 => '<font title="Mobile">📱</font>' ) ;
 
 
 
541
  }
542
 
543
+ // Get roles set
544
+ $roles = LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_CRWL_AS_UIDS ) ;
545
  // List all roles
546
  foreach ( $roles as $v ) {
547
  $role_title = '' ;
553
  if ( ! $role_title ) {
554
  continue ;
555
  }
 
556
 
557
+ $crawler_factors[ 'uid' ][ $v ] = ucfirst( $role_title ) ;
558
+ }
559
+
560
+ // Cookie crawler
561
+ $cookie_crawlers = LiteSpeed_Cache_Config::get_instance()->get_item( LiteSpeed_Cache_Config::ITEM_CRWL_COOKIES ) ;
562
+ foreach ( $cookie_crawlers as $k => $v ) {
563
+
564
+ $this_cookie_key = 'cookie:' . $k ;
565
+
566
+ $crawler_factors[ $this_cookie_key ] = array() ;
567
+
568
+ foreach ( explode( "\n", $v ) as $v2 ) {
569
+ $v2 = trim( $v2 ) ;
570
+ $crawler_factors[ $this_cookie_key ][ $v2 ] = "<font title='Cookie'>🍪</font>$k=$v2" ;
571
  }
572
  }
573
 
574
+ // Crossing generate the crawler list
575
+ $crawler_list = $this->_recursive_build_crawler( $crawler_factors ) ;
576
+
577
+ if ( $count_only ) {
578
+ return count( $crawler_list ) ;
579
+ }
580
+
581
  return $crawler_list ;
582
+ }
583
+
584
+
585
+ /**
586
+ * Build a crawler list recursively
587
+ *
588
+ * @since 2.8
589
+ * @access private
590
+ */
591
+ private function _recursive_build_crawler( $crawler_factors, $group = array(), $i = 0 )
592
+ {
593
+ $current_factor = array_keys( $crawler_factors )[ $i ] ;
594
+
595
+ $if_touch_end = $i + 1 >= count( $crawler_factors ) ;
596
+
597
+ $final_list = array() ;
598
+
599
+ foreach ( $crawler_factors[ $current_factor ] as $k => $v ) {
600
+
601
+ // Don't alter $group bcos of loop usage
602
+ $item = $group ;
603
+ $item[ 'title' ] = ! empty( $group[ 'title' ] ) ? $group[ 'title' ] : '' ;
604
+ if ( $v ) {
605
+ if ( $item[ 'title' ] ) {
606
+ $item[ 'title' ] .= ' - ' ;
607
+ }
608
+ $item[ 'title' ] .= $v ;
609
+ }
610
+ $item[ $current_factor ] = $k ;
611
+
612
+ if ( $if_touch_end ) {
613
+ $final_list[] = $item ;
614
+ }
615
+ else {
616
+ // Inception: next layer
617
+ $final_list = array_merge( $final_list, $this->_recursive_build_crawler( $crawler_factors, $item, $i + 1 ) ) ;
618
+ }
619
+
620
+ }
621
 
622
+ return $final_list ;
623
  }
624
 
625
  /**
includes/litespeed-cache-esi.class.php CHANGED
@@ -63,6 +63,42 @@ class LiteSpeed_Cache_ESI
63
  }
64
  }
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  }
67
 
68
  /**
@@ -124,6 +160,7 @@ class LiteSpeed_Cache_ESI
124
  add_action('litespeed_cache_load_esi_block-comment-form', array($this, 'load_comment_form_block')) ;
125
 
126
  add_action('litespeed_cache_load_esi_block-lscwp_nonce_esi', array( $this, 'load_nonce_block' ) ) ;
 
127
  }
128
 
129
  /**
@@ -534,6 +571,43 @@ class LiteSpeed_Cache_ESI
534
  echo wp_create_nonce( $action ) ;
535
  }
536
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
537
  /**
538
  * Hooked to the comment_form_defaults filter.
539
  * Stores the default comment form settings.
63
  }
64
  }
65
 
66
+ /**
67
+ * Shortcode ESI
68
+ *
69
+ * To use it, just change the origianl shortcode as below:
70
+ * old: [someshortcode aa='bb']
71
+ * new: [esi someshortcode aa='bb' cache='private,no-vary' ttl='600']
72
+ *
73
+ * 1. `cache` attribute is optional, default to 'public,no-vary'.
74
+ * 2. `ttl` attribute is optional, default is your public TTL setting.
75
+ *
76
+ * @since 2.8`
77
+ */
78
+ add_shortcode( 'esi', array( $this, 'shortcode' ) ) ;
79
+ }
80
+
81
+ /**
82
+ * Shortcode ESI
83
+ *
84
+ * @since 2.8
85
+ * @access public
86
+ */
87
+ public function shortcode( $atts )
88
+ {
89
+ if ( empty( $atts[ 0 ] ) ) {
90
+ LiteSpeed_Cache_Log::debug( '[ESI] ===shortcode wrong format', $atts ) ;
91
+ return 'Wrong shortcode esi format' ;
92
+ }
93
+
94
+ $cache = 'public,no-vary' ;
95
+ if ( ! empty( $atts[ 'cache' ] ) ) {
96
+ $cache = $atts[ 'cache' ] ;
97
+ unset( $atts[ 'cache' ] ) ;
98
+ }
99
+
100
+ // Show ESI link
101
+ return self::sub_esi_block( 'esi', 'esi-shortcode', $atts, $cache ) ;
102
  }
103
 
104
  /**
160
  add_action('litespeed_cache_load_esi_block-comment-form', array($this, 'load_comment_form_block')) ;
161
 
162
  add_action('litespeed_cache_load_esi_block-lscwp_nonce_esi', array( $this, 'load_nonce_block' ) ) ;
163
+ add_action('litespeed_cache_load_esi_block-esi', array( $this, 'load_esi_shortcode' ) ) ;
164
  }
165
 
166
  /**
571
  echo wp_create_nonce( $action ) ;
572
  }
573
 
574
+ /**
575
+ * Show original shortcode
576
+ *
577
+ * @access public
578
+ * @since 2.8
579
+ */
580
+ public function load_esi_shortcode( $params )
581
+ {
582
+ unset( $params[ self::PARAM_BLOCK_ID ] ) ;
583
+
584
+ if ( isset( $params[ 'ttl' ] ) ) {
585
+ if ( ! $params[ 'ttl' ] ) {
586
+ LiteSpeed_Cache_Control::set_nocache( 'ESI shortcode att ttl=0' ) ;
587
+ }
588
+ else {
589
+ LiteSpeed_Cache_Control::set_custom_ttl( $params[ 'ttl' ] ) ;
590
+ }
591
+ unset( $params[ 'ttl' ] ) ;
592
+ }
593
+
594
+ // Replace to original shortcode
595
+ $shortcode = $params[ 0 ] ;
596
+ $atts_ori = array() ;
597
+ foreach ( $params as $k => $v ) {
598
+ if ( $k === 0 ) {
599
+ continue ;
600
+ }
601
+
602
+ $atts_ori[] = is_string( $k ) ? "$k='" . addslashes( $v ) . "'" : $v ;
603
+ }
604
+
605
+ LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_ESI . "esi.$shortcode" ) ;
606
+
607
+ // Output original shortcode final content
608
+ echo do_shortcode( "[$shortcode " . implode( ' ', $atts_ori ) . " ]" ) ;
609
+ }
610
+
611
  /**
612
  * Hooked to the comment_form_defaults filter.
613
  * Stores the default comment form settings.
includes/litespeed-cache-log.class.php CHANGED
@@ -37,7 +37,7 @@ class LiteSpeed_Cache_Log
37
  private function __construct()
38
  {
39
  self::$log_path = LSCWP_CONTENT_DIR . '/debug.log' ;
40
- if ( ! empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) && $_SERVER[ 'HTTP_USER_AGENT' ] === Litespeed_Crawler::FAST_USER_AGENT ) {
41
  self::$log_path = LSCWP_CONTENT_DIR . '/crawler.log' ;
42
  }
43
 
37
  private function __construct()
38
  {
39
  self::$log_path = LSCWP_CONTENT_DIR . '/debug.log' ;
40
+ if ( ! empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) && strpos( $_SERVER[ 'HTTP_USER_AGENT' ], Litespeed_Crawler::FAST_USER_AGENT ) === 0 ) {
41
  self::$log_path = LSCWP_CONTENT_DIR . '/crawler.log' ;
42
  }
43
 
includes/litespeed-cache-optimize.class.php CHANGED
@@ -261,9 +261,14 @@ class LiteSpeed_Cache_Optimize
261
  */
262
  public function remove_query_strings( $src )
263
  {
264
- if ( strpos( $src, '.js?' ) !== false || strpos( $src, '.css?' ) !== false ) {
265
- $src = preg_replace( '/\?.*/', '', $src ) ;
266
- }
 
 
 
 
 
267
  return $src ;
268
  }
269
 
@@ -606,7 +611,7 @@ class LiteSpeed_Cache_Optimize
606
  return ;
607
  }
608
 
609
- LiteSpeed_Cache_Log::debug( '[Optm] google fonts async found: ', $this->_ggfonts_urls ) ;
610
 
611
  $html = '<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />' ;
612
 
@@ -1050,7 +1055,7 @@ class LiteSpeed_Cache_Optimize
1050
  // Check Google fonts hit
1051
  if ( $this->cfg_ggfonts_rm || $this->cfg_ggfonts_async ) {
1052
  if ( strpos( $attrs[ 'href' ], 'fonts.googleapis.com' ) !== false ) {
1053
- LiteSpeed_Cache_Log::debug( '[Optm] rm css snippet [Google fonts] ' . $attrs[ 'href' ] ) ;
1054
  $this->content = str_replace( $match[ 0 ], '', $this->content ) ;
1055
 
1056
  /**
261
  */
262
  public function remove_query_strings( $src )
263
  {
264
+ if ( strpos( $src, '_litespeed_rm_qs=0' ) || strpos( $src, '/recaptcha' ) ) {
265
+ return $src ;
266
+ }
267
+
268
+ if ( strpos( $src, '.js?' ) !== false || strpos( $src, '.css?' ) !== false ) {
269
+ $src = preg_replace( '/\?.*/', '', $src ) ;
270
+ }
271
+
272
  return $src ;
273
  }
274
 
611
  return ;
612
  }
613
 
614
+ LiteSpeed_Cache_Log::debug2( '[Optm] google fonts async found: ', $this->_ggfonts_urls ) ;
615
 
616
  $html = '<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />' ;
617
 
1055
  // Check Google fonts hit
1056
  if ( $this->cfg_ggfonts_rm || $this->cfg_ggfonts_async ) {
1057
  if ( strpos( $attrs[ 'href' ], 'fonts.googleapis.com' ) !== false ) {
1058
+ LiteSpeed_Cache_Log::debug2( '[Optm] rm css snippet [Google fonts] ' . $attrs[ 'href' ] ) ;
1059
  $this->content = str_replace( $match[ 0 ], '', $this->content ) ;
1060
 
1061
  /**
includes/litespeed-cache-router.class.php CHANGED
@@ -168,7 +168,7 @@ class LiteSpeed_Cache_Router
168
  LiteSpeed_Cache_Log::debug( '[Router] starting crawler role validation' ) ;
169
 
170
  // Check if is from crawler
171
- if ( empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) || $_SERVER[ 'HTTP_USER_AGENT' ] !== Litespeed_Crawler::FAST_USER_AGENT ) {
172
  LiteSpeed_Cache_Log::debug( '[Router] user agent not match' ) ;
173
  return ;
174
  }
168
  LiteSpeed_Cache_Log::debug( '[Router] starting crawler role validation' ) ;
169
 
170
  // Check if is from crawler
171
+ if ( empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) || strpos( $_SERVER[ 'HTTP_USER_AGENT' ], Litespeed_Crawler::FAST_USER_AGENT ) !== 0 ) {
172
  LiteSpeed_Cache_Log::debug( '[Router] user agent not match' ) ;
173
  return ;
174
  }
includes/litespeed-cache.class.php CHANGED
@@ -25,7 +25,7 @@ class LiteSpeed_Cache
25
 
26
  const NAME = 'LiteSpeed Cache' ;
27
  const PLUGIN_NAME = 'litespeed-cache' ;
28
- const PLUGIN_VERSION = '2.7.3' ;
29
 
30
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
31
 
25
 
26
  const NAME = 'LiteSpeed Cache' ;
27
  const PLUGIN_NAME = 'litespeed-cache' ;
28
+ const PLUGIN_VERSION = '2.8' ;
29
 
30
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
31
 
js/lazyload.lib.js CHANGED
@@ -116,12 +116,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
116
  };
117
 
118
  var detectWebp = function detectWebp() {
119
- var webpString = "image/webp";
120
- var canvas = document.createElement("canvas");
121
 
122
- if (canvas.getContext && canvas.getContext("2d")) {
123
- return canvas.toDataURL(webpString).indexOf('data:' + webpString) === 0;
124
- }
125
 
126
  return false;
127
  };
116
  };
117
 
118
  var detectWebp = function detectWebp() {
119
+ // var webpString = "image/webp";
120
+ // var canvas = document.createElement("canvas");
121
 
122
+ // if (canvas.getContext && canvas.getContext("2d")) {
123
+ // return canvas.toDataURL(webpString).indexOf('data:' + webpString) === 0;
124
+ // }
125
 
126
  return false;
127
  };
js/lazyload.min.js CHANGED
@@ -1 +1 @@
1
- var _extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t,e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.LazyLoad=e()}(this,function(){"use strict";var n={elements_selector:"img",container:document,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,callback_load:null,callback_error:null,callback_set:null,callback_enter:null,callback_finish:null,to_webp:!1},a="data-",s="was-processed",o="ll-timeout",r="true",c=function(t,e){return t.getAttribute(a+e)},i=function(t,e,n){var o=a+e;null!==n?t.setAttribute(o,n):t.removeAttribute(o)},l=function(t){return c(t,s)===r},u=function(t,e){return i(t,o,e)},d=function(t){return c(t,o)},f=function(t,e){var n,o="LazyLoad::Initialized",a=new t(e);try{n=new CustomEvent(o,{detail:{instance:a}})}catch(t){(n=document.createEvent("CustomEvent")).initCustomEvent(o,!1,!1,{instance:a})}window.dispatchEvent(n)};var t,e,_=function(t,e){return e?t.replace(/\.(jpe?g|png)/gi,".webp"):t},v="undefined"!=typeof window,h=v&&!("onscroll"in window)||/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),b=v&&"IntersectionObserver"in window,g=v&&"classList"in document.createElement("p"),m=v&&(t="image/webp",!(!(e=document.createElement("canvas")).getContext||!e.getContext("2d"))&&0===e.toDataURL(t).indexOf("data:"+t)),p=function(t,e,n,o){for(var a,s=0;a=t.children[s];s+=1)if("SOURCE"===a.tagName){var r=c(a,n);y(a,e,r,o)}},y=function(t,e,n,o){n&&t.setAttribute(e,_(n,o))},w={IMG:function(t,e){var n=m&&e.to_webp,o=e.data_srcset,a=t.parentNode;a&&"PICTURE"===a.tagName&&p(a,"srcset",o,n);var s=c(t,e.data_sizes);y(t,"sizes",s);var r=c(t,o);y(t,"srcset",r,n);var i=c(t,e.data_src);y(t,"src",i,n)},IFRAME:function(t,e){var n=c(t,e.data_src);y(t,"src",n)},VIDEO:function(t,e){var n=e.data_src,o=c(t,n);p(t,"src",n),y(t,"src",o),t.load()}},E=function(t,e){var n,o,a=e._settings,s=t.tagName,r=w[s];if(r)return r(t,a),e._updateLoadingCount(1),void(e._elements=(n=e._elements,o=t,n.filter(function(t){return t!==o})));!function(t,e){var n=m&&e.to_webp,o=c(t,e.data_src),a=c(t,e.data_bg);if(o){var s=_(o,n);t.style.backgroundImage='url("'+s+'")'}if(a){var r=_(a,n);t.style.backgroundImage=r}}(t,a)},L=function(t,e){g?t.classList.add(e):t.className+=(t.className?" ":"")+e},I=function(t,e){t&&t(e)},O="load",C="loadeddata",k="error",x=function(t,e,n){t.addEventListener(e,n)},A=function(t,e,n){t.removeEventListener(e,n)},z=function(t,e,n){A(t,O,e),A(t,C,e),A(t,k,n)},N=function(t,e,n){var o,a,s=n._settings,r=e?s.class_loaded:s.class_error,i=e?s.callback_load:s.callback_error,c=t.target;o=c,a=s.class_loading,g?o.classList.remove(a):o.className=o.className.replace(new RegExp("(^|\\s+)"+a+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,""),L(c,r),I(i,c),n._updateLoadingCount(-1)},M=function(n,o){var t,e,a,s=function t(e){N(e,!0,o),z(n,t,r)},r=function t(e){N(e,!1,o),z(n,s,t)};a=r,x(t=n,O,e=s),x(t,C,e),x(t,k,a)},R=["IMG","IFRAME","VIDEO"],S=function(t,e,n){D(t,n),e.unobserve(t)},j=function(t){var e=d(t);e&&(clearTimeout(e),u(t,null))};function D(t,e,n){var o=e._settings;!n&&l(t)||(I(o.callback_enter,t),-1<R.indexOf(t.tagName)&&(M(t,e),L(t,o.class_loading)),E(t,e),i(t,s,r),I(o.callback_set,t))}var T=function(t){return t.isIntersecting||0<t.intersectionRatio},U=function(t,e){this._settings=_extends({},n,t),this._setObserver(),this._loadingCount=0,this.update(e)};return U.prototype={_manageIntersection:function(t){var e,n,o,a,s,r=this._observer,i=this._settings.load_delay,c=t.target;i?T(t)?(e=c,n=r,a=(o=this)._settings.load_delay,(s=d(e))||(s=setTimeout(function(){S(e,n,o),j(e)},a),u(e,s))):j(c):T(t)&&S(c,r,this)},_onIntersection:function(t){t.forEach(this._manageIntersection.bind(this))},_setObserver:function(){var t;b&&(this._observer=new IntersectionObserver(this._onIntersection.bind(this),{root:(t=this._settings).container===document?null:t.container,rootMargin:t.thresholds||t.threshold+"px"}))},_updateLoadingCount:function(t){this._loadingCount+=t,0===this._elements.length&&0===this._loadingCount&&I(this._settings.callback_finish)},update:function(t){var e=this,n=this._settings,o=t||n.container.querySelectorAll(n.elements_selector);this._elements=Array.prototype.slice.call(o).filter(function(t){return!l(t)}),!h&&this._observer?this._elements.forEach(function(t){e._observer.observe(t)}):this.loadAll()},destroy:function(){var e=this;this._observer&&(this._elements.forEach(function(t){e._observer.unobserve(t)}),this._observer=null),this._elements=null,this._settings=null},load:function(t,e){D(t,this,e)},loadAll:function(){var e=this;this._elements.forEach(function(t){e.load(t)})}},v&&function(t,e){if(e)if(e.length)for(var n,o=0;n=e[o];o+=1)f(t,n);else f(t,e)}(U,window.lazyLoadOptions),U}),function(t,e){"use strict";var n,o,a=function(){n=new LazyLoad({elements_selector:"[data-lazyloaded]"}),o=function(){n.update()},t.MutationObserver&&new MutationObserver(o).observe(e.documentElement,{childList:!0,subtree:!0,attributes:!0})};t.addEventListener?t.addEventListener("load",a,!1):t.attachEvent("onload",a)}(window,document);
1
+ var _extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t,e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.LazyLoad=e()}(this,function(){"use strict";var n={elements_selector:"img",container:document,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",class_loading:"loading",class_loaded:"loaded",class_error:"error",load_delay:0,callback_load:null,callback_error:null,callback_set:null,callback_enter:null,callback_finish:null,to_webp:!1},s="data-",r="was-processed",o="ll-timeout",a="true",c=function(t,e){return t.getAttribute(s+e)},i=function(t,e,n){var o=s+e;null!==n?t.setAttribute(o,n):t.removeAttribute(o)},l=function(t){return c(t,r)===a},u=function(t,e){return i(t,o,e)},d=function(t){return c(t,o)},f=function(t,e){var n,o="LazyLoad::Initialized",s=new t(e);try{n=new CustomEvent(o,{detail:{instance:s}})}catch(t){(n=document.createEvent("CustomEvent")).initCustomEvent(o,!1,!1,{instance:s})}window.dispatchEvent(n)};var _=function(t,e){return e?t.replace(/\.(jpe?g|png)/gi,".webp"):t},t="undefined"!=typeof window,v=t&&!("onscroll"in window)||/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),e=t&&"IntersectionObserver"in window,h=t&&"classList"in document.createElement("p"),b=t&&!1,g=function(t,e,n,o){for(var s,r=0;s=t.children[r];r+=1)if("SOURCE"===s.tagName){var a=c(s,n);m(s,e,a,o)}},m=function(t,e,n,o){n&&t.setAttribute(e,_(n,o))},p={IMG:function(t,e){var n=b&&e.to_webp,o=e.data_srcset,s=t.parentNode;s&&"PICTURE"===s.tagName&&g(s,"srcset",o,n);var r=c(t,e.data_sizes);m(t,"sizes",r);var a=c(t,o);m(t,"srcset",a,n);var i=c(t,e.data_src);m(t,"src",i,n)},IFRAME:function(t,e){var n=c(t,e.data_src);m(t,"src",n)},VIDEO:function(t,e){var n=e.data_src,o=c(t,n);g(t,"src",n),m(t,"src",o),t.load()}},y=function(t,e){var n,o,s=e._settings,r=t.tagName,a=p[r];if(a)return a(t,s),e._updateLoadingCount(1),void(e._elements=(n=e._elements,o=t,n.filter(function(t){return t!==o})));!function(t,e){var n=b&&e.to_webp,o=c(t,e.data_src),s=c(t,e.data_bg);if(o){var r=_(o,n);t.style.backgroundImage='url("'+r+'")'}if(s){var a=_(s,n);t.style.backgroundImage=a}}(t,s)},w=function(t,e){h?t.classList.add(e):t.className+=(t.className?" ":"")+e},E=function(t,e){t&&t(e)},L="load",I="loadeddata",O="error",k=function(t,e,n){t.addEventListener(e,n)},A=function(t,e,n){t.removeEventListener(e,n)},C=function(t,e,n){A(t,L,e),A(t,I,e),A(t,O,n)},z=function(t,e,n){var o,s,r=n._settings,a=e?r.class_loaded:r.class_error,i=e?r.callback_load:r.callback_error,c=t.target;o=c,s=r.class_loading,h?o.classList.remove(s):o.className=o.className.replace(new RegExp("(^|\\s+)"+s+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,""),w(c,a),E(i,c),n._updateLoadingCount(-1)},N=function(n,o){var t,e,s,r=function t(e){z(e,!0,o),C(n,t,a)},a=function t(e){z(e,!1,o),C(n,r,t)};s=a,k(t=n,L,e=r),k(t,I,e),k(t,O,s)},x=["IMG","IFRAME","VIDEO"],M=function(t,e,n){R(t,n),e.unobserve(t)},S=function(t){var e=d(t);e&&(clearTimeout(e),u(t,null))};function R(t,e,n){var o=e._settings;!n&&l(t)||(E(o.callback_enter,t),-1<x.indexOf(t.tagName)&&(N(t,e),w(t,o.class_loading)),y(t,e),i(t,r,a),E(o.callback_set,t))}var j=function(t){return t.isIntersecting||0<t.intersectionRatio},T=function(t,e){this._settings=_extends({},n,t),this._setObserver(),this._loadingCount=0,this.update(e)};return T.prototype={_manageIntersection:function(t){var e,n,o,s,r,a=this._observer,i=this._settings.load_delay,c=t.target;i?j(t)?(e=c,n=a,s=(o=this)._settings.load_delay,(r=d(e))||(r=setTimeout(function(){M(e,n,o),S(e)},s),u(e,r))):S(c):j(t)&&M(c,a,this)},_onIntersection:function(t){t.forEach(this._manageIntersection.bind(this))},_setObserver:function(){var t;e&&(this._observer=new IntersectionObserver(this._onIntersection.bind(this),{root:(t=this._settings).container===document?null:t.container,rootMargin:t.thresholds||t.threshold+"px"}))},_updateLoadingCount:function(t){this._loadingCount+=t,0===this._elements.length&&0===this._loadingCount&&E(this._settings.callback_finish)},update:function(t){var e=this,n=this._settings,o=t||n.container.querySelectorAll(n.elements_selector);this._elements=Array.prototype.slice.call(o).filter(function(t){return!l(t)}),!v&&this._observer?this._elements.forEach(function(t){e._observer.observe(t)}):this.loadAll()},destroy:function(){var e=this;this._observer&&(this._elements.forEach(function(t){e._observer.unobserve(t)}),this._observer=null),this._elements=null,this._settings=null},load:function(t,e){R(t,this,e)},loadAll:function(){var e=this;this._elements.forEach(function(t){e.load(t)})}},t&&function(t,e){if(e)if(e.length)for(var n,o=0;n=e[o];o+=1)f(t,n);else f(t,e)}(T,window.lazyLoadOptions),T}),function(t,e){"use strict";var n,o,s=function(){n=new LazyLoad({elements_selector:"[data-lazyloaded]"}),o=function(){n.update()},t.MutationObserver&&new MutationObserver(o).observe(e.documentElement,{childList:!0,subtree:!0,attributes:!0})};t.addEventListener?t.addEventListener("load",s,!1):t.attachEvent("onload",s)}(window,document);
languages/litespeed-cache.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the LiteSpeed Cache package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: LiteSpeed Cache 2.7.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
- "POT-Creation-Date: 2018-11-26 17:25:39+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -128,7 +128,8 @@ msgstr ""
128
  #: admin/tpl/setting/settings_tuning.php:40
129
  #: admin/tpl/setting/settings_tuning.php:60
130
  #: admin/tpl/setting/settings_tuning.php:76
131
- #: admin/tpl/setting/settings_tuning.php:149
 
132
  msgid "API"
133
  msgstr ""
134
 
@@ -136,60 +137,39 @@ msgstr ""
136
  msgid "Server variable(s) %s available to override this setting."
137
  msgstr ""
138
 
139
- #: admin/litespeed-cache-admin-display.class.php:968
140
  #: admin/litespeed-cache-admin.class.php:228
141
  #: admin/tpl/inc/check_cache_disabled.php:49
142
  #: admin/tpl/inc/img_optm.initialize.php:29
143
  #: admin/tpl/inc/img_optm.summary.php:165 admin/tpl/manage/manage_cdn.php:60
144
- #: admin/tpl/setting/settings_advanced.php:10
145
- #: admin/tpl/setting/settings_advanced.php:39
146
- #: admin/tpl/setting/settings_advanced.php:51
147
- #: admin/tpl/setting/settings_advanced.php:63
148
- #: admin/tpl/setting/settings_cache.php:7
149
- #: admin/tpl/setting/settings_cache.php:79
150
- #: admin/tpl/setting/settings_cdn.php:15
151
- #: admin/tpl/setting/settings_crawler.php:8
152
- #: admin/tpl/setting/settings_debug.php:8 admin/tpl/setting/settings_esi.php:8
153
- #: admin/tpl/setting/settings_excludes.php:7
154
- #: admin/tpl/setting/settings_general.php:8
155
- #: admin/tpl/setting/settings_inc.cache_object.php:33
156
- #: admin/tpl/setting/settings_inc.cache_object.php:75
157
- #: admin/tpl/setting/settings_inc.cache_object.php:150
158
- #: admin/tpl/setting/settings_inc.check_adv_file.php:18
159
- #: admin/tpl/setting/settings_media.php:10
160
- #: admin/tpl/setting/settings_media.php:94
161
- #: admin/tpl/setting/settings_media.php:138
162
- #: admin/tpl/setting/settings_media.php:251
163
- #: admin/tpl/setting/settings_optimize.php:10
164
- #: admin/tpl/setting/settings_optimize.php:165
165
- #: admin/tpl/setting/settings_purge.php:8
166
- #: admin/tpl/setting/settings_tuning.php:8 inc/doc.cls.php:39
167
  msgid "Learn More"
168
  msgstr ""
169
 
170
- #: admin/litespeed-cache-admin-display.class.php:979
171
  msgid "The URLs will be compared to the REQUEST_URI server variable."
172
  msgstr ""
173
 
174
- #: admin/litespeed-cache-admin-display.class.php:980
175
  msgid "For example, for %s, %s can be used here."
176
  msgstr ""
177
 
178
- #: admin/litespeed-cache-admin-display.class.php:982
179
  msgid "To match the beginning, add %s to the beginning of the item."
180
  msgstr ""
181
 
182
- #: admin/litespeed-cache-admin-display.class.php:983
183
  msgid "To do an exact match, add %s to the end of the URL."
184
  msgstr ""
185
 
186
- #: admin/litespeed-cache-admin-display.class.php:984
187
  #: admin/tpl/manage/manage_purge.php:152
188
  #: admin/tpl/setting/settings_cache.php:83
189
  #: admin/tpl/setting/settings_cdn.php:107
190
  #: admin/tpl/setting/settings_cdn.php:135
191
  #: admin/tpl/setting/settings_cdn.php:147
192
  #: admin/tpl/setting/settings_crawler.php:132
 
193
  #: admin/tpl/setting/settings_excludes.php:43
194
  #: admin/tpl/setting/settings_excludes.php:66
195
  #: admin/tpl/setting/settings_excludes.php:104
@@ -202,23 +182,23 @@ msgstr ""
202
  #: admin/tpl/setting/settings_purge.php:85
203
  #: admin/tpl/setting/settings_tuning.php:38
204
  #: admin/tpl/setting/settings_tuning.php:74
205
- #: admin/tpl/setting/settings_tuning.php:147
206
  msgid "One per line."
207
  msgstr ""
208
 
209
- #: admin/litespeed-cache-admin-display.class.php:999
210
  msgid "%s groups"
211
  msgstr ""
212
 
213
- #: admin/litespeed-cache-admin-display.class.php:1002
214
  msgid "%s images"
215
  msgstr ""
216
 
217
- #: admin/litespeed-cache-admin-display.class.php:1012
218
  msgid "%s group"
219
  msgstr ""
220
 
221
- #: admin/litespeed-cache-admin-display.class.php:1015
222
  msgid "%s image"
223
  msgstr ""
224
 
@@ -480,7 +460,7 @@ msgstr ""
480
  msgid "'Use primary site settings' set by Network Administrator."
481
  msgstr ""
482
 
483
- #: admin/litespeed-cache-admin-settings.class.php:308
484
  msgid "Site options saved."
485
  msgstr ""
486
 
@@ -602,10 +582,7 @@ msgid "Disable"
602
  msgstr ""
603
 
604
  #: admin/tpl/crawler.php:92 admin/tpl/inc/check_cache_disabled.php:38
605
- #: admin/tpl/inc/img_optm.summary.php:210 admin/tpl/manage/manage_cdn.php:15
606
- #: admin/tpl/setting/settings_debug.php:107
607
- #: admin/tpl/setting/settings_debug.php:140
608
- #: admin/tpl/setting/settings_media.php:182
609
  #: admin/tpl/setting/settings_optimize.php:15 admin/tpl/settings.php:185
610
  msgid "WARNING"
611
  msgstr ""
@@ -681,55 +658,55 @@ msgstr ""
681
  msgid "Status"
682
  msgstr ""
683
 
684
- #: admin/tpl/crawler.php:193
685
  msgid "running"
686
  msgstr ""
687
 
688
- #: admin/tpl/crawler.php:203
689
  msgid "Run frequency is set by the Interval Between Runs setting."
690
  msgstr ""
691
 
692
- #: admin/tpl/crawler.php:204
693
  msgid "Only one crawler can run concurrently."
694
  msgstr ""
695
 
696
- #: admin/tpl/crawler.php:205
697
  msgid ""
698
  "If both the cron and manual run start at a similar time, the first one to "
699
  "start will run."
700
  msgstr ""
701
 
702
- #: admin/tpl/crawler.php:206
703
  msgid ""
704
  "Please follow <a %s>Hooking WP-Cron Into the System Task Scheduler</a> to "
705
  "create the system cron task."
706
  msgstr ""
707
 
708
- #: admin/tpl/crawler.php:211
709
  msgid "Watch Crawler Status"
710
  msgstr ""
711
 
712
- #: admin/tpl/crawler.php:218
713
  msgid "Show crawler status"
714
  msgstr ""
715
 
716
- #: admin/tpl/crawler.php:236
717
  msgid "No crawler meta file generated yet"
718
  msgstr ""
719
 
720
- #: admin/tpl/crawler.php:241
721
  msgid "Sitemap Generation Blacklist"
722
  msgstr ""
723
 
724
- #: admin/tpl/crawler.php:250 admin/tpl/edit_htaccess.php:69
725
  msgid "Save"
726
  msgstr ""
727
 
728
- #: admin/tpl/crawler.php:254
729
  msgid "Current blacklist has %s item(s)."
730
  msgstr ""
731
 
732
- #: admin/tpl/crawler.php:255
733
  msgid ""
734
  "All Urls which returned no-cache tags will be added here, after the initial "
735
  "crawling."
@@ -748,7 +725,7 @@ msgid "LiteSpeed Cache Edit .htaccess"
748
  msgstr ""
749
 
750
  #: admin/tpl/edit_htaccess.php:41
751
- msgid "WARNING: This page is meant for advanced users."
752
  msgstr ""
753
 
754
  #: admin/tpl/edit_htaccess.php:43
@@ -771,7 +748,7 @@ msgstr ""
771
  msgid "DO NOT EDIT ANYTHING WITHIN %s"
772
  msgstr ""
773
 
774
- #: admin/tpl/esi_widget_edit.php:30 admin/tpl/setting/settings_esi.php:37
775
  msgid "Enable ESI"
776
  msgstr ""
777
 
@@ -866,7 +843,7 @@ msgstr ""
866
  msgid "Reset"
867
  msgstr ""
868
 
869
- #: admin/tpl/import_export.php:65
870
  msgid "This will reset all settings to default settings."
871
  msgstr ""
872
 
@@ -874,7 +851,7 @@ msgstr ""
874
  msgid "Rate %s on %s"
875
  msgstr ""
876
 
877
- #. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.7.3) #-#-#-#-#
878
  #. Plugin Name of the plugin/theme
879
  #: admin/tpl/inc/admin_footer.php:6 inc/gui.class.php:353
880
  #: includes/litespeed-cache-gui.class.php:353
@@ -1276,28 +1253,6 @@ msgid ""
1276
  "optimizations, and delete all optimization files."
1277
  msgstr ""
1278
 
1279
- #: admin/tpl/inc/img_optm.summary.php:306
1280
- #: admin/tpl/setting/settings_advanced.php:65
1281
- #: admin/tpl/setting/settings_cdn.php:88
1282
- #: admin/tpl/setting/settings_crawler.php:22
1283
- #: admin/tpl/setting/settings_crawler.php:95
1284
- #: admin/tpl/setting/settings_crawler.php:100
1285
- #: admin/tpl/setting/settings_excludes.php:70
1286
- #: admin/tpl/setting/settings_excludes.php:108
1287
- #: admin/tpl/setting/settings_inc.cache_browser.php:12
1288
- #: admin/tpl/setting/settings_inc.cache_favicon.php:13
1289
- #: admin/tpl/setting/settings_inc.cache_mobile.php:17
1290
- #: admin/tpl/setting/settings_inc.cache_mobile.php:66
1291
- #: admin/tpl/setting/settings_inc.cache_resources.php:14
1292
- #: admin/tpl/setting/settings_inc.exclude_cookies.php:22
1293
- #: admin/tpl/setting/settings_inc.exclude_useragent.php:21
1294
- #: admin/tpl/setting/settings_inc.media_webp.php:12
1295
- #: admin/tpl/setting/settings_optimize.php:250
1296
- #: admin/tpl/setting/settings_tuning.php:20
1297
- #: admin/tpl/setting/settings_tuning.php:56
1298
- msgid "NOTE"
1299
- msgstr ""
1300
-
1301
  #: admin/tpl/inc/img_optm.summary.php:307
1302
  msgid "This will also reset the credit level."
1303
  msgstr ""
@@ -1753,7 +1708,7 @@ msgstr ""
1753
  msgid "Media"
1754
  msgstr ""
1755
 
1756
- #: admin/tpl/network_settings.php:10 admin/tpl/setting/settings_debug.php:80
1757
  #: admin/tpl/settings.php:14
1758
  msgid "Advanced"
1759
  msgstr ""
@@ -1896,27 +1851,27 @@ msgstr ""
1896
  msgid "A Purge All will be executed when WordPress runs these hooks."
1897
  msgstr ""
1898
 
1899
- #: admin/tpl/setting/settings_advanced.php:46
1900
  msgid "Improve HTTP/HTTPS Compatibility"
1901
  msgstr ""
1902
 
1903
- #: admin/tpl/setting/settings_advanced.php:50
1904
  msgid ""
1905
  "Enable this option if you are using both HTTP and HTTPS in the same domain "
1906
  "and are noticing cache irregularities."
1907
  msgstr ""
1908
 
1909
- #: admin/tpl/setting/settings_advanced.php:58
1910
  msgid "Instant Click"
1911
  msgstr ""
1912
 
1913
- #: admin/tpl/setting/settings_advanced.php:62
1914
  msgid ""
1915
  "When a vistor hovers over a page link, preload that page. This will speed up "
1916
  "the visit to that link."
1917
  msgstr ""
1918
 
1919
- #: admin/tpl/setting/settings_advanced.php:66
1920
  msgid ""
1921
  "This will generate extra requests to the server, which will increase server "
1922
  "load."
@@ -2026,6 +1981,15 @@ msgstr ""
2026
  msgid "Include File Types"
2027
  msgstr ""
2028
 
 
 
 
 
 
 
 
 
 
2029
  #: admin/tpl/setting/settings_cdn.php:89
2030
  msgid ""
2031
  "To randomize CDN hostname, define multiple hostnames for the same resources."
@@ -2293,69 +2257,88 @@ msgid ""
2293
  msgstr ""
2294
 
2295
  #: admin/tpl/setting/settings_crawler.php:139
2296
- #: admin/tpl/setting/settings_crawler.php:232
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2297
  msgid "Custom Sitemap"
2298
  msgstr ""
2299
 
2300
- #: admin/tpl/setting/settings_crawler.php:144
2301
  msgid ""
2302
  "The crawler can use your Google XML Sitemap instead of its own. Enter the "
2303
  "full URL to your sitemap here."
2304
  msgstr ""
2305
 
2306
- #: admin/tpl/setting/settings_crawler.php:150
2307
  msgid "Sitemap Generation"
2308
  msgstr ""
2309
 
2310
- #: admin/tpl/setting/settings_crawler.php:155
2311
  msgid "Include Posts"
2312
  msgstr ""
2313
 
2314
- #: admin/tpl/setting/settings_crawler.php:162
2315
  msgid "Include Pages"
2316
  msgstr ""
2317
 
2318
- #: admin/tpl/setting/settings_crawler.php:169
2319
  msgid "Include Categories"
2320
  msgstr ""
2321
 
2322
- #: admin/tpl/setting/settings_crawler.php:176
2323
  msgid "Include Tags"
2324
  msgstr ""
2325
 
2326
- #: admin/tpl/setting/settings_crawler.php:185
2327
  msgid "Exclude Custom Post Types"
2328
  msgstr ""
2329
 
2330
- #: admin/tpl/setting/settings_crawler.php:190
2331
  msgid "Exclude certain Custom Post Types in sitemap."
2332
  msgstr ""
2333
 
2334
- #: admin/tpl/setting/settings_crawler.php:196
2335
  msgid "Available Custom Post Type"
2336
  msgstr ""
2337
 
2338
- #: admin/tpl/setting/settings_crawler.php:204
2339
  msgid "Order links by"
2340
  msgstr ""
2341
 
2342
- #: admin/tpl/setting/settings_crawler.php:210
2343
  msgid "Date, descending (Default)"
2344
  msgstr ""
2345
 
2346
- #: admin/tpl/setting/settings_crawler.php:216
2347
  msgid "Date, ascending"
2348
  msgstr ""
2349
 
2350
- #: admin/tpl/setting/settings_crawler.php:222
2351
  msgid "Alphabetical, descending"
2352
  msgstr ""
2353
 
2354
- #: admin/tpl/setting/settings_crawler.php:228
2355
  msgid "Alphabetical, ascending"
2356
  msgstr ""
2357
 
2358
- #: admin/tpl/setting/settings_crawler.php:232
2359
  msgid "These options will be invalid when using %s."
2360
  msgstr ""
2361
 
@@ -2405,98 +2388,97 @@ msgstr ""
2405
  msgid "Your IP"
2406
  msgstr ""
2407
 
2408
- #: admin/tpl/setting/settings_debug.php:61
2409
- msgid ""
2410
- "More information about the available commands can be found <a %s>here</a>."
2411
  msgstr ""
2412
 
2413
- #: admin/tpl/setting/settings_debug.php:68
2414
  msgid "Debug Level"
2415
  msgstr ""
2416
 
2417
- #: admin/tpl/setting/settings_debug.php:74
2418
  msgid "Basic"
2419
  msgstr ""
2420
 
2421
- #: admin/tpl/setting/settings_debug.php:84
2422
  msgid "Advanced level will log more details."
2423
  msgstr ""
2424
 
2425
- #: admin/tpl/setting/settings_debug.php:90
2426
  msgid "Log File Size Limit"
2427
  msgstr ""
2428
 
2429
- #: admin/tpl/setting/settings_debug.php:93
2430
  #: admin/tpl/setting/settings_tuning.php:88
2431
  msgid "MB"
2432
  msgstr ""
2433
 
2434
- #: admin/tpl/setting/settings_debug.php:95
2435
  msgid ""
2436
  "Specify the maximum size of the log file. Minimum is 3MB. Maximum is 3000MB."
2437
  msgstr ""
2438
 
2439
- #: admin/tpl/setting/settings_debug.php:102
2440
  msgid "Heartbeat"
2441
  msgstr ""
2442
 
2443
- #: admin/tpl/setting/settings_debug.php:106
2444
  msgid ""
2445
  "Disable WordPress heartbeat to prevent AJAX calls from breaking debug "
2446
  "logging."
2447
  msgstr ""
2448
 
2449
- #: admin/tpl/setting/settings_debug.php:108
2450
  msgid ""
2451
  "Disabling this may cause WordPress tasks triggered by AJAX to stop working."
2452
  msgstr ""
2453
 
2454
- #: admin/tpl/setting/settings_debug.php:115
2455
  msgid "Log Cookies"
2456
  msgstr ""
2457
 
2458
- #: admin/tpl/setting/settings_debug.php:119
2459
  msgid "Log request cookie values."
2460
  msgstr ""
2461
 
2462
- #: admin/tpl/setting/settings_debug.php:125
2463
  msgid "Collapse Query Strings"
2464
  msgstr ""
2465
 
2466
- #: admin/tpl/setting/settings_debug.php:129
2467
  msgid "Shorten query strings in the debug log to improve readability."
2468
  msgstr ""
2469
 
2470
- #: admin/tpl/setting/settings_debug.php:135
2471
  msgid "Log Filters"
2472
  msgstr ""
2473
 
2474
- #: admin/tpl/setting/settings_debug.php:139
2475
  msgid "Log all WordPress filter hooks."
2476
  msgstr ""
2477
 
2478
- #: admin/tpl/setting/settings_debug.php:141
2479
  msgid "Enabling this option will cause log file size to grow quickly."
2480
  msgstr ""
2481
 
2482
- #: admin/tpl/setting/settings_debug.php:148
2483
  msgid "Exclude Filters"
2484
  msgstr ""
2485
 
2486
- #: admin/tpl/setting/settings_debug.php:152
2487
  msgid "Listed filters (one per line) will not be logged."
2488
  msgstr ""
2489
 
2490
- #: admin/tpl/setting/settings_debug.php:153
2491
- #: admin/tpl/setting/settings_debug.php:164
2492
  msgid "Recommended default value"
2493
  msgstr ""
2494
 
2495
- #: admin/tpl/setting/settings_debug.php:159
2496
  msgid "Exclude Part Filters"
2497
  msgstr ""
2498
 
2499
- #: admin/tpl/setting/settings_debug.php:163
2500
  msgid "Filters containing these strings (one per line) will not be logged."
2501
  msgstr ""
2502
 
@@ -2519,46 +2501,54 @@ msgid ""
2519
  "cached at all."
2520
  msgstr ""
2521
 
2522
- #: admin/tpl/setting/settings_esi.php:17
2523
- msgid "Learn more about public cache vs. private cache <a %s>on our blog</a>."
 
 
 
 
2524
  msgstr ""
2525
 
2526
  #: admin/tpl/setting/settings_esi.php:22
2527
- msgid "<a %s>ESI sample for developers</a>."
2528
  msgstr ""
2529
 
2530
- #: admin/tpl/setting/settings_esi.php:31
 
 
 
 
2531
  msgid "Available in LiteSpeed Enterprise version"
2532
  msgstr ""
2533
 
2534
- #: admin/tpl/setting/settings_esi.php:41
2535
  msgid ""
2536
  "Enable caches public pages for logged in users and serves the Admin Bar and "
2537
  "Comment Form via ESI blocks. These two blocks will be uncached unless "
2538
  "enabled below."
2539
  msgstr ""
2540
 
2541
- #: admin/tpl/setting/settings_esi.php:47
2542
  msgid "Cache Admin Bar"
2543
  msgstr ""
2544
 
2545
- #: admin/tpl/setting/settings_esi.php:51
2546
  msgid "Cache the build-in Admin Bar ESI block."
2547
  msgstr ""
2548
 
2549
- #: admin/tpl/setting/settings_esi.php:57
2550
  msgid "Cache Comment Form"
2551
  msgstr ""
2552
 
2553
- #: admin/tpl/setting/settings_esi.php:61
2554
  msgid "Cache the build-in Comment Form ESI block."
2555
  msgstr ""
2556
 
2557
- #: admin/tpl/setting/settings_esi.php:67
2558
  msgid "Vary Group"
2559
  msgstr ""
2560
 
2561
- #: admin/tpl/setting/settings_esi.php:82
2562
  msgid ""
2563
  "If your site contains public content that certain user roles can see but "
2564
  "other roles cannot, you can specify a Vary Group for those user roles. For "
@@ -3154,10 +3144,6 @@ msgstr ""
3154
  msgid "This can improve page loading time by reducing initial HTTP requests."
3155
  msgstr ""
3156
 
3157
- #: admin/tpl/setting/settings_media.php:22
3158
- msgid "Tip"
3159
- msgstr ""
3160
-
3161
  #: admin/tpl/setting/settings_media.php:23
3162
  msgid "Adding Style to Your Lazy-Loaded Images"
3163
  msgstr ""
@@ -3173,14 +3159,14 @@ msgstr ""
3173
  #: admin/tpl/setting/settings_media.php:35
3174
  #: admin/tpl/setting/settings_tuning.php:37
3175
  #: admin/tpl/setting/settings_tuning.php:73
3176
- #: admin/tpl/setting/settings_tuning.php:146
3177
  msgid "Both full URLs and partial strings can be used."
3178
  msgstr ""
3179
 
3180
  #: admin/tpl/setting/settings_media.php:39
3181
  #: admin/tpl/setting/settings_tuning.php:41
3182
  #: admin/tpl/setting/settings_tuning.php:77
3183
- #: admin/tpl/setting/settings_tuning.php:150
3184
  msgid "Filter %s is supported."
3185
  msgstr ""
3186
 
@@ -3188,7 +3174,7 @@ msgstr ""
3188
  #: admin/tpl/setting/settings_optimize.php:141
3189
  #: admin/tpl/setting/settings_tuning.php:42
3190
  #: admin/tpl/setting/settings_tuning.php:78
3191
- #: admin/tpl/setting/settings_tuning.php:151
3192
  msgid "Elements with attribute %s in html code will be excluded."
3193
  msgstr ""
3194
 
@@ -3297,7 +3283,7 @@ msgstr ""
3297
  #: admin/tpl/setting/settings_optimize.php:238
3298
  #: admin/tpl/setting/settings_optimize.php:276
3299
  #: admin/tpl/setting/settings_tuning.php:103
3300
- #: admin/tpl/setting/settings_tuning.php:163
3301
  msgid ""
3302
  "This can improve your speed score in services like Pingdom, GTmetrix and "
3303
  "PageSpeed."
@@ -3514,7 +3500,7 @@ msgstr ""
3514
 
3515
  #: admin/tpl/setting/settings_optimize.php:132
3516
  #: admin/tpl/setting/settings_optimize.php:153
3517
- #: admin/tpl/setting/settings_tuning.php:135
3518
  msgid "Load CSS Asynchronously"
3519
  msgstr ""
3520
 
@@ -3830,69 +3816,77 @@ msgstr ""
3830
  msgid "Remove query strings from static resources."
3831
  msgstr ""
3832
 
3833
- #: admin/tpl/setting/settings_tuning.php:109
 
 
 
 
 
 
 
 
3834
  msgid "Load Google Fonts Asynchronously"
3835
  msgstr ""
3836
 
3837
- #: admin/tpl/setting/settings_tuning.php:113
3838
  msgid ""
3839
  "Use Web Font Loader library to load Google Fonts asynchronously while leave "
3840
  "other CSS intact."
3841
  msgstr ""
3842
 
3843
- #: admin/tpl/setting/settings_tuning.php:114
3844
  msgid ""
3845
  "This will also add a preconnect to Google for faster Google Fonts "
3846
  "downloading."
3847
  msgstr ""
3848
 
3849
- #: admin/tpl/setting/settings_tuning.php:121
3850
  msgid "Remove Google Fonts"
3851
  msgstr ""
3852
 
3853
- #: admin/tpl/setting/settings_tuning.php:125
3854
  msgid "Prevent google fonts from loading on all your pages."
3855
  msgstr ""
3856
 
3857
- #: admin/tpl/setting/settings_tuning.php:131
3858
  msgid "Critical CSS Rules"
3859
  msgstr ""
3860
 
3861
- #: admin/tpl/setting/settings_tuning.php:135
3862
  msgid "Specify critical CSS rules for above-the-fold content when enabling %s."
3863
  msgstr ""
3864
 
3865
- #: admin/tpl/setting/settings_tuning.php:141
3866
  msgid "JS Deferred Excludes"
3867
  msgstr ""
3868
 
3869
- #: admin/tpl/setting/settings_tuning.php:145
3870
  msgid "Listed JS files will not be deferred."
3871
  msgstr ""
3872
 
3873
- #: admin/tpl/setting/settings_tuning.php:158
3874
  msgid "Remove WordPress Emoji"
3875
  msgstr ""
3876
 
3877
- #: admin/tpl/setting/settings_tuning.php:162
3878
  msgid ""
3879
  "Stop loading wordpress.org emoji. Browser default emoji will be displayed "
3880
  "instead."
3881
  msgstr ""
3882
 
3883
- #: admin/tpl/setting/settings_tuning.php:169
3884
  msgid "URI Excludes"
3885
  msgstr ""
3886
 
3887
- #: admin/tpl/setting/settings_tuning.php:173
3888
  msgid "Prevent any optimization of listed pages."
3889
  msgstr ""
3890
 
3891
- #: admin/tpl/setting/settings_tuning.php:180
3892
  msgid "Role Excludes"
3893
  msgstr ""
3894
 
3895
- #: admin/tpl/setting/settings_tuning.php:186
3896
  msgid "Selected roles will be excluded from all optimizations."
3897
  msgstr ""
3898
 
@@ -3982,34 +3976,32 @@ msgstr ""
3982
  msgid "Failed to communicate with Cloudflare"
3983
  msgstr ""
3984
 
3985
- #: inc/crawler.class.php:98 includes/litespeed-cache-crawler.class.php:98
3986
  msgid "Can not find any form data for blacklist"
3987
  msgstr ""
3988
 
3989
- #: inc/crawler.class.php:113 includes/litespeed-cache-crawler.class.php:113
3990
  msgid "File saved successfully: %s"
3991
  msgstr ""
3992
 
3993
- #: inc/crawler.class.php:164 includes/litespeed-cache-crawler.class.php:164
3994
  msgid "File created successfully: %s"
3995
  msgstr ""
3996
 
3997
- #: inc/crawler.class.php:322 includes/litespeed-cache-crawler.class.php:322
3998
  msgid "Failed to send position reset notification: %s"
3999
  msgstr ""
4000
 
4001
- #: inc/crawler.class.php:326 includes/litespeed-cache-crawler.class.php:326
4002
  msgid "Position reset notification sent successfully"
4003
  msgstr ""
4004
 
4005
- #: inc/crawler.class.php:476 includes/litespeed-cache-crawler.class.php:476
4006
- #: lib/litespeed/litespeed-crawler.class.php:402
4007
  msgid "Crawler %s reached end of sitemap file."
4008
  msgstr ""
4009
 
4010
- #: inc/crawler.class.php:505 inc/crawler.class.php:509
4011
- #: includes/litespeed-cache-crawler.class.php:505
4012
- #: includes/litespeed-cache-crawler.class.php:509
4013
  msgid "Guest"
4014
  msgstr ""
4015
 
@@ -4092,77 +4084,77 @@ msgstr ""
4092
  msgid "Update %s now"
4093
  msgstr ""
4094
 
4095
- #: inc/img_optm.class.php:113
4096
  msgid "Communicated with LiteSpeed Image Optimization Server successfully."
4097
  msgstr ""
4098
 
4099
- #: inc/img_optm.class.php:166 inc/img_optm.class.php:1469
4100
- #: inc/img_optm.class.php:1534
4101
  msgid "No image found."
4102
  msgstr ""
4103
 
4104
- #: inc/img_optm.class.php:194
4105
  msgid "Number of images in one image group (%s) exceeds the credit (%s)"
4106
  msgstr ""
4107
 
4108
- #: inc/img_optm.class.php:222
4109
  msgid "Requested successfully."
4110
  msgstr ""
4111
 
4112
- #: inc/img_optm.class.php:242
4113
  msgid "Optimized successfully."
4114
  msgstr ""
4115
 
4116
- #: inc/img_optm.class.php:299
4117
  msgid "Pushed %1$s to LiteSpeed optimization server, accepted %2$s."
4118
  msgstr ""
4119
 
4120
- #: inc/img_optm.class.php:686
4121
  msgid "Failed to parse data from LiteSpeed IAPI server: %s"
4122
  msgstr ""
4123
 
4124
- #: inc/img_optm.class.php:1030
4125
  msgid ""
4126
  "LSCWP %1$s has simplified the image pulling process. Please %2$s, or resend "
4127
  "the pull notification this one time only. After that, the process will be "
4128
  "automated."
4129
  msgstr ""
4130
 
4131
- #: inc/img_optm.class.php:1358
4132
  msgid "Destroy unfinished data successfully."
4133
  msgstr ""
4134
 
4135
- #: inc/img_optm.class.php:1572
4136
  msgid ""
4137
  "Pushed %1$s groups with %2$s images to LiteSpeed optimization server, "
4138
  "accepted %3$s groups with %4$s images."
4139
  msgstr ""
4140
 
4141
- #: inc/img_optm.class.php:1748
4142
  msgid "Removed %1$s images and saved %2$s successfully."
4143
  msgstr ""
4144
 
4145
- #: inc/img_optm.class.php:1943
4146
  msgid "Switched images successfully."
4147
  msgstr ""
4148
 
4149
- #: inc/img_optm.class.php:1974
4150
  msgid "Disabled WebP file successfully."
4151
  msgstr ""
4152
 
4153
- #: inc/img_optm.class.php:1980
4154
  msgid "Enabled WebP file successfully."
4155
  msgstr ""
4156
 
4157
- #: inc/img_optm.class.php:1996
4158
  msgid "Restored original file successfully."
4159
  msgstr ""
4160
 
4161
- #: inc/img_optm.class.php:2003
4162
  msgid "Switched to optimized file successfully."
4163
  msgstr ""
4164
 
4165
- #: inc/img_optm.class.php:2063
4166
  msgid "Reset the optimized data successfully."
4167
  msgstr ""
4168
 
@@ -4302,35 +4294,35 @@ msgstr ""
4302
  msgid " %s ago"
4303
  msgstr ""
4304
 
4305
- #: lib/litespeed/litespeed-crawler.class.php:208
4306
  msgid "Cannot read meta file: %s"
4307
  msgstr ""
4308
 
4309
- #: lib/litespeed/litespeed-crawler.class.php:213
4310
  msgid "Oh look, there is already another LiteSpeed crawler running!"
4311
  msgstr ""
4312
 
4313
- #: lib/litespeed/litespeed-crawler.class.php:219
4314
  msgid "Stopped due to load hit the maximum."
4315
  msgstr ""
4316
 
4317
- #: lib/litespeed/litespeed-crawler.class.php:301
4318
  msgid "Stopped due to error when crawling urls %1$s : %2$s"
4319
  msgstr ""
4320
 
4321
- #: lib/litespeed/litespeed-crawler.class.php:308
4322
  msgid "Stopped: crawler disabled by the server admin"
4323
  msgstr ""
4324
 
4325
- #: lib/litespeed/litespeed-crawler.class.php:329
4326
  msgid "Stopped due to exceeding defined Maximum Run Time"
4327
  msgstr ""
4328
 
4329
- #: lib/litespeed/litespeed-crawler.class.php:346
4330
  msgid "Stopped due to reset meta position"
4331
  msgstr ""
4332
 
4333
- #: lib/litespeed/litespeed-crawler.class.php:354
4334
  msgid "Stopped due to load over limit"
4335
  msgstr ""
4336
 
2
  # This file is distributed under the same license as the LiteSpeed Cache package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: LiteSpeed Cache 2.8\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
+ "POT-Creation-Date: 2018-11-30 20:26:27+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
128
  #: admin/tpl/setting/settings_tuning.php:40
129
  #: admin/tpl/setting/settings_tuning.php:60
130
  #: admin/tpl/setting/settings_tuning.php:76
131
+ #: admin/tpl/setting/settings_tuning.php:109
132
+ #: admin/tpl/setting/settings_tuning.php:157
133
  msgid "API"
134
  msgstr ""
135
 
137
  msgid "Server variable(s) %s available to override this setting."
138
  msgstr ""
139
 
140
+ #: admin/litespeed-cache-admin-display.class.php:973
141
  #: admin/litespeed-cache-admin.class.php:228
142
  #: admin/tpl/inc/check_cache_disabled.php:49
143
  #: admin/tpl/inc/img_optm.initialize.php:29
144
  #: admin/tpl/inc/img_optm.summary.php:165 admin/tpl/manage/manage_cdn.php:60
145
+ #: inc/doc.cls.php:39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  msgid "Learn More"
147
  msgstr ""
148
 
149
+ #: admin/litespeed-cache-admin-display.class.php:987
150
  msgid "The URLs will be compared to the REQUEST_URI server variable."
151
  msgstr ""
152
 
153
+ #: admin/litespeed-cache-admin-display.class.php:988
154
  msgid "For example, for %s, %s can be used here."
155
  msgstr ""
156
 
157
+ #: admin/litespeed-cache-admin-display.class.php:990
158
  msgid "To match the beginning, add %s to the beginning of the item."
159
  msgstr ""
160
 
161
+ #: admin/litespeed-cache-admin-display.class.php:991
162
  msgid "To do an exact match, add %s to the end of the URL."
163
  msgstr ""
164
 
165
+ #: admin/litespeed-cache-admin-display.class.php:992
166
  #: admin/tpl/manage/manage_purge.php:152
167
  #: admin/tpl/setting/settings_cache.php:83
168
  #: admin/tpl/setting/settings_cdn.php:107
169
  #: admin/tpl/setting/settings_cdn.php:135
170
  #: admin/tpl/setting/settings_cdn.php:147
171
  #: admin/tpl/setting/settings_crawler.php:132
172
+ #: admin/tpl/setting/settings_crawler.php:154
173
  #: admin/tpl/setting/settings_excludes.php:43
174
  #: admin/tpl/setting/settings_excludes.php:66
175
  #: admin/tpl/setting/settings_excludes.php:104
182
  #: admin/tpl/setting/settings_purge.php:85
183
  #: admin/tpl/setting/settings_tuning.php:38
184
  #: admin/tpl/setting/settings_tuning.php:74
185
+ #: admin/tpl/setting/settings_tuning.php:155
186
  msgid "One per line."
187
  msgstr ""
188
 
189
+ #: admin/litespeed-cache-admin-display.class.php:1007
190
  msgid "%s groups"
191
  msgstr ""
192
 
193
+ #: admin/litespeed-cache-admin-display.class.php:1010
194
  msgid "%s images"
195
  msgstr ""
196
 
197
+ #: admin/litespeed-cache-admin-display.class.php:1020
198
  msgid "%s group"
199
  msgstr ""
200
 
201
+ #: admin/litespeed-cache-admin-display.class.php:1023
202
  msgid "%s image"
203
  msgstr ""
204
 
460
  msgid "'Use primary site settings' set by Network Administrator."
461
  msgstr ""
462
 
463
+ #: admin/litespeed-cache-admin-settings.class.php:307
464
  msgid "Site options saved."
465
  msgstr ""
466
 
582
  msgstr ""
583
 
584
  #: admin/tpl/crawler.php:92 admin/tpl/inc/check_cache_disabled.php:38
585
+ #: admin/tpl/manage/manage_cdn.php:15
 
 
 
586
  #: admin/tpl/setting/settings_optimize.php:15 admin/tpl/settings.php:185
587
  msgid "WARNING"
588
  msgstr ""
658
  msgid "Status"
659
  msgstr ""
660
 
661
+ #: admin/tpl/crawler.php:190
662
  msgid "running"
663
  msgstr ""
664
 
665
+ #: admin/tpl/crawler.php:200
666
  msgid "Run frequency is set by the Interval Between Runs setting."
667
  msgstr ""
668
 
669
+ #: admin/tpl/crawler.php:201
670
  msgid "Only one crawler can run concurrently."
671
  msgstr ""
672
 
673
+ #: admin/tpl/crawler.php:202
674
  msgid ""
675
  "If both the cron and manual run start at a similar time, the first one to "
676
  "start will run."
677
  msgstr ""
678
 
679
+ #: admin/tpl/crawler.php:203
680
  msgid ""
681
  "Please follow <a %s>Hooking WP-Cron Into the System Task Scheduler</a> to "
682
  "create the system cron task."
683
  msgstr ""
684
 
685
+ #: admin/tpl/crawler.php:208
686
  msgid "Watch Crawler Status"
687
  msgstr ""
688
 
689
+ #: admin/tpl/crawler.php:215
690
  msgid "Show crawler status"
691
  msgstr ""
692
 
693
+ #: admin/tpl/crawler.php:233
694
  msgid "No crawler meta file generated yet"
695
  msgstr ""
696
 
697
+ #: admin/tpl/crawler.php:238
698
  msgid "Sitemap Generation Blacklist"
699
  msgstr ""
700
 
701
+ #: admin/tpl/crawler.php:247 admin/tpl/edit_htaccess.php:69
702
  msgid "Save"
703
  msgstr ""
704
 
705
+ #: admin/tpl/crawler.php:251
706
  msgid "Current blacklist has %s item(s)."
707
  msgstr ""
708
 
709
+ #: admin/tpl/crawler.php:252
710
  msgid ""
711
  "All Urls which returned no-cache tags will be added here, after the initial "
712
  "crawling."
725
  msgstr ""
726
 
727
  #: admin/tpl/edit_htaccess.php:41
728
+ msgid "This page is meant for advanced users."
729
  msgstr ""
730
 
731
  #: admin/tpl/edit_htaccess.php:43
748
  msgid "DO NOT EDIT ANYTHING WITHIN %s"
749
  msgstr ""
750
 
751
+ #: admin/tpl/esi_widget_edit.php:30 admin/tpl/setting/settings_esi.php:43
752
  msgid "Enable ESI"
753
  msgstr ""
754
 
843
  msgid "Reset"
844
  msgstr ""
845
 
846
+ #: admin/tpl/import_export.php:66
847
  msgid "This will reset all settings to default settings."
848
  msgstr ""
849
 
851
  msgid "Rate %s on %s"
852
  msgstr ""
853
 
854
+ #. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.8) #-#-#-#-#
855
  #. Plugin Name of the plugin/theme
856
  #: admin/tpl/inc/admin_footer.php:6 inc/gui.class.php:353
857
  #: includes/litespeed-cache-gui.class.php:353
1253
  "optimizations, and delete all optimization files."
1254
  msgstr ""
1255
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1256
  #: admin/tpl/inc/img_optm.summary.php:307
1257
  msgid "This will also reset the credit level."
1258
  msgstr ""
1708
  msgid "Media"
1709
  msgstr ""
1710
 
1711
+ #: admin/tpl/network_settings.php:10 admin/tpl/setting/settings_debug.php:82
1712
  #: admin/tpl/settings.php:14
1713
  msgid "Advanced"
1714
  msgstr ""
1851
  msgid "A Purge All will be executed when WordPress runs these hooks."
1852
  msgstr ""
1853
 
1854
+ #: admin/tpl/setting/settings_advanced.php:45
1855
  msgid "Improve HTTP/HTTPS Compatibility"
1856
  msgstr ""
1857
 
1858
+ #: admin/tpl/setting/settings_advanced.php:49
1859
  msgid ""
1860
  "Enable this option if you are using both HTTP and HTTPS in the same domain "
1861
  "and are noticing cache irregularities."
1862
  msgstr ""
1863
 
1864
+ #: admin/tpl/setting/settings_advanced.php:56
1865
  msgid "Instant Click"
1866
  msgstr ""
1867
 
1868
+ #: admin/tpl/setting/settings_advanced.php:60
1869
  msgid ""
1870
  "When a vistor hovers over a page link, preload that page. This will speed up "
1871
  "the visit to that link."
1872
  msgstr ""
1873
 
1874
+ #: admin/tpl/setting/settings_advanced.php:64
1875
  msgid ""
1876
  "This will generate extra requests to the server, which will increase server "
1877
  "load."
1981
  msgid "Include File Types"
1982
  msgstr ""
1983
 
1984
+ #: admin/tpl/setting/settings_cdn.php:88
1985
+ #: admin/tpl/setting/settings_crawler.php:22
1986
+ #: admin/tpl/setting/settings_crawler.php:95
1987
+ #: admin/tpl/setting/settings_crawler.php:100
1988
+ #: admin/tpl/setting/settings_excludes.php:70
1989
+ #: admin/tpl/setting/settings_excludes.php:108
1990
+ msgid "NOTE"
1991
+ msgstr ""
1992
+
1993
  #: admin/tpl/setting/settings_cdn.php:89
1994
  msgid ""
1995
  "To randomize CDN hostname, define multiple hostnames for the same resources."
2257
  msgstr ""
2258
 
2259
  #: admin/tpl/setting/settings_crawler.php:139
2260
+ msgid "Cookie Simulation"
2261
+ msgstr ""
2262
+
2263
+ #: admin/tpl/setting/settings_crawler.php:145
2264
+ msgid "Cookie Name"
2265
+ msgstr ""
2266
+
2267
+ #: admin/tpl/setting/settings_crawler.php:151
2268
+ msgid "Cookie Values"
2269
+ msgstr ""
2270
+
2271
+ #: admin/tpl/setting/settings_crawler.php:196
2272
+ msgid ""
2273
+ "To crawl for a particular cookie, enter the cookie name, and the values you "
2274
+ "wish to crawl for. Values should be one per line, and can include a blank "
2275
+ "line. There will be one crawler created per cookie value, per simulated role."
2276
+ msgstr ""
2277
+
2278
+ #: admin/tpl/setting/settings_crawler.php:204
2279
+ #: admin/tpl/setting/settings_crawler.php:297
2280
  msgid "Custom Sitemap"
2281
  msgstr ""
2282
 
2283
+ #: admin/tpl/setting/settings_crawler.php:209
2284
  msgid ""
2285
  "The crawler can use your Google XML Sitemap instead of its own. Enter the "
2286
  "full URL to your sitemap here."
2287
  msgstr ""
2288
 
2289
+ #: admin/tpl/setting/settings_crawler.php:215
2290
  msgid "Sitemap Generation"
2291
  msgstr ""
2292
 
2293
+ #: admin/tpl/setting/settings_crawler.php:220
2294
  msgid "Include Posts"
2295
  msgstr ""
2296
 
2297
+ #: admin/tpl/setting/settings_crawler.php:227
2298
  msgid "Include Pages"
2299
  msgstr ""
2300
 
2301
+ #: admin/tpl/setting/settings_crawler.php:234
2302
  msgid "Include Categories"
2303
  msgstr ""
2304
 
2305
+ #: admin/tpl/setting/settings_crawler.php:241
2306
  msgid "Include Tags"
2307
  msgstr ""
2308
 
2309
+ #: admin/tpl/setting/settings_crawler.php:250
2310
  msgid "Exclude Custom Post Types"
2311
  msgstr ""
2312
 
2313
+ #: admin/tpl/setting/settings_crawler.php:255
2314
  msgid "Exclude certain Custom Post Types in sitemap."
2315
  msgstr ""
2316
 
2317
+ #: admin/tpl/setting/settings_crawler.php:261
2318
  msgid "Available Custom Post Type"
2319
  msgstr ""
2320
 
2321
+ #: admin/tpl/setting/settings_crawler.php:269
2322
  msgid "Order links by"
2323
  msgstr ""
2324
 
2325
+ #: admin/tpl/setting/settings_crawler.php:275
2326
  msgid "Date, descending (Default)"
2327
  msgstr ""
2328
 
2329
+ #: admin/tpl/setting/settings_crawler.php:281
2330
  msgid "Date, ascending"
2331
  msgstr ""
2332
 
2333
+ #: admin/tpl/setting/settings_crawler.php:287
2334
  msgid "Alphabetical, descending"
2335
  msgstr ""
2336
 
2337
+ #: admin/tpl/setting/settings_crawler.php:293
2338
  msgid "Alphabetical, ascending"
2339
  msgstr ""
2340
 
2341
+ #: admin/tpl/setting/settings_crawler.php:297
2342
  msgid "These options will be invalid when using %s."
2343
  msgstr ""
2344
 
2388
  msgid "Your IP"
2389
  msgstr ""
2390
 
2391
+ #: admin/tpl/setting/settings_debug.php:63
2392
+ msgid "More information about the available commands can be found here."
 
2393
  msgstr ""
2394
 
2395
+ #: admin/tpl/setting/settings_debug.php:70
2396
  msgid "Debug Level"
2397
  msgstr ""
2398
 
2399
+ #: admin/tpl/setting/settings_debug.php:76
2400
  msgid "Basic"
2401
  msgstr ""
2402
 
2403
+ #: admin/tpl/setting/settings_debug.php:86
2404
  msgid "Advanced level will log more details."
2405
  msgstr ""
2406
 
2407
+ #: admin/tpl/setting/settings_debug.php:92
2408
  msgid "Log File Size Limit"
2409
  msgstr ""
2410
 
2411
+ #: admin/tpl/setting/settings_debug.php:95
2412
  #: admin/tpl/setting/settings_tuning.php:88
2413
  msgid "MB"
2414
  msgstr ""
2415
 
2416
+ #: admin/tpl/setting/settings_debug.php:97
2417
  msgid ""
2418
  "Specify the maximum size of the log file. Minimum is 3MB. Maximum is 3000MB."
2419
  msgstr ""
2420
 
2421
+ #: admin/tpl/setting/settings_debug.php:104
2422
  msgid "Heartbeat"
2423
  msgstr ""
2424
 
2425
+ #: admin/tpl/setting/settings_debug.php:108
2426
  msgid ""
2427
  "Disable WordPress heartbeat to prevent AJAX calls from breaking debug "
2428
  "logging."
2429
  msgstr ""
2430
 
2431
+ #: admin/tpl/setting/settings_debug.php:111
2432
  msgid ""
2433
  "Disabling this may cause WordPress tasks triggered by AJAX to stop working."
2434
  msgstr ""
2435
 
2436
+ #: admin/tpl/setting/settings_debug.php:118
2437
  msgid "Log Cookies"
2438
  msgstr ""
2439
 
2440
+ #: admin/tpl/setting/settings_debug.php:122
2441
  msgid "Log request cookie values."
2442
  msgstr ""
2443
 
2444
+ #: admin/tpl/setting/settings_debug.php:128
2445
  msgid "Collapse Query Strings"
2446
  msgstr ""
2447
 
2448
+ #: admin/tpl/setting/settings_debug.php:132
2449
  msgid "Shorten query strings in the debug log to improve readability."
2450
  msgstr ""
2451
 
2452
+ #: admin/tpl/setting/settings_debug.php:138
2453
  msgid "Log Filters"
2454
  msgstr ""
2455
 
2456
+ #: admin/tpl/setting/settings_debug.php:142
2457
  msgid "Log all WordPress filter hooks."
2458
  msgstr ""
2459
 
2460
+ #: admin/tpl/setting/settings_debug.php:145
2461
  msgid "Enabling this option will cause log file size to grow quickly."
2462
  msgstr ""
2463
 
2464
+ #: admin/tpl/setting/settings_debug.php:152
2465
  msgid "Exclude Filters"
2466
  msgstr ""
2467
 
2468
+ #: admin/tpl/setting/settings_debug.php:156
2469
  msgid "Listed filters (one per line) will not be logged."
2470
  msgstr ""
2471
 
2472
+ #: admin/tpl/setting/settings_debug.php:157
2473
+ #: admin/tpl/setting/settings_debug.php:168
2474
  msgid "Recommended default value"
2475
  msgstr ""
2476
 
2477
+ #: admin/tpl/setting/settings_debug.php:163
2478
  msgid "Exclude Part Filters"
2479
  msgstr ""
2480
 
2481
+ #: admin/tpl/setting/settings_debug.php:167
2482
  msgid "Filters containing these strings (one per line) will not be logged."
2483
  msgstr ""
2484
 
2501
  "cached at all."
2502
  msgstr ""
2503
 
2504
+ #: admin/tpl/setting/settings_esi.php:16
2505
+ msgid "WpW: Private Cache vs. Public Cache"
2506
+ msgstr ""
2507
+
2508
+ #: admin/tpl/setting/settings_esi.php:20
2509
+ msgid "You can turn shortcodes into ESI blocks."
2510
  msgstr ""
2511
 
2512
  #: admin/tpl/setting/settings_esi.php:22
2513
+ msgid "Replace %1$s with %2$s."
2514
  msgstr ""
2515
 
2516
+ #: admin/tpl/setting/settings_esi.php:29
2517
+ msgid "ESI sample for developers"
2518
+ msgstr ""
2519
+
2520
+ #: admin/tpl/setting/settings_esi.php:37
2521
  msgid "Available in LiteSpeed Enterprise version"
2522
  msgstr ""
2523
 
2524
+ #: admin/tpl/setting/settings_esi.php:47
2525
  msgid ""
2526
  "Enable caches public pages for logged in users and serves the Admin Bar and "
2527
  "Comment Form via ESI blocks. These two blocks will be uncached unless "
2528
  "enabled below."
2529
  msgstr ""
2530
 
2531
+ #: admin/tpl/setting/settings_esi.php:53
2532
  msgid "Cache Admin Bar"
2533
  msgstr ""
2534
 
2535
+ #: admin/tpl/setting/settings_esi.php:57
2536
  msgid "Cache the build-in Admin Bar ESI block."
2537
  msgstr ""
2538
 
2539
+ #: admin/tpl/setting/settings_esi.php:63
2540
  msgid "Cache Comment Form"
2541
  msgstr ""
2542
 
2543
+ #: admin/tpl/setting/settings_esi.php:67
2544
  msgid "Cache the build-in Comment Form ESI block."
2545
  msgstr ""
2546
 
2547
+ #: admin/tpl/setting/settings_esi.php:73
2548
  msgid "Vary Group"
2549
  msgstr ""
2550
 
2551
+ #: admin/tpl/setting/settings_esi.php:88
2552
  msgid ""
2553
  "If your site contains public content that certain user roles can see but "
2554
  "other roles cannot, you can specify a Vary Group for those user roles. For "
3144
  msgid "This can improve page loading time by reducing initial HTTP requests."
3145
  msgstr ""
3146
 
 
 
 
 
3147
  #: admin/tpl/setting/settings_media.php:23
3148
  msgid "Adding Style to Your Lazy-Loaded Images"
3149
  msgstr ""
3159
  #: admin/tpl/setting/settings_media.php:35
3160
  #: admin/tpl/setting/settings_tuning.php:37
3161
  #: admin/tpl/setting/settings_tuning.php:73
3162
+ #: admin/tpl/setting/settings_tuning.php:154
3163
  msgid "Both full URLs and partial strings can be used."
3164
  msgstr ""
3165
 
3166
  #: admin/tpl/setting/settings_media.php:39
3167
  #: admin/tpl/setting/settings_tuning.php:41
3168
  #: admin/tpl/setting/settings_tuning.php:77
3169
+ #: admin/tpl/setting/settings_tuning.php:158
3170
  msgid "Filter %s is supported."
3171
  msgstr ""
3172
 
3174
  #: admin/tpl/setting/settings_optimize.php:141
3175
  #: admin/tpl/setting/settings_tuning.php:42
3176
  #: admin/tpl/setting/settings_tuning.php:78
3177
+ #: admin/tpl/setting/settings_tuning.php:159
3178
  msgid "Elements with attribute %s in html code will be excluded."
3179
  msgstr ""
3180
 
3283
  #: admin/tpl/setting/settings_optimize.php:238
3284
  #: admin/tpl/setting/settings_optimize.php:276
3285
  #: admin/tpl/setting/settings_tuning.php:103
3286
+ #: admin/tpl/setting/settings_tuning.php:171
3287
  msgid ""
3288
  "This can improve your speed score in services like Pingdom, GTmetrix and "
3289
  "PageSpeed."
3500
 
3501
  #: admin/tpl/setting/settings_optimize.php:132
3502
  #: admin/tpl/setting/settings_optimize.php:153
3503
+ #: admin/tpl/setting/settings_tuning.php:143
3504
  msgid "Load CSS Asynchronously"
3505
  msgstr ""
3506
 
3816
  msgid "Remove query strings from static resources."
3817
  msgstr ""
3818
 
3819
+ #: admin/tpl/setting/settings_tuning.php:106
3820
+ msgid "Google reCAPTCHA will be bypassed automatically."
3821
+ msgstr ""
3822
+
3823
+ #: admin/tpl/setting/settings_tuning.php:110
3824
+ msgid "Append query string %s to the resources to bypass this action."
3825
+ msgstr ""
3826
+
3827
+ #: admin/tpl/setting/settings_tuning.php:117
3828
  msgid "Load Google Fonts Asynchronously"
3829
  msgstr ""
3830
 
3831
+ #: admin/tpl/setting/settings_tuning.php:121
3832
  msgid ""
3833
  "Use Web Font Loader library to load Google Fonts asynchronously while leave "
3834
  "other CSS intact."
3835
  msgstr ""
3836
 
3837
+ #: admin/tpl/setting/settings_tuning.php:122
3838
  msgid ""
3839
  "This will also add a preconnect to Google for faster Google Fonts "
3840
  "downloading."
3841
  msgstr ""
3842
 
3843
+ #: admin/tpl/setting/settings_tuning.php:129
3844
  msgid "Remove Google Fonts"
3845
  msgstr ""
3846
 
3847
+ #: admin/tpl/setting/settings_tuning.php:133
3848
  msgid "Prevent google fonts from loading on all your pages."
3849
  msgstr ""
3850
 
3851
+ #: admin/tpl/setting/settings_tuning.php:139
3852
  msgid "Critical CSS Rules"
3853
  msgstr ""
3854
 
3855
+ #: admin/tpl/setting/settings_tuning.php:143
3856
  msgid "Specify critical CSS rules for above-the-fold content when enabling %s."
3857
  msgstr ""
3858
 
3859
+ #: admin/tpl/setting/settings_tuning.php:149
3860
  msgid "JS Deferred Excludes"
3861
  msgstr ""
3862
 
3863
+ #: admin/tpl/setting/settings_tuning.php:153
3864
  msgid "Listed JS files will not be deferred."
3865
  msgstr ""
3866
 
3867
+ #: admin/tpl/setting/settings_tuning.php:166
3868
  msgid "Remove WordPress Emoji"
3869
  msgstr ""
3870
 
3871
+ #: admin/tpl/setting/settings_tuning.php:170
3872
  msgid ""
3873
  "Stop loading wordpress.org emoji. Browser default emoji will be displayed "
3874
  "instead."
3875
  msgstr ""
3876
 
3877
+ #: admin/tpl/setting/settings_tuning.php:177
3878
  msgid "URI Excludes"
3879
  msgstr ""
3880
 
3881
+ #: admin/tpl/setting/settings_tuning.php:181
3882
  msgid "Prevent any optimization of listed pages."
3883
  msgstr ""
3884
 
3885
+ #: admin/tpl/setting/settings_tuning.php:188
3886
  msgid "Role Excludes"
3887
  msgstr ""
3888
 
3889
+ #: admin/tpl/setting/settings_tuning.php:194
3890
  msgid "Selected roles will be excluded from all optimizations."
3891
  msgstr ""
3892
 
3976
  msgid "Failed to communicate with Cloudflare"
3977
  msgstr ""
3978
 
3979
+ #: inc/crawler.class.php:102 includes/litespeed-cache-crawler.class.php:102
3980
  msgid "Can not find any form data for blacklist"
3981
  msgstr ""
3982
 
3983
+ #: inc/crawler.class.php:117 includes/litespeed-cache-crawler.class.php:117
3984
  msgid "File saved successfully: %s"
3985
  msgstr ""
3986
 
3987
+ #: inc/crawler.class.php:169 includes/litespeed-cache-crawler.class.php:169
3988
  msgid "File created successfully: %s"
3989
  msgstr ""
3990
 
3991
+ #: inc/crawler.class.php:328 includes/litespeed-cache-crawler.class.php:328
3992
  msgid "Failed to send position reset notification: %s"
3993
  msgstr ""
3994
 
3995
+ #: inc/crawler.class.php:332 includes/litespeed-cache-crawler.class.php:332
3996
  msgid "Position reset notification sent successfully"
3997
  msgstr ""
3998
 
3999
+ #: inc/crawler.class.php:503 includes/litespeed-cache-crawler.class.php:503
4000
+ #: lib/litespeed/litespeed-crawler.class.php:414
4001
  msgid "Crawler %s reached end of sitemap file."
4002
  msgstr ""
4003
 
4004
+ #: inc/crawler.class.php:531 includes/litespeed-cache-crawler.class.php:531
 
 
4005
  msgid "Guest"
4006
  msgstr ""
4007
 
4084
  msgid "Update %s now"
4085
  msgstr ""
4086
 
4087
+ #: inc/img_optm.class.php:114
4088
  msgid "Communicated with LiteSpeed Image Optimization Server successfully."
4089
  msgstr ""
4090
 
4091
+ #: inc/img_optm.class.php:167 inc/img_optm.class.php:1470
4092
+ #: inc/img_optm.class.php:1535
4093
  msgid "No image found."
4094
  msgstr ""
4095
 
4096
+ #: inc/img_optm.class.php:195
4097
  msgid "Number of images in one image group (%s) exceeds the credit (%s)"
4098
  msgstr ""
4099
 
4100
+ #: inc/img_optm.class.php:223
4101
  msgid "Requested successfully."
4102
  msgstr ""
4103
 
4104
+ #: inc/img_optm.class.php:243
4105
  msgid "Optimized successfully."
4106
  msgstr ""
4107
 
4108
+ #: inc/img_optm.class.php:300
4109
  msgid "Pushed %1$s to LiteSpeed optimization server, accepted %2$s."
4110
  msgstr ""
4111
 
4112
+ #: inc/img_optm.class.php:687
4113
  msgid "Failed to parse data from LiteSpeed IAPI server: %s"
4114
  msgstr ""
4115
 
4116
+ #: inc/img_optm.class.php:1031
4117
  msgid ""
4118
  "LSCWP %1$s has simplified the image pulling process. Please %2$s, or resend "
4119
  "the pull notification this one time only. After that, the process will be "
4120
  "automated."
4121
  msgstr ""
4122
 
4123
+ #: inc/img_optm.class.php:1359
4124
  msgid "Destroy unfinished data successfully."
4125
  msgstr ""
4126
 
4127
+ #: inc/img_optm.class.php:1573
4128
  msgid ""
4129
  "Pushed %1$s groups with %2$s images to LiteSpeed optimization server, "
4130
  "accepted %3$s groups with %4$s images."
4131
  msgstr ""
4132
 
4133
+ #: inc/img_optm.class.php:1749
4134
  msgid "Removed %1$s images and saved %2$s successfully."
4135
  msgstr ""
4136
 
4137
+ #: inc/img_optm.class.php:1944
4138
  msgid "Switched images successfully."
4139
  msgstr ""
4140
 
4141
+ #: inc/img_optm.class.php:1975
4142
  msgid "Disabled WebP file successfully."
4143
  msgstr ""
4144
 
4145
+ #: inc/img_optm.class.php:1981
4146
  msgid "Enabled WebP file successfully."
4147
  msgstr ""
4148
 
4149
+ #: inc/img_optm.class.php:1997
4150
  msgid "Restored original file successfully."
4151
  msgstr ""
4152
 
4153
+ #: inc/img_optm.class.php:2004
4154
  msgid "Switched to optimized file successfully."
4155
  msgstr ""
4156
 
4157
+ #: inc/img_optm.class.php:2064
4158
  msgid "Reset the optimized data successfully."
4159
  msgstr ""
4160
 
4294
  msgid " %s ago"
4295
  msgstr ""
4296
 
4297
+ #: lib/litespeed/litespeed-crawler.class.php:220
4298
  msgid "Cannot read meta file: %s"
4299
  msgstr ""
4300
 
4301
+ #: lib/litespeed/litespeed-crawler.class.php:225
4302
  msgid "Oh look, there is already another LiteSpeed crawler running!"
4303
  msgstr ""
4304
 
4305
+ #: lib/litespeed/litespeed-crawler.class.php:231
4306
  msgid "Stopped due to load hit the maximum."
4307
  msgstr ""
4308
 
4309
+ #: lib/litespeed/litespeed-crawler.class.php:313
4310
  msgid "Stopped due to error when crawling urls %1$s : %2$s"
4311
  msgstr ""
4312
 
4313
+ #: lib/litespeed/litespeed-crawler.class.php:320
4314
  msgid "Stopped: crawler disabled by the server admin"
4315
  msgstr ""
4316
 
4317
+ #: lib/litespeed/litespeed-crawler.class.php:341
4318
  msgid "Stopped due to exceeding defined Maximum Run Time"
4319
  msgstr ""
4320
 
4321
+ #: lib/litespeed/litespeed-crawler.class.php:358
4322
  msgid "Stopped due to reset meta position"
4323
  msgstr ""
4324
 
4325
+ #: lib/litespeed/litespeed-crawler.class.php:366
4326
  msgid "Stopped due to load over limit"
4327
  msgstr ""
4328
 
lib/litespeed/litespeed-crawler.class.php CHANGED
@@ -17,6 +17,7 @@ class Litespeed_Crawler
17
  private $_threads_limit = 3 ;
18
  private $_load_limit = 1 ;
19
  private $_domain_ip = '' ;
 
20
 
21
  private $_curl_headers = array() ;
22
  private $_cookies = array() ;
@@ -44,6 +45,17 @@ class Litespeed_Crawler
44
  $this->_meta_file = $this->_sitemap_file . '.meta' ;
45
  }
46
 
 
 
 
 
 
 
 
 
 
 
 
47
  /**
48
  * Set http/2 option for curl request
49
  *
@@ -537,10 +549,9 @@ class Litespeed_Crawler
537
  *
538
  * @since 1.1.0
539
  * @access private
540
- * @param string $ua as user-agent
541
  * @return options array
542
  */
543
- private function _get_curl_options($ua = '')
544
  {
545
  $referer = null ;
546
  if ( isset($_SERVER['HTTP_HOST']) && isset($_SERVER['REQUEST_URI']) ) {
@@ -575,10 +586,10 @@ class Litespeed_Crawler
575
  // else {
576
  // }
577
 
578
- if ( ! $ua ) {
579
- $ua = self::FAST_USER_AGENT ;
580
  }
581
- $options[CURLOPT_USERAGENT] = $ua ;
582
 
583
  if ( $this->_domain_ip && $this->_baseUrl ) {
584
  $parsed_url = parse_url($this->_baseUrl) ;
17
  private $_threads_limit = 3 ;
18
  private $_load_limit = 1 ;
19
  private $_domain_ip = '' ;
20
+ private $_ua = '' ;
21
 
22
  private $_curl_headers = array() ;
23
  private $_cookies = array() ;
45
  $this->_meta_file = $this->_sitemap_file . '.meta' ;
46
  }
47
 
48
+ /**
49
+ * Set User Agent
50
+ *
51
+ * @since 2.8
52
+ * @access public
53
+ */
54
+ public function set_ua( $ua )
55
+ {
56
+ $this->_ua = $ua ;
57
+ }
58
+
59
  /**
60
  * Set http/2 option for curl request
61
  *
549
  *
550
  * @since 1.1.0
551
  * @access private
 
552
  * @return options array
553
  */
554
+ private function _get_curl_options()
555
  {
556
  $referer = null ;
557
  if ( isset($_SERVER['HTTP_HOST']) && isset($_SERVER['REQUEST_URI']) ) {
586
  // else {
587
  // }
588
 
589
+ if ( strpos( $this->_ua, self::FAST_USER_AGENT ) !== 0 ) {
590
+ $this->_ua = self::FAST_USER_AGENT . ' ' . $this->_ua ;
591
  }
592
+ $options[CURLOPT_USERAGENT] = $this->_ua ;
593
 
594
  if ( $this->_domain_ip && $this->_baseUrl ) {
595
  $parsed_url = parse_url($this->_baseUrl) ;
litespeed-cache.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: LiteSpeed Cache
16
  * Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
17
  * Description: High-performance page caching and site optimization from LiteSpeed
18
- * Version: 2.7.3
19
  * Author: LiteSpeed Technologies
20
  * Author URI: https://www.litespeedtech.com
21
  * License: GPLv3
15
  * Plugin Name: LiteSpeed Cache
16
  * Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
17
  * Description: High-performance page caching and site optimization from LiteSpeed
18
+ * Version: 2.8
19
  * Author: LiteSpeed Technologies
20
  * Author URI: https://www.litespeedtech.com
21
  * License: GPLv3
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: LiteSpeedTech
3
  Tags: caching, optimize, performance, pagespeed, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
4
  Requires at least: 4.0
5
  Tested up to: 4.9.8
6
- Stable tag: 2.7.3
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
@@ -276,6 +276,22 @@ Click on the `Advanced View` link at the top of the page, and several more tabs
276
 
277
  == Changelog ==
278
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  = 2.7.3 - Nov 26 2018 =
280
  * <strong>Optm</strong>: Improved page render speed with Web Font Loader JS library for Load Google Fonts Asynchronously.
281
  * <strong>Optm</strong>: Directly used JS library files in plugin folder instead of short links `/min/`.
3
  Tags: caching, optimize, performance, pagespeed, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
4
  Requires at least: 4.0
5
  Tested up to: 4.9.8
6
+ Stable tag: 2.8
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
276
 
277
  == Changelog ==
278
 
279
+ = 2.8 - Nov 30 2018 =
280
+ * 🌱: ESI shortcodes.
281
+ * 🌱: Mobile crawler.
282
+ * 🌱: Cookie crawler.
283
+ * <strong>API</strong>: Can now add `_litespeed_rm_qs=0` to bypass Remove Query Strings.
284
+ * <strong>Optm</strong>: Removed error log when minify JS failed.
285
+ * 🐞<strong>Core</strong>: Fixed a bug that caused network activation PHP warning.
286
+ * <strong>Media</strong>: Removed canvas checking for WebP to support TOR. (@odeskumair)
287
+ * <strong>Media</strong>: Eliminated potential image placeholder PHP warning.
288
+ * <strong>3rd</strong>: Bypassed Google recaptcha from Remove Query Strings for better compatibility.
289
+ * <strong>IAPI</strong>: Showed destroy timeout details.
290
+ * <strong>Debug</strong>: Moved Google Fonts log to advanced level.
291
+ * <strong>GUI</strong>: Replaced all Learn More links for functions.
292
+ * <strong>GUI</strong>: Cosmetic updates including Emoji.
293
+ * 🕷️: Removed duplicated data in sitemap and blacklist.
294
+
295
  = 2.7.3 - Nov 26 2018 =
296
  * <strong>Optm</strong>: Improved page render speed with Web Font Loader JS library for Load Google Fonts Asynchronously.
297
  * <strong>Optm</strong>: Directly used JS library files in plugin folder instead of short links `/min/`.