LiteSpeed Cache - Version 2.9.1

Version Description

  • Jan 25 2019 =
  • Compatibility: Fixed fatal error for PHP 5.3.
  • Compatibility: Fixed PHP warning in htmlspecialchars when building URLs. (@souljahn2)
  • Media: Excluded invalid image src from lazyload. (@andrew55)
  • Optm: Improved URL compatibility when detecting closest cloud server.
  • ESI: Supported JSON format comment format in ESI with is_json parameter.
  • API: Added filters to CCSS/CSS/JS content. (@lhoucine)
  • 3rd: Improved comment compatibility with Elegant Divi Builder.
  • IAPI: New Europe Image Optimization server (EU5). Please whitelist the new IAPI IP List.
  • GUI: No longer show banners when Disable All in Debug is ON. (@rabbitwordpress)
  • GUI: Fixed button style for RTL languages.
  • GUI: Removed unnecessary translation in report.
  • GUI: Updated readme wiki links.
  • GUI: Fixed pie styles in image optimization page.
Download this release

Release Info

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

Code changes from version 2.9 to 2.9.1

admin/litespeed-cache-admin-report.class.php CHANGED
@@ -61,7 +61,7 @@ class LiteSpeed_Cache_Admin_Report
61
62
if ( ! is_array( $json ) ) {
63
LiteSpeed_Cache_Log::debug( 'Env: Failed to post to LiteSpeed server ', $json ) ;
64
- $msg = sprintf( __( 'Failed to push to LiteSpeed server: %s', 'litespeed-cache' ), $json ) ;
65
LiteSpeed_Cache_Admin_Display::error( $msg ) ;
66
return ;
67
}
61
62
if ( ! is_array( $json ) ) {
63
LiteSpeed_Cache_Log::debug( 'Env: Failed to post to LiteSpeed server ', $json ) ;
64
+ $msg = __( 'Failed to push to LiteSpeed server', 'litespeed-cache' ) . ': ' . $json ;
65
LiteSpeed_Cache_Admin_Display::error( $msg ) ;
66
return ;
67
}
admin/tpl/inc/banner_promo.php CHANGED
@@ -122,7 +122,7 @@ else {
122
Before
123
</p>
124
</div>
125
- <div style="margin-top:-5px;">
126
<?php echo LiteSpeed_Cache_GUI::pie( $_score[ 'score_before_optm' ], 45, false, true, 'litespeed-pie-' . $this->get_cls_of_pagescore( $_score[ 'score_before_optm' ] ) ) ; ?>
127
</div>
128
</div>
@@ -132,7 +132,7 @@ else {
132
After
133
</p>
134
</div>
135
- <div style="margin-top:-5px;">
136
<?php echo LiteSpeed_Cache_GUI::pie( $_score[ 'score_after_optm' ], 45, false, true, 'litespeed-pie-' . $this->get_cls_of_pagescore( $_score[ 'score_after_optm' ] ) ) ; ?>
137
</div>
138
</div>
122
Before
123
</p>
124
</div>
125
+ <div class="litespeed-promo-score" style="margin-top:-5px;">
126
<?php echo LiteSpeed_Cache_GUI::pie( $_score[ 'score_before_optm' ], 45, false, true, 'litespeed-pie-' . $this->get_cls_of_pagescore( $_score[ 'score_before_optm' ] ) ) ; ?>
127
</div>
128
</div>
132
After
133
</p>
134
</div>
135
+ <div class="litespeed-promo-score" style="margin-top:-5px;">
136
<?php echo LiteSpeed_Cache_GUI::pie( $_score[ 'score_after_optm' ], 45, false, true, 'litespeed-pie-' . $this->get_cls_of_pagescore( $_score[ 'score_after_optm' ] ) ) ; ?>
137
</div>
138
</div>
admin/tpl/inc/disabled_all.php CHANGED
@@ -1,10 +1,6 @@
1
<?php
2
if ( ! defined( 'WPINC' ) ) die ;
3
4
- if ( ! defined( 'LITESPEED_DISABLE_ALL' ) ) {
5
- return ;
6
- }
7
-
8
$err = __( 'Disable All Features', 'litespeed-cache' ) ;
9
10
// other plugin left cache expired rules in .htaccess which will cause conflicts
1
<?php
2
if ( ! defined( 'WPINC' ) ) die ;
3
4
$err = __( 'Disable All Features', 'litespeed-cache' ) ;
5
6
// other plugin left cache expired rules in .htaccess which will cause conflicts
css/litespeed.css CHANGED
@@ -510,7 +510,6 @@ h3 .litespeed-learn-more {
510
margin: 15px 5px;
511
text-align: center;
512
background: #fff;
513
- min-width: 155px;
514
cursor: pointer;
515
text-decoration: none;
516
display: inline-block;
@@ -1450,6 +1449,10 @@ circle.litespeed-pie_circle {
1450
g.litespeed-pie_info text{
1451
alignment-baseline: central;
1452
text-anchor: middle;
1453
font-size: 14px;
1454
font-weight: 600;
1455
}
@@ -1537,7 +1540,7 @@ g.litespeed-pie_info .litespeed-pie-done {
1537
position: absolute;
1538
right:10px;
1539
top:0;
1540
- background: #cc3d6a;
1541
color: #fff;
1542
padding: 1px 8px;
1543
font-size: 13px;
@@ -1545,11 +1548,6 @@ g.litespeed-pie_info .litespeed-pie-done {
1545
min-width: 14px;
1546
}
1547
1548
- #litespeed-cdn-mapping-add {
1549
- background: #36b0b0;
1550
- color: #fff;
1551
- }
1552
-
1553
.litespeed-cdn-mapping-inc {
1554
display: inline-block;
1555
margin-left: 36px ;
@@ -1862,12 +1860,22 @@ input.litespeed-input[type="file"]{
1862
margin-top: 0;
1863
}
1864
1865
.litespeed-wrap .litespeed-float-resetbtn {
1866
position: absolute;
1867
right: 10px;
1868
bottom: 20px;
1869
}
1870
1871
.litespeed input,
1872
.litespeed-body input,
1873
.litespeed-body textarea {
@@ -2047,20 +2055,7 @@ input.litespeed-input-warning {
2047
box-shadow: 0 0 0 1px rgba(54, 176, 176, 0.25);
2048
}
2049
2050
- .litespeed [class*="litespeed-btn-"], .litespeed-wrap [class*="litespeed-btn-"], [class*="litespeed-btn-"] {
2051
- padding: 5px 10px;
2052
- font-size: 14px;
2053
- font-weight: 400;
2054
- border-radius: 3px;
2055
- margin: 15px 5px;
2056
- text-align: center;
2057
- background: #fff;
2058
- min-width: 155px;
2059
- cursor: pointer;
2060
- text-decoration: none;
2061
- display: inline-block;
2062
- height: initial;
2063
- }
2064
2065
.litespeed-empty-space-xlarge {
2066
margin-top: 8em;
510
margin: 15px 5px;
511
text-align: center;
512
background: #fff;
513
cursor: pointer;
514
text-decoration: none;
515
display: inline-block;
1449
g.litespeed-pie_info text{
1450
alignment-baseline: central;
1451
text-anchor: middle;
1452
+ font-size: 11px;
1453
+ }
1454
+
1455
+ .litespeed-promo-score g.litespeed-pie_info text{
1456
font-size: 14px;
1457
font-weight: 600;
1458
}
1540
position: absolute;
1541
right:10px;
1542
top:0;
1543
+ /*background: #cc3d6a;*/
1544
color: #fff;
1545
padding: 1px 8px;
1546
font-size: 13px;
1548
min-width: 14px;
1549
}
1550
1551
.litespeed-cdn-mapping-inc {
1552
display: inline-block;
1553
margin-left: 36px ;
1860
margin-top: 0;
1861
}
1862
1863
+ .rtl .litespeed-wrap .litespeed-float-submit {
1864
+ left: 10px;
1865
+ right: unset;
1866
+ }
1867
+
1868
.litespeed-wrap .litespeed-float-resetbtn {
1869
position: absolute;
1870
right: 10px;
1871
bottom: 20px;
1872
}
1873
1874
+ .rtl .litespeed-wrap .litespeed-float-resetbtn {
1875
+ left: 10px;
1876
+ right: unset;
1877
+ }
1878
+
1879
.litespeed input,
1880
.litespeed-body input,
1881
.litespeed-body textarea {
2055
box-shadow: 0 0 0 1px rgba(54, 176, 176, 0.25);
2056
}
2057
2058
+
2059
2060
.litespeed-empty-space-xlarge {
2061
margin-top: 8em;
inc/cdn.class.php CHANGED
@@ -342,7 +342,14 @@ class LiteSpeed_Cache_CDN
342
private function _replace_inline_css()
343
{
344
// preg_match_all( '/url\s*\(\s*(?!["\']?data:)(?![\'|\"]?[\#|\%|])([^)]+)\s*\)([^;},\s]*)/i', $this->content, $matches ) ;
345
- preg_match_all( '#url\((?![\'"]?data)[\'"]?([^\)\'"]+)[\'"]?\)#i', $this->content, $matches ) ;
346
foreach ( $matches[ 1 ] as $k => $url ) {
347
$url = str_replace( array( ' ', '\t', '\n', '\r', '\0', '\x0B', '"', "'", '&quot;', '&#039;' ), '', $url ) ;
348
342
private function _replace_inline_css()
343
{
344
// preg_match_all( '/url\s*\(\s*(?!["\']?data:)(?![\'|\"]?[\#|\%|])([^)]+)\s*\)([^;},\s]*)/i', $this->content, $matches ) ;
345
+
346
+ /**
347
+ * Excludes `\` from URL matching
348
+ * @see #959152 - Wordpress LSCache CDN Mapping causing malformed URLS
349
+ * @see #685485
350
+ * @since 3.0
351
+ */
352
+ preg_match_all( '#url\((?![\'"]?data)[\'"]?([^\)\'"\\\]+)[\'"]?\)#i', $this->content, $matches ) ;
353
foreach ( $matches[ 1 ] as $k => $url ) {
354
$url = str_replace( array( ' ', '\t', '\n', '\r', '\0', '\x0B', '"', "'", '&quot;', '&#039;' ), '', $url ) ;
355
inc/crawler.class.php CHANGED
@@ -590,7 +590,8 @@ class LiteSpeed_Cache_Crawler
590
*/
591
private function _recursive_build_crawler( $crawler_factors, $group = array(), $i = 0 )
592
{
593
- $current_factor = array_keys( $crawler_factors )[ $i ] ;
594
595
$if_touch_end = $i + 1 >= count( $crawler_factors ) ;
596
590
*/
591
private function _recursive_build_crawler( $crawler_factors, $group = array(), $i = 0 )
592
{
593
+ $current_factor = array_keys( $crawler_factors ) ;
594
+ $current_factor = $current_factor[ $i ] ;
595
596
$if_touch_end = $i + 1 >= count( $crawler_factors ) ;
597
inc/css.cls.php CHANGED
@@ -223,7 +223,7 @@ class LiteSpeed_Cache_CSS
223
}
224
225
/**
226
- * Send to LiteSpeed CSS API to generate CSS
227
*
228
* @since 2.3
229
* @access private
@@ -256,8 +256,11 @@ class LiteSpeed_Cache_CSS
256
return false ;
257
}
258
259
// Write to file
260
- Litespeed_File::save( $ccss_file, $json[ 'ccss' ], true ) ;
261
262
// Save summary data
263
$req_summary[ 'last_spent' ] = time() - $req_summary[ 'curr_request' ] ;
@@ -273,9 +276,9 @@ class LiteSpeed_Cache_CSS
273
274
LiteSpeed_Cache_Log::debug( '[CSS] saved ccss ' . $ccss_file ) ;
275
276
- LiteSpeed_Cache_Log::debug2( '[CSS] ccss con: ' . $json[ 'ccss' ] ) ;
277
278
- return $json[ 'ccss' ] ;
279
}
280
281
/**
223
}
224
225
/**
226
+ * Send to LiteSpeed CCSS API to generate CCSS
227
*
228
* @since 2.3
229
* @access private
256
return false ;
257
}
258
259
+ // Add filters
260
+ $ccss = apply_filters( 'litespeed_ccss', $json[ 'ccss' ], $ccss_type ) ;
261
+
262
// Write to file
263
+ Litespeed_File::save( $ccss_file, $ccss, true ) ;
264
265
// Save summary data
266
$req_summary[ 'last_spent' ] = time() - $req_summary[ 'curr_request' ] ;
276
277
LiteSpeed_Cache_Log::debug( '[CSS] saved ccss ' . $ccss_file ) ;
278
279
+ LiteSpeed_Cache_Log::debug2( '[CSS] ccss con: ' . $ccss ) ;
280
281
+ return $ccss ;
282
}
283
284
/**
inc/esi.class.php CHANGED
@@ -542,7 +542,18 @@ class LiteSpeed_Cache_ESI
542
*/
543
public function load_comment_form_block($params)
544
{
545
comment_form( $params[ self::PARAM_ARGS ], $params[ self::PARAM_ID ] ) ;
546
547
if ( ! LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_ESI_CACHE_COMMFORM ) ) {
548
LiteSpeed_Cache_Control::set_nocache( 'build-in set to not cacheable' ) ;
542
*/
543
public function load_comment_form_block($params)
544
{
545
+ ob_start() ;
546
comment_form( $params[ self::PARAM_ARGS ], $params[ self::PARAM_ID ] ) ;
547
+ $output = ob_get_contents() ;
548
+ ob_end_clean() ;
549
+
550
+ if ( $params[ 'is_json' ] ) {
551
+ $output = json_encode( $output ) ;
552
+ $output = ltrim( $output, '"' ) ;
553
+ $output = rtrim( $output, '"' ) ;
554
+ }
555
+
556
+ echo $output ;
557
558
if ( ! LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_ESI_CACHE_COMMFORM ) ) {
559
LiteSpeed_Cache_Control::set_nocache( 'build-in set to not cacheable' ) ;
inc/gui.class.php CHANGED
@@ -279,8 +279,13 @@ class LiteSpeed_Cache_GUI
279
{
280
$is_litespeed_page = $this->_is_litespeed_page() ;
281
282
- if ( $is_litespeed_page && ! $check_only ) {
283
- include_once LSCWP_DIR . "admin/tpl/inc/disabled_all.php" ;
284
}
285
286
$_summary = $this->get_summary() ;
279
{
280
$is_litespeed_page = $this->_is_litespeed_page() ;
281
282
+ // Bypass showing info banner if disabled all in debug
283
+ if ( defined( 'LITESPEED_DISABLE_ALL' ) ) {
284
+ if ( $is_litespeed_page && ! $check_only ) {
285
+ include_once LSCWP_DIR . "admin/tpl/inc/disabled_all.php" ;
286
+ }
287
+
288
+ return false ;
289
}
290
291
$_summary = $this->get_summary() ;
inc/img_optm.class.php CHANGED
@@ -224,7 +224,7 @@ class LiteSpeed_Cache_Img_Optm
224
LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
225
226
LiteSpeed_Cache_Log::debug( '[Img_Optm] optimize bypass: empty _img_in_queue' ) ;
227
- return [ 'ok' => $msg ] ;
228
}
229
230
// Filtered from existing data
@@ -242,7 +242,7 @@ class LiteSpeed_Cache_Img_Optm
242
if ( empty( $this->_img_in_queue ) ) {
243
$msg = __( 'Optimized successfully.', 'litespeed-cache' ) ;
244
LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
245
- return [ 'ok' => $msg ] ;
246
}
247
248
$total_groups = count( $this->_img_in_queue ) ;
@@ -305,7 +305,7 @@ class LiteSpeed_Cache_Img_Optm
305
$this->_update_credit( $json[ 'credit' ] ) ;
306
}
307
308
- return [ 'ok' => $msg ] ;
309
310
}
311
@@ -902,7 +902,7 @@ class LiteSpeed_Cache_Img_Optm
902
{
903
$notified_data = unserialize( base64_decode( $_POST[ 'data' ] ) ) ;
904
if ( empty( $notified_data ) || ! is_array( $notified_data ) ) {
905
- LiteSpeed_Cache_Log::debug( '[Img_Optm] notify exit: no notified data' ) ;
906
exit( json_encode( 'no notified data' ) ) ;
907
}
908
@@ -1163,7 +1163,7 @@ class LiteSpeed_Cache_Img_Optm
1163
$tmp = $wpdb->get_row( $wpdb->prepare( $q, self::DB_IMG_OPTIMIZE_STATUS_NOTIFIED ) ) ;
1164
if ( $tmp ) {
1165
LiteSpeed_Cache_Log::debug( '[Img_Optm] Task in queue, to be continued...' ) ;
1166
- return [ 'ok' => 'to_be_continued' ] ;
1167
}
1168
1169
// If all pulled, update tag to done
@@ -1175,7 +1175,7 @@ class LiteSpeed_Cache_Img_Optm
1175
$tried_level_up = "[Msg] $tried_level_up" ;
1176
}
1177
1178
- return [ 'ok' => "Pulled [ori] $total_pulled_ori [WebP] $total_pulled_webp [cost] {$time_cost}s $tried_level_up" ] ;
1179
}
1180
1181
/**
224
LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
225
226
LiteSpeed_Cache_Log::debug( '[Img_Optm] optimize bypass: empty _img_in_queue' ) ;
227
+ return array( 'ok' => $msg ) ;
228
}
229
230
// Filtered from existing data
242
if ( empty( $this->_img_in_queue ) ) {
243
$msg = __( 'Optimized successfully.', 'litespeed-cache' ) ;
244
LiteSpeed_Cache_Admin_Display::succeed( $msg ) ;
245
+ return array( 'ok' => $msg ) ;
246
}
247
248
$total_groups = count( $this->_img_in_queue ) ;
305
$this->_update_credit( $json[ 'credit' ] ) ;
306
}
307
308
+ return array( 'ok' => $msg ) ;
309
310
}
311
902
{
903
$notified_data = unserialize( base64_decode( $_POST[ 'data' ] ) ) ;
904
if ( empty( $notified_data ) || ! is_array( $notified_data ) ) {
905
+ LiteSpeed_Cache_Log::debug( '[Img_Optm] notify exit: no notified data' ) ;
906
exit( json_encode( 'no notified data' ) ) ;
907
}
908
1163
$tmp = $wpdb->get_row( $wpdb->prepare( $q, self::DB_IMG_OPTIMIZE_STATUS_NOTIFIED ) ) ;
1164
if ( $tmp ) {
1165
LiteSpeed_Cache_Log::debug( '[Img_Optm] Task in queue, to be continued...' ) ;
1166
+ return array( 'ok' => 'to_be_continued' ) ;
1167
}
1168
1169
// If all pulled, update tag to done
1175
$tried_level_up = "[Msg] $tried_level_up" ;
1176
}
1177
1178
+ return array( 'ok' => "Pulled [ori] $total_pulled_ori [WebP] $total_pulled_webp [cost] {$time_cost}s $tried_level_up" ) ;
1179
}
1180
1181
/**
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
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.1' ;
30
31
const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
32
inc/media.class.php CHANGED
@@ -556,6 +556,16 @@ eot;
556
continue ;
557
}
558
559
// to avoid multiple replacement
560
if ( in_array( $match[ 0 ], $html_list ) ) {
561
continue ;
556
continue ;
557
}
558
559
+ /**
560
+ * Excldues invalid image src from buddypress avatar crop
561
+ * @see https://wordpress.org/support/topic/lazy-load-breaking-buddypress-upload-avatar-feature/#post-11040512
562
+ * @since 2.9.1
563
+ */
564
+ if ( strpos( $attrs[ 'src' ], '{' ) !== false ) {
565
+ LiteSpeed_Cache_Log::debug2( '[Media] image src has {} ' . $attrs[ 'src' ] ) ;
566
+ continue ;
567
+ }
568
+
569
// to avoid multiple replacement
570
if ( in_array( $match[ 0 ], $html_list ) ) {
571
continue ;
inc/optimizer.class.php CHANGED
@@ -134,6 +134,9 @@ class LiteSpeed_Cache_Optimizer
134
135
LiteSpeed_Cache_Log::debug2( '[Optmer] Generated content ' . $file_type ) ;
136
137
return $content ;
138
}
139
134
135
LiteSpeed_Cache_Log::debug2( '[Optmer] Generated content ' . $file_type ) ;
136
137
+ // Add filter
138
+ $content = apply_filters( 'litespeed_optm_cssjs', $content, $file_type, $urls ) ;
139
+
140
return $content ;
141
}
142
inc/utility.class.php CHANGED
@@ -148,7 +148,9 @@ class LiteSpeed_Cache_Utility
148
*/
149
public static function ping( $domain )
150
{
151
- $domain = parse_url( $domain, PHP_URL_HOST ) ;
152
$starttime = microtime( true ) ;
153
$file = fsockopen( $domain, 80, $errno, $errstr, 10 ) ;
154
$stoptime = microtime( true ) ;
@@ -583,7 +585,7 @@ class LiteSpeed_Cache_Utility
583
$url[ 'query' ] = http_build_query( $built_arr ) ;
584
self::compatibility() ;
585
$url = http_build_url( $url ) ;
586
- $url = htmlspecialchars( $url ) ;
587
}
588
589
return $url ;
148
*/
149
public static function ping( $domain )
150
{
151
+ if ( strpos( $domain, ':' ) ) {
152
+ $domain = parse_url( $domain, PHP_URL_HOST ) ;
153
+ }
154
$starttime = microtime( true ) ;
155
$file = fsockopen( $domain, 80, $errno, $errstr, 10 ) ;
156
$stoptime = microtime( true ) ;
585
$url[ 'query' ] = http_build_query( $built_arr ) ;
586
self::compatibility() ;
587
$url = http_build_url( $url ) ;
588
+ $url = htmlspecialchars( $url, ENT_QUOTES, 'UTF-8' ) ;
589
}
590
591
return $url ;
includes/litespeed-cache-cdn.class.php CHANGED
@@ -342,7 +342,14 @@ class LiteSpeed_Cache_CDN
342
private function _replace_inline_css()
343
{
344
// preg_match_all( '/url\s*\(\s*(?!["\']?data:)(?![\'|\"]?[\#|\%|])([^)]+)\s*\)([^;},\s]*)/i', $this->content, $matches ) ;
345
- preg_match_all( '#url\((?![\'"]?data)[\'"]?([^\)\'"]+)[\'"]?\)#i', $this->content, $matches ) ;
346
foreach ( $matches[ 1 ] as $k => $url ) {
347
$url = str_replace( array( ' ', '\t', '\n', '\r', '\0', '\x0B', '"', "'", '&quot;', '&#039;' ), '', $url ) ;
348
342
private function _replace_inline_css()
343
{
344
// preg_match_all( '/url\s*\(\s*(?!["\']?data:)(?![\'|\"]?[\#|\%|])([^)]+)\s*\)([^;},\s]*)/i', $this->content, $matches ) ;
345
+
346
+ /**
347
+ * Excludes `\` from URL matching
348
+ * @see #959152 - Wordpress LSCache CDN Mapping causing malformed URLS
349
+ * @see #685485
350
+ * @since 3.0
351
+ */
352
+ preg_match_all( '#url\((?![\'"]?data)[\'"]?([^\)\'"\\\]+)[\'"]?\)#i', $this->content, $matches ) ;
353
foreach ( $matches[ 1 ] as $k => $url ) {
354
$url = str_replace( array( ' ', '\t', '\n', '\r', '\0', '\x0B', '"', "'", '&quot;', '&#039;' ), '', $url ) ;
355
includes/litespeed-cache-crawler.class.php CHANGED
@@ -590,7 +590,8 @@ class LiteSpeed_Cache_Crawler
590
*/
591
private function _recursive_build_crawler( $crawler_factors, $group = array(), $i = 0 )
592
{
593
- $current_factor = array_keys( $crawler_factors )[ $i ] ;
594
595
$if_touch_end = $i + 1 >= count( $crawler_factors ) ;
596
590
*/
591
private function _recursive_build_crawler( $crawler_factors, $group = array(), $i = 0 )
592
{
593
+ $current_factor = array_keys( $crawler_factors ) ;
594
+ $current_factor = $current_factor[ $i ] ;
595
596
$if_touch_end = $i + 1 >= count( $crawler_factors ) ;
597
includes/litespeed-cache-esi.class.php CHANGED
@@ -542,7 +542,18 @@ class LiteSpeed_Cache_ESI
542
*/
543
public function load_comment_form_block($params)
544
{
545
comment_form( $params[ self::PARAM_ARGS ], $params[ self::PARAM_ID ] ) ;
546
547
if ( ! LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_ESI_CACHE_COMMFORM ) ) {
548
LiteSpeed_Cache_Control::set_nocache( 'build-in set to not cacheable' ) ;
542
*/
543
public function load_comment_form_block($params)
544
{
545
+ ob_start() ;
546
comment_form( $params[ self::PARAM_ARGS ], $params[ self::PARAM_ID ] ) ;
547
+ $output = ob_get_contents() ;
548
+ ob_end_clean() ;
549
+
550
+ if ( $params[ 'is_json' ] ) {
551
+ $output = json_encode( $output ) ;
552
+ $output = ltrim( $output, '"' ) ;
553
+ $output = rtrim( $output, '"' ) ;
554
+ }
555
+
556
+ echo $output ;
557
558
if ( ! LiteSpeed_Cache::config( LiteSpeed_Cache_Config::OPID_ESI_CACHE_COMMFORM ) ) {
559
LiteSpeed_Cache_Control::set_nocache( 'build-in set to not cacheable' ) ;
includes/litespeed-cache-gui.class.php CHANGED
@@ -279,8 +279,13 @@ class LiteSpeed_Cache_GUI
279
{
280
$is_litespeed_page = $this->_is_litespeed_page() ;
281
282
- if ( $is_litespeed_page && ! $check_only ) {
283
- include_once LSCWP_DIR . "admin/tpl/inc/disabled_all.php" ;
284
}
285
286
$_summary = $this->get_summary() ;
279
{
280
$is_litespeed_page = $this->_is_litespeed_page() ;
281
282
+ // Bypass showing info banner if disabled all in debug
283
+ if ( defined( 'LITESPEED_DISABLE_ALL' ) ) {
284
+ if ( $is_litespeed_page && ! $check_only ) {
285
+ include_once LSCWP_DIR . "admin/tpl/inc/disabled_all.php" ;
286
+ }
287
+
288
+ return false ;
289
}
290
291
$_summary = $this->get_summary() ;
includes/litespeed-cache-utility.class.php CHANGED
@@ -148,7 +148,9 @@ class LiteSpeed_Cache_Utility
148
*/
149
public static function ping( $domain )
150
{
151
- $domain = parse_url( $domain, PHP_URL_HOST ) ;
152
$starttime = microtime( true ) ;
153
$file = fsockopen( $domain, 80, $errno, $errstr, 10 ) ;
154
$stoptime = microtime( true ) ;
@@ -583,7 +585,7 @@ class LiteSpeed_Cache_Utility
583
$url[ 'query' ] = http_build_query( $built_arr ) ;
584
self::compatibility() ;
585
$url = http_build_url( $url ) ;
586
- $url = htmlspecialchars( $url ) ;
587
}
588
589
return $url ;
148
*/
149
public static function ping( $domain )
150
{
151
+ if ( strpos( $domain, ':' ) ) {
152
+ $domain = parse_url( $domain, PHP_URL_HOST ) ;
153
+ }
154
$starttime = microtime( true ) ;
155
$file = fsockopen( $domain, 80, $errno, $errstr, 10 ) ;
156
$stoptime = microtime( true ) ;
585
$url[ 'query' ] = http_build_query( $built_arr ) ;
586
self::compatibility() ;
587
$url = http_build_url( $url ) ;
588
+ $url = htmlspecialchars( $url, ENT_QUOTES, 'UTF-8' ) ;
589
}
590
591
return $url ;
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
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.1' ;
30
31
const PAGE_EDIT_HTACCESS = 'lscache-edit-htaccess' ;
32
languages/litespeed-cache.pot CHANGED
@@ -1,14 +1,14 @@
1
- # Copyright (C) 2018 LiteSpeed Cache
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\n"
6
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
- "POT-Creation-Date: 2018-12-31 14:22:12+00:00\n"
8
"MIME-Version: 1.0\n"
9
"Content-Type: text/plain; charset=UTF-8\n"
10
"Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
12
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
"Language-Team: LANGUAGE <LL@li.org>\n"
14
@@ -48,14 +48,14 @@ msgid "%s plugin version %s required for this action."
48
msgstr ""
49
50
#: admin/litespeed-cache-admin-display.class.php:156
51
- #: admin/litespeed-cache-admin-display.class.php:248 inc/gui.class.php:483
52
- #: includes/litespeed-cache-gui.class.php:483
53
msgid "Settings"
54
msgstr ""
55
56
#: admin/litespeed-cache-admin-display.class.php:158
57
- #: admin/tpl/setting/settings_cdn.php:234 inc/gui.class.php:475
58
- #: includes/litespeed-cache-gui.class.php:475
59
msgid "Manage"
60
msgstr ""
61
@@ -63,8 +63,8 @@ msgstr ""
63
msgid "Edit .htaccess"
64
msgstr ""
65
66
- #: admin/litespeed-cache-admin-display.class.php:165 inc/gui.class.php:492
67
- #: includes/litespeed-cache-gui.class.php:492
68
msgid "Image Optimization"
69
msgstr ""
70
@@ -444,7 +444,7 @@ msgid "Clean all CSS/JS optimizer data successfully."
444
msgstr ""
445
446
#: admin/litespeed-cache-admin-report.class.php:64
447
- msgid "Failed to push to LiteSpeed server: %s"
448
msgstr ""
449
450
#: admin/litespeed-cache-admin-rules.class.php:918
@@ -852,10 +852,10 @@ msgstr ""
852
msgid "Rate %s on %s"
853
msgstr ""
854
855
- #. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.9) #-#-#-#-#
856
#. Plugin Name of the plugin/theme
857
- #: admin/tpl/inc/admin_footer.php:6 inc/gui.class.php:467
858
- #: includes/litespeed-cache-gui.class.php:467
859
msgid "LiteSpeed Cache"
860
msgstr ""
861
@@ -959,7 +959,7 @@ msgstr ""
959
msgid "Caching functions on this page are currently unavailable!"
960
msgstr ""
961
962
- #: admin/tpl/inc/disabled_all.php:8 admin/tpl/setting/settings_debug.php:13
963
msgid "Disable All Features"
964
msgstr ""
965
@@ -1350,8 +1350,8 @@ msgid ""
1350
"dismissed. (<a %3$s>Learn More</a>)"
1351
msgstr ""
1352
1353
- #: admin/tpl/manage/manage_cdn.php:11 inc/gui.class.php:526
1354
- #: includes/litespeed-cache-gui.class.php:526
1355
msgid "Cloudflare"
1356
msgstr ""
1357
@@ -1540,17 +1540,17 @@ msgstr ""
1540
#: admin/tpl/manage/manage_purge.php:39 admin/tpl/manage/manage_purge.php:45
1541
#: admin/tpl/manage/manage_purge.php:54 admin/tpl/manage/manage_purge.php:63
1542
#: admin/tpl/manage/manage_purge.php:72 admin/tpl/manage/manage_purge.php:81
1543
- #: admin/tpl/manage/manage_purge.php:90 inc/gui.class.php:501
1544
- #: inc/gui.class.php:509 inc/gui.class.php:517 inc/gui.class.php:526
1545
- #: inc/gui.class.php:536 inc/gui.class.php:546 inc/gui.class.php:556
1546
- #: inc/gui.class.php:566 includes/litespeed-cache-gui.class.php:501
1547
- #: includes/litespeed-cache-gui.class.php:509
1548
- #: includes/litespeed-cache-gui.class.php:517
1549
- #: includes/litespeed-cache-gui.class.php:526
1550
- #: includes/litespeed-cache-gui.class.php:536
1551
- #: includes/litespeed-cache-gui.class.php:546
1552
- #: includes/litespeed-cache-gui.class.php:556
1553
- #: includes/litespeed-cache-gui.class.php:566
1554
msgid "Purge All"
1555
msgstr ""
1556
@@ -1558,8 +1558,8 @@ msgstr ""
1558
msgid "Purge the litespeed cache entries created by this plugin"
1559
msgstr ""
1560
1561
- #: admin/tpl/manage/manage_purge.php:45 inc/gui.class.php:517
1562
- #: includes/litespeed-cache-gui.class.php:517
1563
msgid "CSS/JS Cache"
1564
msgstr ""
1565
@@ -1568,8 +1568,8 @@ msgid "This will purge all minified/combined CSS/JS entries only"
1568
msgstr ""
1569
1570
#: admin/tpl/manage/manage_purge.php:54
1571
- #: admin/tpl/setting/settings_inc.cache_object.php:28 inc/gui.class.php:536
1572
- #: includes/litespeed-cache-gui.class.php:536
1573
msgid "Object Cache"
1574
msgstr ""
1575
@@ -1577,8 +1577,8 @@ msgstr ""
1577
msgid "Purge all the object caches"
1578
msgstr ""
1579
1580
- #: admin/tpl/manage/manage_purge.php:63 inc/gui.class.php:546
1581
- #: includes/litespeed-cache-gui.class.php:546
1582
msgid "Opcode Cache"
1583
msgstr ""
1584
@@ -1586,8 +1586,8 @@ msgstr ""
1586
msgid "Reset the entire opcode cache"
1587
msgstr ""
1588
1589
- #: admin/tpl/manage/manage_purge.php:72 inc/gui.class.php:556
1590
- #: includes/litespeed-cache-gui.class.php:556
1591
msgid "Critical CSS"
1592
msgstr ""
1593
@@ -1595,8 +1595,8 @@ msgstr ""
1595
msgid "This will delete all generated critical CSS files"
1596
msgstr ""
1597
1598
- #: admin/tpl/manage/manage_purge.php:81 inc/gui.class.php:566
1599
- #: includes/litespeed-cache-gui.class.php:566
1600
msgid "Placeholder Cache"
1601
msgstr ""
1602
@@ -4074,71 +4074,71 @@ msgid ""
4074
"admin before their natural expiration, if necessary."
4075
msgstr ""
4076
4077
- #: inc/gui.class.php:396 includes/litespeed-cache-gui.class.php:396
4078
msgid "Purge this page"
4079
msgstr ""
4080
4081
- #: inc/gui.class.php:404 includes/litespeed-cache-gui.class.php:404
4082
msgid "Mark this page as "
4083
msgstr ""
4084
4085
- #: inc/gui.class.php:411 includes/litespeed-cache-gui.class.php:411
4086
msgid "Forced cacheable"
4087
msgstr ""
4088
4089
- #: inc/gui.class.php:418 includes/litespeed-cache-gui.class.php:418
4090
msgid "Non cacheable"
4091
msgstr ""
4092
4093
- #: inc/gui.class.php:425 includes/litespeed-cache-gui.class.php:425
4094
msgid "Private cache"
4095
msgstr ""
4096
4097
- #: inc/gui.class.php:432 includes/litespeed-cache-gui.class.php:432
4098
msgid "No optimization"
4099
msgstr ""
4100
4101
- #: inc/gui.class.php:439 includes/litespeed-cache-gui.class.php:439
4102
msgid "More settings"
4103
msgstr ""
4104
4105
- #: inc/gui.class.php:459 includes/litespeed-cache-gui.class.php:459
4106
msgid "LiteSpeed Cache Purge All"
4107
msgstr ""
4108
4109
- #: inc/gui.class.php:459 inc/gui.class.php:509
4110
- #: includes/litespeed-cache-gui.class.php:459
4111
- #: includes/litespeed-cache-gui.class.php:509
4112
msgid "LSCache"
4113
msgstr ""
4114
4115
- #: inc/gui.class.php:584 includes/litespeed-cache-gui.class.php:584
4116
msgid "Remove all previous unfinished image optimization requests."
4117
msgstr ""
4118
4119
- #: inc/gui.class.php:585 includes/litespeed-cache-gui.class.php:585
4120
msgid "Clean Up Unfinished Data"
4121
msgstr ""
4122
4123
- #: inc/gui.class.php:604 includes/litespeed-cache-gui.class.php:604
4124
msgid "Install %s"
4125
msgstr ""
4126
4127
- #: inc/gui.class.php:605 includes/litespeed-cache-gui.class.php:605
4128
msgid "Install Now"
4129
msgstr ""
4130
4131
- #: inc/gui.class.php:625 includes/litespeed-cache-gui.class.php:625
4132
msgid ""
4133
"<a href=\"%1$s\" %2$s>View version %3$s details</a> or <a href=\"%4$s\" %5$s "
4134
"target=\"_blank\">update now</a>."
4135
msgstr ""
4136
4137
- #: inc/gui.class.php:628 includes/litespeed-cache-gui.class.php:628
4138
msgid "View %1$s version %2$s details"
4139
msgstr ""
4140
4141
- #: inc/gui.class.php:633 includes/litespeed-cache-gui.class.php:633
4142
msgid "Update %s now"
4143
msgstr ""
4144
@@ -4340,15 +4340,15 @@ msgstr ""
4340
msgid "LiteSpeed Cache Custom Cron Crawler"
4341
msgstr ""
4342
4343
- #: inc/utility.class.php:221 includes/litespeed-cache-utility.class.php:221
4344
msgid "just now"
4345
msgstr ""
4346
4347
- #: inc/utility.class.php:221 includes/litespeed-cache-utility.class.php:221
4348
msgid "right now"
4349
msgstr ""
4350
4351
- #: inc/utility.class.php:224 includes/litespeed-cache-utility.class.php:224
4352
msgid " %s ago"
4353
msgstr ""
4354
1
+ # Copyright (C) 2019 LiteSpeed Cache
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.1\n"
6
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
7
+ "POT-Creation-Date: 2019-01-25 20:13:27+00:00\n"
8
"MIME-Version: 1.0\n"
9
"Content-Type: text/plain; charset=UTF-8\n"
10
"Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n"
12
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
"Language-Team: LANGUAGE <LL@li.org>\n"
14
48
msgstr ""
49
50
#: admin/litespeed-cache-admin-display.class.php:156
51
+ #: admin/litespeed-cache-admin-display.class.php:248 inc/gui.class.php:488
52
+ #: includes/litespeed-cache-gui.class.php:488
53
msgid "Settings"
54
msgstr ""
55
56
#: admin/litespeed-cache-admin-display.class.php:158
57
+ #: admin/tpl/setting/settings_cdn.php:234 inc/gui.class.php:480
58
+ #: includes/litespeed-cache-gui.class.php:480
59
msgid "Manage"
60
msgstr ""
61
63
msgid "Edit .htaccess"
64
msgstr ""
65
66
+ #: admin/litespeed-cache-admin-display.class.php:165 inc/gui.class.php:497
67
+ #: includes/litespeed-cache-gui.class.php:497
68
msgid "Image Optimization"
69
msgstr ""
70
444
msgstr ""
445
446
#: admin/litespeed-cache-admin-report.class.php:64
447
+ msgid "Failed to push to LiteSpeed server"
448
msgstr ""
449
450
#: admin/litespeed-cache-admin-rules.class.php:918
852
msgid "Rate %s on %s"
853
msgstr ""
854
855
+ #. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 2.9.1) #-#-#-#-#
856
#. Plugin Name of the plugin/theme
857
+ #: admin/tpl/inc/admin_footer.php:6 inc/gui.class.php:472
858
+ #: includes/litespeed-cache-gui.class.php:472
859
msgid "LiteSpeed Cache"
860
msgstr ""
861
959
msgid "Caching functions on this page are currently unavailable!"
960
msgstr ""
961
962
+ #: admin/tpl/inc/disabled_all.php:4 admin/tpl/setting/settings_debug.php:13
963
msgid "Disable All Features"
964
msgstr ""
965
1350
"dismissed. (<a %3$s>Learn More</a>)"
1351
msgstr ""
1352
1353
+ #: admin/tpl/manage/manage_cdn.php:11 inc/gui.class.php:531
1354
+ #: includes/litespeed-cache-gui.class.php:531
1355
msgid "Cloudflare"
1356
msgstr ""
1357
1540
#: admin/tpl/manage/manage_purge.php:39 admin/tpl/manage/manage_purge.php:45
1541
#: admin/tpl/manage/manage_purge.php:54 admin/tpl/manage/manage_purge.php:63
1542
#: admin/tpl/manage/manage_purge.php:72 admin/tpl/manage/manage_purge.php:81
1543
+ #: admin/tpl/manage/manage_purge.php:90 inc/gui.class.php:506
1544
+ #: inc/gui.class.php:514 inc/gui.class.php:522 inc/gui.class.php:531
1545
+ #: inc/gui.class.php:541 inc/gui.class.php:551 inc/gui.class.php:561
1546
+ #: inc/gui.class.php:571 includes/litespeed-cache-gui.class.php:506
1547
+ #: includes/litespeed-cache-gui.class.php:514
1548
+ #: includes/litespeed-cache-gui.class.php:522
1549
+ #: includes/litespeed-cache-gui.class.php:531
1550
+ #: includes/litespeed-cache-gui.class.php:541
1551
+ #: includes/litespeed-cache-gui.class.php:551
1552
+ #: includes/litespeed-cache-gui.class.php:561
1553
+ #: includes/litespeed-cache-gui.class.php:571
1554
msgid "Purge All"
1555
msgstr ""
1556
1558
msgid "Purge the litespeed cache entries created by this plugin"
1559
msgstr ""
1560
1561
+ #: admin/tpl/manage/manage_purge.php:45 inc/gui.class.php:522
1562
+ #: includes/litespeed-cache-gui.class.php:522
1563
msgid "CSS/JS Cache"
1564
msgstr ""
1565
1568
msgstr ""
1569
1570
#: admin/tpl/manage/manage_purge.php:54
1571
+ #: admin/tpl/setting/settings_inc.cache_object.php:28 inc/gui.class.php:541
1572
+ #: includes/litespeed-cache-gui.class.php:541
1573
msgid "Object Cache"
1574
msgstr ""
1575
1577
msgid "Purge all the object caches"
1578
msgstr ""
1579
1580
+ #: admin/tpl/manage/manage_purge.php:63 inc/gui.class.php:551
1581
+ #: includes/litespeed-cache-gui.class.php:551
1582
msgid "Opcode Cache"
1583
msgstr ""
1584
1586
msgid "Reset the entire opcode cache"
1587
msgstr ""
1588
1589
+ #: admin/tpl/manage/manage_purge.php:72 inc/gui.class.php:561
1590
+ #: includes/litespeed-cache-gui.class.php:561
1591
msgid "Critical CSS"
1592
msgstr ""
1593
1595
msgid "This will delete all generated critical CSS files"
1596
msgstr ""
1597
1598
+ #: admin/tpl/manage/manage_purge.php:81 inc/gui.class.php:571
1599
+ #: includes/litespeed-cache-gui.class.php:571
1600
msgid "Placeholder Cache"
1601
msgstr ""
1602
4074
"admin before their natural expiration, if necessary."
4075
msgstr ""
4076
4077
+ #: inc/gui.class.php:401 includes/litespeed-cache-gui.class.php:401
4078
msgid "Purge this page"
4079
msgstr ""
4080
4081
+ #: inc/gui.class.php:409 includes/litespeed-cache-gui.class.php:409
4082
msgid "Mark this page as "
4083
msgstr ""
4084
4085
+ #: inc/gui.class.php:416 includes/litespeed-cache-gui.class.php:416
4086
msgid "Forced cacheable"
4087
msgstr ""
4088
4089
+ #: inc/gui.class.php:423 includes/litespeed-cache-gui.class.php:423
4090
msgid "Non cacheable"
4091
msgstr ""
4092
4093
+ #: inc/gui.class.php:430 includes/litespeed-cache-gui.class.php:430
4094
msgid "Private cache"
4095
msgstr ""
4096
4097
+ #: inc/gui.class.php:437 includes/litespeed-cache-gui.class.php:437
4098
msgid "No optimization"
4099
msgstr ""
4100
4101
+ #: inc/gui.class.php:444 includes/litespeed-cache-gui.class.php:444
4102
msgid "More settings"
4103
msgstr ""
4104
4105
+ #: inc/gui.class.php:464 includes/litespeed-cache-gui.class.php:464
4106
msgid "LiteSpeed Cache Purge All"
4107
msgstr ""
4108
4109
+ #: inc/gui.class.php:464 inc/gui.class.php:514
4110
+ #: includes/litespeed-cache-gui.class.php:464
4111
+ #: includes/litespeed-cache-gui.class.php:514
4112
msgid "LSCache"
4113
msgstr ""
4114
4115
+ #: inc/gui.class.php:589 includes/litespeed-cache-gui.class.php:589
4116
msgid "Remove all previous unfinished image optimization requests."
4117
msgstr ""
4118
4119
+ #: inc/gui.class.php:590 includes/litespeed-cache-gui.class.php:590
4120
msgid "Clean Up Unfinished Data"
4121
msgstr ""
4122
4123
+ #: inc/gui.class.php:609 includes/litespeed-cache-gui.class.php:609
4124
msgid "Install %s"
4125
msgstr ""
4126
4127
+ #: inc/gui.class.php:610 includes/litespeed-cache-gui.class.php:610
4128
msgid "Install Now"
4129
msgstr ""
4130
4131
+ #: inc/gui.class.php:630 includes/litespeed-cache-gui.class.php:630
4132
msgid ""
4133
"<a href=\"%1$s\" %2$s>View version %3$s details</a> or <a href=\"%4$s\" %5$s "
4134
"target=\"_blank\">update now</a>."
4135
msgstr ""
4136
4137
+ #: inc/gui.class.php:633 includes/litespeed-cache-gui.class.php:633
4138
msgid "View %1$s version %2$s details"
4139
msgstr ""
4140
4141
+ #: inc/gui.class.php:638 includes/litespeed-cache-gui.class.php:638
4142
msgid "Update %s now"
4143
msgstr ""
4144
4340
msgid "LiteSpeed Cache Custom Cron Crawler"
4341
msgstr ""
4342
4343
+ #: inc/utility.class.php:223 includes/litespeed-cache-utility.class.php:223
4344
msgid "just now"
4345
msgstr ""
4346
4347
+ #: inc/utility.class.php:223 includes/litespeed-cache-utility.class.php:223
4348
msgid "right now"
4349
msgstr ""
4350
4351
+ #: inc/utility.class.php:226 includes/litespeed-cache-utility.class.php:226
4352
msgid " %s ago"
4353
msgstr ""
4354
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.1
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.0.2
6
- Stable tag: 2.9
7
License: GPLv3
8
License URI: http://www.gnu.org/licenses/gpl.html
9
@@ -271,6 +271,7 @@ Click on the `Advanced View` link at the top of the page, and several more tabs
271
* [WP-PostRatings](https://wordpress.org/plugins/wp-postratings/)
272
* [Avada 5.1 RC1+](https://avada.theme-fusion.com/)
273
* [Elegant Themes Divi 3.0.67+](https://www.elegantthemes.com/gallery/divi/)
274
* [Caldera Forms](https://wordpress.org/plugins/caldera-forms/) 1.5.6.2+
275
* Login With Ajax
276
* [Ninja Forms](https://wordpress.org/plugins/ninja-forms/)
@@ -280,6 +281,21 @@ Click on the `Advanced View` link at the top of the page, and several more tabs
280
281
== Changelog ==
282
283
= 2.9 - Dec 31 2018 =
284
* 🌱<strong>Media</strong>: Lazy Load Image Classname Excludes. (@thinkmedia)
285
* 🌱: New EU/AS cloud servers for faster image optimization handling.
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.0.3
6
+ Stable tag: 2.9.1
7
License: GPLv3
8
License URI: http://www.gnu.org/licenses/gpl.html
9
271
* [WP-PostRatings](https://wordpress.org/plugins/wp-postratings/)
272
* [Avada 5.1 RC1+](https://avada.theme-fusion.com/)
273
* [Elegant Themes Divi 3.0.67+](https://www.elegantthemes.com/gallery/divi/)
274
+ * [Elegant Divi Builder] (https://www.elegantthemes.com/plugins/divi-builder/)
275
* [Caldera Forms](https://wordpress.org/plugins/caldera-forms/) 1.5.6.2+
276
* Login With Ajax
277
* [Ninja Forms](https://wordpress.org/plugins/ninja-forms/)
281
282
== Changelog ==
283
284
+ = 2.9.1 - Jan 25 2019 =
285
+ * <strong>Compatibility</strong>: Fixed fatal error for PHP 5.3.
286
+ * <strong>Compatibility</strong>: Fixed PHP warning in htmlspecialchars when building URLs. (@souljahn2)
287
+ * <strong>Media</strong>: Excluded invalid image src from lazyload. (@andrew55)
288
+ * <strong>Optm</strong>: Improved URL compatibility when detecting closest cloud server.
289
+ * <strong>ESI</strong>: Supported JSON format comment format in ESI with `is_json` parameter.
290
+ * <strong>API</strong>: Added filters to CCSS/CSS/JS content. (@lhoucine)
291
+ * <strong>3rd</strong>: Improved comment compatibility with Elegant Divi Builder.
292
+ * <strong>IAPI</strong>: New Europe Image Optimization server (EU5). <strong>Please whitelist the new [IAPI IP List](https://wp.api.litespeedtech.com/ips).</strong>
293
+ * <strong>GUI</strong>: No longer show banners when `Disable All` in `Debug` is ON. (@rabbitwordpress)
294
+ * <strong>GUI</strong>: Fixed button style for RTL languages.
295
+ * <strong>GUI</strong>: Removed unnecessary translation in report.
296
+ * <strong>GUI</strong>: Updated readme wiki links.
297
+ * <strong>GUI</strong>: Fixed pie styles in image optimization page.
298
+
299
= 2.9 - Dec 31 2018 =
300
* 🌱<strong>Media</strong>: Lazy Load Image Classname Excludes. (@thinkmedia)
301
* 🌱: New EU/AS cloud servers for faster image optimization handling.
thirdparty/lscwp-3rd-divi-theme-builder.cls.php ADDED
@@ -0,0 +1,45 @@
1
+ <?php
2
+ /**
3
+ * The Third Party integration with DIVI Theme.
4
+ *
5
+ * @since 2.9.0
6
+ * @package LiteSpeed_Cache
7
+ * @subpackage LiteSpeed_Cache/thirdparty
8
+ * @author LiteSpeed Technologies <info@litespeedtech.com>
9
+ */
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
+ die() ;
12
+ }
13
+ LiteSpeed_Cache_API::register( 'LiteSpeed_Cache_ThirdParty_Divi_Theme_Builder' ) ;
14
+
15
+ class LiteSpeed_Cache_ThirdParty_Divi_Theme_Builder
16
+ {
17
+ private static $js_comment_box = false ;
18
+
19
+ public static function detect()
20
+ {
21
+ if ( ! defined( 'ET_CORE' ) ) return ;
22
+
23
+ add_action( 'et_fb_before_comments_template', 'LiteSpeed_Cache_ThirdParty_Divi_Theme_Builder::js_comment_box_on' ) ;
24
+ add_action( 'et_fb_after_comments_template', 'LiteSpeed_Cache_ThirdParty_Divi_Theme_Builder::js_comment_box_off' ) ;
25
+ add_filter( 'litespeed_cache_sub_esi_params-comment-form', 'LiteSpeed_Cache_ThirdParty_Divi_Theme_Builder::esi_comment_add_slash' ) ;
26
+ }
27
+
28
+ public static function js_comment_box_on() {
29
+ self::$js_comment_box = true ;
30
+ }
31
+
32
+ public static function js_comment_box_off() {
33
+ self::$js_comment_box = false ;
34
+ }
35
+
36
+ public static function esi_comment_add_slash( $params )
37
+ {
38
+ if ( self::$js_comment_box ) {
39
+ $params[ 'is_json' ] = 1 ;
40
+ $params[ '_ls_silence' ] = 1 ;
41
+ }
42
+
43
+ return $params ;
44
+ }
45
+ }
thirdparty/lscwp-3rd-nextgengallery.cls.php CHANGED
@@ -72,8 +72,8 @@ class LiteSpeed_Cache_ThirdParty_NextGenGallery
72
*/
73
public static function update_image()
74
{
75
- if ( isset( $_GET['gallery_id'] ) ) {
76
- LiteSpeed_Cache_API::purge( self::CACHETAG_GALLERIES . $_GET['gallery_id'] ) ;
77
return ;
78
}
79
@@ -168,6 +168,11 @@ class LiteSpeed_Cache_ThirdParty_NextGenGallery
168
*/
169
public static function update_gallery($gid)
170
{
171
LiteSpeed_Cache_API::purge(self::CACHETAG_GALLERIES . $gid) ;
172
}
173
72
*/
73
public static function update_image()
74
{
75
+ if ( isset( $_REQUEST[ 'gallery_id' ] ) ) {
76
+ LiteSpeed_Cache_API::purge( self::CACHETAG_GALLERIES . $_REQUEST[ 'gallery_id' ] ) ;
77
return ;
78
}
79
168
*/
169
public static function update_gallery($gid)
170
{
171
+ // New version input will be an object with gid value
172
+ if ( is_object( $gid ) && ! empty( $gid->gid ) ) {
173
+ $gid = $gid->gid ;
174
+ }
175
+
176
LiteSpeed_Cache_API::purge(self::CACHETAG_GALLERIES . $gid) ;
177
}
178
thirdparty/lscwp-registry-3rd.php CHANGED
@@ -30,6 +30,7 @@ $thirdparty_list = array(
30
'yith-wishlist',
31
'avada',
32
'wp-postratings',
33
) ;
34
35
foreach ($thirdparty_list as $val) {
30
'yith-wishlist',
31
'avada',
32
'wp-postratings',
33
+ 'divi-theme-builder',
34
) ;
35
36
foreach ($thirdparty_list as $val) {