Version Description
- Nov 24 2019 =
- GUI New settings to limit News Feed to plugin page only.
Download this release
Release Info
Developer | hailite |
Plugin | LiteSpeed Cache |
Version | 2.9.9.2 |
Comparing to | |
See all releases |
Code changes from version 2.9.8.7 to 2.9.9.2
- admin/litespeed-cache-admin-display.class.php +112 -0
- admin/litespeed-cache-admin-report.class.php +6 -1
- admin/litespeed-cache-admin-settings.class.php +6 -3
- admin/tpl/inc/admin_footer.php +3 -2
- admin/tpl/report.php +52 -8
- admin/tpl/setting/settings_esi.php +4 -3
- admin/tpl/setting/settings_general.php +10 -0
- inc/activation.class.php +117 -0
- inc/const.cls.php +4 -2
- inc/control.class.php +1 -1
- inc/litespeed-cache.class.php +2 -2
- inc/litespeed.autoload.php +63 -8
- inc/log.class.php +11 -9
- inc/router.class.php +1 -1
- includes/litespeed-cache-activation.class.php +117 -0
- includes/litespeed-cache-control.class.php +1 -1
- includes/litespeed-cache-log.class.php +11 -9
- includes/litespeed-cache-router.class.php +1 -1
- includes/litespeed-cache.class.php +2 -2
- includes/litespeed.autoload.php +63 -8
- languages/litespeed-cache.pot +25 -23
- lib/litespeed/litespeed-crawler.class.php +1 -1
- lib/object-cache.php +8 -2
- litespeed-cache.php +1 -1
- readme.txt +21 -3
- thirdparty/lscwp-3rd-divi-theme-builder.cls.php +2 -1
- thirdparty/lscwp-3rd-elementor.cls.php +42 -0
- thirdparty/lscwp-registry-3rd.php +1 -0
admin/litespeed-cache-admin-display.class.php
CHANGED
@@ -120,6 +120,105 @@ class LiteSpeed_Cache_Admin_Display
|
|
120 |
add_action('wp_default_scripts', array($this, 'unset_update_text'), 20) ;
|
121 |
}
|
122 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
}
|
124 |
|
125 |
/**
|
@@ -524,12 +623,25 @@ class LiteSpeed_Cache_Admin_Display
|
|
524 |
}
|
525 |
delete_option( self::LITESPEED_MSG ) ;
|
526 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
527 |
/**
|
528 |
* Check promo msg first
|
529 |
* @since 2.9
|
530 |
*/
|
531 |
LiteSpeed_Cache_GUI::get_instance()->show_promo() ;
|
532 |
|
|
|
|
|
533 |
}
|
534 |
|
535 |
/**
|
120 |
add_action('wp_default_scripts', array($this, 'unset_update_text'), 20) ;
|
121 |
}
|
122 |
}
|
123 |
+
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Update latest release news for v3.0
|
128 |
+
*
|
129 |
+
* @since 2.9.9.1
|
130 |
+
*/
|
131 |
+
private function _fetch_recommended()
|
132 |
+
{
|
133 |
+
$news = get_option( 'litespeed-recommended', array() );
|
134 |
+
if ( ! empty( $news[ 'utime' ] ) && time() - $news[ 'utime' ] < 86400*1 ) {
|
135 |
+
return $news;
|
136 |
+
}
|
137 |
+
|
138 |
+
$data = LiteSpeed_Cache_Admin_API::post( 'news' );
|
139 |
+
$news[ 'utime' ] = time();
|
140 |
+
update_option( 'litespeed-recommended', $news );
|
141 |
+
if ( empty( $data[ 'id' ] ) ) {
|
142 |
+
return $news;
|
143 |
+
}
|
144 |
+
|
145 |
+
// Save news
|
146 |
+
if ( empty( $news[ 'id' ] ) || $news[ 'id' ] != $data[ 'id' ] ) {
|
147 |
+
$news[ 'id' ] = $data[ 'id' ];
|
148 |
+
$news[ 'plugin' ] = ! empty( $data[ 'plugin' ] ) ? $data[ 'plugin' ] : '';
|
149 |
+
$news[ 'title' ] = ! empty( $data[ 'title' ] ) ? $data[ 'title' ] : '';
|
150 |
+
$news[ 'content' ] = ! empty( $data[ 'content' ] ) ? $data[ 'content' ] : '';
|
151 |
+
$news[ 'zip' ] = ! empty( $data[ 'zip' ] ) ? $data[ 'zip' ] : '';
|
152 |
+
$news[ 'new' ] = 1;
|
153 |
+
|
154 |
+
if ( $news[ 'plugin' ] ) {
|
155 |
+
$plugin_info = LiteSpeed_Cache_Activation::get_instance()->dash_notifier_get_plugin_info( $news[ 'plugin' ] );
|
156 |
+
if ( $plugin_info && ! empty( $plugin_info->name ) ) {
|
157 |
+
$news[ 'plugin_name' ] = $plugin_info->name;
|
158 |
+
}
|
159 |
+
}
|
160 |
+
|
161 |
+
update_option( 'litespeed-recommended', $news );
|
162 |
+
}
|
163 |
+
|
164 |
+
return $news;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Load latest news
|
169 |
+
*
|
170 |
+
* @since 2.9.9.1
|
171 |
+
*/
|
172 |
+
private function _show_recommended()
|
173 |
+
{
|
174 |
+
// Fetch v3.0 info to show
|
175 |
+
$news = $this->_fetch_recommended();
|
176 |
+
if ( ! $news || empty( $news[ 'new' ] ) ) {
|
177 |
+
return;
|
178 |
+
}
|
179 |
+
|
180 |
+
if ( ! empty( $news[ 'plugin' ] ) && LiteSpeed_Cache_Activation::get_instance()->dash_notifier_is_plugin_active( $news[ 'plugin' ] ) ) {
|
181 |
+
return;
|
182 |
+
}
|
183 |
+
|
184 |
+
?>
|
185 |
+
<div class="litespeed-wrap notice notice-success litespeed-banner-promo-full">
|
186 |
+
|
187 |
+
<div class="litespeed-banner-promo-content">
|
188 |
+
<h3 class="litespeed-banner-title litespeed-top15"><?php echo $news[ 'title' ] ; ?></h3>
|
189 |
+
<div class="litespeed-banner-description">
|
190 |
+
<div class="litespeed-banner-description-padding-right-15">
|
191 |
+
<p class="litespeed-banner-desciption-content">
|
192 |
+
<?php echo $news[ 'content' ]; ?>
|
193 |
+
</p>
|
194 |
+
</div>
|
195 |
+
<div class="litespeed-row-flex litespeed-banner-description">
|
196 |
+
<div class="litespeed-banner-description-padding-right-15">
|
197 |
+
<?php if ( ! empty( $news[ 'plugin' ] ) ) : ?>
|
198 |
+
<?php $install_link = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_ACTIVATION, LiteSpeed_Cache_Activation::TYPE_INSTALL_3RD, false, null, array( 'plugin' => $news[ 'plugin' ] ) ); ?>
|
199 |
+
<a href="<?php echo $install_link ; ?>" class="litespeed-btn-success litespeed-btn-mini">
|
200 |
+
<?php echo __( 'Install', 'litespeed-cache' ); ?>
|
201 |
+
<?php if ( ! empty( $news[ 'plugin_name' ] ) ) echo $news[ 'plugin_name' ]; ?>
|
202 |
+
</a>
|
203 |
+
<?php endif; ?>
|
204 |
+
<?php if ( ! empty( $news[ 'zip' ] ) ) : ?>
|
205 |
+
<?php $install_link = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_ACTIVATION, LiteSpeed_Cache_Activation::TYPE_INSTALL_ZIP ); ?>
|
206 |
+
<a href="<?php echo $install_link ; ?>" class="litespeed-btn-success litespeed-btn-mini">
|
207 |
+
<?php echo __( 'Install Beta Version', 'litespeed-cache' ); ?>
|
208 |
+
</a>
|
209 |
+
<?php endif; ?>
|
210 |
+
</div>
|
211 |
+
</div>
|
212 |
+
</div>
|
213 |
+
</div>
|
214 |
+
|
215 |
+
<div>
|
216 |
+
<?php $dismiss_url = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_ACTIVATION, LiteSpeed_Cache_Activation::TYPE_DISMISS_RECOMMENDED ) ; ?>
|
217 |
+
<span class="screen-reader-text">Dismiss this notice.</span>
|
218 |
+
<a href="<?php echo $dismiss_url ; ?>" class="litespeed-notice-dismiss">X</a>
|
219 |
+
</div>
|
220 |
+
</div>
|
221 |
+
<?php
|
222 |
}
|
223 |
|
224 |
/**
|
623 |
}
|
624 |
delete_option( self::LITESPEED_MSG ) ;
|
625 |
|
626 |
+
if( empty($_GET['page']) || (substr($_GET['page'], 0, 8) !== 'lscache-' && $_GET['page'] !== 'litespeedcache') ) {
|
627 |
+
global $pagenow;
|
628 |
+
if ( $pagenow != 'plugins.php' ) { // && $pagenow != 'index.php'
|
629 |
+
return;
|
630 |
+
}
|
631 |
+
}
|
632 |
+
|
633 |
+
if ( ! LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPT_NEWS ) ) {
|
634 |
+
return;
|
635 |
+
}
|
636 |
+
|
637 |
/**
|
638 |
* Check promo msg first
|
639 |
* @since 2.9
|
640 |
*/
|
641 |
LiteSpeed_Cache_GUI::get_instance()->show_promo() ;
|
642 |
|
643 |
+
// Show version news
|
644 |
+
$this->_show_recommended();
|
645 |
}
|
646 |
|
647 |
/**
|
admin/litespeed-cache-admin-report.class.php
CHANGED
@@ -53,8 +53,13 @@ class LiteSpeed_Cache_Admin_Report
|
|
53 |
private function _post_env()
|
54 |
{
|
55 |
$report_con = $this->generate_environment_report() ;
|
|
|
|
|
|
|
|
|
56 |
$data = array(
|
57 |
'env' => $report_con,
|
|
|
58 |
) ;
|
59 |
|
60 |
$json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_ENV_REPORT, LiteSpeed_Cache_Utility::arr2str( $data ), false, true ) ;
|
@@ -178,7 +183,7 @@ class LiteSpeed_Cache_Admin_Report
|
|
178 |
$item_options = LiteSpeed_Cache_Config::get_instance()->stored_items() ;
|
179 |
foreach ( $item_options as $v ) {
|
180 |
// bypass main conf
|
181 |
-
if ( $v == LiteSpeed_Cache_Config::OPTION_NAME ) {
|
182 |
continue ;
|
183 |
}
|
184 |
$options[ $v ] = get_option( $v ) ;
|
53 |
private function _post_env()
|
54 |
{
|
55 |
$report_con = $this->generate_environment_report() ;
|
56 |
+
|
57 |
+
// Generate link
|
58 |
+
$link = ! empty( $_POST[ 'link' ] ) ? $_POST[ 'link' ] : '';
|
59 |
+
|
60 |
$data = array(
|
61 |
'env' => $report_con,
|
62 |
+
'link' => $link,
|
63 |
) ;
|
64 |
|
65 |
$json = LiteSpeed_Cache_Admin_API::post( LiteSpeed_Cache_Admin_API::IAPI_ACTION_ENV_REPORT, LiteSpeed_Cache_Utility::arr2str( $data ), false, true ) ;
|
183 |
$item_options = LiteSpeed_Cache_Config::get_instance()->stored_items() ;
|
184 |
foreach ( $item_options as $v ) {
|
185 |
// bypass main conf
|
186 |
+
if ( $v == LiteSpeed_Cache_Config::OPTION_NAME || $v == LiteSpeed_Cache_Config::ITEM_ENV_REF ) {
|
187 |
continue ;
|
188 |
}
|
189 |
$options[ $v ] = get_option( $v ) ;
|
admin/litespeed-cache-admin-settings.class.php
CHANGED
@@ -85,7 +85,7 @@ class LiteSpeed_Cache_Admin_Settings
|
|
85 |
$this->_validate_singlesite() ;
|
86 |
}
|
87 |
|
88 |
-
if ( LSWCP_ESI_SUPPORT ) {
|
89 |
$orig_esi_enabled = $this->_options[ LiteSpeed_Cache_Config::OPID_ESI_ENABLE ] ;
|
90 |
|
91 |
$this->_validate_esi() ;
|
@@ -95,7 +95,7 @@ class LiteSpeed_Cache_Admin_Settings
|
|
95 |
if ( $orig_esi_enabled !== $new_esi_enabled ) {
|
96 |
LiteSpeed_Cache_Purge::purge_all( 'ESI changed' ) ;
|
97 |
}
|
98 |
-
}
|
99 |
|
100 |
if ( ! empty( $this->_err ) ) {
|
101 |
add_settings_error( LiteSpeed_Cache_Config::OPTION_NAME, LiteSpeed_Cache_Config::OPTION_NAME, implode( '<br />', $this->_err ) ) ;
|
@@ -420,6 +420,8 @@ class LiteSpeed_Cache_Admin_Settings
|
|
420 |
}
|
421 |
}
|
422 |
|
|
|
|
|
423 |
}
|
424 |
|
425 |
/**
|
@@ -1199,7 +1201,8 @@ class LiteSpeed_Cache_Admin_Settings
|
|
1199 |
}
|
1200 |
|
1201 |
// Save vary group settings
|
1202 |
-
$
|
|
|
1203 |
}
|
1204 |
|
1205 |
/**
|
85 |
$this->_validate_singlesite() ;
|
86 |
}
|
87 |
|
88 |
+
// if ( LSWCP_ESI_SUPPORT ) {
|
89 |
$orig_esi_enabled = $this->_options[ LiteSpeed_Cache_Config::OPID_ESI_ENABLE ] ;
|
90 |
|
91 |
$this->_validate_esi() ;
|
95 |
if ( $orig_esi_enabled !== $new_esi_enabled ) {
|
96 |
LiteSpeed_Cache_Purge::purge_all( 'ESI changed' ) ;
|
97 |
}
|
98 |
+
// }
|
99 |
|
100 |
if ( ! empty( $this->_err ) ) {
|
101 |
add_settings_error( LiteSpeed_Cache_Config::OPTION_NAME, LiteSpeed_Cache_Config::OPTION_NAME, implode( '<br />', $this->_err ) ) ;
|
420 |
}
|
421 |
}
|
422 |
|
423 |
+
$id = LiteSpeed_Cache_Config::OPT_NEWS ;
|
424 |
+
$this->_options[ $id ] = self::parse_onoff( $this->_input, $id ) ;
|
425 |
}
|
426 |
|
427 |
/**
|
1201 |
}
|
1202 |
|
1203 |
// Save vary group settings
|
1204 |
+
$id = LiteSpeed_Cache_Config::VARY_GROUP;
|
1205 |
+
update_option( $id, ! empty( $this->_input[ $id ] ) ? $this->_input[ $id ] : array() ) ;
|
1206 |
}
|
1207 |
|
1208 |
/**
|
admin/tpl/inc/admin_footer.php
CHANGED
@@ -2,15 +2,16 @@
|
|
2 |
if (!defined('WPINC')) die;
|
3 |
|
4 |
// ✮✮✮✮✮
|
|
|
5 |
$rate_us = '<a href="https://wordpress.org/support/plugin/litespeed-cache/reviews/?filter=5#new-post" rel="noopener noreferer" target="_blank">'
|
6 |
-
. sprintf( __( 'Rate %s on %s', 'litespeed-cache' ), '<strong>' . __( 'LiteSpeed Cache', 'litespeed-cache' ) . '</strong>', 'WordPress.org' )
|
7 |
. '</a>' ;
|
8 |
|
9 |
$wiki = '<a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp" target="_blank">' . __( 'Read LiteSpeed Wiki', 'litespeed-cache' ) . '</a>' ;
|
10 |
|
11 |
$forum = '<a href="https://wordpress.org/support/plugin/litespeed-cache" target="_blank">' . __( 'Visit LSCWP support forum', 'litespeed-cache' ) . '</a>' ;
|
12 |
|
13 |
-
$community = '<a href="https://
|
14 |
|
15 |
// Change the footer text
|
16 |
if ( ! is_multisite() || is_network_admin() ) {
|
2 |
if (!defined('WPINC')) die;
|
3 |
|
4 |
// ✮✮✮✮✮
|
5 |
+
$stars = '<span class="wporg-ratings rating-stars"><span class="dashicons dashicons-star-filled" style="color:#ffb900 !important;"></span><span class="dashicons dashicons-star-filled" style="color:#ffb900 !important;"></span><span class="dashicons dashicons-star-filled" style="color:#ffb900 !important;"></span><span class="dashicons dashicons-star-filled" style="color:#ffb900 !important;"></span><span class="dashicons dashicons-star-filled" style="color:#ffb900 !important;"></span></span>';
|
6 |
$rate_us = '<a href="https://wordpress.org/support/plugin/litespeed-cache/reviews/?filter=5#new-post" rel="noopener noreferer" target="_blank">'
|
7 |
+
. sprintf( __( 'Rate %s on %s', 'litespeed-cache' ), '<strong>' . __( 'LiteSpeed Cache', 'litespeed-cache' ) . $stars . '</strong>', 'WordPress.org' )
|
8 |
. '</a>' ;
|
9 |
|
10 |
$wiki = '<a href="https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp" target="_blank">' . __( 'Read LiteSpeed Wiki', 'litespeed-cache' ) . '</a>' ;
|
11 |
|
12 |
$forum = '<a href="https://wordpress.org/support/plugin/litespeed-cache" target="_blank">' . __( 'Visit LSCWP support forum', 'litespeed-cache' ) . '</a>' ;
|
13 |
|
14 |
+
$community = '<a href="https://litespeedtech.com/slack" target="_blank">' . __( 'Join LiteSpeed Slack community', 'litespeed-cache' ) . '</a>' ;
|
15 |
|
16 |
// Change the footer text
|
17 |
if ( ! is_multisite() || is_network_admin() ) {
|
admin/tpl/report.php
CHANGED
@@ -6,6 +6,21 @@ $report = $_report->generate_environment_report();
|
|
6 |
|
7 |
$env_ref = $_report->get_env_ref() ;
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
?>
|
10 |
|
11 |
<div class="wrap">
|
@@ -20,19 +35,20 @@ $env_ref = $_report->get_env_ref() ;
|
|
20 |
|
21 |
<div class="litespeed-wrap">
|
22 |
<div class="litespeed-body">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
<h3 class="litespeed-title"><?php echo __('LiteSpeed Report Number', 'litespeed-cache') ; ?></h3>
|
25 |
|
26 |
<p><?php echo __('Report number', 'litespeed-cache') ; ?>: <b><?php echo $env_ref[ 'num' ] ; ?></b></p>
|
27 |
<p><?php echo __('Report date', 'litespeed-cache') ; ?>: <b><?php echo $env_ref[ 'dateline' ] ; ?></b></p>
|
28 |
|
29 |
-
<a href="<?php echo LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_REPORT, LiteSpeed_Cache_Admin_Report::TYPE_SEND_REPORT ) ; ?>" class="litespeed-btn-warning">
|
30 |
-
<?php echo __( 'Send To LiteSpeed', 'litespeed-cache' ) ; ?>
|
31 |
-
</a>
|
32 |
-
<span class="litespeed-desc">
|
33 |
-
<?php echo __( 'Send this report to LiteSpeed. Refer to this report number when posting in the WordPress support forum.', 'litespeed-cache' ) ; ?>
|
34 |
-
</span>
|
35 |
-
|
36 |
<?php include_once LSCWP_DIR . "admin/tpl/inc/api_key.php" ; ?>
|
37 |
|
38 |
<h3 class="litespeed-title"><?php echo __('Report Summary', 'litespeed-cache') ; ?></h3>
|
@@ -41,7 +57,35 @@ $env_ref = $_report->get_env_ref() ;
|
|
41 |
<br />
|
42 |
<?php echo __('If you run into any issues, please refer to the report number in your support message.', 'litespeed-cache'); ?>
|
43 |
</div>
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
</div>
|
47 |
</div>
|
6 |
|
7 |
$env_ref = $_report->get_env_ref() ;
|
8 |
|
9 |
+
// Detect password less plugin
|
10 |
+
$link = '';
|
11 |
+
$has_pswdless_plugin = false;
|
12 |
+
if ( function_exists( 'dologin_gen_link' ) ) {
|
13 |
+
$has_pswdless_plugin = true;
|
14 |
+
if ( ! empty( $_GET[ 'dologin_gen_link' ] ) ) {
|
15 |
+
unset( $_GET[ 'dologin_gen_link' ] );
|
16 |
+
$link = dologin_gen_link( 'Litespeed Report' );
|
17 |
+
?>
|
18 |
+
<script>window.history.pushState( 'remove_gen_link', document.title, window.location.href.replace( '&dologin_gen_link=1', '' ) );</script>
|
19 |
+
<?php
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
$install_link = LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_ACTIVATION, LiteSpeed_Cache_Activation::TYPE_INSTALL_3RD, false, null, array( 'plugin' => 'dologin' ) );
|
24 |
?>
|
25 |
|
26 |
<div class="wrap">
|
35 |
|
36 |
<div class="litespeed-wrap">
|
37 |
<div class="litespeed-body">
|
38 |
+
<?php if ( ! $has_pswdless_plugin ) : ?>
|
39 |
+
<div class="litespeed-callout-danger">
|
40 |
+
<h4><?php echo __('NOTICE:', 'litespeed-cache'); ?></h4>
|
41 |
+
<?php echo sprintf( __('To generate a passwordless link for LiteSpeed Support Team access, you must install %s.', 'litespeed-cache'), '<a href="https://wordpress.org/plugins/dologin/" target="_blank">DoLogin Security</a>' ); ?>
|
42 |
+
<a href="<?php echo $install_link; ?>" class="litespeed-btn-success"><?php echo __('Automatically Install', 'litespeed-cache'); ?></a>
|
43 |
+
<a href="plugin-install.php?s=dologin+security&tab=search&type=term" target="_blank"><?php echo __('Manually Install', 'litespeed-cache'); ?></a>
|
44 |
+
</div>
|
45 |
+
<?php endif; ?>
|
46 |
|
47 |
<h3 class="litespeed-title"><?php echo __('LiteSpeed Report Number', 'litespeed-cache') ; ?></h3>
|
48 |
|
49 |
<p><?php echo __('Report number', 'litespeed-cache') ; ?>: <b><?php echo $env_ref[ 'num' ] ; ?></b></p>
|
50 |
<p><?php echo __('Report date', 'litespeed-cache') ; ?>: <b><?php echo $env_ref[ 'dateline' ] ; ?></b></p>
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
<?php include_once LSCWP_DIR . "admin/tpl/inc/api_key.php" ; ?>
|
53 |
|
54 |
<h3 class="litespeed-title"><?php echo __('Report Summary', 'litespeed-cache') ; ?></h3>
|
57 |
<br />
|
58 |
<?php echo __('If you run into any issues, please refer to the report number in your support message.', 'litespeed-cache'); ?>
|
59 |
</div>
|
60 |
+
|
61 |
+
<form action="<?php echo LiteSpeed_Cache_Utility::build_url( LiteSpeed_Cache::ACTION_REPORT, LiteSpeed_Cache_Admin_Report::TYPE_SEND_REPORT ) ; ?>" method="post">
|
62 |
+
|
63 |
+
<textarea id="litespeed-report" rows="20" cols="100" readonly><?php echo $report; ?></textarea>
|
64 |
+
|
65 |
+
<p>
|
66 |
+
Link: <input type="text" class="litespeed-regular-text" id="litespeed-report-link" name="link" value="<?php echo $link; ?>" />
|
67 |
+
<?php if ( $has_pswdless_plugin ) : ?>
|
68 |
+
<a href="<?php echo admin_url( 'admin.php?page=lscache-report&dologin_gen_link=1' ); ?>"><?php echo __( 'Generate Passwordless Link for Current User', 'litespeed-cache' ) ; ?></a>
|
69 |
+
<?php else: ?>
|
70 |
+
<a href="<?php echo $install_link; ?>" class="litespeed-btn-success"><?php echo __( 'Install DoLogin Security to Generate Passwordless Link', 'litespeed-cache' ) ; ?></a>
|
71 |
+
<?php endif; ?>
|
72 |
+
</p>
|
73 |
+
<p>
|
74 |
+
<?php if ( $link ) : ?>
|
75 |
+
<strong><?php echo __('Please do NOT share the above passwordless link with anyone.', 'litespeed-cache'); ?></strong>
|
76 |
+
<strong><?php echo sprintf( __('Generated links may be managed under <a %s>Settings</a>.', 'litespeed-cache'), 'href="' . menu_page_url( 'dologin', 0 ) . '"' ); ?></strong>
|
77 |
+
<?php endif; ?>
|
78 |
+
</p>
|
79 |
+
|
80 |
+
<p class="litespeed-desc"><?php echo __( 'To grant wp-admin access to the LiteSpeed Support Team, please generate a passwordless link for the current logged-in user to be sent with the report.', 'litespeed-cache' ) ; ?></p>
|
81 |
+
|
82 |
+
<button class="litespeed-btn-warning" type="submit">
|
83 |
+
<?php echo __( 'Send To LiteSpeed', 'litespeed-cache' ) ; ?>
|
84 |
+
</button>
|
85 |
+
<span class="litespeed-desc">
|
86 |
+
<?php echo __( 'Send this report to LiteSpeed. Refer to this report number when posting in the WordPress support forum.', 'litespeed-cache' ) ; ?>
|
87 |
+
</span>
|
88 |
+
</form>
|
89 |
|
90 |
</div>
|
91 |
</div>
|
admin/tpl/setting/settings_esi.php
CHANGED
@@ -32,9 +32,10 @@ if ( ! defined( 'WPINC' ) ) die ;
|
|
32 |
|
33 |
<div class="litespeed-relative">
|
34 |
|
35 |
-
<?php if ( !
|
36 |
-
<div class="litespeed-
|
37 |
-
<
|
|
|
38 |
</div>
|
39 |
<?php endif; ?>
|
40 |
|
32 |
|
33 |
<div class="litespeed-relative">
|
34 |
|
35 |
+
<?php if ( LITESPEED_SERVER_TYPE === 'LITESPEED_SERVER_OLS' && ! $_options[ LiteSpeed_Cache_Config::OPT_CDN_QUIC ] ) : ?>
|
36 |
+
<div class="litespeed-callout-danger">
|
37 |
+
<h4><?php echo __( 'WARNING', 'litespeed-cache' ) ; ?></h4>
|
38 |
+
<h4><?php echo __('These options are only available with LiteSpeed Enterprise Web Server or QUIC.cloud CDN.', 'litespeed-cache'); ?></h4>
|
39 |
</div>
|
40 |
<?php endif; ?>
|
41 |
|
admin/tpl/setting/settings_general.php
CHANGED
@@ -150,5 +150,15 @@ if (!defined('WPINC')) die;
|
|
150 |
<?php require LSCWP_DIR . 'admin/tpl/setting/settings_inc.auto_upgrade.php'; ?>
|
151 |
<?php endif ; ?>
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
</tbody></table>
|
154 |
|
150 |
<?php require LSCWP_DIR . 'admin/tpl/setting/settings_inc.auto_upgrade.php'; ?>
|
151 |
<?php endif ; ?>
|
152 |
|
153 |
+
<tr>
|
154 |
+
<th><?php echo __( 'Automatically Feed News', 'litespeed-cache' ) ; ?></th>
|
155 |
+
<td>
|
156 |
+
<?php $this->build_switch( LiteSpeed_Cache_Config::OPT_NEWS ) ; ?>
|
157 |
+
<div class="litespeed-desc">
|
158 |
+
<?php echo __( 'Turn this option ON to show latest news automatically, including hotfixes, new releases, available beta versions, promotions.', 'litespeed-cache' ) ; ?>
|
159 |
+
</div>
|
160 |
+
</td>
|
161 |
+
</tr>
|
162 |
+
|
163 |
</tbody></table>
|
164 |
|
inc/activation.class.php
CHANGED
@@ -18,6 +18,9 @@ class LiteSpeed_Cache_Activation
|
|
18 |
private static $_instance ;
|
19 |
|
20 |
const TYPE_UPGRADE = 'upgrade' ;
|
|
|
|
|
|
|
21 |
|
22 |
const NETWORK_TRANSIENT_COUNT = 'lscwp_network_count' ;
|
23 |
|
@@ -394,6 +397,101 @@ class LiteSpeed_Cache_Activation
|
|
394 |
LiteSpeed_Cache_Admin_Display::succeed( __( 'Upgraded successfully.', 'litespeed-cache' ) ) ;
|
395 |
}
|
396 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
/**
|
398 |
* Handle all request actions from main cls
|
399 |
*
|
@@ -411,6 +509,25 @@ class LiteSpeed_Cache_Activation
|
|
411 |
$instance->upgrade() ;
|
412 |
break ;
|
413 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
default:
|
415 |
break ;
|
416 |
}
|
18 |
private static $_instance ;
|
19 |
|
20 |
const TYPE_UPGRADE = 'upgrade' ;
|
21 |
+
const TYPE_INSTALL_3RD = 'install_3rd' ;
|
22 |
+
const TYPE_INSTALL_ZIP = 'install_zip' ;
|
23 |
+
const TYPE_DISMISS_RECOMMENDED = 'dismiss_recommended' ;
|
24 |
|
25 |
const NETWORK_TRANSIENT_COUNT = 'lscwp_network_count' ;
|
26 |
|
397 |
LiteSpeed_Cache_Admin_Display::succeed( __( 'Upgraded successfully.', 'litespeed-cache' ) ) ;
|
398 |
}
|
399 |
|
400 |
+
/**
|
401 |
+
* Detect if the plugin is active or not
|
402 |
+
*
|
403 |
+
* @since 1.0
|
404 |
+
*/
|
405 |
+
public function dash_notifier_is_plugin_active( $plugin )
|
406 |
+
{
|
407 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ) ;
|
408 |
+
|
409 |
+
$plugin_path = $plugin . '/' . $plugin . '.php' ;
|
410 |
+
|
411 |
+
return is_plugin_active( $plugin_path ) ;
|
412 |
+
}
|
413 |
+
|
414 |
+
/**
|
415 |
+
* Detect if the plugin is installed or not
|
416 |
+
*
|
417 |
+
* @since 1.0
|
418 |
+
*/
|
419 |
+
public function dash_notifier_is_plugin_installed( $plugin )
|
420 |
+
{
|
421 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ) ;
|
422 |
+
|
423 |
+
$plugin_path = $plugin . '/' . $plugin . '.php' ;
|
424 |
+
|
425 |
+
$valid = validate_plugin( $plugin_path ) ;
|
426 |
+
|
427 |
+
return ! is_wp_error( $valid ) ;
|
428 |
+
}
|
429 |
+
|
430 |
+
/**
|
431 |
+
* Grab a plugin info from WordPress
|
432 |
+
*
|
433 |
+
* @since 1.0
|
434 |
+
*/
|
435 |
+
public function dash_notifier_get_plugin_info( $slug )
|
436 |
+
{
|
437 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ) ;
|
438 |
+
$result = plugins_api( 'plugin_information', array( 'slug' => $slug ) ) ;
|
439 |
+
|
440 |
+
if ( is_wp_error( $result ) ) {
|
441 |
+
return false ;
|
442 |
+
}
|
443 |
+
|
444 |
+
return $result ;
|
445 |
+
}
|
446 |
+
|
447 |
+
/**
|
448 |
+
* Install the 3rd party plugin
|
449 |
+
*
|
450 |
+
* @since 1.0
|
451 |
+
*/
|
452 |
+
public function dash_notifier_install_3rd()
|
453 |
+
{
|
454 |
+
! defined( 'SILENCE_INSTALL' ) && define( 'SILENCE_INSTALL', true );
|
455 |
+
|
456 |
+
$slug = ! empty( $_GET[ 'plugin' ] ) ? $_GET[ 'plugin' ] : false;
|
457 |
+
|
458 |
+
// Check if plugin is installed already
|
459 |
+
if ( ! $slug || $this->dash_notifier_is_plugin_active( $slug ) ) {
|
460 |
+
return ;
|
461 |
+
}
|
462 |
+
|
463 |
+
/**
|
464 |
+
* @see wp-admin/update.php
|
465 |
+
*/
|
466 |
+
include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ;
|
467 |
+
include_once ABSPATH . 'wp-admin/includes/file.php' ;
|
468 |
+
include_once ABSPATH . 'wp-admin/includes/misc.php' ;
|
469 |
+
|
470 |
+
$plugin_path = $slug . '/' . $slug . '.php' ;
|
471 |
+
|
472 |
+
if ( ! $this->dash_notifier_is_plugin_installed( $slug ) ) {
|
473 |
+
$plugin_info = $this->dash_notifier_get_plugin_info( $slug ) ;
|
474 |
+
if ( ! $plugin_info ) {
|
475 |
+
return ;
|
476 |
+
}
|
477 |
+
// Try to install plugin
|
478 |
+
try {
|
479 |
+
ob_start() ;
|
480 |
+
$skin = new \Automatic_Upgrader_Skin() ;
|
481 |
+
$upgrader = new \Plugin_Upgrader( $skin ) ;
|
482 |
+
$result = $upgrader->install( $plugin_info->download_link ) ;
|
483 |
+
ob_end_clean() ;
|
484 |
+
} catch ( \Exception $e ) {
|
485 |
+
return ;
|
486 |
+
}
|
487 |
+
}
|
488 |
+
|
489 |
+
if ( ! is_plugin_active( $plugin_path ) ) {
|
490 |
+
activate_plugin( $plugin_path ) ;
|
491 |
+
}
|
492 |
+
|
493 |
+
}
|
494 |
+
|
495 |
/**
|
496 |
* Handle all request actions from main cls
|
497 |
*
|
509 |
$instance->upgrade() ;
|
510 |
break ;
|
511 |
|
512 |
+
case self::TYPE_INSTALL_3RD :
|
513 |
+
$instance->dash_notifier_install_3rd() ;
|
514 |
+
break ;
|
515 |
+
|
516 |
+
case self::TYPE_DISMISS_RECOMMENDED :
|
517 |
+
$news = get_option( 'litespeed-recommended', array() );
|
518 |
+
$news[ 'new' ] = 0;
|
519 |
+
update_option( 'litespeed-recommended', $news );
|
520 |
+
break ;
|
521 |
+
|
522 |
+
case self::TYPE_INSTALL_ZIP :
|
523 |
+
$news = get_option( 'litespeed-recommended', array() );
|
524 |
+
if ( ! empty( $news[ 'zip' ] ) ) {
|
525 |
+
$news[ 'new' ] = 0;
|
526 |
+
update_option( 'litespeed-recommended', $news );
|
527 |
+
LiteSpeed_Cache_Log::get_instance()->beta_test( $news[ 'zip' ] );
|
528 |
+
}
|
529 |
+
break ;
|
530 |
+
|
531 |
default:
|
532 |
break ;
|
533 |
}
|
inc/const.cls.php
CHANGED
@@ -70,6 +70,7 @@ class LiteSpeed_Cache_Const
|
|
70 |
const OPID_ENABLED_RADIO = 'radio_select' ;
|
71 |
|
72 |
const OPT_AUTO_UPGRADE = 'auto_upgrade' ;
|
|
|
73 |
const OPID_CACHE_PRIV = 'cache_priv' ;
|
74 |
const OPID_CACHE_COMMENTER = 'cache_commenter' ;
|
75 |
const OPID_CACHE_REST = 'cache_rest' ;
|
@@ -432,6 +433,7 @@ class LiteSpeed_Cache_Const
|
|
432 |
self::OPID_VERSION => LiteSpeed_Cache::PLUGIN_VERSION,
|
433 |
self::OPID_ENABLED_RADIO => $default_radio,
|
434 |
self::OPT_AUTO_UPGRADE => false,
|
|
|
435 |
self::OPID_PURGE_ON_UPGRADE => true,
|
436 |
self::OPID_CACHE_PRIV => true,
|
437 |
self::OPID_CACHE_COMMENTER => true,
|
@@ -562,11 +564,11 @@ class LiteSpeed_Cache_Const
|
|
562 |
self::CRWL_CRON_ACTIVE => false,
|
563 |
) ;
|
564 |
|
565 |
-
if ( LSWCP_ESI_SUPPORT ) {
|
566 |
$default_options[self::OPID_ESI_ENABLE] = false ;
|
567 |
$default_options[self::OPID_ESI_CACHE_ADMBAR] = true ;
|
568 |
$default_options[self::OPID_ESI_CACHE_COMMFORM] = true ;
|
569 |
-
}
|
570 |
|
571 |
// Load default.ini
|
572 |
if ( file_exists( LSCWP_DIR . 'data/const.default.ini' ) ) {
|
70 |
const OPID_ENABLED_RADIO = 'radio_select' ;
|
71 |
|
72 |
const OPT_AUTO_UPGRADE = 'auto_upgrade' ;
|
73 |
+
const OPT_NEWS = 'news' ;
|
74 |
const OPID_CACHE_PRIV = 'cache_priv' ;
|
75 |
const OPID_CACHE_COMMENTER = 'cache_commenter' ;
|
76 |
const OPID_CACHE_REST = 'cache_rest' ;
|
433 |
self::OPID_VERSION => LiteSpeed_Cache::PLUGIN_VERSION,
|
434 |
self::OPID_ENABLED_RADIO => $default_radio,
|
435 |
self::OPT_AUTO_UPGRADE => false,
|
436 |
+
self::OPT_NEWS => false,
|
437 |
self::OPID_PURGE_ON_UPGRADE => true,
|
438 |
self::OPID_CACHE_PRIV => true,
|
439 |
self::OPID_CACHE_COMMENTER => true,
|
564 |
self::CRWL_CRON_ACTIVE => false,
|
565 |
) ;
|
566 |
|
567 |
+
// if ( LSWCP_ESI_SUPPORT ) {
|
568 |
$default_options[self::OPID_ESI_ENABLE] = false ;
|
569 |
$default_options[self::OPID_ESI_CACHE_ADMBAR] = true ;
|
570 |
$default_options[self::OPID_ESI_CACHE_COMMFORM] = true ;
|
571 |
+
// }
|
572 |
|
573 |
// Load default.ini
|
574 |
if ( file_exists( LSCWP_DIR . 'data/const.default.ini' ) ) {
|
inc/control.class.php
CHANGED
@@ -482,7 +482,7 @@ class LiteSpeed_Cache_Control
|
|
482 |
{
|
483 |
$esi_hdr = '' ;
|
484 |
// Fix cli `uninstall --deactivate` fatal err
|
485 |
-
if (
|
486 |
$esi_hdr = ',esi=on' ;
|
487 |
}
|
488 |
|
482 |
{
|
483 |
$esi_hdr = '' ;
|
484 |
// Fix cli `uninstall --deactivate` fatal err
|
485 |
+
if ( class_exists( 'LiteSpeed_Cache_ESI' ) && LiteSpeed_Cache_ESI::has_esi() ) {
|
486 |
$esi_hdr = ',esi=on' ;
|
487 |
}
|
488 |
|
inc/litespeed-cache.class.php
CHANGED
@@ -26,7 +26,7 @@ class LiteSpeed_Cache
|
|
26 |
const NAME = 'LiteSpeed Cache' ;
|
27 |
const PLUGIN_NAME = 'litespeed-cache' ;
|
28 |
const PLUGIN_FILE = 'litespeed-cache/litespeed-cache.php' ;
|
29 |
-
const PLUGIN_VERSION = '2.9.
|
30 |
|
31 |
const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
|
32 |
|
@@ -231,7 +231,7 @@ class LiteSpeed_Cache
|
|
231 |
{
|
232 |
LiteSpeed_Cache_Router::get_instance()->is_crawler_role_simulation() ;
|
233 |
|
234 |
-
if ( $result = LiteSpeed_Cache_Config::get_instance()->in_exclude_optimization_roles() ) {
|
235 |
LiteSpeed_Cache_Log::debug( '[Core] ⛑️ bypass_optm: hit Role Excludes setting: ' . $result ) ;
|
236 |
! defined( 'LITESPEED_BYPASS_OPTM' ) && define( 'LITESPEED_BYPASS_OPTM', true ) ;
|
237 |
}
|
26 |
const NAME = 'LiteSpeed Cache' ;
|
27 |
const PLUGIN_NAME = 'litespeed-cache' ;
|
28 |
const PLUGIN_FILE = 'litespeed-cache/litespeed-cache.php' ;
|
29 |
+
const PLUGIN_VERSION = '2.9.9.2' ;
|
30 |
|
31 |
const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
|
32 |
|
231 |
{
|
232 |
LiteSpeed_Cache_Router::get_instance()->is_crawler_role_simulation() ;
|
233 |
|
234 |
+
if ( ! is_admin() && $result = LiteSpeed_Cache_Config::get_instance()->in_exclude_optimization_roles() ) {
|
235 |
LiteSpeed_Cache_Log::debug( '[Core] ⛑️ bypass_optm: hit Role Excludes setting: ' . $result ) ;
|
236 |
! defined( 'LITESPEED_BYPASS_OPTM' ) && define( 'LITESPEED_BYPASS_OPTM', true ) ;
|
237 |
}
|
inc/litespeed.autoload.php
CHANGED
@@ -83,14 +83,69 @@ if ( !function_exists('_litespeed_autoload') ) {
|
|
83 |
|
84 |
spl_autoload_register('_litespeed_autoload');
|
85 |
|
|
|
86 |
/**
|
87 |
-
*
|
88 |
-
*
|
89 |
-
* @since 1.2.2
|
90 |
*/
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
}
|
83 |
|
84 |
spl_autoload_register('_litespeed_autoload');
|
85 |
|
86 |
+
|
87 |
/**
|
88 |
+
* Tmp preload all for v3.0
|
89 |
+
* @since v2.9.9
|
|
|
90 |
*/
|
91 |
+
$class2fileArr = array(
|
92 |
+
'Litespeed_Crawler' => 'lib/litespeed/litespeed-crawler.class.php',
|
93 |
+
'Litespeed_File' => 'lib/litespeed/litespeed-file.class.php',
|
94 |
+
'Litespeed_String' => 'lib/litespeed/litespeed-string.class.php',
|
95 |
+
|
96 |
+
'LiteSpeed_Cache' => 'inc/litespeed-cache.class.php',
|
97 |
+
'LiteSpeed_Cache_Activation' => 'inc/activation.class.php',
|
98 |
+
'LiteSpeed_Cache_API' => 'inc/api.class.php',
|
99 |
+
'LiteSpeed_Cache_CDN' => 'inc/cdn.class.php',
|
100 |
+
'LiteSpeed_Cache_CDN_Cloudflare' => 'inc/cdn/cloudflare.class.php',
|
101 |
+
'LiteSpeed_Cache_CDN_Quic' => 'inc/cdn/quic.class.php',
|
102 |
+
'LiteSpeed_Cache_Config' => 'inc/config.class.php',
|
103 |
+
'LiteSpeed_Cache_Control' => 'inc/control.class.php',
|
104 |
+
'LiteSpeed_Cache_Const' => 'inc/const.cls.php',
|
105 |
+
'LiteSpeed_Cache_Crawler' => 'inc/crawler.class.php',
|
106 |
+
'LiteSpeed_Cache_Crawler_Sitemap' => 'inc/crawler-sitemap.class.php',
|
107 |
+
'LiteSpeed_Cache_CSS' => 'inc/css.cls.php',
|
108 |
+
'LiteSpeed_Cache_Data' => 'inc/data.class.php',
|
109 |
+
'LiteSpeed_Cache_Doc' => 'inc/doc.cls.php',
|
110 |
+
'LiteSpeed_Cache_ESI' => 'inc/esi.class.php',
|
111 |
+
'LiteSpeed_Cache_GUI' => 'inc/gui.class.php',
|
112 |
+
'LiteSpeed_Cache_Import' => 'inc/import.class.php',
|
113 |
+
'LiteSpeed_Cache_Img_Optm' => 'inc/img_optm.class.php',
|
114 |
+
'LiteSpeed_Cache_Log' => 'inc/log.class.php',
|
115 |
+
'LiteSpeed_Cache_Media' => 'inc/media.class.php',
|
116 |
+
'LiteSpeed_Cache_Object' => 'inc/object.class.php',
|
117 |
+
'LiteSpeed_Cache_Optimize' => 'inc/optimize.class.php',
|
118 |
+
'LiteSpeed_Cache_Optimizer' => 'inc/optimizer.class.php',
|
119 |
+
'LiteSpeed_Cache_Purge' => 'inc/purge.class.php',
|
120 |
+
'LiteSpeed_Cache_REST' => 'inc/rest.cls.php',
|
121 |
+
'LiteSpeed_Cache_Router' => 'inc/router.class.php',
|
122 |
+
'LiteSpeed_Cache_Tag' => 'inc/tag.class.php',
|
123 |
+
'LiteSpeed_Cache_Task' => 'inc/task.class.php',
|
124 |
+
'LiteSpeed_Cache_Vary' => 'inc/vary.class.php',
|
125 |
+
'LiteSpeed_Cache_Utility' => 'inc/utility.class.php',
|
126 |
+
|
127 |
+
'LiteSpeed_Cache_Admin' => 'admin/litespeed-cache-admin.class.php',
|
128 |
+
'LiteSpeed_Cache_Admin_API' => 'admin/admin-api.class.php',
|
129 |
+
'LiteSpeed_Cache_Admin_Display' => 'admin/litespeed-cache-admin-display.class.php',
|
130 |
+
'LiteSpeed_Cache_Admin_Error' => 'admin/litespeed-cache-admin-error.class.php',
|
131 |
+
'LiteSpeed_Cache_Admin_Optimize' => 'admin/litespeed-cache-admin-optimize.class.php',
|
132 |
+
'LiteSpeed_Cache_Admin_Report' => 'admin/litespeed-cache-admin-report.class.php',
|
133 |
+
'LiteSpeed_Cache_Admin_Rules' => 'admin/litespeed-cache-admin-rules.class.php',
|
134 |
+
'LiteSpeed_Cache_Admin_Settings' => 'admin/litespeed-cache-admin-settings.class.php',
|
135 |
+
|
136 |
+
'LiteSpeed_Cache_Cli_Admin' => 'cli/litespeed-cache-cli-admin.class.php',
|
137 |
+
'LiteSpeed_Cache_CLI_IAPI' => 'cli/litespeed-cache-cli-iapi.class.php',
|
138 |
+
'LiteSpeed_Cache_Cli_Purge' => 'cli/litespeed-cache-cli-purge.class.php',
|
139 |
+
|
140 |
+
'LiteSpeed_Cache_Tags' => 'includes/deprecated-litespeed-cache-tags.class.php',
|
141 |
+
|
142 |
+
'LiteSpeed_3rd_Lib\Minify_HTML' => 'lib/html_min.class.php',
|
143 |
+
'LiteSpeed_3rd_Lib\css_min\Minifier' => 'lib/css_min.class.php',
|
144 |
+
'LiteSpeed_3rd_Lib\css_min\Colors' => 'lib/css_min.colors.class.php',
|
145 |
+
'LiteSpeed_3rd_Lib\css_min\Utils' => 'lib/css_min.utils.class.php',
|
146 |
+
'LiteSpeed_3rd_Lib\css_min\UriRewriter' => 'lib/css_min.url_rewritter.class.php',
|
147 |
+
'LiteSpeed_3rd_Lib\js_min\JSMin' => 'lib/js_min.class.php',
|
148 |
+
);
|
149 |
+
foreach ( $class2fileArr as $v ) {
|
150 |
+
require_once LSCWP_DIR . $v ;
|
151 |
}
|
inc/log.class.php
CHANGED
@@ -56,17 +56,19 @@ class LiteSpeed_Cache_Log
|
|
56 |
* Beta test upgrade
|
57 |
*
|
58 |
* @since 2.9.5
|
59 |
-
* @access
|
60 |
*/
|
61 |
-
|
62 |
{
|
63 |
-
if (
|
64 |
-
|
65 |
-
|
|
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
70 |
|
71 |
if ( ! $zip ) {
|
72 |
LiteSpeed_Cache_Log::debug( '[Log] ❌ No ZIP file' ) ;
|
@@ -468,7 +470,7 @@ class LiteSpeed_Cache_Log
|
|
468 |
break ;
|
469 |
|
470 |
case self::TYPE_BETA_TEST :
|
471 |
-
$instance->
|
472 |
break ;
|
473 |
|
474 |
default:
|
56 |
* Beta test upgrade
|
57 |
*
|
58 |
* @since 2.9.5
|
59 |
+
* @access public
|
60 |
*/
|
61 |
+
public function beta_test( $zip = false )
|
62 |
{
|
63 |
+
if ( ! $zip ) {
|
64 |
+
if ( empty( $_POST[ self::BETA_TEST_URL ] ) ) {
|
65 |
+
return ;
|
66 |
+
}
|
67 |
|
68 |
+
// Generate zip url
|
69 |
+
$commit = substr( $_POST[ self::BETA_TEST_URL ], strpos( $_POST[ self::BETA_TEST_URL ], '/commit/' ) + 8 ) ;
|
70 |
+
$zip = $this->_package_zip( $commit ) ;
|
71 |
+
}
|
72 |
|
73 |
if ( ! $zip ) {
|
74 |
LiteSpeed_Cache_Log::debug( '[Log] ❌ No ZIP file' ) ;
|
470 |
break ;
|
471 |
|
472 |
case self::TYPE_BETA_TEST :
|
473 |
+
$instance->beta_test() ;
|
474 |
break ;
|
475 |
|
476 |
default:
|
inc/router.class.php
CHANGED
@@ -300,7 +300,7 @@ class LiteSpeed_Cache_Router
|
|
300 |
public static function esi_enabled()
|
301 |
{
|
302 |
if ( ! isset( self::$_esi_enabled ) ) {
|
303 |
-
self::$_esi_enabled =
|
304 |
}
|
305 |
return self::$_esi_enabled ;
|
306 |
}
|
300 |
public static function esi_enabled()
|
301 |
{
|
302 |
if ( ! isset( self::$_esi_enabled ) ) {
|
303 |
+
self::$_esi_enabled = defined( 'LITESPEED_ON' ) && LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_ESI_ENABLE ) ;
|
304 |
}
|
305 |
return self::$_esi_enabled ;
|
306 |
}
|
includes/litespeed-cache-activation.class.php
CHANGED
@@ -18,6 +18,9 @@ class LiteSpeed_Cache_Activation
|
|
18 |
private static $_instance ;
|
19 |
|
20 |
const TYPE_UPGRADE = 'upgrade' ;
|
|
|
|
|
|
|
21 |
|
22 |
const NETWORK_TRANSIENT_COUNT = 'lscwp_network_count' ;
|
23 |
|
@@ -394,6 +397,101 @@ class LiteSpeed_Cache_Activation
|
|
394 |
LiteSpeed_Cache_Admin_Display::succeed( __( 'Upgraded successfully.', 'litespeed-cache' ) ) ;
|
395 |
}
|
396 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
/**
|
398 |
* Handle all request actions from main cls
|
399 |
*
|
@@ -411,6 +509,25 @@ class LiteSpeed_Cache_Activation
|
|
411 |
$instance->upgrade() ;
|
412 |
break ;
|
413 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
default:
|
415 |
break ;
|
416 |
}
|
18 |
private static $_instance ;
|
19 |
|
20 |
const TYPE_UPGRADE = 'upgrade' ;
|
21 |
+
const TYPE_INSTALL_3RD = 'install_3rd' ;
|
22 |
+
const TYPE_INSTALL_ZIP = 'install_zip' ;
|
23 |
+
const TYPE_DISMISS_RECOMMENDED = 'dismiss_recommended' ;
|
24 |
|
25 |
const NETWORK_TRANSIENT_COUNT = 'lscwp_network_count' ;
|
26 |
|
397 |
LiteSpeed_Cache_Admin_Display::succeed( __( 'Upgraded successfully.', 'litespeed-cache' ) ) ;
|
398 |
}
|
399 |
|
400 |
+
/**
|
401 |
+
* Detect if the plugin is active or not
|
402 |
+
*
|
403 |
+
* @since 1.0
|
404 |
+
*/
|
405 |
+
public function dash_notifier_is_plugin_active( $plugin )
|
406 |
+
{
|
407 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ) ;
|
408 |
+
|
409 |
+
$plugin_path = $plugin . '/' . $plugin . '.php' ;
|
410 |
+
|
411 |
+
return is_plugin_active( $plugin_path ) ;
|
412 |
+
}
|
413 |
+
|
414 |
+
/**
|
415 |
+
* Detect if the plugin is installed or not
|
416 |
+
*
|
417 |
+
* @since 1.0
|
418 |
+
*/
|
419 |
+
public function dash_notifier_is_plugin_installed( $plugin )
|
420 |
+
{
|
421 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' ) ;
|
422 |
+
|
423 |
+
$plugin_path = $plugin . '/' . $plugin . '.php' ;
|
424 |
+
|
425 |
+
$valid = validate_plugin( $plugin_path ) ;
|
426 |
+
|
427 |
+
return ! is_wp_error( $valid ) ;
|
428 |
+
}
|
429 |
+
|
430 |
+
/**
|
431 |
+
* Grab a plugin info from WordPress
|
432 |
+
*
|
433 |
+
* @since 1.0
|
434 |
+
*/
|
435 |
+
public function dash_notifier_get_plugin_info( $slug )
|
436 |
+
{
|
437 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ) ;
|
438 |
+
$result = plugins_api( 'plugin_information', array( 'slug' => $slug ) ) ;
|
439 |
+
|
440 |
+
if ( is_wp_error( $result ) ) {
|
441 |
+
return false ;
|
442 |
+
}
|
443 |
+
|
444 |
+
return $result ;
|
445 |
+
}
|
446 |
+
|
447 |
+
/**
|
448 |
+
* Install the 3rd party plugin
|
449 |
+
*
|
450 |
+
* @since 1.0
|
451 |
+
*/
|
452 |
+
public function dash_notifier_install_3rd()
|
453 |
+
{
|
454 |
+
! defined( 'SILENCE_INSTALL' ) && define( 'SILENCE_INSTALL', true );
|
455 |
+
|
456 |
+
$slug = ! empty( $_GET[ 'plugin' ] ) ? $_GET[ 'plugin' ] : false;
|
457 |
+
|
458 |
+
// Check if plugin is installed already
|
459 |
+
if ( ! $slug || $this->dash_notifier_is_plugin_active( $slug ) ) {
|
460 |
+
return ;
|
461 |
+
}
|
462 |
+
|
463 |
+
/**
|
464 |
+
* @see wp-admin/update.php
|
465 |
+
*/
|
466 |
+
include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ;
|
467 |
+
include_once ABSPATH . 'wp-admin/includes/file.php' ;
|
468 |
+
include_once ABSPATH . 'wp-admin/includes/misc.php' ;
|
469 |
+
|
470 |
+
$plugin_path = $slug . '/' . $slug . '.php' ;
|
471 |
+
|
472 |
+
if ( ! $this->dash_notifier_is_plugin_installed( $slug ) ) {
|
473 |
+
$plugin_info = $this->dash_notifier_get_plugin_info( $slug ) ;
|
474 |
+
if ( ! $plugin_info ) {
|
475 |
+
return ;
|
476 |
+
}
|
477 |
+
// Try to install plugin
|
478 |
+
try {
|
479 |
+
ob_start() ;
|
480 |
+
$skin = new \Automatic_Upgrader_Skin() ;
|
481 |
+
$upgrader = new \Plugin_Upgrader( $skin ) ;
|
482 |
+
$result = $upgrader->install( $plugin_info->download_link ) ;
|
483 |
+
ob_end_clean() ;
|
484 |
+
} catch ( \Exception $e ) {
|
485 |
+
return ;
|
486 |
+
}
|
487 |
+
}
|
488 |
+
|
489 |
+
if ( ! is_plugin_active( $plugin_path ) ) {
|
490 |
+
activate_plugin( $plugin_path ) ;
|
491 |
+
}
|
492 |
+
|
493 |
+
}
|
494 |
+
|
495 |
/**
|
496 |
* Handle all request actions from main cls
|
497 |
*
|
509 |
$instance->upgrade() ;
|
510 |
break ;
|
511 |
|
512 |
+
case self::TYPE_INSTALL_3RD :
|
513 |
+
$instance->dash_notifier_install_3rd() ;
|
514 |
+
break ;
|
515 |
+
|
516 |
+
case self::TYPE_DISMISS_RECOMMENDED :
|
517 |
+
$news = get_option( 'litespeed-recommended', array() );
|
518 |
+
$news[ 'new' ] = 0;
|
519 |
+
update_option( 'litespeed-recommended', $news );
|
520 |
+
break ;
|
521 |
+
|
522 |
+
case self::TYPE_INSTALL_ZIP :
|
523 |
+
$news = get_option( 'litespeed-recommended', array() );
|
524 |
+
if ( ! empty( $news[ 'zip' ] ) ) {
|
525 |
+
$news[ 'new' ] = 0;
|
526 |
+
update_option( 'litespeed-recommended', $news );
|
527 |
+
LiteSpeed_Cache_Log::get_instance()->beta_test( $news[ 'zip' ] );
|
528 |
+
}
|
529 |
+
break ;
|
530 |
+
|
531 |
default:
|
532 |
break ;
|
533 |
}
|
includes/litespeed-cache-control.class.php
CHANGED
@@ -482,7 +482,7 @@ class LiteSpeed_Cache_Control
|
|
482 |
{
|
483 |
$esi_hdr = '' ;
|
484 |
// Fix cli `uninstall --deactivate` fatal err
|
485 |
-
if (
|
486 |
$esi_hdr = ',esi=on' ;
|
487 |
}
|
488 |
|
482 |
{
|
483 |
$esi_hdr = '' ;
|
484 |
// Fix cli `uninstall --deactivate` fatal err
|
485 |
+
if ( class_exists( 'LiteSpeed_Cache_ESI' ) && LiteSpeed_Cache_ESI::has_esi() ) {
|
486 |
$esi_hdr = ',esi=on' ;
|
487 |
}
|
488 |
|
includes/litespeed-cache-log.class.php
CHANGED
@@ -56,17 +56,19 @@ class LiteSpeed_Cache_Log
|
|
56 |
* Beta test upgrade
|
57 |
*
|
58 |
* @since 2.9.5
|
59 |
-
* @access
|
60 |
*/
|
61 |
-
|
62 |
{
|
63 |
-
if (
|
64 |
-
|
65 |
-
|
|
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
|
|
|
70 |
|
71 |
if ( ! $zip ) {
|
72 |
LiteSpeed_Cache_Log::debug( '[Log] ❌ No ZIP file' ) ;
|
@@ -468,7 +470,7 @@ class LiteSpeed_Cache_Log
|
|
468 |
break ;
|
469 |
|
470 |
case self::TYPE_BETA_TEST :
|
471 |
-
$instance->
|
472 |
break ;
|
473 |
|
474 |
default:
|
56 |
* Beta test upgrade
|
57 |
*
|
58 |
* @since 2.9.5
|
59 |
+
* @access public
|
60 |
*/
|
61 |
+
public function beta_test( $zip = false )
|
62 |
{
|
63 |
+
if ( ! $zip ) {
|
64 |
+
if ( empty( $_POST[ self::BETA_TEST_URL ] ) ) {
|
65 |
+
return ;
|
66 |
+
}
|
67 |
|
68 |
+
// Generate zip url
|
69 |
+
$commit = substr( $_POST[ self::BETA_TEST_URL ], strpos( $_POST[ self::BETA_TEST_URL ], '/commit/' ) + 8 ) ;
|
70 |
+
$zip = $this->_package_zip( $commit ) ;
|
71 |
+
}
|
72 |
|
73 |
if ( ! $zip ) {
|
74 |
LiteSpeed_Cache_Log::debug( '[Log] ❌ No ZIP file' ) ;
|
470 |
break ;
|
471 |
|
472 |
case self::TYPE_BETA_TEST :
|
473 |
+
$instance->beta_test() ;
|
474 |
break ;
|
475 |
|
476 |
default:
|
includes/litespeed-cache-router.class.php
CHANGED
@@ -300,7 +300,7 @@ class LiteSpeed_Cache_Router
|
|
300 |
public static function esi_enabled()
|
301 |
{
|
302 |
if ( ! isset( self::$_esi_enabled ) ) {
|
303 |
-
self::$_esi_enabled =
|
304 |
}
|
305 |
return self::$_esi_enabled ;
|
306 |
}
|
300 |
public static function esi_enabled()
|
301 |
{
|
302 |
if ( ! isset( self::$_esi_enabled ) ) {
|
303 |
+
self::$_esi_enabled = defined( 'LITESPEED_ON' ) && LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_ESI_ENABLE ) ;
|
304 |
}
|
305 |
return self::$_esi_enabled ;
|
306 |
}
|
includes/litespeed-cache.class.php
CHANGED
@@ -26,7 +26,7 @@ class LiteSpeed_Cache
|
|
26 |
const NAME = 'LiteSpeed Cache' ;
|
27 |
const PLUGIN_NAME = 'litespeed-cache' ;
|
28 |
const PLUGIN_FILE = 'litespeed-cache/litespeed-cache.php' ;
|
29 |
-
const PLUGIN_VERSION = '2.9.
|
30 |
|
31 |
const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
|
32 |
|
@@ -231,7 +231,7 @@ class LiteSpeed_Cache
|
|
231 |
{
|
232 |
LiteSpeed_Cache_Router::get_instance()->is_crawler_role_simulation() ;
|
233 |
|
234 |
-
if ( $result = LiteSpeed_Cache_Config::get_instance()->in_exclude_optimization_roles() ) {
|
235 |
LiteSpeed_Cache_Log::debug( '[Core] ⛑️ bypass_optm: hit Role Excludes setting: ' . $result ) ;
|
236 |
! defined( 'LITESPEED_BYPASS_OPTM' ) && define( 'LITESPEED_BYPASS_OPTM', true ) ;
|
237 |
}
|
26 |
const NAME = 'LiteSpeed Cache' ;
|
27 |
const PLUGIN_NAME = 'litespeed-cache' ;
|
28 |
const PLUGIN_FILE = 'litespeed-cache/litespeed-cache.php' ;
|
29 |
+
const PLUGIN_VERSION = '2.9.9.2' ;
|
30 |
|
31 |
const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
|
32 |
|
231 |
{
|
232 |
LiteSpeed_Cache_Router::get_instance()->is_crawler_role_simulation() ;
|
233 |
|
234 |
+
if ( ! is_admin() && $result = LiteSpeed_Cache_Config::get_instance()->in_exclude_optimization_roles() ) {
|
235 |
LiteSpeed_Cache_Log::debug( '[Core] ⛑️ bypass_optm: hit Role Excludes setting: ' . $result ) ;
|
236 |
! defined( 'LITESPEED_BYPASS_OPTM' ) && define( 'LITESPEED_BYPASS_OPTM', true ) ;
|
237 |
}
|
includes/litespeed.autoload.php
CHANGED
@@ -83,14 +83,69 @@ if ( !function_exists('_litespeed_autoload') ) {
|
|
83 |
|
84 |
spl_autoload_register('_litespeed_autoload');
|
85 |
|
|
|
86 |
/**
|
87 |
-
*
|
88 |
-
*
|
89 |
-
* @since 1.2.2
|
90 |
*/
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
}
|
83 |
|
84 |
spl_autoload_register('_litespeed_autoload');
|
85 |
|
86 |
+
|
87 |
/**
|
88 |
+
* Tmp preload all for v3.0
|
89 |
+
* @since v2.9.9
|
|
|
90 |
*/
|
91 |
+
$class2fileArr = array(
|
92 |
+
'Litespeed_Crawler' => 'lib/litespeed/litespeed-crawler.class.php',
|
93 |
+
'Litespeed_File' => 'lib/litespeed/litespeed-file.class.php',
|
94 |
+
'Litespeed_String' => 'lib/litespeed/litespeed-string.class.php',
|
95 |
+
|
96 |
+
'LiteSpeed_Cache' => 'inc/litespeed-cache.class.php',
|
97 |
+
'LiteSpeed_Cache_Activation' => 'inc/activation.class.php',
|
98 |
+
'LiteSpeed_Cache_API' => 'inc/api.class.php',
|
99 |
+
'LiteSpeed_Cache_CDN' => 'inc/cdn.class.php',
|
100 |
+
'LiteSpeed_Cache_CDN_Cloudflare' => 'inc/cdn/cloudflare.class.php',
|
101 |
+
'LiteSpeed_Cache_CDN_Quic' => 'inc/cdn/quic.class.php',
|
102 |
+
'LiteSpeed_Cache_Config' => 'inc/config.class.php',
|
103 |
+
'LiteSpeed_Cache_Control' => 'inc/control.class.php',
|
104 |
+
'LiteSpeed_Cache_Const' => 'inc/const.cls.php',
|
105 |
+
'LiteSpeed_Cache_Crawler' => 'inc/crawler.class.php',
|
106 |
+
'LiteSpeed_Cache_Crawler_Sitemap' => 'inc/crawler-sitemap.class.php',
|
107 |
+
'LiteSpeed_Cache_CSS' => 'inc/css.cls.php',
|
108 |
+
'LiteSpeed_Cache_Data' => 'inc/data.class.php',
|
109 |
+
'LiteSpeed_Cache_Doc' => 'inc/doc.cls.php',
|
110 |
+
'LiteSpeed_Cache_ESI' => 'inc/esi.class.php',
|
111 |
+
'LiteSpeed_Cache_GUI' => 'inc/gui.class.php',
|
112 |
+
'LiteSpeed_Cache_Import' => 'inc/import.class.php',
|
113 |
+
'LiteSpeed_Cache_Img_Optm' => 'inc/img_optm.class.php',
|
114 |
+
'LiteSpeed_Cache_Log' => 'inc/log.class.php',
|
115 |
+
'LiteSpeed_Cache_Media' => 'inc/media.class.php',
|
116 |
+
'LiteSpeed_Cache_Object' => 'inc/object.class.php',
|
117 |
+
'LiteSpeed_Cache_Optimize' => 'inc/optimize.class.php',
|
118 |
+
'LiteSpeed_Cache_Optimizer' => 'inc/optimizer.class.php',
|
119 |
+
'LiteSpeed_Cache_Purge' => 'inc/purge.class.php',
|
120 |
+
'LiteSpeed_Cache_REST' => 'inc/rest.cls.php',
|
121 |
+
'LiteSpeed_Cache_Router' => 'inc/router.class.php',
|
122 |
+
'LiteSpeed_Cache_Tag' => 'inc/tag.class.php',
|
123 |
+
'LiteSpeed_Cache_Task' => 'inc/task.class.php',
|
124 |
+
'LiteSpeed_Cache_Vary' => 'inc/vary.class.php',
|
125 |
+
'LiteSpeed_Cache_Utility' => 'inc/utility.class.php',
|
126 |
+
|
127 |
+
'LiteSpeed_Cache_Admin' => 'admin/litespeed-cache-admin.class.php',
|
128 |
+
'LiteSpeed_Cache_Admin_API' => 'admin/admin-api.class.php',
|
129 |
+
'LiteSpeed_Cache_Admin_Display' => 'admin/litespeed-cache-admin-display.class.php',
|
130 |
+
'LiteSpeed_Cache_Admin_Error' => 'admin/litespeed-cache-admin-error.class.php',
|
131 |
+
'LiteSpeed_Cache_Admin_Optimize' => 'admin/litespeed-cache-admin-optimize.class.php',
|
132 |
+
'LiteSpeed_Cache_Admin_Report' => 'admin/litespeed-cache-admin-report.class.php',
|
133 |
+
'LiteSpeed_Cache_Admin_Rules' => 'admin/litespeed-cache-admin-rules.class.php',
|
134 |
+
'LiteSpeed_Cache_Admin_Settings' => 'admin/litespeed-cache-admin-settings.class.php',
|
135 |
+
|
136 |
+
'LiteSpeed_Cache_Cli_Admin' => 'cli/litespeed-cache-cli-admin.class.php',
|
137 |
+
'LiteSpeed_Cache_CLI_IAPI' => 'cli/litespeed-cache-cli-iapi.class.php',
|
138 |
+
'LiteSpeed_Cache_Cli_Purge' => 'cli/litespeed-cache-cli-purge.class.php',
|
139 |
+
|
140 |
+
'LiteSpeed_Cache_Tags' => 'includes/deprecated-litespeed-cache-tags.class.php',
|
141 |
+
|
142 |
+
'LiteSpeed_3rd_Lib\Minify_HTML' => 'lib/html_min.class.php',
|
143 |
+
'LiteSpeed_3rd_Lib\css_min\Minifier' => 'lib/css_min.class.php',
|
144 |
+
'LiteSpeed_3rd_Lib\css_min\Colors' => 'lib/css_min.colors.class.php',
|
145 |
+
'LiteSpeed_3rd_Lib\css_min\Utils' => 'lib/css_min.utils.class.php',
|
146 |
+
'LiteSpeed_3rd_Lib\css_min\UriRewriter' => 'lib/css_min.url_rewritter.class.php',
|
147 |
+
'LiteSpeed_3rd_Lib\js_min\JSMin' => 'lib/js_min.class.php',
|
148 |
+
);
|
149 |
+
foreach ( $class2fileArr as $v ) {
|
150 |
+
require_once LSCWP_DIR . $v ;
|
151 |
}
|
languages/litespeed-cache.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the LiteSpeed Cache package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: LiteSpeed Cache 2.9.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
|
7 |
-
"POT-Creation-Date: 2019-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -583,7 +583,7 @@ msgid "Disable"
|
|
583 |
msgstr ""
|
584 |
|
585 |
#: admin/tpl/crawler.php:91 admin/tpl/inc/check_cache_disabled.php:38
|
586 |
-
#: admin/tpl/manage/manage_cdn.php:15
|
587 |
#: admin/tpl/setting/settings_optimize.php:15 admin/tpl/settings.php:183
|
588 |
msgid "WARNING"
|
589 |
msgstr ""
|
@@ -757,7 +757,7 @@ msgstr ""
|
|
757 |
msgid "DO NOT EDIT ANYTHING WITHIN %s"
|
758 |
msgstr ""
|
759 |
|
760 |
-
#: admin/tpl/esi_widget_edit.php:34 admin/tpl/setting/settings_esi.php:
|
761 |
msgid "Enable ESI"
|
762 |
msgstr ""
|
763 |
|
@@ -860,7 +860,7 @@ msgstr ""
|
|
860 |
msgid "Rate %s on %s"
|
861 |
msgstr ""
|
862 |
|
863 |
-
#. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.9.
|
864 |
#. Plugin Name of the plugin/theme
|
865 |
#: admin/tpl/inc/admin_footer.php:6
|
866 |
#: admin/tpl/inc/banner_promo.new_version.php:56 inc/gui.class.php:477
|
@@ -2563,38 +2563,40 @@ msgstr ""
|
|
2563 |
msgid "ESI sample for developers"
|
2564 |
msgstr ""
|
2565 |
|
2566 |
-
#: admin/tpl/setting/settings_esi.php:
|
2567 |
-
msgid "
|
|
|
|
|
2568 |
msgstr ""
|
2569 |
|
2570 |
-
#: admin/tpl/setting/settings_esi.php:
|
2571 |
msgid ""
|
2572 |
"Enable caches public pages for logged in users and serves the Admin Bar and "
|
2573 |
"Comment Form via ESI blocks. These two blocks will be uncached unless "
|
2574 |
"enabled below."
|
2575 |
msgstr ""
|
2576 |
|
2577 |
-
#: admin/tpl/setting/settings_esi.php:
|
2578 |
msgid "Cache Admin Bar"
|
2579 |
msgstr ""
|
2580 |
|
2581 |
-
#: admin/tpl/setting/settings_esi.php:
|
2582 |
msgid "Cache the build-in Admin Bar ESI block."
|
2583 |
msgstr ""
|
2584 |
|
2585 |
-
#: admin/tpl/setting/settings_esi.php:
|
2586 |
msgid "Cache Comment Form"
|
2587 |
msgstr ""
|
2588 |
|
2589 |
-
#: admin/tpl/setting/settings_esi.php:
|
2590 |
msgid "Cache the build-in Comment Form ESI block."
|
2591 |
msgstr ""
|
2592 |
|
2593 |
-
#: admin/tpl/setting/settings_esi.php:
|
2594 |
msgid "Vary Group"
|
2595 |
msgstr ""
|
2596 |
|
2597 |
-
#: admin/tpl/setting/settings_esi.php:
|
2598 |
msgid ""
|
2599 |
"If your site contains public content that certain user roles can see but "
|
2600 |
"other roles cannot, you can specify a Vary Group for those user roles. For "
|
@@ -4082,7 +4084,7 @@ msgid "Position reset notification sent successfully"
|
|
4082 |
msgstr ""
|
4083 |
|
4084 |
#: inc/crawler.class.php:503 includes/litespeed-cache-crawler.class.php:503
|
4085 |
-
#: lib/litespeed/litespeed-crawler.class.php:
|
4086 |
msgid "Crawler %s reached end of sitemap file."
|
4087 |
msgstr ""
|
4088 |
|
@@ -4379,35 +4381,35 @@ msgstr ""
|
|
4379 |
msgid " %s ago"
|
4380 |
msgstr ""
|
4381 |
|
4382 |
-
#: lib/litespeed/litespeed-crawler.class.php:
|
4383 |
msgid "Cannot read meta file: %s"
|
4384 |
msgstr ""
|
4385 |
|
4386 |
-
#: lib/litespeed/litespeed-crawler.class.php:
|
4387 |
msgid "Oh look, there is already another LiteSpeed crawler running!"
|
4388 |
msgstr ""
|
4389 |
|
4390 |
-
#: lib/litespeed/litespeed-crawler.class.php:
|
4391 |
msgid "Stopped due to load hit the maximum."
|
4392 |
msgstr ""
|
4393 |
|
4394 |
-
#: lib/litespeed/litespeed-crawler.class.php:
|
4395 |
msgid "Stopped due to error when crawling urls %1$s : %2$s"
|
4396 |
msgstr ""
|
4397 |
|
4398 |
-
#: lib/litespeed/litespeed-crawler.class.php:
|
4399 |
msgid "Stopped: crawler disabled by the server admin"
|
4400 |
msgstr ""
|
4401 |
|
4402 |
-
#: lib/litespeed/litespeed-crawler.class.php:
|
4403 |
msgid "Stopped due to exceeding defined Maximum Run Time"
|
4404 |
msgstr ""
|
4405 |
|
4406 |
-
#: lib/litespeed/litespeed-crawler.class.php:
|
4407 |
msgid "Stopped due to reset meta position"
|
4408 |
msgstr ""
|
4409 |
|
4410 |
-
#: lib/litespeed/litespeed-crawler.class.php:
|
4411 |
msgid "Stopped due to load over limit"
|
4412 |
msgstr ""
|
4413 |
|
2 |
# This file is distributed under the same license as the LiteSpeed Cache package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: LiteSpeed Cache 2.9.9\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
|
7 |
+
"POT-Creation-Date: 2019-10-28 20:50:21+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
583 |
msgstr ""
|
584 |
|
585 |
#: admin/tpl/crawler.php:91 admin/tpl/inc/check_cache_disabled.php:38
|
586 |
+
#: admin/tpl/manage/manage_cdn.php:15 admin/tpl/setting/settings_esi.php:37
|
587 |
#: admin/tpl/setting/settings_optimize.php:15 admin/tpl/settings.php:183
|
588 |
msgid "WARNING"
|
589 |
msgstr ""
|
757 |
msgid "DO NOT EDIT ANYTHING WITHIN %s"
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: admin/tpl/esi_widget_edit.php:34 admin/tpl/setting/settings_esi.php:44
|
761 |
msgid "Enable ESI"
|
762 |
msgstr ""
|
763 |
|
860 |
msgid "Rate %s on %s"
|
861 |
msgstr ""
|
862 |
|
863 |
+
#. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.9.9) #-#-#-#-#
|
864 |
#. Plugin Name of the plugin/theme
|
865 |
#: admin/tpl/inc/admin_footer.php:6
|
866 |
#: admin/tpl/inc/banner_promo.new_version.php:56 inc/gui.class.php:477
|
2563 |
msgid "ESI sample for developers"
|
2564 |
msgstr ""
|
2565 |
|
2566 |
+
#: admin/tpl/setting/settings_esi.php:38
|
2567 |
+
msgid ""
|
2568 |
+
"These options are only available with LiteSpeed Enterprise Web Server or "
|
2569 |
+
"QUIC.cloud CDN."
|
2570 |
msgstr ""
|
2571 |
|
2572 |
+
#: admin/tpl/setting/settings_esi.php:48
|
2573 |
msgid ""
|
2574 |
"Enable caches public pages for logged in users and serves the Admin Bar and "
|
2575 |
"Comment Form via ESI blocks. These two blocks will be uncached unless "
|
2576 |
"enabled below."
|
2577 |
msgstr ""
|
2578 |
|
2579 |
+
#: admin/tpl/setting/settings_esi.php:54
|
2580 |
msgid "Cache Admin Bar"
|
2581 |
msgstr ""
|
2582 |
|
2583 |
+
#: admin/tpl/setting/settings_esi.php:58
|
2584 |
msgid "Cache the build-in Admin Bar ESI block."
|
2585 |
msgstr ""
|
2586 |
|
2587 |
+
#: admin/tpl/setting/settings_esi.php:64
|
2588 |
msgid "Cache Comment Form"
|
2589 |
msgstr ""
|
2590 |
|
2591 |
+
#: admin/tpl/setting/settings_esi.php:68
|
2592 |
msgid "Cache the build-in Comment Form ESI block."
|
2593 |
msgstr ""
|
2594 |
|
2595 |
+
#: admin/tpl/setting/settings_esi.php:74
|
2596 |
msgid "Vary Group"
|
2597 |
msgstr ""
|
2598 |
|
2599 |
+
#: admin/tpl/setting/settings_esi.php:89
|
2600 |
msgid ""
|
2601 |
"If your site contains public content that certain user roles can see but "
|
2602 |
"other roles cannot, you can specify a Vary Group for those user roles. For "
|
4084 |
msgstr ""
|
4085 |
|
4086 |
#: inc/crawler.class.php:503 includes/litespeed-cache-crawler.class.php:503
|
4087 |
+
#: lib/litespeed/litespeed-crawler.class.php:413
|
4088 |
msgid "Crawler %s reached end of sitemap file."
|
4089 |
msgstr ""
|
4090 |
|
4381 |
msgid " %s ago"
|
4382 |
msgstr ""
|
4383 |
|
4384 |
+
#: lib/litespeed/litespeed-crawler.class.php:219
|
4385 |
msgid "Cannot read meta file: %s"
|
4386 |
msgstr ""
|
4387 |
|
4388 |
+
#: lib/litespeed/litespeed-crawler.class.php:224
|
4389 |
msgid "Oh look, there is already another LiteSpeed crawler running!"
|
4390 |
msgstr ""
|
4391 |
|
4392 |
+
#: lib/litespeed/litespeed-crawler.class.php:230
|
4393 |
msgid "Stopped due to load hit the maximum."
|
4394 |
msgstr ""
|
4395 |
|
4396 |
+
#: lib/litespeed/litespeed-crawler.class.php:312
|
4397 |
msgid "Stopped due to error when crawling urls %1$s : %2$s"
|
4398 |
msgstr ""
|
4399 |
|
4400 |
+
#: lib/litespeed/litespeed-crawler.class.php:319
|
4401 |
msgid "Stopped: crawler disabled by the server admin"
|
4402 |
msgstr ""
|
4403 |
|
4404 |
+
#: lib/litespeed/litespeed-crawler.class.php:340
|
4405 |
msgid "Stopped due to exceeding defined Maximum Run Time"
|
4406 |
msgstr ""
|
4407 |
|
4408 |
+
#: lib/litespeed/litespeed-crawler.class.php:357
|
4409 |
msgid "Stopped due to reset meta position"
|
4410 |
msgstr ""
|
4411 |
|
4412 |
+
#: lib/litespeed/litespeed-crawler.class.php:365
|
4413 |
msgid "Stopped due to load over limit"
|
4414 |
msgstr ""
|
4415 |
|
lib/litespeed/litespeed-crawler.class.php
CHANGED
@@ -4,7 +4,6 @@
|
|
4 |
*
|
5 |
* @since 1.1.0
|
6 |
*/
|
7 |
-
LiteSpeed_Cache_Utility::compatibility() ;
|
8 |
|
9 |
class Litespeed_Crawler
|
10 |
{
|
@@ -600,6 +599,7 @@ class Litespeed_Crawler
|
|
600 |
$options[CURLOPT_HTTPHEADER][] = "Host: " . $parsed_url['host'] ;
|
601 |
// replace domain with direct ip
|
602 |
$parsed_url['host'] = $this->_domain_ip ;
|
|
|
603 |
$this->_baseUrl = http_build_url($parsed_url) ;
|
604 |
}
|
605 |
}
|
4 |
*
|
5 |
* @since 1.1.0
|
6 |
*/
|
|
|
7 |
|
8 |
class Litespeed_Crawler
|
9 |
{
|
599 |
$options[CURLOPT_HTTPHEADER][] = "Host: " . $parsed_url['host'] ;
|
600 |
// replace domain with direct ip
|
601 |
$parsed_url['host'] = $this->_domain_ip ;
|
602 |
+
LiteSpeed_Cache_Utility::compatibility() ;
|
603 |
$this->_baseUrl = http_build_url($parsed_url) ;
|
604 |
}
|
605 |
}
|
lib/object-cache.php
CHANGED
@@ -24,9 +24,10 @@ if ( ! file_exists( $lscwp_dir . 'litespeed-cache.php' ) ) {
|
|
24 |
|
25 |
$data_file = WP_CONTENT_DIR . '/.object-cache.ini' ;
|
26 |
$lib_file = $lscwp_dir . 'inc/object.lib.php' ;
|
|
|
27 |
|
28 |
// Can't find LSCWP location, terminate object cache process
|
29 |
-
if ( ! $lscwp_dir || ! file_exists( $data_file ) || ! file_exists( $lib_file ) ) {
|
30 |
if ( ! is_admin() ) { // Bypass object cache for frontend
|
31 |
require_once ABSPATH . WPINC . '/cache.php' ;
|
32 |
}
|
@@ -38,5 +39,10 @@ if ( ! $lscwp_dir || ! file_exists( $data_file ) || ! file_exists( $lib_file ) )
|
|
38 |
}
|
39 |
else {
|
40 |
// Init object cache & LSCWP
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
42 |
}
|
24 |
|
25 |
$data_file = WP_CONTENT_DIR . '/.object-cache.ini' ;
|
26 |
$lib_file = $lscwp_dir . 'inc/object.lib.php' ;
|
27 |
+
$lib_file2 = $lscwp_dir . 'src/object.lib.php' ;
|
28 |
|
29 |
// Can't find LSCWP location, terminate object cache process
|
30 |
+
if ( ! $lscwp_dir || ! file_exists( $data_file ) || ( ! file_exists( $lib_file ) && ! file_exists( $lib_file2 ) ) ) {
|
31 |
if ( ! is_admin() ) { // Bypass object cache for frontend
|
32 |
require_once ABSPATH . WPINC . '/cache.php' ;
|
33 |
}
|
39 |
}
|
40 |
else {
|
41 |
// Init object cache & LSCWP
|
42 |
+
if ( file_exists( $lib_file ) ) {
|
43 |
+
require_once $lib_file ;
|
44 |
+
}
|
45 |
+
elseif ( file_exists( $lib_file2 ) ) {
|
46 |
+
require_once $lib_file2 ;
|
47 |
+
}
|
48 |
}
|
litespeed-cache.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Plugin Name: LiteSpeed Cache
|
16 |
* Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
|
17 |
* Description: High-performance page caching and site optimization from LiteSpeed
|
18 |
-
* Version: 2.9.
|
19 |
* Author: LiteSpeed Technologies
|
20 |
* Author URI: https://www.litespeedtech.com
|
21 |
* License: GPLv3
|
15 |
* Plugin Name: LiteSpeed Cache
|
16 |
* Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
|
17 |
* Description: High-performance page caching and site optimization from LiteSpeed
|
18 |
+
* Version: 2.9.9.2
|
19 |
* Author: LiteSpeed Technologies
|
20 |
* Author URI: https://www.litespeedtech.com
|
21 |
* License: GPLv3
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: LiteSpeedTech
|
3 |
Tags: caching, optimize, performance, pagespeed, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
|
4 |
Requires at least: 4.0
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 2.9.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
9 |
|
@@ -91,7 +91,7 @@ LSCWP supports WordPress Multisite and is compatible with most popular plugins,
|
|
91 |
18. Frontend Adminbar Shortcut
|
92 |
|
93 |
== LSCWP Resources ==
|
94 |
-
* [Join our Slack community](https://
|
95 |
* [Ask a question on our support forum](https://wordpress.org/support/plugin/litespeed-cache/).
|
96 |
* [View detailed documentation on our wiki](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp).
|
97 |
* [Read WordPress Wednesday tutorials on our blog](http://blog.litespeedtech.com/tag/wordpress-wednesday).
|
@@ -257,6 +257,7 @@ Click on the `Advanced View` link at the top of the page, and several more tabs
|
|
257 |
= What are the known compatible plugins and themes? =
|
258 |
|
259 |
* [WPML](https://wpml.org/)
|
|
|
260 |
* [bbPress](https://wordpress.org/plugins/bbpress/)
|
261 |
* [WooCommerce](https://wordpress.org/plugins/woocommerce/)
|
262 |
* [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
|
@@ -290,6 +291,23 @@ Click on the `Advanced View` link at the top of the page, and several more tabs
|
|
290 |
|
291 |
== Changelog ==
|
292 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
= 2.9.8.7 - Oct 11 2019 =
|
294 |
* <strong>3rd</strong>: Enhanced WP stateless compatibility. (#PR143)
|
295 |
* <strong>3rd</strong>: Fixed a PHP warning caused by previous PR for AMP. (#PR176)
|
2 |
Contributors: LiteSpeedTech
|
3 |
Tags: caching, optimize, performance, pagespeed, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
|
4 |
Requires at least: 4.0
|
5 |
+
Tested up to: 5.3.2
|
6 |
+
Stable tag: 2.9.9.2
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
9 |
|
91 |
18. Frontend Adminbar Shortcut
|
92 |
|
93 |
== LSCWP Resources ==
|
94 |
+
* [Join our Slack community](https://www.litespeedtech.com/slack) to connect with other LiteSpeed users.
|
95 |
* [Ask a question on our support forum](https://wordpress.org/support/plugin/litespeed-cache/).
|
96 |
* [View detailed documentation on our wiki](https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:lscwp).
|
97 |
* [Read WordPress Wednesday tutorials on our blog](http://blog.litespeedtech.com/tag/wordpress-wednesday).
|
257 |
= What are the known compatible plugins and themes? =
|
258 |
|
259 |
* [WPML](https://wpml.org/)
|
260 |
+
* [DoLogin Security](https://wordpress.org/plugins/dologin/)
|
261 |
* [bbPress](https://wordpress.org/plugins/bbpress/)
|
262 |
* [WooCommerce](https://wordpress.org/plugins/woocommerce/)
|
263 |
* [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
|
291 |
|
292 |
== Changelog ==
|
293 |
|
294 |
+
= 2.9.9.2 - Nov 24 2019 =
|
295 |
+
* 🌱 **GUI** New settings to limit News Feed to plugin page only.
|
296 |
+
|
297 |
+
= 2.9.9.1 - Nov 18 2019 =
|
298 |
+
* 🌱**Env** Environment Report can now append a passwordless link for support access without wp-admin password.
|
299 |
+
* <strong>Admin</strong>: The latest v3.0 beta test link may now be shown on the admin page when it's available.
|
300 |
+
* <strong>3rd</strong>: Compatibility with [DoLogin Security](https://wordpress.org/plugins/dologin/).
|
301 |
+
* 🐞<strong>ESI</strong>: Fixed a failure issue with Vary Group save. (@rafasshop)
|
302 |
+
* 🐞<strong>3rd</strong>: In browsers where WebP is not supported, Divi image picker will no longer serve WebP. (@Austin Tinius)
|
303 |
+
|
304 |
+
= 2.9.9 - Oct 28 2019 =
|
305 |
+
* <strong>Core</strong>: Preload all classes to avoid getting error for upcoming v3.0 upgrade.
|
306 |
+
* <strong>Object</strong>: Improved compatibility with upcoming v3.0 release.
|
307 |
+
* <strong>ESI</strong>: Unlocked ESI for OLS in case OLS is using QUIC.cloud CDN which supports ESI.
|
308 |
+
* <strong>3rd</strong>: Elementor Edit button will now show when ESI enabled. (#PR149 #335322 @maxgorky)
|
309 |
+
* 🐞<strong>Media</strong>: Fixed missing Media optimization column when Admin role is excluded from optimization in settings. (@mikeyhash @pako69 @dgilfillan)
|
310 |
+
|
311 |
= 2.9.8.7 - Oct 11 2019 =
|
312 |
* <strong>3rd</strong>: Enhanced WP stateless compatibility. (#PR143)
|
313 |
* <strong>3rd</strong>: Fixed a PHP warning caused by previous PR for AMP. (#PR176)
|
thirdparty/lscwp-3rd-divi-theme-builder.cls.php
CHANGED
@@ -22,11 +22,12 @@ class LiteSpeed_Cache_ThirdParty_Divi_Theme_Builder
|
|
22 |
* Check if is Edit mode in frontend, disable all LSCWP features to avoid breaking page builder
|
23 |
*
|
24 |
* @since 2.9.7.2 #435538 #581740 #977284
|
|
|
25 |
*/
|
26 |
public static function pre_load()
|
27 |
{
|
28 |
if ( ! function_exists( 'et_setup_theme' ) ) return ;
|
29 |
-
if ( ! empty( $_GET[ 'et_fb' ] ) ) {
|
30 |
LiteSpeed_Cache_API::disable_all( 'divi edit mode' ) ;
|
31 |
}
|
32 |
}
|
22 |
* Check if is Edit mode in frontend, disable all LSCWP features to avoid breaking page builder
|
23 |
*
|
24 |
* @since 2.9.7.2 #435538 #581740 #977284
|
25 |
+
* @since 2.9.9.1 Added 'et_pb_preview' for loading image from library in divi page edit
|
26 |
*/
|
27 |
public static function pre_load()
|
28 |
{
|
29 |
if ( ! function_exists( 'et_setup_theme' ) ) return ;
|
30 |
+
if ( ! empty( $_GET[ 'et_fb' ] ) || ! empty( $_GET[ 'et_pb_preview' ] ) ) {
|
31 |
LiteSpeed_Cache_API::disable_all( 'divi edit mode' ) ;
|
32 |
}
|
33 |
}
|
thirdparty/lscwp-3rd-elementor.cls.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* The Third Party integration with the bbPress plugin.
|
5 |
+
*
|
6 |
+
* @since 2.9.8.8
|
7 |
+
* @package LiteSpeed_Cache
|
8 |
+
* @subpackage LiteSpeed_Cache/thirdparty
|
9 |
+
* @author LiteSpeed Technologies <info@litespeedtech.com>
|
10 |
+
*/
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
12 |
+
die() ;
|
13 |
+
}
|
14 |
+
|
15 |
+
LiteSpeed_Cache_API::register( 'LiteSpeed_Cache_ThirdParty_Elementor' ) ;
|
16 |
+
|
17 |
+
class LiteSpeed_Cache_ThirdParty_Elementor
|
18 |
+
{
|
19 |
+
/**
|
20 |
+
* Detect if Elementor is installed and it's on ESI
|
21 |
+
*
|
22 |
+
* @since 2.9.8.8
|
23 |
+
* @access public
|
24 |
+
*/
|
25 |
+
public static function detect()
|
26 |
+
{
|
27 |
+
if ( ! defined( 'ELEMENTOR_VERSION' ) ) return ;
|
28 |
+
if ( ! isset( $_GET[ 'lsesi' ] ) || $_GET[ 'lsesi' ] !== 'admin-bar' ) return ;
|
29 |
+
|
30 |
+
add_action( 'admin_bar_menu', 'LiteSpeed_Cache_ThirdParty_Elementor::add_menu_in_admin_bar', 100 );
|
31 |
+
}
|
32 |
+
|
33 |
+
public static function add_menu_in_admin_bar( \WP_Admin_Bar $wp_admin_bar )
|
34 |
+
{
|
35 |
+
/*
|
36 |
+
* As Elementor hook to the_contet filter to add the Edit with Elementor button,
|
37 |
+
* force apply the_content filter to run the hook,
|
38 |
+
* ESI itself can retrive the post data
|
39 |
+
*/
|
40 |
+
apply_filters( 'the_content', '' );
|
41 |
+
}
|
42 |
+
}
|
thirdparty/lscwp-registry-3rd.php
CHANGED
@@ -35,6 +35,7 @@ $thirdparty_list = array(
|
|
35 |
'wpdiscuz',
|
36 |
'facetwp',
|
37 |
'amp-bypass',
|
|
|
38 |
) ;
|
39 |
|
40 |
foreach ($thirdparty_list as $val) {
|
35 |
'wpdiscuz',
|
36 |
'facetwp',
|
37 |
'amp-bypass',
|
38 |
+
'elementor',
|
39 |
) ;
|
40 |
|
41 |
foreach ($thirdparty_list as $val) {
|