Version Description
- Aug 1 2022 =
- Toolbox Debug log can now show Purge/Crawler logs as well. (Tynan)
- UCSS Prepared for future message queue.
- UCSS Moved UCSS class to its own file.
- 3rd Added 3rd-party support for WC PDF Product Vouchers. (Tynan)
- Core Fixed potential PHP warning when saving summary data. (Sarah Richardson)
- Purge Purge can now clear the summary correctly. (Kevin)
-
VPI Added
queue_k
to API notification.
Download this release
Release Info
Developer | LiteSpeedTech |
Plugin | LiteSpeed Cache |
Version | 5.1 |
Comparing to | |
See all releases |
Code changes from version 5.0.1 to 5.1
- assets/css/litespeed.css +8 -0
- assets/js/litespeed-cache-admin.js +136 -20
- lang/litespeed-cache.pot +171 -179
- litespeed-cache.php +2 -2
- readme.txt +10 -1
- src/crawler.cls.php +1 -1
- src/css.cls.php +4 -189
- src/debug2.cls.php +4 -2
- src/gui.cls.php +1 -27
- src/optimize.cls.php +1 -1
- src/optimizer.cls.php +1 -1
- src/purge.cls.php +6 -6
- src/root.cls.php +1 -1
- src/router.cls.php +3 -0
- src/task.cls.php +1 -1
- src/ucss.cls.php +535 -0
- src/vpi.cls.php +9 -9
- thirdparty/entry.inc.php +1 -0
- thirdparty/wc-pdf-product-vouchers.cls.php +33 -0
- tpl/dash/dashboard.tpl.php +5 -21
- tpl/page_optm/settings_css.tpl.php +8 -7
- tpl/toolbox/beta_test.tpl.php +1 -1
- tpl/toolbox/log_viewer.tpl.php +92 -16
assets/css/litespeed.css
CHANGED
@@ -2533,6 +2533,14 @@ g.litespeed-pie_info .litespeed-pie-done {
|
|
2533 |
font-size: 12px;
|
2534 |
}
|
2535 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2536 |
/* =======================================
|
2537 |
VIEW - dashboard
|
2538 |
======================================= */
|
2533 |
font-size: 12px;
|
2534 |
}
|
2535 |
|
2536 |
+
/* =======================================
|
2537 |
+
VIEW - log view
|
2538 |
+
======================================= */
|
2539 |
+
|
2540 |
+
.litespeed-log-view-wrapper {
|
2541 |
+
margin: 1.5em 0;
|
2542 |
+
}
|
2543 |
+
|
2544 |
/* =======================================
|
2545 |
VIEW - dashboard
|
2546 |
======================================= */
|
assets/js/litespeed-cache-admin.js
CHANGED
@@ -51,23 +51,76 @@ var _litespeed_dots ;
|
|
51 |
|
52 |
/************** LSWCP JS ****************/
|
53 |
// page tab switch functionality
|
54 |
-
|
55 |
-
|
56 |
-
var
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
-
|
64 |
-
// tab
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
// Manage page -> purge by
|
73 |
$('[name=purgeby]').on( 'change', function(event) {
|
@@ -269,11 +322,74 @@ function litespeed_keycode( num ) {
|
|
269 |
return false ;
|
270 |
}
|
271 |
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
}
|
278 |
|
279 |
function lscwpEsiEnabled(the_checkbox, esi_ids) {
|
51 |
|
52 |
/************** LSWCP JS ****************/
|
53 |
// page tab switch functionality
|
54 |
+
( function() {
|
55 |
+
var hash = window.location.hash.substr( 1 );
|
56 |
+
var $tabs = $( '[data-litespeed-tab]' );
|
57 |
+
var $subtabs = $( '[data-litespeed-subtab]' );
|
58 |
+
|
59 |
+
// Handle tab and subtab events
|
60 |
+
var tab_action = function( $elems, type ) {
|
61 |
+
type = litespeed_tab_type( type );
|
62 |
+
var data = 'litespeed-' + type;
|
63 |
+
$elems.on( 'click', function ( _event ) {
|
64 |
+
litespeed_display_tab( $( this ).data( data ), type );
|
65 |
+
document.cookie = 'litespeed_' + type + '=' + $( this ).data( data );
|
66 |
+
$( this ).blur();
|
67 |
+
} );
|
68 |
+
};
|
69 |
+
tab_action( $tabs );
|
70 |
+
tab_action( $subtabs, 'subtab' );
|
71 |
+
|
72 |
+
if ( ! $tabs.length > 0 ) {
|
73 |
+
// No tabs exist
|
74 |
+
return;
|
75 |
}
|
76 |
+
|
77 |
+
// Find hash in tabs and subtabs
|
78 |
+
var $hash_tab = $tabs
|
79 |
+
.filter( '[data-litespeed-tab="' + hash + '"]:first' );
|
80 |
+
var $hash_subtab = $subtabs
|
81 |
+
.filter( '[data-litespeed-subtab="' + hash + '"]:first' );
|
82 |
+
|
83 |
+
// Find tab name
|
84 |
+
var $subtab;
|
85 |
+
var $tab;
|
86 |
+
var tab_name;
|
87 |
+
if ( $hash_subtab.length > 0 ) {
|
88 |
+
// Hash is a subtab
|
89 |
+
$tab = $hash_subtab.closest( '[data-litespeed-layout]' );
|
90 |
+
if ( $tab.length > 0 ) {
|
91 |
+
$subtab = $hash_subtab;
|
92 |
+
tab_name = $tab.data( 'litespeed-layout' );
|
93 |
+
}
|
94 |
+
}
|
95 |
+
if ( typeof( $tab ) === 'undefined' || $tab.length < 1 ) {
|
96 |
+
// Maybe hash is a tab
|
97 |
+
$tab = $hash_tab;
|
98 |
+
if ( $tab.length < 1 ) {
|
99 |
+
// Maybe tab cookie exists
|
100 |
+
$tab = litespeed_tab_cookie( $tabs );
|
101 |
+
if ( $tab.length < 1 ) {
|
102 |
+
// Use the first tab by default
|
103 |
+
$tab = $tabs.first();
|
104 |
+
}
|
105 |
+
}
|
106 |
+
if ( typeof( tab_name ) === 'undefined' ) {
|
107 |
+
tab_name = $tab.data( 'litespeed-tab' );
|
108 |
+
}
|
109 |
}
|
110 |
+
|
111 |
+
// Always display a tab
|
112 |
+
litespeed_display_tab( tab_name );
|
113 |
+
|
114 |
+
// Find subtab name
|
115 |
+
if ( typeof( $subtab ) === 'undefined' || $subtab.length < 1 ) {
|
116 |
+
$subtab = litespeed_tab_cookie( $subtabs, 'subtab' );
|
117 |
+
}
|
118 |
+
if ( $subtab.length > 0 ) {
|
119 |
+
var subtab_name = $subtab.data( 'litespeed-subtab' );
|
120 |
+
// Display a subtab
|
121 |
+
litespeed_display_tab( subtab_name, 'subtab' );
|
122 |
+
}
|
123 |
+
} )();
|
124 |
|
125 |
// Manage page -> purge by
|
126 |
$('[name=purgeby]').on( 'change', function(event) {
|
322 |
return false ;
|
323 |
}
|
324 |
|
325 |
+
/**
|
326 |
+
* Normalize specified tab type
|
327 |
+
* @since 4.7
|
328 |
+
*/
|
329 |
+
function litespeed_tab_type( type ) {
|
330 |
+
return 'subtab' === type ? type : 'tab';
|
331 |
+
}
|
332 |
+
|
333 |
+
/**
|
334 |
+
* Sniff cookies for tab and subtab
|
335 |
+
* @since 4.7
|
336 |
+
*/
|
337 |
+
function litespeed_tab_cookie( $elems, type ) {
|
338 |
+
type = litespeed_tab_type( type );
|
339 |
+
var re = new RegExp(
|
340 |
+
'(?:^|.*;)\\s*litespeed_' + type + '\\s*=\\s*([^;]*).*$|^.*$',
|
341 |
+
'ms'
|
342 |
+
);
|
343 |
+
var name = document.cookie.replace( re, "$1" );
|
344 |
+
return $elems.filter( '[data-litespeed-' + type + '="' + name + '"]:first' );
|
345 |
+
}
|
346 |
+
|
347 |
+
function litespeed_display_tab( name, type ) {
|
348 |
+
type = litespeed_tab_type( type );
|
349 |
+
var $tabs;
|
350 |
+
var $layouts;
|
351 |
+
var classname;
|
352 |
+
var layout_type;
|
353 |
+
if ( 'subtab' === type ) {
|
354 |
+
classname = 'focus';
|
355 |
+
layout_type = 'sublayout';
|
356 |
+
$tabs = jQuery( '[data-litespeed-subtab="' + name + '"]' )
|
357 |
+
.siblings( '[data-litespeed-subtab]' )
|
358 |
+
.addBack();
|
359 |
+
$layouts = jQuery( '[data-litespeed-sublayout="' + name + '"]' )
|
360 |
+
.siblings( '[data-litespeed-sublayout]' )
|
361 |
+
.addBack();
|
362 |
+
}
|
363 |
+
else {
|
364 |
+
// Maybe handle subtabs
|
365 |
+
var $subtabs =
|
366 |
+
jQuery( '[data-litespeed-layout="' + name + '"] [data-litespeed-subtab]' );
|
367 |
+
if ( $subtabs.length > 0 ) {
|
368 |
+
// Find subtab name
|
369 |
+
var $subtab = litespeed_tab_cookie( $subtabs, 'subtab' );
|
370 |
+
if ( $subtab.length < 1 ) {
|
371 |
+
$subtab = jQuery(
|
372 |
+
'[data-litespeed-layout="' + name + '"] [data-litespeed-subtab]:first'
|
373 |
+
);
|
374 |
+
}
|
375 |
+
if ( $subtab.length > 0 ) {
|
376 |
+
var subtab_name = $subtab.data( 'litespeed-subtab' );
|
377 |
+
// Display a subtab
|
378 |
+
litespeed_display_tab( subtab_name, 'subtab' );
|
379 |
+
}
|
380 |
+
}
|
381 |
+
classname = 'nav-tab-active';
|
382 |
+
layout_type = 'layout';
|
383 |
+
$tabs = jQuery( '[data-litespeed-tab]' );
|
384 |
+
$layouts = jQuery( '[data-litespeed-layout]' );
|
385 |
+
}
|
386 |
+
$tabs.removeClass( classname );
|
387 |
+
$tabs
|
388 |
+
.filter( '[data-litespeed-' + type + '="' + name + '"]' )
|
389 |
+
.addClass( classname );
|
390 |
+
$layouts.hide();
|
391 |
+
$layouts.filter( '[data-litespeed-' + layout_type + '="' + name + '"]' )
|
392 |
+
.show();
|
393 |
}
|
394 |
|
395 |
function lscwpEsiEnabled(the_checkbox, esi_ids) {
|
lang/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 5.
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
|
7 |
-
"POT-Creation-Date: 2022-07-19
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -53,12 +53,12 @@ msgstr ""
|
|
53 |
msgid "CDN"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: src/admin-display.cls.php:127 src/gui.cls.php:
|
57 |
-
#: tpl/dash/dashboard.tpl.php:
|
58 |
msgid "Image Optimization"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: src/admin-display.cls.php:129 tpl/dash/dashboard.tpl.php:
|
62 |
msgid "Page Optimization"
|
63 |
msgstr ""
|
64 |
|
@@ -106,7 +106,7 @@ msgstr ""
|
|
106 |
#: src/admin-display.cls.php:917 src/admin-display.cls.php:968
|
107 |
#: tpl/cache/settings-cache.tpl.php:19
|
108 |
#: tpl/cache/settings_inc.cache_mobile.tpl.php:71 tpl/cdn/settings.tpl.php:49
|
109 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
110 |
#: tpl/page_optm/settings_media.tpl.php:159
|
111 |
#: tpl/toolbox/settings-debug.tpl.php:46
|
112 |
msgid "ON"
|
@@ -116,13 +116,13 @@ msgstr ""
|
|
116 |
#: src/admin-display.cls.php:916 src/admin-display.cls.php:968
|
117 |
#: tpl/cache/settings-cache.tpl.php:19
|
118 |
#: tpl/cache/settings_inc.object.tpl.php:210 tpl/cdn/settings.tpl.php:54
|
119 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
120 |
#: tpl/page_optm/settings_media.tpl.php:162
|
121 |
#: tpl/toolbox/settings-debug.tpl.php:46
|
122 |
msgid "OFF"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: src/admin-display.cls.php:285 src/gui.cls.php:
|
126 |
msgid "Settings"
|
127 |
msgstr ""
|
128 |
|
@@ -199,7 +199,7 @@ msgid "Invalid IP"
|
|
199 |
msgstr ""
|
200 |
|
201 |
#: src/admin-display.cls.php:1168 tpl/cache/settings-esi.tpl.php:95
|
202 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
203 |
#: tpl/page_optm/settings_html.tpl.php:85
|
204 |
#: tpl/page_optm/settings_media.tpl.php:235
|
205 |
#: tpl/page_optm/settings_media_exc.tpl.php:26
|
@@ -449,10 +449,6 @@ msgstr ""
|
|
449 |
msgid "Previously existed in blocklist"
|
450 |
msgstr ""
|
451 |
|
452 |
-
#: src/css.cls.php:62 src/root.cls.php:185
|
453 |
-
msgid "Queue cleared successfully."
|
454 |
-
msgstr ""
|
455 |
-
|
456 |
#: src/data.cls.php:221
|
457 |
msgid ""
|
458 |
"The database has been upgrading in the background since %s. This message "
|
@@ -544,7 +540,7 @@ msgid "Please see %s for more details."
|
|
544 |
msgstr ""
|
545 |
|
546 |
#: src/doc.cls.php:53 src/doc.cls.php:105 tpl/cdn/manage.tpl.php:66
|
547 |
-
#: tpl/dash/dashboard.tpl.php:
|
548 |
#: tpl/img_optm/summary.tpl.php:102 tpl/inc/check_cache_disabled.php:42
|
549 |
msgid "Learn More"
|
550 |
msgstr ""
|
@@ -742,65 +738,49 @@ msgstr ""
|
|
742 |
msgid "Failed to write to %s."
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: src/gui.cls.php:
|
746 |
-
msgid "Public Caches"
|
747 |
-
msgstr ""
|
748 |
-
|
749 |
-
#: src/gui.cls.php:82
|
750 |
-
msgid "Public Cache Hits"
|
751 |
-
msgstr ""
|
752 |
-
|
753 |
-
#: src/gui.cls.php:83
|
754 |
-
msgid "Private Caches"
|
755 |
-
msgstr ""
|
756 |
-
|
757 |
-
#: src/gui.cls.php:84
|
758 |
-
msgid "Private Cache Hits"
|
759 |
-
msgstr ""
|
760 |
-
|
761 |
-
#: src/gui.cls.php:104
|
762 |
msgid "%1$s %2$s files left in queue"
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: src/gui.cls.php:
|
766 |
msgid "Cancel"
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: src/gui.cls.php:
|
770 |
msgid "Purge this page"
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: src/gui.cls.php:
|
774 |
msgid "Mark this page as "
|
775 |
msgstr ""
|
776 |
|
777 |
-
#: src/gui.cls.php:
|
778 |
msgid "Forced cacheable"
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: src/gui.cls.php:
|
782 |
msgid "Non cacheable"
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: src/gui.cls.php:
|
786 |
msgid "Private cache"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: src/gui.cls.php:
|
790 |
msgid "No optimization"
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: src/gui.cls.php:
|
794 |
msgid "More settings"
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: src/gui.cls.php:
|
798 |
-
#: src/gui.cls.php:
|
799 |
-
#: src/gui.cls.php:
|
800 |
-
#: src/gui.cls.php:
|
801 |
-
#: src/gui.cls.php:
|
802 |
-
#: src/gui.cls.php:
|
803 |
-
#: src/gui.cls.php:
|
804 |
#: tpl/page_optm/settings_media.tpl.php:125 tpl/toolbox/purge.tpl.php:37
|
805 |
#: tpl/toolbox/purge.tpl.php:43 tpl/toolbox/purge.tpl.php:52
|
806 |
#: tpl/toolbox/purge.tpl.php:61 tpl/toolbox/purge.tpl.php:70
|
@@ -810,77 +790,77 @@ msgstr ""
|
|
810 |
msgid "Purge All"
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: src/gui.cls.php:
|
814 |
msgid "LSCache"
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: src/gui.cls.php:
|
818 |
msgid "CSS/JS Cache"
|
819 |
msgstr ""
|
820 |
|
821 |
-
#: src/gui.cls.php:
|
822 |
-
#: tpl/dash/dashboard.tpl.php:
|
823 |
msgid "Object Cache"
|
824 |
msgstr ""
|
825 |
|
826 |
-
#: src/gui.cls.php:
|
827 |
msgid "Opcode Cache"
|
828 |
msgstr ""
|
829 |
|
830 |
-
#: src/gui.cls.php:
|
831 |
msgid "Localized Resources"
|
832 |
msgstr ""
|
833 |
|
834 |
-
#: src/gui.cls.php:
|
835 |
#: tpl/page_optm/settings_media.tpl.php:125 tpl/toolbox/purge.tpl.php:97
|
836 |
msgid "LQIP Cache"
|
837 |
msgstr ""
|
838 |
|
839 |
-
#: src/gui.cls.php:
|
840 |
#: tpl/toolbox/purge.tpl.php:106
|
841 |
msgid "Gravatar Cache"
|
842 |
msgstr ""
|
843 |
|
844 |
-
#: src/gui.cls.php:
|
845 |
msgid "LiteSpeed Cache Purge All"
|
846 |
msgstr ""
|
847 |
|
848 |
-
#: src/gui.cls.php:
|
849 |
#: tpl/db_optm/entry.tpl.php:6
|
850 |
msgid "Manage"
|
851 |
msgstr ""
|
852 |
|
853 |
-
#: src/gui.cls.php:
|
854 |
msgid "Cloudflare"
|
855 |
msgstr ""
|
856 |
|
857 |
-
#: src/gui.cls.php:
|
858 |
msgid "Remove all previous unfinished image optimization requests."
|
859 |
msgstr ""
|
860 |
|
861 |
-
#: src/gui.cls.php:
|
862 |
msgid "Clean Up Unfinished Data"
|
863 |
msgstr ""
|
864 |
|
865 |
-
#: src/gui.cls.php:
|
866 |
msgid "Install %s"
|
867 |
msgstr ""
|
868 |
|
869 |
-
#: src/gui.cls.php:
|
870 |
msgid "Install Now"
|
871 |
msgstr ""
|
872 |
|
873 |
-
#: src/gui.cls.php:
|
874 |
msgid ""
|
875 |
"<a href=\"%1$s\" %2$s>View version %3$s details</a> or <a href=\"%4$s\" %5$s "
|
876 |
"target=\"_blank\">update now</a>."
|
877 |
msgstr ""
|
878 |
|
879 |
-
#: src/gui.cls.php:
|
880 |
msgid "View %1$s version %2$s details"
|
881 |
msgstr ""
|
882 |
|
883 |
-
#: src/gui.cls.php:
|
884 |
msgid "Update %s now"
|
885 |
msgstr ""
|
886 |
|
@@ -1010,11 +990,11 @@ msgstr ""
|
|
1010 |
msgid "Images not requested"
|
1011 |
msgstr ""
|
1012 |
|
1013 |
-
#: src/lang.cls.php:24 tpl/dash/dashboard.tpl.php:
|
1014 |
msgid "Images requested"
|
1015 |
msgstr ""
|
1016 |
|
1017 |
-
#: src/lang.cls.php:25 tpl/dash/dashboard.tpl.php:
|
1018 |
msgid "Images notified to pull"
|
1019 |
msgstr ""
|
1020 |
|
@@ -1085,7 +1065,7 @@ msgstr ""
|
|
1085 |
msgid "Enable Cache"
|
1086 |
msgstr ""
|
1087 |
|
1088 |
-
#: src/lang.cls.php:91 tpl/dash/dashboard.tpl.php:
|
1089 |
msgid "Browser Cache"
|
1090 |
msgstr ""
|
1091 |
|
@@ -1550,8 +1530,8 @@ msgstr ""
|
|
1550 |
msgid "ESI Nonces"
|
1551 |
msgstr ""
|
1552 |
|
1553 |
-
#: src/lang.cls.php:216 tpl/page_optm/settings_css.tpl.php:
|
1554 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
1555 |
msgid "Vary Group"
|
1556 |
msgstr ""
|
1557 |
|
@@ -1707,7 +1687,7 @@ msgstr ""
|
|
1707 |
msgid "Disable All Features"
|
1708 |
msgstr ""
|
1709 |
|
1710 |
-
#: src/lang.cls.php:260 tpl/toolbox/log_viewer.tpl.php:
|
1711 |
msgid "Debug Log"
|
1712 |
msgstr ""
|
1713 |
|
@@ -1940,6 +1920,10 @@ msgstr ""
|
|
1940 |
msgid "Purge url %s"
|
1941 |
msgstr ""
|
1942 |
|
|
|
|
|
|
|
|
|
1943 |
#: src/task.cls.php:122
|
1944 |
msgid "Every Minute"
|
1945 |
msgstr ""
|
@@ -2090,7 +2074,7 @@ msgstr ""
|
|
2090 |
msgid "Dismiss this notice"
|
2091 |
msgstr ""
|
2092 |
|
2093 |
-
#. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 5.
|
2094 |
#. Plugin Name of the plugin/theme
|
2095 |
#: tpl/banner/new_version.php:57 tpl/banner/new_version_dev.tpl.php:12
|
2096 |
#: tpl/cache/more_settings_tip.tpl.php:15 tpl/inc/admin_footer.php:8
|
@@ -2106,7 +2090,7 @@ msgid "New release %s is available now."
|
|
2106 |
msgstr ""
|
2107 |
|
2108 |
#: tpl/banner/new_version.php:69 tpl/banner/new_version_dev.tpl.php:24
|
2109 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
2110 |
msgid "Upgrade"
|
2111 |
msgstr ""
|
2112 |
|
@@ -2130,26 +2114,26 @@ msgstr ""
|
|
2130 |
msgid "Thank You for Using the LiteSpeed Cache Plugin!"
|
2131 |
msgstr ""
|
2132 |
|
2133 |
-
#: tpl/banner/score.php:28 tpl/dash/dashboard.tpl.php:
|
2134 |
msgid "Page Load Time"
|
2135 |
msgstr ""
|
2136 |
|
2137 |
#: tpl/banner/score.php:34 tpl/banner/score.php:74
|
2138 |
-
#: tpl/dash/dashboard.tpl.php:
|
2139 |
msgid "Before"
|
2140 |
msgstr ""
|
2141 |
|
2142 |
#: tpl/banner/score.php:45 tpl/banner/score.php:84
|
2143 |
-
#: tpl/dash/dashboard.tpl.php:
|
2144 |
msgid "After"
|
2145 |
msgstr ""
|
2146 |
|
2147 |
#: tpl/banner/score.php:55 tpl/banner/score.php:94
|
2148 |
-
#: tpl/dash/dashboard.tpl.php:
|
2149 |
msgid "Improved by"
|
2150 |
msgstr ""
|
2151 |
|
2152 |
-
#: tpl/banner/score.php:68 tpl/dash/dashboard.tpl.php:
|
2153 |
msgid "PageSpeed Score"
|
2154 |
msgstr ""
|
2155 |
|
@@ -2413,7 +2397,7 @@ msgstr ""
|
|
2413 |
#: tpl/cache/settings-esi.tpl.php:35 tpl/cdn/manage.tpl.php:21
|
2414 |
#: tpl/crawler/summary.tpl.php:48 tpl/inc/check_cache_disabled.php:31
|
2415 |
#: tpl/inc/check_if_network_disable_all.php:18
|
2416 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
2417 |
#: tpl/page_optm/settings_localization.tpl.php:11
|
2418 |
msgid "WARNING"
|
2419 |
msgstr ""
|
@@ -3529,7 +3513,7 @@ msgstr ""
|
|
3529 |
msgid "Sitemap Total"
|
3530 |
msgstr ""
|
3531 |
|
3532 |
-
#: tpl/crawler/map.tpl.php:44 tpl/dash/dashboard.tpl.php:
|
3533 |
msgid "Crawler Status"
|
3534 |
msgstr ""
|
3535 |
|
@@ -3702,15 +3686,15 @@ msgstr ""
|
|
3702 |
msgid "Run time for previous crawler"
|
3703 |
msgstr ""
|
3704 |
|
3705 |
-
#: tpl/crawler/summary.tpl.php:85 tpl/dash/dashboard.tpl.php:
|
3706 |
msgid "Current crawler started at"
|
3707 |
msgstr ""
|
3708 |
|
3709 |
-
#: tpl/crawler/summary.tpl.php:92 tpl/dash/dashboard.tpl.php:
|
3710 |
msgid "Last interval"
|
3711 |
msgstr ""
|
3712 |
|
3713 |
-
#: tpl/crawler/summary.tpl.php:99 tpl/dash/dashboard.tpl.php:
|
3714 |
msgid "Ended reason"
|
3715 |
msgstr ""
|
3716 |
|
@@ -3802,171 +3786,167 @@ msgstr ""
|
|
3802 |
msgid "No crawler meta file generated yet"
|
3803 |
msgstr ""
|
3804 |
|
3805 |
-
#: tpl/dash/dashboard.tpl.php:
|
3806 |
msgid "QUIC.cloud Service Usage Statistics"
|
3807 |
msgstr ""
|
3808 |
|
3809 |
-
#: tpl/dash/dashboard.tpl.php:
|
3810 |
msgid "Sync data from Cloud"
|
3811 |
msgstr ""
|
3812 |
|
3813 |
-
#: tpl/dash/dashboard.tpl.php:
|
3814 |
msgid "CDN Bandwidth"
|
3815 |
msgstr ""
|
3816 |
|
3817 |
-
#: tpl/dash/dashboard.tpl.php:
|
3818 |
msgid "Low Quality Image Placeholder"
|
3819 |
msgstr ""
|
3820 |
|
3821 |
-
#: tpl/dash/dashboard.tpl.php:
|
3822 |
msgid "Fast Queue Usage"
|
3823 |
msgstr ""
|
3824 |
|
3825 |
-
#: tpl/dash/dashboard.tpl.php:
|
3826 |
msgid "Usage"
|
3827 |
msgstr ""
|
3828 |
|
3829 |
-
#: tpl/dash/dashboard.tpl.php:
|
3830 |
msgid "PAYG Balance"
|
3831 |
msgstr ""
|
3832 |
|
3833 |
-
#: tpl/dash/dashboard.tpl.php:
|
3834 |
msgid "This Month Usage"
|
3835 |
msgstr ""
|
3836 |
|
3837 |
-
#: tpl/dash/dashboard.tpl.php:
|
3838 |
msgid "Pay as You Go Usage Statistics"
|
3839 |
msgstr ""
|
3840 |
|
3841 |
-
#: tpl/dash/dashboard.tpl.php:
|
3842 |
msgid "Total Usage"
|
3843 |
msgstr ""
|
3844 |
|
3845 |
-
#: tpl/dash/dashboard.tpl.php:
|
3846 |
msgid "Total images optimized in this month"
|
3847 |
msgstr ""
|
3848 |
|
3849 |
-
#: tpl/dash/dashboard.tpl.php:
|
3850 |
msgid "Remaining Daily Quota"
|
3851 |
msgstr ""
|
3852 |
|
3853 |
-
#: tpl/dash/dashboard.tpl.php:
|
3854 |
msgid "Go to QUIC.cloud dashboard"
|
3855 |
msgstr ""
|
3856 |
|
3857 |
-
#: tpl/dash/dashboard.tpl.php:
|
3858 |
msgid "Refresh page load time"
|
3859 |
msgstr ""
|
3860 |
|
3861 |
-
#: tpl/dash/dashboard.tpl.php:
|
3862 |
-
#: tpl/dash/dashboard.tpl.php:
|
3863 |
-
#: tpl/dash/dashboard.tpl.php:
|
3864 |
msgid "Last requested"
|
3865 |
msgstr ""
|
3866 |
|
3867 |
-
#: tpl/dash/dashboard.tpl.php:
|
3868 |
msgid "Current closest Cloud server is %s. Click to redetect."
|
3869 |
msgstr ""
|
3870 |
|
3871 |
-
#: tpl/dash/dashboard.tpl.php:
|
3872 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
3873 |
#: tpl/page_optm/settings_media.tpl.php:176
|
3874 |
#: tpl/page_optm/settings_vpi.tpl.php:48
|
3875 |
msgid ""
|
3876 |
"Are you sure you want to redetect the closest cloud server for this service?"
|
3877 |
msgstr ""
|
3878 |
|
3879 |
-
#: tpl/dash/dashboard.tpl.php:
|
3880 |
msgid "Refresh page score"
|
3881 |
msgstr ""
|
3882 |
|
3883 |
-
#: tpl/dash/dashboard.tpl.php:
|
3884 |
msgid "Image Optimization Summary"
|
3885 |
msgstr ""
|
3886 |
|
3887 |
-
#: tpl/dash/dashboard.tpl.php:
|
3888 |
-
#: tpl/dash/dashboard.tpl.php:
|
3889 |
-
#: tpl/dash/dashboard.tpl.php:
|
3890 |
-
#: tpl/dash/dashboard.tpl.php:
|
3891 |
msgid "More"
|
3892 |
msgstr ""
|
3893 |
|
3894 |
-
#: tpl/dash/dashboard.tpl.php:
|
3895 |
msgid "Image Groups Prepared"
|
3896 |
msgstr ""
|
3897 |
|
3898 |
-
#: tpl/dash/dashboard.tpl.php:
|
3899 |
msgid "Images Requested"
|
3900 |
msgstr ""
|
3901 |
|
3902 |
-
#: tpl/dash/dashboard.tpl.php:
|
3903 |
msgid "Last Request"
|
3904 |
msgstr ""
|
3905 |
|
3906 |
-
#: tpl/dash/dashboard.tpl.php:
|
3907 |
msgid "Last Pull"
|
3908 |
msgstr ""
|
3909 |
|
3910 |
-
#: tpl/dash/dashboard.tpl.php:
|
3911 |
msgid "Cache Status"
|
3912 |
msgstr ""
|
3913 |
|
3914 |
-
#: tpl/dash/dashboard.tpl.php:
|
3915 |
msgid "Public Cache"
|
3916 |
msgstr ""
|
3917 |
|
3918 |
-
#: tpl/dash/dashboard.tpl.php:
|
3919 |
msgid "Private Cache"
|
3920 |
msgstr ""
|
3921 |
|
3922 |
-
#: tpl/dash/dashboard.tpl.php:
|
3923 |
-
msgid "Cache Stats"
|
3924 |
-
msgstr ""
|
3925 |
-
|
3926 |
-
#: tpl/dash/dashboard.tpl.php:432 tpl/toolbox/purge.tpl.php:70
|
3927 |
msgid "Critical CSS"
|
3928 |
msgstr ""
|
3929 |
|
3930 |
-
#: tpl/dash/dashboard.tpl.php:
|
3931 |
-
#: tpl/dash/dashboard.tpl.php:
|
3932 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
3933 |
#: tpl/page_optm/settings_media.tpl.php:170
|
3934 |
#: tpl/page_optm/settings_vpi.tpl.php:42
|
3935 |
msgid "Last generated"
|
3936 |
msgstr ""
|
3937 |
|
3938 |
-
#: tpl/dash/dashboard.tpl.php:
|
3939 |
-
#: tpl/dash/dashboard.tpl.php:
|
3940 |
msgid "Time to execute previous request"
|
3941 |
msgstr ""
|
3942 |
|
3943 |
-
#: tpl/dash/dashboard.tpl.php:
|
3944 |
-
#: tpl/dash/dashboard.tpl.php:
|
3945 |
msgid "Requests in queue"
|
3946 |
msgstr ""
|
3947 |
|
3948 |
-
#: tpl/dash/dashboard.tpl.php:
|
3949 |
-
#: tpl/dash/dashboard.tpl.php:
|
3950 |
msgid "Force cron"
|
3951 |
msgstr ""
|
3952 |
|
3953 |
-
#: tpl/dash/dashboard.tpl.php:
|
3954 |
msgid "Unique CSS"
|
3955 |
msgstr ""
|
3956 |
|
3957 |
-
#: tpl/dash/dashboard.tpl.php:
|
3958 |
msgid "Viewport Image"
|
3959 |
msgstr ""
|
3960 |
|
3961 |
-
#: tpl/dash/dashboard.tpl.php:
|
3962 |
msgid "Crawler(s)"
|
3963 |
msgstr ""
|
3964 |
|
3965 |
-
#: tpl/dash/dashboard.tpl.php:
|
3966 |
msgid "Currently active crawler"
|
3967 |
msgstr ""
|
3968 |
|
3969 |
-
#: tpl/dash/dashboard.tpl.php:
|
3970 |
msgid "<b>Last crawled:</b> %d item(s)"
|
3971 |
msgstr ""
|
3972 |
|
@@ -4480,8 +4460,8 @@ msgstr ""
|
|
4480 |
msgid "The image compression quality setting of WordPress out of 100."
|
4481 |
msgstr ""
|
4482 |
|
4483 |
-
#: tpl/img_optm/summary.tpl.php:57 tpl/page_optm/settings_css.tpl.php:
|
4484 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4485 |
#: tpl/page_optm/settings_media.tpl.php:176
|
4486 |
#: tpl/page_optm/settings_vpi.tpl.php:48
|
4487 |
msgid "Current closest Cloud server is %s. Click to redetect."
|
@@ -4827,7 +4807,7 @@ msgid ""
|
|
4827 |
"dismissed. (<a %3$s>Learn More</a>)"
|
4828 |
msgstr ""
|
4829 |
|
4830 |
-
#: tpl/page_optm/entry.tpl.php:6 tpl/page_optm/settings_css.tpl.php:
|
4831 |
msgid "CSS Settings"
|
4832 |
msgstr ""
|
4833 |
|
@@ -4865,134 +4845,134 @@ msgid ""
|
|
4865 |
"Minify/Combine settings, please do a Purge All action."
|
4866 |
msgstr ""
|
4867 |
|
4868 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4869 |
msgid "Minify CSS files and inline CSS code."
|
4870 |
msgstr ""
|
4871 |
|
4872 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4873 |
msgid "Combine CSS files and inline CSS code."
|
4874 |
msgstr ""
|
4875 |
|
4876 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4877 |
msgid "How to Fix Problems Caused by CSS/JS Optimization."
|
4878 |
msgstr ""
|
4879 |
|
4880 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4881 |
msgid "Use QUIC.cloud online service to generate unique CSS."
|
4882 |
msgstr ""
|
4883 |
|
4884 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4885 |
msgid "This will drop the unused CSS on each page from the combined file."
|
4886 |
msgstr ""
|
4887 |
|
4888 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4889 |
msgid ""
|
4890 |
"Automatic generation of unique CSS is in the background via a cron-based "
|
4891 |
"queue."
|
4892 |
msgstr ""
|
4893 |
|
4894 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4895 |
msgid "Filter %s available for UCSS per page type generation."
|
4896 |
msgstr ""
|
4897 |
|
4898 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4899 |
msgid "This option is bypassed because %1$s option is %2$s."
|
4900 |
msgstr ""
|
4901 |
|
4902 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4903 |
msgid "Last requested cost"
|
4904 |
msgstr ""
|
4905 |
|
4906 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4907 |
#: tpl/page_optm/settings_vpi.tpl.php:54
|
4908 |
msgid "URL list in %s queue waiting for cron"
|
4909 |
msgstr ""
|
4910 |
|
4911 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4912 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4913 |
msgid "Run %s Queue Manually"
|
4914 |
msgstr ""
|
4915 |
|
4916 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4917 |
msgid ""
|
4918 |
"Inline UCSS to reduce the extra CSS file loading. This option will not be "
|
4919 |
"automatically turned on for %1$s pages. To use it on %1$s pages, please set "
|
4920 |
"it to ON."
|
4921 |
msgstr ""
|
4922 |
|
4923 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4924 |
msgid "This option will automatically bypass %s option."
|
4925 |
msgstr ""
|
4926 |
|
4927 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4928 |
msgid ""
|
4929 |
"Include external CSS and inline CSS in combined file when %1$s is also "
|
4930 |
"enabled. This option helps maintain the priorities of CSS, which should "
|
4931 |
"minimize potential errors caused by CSS Combine."
|
4932 |
msgstr ""
|
4933 |
|
4934 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4935 |
msgid "Optimize CSS delivery."
|
4936 |
msgstr ""
|
4937 |
|
4938 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4939 |
#: tpl/page_optm/settings_html.tpl.php:129 tpl/page_optm/settings_js.tpl.php:67
|
4940 |
msgid ""
|
4941 |
"This can improve your speed score in services like Pingdom, GTmetrix and "
|
4942 |
"PageSpeed."
|
4943 |
msgstr ""
|
4944 |
|
4945 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4946 |
msgid ""
|
4947 |
"Use QUIC.cloud online service to generate critical CSS and load remaining "
|
4948 |
"CSS asynchronously."
|
4949 |
msgstr ""
|
4950 |
|
4951 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4952 |
msgid ""
|
4953 |
"Automatic generation of critical CSS is in the background via a cron-based "
|
4954 |
"queue."
|
4955 |
msgstr ""
|
4956 |
|
4957 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4958 |
msgid ""
|
4959 |
"When this option is turned %s, it will also load Google Fonts asynchronously."
|
4960 |
msgstr ""
|
4961 |
|
4962 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4963 |
msgid "Elements with attribute %s in HTML code will be excluded."
|
4964 |
msgstr ""
|
4965 |
|
4966 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4967 |
msgid "This option is bypassed due to %s option."
|
4968 |
msgstr ""
|
4969 |
|
4970 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4971 |
msgid ""
|
4972 |
"Disable this option to generate CCSS per Post Type instead of per page. This "
|
4973 |
"can save significant CCSS quota, however it may result in incorrect CSS "
|
4974 |
"styling if your site uses a page builder."
|
4975 |
msgstr ""
|
4976 |
|
4977 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4978 |
msgid "This will inline the asynchronous CSS library to avoid render blocking."
|
4979 |
msgstr ""
|
4980 |
|
4981 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4982 |
msgid "Default"
|
4983 |
msgstr ""
|
4984 |
|
4985 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4986 |
msgid ""
|
4987 |
"Set this to append %1$s to all %2$s rules before caching CSS to specify how "
|
4988 |
"fonts should be displayed while being downloaded."
|
4989 |
msgstr ""
|
4990 |
|
4991 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4992 |
msgid "%s is recommended."
|
4993 |
msgstr ""
|
4994 |
|
4995 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4996 |
msgid "Swap"
|
4997 |
msgstr ""
|
4998 |
|
@@ -5162,7 +5142,7 @@ msgid ""
|
|
5162 |
msgstr ""
|
5163 |
|
5164 |
#: tpl/page_optm/settings_localization.tpl.php:127
|
5165 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5166 |
msgid "Example"
|
5167 |
msgstr ""
|
5168 |
|
@@ -5460,54 +5440,54 @@ msgstr ""
|
|
5460 |
msgid "Enable Viewport Images auto generation cron."
|
5461 |
msgstr ""
|
5462 |
|
5463 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5464 |
msgid "Try GitHub Version"
|
5465 |
msgstr ""
|
5466 |
|
5467 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5468 |
msgid ""
|
5469 |
"Use this section to switch plugin versions. To beta test a GitHub commit, "
|
5470 |
"enter the commit URL in the field below."
|
5471 |
msgstr ""
|
5472 |
|
5473 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5474 |
msgid "Use latest GitHub Dev commit"
|
5475 |
msgstr ""
|
5476 |
|
5477 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5478 |
msgid "Use latest GitHub Master commit"
|
5479 |
msgstr ""
|
5480 |
|
5481 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5482 |
msgid "Use latest WordPress release version"
|
5483 |
msgstr ""
|
5484 |
|
5485 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5486 |
msgid "OR"
|
5487 |
msgstr ""
|
5488 |
|
5489 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5490 |
msgid ""
|
5491 |
"Downgrade not recommended. May cause fatal error due to refactored code."
|
5492 |
msgstr ""
|
5493 |
|
5494 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5495 |
msgid ""
|
5496 |
"Press the %s button to use the most recent GitHub commit. Master is for "
|
5497 |
"release candidate & Dev is for experimental testing."
|
5498 |
msgstr ""
|
5499 |
|
5500 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5501 |
msgid "Use latest GitHub Dev/Master commit"
|
5502 |
msgstr ""
|
5503 |
|
5504 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5505 |
msgid ""
|
5506 |
"Press the %s button to stop beta testing and go back to the current release "
|
5507 |
"from the WordPress Plugin Directory."
|
5508 |
msgstr ""
|
5509 |
|
5510 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5511 |
msgid ""
|
5512 |
"In order to avoid an upgrade error, you must be using %1$s or later before "
|
5513 |
"you can upgrade to %2$s versions."
|
@@ -5673,8 +5653,20 @@ msgstr ""
|
|
5673 |
msgid "Reset Settings"
|
5674 |
msgstr ""
|
5675 |
|
5676 |
-
#: tpl/toolbox/log_viewer.tpl.php:
|
5677 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5678 |
msgstr ""
|
5679 |
|
5680 |
#: tpl/toolbox/purge.tpl.php:7
|
2 |
# This file is distributed under the same license as the LiteSpeed Cache package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: LiteSpeed Cache 5.1\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
|
7 |
+
"POT-Creation-Date: 2022-07-29 19:54:50+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
53 |
msgid "CDN"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: src/admin-display.cls.php:127 src/gui.cls.php:613
|
57 |
+
#: tpl/dash/dashboard.tpl.php:56 tpl/dash/network_dash.tpl.php:27
|
58 |
msgid "Image Optimization"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: src/admin-display.cls.php:129 tpl/dash/dashboard.tpl.php:57
|
62 |
msgid "Page Optimization"
|
63 |
msgstr ""
|
64 |
|
106 |
#: src/admin-display.cls.php:917 src/admin-display.cls.php:968
|
107 |
#: tpl/cache/settings-cache.tpl.php:19
|
108 |
#: tpl/cache/settings_inc.cache_mobile.tpl.php:71 tpl/cdn/settings.tpl.php:49
|
109 |
+
#: tpl/page_optm/settings_css.tpl.php:176
|
110 |
#: tpl/page_optm/settings_media.tpl.php:159
|
111 |
#: tpl/toolbox/settings-debug.tpl.php:46
|
112 |
msgid "ON"
|
116 |
#: src/admin-display.cls.php:916 src/admin-display.cls.php:968
|
117 |
#: tpl/cache/settings-cache.tpl.php:19
|
118 |
#: tpl/cache/settings_inc.object.tpl.php:210 tpl/cdn/settings.tpl.php:54
|
119 |
+
#: tpl/page_optm/settings_css.tpl.php:74 tpl/page_optm/settings_js.tpl.php:63
|
120 |
#: tpl/page_optm/settings_media.tpl.php:162
|
121 |
#: tpl/toolbox/settings-debug.tpl.php:46
|
122 |
msgid "OFF"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: src/admin-display.cls.php:285 src/gui.cls.php:604
|
126 |
msgid "Settings"
|
127 |
msgstr ""
|
128 |
|
199 |
msgstr ""
|
200 |
|
201 |
#: src/admin-display.cls.php:1168 tpl/cache/settings-esi.tpl.php:95
|
202 |
+
#: tpl/page_optm/settings_css.tpl.php:178
|
203 |
#: tpl/page_optm/settings_html.tpl.php:85
|
204 |
#: tpl/page_optm/settings_media.tpl.php:235
|
205 |
#: tpl/page_optm/settings_media_exc.tpl.php:26
|
449 |
msgid "Previously existed in blocklist"
|
450 |
msgstr ""
|
451 |
|
|
|
|
|
|
|
|
|
452 |
#: src/data.cls.php:221
|
453 |
msgid ""
|
454 |
"The database has been upgrading in the background since %s. This message "
|
540 |
msgstr ""
|
541 |
|
542 |
#: src/doc.cls.php:53 src/doc.cls.php:105 tpl/cdn/manage.tpl.php:66
|
543 |
+
#: tpl/dash/dashboard.tpl.php:50 tpl/img_optm/summary.tpl.php:62
|
544 |
#: tpl/img_optm/summary.tpl.php:102 tpl/inc/check_cache_disabled.php:42
|
545 |
msgid "Learn More"
|
546 |
msgstr ""
|
738 |
msgid "Failed to write to %s."
|
739 |
msgstr ""
|
740 |
|
741 |
+
#: src/gui.cls.php:78
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
742 |
msgid "%1$s %2$s files left in queue"
|
743 |
msgstr ""
|
744 |
|
745 |
+
#: src/gui.cls.php:79
|
746 |
msgid "Cancel"
|
747 |
msgstr ""
|
748 |
|
749 |
+
#: src/gui.cls.php:388 src/gui.cls.php:403
|
750 |
msgid "Purge this page"
|
751 |
msgstr ""
|
752 |
|
753 |
+
#: src/gui.cls.php:412
|
754 |
msgid "Mark this page as "
|
755 |
msgstr ""
|
756 |
|
757 |
+
#: src/gui.cls.php:424
|
758 |
msgid "Forced cacheable"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: src/gui.cls.php:435
|
762 |
msgid "Non cacheable"
|
763 |
msgstr ""
|
764 |
|
765 |
+
#: src/gui.cls.php:446
|
766 |
msgid "Private cache"
|
767 |
msgstr ""
|
768 |
|
769 |
+
#: src/gui.cls.php:457
|
770 |
msgid "No optimization"
|
771 |
msgstr ""
|
772 |
|
773 |
+
#: src/gui.cls.php:465
|
774 |
msgid "More settings"
|
775 |
msgstr ""
|
776 |
|
777 |
+
#: src/gui.cls.php:472 src/gui.cls.php:480 src/gui.cls.php:488
|
778 |
+
#: src/gui.cls.php:497 src/gui.cls.php:507 src/gui.cls.php:517
|
779 |
+
#: src/gui.cls.php:527 src/gui.cls.php:536 src/gui.cls.php:546
|
780 |
+
#: src/gui.cls.php:556 src/gui.cls.php:622 src/gui.cls.php:630
|
781 |
+
#: src/gui.cls.php:638 src/gui.cls.php:647 src/gui.cls.php:657
|
782 |
+
#: src/gui.cls.php:667 src/gui.cls.php:677 src/gui.cls.php:687
|
783 |
+
#: src/gui.cls.php:696 src/gui.cls.php:706 src/gui.cls.php:716
|
784 |
#: tpl/page_optm/settings_media.tpl.php:125 tpl/toolbox/purge.tpl.php:37
|
785 |
#: tpl/toolbox/purge.tpl.php:43 tpl/toolbox/purge.tpl.php:52
|
786 |
#: tpl/toolbox/purge.tpl.php:61 tpl/toolbox/purge.tpl.php:70
|
790 |
msgid "Purge All"
|
791 |
msgstr ""
|
792 |
|
793 |
+
#: src/gui.cls.php:480 src/gui.cls.php:580 src/gui.cls.php:630
|
794 |
msgid "LSCache"
|
795 |
msgstr ""
|
796 |
|
797 |
+
#: src/gui.cls.php:488 src/gui.cls.php:638 tpl/toolbox/purge.tpl.php:43
|
798 |
msgid "CSS/JS Cache"
|
799 |
msgstr ""
|
800 |
|
801 |
+
#: src/gui.cls.php:497 src/gui.cls.php:657 src/lang.cls.php:114
|
802 |
+
#: tpl/dash/dashboard.tpl.php:396 tpl/toolbox/purge.tpl.php:52
|
803 |
msgid "Object Cache"
|
804 |
msgstr ""
|
805 |
|
806 |
+
#: src/gui.cls.php:507 src/gui.cls.php:667 tpl/toolbox/purge.tpl.php:61
|
807 |
msgid "Opcode Cache"
|
808 |
msgstr ""
|
809 |
|
810 |
+
#: src/gui.cls.php:536 src/gui.cls.php:696 tpl/toolbox/purge.tpl.php:88
|
811 |
msgid "Localized Resources"
|
812 |
msgstr ""
|
813 |
|
814 |
+
#: src/gui.cls.php:546 src/gui.cls.php:706
|
815 |
#: tpl/page_optm/settings_media.tpl.php:125 tpl/toolbox/purge.tpl.php:97
|
816 |
msgid "LQIP Cache"
|
817 |
msgstr ""
|
818 |
|
819 |
+
#: src/gui.cls.php:556 src/gui.cls.php:716 src/lang.cls.php:176
|
820 |
#: tpl/toolbox/purge.tpl.php:106
|
821 |
msgid "Gravatar Cache"
|
822 |
msgstr ""
|
823 |
|
824 |
+
#: src/gui.cls.php:580
|
825 |
msgid "LiteSpeed Cache Purge All"
|
826 |
msgstr ""
|
827 |
|
828 |
+
#: src/gui.cls.php:596 tpl/cdn/entry.tpl.php:8 tpl/cdn/settings.tpl.php:194
|
829 |
#: tpl/db_optm/entry.tpl.php:6
|
830 |
msgid "Manage"
|
831 |
msgstr ""
|
832 |
|
833 |
+
#: src/gui.cls.php:647 tpl/cdn/manage.tpl.php:17
|
834 |
msgid "Cloudflare"
|
835 |
msgstr ""
|
836 |
|
837 |
+
#: src/gui.cls.php:735 tpl/img_optm/summary.tpl.php:175
|
838 |
msgid "Remove all previous unfinished image optimization requests."
|
839 |
msgstr ""
|
840 |
|
841 |
+
#: src/gui.cls.php:736 tpl/img_optm/summary.tpl.php:177
|
842 |
msgid "Clean Up Unfinished Data"
|
843 |
msgstr ""
|
844 |
|
845 |
+
#: src/gui.cls.php:754
|
846 |
msgid "Install %s"
|
847 |
msgstr ""
|
848 |
|
849 |
+
#: src/gui.cls.php:755
|
850 |
msgid "Install Now"
|
851 |
msgstr ""
|
852 |
|
853 |
+
#: src/gui.cls.php:774
|
854 |
msgid ""
|
855 |
"<a href=\"%1$s\" %2$s>View version %3$s details</a> or <a href=\"%4$s\" %5$s "
|
856 |
"target=\"_blank\">update now</a>."
|
857 |
msgstr ""
|
858 |
|
859 |
+
#: src/gui.cls.php:777
|
860 |
msgid "View %1$s version %2$s details"
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: src/gui.cls.php:782
|
864 |
msgid "Update %s now"
|
865 |
msgstr ""
|
866 |
|
990 |
msgid "Images not requested"
|
991 |
msgstr ""
|
992 |
|
993 |
+
#: src/lang.cls.php:24 tpl/dash/dashboard.tpl.php:337
|
994 |
msgid "Images requested"
|
995 |
msgstr ""
|
996 |
|
997 |
+
#: src/lang.cls.php:25 tpl/dash/dashboard.tpl.php:347
|
998 |
msgid "Images notified to pull"
|
999 |
msgstr ""
|
1000 |
|
1065 |
msgid "Enable Cache"
|
1066 |
msgstr ""
|
1067 |
|
1068 |
+
#: src/lang.cls.php:91 tpl/dash/dashboard.tpl.php:397
|
1069 |
msgid "Browser Cache"
|
1070 |
msgstr ""
|
1071 |
|
1530 |
msgid "ESI Nonces"
|
1531 |
msgstr ""
|
1532 |
|
1533 |
+
#: src/lang.cls.php:216 tpl/page_optm/settings_css.tpl.php:112
|
1534 |
+
#: tpl/page_optm/settings_css.tpl.php:222 tpl/page_optm/settings_vpi.tpl.php:67
|
1535 |
msgid "Vary Group"
|
1536 |
msgstr ""
|
1537 |
|
1687 |
msgid "Disable All Features"
|
1688 |
msgstr ""
|
1689 |
|
1690 |
+
#: src/lang.cls.php:260 tpl/toolbox/log_viewer.tpl.php:11
|
1691 |
msgid "Debug Log"
|
1692 |
msgstr ""
|
1693 |
|
1920 |
msgid "Purge url %s"
|
1921 |
msgstr ""
|
1922 |
|
1923 |
+
#: src/root.cls.php:185
|
1924 |
+
msgid "Queue cleared successfully."
|
1925 |
+
msgstr ""
|
1926 |
+
|
1927 |
#: src/task.cls.php:122
|
1928 |
msgid "Every Minute"
|
1929 |
msgstr ""
|
2074 |
msgid "Dismiss this notice"
|
2075 |
msgstr ""
|
2076 |
|
2077 |
+
#. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 5.1) #-#-#-#-#
|
2078 |
#. Plugin Name of the plugin/theme
|
2079 |
#: tpl/banner/new_version.php:57 tpl/banner/new_version_dev.tpl.php:12
|
2080 |
#: tpl/cache/more_settings_tip.tpl.php:15 tpl/inc/admin_footer.php:8
|
2090 |
msgstr ""
|
2091 |
|
2092 |
#: tpl/banner/new_version.php:69 tpl/banner/new_version_dev.tpl.php:24
|
2093 |
+
#: tpl/toolbox/beta_test.tpl.php:63
|
2094 |
msgid "Upgrade"
|
2095 |
msgstr ""
|
2096 |
|
2114 |
msgid "Thank You for Using the LiteSpeed Cache Plugin!"
|
2115 |
msgstr ""
|
2116 |
|
2117 |
+
#: tpl/banner/score.php:28 tpl/dash/dashboard.tpl.php:178
|
2118 |
msgid "Page Load Time"
|
2119 |
msgstr ""
|
2120 |
|
2121 |
#: tpl/banner/score.php:34 tpl/banner/score.php:74
|
2122 |
+
#: tpl/dash/dashboard.tpl.php:191 tpl/dash/dashboard.tpl.php:259
|
2123 |
msgid "Before"
|
2124 |
msgstr ""
|
2125 |
|
2126 |
#: tpl/banner/score.php:45 tpl/banner/score.php:84
|
2127 |
+
#: tpl/dash/dashboard.tpl.php:200 tpl/dash/dashboard.tpl.php:267
|
2128 |
msgid "After"
|
2129 |
msgstr ""
|
2130 |
|
2131 |
#: tpl/banner/score.php:55 tpl/banner/score.php:94
|
2132 |
+
#: tpl/dash/dashboard.tpl.php:208 tpl/dash/dashboard.tpl.php:275
|
2133 |
msgid "Improved by"
|
2134 |
msgstr ""
|
2135 |
|
2136 |
+
#: tpl/banner/score.php:68 tpl/dash/dashboard.tpl.php:235
|
2137 |
msgid "PageSpeed Score"
|
2138 |
msgstr ""
|
2139 |
|
2397 |
#: tpl/cache/settings-esi.tpl.php:35 tpl/cdn/manage.tpl.php:21
|
2398 |
#: tpl/crawler/summary.tpl.php:48 tpl/inc/check_cache_disabled.php:31
|
2399 |
#: tpl/inc/check_if_network_disable_all.php:18
|
2400 |
+
#: tpl/page_optm/settings_css.tpl.php:61 tpl/page_optm/settings_css.tpl.php:167
|
2401 |
#: tpl/page_optm/settings_localization.tpl.php:11
|
2402 |
msgid "WARNING"
|
2403 |
msgstr ""
|
3513 |
msgid "Sitemap Total"
|
3514 |
msgstr ""
|
3515 |
|
3516 |
+
#: tpl/crawler/map.tpl.php:44 tpl/dash/dashboard.tpl.php:546
|
3517 |
msgid "Crawler Status"
|
3518 |
msgstr ""
|
3519 |
|
3686 |
msgid "Run time for previous crawler"
|
3687 |
msgstr ""
|
3688 |
|
3689 |
+
#: tpl/crawler/summary.tpl.php:85 tpl/dash/dashboard.tpl.php:559
|
3690 |
msgid "Current crawler started at"
|
3691 |
msgstr ""
|
3692 |
|
3693 |
+
#: tpl/crawler/summary.tpl.php:92 tpl/dash/dashboard.tpl.php:566
|
3694 |
msgid "Last interval"
|
3695 |
msgstr ""
|
3696 |
|
3697 |
+
#: tpl/crawler/summary.tpl.php:99 tpl/dash/dashboard.tpl.php:573
|
3698 |
msgid "Ended reason"
|
3699 |
msgstr ""
|
3700 |
|
3786 |
msgid "No crawler meta file generated yet"
|
3787 |
msgstr ""
|
3788 |
|
3789 |
+
#: tpl/dash/dashboard.tpl.php:43
|
3790 |
msgid "QUIC.cloud Service Usage Statistics"
|
3791 |
msgstr ""
|
3792 |
|
3793 |
+
#: tpl/dash/dashboard.tpl.php:46
|
3794 |
msgid "Sync data from Cloud"
|
3795 |
msgstr ""
|
3796 |
|
3797 |
+
#: tpl/dash/dashboard.tpl.php:58 tpl/dash/network_dash.tpl.php:29
|
3798 |
msgid "CDN Bandwidth"
|
3799 |
msgstr ""
|
3800 |
|
3801 |
+
#: tpl/dash/dashboard.tpl.php:59 tpl/dash/dashboard.tpl.php:482
|
3802 |
msgid "Low Quality Image Placeholder"
|
3803 |
msgstr ""
|
3804 |
|
3805 |
+
#: tpl/dash/dashboard.tpl.php:116 tpl/dash/network_dash.tpl.php:78
|
3806 |
msgid "Fast Queue Usage"
|
3807 |
msgstr ""
|
3808 |
|
3809 |
+
#: tpl/dash/dashboard.tpl.php:116 tpl/dash/network_dash.tpl.php:78
|
3810 |
msgid "Usage"
|
3811 |
msgstr ""
|
3812 |
|
3813 |
+
#: tpl/dash/dashboard.tpl.php:129 tpl/dash/network_dash.tpl.php:90
|
3814 |
msgid "PAYG Balance"
|
3815 |
msgstr ""
|
3816 |
|
3817 |
+
#: tpl/dash/dashboard.tpl.php:130 tpl/dash/network_dash.tpl.php:91
|
3818 |
msgid "This Month Usage"
|
3819 |
msgstr ""
|
3820 |
|
3821 |
+
#: tpl/dash/dashboard.tpl.php:132 tpl/dash/network_dash.tpl.php:93
|
3822 |
msgid "Pay as You Go Usage Statistics"
|
3823 |
msgstr ""
|
3824 |
|
3825 |
+
#: tpl/dash/dashboard.tpl.php:150 tpl/dash/network_dash.tpl.php:100
|
3826 |
msgid "Total Usage"
|
3827 |
msgstr ""
|
3828 |
|
3829 |
+
#: tpl/dash/dashboard.tpl.php:151 tpl/dash/network_dash.tpl.php:101
|
3830 |
msgid "Total images optimized in this month"
|
3831 |
msgstr ""
|
3832 |
|
3833 |
+
#: tpl/dash/dashboard.tpl.php:160
|
3834 |
msgid "Remaining Daily Quota"
|
3835 |
msgstr ""
|
3836 |
|
3837 |
+
#: tpl/dash/dashboard.tpl.php:169
|
3838 |
msgid "Go to QUIC.cloud dashboard"
|
3839 |
msgstr ""
|
3840 |
|
3841 |
+
#: tpl/dash/dashboard.tpl.php:181
|
3842 |
msgid "Refresh page load time"
|
3843 |
msgstr ""
|
3844 |
|
3845 |
+
#: tpl/dash/dashboard.tpl.php:222 tpl/dash/dashboard.tpl.php:291
|
3846 |
+
#: tpl/dash/dashboard.tpl.php:441 tpl/dash/dashboard.tpl.php:474
|
3847 |
+
#: tpl/dash/dashboard.tpl.php:506 tpl/dash/dashboard.tpl.php:538
|
3848 |
msgid "Last requested"
|
3849 |
msgstr ""
|
3850 |
|
3851 |
+
#: tpl/dash/dashboard.tpl.php:227
|
3852 |
msgid "Current closest Cloud server is %s. Click to redetect."
|
3853 |
msgstr ""
|
3854 |
|
3855 |
+
#: tpl/dash/dashboard.tpl.php:227 tpl/img_optm/summary.tpl.php:57
|
3856 |
+
#: tpl/page_optm/settings_css.tpl.php:93 tpl/page_optm/settings_css.tpl.php:203
|
3857 |
#: tpl/page_optm/settings_media.tpl.php:176
|
3858 |
#: tpl/page_optm/settings_vpi.tpl.php:48
|
3859 |
msgid ""
|
3860 |
"Are you sure you want to redetect the closest cloud server for this service?"
|
3861 |
msgstr ""
|
3862 |
|
3863 |
+
#: tpl/dash/dashboard.tpl.php:238
|
3864 |
msgid "Refresh page score"
|
3865 |
msgstr ""
|
3866 |
|
3867 |
+
#: tpl/dash/dashboard.tpl.php:299 tpl/img_optm/entry.tpl.php:6
|
3868 |
msgid "Image Optimization Summary"
|
3869 |
msgstr ""
|
3870 |
|
3871 |
+
#: tpl/dash/dashboard.tpl.php:300 tpl/dash/dashboard.tpl.php:389
|
3872 |
+
#: tpl/dash/dashboard.tpl.php:417 tpl/dash/dashboard.tpl.php:450
|
3873 |
+
#: tpl/dash/dashboard.tpl.php:483 tpl/dash/dashboard.tpl.php:515
|
3874 |
+
#: tpl/dash/dashboard.tpl.php:547
|
3875 |
msgid "More"
|
3876 |
msgstr ""
|
3877 |
|
3878 |
+
#: tpl/dash/dashboard.tpl.php:310
|
3879 |
msgid "Image Groups Prepared"
|
3880 |
msgstr ""
|
3881 |
|
3882 |
+
#: tpl/dash/dashboard.tpl.php:325
|
3883 |
msgid "Images Requested"
|
3884 |
msgstr ""
|
3885 |
|
3886 |
+
#: tpl/dash/dashboard.tpl.php:357 tpl/img_optm/summary.tpl.php:342
|
3887 |
msgid "Last Request"
|
3888 |
msgstr ""
|
3889 |
|
3890 |
+
#: tpl/dash/dashboard.tpl.php:360
|
3891 |
msgid "Last Pull"
|
3892 |
msgstr ""
|
3893 |
|
3894 |
+
#: tpl/dash/dashboard.tpl.php:388
|
3895 |
msgid "Cache Status"
|
3896 |
msgstr ""
|
3897 |
|
3898 |
+
#: tpl/dash/dashboard.tpl.php:394
|
3899 |
msgid "Public Cache"
|
3900 |
msgstr ""
|
3901 |
|
3902 |
+
#: tpl/dash/dashboard.tpl.php:395
|
3903 |
msgid "Private Cache"
|
3904 |
msgstr ""
|
3905 |
|
3906 |
+
#: tpl/dash/dashboard.tpl.php:416 tpl/toolbox/purge.tpl.php:70
|
|
|
|
|
|
|
|
|
3907 |
msgid "Critical CSS"
|
3908 |
msgstr ""
|
3909 |
|
3910 |
+
#: tpl/dash/dashboard.tpl.php:422 tpl/dash/dashboard.tpl.php:455
|
3911 |
+
#: tpl/dash/dashboard.tpl.php:488 tpl/dash/dashboard.tpl.php:520
|
3912 |
+
#: tpl/page_optm/settings_css.tpl.php:84 tpl/page_optm/settings_css.tpl.php:194
|
3913 |
#: tpl/page_optm/settings_media.tpl.php:170
|
3914 |
#: tpl/page_optm/settings_vpi.tpl.php:42
|
3915 |
msgid "Last generated"
|
3916 |
msgstr ""
|
3917 |
|
3918 |
+
#: tpl/dash/dashboard.tpl.php:425 tpl/dash/dashboard.tpl.php:458
|
3919 |
+
#: tpl/dash/dashboard.tpl.php:491 tpl/dash/dashboard.tpl.php:523
|
3920 |
msgid "Time to execute previous request"
|
3921 |
msgstr ""
|
3922 |
|
3923 |
+
#: tpl/dash/dashboard.tpl.php:430 tpl/dash/dashboard.tpl.php:463
|
3924 |
+
#: tpl/dash/dashboard.tpl.php:496 tpl/dash/dashboard.tpl.php:528
|
3925 |
msgid "Requests in queue"
|
3926 |
msgstr ""
|
3927 |
|
3928 |
+
#: tpl/dash/dashboard.tpl.php:433 tpl/dash/dashboard.tpl.php:466
|
3929 |
+
#: tpl/dash/dashboard.tpl.php:498 tpl/dash/dashboard.tpl.php:530
|
3930 |
msgid "Force cron"
|
3931 |
msgstr ""
|
3932 |
|
3933 |
+
#: tpl/dash/dashboard.tpl.php:449 tpl/toolbox/purge.tpl.php:79
|
3934 |
msgid "Unique CSS"
|
3935 |
msgstr ""
|
3936 |
|
3937 |
+
#: tpl/dash/dashboard.tpl.php:514
|
3938 |
msgid "Viewport Image"
|
3939 |
msgstr ""
|
3940 |
|
3941 |
+
#: tpl/dash/dashboard.tpl.php:551
|
3942 |
msgid "Crawler(s)"
|
3943 |
msgstr ""
|
3944 |
|
3945 |
+
#: tpl/dash/dashboard.tpl.php:554
|
3946 |
msgid "Currently active crawler"
|
3947 |
msgstr ""
|
3948 |
|
3949 |
+
#: tpl/dash/dashboard.tpl.php:580
|
3950 |
msgid "<b>Last crawled:</b> %d item(s)"
|
3951 |
msgstr ""
|
3952 |
|
4460 |
msgid "The image compression quality setting of WordPress out of 100."
|
4461 |
msgstr ""
|
4462 |
|
4463 |
+
#: tpl/img_optm/summary.tpl.php:57 tpl/page_optm/settings_css.tpl.php:93
|
4464 |
+
#: tpl/page_optm/settings_css.tpl.php:203
|
4465 |
#: tpl/page_optm/settings_media.tpl.php:176
|
4466 |
#: tpl/page_optm/settings_vpi.tpl.php:48
|
4467 |
msgid "Current closest Cloud server is %s. Click to redetect."
|
4807 |
"dismissed. (<a %3$s>Learn More</a>)"
|
4808 |
msgstr ""
|
4809 |
|
4810 |
+
#: tpl/page_optm/entry.tpl.php:6 tpl/page_optm/settings_css.tpl.php:18
|
4811 |
msgid "CSS Settings"
|
4812 |
msgstr ""
|
4813 |
|
4845 |
"Minify/Combine settings, please do a Purge All action."
|
4846 |
msgstr ""
|
4847 |
|
4848 |
+
#: tpl/page_optm/settings_css.tpl.php:32
|
4849 |
msgid "Minify CSS files and inline CSS code."
|
4850 |
msgstr ""
|
4851 |
|
4852 |
+
#: tpl/page_optm/settings_css.tpl.php:45
|
4853 |
msgid "Combine CSS files and inline CSS code."
|
4854 |
msgstr ""
|
4855 |
|
4856 |
+
#: tpl/page_optm/settings_css.tpl.php:46 tpl/page_optm/settings_js.tpl.php:35
|
4857 |
msgid "How to Fix Problems Caused by CSS/JS Optimization."
|
4858 |
msgstr ""
|
4859 |
|
4860 |
+
#: tpl/page_optm/settings_css.tpl.php:66
|
4861 |
msgid "Use QUIC.cloud online service to generate unique CSS."
|
4862 |
msgstr ""
|
4863 |
|
4864 |
+
#: tpl/page_optm/settings_css.tpl.php:67
|
4865 |
msgid "This will drop the unused CSS on each page from the combined file."
|
4866 |
msgstr ""
|
4867 |
|
4868 |
+
#: tpl/page_optm/settings_css.tpl.php:69
|
4869 |
msgid ""
|
4870 |
"Automatic generation of unique CSS is in the background via a cron-based "
|
4871 |
"queue."
|
4872 |
msgstr ""
|
4873 |
|
4874 |
+
#: tpl/page_optm/settings_css.tpl.php:70
|
4875 |
msgid "Filter %s available for UCSS per page type generation."
|
4876 |
msgstr ""
|
4877 |
|
4878 |
+
#: tpl/page_optm/settings_css.tpl.php:74
|
4879 |
msgid "This option is bypassed because %1$s option is %2$s."
|
4880 |
msgstr ""
|
4881 |
|
4882 |
+
#: tpl/page_optm/settings_css.tpl.php:87 tpl/page_optm/settings_css.tpl.php:197
|
4883 |
msgid "Last requested cost"
|
4884 |
msgstr ""
|
4885 |
|
4886 |
+
#: tpl/page_optm/settings_css.tpl.php:99 tpl/page_optm/settings_css.tpl.php:209
|
4887 |
#: tpl/page_optm/settings_vpi.tpl.php:54
|
4888 |
msgid "URL list in %s queue waiting for cron"
|
4889 |
msgstr ""
|
4890 |
|
4891 |
+
#: tpl/page_optm/settings_css.tpl.php:120
|
4892 |
+
#: tpl/page_optm/settings_css.tpl.php:230 tpl/page_optm/settings_vpi.tpl.php:74
|
4893 |
msgid "Run %s Queue Manually"
|
4894 |
msgstr ""
|
4895 |
|
4896 |
+
#: tpl/page_optm/settings_css.tpl.php:136
|
4897 |
msgid ""
|
4898 |
"Inline UCSS to reduce the extra CSS file loading. This option will not be "
|
4899 |
"automatically turned on for %1$s pages. To use it on %1$s pages, please set "
|
4900 |
"it to ON."
|
4901 |
msgstr ""
|
4902 |
|
4903 |
+
#: tpl/page_optm/settings_css.tpl.php:138
|
4904 |
msgid "This option will automatically bypass %s option."
|
4905 |
msgstr ""
|
4906 |
|
4907 |
+
#: tpl/page_optm/settings_css.tpl.php:152
|
4908 |
msgid ""
|
4909 |
"Include external CSS and inline CSS in combined file when %1$s is also "
|
4910 |
"enabled. This option helps maintain the priorities of CSS, which should "
|
4911 |
"minimize potential errors caused by CSS Combine."
|
4912 |
msgstr ""
|
4913 |
|
4914 |
+
#: tpl/page_optm/settings_css.tpl.php:171
|
4915 |
msgid "Optimize CSS delivery."
|
4916 |
msgstr ""
|
4917 |
|
4918 |
+
#: tpl/page_optm/settings_css.tpl.php:172
|
4919 |
#: tpl/page_optm/settings_html.tpl.php:129 tpl/page_optm/settings_js.tpl.php:67
|
4920 |
msgid ""
|
4921 |
"This can improve your speed score in services like Pingdom, GTmetrix and "
|
4922 |
"PageSpeed."
|
4923 |
msgstr ""
|
4924 |
|
4925 |
+
#: tpl/page_optm/settings_css.tpl.php:173
|
4926 |
msgid ""
|
4927 |
"Use QUIC.cloud online service to generate critical CSS and load remaining "
|
4928 |
"CSS asynchronously."
|
4929 |
msgstr ""
|
4930 |
|
4931 |
+
#: tpl/page_optm/settings_css.tpl.php:175
|
4932 |
msgid ""
|
4933 |
"Automatic generation of critical CSS is in the background via a cron-based "
|
4934 |
"queue."
|
4935 |
msgstr ""
|
4936 |
|
4937 |
+
#: tpl/page_optm/settings_css.tpl.php:176
|
4938 |
msgid ""
|
4939 |
"When this option is turned %s, it will also load Google Fonts asynchronously."
|
4940 |
msgstr ""
|
4941 |
|
4942 |
+
#: tpl/page_optm/settings_css.tpl.php:179
|
4943 |
msgid "Elements with attribute %s in HTML code will be excluded."
|
4944 |
msgstr ""
|
4945 |
|
4946 |
+
#: tpl/page_optm/settings_css.tpl.php:184
|
4947 |
msgid "This option is bypassed due to %s option."
|
4948 |
msgstr ""
|
4949 |
|
4950 |
+
#: tpl/page_optm/settings_css.tpl.php:245
|
4951 |
msgid ""
|
4952 |
"Disable this option to generate CCSS per Post Type instead of per page. This "
|
4953 |
"can save significant CCSS quota, however it may result in incorrect CSS "
|
4954 |
"styling if your site uses a page builder."
|
4955 |
msgstr ""
|
4956 |
|
4957 |
+
#: tpl/page_optm/settings_css.tpl.php:258
|
4958 |
msgid "This will inline the asynchronous CSS library to avoid render blocking."
|
4959 |
msgstr ""
|
4960 |
|
4961 |
+
#: tpl/page_optm/settings_css.tpl.php:269
|
4962 |
msgid "Default"
|
4963 |
msgstr ""
|
4964 |
|
4965 |
+
#: tpl/page_optm/settings_css.tpl.php:271
|
4966 |
msgid ""
|
4967 |
"Set this to append %1$s to all %2$s rules before caching CSS to specify how "
|
4968 |
"fonts should be displayed while being downloaded."
|
4969 |
msgstr ""
|
4970 |
|
4971 |
+
#: tpl/page_optm/settings_css.tpl.php:272
|
4972 |
msgid "%s is recommended."
|
4973 |
msgstr ""
|
4974 |
|
4975 |
+
#: tpl/page_optm/settings_css.tpl.php:272
|
4976 |
msgid "Swap"
|
4977 |
msgstr ""
|
4978 |
|
5142 |
msgstr ""
|
5143 |
|
5144 |
#: tpl/page_optm/settings_localization.tpl.php:127
|
5145 |
+
#: tpl/toolbox/beta_test.tpl.php:31
|
5146 |
msgid "Example"
|
5147 |
msgstr ""
|
5148 |
|
5440 |
msgid "Enable Viewport Images auto generation cron."
|
5441 |
msgstr ""
|
5442 |
|
5443 |
+
#: tpl/toolbox/beta_test.tpl.php:26
|
5444 |
msgid "Try GitHub Version"
|
5445 |
msgstr ""
|
5446 |
|
5447 |
+
#: tpl/toolbox/beta_test.tpl.php:30
|
5448 |
msgid ""
|
5449 |
"Use this section to switch plugin versions. To beta test a GitHub commit, "
|
5450 |
"enter the commit URL in the field below."
|
5451 |
msgstr ""
|
5452 |
|
5453 |
+
#: tpl/toolbox/beta_test.tpl.php:35
|
5454 |
msgid "Use latest GitHub Dev commit"
|
5455 |
msgstr ""
|
5456 |
|
5457 |
+
#: tpl/toolbox/beta_test.tpl.php:37
|
5458 |
msgid "Use latest GitHub Master commit"
|
5459 |
msgstr ""
|
5460 |
|
5461 |
+
#: tpl/toolbox/beta_test.tpl.php:39 tpl/toolbox/beta_test.tpl.php:55
|
5462 |
msgid "Use latest WordPress release version"
|
5463 |
msgstr ""
|
5464 |
|
5465 |
+
#: tpl/toolbox/beta_test.tpl.php:39
|
5466 |
msgid "OR"
|
5467 |
msgstr ""
|
5468 |
|
5469 |
+
#: tpl/toolbox/beta_test.tpl.php:50
|
5470 |
msgid ""
|
5471 |
"Downgrade not recommended. May cause fatal error due to refactored code."
|
5472 |
msgstr ""
|
5473 |
|
5474 |
+
#: tpl/toolbox/beta_test.tpl.php:54
|
5475 |
msgid ""
|
5476 |
"Press the %s button to use the most recent GitHub commit. Master is for "
|
5477 |
"release candidate & Dev is for experimental testing."
|
5478 |
msgstr ""
|
5479 |
|
5480 |
+
#: tpl/toolbox/beta_test.tpl.php:54
|
5481 |
msgid "Use latest GitHub Dev/Master commit"
|
5482 |
msgstr ""
|
5483 |
|
5484 |
+
#: tpl/toolbox/beta_test.tpl.php:55
|
5485 |
msgid ""
|
5486 |
"Press the %s button to stop beta testing and go back to the current release "
|
5487 |
"from the WordPress Plugin Directory."
|
5488 |
msgstr ""
|
5489 |
|
5490 |
+
#: tpl/toolbox/beta_test.tpl.php:60
|
5491 |
msgid ""
|
5492 |
"In order to avoid an upgrade error, you must be using %1$s or later before "
|
5493 |
"you can upgrade to %2$s versions."
|
5653 |
msgid "Reset Settings"
|
5654 |
msgstr ""
|
5655 |
|
5656 |
+
#: tpl/toolbox/log_viewer.tpl.php:16
|
5657 |
+
msgid "Purge Log"
|
5658 |
+
msgstr ""
|
5659 |
+
|
5660 |
+
#: tpl/toolbox/log_viewer.tpl.php:21
|
5661 |
+
msgid "Crawler Log"
|
5662 |
+
msgstr ""
|
5663 |
+
|
5664 |
+
#: tpl/toolbox/log_viewer.tpl.php:61
|
5665 |
+
msgid "Clear Logs"
|
5666 |
+
msgstr ""
|
5667 |
+
|
5668 |
+
#: tpl/toolbox/log_viewer.tpl.php:93
|
5669 |
+
msgid "LiteSpeed Logs"
|
5670 |
msgstr ""
|
5671 |
|
5672 |
#: tpl/toolbox/purge.tpl.php:7
|
litespeed-cache.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: LiteSpeed Cache
|
4 |
* Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
|
5 |
* Description: High-performance page caching and site optimization from LiteSpeed
|
6 |
-
* Version: 5.
|
7 |
* Author: LiteSpeed Technologies
|
8 |
* Author URI: https://www.litespeedtech.com
|
9 |
* License: GPLv3
|
@@ -33,7 +33,7 @@ if ( defined( 'LSCWP_V' ) ) {
|
|
33 |
return;
|
34 |
}
|
35 |
|
36 |
-
! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '5.
|
37 |
|
38 |
! defined( 'LSCWP_CONTENT_DIR' ) && define( 'LSCWP_CONTENT_DIR', WP_CONTENT_DIR ) ;
|
39 |
! defined( 'LSCWP_DIR' ) && define( 'LSCWP_DIR', __DIR__ . '/' ) ;// Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
|
3 |
* Plugin Name: LiteSpeed Cache
|
4 |
* Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
|
5 |
* Description: High-performance page caching and site optimization from LiteSpeed
|
6 |
+
* Version: 5.1
|
7 |
* Author: LiteSpeed Technologies
|
8 |
* Author URI: https://www.litespeedtech.com
|
9 |
* License: GPLv3
|
33 |
return;
|
34 |
}
|
35 |
|
36 |
+
! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '5.1' );
|
37 |
|
38 |
! defined( 'LSCWP_CONTENT_DIR' ) && define( 'LSCWP_CONTENT_DIR', WP_CONTENT_DIR ) ;
|
39 |
! defined( 'LSCWP_DIR' ) && define( 'LSCWP_DIR', __DIR__ . '/' ) ;// Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: LiteSpeedTech
|
|
3 |
Tags: caching, optimize, performance, pagespeed, core web vitals, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 6.0.1
|
6 |
-
Stable tag: 5.
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
9 |
|
@@ -250,6 +250,15 @@ The vast majority of plugins and themes are compatible with LiteSpeed Cache. The
|
|
250 |
|
251 |
== Changelog ==
|
252 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
= 5.0.1 - Jul 27 2022 =
|
254 |
* 🐞**Cloud** Fixed a potential PHP error that could occur with the cloud service summary. (Bruno Cantuaria)
|
255 |
* **3rd** Added Autoptimize back to compatibility list.
|
3 |
Tags: caching, optimize, performance, pagespeed, core web vitals, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 6.0.1
|
6 |
+
Stable tag: 5.1
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
9 |
|
250 |
|
251 |
== Changelog ==
|
252 |
|
253 |
+
= 5.1 - Aug 1 2022 =
|
254 |
+
* 🌱**Toolbox** Debug log can now show Purge/Crawler logs as well. (Tynan)
|
255 |
+
* **UCSS** Prepared for future message queue.
|
256 |
+
* **UCSS** Moved UCSS class to its own file.
|
257 |
+
* **3rd** Added 3rd-party support for WC PDF Product Vouchers. (Tynan)
|
258 |
+
* **Core** Fixed potential PHP warning when saving summary data. (Sarah Richardson)
|
259 |
+
* **Purge** Purge can now clear the summary correctly. (Kevin)
|
260 |
+
* **VPI** Added `queue_k` to API notification.
|
261 |
+
|
262 |
= 5.0.1 - Jul 27 2022 =
|
263 |
* 🐞**Cloud** Fixed a potential PHP error that could occur with the cloud service summary. (Bruno Cantuaria)
|
264 |
* **3rd** Added Autoptimize back to compatibility list.
|
src/crawler.cls.php
CHANGED
@@ -58,7 +58,7 @@ class Crawler extends Root {
|
|
58 |
|
59 |
$this->_summary = self::get_summary();
|
60 |
|
61 |
-
if(is_file('/proc/cpuinfo')) {
|
62 |
$cpuinfo = file_get_contents('/proc/cpuinfo');
|
63 |
preg_match_all('/^processor/m', $cpuinfo, $matches);
|
64 |
$this->_ncpu = count($matches[0]) ?: 1;
|
58 |
|
59 |
$this->_summary = self::get_summary();
|
60 |
|
61 |
+
if(@is_file('/proc/cpuinfo')) {
|
62 |
$cpuinfo = file_get_contents('/proc/cpuinfo');
|
63 |
preg_match_all('/^processor/m', $cpuinfo, $matches);
|
64 |
$this->_ncpu = count($matches[0]) ?: 1;
|
src/css.cls.php
CHANGED
@@ -11,12 +11,9 @@ class CSS extends Base {
|
|
11 |
const LOG_TAG = '[CSS]';
|
12 |
|
13 |
const TYPE_GEN_CCSS = 'gen_ccss';
|
14 |
-
const TYPE_GEN_UCSS = 'gen_ucss';
|
15 |
const TYPE_CLEAR_Q_CCSS = 'clear_q_ccss';
|
16 |
-
const TYPE_CLEAR_Q_UCSS = 'clear_q_ucss';
|
17 |
|
18 |
protected $_summary;
|
19 |
-
private $_ucss_whitelist;
|
20 |
private $_queue;
|
21 |
|
22 |
/**
|
@@ -26,41 +23,6 @@ class CSS extends Base {
|
|
26 |
*/
|
27 |
public function __construct() {
|
28 |
$this->_summary = self::get_summary();
|
29 |
-
|
30 |
-
add_filter( 'litespeed_ucss_whitelist', array( $this->cls( 'Data' ), 'load_ucss_whitelist' ) );
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Build the static filepath
|
35 |
-
*
|
36 |
-
* @since 4.3 Elevated to root.cls
|
37 |
-
* @since 4.3 Have to keep till v4.5 for compatibility when upgrade from v4.2 to v4.3
|
38 |
-
*/
|
39 |
-
protected function _build_filepath_prefix( $type ) {
|
40 |
-
$filepath_prefix = '/' . $type . '/';
|
41 |
-
if ( is_multisite() ) {
|
42 |
-
$filepath_prefix .= get_current_blog_id() . '/';
|
43 |
-
}
|
44 |
-
|
45 |
-
return $filepath_prefix;
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Clear all waiting queues
|
50 |
-
*
|
51 |
-
* @since 4.3 Elevated to root.cls
|
52 |
-
* @since 4.3 Have to keep till v4.5 for compatibility when upgrade from v4.2 to v4.3
|
53 |
-
*/
|
54 |
-
public function clear_q( $type ) {
|
55 |
-
$filepath_prefix = $this->_build_filepath_prefix( $type );
|
56 |
-
$static_path = LITESPEED_STATIC_DIR . $filepath_prefix . '.litespeed_conf.dat';
|
57 |
-
|
58 |
-
if ( file_exists( $static_path ) ) {
|
59 |
-
unlink( $static_path );
|
60 |
-
}
|
61 |
-
|
62 |
-
$msg = __( 'Queue cleared successfully.', 'litespeed-cache' );
|
63 |
-
Admin_Display::succeed( $msg );
|
64 |
}
|
65 |
|
66 |
/**
|
@@ -196,104 +158,6 @@ class CSS extends Base {
|
|
196 |
return null;
|
197 |
}
|
198 |
|
199 |
-
/**
|
200 |
-
* Uniform url tag for ucss usage
|
201 |
-
* @since 4.7
|
202 |
-
*/
|
203 |
-
public static function get_url_tag( $request_url = false ) {
|
204 |
-
$url_tag = $request_url;
|
205 |
-
if ( is_404() ) {
|
206 |
-
$url_tag = '404';
|
207 |
-
}
|
208 |
-
elseif ( apply_filters( 'litespeed_ucss_per_pagetype', false ) ) {
|
209 |
-
$url_tag = Utility::page_type();
|
210 |
-
self::debug( 'litespeed_ucss_per_pagetype filter altered url to ' . $url_tag );
|
211 |
-
}
|
212 |
-
|
213 |
-
return $url_tag;
|
214 |
-
}
|
215 |
-
|
216 |
-
/**
|
217 |
-
* Get UCSS path
|
218 |
-
*
|
219 |
-
* @since 4.0
|
220 |
-
*/
|
221 |
-
public function load_ucss( $request_url, $dry_run = false ) {
|
222 |
-
// Check UCSS URI excludes
|
223 |
-
$ucss_exc = apply_filters( 'litespeed_ucss_exc', $this->conf( self::O_OPTM_UCSS_EXC ) );
|
224 |
-
if ( $ucss_exc && $hit = Utility::str_hit_array( $request_url, $ucss_exc ) ) {
|
225 |
-
self::debug( 'UCSS bypassed due to UCSS URI Exclude setting: ' . $hit );
|
226 |
-
return false;
|
227 |
-
}
|
228 |
-
|
229 |
-
$filepath_prefix = $this->_build_filepath_prefix( 'ucss' );
|
230 |
-
|
231 |
-
$url_tag = self::get_url_tag( $request_url );
|
232 |
-
|
233 |
-
$vary = $this->cls( 'Vary' )->finalize_full_varies();
|
234 |
-
$filename = $this->cls( 'Data' )->load_url_file( $url_tag, $vary, 'ucss' );
|
235 |
-
if ( $filename ) {
|
236 |
-
$static_file = LITESPEED_STATIC_DIR . $filepath_prefix . $filename . '.css';
|
237 |
-
|
238 |
-
if ( file_exists( $static_file ) ) {
|
239 |
-
Debug2::debug2( '[UCSS] existing ucss ' . $static_file );
|
240 |
-
// Check if is error comment inside only
|
241 |
-
$tmp = File::read( $static_file );
|
242 |
-
if ( substr( $tmp, 0, 2 ) == '/*' && substr( $tmp, -2 ) == '*/' ) {
|
243 |
-
Debug2::debug2( '[UCSS] existing ucss is error only: ' . $tmp );
|
244 |
-
return false;
|
245 |
-
}
|
246 |
-
|
247 |
-
return $filename . '.css';
|
248 |
-
}
|
249 |
-
}
|
250 |
-
|
251 |
-
if ( $dry_run ) {
|
252 |
-
return false;
|
253 |
-
}
|
254 |
-
|
255 |
-
$uid = get_current_user_id();
|
256 |
-
|
257 |
-
$ua = ! empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) ? $_SERVER[ 'HTTP_USER_AGENT' ] : '';
|
258 |
-
|
259 |
-
// Store it for cron
|
260 |
-
$this->_queue = $this->load_queue( 'ucss' );
|
261 |
-
|
262 |
-
if ( count( $this->_queue ) > 500 ) {
|
263 |
-
self::debug( 'UCSS Queue is full - 500' );
|
264 |
-
return false;
|
265 |
-
}
|
266 |
-
|
267 |
-
$queue_k = ( strlen( $vary ) > 32 ? md5( $vary ) : $vary ) . ' ' . $url_tag;
|
268 |
-
$this->_queue[ $queue_k ] = array(
|
269 |
-
'url' => apply_filters( 'litespeed_ucss_url', $request_url ),
|
270 |
-
'user_agent' => substr( $ua, 0, 200 ),
|
271 |
-
'is_mobile' => $this->_separate_mobile(),
|
272 |
-
'is_webp' => $this->cls( 'Media' )->webp_support() ? 1 : 0,
|
273 |
-
'uid' => $uid,
|
274 |
-
'vary' => $vary,
|
275 |
-
'url_tag' => $url_tag,
|
276 |
-
); // Current UA will be used to request
|
277 |
-
$this->save_queue( 'ucss', $this->_queue );
|
278 |
-
self::debug( 'Added queue_ucss [url_tag] ' . $url_tag . ' [UA] ' . $ua . ' [vary] ' . $vary . ' [uid] ' . $uid );
|
279 |
-
|
280 |
-
// Prepare cache tag for later purge
|
281 |
-
Tag::add( 'UCSS.' . md5( $queue_k ) );
|
282 |
-
|
283 |
-
// For v4.1- clean up
|
284 |
-
if ( isset( $this->_summary[ 'ucss_history' ] ) || isset( $this->_summary[ 'queue_ucss' ] ) ) {
|
285 |
-
if ( isset( $this->_summary[ 'ucss_history' ] ) ) {
|
286 |
-
unset( $this->_summary[ 'ucss_history' ] );
|
287 |
-
}
|
288 |
-
if ( isset( $this->_summary[ 'queue_ucss' ] ) ) {
|
289 |
-
unset( $this->_summary[ 'queue_ucss' ] );
|
290 |
-
}
|
291 |
-
self::save_summary();
|
292 |
-
}
|
293 |
-
|
294 |
-
return false;
|
295 |
-
}
|
296 |
-
|
297 |
/**
|
298 |
* Cron ccss generation
|
299 |
*
|
@@ -305,16 +169,6 @@ class CSS extends Base {
|
|
305 |
return $_instance->_cron_handler( 'ccss', $continue );
|
306 |
}
|
307 |
|
308 |
-
/**
|
309 |
-
* Generate UCSS
|
310 |
-
*
|
311 |
-
* @since 4.0
|
312 |
-
*/
|
313 |
-
public static function cron_ucss( $continue = false ) {
|
314 |
-
$_instance = self::cls();
|
315 |
-
return $_instance->_cron_handler( 'ucss', $continue );
|
316 |
-
}
|
317 |
-
|
318 |
/**
|
319 |
* Handle UCSS/CCSS cron
|
320 |
*
|
@@ -368,7 +222,7 @@ class CSS extends Base {
|
|
368 |
|
369 |
if ( $i > 3 ) {
|
370 |
GUI::print_loading( count( $this->_queue ), $type_tag );
|
371 |
-
return Router::self_redirect( Router::ACTION_CSS,
|
372 |
}
|
373 |
|
374 |
continue;
|
@@ -389,7 +243,7 @@ class CSS extends Base {
|
|
389 |
|
390 |
if ( $i > 3 ) {
|
391 |
GUI::print_loading( count( $this->_queue ), $type_tag );
|
392 |
-
return Router::self_redirect( Router::ACTION_CSS,
|
393 |
}
|
394 |
}
|
395 |
}
|
@@ -401,10 +255,9 @@ class CSS extends Base {
|
|
401 |
* @access private
|
402 |
*/
|
403 |
private function _send_req( $request_url, $queue_k, $uid, $user_agent, $vary, $url_tag, $type, $is_mobile, $is_webp ) {
|
404 |
-
$svc = $type == 'ccss' ? Cloud::SVC_CCSS : Cloud::SVC_UCSS;
|
405 |
// Check if has credit to push or not
|
406 |
$err = false;
|
407 |
-
$allowance = $this->cls( 'Cloud' )->allowance(
|
408 |
if ( ! $allowance ) {
|
409 |
Debug2::debug( '[CCSS] ❌ No credit: ' . $err );
|
410 |
$err && Admin_Display::error( Error::msg( $err ) );
|
@@ -447,7 +300,6 @@ class CSS extends Base {
|
|
447 |
|
448 |
// Generate critical css
|
449 |
$data = array(
|
450 |
-
// 'type' => strtoupper( $type ), // Backward compatibility for v4.1-
|
451 |
'url' => $request_url,
|
452 |
'queue_k' => $queue_k,
|
453 |
'user_agent' => $user_agent,
|
@@ -456,16 +308,10 @@ class CSS extends Base {
|
|
456 |
'html' => $html,
|
457 |
'css' => $css,
|
458 |
);
|
459 |
-
if ( $type == 'ucss' ) {
|
460 |
-
if ( ! isset( $this->_ucss_whitelist ) ) {
|
461 |
-
$this->_ucss_whitelist = $this->_filter_whitelist();
|
462 |
-
}
|
463 |
-
$data[ 'whitelist' ] = $this->_ucss_whitelist;
|
464 |
-
}
|
465 |
|
466 |
self::debug( 'Generating: ', $data );
|
467 |
|
468 |
-
$json = Cloud::post(
|
469 |
if ( ! is_array( $json ) ) {
|
470 |
return false;
|
471 |
}
|
@@ -662,29 +508,6 @@ class CSS extends Base {
|
|
662 |
return array( $css, $html );
|
663 |
}
|
664 |
|
665 |
-
|
666 |
-
/**
|
667 |
-
* Filter the comment content, add quotes to selector from whitelist. Return the json
|
668 |
-
*
|
669 |
-
* @since 3.3
|
670 |
-
*/
|
671 |
-
private function _filter_whitelist() {
|
672 |
-
$whitelist = array();
|
673 |
-
$list = apply_filters( 'litespeed_ucss_whitelist', $this->conf( self::O_OPTM_UCSS_WHITELIST ) );
|
674 |
-
foreach ( $list as $k => $v ) {
|
675 |
-
if ( substr( $v, 0, 2 ) === '//' ) {
|
676 |
-
continue;
|
677 |
-
}
|
678 |
-
// Wrap in quotes for selectors
|
679 |
-
if ( substr( $v, 0, 1 ) !== '/' && strpos( $v, '"' ) === false && strpos( $v, "'" ) === false ) {
|
680 |
-
// $v = "'$v'";
|
681 |
-
}
|
682 |
-
$whitelist[] = $v;
|
683 |
-
}
|
684 |
-
|
685 |
-
return $whitelist;
|
686 |
-
}
|
687 |
-
|
688 |
/**
|
689 |
* Handle all request actions from main cls
|
690 |
*
|
@@ -695,18 +518,10 @@ class CSS extends Base {
|
|
695 |
$type = Router::verify_type();
|
696 |
|
697 |
switch ( $type ) {
|
698 |
-
case self::TYPE_GEN_UCSS:
|
699 |
-
self::cron_ucss( true );
|
700 |
-
break;
|
701 |
-
|
702 |
case self::TYPE_GEN_CCSS:
|
703 |
self::cron_ccss( true );
|
704 |
break;
|
705 |
|
706 |
-
case self::TYPE_CLEAR_Q_UCSS:
|
707 |
-
$this->clear_q( 'ucss' );
|
708 |
-
break;
|
709 |
-
|
710 |
case self::TYPE_CLEAR_Q_CCSS:
|
711 |
$this->clear_q( 'ccss' );
|
712 |
break;
|
11 |
const LOG_TAG = '[CSS]';
|
12 |
|
13 |
const TYPE_GEN_CCSS = 'gen_ccss';
|
|
|
14 |
const TYPE_CLEAR_Q_CCSS = 'clear_q_ccss';
|
|
|
15 |
|
16 |
protected $_summary;
|
|
|
17 |
private $_queue;
|
18 |
|
19 |
/**
|
23 |
*/
|
24 |
public function __construct() {
|
25 |
$this->_summary = self::get_summary();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
|
28 |
/**
|
158 |
return null;
|
159 |
}
|
160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
/**
|
162 |
* Cron ccss generation
|
163 |
*
|
169 |
return $_instance->_cron_handler( 'ccss', $continue );
|
170 |
}
|
171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
/**
|
173 |
* Handle UCSS/CCSS cron
|
174 |
*
|
222 |
|
223 |
if ( $i > 3 ) {
|
224 |
GUI::print_loading( count( $this->_queue ), $type_tag );
|
225 |
+
return Router::self_redirect( Router::ACTION_CSS, CSS::TYPE_GEN_CCSS );
|
226 |
}
|
227 |
|
228 |
continue;
|
243 |
|
244 |
if ( $i > 3 ) {
|
245 |
GUI::print_loading( count( $this->_queue ), $type_tag );
|
246 |
+
return Router::self_redirect( Router::ACTION_CSS, CSS::TYPE_GEN_CCSS );
|
247 |
}
|
248 |
}
|
249 |
}
|
255 |
* @access private
|
256 |
*/
|
257 |
private function _send_req( $request_url, $queue_k, $uid, $user_agent, $vary, $url_tag, $type, $is_mobile, $is_webp ) {
|
|
|
258 |
// Check if has credit to push or not
|
259 |
$err = false;
|
260 |
+
$allowance = $this->cls( 'Cloud' )->allowance( Cloud::SVC_CCSS, $err );
|
261 |
if ( ! $allowance ) {
|
262 |
Debug2::debug( '[CCSS] ❌ No credit: ' . $err );
|
263 |
$err && Admin_Display::error( Error::msg( $err ) );
|
300 |
|
301 |
// Generate critical css
|
302 |
$data = array(
|
|
|
303 |
'url' => $request_url,
|
304 |
'queue_k' => $queue_k,
|
305 |
'user_agent' => $user_agent,
|
308 |
'html' => $html,
|
309 |
'css' => $css,
|
310 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
|
312 |
self::debug( 'Generating: ', $data );
|
313 |
|
314 |
+
$json = Cloud::post( Cloud::SVC_CCSS, $data, 30 );
|
315 |
if ( ! is_array( $json ) ) {
|
316 |
return false;
|
317 |
}
|
508 |
return array( $css, $html );
|
509 |
}
|
510 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
511 |
/**
|
512 |
* Handle all request actions from main cls
|
513 |
*
|
518 |
$type = Router::verify_type();
|
519 |
|
520 |
switch ( $type ) {
|
|
|
|
|
|
|
|
|
521 |
case self::TYPE_GEN_CCSS:
|
522 |
self::cron_ccss( true );
|
523 |
break;
|
524 |
|
|
|
|
|
|
|
|
|
525 |
case self::TYPE_CLEAR_Q_CCSS:
|
526 |
$this->clear_q( 'ccss' );
|
527 |
break;
|
src/debug2.cls.php
CHANGED
@@ -449,8 +449,10 @@ class Debug2 extends Root {
|
|
449 |
* @access private
|
450 |
*/
|
451 |
private function _clear_log() {
|
452 |
-
|
453 |
-
|
|
|
|
|
454 |
}
|
455 |
|
456 |
/**
|
449 |
* @access private
|
450 |
*/
|
451 |
private function _clear_log() {
|
452 |
+
$logs = array( 'debug', 'debug.purge', 'crawler' );
|
453 |
+
foreach ( $logs as $log ) {
|
454 |
+
File::save( self::$log_path_prefix . "/{$log}.log", '' );
|
455 |
+
}
|
456 |
}
|
457 |
|
458 |
/**
|
src/gui.cls.php
CHANGED
@@ -69,32 +69,6 @@ class GUI extends Base {
|
|
69 |
add_filter( 'litespeed_buffer_finalize', array( $this, 'finalize' ), 8 );
|
70 |
}
|
71 |
|
72 |
-
/**
|
73 |
-
* Get the lscache stats
|
74 |
-
*
|
75 |
-
* @since 3.0
|
76 |
-
*/
|
77 |
-
public function lscache_stats() {
|
78 |
-
return false;
|
79 |
-
|
80 |
-
$stat_titles = array(
|
81 |
-
'PUB_CREATES' => __( 'Public Caches', 'litespeed-cache' ),
|
82 |
-
'PUB_HITS' => __( 'Public Cache Hits', 'litespeed-cache' ),
|
83 |
-
'PVT_CREATES' => __( 'Private Caches', 'litespeed-cache' ),
|
84 |
-
'PVT_HITS' => __( 'Private Cache Hits', 'litespeed-cache' ),
|
85 |
-
);
|
86 |
-
|
87 |
-
// Build the readable format
|
88 |
-
$data = array();
|
89 |
-
foreach ( $stat_titles as $k => $v ) {
|
90 |
-
if ( array_key_exists( $k, $stats ) ) {
|
91 |
-
$data[ $v ] = number_format( $stats[ $k ] );
|
92 |
-
}
|
93 |
-
}
|
94 |
-
|
95 |
-
return $data;
|
96 |
-
}
|
97 |
-
|
98 |
/**
|
99 |
* Print a loading message when redirecting CCSS/UCSS page to aviod whiteboard confusion
|
100 |
*/
|
@@ -417,7 +391,7 @@ class GUI extends Base {
|
|
417 |
) );
|
418 |
|
419 |
if ( $this->has_cache_folder( 'ucss' ) ) {
|
420 |
-
$possible_url_tag =
|
421 |
$append_arr = array();
|
422 |
if ( $possible_url_tag ) {
|
423 |
$append_arr[ 'url_tag' ] = $possible_url_tag;
|
69 |
add_filter( 'litespeed_buffer_finalize', array( $this, 'finalize' ), 8 );
|
70 |
}
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
/**
|
73 |
* Print a loading message when redirecting CCSS/UCSS page to aviod whiteboard confusion
|
74 |
*/
|
391 |
) );
|
392 |
|
393 |
if ( $this->has_cache_folder( 'ucss' ) ) {
|
394 |
+
$possible_url_tag = UCSS::get_url_tag();
|
395 |
$append_arr = array();
|
396 |
if ( $possible_url_tag ) {
|
397 |
$append_arr[ 'url_tag' ] = $possible_url_tag;
|
src/optimize.cls.php
CHANGED
@@ -291,7 +291,7 @@ class Optimize extends Base {
|
|
291 |
if ( $this->cfg_css_comb ) {
|
292 |
// Check if has inline UCSS enabled or not
|
293 |
if ( ( defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_UCSS ) ) && $this->conf( self::O_OPTM_UCSS_INLINE ) ) {
|
294 |
-
$filename = $this->cls( '
|
295 |
if ( $filename ) {
|
296 |
$filepath_prefix = $this->_build_filepath_prefix( 'ucss' );
|
297 |
$this->_ucss = File::read( LITESPEED_STATIC_DIR . $filepath_prefix . $filename );
|
291 |
if ( $this->cfg_css_comb ) {
|
292 |
// Check if has inline UCSS enabled or not
|
293 |
if ( ( defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_UCSS ) ) && $this->conf( self::O_OPTM_UCSS_INLINE ) ) {
|
294 |
+
$filename = $this->cls( 'UCSS' )->load( $this->_request_url, true );
|
295 |
if ( $filename ) {
|
296 |
$filepath_prefix = $this->_build_filepath_prefix( 'ucss' );
|
297 |
$this->_ucss = File::read( LITESPEED_STATIC_DIR . $filepath_prefix . $filename );
|
src/optimizer.cls.php
CHANGED
@@ -66,7 +66,7 @@ class Optimizer extends Root {
|
|
66 |
if ( $file_type == 'css' ) {
|
67 |
$content = false;
|
68 |
if ( defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( Base::O_OPTM_UCSS ) ) {
|
69 |
-
$filename = $this->cls( '
|
70 |
|
71 |
if ( $filename ) {
|
72 |
return array( $filename, 'ucss' );
|
66 |
if ( $file_type == 'css' ) {
|
67 |
$content = false;
|
68 |
if ( defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( Base::O_OPTM_UCSS ) ) {
|
69 |
+
$filename = $this->cls( 'UCSS' )->load( $request_url );
|
70 |
|
71 |
if ( $filename ) {
|
72 |
return array( $filename, 'ucss' );
|
src/purge.cls.php
CHANGED
@@ -227,7 +227,7 @@ class Purge extends Base {
|
|
227 |
private function _purge_all_ccss( $silence = false ) {
|
228 |
do_action( 'litespeed_purged_all_ccss' );
|
229 |
|
230 |
-
$this->rm_cache_folder( 'ccss' );
|
231 |
|
232 |
$this->cls( 'Data' )->url_file_clean( 'ccss' );
|
233 |
|
@@ -246,7 +246,7 @@ class Purge extends Base {
|
|
246 |
private function _purge_all_ucss( $silence = false ) {
|
247 |
do_action( 'litespeed_purged_all_ucss' );
|
248 |
|
249 |
-
$this->rm_cache_folder( 'ucss' );
|
250 |
|
251 |
$this->cls( 'Data' )->url_file_clean( 'ucss' );
|
252 |
|
@@ -282,7 +282,7 @@ class Purge extends Base {
|
|
282 |
private function _purge_all_lqip( $silence = false ) {
|
283 |
do_action( 'litespeed_purged_all_lqip' );
|
284 |
|
285 |
-
$this->rm_cache_folder( 'lqip' );
|
286 |
|
287 |
if ( ! $silence ) {
|
288 |
$msg = __( 'Cleaned all LQIP files.', 'litespeed-cache' );
|
@@ -299,7 +299,7 @@ class Purge extends Base {
|
|
299 |
private function _purge_all_avatar( $silence = false ) {
|
300 |
do_action( 'litespeed_purged_all_avatar' );
|
301 |
|
302 |
-
$this->rm_cache_folder( 'avatar' );
|
303 |
|
304 |
if ( ! $silence ) {
|
305 |
$msg = __( 'Cleaned all Gravatar files.', 'litespeed-cache' );
|
@@ -343,8 +343,8 @@ class Purge extends Base {
|
|
343 |
|
344 |
$this->_add( Tag::TYPE_MIN );
|
345 |
|
346 |
-
$this->rm_cache_folder( 'css' );
|
347 |
-
$this->rm_cache_folder( 'js' );
|
348 |
|
349 |
$this->cls( 'Data' )->url_file_clean( 'css' );
|
350 |
$this->cls( 'Data' )->url_file_clean( 'js' );
|
227 |
private function _purge_all_ccss( $silence = false ) {
|
228 |
do_action( 'litespeed_purged_all_ccss' );
|
229 |
|
230 |
+
$this->cls( 'CSS' )->rm_cache_folder( 'ccss' );
|
231 |
|
232 |
$this->cls( 'Data' )->url_file_clean( 'ccss' );
|
233 |
|
246 |
private function _purge_all_ucss( $silence = false ) {
|
247 |
do_action( 'litespeed_purged_all_ucss' );
|
248 |
|
249 |
+
$this->cls( 'CSS' )->rm_cache_folder( 'ucss' );
|
250 |
|
251 |
$this->cls( 'Data' )->url_file_clean( 'ucss' );
|
252 |
|
282 |
private function _purge_all_lqip( $silence = false ) {
|
283 |
do_action( 'litespeed_purged_all_lqip' );
|
284 |
|
285 |
+
$this->cls( 'Placeholder' )->rm_cache_folder( 'lqip' );
|
286 |
|
287 |
if ( ! $silence ) {
|
288 |
$msg = __( 'Cleaned all LQIP files.', 'litespeed-cache' );
|
299 |
private function _purge_all_avatar( $silence = false ) {
|
300 |
do_action( 'litespeed_purged_all_avatar' );
|
301 |
|
302 |
+
$this->cls( 'Avatar' )->rm_cache_folder( 'avatar' );
|
303 |
|
304 |
if ( ! $silence ) {
|
305 |
$msg = __( 'Cleaned all Gravatar files.', 'litespeed-cache' );
|
343 |
|
344 |
$this->_add( Tag::TYPE_MIN );
|
345 |
|
346 |
+
$this->cls( 'CSS' )->rm_cache_folder( 'css' );
|
347 |
+
$this->cls( 'CSS' )->rm_cache_folder( 'js' );
|
348 |
|
349 |
$this->cls( 'Data' )->url_file_clean( 'css' );
|
350 |
$this->cls( 'Data' )->url_file_clean( 'js' );
|
src/root.cls.php
CHANGED
@@ -572,7 +572,7 @@ abstract class Root {
|
|
572 |
* @access public
|
573 |
*/
|
574 |
public static function save_summary( $data = false, $reload = false, $overwrite = false ) {
|
575 |
-
if ( $reload ) {
|
576 |
self::reload_summary();
|
577 |
}
|
578 |
|
572 |
* @access public
|
573 |
*/
|
574 |
public static function save_summary( $data = false, $reload = false, $overwrite = false ) {
|
575 |
+
if ( $reload || empty( static::cls()->_summary ) ) {
|
576 |
self::reload_summary();
|
577 |
}
|
578 |
|
src/router.cls.php
CHANGED
@@ -28,6 +28,7 @@ class Router extends Base {
|
|
28 |
const ACTION_CONF = 'conf';
|
29 |
const ACTION_ACTIVATION = 'activation';
|
30 |
const ACTION_CSS = 'css';
|
|
|
31 |
const ACTION_VPI = 'vpi';
|
32 |
const ACTION_IMPORT = 'import';
|
33 |
const ACTION_REPORT = 'report';
|
@@ -44,6 +45,7 @@ class Router extends Base {
|
|
44 |
self::ACTION_CONF,
|
45 |
self::ACTION_CRAWLER,
|
46 |
self::ACTION_CSS,
|
|
|
47 |
self::ACTION_VPI,
|
48 |
self::ACTION_DB_OPTM,
|
49 |
self::ACTION_DEBUG2,
|
@@ -567,6 +569,7 @@ class Router extends Base {
|
|
567 |
case self::ACTION_IMPORT:
|
568 |
case self::ACTION_REPORT:
|
569 |
case self::ACTION_CSS:
|
|
|
570 |
case self::ACTION_VPI:
|
571 |
case self::ACTION_CONF:
|
572 |
case self::ACTION_ACTIVATION:
|
28 |
const ACTION_CONF = 'conf';
|
29 |
const ACTION_ACTIVATION = 'activation';
|
30 |
const ACTION_CSS = 'css';
|
31 |
+
const ACTION_UCSS = 'ucss';
|
32 |
const ACTION_VPI = 'vpi';
|
33 |
const ACTION_IMPORT = 'import';
|
34 |
const ACTION_REPORT = 'report';
|
45 |
self::ACTION_CONF,
|
46 |
self::ACTION_CRAWLER,
|
47 |
self::ACTION_CSS,
|
48 |
+
self::ACTION_UCSS,
|
49 |
self::ACTION_VPI,
|
50 |
self::ACTION_DB_OPTM,
|
51 |
self::ACTION_DEBUG2,
|
569 |
case self::ACTION_IMPORT:
|
570 |
case self::ACTION_REPORT:
|
571 |
case self::ACTION_CSS:
|
572 |
+
case self::ACTION_UCSS:
|
573 |
case self::ACTION_VPI:
|
574 |
case self::ACTION_CONF:
|
575 |
case self::ACTION_ACTIVATION:
|
src/task.cls.php
CHANGED
@@ -13,7 +13,7 @@ class Task extends Root {
|
|
13 |
private static $_triggers = array(
|
14 |
Base::O_IMG_OPTM_CRON => array( 'name' => 'litespeed_task_imgoptm_pull', 'hook' => 'LiteSpeed\Img_Optm::cron_pull' ), // always fetch immediately
|
15 |
Base::O_OPTM_CSS_ASYNC => array( 'name' => 'litespeed_task_ccss', 'hook' => 'LiteSpeed\CSS::cron_ccss' ),
|
16 |
-
Base::O_OPTM_UCSS => array( 'name' => 'litespeed_task_ucss', 'hook' => 'LiteSpeed\
|
17 |
Base::O_MEDIA_VPI_CRON => array( 'name' => 'litespeed_task_vpi', 'hook' => 'LiteSpeed\VPI::cron' ),
|
18 |
Base::O_MEDIA_PLACEHOLDER_RESP_ASYNC => array( 'name' => 'litespeed_task_lqip', 'hook' => 'LiteSpeed\Placeholder::cron' ),
|
19 |
Base::O_DISCUSS_AVATAR_CRON => array( 'name' => 'litespeed_task_avatar', 'hook' => 'LiteSpeed\Avatar::cron' ),
|
13 |
private static $_triggers = array(
|
14 |
Base::O_IMG_OPTM_CRON => array( 'name' => 'litespeed_task_imgoptm_pull', 'hook' => 'LiteSpeed\Img_Optm::cron_pull' ), // always fetch immediately
|
15 |
Base::O_OPTM_CSS_ASYNC => array( 'name' => 'litespeed_task_ccss', 'hook' => 'LiteSpeed\CSS::cron_ccss' ),
|
16 |
+
Base::O_OPTM_UCSS => array( 'name' => 'litespeed_task_ucss', 'hook' => 'LiteSpeed\UCSS::cron' ),
|
17 |
Base::O_MEDIA_VPI_CRON => array( 'name' => 'litespeed_task_vpi', 'hook' => 'LiteSpeed\VPI::cron' ),
|
18 |
Base::O_MEDIA_PLACEHOLDER_RESP_ASYNC => array( 'name' => 'litespeed_task_lqip', 'hook' => 'LiteSpeed\Placeholder::cron' ),
|
19 |
Base::O_DISCUSS_AVATAR_CRON => array( 'name' => 'litespeed_task_avatar', 'hook' => 'LiteSpeed\Avatar::cron' ),
|
src/ucss.cls.php
ADDED
@@ -0,0 +1,535 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The ucss class.
|
4 |
+
*
|
5 |
+
* @since 5.1
|
6 |
+
*/
|
7 |
+
namespace LiteSpeed;
|
8 |
+
defined( 'WPINC' ) || exit;
|
9 |
+
|
10 |
+
class UCSS extends Base {
|
11 |
+
const LOG_TAG = '[UCSS]';
|
12 |
+
|
13 |
+
const TYPE_GEN = 'gen';
|
14 |
+
const TYPE_CLEAR_Q = 'clear_q';
|
15 |
+
|
16 |
+
protected $_summary;
|
17 |
+
private $_ucss_whitelist;
|
18 |
+
private $_queue;
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Init
|
22 |
+
*
|
23 |
+
* @since 3.0
|
24 |
+
*/
|
25 |
+
public function __construct() {
|
26 |
+
$this->_summary = self::get_summary();
|
27 |
+
|
28 |
+
add_filter( 'litespeed_ucss_whitelist', array( $this->cls( 'Data' ), 'load_ucss_whitelist' ) );
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Uniform url tag for ucss usage
|
33 |
+
* @since 4.7
|
34 |
+
*/
|
35 |
+
public static function get_url_tag( $request_url = false ) {
|
36 |
+
$url_tag = $request_url;
|
37 |
+
if ( is_404() ) {
|
38 |
+
$url_tag = '404';
|
39 |
+
}
|
40 |
+
elseif ( apply_filters( 'litespeed_ucss_per_pagetype', false ) ) {
|
41 |
+
$url_tag = Utility::page_type();
|
42 |
+
self::debug( 'litespeed_ucss_per_pagetype filter altered url to ' . $url_tag );
|
43 |
+
}
|
44 |
+
|
45 |
+
return $url_tag;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Get UCSS path
|
50 |
+
*
|
51 |
+
* @since 4.0
|
52 |
+
*/
|
53 |
+
public function load( $request_url, $dry_run = false ) {
|
54 |
+
// Check UCSS URI excludes
|
55 |
+
$ucss_exc = apply_filters( 'litespeed_ucss_exc', $this->conf( self::O_OPTM_UCSS_EXC ) );
|
56 |
+
if ( $ucss_exc && $hit = Utility::str_hit_array( $request_url, $ucss_exc ) ) {
|
57 |
+
self::debug( 'UCSS bypassed due to UCSS URI Exclude setting: ' . $hit );
|
58 |
+
return false;
|
59 |
+
}
|
60 |
+
|
61 |
+
$filepath_prefix = $this->_build_filepath_prefix( 'ucss' );
|
62 |
+
|
63 |
+
$url_tag = self::get_url_tag( $request_url );
|
64 |
+
|
65 |
+
$vary = $this->cls( 'Vary' )->finalize_full_varies();
|
66 |
+
$filename = $this->cls( 'Data' )->load_url_file( $url_tag, $vary, 'ucss' );
|
67 |
+
if ( $filename ) {
|
68 |
+
$static_file = LITESPEED_STATIC_DIR . $filepath_prefix . $filename . '.css';
|
69 |
+
|
70 |
+
if ( file_exists( $static_file ) ) {
|
71 |
+
self::debug2( 'existing ucss ' . $static_file );
|
72 |
+
// Check if is error comment inside only
|
73 |
+
$tmp = File::read( $static_file );
|
74 |
+
if ( substr( $tmp, 0, 2 ) == '/*' && substr( $tmp, -2 ) == '*/' ) {
|
75 |
+
self::debug2( 'existing ucss is error only: ' . $tmp );
|
76 |
+
return false;
|
77 |
+
}
|
78 |
+
|
79 |
+
return $filename . '.css';
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
if ( $dry_run ) {
|
84 |
+
return false;
|
85 |
+
}
|
86 |
+
|
87 |
+
$uid = get_current_user_id();
|
88 |
+
|
89 |
+
$ua = ! empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) ? $_SERVER[ 'HTTP_USER_AGENT' ] : '';
|
90 |
+
|
91 |
+
// Store it for cron
|
92 |
+
$this->_queue = $this->load_queue( 'ucss' );
|
93 |
+
|
94 |
+
if ( count( $this->_queue ) > 500 ) {
|
95 |
+
self::debug( 'UCSS Queue is full - 500' );
|
96 |
+
return false;
|
97 |
+
}
|
98 |
+
|
99 |
+
$queue_k = ( strlen( $vary ) > 32 ? md5( $vary ) : $vary ) . ' ' . $url_tag;
|
100 |
+
$this->_queue[ $queue_k ] = array(
|
101 |
+
'url' => apply_filters( 'litespeed_ucss_url', $request_url ),
|
102 |
+
'user_agent' => substr( $ua, 0, 200 ),
|
103 |
+
'is_mobile' => $this->_separate_mobile(),
|
104 |
+
'is_webp' => $this->cls( 'Media' )->webp_support() ? 1 : 0,
|
105 |
+
'uid' => $uid,
|
106 |
+
'vary' => $vary,
|
107 |
+
'url_tag' => $url_tag,
|
108 |
+
); // Current UA will be used to request
|
109 |
+
$this->save_queue( 'ucss', $this->_queue );
|
110 |
+
self::debug( 'Added queue_ucss [url_tag] ' . $url_tag . ' [UA] ' . $ua . ' [vary] ' . $vary . ' [uid] ' . $uid );
|
111 |
+
|
112 |
+
// Prepare cache tag for later purge
|
113 |
+
Tag::add( 'UCSS.' . md5( $queue_k ) );
|
114 |
+
|
115 |
+
return false;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Generate UCSS
|
120 |
+
*
|
121 |
+
* @since 4.0
|
122 |
+
*/
|
123 |
+
public static function cron( $continue = false ) {
|
124 |
+
$_instance = self::cls();
|
125 |
+
return $_instance->_cron_handler( $continue );
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Handle UCSS cron
|
130 |
+
*
|
131 |
+
* @since 4.2
|
132 |
+
*/
|
133 |
+
private function _cron_handler( $continue ) {
|
134 |
+
$this->_queue = $this->load_queue( 'ucss' );
|
135 |
+
|
136 |
+
if ( empty( $this->_queue ) ) {
|
137 |
+
return;
|
138 |
+
}
|
139 |
+
|
140 |
+
// For cron, need to check request interval too
|
141 |
+
if ( ! $continue ) {
|
142 |
+
if ( ! empty( $this->_summary[ 'curr_request' ] ) && time() - $this->_summary[ 'curr_request' ] < 300 && ! $this->conf( self::O_DEBUG ) ) {
|
143 |
+
self::debug( 'Last request not done' );
|
144 |
+
return;
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
$i = 0;
|
149 |
+
foreach ( $this->_queue as $k => $v ) {
|
150 |
+
if ( ! empty( $v[ '_status' ] ) ) {
|
151 |
+
continue;
|
152 |
+
}
|
153 |
+
|
154 |
+
self::debug( 'cron job [tag] ' . $k . ' [url] ' . $v[ 'url' ] . ( $v[ 'is_mobile' ] ? ' 📱 ' : '' ) . ' [UA] ' . $v[ 'user_agent' ] );
|
155 |
+
|
156 |
+
if ( ! isset( $v[ 'is_webp' ] ) ) {
|
157 |
+
$v[ 'is_webp' ] = false;
|
158 |
+
}
|
159 |
+
|
160 |
+
$i ++;
|
161 |
+
$res = $this->_send_req( $v[ 'url' ], $k, $v[ 'uid' ], $v[ 'user_agent' ], $v[ 'vary' ], $v[ 'url_tag' ], $v[ 'is_mobile' ], $v[ 'is_webp' ] );
|
162 |
+
if ( ! $res ) { // Status is wrong, drop this this->_queue
|
163 |
+
$this->_queue = $this->load_queue( 'ucss' );
|
164 |
+
unset( $this->_queue[ $k ] );
|
165 |
+
$this->save_queue( 'ucss', $this->_queue );
|
166 |
+
|
167 |
+
if ( ! $continue ) {
|
168 |
+
return;
|
169 |
+
}
|
170 |
+
|
171 |
+
if ( $i > 3 ) {
|
172 |
+
GUI::print_loading( count( $this->_queue ), 'UCSS' );
|
173 |
+
return Router::self_redirect( Router::ACTION_UCSS, self::TYPE_GEN );
|
174 |
+
}
|
175 |
+
|
176 |
+
continue;
|
177 |
+
}
|
178 |
+
|
179 |
+
// Exit queue if out of quota
|
180 |
+
if ( $res === 'out_of_quota' ) {
|
181 |
+
return;
|
182 |
+
}
|
183 |
+
|
184 |
+
$this->_queue = $this->load_queue( 'ucss' );
|
185 |
+
$this->_queue[ $k ][ '_status' ] = 'requested';
|
186 |
+
$this->save_queue( 'ucss', $this->_queue );
|
187 |
+
self::debug( 'Saved to queue [k] ' . $k );
|
188 |
+
|
189 |
+
// only request first one
|
190 |
+
if ( ! $continue ) {
|
191 |
+
return;
|
192 |
+
}
|
193 |
+
|
194 |
+
if ( $i > 3 ) {
|
195 |
+
GUI::print_loading( count( $this->_queue ), 'UCSS' );
|
196 |
+
return Router::self_redirect( Router::ACTION_UCSS, self::TYPE_GEN );
|
197 |
+
}
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Send to QC API to generate UCSS
|
203 |
+
*
|
204 |
+
* @since 2.3
|
205 |
+
* @access private
|
206 |
+
*/
|
207 |
+
private function _send_req( $request_url, $queue_k, $uid, $user_agent, $vary, $url_tag, $is_mobile, $is_webp ) {
|
208 |
+
// Check if has credit to push or not
|
209 |
+
$err = false;
|
210 |
+
$allowance = $this->cls( 'Cloud' )->allowance( Cloud::SVC_UCSS, $err );
|
211 |
+
if ( ! $allowance ) {
|
212 |
+
self::debug( '❌ No credit: ' . $err );
|
213 |
+
$err && Admin_Display::error( Error::msg( $err ) );
|
214 |
+
return 'out_of_quota';
|
215 |
+
}
|
216 |
+
|
217 |
+
set_time_limit( 120 );
|
218 |
+
|
219 |
+
// Update css request status
|
220 |
+
$this->_summary[ 'curr_request' ] = time();
|
221 |
+
self::save_summary();
|
222 |
+
|
223 |
+
// Gather guest HTML to send
|
224 |
+
$html = $this->prepare_html( $request_url, $user_agent, $uid );
|
225 |
+
|
226 |
+
if ( ! $html ) {
|
227 |
+
return false;
|
228 |
+
}
|
229 |
+
|
230 |
+
// Parse HTML to gather all CSS content before requesting
|
231 |
+
$css = false;
|
232 |
+
list( , $html ) = $this->prepare_css( $html, $is_webp, true ); // Use this to drop CSS from HTML as we don't need those CSS to generate UCSS
|
233 |
+
$filename = $this->cls( 'Data' )->load_url_file( $url_tag, $vary, 'css' );
|
234 |
+
$filepath_prefix = $this->_build_filepath_prefix( 'css' );
|
235 |
+
$static_file = LITESPEED_STATIC_DIR . $filepath_prefix . $filename . '.css';
|
236 |
+
self::debug( 'Checking combined file ' . $static_file );
|
237 |
+
if ( file_exists( $static_file ) ) {
|
238 |
+
$css = File::read( $static_file );
|
239 |
+
}
|
240 |
+
|
241 |
+
if ( ! $css ) {
|
242 |
+
self::debug( '❌ No combined css' );
|
243 |
+
return false;
|
244 |
+
}
|
245 |
+
|
246 |
+
$data = array(
|
247 |
+
'url' => $request_url,
|
248 |
+
'queue_k' => $queue_k,
|
249 |
+
'user_agent' => $user_agent,
|
250 |
+
'is_mobile' => $is_mobile ? 1 : 0, // todo:compatible w/ tablet
|
251 |
+
'is_webp' => $is_webp ? 1 : 0,
|
252 |
+
'html' => $html,
|
253 |
+
'css' => $css,
|
254 |
+
);
|
255 |
+
if ( ! isset( $this->_ucss_whitelist ) ) {
|
256 |
+
$this->_ucss_whitelist = $this->_filter_whitelist();
|
257 |
+
}
|
258 |
+
$data[ 'whitelist' ] = $this->_ucss_whitelist;
|
259 |
+
|
260 |
+
self::debug( 'Generating: ', $data );
|
261 |
+
|
262 |
+
$json = Cloud::post( Cloud::SVC_UCSS, $data, 30 );
|
263 |
+
if ( ! is_array( $json ) ) {
|
264 |
+
return false;
|
265 |
+
}
|
266 |
+
|
267 |
+
// Old version compatibility
|
268 |
+
if ( empty( $json[ 'status' ] ) ) {
|
269 |
+
if ( ! empty( $json[ 'ucss' ] ) ) {
|
270 |
+
$this->_save_con( 'ucss', $json[ 'ucss' ], $queue_k );
|
271 |
+
}
|
272 |
+
|
273 |
+
// Delete the row
|
274 |
+
return false;
|
275 |
+
}
|
276 |
+
|
277 |
+
// Unknown status, remove this line
|
278 |
+
if ( $json[ 'status' ] != 'queued' ) {
|
279 |
+
return false;
|
280 |
+
}
|
281 |
+
|
282 |
+
// Save summary data
|
283 |
+
$this->_summary[ 'last_spent' ] = time() - $this->_summary[ 'curr_request' ];
|
284 |
+
$this->_summary[ 'last_request' ] = $this->_summary[ 'curr_request' ];
|
285 |
+
$this->_summary[ 'curr_request' ] = 0;
|
286 |
+
self::save_summary();
|
287 |
+
|
288 |
+
return true;
|
289 |
+
}
|
290 |
+
|
291 |
+
/**
|
292 |
+
* Save UCSS content
|
293 |
+
*
|
294 |
+
* @since 4.2
|
295 |
+
*/
|
296 |
+
private function _save_con( $type, $css, $queue_k ) {
|
297 |
+
// Add filters
|
298 |
+
$css = apply_filters( 'litespeed_' . $type, $css, $queue_k );
|
299 |
+
self::debug2( 'con: ' . $css );
|
300 |
+
|
301 |
+
if ( substr( $css, 0, 2 ) == '/*' && substr( $css, -2 ) == '*/' ) {
|
302 |
+
self::debug( '❌ empty ' . $type . ' [content] ' . $css );
|
303 |
+
// continue; // Save the error info too
|
304 |
+
}
|
305 |
+
|
306 |
+
// Write to file
|
307 |
+
$filecon_md5 = md5( $css );
|
308 |
+
|
309 |
+
$filepath_prefix = $this->_build_filepath_prefix( $type );
|
310 |
+
$static_file = LITESPEED_STATIC_DIR . $filepath_prefix . $filecon_md5 . '.css';
|
311 |
+
|
312 |
+
File::save( $static_file, $css, true );
|
313 |
+
|
314 |
+
$url_tag = $this->_queue[ $queue_k ][ 'url_tag' ];
|
315 |
+
$vary = $this->_queue[ $queue_k ][ 'vary' ];
|
316 |
+
self::debug2( "Save URL to file [file] $static_file [vary] $vary" );
|
317 |
+
|
318 |
+
$this->cls( 'Data' )->save_url( $url_tag, $vary, $type, $filecon_md5, dirname( $static_file ) );
|
319 |
+
|
320 |
+
Purge::add( strtoupper( $type ) . '.' . md5( $queue_k ) );
|
321 |
+
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* Prepare HTML from URL
|
325 |
+
*
|
326 |
+
* @since 3.4.3
|
327 |
+
*/
|
328 |
+
public function prepare_html( $request_url, $user_agent, $uid = false ) {
|
329 |
+
$html = $this->cls( 'Crawler' )->self_curl( add_query_arg( 'LSCWP_CTRL', 'before_optm', $request_url ), $user_agent, $uid );
|
330 |
+
Debug2::debug2( '[CSS] self_curl result....', $html );
|
331 |
+
|
332 |
+
|
333 |
+
$html = $this->cls( 'Optimizer' )->html_min( $html, true );
|
334 |
+
// Drop <noscript>xxx</noscript>
|
335 |
+
$html = preg_replace( '#<noscript>.*</noscript>#isU', '', $html );
|
336 |
+
|
337 |
+
return $html;
|
338 |
+
}
|
339 |
+
|
340 |
+
/**
|
341 |
+
* Prepare CSS from HTML for CCSS generation only. UCSS will used combined CSS directly.
|
342 |
+
* Prepare refined HTML for both CCSS and UCSS.
|
343 |
+
*
|
344 |
+
* @since 3.4.3
|
345 |
+
*/
|
346 |
+
public function prepare_css( $html, $is_webp = false, $dryrun = false ) {
|
347 |
+
$css = '';
|
348 |
+
preg_match_all( '#<link ([^>]+)/?>|<style([^>]*)>([^<]+)</style>#isU', $html, $matches, PREG_SET_ORDER );
|
349 |
+
foreach ( $matches as $match ) {
|
350 |
+
$debug_info = '';
|
351 |
+
if ( strpos( $match[ 0 ], '<link' ) === 0 ) {
|
352 |
+
$attrs = Utility::parse_attr( $match[ 1 ] );
|
353 |
+
|
354 |
+
if ( empty( $attrs[ 'rel' ] ) ) {
|
355 |
+
continue;
|
356 |
+
}
|
357 |
+
|
358 |
+
if ( $attrs[ 'rel' ] != 'stylesheet' ) {
|
359 |
+
if ( $attrs[ 'rel' ] != 'preload' || empty( $attrs[ 'as' ] ) || $attrs[ 'as' ] != 'style' ) {
|
360 |
+
continue;
|
361 |
+
}
|
362 |
+
}
|
363 |
+
|
364 |
+
if ( ! empty( $attrs[ 'media' ] ) && strpos( $attrs[ 'media' ], 'print' ) !== false ) {
|
365 |
+
continue;
|
366 |
+
}
|
367 |
+
|
368 |
+
if ( empty( $attrs[ 'href' ] ) ) {
|
369 |
+
continue;
|
370 |
+
}
|
371 |
+
|
372 |
+
// Check Google fonts hit
|
373 |
+
if ( strpos( $attrs[ 'href' ], 'fonts.googleapis.com' ) !== false ) {
|
374 |
+
$html = str_replace( $match[ 0 ], '', $html );
|
375 |
+
continue;
|
376 |
+
}
|
377 |
+
|
378 |
+
$debug_info = $attrs[ 'href' ];
|
379 |
+
|
380 |
+
// Load CSS content
|
381 |
+
if ( ! $dryrun ) { // Dryrun will not load CSS but just drop them
|
382 |
+
$con = $this->cls( 'Optimizer' )->load_file( $attrs[ 'href' ] );
|
383 |
+
if ( ! $con ) {
|
384 |
+
continue;
|
385 |
+
}
|
386 |
+
}
|
387 |
+
else {
|
388 |
+
$con = '';
|
389 |
+
}
|
390 |
+
}
|
391 |
+
else { // Inline style
|
392 |
+
$attrs = Utility::parse_attr( $match[ 2 ] );
|
393 |
+
|
394 |
+
if ( ! empty( $attrs[ 'media' ] ) && strpos( $attrs[ 'media' ], 'print' ) !== false ) {
|
395 |
+
continue;
|
396 |
+
}
|
397 |
+
|
398 |
+
Debug2::debug2( '[CSS] Load inline CSS ' . substr( $match[ 3 ], 0, 100 ) . '...', $attrs );
|
399 |
+
$con = $match[ 3 ];
|
400 |
+
|
401 |
+
$debug_info = '__INLINE__';
|
402 |
+
}
|
403 |
+
|
404 |
+
$con = Optimizer::minify_css( $con );
|
405 |
+
if ( $is_webp && $this->cls( 'Media' )->webp_support() ) {
|
406 |
+
$con = $this->cls( 'Media' )->replace_background_webp( $con );
|
407 |
+
}
|
408 |
+
|
409 |
+
if ( ! empty( $attrs[ 'media' ] ) && $attrs[ 'media' ] !== 'all' ) {
|
410 |
+
$con = '@media ' . $attrs[ 'media' ] . '{' . $con . "}\n";
|
411 |
+
}
|
412 |
+
else {
|
413 |
+
$con = $con . "\n";
|
414 |
+
}
|
415 |
+
|
416 |
+
$con = '/* ' . $debug_info . ' */' . $con;
|
417 |
+
$css .= $con;
|
418 |
+
|
419 |
+
$html = str_replace( $match[ 0 ], '', $html );
|
420 |
+
}
|
421 |
+
|
422 |
+
return array( $css, $html );
|
423 |
+
}
|
424 |
+
|
425 |
+
|
426 |
+
/**
|
427 |
+
* Filter the comment content, add quotes to selector from whitelist. Return the json
|
428 |
+
*
|
429 |
+
* @since 3.3
|
430 |
+
*/
|
431 |
+
private function _filter_whitelist() {
|
432 |
+
$whitelist = array();
|
433 |
+
$list = apply_filters( 'litespeed_ucss_whitelist', $this->conf( self::O_OPTM_UCSS_WHITELIST ) );
|
434 |
+
foreach ( $list as $k => $v ) {
|
435 |
+
if ( substr( $v, 0, 2 ) === '//' ) {
|
436 |
+
continue;
|
437 |
+
}
|
438 |
+
// Wrap in quotes for selectors
|
439 |
+
if ( substr( $v, 0, 1 ) !== '/' && strpos( $v, '"' ) === false && strpos( $v, "'" ) === false ) {
|
440 |
+
// $v = "'$v'";
|
441 |
+
}
|
442 |
+
$whitelist[] = $v;
|
443 |
+
}
|
444 |
+
|
445 |
+
return $whitelist;
|
446 |
+
}
|
447 |
+
|
448 |
+
/**
|
449 |
+
* Notify finished from server
|
450 |
+
* @since 5.1
|
451 |
+
*/
|
452 |
+
public function notify() {
|
453 |
+
$post_data = json_decode(file_get_contents('php://input'), true);
|
454 |
+
if( is_null( $post_data ) ) {
|
455 |
+
$post_data = $_POST;
|
456 |
+
}
|
457 |
+
self::debug( 'notify() data', $post_data );
|
458 |
+
|
459 |
+
$this->_queue = $this->load_queue( 'ucss' );
|
460 |
+
|
461 |
+
// Validate key
|
462 |
+
if ( empty( $post_data[ 'domain_key' ] ) || $post_data[ 'domain_key' ] !== md5( $this->conf( self::O_API_KEY ) ) ) {
|
463 |
+
self::debug( '❌ notify wrong key' );
|
464 |
+
self::save_summary( array( 'notify_ts_err' => time() ) );
|
465 |
+
return Cloud::err( 'wrong_key' );
|
466 |
+
}
|
467 |
+
|
468 |
+
list( $post_data ) = $this->cls( 'Cloud' )->extract_msg( $post_data, 'ucss' );
|
469 |
+
|
470 |
+
$notified_data = $post_data[ 'data' ];
|
471 |
+
if ( empty( $notified_data ) || ! is_array( $notified_data ) ) {
|
472 |
+
self::debug( '❌ notify exit: no notified data' );
|
473 |
+
return Cloud::err( 'no notified data' );
|
474 |
+
}
|
475 |
+
|
476 |
+
// Check if its in queue or not
|
477 |
+
$valid_i = 0;
|
478 |
+
foreach ( $notified_data as $v ) {
|
479 |
+
if ( empty( $v[ 'request_url' ] ) ) {
|
480 |
+
self::debug( '❌ notify bypass: no request_url', $v );
|
481 |
+
continue;
|
482 |
+
}
|
483 |
+
if ( empty( $v[ 'queue_k' ] ) ) {
|
484 |
+
self::debug( '❌ notify bypass: no queue_k', $v );
|
485 |
+
continue;
|
486 |
+
}
|
487 |
+
|
488 |
+
if ( empty( $this->_queue[ $v[ 'queue_k' ] ] ) ) {
|
489 |
+
self::debug( '❌ notify bypass: no this queue [q_k]' . $v[ 'queue_k' ] );
|
490 |
+
continue;
|
491 |
+
}
|
492 |
+
|
493 |
+
// Save data
|
494 |
+
if ( ! empty( $v[ 'data_ucss' ] ) ) {
|
495 |
+
$this->_save_con( 'ucss', $v[ 'data_ucss' ], $v[ 'queue_k' ] );
|
496 |
+
|
497 |
+
$valid_i ++;
|
498 |
+
}
|
499 |
+
|
500 |
+
unset( $this->_queue[ $v[ 'queue_k' ] ] );
|
501 |
+
self::debug( 'notify data handled, unset queue [q_k] ' . $v[ 'queue_k' ] );
|
502 |
+
}
|
503 |
+
$this->save_queue( 'ucss', $this->_queue );
|
504 |
+
|
505 |
+
self::debug( 'notified' );
|
506 |
+
|
507 |
+
return Cloud::ok( array( 'count' => $valid_i ) );
|
508 |
+
}
|
509 |
+
|
510 |
+
/**
|
511 |
+
* Handle all request actions from main cls
|
512 |
+
*
|
513 |
+
* @since 2.3
|
514 |
+
* @access public
|
515 |
+
*/
|
516 |
+
public function handler() {
|
517 |
+
$type = Router::verify_type();
|
518 |
+
|
519 |
+
switch ( $type ) {
|
520 |
+
case self::TYPE_GEN:
|
521 |
+
self::cron( true );
|
522 |
+
break;
|
523 |
+
|
524 |
+
case self::TYPE_CLEAR_Q:
|
525 |
+
$this->clear_q( 'ucss' );
|
526 |
+
break;
|
527 |
+
|
528 |
+
default:
|
529 |
+
break;
|
530 |
+
}
|
531 |
+
|
532 |
+
Admin::redirect();
|
533 |
+
}
|
534 |
+
|
535 |
+
}
|
src/vpi.cls.php
CHANGED
@@ -93,8 +93,6 @@ class VPI extends Base {
|
|
93 |
|
94 |
list( $post_data ) = $this->cls( 'Cloud' )->extract_msg( $post_data, 'vpi' );
|
95 |
|
96 |
-
global $wpdb;
|
97 |
-
|
98 |
$notified_data = $post_data[ 'data' ];
|
99 |
if ( empty( $notified_data ) || ! is_array( $notified_data ) ) {
|
100 |
self::debug( '❌ notify exit: no notified data' );
|
@@ -108,8 +106,12 @@ class VPI extends Base {
|
|
108 |
self::debug( '❌ notify bypass: no request_url', $v );
|
109 |
continue;
|
110 |
}
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
113 |
|
114 |
if ( empty( $this->_queue[ $queue_k ] ) ) {
|
115 |
self::debug( '❌ notify bypass: no this queue [q_k]' . $queue_k );
|
@@ -117,10 +119,10 @@ class VPI extends Base {
|
|
117 |
}
|
118 |
|
119 |
// Save data
|
120 |
-
if ( ! empty( $v[ '
|
121 |
$post_id = $this->_queue[ $queue_k ][ 'post_id' ];
|
122 |
-
$name = $is_mobile ? 'litespeed_vpi_list_mobile' : 'litespeed_vpi_list';
|
123 |
-
$this->cls( 'Metabox' )->save( $post_id, $name, $v[ '
|
124 |
|
125 |
$valid_i ++;
|
126 |
}
|
@@ -270,9 +272,7 @@ class VPI extends Base {
|
|
270 |
return false;
|
271 |
}
|
272 |
|
273 |
-
// Generate critical css
|
274 |
$data = array(
|
275 |
-
// 'type' => strtoupper( $type ), // Backward compatibility for v4.1-
|
276 |
'url' => $request_url,
|
277 |
'queue_k' => $queue_k,
|
278 |
'user_agent' => $user_agent,
|
93 |
|
94 |
list( $post_data ) = $this->cls( 'Cloud' )->extract_msg( $post_data, 'vpi' );
|
95 |
|
|
|
|
|
96 |
$notified_data = $post_data[ 'data' ];
|
97 |
if ( empty( $notified_data ) || ! is_array( $notified_data ) ) {
|
98 |
self::debug( '❌ notify exit: no notified data' );
|
106 |
self::debug( '❌ notify bypass: no request_url', $v );
|
107 |
continue;
|
108 |
}
|
109 |
+
if ( empty( $v[ 'queue_k' ] ) ) {
|
110 |
+
self::debug( '❌ notify bypass: no queue_k', $v );
|
111 |
+
continue;
|
112 |
+
}
|
113 |
+
// $queue_k = ( $is_mobile ? 'mobile' : '' ) . ' ' . $v[ 'request_url' ];
|
114 |
+
$queue_k = $v[ 'queue_k' ];
|
115 |
|
116 |
if ( empty( $this->_queue[ $queue_k ] ) ) {
|
117 |
self::debug( '❌ notify bypass: no this queue [q_k]' . $queue_k );
|
119 |
}
|
120 |
|
121 |
// Save data
|
122 |
+
if ( ! empty( $v[ 'data_vpi' ] ) ) {
|
123 |
$post_id = $this->_queue[ $queue_k ][ 'post_id' ];
|
124 |
+
$name = !empty( $v[ 'is_mobile' ] ) ? 'litespeed_vpi_list_mobile' : 'litespeed_vpi_list';
|
125 |
+
$this->cls( 'Metabox' )->save( $post_id, $name, $v[ 'data_vpi' ], true );
|
126 |
|
127 |
$valid_i ++;
|
128 |
}
|
272 |
return false;
|
273 |
}
|
274 |
|
|
|
275 |
$data = array(
|
|
|
276 |
'url' => $request_url,
|
277 |
'queue_k' => $queue_k,
|
278 |
'user_agent' => $user_agent,
|
thirdparty/entry.inc.php
CHANGED
@@ -28,6 +28,7 @@ $third_cls = array(
|
|
28 |
'User_Switching',
|
29 |
'WCML',
|
30 |
'WooCommerce',
|
|
|
31 |
'Woo_Paypal',
|
32 |
'Wp_Polls',
|
33 |
'WP_PostRatings',
|
28 |
'User_Switching',
|
29 |
'WCML',
|
30 |
'WooCommerce',
|
31 |
+
'WC_PDF_Product_Vouchers',
|
32 |
'Woo_Paypal',
|
33 |
'Wp_Polls',
|
34 |
'WP_PostRatings',
|
thirdparty/wc-pdf-product-vouchers.cls.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Third Party integration with WooCommerce PDF Product Vouchers.
|
4 |
+
*
|
5 |
+
* @since 5.1.0
|
6 |
+
*/
|
7 |
+
namespace LiteSpeed\Thirdparty;
|
8 |
+
|
9 |
+
defined( 'WPINC' ) || exit;
|
10 |
+
|
11 |
+
class WC_PDF_Product_Vouchers {
|
12 |
+
/**
|
13 |
+
* Do not cache generated vouchers
|
14 |
+
*
|
15 |
+
* @since 5.1.0
|
16 |
+
*/
|
17 |
+
public static function detect() {
|
18 |
+
if ( ! class_exists( '\WC_PDF_Product_Vouchers_Loader' ) ) {
|
19 |
+
return;
|
20 |
+
}
|
21 |
+
|
22 |
+
$is_voucher =
|
23 |
+
! empty( $_GET['post_type'] )
|
24 |
+
&& 'wc_voucher' === $_GET['post_type'];
|
25 |
+
$has_key =
|
26 |
+
! empty( $_GET['voucher_key'] )
|
27 |
+
|| ! empty( $_GET['key'] );
|
28 |
+
|
29 |
+
if ( $is_voucher && $has_key ) {
|
30 |
+
do_action( 'litespeed_control_set_nocache', '3rd WC PDF Product Voucher' );
|
31 |
+
}
|
32 |
+
}
|
33 |
+
}
|
tpl/dash/dashboard.tpl.php
CHANGED
@@ -2,8 +2,6 @@
|
|
2 |
namespace LiteSpeed;
|
3 |
defined( 'WPINC' ) || exit;
|
4 |
|
5 |
-
$lscache_stats = GUI::cls()->lscache_stats();
|
6 |
-
|
7 |
$health_scores = Health::cls()->scores();
|
8 |
|
9 |
$crawler_summary = Crawler::get_summary();
|
@@ -27,6 +25,7 @@ else {
|
|
27 |
|
28 |
$cloud_summary = Cloud::get_summary();
|
29 |
$css_summary = CSS::get_summary();
|
|
|
30 |
$placeholder_summary = Placeholder::get_summary();
|
31 |
$vpi_summary = VPI::get_summary();
|
32 |
|
@@ -411,21 +410,6 @@ $vpi_queue_count = count( $this->load_queue( 'vpi' ) );
|
|
411 |
</div>
|
412 |
</div>
|
413 |
|
414 |
-
<?php if ( $lscache_stats ) : ?>
|
415 |
-
<div class="postbox litespeed-postbox litespeed-postbox-cache-stats">
|
416 |
-
<div class="inside">
|
417 |
-
<h3 class="litespeed-title">
|
418 |
-
<?php echo __( 'Cache Stats', 'litespeed-cache' ); ?>
|
419 |
-
</h3>
|
420 |
-
|
421 |
-
<?php foreach ( $lscache_stats as $title => $val ) : ?>
|
422 |
-
<p><?php echo $title; ?>: <?php echo $val ? "<code>$val</code>" : '-'; ?></p>
|
423 |
-
<?php endforeach; ?>
|
424 |
-
|
425 |
-
</div>
|
426 |
-
</div>
|
427 |
-
<?php endif; ?>
|
428 |
-
|
429 |
<div class="postbox litespeed-postbox litespeed-postbox-ccss">
|
430 |
<div class="inside">
|
431 |
<h3 class="litespeed-title">
|
@@ -466,18 +450,18 @@ $vpi_queue_count = count( $this->load_queue( 'vpi' ) );
|
|
466 |
<a href="<?php echo admin_url( 'admin.php?page=litespeed-page_optm#settings_css' ); ?>" class="litespeed-title-right-icon"><?php echo __( 'More', 'litespeed-cache' ); ?></a>
|
467 |
</h3>
|
468 |
|
469 |
-
<?php if ( ! empty( $
|
470 |
<p>
|
471 |
-
<?php echo __( 'Last generated', 'litespeed-cache' ) . ': <code>' . Utility::readable_time( $
|
472 |
</p>
|
473 |
<p>
|
474 |
-
<?php echo __( 'Time to execute previous request', 'litespeed-cache' ) . ': <code>' . esc_html( $
|
475 |
</p>
|
476 |
<?php endif; ?>
|
477 |
|
478 |
<p>
|
479 |
<?php echo __( 'Requests in queue', 'litespeed-cache' ); ?>: <code><?php echo $ucss_count ?: '-' ?></code>
|
480 |
-
<a href="<?php echo $ucss_count ? Utility::build_url( Router::
|
481 |
class="button button-secondary button-small <?php if ( ! $ucss_count ) echo 'disabled'; ?>">
|
482 |
<?php echo __( 'Force cron', 'litespeed-cache' ); ?>
|
483 |
</a>
|
2 |
namespace LiteSpeed;
|
3 |
defined( 'WPINC' ) || exit;
|
4 |
|
|
|
|
|
5 |
$health_scores = Health::cls()->scores();
|
6 |
|
7 |
$crawler_summary = Crawler::get_summary();
|
25 |
|
26 |
$cloud_summary = Cloud::get_summary();
|
27 |
$css_summary = CSS::get_summary();
|
28 |
+
$ucss_summary = UCSS::get_summary();
|
29 |
$placeholder_summary = Placeholder::get_summary();
|
30 |
$vpi_summary = VPI::get_summary();
|
31 |
|
410 |
</div>
|
411 |
</div>
|
412 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
413 |
<div class="postbox litespeed-postbox litespeed-postbox-ccss">
|
414 |
<div class="inside">
|
415 |
<h3 class="litespeed-title">
|
450 |
<a href="<?php echo admin_url( 'admin.php?page=litespeed-page_optm#settings_css' ); ?>" class="litespeed-title-right-icon"><?php echo __( 'More', 'litespeed-cache' ); ?></a>
|
451 |
</h3>
|
452 |
|
453 |
+
<?php if ( ! empty( $ucss_summary[ 'last_request' ] ) ) : ?>
|
454 |
<p>
|
455 |
+
<?php echo __( 'Last generated', 'litespeed-cache' ) . ': <code>' . Utility::readable_time( $ucss_summary[ 'last_request' ] ) . '</code>'; ?>
|
456 |
</p>
|
457 |
<p>
|
458 |
+
<?php echo __( 'Time to execute previous request', 'litespeed-cache' ) . ': <code>' . esc_html( $ucss_summary[ 'last_spent' ] ) . 's</code>'; ?>
|
459 |
</p>
|
460 |
<?php endif; ?>
|
461 |
|
462 |
<p>
|
463 |
<?php echo __( 'Requests in queue', 'litespeed-cache' ); ?>: <code><?php echo $ucss_count ?: '-' ?></code>
|
464 |
+
<a href="<?php echo $ucss_count ? Utility::build_url( Router::ACTION_UCSS, UCSS::TYPE_GEN ) : 'javascript:;'; ?>"
|
465 |
class="button button-secondary button-small <?php if ( ! $ucss_count ) echo 'disabled'; ?>">
|
466 |
<?php echo __( 'Force cron', 'litespeed-cache' ); ?>
|
467 |
</a>
|
tpl/page_optm/settings_css.tpl.php
CHANGED
@@ -6,6 +6,7 @@ defined( 'WPINC' ) || exit;
|
|
6 |
// exit;
|
7 |
|
8 |
$css_summary = CSS::get_summary();
|
|
|
9 |
$closest_server_ucss = Cloud::get_summary( 'server.' . Cloud::SVC_UCSS );
|
10 |
$closest_server = Cloud::get_summary( 'server.' . Cloud::SVC_CCSS );
|
11 |
|
@@ -77,26 +78,26 @@ $ucss_queue = $this->load_queue( 'ucss' );
|
|
77 |
</div>
|
78 |
|
79 |
<div class="litespeed-desc litespeed-left20">
|
80 |
-
<?php if ( $
|
81 |
-
<?php if ( ! empty( $
|
82 |
<p>
|
83 |
-
<?php echo __( 'Last generated', 'litespeed-cache' ) . ': <code>' . Utility::readable_time( $
|
84 |
</p>
|
85 |
<p>
|
86 |
-
<?php echo __( 'Last requested cost', 'litespeed-cache' ) . ': <code>' . $
|
87 |
</p>
|
88 |
<?php endif; ?>
|
89 |
<?php endif; ?>
|
90 |
|
91 |
<?php if ( $closest_server_ucss ) : ?>
|
92 |
-
<a href="<?php echo Utility::build_url( Router::ACTION_CLOUD, Cloud::TYPE_REDETECT_CLOUD, false, null, array( 'svc' => Cloud::
|
93 |
<?php endif; ?>
|
94 |
|
95 |
<?php if ( ! empty( $ucss_queue ) ) : ?>
|
96 |
<div class="litespeed-callout notice notice-warning inline">
|
97 |
<h4>
|
98 |
<?php echo sprintf( __( 'URL list in %s queue waiting for cron', 'litespeed-cache' ), 'UCSS' ); ?> ( <?php echo count( $ucss_queue ); ?> )
|
99 |
-
<a href="<?php echo Utility::build_url( Router::
|
100 |
</h4>
|
101 |
<p>
|
102 |
<?php $i=0; foreach ( $ucss_queue as $k => $v ) : ?>
|
@@ -115,7 +116,7 @@ $ucss_queue = $this->load_queue( 'ucss' );
|
|
115 |
<?php endforeach; ?>
|
116 |
</p>
|
117 |
</div>
|
118 |
-
<a href="<?php echo Utility::build_url( Router::
|
119 |
<?php echo sprintf( __( 'Run %s Queue Manually', 'litespeed-cache' ), 'UCSS' ); ?>
|
120 |
</a>
|
121 |
<?php endif; ?>
|
6 |
// exit;
|
7 |
|
8 |
$css_summary = CSS::get_summary();
|
9 |
+
$ucss_summary = UCSS::get_summary();
|
10 |
$closest_server_ucss = Cloud::get_summary( 'server.' . Cloud::SVC_UCSS );
|
11 |
$closest_server = Cloud::get_summary( 'server.' . Cloud::SVC_CCSS );
|
12 |
|
78 |
</div>
|
79 |
|
80 |
<div class="litespeed-desc litespeed-left20">
|
81 |
+
<?php if ( $ucss_summary ) : ?>
|
82 |
+
<?php if ( ! empty( $ucss_summary[ 'last_request' ] ) ) : ?>
|
83 |
<p>
|
84 |
+
<?php echo __( 'Last generated', 'litespeed-cache' ) . ': <code>' . Utility::readable_time( $ucss_summary[ 'last_request' ] ) . '</code>'; ?>
|
85 |
</p>
|
86 |
<p>
|
87 |
+
<?php echo __( 'Last requested cost', 'litespeed-cache' ) . ': <code>' . $ucss_summary[ 'last_spent' ] . 's</code>'; ?>
|
88 |
</p>
|
89 |
<?php endif; ?>
|
90 |
<?php endif; ?>
|
91 |
|
92 |
<?php if ( $closest_server_ucss ) : ?>
|
93 |
+
<a href="<?php echo Utility::build_url( Router::ACTION_CLOUD, Cloud::TYPE_REDETECT_CLOUD, false, null, array( 'svc' => Cloud::SVC_UCSS ) ); ?>" data-balloon-pos="up" data-balloon-break aria-label='<?php echo sprintf( __( 'Current closest Cloud server is %s. Click to redetect.', 'litespeed-cache' ), $closest_server_ucss ); ?>' data-litespeed-cfm="<?php echo __( 'Are you sure you want to redetect the closest cloud server for this service?', 'litespeed-cache' ) ; ?>"><i class='litespeed-quic-icon'></i></a>
|
94 |
<?php endif; ?>
|
95 |
|
96 |
<?php if ( ! empty( $ucss_queue ) ) : ?>
|
97 |
<div class="litespeed-callout notice notice-warning inline">
|
98 |
<h4>
|
99 |
<?php echo sprintf( __( 'URL list in %s queue waiting for cron', 'litespeed-cache' ), 'UCSS' ); ?> ( <?php echo count( $ucss_queue ); ?> )
|
100 |
+
<a href="<?php echo Utility::build_url( Router::ACTION_UCSS, UCSS::TYPE_CLEAR_Q ); ?>" class="button litespeed-btn-warning litespeed-right">Clear</a>
|
101 |
</h4>
|
102 |
<p>
|
103 |
<?php $i=0; foreach ( $ucss_queue as $k => $v ) : ?>
|
116 |
<?php endforeach; ?>
|
117 |
</p>
|
118 |
</div>
|
119 |
+
<a href="<?php echo Utility::build_url( Router::ACTION_UCSS, UCSS::TYPE_GEN ); ?>" class="button litespeed-btn-success">
|
120 |
<?php echo sprintf( __( 'Run %s Queue Manually', 'litespeed-cache' ), 'UCSS' ); ?>
|
121 |
</a>
|
122 |
<?php endif; ?>
|
tpl/toolbox/beta_test.tpl.php
CHANGED
@@ -4,7 +4,7 @@ defined( 'WPINC' ) || exit;
|
|
4 |
|
5 |
// Existing public version list
|
6 |
$v_list = array(
|
7 |
-
'5.
|
8 |
'4.6',
|
9 |
'4.5.0.1',
|
10 |
'4.4.7',
|
4 |
|
5 |
// Existing public version list
|
6 |
$v_list = array(
|
7 |
+
'5.1',
|
8 |
'4.6',
|
9 |
'4.5.0.1',
|
10 |
'4.4.7',
|
tpl/toolbox/log_viewer.tpl.php
CHANGED
@@ -1,29 +1,105 @@
|
|
1 |
<?php
|
|
|
2 |
namespace LiteSpeed;
|
|
|
3 |
defined( 'WPINC' ) || exit;
|
4 |
-
?>
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
$lines = File::count_lines( $file );
|
19 |
$start = $lines > 1000 ? $lines - 1000 : 0;
|
20 |
-
$
|
21 |
-
$
|
22 |
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
?>
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
|
1 |
<?php
|
2 |
+
|
3 |
namespace LiteSpeed;
|
4 |
+
|
5 |
defined( 'WPINC' ) || exit;
|
|
|
6 |
|
7 |
+
$logs =
|
8 |
+
array(
|
9 |
+
array(
|
10 |
+
'name' => 'debug',
|
11 |
+
'label' => esc_html__( 'Debug Log', 'litespeed-cache' ),
|
12 |
+
'accesskey' => 'A',
|
13 |
+
),
|
14 |
+
array(
|
15 |
+
'name' => 'debug.purge',
|
16 |
+
'label' => esc_html__( 'Purge Log', 'litespeed-cache' ),
|
17 |
+
'accesskey' => 'B',
|
18 |
+
),
|
19 |
+
array(
|
20 |
+
'name' => 'crawler',
|
21 |
+
'label' => esc_html__( 'Crawler Log', 'litespeed-cache' ),
|
22 |
+
'accesskey' => 'C',
|
23 |
+
),
|
24 |
+
);
|
25 |
|
26 |
+
/**
|
27 |
+
* Return a subnav button (subtab)
|
28 |
+
* @since 4.7
|
29 |
+
*/
|
30 |
+
function subnav_link( $item ) {
|
31 |
+
$class = 'button ';
|
32 |
+
$subtab = '';
|
33 |
|
34 |
+
if ( ! isset( $item['url'] ) ) {
|
35 |
+
$class .= 'button-secondary';
|
36 |
+
$subtab_name = "{$item['name']}_log";
|
37 |
+
$subtab = "data-litespeed-subtab='{$subtab_name}'";
|
38 |
+
$url ="#{$subtab_name}";
|
39 |
+
}
|
40 |
+
else {
|
41 |
+
$class .= 'button-primary';
|
42 |
+
$url = $item['url'];
|
43 |
+
}
|
44 |
|
45 |
+
$accesskey =
|
46 |
+
isset( $item['accesskey'] )
|
47 |
+
? "litespeed-accesskey='{$item['accesskey']}'"
|
48 |
+
: '';
|
49 |
+
$label = isset( $item['label'] ) ? $item['label'] : $item['name'];
|
50 |
+
|
51 |
+
return "<a href='{$url}' class='{$class}' {$subtab} {$accesskey}>{$label}</a>";
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Print a button to clear all logs
|
56 |
+
* @since 4.7
|
57 |
+
*/
|
58 |
+
function clear_logs_link( $accesskey = null ) {
|
59 |
+
$item =
|
60 |
+
array(
|
61 |
+
'label' => esc_html__( 'Clear Logs', 'litespeed-cache' ),
|
62 |
+
'url' => Utility::build_url( Router::ACTION_DEBUG2, Debug2::TYPE_CLEAR_LOG ),
|
63 |
+
);
|
64 |
+
if ( null !== $accesskey ) {
|
65 |
+
$item['accesskey'] = $accesskey;
|
66 |
+
}
|
67 |
+
echo subnav_link( $item );
|
68 |
+
}
|
69 |
+
|
70 |
+
$subnav_links = array();
|
71 |
+
$log_views = array();
|
72 |
+
|
73 |
+
foreach( $logs as $log ) {
|
74 |
+
$subnav_links[] = subnav_link( $log );
|
75 |
+
|
76 |
+
$file = LSCWP_CONTENT_DIR . "/{$log['name']}.log";
|
77 |
$lines = File::count_lines( $file );
|
78 |
$start = $lines > 1000 ? $lines - 1000 : 0;
|
79 |
+
$lines = File::read( $file, $start );
|
80 |
+
$lines = $lines ? trim( implode( "\n", $lines ) ) : '';
|
81 |
|
82 |
+
$log_views[] =
|
83 |
+
"<div class='litespeed-log-view-wrapper' data-litespeed-sublayout='{$log['name']}_log'>"
|
84 |
+
. "<h3 class='litespeed-title'>{$log['label']}</h3>"
|
85 |
+
. '<div class="litespeed-log-body">'
|
86 |
+
. nl2br( htmlspecialchars( $lines ) )
|
87 |
+
. '</div>'
|
88 |
+
. '</div>';
|
89 |
+
}
|
90 |
?>
|
91 |
|
92 |
+
<h3 class="litespeed-title">
|
93 |
+
<?php esc_html_e( 'LiteSpeed Logs', 'litespeed-cache' ); ?>
|
94 |
+
<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/toolbox/#log-view-tab' ); ?>
|
95 |
+
</h3>
|
96 |
+
|
97 |
+
<div class="litespeed-log-subnav-wrapper">
|
98 |
+
<?php echo implode( "\n", $subnav_links ); ?>
|
99 |
+
<?php clear_logs_link( 'D' ); ?>
|
100 |
+
</div>
|
101 |
|
102 |
+
<?php echo implode( "\n", $log_views ); ?>
|
103 |
+
|
104 |
+
<?php
|
105 |
+
clear_logs_link();
|