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