LiteSpeed Cache - Version 1.8.3

Version Description

  • February 2 2018 =
  • [NEW FEATURE] Crawler server variable limitation support.
  • [IMPROVEMENT] Added Store Transients option to fix transients missing issue when Cache Wp-Admin setting is OFF.
  • [IMPROVEMENT] Tweaked ARIA support. (@steverep)
  • [IMPROVEMENT] Used strpos instead of strncmp for performance. (@Zach E)
  • [BUGFIX] Transient cache can now be removed when the Cache Wp-Admin setting is ON in Object Cache.
  • [BUGFIX] Network sites can now save Advanced settings.
  • [BUGFIX] Media list now shows in network sites.
  • [BUGFIX] Show Crawler Status button is working again.
  • [UPDATE] Fixed a couple of potential PHP notices in the Network cache tab and when no vary group is set.
  • [GUI] Added Learn More link to all setting pages.
Download this release

Release Info

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

Code changes from version 1.7.2 to 1.8.3

Files changed (86) hide show
  1. admin/litespeed-cache-admin-display.class.php +58 -22
  2. admin/litespeed-cache-admin-report.class.php +8 -2
  3. admin/litespeed-cache-admin-rules.class.php +2 -4
  4. admin/litespeed-cache-admin-settings.class.php +93 -10
  5. admin/litespeed-cache-admin.class.php +8 -3
  6. admin/tpl/crawler.php +2 -2
  7. admin/tpl/debug_log.php +1 -1
  8. admin/tpl/edit_htaccess.php +1 -1
  9. admin/tpl/image_optimization.php +3 -3
  10. admin/tpl/import_export.php +60 -0
  11. admin/tpl/manage.php +3 -3
  12. admin/tpl/manage/manage_purge.php +25 -0
  13. admin/tpl/network_settings.php +4 -6
  14. admin/tpl/report.php +1 -1
  15. admin/tpl/setting/network_settings_advanced.php +11 -0
  16. admin/tpl/setting/network_settings_cache.php +5 -4
  17. admin/tpl/setting/network_settings_excludes.php +2 -2
  18. admin/tpl/setting/network_settings_media.php +1 -1
  19. admin/tpl/setting/network_settings_purge.php +1 -1
  20. admin/tpl/setting/settings_advanced.php +25 -73
  21. admin/tpl/setting/settings_cache.php +12 -7
  22. admin/tpl/setting/settings_cdn.php +4 -1
  23. admin/tpl/setting/settings_crawler.php +35 -3
  24. admin/tpl/setting/settings_debug.php +10 -5
  25. admin/tpl/setting/settings_excludes.php +6 -3
  26. admin/tpl/setting/settings_general.php +5 -1
  27. admin/tpl/setting/settings_inc.cache_browser.php +2 -2
  28. admin/tpl/setting/settings_inc.cache_mobile.php +5 -1
  29. admin/tpl/setting/settings_inc.cache_object.php +156 -0
  30. admin/tpl/setting/settings_inc.check_adv_file.php +22 -0
  31. admin/tpl/setting/settings_inc.login_cookie.php +62 -0
  32. admin/tpl/setting/settings_media.php +5 -2
  33. admin/tpl/setting/settings_optimize.php +6 -1
  34. admin/tpl/setting/settings_purge.php +6 -2
  35. admin/tpl/setting/settings_tuning.php +4 -2
  36. admin/tpl/settings.php +47 -16
  37. cli/litespeed-cache-cli-admin.class.php +8 -0
  38. css/litespeed.css +90 -5
  39. img/icons/purge-front.svg +21 -20
  40. img/icons/purge-object.svg +61 -0
  41. img/icons/purge-opcache.svg +69 -0
  42. inc/activation.class.php +11 -5
  43. inc/cdn.class.php +19 -3
  44. inc/config.class.php +74 -11
  45. inc/control.class.php +1 -1
  46. inc/crawler.class.php +26 -10
  47. inc/esi.class.php +31 -24
  48. inc/gui.class.php +46 -5
  49. inc/import.class.php +207 -0
  50. inc/litespeed-cache.class.php +39 -18
  51. inc/litespeed.autoload.php +5 -3
  52. inc/log.class.php +11 -37
  53. inc/media.class.php +1 -1
  54. inc/object.class.php +612 -0
  55. inc/object.lib.php +655 -0
  56. inc/optimize.class.php +1 -1
  57. inc/purge.class.php +84 -1
  58. inc/router.class.php +15 -2
  59. inc/task.class.php +1 -3
  60. inc/utility.class.php +1 -1
  61. inc/vary.class.php +2 -2
  62. includes/litespeed-cache-activation.class.php +11 -5
  63. includes/litespeed-cache-cdn.class.php +19 -3
  64. includes/litespeed-cache-config.class.php +74 -11
  65. includes/litespeed-cache-control.class.php +1 -1
  66. includes/litespeed-cache-crawler.class.php +26 -10
  67. includes/litespeed-cache-esi.class.php +31 -24
  68. includes/litespeed-cache-gui.class.php +46 -5
  69. includes/litespeed-cache-log.class.php +11 -37
  70. includes/litespeed-cache-optimize.class.php +1 -1
  71. includes/litespeed-cache-purge.class.php +84 -1
  72. includes/litespeed-cache-router.class.php +15 -2
  73. includes/litespeed-cache-task.class.php +1 -3
  74. includes/litespeed-cache-utility.class.php +1 -1
  75. includes/litespeed-cache-vary.class.php +2 -2
  76. includes/litespeed-cache.class.php +39 -18
  77. includes/litespeed.autoload.php +5 -3
  78. js/instant_click.min.js +1 -0
  79. js/instant_click.ori.js +1068 -0
  80. js/litespeed-cache-admin.js +22 -1
  81. languages/litespeed-cache.pot +872 -574
  82. lib/object-cache.php +41 -0
  83. litespeed-cache.php +8 -12
  84. readme.txt +49 -10
  85. thirdparty/lscwp-3rd-woocommerce.cls.php +1 -1
  86. thirdparty/lscwp-registry-3rd.php +1 -1
admin/litespeed-cache-admin-display.class.php CHANGED
@@ -68,11 +68,11 @@ class LiteSpeed_Cache_Admin_Display
68
  if ( defined( 'LITESPEED_ON' ) ) {
69
  add_action( 'wp_before_admin_bar_render', array( LiteSpeed_Cache_GUI::get_instance(), 'backend_shortcut' ) ) ;
70
  }
71
- add_action('admin_enqueue_scripts', array($this, 'check_messages')) ;// We can do this cos admin_notices hook is after admin_enqueue_scripts hook in wp-admin/admin-header.php
72
  }
73
 
74
- // add menus
75
- if ( $is_network_admin && is_plugin_active_for_network(LSWCP_BASENAME) ) {
76
  add_action('network_admin_menu', array($this, 'register_admin_menu')) ;
77
  }
78
  else {
@@ -116,9 +116,12 @@ class LiteSpeed_Cache_Admin_Display
116
  * @access public
117
  * @param string $action
118
  */
119
- public function form_action($action)
120
  {
121
  echo '<input type="hidden" name="' . LiteSpeed_Cache::ACTION_KEY . '" value="' . $action . '" />' ;
 
 
 
122
  wp_nonce_field($action, LiteSpeed_Cache::NONCE_NAME) ;
123
  }
124
 
@@ -149,11 +152,10 @@ class LiteSpeed_Cache_Admin_Display
149
  $this->add_submenu(__('Image Optimization', 'litespeed-cache'), 'lscache-optimization', 'show_optimization') ;
150
  $this->add_submenu(__('Crawler', 'litespeed-cache'), 'lscache-crawler', 'show_crawler') ;
151
  $this->add_submenu(__('Report', 'litespeed-cache'), 'lscache-report', 'show_report') ;
 
152
  }
153
 
154
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
155
- $this->add_submenu(__('Debug Log', 'litespeed-cache'), 'lscache-debug', 'show_debug_log') ;
156
- }
157
 
158
  // sub menus under options
159
  add_options_page('LiteSpeed Cache', 'LiteSpeed Cache', $capability, 'litespeedcache', array($this, 'show_menu_settings')) ;
@@ -283,7 +285,7 @@ class LiteSpeed_Cache_Admin_Display
283
  */
284
  public function admin_footer_text($footer_text)
285
  {
286
- require_once LSWCP_DIR . 'admin/tpl/inc/admin_footer.php' ;
287
 
288
  return $footer_text ;
289
  }
@@ -331,7 +333,7 @@ class LiteSpeed_Cache_Admin_Display
331
  */
332
  public function add_help_tabs()
333
  {
334
- require_once LSWCP_DIR . 'admin/tpl/inc/help_tabs.php' ;
335
  }
336
 
337
  /**
@@ -529,7 +531,7 @@ class LiteSpeed_Cache_Admin_Display
529
  */
530
  public function show_widget_edit($widget, $return, $instance)
531
  {
532
- require LSWCP_DIR . 'admin/tpl/esi_widget_edit.php' ;
533
  }
534
 
535
  /**
@@ -540,7 +542,7 @@ class LiteSpeed_Cache_Admin_Display
540
  */
541
  public function show_menu_manage()
542
  {
543
- require_once LSWCP_DIR . 'admin/tpl/manage.php' ;
544
  }
545
 
546
  /**
@@ -552,13 +554,13 @@ class LiteSpeed_Cache_Admin_Display
552
  public function show_menu_settings()
553
  {
554
  if ( is_network_admin() ) {
555
- require_once LSWCP_DIR . 'admin/tpl/network_settings.php' ;
556
  }
557
  else {
558
  if ( $_GET['page'] != 'litespeedcache' ) {// ls settings msg need to display manually
559
  settings_errors() ;
560
  }
561
- require_once LSWCP_DIR . 'admin/tpl/settings.php' ;
562
  }
563
  }
564
 
@@ -573,7 +575,7 @@ class LiteSpeed_Cache_Admin_Display
573
  */
574
  public function show_menu_edit_htaccess()
575
  {
576
- require_once LSWCP_DIR . 'admin/tpl/edit_htaccess.php' ;
577
  }
578
 
579
  /**
@@ -584,7 +586,18 @@ class LiteSpeed_Cache_Admin_Display
584
  */
585
  public function show_report()
586
  {
587
- require_once LSWCP_DIR . 'admin/tpl/report.php' ;
 
 
 
 
 
 
 
 
 
 
 
588
  }
589
 
590
  /**
@@ -595,7 +608,7 @@ class LiteSpeed_Cache_Admin_Display
595
  */
596
  public function show_crawler()
597
  {
598
- require_once LSWCP_DIR . 'admin/tpl/crawler.php' ;
599
  }
600
 
601
  /**
@@ -606,7 +619,7 @@ class LiteSpeed_Cache_Admin_Display
606
  */
607
  public function show_optimization()
608
  {
609
- require_once LSWCP_DIR . 'admin/tpl/image_optimization.php' ;
610
  }
611
 
612
  /**
@@ -617,7 +630,7 @@ class LiteSpeed_Cache_Admin_Display
617
  */
618
  public function show_debug_log()
619
  {
620
- require_once LSWCP_DIR . 'admin/tpl/debug_log.php' ;
621
  }
622
 
623
  /**
@@ -629,7 +642,7 @@ class LiteSpeed_Cache_Admin_Display
629
  */
630
  public function show_display_installed()
631
  {
632
- require_once LSWCP_DIR . 'admin/tpl/inc/show_display_installed.php' ;
633
  }
634
 
635
  /**
@@ -640,7 +653,7 @@ class LiteSpeed_Cache_Admin_Display
640
  */
641
  public static function show_error_cookie()
642
  {
643
- require_once LSWCP_DIR . 'admin/tpl/inc/show_error_cookie.php' ;
644
  }
645
 
646
  /**
@@ -685,7 +698,10 @@ class LiteSpeed_Cache_Admin_Display
685
  */
686
  public function build_textarea2( $id, $cols = false )
687
  {
688
- $val = get_option( $id, false ) ;
 
 
 
689
 
690
  if ( is_array( $val ) ) {
691
  $val = implode( "\n", $val ) ;
@@ -882,7 +898,8 @@ class LiteSpeed_Cache_Admin_Display
882
  * @access public
883
  * @param string $id The setting tag
884
  */
885
- public function recommended($id) {
 
886
  $val = isset($this->default_settings[$id]) ? $this->default_settings[$id] : '' ;
887
  if ( $val ) {
888
  if ( ! is_numeric( $val ) && strpos( $val, "\n" ) !== false ) {
@@ -895,6 +912,25 @@ class LiteSpeed_Cache_Admin_Display
895
  }
896
  }
897
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
898
  /**
899
  * Get the current instance object.
900
  *
68
  if ( defined( 'LITESPEED_ON' ) ) {
69
  add_action( 'wp_before_admin_bar_render', array( LiteSpeed_Cache_GUI::get_instance(), 'backend_shortcut' ) ) ;
70
  }
71
+ add_action('admin_enqueue_scripts', array($this, 'check_messages')) ;// We can do this bcos admin_notices hook is after admin_enqueue_scripts hook in wp-admin/admin-header.php
72
  }
73
 
74
+ // add menus ( Also check for mu-plugins)
75
+ if ( $is_network_admin && ( is_plugin_active_for_network( LSCWP_BASENAME ) || defined( 'LSCWP_MU_PLUGIN' ) ) ) {
76
  add_action('network_admin_menu', array($this, 'register_admin_menu')) ;
77
  }
78
  else {
116
  * @access public
117
  * @param string $action
118
  */
119
+ public function form_action( $action, $type = false )
120
  {
121
  echo '<input type="hidden" name="' . LiteSpeed_Cache::ACTION_KEY . '" value="' . $action . '" />' ;
122
+ if ( $type ) {
123
+ echo '<input type="hidden" name="type" value="' . $type . '" />' ;
124
+ }
125
  wp_nonce_field($action, LiteSpeed_Cache::NONCE_NAME) ;
126
  }
127
 
152
  $this->add_submenu(__('Image Optimization', 'litespeed-cache'), 'lscache-optimization', 'show_optimization') ;
153
  $this->add_submenu(__('Crawler', 'litespeed-cache'), 'lscache-crawler', 'show_crawler') ;
154
  $this->add_submenu(__('Report', 'litespeed-cache'), 'lscache-report', 'show_report') ;
155
+ $this->add_submenu(__('Import / Export', 'litespeed-cache'), 'lscache-import', 'show_import_export') ;
156
  }
157
 
158
+ defined( 'LSCWP_LOG' ) && $this->add_submenu(__('Debug Log', 'litespeed-cache'), 'lscache-debug', 'show_debug_log') ;
 
 
159
 
160
  // sub menus under options
161
  add_options_page('LiteSpeed Cache', 'LiteSpeed Cache', $capability, 'litespeedcache', array($this, 'show_menu_settings')) ;
285
  */
286
  public function admin_footer_text($footer_text)
287
  {
288
+ require_once LSCWP_DIR . 'admin/tpl/inc/admin_footer.php' ;
289
 
290
  return $footer_text ;
291
  }
333
  */
334
  public function add_help_tabs()
335
  {
336
+ require_once LSCWP_DIR . 'admin/tpl/inc/help_tabs.php' ;
337
  }
338
 
339
  /**
531
  */
532
  public function show_widget_edit($widget, $return, $instance)
533
  {
534
+ require LSCWP_DIR . 'admin/tpl/esi_widget_edit.php' ;
535
  }
536
 
537
  /**
542
  */
543
  public function show_menu_manage()
544
  {
545
+ require_once LSCWP_DIR . 'admin/tpl/manage.php' ;
546
  }
547
 
548
  /**
554
  public function show_menu_settings()
555
  {
556
  if ( is_network_admin() ) {
557
+ require_once LSCWP_DIR . 'admin/tpl/network_settings.php' ;
558
  }
559
  else {
560
  if ( $_GET['page'] != 'litespeedcache' ) {// ls settings msg need to display manually
561
  settings_errors() ;
562
  }
563
+ require_once LSCWP_DIR . 'admin/tpl/settings.php' ;
564
  }
565
  }
566
 
575
  */
576
  public function show_menu_edit_htaccess()
577
  {
578
+ require_once LSCWP_DIR . 'admin/tpl/edit_htaccess.php' ;
579
  }
580
 
581
  /**
586
  */
587
  public function show_report()
588
  {
589
+ require_once LSCWP_DIR . 'admin/tpl/report.php' ;
590
+ }
591
+
592
+ /**
593
+ * Outputs the html for the Import/Export page.
594
+ *
595
+ * @since 1.8.2
596
+ * @access public
597
+ */
598
+ public function show_import_export()
599
+ {
600
+ require_once LSCWP_DIR . 'admin/tpl/import_export.php' ;
601
  }
602
 
603
  /**
608
  */
609
  public function show_crawler()
610
  {
611
+ require_once LSCWP_DIR . 'admin/tpl/crawler.php' ;
612
  }
613
 
614
  /**
619
  */
620
  public function show_optimization()
621
  {
622
+ require_once LSCWP_DIR . 'admin/tpl/image_optimization.php' ;
623
  }
624
 
625
  /**
630
  */
631
  public function show_debug_log()
632
  {
633
+ require_once LSCWP_DIR . 'admin/tpl/debug_log.php' ;
634
  }
635
 
636
  /**
642
  */
643
  public function show_display_installed()
644
  {
645
+ require_once LSCWP_DIR . 'admin/tpl/inc/show_display_installed.php' ;
646
  }
647
 
648
  /**
653
  */
654
  public static function show_error_cookie()
655
  {
656
+ require_once LSCWP_DIR . 'admin/tpl/inc/show_error_cookie.php' ;
657
  }
658
 
659
  /**
698
  */
699
  public function build_textarea2( $id, $cols = false )
700
  {
701
+ // Get default val for separate item
702
+ $default_val = $this->config->default_item( $id ) ;
703
+
704
+ $val = get_option( $id, $default_val ) ;
705
 
706
  if ( is_array( $val ) ) {
707
  $val = implode( "\n", $val ) ;
898
  * @access public
899
  * @param string $id The setting tag
900
  */
901
+ public function recommended( $id )
902
+ {
903
  $val = isset($this->default_settings[$id]) ? $this->default_settings[$id] : '' ;
904
  if ( $val ) {
905
  if ( ! is_numeric( $val ) && strpos( $val, "\n" ) !== false ) {
912
  }
913
  }
914
 
915
+ /**
916
+ * Display API environment variable support
917
+ *
918
+ * @since 1.8.3
919
+ * @access private
920
+ */
921
+ private function _api_env_var()
922
+ {
923
+ $args = func_get_args() ;
924
+ $s = '<code>' . implode( '</code>, <code>', $args ) . '</code>' ;
925
+
926
+ echo '<font class="litespeed-success"> '
927
+ . __( 'API', 'litespeed-cache' ) . ': '
928
+ . sprintf( __( 'Server variable(s) %s available to override this setting.', 'litespeed-cache' ), $s )
929
+ . ' <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:server_variables" target="_blank">'
930
+ . __( 'Learn More', 'litespeed-cache' )
931
+ . '</a>' ;
932
+ }
933
+
934
  /**
935
  * Get the current instance object.
936
  *
admin/litespeed-cache-admin-report.class.php CHANGED
@@ -158,8 +158,14 @@ class LiteSpeed_Cache_Admin_Report
158
  }
159
 
160
  // Security: Remove cf key in report
161
- if ( ! empty( $options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_KEY ] ) ) {
162
- $options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_KEY ] = str_repeat( '*', strlen( $options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_KEY ] ) ) ;
 
 
 
 
 
 
163
  }
164
 
165
  $options[ LiteSpeed_Cache_Config::ITEM_CDN_MAPPING ] = get_option( LiteSpeed_Cache_Config::ITEM_CDN_MAPPING ) ;
158
  }
159
 
160
  // Security: Remove cf key in report
161
+ $secure_fields = array(
162
+ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_KEY,
163
+ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PSWD,
164
+ ) ;
165
+ foreach ( $secure_fields as $v ) {
166
+ if ( ! empty( $options[ $v ] ) ) {
167
+ $options[ $v ] = str_repeat( '*', strlen( $options[ $v ] ) ) ;
168
+ }
169
  }
170
 
171
  $options[ LiteSpeed_Cache_Config::ITEM_CDN_MAPPING ] = get_option( LiteSpeed_Cache_Config::ITEM_CDN_MAPPING ) ;
admin/litespeed-cache-admin-rules.class.php CHANGED
@@ -16,7 +16,7 @@ class LiteSpeed_Cache_Admin_Rules
16
 
17
  private $frontend_htaccess = null ;
18
  private $backend_htaccess = null ;
19
- private $theme_htaccess = null ;
20
  private $frontend_htaccess_readable = false ;
21
  private $frontend_htaccess_writable = false ;
22
  private $backend_htaccess_readable = false ;
@@ -182,8 +182,6 @@ class LiteSpeed_Cache_Admin_Rules
182
  */
183
  private function path_set()
184
  {
185
- $this->theme_htaccess = LSWCP_CONTENT_DIR ;
186
-
187
  $frontend = LiteSpeed_Cache_Router::frontend_path() ;
188
  $frontend_htaccess_search = $this->htaccess_search( $frontend ) ;// The existing .htaccess path to be used for frontend .htaccess
189
  $this->frontend_htaccess = ( $frontend_htaccess_search ?: $frontend ) . '/.htaccess' ;
@@ -591,7 +589,7 @@ class LiteSpeed_Cache_Admin_Rules
591
  $id = LiteSpeed_Cache_Config::OPID_CACHE_RES ;
592
  if ( ! empty( $cfg[ $id ] ) ) {
593
  $new_rules[] = $new_rules_backend[] = self::MARKER_CACHE_RESOURCE . self::MARKER_START ;
594
- $new_rules[] = $new_rules_backend[] = 'RewriteRule ' . LSWCP_CONTENT_FOLDER . self::RW_PATTERN_RES . ' - [E=cache-control:max-age=3600]' ;
595
  $new_rules[] = $new_rules_backend[] = self::MARKER_CACHE_RESOURCE . self::MARKER_END ;
596
  $new_rules[] = $new_rules_backend[] = '' ;
597
  }
16
 
17
  private $frontend_htaccess = null ;
18
  private $backend_htaccess = null ;
19
+ private $theme_htaccess = null ;// Not used yet
20
  private $frontend_htaccess_readable = false ;
21
  private $frontend_htaccess_writable = false ;
22
  private $backend_htaccess_readable = false ;
182
  */
183
  private function path_set()
184
  {
 
 
185
  $frontend = LiteSpeed_Cache_Router::frontend_path() ;
186
  $frontend_htaccess_search = $this->htaccess_search( $frontend ) ;// The existing .htaccess path to be used for frontend .htaccess
187
  $this->frontend_htaccess = ( $frontend_htaccess_search ?: $frontend ) . '/.htaccess' ;
589
  $id = LiteSpeed_Cache_Config::OPID_CACHE_RES ;
590
  if ( ! empty( $cfg[ $id ] ) ) {
591
  $new_rules[] = $new_rules_backend[] = self::MARKER_CACHE_RESOURCE . self::MARKER_START ;
592
+ $new_rules[] = $new_rules_backend[] = 'RewriteRule ' . LSCWP_CONTENT_FOLDER . self::RW_PATTERN_RES . ' - [E=cache-control:max-age=3600]' ;
593
  $new_rules[] = $new_rules_backend[] = self::MARKER_CACHE_RESOURCE . self::MARKER_END ;
594
  $new_rules[] = $new_rules_backend[] = '' ;
595
  }
admin/litespeed-cache-admin-settings.class.php CHANGED
@@ -149,6 +149,14 @@ class LiteSpeed_Cache_Admin_Settings
149
  else {
150
  LiteSpeed_Cache_Admin_Rules::get_instance()->clear_rules() ;
151
  }
 
 
 
 
 
 
 
 
152
  }
153
 
154
  /**
@@ -213,6 +221,13 @@ class LiteSpeed_Cache_Admin_Settings
213
  LiteSpeed_Cache_Admin_Rules::get_instance()->insert_wrapper() ;
214
  }
215
 
 
 
 
 
 
 
 
216
  if ( ! empty( $this->_err ) ) {
217
  LiteSpeed_Cache_Admin_Display::add_notice( LiteSpeed_Cache_Admin_Display::NOTICE_RED, $this->_err ) ;
218
  return ;
@@ -223,6 +238,73 @@ class LiteSpeed_Cache_Admin_Settings
223
  return $options ;
224
  }
225
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  /**
227
  * Validates the general settings.
228
  *
@@ -310,12 +392,12 @@ class LiteSpeed_Cache_Admin_Settings
310
  $this->_options[ $id ] = LiteSpeed_Cache_Utility::sanitize_lines( $this->_input[ $id ], 'relative' ) ;
311
  }
312
 
313
- /**
314
- * Update Drop Query String
315
- * @since 1.7
316
- */
317
- $id = LiteSpeed_Cache_Config::ITEM_CACHE_DROP_QS ;
318
- update_option( $id, ! empty( $this->_input[ $id ] ) ? LiteSpeed_Cache_Utility::sanitize_lines( $this->_input[ $id ] ) : '' ) ;
319
 
320
  }
321
 
@@ -563,7 +645,6 @@ class LiteSpeed_Cache_Admin_Settings
563
  LiteSpeed_Cache_Config::OPID_MEDIA_IMG_LAZY,
564
  LiteSpeed_Cache_Config::OPID_MEDIA_IFRAME_LAZY,
565
  LiteSpeed_Cache_Config::OPID_MEDIA_IMG_OPTM_CRON_OFF,
566
- LiteSpeed_Cache_Config::OPID_MEDIA_IMG_WEBP,
567
  LiteSpeed_Cache_Config::OPID_MEDIA_IMG_WEBP_ONLY,
568
  LiteSpeed_Cache_Config::OPID_MEDIA_IMG_EXIF,
569
  LiteSpeed_Cache_Config::OPID_MEDIA_IMG_WEBP_LOSSLESS,
@@ -669,6 +750,7 @@ class LiteSpeed_Cache_Admin_Settings
669
  $ids = array(
670
  LiteSpeed_Cache_Config::OPID_USE_HTTP_FOR_HTTPS_VARY,
671
  // LiteSpeed_Cache_Config::OPID_ADV_FAVICON,
 
672
  ) ;
673
  foreach ( $ids as $id ) {
674
  $this->_options[ $id ] = self::parse_onoff( $this->_input, $id ) ;
@@ -759,11 +841,11 @@ class LiteSpeed_Cache_Admin_Settings
759
 
760
  // Filters ignored
761
  $ids = array(
762
- LiteSpeed_Cache_Config::OPID_LOG_IGNORE_FILTERS,
763
- LiteSpeed_Cache_Config::OPID_LOG_IGNORE_PART_FILTERS,
764
  ) ;
765
  foreach ( $ids as $id ) {
766
- $this->_options[ $id ] = LiteSpeed_Cache_Utility::sanitize_lines( $this->_input[ $id ] ) ;
767
  }
768
  }
769
 
@@ -872,6 +954,7 @@ class LiteSpeed_Cache_Admin_Settings
872
  LiteSpeed_Cache_Config::OPID_CACHE_FAVICON,
873
  LiteSpeed_Cache_Config::OPID_CACHE_RES,
874
  LiteSpeed_Cache_Config::OPID_CACHE_BROWSER,
 
875
  ) ;
876
  foreach ( $ids as $id ) {
877
  $new_options[ $id ] = self::parse_onoff( $this->_input, $id ) ;
149
  else {
150
  LiteSpeed_Cache_Admin_Rules::get_instance()->clear_rules() ;
151
  }
152
+
153
+ /**
154
+ * Validate Object Cache
155
+ * @since 1.8
156
+ */
157
+ $new_options = $this->_validate_object_cache() ;
158
+ $this->_options = array_merge( $this->_options, $new_options ) ;
159
+
160
  }
161
 
162
  /**
221
  LiteSpeed_Cache_Admin_Rules::get_instance()->insert_wrapper() ;
222
  }
223
 
224
+ /**
225
+ * Validate Object Cache
226
+ * @since 1.8
227
+ */
228
+ $new_options = $this->_validate_object_cache() ;
229
+ $options = array_merge( $options, $new_options ) ;
230
+
231
  if ( ! empty( $this->_err ) ) {
232
  LiteSpeed_Cache_Admin_Display::add_notice( LiteSpeed_Cache_Admin_Display::NOTICE_RED, $this->_err ) ;
233
  return ;
238
  return $options ;
239
  }
240
 
241
+ /**
242
+ * Validates object cache settings.
243
+ *
244
+ * @since 1.8
245
+ * @access private
246
+ */
247
+ private function _validate_object_cache()
248
+ {
249
+ $new_options = array() ;
250
+
251
+ $ids = array(
252
+ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT,
253
+ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_KIND,
254
+ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_ADMIN,
255
+ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_TRANSIENTS,
256
+ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PERSISTENT,
257
+ ) ;
258
+ foreach ( $ids as $id ) {
259
+ $new_options[ $id ] = self::parse_onoff( $this->_input, $id ) ;
260
+ }
261
+
262
+ $ids = array(
263
+ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_HOST,
264
+ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PORT,
265
+ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_LIFE,
266
+ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_DB_ID,
267
+ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_USER,
268
+ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PSWD,
269
+ );
270
+ foreach ( $ids as $id ) {
271
+ $new_options[ $id ] = $this->_input[ $id ] ;
272
+ }
273
+
274
+ $ids = array(
275
+ LiteSpeed_Cache_Config::ITEM_OBJECT_GLOBAL_GROUPS,
276
+ LiteSpeed_Cache_Config::ITEM_OBJECT_NON_PERSISTENT_GROUPS,
277
+ );
278
+ $item_options = array() ;
279
+ foreach ( $ids as $id ) {
280
+ $item_options[ $id ] = ! empty( $this->_input[ $id ] ) ? LiteSpeed_Cache_Utility::sanitize_lines( $this->_input[ $id ] ) : '' ;
281
+ update_option( $id, $item_options[ $id ] ) ;
282
+ }
283
+
284
+ /**
285
+ * Check if object cache file existing or not
286
+ */
287
+ $id = LiteSpeed_Cache_Config::OPID_CACHE_OBJECT ;
288
+ if ( $new_options[ $id ] ) {
289
+ $all_options = array_merge( $new_options, $item_options ) ;
290
+ LiteSpeed_Cache_Log::debug( 'Settings: Update .object_cache.ini and flush object cache' ) ;
291
+ LiteSpeed_Cache_Object::get_instance()->update_file( true, $all_options ) ;
292
+ /**
293
+ * Clear object cache
294
+ */
295
+ LiteSpeed_Cache_Object::get_instance()->reconnect( $all_options ) ;
296
+ }
297
+ else {
298
+ if ( defined( 'LSCWP_OBJECT_CACHE' ) ) {
299
+ LiteSpeed_Cache_Log::debug( 'Settings: Remove .object_cache.ini' ) ;
300
+ LiteSpeed_Cache_Object::get_instance()->update_file( false ) ;
301
+ }
302
+ }
303
+
304
+ return $new_options ;
305
+
306
+ }
307
+
308
  /**
309
  * Validates the general settings.
310
  *
392
  $this->_options[ $id ] = LiteSpeed_Cache_Utility::sanitize_lines( $this->_input[ $id ], 'relative' ) ;
393
  }
394
 
395
+ $ids = array(
396
+ LiteSpeed_Cache_Config::ITEM_CACHE_DROP_QS, // Update Drop Query String @since 1.7
397
+ );
398
+ foreach ( $ids as $id ) {
399
+ update_option( $id, ! empty( $this->_input[ $id ] ) ? LiteSpeed_Cache_Utility::sanitize_lines( $this->_input[ $id ] ) : '' ) ;
400
+ }
401
 
402
  }
403
 
645
  LiteSpeed_Cache_Config::OPID_MEDIA_IMG_LAZY,
646
  LiteSpeed_Cache_Config::OPID_MEDIA_IFRAME_LAZY,
647
  LiteSpeed_Cache_Config::OPID_MEDIA_IMG_OPTM_CRON_OFF,
 
648
  LiteSpeed_Cache_Config::OPID_MEDIA_IMG_WEBP_ONLY,
649
  LiteSpeed_Cache_Config::OPID_MEDIA_IMG_EXIF,
650
  LiteSpeed_Cache_Config::OPID_MEDIA_IMG_WEBP_LOSSLESS,
750
  $ids = array(
751
  LiteSpeed_Cache_Config::OPID_USE_HTTP_FOR_HTTPS_VARY,
752
  // LiteSpeed_Cache_Config::OPID_ADV_FAVICON,
753
+ LiteSpeed_Cache_Config::OPID_ADV_INSTANT_CLICK,
754
  ) ;
755
  foreach ( $ids as $id ) {
756
  $this->_options[ $id ] = self::parse_onoff( $this->_input, $id ) ;
841
 
842
  // Filters ignored
843
  $ids = array(
844
+ LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_FILTERS,
845
+ LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_PART_FILTERS,
846
  ) ;
847
  foreach ( $ids as $id ) {
848
+ update_option( $id, ! empty( $this->_input[ $id ] ) ? LiteSpeed_Cache_Utility::sanitize_lines( $this->_input[ $id ] ) : '' ) ;
849
  }
850
  }
851
 
954
  LiteSpeed_Cache_Config::OPID_CACHE_FAVICON,
955
  LiteSpeed_Cache_Config::OPID_CACHE_RES,
956
  LiteSpeed_Cache_Config::OPID_CACHE_BROWSER,
957
+ LiteSpeed_Cache_Config::OPID_MEDIA_IMG_WEBP,
958
  ) ;
959
  foreach ( $ids as $id ) {
960
  $new_options[ $id ] = self::parse_onoff( $this->_input, $id ) ;
admin/litespeed-cache-admin.class.php CHANGED
@@ -23,6 +23,11 @@ class LiteSpeed_Cache_Admin
23
  */
24
  private function __construct()
25
  {
 
 
 
 
 
26
  // Additional litespeed assets on admin display
27
  // Also register menu
28
  $this->display = LiteSpeed_Cache_Admin_Display::get_instance() ;
@@ -36,7 +41,7 @@ class LiteSpeed_Cache_Admin
36
  // initialize admin actions
37
  add_action( 'admin_init', array( $this, 'admin_init' ) ) ;
38
  // add link to plugin list page
39
- add_filter( 'plugin_action_links_' . LSWCP_BASENAME, array( $this->display, 'add_plugin_links' ) ) ;
40
 
41
  if ( defined( 'LITESPEED_ON' ) ) {
42
  // register purge_all actions
@@ -100,6 +105,8 @@ class LiteSpeed_Cache_Admin
100
  return ;
101
  }
102
 
 
 
103
  LiteSpeed_Cache_Control::set_nocache( 'Admin page' ) ;
104
 
105
  if ( LiteSpeed_Cache_Router::esi_enabled() ) {
@@ -145,8 +152,6 @@ class LiteSpeed_Cache_Admin
145
  if ( LiteSpeed_Cache_GUI::has_whm_msg() ) {
146
  $this->display->show_display_installed() ;
147
  }
148
-
149
- do_action( 'litspeed_after_admin_init' ) ;
150
  }
151
 
152
  /**
23
  */
24
  private function __construct()
25
  {
26
+ // Define LSCWP_MU_PLUGIN if is mu-plugins
27
+ if ( defined( 'WPMU_PLUGIN_DIR' ) && dirname( LSCWP_DIR ) == WPMU_PLUGIN_DIR ) {
28
+ define( 'LSCWP_MU_PLUGIN', true ) ;
29
+ }
30
+
31
  // Additional litespeed assets on admin display
32
  // Also register menu
33
  $this->display = LiteSpeed_Cache_Admin_Display::get_instance() ;
41
  // initialize admin actions
42
  add_action( 'admin_init', array( $this, 'admin_init' ) ) ;
43
  // add link to plugin list page
44
+ add_filter( 'plugin_action_links_' . LSCWP_BASENAME, array( $this->display, 'add_plugin_links' ) ) ;
45
 
46
  if ( defined( 'LITESPEED_ON' ) ) {
47
  // register purge_all actions
105
  return ;
106
  }
107
 
108
+ do_action( 'litspeed_after_admin_init' ) ;
109
+
110
  LiteSpeed_Cache_Control::set_nocache( 'Admin page' ) ;
111
 
112
  if ( LiteSpeed_Cache_Router::esi_enabled() ) {
152
  if ( LiteSpeed_Cache_GUI::has_whm_msg() ) {
153
  $this->display->show_display_installed() ;
154
  }
 
 
155
  }
156
 
157
  /**
admin/tpl/crawler.php CHANGED
@@ -7,7 +7,7 @@ $sitemap_time = LiteSpeed_Cache_Crawler::get_instance()->sitemap_time() ;
7
 
8
  $disabled = LiteSpeed_Cache_Router::can_crawl() ? '' : 'disabled' ;
9
 
10
- include_once LSWCP_DIR . "admin/tpl/inc/banner_promo.php" ;
11
  ?>
12
 
13
  <div class="wrap">
@@ -19,7 +19,7 @@ include_once LSWCP_DIR . "admin/tpl/inc/banner_promo.php" ;
19
  </h2>
20
  </div>
21
 
22
- <?php include_once LSWCP_DIR . "admin/tpl/inc/check_cache_disabled.php" ; ?>
23
 
24
  <div class="litespeed-wrap">
25
  <div class="litespeed-body">
7
 
8
  $disabled = LiteSpeed_Cache_Router::can_crawl() ? '' : 'disabled' ;
9
 
10
+ include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
11
  ?>
12
 
13
  <div class="wrap">
19
  </h2>
20
  </div>
21
 
22
+ <?php include_once LSCWP_DIR . "admin/tpl/inc/check_cache_disabled.php" ; ?>
23
 
24
  <div class="litespeed-wrap">
25
  <div class="litespeed-body">
admin/tpl/debug_log.php CHANGED
@@ -15,7 +15,7 @@ if ( ! defined( 'WPINC' ) ) die ;
15
  <div class="wrap">
16
  <?php
17
 
18
- $file = LSWCP_CONTENT_DIR . '/debug.log' ;
19
  $lines = Litespeed_File::count_lines( $file ) ;
20
  $start = $lines > 1000 ? $lines - 1000 : 0 ;
21
  $logs = Litespeed_File::read( $file, $start ) ;
15
  <div class="wrap">
16
  <?php
17
 
18
+ $file = LSCWP_CONTENT_DIR . '/debug.log' ;
19
  $lines = Litespeed_File::count_lines( $file ) ;
20
  $start = $lines > 1000 ? $lines - 1000 : 0 ;
21
  $logs = Litespeed_File::read( $file, $start ) ;
admin/tpl/edit_htaccess.php CHANGED
@@ -14,7 +14,7 @@ if ( defined( 'LITESPEED_ON' ) ) {
14
  if ( $is_dismissed !== self::RULECONFLICT_ON ) {
15
  update_option( self::DISMISS_MSG, self::RULECONFLICT_ON ) ;
16
  }
17
- require_once LSWCP_DIR . 'admin/tpl/inc/show_rule_conflict.php' ;
18
  }
19
  }
20
  // don't dismiss the msg automatically
14
  if ( $is_dismissed !== self::RULECONFLICT_ON ) {
15
  update_option( self::DISMISS_MSG, self::RULECONFLICT_ON ) ;
16
  }
17
+ require_once LSCWP_DIR . 'admin/tpl/inc/show_rule_conflict.php' ;
18
  }
19
  }
20
  // don't dismiss the msg automatically
admin/tpl/image_optimization.php CHANGED
@@ -41,7 +41,7 @@ $_optm_summary_list = array(
41
  ) ;
42
 
43
 
44
- include_once LSWCP_DIR . "admin/tpl/inc/banner_promo.php" ;
45
  ?>
46
 
47
  <div class="wrap">
@@ -53,7 +53,7 @@ include_once LSWCP_DIR . "admin/tpl/inc/banner_promo.php" ;
53
  </h2>
54
  </div>
55
 
56
- <?php include_once LSWCP_DIR . "admin/tpl/inc/check_cache_disabled.php" ; ?>
57
 
58
  <div class="litespeed-wrap">
59
  <div class="litespeed-body">
@@ -93,7 +93,7 @@ include_once LSWCP_DIR . "admin/tpl/inc/banner_promo.php" ;
93
  <?php echo __( 'This will communicate with LiteSpeed\'s Image Optimization Server and retrieve the most recent status.', 'litespeed-cache' ) ; ?>
94
  </span>
95
 
96
- <?php include_once LSWCP_DIR . "admin/tpl/inc/api_key.php" ; ?>
97
 
98
  <h3 class="litespeed-title"><?php echo __('Image Information', 'litespeed-cache') ; ?>
99
  <span class="litespeed-desc"><?php echo __('Beta Version', 'litespeed-cache') ; ?></span>
41
  ) ;
42
 
43
 
44
+ include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
45
  ?>
46
 
47
  <div class="wrap">
53
  </h2>
54
  </div>
55
 
56
+ <?php include_once LSCWP_DIR . "admin/tpl/inc/check_cache_disabled.php" ; ?>
57
 
58
  <div class="litespeed-wrap">
59
  <div class="litespeed-body">
93
  <?php echo __( 'This will communicate with LiteSpeed\'s Image Optimization Server and retrieve the most recent status.', 'litespeed-cache' ) ; ?>
94
  </span>
95
 
96
+ <?php include_once LSCWP_DIR . "admin/tpl/inc/api_key.php" ; ?>
97
 
98
  <h3 class="litespeed-title"><?php echo __('Image Information', 'litespeed-cache') ; ?>
99
  <span class="litespeed-desc"><?php echo __('Beta Version', 'litespeed-cache') ; ?></span>
admin/tpl/import_export.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'WPINC' ) ) die ;
3
+
4
+ $log = get_option( LiteSpeed_Cache_Import::DB_IMPORT_LOG, array() ) ;
5
+ ?>
6
+
7
+ <div class="wrap">
8
+ <h2>
9
+ <?php echo __('LiteSpeed Cache Import / Export', 'litespeed-cache') ; ?>
10
+ <span class="litespeed-desc">
11
+ v<?php echo LiteSpeed_Cache::PLUGIN_VERSION; ?>
12
+ </span>
13
+ </h2>
14
+ </div>
15
+
16
+ <?php include_once LSCWP_DIR . "admin/tpl/inc/check_cache_disabled.php" ; ?>
17
+
18
+ <div class="litespeed-wrap">
19
+ <div class="litespeed-body">
20
+ <h3 class="litespeed-title"><?php echo __('Export Settings', 'litespeed-cache') ; ?></h3>
21
+
22
+ <a href="<?php echo LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_IMPORT, LiteSpeed_Cache_Import::TYPE_EXPORT ) ; ?>" class="litespeed-btn-success">
23
+ <?php echo __( 'Export', 'litespeed-cache' ) ; ?>
24
+ </a>
25
+
26
+ <?php if ( ! empty( $log[ 'export' ] ) ) : ?>
27
+ <div class="litespeed-desc">
28
+ <?php echo __( 'Last exported', 'litespeed-cache' ) ; ?>: <code><?php echo $log[ 'export' ][ 'file' ] ; ?></code> <?php echo LiteSpeed_Cache_Utility::readable_time( $log[ 'export' ][ 'time' ]) ; ?>
29
+ </div>
30
+ <?php endif ; ?>
31
+
32
+ <div class="litespeed-desc">
33
+ <?php echo __( 'This will export all current LiteSpeed Cache settings and save as a file.', 'litespeed-cache' ) ; ?>
34
+ </div>
35
+
36
+ <h3 class="litespeed-title"><?php echo __('Import Settings', 'litespeed-cache') ; ?></h3>
37
+
38
+ <form method="post" action="admin.php?page=lscache-import" id="litespeed_form_import" enctype="multipart/form-data" class="">
39
+ <?php $this->form_action( LiteSpeed_Cache::ACTION_IMPORT, LiteSpeed_Cache_Import::TYPE_IMPORT ) ; ?>
40
+
41
+ <div class="litespeed-div litespeed-left20">
42
+ <input type="file" name="ls_file" class="litespeed-input" />
43
+ </div>
44
+ <div class="litespeed-div">
45
+ <?php submit_button(__('Import', 'litespeed-cache'), 'litespeed-btn-success', 'litespeed-submit') ; ?>
46
+ </div>
47
+ </form>
48
+
49
+ <?php if ( ! empty( $log[ 'import' ] ) ) : ?>
50
+ <div class="litespeed-desc">
51
+ <?php echo __( 'Last imported', 'litespeed-cache' ) ; ?>: <code><?php echo $log[ 'import' ][ 'file' ] ; ?></code> <?php echo LiteSpeed_Cache_Utility::readable_time( $log[ 'import' ][ 'time' ]) ; ?>
52
+ </div>
53
+ <?php endif ; ?>
54
+
55
+ <div class="litespeed-desc">
56
+ <?php echo __( 'This will import settings from a file and override all current LiteSpeed Cache settings.', 'litespeed-cache' ) ; ?>
57
+ </div>
58
+
59
+ </div>
60
+ </div>
admin/tpl/manage.php CHANGED
@@ -12,7 +12,7 @@ if ( ! is_network_admin() ) {
12
  $menu_list[ 'cdn' ] = __( 'CDN', 'litespeed-cache' ) ;
13
  }
14
 
15
- include_once LSWCP_DIR . "admin/tpl/inc/banner_promo.php" ;
16
  ?>
17
 
18
  <div class="wrap">
@@ -42,7 +42,7 @@ include_once LSWCP_DIR . "admin/tpl/inc/banner_promo.php" ;
42
  ?>
43
  </h2>
44
 
45
- <?php include_once LSWCP_DIR . "admin/tpl/inc/check_cache_disabled.php" ; ?>
46
 
47
  <div class="litespeed-body">
48
  <?php
@@ -50,7 +50,7 @@ include_once LSWCP_DIR . "admin/tpl/inc/banner_promo.php" ;
50
  // include all tpl for faster UE
51
  foreach ($menu_list as $tab => $val) {
52
  echo "<div data-litespeed-layout='$tab'>" ;
53
- require LSWCP_DIR . "admin/tpl/manage/manage_$tab.php" ;
54
  echo "</div>" ;
55
  }
56
 
12
  $menu_list[ 'cdn' ] = __( 'CDN', 'litespeed-cache' ) ;
13
  }
14
 
15
+ include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
16
  ?>
17
 
18
  <div class="wrap">
42
  ?>
43
  </h2>
44
 
45
+ <?php include_once LSCWP_DIR . "admin/tpl/inc/check_cache_disabled.php" ; ?>
46
 
47
  <div class="litespeed-body">
48
  <?php
50
  // include all tpl for faster UE
51
  foreach ($menu_list as $tab => $val) {
52
  echo "<div data-litespeed-layout='$tab'>" ;
53
+ require LSCWP_DIR . "admin/tpl/manage/manage_$tab.php" ;
54
  echo "</div>" ;
55
  }
56
 
admin/tpl/manage/manage_purge.php CHANGED
@@ -56,6 +56,26 @@ $_panels = array(
56
  ),
57
  ) ;
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  if ( ! is_multisite() || is_network_admin() ) {
60
  $_panels[] = array(
61
  'title' => __( 'Empty Entire Cache', 'litespeed-cache' ),
@@ -64,6 +84,7 @@ if ( ! is_multisite() || is_network_admin() ) {
64
  'tag' => LiteSpeed_Cache::ACTION_PURGE_EMPTYCACHE,
65
  'icon' => 'empty-cache',
66
  'title_cls' => 'litespeed-danger',
 
67
  'cfm' => esc_html( __( 'This will clear EVERYTHING inside the cache.', 'litespeed-cache' ) ) . ' ' .
68
  esc_html( __( 'This may cause heavy load on the server.', 'litespeed-cache' ) ) . ' ' .
69
  esc_html( __( 'If only the WordPress site should be purged, use purge all.', 'litespeed-cache' ) )
@@ -78,6 +99,10 @@ if ( ! is_multisite() || is_network_admin() ) {
78
 
79
  <?php foreach ( $_panels as $v ): ?>
80
 
 
 
 
 
81
  <a class="litespeed-panel"
82
  href="<?php echo LiteSpeed_Cache_Utility::build_url( $v[ 'tag' ], ! empty( $v[ 'append_url' ] ) ? $v[ 'append_url' ] : false ) ; ?>"
83
  <?php if ( ! empty( $v[ 'cfm' ] ) ) echo 'data-litespeed-cfm="' . $v[ 'cfm' ] . '"' ; ?>
56
  ),
57
  ) ;
58
 
59
+ if ( defined( 'LSCWP_OBJECT_CACHE' ) ) {
60
+ $_panels[] = array(
61
+ 'title' => __( 'Object Cache Purge All', 'litespeed-cache' ),
62
+ 'desc' => __( 'Purge all the object caches', 'litespeed-cache' ),
63
+ 'tag' => LiteSpeed_Cache::ACTION_PURGE,
64
+ 'icon' => 'purge-object',
65
+ 'append_url' => LiteSpeed_Cache_Purge::TYPE_OBJECT_PURGE_ALL,
66
+ ) ;
67
+ }
68
+
69
+ if ( LiteSpeed_Cache_Router::opcache_enabled() ) {
70
+ $_panels[] = array(
71
+ 'title' => __( 'Opcode Cache Purge All', 'litespeed-cache' ),
72
+ 'desc' => __( 'Reset the entire opcode cache', 'litespeed-cache' ),
73
+ 'tag' => LiteSpeed_Cache::ACTION_PURGE,
74
+ 'icon' => 'purge-opcache',
75
+ 'append_url' => LiteSpeed_Cache_Purge::TYPE_OPCACHE_PURGE_ALL,
76
+ ) ;
77
+ }
78
+
79
  if ( ! is_multisite() || is_network_admin() ) {
80
  $_panels[] = array(
81
  'title' => __( 'Empty Entire Cache', 'litespeed-cache' ),
84
  'tag' => LiteSpeed_Cache::ACTION_PURGE_EMPTYCACHE,
85
  'icon' => 'empty-cache',
86
  'title_cls' => 'litespeed-danger',
87
+ 'newline' => true,
88
  'cfm' => esc_html( __( 'This will clear EVERYTHING inside the cache.', 'litespeed-cache' ) ) . ' ' .
89
  esc_html( __( 'This may cause heavy load on the server.', 'litespeed-cache' ) ) . ' ' .
90
  esc_html( __( 'If only the WordPress site should be purged, use purge all.', 'litespeed-cache' ) )
99
 
100
  <?php foreach ( $_panels as $v ): ?>
101
 
102
+ <?php if ( ! empty( $v[ 'newline' ] ) ) : ?>
103
+ <div class='litespeed-child-col-br'></div>
104
+ <?php endif; ?>
105
+
106
  <a class="litespeed-panel"
107
  href="<?php echo LiteSpeed_Cache_Utility::build_url( $v[ 'tag' ], ! empty( $v[ 'append_url' ] ) ? $v[ 'append_url' ] : false ) ; ?>"
108
  <?php if ( ! empty( $v[ 'cfm' ] ) ) echo 'data-litespeed-cfm="' . $v[ 'cfm' ] . '"' ; ?>
admin/tpl/network_settings.php CHANGED
@@ -6,13 +6,15 @@ $menuArr = array(
6
  'cache' => __('Cache', 'litespeed-cache'),
7
  'purge' => __('Purge', 'litespeed-cache'),
8
  'excludes' => __('Excludes', 'litespeed-cache'),
9
- 'advanced' => __('Advanced', 'litespeed-cache'),
10
  'media' => __('Media', 'litespeed-cache'),
 
11
  );
12
 
13
  global $_options;
14
  $_options = LiteSpeed_Cache_Config::get_instance()->get_site_options();
15
 
 
 
16
  ?>
17
 
18
  <div class="wrap">
@@ -42,11 +44,7 @@ $_options = LiteSpeed_Cache_Config::get_instance()->get_site_options();
42
  // include all tpl for faster UE
43
  foreach ($menuArr as $tab => $val) {
44
  echo "<div data-litespeed-layout='$tab'>";
45
- if($tab == 'advanced') {
46
- require LSWCP_DIR . 'admin/tpl/setting/settings_advanced.php';
47
- }else{
48
- require LSWCP_DIR . "admin/tpl/setting/network_settings_$tab.php";
49
- }
50
  echo "</div>";
51
  }
52
 
6
  'cache' => __('Cache', 'litespeed-cache'),
7
  'purge' => __('Purge', 'litespeed-cache'),
8
  'excludes' => __('Excludes', 'litespeed-cache'),
 
9
  'media' => __('Media', 'litespeed-cache'),
10
+ 'advanced' => __('Advanced', 'litespeed-cache'),
11
  );
12
 
13
  global $_options;
14
  $_options = LiteSpeed_Cache_Config::get_instance()->get_site_options();
15
 
16
+ $_hide_in_basic_mode = '' ;
17
+
18
  ?>
19
 
20
  <div class="wrap">
44
  // include all tpl for faster UE
45
  foreach ($menuArr as $tab => $val) {
46
  echo "<div data-litespeed-layout='$tab'>";
47
+ require LSCWP_DIR . "admin/tpl/setting/network_settings_$tab.php" ;
 
 
 
 
48
  echo "</div>";
49
  }
50
 
admin/tpl/report.php CHANGED
@@ -31,7 +31,7 @@ $env_ref = $_report->get_env_ref() ;
31
  <?php echo __( 'Send this report to LiteSpeed. Refer to this report number when posting in the WordPress support forum.', 'litespeed-cache' ) ; ?>
32
  </span>
33
 
34
- <?php include_once LSWCP_DIR . "admin/tpl/inc/api_key.php" ; ?>
35
 
36
  <h3 class="litespeed-title"><?php echo __('Report Summary', 'litespeed-cache') ; ?></h3>
37
  <div class="litespeed-desc">
31
  <?php echo __( 'Send this report to LiteSpeed. Refer to this report number when posting in the WordPress support forum.', 'litespeed-cache' ) ; ?>
32
  </span>
33
 
34
+ <?php include_once LSCWP_DIR . "admin/tpl/inc/api_key.php" ; ?>
35
 
36
  <h3 class="litespeed-title"><?php echo __('Report Summary', 'litespeed-cache') ; ?></h3>
37
  <div class="litespeed-desc">
admin/tpl/setting/network_settings_advanced.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'WPINC' ) ) die ;
3
+ ?>
4
+ <h3 class="litespeed-title"><?php echo __( 'Advanced Network', 'litespeed-cache' ) ; ?></h3>
5
+
6
+ <table><tbody>
7
+
8
+ <?php require LSCWP_DIR . 'admin/tpl/setting/settings_inc.check_adv_file.php' ; ?>
9
+ <?php require LSCWP_DIR . 'admin/tpl/setting/settings_inc.login_cookie.php' ; ?>
10
+
11
+ </tbody></table>
admin/tpl/setting/network_settings_cache.php CHANGED
@@ -10,10 +10,11 @@ if ( ! defined( 'WPINC' ) ) die ;
10
 
11
  <table><tbody>
12
 
13
- <?php require LSWCP_DIR . 'admin/tpl/setting/settings_inc.cache_favicon.php' ; ?>
14
- <?php require LSWCP_DIR . 'admin/tpl/setting/settings_inc.cache_resources.php' ; ?>
15
- <?php require LSWCP_DIR . 'admin/tpl/setting/settings_inc.cache_mobile.php' ; ?>
16
- <?php require LSWCP_DIR . 'admin/tpl/setting/settings_inc.cache_browser.php' ; ?>
 
17
 
18
  </tbody></table>
19
 
10
 
11
  <table><tbody>
12
 
13
+ <?php require LSCWP_DIR . 'admin/tpl/setting/settings_inc.cache_favicon.php' ; ?>
14
+ <?php require LSCWP_DIR . 'admin/tpl/setting/settings_inc.cache_resources.php' ; ?>
15
+ <?php require LSCWP_DIR . 'admin/tpl/setting/settings_inc.cache_mobile.php' ; ?>
16
+ <?php require LSCWP_DIR . 'admin/tpl/setting/settings_inc.cache_object.php' ; ?>
17
+ <?php require LSCWP_DIR . 'admin/tpl/setting/settings_inc.cache_browser.php' ; ?>
18
 
19
  </tbody></table>
20
 
admin/tpl/setting/network_settings_excludes.php CHANGED
@@ -7,9 +7,9 @@ if (!defined('WPINC')) die;
7
  <table><tbody>
8
 
9
  <!-- User Agent List -->
10
- <?php require LSWCP_DIR . 'admin/tpl/setting/settings_inc.exclude_useragent.php'; ?>
11
 
12
  <!-- Cookie List -->
13
- <?php require LSWCP_DIR . 'admin/tpl/setting/settings_inc.exclude_cookies.php'; ?>
14
 
15
  </tbody></table>
7
  <table><tbody>
8
 
9
  <!-- User Agent List -->
10
+ <?php require LSCWP_DIR . 'admin/tpl/setting/settings_inc.exclude_useragent.php'; ?>
11
 
12
  <!-- Cookie List -->
13
+ <?php require LSCWP_DIR . 'admin/tpl/setting/settings_inc.exclude_cookies.php'; ?>
14
 
15
  </tbody></table>
admin/tpl/setting/network_settings_media.php CHANGED
@@ -5,6 +5,6 @@ if ( ! defined( 'WPINC' ) ) die ;
5
 
6
  <table><tbody>
7
 
8
- <?php require LSWCP_DIR . 'admin/tpl/setting/settings_inc.media_webp.php' ; ?>
9
 
10
  </tbody></table>
5
 
6
  <table><tbody>
7
 
8
+ <?php require LSCWP_DIR . 'admin/tpl/setting/settings_inc.media_webp.php' ; ?>
9
 
10
  </tbody></table>
admin/tpl/setting/network_settings_purge.php CHANGED
@@ -5,6 +5,6 @@ if ( ! defined( 'WPINC' ) ) die ;
5
 
6
  <table><tbody>
7
 
8
- <?php require LSWCP_DIR . 'admin/tpl/setting/settings_inc.purge_on_upgrade.php' ; ?>
9
 
10
  </tbody></table>
5
 
6
  <table><tbody>
7
 
8
+ <?php require LSCWP_DIR . 'admin/tpl/setting/settings_inc.purge_on_upgrade.php' ; ?>
9
 
10
  </tbody></table>
admin/tpl/setting/settings_advanced.php CHANGED
@@ -4,7 +4,11 @@ if (!defined('WPINC')) die;
4
  // $current_favicon = get_option( LiteSpeed_Cache_Config::ITEM_FAVICON, array() ) ;
5
 
6
  ?>
7
- <h3 class="litespeed-title"><?php echo __( 'Advanced', 'litespeed-cache' ) ; ?></h3>
 
 
 
 
8
 
9
  <div class="litespeed-callout-danger">
10
  <h4><?php echo __('NOTICE:', 'litespeed-cache'); ?></h4>
@@ -12,88 +16,36 @@ if (!defined('WPINC')) die;
12
  </div>
13
 
14
  <table><tbody>
15
- <tr>
16
- <th><?php echo __( 'Check Advanced Cache', 'litespeed-cache' ) ; ?></th>
17
- <td>
18
- <?php
19
- $id = LiteSpeed_Cache_Config::OPID_CHECK_ADVANCEDCACHE;
20
- $this->build_checkbox($id, __('Include advanced-cache.php', 'litespeed-cache'), $_options[$id]);
21
- ?>
22
- <div class="litespeed-desc">
23
- <?php echo __('The advanced-cache.php file is used by many caching plugins to signal that a cache is active.', 'litespeed-cache'); ?>
24
- <?php echo __('When this option is checked and this file is detected as belonging to another plugin, LiteSpeed Cache will not cache.', 'litespeed-cache'); ?>
25
- </div>
26
- <p>
27
- <i><?php echo __('Uncheck this option only if the other plugin is used for non-caching purposes, such as minifying css/js files.', 'litespeed-cache'); ?></i>
28
- </p>
29
-
30
- </td>
31
- </tr>
32
 
33
  <tr>
34
- <th><?php echo __( 'Login Cookie', 'litespeed-cache' ) ; ?></th>
35
  <td>
36
- <?php
37
- $id = LiteSpeed_Cache_Config::OPID_LOGIN_COOKIE;
38
- $this->build_input( $id ) ;
39
-
40
- echo '<p>' . __('SYNTAX: alphanumeric and "_".', 'litespeed-cache')
41
- . ' ' . __('No spaces and case sensitive.', 'litespeed-cache')
42
- . ' ' . __('MUST BE UNIQUE FROM OTHER WEB APPLICATIONS.', 'litespeed-cache')
43
- . '</p>'
44
- . '<p>'
45
- . sprintf(__('The default login cookie is %s.', 'litespeed-cache'), '_lscache_vary')
46
- . ' ' . __('The server will determine if the user is logged in based on the existance of this cookie.', 'litespeed-cache')
47
- . ' ' . __('This setting is useful for those that have multiple web applications for the same domain.', 'litespeed-cache')
48
- . ' ' . __('If every web application uses the same cookie, the server may confuse whether a user is logged in or not.', 'litespeed-cache')
49
- . ' ' . __('The cookie set here will be used for this WordPress installation.', 'litespeed-cache')
50
- . '</p>'
51
- . '<p>'
52
- . __('Example use case:', 'litespeed-cache')
53
- . '<br />'
54
- . sprintf(__('There is a WordPress installed for %s.', 'litespeed-cache'), '<u>www.example.com</u>')
55
- . '<br />'
56
- . sprintf(__('Then another WordPress is installed (NOT MULTISITE) at %s', 'litespeed-cache'), '<u>www.example.com/blog/</u>')
57
- . ' ' . __('The cache needs to distinguish who is logged into which WordPress site in order to cache correctly.', 'litespeed-cache')
58
- . '</p>';
59
-
60
- $cookie_rule = LiteSpeed_Cache_Admin_Rules::get_instance()->get_rewrite_rule_login_cookie();
61
- if ( $cookie_rule && substr($cookie_rule, 0, 11) !== 'Cache-Vary:' ){
62
- echo '<div class="litespeed-callout-danger">'
63
- . sprintf(__('Error: invalid login cookie. Please check the %s file', 'litespeed-cache'), '.htaccess')
64
- . '</div>';
65
- }
66
-
67
- if ( defined( 'LITESPEED_ON' ) && $_options[$id] ){
68
-
69
- if (!$cookie_rule){
70
- echo '<div class="litespeed-callout-danger">'
71
- . sprintf(__('Error getting current rules from %s: %s', 'litespeed-cache'), '.htaccess', LiteSpeed_Cache_Admin_Rules::MARKER_LOGIN_COOKIE)
72
- . '</div>';
73
- }
74
- else{
75
- $cookie_rule = substr($cookie_rule, 11);
76
- $cookie_arr = explode(',', $cookie_rule);
77
- if(!in_array($_options[$id], $cookie_arr)) {
78
- echo '<div class="litespeed-callout-warning">' .
79
- __( 'WARNING: The .htaccess login cookie and Database login cookie do not match.', 'litespeed-cache' ) .
80
- '</div>';
81
- }
82
- }
83
-
84
- }
85
 
86
- ?>
87
  </td>
88
  </tr>
89
 
90
  <tr>
91
- <th><?php echo __( 'Improve HTTP/HTTPS Compatibility', 'litespeed-cache' ) ; ?></th>
92
  <td>
93
- <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_USE_HTTP_FOR_HTTPS_VARY ) ; ?>
94
  <div class="litespeed-desc">
95
- <?php echo __( 'Enable this option if you are using both HTTP and HTTPS in the same domain and are noticing cache irregularities.', 'litespeed-cache' ) ; ?>
96
- <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>
 
 
 
 
97
 
98
  </div>
99
  </td>
4
  // $current_favicon = get_option( LiteSpeed_Cache_Config::ITEM_FAVICON, array() ) ;
5
 
6
  ?>
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">
14
  <h4><?php echo __('NOTICE:', 'litespeed-cache'); ?></h4>
16
  </div>
17
 
18
  <table><tbody>
19
+ <?php
20
+ if ( ! is_multisite() ) :
21
+ require LSCWP_DIR . 'admin/tpl/setting/settings_inc.check_adv_file.php' ;
22
+ require LSCWP_DIR . 'admin/tpl/setting/settings_inc.login_cookie.php' ;
23
+ endif ;
24
+ ?>
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  <tr>
27
+ <th><?php echo __( 'Improve HTTP/HTTPS Compatibility', 'litespeed-cache' ) ; ?></th>
28
  <td>
29
+ <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_USE_HTTP_FOR_HTTPS_VARY ) ; ?>
30
+ <div class="litespeed-desc">
31
+ <?php echo __( 'Enable this option if you are using both HTTP and HTTPS in the same domain and are noticing cache irregularities.', 'litespeed-cache' ) ; ?>
32
+ <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>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
+ </div>
35
  </td>
36
  </tr>
37
 
38
  <tr>
39
+ <th><?php echo __( 'Instant Click', 'litespeed-cache' ) ; ?></th>
40
  <td>
41
+ <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_ADV_INSTANT_CLICK ) ; ?>
42
  <div class="litespeed-desc">
43
+ <?php echo __( 'When a vistor hovers over a page link, preload that page. This will speed up the visit to that link.', 'litespeed-cache' ) ; ?>
44
+ <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>
45
+ <br /><font class="litespeed-danger">
46
+ <?php echo __('NOTE:', 'litespeed-cache'); ?>
47
+ <?php echo __('This will generate extra requests to the server, which will increase server load.', 'litespeed-cache'); ?>
48
+ </font>
49
 
50
  </div>
51
  </td>
admin/tpl/setting/settings_cache.php CHANGED
@@ -1,7 +1,11 @@
1
  <?php
2
  if ( ! defined( 'WPINC' ) ) die ;
3
  ?>
4
- <h3 class="litespeed-title"><?php echo __( 'Cache Control Settings', 'litespeed-cache' ) ; ?></h3>
 
 
 
 
5
 
6
  <table><tbody>
7
  <tr>
@@ -46,13 +50,13 @@ if ( ! defined( 'WPINC' ) ) die ;
46
 
47
  <?php
48
  if ( ! is_multisite() ) :
49
- require LSWCP_DIR . 'admin/tpl/setting/settings_inc.cache_favicon.php' ;
50
- require LSWCP_DIR . 'admin/tpl/setting/settings_inc.cache_resources.php' ;
51
- require LSWCP_DIR . 'admin/tpl/setting/settings_inc.cache_mobile.php' ;
52
  endif ;
53
  ?>
54
 
55
- <tr>
56
  <th><?php echo __( 'Private Cached URIs', 'litespeed-cache' ) ; ?></th>
57
  <td>
58
  <?php $this->build_textarea(LiteSpeed_Cache_Config::OPID_CACHE_URI_PRIV); ?>
@@ -72,11 +76,12 @@ if ( ! defined( 'WPINC' ) ) die ;
72
 
73
  <?php
74
  if ( ! is_multisite() ) :
75
- require LSWCP_DIR . 'admin/tpl/setting/settings_inc.cache_browser.php' ;
 
76
  endif ;
77
  ?>
78
 
79
- <tr>
80
  <th><?php echo __( 'Drop Query String', 'litespeed-cache' ) ; ?></th>
81
  <td>
82
  <?php $this->build_textarea2( LiteSpeed_Cache_Config::ITEM_CACHE_DROP_QS, 40 ) ; ?>
1
  <?php
2
  if ( ! defined( 'WPINC' ) ) die ;
3
  ?>
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
  <table><tbody>
11
  <tr>
50
 
51
  <?php
52
  if ( ! is_multisite() ) :
53
+ require LSCWP_DIR . 'admin/tpl/setting/settings_inc.cache_favicon.php' ;
54
+ require LSCWP_DIR . 'admin/tpl/setting/settings_inc.cache_resources.php' ;
55
+ require LSCWP_DIR . 'admin/tpl/setting/settings_inc.cache_mobile.php' ;
56
  endif ;
57
  ?>
58
 
59
+ <tr <?php echo $_hide_in_basic_mode ; ?>>
60
  <th><?php echo __( 'Private Cached URIs', 'litespeed-cache' ) ; ?></th>
61
  <td>
62
  <?php $this->build_textarea(LiteSpeed_Cache_Config::OPID_CACHE_URI_PRIV); ?>
76
 
77
  <?php
78
  if ( ! is_multisite() ) :
79
+ require LSCWP_DIR . 'admin/tpl/setting/settings_inc.cache_object.php' ;
80
+ require LSCWP_DIR . 'admin/tpl/setting/settings_inc.cache_browser.php' ;
81
  endif ;
82
  ?>
83
 
84
+ <tr <?php echo $_hide_in_basic_mode ; ?>>
85
  <th><?php echo __( 'Drop Query String', 'litespeed-cache' ) ; ?></th>
86
  <td>
87
  <?php $this->build_textarea2( LiteSpeed_Cache_Config::ITEM_CACHE_DROP_QS, 40 ) ; ?>
admin/tpl/setting/settings_cdn.php CHANGED
@@ -20,7 +20,10 @@ if ( ! $cdn_mapping ) {
20
 
21
  ?>
22
 
23
- <h3 class="litespeed-title"><?php echo __( 'CDN Settings', 'litespeed-cache' ) ; ?></h3>
 
 
 
24
 
25
  <table><tbody>
26
  <tr>
20
 
21
  ?>
22
 
23
+ <h3 class="litespeed-title-short">
24
+ <?php echo __('CDN Settings', 'litespeed-cache'); ?>
25
+ <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>
26
+ </h3>
27
 
28
  <table><tbody>
29
  <tr>
admin/tpl/setting/settings_crawler.php CHANGED
@@ -3,7 +3,10 @@ if ( !defined('WPINC') ) die;
3
 
4
  ?>
5
 
6
- <h3 class="litespeed-title"><?php echo __('Crawler Settings', 'litespeed-cache'); ?></h3>
 
 
 
7
 
8
  <table><tbody>
9
  <tr>
@@ -13,7 +16,19 @@ if ( !defined('WPINC') ) die;
13
  <?php $this->build_input($id); ?> <?php echo __('microseconds', 'litespeed-cache'); ?>
14
  <div class="litespeed-desc">
15
  <?php echo __('Specify time in microseconds for the delay between requests during a crawl.', 'litespeed-cache'); ?>
16
- <?php $this->recommended($id) ; ?>
 
 
 
 
 
 
 
 
 
 
 
 
17
  </div>
18
  </td>
19
  </tr>
@@ -74,7 +89,24 @@ if ( !defined('WPINC') ) die;
74
  <div class="litespeed-desc">
75
  <?php echo __( 'The maximum average server load allowed while crawling. The number of crawler threads in use will be actively reduced until average server load falls under this limit. If this cannot be achieved with a single thread, the current crawler run will be terminated.', 'litespeed-cache' ) ;
76
  ?>
77
- <?php $this->recommended($id) ; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  </div>
79
  </td>
80
  </tr>
3
 
4
  ?>
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>
12
  <tr>
16
  <?php $this->build_input($id); ?> <?php echo __('microseconds', 'litespeed-cache'); ?>
17
  <div class="litespeed-desc">
18
  <?php echo __('Specify time in microseconds for the delay between requests during a crawl.', 'litespeed-cache'); ?>
19
+
20
+ <?php if ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] ) ) : ?>
21
+ <font class="litespeed-warning">
22
+ <?php echo __('NOTE', 'litespeed-cache'); ?>:
23
+ <?php echo __( 'Server allowed min value', 'litespeed-cache') ; ?>: <code><?php echo $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] ; ?></code>
24
+ </font>
25
+ <?php else : ?>
26
+ <?php $this->recommended($id) ; ?>
27
+ <?php endif ; ?>
28
+
29
+
30
+ <br />
31
+ <?php $this->_api_env_var( LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ) ; ?>
32
  </div>
33
  </td>
34
  </tr>
89
  <div class="litespeed-desc">
90
  <?php echo __( 'The maximum average server load allowed while crawling. The number of crawler threads in use will be actively reduced until average server load falls under this limit. If this cannot be achieved with a single thread, the current crawler run will be terminated.', 'litespeed-cache' ) ;
91
  ?>
92
+
93
+ <?php if ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ) ) : ?>
94
+ <font class="litespeed-warning">
95
+ <?php echo __('NOTE', 'litespeed-cache'); ?>:
96
+ <?php echo __( 'Server enforced value', 'litespeed-cache') ; ?>: <code><?php echo $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ; ?></code>
97
+ </font>
98
+ <?php elseif ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT ] ) ) : ?>
99
+ <font class="litespeed-warning">
100
+ <?php echo __('NOTE', 'litespeed-cache'); ?>:
101
+ <?php echo __( 'Server allowed max value', 'litespeed-cache') ; ?>: <code><?php echo $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT ] ; ?></code>
102
+ </font>
103
+ <?php else : ?>
104
+ <?php $this->recommended($id) ; ?>
105
+
106
+ <?php endif ; ?>
107
+
108
+ <br />
109
+ <?php $this->_api_env_var( LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT, LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ) ; ?>
110
  </div>
111
  </td>
112
  </tr>
admin/tpl/setting/settings_debug.php CHANGED
@@ -3,7 +3,10 @@ if ( ! defined( 'WPINC' ) ) die ;
3
 
4
  ?>
5
 
6
- <h3 class="litespeed-title"><?php echo __( 'Developer Testing', 'litespeed-cache' ) ; ?></h3>
 
 
 
7
 
8
  <table><tbody>
9
  <tr>
@@ -126,9 +129,10 @@ if ( ! defined( 'WPINC' ) ) die ;
126
  <tr>
127
  <th><?php echo __( 'Exclude Filters', 'litespeed-cache' ) ; ?></th>
128
  <td>
129
- <?php $this->build_textarea( LiteSpeed_Cache_Config::OPID_LOG_IGNORE_FILTERS, 30 ) ; ?>
130
  <div class="litespeed-desc">
131
- <?php echo __( 'Listed filters (one per line) will not be logged.', 'litespeed-cache' ) ; ?><br />
 
132
  </div>
133
  </td>
134
  </tr>
@@ -136,9 +140,10 @@ if ( ! defined( 'WPINC' ) ) die ;
136
  <tr>
137
  <th><?php echo __( 'Exclude Part Filters', 'litespeed-cache' ) ; ?></th>
138
  <td>
139
- <?php $this->build_textarea( LiteSpeed_Cache_Config::OPID_LOG_IGNORE_PART_FILTERS, 30 ) ; ?>
140
  <div class="litespeed-desc">
141
- <?php echo __( 'Filters containing these strings (one per line) will not be logged.', 'litespeed-cache' ) ; ?><br />
 
142
  </div>
143
  </td>
144
  </tr>
3
 
4
  ?>
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>
12
  <tr>
129
  <tr>
130
  <th><?php echo __( 'Exclude Filters', 'litespeed-cache' ) ; ?></th>
131
  <td>
132
+ <?php $this->build_textarea2( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_FILTERS, 30 ) ; ?>
133
  <div class="litespeed-desc">
134
+ <?php echo __( 'Listed filters (one per line) will not be logged.', 'litespeed-cache' ) ; ?>
135
+ <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>
136
  </div>
137
  </td>
138
  </tr>
140
  <tr>
141
  <th><?php echo __( 'Exclude Part Filters', 'litespeed-cache' ) ; ?></th>
142
  <td>
143
+ <?php $this->build_textarea2( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_PART_FILTERS, 30 ) ; ?>
144
  <div class="litespeed-desc">
145
+ <?php echo __( 'Filters containing these strings (one per line) will not be logged.', 'litespeed-cache' ) ; ?>
146
+ <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>
147
  </div>
148
  </td>
149
  </tr>
admin/tpl/setting/settings_excludes.php CHANGED
@@ -1,8 +1,11 @@
1
  <?php
2
  if ( ! defined( 'WPINC' ) ) die ;
3
  ?>
4
- <h3 class="litespeed-title"><?php echo __( 'Do Not Cache Settings', 'litespeed-cache' ) ; ?></h3>
5
 
 
 
 
 
6
  <table><tbody>
7
  <tr>
8
  <th><?php echo __( 'Do Not Cache URIs', 'litespeed-cache' ) ; ?></th>
@@ -108,10 +111,10 @@ if ( ! defined( 'WPINC' ) ) die ;
108
  <?php
109
  if ( ! is_multisite() ) :
110
  // Cookie
111
- require LSWCP_DIR . 'admin/tpl/setting/settings_inc.exclude_cookies.php' ;
112
 
113
  // User Agent
114
- require LSWCP_DIR . 'admin/tpl/setting/settings_inc.exclude_useragent.php' ;
115
 
116
  endif ;
117
  ?>
1
  <?php
2
  if ( ! defined( 'WPINC' ) ) die ;
3
  ?>
 
4
 
5
+ <h3 class="litespeed-title-short">
6
+ <?php echo __('Do Not Cache Settings', 'litespeed-cache'); ?>
7
+ <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:configuration:excludes" target="_blank" class="litespeed-learn-more"><?php echo __('Learn More', 'litespeed-cache') ; ?></a>
8
+ </h3>
9
  <table><tbody>
10
  <tr>
11
  <th><?php echo __( 'Do Not Cache URIs', 'litespeed-cache' ) ; ?></th>
111
  <?php
112
  if ( ! is_multisite() ) :
113
  // Cookie
114
+ require LSCWP_DIR . 'admin/tpl/setting/settings_inc.exclude_cookies.php' ;
115
 
116
  // User Agent
117
+ require LSCWP_DIR . 'admin/tpl/setting/settings_inc.exclude_useragent.php' ;
118
 
119
  endif ;
120
  ?>
admin/tpl/setting/settings_general.php CHANGED
@@ -2,7 +2,11 @@
2
  if (!defined('WPINC')) die;
3
 
4
  ?>
5
- <h3 class="litespeed-title"><?php echo __('General', 'litespeed-cache'); ?></h3>
 
 
 
 
6
 
7
  <table><tbody>
8
  <tr>
2
  if (!defined('WPINC')) die;
3
 
4
  ?>
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
  <table><tbody>
12
  <tr>
admin/tpl/setting/settings_inc.cache_browser.php CHANGED
@@ -2,7 +2,7 @@
2
  if ( ! defined( 'WPINC' ) ) die ;
3
 
4
  ?>
5
- <tr>
6
  <th><?php echo __( 'Browser Cache', 'litespeed-cache' ) ; ?></th>
7
  <td>
8
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_CACHE_BROWSER ) ; ?>
@@ -17,7 +17,7 @@ if ( ! defined( 'WPINC' ) ) die ;
17
  </td>
18
  </tr>
19
 
20
- <tr>
21
  <th><?php echo __( 'Browser Cache TTL', 'litespeed-cache' ) ; ?></th>
22
  <td>
23
  <?php $id = LiteSpeed_Cache_Config::OPID_CACHE_BROWSER_TTL ; ?>
2
  if ( ! defined( 'WPINC' ) ) die ;
3
 
4
  ?>
5
+ <tr <?php echo $_hide_in_basic_mode ; ?>>
6
  <th><?php echo __( 'Browser Cache', 'litespeed-cache' ) ; ?></th>
7
  <td>
8
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_CACHE_BROWSER ) ; ?>
17
  </td>
18
  </tr>
19
 
20
+ <tr <?php echo $_hide_in_basic_mode ; ?>>
21
  <th><?php echo __( 'Browser Cache TTL', 'litespeed-cache' ) ; ?></th>
22
  <td>
23
  <?php $id = LiteSpeed_Cache_Config::OPID_CACHE_BROWSER_TTL ; ?>
admin/tpl/setting/settings_inc.cache_mobile.php CHANGED
@@ -21,7 +21,7 @@ if (!defined('WPINC')) die;
21
  </td>
22
  </tr>
23
 
24
- <tr>
25
  <th><?php echo __('List of Mobile User Agents', 'litespeed-cache'); ?></th>
26
  <td>
27
  <?php
@@ -62,6 +62,10 @@ if (!defined('WPINC')) die;
62
  </i>
63
  <br />
64
  <?php echo sprintf( __( 'The default list WordPress uses is %s', 'litespeed-cache' ), "<code>$wp_default_mobile</code>" ) ; ?>
 
 
 
 
65
  </div>
66
  </td>
67
  </tr>
21
  </td>
22
  </tr>
23
 
24
+ <tr <?php echo $_hide_in_basic_mode ; ?>>
25
  <th><?php echo __('List of Mobile User Agents', 'litespeed-cache'); ?></th>
26
  <td>
27
  <?php
62
  </i>
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>
70
  </td>
71
  </tr>
admin/tpl/setting/settings_inc.cache_object.php ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'WPINC' ) ) die ;
3
+
4
+ $lang_enabled = '<font class="litespeed-success">' . __( 'Enabled', 'litespeed-cache' ) . '</font>' ;
5
+ $lang_disabled = '<font class="litespeed-warning">' . __( 'Disabled', 'litespeed-cache' ) . '</font>' ;
6
+
7
+ $mem_enabled = class_exists( 'Memcached' ) ? $lang_enabled : $lang_disabled ;
8
+ $redis_enabled = class_exists( 'Redis' ) ? $lang_enabled : $lang_disabled ;
9
+
10
+ $mem_conn = LiteSpeed_Cache_Object::get_instance()->test_connection() ;
11
+ if ( $mem_conn === null ) {
12
+ $mem_conn_desc = '<font class="litespeed-desc">' . __( 'Not Available', 'litespeed-cache' ) . '</font>' ;
13
+ }
14
+ elseif ( $mem_conn ) {
15
+ $mem_conn_desc = '<font class="litespeed-success">' . __( 'Passed', 'litespeed-cache' ) . '</font>' ;
16
+ }
17
+ else {
18
+ $mem_conn_desc = '<font class="litespeed-warning">' . __( 'Failed', 'litespeed-cache' ) . '</font>' ;
19
+ }
20
+
21
+ $hide_mem_options = ! LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_KIND ) ? '' : ' litespeed-hide' ;
22
+ $hide_redis_options = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_KIND ) ? '' : ' litespeed-hide' ;
23
+
24
+ ?>
25
+
26
+
27
+ <tr <?php echo $_hide_in_basic_mode ; ?>>
28
+ <th><?php echo __( 'Object Cache', 'litespeed-cache' ) ; ?></th>
29
+ <td>
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-cdn-mapping-block">
36
+ <div class='litespeed-child-col-auto'>
37
+ <h4><?php echo __( 'Method', 'litespeed-cache' ) ; ?></h4>
38
+
39
+ <div class="litespeed-switch">
40
+ <?php echo $this->build_radio( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_KIND, LiteSpeed_Cache_Config::VAL_OFF, 'Memcached', null, 'litespeed-oc-mem' ) ; ?>
41
+ <?php echo $this->build_radio( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_KIND, LiteSpeed_Cache_Config::VAL_ON, 'Redis', null, 'litespeed-oc-redis' ) ; ?>
42
+ </div>
43
+ </div>
44
+
45
+ <div class='litespeed-child-col-auto'>
46
+ <h4><?php echo __( 'Host', 'litespeed-cache' ) ; ?></h4>
47
+
48
+ <?php $this->build_input( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_HOST ) ; ?>
49
+ <div class="litespeed-desc">
50
+ <?php echo sprintf( __( 'Your %s Hostname or IP address.', 'litespeed-cache' ), 'Memcached/<a href="https://www.litespeedtech.com/open-source/litespeed-memcached" target="_blank">LSMCD</a>/Redis' ) ; ?>
51
+ </div>
52
+ </div>
53
+
54
+ <div class='litespeed-child-col-auto'>
55
+ <h4><?php echo __( 'Port', 'litespeed-cache' ) ; ?></h4>
56
+
57
+ <?php $this->build_input( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PORT, 'litespeed-input-short2' ) ; ?>
58
+ </div>
59
+
60
+ <div class='litespeed-child-col-auto'>
61
+ <h4><?php echo __( 'Default Object Lifetime', 'litespeed-cache' ) ; ?></h4>
62
+
63
+ <?php $this->build_input( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_LIFE, 'litespeed-input-short2' ) ; ?> <?php echo __( 'seconds', 'litespeed-cache' ) ; ?>
64
+ <div class="litespeed-desc">
65
+ <?php echo __( 'Default TTL for cached objects.', 'litespeed-cache' ) ; ?>
66
+ </div>
67
+ </div>
68
+
69
+ <div class='litespeed-child-col-auto'>
70
+ <h4><?php echo __( 'Status', 'litespeed-cache' ) ; ?></h4>
71
+
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-child-col-br'></div>
79
+
80
+ <div class='litespeed-child-col-auto <?php echo $hide_mem_options ; ?>' data="litespeed-mem-divs">
81
+ <h4><?php echo __( 'Username', 'litespeed-cache' ) ; ?></h4>
82
+
83
+ <?php $this->build_input( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_USER ) ; ?>
84
+ <div class="litespeed-desc">
85
+ <?php echo sprintf( __( 'Only available when %s is installed.', 'litespeed-cache' ), 'SASL' ) ; ?>
86
+ </div>
87
+ </div>
88
+
89
+ <div class='litespeed-child-col-auto'>
90
+ <h4><?php echo __( 'Password', 'litespeed-cache' ) ; ?></h4>
91
+
92
+ <?php $this->build_input( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PSWD ) ; ?>
93
+ <div class="litespeed-desc">
94
+ <?php echo __( 'Specify the password used when connecting.', 'litespeed-cache' ) ; ?>
95
+ </div>
96
+ </div>
97
+
98
+ <div class='litespeed-child-col-auto <?php echo $hide_redis_options ; ?>' data="litespeed-redis-divs">
99
+ <h4><?php echo __( 'Redis Database ID', 'litespeed-cache' ) ; ?></h4>
100
+
101
+ <?php $this->build_input( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_DB_ID, 'litespeed-input-short' ) ; ?>
102
+ <div class="litespeed-desc">
103
+ <?php echo __( 'Database to be used', 'litespeed-cache' ) ; ?>
104
+ </div>
105
+ </div>
106
+
107
+ <div class='litespeed-child-col-br'></div>
108
+
109
+ <div class='litespeed-child-col-auto'>
110
+ <h4><?php echo __( 'Global Groups', 'litespeed-cache' ) ; ?></h4>
111
+ <?php $this->build_textarea2( LiteSpeed_Cache_Config::ITEM_OBJECT_GLOBAL_GROUPS, 30 ) ; ?>
112
+ <div class="litespeed-desc">
113
+ <?php echo __( 'Groups cached at the network level.', 'litespeed-cache' ) ; ?>
114
+ <?php echo __('One per line.', 'litespeed-cache'); ?>
115
+ </div>
116
+ </div>
117
+
118
+ <div class='litespeed-child-col-auto'>
119
+ <h4><?php echo __( 'Do Not Cache Groups', 'litespeed-cache' ) ; ?></h4>
120
+ <?php $this->build_textarea2( LiteSpeed_Cache_Config::ITEM_OBJECT_NON_PERSISTENT_GROUPS, 30 ) ; ?>
121
+ <div class="litespeed-desc">
122
+ <?php echo __('One per line.', 'litespeed-cache'); ?>
123
+ </div>
124
+ </div>
125
+
126
+ <div class='litespeed-child-col-auto'>
127
+ <div class="litespeed-row">
128
+ <div class="litespeed-child-col-inc"><?php echo __( 'Persistent Connection', 'litespeed-cache' ) ; ?></div>
129
+ <?php $this->build_toggle( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PERSISTENT ) ; ?>
130
+ </div>
131
+ <div class="litespeed-desc">
132
+ <?php echo __( 'Use keep-alive connections to speed up cache operations.', 'litespeed-cache' ) ; ?>
133
+ </div>
134
+ <div class="litespeed-row litespeed-top30">
135
+ <div class="litespeed-child-col-inc"><?php echo __( 'Cache Wp-Admin', 'litespeed-cache' ) ; ?></div>
136
+ <?php $this->build_toggle( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_ADMIN ) ; ?>
137
+ </div>
138
+ <div class="litespeed-desc">
139
+ <?php echo __( 'Improve wp-admin speed through caching. (May encounter expired data)', 'litespeed-cache' ) ; ?>
140
+ </div>
141
+ </div>
142
+
143
+ <div class='litespeed-child-col-auto'>
144
+ <div class="litespeed-row">
145
+ <div class="litespeed-child-col-inc"><?php echo __( 'Store Transients', 'litespeed-cache' ) ; ?></div>
146
+ <?php $this->build_toggle( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_TRANSIENTS ) ; ?>
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
+
154
+ </div>
155
+ </td>
156
+ </tr>
admin/tpl/setting/settings_inc.check_adv_file.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'WPINC' ) ) die ;
3
+
4
+ ?>
5
+ <tr>
6
+ <th><?php echo __( 'Check Advanced Cache', 'litespeed-cache' ) ; ?></th>
7
+ <td>
8
+ <?php
9
+ $id = LiteSpeed_Cache_Config::OPID_CHECK_ADVANCEDCACHE;
10
+ $this->build_checkbox($id, __('Include advanced-cache.php', 'litespeed-cache'), $_options[$id]);
11
+ ?>
12
+ <div class="litespeed-desc">
13
+ <?php echo __('The advanced-cache.php file is used by many caching plugins to signal that a cache is active.', 'litespeed-cache'); ?>
14
+ <?php echo __('When this option is checked and this file is detected as belonging to another plugin, LiteSpeed Cache will not cache.', 'litespeed-cache'); ?>
15
+ </div>
16
+ <p>
17
+ <i><?php echo __('Uncheck this option only if the other plugin is used for non-caching purposes, such as minifying css/js files.', 'litespeed-cache'); ?></i>
18
+ </p>
19
+
20
+ </td>
21
+ </tr>
22
+
admin/tpl/setting/settings_inc.login_cookie.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'WPINC' ) ) die ;
3
+
4
+ ?>
5
+
6
+ <tr>
7
+ <th><?php echo __( 'Login Cookie', 'litespeed-cache' ) ; ?></th>
8
+ <td>
9
+ <?php
10
+ $id = LiteSpeed_Cache_Config::OPID_LOGIN_COOKIE;
11
+ $this->build_input( $id ) ;
12
+
13
+ echo '<p>' . __('SYNTAX: alphanumeric and "_".', 'litespeed-cache')
14
+ . ' ' . __('No spaces and case sensitive.', 'litespeed-cache')
15
+ . ' ' . __('MUST BE UNIQUE FROM OTHER WEB APPLICATIONS.', 'litespeed-cache')
16
+ . '</p>'
17
+ . '<p>'
18
+ . sprintf(__('The default login cookie is %s.', 'litespeed-cache'), '_lscache_vary')
19
+ . ' ' . __('The server will determine if the user is logged in based on the existance of this cookie.', 'litespeed-cache')
20
+ . ' ' . __('This setting is useful for those that have multiple web applications for the same domain.', 'litespeed-cache')
21
+ . ' ' . __('If every web application uses the same cookie, the server may confuse whether a user is logged in or not.', 'litespeed-cache')
22
+ . ' ' . __('The cookie set here will be used for this WordPress installation.', 'litespeed-cache')
23
+ . '</p>'
24
+ . '<p>'
25
+ . __('Example use case:', 'litespeed-cache')
26
+ . '<br />'
27
+ . sprintf(__('There is a WordPress installed for %s.', 'litespeed-cache'), '<u>www.example.com</u>')
28
+ . '<br />'
29
+ . sprintf(__('Then another WordPress is installed (NOT MULTISITE) at %s', 'litespeed-cache'), '<u>www.example.com/blog/</u>')
30
+ . ' ' . __('The cache needs to distinguish who is logged into which WordPress site in order to cache correctly.', 'litespeed-cache')
31
+ . '</p>';
32
+
33
+ $cookie_rule = LiteSpeed_Cache_Admin_Rules::get_instance()->get_rewrite_rule_login_cookie();
34
+ if ( $cookie_rule && substr($cookie_rule, 0, 11) !== 'Cache-Vary:' ){
35
+ echo '<div class="litespeed-callout-danger">'
36
+ . sprintf(__('Error: invalid login cookie. Please check the %s file', 'litespeed-cache'), '.htaccess')
37
+ . '</div>';
38
+ }
39
+
40
+ if ( defined( 'LITESPEED_ON' ) && $_options[$id] ){
41
+
42
+ if (!$cookie_rule){
43
+ echo '<div class="litespeed-callout-danger">'
44
+ . sprintf(__('Error getting current rules from %s: %s', 'litespeed-cache'), '.htaccess', LiteSpeed_Cache_Admin_Rules::MARKER_LOGIN_COOKIE)
45
+ . '</div>';
46
+ }
47
+ else{
48
+ $cookie_rule = substr($cookie_rule, 11);
49
+ $cookie_arr = explode(',', $cookie_rule);
50
+ if(!in_array($_options[$id], $cookie_arr)) {
51
+ echo '<div class="litespeed-callout-warning">' .
52
+ __( 'WARNING: The .htaccess login cookie and Database login cookie do not match.', 'litespeed-cache' ) .
53
+ '</div>';
54
+ }
55
+ }
56
+
57
+ }
58
+
59
+ ?>
60
+ </td>
61
+ </tr>
62
+
admin/tpl/setting/settings_media.php CHANGED
@@ -3,7 +3,10 @@ if ( ! defined( 'WPINC' ) ) die ;
3
 
4
  ?>
5
 
6
- <h3 class="litespeed-title"><?php echo __( 'Media Settings', 'litespeed-cache' ) ; ?></h3>
 
 
 
7
 
8
  <table><tbody>
9
  <tr>
@@ -75,7 +78,7 @@ if ( ! defined( 'WPINC' ) ) die ;
75
  <?php
76
  if ( ! is_multisite() ) :
77
  // webp
78
- require LSWCP_DIR . 'admin/tpl/setting/settings_inc.media_webp.php' ;
79
 
80
  endif ;
81
  ?>
3
 
4
  ?>
5
 
6
+ <h3 class="litespeed-title-short">
7
+ <?php echo __('Media Settings', 'litespeed-cache'); ?>
8
+ <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>
9
+ </h3>
10
 
11
  <table><tbody>
12
  <tr>
78
  <?php
79
  if ( ! is_multisite() ) :
80
  // webp
81
+ require LSCWP_DIR . 'admin/tpl/setting/settings_inc.media_webp.php' ;
82
 
83
  endif ;
84
  ?>
admin/tpl/setting/settings_optimize.php CHANGED
@@ -3,7 +3,10 @@ if ( ! defined( 'WPINC' ) ) die ;
3
 
4
  ?>
5
 
6
- <h3 class="litespeed-title"><?php echo __( 'Optimization Settings', 'litespeed-cache' ) ; ?></h3>
 
 
 
7
 
8
  <?php if ( ! LiteSpeed_Cache_Data::optm_available() ) : ?>
9
  <div class="litespeed-callout-danger">
@@ -35,6 +38,7 @@ if ( ! defined( 'WPINC' ) ) die ;
35
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_CSS_COMBINE ) ; ?>
36
  <div class="litespeed-desc">
37
  <?php echo __( 'Combine CSS files.', 'litespeed-cache' ) ; ?>
 
38
  </div>
39
  </td>
40
  </tr>
@@ -65,6 +69,7 @@ if ( ! defined( 'WPINC' ) ) die ;
65
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_JS_COMBINE ) ; ?>
66
  <div class="litespeed-desc">
67
  <?php echo __( 'Combine JS files.', 'litespeed-cache' ) ; ?>
 
68
  </div>
69
  </td>
70
  </tr>
3
 
4
  ?>
5
 
6
+ <h3 class="litespeed-title-short">
7
+ <?php echo __('Optimization Settings', 'litespeed-cache'); ?>
8
+ <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>
9
+ </h3>
10
 
11
  <?php if ( ! LiteSpeed_Cache_Data::optm_available() ) : ?>
12
  <div class="litespeed-callout-danger">
38
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_CSS_COMBINE ) ; ?>
39
  <div class="litespeed-desc">
40
  <?php echo __( 'Combine CSS files.', 'litespeed-cache' ) ; ?>
41
+ <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:optimize-issue" target="_blank"><?php echo __( 'How to Fix Problems Caused by CSS/JS Optimization.', 'litespeed-cache' ) ; ?></a>
42
  </div>
43
  </td>
44
  </tr>
69
  <?php $this->build_switch( LiteSpeed_Cache_Config::OPID_JS_COMBINE ) ; ?>
70
  <div class="litespeed-desc">
71
  <?php echo __( 'Combine JS files.', 'litespeed-cache' ) ; ?>
72
+ <a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp:optimize-issue" target="_blank"><?php echo __( 'How to Fix Problems Caused by CSS/JS Optimization.', 'litespeed-cache' ) ; ?></a>
73
  </div>
74
  </td>
75
  </tr>
admin/tpl/setting/settings_purge.php CHANGED
@@ -2,7 +2,11 @@
2
  if (!defined('WPINC')) die;
3
 
4
  ?>
5
- <h3 class="litespeed-title"><?php echo __('Purge Settings', 'litespeed-cache'); ?></h3>
 
 
 
 
6
 
7
  <?php
8
  $purge_options = LiteSpeed_Cache_Config::get_instance()->get_purge_options();
@@ -37,7 +41,7 @@ $breakArr = array(
37
  <table><tbody>
38
 
39
  <?php if (!is_multisite()): ?>
40
- <?php require LSWCP_DIR . 'admin/tpl/setting/settings_inc.purge_on_upgrade.php'; ?>
41
  <?php endif; ?>
42
 
43
  <tr>
2
  if (!defined('WPINC')) die;
3
 
4
  ?>
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
12
  $purge_options = LiteSpeed_Cache_Config::get_instance()->get_purge_options();
41
  <table><tbody>
42
 
43
  <?php if (!is_multisite()): ?>
44
+ <?php require LSCWP_DIR . 'admin/tpl/setting/settings_inc.purge_on_upgrade.php'; ?>
45
  <?php endif; ?>
46
 
47
  <tr>
admin/tpl/setting/settings_tuning.php CHANGED
@@ -3,8 +3,10 @@ if ( ! defined( 'WPINC' ) ) die ;
3
 
4
  ?>
5
 
6
- <h3 class="litespeed-title"><?php echo __( 'Tuning Settings', 'litespeed-cache' ) ; ?></h3>
7
-
 
 
8
  <table><tbody>
9
 
10
  <tr>
3
 
4
  ?>
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
 
12
  <tr>
admin/tpl/settings.php CHANGED
@@ -12,16 +12,11 @@ $menu_list = array(
12
  'tuning' => __('Tuning', 'litespeed-cache'),
13
  'media' => __('Media', 'litespeed-cache'),
14
  'cdn' => __('CDN', 'litespeed-cache'),
 
 
 
15
  ) ;
16
 
17
- $menu_list['esi'] = __('ESI', 'litespeed-cache') ;
18
-
19
- if (!is_multisite()) {
20
- $menu_list['advanced'] = __('Advanced', 'litespeed-cache') ;
21
- }
22
-
23
- $menu_list['debug'] = __('Debug', 'litespeed-cache') ;
24
-
25
  if ($this->show_compatibility_tab()){
26
  $menu_list['compatibilities'] = __('Compatibilities', 'litespeed-cache') ;
27
  }
@@ -62,16 +57,12 @@ $tp_tabs = apply_filters('litespeed_cache_add_config_tab',
62
  if ( !empty($tp_tabs) && is_array($tp_tabs) ) {
63
  foreach ($tp_tabs as $key => $tab) {
64
  if ( !is_array($tab) || !isset($tab['title']) || !isset($tab['slug']) || !isset($tab['content']) ) {
65
- if (LiteSpeed_Cache_Log::get_enabled()) {
66
- LiteSpeed_Cache_Log::push(__('WARNING: Third party tab input invalid.', 'litespeed-cache')) ;
67
- }
68
  unset($tp_tabs[$key]) ;
69
  continue ;
70
  }
71
  if ( preg_match('/[^-\w]/', $tab['slug']) ) {
72
- if (LiteSpeed_Cache_Log::get_enabled()) {
73
- LiteSpeed_Cache_Log::push(__('WARNING: Third party config slug contains invalid characters.', 'litespeed-cache')) ;
74
- }
75
  unset($tp_tabs[$key]) ;
76
  continue ;
77
  }
@@ -93,8 +84,41 @@ $roles = array_keys( $wp_roles->roles ) ;
93
 
94
  sort( $roles ) ;
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
- include_once LSWCP_DIR . "admin/tpl/inc/banner_promo.php" ;
98
  ?>
99
 
100
  <div class="wrap">
@@ -103,6 +127,10 @@ include_once LSWCP_DIR . "admin/tpl/inc/banner_promo.php" ;
103
  <span class="litespeed-desc">
104
  v<?php echo LiteSpeed_Cache::PLUGIN_VERSION ; ?>
105
  </span>
 
 
 
 
106
  </h2>
107
  </div>
108
  <div class="litespeed-wrap">
@@ -110,6 +138,9 @@ include_once LSWCP_DIR . "admin/tpl/inc/banner_promo.php" ;
110
  <?php
111
  $i = 1 ;
112
  foreach ($menu_list as $tab => $val){
 
 
 
113
  $accesskey = $i <= 9 ? "litespeed-accesskey='$i'" : '' ;
114
  echo "<a class='litespeed-tab' href='#$tab' data-litespeed-tab='$tab' $accesskey>$val</a>" ;
115
  $i ++ ;
@@ -141,7 +172,7 @@ include_once LSWCP_DIR . "admin/tpl/inc/banner_promo.php" ;
141
  // include all tpl for faster UE
142
  foreach ($menu_list as $tab => $val) {
143
  echo "<div data-litespeed-layout='$tab'>" ;
144
- require LSWCP_DIR . "admin/tpl/setting/settings_$tab.php" ;
145
  echo "</div>" ;
146
  }
147
 
12
  'tuning' => __('Tuning', 'litespeed-cache'),
13
  'media' => __('Media', 'litespeed-cache'),
14
  'cdn' => __('CDN', 'litespeed-cache'),
15
+ 'esi' => __('ESI', 'litespeed-cache'),
16
+ 'advanced' => __('Advanced', 'litespeed-cache'),
17
+ 'debug' => __('Debug', 'litespeed-cache'),
18
  ) ;
19
 
 
 
 
 
 
 
 
 
20
  if ($this->show_compatibility_tab()){
21
  $menu_list['compatibilities'] = __('Compatibilities', 'litespeed-cache') ;
22
  }
57
  if ( !empty($tp_tabs) && is_array($tp_tabs) ) {
58
  foreach ($tp_tabs as $key => $tab) {
59
  if ( !is_array($tab) || !isset($tab['title']) || !isset($tab['slug']) || !isset($tab['content']) ) {
60
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'WARNING: Third party tab input invalid' ) ;
 
 
61
  unset($tp_tabs[$key]) ;
62
  continue ;
63
  }
64
  if ( preg_match('/[^-\w]/', $tab['slug']) ) {
65
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'WARNING: Third party config slug contains invalid characters' ) ;
 
 
66
  unset($tp_tabs[$key]) ;
67
  continue ;
68
  }
84
 
85
  sort( $roles ) ;
86
 
87
+ include_once LSCWP_DIR . "admin/tpl/inc/banner_promo.php" ;
88
+
89
+ /**
90
+ * Switch basic/advanced mode
91
+ * @since 1.8.2
92
+ */
93
+ if ( ! empty( $_GET[ 'mode' ] ) ) {
94
+ $adv_mode = $_GET[ 'mode' ] == 'advanced' ? true : false ;
95
+ update_option( LiteSpeed_Cache_Config::ITEM_SETTING_MODE, $adv_mode ) ;
96
+ }
97
+ else {
98
+ $adv_mode = get_option( LiteSpeed_Cache_Config::ITEM_SETTING_MODE ) ;
99
+ }
100
+
101
+ $class_basic = $adv_mode ? '' : ' litespeed-setting-curr' ;
102
+ $class_advanced = ! $adv_mode ? '' : ' litespeed-setting-curr' ;
103
+
104
+ $hide_tabs = array() ;
105
+ $_hide_in_basic_mode = '' ;
106
+
107
+ if ( ! $adv_mode ) {
108
+ $hide_tabs = array(
109
+ 'optimize',
110
+ 'tuning',
111
+ 'media',
112
+ 'cdn',
113
+ 'esi',
114
+ 'advanced',
115
+ 'debug',
116
+ 'crawler',
117
+ ) ;
118
+
119
+ $_hide_in_basic_mode = 'class="litespeed-hide"' ;
120
+ }
121
 
 
122
  ?>
123
 
124
  <div class="wrap">
127
  <span class="litespeed-desc">
128
  v<?php echo LiteSpeed_Cache::PLUGIN_VERSION ; ?>
129
  </span>
130
+ <span class="litespeed-desc">
131
+ <a href="admin.php?page=lscache-settings&mode=basic" class="litespeed-setting-basic <?php echo $class_basic ; ?>"><?php echo __( 'Basic View', 'litespeed-cache' ) ; ?></a>
132
+ <a href="admin.php?page=lscache-settings&mode=advanced" class="litespeed-setting-advanced <?php echo $class_advanced ; ?>"><?php echo __( 'Advanced View', 'litespeed-cache' ) ; ?></a>
133
+ </span>
134
  </h2>
135
  </div>
136
  <div class="litespeed-wrap">
138
  <?php
139
  $i = 1 ;
140
  foreach ($menu_list as $tab => $val){
141
+ if ( in_array( $tab, $hide_tabs ) ) {
142
+ continue ;
143
+ }
144
  $accesskey = $i <= 9 ? "litespeed-accesskey='$i'" : '' ;
145
  echo "<a class='litespeed-tab' href='#$tab' data-litespeed-tab='$tab' $accesskey>$val</a>" ;
146
  $i ++ ;
172
  // include all tpl for faster UE
173
  foreach ($menu_list as $tab => $val) {
174
  echo "<div data-litespeed-layout='$tab'>" ;
175
+ require LSCWP_DIR . "admin/tpl/setting/settings_$tab.php" ;
176
  echo "</div>" ;
177
  }
178
 
cli/litespeed-cache-cli-admin.class.php CHANGED
@@ -20,6 +20,9 @@ class LiteSpeed_Cache_Cli_Admin
20
  LiteSpeed_Cache_Config::OPID_PURGE_ON_UPGRADE,
21
  LiteSpeed_Cache_Config::OPID_CACHE_FAVICON,
22
  LiteSpeed_Cache_Config::OPID_CACHE_RES,
 
 
 
23
  LiteSpeed_Cache_Config::OPID_CHECK_ADVANCEDCACHE,
24
  LiteSpeed_Cache_Config::OPID_ESI_ENABLE,
25
  LiteSpeed_Cache_Config::OPID_ESI_CACHE_ADMBAR,
@@ -127,6 +130,9 @@ class LiteSpeed_Cache_Cli_Admin
127
  case LiteSpeed_Cache_Config::OPID_PURGE_ON_UPGRADE:
128
  case LiteSpeed_Cache_Config::OPID_CACHE_FAVICON:
129
  case LiteSpeed_Cache_Config::OPID_CACHE_RES:
 
 
 
130
  case LiteSpeed_Cache_Config::OPID_CHECK_ADVANCEDCACHE:
131
  case LiteSpeed_Cache_Config::OPID_ESI_ENABLE:
132
  case LiteSpeed_Cache_Config::OPID_ESI_CACHE_ADMBAR:
@@ -159,6 +165,8 @@ class LiteSpeed_Cache_Cli_Admin
159
  case LiteSpeed_Cache_Config::OPID_CDN:
160
  case LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE:
161
 
 
 
162
  case LiteSpeed_Cache_Config::OPID_MEDIA_IMG_LAZY:
163
  case LiteSpeed_Cache_Config::OPID_MEDIA_IFRAME_LAZY:
164
  case LiteSpeed_Cache_Config::OPID_MEDIA_IMG_OPTM_CRON_OFF:
20
  LiteSpeed_Cache_Config::OPID_PURGE_ON_UPGRADE,
21
  LiteSpeed_Cache_Config::OPID_CACHE_FAVICON,
22
  LiteSpeed_Cache_Config::OPID_CACHE_RES,
23
+ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT,
24
+ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_KIND,
25
+
26
  LiteSpeed_Cache_Config::OPID_CHECK_ADVANCEDCACHE,
27
  LiteSpeed_Cache_Config::OPID_ESI_ENABLE,
28
  LiteSpeed_Cache_Config::OPID_ESI_CACHE_ADMBAR,
130
  case LiteSpeed_Cache_Config::OPID_PURGE_ON_UPGRADE:
131
  case LiteSpeed_Cache_Config::OPID_CACHE_FAVICON:
132
  case LiteSpeed_Cache_Config::OPID_CACHE_RES:
133
+ case LiteSpeed_Cache_Config::OPID_CACHE_OBJECT:
134
+ case LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_KIND:
135
+
136
  case LiteSpeed_Cache_Config::OPID_CHECK_ADVANCEDCACHE:
137
  case LiteSpeed_Cache_Config::OPID_ESI_ENABLE:
138
  case LiteSpeed_Cache_Config::OPID_ESI_CACHE_ADMBAR:
165
  case LiteSpeed_Cache_Config::OPID_CDN:
166
  case LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE:
167
 
168
+ case LiteSpeed_Cache_Config::OPID_ADV_INSTANT_CLICK:
169
+
170
  case LiteSpeed_Cache_Config::OPID_MEDIA_IMG_LAZY:
171
  case LiteSpeed_Cache_Config::OPID_MEDIA_IFRAME_LAZY:
172
  case LiteSpeed_Cache_Config::OPID_MEDIA_IMG_OPTM_CRON_OFF:
css/litespeed.css CHANGED
@@ -41,6 +41,14 @@
41
  margin-top: 20px;
42
  }
43
 
 
 
 
 
 
 
 
 
44
  .litespeed-desc {
45
  font-size: 12px;
46
  font-weight: normal;
@@ -74,6 +82,23 @@
74
  flex-grow: 1 ;
75
  }
76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  /********************************* logo *******************************/
78
  @font-face {
79
  font-family: 'litespeedfont';
@@ -147,7 +172,8 @@
147
  margin-left: 0;
148
  }
149
 
150
- .litespeed-title {
 
151
  font-size: 18px;
152
  font-weight: 600;
153
  color: #264d73;
@@ -158,10 +184,15 @@
158
  padding-left: 3px;
159
  }
160
 
161
- .litespeed-title a {
 
162
  text-decoration: none;
163
  }
164
 
 
 
 
 
165
  /********************************* nav tabs *******************************/
166
  .litespeed-wrap {
167
  margin: 10px 20px 0 2px;
@@ -298,6 +329,8 @@
298
  .litespeed-panel-icon-purge-front { background-image: url("../img/icons/purge-front.svg") ; }
299
  .litespeed-panel-icon-purge-pages { background-image: url("../img/icons/purge-pages.svg") ; }
300
  .litespeed-panel-icon-purge-cssjs { background-image: url("../img/icons/purge-cssjs.svg") ; }
 
 
301
  .litespeed-panel-icon-purge-all { background-image: url("../img/icons/purge-all.svg") ; }
302
  .litespeed-panel-icon-empty-cache { background-image: url("../img/icons/empty-cache.svg") ; }
303
  .litespeed-panel-icon-purge-403 { background-image: url("../img/icons/purge-403.svg") ; }
@@ -490,6 +523,7 @@
490
  background-color: #fff;
491
  padding: -1px;
492
  display: inline-block;
 
493
  }
494
 
495
  .litespeed-switch input:checked + label {
@@ -508,19 +542,30 @@
508
  font-weight: 400;
509
  text-align: center;
510
  padding: 5px 9px;
511
- float: left;
512
  cursor: pointer;
513
  border: 1px solid #f9fafc;
 
514
  }
515
 
516
- .litespeed-switch label:hover {
 
517
  background-color: #f9fafc;
518
  font-weight: 400;
519
  color: #538ac6;
 
 
 
 
 
 
 
 
520
  }
521
 
522
  .litespeed-switch input {
523
- display: none;
 
 
524
  }
525
 
526
  .litespeed-cache-purgeby-text {
@@ -1193,6 +1238,7 @@ g.litespeed-pie_info text{
1193
  border: 1px dotted #6699cc;
1194
  border-radius:5px;
1195
  display: flex;
 
1196
  padding: 10px;
1197
  margin-bottom: 5px;
1198
  }
@@ -1254,6 +1300,22 @@ g.litespeed-pie_info text{
1254
  padding-left: 17px;
1255
  }
1256
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1257
 
1258
  /********************************* toggle *******************************/
1259
 
@@ -1377,6 +1439,25 @@ g.litespeed-pie_info text{
1377
  }
1378
 
1379
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1380
  /********************************* todo *******************************/
1381
  /* input field */
1382
  .litespeed-textarea {
@@ -1450,6 +1531,10 @@ g.litespeed-pie_info text{
1450
  width: 99%;
1451
  }
1452
 
 
 
 
 
1453
  .litespeed-input-short {
1454
  width: 45px;
1455
  padding: 1px 6px;
41
  margin-top: 20px;
42
  }
43
 
44
+ .litespeed-top30 {
45
+ margin-top: 30px;
46
+ }
47
+
48
+ .litespeed-left20 {
49
+ margin-left: 20px;
50
+ }
51
+
52
  .litespeed-desc {
53
  font-size: 12px;
54
  font-weight: normal;
82
  flex-grow: 1 ;
83
  }
84
 
85
+ .litespeed-div {
86
+ display: inline-block;
87
+ min-width: 100px ;
88
+ }
89
+
90
+ .litespeed-div .submit {
91
+ margin: 5px;
92
+ padding: 5px;
93
+ }
94
+
95
+ h3 .litespeed-learn-more {
96
+ font-size: 12px;
97
+ font-weight: normal;
98
+ color:#7a919e;
99
+ margin-left: 30px;
100
+ }
101
+
102
  /********************************* logo *******************************/
103
  @font-face {
104
  font-family: 'litespeedfont';
172
  margin-left: 0;
173
  }
174
 
175
+ .litespeed-title,
176
+ .litespeed-title-short {
177
  font-size: 18px;
178
  font-weight: 600;
179
  color: #264d73;
184
  padding-left: 3px;
185
  }
186
 
187
+ .litespeed-title a,
188
+ .litespeed-title-short a {
189
  text-decoration: none;
190
  }
191
 
192
+ .litespeed-title-short {
193
+ padding-right: 20px;
194
+ }
195
+
196
  /********************************* nav tabs *******************************/
197
  .litespeed-wrap {
198
  margin: 10px 20px 0 2px;
329
  .litespeed-panel-icon-purge-front { background-image: url("../img/icons/purge-front.svg") ; }
330
  .litespeed-panel-icon-purge-pages { background-image: url("../img/icons/purge-pages.svg") ; }
331
  .litespeed-panel-icon-purge-cssjs { background-image: url("../img/icons/purge-cssjs.svg") ; }
332
+ .litespeed-panel-icon-purge-object { background-image: url("../img/icons/purge-object.svg") ; }
333
+ .litespeed-panel-icon-purge-opcache { background-image: url("../img/icons/purge-opcache.svg") ; }
334
  .litespeed-panel-icon-purge-all { background-image: url("../img/icons/purge-all.svg") ; }
335
  .litespeed-panel-icon-empty-cache { background-image: url("../img/icons/empty-cache.svg") ; }
336
  .litespeed-panel-icon-purge-403 { background-image: url("../img/icons/purge-403.svg") ; }
523
  background-color: #fff;
524
  padding: -1px;
525
  display: inline-block;
526
+ position: relative;
527
  }
528
 
529
  .litespeed-switch input:checked + label {
542
  font-weight: 400;
543
  text-align: center;
544
  padding: 5px 9px;
 
545
  cursor: pointer;
546
  border: 1px solid #f9fafc;
547
+ position: relative;
548
  }
549
 
550
+ .litespeed-switch input:hover + label,
551
+ .litespeed-switch input:focus + label {
552
  background-color: #f9fafc;
553
  font-weight: 400;
554
  color: #538ac6;
555
+ outline: 2px solid #538ac6;
556
+ }
557
+
558
+ .litespeed-switch input:checked:hover + label,
559
+ .litespeed-switch input:checked:focus + label {
560
+ background-color: #36b0b0;
561
+ color: #fff;
562
+ font-weight: 600;
563
  }
564
 
565
  .litespeed-switch input {
566
+ display: inline-block;
567
+ position: absolute;
568
+ z-index: -1;
569
  }
570
 
571
  .litespeed-cache-purgeby-text {
1238
  border: 1px dotted #6699cc;
1239
  border-radius:5px;
1240
  display: flex;
1241
+ flex-wrap: wrap;
1242
  padding: 10px;
1243
  margin-bottom: 5px;
1244
  }
1300
  padding-left: 17px;
1301
  }
1302
 
1303
+ .litespeed-child-col-auto{
1304
+ padding-left: 17px;
1305
+ }
1306
+
1307
+ .litespeed-child-col-br{
1308
+ flex: 0 0 100% ;
1309
+ border-top: 1px dotted #6699cc;
1310
+ }
1311
+
1312
+ .litespeed-child-col-inc{
1313
+ display: inline-block;
1314
+ margin-top: 16px ;
1315
+ min-width: 150px ;
1316
+ font-weight: bold;
1317
+ }
1318
+
1319
 
1320
  /********************************* toggle *******************************/
1321
 
1439
  }
1440
 
1441
 
1442
+ /********************************* setting panel *******************************/
1443
+ .litespeed-setting-basic{
1444
+ margin-left: 50px;
1445
+ }
1446
+
1447
+ .litespeed-setting-advanced{
1448
+ margin-left: 10px;
1449
+ }
1450
+
1451
+ .litespeed-setting-basic,
1452
+ .litespeed-setting-advanced {
1453
+ color: #264d73;
1454
+ text-decoration: none;
1455
+ }
1456
+
1457
+ .litespeed-setting-curr{
1458
+ border-bottom:1px solid #6699cc;
1459
+ }
1460
+
1461
  /********************************* todo *******************************/
1462
  /* input field */
1463
  .litespeed-textarea {
1531
  width: 99%;
1532
  }
1533
 
1534
+ .litespeed-input-short2 {
1535
+ width: 150px;
1536
+ }
1537
+
1538
  .litespeed-input-short {
1539
  width: 45px;
1540
  padding: 1px 6px;
img/icons/purge-front.svg CHANGED
@@ -1,31 +1,32 @@
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 16.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
  width="75px" height="75px" viewBox="0 0 75 75" enable-background="new 0 0 75 75" xml:space="preserve">
6
  <g>
7
- <path fill="#21A0DF" d="M63.657,12.237c-0.045-0.116-0.109-0.227-0.205-0.318L52.954,1.835c-0.028-0.027-0.065-0.039-0.097-0.062
8
- c-0.059-0.043-0.115-0.089-0.185-0.117c-0.069-0.027-0.142-0.034-0.215-0.043c-0.037-0.005-0.071-0.022-0.11-0.022H52.33h-0.001
9
- H14.114c-1.577,0-2.86,1.283-2.86,2.859v66.923c0,1.577,1.283,2.859,2.86,2.859h46.772c1.576,0,2.859-1.282,2.859-2.859V12.608
10
  C63.746,12.474,63.711,12.351,63.657,12.237z M53.223,4.52l7.51,7.213h-7.395c-0.064,0-0.115-0.052-0.115-0.118V4.52z
11
  M61.996,71.373c0,0.611-0.498,1.109-1.109,1.109H14.114c-0.612,0-1.11-0.498-1.11-1.109V4.45c0-0.612,0.498-1.109,1.11-1.109
12
- h37.358v8.274c0,1.03,0.837,1.868,1.865,1.868h8.658V71.373z"/>
13
- <path fill="#21A0DF" d="M45.429,44.487c-6.656,0-12.071,5.416-12.071,12.072s5.415,12.071,12.071,12.071
14
- s12.072-5.415,12.072-12.071S52.085,44.487,45.429,44.487z M45.429,66.881c-5.691,0-10.321-4.63-10.321-10.321
15
- s4.63-10.322,10.321-10.322s10.322,4.631,10.322,10.322S51.12,66.881,45.429,66.881z"/>
16
- <path fill="#21A0DF" d="M51.299,50.689c-0.342-0.342-0.896-0.342-1.238,0L45.43,55.32l-4.631-4.631
17
- c-0.342-0.342-0.896-0.342-1.238,0c-0.341,0.342-0.341,0.896,0,1.238l4.631,4.631l-4.631,4.631c-0.341,0.342-0.341,0.896,0,1.238
18
- c0.171,0.171,0.396,0.256,0.619,0.256s0.448-0.085,0.619-0.256l4.631-4.631l4.631,4.631c0.171,0.171,0.396,0.256,0.619,0.256
19
- s0.448-0.085,0.619-0.256c0.341-0.342,0.341-0.896,0-1.238l-4.631-4.631l4.631-4.631C51.64,51.586,51.64,51.031,51.299,50.689z"/>
20
- <path fill="#21A0DF" d="M19.826,18.879c0,0.483,0.392,0.875,0.875,0.875h33.598c0.483,0,0.875-0.392,0.875-0.875
 
21
  s-0.392-0.875-0.875-0.875H20.701C20.218,18.004,19.826,18.396,19.826,18.879z"/>
22
- <path fill="#21A0DF" d="M20.701,29.511h33.598c0.483,0,0.875-0.392,0.875-0.875s-0.392-0.875-0.875-0.875H20.701
23
- c-0.483,0-0.875,0.392-0.875,0.875S20.218,29.511,20.701,29.511z"/>
24
- <path fill="#21A0DF" d="M20.701,39.269h33.598c0.483,0,0.875-0.392,0.875-0.875s-0.392-0.875-0.875-0.875H20.701
25
- c-0.483,0-0.875,0.392-0.875,0.875S20.218,39.269,20.701,39.269z"/>
26
- <path fill="#21A0DF" d="M30.125,47.276h-9.423c-0.483,0-0.875,0.392-0.875,0.875s0.392,0.875,0.875,0.875h9.423
27
- c0.483,0,0.875-0.392,0.875-0.875S30.608,47.276,30.125,47.276z"/>
28
- <path fill="#21A0DF" d="M27.75,57.034h-7.049c-0.483,0-0.875,0.392-0.875,0.875s0.392,0.875,0.875,0.875h7.049
29
  c0.483,0,0.875-0.392,0.875-0.875S28.233,57.034,27.75,57.034z"/>
30
  </g>
31
  </svg>
1
  <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
  width="75px" height="75px" viewBox="0 0 75 75" enable-background="new 0 0 75 75" xml:space="preserve">
6
  <g>
7
+ <path fill="#6699CC" d="M63.657,12.237c-0.046-0.116-0.109-0.227-0.205-0.318L52.954,1.835c-0.028-0.027-0.065-0.039-0.097-0.062
8
+ c-0.061-0.043-0.115-0.089-0.187-0.117c-0.067-0.027-0.144-0.034-0.215-0.043c-0.037-0.005-0.069-0.022-0.108-0.022H52.33h-0.001
9
+ H14.114c-1.577,0-2.86,1.283-2.86,2.859v66.923c0,1.577,1.283,2.859,2.86,2.859h46.773c1.575,0,2.858-1.282,2.858-2.859V12.608
10
  C63.746,12.474,63.711,12.351,63.657,12.237z M53.223,4.52l7.51,7.213h-7.395c-0.064,0-0.115-0.052-0.115-0.118V4.52z
11
  M61.996,71.373c0,0.611-0.498,1.109-1.109,1.109H14.114c-0.612,0-1.11-0.498-1.11-1.109V4.45c0-0.612,0.498-1.109,1.11-1.109
12
+ h37.359v8.274c0,1.03,0.836,1.868,1.864,1.868h8.658L61.996,71.373L61.996,71.373z"/>
13
+ <path fill="#6699CC" d="M45.43,44.486c-6.656,0-12.072,5.416-12.072,12.072c0,6.655,5.416,12.071,12.072,12.071
14
+ c6.655,0,12.071-5.415,12.071-12.071S52.085,44.486,45.43,44.486z M45.43,66.881c-5.691,0-10.322-4.63-10.322-10.32
15
+ s4.63-10.321,10.322-10.321c5.69,0,10.321,4.631,10.321,10.321S51.12,66.881,45.43,66.881z"/>
16
+ <path fill="#6699CC" d="M51.299,50.689c-0.342-0.342-0.896-0.342-1.238,0L45.43,55.32l-4.631-4.631
17
+ c-0.342-0.342-0.896-0.342-1.238,0c-0.34,0.342-0.34,0.896,0,1.236l4.631,4.633l-4.631,4.631c-0.34,0.342-0.34,0.896,0,1.236
18
+ c0.172,0.172,0.396,0.258,0.619,0.258s0.448-0.086,0.619-0.258l4.631-4.631l4.631,4.631c0.172,0.172,0.396,0.258,0.619,0.258
19
+ s0.448-0.086,0.619-0.258c0.342-0.342,0.342-0.896,0-1.236l-4.631-4.631l4.631-4.633C51.641,51.586,51.641,51.031,51.299,50.689z"
20
+ />
21
+ <path fill="#6699CC" d="M19.826,18.879c0,0.483,0.392,0.875,0.875,0.875h33.598c0.483,0,0.875-0.392,0.875-0.875
22
  s-0.392-0.875-0.875-0.875H20.701C20.218,18.004,19.826,18.396,19.826,18.879z"/>
23
+ <path fill="#6699CC" d="M20.701,29.511h33.598c0.483,0,0.875-0.392,0.875-0.875c0-0.483-0.392-0.875-0.875-0.875H20.701
24
+ c-0.483,0-0.875,0.392-0.875,0.875C19.826,29.119,20.218,29.511,20.701,29.511z"/>
25
+ <path fill="#6699CC" d="M20.701,39.27h33.598c0.483,0,0.875-0.393,0.875-0.875s-0.392-0.875-0.875-0.875H20.701
26
+ c-0.483,0-0.875,0.392-0.875,0.875S20.218,39.27,20.701,39.27z"/>
27
+ <path fill="#6699CC" d="M30.125,47.275h-9.423c-0.483,0-0.875,0.393-0.875,0.875s0.392,0.875,0.875,0.875h9.423
28
+ c0.483,0,0.875-0.393,0.875-0.875S30.608,47.275,30.125,47.275z"/>
29
+ <path fill="#6699CC" d="M27.75,57.034h-7.049c-0.483,0-0.875,0.392-0.875,0.875s0.392,0.875,0.875,0.875h7.049
30
  c0.483,0,0.875-0.392,0.875-0.875S28.233,57.034,27.75,57.034z"/>
31
  </g>
32
  </svg>
img/icons/purge-object.svg ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="75px" height="75px" viewBox="0 0 75 75" enable-background="new 0 0 75 75" xml:space="preserve">
6
+ <g>
7
+ <path fill="#6699CC" d="M56.841,27.021h-2.944l3.079-8.461c0.108-0.299,0.047-0.634-0.162-0.874l-7.001-8.046
8
+ c-0.019-0.021-0.042-0.036-0.063-0.055c-0.033-0.032-0.065-0.065-0.104-0.091c-0.017-0.011-0.035-0.018-0.053-0.029
9
+ c-0.049-0.028-0.098-0.056-0.15-0.075c-0.01-0.003-0.02-0.004-0.029-0.007c-0.062-0.02-0.124-0.035-0.189-0.04
10
+ c-0.02-0.002-0.04,0.002-0.06,0.001c-0.05,0-0.1-0.003-0.149,0.005L38.48,11.014c-0.314,0.05-0.577,0.266-0.686,0.565
11
+ l-3.846,10.563c-0.027,0.075-0.043,0.152-0.049,0.229c0,0.003,0,0.006,0,0.01c-0.005,0.073-0.001,0.146,0.012,0.217
12
+ c0.003,0.017,0.011,0.032,0.015,0.048c0.014,0.058,0.03,0.114,0.056,0.168c0.01,0.021,0.025,0.038,0.036,0.058
13
+ c0.024,0.042,0.045,0.084,0.076,0.123c0.003,0.003,0.008,0.005,0.011,0.008c0.003,0.004,0.005,0.01,0.009,0.014l3.515,4.003h-0.583
14
+ l-3.372-3.876c-0.021-0.025-0.049-0.042-0.073-0.064c-0.03-0.027-0.057-0.057-0.09-0.08c-0.028-0.02-0.06-0.032-0.089-0.048
15
+ c-0.037-0.02-0.072-0.041-0.11-0.055c-0.027-0.01-0.056-0.013-0.084-0.02c-0.045-0.012-0.089-0.024-0.136-0.029
16
+ c-0.029-0.002-0.06,0.002-0.089,0.002c-0.042,0.001-0.083-0.003-0.125,0.004L22.34,24.521c-0.314,0.05-0.577,0.266-0.686,0.565
17
+ l-0.705,1.936h-2.79c-1.549,0-2.809,1.26-2.809,2.809c0,0.034,0.002,0.068,0.006,0.103l4.831,40.993
18
+ c0.03,1.523,1.278,2.753,2.808,2.753h29.007c1.53,0,2.778-1.229,2.808-2.753l4.833-40.993c0.004-0.034,0.006-0.068,0.006-0.103
19
+ C59.649,28.281,58.39,27.021,56.841,27.021z M52.035,27.021h-0.145l-5.603-6.378l2.925-8.036l0.254-0.698l5.688,6.537
20
+ L52.035,27.021z M39.262,12.662l8.561-1.351l-0.254,0.698l-2.925,8.036l-8.545,1.309L39.262,12.662z M36.483,23.064l8.464-1.296
21
+ l1.982,2.257l2.631,2.996h-9.604L36.483,23.064z M33.264,25.588l0.063-0.174l1.398,1.607h-1.983L33.264,25.588z M23.123,26.168
22
+ l8.56-1.353l-0.544,1.494l-0.259,0.712h-8.067L23.123,26.168z M53.067,70.768c-0.004,0.034-0.006,0.068-0.006,0.103
23
+ c0,0.584-0.475,1.059-1.059,1.059H22.996c-0.583,0-1.059-0.475-1.059-1.059c0-0.034-0.002-0.068-0.006-0.103l-4.829-40.981
24
+ c0.023-0.563,0.489-1.015,1.058-1.015h3.402h9.93h5.154h2.914h11.934h1.153h4.193c0.569,0,1.034,0.451,1.058,1.015L53.067,70.768z"
25
+ />
26
+ <path fill="#6699CC" d="M28.884,63.444c-0.48,0.054-0.826,0.486-0.772,0.967l0.326,2.908c0.05,0.447,0.429,0.777,0.869,0.777
27
+ c0.032,0,0.065-0.002,0.099-0.006c0.48-0.054,0.826-0.486,0.772-0.967l-0.326-2.908C29.797,63.735,29.364,63.382,28.884,63.444z"/>
28
+ <path fill="#6699CC" d="M26.532,42.486c0.48-0.054,0.826-0.486,0.772-0.967l-0.759-6.771c-0.054-0.479-0.479-0.819-0.967-0.772
29
+ c-0.48,0.054-0.826,0.487-0.772,0.967l0.759,6.771c0.05,0.447,0.429,0.777,0.869,0.777C26.466,42.492,26.499,42.49,26.532,42.486z"
30
+ />
31
+ <path fill="#6699CC" d="M46.116,63.446c-0.485-0.057-0.914,0.291-0.967,0.771l-0.326,2.906c-0.055,0.48,0.291,0.913,0.771,0.967
32
+ c0.033,0.004,0.066,0.006,0.099,0.006c0.439,0,0.818-0.33,0.868-0.777l0.326-2.906C46.942,63.933,46.597,63.5,46.116,63.446z"/>
33
+ <path fill="#6699CC" d="M49.421,33.976c-0.488-0.052-0.913,0.292-0.967,0.772l-0.732,6.525c-0.055,0.48,0.291,0.913,0.771,0.967
34
+ c0.033,0.004,0.066,0.006,0.099,0.006c0.439,0,0.818-0.33,0.868-0.777l0.732-6.525C50.247,34.463,49.901,34.03,49.421,33.976z"/>
35
+ <path fill="#6699CC" d="M37.306,64.894c-0.483,0-0.875,0.392-0.875,0.875v1.453c0,0.483,0.392,0.875,0.875,0.875
36
+ s0.875-0.392,0.875-0.875v-1.453C38.181,65.285,37.789,64.894,37.306,64.894z"/>
37
+ <path fill="#6699CC" d="M37.306,37.75c0.483,0,0.875-0.392,0.875-0.875v-2.029c0-0.483-0.392-0.875-0.875-0.875
38
+ s-0.875,0.392-0.875,0.875v2.029C36.431,37.358,36.822,37.75,37.306,37.75z"/>
39
+ <path fill="#6699CC" d="M37.5,40.496c-6.108,0-11.078,4.97-11.078,11.079c0,6.108,4.97,11.078,11.078,11.078
40
+ c6.109,0,11.079-4.97,11.079-11.078C48.578,45.466,43.608,40.496,37.5,40.496z M37.5,60.903c-5.144,0-9.328-4.185-9.328-9.328
41
+ c0-5.145,4.185-9.329,9.328-9.329c5.144,0,9.329,4.185,9.329,9.329C46.828,56.719,42.644,60.903,37.5,60.903z"/>
42
+ <path fill="#6699CC" d="M42.904,46.171c-0.342-0.342-0.896-0.342-1.238,0L37.5,50.336l-4.166-4.165
43
+ c-0.342-0.342-0.896-0.342-1.237,0s-0.342,0.896,0,1.238l4.165,4.165l-4.165,4.165c-0.342,0.342-0.342,0.896,0,1.238
44
+ c0.171,0.171,0.395,0.256,0.619,0.256s0.448-0.085,0.619-0.256l4.166-4.165l4.166,4.165c0.171,0.171,0.396,0.256,0.619,0.256
45
+ s0.448-0.085,0.619-0.256c0.341-0.342,0.341-0.896,0-1.238l-4.165-4.165l4.165-4.165C43.245,47.067,43.245,46.513,42.904,46.171z"
46
+ />
47
+ <path fill="#6699CC" d="M21.312,23.8c0.167,0.191,0.408,0.298,0.658,0.298c0.044,0,0.088-0.003,0.132-0.01l10.519-1.611
48
+ c0.004,0,0.007-0.002,0.011-0.003c0.006-0.001,0.012-0.001,0.019-0.002c0.041-0.007,0.077-0.025,0.115-0.038
49
+ c0.03-0.01,0.062-0.017,0.091-0.03c0.042-0.02,0.08-0.047,0.118-0.073c0.024-0.017,0.052-0.029,0.074-0.048
50
+ c0.038-0.032,0.069-0.071,0.102-0.109c0.017-0.02,0.038-0.037,0.053-0.059c0.044-0.063,0.081-0.131,0.107-0.205l3.845-10.564
51
+ c0.109-0.299,0.047-0.634-0.162-0.874L29.99,2.426c-0.023-0.026-0.052-0.045-0.077-0.068c-0.028-0.025-0.054-0.054-0.085-0.075
52
+ c-0.034-0.023-0.071-0.039-0.108-0.058c-0.031-0.015-0.059-0.034-0.091-0.045c-0.036-0.013-0.073-0.018-0.11-0.026
53
+ c-0.037-0.008-0.072-0.02-0.11-0.023c-0.035-0.003-0.071,0.001-0.106,0.003c-0.036,0.001-0.072-0.003-0.108,0.003L18.66,3.799
54
+ c-0.314,0.05-0.577,0.266-0.686,0.565l-3.845,10.563c-0.027,0.075-0.043,0.153-0.049,0.23c0,0.005,0,0.009,0,0.014
55
+ c-0.005,0.071-0.001,0.143,0.011,0.213c0.004,0.021,0.014,0.041,0.019,0.062c0.014,0.052,0.027,0.104,0.05,0.153
56
+ c0.013,0.027,0.031,0.05,0.047,0.075c0.021,0.036,0.039,0.074,0.066,0.107c0.002,0.003,0.007,0.004,0.009,0.007
57
+ c0.004,0.005,0.006,0.011,0.011,0.016L21.312,23.8z M22.311,22.285l-5.648-6.435l8.462-1.297l5.651,6.435L22.311,22.285z
58
+ M32.171,19.924l-2.026-2.306l-3.679-4.189l3.178-8.734l5.69,6.538L32.171,19.924z M19.442,5.447L28,4.096l-3.178,8.734
59
+ l-8.543,1.309L19.442,5.447z"/>
60
+ </g>
61
+ </svg>
img/icons/purge-opcache.svg ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ width="75px" height="75px" viewBox="0 0 75 75" enable-background="new 0 0 75 75" xml:space="preserve">
6
+ <g>
7
+
8
+ <path fill="none" stroke="#21A0DF" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
9
+ M52.641,66.489"/>
10
+ </g>
11
+ <g>
12
+
13
+ <path fill="none" stroke="#21A0DF" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
14
+ M57.921,65.491"/>
15
+ </g>
16
+ <g>
17
+ <g>
18
+
19
+ <path fill="none" stroke="#21A0DF" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
20
+ M53.936,70.87c0,1.066-0.863,1.934-1.934,1.934H22.996c-1.067,0-1.934-0.867-1.934-1.934l-4.836-41.04
21
+ c0-1.068,0.865-1.934,1.934-1.934h38.68c1.066,0,1.934,0.865,1.934,1.934L53.936,70.87z"/>
22
+ <g>
23
+
24
+ <line fill="none" stroke="#21A0DF" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="28.981" y1="64.313" x2="29.308" y2="67.222"/>
25
+
26
+ <line fill="none" stroke="#21A0DF" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="25.676" y1="34.846" x2="26.435" y2="41.617"/>
27
+
28
+ <line fill="none" stroke="#21A0DF" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="46.018" y1="64.315" x2="45.691" y2="67.222"/>
29
+
30
+ <line fill="none" stroke="#21A0DF" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="49.322" y1="34.846" x2="48.59" y2="41.371"/>
31
+
32
+ <line fill="none" stroke="#21A0DF" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="37.306" y1="65.769" x2="37.306" y2="67.222"/>
33
+
34
+ <line fill="none" stroke="#21A0DF" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="37.306" y1="34.846" x2="37.306" y2="36.875"/>
35
+ </g>
36
+ </g>
37
+ </g>
38
+ <g>
39
+
40
+ <circle fill="none" stroke="#21A0DF" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" cx="37.5" cy="51.575" r="10.203"/>
41
+ <g>
42
+
43
+ <line fill="none" stroke="#21A0DF" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="32.717" y1="46.79" x2="42.285" y2="56.358"/>
44
+
45
+ <line fill="none" stroke="#21A0DF" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="32.717" y1="56.358" x2="42.285" y2="46.79"/>
46
+ </g>
47
+ </g>
48
+ <g>
49
+ <g>
50
+ <path fill="#21A0DF" stroke="#21A0DF" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M30.396,27.369
51
+ l-3.276-7.024l2.402-1.121c2.317-1.08,3.895-0.719,4.733,1.081c0.438,0.939,0.455,1.809,0.05,2.612
52
+ c-0.405,0.803-1.203,1.481-2.396,2.039l-1.089,0.508l0.857,1.838 M30.39,24.54l0.97-0.453c0.955-0.445,1.573-0.922,1.857-1.429
53
+ c0.282-0.508,0.265-1.101-0.052-1.781c-0.286-0.613-0.699-0.976-1.24-1.089c-0.543-0.112-1.237,0.029-2.086,0.425l-1.204,0.562
54
+ L30.39,24.54z"/>
55
+ <path fill="#21A0DF" stroke="#21A0DF" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M46.293,22.687
56
+ l-1.076,0.502l-2.033-4.36l-4.883,2.276l2.034,4.361l-1.078,0.501L34.936,16.7l1.078-0.502l1.839,3.943l4.88-2.276l-1.838-3.943
57
+ l1.076-0.501L46.293,22.687z"/>
58
+ <path fill="#21A0DF" stroke="#21A0DF" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M51.648,12.196
59
+ c0.436,0.938,0.454,1.808,0.049,2.611c-0.406,0.804-1.203,1.483-2.395,2.039l-1.09,0.509L49.911,21l-1.076,0.502l-4.322-9.266
60
+ l2.401-1.121C49.23,10.036,50.809,10.396,51.648,12.196z M47.781,16.43l0.969-0.453c0.954-0.445,1.574-0.921,1.857-1.429
61
+ c0.281-0.506,0.266-1.101-0.053-1.781c-0.285-0.612-0.698-0.976-1.239-1.088c-0.542-0.112-1.237,0.029-2.087,0.425l-1.203,0.56
62
+ L47.781,16.43z"/>
63
+ </g>
64
+
65
+ <path fill="none" stroke="#21A0DF" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
66
+ M20.102,27.406c-0.618-4.872,5.762-11.804,15.299-16.251c10.491-4.893,20.834-4.923,23.098-0.07
67
+ c2.069,4.442-3.342,11.436-12.312,16.34"/>
68
+ </g>
69
+ </svg>
inc/activation.class.php CHANGED
@@ -115,11 +115,11 @@ class LiteSpeed_Cache_Activation
115
  foreach ( $sites as $site ) {
116
  $bid = is_object( $site ) && property_exists( $site, 'blog_id' ) ? $site->blog_id : $site ;
117
  $plugins = get_blog_option( $bid , 'active_plugins', $default ) ;
118
- if ( in_array( LSWCP_BASENAME, $plugins, true ) ) {
119
  $count++ ;
120
  }
121
  }
122
- if ( is_plugin_active_for_network( LSWCP_BASENAME ) ) {
123
  $count++ ;
124
  }
125
  return $count ;
@@ -177,7 +177,7 @@ class LiteSpeed_Cache_Activation
177
  }
178
  }
179
 
180
- $adv_cache_path = LSWCP_CONTENT_DIR . '/advanced-cache.php' ;
181
  // this file can be generated by other cache plugin like w3tc, we only delete our own file
182
  if ( file_exists( $adv_cache_path ) && is_writable( $adv_cache_path ) ) {
183
  if ( strpos( file_get_contents( $adv_cache_path ), 'LSCACHE_ADV_CACHE' ) !== false ) {
@@ -191,6 +191,12 @@ class LiteSpeed_Cache_Activation
191
  error_log( 'Failed to remove advanced-cache.php, file does not exist or is not writable!' ) ;
192
  }
193
 
 
 
 
 
 
 
194
  if ( ! LiteSpeed_Cache_Config::wp_cache_var_setter( false ) ) {
195
  error_log('In wp-config.php: WP_CACHE could not be set to false during deactivation!') ;
196
  }
@@ -210,12 +216,12 @@ class LiteSpeed_Cache_Activation
210
  */
211
  public static function try_copy_advanced_cache()
212
  {
213
- $adv_cache_path = LSWCP_CONTENT_DIR . '/advanced-cache.php' ;
214
  if ( file_exists( $adv_cache_path ) && ( filesize( $adv_cache_path ) !== 0 || ! is_writable( $adv_cache_path ) ) ) {
215
  return false ;
216
  }
217
 
218
- copy( LSWCP_DIR . 'includes/advanced-cache.php', $adv_cache_path ) ;
219
  include( $adv_cache_path ) ;
220
  $ret = defined( 'LSCACHE_ADV_CACHE' ) ;
221
  return $ret ;
115
  foreach ( $sites as $site ) {
116
  $bid = is_object( $site ) && property_exists( $site, 'blog_id' ) ? $site->blog_id : $site ;
117
  $plugins = get_blog_option( $bid , 'active_plugins', $default ) ;
118
+ if ( in_array( LSCWP_BASENAME, $plugins, true ) ) {
119
  $count++ ;
120
  }
121
  }
122
+ if ( is_plugin_active_for_network( LSCWP_BASENAME ) ) {
123
  $count++ ;
124
  }
125
  return $count ;
177
  }
178
  }
179
 
180
+ $adv_cache_path = LSCWP_CONTENT_DIR . '/advanced-cache.php' ;
181
  // this file can be generated by other cache plugin like w3tc, we only delete our own file
182
  if ( file_exists( $adv_cache_path ) && is_writable( $adv_cache_path ) ) {
183
  if ( strpos( file_get_contents( $adv_cache_path ), 'LSCACHE_ADV_CACHE' ) !== false ) {
191
  error_log( 'Failed to remove advanced-cache.php, file does not exist or is not writable!' ) ;
192
  }
193
 
194
+ /**
195
+ * Remove object cache file if is us
196
+ * @since 1.8.2
197
+ */
198
+ LiteSpeed_Cache_Object::get_instance()->del_file() ;
199
+
200
  if ( ! LiteSpeed_Cache_Config::wp_cache_var_setter( false ) ) {
201
  error_log('In wp-config.php: WP_CACHE could not be set to false during deactivation!') ;
202
  }
216
  */
217
  public static function try_copy_advanced_cache()
218
  {
219
+ $adv_cache_path = LSCWP_CONTENT_DIR . '/advanced-cache.php' ;
220
  if ( file_exists( $adv_cache_path ) && ( filesize( $adv_cache_path ) !== 0 || ! is_writable( $adv_cache_path ) ) ) {
221
  return false ;
222
  }
223
 
224
+ copy( LSCWP_DIR . 'includes/advanced-cache.php', $adv_cache_path ) ;
225
  include( $adv_cache_path ) ;
226
  $ret = defined( 'LSCACHE_ADV_CACHE' ) ;
227
  return $ret ;
inc/cdn.class.php CHANGED
@@ -468,9 +468,9 @@ class LiteSpeed_Cache_CDN
468
  $url_parsed = parse_url( $url ) ;
469
 
470
  // Only images under wp-cotnent/wp-includes can be replaced
471
- if ( stripos( $url_parsed[ 'path' ], LSWCP_CONTENT_FOLDER ) === false && stripos( $url_parsed[ 'path' ], 'wp-includes' ) === false && stripos( $url_parsed[ 'path' ], '/min/' ) === false ) {
472
  if ( ! defined( 'UPLOADS' ) || stripos( $url_parsed[ 'path' ], UPLOADS ) === false ) {
473
- LiteSpeed_Cache_Log::debug2( 'CDN: rewriting failed: path not match: ' . LSWCP_CONTENT_FOLDER ) ;
474
  return false ;
475
  }
476
  }
@@ -677,25 +677,41 @@ class LiteSpeed_Cache_CDN
677
  */
678
  public function cloudflare_fetch_zone( $options )
679
  {
 
 
680
  $url = 'https://api.cloudflare.com/client/v4/zones?status=active&match=all' ;
681
 
 
 
 
 
 
 
 
 
 
 
682
  $zones = $this->_cloudflare_call( $url, 'GET', false, $options, false ) ;
683
 
684
  if ( ! $zones ) {
 
685
  return false ;
686
  }
687
 
688
- $kw = $options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_NAME ] ;
689
  if ( ! $kw ) {
 
690
  return $zones[ 0 ] ;
691
  }
692
 
693
  foreach ( $zones as $v ) {
694
  if ( strpos( $v[ 'name' ], $kw ) !== false ) {
 
695
  return $v ;
696
  }
697
  }
698
 
 
 
699
  return $zones[ 0 ] ;
700
  }
701
 
468
  $url_parsed = parse_url( $url ) ;
469
 
470
  // Only images under wp-cotnent/wp-includes can be replaced
471
+ if ( stripos( $url_parsed[ 'path' ], LSCWP_CONTENT_FOLDER ) === false && stripos( $url_parsed[ 'path' ], 'wp-includes' ) === false && stripos( $url_parsed[ 'path' ], '/min/' ) === false ) {
472
  if ( ! defined( 'UPLOADS' ) || stripos( $url_parsed[ 'path' ], UPLOADS ) === false ) {
473
+ LiteSpeed_Cache_Log::debug2( 'CDN: rewriting failed: path not match: ' . LSCWP_CONTENT_FOLDER ) ;
474
  return false ;
475
  }
476
  }
677
  */
678
  public function cloudflare_fetch_zone( $options )
679
  {
680
+ $kw = $options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_NAME ] ;
681
+
682
  $url = 'https://api.cloudflare.com/client/v4/zones?status=active&match=all' ;
683
 
684
+ // Try exact match first
685
+ if ( $kw && strpos( $kw, '.' ) ) {
686
+ $zones = $this->_cloudflare_call( $url . '&name=' . $kw, 'GET', false, $options, false ) ;
687
+ if ( $zones ) {
688
+ LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone exact matched' ) ;
689
+ return $zones[ 0 ] ;
690
+ }
691
+ }
692
+
693
+ // Can't find, try to get default one
694
  $zones = $this->_cloudflare_call( $url, 'GET', false, $options, false ) ;
695
 
696
  if ( ! $zones ) {
697
+ LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone no zone' ) ;
698
  return false ;
699
  }
700
 
 
701
  if ( ! $kw ) {
702
+ LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone no set name, use first one by default' ) ;
703
  return $zones[ 0 ] ;
704
  }
705
 
706
  foreach ( $zones as $v ) {
707
  if ( strpos( $v[ 'name' ], $kw ) !== false ) {
708
+ LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone matched ' . $kw . ' [name] ' . $v[ 'name' ] ) ;
709
  return $v ;
710
  }
711
  }
712
 
713
+ // Can't match current name, return default one
714
+ LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone failed match name, use first one by default' ) ;
715
  return $zones[ 0 ] ;
716
  }
717
 
inc/config.class.php CHANGED
@@ -27,6 +27,18 @@ class LiteSpeed_Cache_Config
27
  const ITEM_CDN_MAPPING = 'litespeed-cache-cdn_mapping' ;
28
  const ITEM_DNS_PREFETCH = 'litespeed-cache-dns_prefetch' ;
29
  const ITEM_CLOUDFLARE_STATUS = 'litespeed-cache-cloudflare_status' ;
 
 
 
 
 
 
 
 
 
 
 
 
30
  // const ITEM_FAVICON = 'litespeed-cache-favicon' ;
31
 
32
  const ITEM_CDN_MAPPING_URL = 'url' ;
@@ -56,6 +68,17 @@ class LiteSpeed_Cache_Config
56
  const OPID_CACHE_MOBILE = 'mobileview_enabled' ;
57
  const ID_MOBILEVIEW_LIST = 'mobileview_rules' ;
58
  const OPID_CACHE_URI_PRIV = 'cache_uri_priv' ;
 
 
 
 
 
 
 
 
 
 
 
59
  const OPID_CACHE_BROWSER = 'cache_browser' ;
60
  const OPID_CACHE_BROWSER_TTL = 'cache_browser_ttl' ;
61
 
@@ -77,8 +100,6 @@ class LiteSpeed_Cache_Config
77
  const OPID_DEBUG_COOKIE = 'debug_cookie' ;
78
  const OPID_COLLAPS_QS = 'collaps_qs' ;
79
  const OPID_LOG_FILTERS = 'log_filters' ;
80
- const OPID_LOG_IGNORE_FILTERS = 'log_ignore_filters' ;
81
- const OPID_LOG_IGNORE_PART_FILTERS = 'log_ignore_part_filters' ;
82
 
83
  const OPID_PUBLIC_TTL = 'public_ttl' ;
84
  const OPID_PRIVATE_TTL = 'private_ttl' ;
@@ -108,6 +129,7 @@ class LiteSpeed_Cache_Config
108
  const OPID_EXCLUDES_TAG = 'excludes_tag' ;
109
 
110
  // const OPID_ADV_FAVICON = 'adv_favicon' ;
 
111
 
112
  const OPID_CSS_MINIFY = 'css_minify' ;
113
  const OPID_CSS_COMBINE = 'css_combine' ;
@@ -215,7 +237,7 @@ class LiteSpeed_Cache_Config
215
  }
216
 
217
  // Vary group settings
218
- $this->vary_groups = get_option( self::VARY_GROUP, array() ) ;
219
 
220
  // Exclude optimization role setting
221
  $this->exclude_optimization_roles = get_option( self::EXCLUDE_OPTIMIZATION_ROLES, array() ) ;
@@ -312,9 +334,9 @@ class LiteSpeed_Cache_Config
312
  if ( isset( $this->options[$id] ) ) {
313
  return $this->options[$id] ;
314
  }
315
- if ( LiteSpeed_Cache_Log::initialized() ) {
316
- LiteSpeed_Cache_Log::debug( 'Invalid option ID ' . $id ) ;
317
- }
318
  return NULL ;
319
  }
320
 
@@ -523,6 +545,17 @@ class LiteSpeed_Cache_Config
523
  self::OPID_CACHE_MOBILE => false,
524
  self::ID_MOBILEVIEW_LIST => false,
525
  self::OPID_CACHE_URI_PRIV => '',
 
 
 
 
 
 
 
 
 
 
 
526
  self::OPID_CACHE_BROWSER => false,
527
  self::OPID_CACHE_BROWSER_TTL => 2592000,
528
 
@@ -537,8 +570,6 @@ class LiteSpeed_Cache_Config
537
  self::OPID_DEBUG_COOKIE => false,
538
  self::OPID_COLLAPS_QS => false,
539
  self::OPID_LOG_FILTERS => false,
540
- self::OPID_LOG_IGNORE_FILTERS => "gettext\ngettext_with_context\nget_the_terms\nget_term",
541
- self::OPID_LOG_IGNORE_PART_FILTERS => "i18n\nlocale\nsettings\noption",
542
  self::OPID_PUBLIC_TTL => 604800,
543
  self::OPID_PRIVATE_TTL => 1800,
544
  self::OPID_FRONT_PAGE_TTL => 604800,
@@ -553,6 +584,7 @@ class LiteSpeed_Cache_Config
553
  self::OPID_EXCLUDES_TAG => '',
554
 
555
  // self::OPID_ADV_FAVICON => false,
 
556
 
557
  self::OPID_CSS_MINIFY => false,
558
  self::OPID_CSS_COMBINE => false,
@@ -652,6 +684,17 @@ class LiteSpeed_Cache_Config
652
  self::OPID_CACHE_RES => true,
653
  self::OPID_CACHE_MOBILE => 0, // todo: why not false
654
  self::ID_MOBILEVIEW_LIST => false,
 
 
 
 
 
 
 
 
 
 
 
655
  self::OPID_CACHE_BROWSER => false,
656
  self::OPID_CACHE_BROWSER_TTL => 2592000,
657
  self::OPID_LOGIN_COOKIE => '',
@@ -663,6 +706,28 @@ class LiteSpeed_Cache_Config
663
  return $default_site_options ;
664
  }
665
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
666
  /**
667
  * Get the plugin's site wide options.
668
  *
@@ -907,9 +972,7 @@ class LiteSpeed_Cache_Config
907
 
908
  $res = add_option( self::OPTION_NAME, $this->get_default_options() ) ;
909
 
910
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
911
- LiteSpeed_Cache_Log::push( "plugin_activation update option = " . var_export( $res, true ) ) ;
912
- }
913
 
914
  if ( is_multisite() ) {
915
 
27
  const ITEM_CDN_MAPPING = 'litespeed-cache-cdn_mapping' ;
28
  const ITEM_DNS_PREFETCH = 'litespeed-cache-dns_prefetch' ;
29
  const ITEM_CLOUDFLARE_STATUS = 'litespeed-cache-cloudflare_status' ;
30
+ const ITEM_LOG_IGNORE_FILTERS = 'litespeed-log_ignore_filters' ;
31
+ const ITEM_LOG_IGNORE_PART_FILTERS = 'litespeed-log_ignore_part_filters' ;
32
+ const ITEM_OBJECT_GLOBAL_GROUPS = 'litespeed-object_global_groups' ;
33
+ const ITEM_OBJECT_NON_PERSISTENT_GROUPS = 'litespeed-object_non_persistent_groups' ;
34
+
35
+ const ITEM_SETTING_MODE = 'litespeed-setting-mode' ;
36
+
37
+ // Server variables
38
+ const ENV_CRAWLER_USLEEP = 'CRAWLER_USLEEP' ;
39
+ const ENV_CRAWLER_LOAD_LIMIT = 'CRAWLER_LOAD_LIMIT' ;
40
+ const ENV_CRAWLER_LOAD_LIMIT_ENFORCE = 'CRAWLER_LOAD_LIMIT_ENFORCE' ;
41
+
42
  // const ITEM_FAVICON = 'litespeed-cache-favicon' ;
43
 
44
  const ITEM_CDN_MAPPING_URL = 'url' ;
68
  const OPID_CACHE_MOBILE = 'mobileview_enabled' ;
69
  const ID_MOBILEVIEW_LIST = 'mobileview_rules' ;
70
  const OPID_CACHE_URI_PRIV = 'cache_uri_priv' ;
71
+ const OPID_CACHE_OBJECT = 'cache_object' ;
72
+ const OPID_CACHE_OBJECT_KIND = 'cache_object_kind' ;
73
+ const OPID_CACHE_OBJECT_HOST = 'cache_object_host' ;
74
+ const OPID_CACHE_OBJECT_PORT = 'cache_object_port' ;
75
+ const OPID_CACHE_OBJECT_LIFE = 'cache_object_life' ;
76
+ const OPID_CACHE_OBJECT_PERSISTENT = 'cache_object_persistent' ;
77
+ const OPID_CACHE_OBJECT_ADMIN = 'cache_object_admin' ;
78
+ const OPID_CACHE_OBJECT_TRANSIENTS = 'cache_object_transients' ;
79
+ const OPID_CACHE_OBJECT_DB_ID = 'cache_object_db_id' ;
80
+ const OPID_CACHE_OBJECT_USER = 'cache_object_user' ;
81
+ const OPID_CACHE_OBJECT_PSWD = 'cache_object_pswd' ;
82
  const OPID_CACHE_BROWSER = 'cache_browser' ;
83
  const OPID_CACHE_BROWSER_TTL = 'cache_browser_ttl' ;
84
 
100
  const OPID_DEBUG_COOKIE = 'debug_cookie' ;
101
  const OPID_COLLAPS_QS = 'collaps_qs' ;
102
  const OPID_LOG_FILTERS = 'log_filters' ;
 
 
103
 
104
  const OPID_PUBLIC_TTL = 'public_ttl' ;
105
  const OPID_PRIVATE_TTL = 'private_ttl' ;
129
  const OPID_EXCLUDES_TAG = 'excludes_tag' ;
130
 
131
  // const OPID_ADV_FAVICON = 'adv_favicon' ;
132
+ const OPID_ADV_INSTANT_CLICK = 'instant_click' ;
133
 
134
  const OPID_CSS_MINIFY = 'css_minify' ;
135
  const OPID_CSS_COMBINE = 'css_combine' ;
237
  }
238
 
239
  // Vary group settings
240
+ $this->vary_groups = (array) get_option( self::VARY_GROUP, array() ) ;
241
 
242
  // Exclude optimization role setting
243
  $this->exclude_optimization_roles = get_option( self::EXCLUDE_OPTIMIZATION_ROLES, array() ) ;
334
  if ( isset( $this->options[$id] ) ) {
335
  return $this->options[$id] ;
336
  }
337
+
338
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Invalid option ID ' . $id ) ;
339
+
340
  return NULL ;
341
  }
342
 
545
  self::OPID_CACHE_MOBILE => false,
546
  self::ID_MOBILEVIEW_LIST => false,
547
  self::OPID_CACHE_URI_PRIV => '',
548
+ self::OPID_CACHE_OBJECT => false,
549
+ self::OPID_CACHE_OBJECT_KIND => false,
550
+ self::OPID_CACHE_OBJECT_HOST => 'localhost',
551
+ self::OPID_CACHE_OBJECT_PORT => '11211',
552
+ self::OPID_CACHE_OBJECT_LIFE => '360',
553
+ self::OPID_CACHE_OBJECT_PERSISTENT => true,
554
+ self::OPID_CACHE_OBJECT_ADMIN => true,
555
+ self::OPID_CACHE_OBJECT_TRANSIENTS => true,
556
+ self::OPID_CACHE_OBJECT_DB_ID => 0,
557
+ self::OPID_CACHE_OBJECT_USER => '',
558
+ self::OPID_CACHE_OBJECT_PSWD => '',
559
  self::OPID_CACHE_BROWSER => false,
560
  self::OPID_CACHE_BROWSER_TTL => 2592000,
561
 
570
  self::OPID_DEBUG_COOKIE => false,
571
  self::OPID_COLLAPS_QS => false,
572
  self::OPID_LOG_FILTERS => false,
 
 
573
  self::OPID_PUBLIC_TTL => 604800,
574
  self::OPID_PRIVATE_TTL => 1800,
575
  self::OPID_FRONT_PAGE_TTL => 604800,
584
  self::OPID_EXCLUDES_TAG => '',
585
 
586
  // self::OPID_ADV_FAVICON => false,
587
+ self::OPID_ADV_INSTANT_CLICK => false,
588
 
589
  self::OPID_CSS_MINIFY => false,
590
  self::OPID_CSS_COMBINE => false,
684
  self::OPID_CACHE_RES => true,
685
  self::OPID_CACHE_MOBILE => 0, // todo: why not false
686
  self::ID_MOBILEVIEW_LIST => false,
687
+ self::OPID_CACHE_OBJECT => false,
688
+ self::OPID_CACHE_OBJECT_KIND => false,
689
+ self::OPID_CACHE_OBJECT_HOST => 'localhost',
690
+ self::OPID_CACHE_OBJECT_PORT => '11211',
691
+ self::OPID_CACHE_OBJECT_LIFE => '360',
692
+ self::OPID_CACHE_OBJECT_PERSISTENT => true,
693
+ self::OPID_CACHE_OBJECT_ADMIN => true,
694
+ self::OPID_CACHE_OBJECT_TRANSIENTS => true,
695
+ self::OPID_CACHE_OBJECT_DB_ID => 0,
696
+ self::OPID_CACHE_OBJECT_USER => '',
697
+ self::OPID_CACHE_OBJECT_PSWD => '',
698
  self::OPID_CACHE_BROWSER => false,
699
  self::OPID_CACHE_BROWSER_TTL => 2592000,
700
  self::OPID_LOGIN_COOKIE => '',
706
  return $default_site_options ;
707
  }
708
 
709
+ /**
710
+ * Get default item val
711
+ *
712
+ * @since 1.8
713
+ * @access public
714
+ */
715
+ public function default_item( $k )
716
+ {
717
+ switch ( $k ) {
718
+ case self::ITEM_OBJECT_GLOBAL_GROUPS :
719
+ return "users\nuserlogins\nusermeta\nuser_meta\nsite-transient\nsite-options\nsite-lookup\nblog-lookup\nblog-details\nrss\nglobal-posts\nblog-id-cache" ;
720
+
721
+ case self::ITEM_OBJECT_NON_PERSISTENT_GROUPS :
722
+ return "comment\ncounts\nplugins" ;
723
+
724
+ default :
725
+ break ;
726
+ }
727
+
728
+ return false ;
729
+ }
730
+
731
  /**
732
  * Get the plugin's site wide options.
733
  *
972
 
973
  $res = add_option( self::OPTION_NAME, $this->get_default_options() ) ;
974
 
975
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( "plugin_activation update option = " . var_export( $res, true ) ) ;
 
 
976
 
977
  if ( is_multisite() ) {
978
 
inc/control.class.php CHANGED
@@ -79,7 +79,7 @@ class LiteSpeed_Cache_Control
79
  $cache_res = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_RES ) ;
80
  if ( $cache_res ) {
81
  $uri = esc_url( $_SERVER["REQUEST_URI"] ) ;
82
- $pattern = '!' . LSWCP_CONTENT_FOLDER . LiteSpeed_Cache_Admin_Rules::RW_PATTERN_RES . '!' ;
83
  if ( preg_match( $pattern, $uri ) ) {
84
  add_action( 'wp_loaded', 'LiteSpeed_Cache_Control::set_cacheable', 5 ) ;
85
  }
79
  $cache_res = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_RES ) ;
80
  if ( $cache_res ) {
81
  $uri = esc_url( $_SERVER["REQUEST_URI"] ) ;
82
+ $pattern = '!' . LSCWP_CONTENT_FOLDER . LiteSpeed_Cache_Admin_Rules::RW_PATTERN_RES . '!' ;
83
  if ( preg_match( $pattern, $uri ) ) {
84
  add_action( 'wp_loaded', 'LiteSpeed_Cache_Control::set_cacheable', 5 ) ;
85
  }
inc/crawler.class.php CHANGED
@@ -26,7 +26,7 @@ class LiteSpeed_Cache_Crawler
26
  */
27
  private function __construct()
28
  {
29
- $sitemapPath = LSWCP_DIR . 'var' ;
30
  if ( is_multisite() ) {
31
  $blogID = get_current_blog_id() ;
32
  $this->_sitemap_file = $sitemapPath . '/crawlermap-' . $blogID . '.data' ;
@@ -139,9 +139,8 @@ class LiteSpeed_Cache_Crawler
139
  */
140
  public function append_blacklist( $list )
141
  {
142
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
143
- LiteSpeed_Cache_Log::push( 'Crawler log: append blacklist ' . count( $list ) ) ;
144
- }
145
  $ori_list = Litespeed_File::read( $this->_blacklist_file ) ;
146
  $ori_list = explode( "\n", $ori_list ) ;
147
  $ori_list = array_merge( $ori_list, $list ) ;
@@ -384,9 +383,26 @@ class LiteSpeed_Cache_Crawler
384
  }
385
  $crawler->set_base_url($this->_home_url) ;
386
  $crawler->set_run_duration($options[LiteSpeed_Cache_Config::CRWL_RUN_DURATION]) ;
387
- $crawler->set_run_delay($options[LiteSpeed_Cache_Config::CRWL_USLEEP]) ;
388
- $crawler->set_threads_limit($options[LiteSpeed_Cache_Config::CRWL_THREADS]) ;
389
- $crawler->set_load_limit($options[LiteSpeed_Cache_Config::CRWL_LOAD_LIMIT]) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
390
  if ( $options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP] ) {
391
  $crawler->set_domain_ip($options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP]) ;
392
  }
@@ -397,8 +413,8 @@ class LiteSpeed_Cache_Crawler
397
  $this->append_blacklist($ret['blacklist']) ;
398
  }
399
 
400
- if ( ! empty($ret['crawled']) && LiteSpeed_Cache_Log::get_enabled() ) {
401
- LiteSpeed_Cache_Log::push('Crawler log: Last crawled ' . $ret['crawled'] . ' item(s)') ;
402
  }
403
 
404
  // return error
@@ -442,7 +458,7 @@ class LiteSpeed_Cache_Crawler
442
  */
443
  public static function get_instance()
444
  {
445
- if ( ! isset(self::$_instance) ) {
446
  self::$_instance = new self() ;
447
  }
448
 
26
  */
27
  private function __construct()
28
  {
29
+ $sitemapPath = LSCWP_DIR . 'var' ;
30
  if ( is_multisite() ) {
31
  $blogID = get_current_blog_id() ;
32
  $this->_sitemap_file = $sitemapPath . '/crawlermap-' . $blogID . '.data' ;
139
  */
140
  public function append_blacklist( $list )
141
  {
142
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Crawler log: append blacklist ' . count( $list ) ) ;
143
+
 
144
  $ori_list = Litespeed_File::read( $this->_blacklist_file ) ;
145
  $ori_list = explode( "\n", $ori_list ) ;
146
  $ori_list = array_merge( $ori_list, $list ) ;
383
  }
384
  $crawler->set_base_url($this->_home_url) ;
385
  $crawler->set_run_duration($options[LiteSpeed_Cache_Config::CRWL_RUN_DURATION]) ;
386
+
387
+ /**
388
+ * Limit delay to use server setting
389
+ * @since 1.8.3
390
+ */
391
+ $usleep = $options[ LiteSpeed_Cache_Config::CRWL_USLEEP ] ;
392
+ if ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] ) && $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] > $usleep ) {
393
+ $usleep = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] ;
394
+ }
395
+ $crawler->set_run_delay( $usleep ) ;
396
+ $crawler->set_threads_limit( $options[ LiteSpeed_Cache_Config::CRWL_THREADS ] ) ;
397
+
398
+ $server_load_limit = $options[ LiteSpeed_Cache_Config::CRWL_LOAD_LIMIT ] ;
399
+ if ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ) ) {
400
+ $server_load_limit = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ;
401
+ }
402
+ elseif ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT ] ) && $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT ] < $server_load_limit ) {
403
+ $server_load_limit = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT ] ;
404
+ }
405
+ $crawler->set_load_limit( $server_load_limit ) ;
406
  if ( $options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP] ) {
407
  $crawler->set_domain_ip($options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP]) ;
408
  }
413
  $this->append_blacklist($ret['blacklist']) ;
414
  }
415
 
416
+ if ( ! empty($ret['crawled']) ) {
417
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Crawler log: Last crawled ' . $ret[ 'crawled' ] . ' item(s)' ) ;
418
  }
419
 
420
  // return error
458
  */
459
  public static function get_instance()
460
  {
461
+ if ( ! isset( self::$_instance ) ) {
462
  self::$_instance = new self() ;
463
  }
464
 
inc/esi.class.php CHANGED
@@ -42,6 +42,19 @@ class LiteSpeed_Cache_ESI
42
  add_action( 'template_include', 'LiteSpeed_Cache_ESI::esi_template', 100 ) ;
43
  add_action( 'load-widgets.php', 'LiteSpeed_Cache_Purge::purge_widget' ) ;
44
  add_action( 'wp_update_comment_count', 'LiteSpeed_Cache_Purge::purge_comment_widget' ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  }
46
 
47
  /**
@@ -80,12 +93,10 @@ class LiteSpeed_Cache_ESI
80
  public static function esi_template($template)
81
  {
82
  // Check if is an ESI request
83
- if ( ! empty( $_GET[ LiteSpeed_Cache_ESI::QS_ACTION ] ) && $_GET[ LiteSpeed_Cache_ESI::QS_ACTION ] == LiteSpeed_Cache_ESI::POSTTYPE ) {
84
- define('LSCACHE_IS_ESI', true) ;
85
-
86
  self::get_instance()->register_esi_actions() ;
87
 
88
- return LSWCP_DIR . 'tpl/esi.tpl.php' ;
89
  }
90
  self::get_instance()->register_not_esi_actions() ;
91
  return $template ;
@@ -164,11 +175,8 @@ class LiteSpeed_Cache_ESI
164
  $params = apply_filters('litespeed_cache_sub_esi_params-' . $block_id, $params) ;
165
  $control = apply_filters('litespeed_cache_sub_esi_control-' . $block_id, $control) ;
166
  if ( !is_array($params) || !is_string($control) ) {
167
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
168
- LiteSpeed_Cache_Log::push("Sub esi hooks returned Params: \n"
169
- . var_export($params, true) . "\ncache control: \n"
170
- . var_export($control, true)) ;
171
- }
172
  return false ;
173
  }
174
 
@@ -183,7 +191,7 @@ class LiteSpeed_Cache_ESI
183
  $output = "<!-- lscwp $wrapper -->$output<!-- lscwp $wrapper esi end -->" ;
184
  }
185
 
186
- LiteSpeed_Cache_Log::debug( "ESI block ID:$block_id; $wrapper; $control" ) ;
187
 
188
  self::set_has_esi() ;
189
  return $output ;
@@ -227,30 +235,25 @@ class LiteSpeed_Cache_ESI
227
  return ;
228
  }
229
  $esi_id = $params[ self::PARAM_BLOCK_ID ] ;
230
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
231
  $logInfo = '------- ESI ------- ' ;
232
  if( ! empty( $params[ self::PARAM_NAME ] ) ) {
233
  $logInfo .= ' Name: ' . $params[ self::PARAM_NAME ] . ' ----- ' ;
234
  }
235
  $logInfo .= $esi_id . ' -------' ;
236
- LiteSpeed_Cache_Log::push( $logInfo ) ;
237
  }
238
 
239
  if ( ! empty( $params[ '_ls_silence' ] ) ) {
240
  define( 'LSCACHE_ESI_SILENCE', true ) ;
241
  }
242
 
243
- $orig = $_SERVER[ 'REQUEST_URI' ] ;
244
- $_SERVER[ 'REQUEST_URI' ] = !empty( $_SERVER[ 'ESI_REFERER' ] ) ? $_SERVER[ 'ESI_REFERER' ] : false ;
245
-
246
  LiteSpeed_Cache_Tag::add( rtrim( LiteSpeed_Cache_Tag::TYPE_ESI, '.' ) ) ;
247
  LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_ESI . $esi_id ) ;
248
 
249
  // LiteSpeed_Cache_Log::debug(var_export($params, true ));
250
 
251
  do_action('litespeed_cache_load_esi_block-' . $esi_id, $params) ;
252
-
253
- $_SERVER[ 'REQUEST_URI' ] = $orig ;
254
  }
255
 
256
  // BEGIN helper functions
@@ -343,9 +346,8 @@ class LiteSpeed_Cache_ESI
343
  }
344
  $options = $instance[ LiteSpeed_Cache_Config::OPTION_NAME ] ;
345
  if ( ! isset( $options ) || ! $options[ self::WIDGET_OPID_ESIENABLE ] ) {
346
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
347
- LiteSpeed_Cache_Log::push( 'ESI 0 ' . $name . ': '. ( ! isset( $options ) ? 'not set' : 'set off' ) ) ;
348
- }
349
  return $instance ;
350
  }
351
 
@@ -378,7 +380,12 @@ class LiteSpeed_Cache_ESI
378
  return ;
379
  }
380
 
381
- echo self::sub_esi_block('admin-bar', 'adminbar') ;
 
 
 
 
 
382
  }
383
 
384
  /**
@@ -396,9 +403,7 @@ class LiteSpeed_Cache_ESI
396
  $option = self::widget_load_get_options( $widget ) ;
397
  // Since we only reach here via esi, safe to assume setting exists.
398
  $ttl = $option[ self::WIDGET_OPID_TTL ] ;
399
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
400
- LiteSpeed_Cache_Log::push( 'ESI widget render: name ' . $params[ self::PARAM_NAME ] . ', id ' . $params[ self::PARAM_ID ] . ', ttl ' . $ttl ) ;
401
- }
402
  if ( $ttl == 0 ) {
403
  LiteSpeed_Cache_Control::set_nocache( 'ESI Widget time to live set to 0' ) ;
404
  }
@@ -430,6 +435,8 @@ class LiteSpeed_Cache_ESI
430
  LiteSpeed_Cache_Control::set_private() ;
431
  LiteSpeed_Cache_Control::set_no_vary() ;
432
  }
 
 
433
  }
434
 
435
 
42
  add_action( 'template_include', 'LiteSpeed_Cache_ESI::esi_template', 100 ) ;
43
  add_action( 'load-widgets.php', 'LiteSpeed_Cache_Purge::purge_widget' ) ;
44
  add_action( 'wp_update_comment_count', 'LiteSpeed_Cache_Purge::purge_comment_widget' ) ;
45
+
46
+ /**
47
+ * Recover REQUEST_URI
48
+ * @since 1.8.1
49
+ */
50
+ if ( ! empty( $_GET[ self::QS_ACTION ] ) && $_GET[ self::QS_ACTION ] == self::POSTTYPE ) {
51
+ define( 'LSCACHE_IS_ESI', true ) ;
52
+
53
+ if ( ! empty( $_SERVER[ 'ESI_REFERER' ] ) ) {
54
+ $_SERVER[ 'REQUEST_URI' ] = $_SERVER[ 'ESI_REFERER' ] ;
55
+ }
56
+ }
57
+
58
  }
59
 
60
  /**
93
  public static function esi_template($template)
94
  {
95
  // Check if is an ESI request
96
+ if ( defined( 'LSCACHE_IS_ESI' ) ) {
 
 
97
  self::get_instance()->register_esi_actions() ;
98
 
99
+ return LSCWP_DIR . 'tpl/esi.tpl.php' ;
100
  }
101
  self::get_instance()->register_not_esi_actions() ;
102
  return $template ;
175
  $params = apply_filters('litespeed_cache_sub_esi_params-' . $block_id, $params) ;
176
  $control = apply_filters('litespeed_cache_sub_esi_control-' . $block_id, $control) ;
177
  if ( !is_array($params) || !is_string($control) ) {
178
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( "Sub esi hooks returned Params: \n" . var_export($params, true) . "\ncache control: \n" . var_export($control, true) ) ;
179
+
 
 
 
180
  return false ;
181
  }
182
 
191
  $output = "<!-- lscwp $wrapper -->$output<!-- lscwp $wrapper esi end -->" ;
192
  }
193
 
194
+ LiteSpeed_Cache_Log::debug( "ESI: \t\t[block ID] $block_id \t\t\t[wrapper] $wrapper \t\t\t[Control] $control" ) ;
195
 
196
  self::set_has_esi() ;
197
  return $output ;
235
  return ;
236
  }
237
  $esi_id = $params[ self::PARAM_BLOCK_ID ] ;
238
+ if ( defined( 'LSCWP_LOG' ) ) {
239
  $logInfo = '------- ESI ------- ' ;
240
  if( ! empty( $params[ self::PARAM_NAME ] ) ) {
241
  $logInfo .= ' Name: ' . $params[ self::PARAM_NAME ] . ' ----- ' ;
242
  }
243
  $logInfo .= $esi_id . ' -------' ;
244
+ LiteSpeed_Cache_Log::debug( $logInfo ) ;
245
  }
246
 
247
  if ( ! empty( $params[ '_ls_silence' ] ) ) {
248
  define( 'LSCACHE_ESI_SILENCE', true ) ;
249
  }
250
 
 
 
 
251
  LiteSpeed_Cache_Tag::add( rtrim( LiteSpeed_Cache_Tag::TYPE_ESI, '.' ) ) ;
252
  LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_ESI . $esi_id ) ;
253
 
254
  // LiteSpeed_Cache_Log::debug(var_export($params, true ));
255
 
256
  do_action('litespeed_cache_load_esi_block-' . $esi_id, $params) ;
 
 
257
  }
258
 
259
  // BEGIN helper functions
346
  }
347
  $options = $instance[ LiteSpeed_Cache_Config::OPTION_NAME ] ;
348
  if ( ! isset( $options ) || ! $options[ self::WIDGET_OPID_ESIENABLE ] ) {
349
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'ESI 0 ' . $name . ': '. ( ! isset( $options ) ? 'not set' : 'set off' ) ) ;
350
+
 
351
  return $instance ;
352
  }
353
 
380
  return ;
381
  }
382
 
383
+ // To make each admin bar ESI request different for `Edit` button different link
384
+ $params = array(
385
+ 'ref' => $_SERVER[ 'REQUEST_URI' ],
386
+ ) ;
387
+
388
+ echo self::sub_esi_block( 'admin-bar', 'adminbar', $params ) ;
389
  }
390
 
391
  /**
403
  $option = self::widget_load_get_options( $widget ) ;
404
  // Since we only reach here via esi, safe to assume setting exists.
405
  $ttl = $option[ self::WIDGET_OPID_TTL ] ;
406
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'ESI widget render: name ' . $params[ self::PARAM_NAME ] . ', id ' . $params[ self::PARAM_ID ] . ', ttl ' . $ttl ) ;
 
 
407
  if ( $ttl == 0 ) {
408
  LiteSpeed_Cache_Control::set_nocache( 'ESI Widget time to live set to 0' ) ;
409
  }
435
  LiteSpeed_Cache_Control::set_private() ;
436
  LiteSpeed_Cache_Control::set_no_vary() ;
437
  }
438
+
439
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'ESI: adminbar ref: ' . $_SERVER[ 'REQUEST_URI' ] ) ;
440
  }
441
 
442
 
inc/gui.class.php CHANGED
@@ -28,10 +28,20 @@ class LiteSpeed_Cache_GUI
28
  */
29
  private function __construct()
30
  {
31
- if ( ! is_admin() && is_admin_bar_showing() && current_user_can( 'manage_options' ) ) {
32
  LiteSpeed_Cache_Log::debug( 'GUI init' ) ;
33
- add_action( 'wp_enqueue_scripts', array( $this, 'frontend_enqueue_style' ) ) ;
34
- add_action( 'admin_bar_menu', array( $this, 'frontend_shortcut' ), 95 ) ;
 
 
 
 
 
 
 
 
 
 
35
  }
36
 
37
  // if ( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_ADV_FAVICON ) ) {
@@ -153,11 +163,22 @@ class LiteSpeed_Cache_GUI
153
  return true ;
154
  }
155
 
 
 
 
 
 
 
 
 
 
 
 
156
  /**
157
  * Load frontend menu shortcut
158
  *
159
  * @since 1.3
160
- * @access private
161
  */
162
  public function frontend_enqueue_style()
163
  {
@@ -168,7 +189,7 @@ class LiteSpeed_Cache_GUI
168
  * Load frontend menu shortcut
169
  *
170
  * @since 1.3
171
- * @access private
172
  */
173
  public function frontend_shortcut()
174
  {
@@ -280,6 +301,26 @@ class LiteSpeed_Cache_GUI
280
  ) );
281
  }
282
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  }
284
 
285
  /**
28
  */
29
  private function __construct()
30
  {
31
+ if ( ! is_admin() ) {
32
  LiteSpeed_Cache_Log::debug( 'GUI init' ) ;
33
+ if ( is_admin_bar_showing() && current_user_can( 'manage_options' ) ) {
34
+ add_action( 'wp_enqueue_scripts', array( $this, 'frontend_enqueue_style' ) ) ;
35
+ add_action( 'admin_bar_menu', array( $this, 'frontend_shortcut' ), 95 ) ;
36
+ }
37
+
38
+ /**
39
+ * Turn on instant click
40
+ * @since 1.8.2
41
+ */
42
+ if ( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_ADV_INSTANT_CLICK ) ) {
43
+ add_action( 'wp_enqueue_scripts', array( $this, 'frontend_enqueue_style_public' ) ) ;
44
+ }
45
  }
46
 
47
  // if ( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_ADV_FAVICON ) ) {
163
  return true ;
164
  }
165
 
166
+ /**
167
+ * Load frontend public script
168
+ *
169
+ * @since 1.8.2
170
+ * @access public
171
+ */
172
+ public function frontend_enqueue_style_public()
173
+ {
174
+ wp_enqueue_script( LiteSpeed_Cache::PLUGIN_NAME, LSWCP_PLUGIN_URL . 'js/instant_click.min.js', array(), LiteSpeed_Cache::PLUGIN_VERSION, true ) ;
175
+ }
176
+
177
  /**
178
  * Load frontend menu shortcut
179
  *
180
  * @since 1.3
181
+ * @access public
182
  */
183
  public function frontend_enqueue_style()
184
  {
189
  * Load frontend menu shortcut
190
  *
191
  * @since 1.3
192
+ * @access public
193
  */
194
  public function frontend_shortcut()
195
  {
301
  ) );
302
  }
303
 
304
+ if ( defined( 'LSCWP_OBJECT_CACHE' ) ) {
305
+ $wp_admin_bar->add_menu( array(
306
+ 'parent' => 'litespeed-menu',
307
+ 'id' => 'litespeed-purge-object',
308
+ 'title' => __( 'Object Cache Purge All', 'litespeed-cache' ),
309
+ 'href' => LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_PURGE, LiteSpeed_Cache_Purge::TYPE_OBJECT_PURGE_ALL ),
310
+ 'meta' => array( 'tabindex' => '0' ),
311
+ ) );
312
+ }
313
+
314
+ if ( LiteSpeed_Cache_Router::opcache_enabled() ) {
315
+ $wp_admin_bar->add_menu( array(
316
+ 'parent' => 'litespeed-menu',
317
+ 'id' => 'litespeed-purge-opcache',
318
+ 'title' => __( 'Opcode Cache Purge All', 'litespeed-cache' ),
319
+ 'href' => LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_PURGE, LiteSpeed_Cache_Purge::TYPE_OPCACHE_PURGE_ALL ),
320
+ 'meta' => array( 'tabindex' => '0' ),
321
+ ) );
322
+ }
323
+
324
  }
325
 
326
  /**
inc/import.class.php ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The import/export class.
4
+ *
5
+ * @since 1.8.2
6
+ * @package LiteSpeed_Cache
7
+ * @subpackage LiteSpeed_Cache/inc
8
+ * @author LiteSpeed Technologies <info@litespeedtech.com>
9
+ */
10
+ class LiteSpeed_Cache_Import
11
+ {
12
+ private static $_instance ;
13
+
14
+ private $_cfg_items ;
15
+
16
+ const TYPE_IMPORT = 'import' ;
17
+ const TYPE_EXPORT = 'export' ;
18
+
19
+ const DB_IMPORT_LOG = 'litespeed_import_log' ;
20
+
21
+ /**
22
+ * Init
23
+ *
24
+ * @since 1.8.2
25
+ * @access private
26
+ */
27
+ private function __construct()
28
+ {
29
+ LiteSpeed_Cache_Log::debug( 'Import init' ) ;
30
+
31
+ $this->_cfg_items = array(
32
+ LiteSpeed_Cache_Config::OPTION_NAME,
33
+ LiteSpeed_Cache_Config::VARY_GROUP,
34
+ LiteSpeed_Cache_Config::EXCLUDE_OPTIMIZATION_ROLES,
35
+ LiteSpeed_Cache_Config::EXCLUDE_CACHE_ROLES,
36
+ LiteSpeed_Cache_Config::ITEM_OPTM_CSS,
37
+ LiteSpeed_Cache_Config::ITEM_OPTM_JS_DEFER_EXC,
38
+ LiteSpeed_Cache_Config::ITEM_MEDIA_LAZY_IMG_EXC,
39
+ LiteSpeed_Cache_Config::ITEM_MEDIA_NEED_PULL,
40
+ LiteSpeed_Cache_Config::ITEM_ENV_REF,
41
+ LiteSpeed_Cache_Config::ITEM_CACHE_DROP_QS,
42
+ LiteSpeed_Cache_Config::ITEM_CDN_MAPPING,
43
+ LiteSpeed_Cache_Config::ITEM_DNS_PREFETCH,
44
+ LiteSpeed_Cache_Config::ITEM_CLOUDFLARE_STATUS,
45
+ LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_FILTERS,
46
+ LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_PART_FILTERS,
47
+ LiteSpeed_Cache_Config::ITEM_OBJECT_GLOBAL_GROUPS,
48
+ LiteSpeed_Cache_Config::ITEM_OBJECT_NON_PERSISTENT_GROUPS,
49
+ ) ;
50
+ }
51
+
52
+ /**
53
+ * Handle all request actions from main cls
54
+ *
55
+ * @since 1.8.2
56
+ * @access public
57
+ */
58
+ public static function handler()
59
+ {
60
+ $instance = self::get_instance() ;
61
+
62
+ $type = LiteSpeed_Cache_Router::verify_type() ;
63
+
64
+ switch ( $type ) {
65
+ case self::TYPE_IMPORT :
66
+ $instance->_import() ;
67
+ break ;
68
+
69
+ case self::TYPE_EXPORT :
70
+ $instance->_export() ;
71
+ break ;
72
+
73
+ default:
74
+ break ;
75
+ }
76
+
77
+ LiteSpeed_Cache_Admin::redirect() ;
78
+ }
79
+
80
+ /**
81
+ * Export settings to file
82
+ *
83
+ * @since 1.8.2
84
+ * @access private
85
+ */
86
+ private function _export()
87
+ {
88
+
89
+ $data = array() ;
90
+ foreach ( $this->_cfg_items as $v ) {
91
+ $data[ $v ] = get_option( $v ) ;
92
+ }
93
+
94
+ $data = base64_encode( serialize( $data ) ) ;
95
+
96
+ $filename = $this->_generate_filename() ;
97
+
98
+ // Update log
99
+ $log = get_option( self::DB_IMPORT_LOG, array() ) ;
100
+ if ( empty( $log[ 'export' ] ) ) {
101
+ $log[ 'export' ] = array() ;
102
+ }
103
+ $log[ 'export' ][ 'file' ] = $filename ;
104
+ $log[ 'export' ][ 'time' ] = time() ;
105
+
106
+ update_option( self::DB_IMPORT_LOG, $log ) ;
107
+
108
+ LiteSpeed_Cache_Log::debug( 'Import: Saved to ' . $filename ) ;
109
+
110
+ @header( 'Content-Disposition: attachment; filename=' . $filename ) ;
111
+ echo $data ;
112
+
113
+ exit ;
114
+ }
115
+
116
+ /**
117
+ * Import settings from file
118
+ *
119
+ * @since 1.8.2
120
+ * @access private
121
+ */
122
+ private function _import()
123
+ {
124
+ if ( empty( $_FILES[ 'ls_file' ][ 'name' ] ) || substr( $_FILES[ 'ls_file' ][ 'name' ], -5 ) != '.data' || empty( $_FILES[ 'ls_file' ][ 'tmp_name' ] ) ) {
125
+ LiteSpeed_Cache_Log::debug( 'Import: Failed to import, wront ls_file' ) ;
126
+
127
+ $msg = __( 'Import failed due to file error.', 'litespeed-cache' ) ;
128
+ LiteSpeed_Cache_Admin_Display::error( $msg ) ;
129
+
130
+ return false ;
131
+ }
132
+
133
+ // Update log
134
+ $log = get_option( self::DB_IMPORT_LOG, array() ) ;
135
+ if ( empty( $log[ 'import' ] ) ) {
136
+ $log[ 'import' ] = array() ;
137
+ }
138
+ $log[ 'import' ][ 'file' ] = $_FILES[ 'ls_file' ][ 'name' ] ;
139
+ $log[ 'import' ][ 'time' ] = time() ;
140
+
141
+ update_option( self::DB_IMPORT_LOG, $log ) ;
142
+
143
+ $data = file_get_contents( $_FILES[ 'ls_file' ][ 'tmp_name' ] ) ;
144
+ $data = unserialize( base64_decode( $data ) ) ;
145
+
146
+ if ( ! $data ) {
147
+ LiteSpeed_Cache_Log::debug( 'Import: Failed to import, no data' ) ;
148
+ return false ;
149
+ }
150
+
151
+ foreach ( $this->_cfg_items as $v ) {
152
+ if ( ! empty( $data[ $v ] ) ) {
153
+ update_option( $v, $data[ $v ] ) ;
154
+ }
155
+ }
156
+
157
+ LiteSpeed_Cache_Log::debug( 'Import: Imported ' . $_FILES[ 'ls_file' ][ 'name' ] ) ;
158
+
159
+ $msg = sprintf( __( 'Imported setting file %s successfully.', 'litespeed-cache' ), $_FILES[ 'ls_file' ][ 'name' ] ) ;
160
+ LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
161
+
162
+ return true ;
163
+
164
+ }
165
+
166
+ /**
167
+ * Generate the filename to export
168
+ *
169
+ * @since 1.8.2
170
+ * @access private
171
+ */
172
+ private function _generate_filename()
173
+ {
174
+ // Generate filename
175
+ $parsed_home = parse_url( get_home_url() ) ;
176
+ $filename = 'LSCWP_cfg-' ;
177
+ if ( ! empty( $parsed_home[ 'host' ] ) ) {
178
+ $filename .= $parsed_home[ 'host' ] . '_' ;
179
+ }
180
+
181
+ if ( ! empty( $parsed_home[ 'path' ] ) ) {
182
+ $filename .= $parsed_home[ 'path' ] . '_' ;
183
+ }
184
+
185
+ $filename = str_replace( '/', '_', $filename ) ;
186
+
187
+ $filename .= '-' . date( 'Ymd_His' ) . '.data' ;
188
+
189
+ return $filename ;
190
+ }
191
+
192
+ /**
193
+ * Get the current instance object.
194
+ *
195
+ * @since 1.1.0
196
+ * @access public
197
+ * @return Current class instance.
198
+ */
199
+ public static function get_instance()
200
+ {
201
+ if ( ! isset( self::$_instance ) ) {
202
+ self::$_instance = new self() ;
203
+ }
204
+
205
+ return self::$_instance ;
206
+ }
207
+ }
inc/litespeed-cache.class.php CHANGED
@@ -19,7 +19,7 @@ class LiteSpeed_Cache
19
  private static $_instance ;
20
 
21
  const PLUGIN_NAME = 'litespeed-cache' ;
22
- const PLUGIN_VERSION = '1.7.2' ;
23
 
24
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
 
@@ -54,6 +54,8 @@ class LiteSpeed_Cache
54
  const ACTION_DB_OPTIMIZE = 'db_optimize' ;
55
  const ACTION_LOG = 'log' ;
56
 
 
 
57
  const ACTION_MEDIA = 'media' ;
58
  const ACTION_IAPI = 'iapi' ;
59
  const ACTION_CDN = 'cdn' ;
@@ -86,17 +88,17 @@ class LiteSpeed_Cache
86
  if ( defined( 'LITESPEED_ON' ) ) {
87
  $should_debug = intval(self::config(LiteSpeed_Cache_Config::OPID_DEBUG)) ;
88
  if ( $should_debug == LiteSpeed_Cache_Config::VAL_ON || ($should_debug == LiteSpeed_Cache_Config::VAL_ON2 && LiteSpeed_Cache_Router::is_admin_ip()) ) {
89
- LiteSpeed_Cache_Log::set_enabled() ;
90
  }
91
 
92
  // Load third party detection if lscache enabled.
93
- include_once LSWCP_DIR . 'thirdparty/lscwp-registry-3rd.php' ;
94
  }
95
 
96
  // Register plugin activate/deactivate/uninstall hooks
97
  // NOTE: this can't be moved under after_setup_theme, otherwise activation will be bypassed somehow
98
  if( is_admin() || defined( 'LITESPEED_CLI' ) ) {
99
- $plugin_file = LSWCP_DIR . 'litespeed-cache.php' ;
100
  register_activation_hook($plugin_file, array('LiteSpeed_Cache_Activation', 'register_activation' )) ;
101
  register_deactivation_hook($plugin_file, array('LiteSpeed_Cache_Activation', 'register_deactivation' )) ;
102
  register_uninstall_hook($plugin_file, 'LiteSpeed_Cache_Activation::uninstall_litespeed_cache') ;
@@ -116,6 +118,14 @@ class LiteSpeed_Cache
116
  * @since 1.6.6
117
  */
118
  do_action( 'litespeed_before_init' ) ;
 
 
 
 
 
 
 
 
119
  }
120
 
121
  /**
@@ -136,6 +146,10 @@ class LiteSpeed_Cache
136
  */
137
  do_action( 'litespeed_init' ) ;
138
 
 
 
 
 
139
  if ( ! self::config( LiteSpeed_Cache_Config::OPID_HEARTBEAT ) ) {
140
  add_action( 'init', 'LiteSpeed_Cache_Log::disable_heartbeat', 1 ) ;
141
  }
@@ -309,6 +323,10 @@ class LiteSpeed_Cache
309
  $msg = LiteSpeed_Cache_Media::handler() ;
310
  break ;
311
 
 
 
 
 
312
  case LiteSpeed_Cache::ACTION_IAPI:
313
  $msg = LiteSpeed_Cache_Admin_API::handler() ;
314
  break ;
@@ -325,6 +343,10 @@ class LiteSpeed_Cache
325
  $msg = LiteSpeed_Cache_Admin_Report::handler() ;
326
  break ;
327
 
 
 
 
 
328
  default:
329
  break ;
330
  }
@@ -371,12 +393,6 @@ class LiteSpeed_Cache
371
  add_action( $event, 'LiteSpeed_Cache_Purge::purge_post', 10, 2 ) ;
372
  }
373
 
374
- // The ESI functionality is an enterprise feature.
375
- // Removing the openlitespeed check will simply break the page.
376
- if ( ! LiteSpeed_Cache_Router::is_ajax() && LiteSpeed_Cache_Router::esi_enabled() ) {
377
- LiteSpeed_Cache_ESI::get_instance() ;
378
- }
379
-
380
  add_action( 'wp_update_comment_count', 'LiteSpeed_Cache_Purge::purge_feeds' ) ;
381
 
382
  // register recent posts widget tag before theme renders it to make it work
@@ -568,8 +584,8 @@ class LiteSpeed_Cache
568
  // send Control header
569
  if ( $control_header ) {
570
  @header( $control_header ) ;
571
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
572
- LiteSpeed_Cache_Log::push( $control_header ) ;
573
  if ( $running_info_showing ) {
574
  $this->footer_comment .= "\n<!-- " . $control_header . " -->" ;
575
  }
@@ -578,8 +594,8 @@ class LiteSpeed_Cache
578
  // send PURGE header
579
  if ( $purge_header ) {
580
  @header( $purge_header ) ;
581
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
582
- LiteSpeed_Cache_Log::push( $purge_header ) ;
583
  if ( $running_info_showing ) {
584
  $this->footer_comment .= "\n<!-- " . $purge_header . " -->" ;
585
  }
@@ -588,8 +604,8 @@ class LiteSpeed_Cache
588
  // send Vary header
589
  if ( $vary_header ) {
590
  @header( $vary_header ) ;
591
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
592
- LiteSpeed_Cache_Log::push( $vary_header ) ;
593
  if ( $running_info_showing ) {
594
  $this->footer_comment .= "\n<!-- " . $vary_header . " -->" ;
595
  }
@@ -618,8 +634,8 @@ class LiteSpeed_Cache
618
  // Control header
619
  if ( LiteSpeed_Cache_Control::is_cacheable() && $tag_header ) {
620
  @header( $tag_header ) ;
621
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
622
- LiteSpeed_Cache_Log::push( $tag_header ) ;
623
  if ( $running_info_showing ) {
624
  $this->footer_comment .= "\n<!-- " . $tag_header . " -->" ;
625
  }
@@ -627,6 +643,11 @@ class LiteSpeed_Cache
627
  }
628
  }
629
 
 
 
 
 
 
630
  if ( $is_forced ) {
631
  LiteSpeed_Cache_Log::debug( '--forced--' ) ;
632
  }
19
  private static $_instance ;
20
 
21
  const PLUGIN_NAME = 'litespeed-cache' ;
22
+ const PLUGIN_VERSION = '1.8.3' ;
23
 
24
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
 
54
  const ACTION_DB_OPTIMIZE = 'db_optimize' ;
55
  const ACTION_LOG = 'log' ;
56
 
57
+ const ACTION_IMPORT = 'import' ;
58
+ const ACTION_PURGE = 'purge' ;
59
  const ACTION_MEDIA = 'media' ;
60
  const ACTION_IAPI = 'iapi' ;
61
  const ACTION_CDN = 'cdn' ;
88
  if ( defined( 'LITESPEED_ON' ) ) {
89
  $should_debug = intval(self::config(LiteSpeed_Cache_Config::OPID_DEBUG)) ;
90
  if ( $should_debug == LiteSpeed_Cache_Config::VAL_ON || ($should_debug == LiteSpeed_Cache_Config::VAL_ON2 && LiteSpeed_Cache_Router::is_admin_ip()) ) {
91
+ LiteSpeed_Cache_Log::init() ;
92
  }
93
 
94
  // Load third party detection if lscache enabled.
95
+ include_once LSCWP_DIR . 'thirdparty/lscwp-registry-3rd.php' ;
96
  }
97
 
98
  // Register plugin activate/deactivate/uninstall hooks
99
  // NOTE: this can't be moved under after_setup_theme, otherwise activation will be bypassed somehow
100
  if( is_admin() || defined( 'LITESPEED_CLI' ) ) {
101
+ $plugin_file = LSCWP_DIR . 'litespeed-cache.php' ;
102
  register_activation_hook($plugin_file, array('LiteSpeed_Cache_Activation', 'register_activation' )) ;
103
  register_deactivation_hook($plugin_file, array('LiteSpeed_Cache_Activation', 'register_deactivation' )) ;
104
  register_uninstall_hook($plugin_file, 'LiteSpeed_Cache_Activation::uninstall_litespeed_cache') ;
118
  * @since 1.6.6
119
  */
120
  do_action( 'litespeed_before_init' ) ;
121
+
122
+ /**
123
+ * Preload ESI functionality for ESI request uri recovery
124
+ * @since 1.8.1
125
+ */
126
+ if ( ! LiteSpeed_Cache_Router::is_ajax() && LiteSpeed_Cache_Router::esi_enabled() ) {
127
+ LiteSpeed_Cache_ESI::get_instance() ;
128
+ }
129
  }
130
 
131
  /**
146
  */
147
  do_action( 'litespeed_init' ) ;
148
 
149
+ define( 'LSCWP_CONTENT_FOLDER', str_replace( home_url( '/' ), '', WP_CONTENT_URL ) ) ; // `wp-content`
150
+ define( 'LSWCP_PLUGIN_URL', plugin_dir_url( dirname( __FILE__ ) ) ) ;// Full URL path '//example.com/wp-content/plugins/litespeed-cache/'
151
+
152
+
153
  if ( ! self::config( LiteSpeed_Cache_Config::OPID_HEARTBEAT ) ) {
154
  add_action( 'init', 'LiteSpeed_Cache_Log::disable_heartbeat', 1 ) ;
155
  }
323
  $msg = LiteSpeed_Cache_Media::handler() ;
324
  break ;
325
 
326
+ case LiteSpeed_Cache::ACTION_PURGE:
327
+ $msg = LiteSpeed_Cache_Purge::handler() ;
328
+ break ;
329
+
330
  case LiteSpeed_Cache::ACTION_IAPI:
331
  $msg = LiteSpeed_Cache_Admin_API::handler() ;
332
  break ;
343
  $msg = LiteSpeed_Cache_Admin_Report::handler() ;
344
  break ;
345
 
346
+ case LiteSpeed_Cache::ACTION_IMPORT:
347
+ $msg = LiteSpeed_Cache_Import::handler() ;
348
+ break ;
349
+
350
  default:
351
  break ;
352
  }
393
  add_action( $event, 'LiteSpeed_Cache_Purge::purge_post', 10, 2 ) ;
394
  }
395
 
 
 
 
 
 
 
396
  add_action( 'wp_update_comment_count', 'LiteSpeed_Cache_Purge::purge_feeds' ) ;
397
 
398
  // register recent posts widget tag before theme renders it to make it work
584
  // send Control header
585
  if ( $control_header ) {
586
  @header( $control_header ) ;
587
+ if ( defined( 'LSCWP_LOG' ) ) {
588
+ LiteSpeed_Cache_Log::debug( $control_header ) ;
589
  if ( $running_info_showing ) {
590
  $this->footer_comment .= "\n<!-- " . $control_header . " -->" ;
591
  }
594
  // send PURGE header
595
  if ( $purge_header ) {
596
  @header( $purge_header ) ;
597
+ if ( defined( 'LSCWP_LOG' ) ) {
598
+ LiteSpeed_Cache_Log::debug( $purge_header ) ;
599
  if ( $running_info_showing ) {
600
  $this->footer_comment .= "\n<!-- " . $purge_header . " -->" ;
601
  }
604
  // send Vary header
605
  if ( $vary_header ) {
606
  @header( $vary_header ) ;
607
+ if ( defined( 'LSCWP_LOG' ) ) {
608
+ LiteSpeed_Cache_Log::debug( $vary_header ) ;
609
  if ( $running_info_showing ) {
610
  $this->footer_comment .= "\n<!-- " . $vary_header . " -->" ;
611
  }
634
  // Control header
635
  if ( LiteSpeed_Cache_Control::is_cacheable() && $tag_header ) {
636
  @header( $tag_header ) ;
637
+ if ( defined( 'LSCWP_LOG' ) ) {
638
+ LiteSpeed_Cache_Log::debug( $tag_header ) ;
639
  if ( $running_info_showing ) {
640
  $this->footer_comment .= "\n<!-- " . $tag_header . " -->" ;
641
  }
643
  }
644
  }
645
 
646
+ // Object cache comment
647
+ if ( $running_info_showing && defined( 'LSCWP_LOG' ) && defined( 'LSCWP_OBJECT_CACHE' ) && method_exists( 'WP_Object_Cache', 'debug' ) ) {
648
+ $this->footer_comment .= "\n<!-- Object Cache " . WP_Object_Cache::get_instance()->debug() . " -->" ;
649
+ }
650
+
651
  if ( $is_forced ) {
652
  LiteSpeed_Cache_Log::debug( '--forced--' ) ;
653
  }
inc/litespeed.autoload.php CHANGED
@@ -33,8 +33,10 @@ if ( !function_exists('_litespeed_autoload') ) {
33
  'LiteSpeed_Cache_Data' => 'inc/data.class.php',
34
  'LiteSpeed_Cache_ESI' => 'inc/esi.class.php',
35
  'LiteSpeed_Cache_GUI' => 'inc/gui.class.php',
 
36
  'LiteSpeed_Cache_Log' => 'inc/log.class.php',
37
  'LiteSpeed_Cache_Media' => 'inc/media.class.php',
 
38
  'LiteSpeed_Cache_Optimize' => 'inc/optimize.class.php',
39
  'LiteSpeed_Cache_Purge' => 'inc/purge.class.php',
40
  'LiteSpeed_Cache_Router' => 'inc/router.class.php',
@@ -57,8 +59,8 @@ if ( !function_exists('_litespeed_autoload') ) {
57
 
58
  'LiteSpeed_Cache_Tags' => 'includes/deprecated-litespeed-cache-tags.class.php',
59
  );
60
- if( array_key_exists($cls, $class2fileArr) && file_exists(LSWCP_DIR . $class2fileArr[$cls]) ) {
61
- require_once LSWCP_DIR . $class2fileArr[$cls];
62
  }
63
  }
64
  }
@@ -73,6 +75,6 @@ spl_autoload_register('_litespeed_autoload');
73
  if ( !function_exists('litespeed_load_vendor') ) {
74
  function litespeed_load_vendor()
75
  {
76
- require_once LSWCP_DIR.'lib/vendor/autoload.php';
77
  }
78
  }
33
  'LiteSpeed_Cache_Data' => 'inc/data.class.php',
34
  'LiteSpeed_Cache_ESI' => 'inc/esi.class.php',
35
  'LiteSpeed_Cache_GUI' => 'inc/gui.class.php',
36
+ 'LiteSpeed_Cache_Import' => 'inc/import.class.php',
37
  'LiteSpeed_Cache_Log' => 'inc/log.class.php',
38
  'LiteSpeed_Cache_Media' => 'inc/media.class.php',
39
+ 'LiteSpeed_Cache_Object' => 'inc/object.class.php',
40
  'LiteSpeed_Cache_Optimize' => 'inc/optimize.class.php',
41
  'LiteSpeed_Cache_Purge' => 'inc/purge.class.php',
42
  'LiteSpeed_Cache_Router' => 'inc/router.class.php',
59
 
60
  'LiteSpeed_Cache_Tags' => 'includes/deprecated-litespeed-cache-tags.class.php',
61
  );
62
+ if( array_key_exists($cls, $class2fileArr) && file_exists(LSCWP_DIR . $class2fileArr[$cls]) ) {
63
+ require_once LSCWP_DIR . $class2fileArr[$cls];
64
  }
65
  }
66
  }
75
  if ( !function_exists('litespeed_load_vendor') ) {
76
  function litespeed_load_vendor()
77
  {
78
+ require_once LSCWP_DIR.'lib/vendor/autoload.php';
79
  }
80
  }
inc/log.class.php CHANGED
@@ -13,26 +13,24 @@
13
  class LiteSpeed_Cache_Log
14
  {
15
  private static $_instance ;
16
- private static $_debug ;
17
  private static $log_path ;
18
  private static $_prefix ;
19
- private static $_enabled = false ;
20
 
21
  const TYPE_CLEAR_LOG = 'clear_log' ;
22
 
23
  /**
24
  * Log class Constructor
25
  *
26
- * NOTE: in this process, until last step ( self::$_debug = true ), any usage to WP filter should not be used to prevent infinite loop with log_filters()
27
  *
28
  * @since 1.1.2
29
  * @access public
30
  */
31
  private function __construct()
32
  {
33
- self::$log_path = LSWCP_CONTENT_DIR . '/debug.log' ;
34
  if ( ! empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) && $_SERVER[ 'HTTP_USER_AGENT' ] === Litespeed_Crawler::FAST_USER_AGENT ) {
35
- self::$log_path = LSWCP_CONTENT_DIR . '/crawler.log' ;
36
  }
37
  if ( ! defined( 'LSCWP_LOG_TAG' ) ) {
38
  define( 'LSCWP_LOG_TAG', get_current_blog_id() ) ;
@@ -43,7 +41,7 @@ class LiteSpeed_Cache_Log
43
  }
44
 
45
  $this->_init_request() ;
46
- self::$_debug = true ;
47
  }
48
 
49
  /**
@@ -92,28 +90,15 @@ class LiteSpeed_Cache_Log
92
  wp_deregister_script( 'heartbeat' ) ;
93
  }
94
 
95
- /**
96
- * Check if log class finished initialized
97
- *
98
- * @since 1.1.3
99
- * @access public
100
- */
101
- public static function initialized()
102
- {
103
- return isset( self::$_debug ) ;
104
- }
105
-
106
  /**
107
  * Enable debug log
108
  *
109
  * @since 1.1.0
110
  * @access public
111
  */
112
- public static function set_enabled()
113
  {
114
- self::$_enabled = true ;
115
-
116
- if ( ! isset( self::$_debug ) ) {// If not initialized, do it now
117
  self::get_instance() ;
118
  }
119
 
@@ -132,14 +117,14 @@ class LiteSpeed_Cache_Log
132
  public static function log_filters()
133
  {
134
  $action = current_filter() ;
135
- if ( $ignore_filters = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_LOG_IGNORE_FILTERS ) ) {
136
  $ignore_filters = explode( "\n", $ignore_filters ) ;
137
  if ( in_array( $action, $ignore_filters ) ) {
138
  return ;
139
  }
140
  }
141
 
142
- if ( $ignore_part_filters = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_LOG_IGNORE_PART_FILTERS ) ) {
143
  $ignore_part_filters = explode( "\n", $ignore_part_filters ) ;
144
  foreach ( $ignore_part_filters as $val ) {
145
  if ( stripos( $action, $val ) !== false ) {
@@ -151,17 +136,6 @@ class LiteSpeed_Cache_Log
151
  self::debug( "===log filter: $action" ) ;
152
  }
153
 
154
- /**
155
- * Get debug log status
156
- *
157
- * @since 1.1.0
158
- * @access public
159
- */
160
- public static function get_enabled()
161
- {
162
- return self::$_enabled ;
163
- }
164
-
165
  /**
166
  * Formats the log message with a consistent prefix.
167
  *
@@ -210,7 +184,7 @@ class LiteSpeed_Cache_Log
210
  */
211
  public static function debug( $msg, $backtrace_limit = false )
212
  {
213
- if ( ! self::get_enabled() ) {
214
  return ;
215
  }
216
 
@@ -248,11 +222,11 @@ class LiteSpeed_Cache_Log
248
  * Logs a debug message.
249
  *
250
  * @since 1.1.0
251
- * @access public
252
  * @param string $msg The debug message.
253
  * @param int $backtrace_limit Backtrace depth.
254
  */
255
- public static function push( $msg, $backtrace_limit = false )
256
  {
257
  // backtrace handler
258
  if ( defined( 'LSCWP_LOG_MORE' ) && $backtrace_limit !== false ) {
13
  class LiteSpeed_Cache_Log
14
  {
15
  private static $_instance ;
 
16
  private static $log_path ;
17
  private static $_prefix ;
 
18
 
19
  const TYPE_CLEAR_LOG = 'clear_log' ;
20
 
21
  /**
22
  * Log class Constructor
23
  *
24
+ * NOTE: in this process, until last step ( define const LSCWP_LOG = true ), any usage to WP filter will not be logged to prevent infinite loop with log_filters()
25
  *
26
  * @since 1.1.2
27
  * @access public
28
  */
29
  private function __construct()
30
  {
31
+ self::$log_path = LSCWP_CONTENT_DIR . '/debug.log' ;
32
  if ( ! empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) && $_SERVER[ 'HTTP_USER_AGENT' ] === Litespeed_Crawler::FAST_USER_AGENT ) {
33
+ self::$log_path = LSCWP_CONTENT_DIR . '/crawler.log' ;
34
  }
35
  if ( ! defined( 'LSCWP_LOG_TAG' ) ) {
36
  define( 'LSCWP_LOG_TAG', get_current_blog_id() ) ;
41
  }
42
 
43
  $this->_init_request() ;
44
+ define( 'LSCWP_LOG', true ) ;
45
  }
46
 
47
  /**
90
  wp_deregister_script( 'heartbeat' ) ;
91
  }
92
 
 
 
 
 
 
 
 
 
 
 
 
93
  /**
94
  * Enable debug log
95
  *
96
  * @since 1.1.0
97
  * @access public
98
  */
99
+ public static function init()
100
  {
101
+ if ( ! defined( 'LSCWP_LOG' ) ) {// If not initialized, do it now
 
 
102
  self::get_instance() ;
103
  }
104
 
117
  public static function log_filters()
118
  {
119
  $action = current_filter() ;
120
+ if ( $ignore_filters = get_option( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_FILTERS ) ) {
121
  $ignore_filters = explode( "\n", $ignore_filters ) ;
122
  if ( in_array( $action, $ignore_filters ) ) {
123
  return ;
124
  }
125
  }
126
 
127
+ if ( $ignore_part_filters = get_option( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_PART_FILTERS ) ) {
128
  $ignore_part_filters = explode( "\n", $ignore_part_filters ) ;
129
  foreach ( $ignore_part_filters as $val ) {
130
  if ( stripos( $action, $val ) !== false ) {
136
  self::debug( "===log filter: $action" ) ;
137
  }
138
 
 
 
 
 
 
 
 
 
 
 
 
139
  /**
140
  * Formats the log message with a consistent prefix.
141
  *
184
  */
185
  public static function debug( $msg, $backtrace_limit = false )
186
  {
187
+ if ( ! defined( 'LSCWP_LOG' ) ) {
188
  return ;
189
  }
190
 
222
  * Logs a debug message.
223
  *
224
  * @since 1.1.0
225
+ * @access private
226
  * @param string $msg The debug message.
227
  * @param int $backtrace_limit Backtrace depth.
228
  */
229
+ private static function push( $msg, $backtrace_limit = false )
230
  {
231
  // backtrace handler
232
  if ( defined( 'LSCWP_LOG_MORE' ) && $backtrace_limit !== false ) {
inc/media.class.php CHANGED
@@ -410,7 +410,7 @@ class LiteSpeed_Cache_Media
410
  LiteSpeed_Cache_Control::set_custom_ttl( 8640000 ) ;
411
  LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_MIN . '_LAZY' ) ;
412
 
413
- $file = LSWCP_DIR . 'js/lazyload.min.js' ;
414
 
415
  header( 'Content-Length: ' . filesize( $file ) ) ;
416
  header( 'Content-Type: application/x-javascript; charset=utf-8' ) ;
410
  LiteSpeed_Cache_Control::set_custom_ttl( 8640000 ) ;
411
  LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_MIN . '_LAZY' ) ;
412
 
413
+ $file = LSCWP_DIR . 'js/lazyload.min.js' ;
414
 
415
  header( 'Content-Length: ' . filesize( $file ) ) ;
416
  header( 'Content-Type: application/x-javascript; charset=utf-8' ) ;
inc/object.class.php ADDED
@@ -0,0 +1,612 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The object cache class
4
+ *
5
+ *
6
+ * @since 1.8
7
+ * @package LiteSpeed_Cache
8
+ * @subpackage LiteSpeed_Cache/inc
9
+ * @author LiteSpeed Technologies <info@litespeedtech.com>
10
+ */
11
+
12
+ /**
13
+ * Handle exception
14
+ */
15
+ if ( ! function_exists( 'litespeed_exception_handler' ) ) {
16
+ function litespeed_exception_handler( $errno, $errstr, $errfile, $errline )
17
+ {
18
+ throw new ErrorException($errstr, 0, $errno, $errfile, $errline) ;
19
+ }
20
+ }
21
+
22
+
23
+ class LiteSpeed_Cache_Object
24
+ {
25
+ private static $_instance ;
26
+
27
+ private $_oc_data_file ;
28
+ private $_conn ;
29
+ private $_cfg_enabled ;
30
+ private $_cfg_method ;
31
+ private $_cfg_host ;
32
+ private $_cfg_port ;
33
+ private $_cfg_persistent ;
34
+ private $_cfg_admin ;
35
+ private $_cfg_transients ;
36
+ private $_cfg_db ;
37
+ private $_cfg_user ;
38
+ private $_cfg_pswd ;
39
+ private $_default_life = 360 ;
40
+
41
+ private $_oc_driver = 'Memcached' ; // Redis or Memcached
42
+
43
+ private $_global_groups ;
44
+ private $_non_persistent_groups ;
45
+
46
+ /**
47
+ * Init
48
+ *
49
+ * @since 1.8
50
+ * @access private
51
+ */
52
+ private function __construct( $cfg = false )
53
+ {
54
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug2( 'Object: init' ) ;
55
+
56
+ $this->_oc_data_file = WP_CONTENT_DIR . '/.object-cache.ini' ;
57
+
58
+ if ( $cfg ) {
59
+ $this->_cfg_method = $cfg[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_KIND ] ? true : false ;
60
+ $this->_cfg_host = $cfg[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_HOST ] ;
61
+ $this->_cfg_port = $cfg[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PORT ] ;
62
+ $this->_cfg_life = $cfg[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_LIFE ] ;
63
+ $this->_cfg_persistent = $cfg[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PERSISTENT ] ;
64
+ $this->_cfg_admin = $cfg[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_ADMIN ] ;
65
+ $this->_cfg_transients = $cfg[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_TRANSIENTS ] ;
66
+ $this->_cfg_db = $cfg[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_DB_ID ] ;
67
+ $this->_cfg_user = $cfg[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_USER ] ;
68
+ $this->_cfg_pswd = $cfg[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PSWD ] ;
69
+ $this->_global_groups = explode( "\n", $cfg[ LiteSpeed_Cache_Config::ITEM_OBJECT_GLOBAL_GROUPS ] ) ;
70
+ $this->_non_persistent_groups = explode( "\n", $cfg[ LiteSpeed_Cache_Config::ITEM_OBJECT_NON_PERSISTENT_GROUPS ] ) ;
71
+
72
+ if ( $this->_cfg_method ) {
73
+ $this->_oc_driver = 'Redis' ;
74
+ }
75
+ $this->_cfg_enabled = $cfg[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT ] && class_exists( $this->_oc_driver ) && $this->_cfg_host ;
76
+
77
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Object: init with cfg result : ', $this->_cfg_enabled ) ;
78
+ }
79
+ elseif ( class_exists( 'LiteSpeed_Cache' ) ) {
80
+ $this->_cfg_method = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_KIND ) ? true : false ;
81
+ $this->_cfg_host = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_HOST ) ;
82
+ $this->_cfg_port = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PORT ) ;
83
+ $this->_cfg_life = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_LIFE ) ;
84
+ $this->_cfg_persistent = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PERSISTENT ) ;
85
+ $this->_cfg_admin = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_ADMIN ) ;
86
+ $this->_cfg_transients = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_TRANSIENTS ) ;
87
+ $this->_cfg_db = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_DB_ID ) ;
88
+ $this->_cfg_user = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_USER ) ;
89
+ $this->_cfg_pswd = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PSWD ) ;
90
+ $this->_global_groups = explode( "\n", get_option( LiteSpeed_Cache_Config::ITEM_OBJECT_GLOBAL_GROUPS ) ) ;
91
+ $this->_non_persistent_groups = explode( "\n", get_option( LiteSpeed_Cache_Config::ITEM_OBJECT_NON_PERSISTENT_GROUPS ) ) ;
92
+
93
+ if ( $this->_cfg_method ) {
94
+ $this->_oc_driver = 'Redis' ;
95
+ }
96
+ $this->_cfg_enabled = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_OBJECT ) && class_exists( $this->_oc_driver ) && $this->_cfg_host ;
97
+ }
98
+ elseif ( file_exists( $this->_oc_data_file ) ) { // Get cfg from oc_data_file
99
+ $cfg = parse_ini_file( $this->_oc_data_file, true ) ;
100
+ $this->_cfg_method = ! empty( $cfg[ 'object_cache' ][ 'method' ] ) ? $cfg[ 'object_cache' ][ 'method' ] : false ;
101
+ $this->_cfg_host = $cfg[ 'object_cache' ][ 'host' ] ;
102
+ $this->_cfg_port = $cfg[ 'object_cache' ][ 'port' ] ;
103
+ $this->_cfg_life = ! empty( $cfg[ 'object_cache' ][ 'life' ] ) ? $cfg[ 'object_cache' ][ 'life' ] : $this->_default_life ;
104
+ $this->_cfg_persistent = ! empty( $cfg[ 'object_cache' ][ 'persistent' ] ) ? $cfg[ 'object_cache' ][ 'persistent' ] : false ;
105
+ $this->_cfg_admin = ! empty( $cfg[ 'object_cache' ][ 'cache_admin' ] ) ? $cfg[ 'object_cache' ][ 'cache_admin' ] : false ;
106
+ $this->_cfg_transients = ! empty( $cfg[ 'object_cache' ][ 'cache_transients' ] ) ? $cfg[ 'object_cache' ][ 'cache_transients' ] : false ;
107
+ $this->_cfg_db = ! empty( $cfg[ 'object_cache' ][ 'db' ] ) ? $cfg[ 'object_cache' ][ 'db' ] : 0 ;
108
+ $this->_cfg_user = ! empty( $cfg[ 'object_cache' ][ 'user' ] ) ? $cfg[ 'object_cache' ][ 'user' ] : '' ;
109
+ $this->_cfg_pswd = ! empty( $cfg[ 'object_cache' ][ 'pswd' ] ) ? $cfg[ 'object_cache' ][ 'pswd' ] : '' ;
110
+ $this->_global_groups = ! empty( $cfg[ 'object_cache' ][ 'global_groups' ] ) ? explode( ',', $cfg[ 'object_cache' ][ 'global_groups' ] ) : array() ;
111
+ $this->_non_persistent_groups = ! empty( $cfg[ 'object_cache' ][ 'non_persistent_groups' ] ) ? explode( ',', $cfg[ 'object_cache' ][ 'non_persistent_groups' ] ) : array() ;
112
+
113
+ if ( $this->_cfg_method ) {
114
+ $this->_oc_driver = 'Redis' ;
115
+ }
116
+ $this->_cfg_enabled = class_exists( $this->_oc_driver ) && $this->_cfg_host ;
117
+ }
118
+ else {
119
+ $this->_cfg_enabled = false ;
120
+ }
121
+ }
122
+
123
+ /**
124
+ * Get `Store Transients` setting value
125
+ *
126
+ * @since 1.8.3
127
+ * @access public
128
+ */
129
+ public function store_transients( $group )
130
+ {
131
+ return $this->_cfg_transients && $this->_is_transients_group( $group ) ;
132
+ }
133
+
134
+ /**
135
+ * Check if the group belongs to transients or not
136
+ *
137
+ * @since 1.8.3
138
+ * @access private
139
+ */
140
+ private function _is_transients_group( $group )
141
+ {
142
+ return in_array( $group, array( 'transient', 'site-transient' ) ) ;
143
+ }
144
+
145
+ /**
146
+ * Maintain WP object cache file
147
+ *
148
+ * @since 1.8
149
+ * @access public
150
+ */
151
+ public function update_file( $keep, $options = false )
152
+ {
153
+ $wp_file = WP_CONTENT_DIR . '/object-cache.php' ;
154
+ $ori_file = LSCWP_DIR . 'lib/object-cache.php' ;
155
+
156
+ // To keep file
157
+ if ( $keep ) {
158
+ // Update data file
159
+ $data = "[object_cache]"
160
+ . "\nmethod = " . $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_KIND ]
161
+ . "\nhost = " . $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_HOST ]
162
+ . "\nport = " . (int) $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PORT ]
163
+ . "\nlife = " . $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_LIFE ]
164
+ . "\nuser = '" . $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_USER ] . "'"
165
+ . "\npswd = '" . $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PSWD ] . "'"
166
+ . "\ndb = " . (int) $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_DB_ID ]
167
+ . "\npersistent = " . ( $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_PERSISTENT ] ? 1 : 0 )
168
+ . "\ncache_admin = " . ( $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_ADMIN ] ? 1 : 0 )
169
+ . "\ncache_transients = " . ( $options[ LiteSpeed_Cache_Config::OPID_CACHE_OBJECT_TRANSIENTS ] ? 1 : 0 )
170
+ . "\nglobal_groups = " . implode( ',', explode( "\n", $options[ LiteSpeed_Cache_Config::ITEM_OBJECT_GLOBAL_GROUPS ] ) )
171
+ . "\nnon_persistent_groups = " . implode( ',', explode( "\n", $options[ LiteSpeed_Cache_Config::ITEM_OBJECT_NON_PERSISTENT_GROUPS ] ) )
172
+ ;
173
+ Litespeed_File::save( $this->_oc_data_file, $data ) ;
174
+
175
+ // Update cls file
176
+ if ( ! file_exists( $wp_file ) || md5_file( $wp_file ) !== md5_file( $ori_file ) ) {
177
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Object: copying object-cache.php file to ' . $wp_file ) ;
178
+ copy( $ori_file, $wp_file ) ;
179
+ }
180
+ }
181
+ else {
182
+ // To delete file
183
+ if ( file_exists( $wp_file ) ) {
184
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Object: removing ' . $wp_file ) ;
185
+ unlink( $wp_file ) ;
186
+ }
187
+ file_exists( $this->_oc_data_file ) && unlink( $this->_oc_data_file ) ;
188
+ }
189
+ }
190
+
191
+ /**
192
+ * Remove object cache file
193
+ *
194
+ * @since 1.8.2
195
+ * @access public
196
+ */
197
+ public function del_file()
198
+ {
199
+ $wp_file = WP_CONTENT_DIR . '/object-cache.php' ;
200
+ $ori_file = LSCWP_DIR . 'lib/object-cache.php' ;
201
+
202
+ if ( file_exists( $wp_file ) && md5_file( $wp_file ) === md5_file( $ori_file ) ) {
203
+ unlink( $wp_file ) ;
204
+ }
205
+
206
+ file_exists( $this->_oc_data_file ) && unlink( $this->_oc_data_file ) ;
207
+ }
208
+
209
+ /**
210
+ * Try to build connection
211
+ *
212
+ * @since 1.8
213
+ * @access public
214
+ */
215
+ public function test_connection()
216
+ {
217
+ return $this->_connect() ;
218
+ }
219
+
220
+ /**
221
+ * Force to connect with this setting
222
+ * @return [type] [description]
223
+ */
224
+ public function reconnect( $cfg )
225
+ {
226
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Object: Reconnecting' ) ;
227
+ // error_log( 'Object: reconnect !' ) ;
228
+ if ( isset( $this->_conn ) ) {
229
+ // error_log( 'Object: Quiting existing connection!' ) ;
230
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Object: Quiting existing connection' ) ;
231
+ $this->flush() ;
232
+ $this->_conn = null ;
233
+ self::$_instance = null ;
234
+ }
235
+
236
+ self::$_instance = new self( $cfg ) ;
237
+ self::$_instance->_connect() ;
238
+ if ( isset( self::$_instance->_conn ) ) {
239
+ self::$_instance->flush() ;
240
+ }
241
+
242
+ }
243
+
244
+ /**
245
+ * Connect to Memcached/Redis server
246
+ *
247
+ * @since 1.8
248
+ * @access private
249
+ */
250
+ private function _connect()
251
+ {
252
+ if ( isset( $this->_conn ) ) {
253
+ // error_log( 'Object: _connected' ) ;
254
+ return true ;
255
+ }
256
+
257
+ if ( ! class_exists( $this->_oc_driver ) || ! $this->_cfg_host ) {
258
+ return null ;
259
+ }
260
+
261
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Object: connecting to ' . $this->_cfg_host . ':' . $this->_cfg_port ) ;
262
+
263
+ $failed = false ;
264
+ /**
265
+ * Connect to Redis
266
+ *
267
+ * @since 1.8.1
268
+ * @see https://github.com/phpredis/phpredis/#example-1
269
+ */
270
+ if ( $this->_oc_driver == 'Redis' ) {
271
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Object: Init ' . $this->_oc_driver . ' connection' ) ;
272
+
273
+ set_error_handler( 'litespeed_exception_handler' ) ;
274
+ try {
275
+ $this->_conn = new Redis() ;
276
+ // error_log( 'Object: _connect Redis' ) ;
277
+
278
+ if ( $this->_cfg_persistent ) {
279
+ if ( $this->_cfg_port ) {
280
+ $this->_conn->pconnect( $this->_cfg_host, $this->_cfg_port ) ;
281
+ }
282
+ else {
283
+ $this->_conn->pconnect( $this->_cfg_host ) ;
284
+ }
285
+ }
286
+ else {
287
+ if ( $this->_cfg_port ) {
288
+ $this->_conn->connect( $this->_cfg_host, $this->_cfg_port ) ;
289
+ }
290
+ else {
291
+ $this->_conn->connect( $this->_cfg_host ) ;
292
+ }
293
+ }
294
+
295
+ if ( $this->_cfg_pswd ) {
296
+ $this->_conn->auth( $this->_cfg_pswd ) ;
297
+ }
298
+
299
+ if ( $this->_cfg_db ) {
300
+ $this->_conn->select( $this->_cfg_db ) ;
301
+ }
302
+
303
+ $res = $this->_conn->ping() ;
304
+
305
+ if ( $res != '+PONG' ) {
306
+ $failed = true ;
307
+ }
308
+ }
309
+ catch ( \Exception $e ) {
310
+ error_log( $e->getMessage() ) ;
311
+ $failed = true ;
312
+ }
313
+ catch ( ErrorException $e ) {
314
+ error_log( $e->getMessage() ) ;
315
+ $failed = true ;
316
+ }
317
+ restore_error_handler() ;
318
+
319
+ }
320
+ /**
321
+ * Connect to Memcached
322
+ */
323
+ else {
324
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Object: Init ' . $this->_oc_driver . ' connection' ) ;
325
+ if ( $this->_cfg_persistent ) {
326
+ $this->_conn = new Memcached( $this->_get_mem_id() ) ;
327
+
328
+ // Check memcached persistent connection
329
+ if ( $this->_validate_mem_server() ) {
330
+ // error_log( 'Object: _validate_mem_server' ) ;
331
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Object: Got persistent ' . $this->_oc_driver . ' connection' ) ;
332
+ return true ;
333
+ }
334
+
335
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Object: No persistent ' . $this->_oc_driver . ' server list!' ) ;
336
+ }
337
+ else {
338
+ // error_log( 'Object: new memcached!' ) ;
339
+ $this->_conn = new Memcached ;
340
+ }
341
+
342
+ $this->_conn->addServer( $this->_cfg_host, (int) $this->_cfg_port ) ;
343
+
344
+ /**
345
+ * Add SASL auth
346
+ * @since 1.8.1
347
+ */
348
+ if ( $this->_cfg_user && $this->_cfg_pswd && method_exists( $this->_conn, 'setSaslAuthData' ) && ini_get( 'memcached.use_sasl' ) ) {
349
+ $this->_conn->setSaslAuthData( $this->_cfg_user, $this->_cfg_pswd ) ;
350
+ }
351
+
352
+ // Check connection
353
+ if ( ! $this->_validate_mem_server() ) {
354
+ $failed = true ;
355
+ }
356
+ }
357
+
358
+ // If failed to connect
359
+ if ( $failed ) {
360
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Object: Failed to connect ' . $this->_oc_driver . ' server!' ) ;
361
+ $this->_conn = null ;
362
+ $this->_cfg_enabled = false ;
363
+ // error_log( 'Object: false!' ) ;
364
+ return false ;
365
+ }
366
+
367
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug2( 'Object: Connected' ) ;
368
+
369
+ return true ;
370
+ }
371
+
372
+ /**
373
+ * Check if the connected memcached host is the one in cfg
374
+ *
375
+ * @since 1.8
376
+ * @access private
377
+ */
378
+ private function _validate_mem_server()
379
+ {
380
+ $mem_list = $this->_conn->getStats() ;
381
+ if ( empty( $mem_list ) ) {
382
+ return false ;
383
+ }
384
+
385
+ foreach ( $mem_list as $k => $v ) {
386
+ if ( substr( $k, 0, strlen( $this->_cfg_host ) ) != $this->_cfg_host ) {
387
+ continue ;
388
+ }
389
+ if ( $v[ 'pid' ] > 0 ) {
390
+ return true ;
391
+ }
392
+ }
393
+
394
+ return false ;
395
+ }
396
+
397
+ /**
398
+ * Get memcached unique id to be used for connecting
399
+ *
400
+ * @since 1.8
401
+ * @access private
402
+ */
403
+ private function _get_mem_id()
404
+ {
405
+ $mem_id = 'litespeed' ;
406
+ if ( is_multisite() ) {
407
+ $mem_id .= '_' . get_current_blog_id() ;
408
+ }
409
+
410
+ return $mem_id ;
411
+ }
412
+
413
+ /**
414
+ * Get cache
415
+ *
416
+ * @since 1.8
417
+ * @access public
418
+ */
419
+ public function get( $key )
420
+ {
421
+ if ( ! $this->_cfg_enabled ) {
422
+ return null ;
423
+ }
424
+
425
+ if ( ! $this->_can_cache() ) {
426
+ return null ;
427
+ }
428
+
429
+ if( ! $this->_connect() ) {
430
+ return null ;
431
+ }
432
+
433
+ // defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug2( 'Object: get ' . $key ) ;
434
+
435
+ $res = $this->_conn->get( $key ) ;
436
+
437
+ return $res ;
438
+ }
439
+
440
+ /**
441
+ * Set cache
442
+ *
443
+ * @since 1.8
444
+ * @access public
445
+ */
446
+ public function set( $key, $data, $expire )
447
+ {
448
+ if ( ! $this->_cfg_enabled ) {
449
+ return null ;
450
+ }
451
+
452
+ if ( ! $this->_can_cache() ) {
453
+ return null ;
454
+ }
455
+
456
+ if( ! $this->_connect() ) {
457
+ return null ;
458
+ }
459
+
460
+ // defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug2( 'Object: set ' . $key ) ;
461
+
462
+ // error_log( 'Object: set ' . $key ) ;
463
+
464
+ $ttl = $expire ?: $this->_cfg_life ;
465
+
466
+ if ( $this->_oc_driver == 'Redis' ) {
467
+ $res = $this->_conn->setEx( $key, $ttl, $data ) ;
468
+ }
469
+ else {
470
+ $res = $this->_conn->set( $key, $data, $ttl ) ;
471
+ }
472
+
473
+ return $res ;
474
+ }
475
+
476
+ /**
477
+ * Check if can cache or not
478
+ *
479
+ * @since 1.8
480
+ * @access private
481
+ */
482
+ private function _can_cache()
483
+ {
484
+ if ( ! $this->_cfg_admin && defined( 'WP_ADMIN' ) ) {
485
+ return false ;
486
+ }
487
+ return true ;
488
+ }
489
+
490
+ /**
491
+ * Delete cache
492
+ *
493
+ * @since 1.8
494
+ * @access public
495
+ */
496
+ public function delete( $key )
497
+ {
498
+ if ( ! $this->_cfg_enabled ) {
499
+ return null ;
500
+ }
501
+
502
+ if( ! $this->_connect() ) {
503
+ return null ;
504
+ }
505
+
506
+ // defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug2( 'Object: delete ' . $key ) ;
507
+
508
+ $res = $this->_conn->delete( $key ) ;
509
+
510
+ return $res ;
511
+ }
512
+
513
+ /**
514
+ * Clear all cache
515
+ *
516
+ * @since 1.8
517
+ * @access public
518
+ */
519
+ public function flush()
520
+ {
521
+ if ( ! $this->_cfg_enabled ) {
522
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Object: bypass flushing' ) ;
523
+ return null ;
524
+ }
525
+
526
+ if( ! $this->_connect() ) {
527
+ return null ;
528
+ }
529
+
530
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Object: flush!' ) ;
531
+
532
+ if ( $this->_oc_driver == 'Redis' ) {
533
+ $res = $this->_conn->flushDb() ;
534
+ }
535
+ else {
536
+ $res = $this->_conn->flush() ;
537
+ $this->_conn->resetServerList() ;
538
+ }
539
+
540
+ return $res ;
541
+ }
542
+
543
+ /**
544
+ * Add global groups
545
+ *
546
+ * @since 1.8
547
+ * @access public
548
+ */
549
+ public function add_global_groups( $groups )
550
+ {
551
+ if ( ! is_array( $groups ) ) {
552
+ $groups = array( $groups ) ;
553
+ }
554
+
555
+ $this->_global_groups = array_merge( $this->_global_groups, $groups ) ;
556
+ $this->_global_groups = array_unique( $this->_global_groups ) ;
557
+ }
558
+
559
+ /**
560
+ * Check if is in global groups or not
561
+ *
562
+ * @since 1.8
563
+ * @access public
564
+ */
565
+ public function is_global( $group )
566
+ {
567
+ return in_array( $group, $this->_global_groups ) ;
568
+ }
569
+
570
+ /**
571
+ * Add non persistent groups
572
+ *
573
+ * @since 1.8
574
+ * @access public
575
+ */
576
+ public function add_non_persistent_groups( $groups )
577
+ {
578
+ if ( ! is_array( $groups ) ) {
579
+ $groups = array( $groups ) ;
580
+ }
581
+
582
+ $this->_non_persistent_groups = array_merge( $this->_non_persistent_groups, $groups ) ;
583
+ $this->_non_persistent_groups = array_unique( $this->_non_persistent_groups ) ;
584
+ }
585
+
586
+ /**
587
+ * Check if is in non persistent groups or not
588
+ *
589
+ * @since 1.8
590
+ * @access public
591
+ */
592
+ public function is_non_persistent( $group )
593
+ {
594
+ return in_array( $group, $this->_non_persistent_groups ) ;
595
+ }
596
+
597
+ /**
598
+ * Get the current instance object.
599
+ *
600
+ * @since 1.8
601
+ * @access public
602
+ * @return Current class instance.
603
+ */
604
+ public static function get_instance()
605
+ {
606
+ if ( ! isset( self::$_instance ) ) {
607
+ self::$_instance = new self() ;
608
+ }
609
+
610
+ return self::$_instance ;
611
+ }
612
+ }
inc/object.lib.php ADDED
@@ -0,0 +1,655 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * LiteSpeed Object Cache Library
4
+ *
5
+ * @since 1.8
6
+ */
7
+
8
+ if ( ! defined( 'WPINC' ) ) {
9
+ die ;
10
+ }
11
+
12
+ require_once dirname( __FILE__ ) . '/object.class.php' ;
13
+
14
+ /**
15
+ * Sets up Object Cache Global and assigns it.
16
+ *
17
+ * @since 1.8
18
+ */
19
+ function wp_cache_init()
20
+ {
21
+ $GLOBALS['wp_object_cache'] = WP_Object_Cache::get_instance();
22
+ }
23
+
24
+ /**
25
+ * Retrieves the cache contents from the cache by key and group.
26
+ *
27
+ * @since 1.8
28
+ */
29
+ function wp_cache_get( $key, $group = '', $force = false, &$found = null )
30
+ {
31
+ global $wp_object_cache ;
32
+
33
+ return $wp_object_cache->get( $key, $group, $force, $found ) ;
34
+ }
35
+
36
+ /**
37
+ * Saves the data to the cache.
38
+ *
39
+ * @since 1.8
40
+ */
41
+ function wp_cache_set( $key, $data, $group = '', $expire = 0 )
42
+ {
43
+ global $wp_object_cache ;
44
+
45
+ return $wp_object_cache->set( $key, $data, $group, $expire ) ;
46
+ }
47
+
48
+ /**
49
+ * Adds data to the cache, if the cache key doesn't already exist.
50
+ *
51
+ * @since 1.8
52
+ */
53
+ function wp_cache_add( $key, $data, $group = '', $expire = 0 )
54
+ {
55
+ global $wp_object_cache ;
56
+
57
+ return $wp_object_cache->add( $key, $data, $group, $expire ) ;
58
+ }
59
+
60
+ /**
61
+ * Replaces the contents of the cache with new data.
62
+ *
63
+ * @since 1.8
64
+ */
65
+ function wp_cache_replace( $key, $data, $group = '', $expire = 0 )
66
+ {
67
+ global $wp_object_cache ;
68
+
69
+ return $wp_object_cache->replace( $key, $data, $group, $expire ) ;
70
+ }
71
+
72
+ /**
73
+ * Increment numeric cache item's value
74
+ *
75
+ * @since 1.8
76
+ */
77
+ function wp_cache_incr( $key, $offset = 1, $group = '' )
78
+ {
79
+ global $wp_object_cache ;
80
+
81
+ return $wp_object_cache->incr_desr( $key, $offset, $group ) ;
82
+ }
83
+
84
+ /**
85
+ * Decrements numeric cache item's value.
86
+ *
87
+ * @since 1.8
88
+ */
89
+ function wp_cache_decr( $key, $offset = 1, $group = '' )
90
+ {
91
+ global $wp_object_cache ;
92
+
93
+ return $wp_object_cache->incr_desr( $key, $offset, $group, false ) ;
94
+ }
95
+
96
+ /**
97
+ * Removes the cache contents matching key and group.
98
+ *
99
+ * @since 1.8
100
+ */
101
+ function wp_cache_delete( $key, $group = '' )
102
+ {
103
+ global $wp_object_cache ;
104
+
105
+ return $wp_object_cache->delete( $key, $group ) ;
106
+ }
107
+
108
+ /**
109
+ * Removes all cache items.
110
+ *
111
+ * @since 1.8
112
+ */
113
+ function wp_cache_flush()
114
+ {
115
+ global $wp_object_cache ;
116
+
117
+ return $wp_object_cache->flush() ;
118
+ }
119
+
120
+ /**
121
+ * Adds a group or set of groups to the list of global groups.
122
+ *
123
+ * @since 1.8
124
+ */
125
+ function wp_cache_add_global_groups( $groups )
126
+ {
127
+ global $wp_object_cache ;
128
+
129
+ $wp_object_cache->add_global_groups( $groups ) ;
130
+ }
131
+
132
+ /**
133
+ * Adds a group or set of groups to the list of non-persistent groups.
134
+ *
135
+ * @since 1.8
136
+ */
137
+ function wp_cache_add_non_persistent_groups( $groups )
138
+ {
139
+ global $wp_object_cache ;
140
+
141
+ $wp_object_cache->add_non_persistent_groups( $groups ) ;
142
+ }
143
+
144
+ /**
145
+ * Switches the internal blog ID.
146
+ *
147
+ * This changes the blog id used to create keys in blog specific groups.
148
+ *
149
+ * @since 1.8
150
+ *
151
+ * @see WP_Object_Cache::switch_to_blog()
152
+ * @global WP_Object_Cache $wp_object_cache Object cache global instance.
153
+ *
154
+ * @param int $blog_id Site ID.
155
+ */
156
+ function wp_cache_switch_to_blog( $blog_id ) {
157
+ global $wp_object_cache ;
158
+
159
+ $wp_object_cache->switch_to_blog( $blog_id ) ;
160
+ }
161
+
162
+ /**
163
+ * Closes the cache.
164
+ *
165
+ * @since 1.8
166
+ */
167
+ function wp_cache_close()
168
+ {
169
+ return true ;
170
+ }
171
+
172
+
173
+
174
+ class WP_Object_Cache
175
+ {
176
+ private static $_instance ;
177
+
178
+ private $_object_cache ;
179
+
180
+ private $_cache = array() ;
181
+ private $_cache_404 = array() ;
182
+
183
+ private $cache_total = 0 ;
184
+ private $count_hit_incall = 0 ;
185
+ private $count_hit = 0 ;
186
+ private $count_miss_incall = 0 ;
187
+ private $count_miss = 0 ;
188
+ private $count_set = 0 ;
189
+
190
+ private $blog_prefix ;
191
+
192
+ /**
193
+ * Init
194
+ *
195
+ * @since 1.8
196
+ * @access private
197
+ */
198
+ private function __construct()
199
+ {
200
+ $this->_object_cache = LiteSpeed_Cache_Object::get_instance() ;
201
+
202
+ $this->multisite = is_multisite() ;
203
+ $this->blog_prefix = $this->multisite ? get_current_blog_id() . ':' : '' ;
204
+
205
+ /**
206
+ * Fix multiple instance using same oc issue
207
+ * @since 1.8.2
208
+ */
209
+ ! defined( 'LSOC_PREFIX' ) && define( 'LSOC_PREFIX', substr( md5( __FILE__ ), -5 ) ) ;
210
+ }
211
+
212
+ /**
213
+ * Output debug info
214
+ *
215
+ * @since 1.8
216
+ * @access public
217
+ */
218
+ public function debug()
219
+ {
220
+ $log = ' [total] ' . $this->cache_total
221
+ . ' [hit_incall] ' . $this->count_hit_incall
222
+ . ' [hit] ' . $this->count_hit
223
+ . ' [miss_incall] ' . $this->count_miss_incall
224
+ . ' [miss] ' . $this->count_miss
225
+ . ' [set] ' . $this->count_set ;
226
+
227
+ return $log ;
228
+ }
229
+
230
+ /**
231
+ * Get from cache
232
+ *
233
+ * @since 1.8
234
+ * @access public
235
+ */
236
+ public function get( $key, $group = 'default', $force = false, &$found = null )
237
+ {
238
+ $final_key = $this->_key( $key, $group ) ;
239
+ // error_log('');
240
+ // error_log("oc: get \t\t\t[key] " . $final_key . ( $force ? "\t\t\t [forced] " : '' ) );
241
+ $found = false ;
242
+ $found_in_oc = false ;
243
+ $cache_val = false ;
244
+ if ( array_key_exists( $final_key, $this->_cache ) && ! $force ) {
245
+ $found = true ;
246
+ $cache_val = $this->_cache[ $final_key ] ;
247
+ $this->count_hit_incall ++ ;
248
+ }
249
+ elseif ( ! array_key_exists( $final_key, $this->_cache_404 ) && ! $this->_object_cache->is_non_persistent( $group ) ) {
250
+ $v = $this->_object_cache->get( $final_key ) ;
251
+
252
+ if ( $v !== null ) {
253
+ $v = @unserialize( $v ) ;
254
+ }
255
+
256
+ // To be compatible with false val
257
+ if ( is_array( $v ) && array_key_exists( 'data', $v ) ) {
258
+ $this->count_hit ++ ;
259
+ $found = true ;
260
+ $found_in_oc = true ;
261
+ $cache_val = $v[ 'data' ] ;
262
+ }
263
+ else { // Can't find key, cache it to 404
264
+ // error_log("oc: add404\t\t\t[key] " . $final_key ) ;
265
+ $this->_cache_404[ $final_key ] = 1 ;
266
+ $this->count_miss ++ ;
267
+ }
268
+ }
269
+ else {
270
+ $this->count_miss_incall ++ ;
271
+ }
272
+
273
+ if ( is_object( $cache_val ) ) {
274
+ $cache_val = clone $cache_val ;
275
+ }
276
+
277
+ // If not found but has `Store Transients` cfg on, still need to follow WP's get_transient() logic
278
+ if ( ! $found && $this->_object_cache->store_transients( $group ) ) {
279
+ $cache_val = $this->_transient_get( $key, $group ) ;
280
+ if ( $cache_val ) {
281
+ $found = true ; // $found not used for now (v1.8.3)
282
+ }
283
+ }
284
+
285
+ if ( $found_in_oc ) {
286
+ $this->_cache[ $final_key ] = $cache_val ;
287
+ }
288
+
289
+ $this->cache_total ++ ;
290
+
291
+ return $cache_val ;
292
+ }
293
+
294
+ /**
295
+ * Set to cache
296
+ *
297
+ * @since 1.8
298
+ * @access public
299
+ */
300
+ public function set( $key, $data, $group = 'default', $expire = 0 )
301
+ {
302
+ $final_key = $this->_key( $key, $group ) ;
303
+
304
+ if ( is_object( $data ) ) {
305
+ $data = clone $data ;
306
+ }
307
+ // error_log("oc: set \t\t\t[key] " . $final_key ) ;
308
+ $this->_cache[ $final_key ] = $data ;
309
+
310
+ if( array_key_exists( $final_key, $this->_cache_404 ) ) {
311
+ // error_log("oc: unset404\t\t\t[key] " . $final_key ) ;
312
+ unset( $this->_cache_404[ $final_key ] ) ;
313
+ }
314
+
315
+ if ( ! $this->_object_cache->is_non_persistent( $group ) ) {
316
+ $this->_object_cache->set( $final_key, serialize( array( 'data' => $data ) ), $expire ) ;
317
+ $this->count_set ++ ;
318
+ }
319
+
320
+ if ( $this->_object_cache->store_transients( $group ) ) {
321
+ $this->_transient_set( $key, $data, $group, $expire ) ;
322
+ }
323
+
324
+ return true ;
325
+ }
326
+
327
+ /**
328
+ * Adds data to the cache if it doesn't already exist.
329
+ *
330
+ * @since 1.8
331
+ * @access public
332
+ */
333
+ public function add( $key, $data, $group = 'default', $expire = 0 )
334
+ {
335
+ if ( wp_suspend_cache_addition() ) {
336
+ return false ;
337
+ }
338
+
339
+ $final_key = $this->_key( $key, $group ) ;
340
+
341
+ if ( array_key_exists( $final_key, $this->_cache ) ) {
342
+ return false ;
343
+ }
344
+
345
+ return $this->set( $key, $data, $group, $expire ) ;
346
+ }
347
+
348
+ /**
349
+ * Replace cache if the cache key exists.
350
+ *
351
+ * @since 1.8
352
+ * @access public
353
+ */
354
+ public function replace( $key, $data, $group = 'default', $expire = 0 )
355
+ {
356
+ $final_key = $this->_key( $key, $group ) ;
357
+
358
+ if ( ! array_key_exists( $final_key, $this->_cache ) ) {
359
+ return false ;
360
+ }
361
+
362
+ return $this->set( $key, $data, $group, $expire ) ;
363
+ }
364
+
365
+ /**
366
+ * Increments numeric cache item's value.
367
+ *
368
+ * @since 1.8
369
+ * @access public
370
+ */
371
+ public function incr_desr( $key, $offset = 1, $group = 'default', $incr = true )
372
+ {
373
+ $cache_val = $this->get( $key, $group ) ;
374
+
375
+ if ( $cache_val === false ) {
376
+ return false ;
377
+ }
378
+
379
+ if ( ! is_numeric( $cache_val ) ) {
380
+ $cache_val = 0 ;
381
+ }
382
+
383
+ $offset = (int) $offset ;
384
+
385
+ if ( $incr ) {
386
+ $cache_val += $offset ;
387
+ }
388
+ else {
389
+ $cache_val -= $offset ;
390
+ }
391
+
392
+ if ( $cache_val < 0 ) {
393
+ $cache_val = 0 ;
394
+ }
395
+
396
+ $this->set( $key, $cache_val, $group ) ;
397
+
398
+ return $cache_val ;
399
+ }
400
+
401
+ /**
402
+ * Delete cache
403
+ *
404
+ * @since 1.8
405
+ * @access public
406
+ */
407
+ public function delete( $key, $group = 'default' )
408
+ {
409
+
410
+ $final_key = $this->_key( $key, $group ) ;
411
+
412
+ if ( $this->_object_cache->store_transients( $group ) ) {
413
+ $this->_transient_del( $key, $group ) ;
414
+ }
415
+
416
+ if ( array_key_exists( $final_key, $this->_cache ) ) {
417
+ unset( $this->_cache[ $final_key ] ) ;
418
+ }
419
+ // error_log("oc: delete \t\t\t[key] " . $final_key ) ;
420
+
421
+ if ( $this->_object_cache->is_non_persistent( $group ) ) {
422
+ return false ;
423
+ }
424
+
425
+ return $this->_object_cache->delete( $final_key ) ;
426
+ }
427
+
428
+ /**
429
+ * Clear all cached data
430
+ *
431
+ * @since 1.8
432
+ * @access public
433
+ */
434
+ public function flush()
435
+ {
436
+ $this->_cache = array() ;
437
+ $this->_cache_404 = array() ;
438
+ // error_log("oc: flush " ) ;
439
+
440
+ $this->_object_cache->flush() ;
441
+
442
+ return true ;
443
+ }
444
+
445
+ /**
446
+ * Add global groups
447
+ *
448
+ * @since 1.8
449
+ * @access public
450
+ */
451
+ public function add_global_groups( $groups )
452
+ {
453
+ $this->_object_cache->add_global_groups( $groups ) ;
454
+ }
455
+
456
+ /**
457
+ * Add non persistent groups
458
+ *
459
+ * @since 1.8
460
+ * @access public
461
+ */
462
+ public function add_non_persistent_groups( $groups )
463
+ {
464
+ $this->_object_cache->add_non_persistent_groups( $groups ) ;
465
+ }
466
+
467
+ /**
468
+ * Get the final key
469
+ *
470
+ * @since 1.8
471
+ * @access private
472
+ */
473
+ private function _key( $key, $group = 'default' )
474
+ {
475
+ $prefix = $this->_object_cache->is_global( $group ) ? '' : $this->blog_prefix ;
476
+
477
+ return LSOC_PREFIX . $prefix . $group . '.' . $key ;
478
+ }
479
+
480
+ /**
481
+ * Switches the internal blog ID.
482
+ *
483
+ * This changes the blog ID used to create keys in blog specific groups.
484
+ *
485
+ * @since 1.8
486
+ *
487
+ * @param int $blog_id Blog ID.
488
+ */
489
+ public function switch_to_blog( $blog_id ) {
490
+ $blog_id = (int) $blog_id ;
491
+ $this->blog_prefix = $this->multisite ? $blog_id . ':' : '' ;
492
+ }
493
+
494
+ /**
495
+ * Get transient from wp table
496
+ *
497
+ * @since 1.8.3
498
+ * @access private
499
+ * @see `wp-includes/option.php` function `get_transient`/`set_site_transient`
500
+ */
501
+ private function _transient_get( $transient, $group )
502
+ {
503
+ if ( $group == 'transient' ) {
504
+ /**** Ori WP func start ****/
505
+ $transient_option = '_transient_' . $transient;
506
+ if ( ! wp_installing() ) {
507
+ // If option is not in alloptions, it is not autoloaded and thus has a timeout
508
+ $alloptions = wp_load_alloptions();
509
+ if ( !isset( $alloptions[$transient_option] ) ) {
510
+ $transient_timeout = '_transient_timeout_' . $transient;
511
+ $timeout = get_option( $transient_timeout );
512
+ if ( false !== $timeout && $timeout < time() ) {
513
+ delete_option( $transient_option );
514
+ delete_option( $transient_timeout );
515
+ $value = false;
516
+ }
517
+ }
518
+ }
519
+
520
+ if ( ! isset( $value ) )
521
+ $value = get_option( $transient_option );
522
+ /**** Ori WP func end ****/
523
+ }
524
+ elseif ( $group == 'site-transient' ) {
525
+ /**** Ori WP func start ****/
526
+ $no_timeout = array('update_core', 'update_plugins', 'update_themes');
527
+ $transient_option = '_site_transient_' . $transient;
528
+ if ( ! in_array( $transient, $no_timeout ) ) {
529
+ $transient_timeout = '_site_transient_timeout_' . $transient;
530
+ $timeout = get_site_option( $transient_timeout );
531
+ if ( false !== $timeout && $timeout < time() ) {
532
+ delete_site_option( $transient_option );
533
+ delete_site_option( $transient_timeout );
534
+ $value = false;
535
+ }
536
+ }
537
+
538
+ if ( ! isset( $value ) )
539
+ $value = get_site_option( $transient_option );
540
+ /**** Ori WP func end ****/
541
+ }
542
+ else {
543
+ $value = false ;
544
+ }
545
+
546
+ return $value ;
547
+ }
548
+
549
+ /**
550
+ * Set transient to WP table
551
+ *
552
+ * @since 1.8.3
553
+ * @access private
554
+ * @see `wp-includes/option.php` function `set_transient`/`set_site_transient`
555
+ */
556
+ private function _transient_set( $transient, $value, $group, $expiration )
557
+ {
558
+ if ( $group == 'transient' ) {
559
+ /**** Ori WP func start ****/
560
+ $transient_timeout = '_transient_timeout_' . $transient;
561
+ $transient_option = '_transient_' . $transient;
562
+ if ( false === get_option( $transient_option ) ) {
563
+ $autoload = 'yes';
564
+ if ( $expiration ) {
565
+ $autoload = 'no';
566
+ add_option( $transient_timeout, time() + $expiration, '', 'no' );
567
+ }
568
+ $result = add_option( $transient_option, $value, '', $autoload );
569
+ } else {
570
+ // If expiration is requested, but the transient has no timeout option,
571
+ // delete, then re-create transient rather than update.
572
+ $update = true;
573
+ if ( $expiration ) {
574
+ if ( false === get_option( $transient_timeout ) ) {
575
+ delete_option( $transient_option );
576
+ add_option( $transient_timeout, time() + $expiration, '', 'no' );
577
+ $result = add_option( $transient_option, $value, '', 'no' );
578
+ $update = false;
579
+ } else {
580
+ update_option( $transient_timeout, time() + $expiration );
581
+ }
582
+ }
583
+ if ( $update ) {
584
+ $result = update_option( $transient_option, $value );
585
+ }
586
+ }
587
+ /**** Ori WP func end ****/
588
+ }
589
+ elseif ( $group == 'site-transient' ) {
590
+ /**** Ori WP func start ****/
591
+ $transient_timeout = '_site_transient_timeout_' . $transient;
592
+ $option = '_site_transient_' . $transient;
593
+ if ( false === get_site_option( $option ) ) {
594
+ if ( $expiration )
595
+ add_site_option( $transient_timeout, time() + $expiration );
596
+ $result = add_site_option( $option, $value );
597
+ } else {
598
+ if ( $expiration )
599
+ update_site_option( $transient_timeout, time() + $expiration );
600
+ $result = update_site_option( $option, $value );
601
+ }
602
+ /**** Ori WP func end ****/
603
+ }
604
+ else {
605
+ $result = null ;
606
+ }
607
+
608
+ return $result ;
609
+ }
610
+
611
+ /**
612
+ * Delete transient from WP table
613
+ *
614
+ * @since 1.8.3
615
+ * @access private
616
+ * @see `wp-includes/option.php` function `delete_transient`/`delete_site_transient`
617
+ */
618
+ private function _transient_del( $transient, $group )
619
+ {
620
+ if ( $group == 'transient' ) {
621
+ /**** Ori WP func start ****/
622
+ $option_timeout = '_transient_timeout_' . $transient;
623
+ $option = '_transient_' . $transient;
624
+ $result = delete_option( $option );
625
+ if ( $result )
626
+ delete_option( $option_timeout );
627
+ /**** Ori WP func end ****/
628
+ }
629
+ elseif ( $group == 'site-transient' ) {
630
+ /**** Ori WP func start ****/
631
+ $option_timeout = '_site_transient_timeout_' . $transient;
632
+ $option = '_site_transient_' . $transient;
633
+ $result = delete_site_option( $option );
634
+ if ( $result )
635
+ delete_site_option( $option_timeout );
636
+ /**** Ori WP func end ****/
637
+ }
638
+ }
639
+
640
+ /**
641
+ * Get the current instance object.
642
+ *
643
+ * @since 1.8
644
+ * @access public
645
+ * @return Current class instance.
646
+ */
647
+ public static function get_instance()
648
+ {
649
+ if ( ! isset( self::$_instance ) ) {
650
+ self::$_instance = new self() ;
651
+ }
652
+
653
+ return self::$_instance ;
654
+ }
655
+ }
inc/optimize.class.php CHANGED
@@ -189,7 +189,7 @@ class LiteSpeed_Cache_Optimize
189
  LiteSpeed_Cache_Control::set_custom_ttl( 8640000 ) ;
190
  LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_MIN . '_CSS_ASYNC' ) ;
191
 
192
- $file = LSWCP_DIR . 'js/css_async.min.js' ;
193
 
194
  header( 'Content-Length: ' . filesize( $file ) ) ;
195
  header( 'Content-Type: application/x-javascript; charset=utf-8' ) ;
189
  LiteSpeed_Cache_Control::set_custom_ttl( 8640000 ) ;
190
  LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_MIN . '_CSS_ASYNC' ) ;
191
 
192
+ $file = LSCWP_DIR . 'js/css_async.min.js' ;
193
 
194
  header( 'Content-Length: ' . filesize( $file ) ) ;
195
  header( 'Content-Type: application/x-javascript; charset=utf-8' ) ;
inc/purge.class.php CHANGED
@@ -19,6 +19,89 @@ class LiteSpeed_Cache_Purge
19
  const X_HEADER = 'X-LiteSpeed-Purge' ;
20
  const PURGE_QUEUE = 'litespeed-cache-purge-queue' ;
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  /**
23
  * Adds new public purge tags to the array of purge tags for the request.
24
  *
@@ -664,7 +747,7 @@ class LiteSpeed_Cache_Purge
664
 
665
  if ( $config->purge_by_post(LiteSpeed_Cache_Config::PURGE_TERM) ) {
666
  $taxonomies = get_object_taxonomies($post_type) ;
667
- //LiteSpeed_Cache_Log::push('purge by post, check tax = ' . var_export($taxonomies, true)) ;
668
  foreach ( $taxonomies as $tax ) {
669
  $terms = get_the_terms($post_id, $tax) ;
670
  if ( ! empty($terms) ) {
19
  const X_HEADER = 'X-LiteSpeed-Purge' ;
20
  const PURGE_QUEUE = 'litespeed-cache-purge-queue' ;
21
 
22
+ const TYPE_OBJECT_PURGE_ALL = 'object_purge_all' ;
23
+ const TYPE_OPCACHE_PURGE_ALL = 'opcache_purge_all' ;
24
+
25
+ /**
26
+ * Handle all request actions from main cls
27
+ *
28
+ * @since 1.8
29
+ * @access public
30
+ */
31
+ public static function handler()
32
+ {
33
+ $instance = self::get_instance() ;
34
+
35
+ $type = LiteSpeed_Cache_Router::verify_type() ;
36
+
37
+ switch ( $type ) {
38
+ case self::TYPE_OBJECT_PURGE_ALL :
39
+ $instance->_object_purge_all() ;
40
+ break ;
41
+
42
+ case self::TYPE_OPCACHE_PURGE_ALL :
43
+ $instance->_opcache_purge_all() ;
44
+ break ;
45
+
46
+ default:
47
+ break ;
48
+ }
49
+
50
+ LiteSpeed_Cache_Admin::redirect() ;
51
+ }
52
+
53
+ /**
54
+ * Purge opcode cache
55
+ *
56
+ * @since 1.8.2
57
+ * @access private
58
+ */
59
+ private function _opcache_purge_all()
60
+ {
61
+ if ( ! LiteSpeed_Cache_Router::opcache_enabled() ) {
62
+ LiteSpeed_Cache_Log::debug( 'Purge: Failed to reset opcode cache due to opcache not enabled' ) ;
63
+
64
+ $msg = __( 'Opcode cache is not enabled.', 'litespeed-cache' ) ;
65
+ LiteSpeed_Cache_Admin_Display::error( $msg ) ;
66
+
67
+ return false ;
68
+ }
69
+
70
+ // Purge opcode cache
71
+ opcache_reset() ;
72
+ LiteSpeed_Cache_Log::debug( 'Purge: Reset opcode cache' ) ;
73
+
74
+ $msg = __( 'Reset the entire opcode cache successfully.', 'litespeed-cache' ) ;
75
+ LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
76
+
77
+ return true ;
78
+ }
79
+
80
+ /**
81
+ * Purge object cache
82
+ *
83
+ * @since 1.8
84
+ * @access private
85
+ */
86
+ private function _object_purge_all()
87
+ {
88
+ if ( ! defined( 'LSCWP_OBJECT_CACHE' ) ) {
89
+ LiteSpeed_Cache_Log::debug( 'Purge: Failed to flush object cache due to object cache not enabled' ) ;
90
+
91
+ $msg = __( 'Object cache is not enabled.', 'litespeed-cache' ) ;
92
+ LiteSpeed_Cache_Admin_Display::error( $msg ) ;
93
+
94
+ return false ;
95
+ }
96
+ LiteSpeed_Cache_Object::get_instance()->flush() ;
97
+ LiteSpeed_Cache_Log::debug( 'Purge: Flushed object cache' ) ;
98
+
99
+ $msg = __( 'Purge all object caches successfully.', 'litespeed-cache' ) ;
100
+ LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
101
+
102
+ return true ;
103
+ }
104
+
105
  /**
106
  * Adds new public purge tags to the array of purge tags for the request.
107
  *
747
 
748
  if ( $config->purge_by_post(LiteSpeed_Cache_Config::PURGE_TERM) ) {
749
  $taxonomies = get_object_taxonomies($post_type) ;
750
+ //LiteSpeed_Cache_Log::debug('purge by post, check tax = ' . var_export($taxonomies, true)) ;
751
  foreach ( $taxonomies as $tax ) {
752
  $terms = get_the_terms($post_id, $tax) ;
753
  if ( ! empty($terms) ) {
inc/router.class.php CHANGED
@@ -152,8 +152,8 @@ class LiteSpeed_Cache_Router
152
  if ( ! isset( self::$_action ) ) {
153
  self::$_action = false;
154
  self::get_instance()->verify_action() ;
155
- if ( self::$_action && LiteSpeed_Cache_Log::get_enabled() ) {
156
- LiteSpeed_Cache_Log::push( 'LSCWP_CTRL verified: ' . var_export( self::$_action, true ) ) ;
157
  }
158
 
159
  }
@@ -342,9 +342,11 @@ class LiteSpeed_Cache_Router
342
  case LiteSpeed_Cache::ACTION_CRAWLER_CRON_ENABLE:
343
  case LiteSpeed_Cache::ACTION_DO_CRAWL:
344
  case LiteSpeed_Cache::ACTION_BLACKLIST_SAVE:
 
345
  case LiteSpeed_Cache::ACTION_MEDIA:
346
  case LiteSpeed_Cache::ACTION_IAPI:
347
  case LiteSpeed_Cache::ACTION_CDN:
 
348
  if ( defined( 'LITESPEED_ON' ) && $_can_option && ! $_is_network_admin ) {
349
  self::$_action = $action ;
350
  }
@@ -494,6 +496,17 @@ class LiteSpeed_Cache_Router
494
  return $_ip ;
495
  }
496
 
 
 
 
 
 
 
 
 
 
 
 
497
  /**
498
  * Get the current instance object.
499
  *
152
  if ( ! isset( self::$_action ) ) {
153
  self::$_action = false;
154
  self::get_instance()->verify_action() ;
155
+ if ( self::$_action ) {
156
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'LSCWP_CTRL verified: ' . var_export( self::$_action, true ) ) ;
157
  }
158
 
159
  }
342
  case LiteSpeed_Cache::ACTION_CRAWLER_CRON_ENABLE:
343
  case LiteSpeed_Cache::ACTION_DO_CRAWL:
344
  case LiteSpeed_Cache::ACTION_BLACKLIST_SAVE:
345
+ case LiteSpeed_Cache::ACTION_PURGE:
346
  case LiteSpeed_Cache::ACTION_MEDIA:
347
  case LiteSpeed_Cache::ACTION_IAPI:
348
  case LiteSpeed_Cache::ACTION_CDN:
349
+ case LiteSpeed_Cache::ACTION_IMPORT:
350
  if ( defined( 'LITESPEED_ON' ) && $_can_option && ! $_is_network_admin ) {
351
  self::$_action = $action ;
352
  }
496
  return $_ip ;
497
  }
498
 
499
+ /**
500
+ * Check if opcode cache is enabled
501
+ *
502
+ * @since 1.8.2
503
+ * @access public
504
+ */
505
+ public static function opcache_enabled()
506
+ {
507
+ return function_exists( 'opcache_reset' ) && ini_get( 'opcache.enable' ) ;
508
+ }
509
+
510
  /**
511
  * Get the current instance object.
512
  *
inc/task.class.php CHANGED
@@ -170,9 +170,7 @@ class LiteSpeed_Cache_Task
170
  $interval = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::CRWL_RUN_INTERVAL ) ;
171
  // $wp_schedules = wp_get_schedules() ;
172
  if ( ! array_key_exists( self::CRON_FITLER_CRAWLER, $schedules ) ) {
173
- // if ( LiteSpeed_Cache_Log::get_enabled() ) {
174
- // LiteSpeed_Cache_Log::push('Crawler cron log: ......cron filter '.$interval.' added......') ;
175
- // }
176
  $schedules[ self::CRON_FITLER_CRAWLER ] = array(
177
  'interval' => $interval,
178
  'display' => __( 'LiteSpeed Cache Custom Cron Crawler', 'litespeed-cache' ),
170
  $interval = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::CRWL_RUN_INTERVAL ) ;
171
  // $wp_schedules = wp_get_schedules() ;
172
  if ( ! array_key_exists( self::CRON_FITLER_CRAWLER, $schedules ) ) {
173
+ // LiteSpeed_Cache_Log::debug('Crawler cron log: ......cron filter '.$interval.' added......') ;
 
 
174
  $schedules[ self::CRON_FITLER_CRAWLER ] = array(
175
  'interval' => $interval,
176
  'display' => __( 'LiteSpeed Cache Custom Cron Crawler', 'litespeed-cache' ),
inc/utility.class.php CHANGED
@@ -184,7 +184,7 @@ class LiteSpeed_Cache_Utility
184
  */
185
  public static function compatibility()
186
  {
187
- require_once LSWCP_DIR . 'lib/litespeed-php-compatibility.func.php' ;
188
  }
189
 
190
  /**
184
  */
185
  public static function compatibility()
186
  {
187
+ require_once LSCWP_DIR . 'lib/litespeed-php-compatibility.func.php' ;
188
  }
189
 
190
  /**
inc/vary.class.php CHANGED
@@ -152,7 +152,7 @@ class LiteSpeed_Cache_Vary
152
 
153
  // Remove commenter prefilled info if exists, for public cache
154
  foreach( $_COOKIE as $cookie_name => $cookie_value ) {
155
- if ( strlen( $cookie_name ) >= 15 && strncmp( $cookie_name, 'comment_author_', 15 ) == 0 ) {
156
  unset( $_COOKIE[ $cookie_name ] ) ;
157
  }
158
  }
@@ -353,7 +353,7 @@ class LiteSpeed_Cache_Vary
353
  }
354
 
355
  $res = implode( ';', $res ) ;
356
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
357
  return $res ;
358
  }
359
  // Encrypt in production
152
 
153
  // Remove commenter prefilled info if exists, for public cache
154
  foreach( $_COOKIE as $cookie_name => $cookie_value ) {
155
+ if ( strlen( $cookie_name ) >= 15 && strpos( $cookie_name, 'comment_author_' ) === 0 ) {
156
  unset( $_COOKIE[ $cookie_name ] ) ;
157
  }
158
  }
353
  }
354
 
355
  $res = implode( ';', $res ) ;
356
+ if ( defined( 'LSCWP_LOG' ) ) {
357
  return $res ;
358
  }
359
  // Encrypt in production
includes/litespeed-cache-activation.class.php CHANGED
@@ -115,11 +115,11 @@ class LiteSpeed_Cache_Activation
115
  foreach ( $sites as $site ) {
116
  $bid = is_object( $site ) && property_exists( $site, 'blog_id' ) ? $site->blog_id : $site ;
117
  $plugins = get_blog_option( $bid , 'active_plugins', $default ) ;
118
- if ( in_array( LSWCP_BASENAME, $plugins, true ) ) {
119
  $count++ ;
120
  }
121
  }
122
- if ( is_plugin_active_for_network( LSWCP_BASENAME ) ) {
123
  $count++ ;
124
  }
125
  return $count ;
@@ -177,7 +177,7 @@ class LiteSpeed_Cache_Activation
177
  }
178
  }
179
 
180
- $adv_cache_path = LSWCP_CONTENT_DIR . '/advanced-cache.php' ;
181
  // this file can be generated by other cache plugin like w3tc, we only delete our own file
182
  if ( file_exists( $adv_cache_path ) && is_writable( $adv_cache_path ) ) {
183
  if ( strpos( file_get_contents( $adv_cache_path ), 'LSCACHE_ADV_CACHE' ) !== false ) {
@@ -191,6 +191,12 @@ class LiteSpeed_Cache_Activation
191
  error_log( 'Failed to remove advanced-cache.php, file does not exist or is not writable!' ) ;
192
  }
193
 
 
 
 
 
 
 
194
  if ( ! LiteSpeed_Cache_Config::wp_cache_var_setter( false ) ) {
195
  error_log('In wp-config.php: WP_CACHE could not be set to false during deactivation!') ;
196
  }
@@ -210,12 +216,12 @@ class LiteSpeed_Cache_Activation
210
  */
211
  public static function try_copy_advanced_cache()
212
  {
213
- $adv_cache_path = LSWCP_CONTENT_DIR . '/advanced-cache.php' ;
214
  if ( file_exists( $adv_cache_path ) && ( filesize( $adv_cache_path ) !== 0 || ! is_writable( $adv_cache_path ) ) ) {
215
  return false ;
216
  }
217
 
218
- copy( LSWCP_DIR . 'includes/advanced-cache.php', $adv_cache_path ) ;
219
  include( $adv_cache_path ) ;
220
  $ret = defined( 'LSCACHE_ADV_CACHE' ) ;
221
  return $ret ;
115
  foreach ( $sites as $site ) {
116
  $bid = is_object( $site ) && property_exists( $site, 'blog_id' ) ? $site->blog_id : $site ;
117
  $plugins = get_blog_option( $bid , 'active_plugins', $default ) ;
118
+ if ( in_array( LSCWP_BASENAME, $plugins, true ) ) {
119
  $count++ ;
120
  }
121
  }
122
+ if ( is_plugin_active_for_network( LSCWP_BASENAME ) ) {
123
  $count++ ;
124
  }
125
  return $count ;
177
  }
178
  }
179
 
180
+ $adv_cache_path = LSCWP_CONTENT_DIR . '/advanced-cache.php' ;
181
  // this file can be generated by other cache plugin like w3tc, we only delete our own file
182
  if ( file_exists( $adv_cache_path ) && is_writable( $adv_cache_path ) ) {
183
  if ( strpos( file_get_contents( $adv_cache_path ), 'LSCACHE_ADV_CACHE' ) !== false ) {
191
  error_log( 'Failed to remove advanced-cache.php, file does not exist or is not writable!' ) ;
192
  }
193
 
194
+ /**
195
+ * Remove object cache file if is us
196
+ * @since 1.8.2
197
+ */
198
+ LiteSpeed_Cache_Object::get_instance()->del_file() ;
199
+
200
  if ( ! LiteSpeed_Cache_Config::wp_cache_var_setter( false ) ) {
201
  error_log('In wp-config.php: WP_CACHE could not be set to false during deactivation!') ;
202
  }
216
  */
217
  public static function try_copy_advanced_cache()
218
  {
219
+ $adv_cache_path = LSCWP_CONTENT_DIR . '/advanced-cache.php' ;
220
  if ( file_exists( $adv_cache_path ) && ( filesize( $adv_cache_path ) !== 0 || ! is_writable( $adv_cache_path ) ) ) {
221
  return false ;
222
  }
223
 
224
+ copy( LSCWP_DIR . 'includes/advanced-cache.php', $adv_cache_path ) ;
225
  include( $adv_cache_path ) ;
226
  $ret = defined( 'LSCACHE_ADV_CACHE' ) ;
227
  return $ret ;
includes/litespeed-cache-cdn.class.php CHANGED
@@ -468,9 +468,9 @@ class LiteSpeed_Cache_CDN
468
  $url_parsed = parse_url( $url ) ;
469
 
470
  // Only images under wp-cotnent/wp-includes can be replaced
471
- if ( stripos( $url_parsed[ 'path' ], LSWCP_CONTENT_FOLDER ) === false && stripos( $url_parsed[ 'path' ], 'wp-includes' ) === false && stripos( $url_parsed[ 'path' ], '/min/' ) === false ) {
472
  if ( ! defined( 'UPLOADS' ) || stripos( $url_parsed[ 'path' ], UPLOADS ) === false ) {
473
- LiteSpeed_Cache_Log::debug2( 'CDN: rewriting failed: path not match: ' . LSWCP_CONTENT_FOLDER ) ;
474
  return false ;
475
  }
476
  }
@@ -677,25 +677,41 @@ class LiteSpeed_Cache_CDN
677
  */
678
  public function cloudflare_fetch_zone( $options )
679
  {
 
 
680
  $url = 'https://api.cloudflare.com/client/v4/zones?status=active&match=all' ;
681
 
 
 
 
 
 
 
 
 
 
 
682
  $zones = $this->_cloudflare_call( $url, 'GET', false, $options, false ) ;
683
 
684
  if ( ! $zones ) {
 
685
  return false ;
686
  }
687
 
688
- $kw = $options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_NAME ] ;
689
  if ( ! $kw ) {
 
690
  return $zones[ 0 ] ;
691
  }
692
 
693
  foreach ( $zones as $v ) {
694
  if ( strpos( $v[ 'name' ], $kw ) !== false ) {
 
695
  return $v ;
696
  }
697
  }
698
 
 
 
699
  return $zones[ 0 ] ;
700
  }
701
 
468
  $url_parsed = parse_url( $url ) ;
469
 
470
  // Only images under wp-cotnent/wp-includes can be replaced
471
+ if ( stripos( $url_parsed[ 'path' ], LSCWP_CONTENT_FOLDER ) === false && stripos( $url_parsed[ 'path' ], 'wp-includes' ) === false && stripos( $url_parsed[ 'path' ], '/min/' ) === false ) {
472
  if ( ! defined( 'UPLOADS' ) || stripos( $url_parsed[ 'path' ], UPLOADS ) === false ) {
473
+ LiteSpeed_Cache_Log::debug2( 'CDN: rewriting failed: path not match: ' . LSCWP_CONTENT_FOLDER ) ;
474
  return false ;
475
  }
476
  }
677
  */
678
  public function cloudflare_fetch_zone( $options )
679
  {
680
+ $kw = $options[ LiteSpeed_Cache_Config::OPID_CDN_CLOUDFLARE_NAME ] ;
681
+
682
  $url = 'https://api.cloudflare.com/client/v4/zones?status=active&match=all' ;
683
 
684
+ // Try exact match first
685
+ if ( $kw && strpos( $kw, '.' ) ) {
686
+ $zones = $this->_cloudflare_call( $url . '&name=' . $kw, 'GET', false, $options, false ) ;
687
+ if ( $zones ) {
688
+ LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone exact matched' ) ;
689
+ return $zones[ 0 ] ;
690
+ }
691
+ }
692
+
693
+ // Can't find, try to get default one
694
  $zones = $this->_cloudflare_call( $url, 'GET', false, $options, false ) ;
695
 
696
  if ( ! $zones ) {
697
+ LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone no zone' ) ;
698
  return false ;
699
  }
700
 
 
701
  if ( ! $kw ) {
702
+ LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone no set name, use first one by default' ) ;
703
  return $zones[ 0 ] ;
704
  }
705
 
706
  foreach ( $zones as $v ) {
707
  if ( strpos( $v[ 'name' ], $kw ) !== false ) {
708
+ LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone matched ' . $kw . ' [name] ' . $v[ 'name' ] ) ;
709
  return $v ;
710
  }
711
  }
712
 
713
+ // Can't match current name, return default one
714
+ LiteSpeed_Cache_Log::debug( 'CDN: cloudflare_fetch_zone failed match name, use first one by default' ) ;
715
  return $zones[ 0 ] ;
716
  }
717
 
includes/litespeed-cache-config.class.php CHANGED
@@ -27,6 +27,18 @@ class LiteSpeed_Cache_Config
27
  const ITEM_CDN_MAPPING = 'litespeed-cache-cdn_mapping' ;
28
  const ITEM_DNS_PREFETCH = 'litespeed-cache-dns_prefetch' ;
29
  const ITEM_CLOUDFLARE_STATUS = 'litespeed-cache-cloudflare_status' ;
 
 
 
 
 
 
 
 
 
 
 
 
30
  // const ITEM_FAVICON = 'litespeed-cache-favicon' ;
31
 
32
  const ITEM_CDN_MAPPING_URL = 'url' ;
@@ -56,6 +68,17 @@ class LiteSpeed_Cache_Config
56
  const OPID_CACHE_MOBILE = 'mobileview_enabled' ;
57
  const ID_MOBILEVIEW_LIST = 'mobileview_rules' ;
58
  const OPID_CACHE_URI_PRIV = 'cache_uri_priv' ;
 
 
 
 
 
 
 
 
 
 
 
59
  const OPID_CACHE_BROWSER = 'cache_browser' ;
60
  const OPID_CACHE_BROWSER_TTL = 'cache_browser_ttl' ;
61
 
@@ -77,8 +100,6 @@ class LiteSpeed_Cache_Config
77
  const OPID_DEBUG_COOKIE = 'debug_cookie' ;
78
  const OPID_COLLAPS_QS = 'collaps_qs' ;
79
  const OPID_LOG_FILTERS = 'log_filters' ;
80
- const OPID_LOG_IGNORE_FILTERS = 'log_ignore_filters' ;
81
- const OPID_LOG_IGNORE_PART_FILTERS = 'log_ignore_part_filters' ;
82
 
83
  const OPID_PUBLIC_TTL = 'public_ttl' ;
84
  const OPID_PRIVATE_TTL = 'private_ttl' ;
@@ -108,6 +129,7 @@ class LiteSpeed_Cache_Config
108
  const OPID_EXCLUDES_TAG = 'excludes_tag' ;
109
 
110
  // const OPID_ADV_FAVICON = 'adv_favicon' ;
 
111
 
112
  const OPID_CSS_MINIFY = 'css_minify' ;
113
  const OPID_CSS_COMBINE = 'css_combine' ;
@@ -215,7 +237,7 @@ class LiteSpeed_Cache_Config
215
  }
216
 
217
  // Vary group settings
218
- $this->vary_groups = get_option( self::VARY_GROUP, array() ) ;
219
 
220
  // Exclude optimization role setting
221
  $this->exclude_optimization_roles = get_option( self::EXCLUDE_OPTIMIZATION_ROLES, array() ) ;
@@ -312,9 +334,9 @@ class LiteSpeed_Cache_Config
312
  if ( isset( $this->options[$id] ) ) {
313
  return $this->options[$id] ;
314
  }
315
- if ( LiteSpeed_Cache_Log::initialized() ) {
316
- LiteSpeed_Cache_Log::debug( 'Invalid option ID ' . $id ) ;
317
- }
318
  return NULL ;
319
  }
320
 
@@ -523,6 +545,17 @@ class LiteSpeed_Cache_Config
523
  self::OPID_CACHE_MOBILE => false,
524
  self::ID_MOBILEVIEW_LIST => false,
525
  self::OPID_CACHE_URI_PRIV => '',
 
 
 
 
 
 
 
 
 
 
 
526
  self::OPID_CACHE_BROWSER => false,
527
  self::OPID_CACHE_BROWSER_TTL => 2592000,
528
 
@@ -537,8 +570,6 @@ class LiteSpeed_Cache_Config
537
  self::OPID_DEBUG_COOKIE => false,
538
  self::OPID_COLLAPS_QS => false,
539
  self::OPID_LOG_FILTERS => false,
540
- self::OPID_LOG_IGNORE_FILTERS => "gettext\ngettext_with_context\nget_the_terms\nget_term",
541
- self::OPID_LOG_IGNORE_PART_FILTERS => "i18n\nlocale\nsettings\noption",
542
  self::OPID_PUBLIC_TTL => 604800,
543
  self::OPID_PRIVATE_TTL => 1800,
544
  self::OPID_FRONT_PAGE_TTL => 604800,
@@ -553,6 +584,7 @@ class LiteSpeed_Cache_Config
553
  self::OPID_EXCLUDES_TAG => '',
554
 
555
  // self::OPID_ADV_FAVICON => false,
 
556
 
557
  self::OPID_CSS_MINIFY => false,
558
  self::OPID_CSS_COMBINE => false,
@@ -652,6 +684,17 @@ class LiteSpeed_Cache_Config
652
  self::OPID_CACHE_RES => true,
653
  self::OPID_CACHE_MOBILE => 0, // todo: why not false
654
  self::ID_MOBILEVIEW_LIST => false,
 
 
 
 
 
 
 
 
 
 
 
655
  self::OPID_CACHE_BROWSER => false,
656
  self::OPID_CACHE_BROWSER_TTL => 2592000,
657
  self::OPID_LOGIN_COOKIE => '',
@@ -663,6 +706,28 @@ class LiteSpeed_Cache_Config
663
  return $default_site_options ;
664
  }
665
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
666
  /**
667
  * Get the plugin's site wide options.
668
  *
@@ -907,9 +972,7 @@ class LiteSpeed_Cache_Config
907
 
908
  $res = add_option( self::OPTION_NAME, $this->get_default_options() ) ;
909
 
910
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
911
- LiteSpeed_Cache_Log::push( "plugin_activation update option = " . var_export( $res, true ) ) ;
912
- }
913
 
914
  if ( is_multisite() ) {
915
 
27
  const ITEM_CDN_MAPPING = 'litespeed-cache-cdn_mapping' ;
28
  const ITEM_DNS_PREFETCH = 'litespeed-cache-dns_prefetch' ;
29
  const ITEM_CLOUDFLARE_STATUS = 'litespeed-cache-cloudflare_status' ;
30
+ const ITEM_LOG_IGNORE_FILTERS = 'litespeed-log_ignore_filters' ;
31
+ const ITEM_LOG_IGNORE_PART_FILTERS = 'litespeed-log_ignore_part_filters' ;
32
+ const ITEM_OBJECT_GLOBAL_GROUPS = 'litespeed-object_global_groups' ;
33
+ const ITEM_OBJECT_NON_PERSISTENT_GROUPS = 'litespeed-object_non_persistent_groups' ;
34
+
35
+ const ITEM_SETTING_MODE = 'litespeed-setting-mode' ;
36
+
37
+ // Server variables
38
+ const ENV_CRAWLER_USLEEP = 'CRAWLER_USLEEP' ;
39
+ const ENV_CRAWLER_LOAD_LIMIT = 'CRAWLER_LOAD_LIMIT' ;
40
+ const ENV_CRAWLER_LOAD_LIMIT_ENFORCE = 'CRAWLER_LOAD_LIMIT_ENFORCE' ;
41
+
42
  // const ITEM_FAVICON = 'litespeed-cache-favicon' ;
43
 
44
  const ITEM_CDN_MAPPING_URL = 'url' ;
68
  const OPID_CACHE_MOBILE = 'mobileview_enabled' ;
69
  const ID_MOBILEVIEW_LIST = 'mobileview_rules' ;
70
  const OPID_CACHE_URI_PRIV = 'cache_uri_priv' ;
71
+ const OPID_CACHE_OBJECT = 'cache_object' ;
72
+ const OPID_CACHE_OBJECT_KIND = 'cache_object_kind' ;
73
+ const OPID_CACHE_OBJECT_HOST = 'cache_object_host' ;
74
+ const OPID_CACHE_OBJECT_PORT = 'cache_object_port' ;
75
+ const OPID_CACHE_OBJECT_LIFE = 'cache_object_life' ;
76
+ const OPID_CACHE_OBJECT_PERSISTENT = 'cache_object_persistent' ;
77
+ const OPID_CACHE_OBJECT_ADMIN = 'cache_object_admin' ;
78
+ const OPID_CACHE_OBJECT_TRANSIENTS = 'cache_object_transients' ;
79
+ const OPID_CACHE_OBJECT_DB_ID = 'cache_object_db_id' ;
80
+ const OPID_CACHE_OBJECT_USER = 'cache_object_user' ;
81
+ const OPID_CACHE_OBJECT_PSWD = 'cache_object_pswd' ;
82
  const OPID_CACHE_BROWSER = 'cache_browser' ;
83
  const OPID_CACHE_BROWSER_TTL = 'cache_browser_ttl' ;
84
 
100
  const OPID_DEBUG_COOKIE = 'debug_cookie' ;
101
  const OPID_COLLAPS_QS = 'collaps_qs' ;
102
  const OPID_LOG_FILTERS = 'log_filters' ;
 
 
103
 
104
  const OPID_PUBLIC_TTL = 'public_ttl' ;
105
  const OPID_PRIVATE_TTL = 'private_ttl' ;
129
  const OPID_EXCLUDES_TAG = 'excludes_tag' ;
130
 
131
  // const OPID_ADV_FAVICON = 'adv_favicon' ;
132
+ const OPID_ADV_INSTANT_CLICK = 'instant_click' ;
133
 
134
  const OPID_CSS_MINIFY = 'css_minify' ;
135
  const OPID_CSS_COMBINE = 'css_combine' ;
237
  }
238
 
239
  // Vary group settings
240
+ $this->vary_groups = (array) get_option( self::VARY_GROUP, array() ) ;
241
 
242
  // Exclude optimization role setting
243
  $this->exclude_optimization_roles = get_option( self::EXCLUDE_OPTIMIZATION_ROLES, array() ) ;
334
  if ( isset( $this->options[$id] ) ) {
335
  return $this->options[$id] ;
336
  }
337
+
338
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Invalid option ID ' . $id ) ;
339
+
340
  return NULL ;
341
  }
342
 
545
  self::OPID_CACHE_MOBILE => false,
546
  self::ID_MOBILEVIEW_LIST => false,
547
  self::OPID_CACHE_URI_PRIV => '',
548
+ self::OPID_CACHE_OBJECT => false,
549
+ self::OPID_CACHE_OBJECT_KIND => false,
550
+ self::OPID_CACHE_OBJECT_HOST => 'localhost',
551
+ self::OPID_CACHE_OBJECT_PORT => '11211',
552
+ self::OPID_CACHE_OBJECT_LIFE => '360',
553
+ self::OPID_CACHE_OBJECT_PERSISTENT => true,
554
+ self::OPID_CACHE_OBJECT_ADMIN => true,
555
+ self::OPID_CACHE_OBJECT_TRANSIENTS => true,
556
+ self::OPID_CACHE_OBJECT_DB_ID => 0,
557
+ self::OPID_CACHE_OBJECT_USER => '',
558
+ self::OPID_CACHE_OBJECT_PSWD => '',
559
  self::OPID_CACHE_BROWSER => false,
560
  self::OPID_CACHE_BROWSER_TTL => 2592000,
561
 
570
  self::OPID_DEBUG_COOKIE => false,
571
  self::OPID_COLLAPS_QS => false,
572
  self::OPID_LOG_FILTERS => false,
 
 
573
  self::OPID_PUBLIC_TTL => 604800,
574
  self::OPID_PRIVATE_TTL => 1800,
575
  self::OPID_FRONT_PAGE_TTL => 604800,
584
  self::OPID_EXCLUDES_TAG => '',
585
 
586
  // self::OPID_ADV_FAVICON => false,
587
+ self::OPID_ADV_INSTANT_CLICK => false,
588
 
589
  self::OPID_CSS_MINIFY => false,
590
  self::OPID_CSS_COMBINE => false,
684
  self::OPID_CACHE_RES => true,
685
  self::OPID_CACHE_MOBILE => 0, // todo: why not false
686
  self::ID_MOBILEVIEW_LIST => false,
687
+ self::OPID_CACHE_OBJECT => false,
688
+ self::OPID_CACHE_OBJECT_KIND => false,
689
+ self::OPID_CACHE_OBJECT_HOST => 'localhost',
690
+ self::OPID_CACHE_OBJECT_PORT => '11211',
691
+ self::OPID_CACHE_OBJECT_LIFE => '360',
692
+ self::OPID_CACHE_OBJECT_PERSISTENT => true,
693
+ self::OPID_CACHE_OBJECT_ADMIN => true,
694
+ self::OPID_CACHE_OBJECT_TRANSIENTS => true,
695
+ self::OPID_CACHE_OBJECT_DB_ID => 0,
696
+ self::OPID_CACHE_OBJECT_USER => '',
697
+ self::OPID_CACHE_OBJECT_PSWD => '',
698
  self::OPID_CACHE_BROWSER => false,
699
  self::OPID_CACHE_BROWSER_TTL => 2592000,
700
  self::OPID_LOGIN_COOKIE => '',
706
  return $default_site_options ;
707
  }
708
 
709
+ /**
710
+ * Get default item val
711
+ *
712
+ * @since 1.8
713
+ * @access public
714
+ */
715
+ public function default_item( $k )
716
+ {
717
+ switch ( $k ) {
718
+ case self::ITEM_OBJECT_GLOBAL_GROUPS :
719
+ return "users\nuserlogins\nusermeta\nuser_meta\nsite-transient\nsite-options\nsite-lookup\nblog-lookup\nblog-details\nrss\nglobal-posts\nblog-id-cache" ;
720
+
721
+ case self::ITEM_OBJECT_NON_PERSISTENT_GROUPS :
722
+ return "comment\ncounts\nplugins" ;
723
+
724
+ default :
725
+ break ;
726
+ }
727
+
728
+ return false ;
729
+ }
730
+
731
  /**
732
  * Get the plugin's site wide options.
733
  *
972
 
973
  $res = add_option( self::OPTION_NAME, $this->get_default_options() ) ;
974
 
975
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( "plugin_activation update option = " . var_export( $res, true ) ) ;
 
 
976
 
977
  if ( is_multisite() ) {
978
 
includes/litespeed-cache-control.class.php CHANGED
@@ -79,7 +79,7 @@ class LiteSpeed_Cache_Control
79
  $cache_res = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_RES ) ;
80
  if ( $cache_res ) {
81
  $uri = esc_url( $_SERVER["REQUEST_URI"] ) ;
82
- $pattern = '!' . LSWCP_CONTENT_FOLDER . LiteSpeed_Cache_Admin_Rules::RW_PATTERN_RES . '!' ;
83
  if ( preg_match( $pattern, $uri ) ) {
84
  add_action( 'wp_loaded', 'LiteSpeed_Cache_Control::set_cacheable', 5 ) ;
85
  }
79
  $cache_res = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_CACHE_RES ) ;
80
  if ( $cache_res ) {
81
  $uri = esc_url( $_SERVER["REQUEST_URI"] ) ;
82
+ $pattern = '!' . LSCWP_CONTENT_FOLDER . LiteSpeed_Cache_Admin_Rules::RW_PATTERN_RES . '!' ;
83
  if ( preg_match( $pattern, $uri ) ) {
84
  add_action( 'wp_loaded', 'LiteSpeed_Cache_Control::set_cacheable', 5 ) ;
85
  }
includes/litespeed-cache-crawler.class.php CHANGED
@@ -26,7 +26,7 @@ class LiteSpeed_Cache_Crawler
26
  */
27
  private function __construct()
28
  {
29
- $sitemapPath = LSWCP_DIR . 'var' ;
30
  if ( is_multisite() ) {
31
  $blogID = get_current_blog_id() ;
32
  $this->_sitemap_file = $sitemapPath . '/crawlermap-' . $blogID . '.data' ;
@@ -139,9 +139,8 @@ class LiteSpeed_Cache_Crawler
139
  */
140
  public function append_blacklist( $list )
141
  {
142
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
143
- LiteSpeed_Cache_Log::push( 'Crawler log: append blacklist ' . count( $list ) ) ;
144
- }
145
  $ori_list = Litespeed_File::read( $this->_blacklist_file ) ;
146
  $ori_list = explode( "\n", $ori_list ) ;
147
  $ori_list = array_merge( $ori_list, $list ) ;
@@ -384,9 +383,26 @@ class LiteSpeed_Cache_Crawler
384
  }
385
  $crawler->set_base_url($this->_home_url) ;
386
  $crawler->set_run_duration($options[LiteSpeed_Cache_Config::CRWL_RUN_DURATION]) ;
387
- $crawler->set_run_delay($options[LiteSpeed_Cache_Config::CRWL_USLEEP]) ;
388
- $crawler->set_threads_limit($options[LiteSpeed_Cache_Config::CRWL_THREADS]) ;
389
- $crawler->set_load_limit($options[LiteSpeed_Cache_Config::CRWL_LOAD_LIMIT]) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
390
  if ( $options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP] ) {
391
  $crawler->set_domain_ip($options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP]) ;
392
  }
@@ -397,8 +413,8 @@ class LiteSpeed_Cache_Crawler
397
  $this->append_blacklist($ret['blacklist']) ;
398
  }
399
 
400
- if ( ! empty($ret['crawled']) && LiteSpeed_Cache_Log::get_enabled() ) {
401
- LiteSpeed_Cache_Log::push('Crawler log: Last crawled ' . $ret['crawled'] . ' item(s)') ;
402
  }
403
 
404
  // return error
@@ -442,7 +458,7 @@ class LiteSpeed_Cache_Crawler
442
  */
443
  public static function get_instance()
444
  {
445
- if ( ! isset(self::$_instance) ) {
446
  self::$_instance = new self() ;
447
  }
448
 
26
  */
27
  private function __construct()
28
  {
29
+ $sitemapPath = LSCWP_DIR . 'var' ;
30
  if ( is_multisite() ) {
31
  $blogID = get_current_blog_id() ;
32
  $this->_sitemap_file = $sitemapPath . '/crawlermap-' . $blogID . '.data' ;
139
  */
140
  public function append_blacklist( $list )
141
  {
142
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Crawler log: append blacklist ' . count( $list ) ) ;
143
+
 
144
  $ori_list = Litespeed_File::read( $this->_blacklist_file ) ;
145
  $ori_list = explode( "\n", $ori_list ) ;
146
  $ori_list = array_merge( $ori_list, $list ) ;
383
  }
384
  $crawler->set_base_url($this->_home_url) ;
385
  $crawler->set_run_duration($options[LiteSpeed_Cache_Config::CRWL_RUN_DURATION]) ;
386
+
387
+ /**
388
+ * Limit delay to use server setting
389
+ * @since 1.8.3
390
+ */
391
+ $usleep = $options[ LiteSpeed_Cache_Config::CRWL_USLEEP ] ;
392
+ if ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] ) && $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] > $usleep ) {
393
+ $usleep = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_USLEEP ] ;
394
+ }
395
+ $crawler->set_run_delay( $usleep ) ;
396
+ $crawler->set_threads_limit( $options[ LiteSpeed_Cache_Config::CRWL_THREADS ] ) ;
397
+
398
+ $server_load_limit = $options[ LiteSpeed_Cache_Config::CRWL_LOAD_LIMIT ] ;
399
+ if ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ) ) {
400
+ $server_load_limit = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT_ENFORCE ] ;
401
+ }
402
+ elseif ( ! empty( $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT ] ) && $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT ] < $server_load_limit ) {
403
+ $server_load_limit = $_SERVER[ LiteSpeed_Cache_Config::ENV_CRAWLER_LOAD_LIMIT ] ;
404
+ }
405
+ $crawler->set_load_limit( $server_load_limit ) ;
406
  if ( $options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP] ) {
407
  $crawler->set_domain_ip($options[LiteSpeed_Cache_Config::CRWL_DOMAIN_IP]) ;
408
  }
413
  $this->append_blacklist($ret['blacklist']) ;
414
  }
415
 
416
+ if ( ! empty($ret['crawled']) ) {
417
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'Crawler log: Last crawled ' . $ret[ 'crawled' ] . ' item(s)' ) ;
418
  }
419
 
420
  // return error
458
  */
459
  public static function get_instance()
460
  {
461
+ if ( ! isset( self::$_instance ) ) {
462
  self::$_instance = new self() ;
463
  }
464
 
includes/litespeed-cache-esi.class.php CHANGED
@@ -42,6 +42,19 @@ class LiteSpeed_Cache_ESI
42
  add_action( 'template_include', 'LiteSpeed_Cache_ESI::esi_template', 100 ) ;
43
  add_action( 'load-widgets.php', 'LiteSpeed_Cache_Purge::purge_widget' ) ;
44
  add_action( 'wp_update_comment_count', 'LiteSpeed_Cache_Purge::purge_comment_widget' ) ;
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  }
46
 
47
  /**
@@ -80,12 +93,10 @@ class LiteSpeed_Cache_ESI
80
  public static function esi_template($template)
81
  {
82
  // Check if is an ESI request
83
- if ( ! empty( $_GET[ LiteSpeed_Cache_ESI::QS_ACTION ] ) && $_GET[ LiteSpeed_Cache_ESI::QS_ACTION ] == LiteSpeed_Cache_ESI::POSTTYPE ) {
84
- define('LSCACHE_IS_ESI', true) ;
85
-
86
  self::get_instance()->register_esi_actions() ;
87
 
88
- return LSWCP_DIR . 'tpl/esi.tpl.php' ;
89
  }
90
  self::get_instance()->register_not_esi_actions() ;
91
  return $template ;
@@ -164,11 +175,8 @@ class LiteSpeed_Cache_ESI
164
  $params = apply_filters('litespeed_cache_sub_esi_params-' . $block_id, $params) ;
165
  $control = apply_filters('litespeed_cache_sub_esi_control-' . $block_id, $control) ;
166
  if ( !is_array($params) || !is_string($control) ) {
167
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
168
- LiteSpeed_Cache_Log::push("Sub esi hooks returned Params: \n"
169
- . var_export($params, true) . "\ncache control: \n"
170
- . var_export($control, true)) ;
171
- }
172
  return false ;
173
  }
174
 
@@ -183,7 +191,7 @@ class LiteSpeed_Cache_ESI
183
  $output = "<!-- lscwp $wrapper -->$output<!-- lscwp $wrapper esi end -->" ;
184
  }
185
 
186
- LiteSpeed_Cache_Log::debug( "ESI block ID:$block_id; $wrapper; $control" ) ;
187
 
188
  self::set_has_esi() ;
189
  return $output ;
@@ -227,30 +235,25 @@ class LiteSpeed_Cache_ESI
227
  return ;
228
  }
229
  $esi_id = $params[ self::PARAM_BLOCK_ID ] ;
230
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
231
  $logInfo = '------- ESI ------- ' ;
232
  if( ! empty( $params[ self::PARAM_NAME ] ) ) {
233
  $logInfo .= ' Name: ' . $params[ self::PARAM_NAME ] . ' ----- ' ;
234
  }
235
  $logInfo .= $esi_id . ' -------' ;
236
- LiteSpeed_Cache_Log::push( $logInfo ) ;
237
  }
238
 
239
  if ( ! empty( $params[ '_ls_silence' ] ) ) {
240
  define( 'LSCACHE_ESI_SILENCE', true ) ;
241
  }
242
 
243
- $orig = $_SERVER[ 'REQUEST_URI' ] ;
244
- $_SERVER[ 'REQUEST_URI' ] = !empty( $_SERVER[ 'ESI_REFERER' ] ) ? $_SERVER[ 'ESI_REFERER' ] : false ;
245
-
246
  LiteSpeed_Cache_Tag::add( rtrim( LiteSpeed_Cache_Tag::TYPE_ESI, '.' ) ) ;
247
  LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_ESI . $esi_id ) ;
248
 
249
  // LiteSpeed_Cache_Log::debug(var_export($params, true ));
250
 
251
  do_action('litespeed_cache_load_esi_block-' . $esi_id, $params) ;
252
-
253
- $_SERVER[ 'REQUEST_URI' ] = $orig ;
254
  }
255
 
256
  // BEGIN helper functions
@@ -343,9 +346,8 @@ class LiteSpeed_Cache_ESI
343
  }
344
  $options = $instance[ LiteSpeed_Cache_Config::OPTION_NAME ] ;
345
  if ( ! isset( $options ) || ! $options[ self::WIDGET_OPID_ESIENABLE ] ) {
346
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
347
- LiteSpeed_Cache_Log::push( 'ESI 0 ' . $name . ': '. ( ! isset( $options ) ? 'not set' : 'set off' ) ) ;
348
- }
349
  return $instance ;
350
  }
351
 
@@ -378,7 +380,12 @@ class LiteSpeed_Cache_ESI
378
  return ;
379
  }
380
 
381
- echo self::sub_esi_block('admin-bar', 'adminbar') ;
 
 
 
 
 
382
  }
383
 
384
  /**
@@ -396,9 +403,7 @@ class LiteSpeed_Cache_ESI
396
  $option = self::widget_load_get_options( $widget ) ;
397
  // Since we only reach here via esi, safe to assume setting exists.
398
  $ttl = $option[ self::WIDGET_OPID_TTL ] ;
399
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
400
- LiteSpeed_Cache_Log::push( 'ESI widget render: name ' . $params[ self::PARAM_NAME ] . ', id ' . $params[ self::PARAM_ID ] . ', ttl ' . $ttl ) ;
401
- }
402
  if ( $ttl == 0 ) {
403
  LiteSpeed_Cache_Control::set_nocache( 'ESI Widget time to live set to 0' ) ;
404
  }
@@ -430,6 +435,8 @@ class LiteSpeed_Cache_ESI
430
  LiteSpeed_Cache_Control::set_private() ;
431
  LiteSpeed_Cache_Control::set_no_vary() ;
432
  }
 
 
433
  }
434
 
435
 
42
  add_action( 'template_include', 'LiteSpeed_Cache_ESI::esi_template', 100 ) ;
43
  add_action( 'load-widgets.php', 'LiteSpeed_Cache_Purge::purge_widget' ) ;
44
  add_action( 'wp_update_comment_count', 'LiteSpeed_Cache_Purge::purge_comment_widget' ) ;
45
+
46
+ /**
47
+ * Recover REQUEST_URI
48
+ * @since 1.8.1
49
+ */
50
+ if ( ! empty( $_GET[ self::QS_ACTION ] ) && $_GET[ self::QS_ACTION ] == self::POSTTYPE ) {
51
+ define( 'LSCACHE_IS_ESI', true ) ;
52
+
53
+ if ( ! empty( $_SERVER[ 'ESI_REFERER' ] ) ) {
54
+ $_SERVER[ 'REQUEST_URI' ] = $_SERVER[ 'ESI_REFERER' ] ;
55
+ }
56
+ }
57
+
58
  }
59
 
60
  /**
93
  public static function esi_template($template)
94
  {
95
  // Check if is an ESI request
96
+ if ( defined( 'LSCACHE_IS_ESI' ) ) {
 
 
97
  self::get_instance()->register_esi_actions() ;
98
 
99
+ return LSCWP_DIR . 'tpl/esi.tpl.php' ;
100
  }
101
  self::get_instance()->register_not_esi_actions() ;
102
  return $template ;
175
  $params = apply_filters('litespeed_cache_sub_esi_params-' . $block_id, $params) ;
176
  $control = apply_filters('litespeed_cache_sub_esi_control-' . $block_id, $control) ;
177
  if ( !is_array($params) || !is_string($control) ) {
178
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( "Sub esi hooks returned Params: \n" . var_export($params, true) . "\ncache control: \n" . var_export($control, true) ) ;
179
+
 
 
 
180
  return false ;
181
  }
182
 
191
  $output = "<!-- lscwp $wrapper -->$output<!-- lscwp $wrapper esi end -->" ;
192
  }
193
 
194
+ LiteSpeed_Cache_Log::debug( "ESI: \t\t[block ID] $block_id \t\t\t[wrapper] $wrapper \t\t\t[Control] $control" ) ;
195
 
196
  self::set_has_esi() ;
197
  return $output ;
235
  return ;
236
  }
237
  $esi_id = $params[ self::PARAM_BLOCK_ID ] ;
238
+ if ( defined( 'LSCWP_LOG' ) ) {
239
  $logInfo = '------- ESI ------- ' ;
240
  if( ! empty( $params[ self::PARAM_NAME ] ) ) {
241
  $logInfo .= ' Name: ' . $params[ self::PARAM_NAME ] . ' ----- ' ;
242
  }
243
  $logInfo .= $esi_id . ' -------' ;
244
+ LiteSpeed_Cache_Log::debug( $logInfo ) ;
245
  }
246
 
247
  if ( ! empty( $params[ '_ls_silence' ] ) ) {
248
  define( 'LSCACHE_ESI_SILENCE', true ) ;
249
  }
250
 
 
 
 
251
  LiteSpeed_Cache_Tag::add( rtrim( LiteSpeed_Cache_Tag::TYPE_ESI, '.' ) ) ;
252
  LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_ESI . $esi_id ) ;
253
 
254
  // LiteSpeed_Cache_Log::debug(var_export($params, true ));
255
 
256
  do_action('litespeed_cache_load_esi_block-' . $esi_id, $params) ;
 
 
257
  }
258
 
259
  // BEGIN helper functions
346
  }
347
  $options = $instance[ LiteSpeed_Cache_Config::OPTION_NAME ] ;
348
  if ( ! isset( $options ) || ! $options[ self::WIDGET_OPID_ESIENABLE ] ) {
349
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'ESI 0 ' . $name . ': '. ( ! isset( $options ) ? 'not set' : 'set off' ) ) ;
350
+
 
351
  return $instance ;
352
  }
353
 
380
  return ;
381
  }
382
 
383
+ // To make each admin bar ESI request different for `Edit` button different link
384
+ $params = array(
385
+ 'ref' => $_SERVER[ 'REQUEST_URI' ],
386
+ ) ;
387
+
388
+ echo self::sub_esi_block( 'admin-bar', 'adminbar', $params ) ;
389
  }
390
 
391
  /**
403
  $option = self::widget_load_get_options( $widget ) ;
404
  // Since we only reach here via esi, safe to assume setting exists.
405
  $ttl = $option[ self::WIDGET_OPID_TTL ] ;
406
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'ESI widget render: name ' . $params[ self::PARAM_NAME ] . ', id ' . $params[ self::PARAM_ID ] . ', ttl ' . $ttl ) ;
 
 
407
  if ( $ttl == 0 ) {
408
  LiteSpeed_Cache_Control::set_nocache( 'ESI Widget time to live set to 0' ) ;
409
  }
435
  LiteSpeed_Cache_Control::set_private() ;
436
  LiteSpeed_Cache_Control::set_no_vary() ;
437
  }
438
+
439
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'ESI: adminbar ref: ' . $_SERVER[ 'REQUEST_URI' ] ) ;
440
  }
441
 
442
 
includes/litespeed-cache-gui.class.php CHANGED
@@ -28,10 +28,20 @@ class LiteSpeed_Cache_GUI
28
  */
29
  private function __construct()
30
  {
31
- if ( ! is_admin() && is_admin_bar_showing() && current_user_can( 'manage_options' ) ) {
32
  LiteSpeed_Cache_Log::debug( 'GUI init' ) ;
33
- add_action( 'wp_enqueue_scripts', array( $this, 'frontend_enqueue_style' ) ) ;
34
- add_action( 'admin_bar_menu', array( $this, 'frontend_shortcut' ), 95 ) ;
 
 
 
 
 
 
 
 
 
 
35
  }
36
 
37
  // if ( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_ADV_FAVICON ) ) {
@@ -153,11 +163,22 @@ class LiteSpeed_Cache_GUI
153
  return true ;
154
  }
155
 
 
 
 
 
 
 
 
 
 
 
 
156
  /**
157
  * Load frontend menu shortcut
158
  *
159
  * @since 1.3
160
- * @access private
161
  */
162
  public function frontend_enqueue_style()
163
  {
@@ -168,7 +189,7 @@ class LiteSpeed_Cache_GUI
168
  * Load frontend menu shortcut
169
  *
170
  * @since 1.3
171
- * @access private
172
  */
173
  public function frontend_shortcut()
174
  {
@@ -280,6 +301,26 @@ class LiteSpeed_Cache_GUI
280
  ) );
281
  }
282
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  }
284
 
285
  /**
28
  */
29
  private function __construct()
30
  {
31
+ if ( ! is_admin() ) {
32
  LiteSpeed_Cache_Log::debug( 'GUI init' ) ;
33
+ if ( is_admin_bar_showing() && current_user_can( 'manage_options' ) ) {
34
+ add_action( 'wp_enqueue_scripts', array( $this, 'frontend_enqueue_style' ) ) ;
35
+ add_action( 'admin_bar_menu', array( $this, 'frontend_shortcut' ), 95 ) ;
36
+ }
37
+
38
+ /**
39
+ * Turn on instant click
40
+ * @since 1.8.2
41
+ */
42
+ if ( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_ADV_INSTANT_CLICK ) ) {
43
+ add_action( 'wp_enqueue_scripts', array( $this, 'frontend_enqueue_style_public' ) ) ;
44
+ }
45
  }
46
 
47
  // if ( LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_ADV_FAVICON ) ) {
163
  return true ;
164
  }
165
 
166
+ /**
167
+ * Load frontend public script
168
+ *
169
+ * @since 1.8.2
170
+ * @access public
171
+ */
172
+ public function frontend_enqueue_style_public()
173
+ {
174
+ wp_enqueue_script( LiteSpeed_Cache::PLUGIN_NAME, LSWCP_PLUGIN_URL . 'js/instant_click.min.js', array(), LiteSpeed_Cache::PLUGIN_VERSION, true ) ;
175
+ }
176
+
177
  /**
178
  * Load frontend menu shortcut
179
  *
180
  * @since 1.3
181
+ * @access public
182
  */
183
  public function frontend_enqueue_style()
184
  {
189
  * Load frontend menu shortcut
190
  *
191
  * @since 1.3
192
+ * @access public
193
  */
194
  public function frontend_shortcut()
195
  {
301
  ) );
302
  }
303
 
304
+ if ( defined( 'LSCWP_OBJECT_CACHE' ) ) {
305
+ $wp_admin_bar->add_menu( array(
306
+ 'parent' => 'litespeed-menu',
307
+ 'id' => 'litespeed-purge-object',
308
+ 'title' => __( 'Object Cache Purge All', 'litespeed-cache' ),
309
+ 'href' => LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_PURGE, LiteSpeed_Cache_Purge::TYPE_OBJECT_PURGE_ALL ),
310
+ 'meta' => array( 'tabindex' => '0' ),
311
+ ) );
312
+ }
313
+
314
+ if ( LiteSpeed_Cache_Router::opcache_enabled() ) {
315
+ $wp_admin_bar->add_menu( array(
316
+ 'parent' => 'litespeed-menu',
317
+ 'id' => 'litespeed-purge-opcache',
318
+ 'title' => __( 'Opcode Cache Purge All', 'litespeed-cache' ),
319
+ 'href' => LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_PURGE, LiteSpeed_Cache_Purge::TYPE_OPCACHE_PURGE_ALL ),
320
+ 'meta' => array( 'tabindex' => '0' ),
321
+ ) );
322
+ }
323
+
324
  }
325
 
326
  /**
includes/litespeed-cache-log.class.php CHANGED
@@ -13,26 +13,24 @@
13
  class LiteSpeed_Cache_Log
14
  {
15
  private static $_instance ;
16
- private static $_debug ;
17
  private static $log_path ;
18
  private static $_prefix ;
19
- private static $_enabled = false ;
20
 
21
  const TYPE_CLEAR_LOG = 'clear_log' ;
22
 
23
  /**
24
  * Log class Constructor
25
  *
26
- * NOTE: in this process, until last step ( self::$_debug = true ), any usage to WP filter should not be used to prevent infinite loop with log_filters()
27
  *
28
  * @since 1.1.2
29
  * @access public
30
  */
31
  private function __construct()
32
  {
33
- self::$log_path = LSWCP_CONTENT_DIR . '/debug.log' ;
34
  if ( ! empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) && $_SERVER[ 'HTTP_USER_AGENT' ] === Litespeed_Crawler::FAST_USER_AGENT ) {
35
- self::$log_path = LSWCP_CONTENT_DIR . '/crawler.log' ;
36
  }
37
  if ( ! defined( 'LSCWP_LOG_TAG' ) ) {
38
  define( 'LSCWP_LOG_TAG', get_current_blog_id() ) ;
@@ -43,7 +41,7 @@ class LiteSpeed_Cache_Log
43
  }
44
 
45
  $this->_init_request() ;
46
- self::$_debug = true ;
47
  }
48
 
49
  /**
@@ -92,28 +90,15 @@ class LiteSpeed_Cache_Log
92
  wp_deregister_script( 'heartbeat' ) ;
93
  }
94
 
95
- /**
96
- * Check if log class finished initialized
97
- *
98
- * @since 1.1.3
99
- * @access public
100
- */
101
- public static function initialized()
102
- {
103
- return isset( self::$_debug ) ;
104
- }
105
-
106
  /**
107
  * Enable debug log
108
  *
109
  * @since 1.1.0
110
  * @access public
111
  */
112
- public static function set_enabled()
113
  {
114
- self::$_enabled = true ;
115
-
116
- if ( ! isset( self::$_debug ) ) {// If not initialized, do it now
117
  self::get_instance() ;
118
  }
119
 
@@ -132,14 +117,14 @@ class LiteSpeed_Cache_Log
132
  public static function log_filters()
133
  {
134
  $action = current_filter() ;
135
- if ( $ignore_filters = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_LOG_IGNORE_FILTERS ) ) {
136
  $ignore_filters = explode( "\n", $ignore_filters ) ;
137
  if ( in_array( $action, $ignore_filters ) ) {
138
  return ;
139
  }
140
  }
141
 
142
- if ( $ignore_part_filters = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_LOG_IGNORE_PART_FILTERS ) ) {
143
  $ignore_part_filters = explode( "\n", $ignore_part_filters ) ;
144
  foreach ( $ignore_part_filters as $val ) {
145
  if ( stripos( $action, $val ) !== false ) {
@@ -151,17 +136,6 @@ class LiteSpeed_Cache_Log
151
  self::debug( "===log filter: $action" ) ;
152
  }
153
 
154
- /**
155
- * Get debug log status
156
- *
157
- * @since 1.1.0
158
- * @access public
159
- */
160
- public static function get_enabled()
161
- {
162
- return self::$_enabled ;
163
- }
164
-
165
  /**
166
  * Formats the log message with a consistent prefix.
167
  *
@@ -210,7 +184,7 @@ class LiteSpeed_Cache_Log
210
  */
211
  public static function debug( $msg, $backtrace_limit = false )
212
  {
213
- if ( ! self::get_enabled() ) {
214
  return ;
215
  }
216
 
@@ -248,11 +222,11 @@ class LiteSpeed_Cache_Log
248
  * Logs a debug message.
249
  *
250
  * @since 1.1.0
251
- * @access public
252
  * @param string $msg The debug message.
253
  * @param int $backtrace_limit Backtrace depth.
254
  */
255
- public static function push( $msg, $backtrace_limit = false )
256
  {
257
  // backtrace handler
258
  if ( defined( 'LSCWP_LOG_MORE' ) && $backtrace_limit !== false ) {
13
  class LiteSpeed_Cache_Log
14
  {
15
  private static $_instance ;
 
16
  private static $log_path ;
17
  private static $_prefix ;
 
18
 
19
  const TYPE_CLEAR_LOG = 'clear_log' ;
20
 
21
  /**
22
  * Log class Constructor
23
  *
24
+ * NOTE: in this process, until last step ( define const LSCWP_LOG = true ), any usage to WP filter will not be logged to prevent infinite loop with log_filters()
25
  *
26
  * @since 1.1.2
27
  * @access public
28
  */
29
  private function __construct()
30
  {
31
+ self::$log_path = LSCWP_CONTENT_DIR . '/debug.log' ;
32
  if ( ! empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) && $_SERVER[ 'HTTP_USER_AGENT' ] === Litespeed_Crawler::FAST_USER_AGENT ) {
33
+ self::$log_path = LSCWP_CONTENT_DIR . '/crawler.log' ;
34
  }
35
  if ( ! defined( 'LSCWP_LOG_TAG' ) ) {
36
  define( 'LSCWP_LOG_TAG', get_current_blog_id() ) ;
41
  }
42
 
43
  $this->_init_request() ;
44
+ define( 'LSCWP_LOG', true ) ;
45
  }
46
 
47
  /**
90
  wp_deregister_script( 'heartbeat' ) ;
91
  }
92
 
 
 
 
 
 
 
 
 
 
 
 
93
  /**
94
  * Enable debug log
95
  *
96
  * @since 1.1.0
97
  * @access public
98
  */
99
+ public static function init()
100
  {
101
+ if ( ! defined( 'LSCWP_LOG' ) ) {// If not initialized, do it now
 
 
102
  self::get_instance() ;
103
  }
104
 
117
  public static function log_filters()
118
  {
119
  $action = current_filter() ;
120
+ if ( $ignore_filters = get_option( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_FILTERS ) ) {
121
  $ignore_filters = explode( "\n", $ignore_filters ) ;
122
  if ( in_array( $action, $ignore_filters ) ) {
123
  return ;
124
  }
125
  }
126
 
127
+ if ( $ignore_part_filters = get_option( LiteSpeed_Cache_Config::ITEM_LOG_IGNORE_PART_FILTERS ) ) {
128
  $ignore_part_filters = explode( "\n", $ignore_part_filters ) ;
129
  foreach ( $ignore_part_filters as $val ) {
130
  if ( stripos( $action, $val ) !== false ) {
136
  self::debug( "===log filter: $action" ) ;
137
  }
138
 
 
 
 
 
 
 
 
 
 
 
 
139
  /**
140
  * Formats the log message with a consistent prefix.
141
  *
184
  */
185
  public static function debug( $msg, $backtrace_limit = false )
186
  {
187
+ if ( ! defined( 'LSCWP_LOG' ) ) {
188
  return ;
189
  }
190
 
222
  * Logs a debug message.
223
  *
224
  * @since 1.1.0
225
+ * @access private
226
  * @param string $msg The debug message.
227
  * @param int $backtrace_limit Backtrace depth.
228
  */
229
+ private static function push( $msg, $backtrace_limit = false )
230
  {
231
  // backtrace handler
232
  if ( defined( 'LSCWP_LOG_MORE' ) && $backtrace_limit !== false ) {
includes/litespeed-cache-optimize.class.php CHANGED
@@ -189,7 +189,7 @@ class LiteSpeed_Cache_Optimize
189
  LiteSpeed_Cache_Control::set_custom_ttl( 8640000 ) ;
190
  LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_MIN . '_CSS_ASYNC' ) ;
191
 
192
- $file = LSWCP_DIR . 'js/css_async.min.js' ;
193
 
194
  header( 'Content-Length: ' . filesize( $file ) ) ;
195
  header( 'Content-Type: application/x-javascript; charset=utf-8' ) ;
189
  LiteSpeed_Cache_Control::set_custom_ttl( 8640000 ) ;
190
  LiteSpeed_Cache_Tag::add( LiteSpeed_Cache_Tag::TYPE_MIN . '_CSS_ASYNC' ) ;
191
 
192
+ $file = LSCWP_DIR . 'js/css_async.min.js' ;
193
 
194
  header( 'Content-Length: ' . filesize( $file ) ) ;
195
  header( 'Content-Type: application/x-javascript; charset=utf-8' ) ;
includes/litespeed-cache-purge.class.php CHANGED
@@ -19,6 +19,89 @@ class LiteSpeed_Cache_Purge
19
  const X_HEADER = 'X-LiteSpeed-Purge' ;
20
  const PURGE_QUEUE = 'litespeed-cache-purge-queue' ;
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  /**
23
  * Adds new public purge tags to the array of purge tags for the request.
24
  *
@@ -664,7 +747,7 @@ class LiteSpeed_Cache_Purge
664
 
665
  if ( $config->purge_by_post(LiteSpeed_Cache_Config::PURGE_TERM) ) {
666
  $taxonomies = get_object_taxonomies($post_type) ;
667
- //LiteSpeed_Cache_Log::push('purge by post, check tax = ' . var_export($taxonomies, true)) ;
668
  foreach ( $taxonomies as $tax ) {
669
  $terms = get_the_terms($post_id, $tax) ;
670
  if ( ! empty($terms) ) {
19
  const X_HEADER = 'X-LiteSpeed-Purge' ;
20
  const PURGE_QUEUE = 'litespeed-cache-purge-queue' ;
21
 
22
+ const TYPE_OBJECT_PURGE_ALL = 'object_purge_all' ;
23
+ const TYPE_OPCACHE_PURGE_ALL = 'opcache_purge_all' ;
24
+
25
+ /**
26
+ * Handle all request actions from main cls
27
+ *
28
+ * @since 1.8
29
+ * @access public
30
+ */
31
+ public static function handler()
32
+ {
33
+ $instance = self::get_instance() ;
34
+
35
+ $type = LiteSpeed_Cache_Router::verify_type() ;
36
+
37
+ switch ( $type ) {
38
+ case self::TYPE_OBJECT_PURGE_ALL :
39
+ $instance->_object_purge_all() ;
40
+ break ;
41
+
42
+ case self::TYPE_OPCACHE_PURGE_ALL :
43
+ $instance->_opcache_purge_all() ;
44
+ break ;
45
+
46
+ default:
47
+ break ;
48
+ }
49
+
50
+ LiteSpeed_Cache_Admin::redirect() ;
51
+ }
52
+
53
+ /**
54
+ * Purge opcode cache
55
+ *
56
+ * @since 1.8.2
57
+ * @access private
58
+ */
59
+ private function _opcache_purge_all()
60
+ {
61
+ if ( ! LiteSpeed_Cache_Router::opcache_enabled() ) {
62
+ LiteSpeed_Cache_Log::debug( 'Purge: Failed to reset opcode cache due to opcache not enabled' ) ;
63
+
64
+ $msg = __( 'Opcode cache is not enabled.', 'litespeed-cache' ) ;
65
+ LiteSpeed_Cache_Admin_Display::error( $msg ) ;
66
+
67
+ return false ;
68
+ }
69
+
70
+ // Purge opcode cache
71
+ opcache_reset() ;
72
+ LiteSpeed_Cache_Log::debug( 'Purge: Reset opcode cache' ) ;
73
+
74
+ $msg = __( 'Reset the entire opcode cache successfully.', 'litespeed-cache' ) ;
75
+ LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
76
+
77
+ return true ;
78
+ }
79
+
80
+ /**
81
+ * Purge object cache
82
+ *
83
+ * @since 1.8
84
+ * @access private
85
+ */
86
+ private function _object_purge_all()
87
+ {
88
+ if ( ! defined( 'LSCWP_OBJECT_CACHE' ) ) {
89
+ LiteSpeed_Cache_Log::debug( 'Purge: Failed to flush object cache due to object cache not enabled' ) ;
90
+
91
+ $msg = __( 'Object cache is not enabled.', 'litespeed-cache' ) ;
92
+ LiteSpeed_Cache_Admin_Display::error( $msg ) ;
93
+
94
+ return false ;
95
+ }
96
+ LiteSpeed_Cache_Object::get_instance()->flush() ;
97
+ LiteSpeed_Cache_Log::debug( 'Purge: Flushed object cache' ) ;
98
+
99
+ $msg = __( 'Purge all object caches successfully.', 'litespeed-cache' ) ;
100
+ LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
101
+
102
+ return true ;
103
+ }
104
+
105
  /**
106
  * Adds new public purge tags to the array of purge tags for the request.
107
  *
747
 
748
  if ( $config->purge_by_post(LiteSpeed_Cache_Config::PURGE_TERM) ) {
749
  $taxonomies = get_object_taxonomies($post_type) ;
750
+ //LiteSpeed_Cache_Log::debug('purge by post, check tax = ' . var_export($taxonomies, true)) ;
751
  foreach ( $taxonomies as $tax ) {
752
  $terms = get_the_terms($post_id, $tax) ;
753
  if ( ! empty($terms) ) {
includes/litespeed-cache-router.class.php CHANGED
@@ -152,8 +152,8 @@ class LiteSpeed_Cache_Router
152
  if ( ! isset( self::$_action ) ) {
153
  self::$_action = false;
154
  self::get_instance()->verify_action() ;
155
- if ( self::$_action && LiteSpeed_Cache_Log::get_enabled() ) {
156
- LiteSpeed_Cache_Log::push( 'LSCWP_CTRL verified: ' . var_export( self::$_action, true ) ) ;
157
  }
158
 
159
  }
@@ -342,9 +342,11 @@ class LiteSpeed_Cache_Router
342
  case LiteSpeed_Cache::ACTION_CRAWLER_CRON_ENABLE:
343
  case LiteSpeed_Cache::ACTION_DO_CRAWL:
344
  case LiteSpeed_Cache::ACTION_BLACKLIST_SAVE:
 
345
  case LiteSpeed_Cache::ACTION_MEDIA:
346
  case LiteSpeed_Cache::ACTION_IAPI:
347
  case LiteSpeed_Cache::ACTION_CDN:
 
348
  if ( defined( 'LITESPEED_ON' ) && $_can_option && ! $_is_network_admin ) {
349
  self::$_action = $action ;
350
  }
@@ -494,6 +496,17 @@ class LiteSpeed_Cache_Router
494
  return $_ip ;
495
  }
496
 
 
 
 
 
 
 
 
 
 
 
 
497
  /**
498
  * Get the current instance object.
499
  *
152
  if ( ! isset( self::$_action ) ) {
153
  self::$_action = false;
154
  self::get_instance()->verify_action() ;
155
+ if ( self::$_action ) {
156
+ defined( 'LSCWP_LOG' ) && LiteSpeed_Cache_Log::debug( 'LSCWP_CTRL verified: ' . var_export( self::$_action, true ) ) ;
157
  }
158
 
159
  }
342
  case LiteSpeed_Cache::ACTION_CRAWLER_CRON_ENABLE:
343
  case LiteSpeed_Cache::ACTION_DO_CRAWL:
344
  case LiteSpeed_Cache::ACTION_BLACKLIST_SAVE:
345
+ case LiteSpeed_Cache::ACTION_PURGE:
346
  case LiteSpeed_Cache::ACTION_MEDIA:
347
  case LiteSpeed_Cache::ACTION_IAPI:
348
  case LiteSpeed_Cache::ACTION_CDN:
349
+ case LiteSpeed_Cache::ACTION_IMPORT:
350
  if ( defined( 'LITESPEED_ON' ) && $_can_option && ! $_is_network_admin ) {
351
  self::$_action = $action ;
352
  }
496
  return $_ip ;
497
  }
498
 
499
+ /**
500
+ * Check if opcode cache is enabled
501
+ *
502
+ * @since 1.8.2
503
+ * @access public
504
+ */
505
+ public static function opcache_enabled()
506
+ {
507
+ return function_exists( 'opcache_reset' ) && ini_get( 'opcache.enable' ) ;
508
+ }
509
+
510
  /**
511
  * Get the current instance object.
512
  *
includes/litespeed-cache-task.class.php CHANGED
@@ -170,9 +170,7 @@ class LiteSpeed_Cache_Task
170
  $interval = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::CRWL_RUN_INTERVAL ) ;
171
  // $wp_schedules = wp_get_schedules() ;
172
  if ( ! array_key_exists( self::CRON_FITLER_CRAWLER, $schedules ) ) {
173
- // if ( LiteSpeed_Cache_Log::get_enabled() ) {
174
- // LiteSpeed_Cache_Log::push('Crawler cron log: ......cron filter '.$interval.' added......') ;
175
- // }
176
  $schedules[ self::CRON_FITLER_CRAWLER ] = array(
177
  'interval' => $interval,
178
  'display' => __( 'LiteSpeed Cache Custom Cron Crawler', 'litespeed-cache' ),
170
  $interval = LiteSpeed_Cache::config( LiteSpeed_Cache_Config::CRWL_RUN_INTERVAL ) ;
171
  // $wp_schedules = wp_get_schedules() ;
172
  if ( ! array_key_exists( self::CRON_FITLER_CRAWLER, $schedules ) ) {
173
+ // LiteSpeed_Cache_Log::debug('Crawler cron log: ......cron filter '.$interval.' added......') ;
 
 
174
  $schedules[ self::CRON_FITLER_CRAWLER ] = array(
175
  'interval' => $interval,
176
  'display' => __( 'LiteSpeed Cache Custom Cron Crawler', 'litespeed-cache' ),
includes/litespeed-cache-utility.class.php CHANGED
@@ -184,7 +184,7 @@ class LiteSpeed_Cache_Utility
184
  */
185
  public static function compatibility()
186
  {
187
- require_once LSWCP_DIR . 'lib/litespeed-php-compatibility.func.php' ;
188
  }
189
 
190
  /**
184
  */
185
  public static function compatibility()
186
  {
187
+ require_once LSCWP_DIR . 'lib/litespeed-php-compatibility.func.php' ;
188
  }
189
 
190
  /**
includes/litespeed-cache-vary.class.php CHANGED
@@ -152,7 +152,7 @@ class LiteSpeed_Cache_Vary
152
 
153
  // Remove commenter prefilled info if exists, for public cache
154
  foreach( $_COOKIE as $cookie_name => $cookie_value ) {
155
- if ( strlen( $cookie_name ) >= 15 && strncmp( $cookie_name, 'comment_author_', 15 ) == 0 ) {
156
  unset( $_COOKIE[ $cookie_name ] ) ;
157
  }
158
  }
@@ -353,7 +353,7 @@ class LiteSpeed_Cache_Vary
353
  }
354
 
355
  $res = implode( ';', $res ) ;
356
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
357
  return $res ;
358
  }
359
  // Encrypt in production
152
 
153
  // Remove commenter prefilled info if exists, for public cache
154
  foreach( $_COOKIE as $cookie_name => $cookie_value ) {
155
+ if ( strlen( $cookie_name ) >= 15 && strpos( $cookie_name, 'comment_author_' ) === 0 ) {
156
  unset( $_COOKIE[ $cookie_name ] ) ;
157
  }
158
  }
353
  }
354
 
355
  $res = implode( ';', $res ) ;
356
+ if ( defined( 'LSCWP_LOG' ) ) {
357
  return $res ;
358
  }
359
  // Encrypt in production
includes/litespeed-cache.class.php CHANGED
@@ -19,7 +19,7 @@ class LiteSpeed_Cache
19
  private static $_instance ;
20
 
21
  const PLUGIN_NAME = 'litespeed-cache' ;
22
- const PLUGIN_VERSION = '1.7.2' ;
23
 
24
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
 
@@ -54,6 +54,8 @@ class LiteSpeed_Cache
54
  const ACTION_DB_OPTIMIZE = 'db_optimize' ;
55
  const ACTION_LOG = 'log' ;
56
 
 
 
57
  const ACTION_MEDIA = 'media' ;
58
  const ACTION_IAPI = 'iapi' ;
59
  const ACTION_CDN = 'cdn' ;
@@ -86,17 +88,17 @@ class LiteSpeed_Cache
86
  if ( defined( 'LITESPEED_ON' ) ) {
87
  $should_debug = intval(self::config(LiteSpeed_Cache_Config::OPID_DEBUG)) ;
88
  if ( $should_debug == LiteSpeed_Cache_Config::VAL_ON || ($should_debug == LiteSpeed_Cache_Config::VAL_ON2 && LiteSpeed_Cache_Router::is_admin_ip()) ) {
89
- LiteSpeed_Cache_Log::set_enabled() ;
90
  }
91
 
92
  // Load third party detection if lscache enabled.
93
- include_once LSWCP_DIR . 'thirdparty/lscwp-registry-3rd.php' ;
94
  }
95
 
96
  // Register plugin activate/deactivate/uninstall hooks
97
  // NOTE: this can't be moved under after_setup_theme, otherwise activation will be bypassed somehow
98
  if( is_admin() || defined( 'LITESPEED_CLI' ) ) {
99
- $plugin_file = LSWCP_DIR . 'litespeed-cache.php' ;
100
  register_activation_hook($plugin_file, array('LiteSpeed_Cache_Activation', 'register_activation' )) ;
101
  register_deactivation_hook($plugin_file, array('LiteSpeed_Cache_Activation', 'register_deactivation' )) ;
102
  register_uninstall_hook($plugin_file, 'LiteSpeed_Cache_Activation::uninstall_litespeed_cache') ;
@@ -116,6 +118,14 @@ class LiteSpeed_Cache
116
  * @since 1.6.6
117
  */
118
  do_action( 'litespeed_before_init' ) ;
 
 
 
 
 
 
 
 
119
  }
120
 
121
  /**
@@ -136,6 +146,10 @@ class LiteSpeed_Cache
136
  */
137
  do_action( 'litespeed_init' ) ;
138
 
 
 
 
 
139
  if ( ! self::config( LiteSpeed_Cache_Config::OPID_HEARTBEAT ) ) {
140
  add_action( 'init', 'LiteSpeed_Cache_Log::disable_heartbeat', 1 ) ;
141
  }
@@ -309,6 +323,10 @@ class LiteSpeed_Cache
309
  $msg = LiteSpeed_Cache_Media::handler() ;
310
  break ;
311
 
 
 
 
 
312
  case LiteSpeed_Cache::ACTION_IAPI:
313
  $msg = LiteSpeed_Cache_Admin_API::handler() ;
314
  break ;
@@ -325,6 +343,10 @@ class LiteSpeed_Cache
325
  $msg = LiteSpeed_Cache_Admin_Report::handler() ;
326
  break ;
327
 
 
 
 
 
328
  default:
329
  break ;
330
  }
@@ -371,12 +393,6 @@ class LiteSpeed_Cache
371
  add_action( $event, 'LiteSpeed_Cache_Purge::purge_post', 10, 2 ) ;
372
  }
373
 
374
- // The ESI functionality is an enterprise feature.
375
- // Removing the openlitespeed check will simply break the page.
376
- if ( ! LiteSpeed_Cache_Router::is_ajax() && LiteSpeed_Cache_Router::esi_enabled() ) {
377
- LiteSpeed_Cache_ESI::get_instance() ;
378
- }
379
-
380
  add_action( 'wp_update_comment_count', 'LiteSpeed_Cache_Purge::purge_feeds' ) ;
381
 
382
  // register recent posts widget tag before theme renders it to make it work
@@ -568,8 +584,8 @@ class LiteSpeed_Cache
568
  // send Control header
569
  if ( $control_header ) {
570
  @header( $control_header ) ;
571
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
572
- LiteSpeed_Cache_Log::push( $control_header ) ;
573
  if ( $running_info_showing ) {
574
  $this->footer_comment .= "\n<!-- " . $control_header . " -->" ;
575
  }
@@ -578,8 +594,8 @@ class LiteSpeed_Cache
578
  // send PURGE header
579
  if ( $purge_header ) {
580
  @header( $purge_header ) ;
581
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
582
- LiteSpeed_Cache_Log::push( $purge_header ) ;
583
  if ( $running_info_showing ) {
584
  $this->footer_comment .= "\n<!-- " . $purge_header . " -->" ;
585
  }
@@ -588,8 +604,8 @@ class LiteSpeed_Cache
588
  // send Vary header
589
  if ( $vary_header ) {
590
  @header( $vary_header ) ;
591
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
592
- LiteSpeed_Cache_Log::push( $vary_header ) ;
593
  if ( $running_info_showing ) {
594
  $this->footer_comment .= "\n<!-- " . $vary_header . " -->" ;
595
  }
@@ -618,8 +634,8 @@ class LiteSpeed_Cache
618
  // Control header
619
  if ( LiteSpeed_Cache_Control::is_cacheable() && $tag_header ) {
620
  @header( $tag_header ) ;
621
- if ( LiteSpeed_Cache_Log::get_enabled() ) {
622
- LiteSpeed_Cache_Log::push( $tag_header ) ;
623
  if ( $running_info_showing ) {
624
  $this->footer_comment .= "\n<!-- " . $tag_header . " -->" ;
625
  }
@@ -627,6 +643,11 @@ class LiteSpeed_Cache
627
  }
628
  }
629
 
 
 
 
 
 
630
  if ( $is_forced ) {
631
  LiteSpeed_Cache_Log::debug( '--forced--' ) ;
632
  }
19
  private static $_instance ;
20
 
21
  const PLUGIN_NAME = 'litespeed-cache' ;
22
+ const PLUGIN_VERSION = '1.8.3' ;
23
 
24
  const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
25
 
54
  const ACTION_DB_OPTIMIZE = 'db_optimize' ;
55
  const ACTION_LOG = 'log' ;
56
 
57
+ const ACTION_IMPORT = 'import' ;
58
+ const ACTION_PURGE = 'purge' ;
59
  const ACTION_MEDIA = 'media' ;
60
  const ACTION_IAPI = 'iapi' ;
61
  const ACTION_CDN = 'cdn' ;
88
  if ( defined( 'LITESPEED_ON' ) ) {
89
  $should_debug = intval(self::config(LiteSpeed_Cache_Config::OPID_DEBUG)) ;
90
  if ( $should_debug == LiteSpeed_Cache_Config::VAL_ON || ($should_debug == LiteSpeed_Cache_Config::VAL_ON2 && LiteSpeed_Cache_Router::is_admin_ip()) ) {
91
+ LiteSpeed_Cache_Log::init() ;
92
  }
93
 
94
  // Load third party detection if lscache enabled.
95
+ include_once LSCWP_DIR . 'thirdparty/lscwp-registry-3rd.php' ;
96
  }
97
 
98
  // Register plugin activate/deactivate/uninstall hooks
99
  // NOTE: this can't be moved under after_setup_theme, otherwise activation will be bypassed somehow
100
  if( is_admin() || defined( 'LITESPEED_CLI' ) ) {
101
+ $plugin_file = LSCWP_DIR . 'litespeed-cache.php' ;
102
  register_activation_hook($plugin_file, array('LiteSpeed_Cache_Activation', 'register_activation' )) ;
103
  register_deactivation_hook($plugin_file, array('LiteSpeed_Cache_Activation', 'register_deactivation' )) ;
104
  register_uninstall_hook($plugin_file, 'LiteSpeed_Cache_Activation::uninstall_litespeed_cache') ;
118
  * @since 1.6.6
119
  */
120
  do_action( 'litespeed_before_init' ) ;
121
+
122
+ /**
123
+ * Preload ESI functionality for ESI request uri recovery
124
+ * @since 1.8.1
125
+ */
126
+ if ( ! LiteSpeed_Cache_Router::is_ajax() && LiteSpeed_Cache_Router::esi_enabled() ) {
127
+ LiteSpeed_Cache_ESI::get_instance() ;
128
+ }
129
  }
130
 
131
  /**
146
  */
147
  do_action( 'litespeed_init' ) ;
148
 
149
+ define( 'LSCWP_CONTENT_FOLDER', str_replace( home_url( '/' ), '', WP_CONTENT_URL ) ) ; // `wp-content`
150
+ define( 'LSWCP_PLUGIN_URL', plugin_dir_url( dirname( __FILE__ ) ) ) ;// Full URL path '//example.com/wp-content/plugins/litespeed-cache/'
151
+
152
+
153
  if ( ! self::config( LiteSpeed_Cache_Config::OPID_HEARTBEAT ) ) {
154
  add_action( 'init', 'LiteSpeed_Cache_Log::disable_heartbeat', 1 ) ;
155
  }
323
  $msg = LiteSpeed_Cache_Media::handler() ;
324
  break ;
325
 
326
+ case LiteSpeed_Cache::ACTION_PURGE:
327
+ $msg = LiteSpeed_Cache_Purge::handler() ;
328
+ break ;
329
+
330
  case LiteSpeed_Cache::ACTION_IAPI:
331
  $msg = LiteSpeed_Cache_Admin_API::handler() ;
332
  break ;
343
  $msg = LiteSpeed_Cache_Admin_Report::handler() ;
344
  break ;
345
 
346
+ case LiteSpeed_Cache::ACTION_IMPORT:
347
+ $msg = LiteSpeed_Cache_Import::handler() ;
348
+ break ;
349
+
350
  default:
351
  break ;
352
  }
393
  add_action( $event, 'LiteSpeed_Cache_Purge::purge_post', 10, 2 ) ;
394
  }
395
 
 
 
 
 
 
 
396
  add_action( 'wp_update_comment_count', 'LiteSpeed_Cache_Purge::purge_feeds' ) ;
397
 
398
  // register recent posts widget tag before theme renders it to make it work
584
  // send Control header
585
  if ( $control_header ) {
586
  @header( $control_header ) ;
587
+ if ( defined( 'LSCWP_LOG' ) ) {
588
+ LiteSpeed_Cache_Log::debug( $control_header ) ;
589
  if ( $running_info_showing ) {
590
  $this->footer_comment .= "\n<!-- " . $control_header . " -->" ;
591
  }
594
  // send PURGE header
595
  if ( $purge_header ) {
596
  @header( $purge_header ) ;
597
+ if ( defined( 'LSCWP_LOG' ) ) {
598
+ LiteSpeed_Cache_Log::debug( $purge_header ) ;
599
  if ( $running_info_showing ) {
600
  $this->footer_comment .= "\n<!-- " . $purge_header . " -->" ;
601
  }
604
  // send Vary header
605
  if ( $vary_header ) {
606
  @header( $vary_header ) ;
607
+ if ( defined( 'LSCWP_LOG' ) ) {
608
+ LiteSpeed_Cache_Log::debug( $vary_header ) ;
609
  if ( $running_info_showing ) {
610
  $this->footer_comment .= "\n<!-- " . $vary_header . " -->" ;
611
  }
634
  // Control header
635
  if ( LiteSpeed_Cache_Control::is_cacheable() && $tag_header ) {
636
  @header( $tag_header ) ;
637
+ if ( defined( 'LSCWP_LOG' ) ) {
638
+ LiteSpeed_Cache_Log::debug( $tag_header ) ;
639
  if ( $running_info_showing ) {
640
  $this->footer_comment .= "\n<!-- " . $tag_header . " -->" ;
641
  }
643
  }
644
  }
645
 
646
+ // Object cache comment
647
+ if ( $running_info_showing && defined( 'LSCWP_LOG' ) && defined( 'LSCWP_OBJECT_CACHE' ) && method_exists( 'WP_Object_Cache', 'debug' ) ) {
648
+ $this->footer_comment .= "\n<!-- Object Cache " . WP_Object_Cache::get_instance()->debug() . " -->" ;
649
+ }
650
+
651
  if ( $is_forced ) {
652
  LiteSpeed_Cache_Log::debug( '--forced--' ) ;
653
  }
includes/litespeed.autoload.php CHANGED
@@ -33,8 +33,10 @@ if ( !function_exists('_litespeed_autoload') ) {
33
  'LiteSpeed_Cache_Data' => 'inc/data.class.php',
34
  'LiteSpeed_Cache_ESI' => 'inc/esi.class.php',
35
  'LiteSpeed_Cache_GUI' => 'inc/gui.class.php',
 
36
  'LiteSpeed_Cache_Log' => 'inc/log.class.php',
37
  'LiteSpeed_Cache_Media' => 'inc/media.class.php',
 
38
  'LiteSpeed_Cache_Optimize' => 'inc/optimize.class.php',
39
  'LiteSpeed_Cache_Purge' => 'inc/purge.class.php',
40
  'LiteSpeed_Cache_Router' => 'inc/router.class.php',
@@ -57,8 +59,8 @@ if ( !function_exists('_litespeed_autoload') ) {
57
 
58
  'LiteSpeed_Cache_Tags' => 'includes/deprecated-litespeed-cache-tags.class.php',
59
  );
60
- if( array_key_exists($cls, $class2fileArr) && file_exists(LSWCP_DIR . $class2fileArr[$cls]) ) {
61
- require_once LSWCP_DIR . $class2fileArr[$cls];
62
  }
63
  }
64
  }
@@ -73,6 +75,6 @@ spl_autoload_register('_litespeed_autoload');
73
  if ( !function_exists('litespeed_load_vendor') ) {
74
  function litespeed_load_vendor()
75
  {
76
- require_once LSWCP_DIR.'lib/vendor/autoload.php';
77
  }
78
  }
33
  'LiteSpeed_Cache_Data' => 'inc/data.class.php',
34
  'LiteSpeed_Cache_ESI' => 'inc/esi.class.php',
35
  'LiteSpeed_Cache_GUI' => 'inc/gui.class.php',
36
+ 'LiteSpeed_Cache_Import' => 'inc/import.class.php',
37
  'LiteSpeed_Cache_Log' => 'inc/log.class.php',
38
  'LiteSpeed_Cache_Media' => 'inc/media.class.php',
39
+ 'LiteSpeed_Cache_Object' => 'inc/object.class.php',
40
  'LiteSpeed_Cache_Optimize' => 'inc/optimize.class.php',
41
  'LiteSpeed_Cache_Purge' => 'inc/purge.class.php',
42
  'LiteSpeed_Cache_Router' => 'inc/router.class.php',
59
 
60
  'LiteSpeed_Cache_Tags' => 'includes/deprecated-litespeed-cache-tags.class.php',
61
  );
62
+ if( array_key_exists($cls, $class2fileArr) && file_exists(LSCWP_DIR . $class2fileArr[$cls]) ) {
63
+ require_once LSCWP_DIR . $class2fileArr[$cls];
64
  }
65
  }
66
  }
75
  if ( !function_exists('litespeed_load_vendor') ) {
76
  function litespeed_load_vendor()
77
  {
78
+ require_once LSCWP_DIR.'lib/vendor/autoload.php';
79
  }
80
  }
js/instant_click.min.js ADDED
@@ -0,0 +1 @@
 
1
+ var instantclick,InstantClick=instantclick=function(t,e,n){function i(t){var e=t.indexOf("#");return-1==e?t:t.substr(0,e)}function r(t){for(;t&&"A"!=t.nodeName;)t=t.parentNode;return t}function o(t){do{if(!t.hasAttribute)break;if(t.hasAttribute("data-instant"))return!1;if(t.hasAttribute("data-no-instant"))return!0;if("nofollow"==t.getAttribute("rel"))return!0}while(t=t.parentNode);return!1}function a(t){var n=e.protocol+"//"+e.host;return!(t.target||t.hasAttribute("download")||0!=t.href.indexOf(n+"/")||t.href.indexOf("#")>-1&&i(t.href)==I||o(t))}function l(t){for(var e=Array.prototype.slice.call(arguments,1),n=!1,i=0;i<tt[t].length;i++)if("receive"==t){var r=tt[t][i].apply(window,e);r&&("body"in r&&(e[1]=r.body),"title"in r&&(e[2]=r.title),n=r)}else tt[t][i].apply(window,e);return n}function c(r,o,a,c){if(f(),t.documentElement.replaceChild(o,t.body),t.title=r,a){v("remove"),a!=e.href&&(history.pushState(null,null,a),n.indexOf(" CriOS/")>-1&&(t.title==r?t.title=r+String.fromCharCode(160):t.title=r));var d=a.indexOf("#"),h=d>-1&&t.getElementById(a.substr(d+1)),g=0;if(h)for(;h.offsetParent;)g+=h.offsetTop,h=h.offsetParent;"requestAnimationFrame"in window?requestAnimationFrame(function(){scrollTo(0,g)}):scrollTo(0,g),u(),(I=i(a))in it&&(it[I]=[]),et[I]={},m(function(t){return!t.hasAttribute("data-instant-track")}),l("change",!1)}else scrollTo(0,c),R.abort(),s(),m(function(t){return t.hasAttribute("data-instant-restore")}),p(),l("restore")}function s(){Q=!1,V=!1}function d(t){return t.replace(/<noscript[\s\S]+?<\/noscript>/gi,"")}function f(){for(var t=0;t<nt.length;t++)"object"==typeof nt[t]&&"abort"in nt[t]&&(nt[t].instantclickAbort=!0,nt[t].abort());nt=[]}function u(){for(var t in et[I]){var e=et[I][t];window.clearTimeout(e.realId),e.delayLeft=e.delay-+new Date+e.timestamp}}function p(){for(var t in et[I])if("delayLeft"in et[I][t]){for(var e=[et[I][t].callback,et[I][t].delayLeft],n=0;n<et[I][t].params.length;n++)e.push(et[I][t].params[n]);y(e,et[I][t].isRepeating,et[I][t].delay),delete et[I][t]}}function h(){R.abort(),s()}function v(t){if(I in it)for(var e=0;e<it[I].length;e++)window[t+"EventListener"].apply(window,it[I][e])}function m(e){var n,i,r,o,a,l=t.body.getElementsByTagName("script"),c=[];for(a=0;a<l.length;a++)c.push(l[a]);for(a=0;a<c.length;a++)if((n=c[a])&&e(n)){i=t.createElement("script");for(var s=0;s<n.attributes.length;s++)i.setAttribute(n.attributes[s].name,n.attributes[s].value);i.textContent=n.textContent,r=n.parentNode,o=n.nextSibling,r.removeChild(n),r.insertBefore(i,o)}}function g(){for(var e,n,i=t.querySelectorAll("[data-instant-track]"),r=0;r<i.length;r++)n=(e=i[r]).getAttribute("href")||e.getAttribute("src")||e.textContent,$.push(n)}function y(t,e,n){var i,r=t[0],o=t[1],a=[].slice.call(t,2),l=+new Date,c=++K;i=e?function(e){r(e),delete et[I][c],t[0]=r,t[1]=o,y(t,!0)}:function(t){r(t),delete et[I][c]},t[0]=i,void 0!=n&&(l+=o-n,o=n);var s=window.setTimeout.apply(window,t);return et[I][c]={realId:s,timestamp:l,callback:r,delay:o,params:a,isRepeating:e},-c}function b(t){var e=r(t.target);e&&a(e)&&P(e.href)}function w(t){if(!(B>+new Date-500||+new Date-J<100)){var e=r(t.target);e&&e!=r(t.relatedTarget)&&a(e)&&(e.addEventListener("mouseout",A),V||(M=e.href,q=O(P,_)))}}function k(t){B=+new Date;var e=r(t.target);e&&a(e)&&(H&&(D(H),H=!1),e.addEventListener("touchend",L),e.addEventListener("touchcancel",L),P(e.href))}function x(){t.addEventListener("click",E)}function E(e){if(t.removeEventListener("click",E),H&&(D(H),H=!1),!e.defaultPrevented){var n=r(e.target);n&&a(n)&&(0!=e.button||e.metaKey||e.ctrlKey||(e.preventDefault(),S(n.href)))}}function A(t){if(r(t.target)!=r(t.relatedTarget))return q?(D(q),void(q=!1)):void(Q&&!V&&(R.abort(),s()))}function L(t){Q&&!V&&(H=O(h,500))}function C(){if(2==R.readyState){var n=R.getResponseHeader("Content-Type");n&&/^text\/html/i.test(n)||(X=!0)}if(!(R.readyState<4)){if(0==R.status)return Z=!0,void(V&&(l("exit",j,"network error"),e.href=j));if(X)V&&(l("exit",j,"non-html content-type"),e.href=j);else{var r=t.implementation.createHTMLDocument("");r.documentElement.innerHTML=d(R.responseText),G=r.title,U=r.body;var o=l("receive",j,U,G);o&&("body"in o&&(U=o.body),"title"in o&&(G=o.title));var a=i(j);W[a]={body:U,title:G,scrollPosition:a in W?W[a].scrollPosition:0};var c,s,f=r.querySelectorAll("[data-instant-track]");if(f.length!=$.length)Y=!0;else for(var u=0;u<f.length;u++)s=(c=f[u]).getAttribute("href")||c.getAttribute("src")||c.textContent,-1==$.indexOf(s)&&(Y=!0);V&&(V=!1,S(j))}}}function T(){var t=i(e.href);if(t!=I){if(V&&(s(),R.abort()),!(t in W))return l("exit",e.href,"not in history"),void(t==e.href?e.href=e.href:e.reload());W[I].scrollPosition=pageYOffset,u(),v("remove"),I=t,c(W[t].title,W[t].body,!1,W[t].scrollPosition),v("add")}}function P(t){q&&(D(q),q=!1),t||(t=M),Q&&(t==j||V)||(Q=!0,V=!1,j=t,U=!1,X=!1,Z=!1,Y=!1,l("preload"),R.open("GET",t),R.timeout=9e4,R.send())}function S(t){return J=+new Date,q||!Q?q&&j&&j!=t?(l("exit",t,"click occured while preloading planned"),void(e.href=t)):(P(t),l("wait"),void(V=!0)):V?(l("exit",t,"clicked on a link while waiting for another page to display"),void(e.href=t)):X?(l("exit",j,"non-html content-type"),void(e.href=j)):Z?(l("exit",j,"network error"),void(e.href=j)):Y?(l("exit",j,"different assets"),void(e.href=j)):U?(W[I].scrollPosition=pageYOffset,s(),void c(G,U,j)):(l("wait"),void(V=!0))}function O(){return y(arguments,!1)}function D(t){t=-t;for(var e in et)t in et[e]&&(window.clearTimeout(et[e][t].realId),delete et[e][t])}function N(t,e,n){var i=rt[e][t].indexOf(n);i>-1&&rt[e][t].splice(i,1)}var I,M,q,B,F,H,R,X,Y,z,K=0,W={},j=!1,G=!1,U=!1,J=0,Q=!1,V=!1,Z=!1,$=[],_=65,tt={preload:[],receive:[],wait:[],change:[],restore:[],exit:[]},et={},nt=[],it={},rt={};Element.prototype.matches||(Element.prototype.matches=Element.prototype.webkitMatchesSelector||Element.prototype.msMatchesSelector||function(e){for(var n=t.querySelectorAll(e),i=0;i<n.length;i++)if(n[i]==this)return!0;return!1});var ot=!1;if("pushState"in history&&"file:"!=e.protocol){ot=!0;var at=n.indexOf("Android ");if(at>-1){var lt=parseFloat(n.substr(at+"Android ".length));if(lt<4.4&&(ot=!1,lt>=4))for(var ct=[/ Chrome\//,/ UCBrowser\//,/ Firefox\//,/ Windows Phone /],st=0;st<ct.length;st++)if(ct[st].test(n)){ot=!0;break}}}return{supported:ot,init:function(n){ot?F||(F=!0,"mousedown"==n?z=!0:"number"==typeof n&&(_=n),I=i(e.href),et[I]={},W[I]={body:t.body,title:t.title,scrollPosition:pageYOffset},"loading"==t.readyState?t.addEventListener("DOMContentLoaded",g):g(),(R=new XMLHttpRequest).addEventListener("readystatechange",C),t.addEventListener("touchstart",k,!0),z?t.addEventListener("mousedown",b,!0):t.addEventListener("mouseover",w,!0),t.addEventListener("click",x,!0),addEventListener("popstate",T)):l("change",!0)},on:function(t,e){tt[t].push(e),"change"==t&&e(!J)},setTimeout:O,setInterval:function(){return y(arguments,!0)},clearTimeout:D,xhr:function(t){nt.push(t)},addPageEvent:function(){I in it||(it[I]=[]),it[I].push(arguments),addEventListener.apply(window,arguments)},removePageEvent:function(){if(I in it)t:for(var t=0;t<it[I].length;t++)if(arguments.length==it[I][t].length){for(var e=0;e<it[I][t].length;e++)if(arguments[e]!=it[I][t][e])continue t;it[I].splice(t,1)}},addEvent:function(e,i,r){if(!(i in rt)&&(rt[i]={},t.addEventListener(i,function(t){var e=t.target;for(t.originalStopPropagation=t.stopPropagation,t.stopPropagation=function(){this.isPropagationStopped=!0,this.originalStopPropagation()};e&&1==e.nodeType;){for(var n in rt[i])if(e.matches(n)){for(var r=0;r<rt[i][n].length;r++)rt[i][n][r].call(e,t);if(t.isPropagationStopped)return;break}e=e.parentNode}},!1),"click"==i&&/iP(?:hone|ad|od)/.test(n))){var o=t.createElement("style");o.setAttribute("instantclick-mobile-safari-cursor",""),o.textContent="body { cursor: pointer !important; }",t.head.appendChild(o)}e in rt[i]||(rt[i][e]=[]),N(e,i,r),rt[i][e].push(r)},removeEvent:N}}(document,location,navigator.userAgent);!function(){function t(){(i=document.createElement("div")).id="instantclick";var t={Webkit:!0,Moz:!0},e="";if(!("transform"in i.style))for(var n in t)n+"Transform"in i.style&&(e="-"+n.toLowerCase()+"-");var r=document.createElement("style");r.setAttribute("instantclick-loading-indicator",""),r.textContent="#instantclick {pointer-events:none; z-index:2147483647; position:fixed; top:0; left:0; width:100%; height:3px; border-radius:2px; color:hsl(192,100%,50%); background:currentColor; box-shadow: 0 -1px 8px; opacity: 0;}#instantclick.visible {opacity:1; "+e+"animation:instantclick .6s linear infinite;}@"+e+"keyframes instantclick {0%,5% {"+e+"transform:translateX(-100%);} 45%,55% {"+e+"transform:translateX(0%);} 95%,100% {"+e+"transform:translateX(100%);}}",document.head.appendChild(r)}function e(){i.className="visible"}function n(){instantclick.clearTimeout(r),i.className=""}var i,r;instantclick.on("change",function(e){instantclick.supported&&(e&&t(),document.body.appendChild(i),e||n())}),instantclick.on("restore",function(){document.body.appendChild(i),n()}),instantclick.on("wait",function(){r=instantclick.setTimeout(e,800)}),instantclick.on("exit",n),instantclick.loadingIndicator={show:e,hide:n}}(),instantclick.init(300);
js/instant_click.ori.js ADDED
@@ -0,0 +1,1068 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* InstantClick 3.1.0 | (C) 2014-2017 Alexandre Dieulot | http://instantclick.io/license */
2
+
3
+ var instantclick
4
+ , InstantClick = instantclick = function(document, location, $userAgent) {
5
+ // Internal variables
6
+ var $currentLocationWithoutHash
7
+ , $urlToPreload
8
+ , $preloadTimer
9
+ , $lastTouchTimestamp
10
+ , $hasBeenInitialized
11
+ , $touchEndedWithoutClickTimer
12
+ , $lastUsedTimeoutId = 0
13
+
14
+ // Preloading-related variables
15
+ , $history = {}
16
+ , $xhr
17
+ , $url = false
18
+ , $title = false
19
+ , $isContentTypeNotHTML
20
+ , $areTrackedElementsDifferent
21
+ , $body = false
22
+ , $lastDisplayTimestamp = 0
23
+ , $isPreloading = false
24
+ , $isWaitingForCompletion = false
25
+ , $gotANetworkError = false
26
+ , $trackedElementsData = []
27
+
28
+ // Variables defined by public functions
29
+ , $preloadOnMousedown
30
+ , $delayBeforePreload = 65
31
+ , $eventsCallbacks = {
32
+ preload: [],
33
+ receive: [],
34
+ wait: [],
35
+ change: [],
36
+ restore: [],
37
+ exit: []
38
+ }
39
+ , $timers = {}
40
+ , $currentPageXhrs = []
41
+ , $windowEventListeners = {}
42
+ , $delegatedEvents = {}
43
+
44
+
45
+ ////////// POLYFILL //////////
46
+
47
+
48
+ // Needed for `addEvent`
49
+ if (!Element.prototype.matches) {
50
+ Element.prototype.matches =
51
+ Element.prototype.webkitMatchesSelector ||
52
+ Element.prototype.msMatchesSelector ||
53
+ function (selector) {
54
+ var matches = document.querySelectorAll(selector)
55
+ for (var i = 0; i < matches.length; i++) {
56
+ if (matches[i] == this) {
57
+ return true
58
+ }
59
+ }
60
+ return false
61
+ }
62
+ }
63
+
64
+
65
+ ////////// HELPERS //////////
66
+
67
+
68
+ function removeHash(url) {
69
+ var index = url.indexOf('#')
70
+ if (index == -1) {
71
+ return url
72
+ }
73
+ return url.substr(0, index)
74
+ }
75
+
76
+ function getParentLinkElement(element) {
77
+ while (element && element.nodeName != 'A') {
78
+ element = element.parentNode
79
+ }
80
+ // `element` will be null if no link element is found
81
+ return element
82
+ }
83
+
84
+ function isBlacklisted(element) {
85
+ do {
86
+ if (!element.hasAttribute) { // Parent of <html>
87
+ break
88
+ }
89
+ if (element.hasAttribute('data-instant')) {
90
+ return false
91
+ }
92
+ if (element.hasAttribute('data-no-instant')) {
93
+ return true
94
+ }
95
+ /**
96
+ * Added by LiteSpeed to avoid clicking wrong link
97
+ */
98
+ if (element.getAttribute('rel') == 'nofollow' ) {
99
+ return true
100
+ }
101
+ }
102
+ while (element = element.parentNode)
103
+ return false
104
+ }
105
+
106
+ function isPreloadable(linkElement) {
107
+ var domain = location.protocol + '//' + location.host
108
+
109
+ if (linkElement.target // target="_blank" etc.
110
+ || linkElement.hasAttribute('download')
111
+ || linkElement.href.indexOf(domain + '/') != 0 // Another domain, or no href attribute
112
+ || (linkElement.href.indexOf('#') > -1
113
+ && removeHash(linkElement.href) == $currentLocationWithoutHash) // Anchor
114
+ || isBlacklisted(linkElement)
115
+ ) {
116
+ return false
117
+ }
118
+ return true
119
+ }
120
+
121
+ function triggerPageEvent(eventType) {
122
+ var argumentsToApply = Array.prototype.slice.call(arguments, 1)
123
+ , returnValue = false
124
+ for (var i = 0; i < $eventsCallbacks[eventType].length; i++) {
125
+ if (eventType == 'receive') {
126
+ var altered = $eventsCallbacks[eventType][i].apply(window, argumentsToApply)
127
+ if (altered) {
128
+ // Update arguments for the next iteration of the loop.
129
+ if ('body' in altered) {
130
+ argumentsToApply[1] = altered.body
131
+ }
132
+ if ('title' in altered) {
133
+ argumentsToApply[2] = altered.title
134
+ }
135
+
136
+ returnValue = altered
137
+ }
138
+ }
139
+ else {
140
+ $eventsCallbacks[eventType][i].apply(window, argumentsToApply)
141
+ }
142
+ }
143
+ return returnValue
144
+ }
145
+
146
+ function changePage(title, body, urlToPush, scrollPosition) {
147
+ abortCurrentPageXhrs()
148
+
149
+ document.documentElement.replaceChild(body, document.body)
150
+ // We cannot just use `document.body = doc.body`, it causes Safari (tested
151
+ // 5.1, 6.0 and Mobile 7.0) to execute script tags directly.
152
+
153
+ document.title = title
154
+
155
+ if (urlToPush) {
156
+ addOrRemoveWindowEventListeners('remove')
157
+ if (urlToPush != location.href) {
158
+ history.pushState(null, null, urlToPush)
159
+
160
+ if ($userAgent.indexOf(' CriOS/') > -1) {
161
+ // Chrome for iOS:
162
+ //
163
+ // 1. Removes title in tab on pushState, so it needs to be set after.
164
+ //
165
+ // 2. Will not set the title if it's identical after trimming, so we
166
+ // add a non-breaking space.
167
+ if (document.title == title) {
168
+ document.title = title + String.fromCharCode(160)
169
+ }
170
+ else {
171
+ document.title = title
172
+ }
173
+ }
174
+ }
175
+
176
+ var hashIndex = urlToPush.indexOf('#')
177
+ , offsetElement = hashIndex > -1
178
+ && document.getElementById(urlToPush.substr(hashIndex + 1))
179
+ , offset = 0
180
+
181
+ if (offsetElement) {
182
+ while (offsetElement.offsetParent) {
183
+ offset += offsetElement.offsetTop
184
+
185
+ offsetElement = offsetElement.offsetParent
186
+ }
187
+ }
188
+ if ('requestAnimationFrame' in window) {
189
+ // Safari on macOS doesn't immediately visually change the page on
190
+ // `document.documentElement.replaceChild`, so if `scrollTo` is called
191
+ // without `requestAnimationFrame` it often scrolls before the page
192
+ // is displayed.
193
+ requestAnimationFrame(function() {
194
+ scrollTo(0, offset)
195
+ })
196
+ }
197
+ else {
198
+ scrollTo(0, offset)
199
+ // Safari on macOS scrolls before the page is visually changed, but
200
+ // adding `requestAnimationFrame` doesn't fix it in this case.
201
+ }
202
+
203
+ clearCurrentPageTimeouts()
204
+
205
+ $currentLocationWithoutHash = removeHash(urlToPush)
206
+
207
+ if ($currentLocationWithoutHash in $windowEventListeners) {
208
+ $windowEventListeners[$currentLocationWithoutHash] = []
209
+ }
210
+
211
+ $timers[$currentLocationWithoutHash] = {}
212
+
213
+ applyScriptElements(function(element) {
214
+ return !element.hasAttribute('data-instant-track')
215
+ })
216
+
217
+ triggerPageEvent('change', false)
218
+ }
219
+ else {
220
+ // On popstate, browsers scroll by themselves, but at least Firefox
221
+ // scrolls BEFORE popstate is fired and thus before we can replace the
222
+ // page. If the page before popstate is too short the user won't be
223
+ // scrolled at the right position as a result. We need to scroll again.
224
+ scrollTo(0, scrollPosition)
225
+
226
+ // iOS's gesture to go back by swiping from the left edge of the screen
227
+ // will start a preloading if the user touches a link, it needs to be
228
+ // cancelled otherwise the page behind the touched link will be
229
+ // displayed.
230
+ $xhr.abort()
231
+ setPreloadingAsHalted()
232
+
233
+ applyScriptElements(function(element) {
234
+ return element.hasAttribute('data-instant-restore')
235
+ })
236
+
237
+ restoreTimers()
238
+
239
+ triggerPageEvent('restore')
240
+ }
241
+ }
242
+
243
+ function setPreloadingAsHalted() {
244
+ $isPreloading = false
245
+ $isWaitingForCompletion = false
246
+ }
247
+
248
+ function removeNoscriptTags(html) {
249
+ // Must be done on text, not on a node's innerHTML, otherwise strange
250
+ // things happen with implicitly closed elements (see the Noscript test).
251
+ return html.replace(/<noscript[\s\S]+?<\/noscript>/gi, '')
252
+ }
253
+
254
+ function abortCurrentPageXhrs() {
255
+ for (var i = 0; i < $currentPageXhrs.length; i++) {
256
+ if (typeof $currentPageXhrs[i] == 'object' && 'abort' in $currentPageXhrs[i]) {
257
+ $currentPageXhrs[i].instantclickAbort = true
258
+ $currentPageXhrs[i].abort()
259
+ }
260
+ }
261
+ $currentPageXhrs = []
262
+ }
263
+
264
+ function clearCurrentPageTimeouts() {
265
+ for (var i in $timers[$currentLocationWithoutHash]) {
266
+ var timeout = $timers[$currentLocationWithoutHash][i]
267
+ window.clearTimeout(timeout.realId)
268
+ timeout.delayLeft = timeout.delay - +new Date + timeout.timestamp
269
+ }
270
+ }
271
+
272
+ function restoreTimers() {
273
+ for (var i in $timers[$currentLocationWithoutHash]) {
274
+ if (!('delayLeft' in $timers[$currentLocationWithoutHash][i])) {
275
+ continue
276
+ }
277
+ var args = [
278
+ $timers[$currentLocationWithoutHash][i].callback,
279
+ $timers[$currentLocationWithoutHash][i].delayLeft
280
+ ]
281
+ for (var j = 0; j < $timers[$currentLocationWithoutHash][i].params.length; j++) {
282
+ args.push($timers[$currentLocationWithoutHash][i].params[j])
283
+ }
284
+ addTimer(args, $timers[$currentLocationWithoutHash][i].isRepeating, $timers[$currentLocationWithoutHash][i].delay)
285
+ delete $timers[$currentLocationWithoutHash][i]
286
+ }
287
+ }
288
+
289
+ function handleTouchendWithoutClick() {
290
+ $xhr.abort()
291
+ setPreloadingAsHalted()
292
+ }
293
+
294
+ function addOrRemoveWindowEventListeners(addOrRemove) {
295
+ if ($currentLocationWithoutHash in $windowEventListeners) {
296
+ for (var i = 0; i < $windowEventListeners[$currentLocationWithoutHash].length; i++) {
297
+ window[addOrRemove + 'EventListener'].apply(window, $windowEventListeners[$currentLocationWithoutHash][i])
298
+ }
299
+ }
300
+ }
301
+
302
+ function applyScriptElements(condition) {
303
+ var scriptElementsInDOM = document.body.getElementsByTagName('script')
304
+ , scriptElementsToCopy = []
305
+ , originalElement
306
+ , copyElement
307
+ , parentNode
308
+ , nextSibling
309
+ , i
310
+
311
+ // `scriptElementsInDOM` will change during the copy of scripts if
312
+ // a script add or delete script elements, so we need to put script
313
+ // elements in an array to loop through them correctly.
314
+ for (i = 0; i < scriptElementsInDOM.length; i++) {
315
+ scriptElementsToCopy.push(scriptElementsInDOM[i])
316
+ }
317
+
318
+ for (i = 0; i < scriptElementsToCopy.length; i++) {
319
+ originalElement = scriptElementsToCopy[i]
320
+ if (!originalElement) { // Might have disappeared, see previous comment
321
+ continue
322
+ }
323
+ if (!condition(originalElement)) {
324
+ continue
325
+ }
326
+
327
+ copyElement = document.createElement('script')
328
+ for (var j = 0; j < originalElement.attributes.length; j++) {
329
+ copyElement.setAttribute(originalElement.attributes[j].name, originalElement.attributes[j].value)
330
+ }
331
+ copyElement.textContent = originalElement.textContent
332
+
333
+ parentNode = originalElement.parentNode
334
+ nextSibling = originalElement.nextSibling
335
+ parentNode.removeChild(originalElement)
336
+ parentNode.insertBefore(copyElement, nextSibling)
337
+ }
338
+ }
339
+
340
+ function addTrackedElements() {
341
+ var trackedElements = document.querySelectorAll('[data-instant-track]')
342
+ , element
343
+ , elementData
344
+ for (var i = 0; i < trackedElements.length; i++) {
345
+ element = trackedElements[i]
346
+ elementData = element.getAttribute('href') || element.getAttribute('src') || element.textContent
347
+ // We can't use just `element.href` and `element.src` because we can't
348
+ // retrieve `href`s and `src`s from the Ajax response.
349
+ $trackedElementsData.push(elementData)
350
+ }
351
+ }
352
+
353
+ function addTimer(args, isRepeating, realDelay) {
354
+ var callback = args[0]
355
+ , delay = args[1]
356
+ , params = [].slice.call(args, 2)
357
+ , timestamp = +new Date
358
+
359
+ $lastUsedTimeoutId++
360
+ var id = $lastUsedTimeoutId
361
+
362
+ var callbackModified
363
+ if (isRepeating) {
364
+ callbackModified = function(args2) {
365
+ callback(args2)
366
+ delete $timers[$currentLocationWithoutHash][id]
367
+ args[0] = callback
368
+ args[1] = delay
369
+ addTimer(args, true)
370
+ }
371
+ }
372
+ else {
373
+ callbackModified = function(args2) {
374
+ callback(args2)
375
+ delete $timers[$currentLocationWithoutHash][id]
376
+ }
377
+ }
378
+
379
+ args[0] = callbackModified
380
+ if (realDelay != undefined) {
381
+ timestamp += delay - realDelay
382
+ delay = realDelay
383
+ }
384
+ var realId = window.setTimeout.apply(window, args)
385
+ $timers[$currentLocationWithoutHash][id] = {
386
+ realId: realId,
387
+ timestamp: timestamp,
388
+ callback: callback,
389
+ delay: delay,
390
+ params: params,
391
+ isRepeating: isRepeating
392
+ }
393
+ return -id
394
+ }
395
+
396
+
397
+ ////////// EVENT LISTENERS //////////
398
+
399
+
400
+ function mousedownListener(event) {
401
+ var linkElement = getParentLinkElement(event.target)
402
+
403
+ if (!linkElement || !isPreloadable(linkElement)) {
404
+ return
405
+ }
406
+
407
+ preload(linkElement.href)
408
+ }
409
+
410
+ function mouseoverListener(event) {
411
+ if ($lastTouchTimestamp > (+new Date - 500)) {
412
+ // On a touch device, if the content of the page change on mouseover
413
+ // click is never fired and the user will need to tap a second time.
414
+ // https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW4
415
+ //
416
+ // Content change could happen in the `preload` event, so we stop there.
417
+ return
418
+ }
419
+
420
+ if (+new Date - $lastDisplayTimestamp < 100) {
421
+ // After a page is displayed, if the user's cursor happens to be above
422
+ // a link a mouseover event will be in most browsers triggered
423
+ // automatically, and in other browsers it will be triggered when the
424
+ // user moves his mouse by 1px.
425
+ //
426
+ // Here are the behaviors I noticed, all on Windows:
427
+ // - Safari 5.1: auto-triggers after 0 ms
428
+ // - IE 11: auto-triggers after 30-80 ms (depends on page's size?)
429
+ // - Firefox: auto-triggers after 10 ms
430
+ // - Opera 18: auto-triggers after 10 ms
431
+ //
432
+ // - Chrome: triggers when cursor moved
433
+ // - Opera 12.16: triggers when cursor moved
434
+ //
435
+ // To remedy to this, we do nothing if the last display occurred less
436
+ // than 100 ms ago.
437
+
438
+ return
439
+ }
440
+
441
+ var linkElement = getParentLinkElement(event.target)
442
+
443
+ if (!linkElement) {
444
+ return
445
+ }
446
+
447
+ if (linkElement == getParentLinkElement(event.relatedTarget)) {
448
+ // Happens when mouseout-ing and mouseover-ing child elements of the same link element
449
+ return
450
+ }
451
+
452
+ if (!isPreloadable(linkElement)) {
453
+ return
454
+ }
455
+
456
+ linkElement.addEventListener('mouseout', mouseoutListener)
457
+
458
+ if (!$isWaitingForCompletion) {
459
+ $urlToPreload = linkElement.href
460
+ $preloadTimer = setTimeout(preload, $delayBeforePreload)
461
+ }
462
+ }
463
+
464
+ function touchstartListener(event) {
465
+ $lastTouchTimestamp = +new Date
466
+
467
+ var linkElement = getParentLinkElement(event.target)
468
+
469
+ if (!linkElement || !isPreloadable(linkElement)) {
470
+ return
471
+ }
472
+
473
+ if ($touchEndedWithoutClickTimer) {
474
+ clearTimeout($touchEndedWithoutClickTimer)
475
+ $touchEndedWithoutClickTimer = false
476
+ }
477
+
478
+ linkElement.addEventListener('touchend', touchendAndTouchcancelListener)
479
+ linkElement.addEventListener('touchcancel', touchendAndTouchcancelListener)
480
+
481
+ preload(linkElement.href)
482
+ }
483
+
484
+ function clickListenerPrelude() {
485
+ // Makes clickListener be fired after everyone else, so that we can respect
486
+ // event.preventDefault.
487
+ document.addEventListener('click', clickListener)
488
+ }
489
+
490
+ function clickListener(event) {
491
+ document.removeEventListener('click', clickListener)
492
+
493
+ if ($touchEndedWithoutClickTimer) {
494
+ clearTimeout($touchEndedWithoutClickTimer)
495
+ $touchEndedWithoutClickTimer = false
496
+ }
497
+
498
+ if (event.defaultPrevented) {
499
+ return
500
+ }
501
+
502
+ var linkElement = getParentLinkElement(event.target)
503
+
504
+ if (!linkElement || !isPreloadable(linkElement)) {
505
+ return
506
+ }
507
+
508
+ // Check if it's opening in a new tab
509
+ if (event.button != 0 // Chrome < 55 fires a click event when the middle mouse button is pressed
510
+ || event.metaKey
511
+ || event.ctrlKey) {
512
+ return
513
+ }
514
+ event.preventDefault()
515
+ display(linkElement.href)
516
+ }
517
+
518
+ function mouseoutListener(event) {
519
+ if (getParentLinkElement(event.target) == getParentLinkElement(event.relatedTarget)) {
520
+ // Happens when mouseout-ing and mouseover-ing child elements of the same link element,
521
+ // we don't want to stop preloading then.
522
+ return
523
+ }
524
+
525
+ if ($preloadTimer) {
526
+ clearTimeout($preloadTimer)
527
+ $preloadTimer = false
528
+ return
529
+ }
530
+
531
+ if (!$isPreloading || $isWaitingForCompletion) {
532
+ return
533
+ }
534
+
535
+ $xhr.abort()
536
+ setPreloadingAsHalted()
537
+ }
538
+
539
+ function touchendAndTouchcancelListener(event) {
540
+ if (!$isPreloading || $isWaitingForCompletion) {
541
+ return
542
+ }
543
+
544
+ $touchEndedWithoutClickTimer = setTimeout(handleTouchendWithoutClick, 500)
545
+ }
546
+
547
+ function readystatechangeListener() {
548
+ if ($xhr.readyState == 2) { // headers received
549
+ var contentType = $xhr.getResponseHeader('Content-Type')
550
+ if (!contentType || !/^text\/html/i.test(contentType)) {
551
+ $isContentTypeNotHTML = true
552
+ }
553
+ }
554
+
555
+ if ($xhr.readyState < 4) {
556
+ return
557
+ }
558
+
559
+ if ($xhr.status == 0) {
560
+ // Request error/timeout/abort
561
+ $gotANetworkError = true
562
+ if ($isWaitingForCompletion) {
563
+ triggerPageEvent('exit', $url, 'network error')
564
+ location.href = $url
565
+ }
566
+ return
567
+ }
568
+
569
+ if ($isContentTypeNotHTML) {
570
+ if ($isWaitingForCompletion) {
571
+ triggerPageEvent('exit', $url, 'non-html content-type')
572
+ location.href = $url
573
+ }
574
+ return
575
+ }
576
+
577
+ var doc = document.implementation.createHTMLDocument('')
578
+ doc.documentElement.innerHTML = removeNoscriptTags($xhr.responseText)
579
+ $title = doc.title
580
+ $body = doc.body
581
+
582
+ var alteredOnReceive = triggerPageEvent('receive', $url, $body, $title)
583
+ if (alteredOnReceive) {
584
+ if ('body' in alteredOnReceive) {
585
+ $body = alteredOnReceive.body
586
+ }
587
+ if ('title' in alteredOnReceive) {
588
+ $title = alteredOnReceive.title
589
+ }
590
+ }
591
+
592
+ var urlWithoutHash = removeHash($url)
593
+ $history[urlWithoutHash] = {
594
+ body: $body,
595
+ title: $title,
596
+ scrollPosition: urlWithoutHash in $history ? $history[urlWithoutHash].scrollPosition : 0
597
+ }
598
+
599
+ var trackedElements = doc.querySelectorAll('[data-instant-track]')
600
+ , element
601
+ , elementData
602
+
603
+ if (trackedElements.length != $trackedElementsData.length) {
604
+ $areTrackedElementsDifferent = true
605
+ }
606
+ else {
607
+ for (var i = 0; i < trackedElements.length; i++) {
608
+ element = trackedElements[i]
609
+ elementData = element.getAttribute('href') || element.getAttribute('src') || element.textContent
610
+ if ($trackedElementsData.indexOf(elementData) == -1) {
611
+ $areTrackedElementsDifferent = true
612
+ }
613
+ }
614
+ }
615
+
616
+ if ($isWaitingForCompletion) {
617
+ $isWaitingForCompletion = false
618
+ display($url)
619
+ }
620
+ }
621
+
622
+ function popstateListener() {
623
+ var loc = removeHash(location.href)
624
+ if (loc == $currentLocationWithoutHash) {
625
+ return
626
+ }
627
+
628
+ if ($isWaitingForCompletion) {
629
+ setPreloadingAsHalted()
630
+ $xhr.abort()
631
+ }
632
+
633
+ if (!(loc in $history)) {
634
+ triggerPageEvent('exit', location.href, 'not in history')
635
+ if (loc == location.href) { // no location.hash
636
+ location.href = location.href
637
+ // Reloads the page while using cache for scripts, styles and images,
638
+ // unlike `location.reload()`
639
+ }
640
+ else {
641
+ // When there's a hash, `location.href = location.href` won't reload
642
+ // the page (but will trigger a popstate event, thus causing an infinite
643
+ // loop), so we need to call `location.reload()`
644
+ location.reload()
645
+ }
646
+ return
647
+ }
648
+
649
+ $history[$currentLocationWithoutHash].scrollPosition = pageYOffset
650
+ clearCurrentPageTimeouts()
651
+ addOrRemoveWindowEventListeners('remove')
652
+ $currentLocationWithoutHash = loc
653
+ changePage($history[loc].title, $history[loc].body, false, $history[loc].scrollPosition)
654
+ addOrRemoveWindowEventListeners('add')
655
+ }
656
+
657
+
658
+ ////////// MAIN FUNCTIONS //////////
659
+
660
+
661
+ function preload(url) {
662
+ if ($preloadTimer) {
663
+ clearTimeout($preloadTimer)
664
+ $preloadTimer = false
665
+ }
666
+
667
+ if (!url) {
668
+ url = $urlToPreload
669
+ }
670
+
671
+ if ($isPreloading && (url == $url || $isWaitingForCompletion)) {
672
+ return
673
+ }
674
+ $isPreloading = true
675
+ $isWaitingForCompletion = false
676
+
677
+ $url = url
678
+ $body = false
679
+ $isContentTypeNotHTML = false
680
+ $gotANetworkError = false
681
+ $areTrackedElementsDifferent = false
682
+ triggerPageEvent('preload')
683
+ $xhr.open('GET', url)
684
+ $xhr.timeout = 90000 // Must be set after `open()` with IE
685
+ $xhr.send()
686
+ }
687
+
688
+ function display(url) {
689
+ $lastDisplayTimestamp = +new Date
690
+ if ($preloadTimer || !$isPreloading) {
691
+ // $preloadTimer:
692
+ // Happens when there's a delay before preloading and that delay
693
+ // hasn't expired (preloading didn't kick in).
694
+ //
695
+ // !$isPreloading:
696
+ // A link has been clicked, and preloading hasn't been initiated.
697
+ // It happens with touch devices when a user taps *near* the link,
698
+ // causing `touchstart` not to be fired. Safari/Chrome will trigger
699
+ // `mouseover`, `mousedown`, `click` (and others), but when that happens
700
+ // we do nothing in `mouseover` as it may cause `click` not to fire (see
701
+ // comment in `mouseoverListener`).
702
+ //
703
+ // It also happens when a user uses his keyboard to navigate (with Tab
704
+ // and Return), and possibly in other non-mainstream ways to navigate
705
+ // a website.
706
+
707
+ if ($preloadTimer && $url && $url != url) {
708
+ // Happens when the user clicks on a link before preloading
709
+ // kicks in while another link is already preloading.
710
+
711
+ triggerPageEvent('exit', url, 'click occured while preloading planned')
712
+ location.href = url
713
+ return
714
+ }
715
+
716
+ preload(url)
717
+ triggerPageEvent('wait')
718
+ $isWaitingForCompletion = true // Must be set *after* calling `preload`
719
+ return
720
+ }
721
+ if ($isWaitingForCompletion) {
722
+ // The user clicked on a link while a page to display was preloading.
723
+ // Either on the same link or on another link. If it's the same link
724
+ // something might have gone wrong (or he could have double clicked, we
725
+ // don't handle that case), so we send him to the page without pjax.
726
+ // If it's another link, it hasn't been preloaded, so we redirect the
727
+ // user to it.
728
+ triggerPageEvent('exit', url, 'clicked on a link while waiting for another page to display')
729
+ location.href = url
730
+ return
731
+ }
732
+ if ($isContentTypeNotHTML) {
733
+ triggerPageEvent('exit', $url, 'non-html content-type')
734
+ location.href = $url
735
+ return
736
+ }
737
+ if ($gotANetworkError) {
738
+ triggerPageEvent('exit', $url, 'network error')
739
+ location.href = $url
740
+ return
741
+ }
742
+ if ($areTrackedElementsDifferent) {
743
+ triggerPageEvent('exit', $url, 'different assets')
744
+ location.href = $url
745
+ return
746
+ }
747
+ if (!$body) {
748
+ triggerPageEvent('wait')
749
+ $isWaitingForCompletion = true
750
+ return
751
+ }
752
+ $history[$currentLocationWithoutHash].scrollPosition = pageYOffset
753
+ setPreloadingAsHalted()
754
+ changePage($title, $body, $url)
755
+ }
756
+
757
+
758
+ ////////// PUBLIC VARIABLE AND FUNCTIONS //////////
759
+
760
+
761
+ var supported = false
762
+ if ('pushState' in history
763
+ && location.protocol != "file:") {
764
+ supported = true
765
+
766
+ var indexOfAndroid = $userAgent.indexOf('Android ')
767
+ if (indexOfAndroid > -1) {
768
+ // The stock browser in Android 4.0.3 through 4.3.1 supports pushState,
769
+ // though it doesn't update the address bar.
770
+ //
771
+ // More problematic is that it has a bug on `popstate` when coming back
772
+ // from a page not displayed through InstantClick: `location.href` is
773
+ // undefined and `location.reload()` doesn't work.
774
+ //
775
+ // Android < 4.4 is therefore blacklisted, unless it's a browser known
776
+ // not to have that latter bug.
777
+
778
+ var androidVersion = parseFloat($userAgent.substr(indexOfAndroid + 'Android '.length))
779
+ if (androidVersion < 4.4) {
780
+ supported = false
781
+ if (androidVersion >= 4) {
782
+ var whitelistedBrowsersUserAgentsOnAndroid4 = [
783
+ / Chrome\//, // Chrome, Opera, Puffin, QQ, Yandex
784
+ / UCBrowser\//,
785
+ / Firefox\//,
786
+ / Windows Phone /, // WP 8.1+ pretends to be Android
787
+ ]
788
+ for (var i = 0; i < whitelistedBrowsersUserAgentsOnAndroid4.length; i++) {
789
+ if (whitelistedBrowsersUserAgentsOnAndroid4[i].test($userAgent)) {
790
+ supported = true
791
+ break
792
+ }
793
+ }
794
+ }
795
+ }
796
+ }
797
+ }
798
+
799
+ function init(preloadingMode) {
800
+ if (!supported) {
801
+ triggerPageEvent('change', true)
802
+ return
803
+ }
804
+
805
+ if ($hasBeenInitialized) {
806
+ return
807
+ }
808
+ $hasBeenInitialized = true
809
+
810
+ if (preloadingMode == 'mousedown') {
811
+ $preloadOnMousedown = true
812
+ }
813
+ else if (typeof preloadingMode == 'number') {
814
+ $delayBeforePreload = preloadingMode
815
+ }
816
+
817
+ $currentLocationWithoutHash = removeHash(location.href)
818
+ $timers[$currentLocationWithoutHash] = {}
819
+ $history[$currentLocationWithoutHash] = {
820
+ body: document.body,
821
+ title: document.title,
822
+ scrollPosition: pageYOffset
823
+ }
824
+
825
+ if (document.readyState == 'loading') {
826
+ document.addEventListener('DOMContentLoaded', addTrackedElements)
827
+ }
828
+ else {
829
+ addTrackedElements()
830
+ }
831
+
832
+ $xhr = new XMLHttpRequest()
833
+ $xhr.addEventListener('readystatechange', readystatechangeListener)
834
+
835
+ document.addEventListener('touchstart', touchstartListener, true)
836
+ if ($preloadOnMousedown) {
837
+ document.addEventListener('mousedown', mousedownListener, true)
838
+ }
839
+ else {
840
+ document.addEventListener('mouseover', mouseoverListener, true)
841
+ }
842
+ document.addEventListener('click', clickListenerPrelude, true)
843
+
844
+ addEventListener('popstate', popstateListener)
845
+ }
846
+
847
+ function on(eventType, callback) {
848
+ $eventsCallbacks[eventType].push(callback)
849
+
850
+ if (eventType == 'change') {
851
+ callback(!$lastDisplayTimestamp)
852
+ }
853
+ }
854
+
855
+ function setTimeout() {
856
+ return addTimer(arguments, false)
857
+ }
858
+
859
+ function setInterval() {
860
+ return addTimer(arguments, true)
861
+ }
862
+
863
+ function clearTimeout(id) {
864
+ id = -id
865
+ for (var loc in $timers) {
866
+ if (id in $timers[loc]) {
867
+ window.clearTimeout($timers[loc][id].realId)
868
+ delete $timers[loc][id]
869
+ }
870
+ }
871
+ }
872
+
873
+ function xhr(xhr) {
874
+ $currentPageXhrs.push(xhr)
875
+ }
876
+
877
+ function addPageEvent() {
878
+ if (!($currentLocationWithoutHash in $windowEventListeners)) {
879
+ $windowEventListeners[$currentLocationWithoutHash] = []
880
+ }
881
+ $windowEventListeners[$currentLocationWithoutHash].push(arguments)
882
+ addEventListener.apply(window, arguments)
883
+ }
884
+
885
+ function removePageEvent() {
886
+ if (!($currentLocationWithoutHash in $windowEventListeners)) {
887
+ return
888
+ }
889
+ firstLoop:
890
+ for (var i = 0; i < $windowEventListeners[$currentLocationWithoutHash].length; i++) {
891
+ if (arguments.length != $windowEventListeners[$currentLocationWithoutHash][i].length) {
892
+ continue
893
+ }
894
+ for (var j = 0; j < $windowEventListeners[$currentLocationWithoutHash][i].length; j++) {
895
+ if (arguments[j] != $windowEventListeners[$currentLocationWithoutHash][i][j]) {
896
+ continue firstLoop
897
+ }
898
+ }
899
+ $windowEventListeners[$currentLocationWithoutHash].splice(i, 1)
900
+ }
901
+ }
902
+
903
+ function addEvent(selector, type, listener) {
904
+ if (!(type in $delegatedEvents)) {
905
+ $delegatedEvents[type] = {}
906
+
907
+ document.addEventListener(type, function(event) {
908
+ var element = event.target
909
+ event.originalStopPropagation = event.stopPropagation
910
+ event.stopPropagation = function() {
911
+ this.isPropagationStopped = true
912
+ this.originalStopPropagation()
913
+ }
914
+ while (element && element.nodeType == 1) {
915
+ for (var selector in $delegatedEvents[type]) {
916
+ if (element.matches(selector)) {
917
+ for (var i = 0; i < $delegatedEvents[type][selector].length; i++) {
918
+ $delegatedEvents[type][selector][i].call(element, event)
919
+ }
920
+ if (event.isPropagationStopped) {
921
+ return
922
+ }
923
+ break
924
+ }
925
+ }
926
+ element = element.parentNode
927
+ }
928
+ }, false) // Third parameter isn't optional in Firefox < 6
929
+
930
+ if (type == 'click' && /iP(?:hone|ad|od)/.test($userAgent)) {
931
+ // Force Mobile Safari to trigger the click event on document by adding a pointer cursor to body
932
+
933
+ var styleElement = document.createElement('style')
934
+ styleElement.setAttribute('instantclick-mobile-safari-cursor', '') // So that this style element doesn't surprise developers in the browser DOM inspector.
935
+ styleElement.textContent = 'body { cursor: pointer !important; }'
936
+ document.head.appendChild(styleElement)
937
+ }
938
+ }
939
+
940
+ if (!(selector in $delegatedEvents[type])) {
941
+ $delegatedEvents[type][selector] = []
942
+ }
943
+
944
+ // Run removeEvent beforehand so that it can't be added twice
945
+ removeEvent(selector, type, listener)
946
+
947
+ $delegatedEvents[type][selector].push(listener)
948
+ }
949
+
950
+ function removeEvent(selector, type, listener) {
951
+ var index = $delegatedEvents[type][selector].indexOf(listener)
952
+ if (index > -1) {
953
+ $delegatedEvents[type][selector].splice(index, 1)
954
+ }
955
+ }
956
+
957
+
958
+ ////////////////////
959
+
960
+
961
+ return {
962
+ supported: supported,
963
+ init: init,
964
+ on: on,
965
+ setTimeout: setTimeout,
966
+ setInterval: setInterval,
967
+ clearTimeout: clearTimeout,
968
+ xhr: xhr,
969
+ addPageEvent: addPageEvent,
970
+ removePageEvent: removePageEvent,
971
+ addEvent: addEvent,
972
+ removeEvent: removeEvent
973
+ }
974
+
975
+ }(document, location, navigator.userAgent);
976
+
977
+ /* InstantClick's loading indicator | (C) 2014-2017 Alexandre Dieulot | http://instantclick.io/license */
978
+
979
+ ;(function() {
980
+ var $element
981
+ , $timer
982
+
983
+ function init() {
984
+ $element = document.createElement('div')
985
+ $element.id = 'instantclick'
986
+
987
+ var vendors = {
988
+ Webkit: true,
989
+ Moz: true
990
+ }
991
+ , vendorPrefix = ''
992
+
993
+ if (!('transform' in $element.style)) {
994
+ for (var vendor in vendors) {
995
+ if (vendor + 'Transform' in $element.style) {
996
+ vendorPrefix = '-' + vendor.toLowerCase() + '-'
997
+ }
998
+ }
999
+ }
1000
+
1001
+ var styleElement = document.createElement('style')
1002
+ styleElement.setAttribute('instantclick-loading-indicator', '') // So that this style element doesn't surprise developers in the browser DOM inspector.
1003
+ styleElement.textContent = '#instantclick {pointer-events:none; z-index:2147483647; position:fixed; top:0; left:0; width:100%; height:3px; border-radius:2px; color:hsl(192,100%,50%); background:currentColor; box-shadow: 0 -1px 8px; opacity: 0;}' +
1004
+ '#instantclick.visible {opacity:1; ' + vendorPrefix + 'animation:instantclick .6s linear infinite;}' +
1005
+ '@' + vendorPrefix + 'keyframes instantclick {0%,5% {' + vendorPrefix + 'transform:translateX(-100%);} 45%,55% {' + vendorPrefix + 'transform:translateX(0%);} 95%,100% {' + vendorPrefix + 'transform:translateX(100%);}}'
1006
+ document.head.appendChild(styleElement)
1007
+ }
1008
+
1009
+ function changeListener(isInitialPage) {
1010
+ if (!instantclick.supported) {
1011
+ return
1012
+ }
1013
+
1014
+ if (isInitialPage) {
1015
+ init()
1016
+ }
1017
+
1018
+ document.body.appendChild($element)
1019
+
1020
+ if (!isInitialPage) {
1021
+ hide()
1022
+ }
1023
+ }
1024
+
1025
+ function restoreListener() {
1026
+ document.body.appendChild($element)
1027
+
1028
+ hide()
1029
+ }
1030
+
1031
+ function waitListener() {
1032
+ $timer = instantclick.setTimeout(show, 800)
1033
+ }
1034
+
1035
+ function show() {
1036
+ $element.className = 'visible'
1037
+ }
1038
+
1039
+ function hide() {
1040
+ instantclick.clearTimeout($timer)
1041
+
1042
+ $element.className = ''
1043
+ // Doesn't work (has no visible effect) in Safari on `exit`.
1044
+ //
1045
+ // My guess is that Safari queues styling change for the next frame and
1046
+ // drops that queue on location change.
1047
+ }
1048
+
1049
+
1050
+ ////////////////////
1051
+
1052
+
1053
+ instantclick.on('change', changeListener)
1054
+ instantclick.on('restore', restoreListener)
1055
+ instantclick.on('wait', waitListener)
1056
+ instantclick.on('exit', hide)
1057
+
1058
+
1059
+ ////////////////////
1060
+
1061
+
1062
+ instantclick.loadingIndicator = {
1063
+ show: show,
1064
+ hide: hide
1065
+ }
1066
+ })();
1067
+
1068
+ instantclick.init();
js/litespeed-cache-admin.js CHANGED
@@ -96,7 +96,7 @@ var _litespeed_dots ;
96
  if( ! $(this).data('url') ){
97
  return false ;
98
  }
99
- $('.litespeed-shell').css('display','block') ;
100
  _litespeed_dots = window.setInterval(_litespeed_loading_dots, 300) ;
101
  _litespeed_crawler_url = $(this).data('url') ;
102
  litespeed_fetch_meta() ;
@@ -185,6 +185,18 @@ var _litespeed_dots ;
185
  litespeed_toggle() ;
186
  litespeed_cdn_mapping_del_init() ;
187
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  function litespeed_cdn_mapping_del_init() {
189
  $( '[data-litespeed-cdn-mapping-del]' ).off().click(function(event) {
190
  if ( ! confirm( 'Are you sure?' ) ) {
@@ -216,6 +228,15 @@ var _litespeed_dots ;
216
  }) ;
217
  })(jQuery) ;
218
 
 
 
 
 
 
 
 
 
 
219
  function litespeed_keycode( num ) {
220
  var num = num || 13 ;
221
  var code = window.event ? event.keyCode : event.which ;
96
  if( ! $(this).data('url') ){
97
  return false ;
98
  }
99
+ $('.litespeed-shell').removeClass( 'litespeed-hide' ) ;
100
  _litespeed_dots = window.setInterval(_litespeed_loading_dots, 300) ;
101
  _litespeed_crawler_url = $(this).data('url') ;
102
  litespeed_fetch_meta() ;
185
  litespeed_toggle() ;
186
  litespeed_cdn_mapping_del_init() ;
187
 
188
+ /** Object Cache switching */
189
+ $( '#litespeed-oc-mem' ).click( function( event ) {
190
+ $( '[name="litespeed-cache-conf[cache_object_port]"]' ).val( 11211 ) ;
191
+ $( '[data="litespeed-mem-divs"]' ).removeClass( 'litespeed-hide' ) ;
192
+ $( '[data="litespeed-redis-divs"]' ).addClass( 'litespeed-hide' ) ;
193
+ } ) ;
194
+ $( '#litespeed-oc-redis' ).click( function( event ) {
195
+ $( '[name="litespeed-cache-conf[cache_object_port]"]' ).val( 6379 ) ;
196
+ $( '[data="litespeed-mem-divs"]' ).addClass( 'litespeed-hide' ) ;
197
+ $( '[data="litespeed-redis-divs"]' ).removeClass( 'litespeed-hide' ) ;
198
+ } ) ;
199
+
200
  function litespeed_cdn_mapping_del_init() {
201
  $( '[data-litespeed-cdn-mapping-del]' ).off().click(function(event) {
202
  if ( ! confirm( 'Are you sure?' ) ) {
228
  }) ;
229
  })(jQuery) ;
230
 
231
+ /**
232
+ * Trigger a click event on an element
233
+ * @since 1.8
234
+ */
235
+ function litespeed_trigger_click( selector )
236
+ {
237
+ jQuery( selector ).trigger( 'click' ) ;
238
+ }
239
+
240
  function litespeed_keycode( num ) {
241
  var num = num || 13 ;
242
  var code = window.event ? event.keyCode : event.which ;
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 1.7.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
- "POT-Creation-Date: 2018-01-05 15:45:16+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -28,65 +28,103 @@ msgstr ""
28
  msgid "Message from LiteSpeed image server"
29
  msgstr ""
30
 
31
- #: admin/litespeed-cache-admin-display.class.php:140
32
- #: admin/tpl/setting/settings_cdn.php:178 inc/gui.class.php:250
33
- #: includes/litespeed-cache-gui.class.php:250
34
  msgid "Manage"
35
  msgstr ""
36
 
37
- #: admin/litespeed-cache-admin-display.class.php:142
38
- #: admin/litespeed-cache-admin-display.class.php:232 inc/gui.class.php:258
39
- #: includes/litespeed-cache-gui.class.php:258
40
  msgid "Settings"
41
  msgstr ""
42
 
43
- #: admin/litespeed-cache-admin-display.class.php:145
44
  msgid "Edit .htaccess"
45
  msgstr ""
46
 
47
- #: admin/litespeed-cache-admin-display.class.php:149 inc/gui.class.php:267
48
- #: includes/litespeed-cache-gui.class.php:267
49
  msgid "Image Optimization"
50
  msgstr ""
51
 
52
- #: admin/litespeed-cache-admin-display.class.php:150 admin/tpl/settings.php:29
53
  msgid "Crawler"
54
  msgstr ""
55
 
56
- #: admin/litespeed-cache-admin-display.class.php:151
57
  msgid "Report"
58
  msgstr ""
59
 
60
  #: admin/litespeed-cache-admin-display.class.php:155
61
- #: admin/tpl/setting/settings_debug.php:10
 
 
 
 
62
  msgid "Debug Log"
63
  msgstr ""
64
 
65
- #: admin/litespeed-cache-admin-display.class.php:252
66
  msgid ""
67
  "It is recommended that LiteSpeed Cache be purged after updating a plugin."
68
  msgstr ""
69
 
70
- #: admin/litespeed-cache-admin-display.class.php:780
71
- #: admin/litespeed-cache-admin-display.class.php:865
72
- #: admin/tpl/setting/settings_media.php:70
73
- #: admin/tpl/setting/settings_optimize.php:135
74
- #: admin/tpl/setting/settings_tuning.php:19
75
- #: admin/tpl/setting/settings_tuning.php:55
 
76
  msgid "ON"
77
  msgstr ""
78
 
79
- #: admin/litespeed-cache-admin-display.class.php:781
80
- #: admin/litespeed-cache-admin-display.class.php:869
81
- #: admin/tpl/setting/settings_tuning.php:16
82
- #: admin/tpl/setting/settings_tuning.php:52
 
83
  msgid "OFF"
84
  msgstr ""
85
 
86
- #: admin/litespeed-cache-admin-display.class.php:894
87
  msgid "Recommended value: %s"
88
  msgstr ""
89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  #: admin/litespeed-cache-admin-error.class.php:87
91
  msgid "The installed PHP version is too old for the LiteSpeed Cache Plugin."
92
  msgstr ""
@@ -351,13 +389,13 @@ msgstr ""
351
  msgid "Failed to push to LiteSpeed server: %s"
352
  msgstr ""
353
 
354
- #: admin/litespeed-cache-admin-rules.class.php:690
355
  msgid ""
356
  "<p>Please add/replace the following codes into the beginning of %1$s:</p> "
357
  "%2$s"
358
  msgstr ""
359
 
360
- #: admin/litespeed-cache-admin-rules.class.php:888
361
  msgid "File Saved."
362
  msgstr ""
363
 
@@ -365,86 +403,86 @@ msgstr ""
365
  msgid "'Use primary site settings' set by Network Administrator."
366
  msgstr ""
367
 
368
- #: admin/litespeed-cache-admin-settings.class.php:221
369
  msgid "Site options saved."
370
  msgstr ""
371
 
372
- #: admin/litespeed-cache-admin-settings.class.php:260
373
- #: admin/litespeed-cache-admin-settings.class.php:882
374
  msgid "Default Public Cache"
375
  msgstr ""
376
 
377
- #: admin/litespeed-cache-admin-settings.class.php:261
378
  msgid "Default Private Cache"
379
  msgstr ""
380
 
381
- #: admin/litespeed-cache-admin-settings.class.php:262
382
  msgid "Default Front Page"
383
  msgstr ""
384
 
385
- #: admin/litespeed-cache-admin-settings.class.php:263
386
  msgid "Feed"
387
  msgstr ""
388
 
389
- #: admin/litespeed-cache-admin-settings.class.php:264
390
  msgid "404"
391
  msgstr ""
392
 
393
- #: admin/litespeed-cache-admin-settings.class.php:265
394
  msgid "403"
395
  msgstr ""
396
 
397
- #: admin/litespeed-cache-admin-settings.class.php:266
398
  msgid "500"
399
  msgstr ""
400
 
401
- #: admin/litespeed-cache-admin-settings.class.php:743
402
- #: admin/tpl/setting/settings_debug.php:75
403
  msgid "Log File Size Limit"
404
  msgstr ""
405
 
406
- #: admin/litespeed-cache-admin-settings.class.php:809
407
- #: admin/tpl/setting/settings_crawler.php:10
408
  msgid "Delay"
409
  msgstr ""
410
 
411
- #: admin/litespeed-cache-admin-settings.class.php:810
412
- #: admin/tpl/setting/settings_crawler.php:22
413
  msgid "Run Duration"
414
  msgstr ""
415
 
416
- #: admin/litespeed-cache-admin-settings.class.php:811
417
  msgid "Cron Interval"
418
  msgstr ""
419
 
420
- #: admin/litespeed-cache-admin-settings.class.php:812
421
  msgid "Whole Interval"
422
  msgstr ""
423
 
424
- #: admin/litespeed-cache-admin-settings.class.php:813
425
- #: admin/tpl/setting/settings_crawler.php:58
426
  msgid "Threads"
427
  msgstr ""
428
 
429
- #: admin/litespeed-cache-admin.class.php:205
430
  msgid ""
431
  "For this scenario only, the network admin may uncheck \"Check Advanced Cache"
432
  "\" in LiteSpeed Cache settings."
433
  msgstr ""
434
 
435
- #: admin/litespeed-cache-admin.class.php:207
436
  msgid ""
437
  "For this scenario only, please uncheck \"Check Advanced Cache\" in LiteSpeed "
438
  "Cache settings."
439
  msgstr ""
440
 
441
- #: admin/litespeed-cache-admin.class.php:209
442
  msgid ""
443
  "Please disable/deactivate any other Full Page Cache solutions that are "
444
  "currently being used."
445
  msgstr ""
446
 
447
- #: admin/litespeed-cache-admin.class.php:210
448
  msgid ""
449
  "LiteSpeed Cache does work with other cache solutions, but only their non-"
450
  "page caching offerings—such as minifying css/js files."
@@ -492,7 +530,7 @@ msgid "Crawler Cron"
492
  msgstr ""
493
 
494
  #: admin/tpl/crawler.php:67 admin/tpl/manage/manage_cdn.php:15
495
- #: admin/tpl/setting/settings_optimize.php:10 admin/tpl/settings.php:130
496
  msgid "WARNING"
497
  msgstr ""
498
 
@@ -543,12 +581,12 @@ msgstr ""
543
  msgid "Is running"
544
  msgstr ""
545
 
546
- #: admin/tpl/crawler.php:134 admin/tpl/setting/settings_general.php:30
547
  msgid "Enable"
548
  msgstr ""
549
 
550
  #: admin/tpl/crawler.php:134 admin/tpl/esi_widget_edit.php:56
551
- #: admin/tpl/setting/settings_general.php:24
552
  msgid "Disable"
553
  msgstr ""
554
 
@@ -680,18 +718,19 @@ msgstr ""
680
  msgid "Widget Cache TTL:"
681
  msgstr ""
682
 
683
- #: admin/tpl/esi_widget_edit.php:69 admin/tpl/setting/settings_crawler.php:25
684
- #: admin/tpl/setting/settings_crawler.php:37
685
- #: admin/tpl/setting/settings_crawler.php:49
686
- #: admin/tpl/setting/settings_general.php:59
687
- #: admin/tpl/setting/settings_general.php:71
688
- #: admin/tpl/setting/settings_general.php:83
689
- #: admin/tpl/setting/settings_general.php:95
690
- #: admin/tpl/setting/settings_general.php:108
691
- #: admin/tpl/setting/settings_general.php:121
692
- #: admin/tpl/setting/settings_general.php:134
693
  #: admin/tpl/setting/settings_inc.cache_browser.php:24
694
- #: admin/tpl/setting/settings_optimize.php:86
 
695
  msgid "seconds"
696
  msgstr ""
697
 
@@ -781,14 +820,6 @@ msgstr ""
781
  msgid "Please press the %s button before sending a new request."
782
  msgstr ""
783
 
784
- #: admin/tpl/image_optimization.php:112 admin/tpl/image_optimization.php:151
785
- #: admin/tpl/manage/manage_cdn.php:60
786
- #: admin/tpl/setting/settings_advanced.php:96
787
- #: admin/tpl/setting/settings_cache.php:86
788
- #: admin/tpl/setting/settings_optimize.php:151
789
- msgid "Learn More"
790
- msgstr ""
791
-
792
  #: admin/tpl/image_optimization.php:118
793
  msgid ""
794
  "This will send the optimization request and the images to LiteSpeed's Image "
@@ -901,19 +932,22 @@ msgid ""
901
  "optimizations, and delete all optimization files."
902
  msgstr ""
903
 
904
- #: admin/tpl/image_optimization.php:207 admin/tpl/setting/settings_cdn.php:94
905
- #: admin/tpl/setting/settings_excludes.php:60
906
- #: admin/tpl/setting/settings_excludes.php:98
 
 
907
  #: admin/tpl/setting/settings_inc.cache_browser.php:12
908
  #: admin/tpl/setting/settings_inc.cache_favicon.php:13
909
  #: admin/tpl/setting/settings_inc.cache_mobile.php:17
 
910
  #: admin/tpl/setting/settings_inc.cache_resources.php:14
911
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:22
912
  #: admin/tpl/setting/settings_inc.exclude_useragent.php:21
913
  #: admin/tpl/setting/settings_inc.media_webp.php:12
914
- #: admin/tpl/setting/settings_optimize.php:137
915
- #: admin/tpl/setting/settings_tuning.php:18
916
- #: admin/tpl/setting/settings_tuning.php:54
917
  msgid "NOTE:"
918
  msgstr ""
919
 
@@ -924,11 +958,50 @@ msgid ""
924
  msgstr ""
925
 
926
  #: admin/tpl/image_optimization.php:208
927
- #: admin/tpl/setting/settings_optimize.php:63
928
- #: admin/tpl/setting/settings_optimize.php:138
929
  msgid "JS Combine"
930
  msgstr ""
931
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
932
  #: admin/tpl/inc/admin_footer.php:5
933
  msgid ""
934
  "Rate <strong>LiteSpeed Cache</strong> with %s on WordPress.org if you like "
@@ -1305,103 +1378,123 @@ msgstr ""
1305
  msgid "Are you sure you want to purge all?"
1306
  msgstr ""
1307
 
1308
- #: admin/tpl/manage/manage_purge.php:61
1309
- msgid "Empty Entire Cache"
 
1310
  msgstr ""
1311
 
1312
  #: admin/tpl/manage/manage_purge.php:62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1313
  msgid ""
1314
  "Clears all cache entries related to this site, <i>including other web "
1315
  "applications</i>."
1316
  msgstr ""
1317
 
1318
- #: admin/tpl/manage/manage_purge.php:63
1319
  msgid "This action should only be used if things are cached incorrectly."
1320
  msgstr ""
1321
 
1322
- #: admin/tpl/manage/manage_purge.php:67
1323
  msgid "This will clear EVERYTHING inside the cache."
1324
  msgstr ""
1325
 
1326
- #: admin/tpl/manage/manage_purge.php:68
1327
  msgid "This may cause heavy load on the server."
1328
  msgstr ""
1329
 
1330
- #: admin/tpl/manage/manage_purge.php:69
1331
  msgid "If only the WordPress site should be purged, use purge all."
1332
  msgstr ""
1333
 
1334
- #: admin/tpl/manage/manage_purge.php:75 admin/tpl/manage.php:7
1335
  #: admin/tpl/network_settings.php:7 admin/tpl/settings.php:9
1336
  msgid "Purge"
1337
  msgstr ""
1338
 
1339
- #: admin/tpl/manage/manage_purge.php:102
1340
  msgid "Purge By..."
1341
  msgstr ""
1342
 
1343
- #: admin/tpl/manage/manage_purge.php:104
1344
  msgid "Select below for \"Purge by\" options."
1345
  msgstr ""
1346
 
1347
- #: admin/tpl/manage/manage_purge.php:105
1348
- #: admin/tpl/setting/settings_cache.php:67
1349
- #: admin/tpl/setting/settings_cache.php:90
1350
- #: admin/tpl/setting/settings_cdn.php:113
1351
- #: admin/tpl/setting/settings_cdn.php:139
1352
- #: admin/tpl/setting/settings_excludes.php:19
1353
- #: admin/tpl/setting/settings_excludes.php:33
1354
- #: admin/tpl/setting/settings_excludes.php:56
1355
- #: admin/tpl/setting/settings_excludes.php:94
 
 
1356
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:19
1357
- #: admin/tpl/setting/settings_media.php:31
1358
- #: admin/tpl/setting/settings_optimize.php:152
1359
- #: admin/tpl/setting/settings_purge.php:79
1360
- #: admin/tpl/setting/settings_tuning.php:36
1361
- #: admin/tpl/setting/settings_tuning.php:72
1362
- #: admin/tpl/setting/settings_tuning.php:144
1363
- #: admin/tpl/setting/settings_tuning.php:173
1364
  msgid "One per line."
1365
  msgstr ""
1366
 
1367
- #: admin/tpl/manage/manage_purge.php:132
1368
  msgid "Category"
1369
  msgstr ""
1370
 
1371
- #: admin/tpl/manage/manage_purge.php:138
1372
  msgid "Post ID"
1373
  msgstr ""
1374
 
1375
- #: admin/tpl/manage/manage_purge.php:144
1376
  msgid "Tag"
1377
  msgstr ""
1378
 
1379
- #: admin/tpl/manage/manage_purge.php:150
1380
  msgid "URL"
1381
  msgstr ""
1382
 
1383
- #: admin/tpl/manage/manage_purge.php:156
1384
  msgid ""
1385
  "Purge pages by category name - e.g. %2$s should be used for the URL %1$s."
1386
  msgstr ""
1387
 
1388
- #: admin/tpl/manage/manage_purge.php:161
1389
  msgid "Purge pages by post ID."
1390
  msgstr ""
1391
 
1392
- #: admin/tpl/manage/manage_purge.php:165
1393
  msgid "Purge pages by tag name - e.g. %2$s should be used for the URL %1$s."
1394
  msgstr ""
1395
 
1396
- #: admin/tpl/manage/manage_purge.php:170
1397
  msgid "Purge pages by relative or full URL."
1398
  msgstr ""
1399
 
1400
- #: admin/tpl/manage/manage_purge.php:171
1401
  msgid "e.g. Use %s or %s."
1402
  msgstr ""
1403
 
1404
- #: admin/tpl/manage/manage_purge.php:184
1405
  msgid "Purge List"
1406
  msgstr ""
1407
 
@@ -1409,7 +1502,7 @@ msgstr ""
1409
  msgid "DB Optimizer"
1410
  msgstr ""
1411
 
1412
- #: admin/tpl/manage.php:12 admin/tpl/setting/settings_cdn.php:178
1413
  #: admin/tpl/settings.php:14
1414
  msgid "CDN"
1415
  msgstr ""
@@ -1422,7 +1515,7 @@ msgstr ""
1422
  msgid "LiteSpeed Cache Management"
1423
  msgstr ""
1424
 
1425
- #: admin/tpl/network_settings.php:5 admin/tpl/setting/settings_general.php:5
1426
  #: admin/tpl/settings.php:7
1427
  msgid "General"
1428
  msgstr ""
@@ -1435,16 +1528,16 @@ msgstr ""
1435
  msgid "Excludes"
1436
  msgstr ""
1437
 
1438
- #: admin/tpl/network_settings.php:9 admin/tpl/setting/settings_advanced.php:7
1439
- #: admin/tpl/setting/settings_debug.php:65 admin/tpl/settings.php:20
1440
- msgid "Advanced"
1441
  msgstr ""
1442
 
1443
- #: admin/tpl/network_settings.php:10 admin/tpl/settings.php:13
1444
- msgid "Media"
 
1445
  msgstr ""
1446
 
1447
- #: admin/tpl/network_settings.php:20
1448
  msgid "LiteSpeed Cache Network Settings"
1449
  msgstr ""
1450
 
@@ -1490,6 +1583,10 @@ msgid ""
1490
  "support message."
1491
  msgstr ""
1492
 
 
 
 
 
1493
  #: admin/tpl/setting/network_settings_cache.php:4
1494
  msgid "Cache Control Network Settings"
1495
  msgstr ""
@@ -1558,369 +1655,287 @@ msgstr ""
1558
  msgid "Purge Network Settings"
1559
  msgstr ""
1560
 
1561
- #: admin/tpl/setting/settings_advanced.php:10
1562
- msgid "NOTICE:"
1563
- msgstr ""
1564
-
1565
- #: admin/tpl/setting/settings_advanced.php:11
1566
- msgid "These settings are meant for ADVANCED USERS ONLY."
1567
- msgstr ""
1568
-
1569
- #: admin/tpl/setting/settings_advanced.php:16
1570
- msgid "Check Advanced Cache"
1571
- msgstr ""
1572
-
1573
- #: admin/tpl/setting/settings_advanced.php:20
1574
- msgid "Include advanced-cache.php"
1575
  msgstr ""
1576
 
1577
- #: admin/tpl/setting/settings_advanced.php:23
1578
- msgid ""
1579
- "The advanced-cache.php file is used by many caching plugins to signal that a "
1580
- "cache is active."
1581
  msgstr ""
1582
 
1583
- #: admin/tpl/setting/settings_advanced.php:24
1584
- msgid ""
1585
- "When this option is checked and this file is detected as belonging to "
1586
- "another plugin, LiteSpeed Cache will not cache."
1587
  msgstr ""
1588
 
1589
  #: admin/tpl/setting/settings_advanced.php:27
1590
- msgid ""
1591
- "Uncheck this option only if the other plugin is used for non-caching "
1592
- "purposes, such as minifying css/js files."
1593
- msgstr ""
1594
-
1595
- #: admin/tpl/setting/settings_advanced.php:34
1596
- msgid "Login Cookie"
1597
- msgstr ""
1598
-
1599
- #: admin/tpl/setting/settings_advanced.php:40
1600
- msgid "SYNTAX: alphanumeric and \"_\"."
1601
- msgstr ""
1602
-
1603
- #: admin/tpl/setting/settings_advanced.php:41
1604
- msgid "No spaces and case sensitive."
1605
- msgstr ""
1606
-
1607
- #: admin/tpl/setting/settings_advanced.php:42
1608
- msgid "MUST BE UNIQUE FROM OTHER WEB APPLICATIONS."
1609
- msgstr ""
1610
-
1611
- #: admin/tpl/setting/settings_advanced.php:45
1612
- msgid "The default login cookie is %s."
1613
- msgstr ""
1614
-
1615
- #: admin/tpl/setting/settings_advanced.php:46
1616
- msgid ""
1617
- "The server will determine if the user is logged in based on the existance of "
1618
- "this cookie."
1619
- msgstr ""
1620
-
1621
- #: admin/tpl/setting/settings_advanced.php:47
1622
- msgid ""
1623
- "This setting is useful for those that have multiple web applications for the "
1624
- "same domain."
1625
- msgstr ""
1626
-
1627
- #: admin/tpl/setting/settings_advanced.php:48
1628
- msgid ""
1629
- "If every web application uses the same cookie, the server may confuse "
1630
- "whether a user is logged in or not."
1631
- msgstr ""
1632
-
1633
- #: admin/tpl/setting/settings_advanced.php:49
1634
- msgid "The cookie set here will be used for this WordPress installation."
1635
- msgstr ""
1636
-
1637
- #: admin/tpl/setting/settings_advanced.php:52
1638
- msgid "Example use case:"
1639
- msgstr ""
1640
-
1641
- #: admin/tpl/setting/settings_advanced.php:54
1642
- msgid "There is a WordPress installed for %s."
1643
- msgstr ""
1644
-
1645
- #: admin/tpl/setting/settings_advanced.php:56
1646
- msgid "Then another WordPress is installed (NOT MULTISITE) at %s"
1647
  msgstr ""
1648
 
1649
- #: admin/tpl/setting/settings_advanced.php:57
1650
  msgid ""
1651
- "The cache needs to distinguish who is logged into which WordPress site in "
1652
- "order to cache correctly."
1653
- msgstr ""
1654
-
1655
- #: admin/tpl/setting/settings_advanced.php:63
1656
- msgid "Error: invalid login cookie. Please check the %s file"
1657
  msgstr ""
1658
 
1659
- #: admin/tpl/setting/settings_advanced.php:71
1660
- msgid "Error getting current rules from %s: %s"
1661
  msgstr ""
1662
 
1663
- #: admin/tpl/setting/settings_advanced.php:79
1664
  msgid ""
1665
- "WARNING: The .htaccess login cookie and Database login cookie do not match."
 
1666
  msgstr ""
1667
 
1668
- #: admin/tpl/setting/settings_advanced.php:91
1669
- msgid "Improve HTTP/HTTPS Compatibility"
1670
- msgstr ""
1671
-
1672
- #: admin/tpl/setting/settings_advanced.php:95
1673
  msgid ""
1674
- "Enable this option if you are using both HTTP and HTTPS in the same domain "
1675
- "and are noticing cache irregularities."
1676
  msgstr ""
1677
 
1678
- #: admin/tpl/setting/settings_cache.php:4
1679
  msgid "Cache Control Settings"
1680
  msgstr ""
1681
 
1682
- #: admin/tpl/setting/settings_cache.php:8
1683
  msgid "Cache Logged-in Users"
1684
  msgstr ""
1685
 
1686
- #: admin/tpl/setting/settings_cache.php:12
1687
  msgid "Privately cache frontend pages for logged-in users. (LSWS %s required)"
1688
  msgstr ""
1689
 
1690
- #: admin/tpl/setting/settings_cache.php:18
1691
  msgid "Cache Commenters"
1692
  msgstr ""
1693
 
1694
- #: admin/tpl/setting/settings_cache.php:22
1695
  msgid ""
1696
  "Privately cache commenters that have pending comments. Disabling this option "
1697
  "will serve non-cacheable pages to commenters. (LSWS %s required)"
1698
  msgstr ""
1699
 
1700
- #: admin/tpl/setting/settings_cache.php:28
1701
  msgid "Cache REST API"
1702
  msgstr ""
1703
 
1704
- #: admin/tpl/setting/settings_cache.php:32
1705
  msgid "Cache requests made by WordPress REST API calls."
1706
  msgstr ""
1707
 
1708
- #: admin/tpl/setting/settings_cache.php:38
1709
  msgid "Cache Login Page"
1710
  msgstr ""
1711
 
1712
- #: admin/tpl/setting/settings_cache.php:42
1713
  msgid "Disabling this option may negatively affect performance."
1714
  msgstr ""
1715
 
1716
- #: admin/tpl/setting/settings_cache.php:56
1717
  msgid "Private Cached URIs"
1718
  msgstr ""
1719
 
1720
- #: admin/tpl/setting/settings_cache.php:60
1721
  msgid "URI Paths containing these strings will NOT be cached as public."
1722
  msgstr ""
1723
 
1724
- #: admin/tpl/setting/settings_cache.php:61
1725
- #: admin/tpl/setting/settings_excludes.php:13
1726
  msgid "The URLs will be compared to the REQUEST_URI server variable."
1727
  msgstr ""
1728
 
1729
- #: admin/tpl/setting/settings_cache.php:62
1730
- #: admin/tpl/setting/settings_excludes.php:14
1731
- #: admin/tpl/setting/settings_tuning.php:172
1732
  msgid "For example, for %s, %s can be used here."
1733
  msgstr ""
1734
 
1735
- #: admin/tpl/setting/settings_cache.php:65
1736
- #: admin/tpl/setting/settings_excludes.php:17
1737
  msgid "To match the beginning, add %s to the beginning of the item."
1738
  msgstr ""
1739
 
1740
- #: admin/tpl/setting/settings_cache.php:66
1741
- #: admin/tpl/setting/settings_excludes.php:18
1742
  msgid "To do an exact match, add %s to the end of the URL."
1743
  msgstr ""
1744
 
1745
- #: admin/tpl/setting/settings_cache.php:80
1746
  msgid "Drop Query String"
1747
  msgstr ""
1748
 
1749
- #: admin/tpl/setting/settings_cache.php:84
1750
  msgid "Ignore certain query strings when caching."
1751
  msgstr ""
1752
 
1753
- #: admin/tpl/setting/settings_cache.php:85
1754
  msgid "For example, to drop parameters beginning with %s, %s can be used here."
1755
  msgstr ""
1756
 
1757
- #: admin/tpl/setting/settings_cdn.php:23
1758
  msgid "CDN Settings"
1759
  msgstr ""
1760
 
1761
- #: admin/tpl/setting/settings_cdn.php:27
1762
  msgid "Enable CDN"
1763
  msgstr ""
1764
 
1765
- #: admin/tpl/setting/settings_cdn.php:31
1766
  msgid "Enable Content Delivery Network use."
1767
  msgstr ""
1768
 
1769
- #: admin/tpl/setting/settings_cdn.php:37
1770
  msgid "CDN Mapping"
1771
  msgstr ""
1772
 
1773
- #: admin/tpl/setting/settings_cdn.php:43
1774
  msgid "CDN URL"
1775
  msgstr ""
1776
 
1777
- #: admin/tpl/setting/settings_cdn.php:52
1778
  msgid "CDN URL to be used. For example, %s"
1779
  msgstr ""
1780
 
1781
- #: admin/tpl/setting/settings_cdn.php:58 admin/tpl/setting/settings_cdn.php:99
1782
  msgid "Include Images"
1783
  msgstr ""
1784
 
1785
- #: admin/tpl/setting/settings_cdn.php:65
1786
- #: admin/tpl/setting/settings_cdn.php:103
1787
  msgid "Include CSS"
1788
  msgstr ""
1789
 
1790
- #: admin/tpl/setting/settings_cdn.php:72
1791
- #: admin/tpl/setting/settings_cdn.php:107
1792
  msgid "Include JS"
1793
  msgstr ""
1794
 
1795
- #: admin/tpl/setting/settings_cdn.php:82
1796
- #: admin/tpl/setting/settings_cdn.php:111
1797
  msgid "Include File Types"
1798
  msgstr ""
1799
 
1800
- #: admin/tpl/setting/settings_cdn.php:95
1801
  msgid ""
1802
  "If multiple CDN paths are configured with the same settings, the last one "
1803
  "will override the others."
1804
  msgstr ""
1805
 
1806
- #: admin/tpl/setting/settings_cdn.php:100
1807
  msgid ""
1808
  "Serve all image files through the CDN. This will affect all attachments, "
1809
  "HTML %s tags, and CSS %s attributes."
1810
  msgstr ""
1811
 
1812
- #: admin/tpl/setting/settings_cdn.php:104
1813
  msgid ""
1814
  "Serve all CSS files through the CDN. This will affect all enqueued WP CSS "
1815
  "files."
1816
  msgstr ""
1817
 
1818
- #: admin/tpl/setting/settings_cdn.php:108
1819
  msgid ""
1820
  "Serve all JavaScript files through the CDN. This will affect all enqueued WP "
1821
  "JavaScript files."
1822
  msgstr ""
1823
 
1824
- #: admin/tpl/setting/settings_cdn.php:112
1825
  msgid "Static file type links to be replaced by CDN links."
1826
  msgstr ""
1827
 
1828
- #: admin/tpl/setting/settings_cdn.php:114
1829
  msgid "This will affect all tags containing attributes: %s %s %s."
1830
  msgstr ""
1831
 
1832
- #: admin/tpl/setting/settings_cdn.php:115
1833
  msgid "Default value"
1834
  msgstr ""
1835
 
1836
- #: admin/tpl/setting/settings_cdn.php:122
1837
  msgid "Original URL"
1838
  msgstr ""
1839
 
1840
- #: admin/tpl/setting/settings_cdn.php:126
1841
  msgid ""
1842
  "Site URL to be served through the CDN. Beginning with %1$s. For example, "
1843
  "%2$s."
1844
  msgstr ""
1845
 
1846
- #: admin/tpl/setting/settings_cdn.php:127
1847
  msgid ""
1848
  "Wildcard %1$s supported (match zero or more characters). For example, to "
1849
  "match %2$s and %3$s, use %4$s."
1850
  msgstr ""
1851
 
1852
- #: admin/tpl/setting/settings_cdn.php:133
1853
  msgid "Exclude Path"
1854
  msgstr ""
1855
 
1856
- #: admin/tpl/setting/settings_cdn.php:138
1857
  msgid "Paths containing these strings will not be served from the CDN."
1858
  msgstr ""
1859
 
1860
- #: admin/tpl/setting/settings_cdn.php:145
1861
  msgid "Load JQuery Remotely"
1862
  msgstr ""
1863
 
1864
- #: admin/tpl/setting/settings_cdn.php:151
1865
- #: admin/tpl/setting/settings_debug.php:16
1866
  msgid "Off"
1867
  msgstr ""
1868
 
1869
- #: admin/tpl/setting/settings_cdn.php:157
1870
  msgid "Google"
1871
  msgstr ""
1872
 
1873
- #: admin/tpl/setting/settings_cdn.php:163
1874
  msgid "Cdnjs"
1875
  msgstr ""
1876
 
1877
- #: admin/tpl/setting/settings_cdn.php:167
1878
  msgid ""
1879
  "Improve page load time by loading jQuery from a remote CDN service instead "
1880
  "of locally."
1881
  msgstr ""
1882
 
1883
- #: admin/tpl/setting/settings_cdn.php:173
1884
  msgid "Cloudflare API"
1885
  msgstr ""
1886
 
1887
- #: admin/tpl/setting/settings_cdn.php:177
1888
  msgid "Use Cloudflare API functionality."
1889
  msgstr ""
1890
 
1891
- #: admin/tpl/setting/settings_cdn.php:178
1892
  msgid "This can be managed from <a %2$s>%1$s</a>."
1893
  msgstr ""
1894
 
1895
- #: admin/tpl/setting/settings_cdn.php:182
1896
  msgid "Email Address"
1897
  msgstr ""
1898
 
1899
- #: admin/tpl/setting/settings_cdn.php:186
1900
  msgid "Your Email address on Cloudflare."
1901
  msgstr ""
1902
 
1903
- #: admin/tpl/setting/settings_cdn.php:191
1904
  msgid "Global API Key"
1905
  msgstr ""
1906
 
1907
- #: admin/tpl/setting/settings_cdn.php:195
1908
  msgid "Your API key is used to access Cloudflare APIs."
1909
  msgstr ""
1910
 
1911
- #: admin/tpl/setting/settings_cdn.php:196
1912
  msgid "Get it from <a %s>Cloudflare account</a>."
1913
  msgstr ""
1914
 
1915
- #: admin/tpl/setting/settings_cdn.php:201
1916
  msgid "Domain"
1917
  msgstr ""
1918
 
1919
- #: admin/tpl/setting/settings_cdn.php:209
1920
  msgid "You can just type part of the domain."
1921
  msgstr ""
1922
 
1923
- #: admin/tpl/setting/settings_cdn.php:210
1924
  msgid ""
1925
  "Once saved, it will be matched with the current list and completed "
1926
  "automatically."
@@ -1960,52 +1975,62 @@ msgstr ""
1960
  msgid "After purging the cache, the view count should be updating."
1961
  msgstr ""
1962
 
1963
- #: admin/tpl/setting/settings_crawler.php:6
1964
  msgid "Crawler Settings"
1965
  msgstr ""
1966
 
1967
- #: admin/tpl/setting/settings_crawler.php:13
1968
  msgid "microseconds"
1969
  msgstr ""
1970
 
1971
- #: admin/tpl/setting/settings_crawler.php:15
1972
  msgid ""
1973
  "Specify time in microseconds for the delay between requests during a crawl."
1974
  msgstr ""
1975
 
1976
- #: admin/tpl/setting/settings_crawler.php:27
 
 
 
 
 
 
 
 
 
 
1977
  msgid "Specify time in seconds for the duration of the crawl interval."
1978
  msgstr ""
1979
 
1980
- #: admin/tpl/setting/settings_crawler.php:34
1981
  msgid "Interval Between Runs"
1982
  msgstr ""
1983
 
1984
- #: admin/tpl/setting/settings_crawler.php:39
1985
  msgid ""
1986
  "Specify time in seconds for the time between each run interval. Must be "
1987
  "greater than 60."
1988
  msgstr ""
1989
 
1990
- #: admin/tpl/setting/settings_crawler.php:46
1991
  msgid "Crawl Interval"
1992
  msgstr ""
1993
 
1994
- #: admin/tpl/setting/settings_crawler.php:51
1995
  msgid ""
1996
  "Specify how long in seconds before the crawler should initiate crawling the "
1997
  "entire sitemap again."
1998
  msgstr ""
1999
 
2000
- #: admin/tpl/setting/settings_crawler.php:63
2001
  msgid "Specify Number of Threads to use while crawling."
2002
  msgstr ""
2003
 
2004
- #: admin/tpl/setting/settings_crawler.php:70
2005
  msgid "Server Load Limit"
2006
  msgstr ""
2007
 
2008
- #: admin/tpl/setting/settings_crawler.php:75
2009
  msgid ""
2010
  "The maximum average server load allowed while crawling. The number of "
2011
  "crawler threads in use will be actively reduced until average server load "
@@ -2013,216 +2038,229 @@ msgid ""
2013
  "current crawler run will be terminated."
2014
  msgstr ""
2015
 
2016
- #: admin/tpl/setting/settings_crawler.php:83
 
 
 
 
 
 
 
 
2017
  msgid "Site IP"
2018
  msgstr ""
2019
 
2020
- #: admin/tpl/setting/settings_crawler.php:88
2021
  msgid ""
2022
  "Enter this site's IP address to crawl by IP instead of domain name. This "
2023
  "eliminates the overhead of DNS and CDN lookups. (optional)"
2024
  msgstr ""
2025
 
2026
- #: admin/tpl/setting/settings_crawler.php:94
2027
  msgid "Custom Sitemap"
2028
  msgstr ""
2029
 
2030
- #: admin/tpl/setting/settings_crawler.php:99
2031
  msgid ""
2032
  "The crawler can use your Google XML Sitemap instead of its own. Enter the "
2033
  "full URL to your sitemap here."
2034
  msgstr ""
2035
 
2036
- #: admin/tpl/setting/settings_crawler.php:105
2037
  msgid "Include Posts"
2038
  msgstr ""
2039
 
2040
- #: admin/tpl/setting/settings_crawler.php:109
2041
  msgid "Include Posts in crawler sitemap generation."
2042
  msgstr ""
2043
 
2044
- #: admin/tpl/setting/settings_crawler.php:115
2045
  msgid "Include Pages"
2046
  msgstr ""
2047
 
2048
- #: admin/tpl/setting/settings_crawler.php:119
2049
  msgid "Include Pages in crawler sitemap generation."
2050
  msgstr ""
2051
 
2052
- #: admin/tpl/setting/settings_crawler.php:125
2053
  msgid "Include Categories"
2054
  msgstr ""
2055
 
2056
- #: admin/tpl/setting/settings_crawler.php:129
2057
  msgid "Include Categories pages in crawler sitemap generation."
2058
  msgstr ""
2059
 
2060
- #: admin/tpl/setting/settings_crawler.php:135
2061
  msgid "Include Tags"
2062
  msgstr ""
2063
 
2064
- #: admin/tpl/setting/settings_crawler.php:139
2065
  msgid "Include Tags pages in crawler sitemap generation."
2066
  msgstr ""
2067
 
2068
- #: admin/tpl/setting/settings_crawler.php:145
2069
  msgid "Exclude Custom Post Types"
2070
  msgstr ""
2071
 
2072
- #: admin/tpl/setting/settings_crawler.php:150
2073
  msgid ""
2074
  "If you want to exclude certain Custom Post Types in sitemap, add the Custom "
2075
  "Post Types in the box, one per line."
2076
  msgstr ""
2077
 
2078
- #: admin/tpl/setting/settings_crawler.php:154
2079
  msgid "Available Custom Post Type"
2080
  msgstr ""
2081
 
2082
- #: admin/tpl/setting/settings_crawler.php:163
2083
  msgid "Order links by"
2084
  msgstr ""
2085
 
2086
- #: admin/tpl/setting/settings_crawler.php:169
2087
  msgid "Date, descending (Default)"
2088
  msgstr ""
2089
 
2090
- #: admin/tpl/setting/settings_crawler.php:175
2091
  msgid "Date, ascending"
2092
  msgstr ""
2093
 
2094
- #: admin/tpl/setting/settings_crawler.php:181
2095
  msgid "Alphabetical, descending"
2096
  msgstr ""
2097
 
2098
- #: admin/tpl/setting/settings_crawler.php:187
2099
  msgid "Alphabetical, ascending"
2100
  msgstr ""
2101
 
2102
- #: admin/tpl/setting/settings_crawler.php:191
2103
  msgid ""
2104
  "Please choose one of the above options to set the order in which the sitemap "
2105
  "will be parsed."
2106
  msgstr ""
2107
 
2108
- #: admin/tpl/setting/settings_debug.php:6
2109
  msgid "Developer Testing"
2110
  msgstr ""
2111
 
2112
- #: admin/tpl/setting/settings_debug.php:22
2113
  msgid "On"
2114
  msgstr ""
2115
 
2116
- #: admin/tpl/setting/settings_debug.php:28
2117
  msgid "Admin IP only"
2118
  msgstr ""
2119
 
2120
- #: admin/tpl/setting/settings_debug.php:32
2121
  msgid "Outputs to WordPress debug log."
2122
  msgstr ""
2123
 
2124
- #: admin/tpl/setting/settings_debug.php:33
2125
  msgid ""
2126
  "This should be set to off once everything is working to prevent filling the "
2127
  "disk."
2128
  msgstr ""
2129
 
2130
- #: admin/tpl/setting/settings_debug.php:34
2131
  msgid ""
2132
  "The Admin IP option will only output log messages on requests from admin IPs."
2133
  msgstr ""
2134
 
2135
- #: admin/tpl/setting/settings_debug.php:35
2136
  msgid "The logs will be outputted to %s."
2137
  msgstr ""
2138
 
2139
- #: admin/tpl/setting/settings_debug.php:41
2140
  msgid "Admin IPs"
2141
  msgstr ""
2142
 
2143
- #: admin/tpl/setting/settings_debug.php:45
2144
  msgid ""
2145
  "Allows listed IPs (one per line) to perform certain actions from their "
2146
  "browsers."
2147
  msgstr ""
2148
 
2149
- #: admin/tpl/setting/settings_debug.php:46
2150
  msgid ""
2151
  "More information about the available commands can be found <a %s>here</a>."
2152
  msgstr ""
2153
 
2154
- #: admin/tpl/setting/settings_debug.php:53
2155
  msgid "Debug Level"
2156
  msgstr ""
2157
 
2158
- #: admin/tpl/setting/settings_debug.php:59
2159
  msgid "Basic"
2160
  msgstr ""
2161
 
2162
- #: admin/tpl/setting/settings_debug.php:69
2163
  msgid "Advanced level will log more details."
2164
  msgstr ""
2165
 
2166
- #: admin/tpl/setting/settings_debug.php:78
2167
- #: admin/tpl/setting/settings_tuning.php:86
2168
  msgid "MB"
2169
  msgstr ""
2170
 
2171
- #: admin/tpl/setting/settings_debug.php:80
2172
  msgid ""
2173
  "Specify the maximum size of the log file. Minimum is 3MB. Maximum is 3000MB."
2174
  msgstr ""
2175
 
2176
- #: admin/tpl/setting/settings_debug.php:87
2177
  msgid "Heartbeat"
2178
  msgstr ""
2179
 
2180
- #: admin/tpl/setting/settings_debug.php:91
2181
  msgid ""
2182
  "Disable WordPress heartbeat to prevent AJAX calls from breaking debug "
2183
  "logging. WARNING: Disabling this may cause WordPress tasks triggered by AJAX "
2184
  "to stop working."
2185
  msgstr ""
2186
 
2187
- #: admin/tpl/setting/settings_debug.php:97
2188
  msgid "Log Cookies"
2189
  msgstr ""
2190
 
2191
- #: admin/tpl/setting/settings_debug.php:101
2192
  msgid "Log request cookie values."
2193
  msgstr ""
2194
 
2195
- #: admin/tpl/setting/settings_debug.php:107
2196
  msgid "Collapse Query Strings"
2197
  msgstr ""
2198
 
2199
- #: admin/tpl/setting/settings_debug.php:111
2200
  msgid "Shorten query strings in the debug log to improve readability."
2201
  msgstr ""
2202
 
2203
- #: admin/tpl/setting/settings_debug.php:117
2204
  msgid "Log Filters"
2205
  msgstr ""
2206
 
2207
- #: admin/tpl/setting/settings_debug.php:121
2208
  msgid ""
2209
  "Log all WordPress filter hooks. WARNING: Enabling this option will cause log "
2210
  "file size to grow quickly."
2211
  msgstr ""
2212
 
2213
- #: admin/tpl/setting/settings_debug.php:127
2214
  msgid "Exclude Filters"
2215
  msgstr ""
2216
 
2217
- #: admin/tpl/setting/settings_debug.php:131
2218
  msgid "Listed filters (one per line) will not be logged."
2219
  msgstr ""
2220
 
2221
- #: admin/tpl/setting/settings_debug.php:137
2222
- msgid "Exclude Part Filters"
 
2223
  msgstr ""
2224
 
2225
  #: admin/tpl/setting/settings_debug.php:141
 
 
 
 
2226
  msgid "Filters containing these strings (one per line) will not be logged."
2227
  msgstr ""
2228
 
@@ -2289,185 +2327,185 @@ msgid ""
2289
  "etc), while all other user roles see the default public page."
2290
  msgstr ""
2291
 
2292
- #: admin/tpl/setting/settings_excludes.php:4
2293
  msgid "Do Not Cache Settings"
2294
  msgstr ""
2295
 
2296
- #: admin/tpl/setting/settings_excludes.php:8
2297
  msgid "Do Not Cache URIs"
2298
  msgstr ""
2299
 
2300
- #: admin/tpl/setting/settings_excludes.php:12
2301
  msgid "Paths containing these strings will not be cached."
2302
  msgstr ""
2303
 
2304
- #: admin/tpl/setting/settings_excludes.php:26
2305
  msgid "Do Not Cache Query Strings"
2306
  msgstr ""
2307
 
2308
- #: admin/tpl/setting/settings_excludes.php:30
2309
  msgid "Query string containing these parameters will not be cached."
2310
  msgstr ""
2311
 
2312
- #: admin/tpl/setting/settings_excludes.php:31
2313
  msgid "For example, for %s, %s and %s can be used here."
2314
  msgstr ""
2315
 
2316
- #: admin/tpl/setting/settings_excludes.php:40
2317
  msgid "Do Not Cache Categories"
2318
  msgstr ""
2319
 
2320
- #: admin/tpl/setting/settings_excludes.php:53
2321
  msgid "All categories are cached by default."
2322
  msgstr ""
2323
 
2324
- #: admin/tpl/setting/settings_excludes.php:54
2325
- #: admin/tpl/setting/settings_excludes.php:92
2326
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:16
2327
  #: admin/tpl/setting/settings_inc.exclude_useragent.php:15
2328
  msgid "To prevent %s from being cached, enter it here."
2329
  msgstr ""
2330
 
2331
- #: admin/tpl/setting/settings_excludes.php:54
2332
  msgid "categories"
2333
  msgstr ""
2334
 
2335
- #: admin/tpl/setting/settings_excludes.php:62
2336
  msgid ""
2337
  "If the category slug is not found, the category will be removed from the "
2338
  "list on save."
2339
  msgstr ""
2340
 
2341
- #: admin/tpl/setting/settings_excludes.php:63
2342
- #: admin/tpl/setting/settings_excludes.php:101
2343
  msgid "To exclude %1$s, insert %2$s."
2344
  msgstr ""
2345
 
2346
- #: admin/tpl/setting/settings_excludes.php:71
2347
  msgid "Do Not Cache Tags"
2348
  msgstr ""
2349
 
2350
- #: admin/tpl/setting/settings_excludes.php:91
2351
  msgid "All tags are cached by default."
2352
  msgstr ""
2353
 
2354
- #: admin/tpl/setting/settings_excludes.php:92
2355
  msgid "tags"
2356
  msgstr ""
2357
 
2358
- #: admin/tpl/setting/settings_excludes.php:100
2359
  msgid ""
2360
  "If the tag slug is not found, the tag will be removed from the list on save."
2361
  msgstr ""
2362
 
2363
- #: admin/tpl/setting/settings_excludes.php:121
2364
  msgid "Do Not Cache Roles"
2365
  msgstr ""
2366
 
2367
- #: admin/tpl/setting/settings_excludes.php:127
2368
  msgid "Selected roles will be excluded from cache."
2369
  msgstr ""
2370
 
2371
- #: admin/tpl/setting/settings_general.php:9
2372
  msgid "Enable LiteSpeed Cache"
2373
  msgstr ""
2374
 
2375
- #: admin/tpl/setting/settings_general.php:38
2376
  msgid "Use Network Admin Setting"
2377
  msgstr ""
2378
 
2379
- #: admin/tpl/setting/settings_general.php:44
2380
  msgid "Please visit the <a %s>Information</a> page on how to test the cache."
2381
  msgstr ""
2382
 
2383
- #: admin/tpl/setting/settings_general.php:47
2384
- #: admin/tpl/setting/settings_optimize.php:16
2385
  msgid "NOTICE"
2386
  msgstr ""
2387
 
2388
- #: admin/tpl/setting/settings_general.php:47
2389
  msgid ""
2390
  "When disabling the cache, all cached entries for this blog will be purged."
2391
  msgstr ""
2392
 
2393
- #: admin/tpl/setting/settings_general.php:49
2394
  msgid "The network admin setting can be overridden here."
2395
  msgstr ""
2396
 
2397
- #: admin/tpl/setting/settings_general.php:56
2398
  msgid "Default Public Cache TTL"
2399
  msgstr ""
2400
 
2401
- #: admin/tpl/setting/settings_general.php:61
2402
  msgid ""
2403
  "Specify how long, in seconds, public pages are cached. Minimum is 30 seconds."
2404
  msgstr ""
2405
 
2406
- #: admin/tpl/setting/settings_general.php:68
2407
  msgid "Default Private Cache TTL"
2408
  msgstr ""
2409
 
2410
- #: admin/tpl/setting/settings_general.php:73
2411
  msgid ""
2412
  "Specify how long, in seconds, private pages are cached. Minimum is %1$s "
2413
  "seconds. Maximum is %2$s seconds."
2414
  msgstr ""
2415
 
2416
- #: admin/tpl/setting/settings_general.php:80
2417
  msgid "Default Front Page TTL"
2418
  msgstr ""
2419
 
2420
- #: admin/tpl/setting/settings_general.php:85
2421
  msgid ""
2422
  "Specify how long, in seconds, the front page is cached. Minimum is 30 "
2423
  "seconds."
2424
  msgstr ""
2425
 
2426
- #: admin/tpl/setting/settings_general.php:92
2427
  msgid "Default Feed TTL"
2428
  msgstr ""
2429
 
2430
- #: admin/tpl/setting/settings_general.php:97
2431
  msgid "Specify how long, in seconds, feeds are cached."
2432
  msgstr ""
2433
 
2434
- #: admin/tpl/setting/settings_general.php:98
2435
  msgid "If this is set to a number less than 30, feeds will not be cached."
2436
  msgstr ""
2437
 
2438
- #: admin/tpl/setting/settings_general.php:105
2439
  msgid "Default 404 Page TTL"
2440
  msgstr ""
2441
 
2442
- #: admin/tpl/setting/settings_general.php:110
2443
  msgid "Specify how long, in seconds, 404 pages are cached."
2444
  msgstr ""
2445
 
2446
- #: admin/tpl/setting/settings_general.php:111
2447
  msgid "If this is set to a number less than 30, 404 pages will not be cached."
2448
  msgstr ""
2449
 
2450
- #: admin/tpl/setting/settings_general.php:118
2451
  msgid "Default 403 Page TTL"
2452
  msgstr ""
2453
 
2454
- #: admin/tpl/setting/settings_general.php:123
2455
  msgid "Specify how long, in seconds, 403 pages are cached."
2456
  msgstr ""
2457
 
2458
- #: admin/tpl/setting/settings_general.php:124
2459
  msgid "If this is set to a number less than 30, 403 pages will not be cached."
2460
  msgstr ""
2461
 
2462
- #: admin/tpl/setting/settings_general.php:131
2463
  msgid "Default 500 Page TTL"
2464
  msgstr ""
2465
 
2466
- #: admin/tpl/setting/settings_general.php:136
2467
  msgid "Specify how long, in seconds, 500 pages are cached."
2468
  msgstr ""
2469
 
2470
- #: admin/tpl/setting/settings_general.php:137
2471
  msgid "If this is set to a number less than 30, 500 pages will not be cached."
2472
  msgstr ""
2473
 
@@ -2522,6 +2560,7 @@ msgid ""
2522
  msgstr ""
2523
 
2524
  #: admin/tpl/setting/settings_inc.cache_mobile.php:8
 
2525
  msgid "Cache Mobile"
2526
  msgstr ""
2527
 
@@ -2534,6 +2573,7 @@ msgid "A site built with responsive design does not need to check this."
2534
  msgstr ""
2535
 
2536
  #: admin/tpl/setting/settings_inc.cache_mobile.php:25
 
2537
  msgid "List of Mobile User Agents"
2538
  msgstr ""
2539
 
@@ -2561,6 +2601,136 @@ msgstr ""
2561
  msgid "The default list WordPress uses is %s"
2562
  msgstr ""
2563
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2564
  #: admin/tpl/setting/settings_inc.cache_resources.php:7
2565
  msgid "Cache PHP Resources"
2566
  msgstr ""
@@ -2575,6 +2745,32 @@ msgid ""
2575
  "PHP calls."
2576
  msgstr ""
2577
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2578
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:6
2579
  msgid "Do Not Cache Cookies"
2580
  msgstr ""
@@ -2600,6 +2796,79 @@ msgstr ""
2600
  msgid "SYNTAX: Separate each user agent with a bar, %s."
2601
  msgstr ""
2602
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2603
  #: admin/tpl/setting/settings_inc.media_webp.php:6
2604
  msgid "Image WebP Replacement"
2605
  msgstr ""
@@ -2620,550 +2889,555 @@ msgid ""
2620
  "or WordPress core is upgraded."
2621
  msgstr ""
2622
 
2623
- #: admin/tpl/setting/settings_media.php:6
2624
  msgid "Media Settings"
2625
  msgstr ""
2626
 
2627
- #: admin/tpl/setting/settings_media.php:10
2628
  msgid "Lazy Load Images"
2629
  msgstr ""
2630
 
2631
- #: admin/tpl/setting/settings_media.php:14
2632
  msgid "Load images only when they enter the viewport."
2633
  msgstr ""
2634
 
2635
- #: admin/tpl/setting/settings_media.php:15
2636
- #: admin/tpl/setting/settings_media.php:60
2637
  msgid "This can improve page loading time by reducing initial HTTP requests."
2638
  msgstr ""
2639
 
2640
- #: admin/tpl/setting/settings_media.php:17
2641
  msgid "Tip"
2642
  msgstr ""
2643
 
2644
- #: admin/tpl/setting/settings_media.php:18
2645
  msgid "Adding Style to Your Lazy-Loaded Images"
2646
  msgstr ""
2647
 
2648
- #: admin/tpl/setting/settings_media.php:25
2649
  msgid "Lazy Load Image Excludes"
2650
  msgstr ""
2651
 
2652
- #: admin/tpl/setting/settings_media.php:29
2653
  msgid "Listed images will not be lazy loaded."
2654
  msgstr ""
2655
 
2656
- #: admin/tpl/setting/settings_media.php:30
2657
- #: admin/tpl/setting/settings_tuning.php:35
2658
- #: admin/tpl/setting/settings_tuning.php:71
2659
- #: admin/tpl/setting/settings_tuning.php:143
2660
- #: admin/tpl/setting/settings_tuning.php:171
2661
  msgid "Both full URLs and partial strings can be used."
2662
  msgstr ""
2663
 
2664
- #: admin/tpl/setting/settings_media.php:33
2665
- #: admin/tpl/setting/settings_optimize.php:112
2666
- #: admin/tpl/setting/settings_tuning.php:22
2667
- #: admin/tpl/setting/settings_tuning.php:38
2668
- #: admin/tpl/setting/settings_tuning.php:58
2669
- #: admin/tpl/setting/settings_tuning.php:74
2670
- #: admin/tpl/setting/settings_tuning.php:146
2671
  msgid "API:"
2672
  msgstr ""
2673
 
2674
- #: admin/tpl/setting/settings_media.php:34
2675
- #: admin/tpl/setting/settings_tuning.php:39
2676
- #: admin/tpl/setting/settings_tuning.php:75
2677
- #: admin/tpl/setting/settings_tuning.php:147
2678
  msgid "Filter %s is supported."
2679
  msgstr ""
2680
 
2681
- #: admin/tpl/setting/settings_media.php:35
2682
- #: admin/tpl/setting/settings_optimize.php:113
2683
- #: admin/tpl/setting/settings_tuning.php:40
2684
- #: admin/tpl/setting/settings_tuning.php:76
2685
- #: admin/tpl/setting/settings_tuning.php:148
2686
  msgid "Elements with attribute %s in html code will be excluded."
2687
  msgstr ""
2688
 
2689
- #: admin/tpl/setting/settings_media.php:42
2690
  msgid "Lazy Load Image Placeholder"
2691
  msgstr ""
2692
 
2693
- #: admin/tpl/setting/settings_media.php:46
2694
  msgid ""
2695
  "Specify a base64 image to be used as a placeholder while other images finish "
2696
  "loading."
2697
  msgstr ""
2698
 
2699
- #: admin/tpl/setting/settings_media.php:47
2700
  msgid ""
2701
  "This can be predefined in %2$s as well using constant %1$s, with this "
2702
  "setting taking priority."
2703
  msgstr ""
2704
 
2705
- #: admin/tpl/setting/settings_media.php:48
2706
  msgid "By default a gray image placeholder %s will be used."
2707
  msgstr ""
2708
 
2709
- #: admin/tpl/setting/settings_media.php:49
2710
  msgid "For example, %s can be used for a transparent placeholder."
2711
  msgstr ""
2712
 
2713
- #: admin/tpl/setting/settings_media.php:55
2714
  msgid "Lazy Load Iframes"
2715
  msgstr ""
2716
 
2717
- #: admin/tpl/setting/settings_media.php:59
2718
  msgid "Load iframes only when they enter the viewport."
2719
  msgstr ""
2720
 
2721
- #: admin/tpl/setting/settings_media.php:66
2722
  msgid "Disable Optimization Pull"
2723
  msgstr ""
2724
 
2725
- #: admin/tpl/setting/settings_media.php:70
2726
  msgid ""
2727
  "Set this option to %s to disable the cron job responsible for fetching "
2728
  "optimized images from LiteSpeed's Image Server."
2729
  msgstr ""
2730
 
2731
- #: admin/tpl/setting/settings_media.php:84
2732
  msgid "Only Request WebP"
2733
  msgstr ""
2734
 
2735
- #: admin/tpl/setting/settings_media.php:88
2736
  msgid ""
2737
  "Prevent images from being replaced with optimized versions when optimizing. "
2738
  "WebP versions will still be generated."
2739
  msgstr ""
2740
 
2741
- #: admin/tpl/setting/settings_media.php:94
2742
  msgid "Preserve EXIF data"
2743
  msgstr ""
2744
 
2745
- #: admin/tpl/setting/settings_media.php:98
2746
  msgid ""
2747
  "Preserve EXIF data (copyright, GPS, comments, keywords, etc) when optimizing."
2748
  msgstr ""
2749
 
2750
- #: admin/tpl/setting/settings_media.php:99
2751
  msgid "This will increase the size of optimized files."
2752
  msgstr ""
2753
 
2754
- #: admin/tpl/setting/settings_media.php:105
2755
  msgid "WebP Lossless Compression"
2756
  msgstr ""
2757
 
2758
- #: admin/tpl/setting/settings_media.php:109
2759
  msgid "Generate WebP images using lossless compression."
2760
  msgstr ""
2761
 
2762
- #: admin/tpl/setting/settings_media.php:110
2763
  msgid "This can improve quality at the cost of larger images."
2764
  msgstr ""
2765
 
2766
- #: admin/tpl/setting/settings_optimize.php:6
2767
  msgid "Optimization Settings"
2768
  msgstr ""
2769
 
2770
- #: admin/tpl/setting/settings_optimize.php:11
2771
  msgid ""
2772
  "Failed to create Optimizer table. Please follow <a %s>Table Creation "
2773
  "guidance from LiteSpeed Wiki</a> to finish setup."
2774
  msgstr ""
2775
 
2776
- #: admin/tpl/setting/settings_optimize.php:17
2777
  msgid ""
2778
  "Please test thoroughly when enabling any option in this list. After changing "
2779
  "Minify/Combine settings, please do a Purge All action."
2780
  msgstr ""
2781
 
2782
- #: admin/tpl/setting/settings_optimize.php:23
2783
  msgid "CSS Minify"
2784
  msgstr ""
2785
 
2786
- #: admin/tpl/setting/settings_optimize.php:27
2787
  msgid "Minify CSS files."
2788
  msgstr ""
2789
 
2790
- #: admin/tpl/setting/settings_optimize.php:33
2791
  msgid "CSS Combine"
2792
  msgstr ""
2793
 
2794
- #: admin/tpl/setting/settings_optimize.php:37
2795
  msgid "Combine CSS files."
2796
  msgstr ""
2797
 
2798
- #: admin/tpl/setting/settings_optimize.php:43
2799
- msgid "CSS HTTP/2 Push"
 
2800
  msgstr ""
2801
 
2802
  #: admin/tpl/setting/settings_optimize.php:47
 
 
 
 
2803
  msgid ""
2804
  "Pre-send internal CSS files to the browser before they are requested. "
2805
  "(Requires the HTTP/2 protocol)"
2806
  msgstr ""
2807
 
2808
- #: admin/tpl/setting/settings_optimize.php:53
2809
  msgid "JS Minify"
2810
  msgstr ""
2811
 
2812
- #: admin/tpl/setting/settings_optimize.php:57
2813
  msgid "Minify JS files."
2814
  msgstr ""
2815
 
2816
- #: admin/tpl/setting/settings_optimize.php:67
2817
  msgid "Combine JS files."
2818
  msgstr ""
2819
 
2820
- #: admin/tpl/setting/settings_optimize.php:73
2821
  msgid "JS HTTP/2 Push"
2822
  msgstr ""
2823
 
2824
- #: admin/tpl/setting/settings_optimize.php:77
2825
  msgid ""
2826
  "Pre-send internal JS files to the browser before they are requested. "
2827
  "(Requires the HTTP/2 protocol)"
2828
  msgstr ""
2829
 
2830
- #: admin/tpl/setting/settings_optimize.php:83
2831
  msgid "CSS/JS Cache TTL"
2832
  msgstr ""
2833
 
2834
- #: admin/tpl/setting/settings_optimize.php:88
2835
  msgid ""
2836
  "Specify how long, in seconds, CSS/JS files are cached. Minimum is %1$s "
2837
  "seconds."
2838
  msgstr ""
2839
 
2840
- #: admin/tpl/setting/settings_optimize.php:95
2841
  msgid "HTML Minify"
2842
  msgstr ""
2843
 
2844
- #: admin/tpl/setting/settings_optimize.php:99
2845
  msgid "Minify HTML content."
2846
  msgstr ""
2847
 
2848
- #: admin/tpl/setting/settings_optimize.php:105
2849
- #: admin/tpl/setting/settings_tuning.php:132
2850
  msgid "Load CSS Asynchronously"
2851
  msgstr ""
2852
 
2853
- #: admin/tpl/setting/settings_optimize.php:109
2854
  msgid "Optimize CSS delivery. This will load Google Fonts asynchronously too."
2855
  msgstr ""
2856
 
2857
- #: admin/tpl/setting/settings_optimize.php:110
2858
- #: admin/tpl/setting/settings_optimize.php:125
2859
- #: admin/tpl/setting/settings_optimize.php:163
2860
- #: admin/tpl/setting/settings_tuning.php:101
2861
- #: admin/tpl/setting/settings_tuning.php:160
2862
  msgid ""
2863
  "This can improve your speed score in services like Pingdom, GTmetrix and "
2864
  "PageSpeed."
2865
  msgstr ""
2866
 
2867
- #: admin/tpl/setting/settings_optimize.php:120
2868
  msgid "Load JS Deferred"
2869
  msgstr ""
2870
 
2871
- #: admin/tpl/setting/settings_optimize.php:124
2872
  msgid "Doing so can help reduce resource contention and improve performance."
2873
  msgstr ""
2874
 
2875
- #: admin/tpl/setting/settings_optimize.php:131
2876
  msgid "Exclude JQuery"
2877
  msgstr ""
2878
 
2879
- #: admin/tpl/setting/settings_optimize.php:135
2880
  msgid ""
2881
  "Improve compatibility with inline JS by preventing jQuery optimization. "
2882
  "(Recommended Setting: %s)"
2883
  msgstr ""
2884
 
2885
- #: admin/tpl/setting/settings_optimize.php:138
2886
  msgid ""
2887
  "If there is any JS error related to %1$s when enabled %2$s, please try this "
2888
  "option."
2889
  msgstr ""
2890
 
2891
- #: admin/tpl/setting/settings_optimize.php:145
2892
  msgid "DNS Prefetch"
2893
  msgstr ""
2894
 
2895
- #: admin/tpl/setting/settings_optimize.php:149
2896
  msgid "Prefetching DNS can reduce latency for visiters."
2897
  msgstr ""
2898
 
2899
- #: admin/tpl/setting/settings_optimize.php:150
2900
  msgid "For example"
2901
  msgstr ""
2902
 
2903
- #: admin/tpl/setting/settings_optimize.php:158
2904
  msgid "Remove Comments"
2905
  msgstr ""
2906
 
2907
- #: admin/tpl/setting/settings_optimize.php:162
2908
  msgid "Remove the comments inside of JS/CSS files when minifying."
2909
  msgstr ""
2910
 
2911
- #: admin/tpl/setting/settings_purge.php:5
2912
  msgid "Purge Settings"
2913
  msgstr ""
2914
 
2915
- #: admin/tpl/setting/settings_purge.php:10
2916
  msgid "All pages"
2917
  msgstr ""
2918
 
2919
- #: admin/tpl/setting/settings_purge.php:11
2920
  msgid "Front page"
2921
  msgstr ""
2922
 
2923
- #: admin/tpl/setting/settings_purge.php:12
2924
  msgid "Home page"
2925
  msgstr ""
2926
 
2927
- #: admin/tpl/setting/settings_purge.php:13
2928
  msgid "Pages"
2929
  msgstr ""
2930
 
2931
- #: admin/tpl/setting/settings_purge.php:15
2932
  msgid "All pages with Recent Posts Widget"
2933
  msgstr ""
2934
 
2935
- #: admin/tpl/setting/settings_purge.php:17
2936
  msgid "Author archive"
2937
  msgstr ""
2938
 
2939
- #: admin/tpl/setting/settings_purge.php:18
2940
  msgid "Post type archive"
2941
  msgstr ""
2942
 
2943
- #: admin/tpl/setting/settings_purge.php:20
2944
  msgid "Yearly archive"
2945
  msgstr ""
2946
 
2947
- #: admin/tpl/setting/settings_purge.php:21
2948
  msgid "Monthly archive"
2949
  msgstr ""
2950
 
2951
- #: admin/tpl/setting/settings_purge.php:22
2952
  msgid "Daily archive"
2953
  msgstr ""
2954
 
2955
- #: admin/tpl/setting/settings_purge.php:24
2956
  msgid "Term archive (include category, tag, and tax)"
2957
  msgstr ""
2958
 
2959
- #: admin/tpl/setting/settings_purge.php:44
2960
  msgid "Auto Purge Rules For Publish/Update"
2961
  msgstr ""
2962
 
2963
- #: admin/tpl/setting/settings_purge.php:47
2964
  #: thirdparty/lscwp-3rd-woocommerce.cls.php:858
2965
  msgid "Note:"
2966
  msgstr ""
2967
 
2968
- #: admin/tpl/setting/settings_purge.php:49
2969
  msgid ""
2970
  "Select \"All\" if there are dynamic widgets linked to posts on pages other "
2971
  "than the front or home pages."
2972
  msgstr ""
2973
 
2974
- #: admin/tpl/setting/settings_purge.php:50
2975
  msgid "Other checkboxes will be ignored."
2976
  msgstr ""
2977
 
2978
- #: admin/tpl/setting/settings_purge.php:51
2979
  msgid ""
2980
  "Select only the archive types that are currently used, the others can be "
2981
  "left unchecked."
2982
  msgstr ""
2983
 
2984
- #: admin/tpl/setting/settings_purge.php:67
2985
  msgid ""
2986
  "Select which pages will be automatically purged when posts are published/"
2987
  "updated."
2988
  msgstr ""
2989
 
2990
- #: admin/tpl/setting/settings_purge.php:73
2991
- #: admin/tpl/setting/settings_purge.php:90
2992
  msgid "Scheduled Purge URLs"
2993
  msgstr ""
2994
 
2995
- #: admin/tpl/setting/settings_purge.php:77
2996
  msgid ""
2997
  "The URLs here (one per line) will be purged automatically at the time set in "
2998
  "the option \"%s\"."
2999
  msgstr ""
3000
 
3001
- #: admin/tpl/setting/settings_purge.php:77
3002
- #: admin/tpl/setting/settings_purge.php:85
3003
  msgid "Scheduled Purge Time"
3004
  msgstr ""
3005
 
3006
- #: admin/tpl/setting/settings_purge.php:78
3007
  msgid "Both %1$s and %2$s are acceptable."
3008
  msgstr ""
3009
 
3010
- #: admin/tpl/setting/settings_purge.php:90
3011
  msgid "Specify the time to purge the \"%s\" list."
3012
  msgstr ""
3013
 
3014
- #: admin/tpl/setting/settings_purge.php:91
3015
  msgid "Current server time is %s."
3016
  msgstr ""
3017
 
3018
- #: admin/tpl/setting/settings_tuning.php:6
3019
  msgid "Tuning Settings"
3020
  msgstr ""
3021
 
3022
- #: admin/tpl/setting/settings_tuning.php:11
3023
  msgid "Combined CSS Priority"
3024
  msgstr ""
3025
 
3026
- #: admin/tpl/setting/settings_tuning.php:15
3027
  msgid "Load combined CSS files before other CSS files."
3028
  msgstr ""
3029
 
3030
- #: admin/tpl/setting/settings_tuning.php:16
3031
- #: admin/tpl/setting/settings_tuning.php:52
3032
  msgid "Set to %s by default."
3033
  msgstr ""
3034
 
3035
- #: admin/tpl/setting/settings_tuning.php:19
3036
  msgid ""
3037
  "Only set to %s when changing the order of combined and uncombined CSS is "
3038
  "needed."
3039
  msgstr ""
3040
 
3041
- #: admin/tpl/setting/settings_tuning.php:23
3042
  msgid ""
3043
  "Elements with attribute %s in html code will be excluded from moving to top."
3044
  msgstr ""
3045
 
3046
- #: admin/tpl/setting/settings_tuning.php:30
3047
  msgid "CSS Excludes"
3048
  msgstr ""
3049
 
3050
- #: admin/tpl/setting/settings_tuning.php:34
3051
  msgid "Listed CSS files will not be minified/combined."
3052
  msgstr ""
3053
 
3054
- #: admin/tpl/setting/settings_tuning.php:47
3055
  msgid "Combined JS Priority"
3056
  msgstr ""
3057
 
3058
- #: admin/tpl/setting/settings_tuning.php:51
3059
  msgid "Load combined JS files before other JS files."
3060
  msgstr ""
3061
 
3062
- #: admin/tpl/setting/settings_tuning.php:55
3063
  msgid ""
3064
  "Only set to %s when changing the order of combined and uncombined JS is "
3065
  "needed."
3066
  msgstr ""
3067
 
3068
- #: admin/tpl/setting/settings_tuning.php:59
3069
  msgid ""
3070
  "Elements with attribute %s in html code will be excluded from moving to top/"
3071
  "bottom."
3072
  msgstr ""
3073
 
3074
- #: admin/tpl/setting/settings_tuning.php:66
3075
  msgid "JS Excludes"
3076
  msgstr ""
3077
 
3078
- #: admin/tpl/setting/settings_tuning.php:70
3079
  msgid "Listed JS files will not be minified/combined."
3080
  msgstr ""
3081
 
3082
- #: admin/tpl/setting/settings_tuning.php:83
3083
  msgid "Max Combined File Size"
3084
  msgstr ""
3085
 
3086
- #: admin/tpl/setting/settings_tuning.php:88
3087
  msgid "Specify the maximum size in megabytes for combined files."
3088
  msgstr ""
3089
 
3090
- #: admin/tpl/setting/settings_tuning.php:89
3091
  msgid ""
3092
  "Larger numbers will generate fewer files, which is better for achieving "
3093
  "higher page scores, but can cause heavy memory usage."
3094
  msgstr ""
3095
 
3096
- #: admin/tpl/setting/settings_tuning.php:96
3097
  msgid "Remove Query Strings"
3098
  msgstr ""
3099
 
3100
- #: admin/tpl/setting/settings_tuning.php:100
3101
  msgid "Remove query strings from static resources."
3102
  msgstr ""
3103
 
3104
- #: admin/tpl/setting/settings_tuning.php:107
3105
  msgid "Load Google Fonts Asynchronously"
3106
  msgstr ""
3107
 
3108
- #: admin/tpl/setting/settings_tuning.php:111
3109
  msgid ""
3110
  "This is useful if you only want to load Google Fonts asynchronously while "
3111
  "leave other CSS intact."
3112
  msgstr ""
3113
 
3114
- #: admin/tpl/setting/settings_tuning.php:112
3115
  msgid ""
3116
  "This will also add a preconnect to Google for faster Google Fonts "
3117
  "downloading."
3118
  msgstr ""
3119
 
3120
- #: admin/tpl/setting/settings_tuning.php:118
3121
  msgid "Remove Google Fonts"
3122
  msgstr ""
3123
 
3124
- #: admin/tpl/setting/settings_tuning.php:122
3125
  msgid "Prevent google fonts from loading on all your pages."
3126
  msgstr ""
3127
 
3128
- #: admin/tpl/setting/settings_tuning.php:128
3129
  msgid "Critical CSS Rules"
3130
  msgstr ""
3131
 
3132
- #: admin/tpl/setting/settings_tuning.php:132
3133
  msgid "Specify critical CSS rules for above-the-fold content when enabling %s."
3134
  msgstr ""
3135
 
3136
- #: admin/tpl/setting/settings_tuning.php:138
3137
  msgid "JS Deferred Excludes"
3138
  msgstr ""
3139
 
3140
- #: admin/tpl/setting/settings_tuning.php:142
3141
  msgid "Listed JS files will not be deferred."
3142
  msgstr ""
3143
 
3144
- #: admin/tpl/setting/settings_tuning.php:155
3145
  msgid "Remove WordPress Emoji"
3146
  msgstr ""
3147
 
3148
- #: admin/tpl/setting/settings_tuning.php:159
3149
  msgid ""
3150
  "Stop loading wordpress.org emoji. Browser default emoji will be displayed "
3151
  "instead."
3152
  msgstr ""
3153
 
3154
- #: admin/tpl/setting/settings_tuning.php:166
3155
  msgid "URI Excludes"
3156
  msgstr ""
3157
 
3158
- #: admin/tpl/setting/settings_tuning.php:170
3159
  msgid "Prevent any optimization of listed pages."
3160
  msgstr ""
3161
 
3162
- #: admin/tpl/setting/settings_tuning.php:179
3163
  msgid "Role Excludes"
3164
  msgstr ""
3165
 
3166
- #: admin/tpl/setting/settings_tuning.php:185
3167
  msgid "Selected roles will be excluded from all optimizations."
3168
  msgstr ""
3169
 
@@ -3175,41 +3449,41 @@ msgstr ""
3175
  msgid "Tuning"
3176
  msgstr ""
3177
 
3178
- #: admin/tpl/settings.php:17
3179
  msgid "ESI"
3180
  msgstr ""
3181
 
3182
- #: admin/tpl/settings.php:23
3183
  msgid "Debug"
3184
  msgstr ""
3185
 
3186
- #: admin/tpl/settings.php:26
3187
  msgid "Compatibilities"
3188
  msgstr ""
3189
 
3190
- #: admin/tpl/settings.php:66
3191
- msgid "WARNING: Third party tab input invalid."
3192
  msgstr ""
3193
 
3194
- #: admin/tpl/settings.php:73
3195
- msgid "WARNING: Third party config slug contains invalid characters."
3196
  msgstr ""
3197
 
3198
- #: admin/tpl/settings.php:102
3199
- msgid "LiteSpeed Cache Settings"
3200
  msgstr ""
3201
 
3202
- #: admin/tpl/settings.php:132
3203
  msgid "The network admin selected use primary site configs for all subsites."
3204
  msgstr ""
3205
 
3206
- #: admin/tpl/settings.php:133
3207
  msgid ""
3208
  "The following options are selected, but are not editable in this settings "
3209
  "page."
3210
  msgstr ""
3211
 
3212
- #: admin/tpl/settings.php:155 admin/tpl/settings.php:158
3213
  msgid "Save Changes"
3214
  msgstr ""
3215
 
@@ -3245,11 +3519,11 @@ msgstr ""
3245
  msgid "No available Cloudflare zone"
3246
  msgstr ""
3247
 
3248
- #: inc/cdn.class.php:743 includes/litespeed-cache-cdn.class.php:743
3249
  msgid "Communicated with Cloudflare successfully."
3250
  msgstr ""
3251
 
3252
- #: inc/cdn.class.php:752 includes/litespeed-cache-cdn.class.php:752
3253
  msgid "Failed to communicate with Cloudflare"
3254
  msgstr ""
3255
 
@@ -3261,84 +3535,92 @@ msgstr ""
3261
  msgid "File saved successfully: %s"
3262
  msgstr ""
3263
 
3264
- #: inc/crawler.class.php:176 includes/litespeed-cache-crawler.class.php:176
3265
  msgid "File created successfully: %s"
3266
  msgstr ""
3267
 
3268
- #: inc/crawler.class.php:324 includes/litespeed-cache-crawler.class.php:324
3269
  msgid "Failed to send position reset notification: %s"
3270
  msgstr ""
3271
 
3272
- #: inc/crawler.class.php:328 includes/litespeed-cache-crawler.class.php:328
3273
  msgid "Position reset notification sent successfully"
3274
  msgstr ""
3275
 
3276
- #: inc/crawler.class.php:411 includes/litespeed-cache-crawler.class.php:411
3277
  #: lib/litespeed/litespeed-crawler.class.php:327
3278
  msgid "Reached end of sitemap file. Crawling completed."
3279
  msgstr ""
3280
 
3281
- #: inc/gui.class.php:187 includes/litespeed-cache-gui.class.php:187
3282
  msgid "Purge this page"
3283
  msgstr ""
3284
 
3285
- #: inc/gui.class.php:195 includes/litespeed-cache-gui.class.php:195
3286
  msgid "Mark this page as "
3287
  msgstr ""
3288
 
3289
- #: inc/gui.class.php:202 includes/litespeed-cache-gui.class.php:202
3290
  msgid "Non cacheable"
3291
  msgstr ""
3292
 
3293
- #: inc/gui.class.php:209 includes/litespeed-cache-gui.class.php:209
3294
  msgid "Private cache"
3295
  msgstr ""
3296
 
3297
- #: inc/gui.class.php:216 includes/litespeed-cache-gui.class.php:216
3298
  msgid "No optimization"
3299
  msgstr ""
3300
 
3301
- #: inc/gui.class.php:223 includes/litespeed-cache-gui.class.php:223
3302
  msgid "More settings"
3303
  msgstr ""
3304
 
3305
- #: inc/gui.class.php:242 includes/litespeed-cache-gui.class.php:242
3306
  msgid "LiteSpeed Cache Purge All"
3307
  msgstr ""
3308
 
3309
- #: inc/gui.class.php:277 includes/litespeed-cache-gui.class.php:277
3310
  msgid "Cloudflare Purge All"
3311
  msgstr ""
3312
 
3313
- #: inc/litespeed-cache.class.php:241 includes/litespeed-cache.class.php:241
 
 
 
 
 
 
 
 
3314
  msgid "Crawler blacklist is saved."
3315
  msgstr ""
3316
 
3317
- #: inc/litespeed-cache.class.php:246 includes/litespeed-cache.class.php:246
3318
  msgid "Notified LiteSpeed Web Server to purge the front page."
3319
  msgstr ""
3320
 
3321
- #: inc/litespeed-cache.class.php:251 includes/litespeed-cache.class.php:251
3322
  msgid "Notified LiteSpeed Web Server to purge pages."
3323
  msgstr ""
3324
 
3325
- #: inc/litespeed-cache.class.php:256 includes/litespeed-cache.class.php:256
3326
  msgid "Notified LiteSpeed Web Server to purge CSS/JS entries."
3327
  msgstr ""
3328
 
3329
- #: inc/litespeed-cache.class.php:261 includes/litespeed-cache.class.php:261
3330
  msgid "Notified LiteSpeed Web Server to purge error pages."
3331
  msgstr ""
3332
 
3333
- #: inc/litespeed-cache.class.php:267 includes/litespeed-cache.class.php:267
3334
  msgid "Notified LiteSpeed Web Server to purge all caches."
3335
  msgstr ""
3336
 
3337
- #: inc/litespeed-cache.class.php:274 includes/litespeed-cache.class.php:274
3338
  msgid "Notified LiteSpeed Web Server to purge everything."
3339
  msgstr ""
3340
 
3341
- #: inc/litespeed-cache.class.php:289 includes/litespeed-cache.class.php:289
3342
  msgid "Notified LiteSpeed Web Server to purge the list."
3343
  msgstr ""
3344
 
@@ -3420,19 +3702,35 @@ msgstr ""
3420
  msgid "Post data is empty."
3421
  msgstr ""
3422
 
3423
- #: inc/purge.class.php:208 includes/litespeed-cache-purge.class.php:208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3424
  msgid "Purge category %s"
3425
  msgstr ""
3426
 
3427
- #: inc/purge.class.php:235 includes/litespeed-cache-purge.class.php:235
3428
  msgid "Purge Post ID %s"
3429
  msgstr ""
3430
 
3431
- #: inc/purge.class.php:264 includes/litespeed-cache-purge.class.php:264
3432
  msgid "Purge tag %s"
3433
  msgstr ""
3434
 
3435
- #: inc/purge.class.php:298 includes/litespeed-cache-purge.class.php:298
3436
  msgid "Purge url %s"
3437
  msgstr ""
3438
 
@@ -3440,7 +3738,7 @@ msgstr ""
3440
  msgid "LiteSpeed Cache Custom Cron ImgOptm"
3441
  msgstr ""
3442
 
3443
- #: inc/task.class.php:178 includes/litespeed-cache-task.class.php:178
3444
  msgid "LiteSpeed Cache Custom Cron Crawler"
3445
  msgstr ""
3446
 
2
  # This file is distributed under the same license as the LiteSpeed Cache package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: LiteSpeed Cache 1.8.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
+ "POT-Creation-Date: 2018-02-02 15:01:16+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
28
  msgid "Message from LiteSpeed image server"
29
  msgstr ""
30
 
31
+ #: admin/litespeed-cache-admin-display.class.php:143
32
+ #: admin/tpl/setting/settings_cdn.php:181 inc/gui.class.php:271
33
+ #: includes/litespeed-cache-gui.class.php:271
34
  msgid "Manage"
35
  msgstr ""
36
 
37
+ #: admin/litespeed-cache-admin-display.class.php:145
38
+ #: admin/litespeed-cache-admin-display.class.php:234 inc/gui.class.php:279
39
+ #: includes/litespeed-cache-gui.class.php:279
40
  msgid "Settings"
41
  msgstr ""
42
 
43
+ #: admin/litespeed-cache-admin-display.class.php:148
44
  msgid "Edit .htaccess"
45
  msgstr ""
46
 
47
+ #: admin/litespeed-cache-admin-display.class.php:152 inc/gui.class.php:288
48
+ #: includes/litespeed-cache-gui.class.php:288
49
  msgid "Image Optimization"
50
  msgstr ""
51
 
52
+ #: admin/litespeed-cache-admin-display.class.php:153 admin/tpl/settings.php:24
53
  msgid "Crawler"
54
  msgstr ""
55
 
56
+ #: admin/litespeed-cache-admin-display.class.php:154
57
  msgid "Report"
58
  msgstr ""
59
 
60
  #: admin/litespeed-cache-admin-display.class.php:155
61
+ msgid "Import / Export"
62
+ msgstr ""
63
+
64
+ #: admin/litespeed-cache-admin-display.class.php:158
65
+ #: admin/tpl/setting/settings_debug.php:13
66
  msgid "Debug Log"
67
  msgstr ""
68
 
69
+ #: admin/litespeed-cache-admin-display.class.php:254
70
  msgid ""
71
  "It is recommended that LiteSpeed Cache be purged after updating a plugin."
72
  msgstr ""
73
 
74
+ #: admin/litespeed-cache-admin-display.class.php:796
75
+ #: admin/litespeed-cache-admin-display.class.php:881
76
+ #: admin/tpl/setting/settings_inc.cache_mobile.php:67
77
+ #: admin/tpl/setting/settings_media.php:73
78
+ #: admin/tpl/setting/settings_optimize.php:140
79
+ #: admin/tpl/setting/settings_tuning.php:21
80
+ #: admin/tpl/setting/settings_tuning.php:57
81
  msgid "ON"
82
  msgstr ""
83
 
84
+ #: admin/litespeed-cache-admin-display.class.php:797
85
+ #: admin/litespeed-cache-admin-display.class.php:885
86
+ #: admin/tpl/setting/settings_inc.cache_object.php:149
87
+ #: admin/tpl/setting/settings_tuning.php:18
88
+ #: admin/tpl/setting/settings_tuning.php:54
89
  msgid "OFF"
90
  msgstr ""
91
 
92
+ #: admin/litespeed-cache-admin-display.class.php:911
93
  msgid "Recommended value: %s"
94
  msgstr ""
95
 
96
+ #: admin/litespeed-cache-admin-display.class.php:927
97
+ msgid "API"
98
+ msgstr ""
99
+
100
+ #: admin/litespeed-cache-admin-display.class.php:928
101
+ msgid "Server variable(s) %s available to override this setting."
102
+ msgstr ""
103
+
104
+ #: admin/litespeed-cache-admin-display.class.php:930
105
+ #: admin/tpl/image_optimization.php:112 admin/tpl/image_optimization.php:151
106
+ #: admin/tpl/manage/manage_cdn.php:60
107
+ #: admin/tpl/setting/settings_advanced.php:10
108
+ #: admin/tpl/setting/settings_advanced.php:32
109
+ #: admin/tpl/setting/settings_advanced.php:44
110
+ #: admin/tpl/setting/settings_cache.php:7
111
+ #: admin/tpl/setting/settings_cache.php:91
112
+ #: admin/tpl/setting/settings_cdn.php:25
113
+ #: admin/tpl/setting/settings_crawler.php:8
114
+ #: admin/tpl/setting/settings_debug.php:8
115
+ #: admin/tpl/setting/settings_excludes.php:7
116
+ #: admin/tpl/setting/settings_general.php:8
117
+ #: admin/tpl/setting/settings_inc.cache_object.php:33
118
+ #: admin/tpl/setting/settings_inc.cache_object.php:75
119
+ #: admin/tpl/setting/settings_inc.cache_object.php:150
120
+ #: admin/tpl/setting/settings_media.php:8
121
+ #: admin/tpl/setting/settings_optimize.php:8
122
+ #: admin/tpl/setting/settings_optimize.php:156
123
+ #: admin/tpl/setting/settings_purge.php:8
124
+ #: admin/tpl/setting/settings_tuning.php:8
125
+ msgid "Learn More"
126
+ msgstr ""
127
+
128
  #: admin/litespeed-cache-admin-error.class.php:87
129
  msgid "The installed PHP version is too old for the LiteSpeed Cache Plugin."
130
  msgstr ""
389
  msgid "Failed to push to LiteSpeed server: %s"
390
  msgstr ""
391
 
392
+ #: admin/litespeed-cache-admin-rules.class.php:688
393
  msgid ""
394
  "<p>Please add/replace the following codes into the beginning of %1$s:</p> "
395
  "%2$s"
396
  msgstr ""
397
 
398
+ #: admin/litespeed-cache-admin-rules.class.php:886
399
  msgid "File Saved."
400
  msgstr ""
401
 
403
  msgid "'Use primary site settings' set by Network Administrator."
404
  msgstr ""
405
 
406
+ #: admin/litespeed-cache-admin-settings.class.php:236
407
  msgid "Site options saved."
408
  msgstr ""
409
 
410
+ #: admin/litespeed-cache-admin-settings.class.php:342
411
+ #: admin/litespeed-cache-admin-settings.class.php:965
412
  msgid "Default Public Cache"
413
  msgstr ""
414
 
415
+ #: admin/litespeed-cache-admin-settings.class.php:343
416
  msgid "Default Private Cache"
417
  msgstr ""
418
 
419
+ #: admin/litespeed-cache-admin-settings.class.php:344
420
  msgid "Default Front Page"
421
  msgstr ""
422
 
423
+ #: admin/litespeed-cache-admin-settings.class.php:345
424
  msgid "Feed"
425
  msgstr ""
426
 
427
+ #: admin/litespeed-cache-admin-settings.class.php:346
428
  msgid "404"
429
  msgstr ""
430
 
431
+ #: admin/litespeed-cache-admin-settings.class.php:347
432
  msgid "403"
433
  msgstr ""
434
 
435
+ #: admin/litespeed-cache-admin-settings.class.php:348
436
  msgid "500"
437
  msgstr ""
438
 
439
+ #: admin/litespeed-cache-admin-settings.class.php:825
440
+ #: admin/tpl/setting/settings_debug.php:78
441
  msgid "Log File Size Limit"
442
  msgstr ""
443
 
444
+ #: admin/litespeed-cache-admin-settings.class.php:891
445
+ #: admin/tpl/setting/settings_crawler.php:13
446
  msgid "Delay"
447
  msgstr ""
448
 
449
+ #: admin/litespeed-cache-admin-settings.class.php:892
450
+ #: admin/tpl/setting/settings_crawler.php:37
451
  msgid "Run Duration"
452
  msgstr ""
453
 
454
+ #: admin/litespeed-cache-admin-settings.class.php:893
455
  msgid "Cron Interval"
456
  msgstr ""
457
 
458
+ #: admin/litespeed-cache-admin-settings.class.php:894
459
  msgid "Whole Interval"
460
  msgstr ""
461
 
462
+ #: admin/litespeed-cache-admin-settings.class.php:895
463
+ #: admin/tpl/setting/settings_crawler.php:73
464
  msgid "Threads"
465
  msgstr ""
466
 
467
+ #: admin/litespeed-cache-admin.class.php:210
468
  msgid ""
469
  "For this scenario only, the network admin may uncheck \"Check Advanced Cache"
470
  "\" in LiteSpeed Cache settings."
471
  msgstr ""
472
 
473
+ #: admin/litespeed-cache-admin.class.php:212
474
  msgid ""
475
  "For this scenario only, please uncheck \"Check Advanced Cache\" in LiteSpeed "
476
  "Cache settings."
477
  msgstr ""
478
 
479
+ #: admin/litespeed-cache-admin.class.php:214
480
  msgid ""
481
  "Please disable/deactivate any other Full Page Cache solutions that are "
482
  "currently being used."
483
  msgstr ""
484
 
485
+ #: admin/litespeed-cache-admin.class.php:215
486
  msgid ""
487
  "LiteSpeed Cache does work with other cache solutions, but only their non-"
488
  "page caching offerings—such as minifying css/js files."
530
  msgstr ""
531
 
532
  #: admin/tpl/crawler.php:67 admin/tpl/manage/manage_cdn.php:15
533
+ #: admin/tpl/setting/settings_optimize.php:13 admin/tpl/settings.php:161
534
  msgid "WARNING"
535
  msgstr ""
536
 
581
  msgid "Is running"
582
  msgstr ""
583
 
584
+ #: admin/tpl/crawler.php:134 admin/tpl/setting/settings_general.php:34
585
  msgid "Enable"
586
  msgstr ""
587
 
588
  #: admin/tpl/crawler.php:134 admin/tpl/esi_widget_edit.php:56
589
+ #: admin/tpl/setting/settings_general.php:28
590
  msgid "Disable"
591
  msgstr ""
592
 
718
  msgid "Widget Cache TTL:"
719
  msgstr ""
720
 
721
+ #: admin/tpl/esi_widget_edit.php:69 admin/tpl/setting/settings_crawler.php:40
722
+ #: admin/tpl/setting/settings_crawler.php:52
723
+ #: admin/tpl/setting/settings_crawler.php:64
724
+ #: admin/tpl/setting/settings_general.php:63
725
+ #: admin/tpl/setting/settings_general.php:75
726
+ #: admin/tpl/setting/settings_general.php:87
727
+ #: admin/tpl/setting/settings_general.php:99
728
+ #: admin/tpl/setting/settings_general.php:112
729
+ #: admin/tpl/setting/settings_general.php:125
730
+ #: admin/tpl/setting/settings_general.php:138
731
  #: admin/tpl/setting/settings_inc.cache_browser.php:24
732
+ #: admin/tpl/setting/settings_inc.cache_object.php:63
733
+ #: admin/tpl/setting/settings_optimize.php:91
734
  msgid "seconds"
735
  msgstr ""
736
 
820
  msgid "Please press the %s button before sending a new request."
821
  msgstr ""
822
 
 
 
 
 
 
 
 
 
823
  #: admin/tpl/image_optimization.php:118
824
  msgid ""
825
  "This will send the optimization request and the images to LiteSpeed's Image "
932
  "optimizations, and delete all optimization files."
933
  msgstr ""
934
 
935
+ #: admin/tpl/image_optimization.php:207
936
+ #: admin/tpl/setting/settings_advanced.php:46
937
+ #: admin/tpl/setting/settings_cdn.php:97
938
+ #: admin/tpl/setting/settings_excludes.php:63
939
+ #: admin/tpl/setting/settings_excludes.php:101
940
  #: admin/tpl/setting/settings_inc.cache_browser.php:12
941
  #: admin/tpl/setting/settings_inc.cache_favicon.php:13
942
  #: admin/tpl/setting/settings_inc.cache_mobile.php:17
943
+ #: admin/tpl/setting/settings_inc.cache_mobile.php:66
944
  #: admin/tpl/setting/settings_inc.cache_resources.php:14
945
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:22
946
  #: admin/tpl/setting/settings_inc.exclude_useragent.php:21
947
  #: admin/tpl/setting/settings_inc.media_webp.php:12
948
+ #: admin/tpl/setting/settings_optimize.php:142
949
+ #: admin/tpl/setting/settings_tuning.php:20
950
+ #: admin/tpl/setting/settings_tuning.php:56
951
  msgid "NOTE:"
952
  msgstr ""
953
 
958
  msgstr ""
959
 
960
  #: admin/tpl/image_optimization.php:208
961
+ #: admin/tpl/setting/settings_optimize.php:67
962
+ #: admin/tpl/setting/settings_optimize.php:143
963
  msgid "JS Combine"
964
  msgstr ""
965
 
966
+ #: admin/tpl/import_export.php:9
967
+ msgid "LiteSpeed Cache Import / Export"
968
+ msgstr ""
969
+
970
+ #: admin/tpl/import_export.php:20
971
+ msgid "Export Settings"
972
+ msgstr ""
973
+
974
+ #: admin/tpl/import_export.php:23
975
+ msgid "Export"
976
+ msgstr ""
977
+
978
+ #: admin/tpl/import_export.php:28
979
+ msgid "Last exported"
980
+ msgstr ""
981
+
982
+ #: admin/tpl/import_export.php:33
983
+ msgid ""
984
+ "This will export all current LiteSpeed Cache settings and save as a file."
985
+ msgstr ""
986
+
987
+ #: admin/tpl/import_export.php:36
988
+ msgid "Import Settings"
989
+ msgstr ""
990
+
991
+ #: admin/tpl/import_export.php:45
992
+ msgid "Import"
993
+ msgstr ""
994
+
995
+ #: admin/tpl/import_export.php:51
996
+ msgid "Last imported"
997
+ msgstr ""
998
+
999
+ #: admin/tpl/import_export.php:56
1000
+ msgid ""
1001
+ "This will import settings from a file and override all current LiteSpeed "
1002
+ "Cache settings."
1003
+ msgstr ""
1004
+
1005
  #: admin/tpl/inc/admin_footer.php:5
1006
  msgid ""
1007
  "Rate <strong>LiteSpeed Cache</strong> with %s on WordPress.org if you like "
1378
  msgid "Are you sure you want to purge all?"
1379
  msgstr ""
1380
 
1381
+ #: admin/tpl/manage/manage_purge.php:61 inc/gui.class.php:308
1382
+ #: includes/litespeed-cache-gui.class.php:308
1383
+ msgid "Object Cache Purge All"
1384
  msgstr ""
1385
 
1386
  #: admin/tpl/manage/manage_purge.php:62
1387
+ msgid "Purge all the object caches"
1388
+ msgstr ""
1389
+
1390
+ #: admin/tpl/manage/manage_purge.php:71 inc/gui.class.php:318
1391
+ #: includes/litespeed-cache-gui.class.php:318
1392
+ msgid "Opcode Cache Purge All"
1393
+ msgstr ""
1394
+
1395
+ #: admin/tpl/manage/manage_purge.php:72
1396
+ msgid "Reset the entire opcode cache"
1397
+ msgstr ""
1398
+
1399
+ #: admin/tpl/manage/manage_purge.php:81
1400
+ msgid "Empty Entire Cache"
1401
+ msgstr ""
1402
+
1403
+ #: admin/tpl/manage/manage_purge.php:82
1404
  msgid ""
1405
  "Clears all cache entries related to this site, <i>including other web "
1406
  "applications</i>."
1407
  msgstr ""
1408
 
1409
+ #: admin/tpl/manage/manage_purge.php:83
1410
  msgid "This action should only be used if things are cached incorrectly."
1411
  msgstr ""
1412
 
1413
+ #: admin/tpl/manage/manage_purge.php:88
1414
  msgid "This will clear EVERYTHING inside the cache."
1415
  msgstr ""
1416
 
1417
+ #: admin/tpl/manage/manage_purge.php:89
1418
  msgid "This may cause heavy load on the server."
1419
  msgstr ""
1420
 
1421
+ #: admin/tpl/manage/manage_purge.php:90
1422
  msgid "If only the WordPress site should be purged, use purge all."
1423
  msgstr ""
1424
 
1425
+ #: admin/tpl/manage/manage_purge.php:96 admin/tpl/manage.php:7
1426
  #: admin/tpl/network_settings.php:7 admin/tpl/settings.php:9
1427
  msgid "Purge"
1428
  msgstr ""
1429
 
1430
+ #: admin/tpl/manage/manage_purge.php:127
1431
  msgid "Purge By..."
1432
  msgstr ""
1433
 
1434
+ #: admin/tpl/manage/manage_purge.php:129
1435
  msgid "Select below for \"Purge by\" options."
1436
  msgstr ""
1437
 
1438
+ #: admin/tpl/manage/manage_purge.php:130
1439
+ #: admin/tpl/setting/settings_cache.php:71
1440
+ #: admin/tpl/setting/settings_cache.php:95
1441
+ #: admin/tpl/setting/settings_cdn.php:116
1442
+ #: admin/tpl/setting/settings_cdn.php:142
1443
+ #: admin/tpl/setting/settings_excludes.php:22
1444
+ #: admin/tpl/setting/settings_excludes.php:36
1445
+ #: admin/tpl/setting/settings_excludes.php:59
1446
+ #: admin/tpl/setting/settings_excludes.php:97
1447
+ #: admin/tpl/setting/settings_inc.cache_object.php:114
1448
+ #: admin/tpl/setting/settings_inc.cache_object.php:122
1449
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:19
1450
+ #: admin/tpl/setting/settings_media.php:34
1451
+ #: admin/tpl/setting/settings_optimize.php:157
1452
+ #: admin/tpl/setting/settings_purge.php:83
1453
+ #: admin/tpl/setting/settings_tuning.php:38
1454
+ #: admin/tpl/setting/settings_tuning.php:74
1455
+ #: admin/tpl/setting/settings_tuning.php:146
1456
+ #: admin/tpl/setting/settings_tuning.php:175
1457
  msgid "One per line."
1458
  msgstr ""
1459
 
1460
+ #: admin/tpl/manage/manage_purge.php:157
1461
  msgid "Category"
1462
  msgstr ""
1463
 
1464
+ #: admin/tpl/manage/manage_purge.php:163
1465
  msgid "Post ID"
1466
  msgstr ""
1467
 
1468
+ #: admin/tpl/manage/manage_purge.php:169
1469
  msgid "Tag"
1470
  msgstr ""
1471
 
1472
+ #: admin/tpl/manage/manage_purge.php:175
1473
  msgid "URL"
1474
  msgstr ""
1475
 
1476
+ #: admin/tpl/manage/manage_purge.php:181
1477
  msgid ""
1478
  "Purge pages by category name - e.g. %2$s should be used for the URL %1$s."
1479
  msgstr ""
1480
 
1481
+ #: admin/tpl/manage/manage_purge.php:186
1482
  msgid "Purge pages by post ID."
1483
  msgstr ""
1484
 
1485
+ #: admin/tpl/manage/manage_purge.php:190
1486
  msgid "Purge pages by tag name - e.g. %2$s should be used for the URL %1$s."
1487
  msgstr ""
1488
 
1489
+ #: admin/tpl/manage/manage_purge.php:195
1490
  msgid "Purge pages by relative or full URL."
1491
  msgstr ""
1492
 
1493
+ #: admin/tpl/manage/manage_purge.php:196
1494
  msgid "e.g. Use %s or %s."
1495
  msgstr ""
1496
 
1497
+ #: admin/tpl/manage/manage_purge.php:209
1498
  msgid "Purge List"
1499
  msgstr ""
1500
 
1502
  msgid "DB Optimizer"
1503
  msgstr ""
1504
 
1505
+ #: admin/tpl/manage.php:12 admin/tpl/setting/settings_cdn.php:181
1506
  #: admin/tpl/settings.php:14
1507
  msgid "CDN"
1508
  msgstr ""
1515
  msgid "LiteSpeed Cache Management"
1516
  msgstr ""
1517
 
1518
+ #: admin/tpl/network_settings.php:5 admin/tpl/setting/settings_general.php:7
1519
  #: admin/tpl/settings.php:7
1520
  msgid "General"
1521
  msgstr ""
1528
  msgid "Excludes"
1529
  msgstr ""
1530
 
1531
+ #: admin/tpl/network_settings.php:9 admin/tpl/settings.php:13
1532
+ msgid "Media"
 
1533
  msgstr ""
1534
 
1535
+ #: admin/tpl/network_settings.php:10 admin/tpl/setting/settings_debug.php:68
1536
+ #: admin/tpl/settings.php:16
1537
+ msgid "Advanced"
1538
  msgstr ""
1539
 
1540
+ #: admin/tpl/network_settings.php:22
1541
  msgid "LiteSpeed Cache Network Settings"
1542
  msgstr ""
1543
 
1583
  "support message."
1584
  msgstr ""
1585
 
1586
+ #: admin/tpl/setting/network_settings_advanced.php:4
1587
+ msgid "Advanced Network"
1588
+ msgstr ""
1589
+
1590
  #: admin/tpl/setting/network_settings_cache.php:4
1591
  msgid "Cache Control Network Settings"
1592
  msgstr ""
1655
  msgid "Purge Network Settings"
1656
  msgstr ""
1657
 
1658
+ #: admin/tpl/setting/settings_advanced.php:9
1659
+ msgid "Advanced Settings"
 
 
 
 
 
 
 
 
 
 
 
 
1660
  msgstr ""
1661
 
1662
+ #: admin/tpl/setting/settings_advanced.php:14
1663
+ msgid "NOTICE:"
 
 
1664
  msgstr ""
1665
 
1666
+ #: admin/tpl/setting/settings_advanced.php:15
1667
+ msgid "These settings are meant for ADVANCED USERS ONLY."
 
 
1668
  msgstr ""
1669
 
1670
  #: admin/tpl/setting/settings_advanced.php:27
1671
+ msgid "Improve HTTP/HTTPS Compatibility"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1672
  msgstr ""
1673
 
1674
+ #: admin/tpl/setting/settings_advanced.php:31
1675
  msgid ""
1676
+ "Enable this option if you are using both HTTP and HTTPS in the same domain "
1677
+ "and are noticing cache irregularities."
 
 
 
 
1678
  msgstr ""
1679
 
1680
+ #: admin/tpl/setting/settings_advanced.php:39
1681
+ msgid "Instant Click"
1682
  msgstr ""
1683
 
1684
+ #: admin/tpl/setting/settings_advanced.php:43
1685
  msgid ""
1686
+ "When a vistor hovers over a page link, preload that page. This will speed up "
1687
+ "the visit to that link."
1688
  msgstr ""
1689
 
1690
+ #: admin/tpl/setting/settings_advanced.php:47
 
 
 
 
1691
  msgid ""
1692
+ "This will generate extra requests to the server, which will increase server "
1693
+ "load."
1694
  msgstr ""
1695
 
1696
+ #: admin/tpl/setting/settings_cache.php:6
1697
  msgid "Cache Control Settings"
1698
  msgstr ""
1699
 
1700
+ #: admin/tpl/setting/settings_cache.php:12
1701
  msgid "Cache Logged-in Users"
1702
  msgstr ""
1703
 
1704
+ #: admin/tpl/setting/settings_cache.php:16
1705
  msgid "Privately cache frontend pages for logged-in users. (LSWS %s required)"
1706
  msgstr ""
1707
 
1708
+ #: admin/tpl/setting/settings_cache.php:22
1709
  msgid "Cache Commenters"
1710
  msgstr ""
1711
 
1712
+ #: admin/tpl/setting/settings_cache.php:26
1713
  msgid ""
1714
  "Privately cache commenters that have pending comments. Disabling this option "
1715
  "will serve non-cacheable pages to commenters. (LSWS %s required)"
1716
  msgstr ""
1717
 
1718
+ #: admin/tpl/setting/settings_cache.php:32
1719
  msgid "Cache REST API"
1720
  msgstr ""
1721
 
1722
+ #: admin/tpl/setting/settings_cache.php:36
1723
  msgid "Cache requests made by WordPress REST API calls."
1724
  msgstr ""
1725
 
1726
+ #: admin/tpl/setting/settings_cache.php:42
1727
  msgid "Cache Login Page"
1728
  msgstr ""
1729
 
1730
+ #: admin/tpl/setting/settings_cache.php:46
1731
  msgid "Disabling this option may negatively affect performance."
1732
  msgstr ""
1733
 
1734
+ #: admin/tpl/setting/settings_cache.php:60
1735
  msgid "Private Cached URIs"
1736
  msgstr ""
1737
 
1738
+ #: admin/tpl/setting/settings_cache.php:64
1739
  msgid "URI Paths containing these strings will NOT be cached as public."
1740
  msgstr ""
1741
 
1742
+ #: admin/tpl/setting/settings_cache.php:65
1743
+ #: admin/tpl/setting/settings_excludes.php:16
1744
  msgid "The URLs will be compared to the REQUEST_URI server variable."
1745
  msgstr ""
1746
 
1747
+ #: admin/tpl/setting/settings_cache.php:66
1748
+ #: admin/tpl/setting/settings_excludes.php:17
1749
+ #: admin/tpl/setting/settings_tuning.php:174
1750
  msgid "For example, for %s, %s can be used here."
1751
  msgstr ""
1752
 
1753
+ #: admin/tpl/setting/settings_cache.php:69
1754
+ #: admin/tpl/setting/settings_excludes.php:20
1755
  msgid "To match the beginning, add %s to the beginning of the item."
1756
  msgstr ""
1757
 
1758
+ #: admin/tpl/setting/settings_cache.php:70
1759
+ #: admin/tpl/setting/settings_excludes.php:21
1760
  msgid "To do an exact match, add %s to the end of the URL."
1761
  msgstr ""
1762
 
1763
+ #: admin/tpl/setting/settings_cache.php:85
1764
  msgid "Drop Query String"
1765
  msgstr ""
1766
 
1767
+ #: admin/tpl/setting/settings_cache.php:89
1768
  msgid "Ignore certain query strings when caching."
1769
  msgstr ""
1770
 
1771
+ #: admin/tpl/setting/settings_cache.php:90
1772
  msgid "For example, to drop parameters beginning with %s, %s can be used here."
1773
  msgstr ""
1774
 
1775
+ #: admin/tpl/setting/settings_cdn.php:24
1776
  msgid "CDN Settings"
1777
  msgstr ""
1778
 
1779
+ #: admin/tpl/setting/settings_cdn.php:30
1780
  msgid "Enable CDN"
1781
  msgstr ""
1782
 
1783
+ #: admin/tpl/setting/settings_cdn.php:34
1784
  msgid "Enable Content Delivery Network use."
1785
  msgstr ""
1786
 
1787
+ #: admin/tpl/setting/settings_cdn.php:40
1788
  msgid "CDN Mapping"
1789
  msgstr ""
1790
 
1791
+ #: admin/tpl/setting/settings_cdn.php:46
1792
  msgid "CDN URL"
1793
  msgstr ""
1794
 
1795
+ #: admin/tpl/setting/settings_cdn.php:55
1796
  msgid "CDN URL to be used. For example, %s"
1797
  msgstr ""
1798
 
1799
+ #: admin/tpl/setting/settings_cdn.php:61 admin/tpl/setting/settings_cdn.php:102
1800
  msgid "Include Images"
1801
  msgstr ""
1802
 
1803
+ #: admin/tpl/setting/settings_cdn.php:68 admin/tpl/setting/settings_cdn.php:106
 
1804
  msgid "Include CSS"
1805
  msgstr ""
1806
 
1807
+ #: admin/tpl/setting/settings_cdn.php:75 admin/tpl/setting/settings_cdn.php:110
 
1808
  msgid "Include JS"
1809
  msgstr ""
1810
 
1811
+ #: admin/tpl/setting/settings_cdn.php:85 admin/tpl/setting/settings_cdn.php:114
 
1812
  msgid "Include File Types"
1813
  msgstr ""
1814
 
1815
+ #: admin/tpl/setting/settings_cdn.php:98
1816
  msgid ""
1817
  "If multiple CDN paths are configured with the same settings, the last one "
1818
  "will override the others."
1819
  msgstr ""
1820
 
1821
+ #: admin/tpl/setting/settings_cdn.php:103
1822
  msgid ""
1823
  "Serve all image files through the CDN. This will affect all attachments, "
1824
  "HTML %s tags, and CSS %s attributes."
1825
  msgstr ""
1826
 
1827
+ #: admin/tpl/setting/settings_cdn.php:107
1828
  msgid ""
1829
  "Serve all CSS files through the CDN. This will affect all enqueued WP CSS "
1830
  "files."
1831
  msgstr ""
1832
 
1833
+ #: admin/tpl/setting/settings_cdn.php:111
1834
  msgid ""
1835
  "Serve all JavaScript files through the CDN. This will affect all enqueued WP "
1836
  "JavaScript files."
1837
  msgstr ""
1838
 
1839
+ #: admin/tpl/setting/settings_cdn.php:115
1840
  msgid "Static file type links to be replaced by CDN links."
1841
  msgstr ""
1842
 
1843
+ #: admin/tpl/setting/settings_cdn.php:117
1844
  msgid "This will affect all tags containing attributes: %s %s %s."
1845
  msgstr ""
1846
 
1847
+ #: admin/tpl/setting/settings_cdn.php:118
1848
  msgid "Default value"
1849
  msgstr ""
1850
 
1851
+ #: admin/tpl/setting/settings_cdn.php:125
1852
  msgid "Original URL"
1853
  msgstr ""
1854
 
1855
+ #: admin/tpl/setting/settings_cdn.php:129
1856
  msgid ""
1857
  "Site URL to be served through the CDN. Beginning with %1$s. For example, "
1858
  "%2$s."
1859
  msgstr ""
1860
 
1861
+ #: admin/tpl/setting/settings_cdn.php:130
1862
  msgid ""
1863
  "Wildcard %1$s supported (match zero or more characters). For example, to "
1864
  "match %2$s and %3$s, use %4$s."
1865
  msgstr ""
1866
 
1867
+ #: admin/tpl/setting/settings_cdn.php:136
1868
  msgid "Exclude Path"
1869
  msgstr ""
1870
 
1871
+ #: admin/tpl/setting/settings_cdn.php:141
1872
  msgid "Paths containing these strings will not be served from the CDN."
1873
  msgstr ""
1874
 
1875
+ #: admin/tpl/setting/settings_cdn.php:148
1876
  msgid "Load JQuery Remotely"
1877
  msgstr ""
1878
 
1879
+ #: admin/tpl/setting/settings_cdn.php:154
1880
+ #: admin/tpl/setting/settings_debug.php:19
1881
  msgid "Off"
1882
  msgstr ""
1883
 
1884
+ #: admin/tpl/setting/settings_cdn.php:160
1885
  msgid "Google"
1886
  msgstr ""
1887
 
1888
+ #: admin/tpl/setting/settings_cdn.php:166
1889
  msgid "Cdnjs"
1890
  msgstr ""
1891
 
1892
+ #: admin/tpl/setting/settings_cdn.php:170
1893
  msgid ""
1894
  "Improve page load time by loading jQuery from a remote CDN service instead "
1895
  "of locally."
1896
  msgstr ""
1897
 
1898
+ #: admin/tpl/setting/settings_cdn.php:176
1899
  msgid "Cloudflare API"
1900
  msgstr ""
1901
 
1902
+ #: admin/tpl/setting/settings_cdn.php:180
1903
  msgid "Use Cloudflare API functionality."
1904
  msgstr ""
1905
 
1906
+ #: admin/tpl/setting/settings_cdn.php:181
1907
  msgid "This can be managed from <a %2$s>%1$s</a>."
1908
  msgstr ""
1909
 
1910
+ #: admin/tpl/setting/settings_cdn.php:185
1911
  msgid "Email Address"
1912
  msgstr ""
1913
 
1914
+ #: admin/tpl/setting/settings_cdn.php:189
1915
  msgid "Your Email address on Cloudflare."
1916
  msgstr ""
1917
 
1918
+ #: admin/tpl/setting/settings_cdn.php:194
1919
  msgid "Global API Key"
1920
  msgstr ""
1921
 
1922
+ #: admin/tpl/setting/settings_cdn.php:198
1923
  msgid "Your API key is used to access Cloudflare APIs."
1924
  msgstr ""
1925
 
1926
+ #: admin/tpl/setting/settings_cdn.php:199
1927
  msgid "Get it from <a %s>Cloudflare account</a>."
1928
  msgstr ""
1929
 
1930
+ #: admin/tpl/setting/settings_cdn.php:204
1931
  msgid "Domain"
1932
  msgstr ""
1933
 
1934
+ #: admin/tpl/setting/settings_cdn.php:212
1935
  msgid "You can just type part of the domain."
1936
  msgstr ""
1937
 
1938
+ #: admin/tpl/setting/settings_cdn.php:213
1939
  msgid ""
1940
  "Once saved, it will be matched with the current list and completed "
1941
  "automatically."
1975
  msgid "After purging the cache, the view count should be updating."
1976
  msgstr ""
1977
 
1978
+ #: admin/tpl/setting/settings_crawler.php:7
1979
  msgid "Crawler Settings"
1980
  msgstr ""
1981
 
1982
+ #: admin/tpl/setting/settings_crawler.php:16
1983
  msgid "microseconds"
1984
  msgstr ""
1985
 
1986
+ #: admin/tpl/setting/settings_crawler.php:18
1987
  msgid ""
1988
  "Specify time in microseconds for the delay between requests during a crawl."
1989
  msgstr ""
1990
 
1991
+ #: admin/tpl/setting/settings_crawler.php:22
1992
+ #: admin/tpl/setting/settings_crawler.php:95
1993
+ #: admin/tpl/setting/settings_crawler.php:100
1994
+ msgid "NOTE"
1995
+ msgstr ""
1996
+
1997
+ #: admin/tpl/setting/settings_crawler.php:23
1998
+ msgid "Server allowed min value"
1999
+ msgstr ""
2000
+
2001
+ #: admin/tpl/setting/settings_crawler.php:42
2002
  msgid "Specify time in seconds for the duration of the crawl interval."
2003
  msgstr ""
2004
 
2005
+ #: admin/tpl/setting/settings_crawler.php:49
2006
  msgid "Interval Between Runs"
2007
  msgstr ""
2008
 
2009
+ #: admin/tpl/setting/settings_crawler.php:54
2010
  msgid ""
2011
  "Specify time in seconds for the time between each run interval. Must be "
2012
  "greater than 60."
2013
  msgstr ""
2014
 
2015
+ #: admin/tpl/setting/settings_crawler.php:61
2016
  msgid "Crawl Interval"
2017
  msgstr ""
2018
 
2019
+ #: admin/tpl/setting/settings_crawler.php:66
2020
  msgid ""
2021
  "Specify how long in seconds before the crawler should initiate crawling the "
2022
  "entire sitemap again."
2023
  msgstr ""
2024
 
2025
+ #: admin/tpl/setting/settings_crawler.php:78
2026
  msgid "Specify Number of Threads to use while crawling."
2027
  msgstr ""
2028
 
2029
+ #: admin/tpl/setting/settings_crawler.php:85
2030
  msgid "Server Load Limit"
2031
  msgstr ""
2032
 
2033
+ #: admin/tpl/setting/settings_crawler.php:90
2034
  msgid ""
2035
  "The maximum average server load allowed while crawling. The number of "
2036
  "crawler threads in use will be actively reduced until average server load "
2038
  "current crawler run will be terminated."
2039
  msgstr ""
2040
 
2041
+ #: admin/tpl/setting/settings_crawler.php:96
2042
+ msgid "Server enforced value"
2043
+ msgstr ""
2044
+
2045
+ #: admin/tpl/setting/settings_crawler.php:101
2046
+ msgid "Server allowed max value"
2047
+ msgstr ""
2048
+
2049
+ #: admin/tpl/setting/settings_crawler.php:115
2050
  msgid "Site IP"
2051
  msgstr ""
2052
 
2053
+ #: admin/tpl/setting/settings_crawler.php:120
2054
  msgid ""
2055
  "Enter this site's IP address to crawl by IP instead of domain name. This "
2056
  "eliminates the overhead of DNS and CDN lookups. (optional)"
2057
  msgstr ""
2058
 
2059
+ #: admin/tpl/setting/settings_crawler.php:126
2060
  msgid "Custom Sitemap"
2061
  msgstr ""
2062
 
2063
+ #: admin/tpl/setting/settings_crawler.php:131
2064
  msgid ""
2065
  "The crawler can use your Google XML Sitemap instead of its own. Enter the "
2066
  "full URL to your sitemap here."
2067
  msgstr ""
2068
 
2069
+ #: admin/tpl/setting/settings_crawler.php:137
2070
  msgid "Include Posts"
2071
  msgstr ""
2072
 
2073
+ #: admin/tpl/setting/settings_crawler.php:141
2074
  msgid "Include Posts in crawler sitemap generation."
2075
  msgstr ""
2076
 
2077
+ #: admin/tpl/setting/settings_crawler.php:147
2078
  msgid "Include Pages"
2079
  msgstr ""
2080
 
2081
+ #: admin/tpl/setting/settings_crawler.php:151
2082
  msgid "Include Pages in crawler sitemap generation."
2083
  msgstr ""
2084
 
2085
+ #: admin/tpl/setting/settings_crawler.php:157
2086
  msgid "Include Categories"
2087
  msgstr ""
2088
 
2089
+ #: admin/tpl/setting/settings_crawler.php:161
2090
  msgid "Include Categories pages in crawler sitemap generation."
2091
  msgstr ""
2092
 
2093
+ #: admin/tpl/setting/settings_crawler.php:167
2094
  msgid "Include Tags"
2095
  msgstr ""
2096
 
2097
+ #: admin/tpl/setting/settings_crawler.php:171
2098
  msgid "Include Tags pages in crawler sitemap generation."
2099
  msgstr ""
2100
 
2101
+ #: admin/tpl/setting/settings_crawler.php:177
2102
  msgid "Exclude Custom Post Types"
2103
  msgstr ""
2104
 
2105
+ #: admin/tpl/setting/settings_crawler.php:182
2106
  msgid ""
2107
  "If you want to exclude certain Custom Post Types in sitemap, add the Custom "
2108
  "Post Types in the box, one per line."
2109
  msgstr ""
2110
 
2111
+ #: admin/tpl/setting/settings_crawler.php:186
2112
  msgid "Available Custom Post Type"
2113
  msgstr ""
2114
 
2115
+ #: admin/tpl/setting/settings_crawler.php:195
2116
  msgid "Order links by"
2117
  msgstr ""
2118
 
2119
+ #: admin/tpl/setting/settings_crawler.php:201
2120
  msgid "Date, descending (Default)"
2121
  msgstr ""
2122
 
2123
+ #: admin/tpl/setting/settings_crawler.php:207
2124
  msgid "Date, ascending"
2125
  msgstr ""
2126
 
2127
+ #: admin/tpl/setting/settings_crawler.php:213
2128
  msgid "Alphabetical, descending"
2129
  msgstr ""
2130
 
2131
+ #: admin/tpl/setting/settings_crawler.php:219
2132
  msgid "Alphabetical, ascending"
2133
  msgstr ""
2134
 
2135
+ #: admin/tpl/setting/settings_crawler.php:223
2136
  msgid ""
2137
  "Please choose one of the above options to set the order in which the sitemap "
2138
  "will be parsed."
2139
  msgstr ""
2140
 
2141
+ #: admin/tpl/setting/settings_debug.php:7
2142
  msgid "Developer Testing"
2143
  msgstr ""
2144
 
2145
+ #: admin/tpl/setting/settings_debug.php:25
2146
  msgid "On"
2147
  msgstr ""
2148
 
2149
+ #: admin/tpl/setting/settings_debug.php:31
2150
  msgid "Admin IP only"
2151
  msgstr ""
2152
 
2153
+ #: admin/tpl/setting/settings_debug.php:35
2154
  msgid "Outputs to WordPress debug log."
2155
  msgstr ""
2156
 
2157
+ #: admin/tpl/setting/settings_debug.php:36
2158
  msgid ""
2159
  "This should be set to off once everything is working to prevent filling the "
2160
  "disk."
2161
  msgstr ""
2162
 
2163
+ #: admin/tpl/setting/settings_debug.php:37
2164
  msgid ""
2165
  "The Admin IP option will only output log messages on requests from admin IPs."
2166
  msgstr ""
2167
 
2168
+ #: admin/tpl/setting/settings_debug.php:38
2169
  msgid "The logs will be outputted to %s."
2170
  msgstr ""
2171
 
2172
+ #: admin/tpl/setting/settings_debug.php:44
2173
  msgid "Admin IPs"
2174
  msgstr ""
2175
 
2176
+ #: admin/tpl/setting/settings_debug.php:48
2177
  msgid ""
2178
  "Allows listed IPs (one per line) to perform certain actions from their "
2179
  "browsers."
2180
  msgstr ""
2181
 
2182
+ #: admin/tpl/setting/settings_debug.php:49
2183
  msgid ""
2184
  "More information about the available commands can be found <a %s>here</a>."
2185
  msgstr ""
2186
 
2187
+ #: admin/tpl/setting/settings_debug.php:56
2188
  msgid "Debug Level"
2189
  msgstr ""
2190
 
2191
+ #: admin/tpl/setting/settings_debug.php:62
2192
  msgid "Basic"
2193
  msgstr ""
2194
 
2195
+ #: admin/tpl/setting/settings_debug.php:72
2196
  msgid "Advanced level will log more details."
2197
  msgstr ""
2198
 
2199
+ #: admin/tpl/setting/settings_debug.php:81
2200
+ #: admin/tpl/setting/settings_tuning.php:88
2201
  msgid "MB"
2202
  msgstr ""
2203
 
2204
+ #: admin/tpl/setting/settings_debug.php:83
2205
  msgid ""
2206
  "Specify the maximum size of the log file. Minimum is 3MB. Maximum is 3000MB."
2207
  msgstr ""
2208
 
2209
+ #: admin/tpl/setting/settings_debug.php:90
2210
  msgid "Heartbeat"
2211
  msgstr ""
2212
 
2213
+ #: admin/tpl/setting/settings_debug.php:94
2214
  msgid ""
2215
  "Disable WordPress heartbeat to prevent AJAX calls from breaking debug "
2216
  "logging. WARNING: Disabling this may cause WordPress tasks triggered by AJAX "
2217
  "to stop working."
2218
  msgstr ""
2219
 
2220
+ #: admin/tpl/setting/settings_debug.php:100
2221
  msgid "Log Cookies"
2222
  msgstr ""
2223
 
2224
+ #: admin/tpl/setting/settings_debug.php:104
2225
  msgid "Log request cookie values."
2226
  msgstr ""
2227
 
2228
+ #: admin/tpl/setting/settings_debug.php:110
2229
  msgid "Collapse Query Strings"
2230
  msgstr ""
2231
 
2232
+ #: admin/tpl/setting/settings_debug.php:114
2233
  msgid "Shorten query strings in the debug log to improve readability."
2234
  msgstr ""
2235
 
2236
+ #: admin/tpl/setting/settings_debug.php:120
2237
  msgid "Log Filters"
2238
  msgstr ""
2239
 
2240
+ #: admin/tpl/setting/settings_debug.php:124
2241
  msgid ""
2242
  "Log all WordPress filter hooks. WARNING: Enabling this option will cause log "
2243
  "file size to grow quickly."
2244
  msgstr ""
2245
 
2246
+ #: admin/tpl/setting/settings_debug.php:130
2247
  msgid "Exclude Filters"
2248
  msgstr ""
2249
 
2250
+ #: admin/tpl/setting/settings_debug.php:134
2251
  msgid "Listed filters (one per line) will not be logged."
2252
  msgstr ""
2253
 
2254
+ #: admin/tpl/setting/settings_debug.php:135
2255
+ #: admin/tpl/setting/settings_debug.php:146
2256
+ msgid "Recommended default value"
2257
  msgstr ""
2258
 
2259
  #: admin/tpl/setting/settings_debug.php:141
2260
+ msgid "Exclude Part Filters"
2261
+ msgstr ""
2262
+
2263
+ #: admin/tpl/setting/settings_debug.php:145
2264
  msgid "Filters containing these strings (one per line) will not be logged."
2265
  msgstr ""
2266
 
2327
  "etc), while all other user roles see the default public page."
2328
  msgstr ""
2329
 
2330
+ #: admin/tpl/setting/settings_excludes.php:6
2331
  msgid "Do Not Cache Settings"
2332
  msgstr ""
2333
 
2334
+ #: admin/tpl/setting/settings_excludes.php:11
2335
  msgid "Do Not Cache URIs"
2336
  msgstr ""
2337
 
2338
+ #: admin/tpl/setting/settings_excludes.php:15
2339
  msgid "Paths containing these strings will not be cached."
2340
  msgstr ""
2341
 
2342
+ #: admin/tpl/setting/settings_excludes.php:29
2343
  msgid "Do Not Cache Query Strings"
2344
  msgstr ""
2345
 
2346
+ #: admin/tpl/setting/settings_excludes.php:33
2347
  msgid "Query string containing these parameters will not be cached."
2348
  msgstr ""
2349
 
2350
+ #: admin/tpl/setting/settings_excludes.php:34
2351
  msgid "For example, for %s, %s and %s can be used here."
2352
  msgstr ""
2353
 
2354
+ #: admin/tpl/setting/settings_excludes.php:43
2355
  msgid "Do Not Cache Categories"
2356
  msgstr ""
2357
 
2358
+ #: admin/tpl/setting/settings_excludes.php:56
2359
  msgid "All categories are cached by default."
2360
  msgstr ""
2361
 
2362
+ #: admin/tpl/setting/settings_excludes.php:57
2363
+ #: admin/tpl/setting/settings_excludes.php:95
2364
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:16
2365
  #: admin/tpl/setting/settings_inc.exclude_useragent.php:15
2366
  msgid "To prevent %s from being cached, enter it here."
2367
  msgstr ""
2368
 
2369
+ #: admin/tpl/setting/settings_excludes.php:57
2370
  msgid "categories"
2371
  msgstr ""
2372
 
2373
+ #: admin/tpl/setting/settings_excludes.php:65
2374
  msgid ""
2375
  "If the category slug is not found, the category will be removed from the "
2376
  "list on save."
2377
  msgstr ""
2378
 
2379
+ #: admin/tpl/setting/settings_excludes.php:66
2380
+ #: admin/tpl/setting/settings_excludes.php:104
2381
  msgid "To exclude %1$s, insert %2$s."
2382
  msgstr ""
2383
 
2384
+ #: admin/tpl/setting/settings_excludes.php:74
2385
  msgid "Do Not Cache Tags"
2386
  msgstr ""
2387
 
2388
+ #: admin/tpl/setting/settings_excludes.php:94
2389
  msgid "All tags are cached by default."
2390
  msgstr ""
2391
 
2392
+ #: admin/tpl/setting/settings_excludes.php:95
2393
  msgid "tags"
2394
  msgstr ""
2395
 
2396
+ #: admin/tpl/setting/settings_excludes.php:103
2397
  msgid ""
2398
  "If the tag slug is not found, the tag will be removed from the list on save."
2399
  msgstr ""
2400
 
2401
+ #: admin/tpl/setting/settings_excludes.php:124
2402
  msgid "Do Not Cache Roles"
2403
  msgstr ""
2404
 
2405
+ #: admin/tpl/setting/settings_excludes.php:130
2406
  msgid "Selected roles will be excluded from cache."
2407
  msgstr ""
2408
 
2409
+ #: admin/tpl/setting/settings_general.php:13
2410
  msgid "Enable LiteSpeed Cache"
2411
  msgstr ""
2412
 
2413
+ #: admin/tpl/setting/settings_general.php:42
2414
  msgid "Use Network Admin Setting"
2415
  msgstr ""
2416
 
2417
+ #: admin/tpl/setting/settings_general.php:48
2418
  msgid "Please visit the <a %s>Information</a> page on how to test the cache."
2419
  msgstr ""
2420
 
2421
+ #: admin/tpl/setting/settings_general.php:51
2422
+ #: admin/tpl/setting/settings_optimize.php:19
2423
  msgid "NOTICE"
2424
  msgstr ""
2425
 
2426
+ #: admin/tpl/setting/settings_general.php:51
2427
  msgid ""
2428
  "When disabling the cache, all cached entries for this blog will be purged."
2429
  msgstr ""
2430
 
2431
+ #: admin/tpl/setting/settings_general.php:53
2432
  msgid "The network admin setting can be overridden here."
2433
  msgstr ""
2434
 
2435
+ #: admin/tpl/setting/settings_general.php:60
2436
  msgid "Default Public Cache TTL"
2437
  msgstr ""
2438
 
2439
+ #: admin/tpl/setting/settings_general.php:65
2440
  msgid ""
2441
  "Specify how long, in seconds, public pages are cached. Minimum is 30 seconds."
2442
  msgstr ""
2443
 
2444
+ #: admin/tpl/setting/settings_general.php:72
2445
  msgid "Default Private Cache TTL"
2446
  msgstr ""
2447
 
2448
+ #: admin/tpl/setting/settings_general.php:77
2449
  msgid ""
2450
  "Specify how long, in seconds, private pages are cached. Minimum is %1$s "
2451
  "seconds. Maximum is %2$s seconds."
2452
  msgstr ""
2453
 
2454
+ #: admin/tpl/setting/settings_general.php:84
2455
  msgid "Default Front Page TTL"
2456
  msgstr ""
2457
 
2458
+ #: admin/tpl/setting/settings_general.php:89
2459
  msgid ""
2460
  "Specify how long, in seconds, the front page is cached. Minimum is 30 "
2461
  "seconds."
2462
  msgstr ""
2463
 
2464
+ #: admin/tpl/setting/settings_general.php:96
2465
  msgid "Default Feed TTL"
2466
  msgstr ""
2467
 
2468
+ #: admin/tpl/setting/settings_general.php:101
2469
  msgid "Specify how long, in seconds, feeds are cached."
2470
  msgstr ""
2471
 
2472
+ #: admin/tpl/setting/settings_general.php:102
2473
  msgid "If this is set to a number less than 30, feeds will not be cached."
2474
  msgstr ""
2475
 
2476
+ #: admin/tpl/setting/settings_general.php:109
2477
  msgid "Default 404 Page TTL"
2478
  msgstr ""
2479
 
2480
+ #: admin/tpl/setting/settings_general.php:114
2481
  msgid "Specify how long, in seconds, 404 pages are cached."
2482
  msgstr ""
2483
 
2484
+ #: admin/tpl/setting/settings_general.php:115
2485
  msgid "If this is set to a number less than 30, 404 pages will not be cached."
2486
  msgstr ""
2487
 
2488
+ #: admin/tpl/setting/settings_general.php:122
2489
  msgid "Default 403 Page TTL"
2490
  msgstr ""
2491
 
2492
+ #: admin/tpl/setting/settings_general.php:127
2493
  msgid "Specify how long, in seconds, 403 pages are cached."
2494
  msgstr ""
2495
 
2496
+ #: admin/tpl/setting/settings_general.php:128
2497
  msgid "If this is set to a number less than 30, 403 pages will not be cached."
2498
  msgstr ""
2499
 
2500
+ #: admin/tpl/setting/settings_general.php:135
2501
  msgid "Default 500 Page TTL"
2502
  msgstr ""
2503
 
2504
+ #: admin/tpl/setting/settings_general.php:140
2505
  msgid "Specify how long, in seconds, 500 pages are cached."
2506
  msgstr ""
2507
 
2508
+ #: admin/tpl/setting/settings_general.php:141
2509
  msgid "If this is set to a number less than 30, 500 pages will not be cached."
2510
  msgstr ""
2511
 
2560
  msgstr ""
2561
 
2562
  #: admin/tpl/setting/settings_inc.cache_mobile.php:8
2563
+ #: admin/tpl/setting/settings_inc.cache_mobile.php:67
2564
  msgid "Cache Mobile"
2565
  msgstr ""
2566
 
2573
  msgstr ""
2574
 
2575
  #: admin/tpl/setting/settings_inc.cache_mobile.php:25
2576
+ #: admin/tpl/setting/settings_inc.cache_mobile.php:67
2577
  msgid "List of Mobile User Agents"
2578
  msgstr ""
2579
 
2601
  msgid "The default list WordPress uses is %s"
2602
  msgstr ""
2603
 
2604
+ #: admin/tpl/setting/settings_inc.cache_mobile.php:67
2605
+ msgid "If %1$s is %2$s, then %3$s must be populated!"
2606
+ msgstr ""
2607
+
2608
+ #: admin/tpl/setting/settings_inc.cache_object.php:4
2609
+ msgid "Enabled"
2610
+ msgstr ""
2611
+
2612
+ #: admin/tpl/setting/settings_inc.cache_object.php:5
2613
+ msgid "Disabled"
2614
+ msgstr ""
2615
+
2616
+ #: admin/tpl/setting/settings_inc.cache_object.php:12
2617
+ msgid "Not Available"
2618
+ msgstr ""
2619
+
2620
+ #: admin/tpl/setting/settings_inc.cache_object.php:15
2621
+ msgid "Passed"
2622
+ msgstr ""
2623
+
2624
+ #: admin/tpl/setting/settings_inc.cache_object.php:18
2625
+ msgid "Failed"
2626
+ msgstr ""
2627
+
2628
+ #: admin/tpl/setting/settings_inc.cache_object.php:28
2629
+ msgid "Object Cache"
2630
+ msgstr ""
2631
+
2632
+ #: admin/tpl/setting/settings_inc.cache_object.php:32
2633
+ msgid "Use object cache functionality."
2634
+ msgstr ""
2635
+
2636
+ #: admin/tpl/setting/settings_inc.cache_object.php:37
2637
+ msgid "Method"
2638
+ msgstr ""
2639
+
2640
+ #: admin/tpl/setting/settings_inc.cache_object.php:46
2641
+ msgid "Host"
2642
+ msgstr ""
2643
+
2644
+ #: admin/tpl/setting/settings_inc.cache_object.php:50
2645
+ msgid "Your %s Hostname or IP address."
2646
+ msgstr ""
2647
+
2648
+ #: admin/tpl/setting/settings_inc.cache_object.php:55
2649
+ msgid "Port"
2650
+ msgstr ""
2651
+
2652
+ #: admin/tpl/setting/settings_inc.cache_object.php:61
2653
+ msgid "Default Object Lifetime"
2654
+ msgstr ""
2655
+
2656
+ #: admin/tpl/setting/settings_inc.cache_object.php:65
2657
+ msgid "Default TTL for cached objects."
2658
+ msgstr ""
2659
+
2660
+ #: admin/tpl/setting/settings_inc.cache_object.php:70
2661
+ msgid "Status"
2662
+ msgstr ""
2663
+
2664
+ #: admin/tpl/setting/settings_inc.cache_object.php:72
2665
+ #: admin/tpl/setting/settings_inc.cache_object.php:73
2666
+ msgid "%s Extension"
2667
+ msgstr ""
2668
+
2669
+ #: admin/tpl/setting/settings_inc.cache_object.php:74
2670
+ msgid "Connection Test"
2671
+ msgstr ""
2672
+
2673
+ #: admin/tpl/setting/settings_inc.cache_object.php:81
2674
+ msgid "Username"
2675
+ msgstr ""
2676
+
2677
+ #: admin/tpl/setting/settings_inc.cache_object.php:85
2678
+ msgid "Only available when %s is installed."
2679
+ msgstr ""
2680
+
2681
+ #: admin/tpl/setting/settings_inc.cache_object.php:90
2682
+ msgid "Password"
2683
+ msgstr ""
2684
+
2685
+ #: admin/tpl/setting/settings_inc.cache_object.php:94
2686
+ msgid "Specify the password used when connecting."
2687
+ msgstr ""
2688
+
2689
+ #: admin/tpl/setting/settings_inc.cache_object.php:99
2690
+ msgid "Redis Database ID"
2691
+ msgstr ""
2692
+
2693
+ #: admin/tpl/setting/settings_inc.cache_object.php:103
2694
+ msgid "Database to be used"
2695
+ msgstr ""
2696
+
2697
+ #: admin/tpl/setting/settings_inc.cache_object.php:110
2698
+ msgid "Global Groups"
2699
+ msgstr ""
2700
+
2701
+ #: admin/tpl/setting/settings_inc.cache_object.php:113
2702
+ msgid "Groups cached at the network level."
2703
+ msgstr ""
2704
+
2705
+ #: admin/tpl/setting/settings_inc.cache_object.php:119
2706
+ msgid "Do Not Cache Groups"
2707
+ msgstr ""
2708
+
2709
+ #: admin/tpl/setting/settings_inc.cache_object.php:128
2710
+ msgid "Persistent Connection"
2711
+ msgstr ""
2712
+
2713
+ #: admin/tpl/setting/settings_inc.cache_object.php:132
2714
+ msgid "Use keep-alive connections to speed up cache operations."
2715
+ msgstr ""
2716
+
2717
+ #: admin/tpl/setting/settings_inc.cache_object.php:135
2718
+ #: admin/tpl/setting/settings_inc.cache_object.php:149
2719
+ msgid "Cache Wp-Admin"
2720
+ msgstr ""
2721
+
2722
+ #: admin/tpl/setting/settings_inc.cache_object.php:139
2723
+ msgid "Improve wp-admin speed through caching. (May encounter expired data)"
2724
+ msgstr ""
2725
+
2726
+ #: admin/tpl/setting/settings_inc.cache_object.php:145
2727
+ msgid "Store Transients"
2728
+ msgstr ""
2729
+
2730
+ #: admin/tpl/setting/settings_inc.cache_object.php:149
2731
+ msgid "Save transients in database when %1$s is %2$s."
2732
+ msgstr ""
2733
+
2734
  #: admin/tpl/setting/settings_inc.cache_resources.php:7
2735
  msgid "Cache PHP Resources"
2736
  msgstr ""
2745
  "PHP calls."
2746
  msgstr ""
2747
 
2748
+ #: admin/tpl/setting/settings_inc.check_adv_file.php:6
2749
+ msgid "Check Advanced Cache"
2750
+ msgstr ""
2751
+
2752
+ #: admin/tpl/setting/settings_inc.check_adv_file.php:10
2753
+ msgid "Include advanced-cache.php"
2754
+ msgstr ""
2755
+
2756
+ #: admin/tpl/setting/settings_inc.check_adv_file.php:13
2757
+ msgid ""
2758
+ "The advanced-cache.php file is used by many caching plugins to signal that a "
2759
+ "cache is active."
2760
+ msgstr ""
2761
+
2762
+ #: admin/tpl/setting/settings_inc.check_adv_file.php:14
2763
+ msgid ""
2764
+ "When this option is checked and this file is detected as belonging to "
2765
+ "another plugin, LiteSpeed Cache will not cache."
2766
+ msgstr ""
2767
+
2768
+ #: admin/tpl/setting/settings_inc.check_adv_file.php:17
2769
+ msgid ""
2770
+ "Uncheck this option only if the other plugin is used for non-caching "
2771
+ "purposes, such as minifying css/js files."
2772
+ msgstr ""
2773
+
2774
  #: admin/tpl/setting/settings_inc.exclude_cookies.php:6
2775
  msgid "Do Not Cache Cookies"
2776
  msgstr ""
2796
  msgid "SYNTAX: Separate each user agent with a bar, %s."
2797
  msgstr ""
2798
 
2799
+ #: admin/tpl/setting/settings_inc.login_cookie.php:7
2800
+ msgid "Login Cookie"
2801
+ msgstr ""
2802
+
2803
+ #: admin/tpl/setting/settings_inc.login_cookie.php:13
2804
+ msgid "SYNTAX: alphanumeric and \"_\"."
2805
+ msgstr ""
2806
+
2807
+ #: admin/tpl/setting/settings_inc.login_cookie.php:14
2808
+ msgid "No spaces and case sensitive."
2809
+ msgstr ""
2810
+
2811
+ #: admin/tpl/setting/settings_inc.login_cookie.php:15
2812
+ msgid "MUST BE UNIQUE FROM OTHER WEB APPLICATIONS."
2813
+ msgstr ""
2814
+
2815
+ #: admin/tpl/setting/settings_inc.login_cookie.php:18
2816
+ msgid "The default login cookie is %s."
2817
+ msgstr ""
2818
+
2819
+ #: admin/tpl/setting/settings_inc.login_cookie.php:19
2820
+ msgid ""
2821
+ "The server will determine if the user is logged in based on the existance of "
2822
+ "this cookie."
2823
+ msgstr ""
2824
+
2825
+ #: admin/tpl/setting/settings_inc.login_cookie.php:20
2826
+ msgid ""
2827
+ "This setting is useful for those that have multiple web applications for the "
2828
+ "same domain."
2829
+ msgstr ""
2830
+
2831
+ #: admin/tpl/setting/settings_inc.login_cookie.php:21
2832
+ msgid ""
2833
+ "If every web application uses the same cookie, the server may confuse "
2834
+ "whether a user is logged in or not."
2835
+ msgstr ""
2836
+
2837
+ #: admin/tpl/setting/settings_inc.login_cookie.php:22
2838
+ msgid "The cookie set here will be used for this WordPress installation."
2839
+ msgstr ""
2840
+
2841
+ #: admin/tpl/setting/settings_inc.login_cookie.php:25
2842
+ msgid "Example use case:"
2843
+ msgstr ""
2844
+
2845
+ #: admin/tpl/setting/settings_inc.login_cookie.php:27
2846
+ msgid "There is a WordPress installed for %s."
2847
+ msgstr ""
2848
+
2849
+ #: admin/tpl/setting/settings_inc.login_cookie.php:29
2850
+ msgid "Then another WordPress is installed (NOT MULTISITE) at %s"
2851
+ msgstr ""
2852
+
2853
+ #: admin/tpl/setting/settings_inc.login_cookie.php:30
2854
+ msgid ""
2855
+ "The cache needs to distinguish who is logged into which WordPress site in "
2856
+ "order to cache correctly."
2857
+ msgstr ""
2858
+
2859
+ #: admin/tpl/setting/settings_inc.login_cookie.php:36
2860
+ msgid "Error: invalid login cookie. Please check the %s file"
2861
+ msgstr ""
2862
+
2863
+ #: admin/tpl/setting/settings_inc.login_cookie.php:44
2864
+ msgid "Error getting current rules from %s: %s"
2865
+ msgstr ""
2866
+
2867
+ #: admin/tpl/setting/settings_inc.login_cookie.php:52
2868
+ msgid ""
2869
+ "WARNING: The .htaccess login cookie and Database login cookie do not match."
2870
+ msgstr ""
2871
+
2872
  #: admin/tpl/setting/settings_inc.media_webp.php:6
2873
  msgid "Image WebP Replacement"
2874
  msgstr ""
2889
  "or WordPress core is upgraded."
2890
  msgstr ""
2891
 
2892
+ #: admin/tpl/setting/settings_media.php:7
2893
  msgid "Media Settings"
2894
  msgstr ""
2895
 
2896
+ #: admin/tpl/setting/settings_media.php:13
2897
  msgid "Lazy Load Images"
2898
  msgstr ""
2899
 
2900
+ #: admin/tpl/setting/settings_media.php:17
2901
  msgid "Load images only when they enter the viewport."
2902
  msgstr ""
2903
 
2904
+ #: admin/tpl/setting/settings_media.php:18
2905
+ #: admin/tpl/setting/settings_media.php:63
2906
  msgid "This can improve page loading time by reducing initial HTTP requests."
2907
  msgstr ""
2908
 
2909
+ #: admin/tpl/setting/settings_media.php:20
2910
  msgid "Tip"
2911
  msgstr ""
2912
 
2913
+ #: admin/tpl/setting/settings_media.php:21
2914
  msgid "Adding Style to Your Lazy-Loaded Images"
2915
  msgstr ""
2916
 
2917
+ #: admin/tpl/setting/settings_media.php:28
2918
  msgid "Lazy Load Image Excludes"
2919
  msgstr ""
2920
 
2921
+ #: admin/tpl/setting/settings_media.php:32
2922
  msgid "Listed images will not be lazy loaded."
2923
  msgstr ""
2924
 
2925
+ #: admin/tpl/setting/settings_media.php:33
2926
+ #: admin/tpl/setting/settings_tuning.php:37
2927
+ #: admin/tpl/setting/settings_tuning.php:73
2928
+ #: admin/tpl/setting/settings_tuning.php:145
2929
+ #: admin/tpl/setting/settings_tuning.php:173
2930
  msgid "Both full URLs and partial strings can be used."
2931
  msgstr ""
2932
 
2933
+ #: admin/tpl/setting/settings_media.php:36
2934
+ #: admin/tpl/setting/settings_optimize.php:117
2935
+ #: admin/tpl/setting/settings_tuning.php:24
2936
+ #: admin/tpl/setting/settings_tuning.php:40
2937
+ #: admin/tpl/setting/settings_tuning.php:60
2938
+ #: admin/tpl/setting/settings_tuning.php:76
2939
+ #: admin/tpl/setting/settings_tuning.php:148
2940
  msgid "API:"
2941
  msgstr ""
2942
 
2943
+ #: admin/tpl/setting/settings_media.php:37
2944
+ #: admin/tpl/setting/settings_tuning.php:41
2945
+ #: admin/tpl/setting/settings_tuning.php:77
2946
+ #: admin/tpl/setting/settings_tuning.php:149
2947
  msgid "Filter %s is supported."
2948
  msgstr ""
2949
 
2950
+ #: admin/tpl/setting/settings_media.php:38
2951
+ #: admin/tpl/setting/settings_optimize.php:118
2952
+ #: admin/tpl/setting/settings_tuning.php:42
2953
+ #: admin/tpl/setting/settings_tuning.php:78
2954
+ #: admin/tpl/setting/settings_tuning.php:150
2955
  msgid "Elements with attribute %s in html code will be excluded."
2956
  msgstr ""
2957
 
2958
+ #: admin/tpl/setting/settings_media.php:45
2959
  msgid "Lazy Load Image Placeholder"
2960
  msgstr ""
2961
 
2962
+ #: admin/tpl/setting/settings_media.php:49
2963
  msgid ""
2964
  "Specify a base64 image to be used as a placeholder while other images finish "
2965
  "loading."
2966
  msgstr ""
2967
 
2968
+ #: admin/tpl/setting/settings_media.php:50
2969
  msgid ""
2970
  "This can be predefined in %2$s as well using constant %1$s, with this "
2971
  "setting taking priority."
2972
  msgstr ""
2973
 
2974
+ #: admin/tpl/setting/settings_media.php:51
2975
  msgid "By default a gray image placeholder %s will be used."
2976
  msgstr ""
2977
 
2978
+ #: admin/tpl/setting/settings_media.php:52
2979
  msgid "For example, %s can be used for a transparent placeholder."
2980
  msgstr ""
2981
 
2982
+ #: admin/tpl/setting/settings_media.php:58
2983
  msgid "Lazy Load Iframes"
2984
  msgstr ""
2985
 
2986
+ #: admin/tpl/setting/settings_media.php:62
2987
  msgid "Load iframes only when they enter the viewport."
2988
  msgstr ""
2989
 
2990
+ #: admin/tpl/setting/settings_media.php:69
2991
  msgid "Disable Optimization Pull"
2992
  msgstr ""
2993
 
2994
+ #: admin/tpl/setting/settings_media.php:73
2995
  msgid ""
2996
  "Set this option to %s to disable the cron job responsible for fetching "
2997
  "optimized images from LiteSpeed's Image Server."
2998
  msgstr ""
2999
 
3000
+ #: admin/tpl/setting/settings_media.php:87
3001
  msgid "Only Request WebP"
3002
  msgstr ""
3003
 
3004
+ #: admin/tpl/setting/settings_media.php:91
3005
  msgid ""
3006
  "Prevent images from being replaced with optimized versions when optimizing. "
3007
  "WebP versions will still be generated."
3008
  msgstr ""
3009
 
3010
+ #: admin/tpl/setting/settings_media.php:97
3011
  msgid "Preserve EXIF data"
3012
  msgstr ""
3013
 
3014
+ #: admin/tpl/setting/settings_media.php:101
3015
  msgid ""
3016
  "Preserve EXIF data (copyright, GPS, comments, keywords, etc) when optimizing."
3017
  msgstr ""
3018
 
3019
+ #: admin/tpl/setting/settings_media.php:102
3020
  msgid "This will increase the size of optimized files."
3021
  msgstr ""
3022
 
3023
+ #: admin/tpl/setting/settings_media.php:108
3024
  msgid "WebP Lossless Compression"
3025
  msgstr ""
3026
 
3027
+ #: admin/tpl/setting/settings_media.php:112
3028
  msgid "Generate WebP images using lossless compression."
3029
  msgstr ""
3030
 
3031
+ #: admin/tpl/setting/settings_media.php:113
3032
  msgid "This can improve quality at the cost of larger images."
3033
  msgstr ""
3034
 
3035
+ #: admin/tpl/setting/settings_optimize.php:7
3036
  msgid "Optimization Settings"
3037
  msgstr ""
3038
 
3039
+ #: admin/tpl/setting/settings_optimize.php:14
3040
  msgid ""
3041
  "Failed to create Optimizer table. Please follow <a %s>Table Creation "
3042
  "guidance from LiteSpeed Wiki</a> to finish setup."
3043
  msgstr ""
3044
 
3045
+ #: admin/tpl/setting/settings_optimize.php:20
3046
  msgid ""
3047
  "Please test thoroughly when enabling any option in this list. After changing "
3048
  "Minify/Combine settings, please do a Purge All action."
3049
  msgstr ""
3050
 
3051
+ #: admin/tpl/setting/settings_optimize.php:26
3052
  msgid "CSS Minify"
3053
  msgstr ""
3054
 
3055
+ #: admin/tpl/setting/settings_optimize.php:30
3056
  msgid "Minify CSS files."
3057
  msgstr ""
3058
 
3059
+ #: admin/tpl/setting/settings_optimize.php:36
3060
  msgid "CSS Combine"
3061
  msgstr ""
3062
 
3063
+ #: admin/tpl/setting/settings_optimize.php:40
3064
  msgid "Combine CSS files."
3065
  msgstr ""
3066
 
3067
+ #: admin/tpl/setting/settings_optimize.php:41
3068
+ #: admin/tpl/setting/settings_optimize.php:72
3069
+ msgid "How to Fix Problems Caused by CSS/JS Optimization."
3070
  msgstr ""
3071
 
3072
  #: admin/tpl/setting/settings_optimize.php:47
3073
+ msgid "CSS HTTP/2 Push"
3074
+ msgstr ""
3075
+
3076
+ #: admin/tpl/setting/settings_optimize.php:51
3077
  msgid ""
3078
  "Pre-send internal CSS files to the browser before they are requested. "
3079
  "(Requires the HTTP/2 protocol)"
3080
  msgstr ""
3081
 
3082
+ #: admin/tpl/setting/settings_optimize.php:57
3083
  msgid "JS Minify"
3084
  msgstr ""
3085
 
3086
+ #: admin/tpl/setting/settings_optimize.php:61
3087
  msgid "Minify JS files."
3088
  msgstr ""
3089
 
3090
+ #: admin/tpl/setting/settings_optimize.php:71
3091
  msgid "Combine JS files."
3092
  msgstr ""
3093
 
3094
+ #: admin/tpl/setting/settings_optimize.php:78
3095
  msgid "JS HTTP/2 Push"
3096
  msgstr ""
3097
 
3098
+ #: admin/tpl/setting/settings_optimize.php:82
3099
  msgid ""
3100
  "Pre-send internal JS files to the browser before they are requested. "
3101
  "(Requires the HTTP/2 protocol)"
3102
  msgstr ""
3103
 
3104
+ #: admin/tpl/setting/settings_optimize.php:88
3105
  msgid "CSS/JS Cache TTL"
3106
  msgstr ""
3107
 
3108
+ #: admin/tpl/setting/settings_optimize.php:93
3109
  msgid ""
3110
  "Specify how long, in seconds, CSS/JS files are cached. Minimum is %1$s "
3111
  "seconds."
3112
  msgstr ""
3113
 
3114
+ #: admin/tpl/setting/settings_optimize.php:100
3115
  msgid "HTML Minify"
3116
  msgstr ""
3117
 
3118
+ #: admin/tpl/setting/settings_optimize.php:104
3119
  msgid "Minify HTML content."
3120
  msgstr ""
3121
 
3122
+ #: admin/tpl/setting/settings_optimize.php:110
3123
+ #: admin/tpl/setting/settings_tuning.php:134
3124
  msgid "Load CSS Asynchronously"
3125
  msgstr ""
3126
 
3127
+ #: admin/tpl/setting/settings_optimize.php:114
3128
  msgid "Optimize CSS delivery. This will load Google Fonts asynchronously too."
3129
  msgstr ""
3130
 
3131
+ #: admin/tpl/setting/settings_optimize.php:115
3132
+ #: admin/tpl/setting/settings_optimize.php:130
3133
+ #: admin/tpl/setting/settings_optimize.php:168
3134
+ #: admin/tpl/setting/settings_tuning.php:103
3135
+ #: admin/tpl/setting/settings_tuning.php:162
3136
  msgid ""
3137
  "This can improve your speed score in services like Pingdom, GTmetrix and "
3138
  "PageSpeed."
3139
  msgstr ""
3140
 
3141
+ #: admin/tpl/setting/settings_optimize.php:125
3142
  msgid "Load JS Deferred"
3143
  msgstr ""
3144
 
3145
+ #: admin/tpl/setting/settings_optimize.php:129
3146
  msgid "Doing so can help reduce resource contention and improve performance."
3147
  msgstr ""
3148
 
3149
+ #: admin/tpl/setting/settings_optimize.php:136
3150
  msgid "Exclude JQuery"
3151
  msgstr ""
3152
 
3153
+ #: admin/tpl/setting/settings_optimize.php:140
3154
  msgid ""
3155
  "Improve compatibility with inline JS by preventing jQuery optimization. "
3156
  "(Recommended Setting: %s)"
3157
  msgstr ""
3158
 
3159
+ #: admin/tpl/setting/settings_optimize.php:143
3160
  msgid ""
3161
  "If there is any JS error related to %1$s when enabled %2$s, please try this "
3162
  "option."
3163
  msgstr ""
3164
 
3165
+ #: admin/tpl/setting/settings_optimize.php:150
3166
  msgid "DNS Prefetch"
3167
  msgstr ""
3168
 
3169
+ #: admin/tpl/setting/settings_optimize.php:154
3170
  msgid "Prefetching DNS can reduce latency for visiters."
3171
  msgstr ""
3172
 
3173
+ #: admin/tpl/setting/settings_optimize.php:155
3174
  msgid "For example"
3175
  msgstr ""
3176
 
3177
+ #: admin/tpl/setting/settings_optimize.php:163
3178
  msgid "Remove Comments"
3179
  msgstr ""
3180
 
3181
+ #: admin/tpl/setting/settings_optimize.php:167
3182
  msgid "Remove the comments inside of JS/CSS files when minifying."
3183
  msgstr ""
3184
 
3185
+ #: admin/tpl/setting/settings_purge.php:7
3186
  msgid "Purge Settings"
3187
  msgstr ""
3188
 
3189
+ #: admin/tpl/setting/settings_purge.php:14
3190
  msgid "All pages"
3191
  msgstr ""
3192
 
3193
+ #: admin/tpl/setting/settings_purge.php:15
3194
  msgid "Front page"
3195
  msgstr ""
3196
 
3197
+ #: admin/tpl/setting/settings_purge.php:16
3198
  msgid "Home page"
3199
  msgstr ""
3200
 
3201
+ #: admin/tpl/setting/settings_purge.php:17
3202
  msgid "Pages"
3203
  msgstr ""
3204
 
3205
+ #: admin/tpl/setting/settings_purge.php:19
3206
  msgid "All pages with Recent Posts Widget"
3207
  msgstr ""
3208
 
3209
+ #: admin/tpl/setting/settings_purge.php:21
3210
  msgid "Author archive"
3211
  msgstr ""
3212
 
3213
+ #: admin/tpl/setting/settings_purge.php:22
3214
  msgid "Post type archive"
3215
  msgstr ""
3216
 
3217
+ #: admin/tpl/setting/settings_purge.php:24
3218
  msgid "Yearly archive"
3219
  msgstr ""
3220
 
3221
+ #: admin/tpl/setting/settings_purge.php:25
3222
  msgid "Monthly archive"
3223
  msgstr ""
3224
 
3225
+ #: admin/tpl/setting/settings_purge.php:26
3226
  msgid "Daily archive"
3227
  msgstr ""
3228
 
3229
+ #: admin/tpl/setting/settings_purge.php:28
3230
  msgid "Term archive (include category, tag, and tax)"
3231
  msgstr ""
3232
 
3233
+ #: admin/tpl/setting/settings_purge.php:48
3234
  msgid "Auto Purge Rules For Publish/Update"
3235
  msgstr ""
3236
 
3237
+ #: admin/tpl/setting/settings_purge.php:51
3238
  #: thirdparty/lscwp-3rd-woocommerce.cls.php:858
3239
  msgid "Note:"
3240
  msgstr ""
3241
 
3242
+ #: admin/tpl/setting/settings_purge.php:53
3243
  msgid ""
3244
  "Select \"All\" if there are dynamic widgets linked to posts on pages other "
3245
  "than the front or home pages."
3246
  msgstr ""
3247
 
3248
+ #: admin/tpl/setting/settings_purge.php:54
3249
  msgid "Other checkboxes will be ignored."
3250
  msgstr ""
3251
 
3252
+ #: admin/tpl/setting/settings_purge.php:55
3253
  msgid ""
3254
  "Select only the archive types that are currently used, the others can be "
3255
  "left unchecked."
3256
  msgstr ""
3257
 
3258
+ #: admin/tpl/setting/settings_purge.php:71
3259
  msgid ""
3260
  "Select which pages will be automatically purged when posts are published/"
3261
  "updated."
3262
  msgstr ""
3263
 
3264
+ #: admin/tpl/setting/settings_purge.php:77
3265
+ #: admin/tpl/setting/settings_purge.php:94
3266
  msgid "Scheduled Purge URLs"
3267
  msgstr ""
3268
 
3269
+ #: admin/tpl/setting/settings_purge.php:81
3270
  msgid ""
3271
  "The URLs here (one per line) will be purged automatically at the time set in "
3272
  "the option \"%s\"."
3273
  msgstr ""
3274
 
3275
+ #: admin/tpl/setting/settings_purge.php:81
3276
+ #: admin/tpl/setting/settings_purge.php:89
3277
  msgid "Scheduled Purge Time"
3278
  msgstr ""
3279
 
3280
+ #: admin/tpl/setting/settings_purge.php:82
3281
  msgid "Both %1$s and %2$s are acceptable."
3282
  msgstr ""
3283
 
3284
+ #: admin/tpl/setting/settings_purge.php:94
3285
  msgid "Specify the time to purge the \"%s\" list."
3286
  msgstr ""
3287
 
3288
+ #: admin/tpl/setting/settings_purge.php:95
3289
  msgid "Current server time is %s."
3290
  msgstr ""
3291
 
3292
+ #: admin/tpl/setting/settings_tuning.php:7
3293
  msgid "Tuning Settings"
3294
  msgstr ""
3295
 
3296
+ #: admin/tpl/setting/settings_tuning.php:13
3297
  msgid "Combined CSS Priority"
3298
  msgstr ""
3299
 
3300
+ #: admin/tpl/setting/settings_tuning.php:17
3301
  msgid "Load combined CSS files before other CSS files."
3302
  msgstr ""
3303
 
3304
+ #: admin/tpl/setting/settings_tuning.php:18
3305
+ #: admin/tpl/setting/settings_tuning.php:54
3306
  msgid "Set to %s by default."
3307
  msgstr ""
3308
 
3309
+ #: admin/tpl/setting/settings_tuning.php:21
3310
  msgid ""
3311
  "Only set to %s when changing the order of combined and uncombined CSS is "
3312
  "needed."
3313
  msgstr ""
3314
 
3315
+ #: admin/tpl/setting/settings_tuning.php:25
3316
  msgid ""
3317
  "Elements with attribute %s in html code will be excluded from moving to top."
3318
  msgstr ""
3319
 
3320
+ #: admin/tpl/setting/settings_tuning.php:32
3321
  msgid "CSS Excludes"
3322
  msgstr ""
3323
 
3324
+ #: admin/tpl/setting/settings_tuning.php:36
3325
  msgid "Listed CSS files will not be minified/combined."
3326
  msgstr ""
3327
 
3328
+ #: admin/tpl/setting/settings_tuning.php:49
3329
  msgid "Combined JS Priority"
3330
  msgstr ""
3331
 
3332
+ #: admin/tpl/setting/settings_tuning.php:53
3333
  msgid "Load combined JS files before other JS files."
3334
  msgstr ""
3335
 
3336
+ #: admin/tpl/setting/settings_tuning.php:57
3337
  msgid ""
3338
  "Only set to %s when changing the order of combined and uncombined JS is "
3339
  "needed."
3340
  msgstr ""
3341
 
3342
+ #: admin/tpl/setting/settings_tuning.php:61
3343
  msgid ""
3344
  "Elements with attribute %s in html code will be excluded from moving to top/"
3345
  "bottom."
3346
  msgstr ""
3347
 
3348
+ #: admin/tpl/setting/settings_tuning.php:68
3349
  msgid "JS Excludes"
3350
  msgstr ""
3351
 
3352
+ #: admin/tpl/setting/settings_tuning.php:72
3353
  msgid "Listed JS files will not be minified/combined."
3354
  msgstr ""
3355
 
3356
+ #: admin/tpl/setting/settings_tuning.php:85
3357
  msgid "Max Combined File Size"
3358
  msgstr ""
3359
 
3360
+ #: admin/tpl/setting/settings_tuning.php:90
3361
  msgid "Specify the maximum size in megabytes for combined files."
3362
  msgstr ""
3363
 
3364
+ #: admin/tpl/setting/settings_tuning.php:91
3365
  msgid ""
3366
  "Larger numbers will generate fewer files, which is better for achieving "
3367
  "higher page scores, but can cause heavy memory usage."
3368
  msgstr ""
3369
 
3370
+ #: admin/tpl/setting/settings_tuning.php:98
3371
  msgid "Remove Query Strings"
3372
  msgstr ""
3373
 
3374
+ #: admin/tpl/setting/settings_tuning.php:102
3375
  msgid "Remove query strings from static resources."
3376
  msgstr ""
3377
 
3378
+ #: admin/tpl/setting/settings_tuning.php:109
3379
  msgid "Load Google Fonts Asynchronously"
3380
  msgstr ""
3381
 
3382
+ #: admin/tpl/setting/settings_tuning.php:113
3383
  msgid ""
3384
  "This is useful if you only want to load Google Fonts asynchronously while "
3385
  "leave other CSS intact."
3386
  msgstr ""
3387
 
3388
+ #: admin/tpl/setting/settings_tuning.php:114
3389
  msgid ""
3390
  "This will also add a preconnect to Google for faster Google Fonts "
3391
  "downloading."
3392
  msgstr ""
3393
 
3394
+ #: admin/tpl/setting/settings_tuning.php:120
3395
  msgid "Remove Google Fonts"
3396
  msgstr ""
3397
 
3398
+ #: admin/tpl/setting/settings_tuning.php:124
3399
  msgid "Prevent google fonts from loading on all your pages."
3400
  msgstr ""
3401
 
3402
+ #: admin/tpl/setting/settings_tuning.php:130
3403
  msgid "Critical CSS Rules"
3404
  msgstr ""
3405
 
3406
+ #: admin/tpl/setting/settings_tuning.php:134
3407
  msgid "Specify critical CSS rules for above-the-fold content when enabling %s."
3408
  msgstr ""
3409
 
3410
+ #: admin/tpl/setting/settings_tuning.php:140
3411
  msgid "JS Deferred Excludes"
3412
  msgstr ""
3413
 
3414
+ #: admin/tpl/setting/settings_tuning.php:144
3415
  msgid "Listed JS files will not be deferred."
3416
  msgstr ""
3417
 
3418
+ #: admin/tpl/setting/settings_tuning.php:157
3419
  msgid "Remove WordPress Emoji"
3420
  msgstr ""
3421
 
3422
+ #: admin/tpl/setting/settings_tuning.php:161
3423
  msgid ""
3424
  "Stop loading wordpress.org emoji. Browser default emoji will be displayed "
3425
  "instead."
3426
  msgstr ""
3427
 
3428
+ #: admin/tpl/setting/settings_tuning.php:168
3429
  msgid "URI Excludes"
3430
  msgstr ""
3431
 
3432
+ #: admin/tpl/setting/settings_tuning.php:172
3433
  msgid "Prevent any optimization of listed pages."
3434
  msgstr ""
3435
 
3436
+ #: admin/tpl/setting/settings_tuning.php:181
3437
  msgid "Role Excludes"
3438
  msgstr ""
3439
 
3440
+ #: admin/tpl/setting/settings_tuning.php:187
3441
  msgid "Selected roles will be excluded from all optimizations."
3442
  msgstr ""
3443
 
3449
  msgid "Tuning"
3450
  msgstr ""
3451
 
3452
+ #: admin/tpl/settings.php:15
3453
  msgid "ESI"
3454
  msgstr ""
3455
 
3456
+ #: admin/tpl/settings.php:17
3457
  msgid "Debug"
3458
  msgstr ""
3459
 
3460
+ #: admin/tpl/settings.php:21
3461
  msgid "Compatibilities"
3462
  msgstr ""
3463
 
3464
+ #: admin/tpl/settings.php:126
3465
+ msgid "LiteSpeed Cache Settings"
3466
  msgstr ""
3467
 
3468
+ #: admin/tpl/settings.php:131
3469
+ msgid "Basic View"
3470
  msgstr ""
3471
 
3472
+ #: admin/tpl/settings.php:132
3473
+ msgid "Advanced View"
3474
  msgstr ""
3475
 
3476
+ #: admin/tpl/settings.php:163
3477
  msgid "The network admin selected use primary site configs for all subsites."
3478
  msgstr ""
3479
 
3480
+ #: admin/tpl/settings.php:164
3481
  msgid ""
3482
  "The following options are selected, but are not editable in this settings "
3483
  "page."
3484
  msgstr ""
3485
 
3486
+ #: admin/tpl/settings.php:186 admin/tpl/settings.php:189
3487
  msgid "Save Changes"
3488
  msgstr ""
3489
 
3519
  msgid "No available Cloudflare zone"
3520
  msgstr ""
3521
 
3522
+ #: inc/cdn.class.php:759 includes/litespeed-cache-cdn.class.php:759
3523
  msgid "Communicated with Cloudflare successfully."
3524
  msgstr ""
3525
 
3526
+ #: inc/cdn.class.php:768 includes/litespeed-cache-cdn.class.php:768
3527
  msgid "Failed to communicate with Cloudflare"
3528
  msgstr ""
3529
 
3535
  msgid "File saved successfully: %s"
3536
  msgstr ""
3537
 
3538
+ #: inc/crawler.class.php:175 includes/litespeed-cache-crawler.class.php:175
3539
  msgid "File created successfully: %s"
3540
  msgstr ""
3541
 
3542
+ #: inc/crawler.class.php:323 includes/litespeed-cache-crawler.class.php:323
3543
  msgid "Failed to send position reset notification: %s"
3544
  msgstr ""
3545
 
3546
+ #: inc/crawler.class.php:327 includes/litespeed-cache-crawler.class.php:327
3547
  msgid "Position reset notification sent successfully"
3548
  msgstr ""
3549
 
3550
+ #: inc/crawler.class.php:427 includes/litespeed-cache-crawler.class.php:427
3551
  #: lib/litespeed/litespeed-crawler.class.php:327
3552
  msgid "Reached end of sitemap file. Crawling completed."
3553
  msgstr ""
3554
 
3555
+ #: inc/gui.class.php:208 includes/litespeed-cache-gui.class.php:208
3556
  msgid "Purge this page"
3557
  msgstr ""
3558
 
3559
+ #: inc/gui.class.php:216 includes/litespeed-cache-gui.class.php:216
3560
  msgid "Mark this page as "
3561
  msgstr ""
3562
 
3563
+ #: inc/gui.class.php:223 includes/litespeed-cache-gui.class.php:223
3564
  msgid "Non cacheable"
3565
  msgstr ""
3566
 
3567
+ #: inc/gui.class.php:230 includes/litespeed-cache-gui.class.php:230
3568
  msgid "Private cache"
3569
  msgstr ""
3570
 
3571
+ #: inc/gui.class.php:237 includes/litespeed-cache-gui.class.php:237
3572
  msgid "No optimization"
3573
  msgstr ""
3574
 
3575
+ #: inc/gui.class.php:244 includes/litespeed-cache-gui.class.php:244
3576
  msgid "More settings"
3577
  msgstr ""
3578
 
3579
+ #: inc/gui.class.php:263 includes/litespeed-cache-gui.class.php:263
3580
  msgid "LiteSpeed Cache Purge All"
3581
  msgstr ""
3582
 
3583
+ #: inc/gui.class.php:298 includes/litespeed-cache-gui.class.php:298
3584
  msgid "Cloudflare Purge All"
3585
  msgstr ""
3586
 
3587
+ #: inc/import.class.php:127
3588
+ msgid "Import failed due to file error."
3589
+ msgstr ""
3590
+
3591
+ #: inc/import.class.php:159
3592
+ msgid "Imported setting file %s successfully."
3593
+ msgstr ""
3594
+
3595
+ #: inc/litespeed-cache.class.php:255 includes/litespeed-cache.class.php:255
3596
  msgid "Crawler blacklist is saved."
3597
  msgstr ""
3598
 
3599
+ #: inc/litespeed-cache.class.php:260 includes/litespeed-cache.class.php:260
3600
  msgid "Notified LiteSpeed Web Server to purge the front page."
3601
  msgstr ""
3602
 
3603
+ #: inc/litespeed-cache.class.php:265 includes/litespeed-cache.class.php:265
3604
  msgid "Notified LiteSpeed Web Server to purge pages."
3605
  msgstr ""
3606
 
3607
+ #: inc/litespeed-cache.class.php:270 includes/litespeed-cache.class.php:270
3608
  msgid "Notified LiteSpeed Web Server to purge CSS/JS entries."
3609
  msgstr ""
3610
 
3611
+ #: inc/litespeed-cache.class.php:275 includes/litespeed-cache.class.php:275
3612
  msgid "Notified LiteSpeed Web Server to purge error pages."
3613
  msgstr ""
3614
 
3615
+ #: inc/litespeed-cache.class.php:281 includes/litespeed-cache.class.php:281
3616
  msgid "Notified LiteSpeed Web Server to purge all caches."
3617
  msgstr ""
3618
 
3619
+ #: inc/litespeed-cache.class.php:288 includes/litespeed-cache.class.php:288
3620
  msgid "Notified LiteSpeed Web Server to purge everything."
3621
  msgstr ""
3622
 
3623
+ #: inc/litespeed-cache.class.php:303 includes/litespeed-cache.class.php:303
3624
  msgid "Notified LiteSpeed Web Server to purge the list."
3625
  msgstr ""
3626
 
3702
  msgid "Post data is empty."
3703
  msgstr ""
3704
 
3705
+ #: inc/purge.class.php:64 includes/litespeed-cache-purge.class.php:64
3706
+ msgid "Opcode cache is not enabled."
3707
+ msgstr ""
3708
+
3709
+ #: inc/purge.class.php:74 includes/litespeed-cache-purge.class.php:74
3710
+ msgid "Reset the entire opcode cache successfully."
3711
+ msgstr ""
3712
+
3713
+ #: inc/purge.class.php:91 includes/litespeed-cache-purge.class.php:91
3714
+ msgid "Object cache is not enabled."
3715
+ msgstr ""
3716
+
3717
+ #: inc/purge.class.php:99 includes/litespeed-cache-purge.class.php:99
3718
+ msgid "Purge all object caches successfully."
3719
+ msgstr ""
3720
+
3721
+ #: inc/purge.class.php:291 includes/litespeed-cache-purge.class.php:291
3722
  msgid "Purge category %s"
3723
  msgstr ""
3724
 
3725
+ #: inc/purge.class.php:318 includes/litespeed-cache-purge.class.php:318
3726
  msgid "Purge Post ID %s"
3727
  msgstr ""
3728
 
3729
+ #: inc/purge.class.php:347 includes/litespeed-cache-purge.class.php:347
3730
  msgid "Purge tag %s"
3731
  msgstr ""
3732
 
3733
+ #: inc/purge.class.php:381 includes/litespeed-cache-purge.class.php:381
3734
  msgid "Purge url %s"
3735
  msgstr ""
3736
 
3738
  msgid "LiteSpeed Cache Custom Cron ImgOptm"
3739
  msgstr ""
3740
 
3741
+ #: inc/task.class.php:176 includes/litespeed-cache-task.class.php:176
3742
  msgid "LiteSpeed Cache Custom Cron Crawler"
3743
  msgstr ""
3744
 
lib/object-cache.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * LiteSpeed Object Cache
4
+ *
5
+ * @since 1.8
6
+ */
7
+
8
+ if ( ! defined( 'WPINC' ) ) {
9
+ die ;
10
+ }
11
+
12
+ ! defined( 'LSCWP_OBJECT_CACHE' ) && define( 'LSCWP_OBJECT_CACHE', true ) ;
13
+
14
+ // Initialize const `LSCWP_DIR` and locate LSCWP plugin foder
15
+ $lscwp_dir = ( defined( 'WP_PLUGIN_DIR' ) ? WP_PLUGIN_DIR : WP_CONTENT_DIR . '/plugins' ) . '/litespeed-cache/' ;
16
+ // Use plugin as higher priority than MU plugin
17
+ if ( ! file_exists( $lscwp_dir . 'litespeed-cache.php' ) ) {
18
+ // Check if is mu plugin or not
19
+ $lscwp_dir = ( defined( 'WPMU_PLUGIN_DIR' ) ? WPMU_PLUGIN_DIR : WP_CONTENT_DIR . '/mu-plugins' ) . '/litespeed-cache/' ;
20
+ if ( ! file_exists( $lscwp_dir . 'litespeed-cache.php' ) ) {
21
+ $lscwp_dir = '' ;
22
+ }
23
+ }
24
+
25
+ $data_file = WP_CONTENT_DIR . '/.object-cache.ini' ;
26
+
27
+ // Can't find LSCWP location, terminate object cache process
28
+ if ( ! $lscwp_dir || ! file_exists( $data_file ) ) {
29
+ if ( ! is_admin() ) { // Bypass object cache for frontend
30
+ require_once ABSPATH . WPINC . '/cache.php' ;
31
+ }
32
+ else {
33
+ $err = 'Can NOT find LSCWP path for object cache initialization in ' . __FILE__ ;
34
+ error_log( $err ) ;
35
+ echo $err ;
36
+ }
37
+ }
38
+ else {
39
+ // Init object cache & LSCWP
40
+ require_once $lscwp_dir . 'inc/object.lib.php' ;
41
+ }
litespeed-cache.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: LiteSpeed Cache
16
  * Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
17
  * Description: WordPress plugin to connect to LSCache on LiteSpeed Web Server.
18
- * Version: 1.7.2
19
  * Author: LiteSpeed Technologies
20
  * Author URI: https://www.litespeedtech.com
21
  * License: GPLv3
@@ -44,25 +44,21 @@ if ( ! defined( 'WPINC' ) ) {
44
  die ;
45
  }
46
 
47
- if ( class_exists( 'LiteSpeed_Cache' ) || defined( 'LSWCP_DIR' ) ) {
48
  return ;
49
  }
50
 
51
- define( 'LSWCP_CONTENT_DIR', dirname( get_theme_root() ) ) ;
52
- define( 'LSWCP_DIR', plugin_dir_path( __FILE__ ) ) ;// Full absolute path '/usr/local/lsws/***/wp-content/plugins/litespeed-cache/'
53
- define( 'LSWCP_PLUGIN_URL', plugin_dir_url(__FILE__) ) ;// Full URL path '//example.com/wp-content/plugins/litespeed-cache/'
54
- define( 'LSWCP_BASENAME', plugin_basename( LSWCP_DIR . 'litespeed-cache.php' ) ) ;//LSWCP_BASENAME='litespeed-cache/litespeed-cache.php'
55
-
56
- define( 'LSWCP_CONTENT_FOLDER', str_replace( home_url( '/' ), '', WP_CONTENT_URL ) ) ; // `wp-content`
57
 
58
  ! defined( 'LITESPEED_TIME_OFFSET' ) && define( 'LITESPEED_TIME_OFFSET', get_option( 'gmt_offset' ) * 60 * 60 ) ;
59
 
60
  // Placeholder for lazyload img
61
  ! defined( 'LITESPEED_PLACEHOLDER' ) && define( 'LITESPEED_PLACEHOLDER', 'data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=' ) ;
62
 
63
-
64
  // Auto register LiteSpeed classes
65
- require_once LSWCP_DIR . 'inc/litespeed.autoload.php' ;
66
 
67
  // Define CLI
68
  if ( ( defined( 'WP_CLI' ) && WP_CLI ) || PHP_SAPI == 'cli' ) {
@@ -80,7 +76,7 @@ if ( ! defined( 'LITESPEED_SERVER_TYPE' ) ) {
80
  if ( isset( $_SERVER['HTTP_X_LSCACHE'] ) && $_SERVER['HTTP_X_LSCACHE'] ) {
81
  define( 'LITESPEED_SERVER_TYPE', 'LITESPEED_SERVER_ADC' ) ;
82
  }
83
- elseif ( isset( $_SERVER['LSWS_EDITION'] ) && strncmp( $_SERVER['LSWS_EDITION'], 'Openlitespeed', 13 ) == 0 ) {
84
  define( 'LITESPEED_SERVER_TYPE', 'LITESPEED_SERVER_OLS' ) ;
85
  }
86
  elseif ( isset( $_SERVER['SERVER_SOFTWARE'] ) && $_SERVER['SERVER_SOFTWARE'] == 'LiteSpeed' ) {
@@ -102,7 +98,7 @@ if ( ! defined( 'LSWCP_ESI_SUPPORT' ) ) {
102
  }
103
 
104
  if ( ! defined( 'LSWCP_TAG_PREFIX' ) ) {
105
- define( 'LSWCP_TAG_PREFIX', substr( md5( LSWCP_DIR ), -3 ) ) ;
106
  }
107
 
108
  /**
15
  * Plugin Name: LiteSpeed Cache
16
  * Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
17
  * Description: WordPress plugin to connect to LSCache on LiteSpeed Web Server.
18
+ * Version: 1.8.3
19
  * Author: LiteSpeed Technologies
20
  * Author URI: https://www.litespeedtech.com
21
  * License: GPLv3
44
  die ;
45
  }
46
 
47
+ if ( class_exists( 'LiteSpeed_Cache' ) || defined( 'LSCWP_DIR' ) ) {
48
  return ;
49
  }
50
 
51
+ ! defined( 'LSCWP_CONTENT_DIR' ) && define( 'LSCWP_CONTENT_DIR', WP_CONTENT_DIR ) ;
52
+ ! defined( 'LSCWP_DIR' ) && define( 'LSCWP_DIR', dirname( __FILE__ ) . '/' ) ;// Full absolute path '/usr/local/lsws/***/wp-content/plugins/litespeed-cache/' or MU
53
+ ! defined( 'LSCWP_BASENAME' ) && define( 'LSCWP_BASENAME', 'litespeed-cache/litespeed-cache.php' ) ;//LSCWP_BASENAME='litespeed-cache/litespeed-cache.php'
 
 
 
54
 
55
  ! defined( 'LITESPEED_TIME_OFFSET' ) && define( 'LITESPEED_TIME_OFFSET', get_option( 'gmt_offset' ) * 60 * 60 ) ;
56
 
57
  // Placeholder for lazyload img
58
  ! defined( 'LITESPEED_PLACEHOLDER' ) && define( 'LITESPEED_PLACEHOLDER', 'data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=' ) ;
59
 
 
60
  // Auto register LiteSpeed classes
61
+ require_once LSCWP_DIR . 'inc/litespeed.autoload.php' ;
62
 
63
  // Define CLI
64
  if ( ( defined( 'WP_CLI' ) && WP_CLI ) || PHP_SAPI == 'cli' ) {
76
  if ( isset( $_SERVER['HTTP_X_LSCACHE'] ) && $_SERVER['HTTP_X_LSCACHE'] ) {
77
  define( 'LITESPEED_SERVER_TYPE', 'LITESPEED_SERVER_ADC' ) ;
78
  }
79
+ elseif ( isset( $_SERVER['LSWS_EDITION'] ) && strpos( $_SERVER['LSWS_EDITION'], 'Openlitespeed' ) === 0 ) {
80
  define( 'LITESPEED_SERVER_TYPE', 'LITESPEED_SERVER_OLS' ) ;
81
  }
82
  elseif ( isset( $_SERVER['SERVER_SOFTWARE'] ) && $_SERVER['SERVER_SOFTWARE'] == 'LiteSpeed' ) {
98
  }
99
 
100
  if ( ! defined( 'LSWCP_TAG_PREFIX' ) ) {
101
+ define( 'LSWCP_TAG_PREFIX', substr( md5( LSCWP_DIR ), -3 ) ) ;
102
  }
103
 
104
  /**
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: LiteSpeedTech
3
  Tags: cache, wp-cache, litespeed, super cache, http2, total cache, wordfence
4
  Requires at least: 4.0
5
  Tested up to: 4.9.1
6
- Stable tag: 1.7.2
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
@@ -11,17 +11,17 @@ Speed up your page-load times. Get a faster site with high-performance page cach
11
 
12
  == Description ==
13
 
14
- LiteSpeed Cache for WordPress (LSCWP) is a PHP-based plugin that communicates with your installation of LiteSpeed Web Server and its built-in page cache (LSCache) to deliver superior performance to your WordPress site.
15
 
16
- Because LSCache is built directly into the server, overhead is significantly reduced and caching can be done [more efficiently than with other PHP-based caches](https://www.litespeedtech.com/benchmarks/wordpress).
17
 
18
- LSCache is a server-side page cache. Page caches save time and resources, and they do so by storing the full content of dynamically-generated pages so that static copies may be served to the user. A page cache allows the server to bypass PHP and database queries altogether. LSCache, in particular, because of its close relationship with the server, can remember things about the cache entries that other plugins cannot, and it can analyze dependencies. It can utilize tags to manage the smart purging of the cache, and it can use vary cookies to serve multiple versions of cached content based on things like mobile vs. desktop, geographic location, and currencies.
19
 
20
- If all of that sounds complicated, no need to worry. LiteSpeed Cache for WordPress works right out of the box with default settings that are appropriate for most sites. And if you do need help, we're just [a forum post](https://wordpress.org/support/plugin/litespeed-cache/) away.
21
 
22
  LSCWP supports WordPress Multisite and is compatible with most popular plugins, including WooCommerce, bbPress, and Yoast SEO. Scroll down for a complete list.
23
 
24
- LSCWP now includes additional optimization features, including Database Optimization, Minification and Combination of CSS and JS files, HTTP/2 push CDN support, Browser Cache, Lazyload images and image optimization!
25
 
26
  Want to know more about caching in general, and LiteSpeed caching in particular? See [our Caching 101 blog series](https://blog.litespeedtech.com/tag/caching-101/).
27
 
@@ -57,6 +57,8 @@ LiteSpeed Web Server Enterprise, LiteSpeed Web ADC and OpenLiteSpeed:
57
  * Combine CSS and JavaScript
58
  * HTTP/2 Push for CSS and JS
59
  * Database Cleaner and Optimizer
 
 
60
  * Browser Cache
61
  * DNS Prefetch
62
  * Cloudflare API
@@ -73,6 +75,8 @@ LiteSpeed Web Server Enterprise, LiteSpeed Web ADC and OpenLiteSpeed:
73
  * [WordPress CLI](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp#wordpress_cli)
74
  * Simple API system that enables other plugins to easily integrate with cache and operate cache functionalities.
75
  * No-Cache configuration by URI, Categories, Tags, Cookies, and User Agents
 
 
76
  * Attractive, easy-to-understand interface
77
 
78
  LiteSpeed Web Server Enterprise Edition and LiteSpeed Web ADC Only:
@@ -122,10 +126,7 @@ If you have any API requirements, please inform us anytime in [WP Forum](https:/
122
  * [Elegant Themes Divi 3.0.67+](https://www.elegantthemes.com/gallery/divi/)
123
  * [Caldera Forms](https://wordpress.org/plugins/caldera-forms/) 1.5.6.2+
124
  * Login With Ajax
125
-
126
- = Known Uncompatible Plugins =
127
-
128
- There are no known uncompatible plugins at this time.
129
 
130
  == Frequently Asked Questions ==
131
 
@@ -244,6 +245,44 @@ For more detailed information about crawler setup, please see [our blog post](ht
244
 
245
  == Changelog ==
246
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
247
  = 1.7.2 - January 5 2018 =
248
  * [NEW FEATURE] Cloudflare API support.
249
  * [IMPROVEMENT] IAPI key can now be reset to avoid issues when domain is changed.
3
  Tags: cache, wp-cache, litespeed, super cache, http2, total cache, wordfence
4
  Requires at least: 4.0
5
  Tested up to: 4.9.1
6
+ Stable tag: 1.8.3
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
 
11
 
12
  == Description ==
13
 
14
+ LiteSpeed Cache for WordPress (LSCWP) communicates with your LiteSpeed Web Server and its built-in page cache (LSCache) to deliver superior performance to your WordPress site.
15
 
16
+ LSCache is a server-level cache, so it's faster than PHP-level caches. [Benchmarks: Comparison with other PHP-based caches](https://www.litespeedtech.com/benchmarks/wordpress).
17
 
18
+ A page cache allows the server to bypass PHP and database queries altogether. LSCache, in particular, because of its close relationship with the server, can remember things about the cache entries that other plugins cannot, and it can analyze dependencies. It can utilize tags to manage the smart purging of the cache, and it can use vary cookies to serve multiple versions of cached content based on things like mobile vs. desktop, geographic location, and currencies.
19
 
20
+ If all of that sounds complicated, no need to worry. LSCWP works right out of the box with default settings that are appropriate for most sites. And if you do need help, we're just [a forum post](https://wordpress.org/support/plugin/litespeed-cache/) away.
21
 
22
  LSCWP supports WordPress Multisite and is compatible with most popular plugins, including WooCommerce, bbPress, and Yoast SEO. Scroll down for a complete list.
23
 
24
+ LSCWP now includes additional optimization features, including Database Optimization, Minification and Combination of CSS and JS files, HTTP/2 push CDN support, Browser Cache, Object Cache, Lazyload images and image optimization!
25
 
26
  Want to know more about caching in general, and LiteSpeed caching in particular? See [our Caching 101 blog series](https://blog.litespeedtech.com/tag/caching-101/).
27
 
57
  * Combine CSS and JavaScript
58
  * HTTP/2 Push for CSS and JS
59
  * Database Cleaner and Optimizer
60
+ * Object Cache (Memcached/LSMCD/Redis)
61
+ * OPcode Cache
62
  * Browser Cache
63
  * DNS Prefetch
64
  * Cloudflare API
75
  * [WordPress CLI](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp#wordpress_cli)
76
  * Simple API system that enables other plugins to easily integrate with cache and operate cache functionalities.
77
  * No-Cache configuration by URI, Categories, Tags, Cookies, and User Agents
78
+ * Import / Export settings
79
+ * Basic / Advanced setting view
80
  * Attractive, easy-to-understand interface
81
 
82
  LiteSpeed Web Server Enterprise Edition and LiteSpeed Web ADC Only:
126
  * [Elegant Themes Divi 3.0.67+](https://www.elegantthemes.com/gallery/divi/)
127
  * [Caldera Forms](https://wordpress.org/plugins/caldera-forms/) 1.5.6.2+
128
  * Login With Ajax
129
+ * [Post Types Order 1.9.3.6+](https://wordpress.org/plugins/post-types-order/)
 
 
 
130
 
131
  == Frequently Asked Questions ==
132
 
245
 
246
  == Changelog ==
247
 
248
+ = 1.8.3 - February 2 2018 =
249
+ * [NEW FEATURE] Crawler server variable limitation support.
250
+ * [IMPROVEMENT] Added Store Transients option to fix transients missing issue when Cache Wp-Admin setting is OFF.
251
+ * [IMPROVEMENT] Tweaked ARIA support. (@steverep)
252
+ * [IMPROVEMENT] Used strpos instead of strncmp for performance. (@Zach E)
253
+ * [BUGFIX] Transient cache can now be removed when the Cache Wp-Admin setting is ON in Object Cache.
254
+ * [BUGFIX] Network sites can now save Advanced settings.
255
+ * [BUGFIX] Media list now shows in network sites.
256
+ * [BUGFIX] Show Crawler Status button is working again.
257
+ * [UPDATE] Fixed a couple of potential PHP notices in the Network cache tab and when no vary group is set.
258
+ * [GUI] Added Learn More link to all setting pages.
259
+
260
+ = 1.8.2 - January 29 2018 =
261
+ * [NEW FEATURE] Instant Click in the Advanced tab.
262
+ * [NEW FEATURE] Import/Export settings.
263
+ * [NEW FEATURE] Opcode Cache support.
264
+ * [NEW FEATURE] Basic/Advanced setting view.
265
+ * [IMPROVEMENT] Added ARIA support in widget settings.
266
+ * [BUGFIX] Multiple WordPress instances with same Object Cache address will no longer see shared data.
267
+ * [BUGFIX] WebP Replacement may now be set at the Network level.
268
+ * [BUGFIX] Object Cache file can now be removed at the Network level uninstall.
269
+
270
+ = 1.8.1 - January 22 2018 =
271
+ * [NEW FEATURE] Object Cache now supports Redis.
272
+ * [IMPROVEMENT] Memcached Object Cache now supports authorization.
273
+ * [IMPROVEMENT] A 500 error will no longer be encountered when turning on Object Cache without the proper PHP extension installed.
274
+ * [BUGFIX] Object Cache settings can now be saved at the Network level.
275
+ * [BUGFIX] Mu-plugin now supports Network setting.
276
+ * [BUGFIX] Fixed admin bar showing inaccurate Edit Page link.
277
+ * [UPDATE] Removed warning information when no Memcached server is available.
278
+
279
+ = 1.8 - January 17 2018 =
280
+ * [NEW FEATURE] Object Cache.
281
+ * [REFACTOR] Refactored Log class.
282
+ * [REFACTOR] Refactored LSCWP basic const initialization.
283
+ * [BUGFIX] Fixed Cloudflare domain search breaking when saving more than 50 domains under a single account.
284
+ * [UPDATE] Log filter settings are now their own item in the wp-option table.
285
+
286
  = 1.7.2 - January 5 2018 =
287
  * [NEW FEATURE] Cloudflare API support.
288
  * [IMPROVEMENT] IAPI key can now be reset to avoid issues when domain is changed.
thirdparty/lscwp-3rd-woocommerce.cls.php CHANGED
@@ -634,7 +634,7 @@ class LiteSpeed_Cache_ThirdParty_WooCommerce
634
 
635
  $qs = sanitize_text_field($_SERVER["QUERY_STRING"]) ;
636
  $qs_len = strlen($qs) ;
637
- if ( ! empty($qs) && $qs_len >= 12 && strncmp($qs, 'add-to-cart=', 12) == 0 ) {
638
  LiteSpeed_Cache_API::set_nocache() ;
639
  return ;
640
  }
634
 
635
  $qs = sanitize_text_field($_SERVER["QUERY_STRING"]) ;
636
  $qs_len = strlen($qs) ;
637
+ if ( ! empty($qs) && $qs_len >= 12 && strpos( $qs, 'add-to-cart=' ) === 0 ) {
638
  LiteSpeed_Cache_API::set_nocache() ;
639
  return ;
640
  }
thirdparty/lscwp-registry-3rd.php CHANGED
@@ -35,5 +35,5 @@ $thirdparty_list = array(
35
  ) ;
36
 
37
  foreach ($thirdparty_list as $val) {
38
- include_once(LSWCP_DIR . 'thirdparty/lscwp-3rd-' . $val . '.cls.php') ;
39
  }
35
  ) ;
36
 
37
  foreach ($thirdparty_list as $val) {
38
+ include_once(LSCWP_DIR . 'thirdparty/lscwp-3rd-' . $val . '.cls.php') ;
39
  }