Version Description
- Dec 12 2022 =
- CLI Presets feature is now usable from the CLI. (xLukii)
- CLI Added 'import_remote' for litespeed-option to enable importing options from URLs. (xLukii)
- Cache Added LiteSpeed headers to site health check for full page cache.
- *Crawler Fixed unauthorized crawler toggle operation. (#CVE-2022-46800)
- UCSS Fixed a bug where items weren't added back to the UCSS queue after purging.
- Page Optimize Fixed a bug where generated CSS would return 404 after upgrading via CLI.
- 3rd Fixed a bug where a WooCommerce session doesn't exist when checking cart, notices (Jason Levy/Gilles)
- GUI Made LiteSpeed admin notice icon grayscale to avoid distraction. (martinsauter)
- GUI Fixed RTL style for notification icon.
-
API Added a new hook
litespeed_optm_uri_exc
to exclude URI from page optimization. -
API Excluded
.well-known
path from page optimization.
Download this release
Release Info
Developer | LiteSpeedTech |
Plugin | LiteSpeed Cache |
Version | 5.3.1 |
Comparing to | |
See all releases |
Code changes from version 5.3 to 5.3.1
- assets/css/litespeed.css +31 -6
- assets/img/iconlscwp.svg +12 -0
- assets/img/lscwp_blue_font-icon_22px.svg +17 -0
- assets/img/lscwp_font-icon_32px.svg +24 -0
- assets/img/lscwp_gray-yellow_font-icon_22px.svg +17 -0
- assets/img/lscwp_gray_font-icon_22px.svg +17 -0
- assets/img/lscwp_grayscale_font-icon_22px.svg +18 -0
- cli/option.cls.php +40 -0
- cli/presets.cls.php +94 -0
- data/optm_uri_exc.txt +6 -0
- lang/litespeed-cache.pot +186 -159
- litespeed-cache.php +3 -2
- readme.txt +15 -2
- src/cloud.cls.php +17 -1
- src/control.cls.php +1 -1
- src/core.cls.php +12 -0
- src/crawler-map.cls.php +1 -1
- src/data.cls.php +14 -0
- src/doc.cls.php +17 -0
- src/lang.cls.php +1 -1
- src/object.lib.php +691 -130
- src/optimize.cls.php +3 -1
- src/purge.cls.php +3 -3
- src/rest.cls.php +3 -1
- src/root.cls.php +1 -1
- src/ucss.cls.php +2 -3
- thirdparty/woocommerce.cls.php +4 -7
- tpl/cache/settings_inc.object.tpl.php +2 -0
- tpl/dash/dashboard.tpl.php +2 -1
- tpl/page_optm/settings_css.tpl.php +2 -0
- tpl/page_optm/settings_media.tpl.php +1 -0
- tpl/page_optm/settings_tuning.tpl.php +5 -1
- tpl/page_optm/settings_vpi.tpl.php +1 -0
- tpl/toolbox/beta_test.tpl.php +1 -0
assets/css/litespeed.css
CHANGED
@@ -118,20 +118,33 @@ input[type="checkbox"].litespeed-tiny-toggle:checked:after {
|
|
118 |
======================================= */
|
119 |
|
120 |
.litespeed_icon:before {
|
|
|
|
|
121 |
content: '';
|
122 |
-
background-image:url('../img/
|
|
|
|
|
123 |
background-repeat: no-repeat;
|
124 |
-
width:
|
125 |
-
height:
|
126 |
vertical-align: middle;
|
127 |
display: inline-block;
|
128 |
position: absolute;
|
129 |
left:5px;
|
130 |
-
top:
|
|
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
|
133 |
.litespeed_icon {
|
134 |
-
padding-left:
|
|
|
|
|
|
|
|
|
135 |
}
|
136 |
|
137 |
.litespeed-quic-icon {
|
@@ -450,6 +463,18 @@ button.litespeed-form-action:hover {
|
|
450 |
margin: 10px 20px 0 2px;
|
451 |
}
|
452 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
453 |
.litespeed-wrap .nav-tab-active {
|
454 |
background: #fff;
|
455 |
border-bottom-color: #fff;
|
@@ -3445,7 +3470,7 @@ a.litespeed-media-href svg:hover {
|
|
3445 |
}
|
3446 |
}
|
3447 |
|
3448 |
-
@media screen and (min-width: 640px) and (max-width:
|
3449 |
.litespeed-comparison-cards {
|
3450 |
max-width: 740px;
|
3451 |
}
|
118 |
======================================= */
|
119 |
|
120 |
.litespeed_icon:before {
|
121 |
+
/* content: "\e900";
|
122 |
+
font-family: 'litespeedfont' !important; */
|
123 |
content: '';
|
124 |
+
background-image:url('../img/lscwp_grayscale_font-icon_22px.svg');
|
125 |
+
/* filter: grayscale(1); */
|
126 |
+
background-size: 22px;
|
127 |
background-repeat: no-repeat;
|
128 |
+
width: 22px;
|
129 |
+
height: 22px;
|
130 |
vertical-align: middle;
|
131 |
display: inline-block;
|
132 |
position: absolute;
|
133 |
left:5px;
|
134 |
+
top:8px;
|
135 |
+
}
|
136 |
+
|
137 |
+
.rtl .litespeed_icon:before {
|
138 |
+
left: initial;
|
139 |
+
right: 5px;
|
140 |
}
|
141 |
|
142 |
.litespeed_icon {
|
143 |
+
padding-left: 30px !important;
|
144 |
+
}
|
145 |
+
|
146 |
+
.rtl .litespeed_icon {
|
147 |
+
padding-right: 40px;
|
148 |
}
|
149 |
|
150 |
.litespeed-quic-icon {
|
463 |
margin: 10px 20px 0 2px;
|
464 |
}
|
465 |
|
466 |
+
.litespeed-wrap .nav-tab-wrapper {
|
467 |
+
display: flex;
|
468 |
+
flex-wrap: wrap-reverse;
|
469 |
+
}
|
470 |
+
|
471 |
+
.litespeed-wrap .nav-tab {
|
472 |
+
border-bottom-color: inherit;
|
473 |
+
border-bottom-style: solid;
|
474 |
+
border-bottom-width: 1px;
|
475 |
+
margin: 11px 10px -1px 0;
|
476 |
+
}
|
477 |
+
|
478 |
.litespeed-wrap .nav-tab-active {
|
479 |
background: #fff;
|
480 |
border-bottom-color: #fff;
|
3470 |
}
|
3471 |
}
|
3472 |
|
3473 |
+
@media screen and (min-width: 640px) and (max-width: 1279px) {
|
3474 |
.litespeed-comparison-cards {
|
3475 |
max-width: 740px;
|
3476 |
}
|
assets/img/iconlscwp.svg
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" standalone="no"?>
|
2 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
3 |
+
<svg xmlns="http://www.w3.org/2000/svg">
|
4 |
+
<metadata>LiteSpeed Technologies</metadata>
|
5 |
+
<defs>
|
6 |
+
<font id="iconlscwp" horiz-adv-x="1000" >
|
7 |
+
<font-face font-family="iconlscwp" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="848" descent="-152" />
|
8 |
+
<missing-glyph horiz-adv-x="1000" />
|
9 |
+
<glyph glyph-name="lscwp_font-icon" unicode="" d="M590 467l-69-88 36-52c1-2 2-4 3-6 3-11 0-20-7-26l-118-91c-3-2-7-4-13-4-6 0-12 3-15 9-2 5-3 12 3 20l69 88-37 53c-6 10-4 24 5 31l118 91c3 2 7 4 13 4 6 0 12-3 15-9 2-5 3-12-3-20z m407-119c0-6-2-11-6-15l-476-476c-4-4-9-6-15-6-6 0-11 2-15 6l-476 476c-4 4-6 9-6 15s2 11 6 15l476 476c4 4 9 6 15 6 6 0 11-2 15-6l476-476c4-4 6-9 6-15z m-478 427v-138l270-270c1 0 2 0 2 0h137l-409 408z m-19-176l-251-251 251-251 251 251-251 251z m-427-232h138l270 270v139l-408-409z m408-447v139l-270 270h-138l408-409z m447 409h-137c0 0-1 0-2 0l-270-269v-139l409 408z" horiz-adv-x="1000" />
|
10 |
+
</font>
|
11 |
+
</defs>
|
12 |
+
</svg>
|
assets/img/lscwp_blue_font-icon_22px.svg
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5 |
+
width="22px" height="22px" viewBox="0 0 22 22" enable-background="new 0 0 22 22" xml:space="preserve">
|
6 |
+
<path fill="#00749C" d="M13.039,7.954c-0.063-0.128-0.193-0.21-0.336-0.21c-0.119,0-0.207,0.054-0.268,0.102L9.84,9.838
|
7 |
+
c-0.208,0.158-0.254,0.461-0.104,0.675l0.813,1.17l-1.521,1.93c-0.141,0.18-0.113,0.336-0.065,0.434
|
8 |
+
c0.06,0.125,0.194,0.209,0.334,0.209c0.123,0,0.208-0.055,0.271-0.102l2.593-1.992c0.158-0.121,0.211-0.33,0.145-0.578
|
9 |
+
c-0.011-0.041-0.027-0.076-0.051-0.114l-0.803-1.154l1.52-1.93C13.111,8.207,13.086,8.052,13.039,7.954z"/>
|
10 |
+
<path fill="#00749C" d="M21.771,10.677L11.323,0.229c-0.088-0.086-0.202-0.135-0.324-0.135c-0.123,0-0.236,0.048-0.324,0.134
|
11 |
+
L0.228,10.677c-0.086,0.088-0.134,0.201-0.134,0.324c0,0.122,0.048,0.236,0.134,0.324l10.448,10.446
|
12 |
+
c0.087,0.088,0.202,0.135,0.324,0.135s0.237-0.047,0.324-0.135l10.446-10.447c0.088-0.085,0.136-0.201,0.136-0.323
|
13 |
+
C21.905,10.879,21.856,10.765,21.771,10.677z M11.424,1.625l8.956,8.956h-2.99c-0.016,0-0.035,0.001-0.051,0.003l-5.915-5.913V1.625
|
14 |
+
z M10.584,1.617v3.045l-5.92,5.919H1.62L10.584,1.617z M10.584,20.387L1.62,11.421h3.044l5.92,5.918V20.387z M10.999,16.504
|
15 |
+
l-5.501-5.502L10.999,5.5l5.503,5.502L10.999,16.504z M11.424,20.377v-3.045l5.913-5.914c0.018,0.001,0.037,0.003,0.053,0.003h2.99
|
16 |
+
L11.424,20.377z"/>
|
17 |
+
</svg>
|
assets/img/lscwp_font-icon_32px.svg
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5 |
+
width="32px" height="32px" viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve">
|
6 |
+
<path fill="#FFCE00" d="M18.955,11.586c-0.09-0.185-0.281-0.305-0.486-0.305c-0.174,0-0.301,0.079-0.389,0.147l-3.761,2.888
|
7 |
+
c-0.301,0.229-0.368,0.669-0.151,0.979l1.179,1.696l-2.204,2.796c-0.204,0.262-0.165,0.486-0.096,0.629
|
8 |
+
c0.086,0.181,0.281,0.303,0.484,0.303c0.178,0,0.302-0.081,0.391-0.149l3.76-2.887c0.229-0.173,0.305-0.478,0.209-0.836
|
9 |
+
c-0.016-0.059-0.039-0.111-0.074-0.166l-1.164-1.672l2.205-2.797C19.061,11.952,19.023,11.729,18.955,11.586z"/>
|
10 |
+
<path fill="#00CCFF" d="M31.611,15.531L16.469,0.389C16.344,0.264,16.177,0.194,16,0.194c-0.178,0-0.344,0.069-0.47,0.194
|
11 |
+
L0.389,15.531C0.264,15.656,0.195,15.822,0.195,16c0,0.177,0.069,0.344,0.194,0.469L15.531,31.61
|
12 |
+
c0.126,0.126,0.292,0.194,0.47,0.194c0.177,0,0.344-0.068,0.469-0.194l15.142-15.142c0.125-0.124,0.195-0.291,0.195-0.469
|
13 |
+
C31.807,15.823,31.736,15.656,31.611,15.531z M16.616,2.412l12.98,12.979h-4.334c-0.023,0-0.051,0.002-0.074,0.005l-8.572-8.57
|
14 |
+
V2.412z M15.398,2.399v4.413l-8.579,8.578H2.406L15.398,2.399z M15.398,29.601L2.406,16.609h4.413l8.579,8.578V29.601z M16,23.974
|
15 |
+
L8.027,16L16,8.026L23.975,16L16,23.974z M16.616,29.587v-4.413l8.57-8.569c0.025,0.003,0.053,0.005,0.076,0.005h4.334
|
16 |
+
L16.616,29.587z"/>
|
17 |
+
<path fill="#3399CC" d="M16,8.026L8.027,16L16,23.974L23.975,16L16,8.026z M17.816,16.681c0.035,0.055,0.059,0.107,0.074,0.166
|
18 |
+
c0.096,0.358,0.02,0.663-0.209,0.836l-3.76,2.887c-0.089,0.068-0.213,0.149-0.391,0.149c-0.203,0-0.398-0.122-0.484-0.303
|
19 |
+
c-0.069-0.143-0.108-0.367,0.096-0.629l2.204-2.796l-1.179-1.696c-0.217-0.31-0.149-0.749,0.151-0.979l3.761-2.888
|
20 |
+
c0.088-0.068,0.215-0.147,0.389-0.147c0.205,0,0.396,0.12,0.486,0.305c0.068,0.143,0.105,0.366-0.098,0.626l-2.205,2.797
|
21 |
+
L17.816,16.681z M25.188,15.396l-8.572-8.57V2.412l12.98,12.979h-4.334C25.238,15.391,25.211,15.393,25.188,15.396z M6.819,15.391
|
22 |
+
H2.406L15.398,2.399v4.413L6.819,15.391z M6.819,16.609l8.579,8.578v4.413L2.406,16.609H6.819z M25.262,16.609h4.334l-12.98,12.978
|
23 |
+
v-4.413l8.57-8.569C25.211,16.607,25.238,16.609,25.262,16.609z"/>
|
24 |
+
</svg>
|
assets/img/lscwp_gray-yellow_font-icon_22px.svg
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5 |
+
width="22px" height="22px" viewBox="0 0 22 22" enable-background="new 0 0 22 22" xml:space="preserve">
|
6 |
+
<path fill="#FFCC00" d="M13.039,7.954c-0.063-0.128-0.193-0.21-0.336-0.21c-0.119,0-0.207,0.054-0.268,0.102L9.84,9.838
|
7 |
+
c-0.208,0.158-0.254,0.461-0.104,0.675l0.813,1.17l-1.521,1.93c-0.141,0.18-0.113,0.336-0.065,0.434
|
8 |
+
c0.06,0.125,0.194,0.209,0.334,0.209c0.123,0,0.208-0.055,0.271-0.102l2.593-1.992c0.157-0.121,0.211-0.33,0.146-0.578
|
9 |
+
c-0.012-0.041-0.027-0.076-0.052-0.114l-0.803-1.154l1.521-1.93C13.111,8.207,13.086,8.052,13.039,7.954z"/>
|
10 |
+
<path fill="#777777" d="M21.771,10.677L11.323,0.229c-0.088-0.086-0.202-0.135-0.324-0.135c-0.123,0-0.236,0.048-0.324,0.134
|
11 |
+
L0.228,10.677c-0.086,0.088-0.134,0.201-0.134,0.324c0,0.122,0.048,0.236,0.134,0.324l10.448,10.446
|
12 |
+
c0.087,0.088,0.202,0.135,0.324,0.135s0.237-0.047,0.324-0.135L21.77,11.324c0.088-0.085,0.137-0.201,0.137-0.323
|
13 |
+
C21.904,10.879,21.855,10.765,21.771,10.677z M11.424,1.625l8.956,8.956h-2.989c-0.017,0-0.035,0.001-0.052,0.003l-5.915-5.913
|
14 |
+
V1.625z M10.584,1.617v3.045l-5.92,5.919H1.62L10.584,1.617z M10.584,20.387L1.62,11.421h3.044l5.92,5.918V20.387z M10.999,16.504
|
15 |
+
l-5.501-5.502L10.999,5.5l5.503,5.502L10.999,16.504z M11.424,20.377v-3.045l5.913-5.914c0.019,0.001,0.037,0.003,0.054,0.003h2.989
|
16 |
+
L11.424,20.377z"/>
|
17 |
+
</svg>
|
assets/img/lscwp_gray_font-icon_22px.svg
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5 |
+
width="22px" height="22px" viewBox="0 0 22 22" enable-background="new 0 0 22 22" xml:space="preserve">
|
6 |
+
<path fill="#777777" d="M13.039,7.954c-0.063-0.128-0.193-0.21-0.336-0.21c-0.119,0-0.207,0.054-0.268,0.102L9.84,9.838
|
7 |
+
c-0.208,0.158-0.254,0.461-0.104,0.675l0.813,1.17l-1.521,1.93c-0.141,0.18-0.113,0.336-0.065,0.434
|
8 |
+
c0.06,0.125,0.194,0.209,0.334,0.209c0.123,0,0.208-0.055,0.271-0.102l2.593-1.992c0.158-0.121,0.211-0.33,0.145-0.578
|
9 |
+
c-0.011-0.041-0.027-0.076-0.051-0.114l-0.803-1.154l1.52-1.93C13.111,8.207,13.086,8.052,13.039,7.954z"/>
|
10 |
+
<path fill="#777777" d="M21.771,10.677L11.323,0.229c-0.088-0.086-0.202-0.135-0.324-0.135c-0.123,0-0.236,0.048-0.324,0.134
|
11 |
+
L0.228,10.677c-0.086,0.088-0.134,0.201-0.134,0.324c0,0.122,0.048,0.236,0.134,0.324l10.448,10.446
|
12 |
+
c0.087,0.088,0.202,0.135,0.324,0.135s0.237-0.047,0.324-0.135l10.446-10.447c0.088-0.085,0.136-0.201,0.136-0.323
|
13 |
+
C21.905,10.879,21.856,10.765,21.771,10.677z M11.424,1.625l8.956,8.956h-2.99c-0.016,0-0.035,0.001-0.051,0.003l-5.915-5.913V1.625
|
14 |
+
z M10.584,1.617v3.045l-5.92,5.919H1.62L10.584,1.617z M10.584,20.387L1.62,11.421h3.044l5.92,5.918V20.387z M10.999,16.504
|
15 |
+
l-5.501-5.502L10.999,5.5l5.503,5.502L10.999,16.504z M11.424,20.377v-3.045l5.913-5.914c0.018,0.001,0.037,0.003,0.053,0.003h2.99
|
16 |
+
L11.424,20.377z"/>
|
17 |
+
</svg>
|
assets/img/lscwp_grayscale_font-icon_22px.svg
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5 |
+
width="22px" height="22px" viewBox="0 0 22 22" enable-background="new 0 0 22 22" xml:space="preserve">
|
6 |
+
<rect x="4" y="4" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -4.5563 11)" fill="#777777" width="14" height="14"/>
|
7 |
+
<path fill="#FFFFFF" d="M13.039,7.954c-0.063-0.128-0.193-0.21-0.336-0.21c-0.119,0-0.207,0.054-0.268,0.102L9.84,9.838
|
8 |
+
c-0.208,0.158-0.254,0.461-0.104,0.675l0.813,1.17l-1.521,1.93c-0.141,0.18-0.113,0.336-0.065,0.434
|
9 |
+
c0.06,0.125,0.194,0.209,0.334,0.209c0.123,0,0.208-0.055,0.271-0.102l2.593-1.992c0.157-0.121,0.211-0.33,0.146-0.578
|
10 |
+
c-0.012-0.041-0.027-0.076-0.052-0.114l-0.803-1.154l1.521-1.93C13.111,8.207,13.086,8.052,13.039,7.954z"/>
|
11 |
+
<path fill="#AAAAAA" d="M21.771,10.677L11.323,0.229c-0.088-0.086-0.202-0.135-0.324-0.135c-0.123,0-0.236,0.048-0.324,0.134
|
12 |
+
L0.228,10.677c-0.086,0.088-0.134,0.201-0.134,0.324c0,0.122,0.048,0.236,0.134,0.324l10.448,10.446
|
13 |
+
c0.087,0.088,0.202,0.135,0.324,0.135s0.237-0.047,0.324-0.135L21.77,11.324c0.088-0.085,0.138-0.201,0.138-0.323
|
14 |
+
C21.904,10.879,21.855,10.765,21.771,10.677z M11.424,1.625l8.956,8.956h-2.989c-0.017,0-0.035,0.001-0.052,0.003l-5.915-5.913
|
15 |
+
V1.625z M10.584,1.617v3.045l-5.92,5.919H1.62L10.584,1.617z M10.584,20.387L1.62,11.421h3.044l5.92,5.918V20.387z M10.999,16.504
|
16 |
+
l-5.501-5.502L10.999,5.5l5.503,5.502L10.999,16.504z M11.424,20.377v-3.045l5.913-5.914c0.019,0.001,0.037,0.003,0.054,0.003h2.989
|
17 |
+
L11.424,20.377z"/>
|
18 |
+
</svg>
|
cli/option.cls.php
CHANGED
@@ -330,6 +330,46 @@ class Option extends Base {
|
|
330 |
WP_CLI::success( 'Options imported. [File] ' . $file );
|
331 |
}
|
332 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
333 |
/**
|
334 |
* Reset all options to default.
|
335 |
*
|
330 |
WP_CLI::success( 'Options imported. [File] ' . $file );
|
331 |
}
|
332 |
|
333 |
+
/**
|
334 |
+
* Import plugin options from a remote file.
|
335 |
+
*
|
336 |
+
* The file must be formatted as such:
|
337 |
+
* option_key=option_value
|
338 |
+
* One per line.
|
339 |
+
* A Semicolon at the beginning of the line indicates a comment and will be skipped.
|
340 |
+
*
|
341 |
+
* ## OPTIONS
|
342 |
+
*
|
343 |
+
* <url>
|
344 |
+
* : The URL to import options from.
|
345 |
+
*
|
346 |
+
* ## EXAMPLES
|
347 |
+
*
|
348 |
+
* # Import options from https://domain.com/options.txt
|
349 |
+
* $ wp litespeed-option import_remote https://domain.com/options.txt
|
350 |
+
*
|
351 |
+
*/
|
352 |
+
|
353 |
+
public function import_remote( $args, $assoc_args ) {
|
354 |
+
$file = $args[0];
|
355 |
+
|
356 |
+
$tmp_file = download_url( $file );
|
357 |
+
|
358 |
+
if ( is_wp_error( $tmp_file ) ) {
|
359 |
+
WP_CLI::error( 'Failed to download file.' );
|
360 |
+
return;
|
361 |
+
}
|
362 |
+
|
363 |
+
$res = $this->cls( 'Import' )->import( $tmp_file );
|
364 |
+
|
365 |
+
if ( ! $res ) {
|
366 |
+
WP_CLI::error( 'Failed to parse serialized data from file.' );
|
367 |
+
}
|
368 |
+
|
369 |
+
WP_CLI::success( 'Options imported. [File] ' . $file );
|
370 |
+
}
|
371 |
+
|
372 |
+
|
373 |
/**
|
374 |
* Reset all options to default.
|
375 |
*
|
cli/presets.cls.php
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace LiteSpeed\CLI;
|
3 |
+
defined( 'WPINC' ) || exit;
|
4 |
+
|
5 |
+
use LiteSpeed\Debug2;
|
6 |
+
use LiteSpeed\Preset;
|
7 |
+
use WP_CLI;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Presets CLI
|
11 |
+
*/
|
12 |
+
|
13 |
+
class Presets {
|
14 |
+
|
15 |
+
private $__preset;
|
16 |
+
|
17 |
+
public function __construct()
|
18 |
+
{
|
19 |
+
Debug2::debug( 'CLI_Presets init' );
|
20 |
+
|
21 |
+
$this->__preset = Preset::cls();
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Applies a standard preset's settings.
|
26 |
+
*
|
27 |
+
* ## OPTIONS
|
28 |
+
*
|
29 |
+
* ## EXAMPLES
|
30 |
+
*
|
31 |
+
* # Apply the preset called "basic"
|
32 |
+
* $ wp litespeed-presets apply basic
|
33 |
+
*
|
34 |
+
*/
|
35 |
+
|
36 |
+
public function apply( $args )
|
37 |
+
{
|
38 |
+
$preset = $args[ 0 ];
|
39 |
+
|
40 |
+
if ( ! isset( $preset ) )
|
41 |
+
{
|
42 |
+
WP_CLI::error( 'Please specify a preset to apply.' );
|
43 |
+
return;
|
44 |
+
}
|
45 |
+
|
46 |
+
return $this->__preset->apply( $preset );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Returns sorted backup names.
|
51 |
+
*
|
52 |
+
* ## OPTIONS
|
53 |
+
*
|
54 |
+
* ## EXAMPLES
|
55 |
+
*
|
56 |
+
* # Get all backups
|
57 |
+
* $ wp litespeed-presets get_backups
|
58 |
+
*
|
59 |
+
*/
|
60 |
+
|
61 |
+
public function get_backups()
|
62 |
+
{
|
63 |
+
$backups = $this->__preset->get_backups();
|
64 |
+
|
65 |
+
foreach ( $backups as $backup ) {
|
66 |
+
WP_CLI::line( $backup );
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Restores settings from the backup file with the given timestamp, then deletes the file.
|
72 |
+
*
|
73 |
+
* ## OPTIONS
|
74 |
+
*
|
75 |
+
* ## EXAMPLES
|
76 |
+
*
|
77 |
+
* # Restore the backup with the timestamp 1667485245
|
78 |
+
* $ wp litespeed-presets restore 1667485245
|
79 |
+
*
|
80 |
+
*/
|
81 |
+
|
82 |
+
public function restore( $args )
|
83 |
+
{
|
84 |
+
$timestamp = $args[ 0 ];
|
85 |
+
|
86 |
+
if ( ! isset( $timestamp ) )
|
87 |
+
{
|
88 |
+
WP_CLI::error( 'Please specify a timestamp to restore.' );
|
89 |
+
return;
|
90 |
+
}
|
91 |
+
|
92 |
+
return $this->__preset->restore( $timestamp );
|
93 |
+
}
|
94 |
+
}
|
data/optm_uri_exc.txt
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Predefined list for excluding URI from page optimization #
|
2 |
+
# Comment can use `# `(there is a space following), or `##`, can use both as a new line or end of one line
|
3 |
+
# If you want to predefine new items, please send a Pull Request to https://github.com/litespeedtech/lscache_wp/blob/dev/data/optm_uri_exc.txt We will merge into next plugin release
|
4 |
+
|
5 |
+
# URI excludes
|
6 |
+
.well-known
|
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.3\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
|
7 |
-
"POT-Creation-Date: 2022-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -111,7 +111,7 @@ msgstr ""
|
|
111 |
#: src/admin-display.cls.php:929 src/admin-display.cls.php:980
|
112 |
#: tpl/cache/settings-cache.tpl.php:19
|
113 |
#: tpl/cache/settings_inc.cache_mobile.tpl.php:71 tpl/cdn/settings.tpl.php:49
|
114 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
115 |
#: tpl/page_optm/settings_media.tpl.php:159
|
116 |
#: tpl/toolbox/settings-debug.tpl.php:46
|
117 |
msgid "ON"
|
@@ -204,13 +204,14 @@ msgid "Invalid IP"
|
|
204 |
msgstr ""
|
205 |
|
206 |
#: src/admin-display.cls.php:1180 tpl/cache/settings-esi.tpl.php:95
|
207 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
208 |
#: tpl/page_optm/settings_html.tpl.php:85
|
209 |
-
#: tpl/page_optm/settings_media.tpl.php:
|
210 |
#: tpl/page_optm/settings_media_exc.tpl.php:26
|
211 |
#: tpl/page_optm/settings_tuning.tpl.php:35
|
212 |
#: tpl/page_optm/settings_tuning.tpl.php:56
|
213 |
#: tpl/page_optm/settings_tuning.tpl.php:77
|
|
|
214 |
#: tpl/page_optm/settings_tuning_css.tpl.php:24
|
215 |
#: tpl/page_optm/settings_tuning_css.tpl.php:84
|
216 |
#: tpl/toolbox/edit_htaccess.tpl.php:54 tpl/toolbox/edit_htaccess.tpl.php:71
|
@@ -324,13 +325,13 @@ msgid ""
|
|
324 |
"that the account still exists and must be deleted separately."
|
325 |
msgstr ""
|
326 |
|
327 |
-
#: src/cdn-setup.cls.php:322 src/cloud.cls.php:
|
328 |
-
#: src/cloud.cls.php:
|
329 |
msgid "Message from QUIC.cloud server"
|
330 |
msgstr ""
|
331 |
|
332 |
#: src/cloud.cls.php:379 src/cloud.cls.php:392 src/cloud.cls.php:437
|
333 |
-
#: src/cloud.cls.php:462 src/cloud.cls.php:
|
334 |
msgid "Cloud Error"
|
335 |
msgstr ""
|
336 |
|
@@ -342,75 +343,79 @@ msgstr ""
|
|
342 |
msgid "No available Cloud Node after checked server load."
|
343 |
msgstr ""
|
344 |
|
345 |
-
#: src/cloud.cls.php:
|
|
|
|
|
|
|
|
|
346 |
msgid "Please try after %1$s for service %2$s."
|
347 |
msgstr ""
|
348 |
|
349 |
-
#: src/cloud.cls.php:
|
350 |
msgid "Failed to request via WordPress"
|
351 |
msgstr ""
|
352 |
|
353 |
-
#: src/cloud.cls.php:
|
354 |
msgid "Redetected node"
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: src/cloud.cls.php:
|
358 |
msgid ""
|
359 |
"We are working hard to improve your online service experience. The service "
|
360 |
"will be unavailable while we work. We apologize for any inconvenience."
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: src/cloud.cls.php:
|
364 |
msgid "Good news from QUIC.cloud server"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: src/cloud.cls.php:
|
368 |
msgid "%1$s plugin version %2$s required for this action."
|
369 |
msgstr ""
|
370 |
|
371 |
-
#: src/cloud.cls.php:
|
372 |
msgid "Failed to communicate with QUIC.cloud server"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#: src/cloud.cls.php:
|
376 |
msgid ""
|
377 |
"Site not recognized. Domain Key has been automatically removed. Please "
|
378 |
"request a new one."
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: src/cloud.cls.php:
|
382 |
msgid "Click here to set."
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: src/cloud.cls.php:
|
386 |
msgid "Cannot request REST API, no token saved."
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: src/cloud.cls.php:
|
390 |
msgid "Cloud REST Error"
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: src/cloud.cls.php:
|
394 |
msgid "Cloud REST API returned error: "
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: src/cloud.cls.php:
|
398 |
msgid ""
|
399 |
"Applied for Domain Key successfully. Please wait for result. Domain Key will "
|
400 |
"be automatically sent to your WordPress."
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: src/cloud.cls.php:
|
404 |
msgid ""
|
405 |
"Congratulations, your Domain Key has been approved! The setting has been "
|
406 |
"updated accordingly."
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: src/cloud.cls.php:
|
410 |
msgid "Domain Key hash mismatch"
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: src/cloud.cls.php:
|
414 |
msgid "Sync credit allowance with Cloud Server successfully."
|
415 |
msgstr ""
|
416 |
|
@@ -418,11 +423,11 @@ msgstr ""
|
|
418 |
msgid "Changed setting successfully."
|
419 |
msgstr ""
|
420 |
|
421 |
-
#: src/core.cls.php:
|
422 |
msgid "Notified LiteSpeed Web Server to purge everything."
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: src/core.cls.php:
|
426 |
msgid "Notified LiteSpeed Web Server to purge the list."
|
427 |
msgstr ""
|
428 |
|
@@ -576,6 +581,10 @@ msgstr ""
|
|
576 |
msgid "Current Online Server IPs"
|
577 |
msgstr ""
|
578 |
|
|
|
|
|
|
|
|
|
579 |
#: src/error.cls.php:42
|
580 |
msgid "The setting %s is currently enabled."
|
581 |
msgstr ""
|
@@ -804,7 +813,7 @@ msgid "CSS/JS Cache"
|
|
804 |
msgstr ""
|
805 |
|
806 |
#: src/gui.cls.php:497 src/gui.cls.php:657 src/lang.cls.php:114
|
807 |
-
#: tpl/dash/dashboard.tpl.php:
|
808 |
msgid "Object Cache"
|
809 |
msgstr ""
|
810 |
|
@@ -879,103 +888,103 @@ msgid ""
|
|
879 |
"%2$s"
|
880 |
msgstr ""
|
881 |
|
882 |
-
#: src/img-optm.cls.php:
|
883 |
msgid "No new image gathered."
|
884 |
msgstr ""
|
885 |
|
886 |
-
#: src/img-optm.cls.php:
|
887 |
msgid "Gathered %d images successfully."
|
888 |
msgstr ""
|
889 |
|
890 |
-
#: src/img-optm.cls.php:
|
891 |
msgid "Pushed %1$s to Cloud server, accepted %2$s."
|
892 |
msgstr ""
|
893 |
|
894 |
-
#: src/img-optm.cls.php:
|
895 |
msgid "Bypassed %1$s duplicated images."
|
896 |
msgstr ""
|
897 |
|
898 |
-
#: src/img-optm.cls.php:
|
899 |
msgid "Cleared %1$s invalid images."
|
900 |
msgstr ""
|
901 |
|
902 |
-
#: src/img-optm.cls.php:
|
903 |
msgid "No valid image found in the current request."
|
904 |
msgstr ""
|
905 |
|
906 |
-
#: src/img-optm.cls.php:
|
907 |
msgid "No valid image found by Cloud server in the current request."
|
908 |
msgstr ""
|
909 |
|
910 |
-
#: src/img-optm.cls.php:
|
911 |
msgid "Pull Cron is running"
|
912 |
msgstr ""
|
913 |
|
914 |
-
#: src/img-optm.cls.php:
|
915 |
msgid "Some optimized image file(s) has expired and was cleared."
|
916 |
msgstr ""
|
917 |
|
918 |
-
#: src/img-optm.cls.php:
|
919 |
msgid "One or more pulled images does not match with the notified image md5"
|
920 |
msgstr ""
|
921 |
|
922 |
-
#: src/img-optm.cls.php:
|
923 |
msgid "Optimized WebP file expired and was cleared."
|
924 |
msgstr ""
|
925 |
|
926 |
-
#: src/img-optm.cls.php:
|
927 |
msgid "Pulled WebP image md5 does not match the notified WebP image md5."
|
928 |
msgstr ""
|
929 |
|
930 |
-
#: src/img-optm.cls.php:
|
931 |
msgid "Pulled %d image(s)"
|
932 |
msgstr ""
|
933 |
|
934 |
-
#: src/img-optm.cls.php:
|
935 |
msgid "Cleaned up unfinished data successfully."
|
936 |
msgstr ""
|
937 |
|
938 |
-
#: src/img-optm.cls.php:
|
939 |
msgid "Destroy all optimization data successfully."
|
940 |
msgstr ""
|
941 |
|
942 |
-
#: src/img-optm.cls.php:
|
943 |
msgid "Rescanned successfully."
|
944 |
msgstr ""
|
945 |
|
946 |
-
#: src/img-optm.cls.php:
|
947 |
msgid "Rescanned %d images successfully."
|
948 |
msgstr ""
|
949 |
|
950 |
-
#: src/img-optm.cls.php:
|
951 |
msgid "Calculated backups successfully."
|
952 |
msgstr ""
|
953 |
|
954 |
-
#: src/img-optm.cls.php:
|
955 |
msgid "Removed backups successfully."
|
956 |
msgstr ""
|
957 |
|
958 |
-
#: src/img-optm.cls.php:
|
959 |
msgid "Switched images successfully."
|
960 |
msgstr ""
|
961 |
|
962 |
-
#: src/img-optm.cls.php:
|
963 |
msgid "Disabled WebP file successfully."
|
964 |
msgstr ""
|
965 |
|
966 |
-
#: src/img-optm.cls.php:
|
967 |
msgid "Enabled WebP file successfully."
|
968 |
msgstr ""
|
969 |
|
970 |
-
#: src/img-optm.cls.php:
|
971 |
msgid "Restored original file successfully."
|
972 |
msgstr ""
|
973 |
|
974 |
-
#: src/img-optm.cls.php:
|
975 |
msgid "Switched to optimized file successfully."
|
976 |
msgstr ""
|
977 |
|
978 |
-
#: src/img-optm.cls.php:
|
979 |
msgid "Reset the optimized data successfully."
|
980 |
msgstr ""
|
981 |
|
@@ -995,11 +1004,11 @@ msgstr ""
|
|
995 |
msgid "Images not requested"
|
996 |
msgstr ""
|
997 |
|
998 |
-
#: src/lang.cls.php:24 tpl/dash/dashboard.tpl.php:
|
999 |
msgid "Images requested"
|
1000 |
msgstr ""
|
1001 |
|
1002 |
-
#: src/lang.cls.php:25 tpl/dash/dashboard.tpl.php:
|
1003 |
msgid "Images notified to pull"
|
1004 |
msgstr ""
|
1005 |
|
@@ -1070,7 +1079,7 @@ msgstr ""
|
|
1070 |
msgid "Enable Cache"
|
1071 |
msgstr ""
|
1072 |
|
1073 |
-
#: src/lang.cls.php:91 tpl/dash/dashboard.tpl.php:
|
1074 |
#: tpl/presets/standard.tpl.php:12
|
1075 |
msgid "Browser Cache"
|
1076 |
msgstr ""
|
@@ -1368,7 +1377,7 @@ msgid "Separate CCSS Cache URIs"
|
|
1368 |
msgstr ""
|
1369 |
|
1370 |
#: src/lang.cls.php:169
|
1371 |
-
msgid "JS Deferred Excludes"
|
1372 |
msgstr ""
|
1373 |
|
1374 |
#: src/lang.cls.php:170
|
@@ -1541,7 +1550,7 @@ msgid "ESI Nonces"
|
|
1541 |
msgstr ""
|
1542 |
|
1543 |
#: src/lang.cls.php:217 tpl/page_optm/settings_css.tpl.php:112
|
1544 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
1545 |
msgid "Vary Group"
|
1546 |
msgstr ""
|
1547 |
|
@@ -1846,6 +1855,15 @@ msgstr ""
|
|
1846 |
msgid "LiteSpeed Options"
|
1847 |
msgstr ""
|
1848 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1849 |
#: src/placeholder.cls.php:80 tpl/dash/network_dash.tpl.php:30
|
1850 |
msgid "LQIP"
|
1851 |
msgstr ""
|
@@ -1927,7 +1945,7 @@ msgid "Purge url %s"
|
|
1927 |
msgstr ""
|
1928 |
|
1929 |
#: src/root.cls.php:185
|
1930 |
-
msgid "
|
1931 |
msgstr ""
|
1932 |
|
1933 |
#: src/task.cls.php:122
|
@@ -2046,7 +2064,7 @@ msgstr ""
|
|
2046 |
msgid "Dismiss this notice"
|
2047 |
msgstr ""
|
2048 |
|
2049 |
-
#. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 5.3) #-#-#-#-#
|
2050 |
#. Plugin Name of the plugin/theme
|
2051 |
#: tpl/banner/new_version.php:57 tpl/banner/new_version_dev.tpl.php:12
|
2052 |
#: tpl/cache/more_settings_tip.tpl.php:15 tpl/inc/admin_footer.php:8
|
@@ -2062,7 +2080,7 @@ msgid "New release %s is available now."
|
|
2062 |
msgstr ""
|
2063 |
|
2064 |
#: tpl/banner/new_version.php:69 tpl/banner/new_version_dev.tpl.php:24
|
2065 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
2066 |
msgid "Upgrade"
|
2067 |
msgstr ""
|
2068 |
|
@@ -2086,26 +2104,26 @@ msgstr ""
|
|
2086 |
msgid "Thank You for Using the LiteSpeed Cache Plugin!"
|
2087 |
msgstr ""
|
2088 |
|
2089 |
-
#: tpl/banner/score.php:28 tpl/dash/dashboard.tpl.php:
|
2090 |
msgid "Page Load Time"
|
2091 |
msgstr ""
|
2092 |
|
2093 |
#: tpl/banner/score.php:34 tpl/banner/score.php:74
|
2094 |
-
#: tpl/dash/dashboard.tpl.php:
|
2095 |
msgid "Before"
|
2096 |
msgstr ""
|
2097 |
|
2098 |
#: tpl/banner/score.php:45 tpl/banner/score.php:84
|
2099 |
-
#: tpl/dash/dashboard.tpl.php:
|
2100 |
msgid "After"
|
2101 |
msgstr ""
|
2102 |
|
2103 |
#: tpl/banner/score.php:55 tpl/banner/score.php:94
|
2104 |
-
#: tpl/dash/dashboard.tpl.php:
|
2105 |
msgid "Improved by"
|
2106 |
msgstr ""
|
2107 |
|
2108 |
-
#: tpl/banner/score.php:68 tpl/dash/dashboard.tpl.php:
|
2109 |
msgid "PageSpeed Score"
|
2110 |
msgstr ""
|
2111 |
|
@@ -2369,7 +2387,7 @@ msgstr ""
|
|
2369 |
#: tpl/cache/settings-esi.tpl.php:35 tpl/cdn/manage.tpl.php:21
|
2370 |
#: tpl/crawler/summary.tpl.php:48 tpl/inc/check_cache_disabled.php:31
|
2371 |
#: tpl/inc/check_if_network_disable_all.php:18
|
2372 |
-
#: tpl/page_optm/settings_css.tpl.php:61 tpl/page_optm/settings_css.tpl.php:
|
2373 |
#: tpl/page_optm/settings_localization.tpl.php:11
|
2374 |
msgid "WARNING"
|
2375 |
msgstr ""
|
@@ -2409,6 +2427,7 @@ msgstr ""
|
|
2409 |
#: tpl/page_optm/settings_tuning.tpl.php:36
|
2410 |
#: tpl/page_optm/settings_tuning.tpl.php:57
|
2411 |
#: tpl/page_optm/settings_tuning.tpl.php:78
|
|
|
2412 |
#: tpl/page_optm/settings_tuning_css.tpl.php:25
|
2413 |
#: tpl/page_optm/settings_tuning_css.tpl.php:85
|
2414 |
msgid "Filter %s is supported."
|
@@ -3485,7 +3504,7 @@ msgstr ""
|
|
3485 |
msgid "Sitemap Total"
|
3486 |
msgstr ""
|
3487 |
|
3488 |
-
#: tpl/crawler/map.tpl.php:44 tpl/dash/dashboard.tpl.php:
|
3489 |
msgid "Crawler Status"
|
3490 |
msgstr ""
|
3491 |
|
@@ -3658,15 +3677,15 @@ msgstr ""
|
|
3658 |
msgid "Run time for previous crawler"
|
3659 |
msgstr ""
|
3660 |
|
3661 |
-
#: tpl/crawler/summary.tpl.php:85 tpl/dash/dashboard.tpl.php:
|
3662 |
msgid "Current crawler started at"
|
3663 |
msgstr ""
|
3664 |
|
3665 |
-
#: tpl/crawler/summary.tpl.php:92 tpl/dash/dashboard.tpl.php:
|
3666 |
msgid "Last interval"
|
3667 |
msgstr ""
|
3668 |
|
3669 |
-
#: tpl/crawler/summary.tpl.php:99 tpl/dash/dashboard.tpl.php:
|
3670 |
msgid "Ended reason"
|
3671 |
msgstr ""
|
3672 |
|
@@ -3770,159 +3789,163 @@ msgstr ""
|
|
3770 |
msgid "CDN Bandwidth"
|
3771 |
msgstr ""
|
3772 |
|
3773 |
-
#: tpl/dash/dashboard.tpl.php:59 tpl/dash/dashboard.tpl.php:
|
3774 |
msgid "Low Quality Image Placeholder"
|
3775 |
msgstr ""
|
3776 |
|
3777 |
-
#: tpl/dash/dashboard.tpl.php:
|
3778 |
msgid "Fast Queue Usage"
|
3779 |
msgstr ""
|
3780 |
|
3781 |
-
#: tpl/dash/dashboard.tpl.php:
|
3782 |
msgid "Usage"
|
3783 |
msgstr ""
|
3784 |
|
3785 |
-
#: tpl/dash/dashboard.tpl.php:
|
3786 |
msgid "PAYG Balance"
|
3787 |
msgstr ""
|
3788 |
|
3789 |
-
#: tpl/dash/dashboard.tpl.php:
|
3790 |
-
msgid "
|
|
|
|
|
|
|
|
|
3791 |
msgstr ""
|
3792 |
|
3793 |
-
#: tpl/dash/dashboard.tpl.php:
|
3794 |
msgid "Pay as You Go Usage Statistics"
|
3795 |
msgstr ""
|
3796 |
|
3797 |
-
#: tpl/dash/dashboard.tpl.php:
|
3798 |
msgid "Total Usage"
|
3799 |
msgstr ""
|
3800 |
|
3801 |
-
#: tpl/dash/dashboard.tpl.php:
|
3802 |
msgid "Total images optimized in this month"
|
3803 |
msgstr ""
|
3804 |
|
3805 |
-
#: tpl/dash/dashboard.tpl.php:
|
3806 |
msgid "Remaining Daily Quota"
|
3807 |
msgstr ""
|
3808 |
|
3809 |
-
#: tpl/dash/dashboard.tpl.php:
|
3810 |
msgid "Partner Benefits Provided by"
|
3811 |
msgstr ""
|
3812 |
|
3813 |
-
#: tpl/dash/dashboard.tpl.php:
|
3814 |
msgid "Go to QUIC.cloud dashboard"
|
3815 |
msgstr ""
|
3816 |
|
3817 |
-
#: tpl/dash/dashboard.tpl.php:
|
3818 |
msgid "Refresh page load time"
|
3819 |
msgstr ""
|
3820 |
|
3821 |
-
#: tpl/dash/dashboard.tpl.php:
|
3822 |
-
#: tpl/dash/dashboard.tpl.php:
|
3823 |
-
#: tpl/dash/dashboard.tpl.php:
|
3824 |
msgid "Last requested"
|
3825 |
msgstr ""
|
3826 |
|
3827 |
-
#: tpl/dash/dashboard.tpl.php:
|
3828 |
msgid "Current closest Cloud server is %s. Click to redetect."
|
3829 |
msgstr ""
|
3830 |
|
3831 |
-
#: tpl/dash/dashboard.tpl.php:
|
3832 |
-
#: tpl/page_optm/settings_css.tpl.php:93 tpl/page_optm/settings_css.tpl.php:
|
3833 |
#: tpl/page_optm/settings_media.tpl.php:176
|
3834 |
#: tpl/page_optm/settings_vpi.tpl.php:48
|
3835 |
msgid ""
|
3836 |
"Are you sure you want to redetect the closest cloud server for this service?"
|
3837 |
msgstr ""
|
3838 |
|
3839 |
-
#: tpl/dash/dashboard.tpl.php:
|
3840 |
msgid "Refresh page score"
|
3841 |
msgstr ""
|
3842 |
|
3843 |
-
#: tpl/dash/dashboard.tpl.php:
|
3844 |
msgid "Image Optimization Summary"
|
3845 |
msgstr ""
|
3846 |
|
3847 |
-
#: tpl/dash/dashboard.tpl.php:
|
3848 |
-
#: tpl/dash/dashboard.tpl.php:
|
3849 |
-
#: tpl/dash/dashboard.tpl.php:
|
3850 |
-
#: tpl/dash/dashboard.tpl.php:
|
3851 |
msgid "More"
|
3852 |
msgstr ""
|
3853 |
|
3854 |
-
#: tpl/dash/dashboard.tpl.php:
|
3855 |
msgid "Image Groups Prepared"
|
3856 |
msgstr ""
|
3857 |
|
3858 |
-
#: tpl/dash/dashboard.tpl.php:
|
3859 |
msgid "Images Requested"
|
3860 |
msgstr ""
|
3861 |
|
3862 |
-
#: tpl/dash/dashboard.tpl.php:
|
3863 |
msgid "Last Request"
|
3864 |
msgstr ""
|
3865 |
|
3866 |
-
#: tpl/dash/dashboard.tpl.php:
|
3867 |
msgid "Last Pull"
|
3868 |
msgstr ""
|
3869 |
|
3870 |
-
#: tpl/dash/dashboard.tpl.php:
|
3871 |
msgid "Cache Status"
|
3872 |
msgstr ""
|
3873 |
|
3874 |
-
#: tpl/dash/dashboard.tpl.php:
|
3875 |
msgid "Public Cache"
|
3876 |
msgstr ""
|
3877 |
|
3878 |
-
#: tpl/dash/dashboard.tpl.php:
|
3879 |
msgid "Private Cache"
|
3880 |
msgstr ""
|
3881 |
|
3882 |
-
#: tpl/dash/dashboard.tpl.php:
|
3883 |
msgid "Critical CSS"
|
3884 |
msgstr ""
|
3885 |
|
3886 |
-
#: tpl/dash/dashboard.tpl.php:
|
3887 |
-
#: tpl/dash/dashboard.tpl.php:
|
3888 |
-
#: tpl/page_optm/settings_css.tpl.php:84 tpl/page_optm/settings_css.tpl.php:
|
3889 |
#: tpl/page_optm/settings_media.tpl.php:170
|
3890 |
#: tpl/page_optm/settings_vpi.tpl.php:42
|
3891 |
msgid "Last generated"
|
3892 |
msgstr ""
|
3893 |
|
3894 |
-
#: tpl/dash/dashboard.tpl.php:
|
3895 |
-
#: tpl/dash/dashboard.tpl.php:
|
3896 |
msgid "Time to execute previous request"
|
3897 |
msgstr ""
|
3898 |
|
3899 |
-
#: tpl/dash/dashboard.tpl.php:
|
3900 |
-
#: tpl/dash/dashboard.tpl.php:
|
3901 |
msgid "Requests in queue"
|
3902 |
msgstr ""
|
3903 |
|
3904 |
-
#: tpl/dash/dashboard.tpl.php:
|
3905 |
-
#: tpl/dash/dashboard.tpl.php:
|
3906 |
msgid "Force cron"
|
3907 |
msgstr ""
|
3908 |
|
3909 |
-
#: tpl/dash/dashboard.tpl.php:
|
3910 |
msgid "Unique CSS"
|
3911 |
msgstr ""
|
3912 |
|
3913 |
-
#: tpl/dash/dashboard.tpl.php:
|
3914 |
msgid "Viewport Image"
|
3915 |
msgstr ""
|
3916 |
|
3917 |
-
#: tpl/dash/dashboard.tpl.php:
|
3918 |
msgid "Crawler(s)"
|
3919 |
msgstr ""
|
3920 |
|
3921 |
-
#: tpl/dash/dashboard.tpl.php:
|
3922 |
msgid "Currently active crawler"
|
3923 |
msgstr ""
|
3924 |
|
3925 |
-
#: tpl/dash/dashboard.tpl.php:
|
3926 |
msgid "<b>Last crawled:</b> %d item(s)"
|
3927 |
msgstr ""
|
3928 |
|
@@ -3946,6 +3969,10 @@ msgstr ""
|
|
3946 |
msgid "Pay as You Go"
|
3947 |
msgstr ""
|
3948 |
|
|
|
|
|
|
|
|
|
3949 |
#: tpl/db_optm/entry.tpl.php:10 tpl/db_optm/settings.tpl.php:10
|
3950 |
msgid "DB Optimization Settings"
|
3951 |
msgstr ""
|
@@ -4169,7 +4196,7 @@ msgstr ""
|
|
4169 |
#: tpl/general/settings.tpl.php:83 tpl/general/settings.tpl.php:94
|
4170 |
#: tpl/general/settings.tpl.php:106 tpl/general/settings.tpl.php:183
|
4171 |
#: tpl/general/settings.tpl.php:189 tpl/general/settings.tpl.php:195
|
4172 |
-
#: tpl/general/settings.tpl.php:212 tpl/page_optm/settings_media.tpl.php:
|
4173 |
#: tpl/page_optm/settings_vpi.tpl.php:32
|
4174 |
msgid "Notice"
|
4175 |
msgstr ""
|
@@ -4264,7 +4291,7 @@ msgstr ""
|
|
4264 |
msgid "Your %1s quota on %2s will still be in use."
|
4265 |
msgstr ""
|
4266 |
|
4267 |
-
#: tpl/general/settings.tpl.php:183 tpl/page_optm/settings_media.tpl.php:
|
4268 |
#: tpl/page_optm/settings_vpi.tpl.php:32
|
4269 |
msgid "%s must be turned ON for this setting to work."
|
4270 |
msgstr ""
|
@@ -4438,7 +4465,7 @@ msgid "The image compression quality setting of WordPress out of 100."
|
|
4438 |
msgstr ""
|
4439 |
|
4440 |
#: tpl/img_optm/summary.tpl.php:57 tpl/page_optm/settings_css.tpl.php:93
|
4441 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4442 |
#: tpl/page_optm/settings_media.tpl.php:176
|
4443 |
#: tpl/page_optm/settings_vpi.tpl.php:48
|
4444 |
msgid "Current closest Cloud server is %s. Click to redetect."
|
@@ -4856,100 +4883,100 @@ msgstr ""
|
|
4856 |
msgid "This option is bypassed because %1$s option is %2$s."
|
4857 |
msgstr ""
|
4858 |
|
4859 |
-
#: tpl/page_optm/settings_css.tpl.php:87 tpl/page_optm/settings_css.tpl.php:
|
4860 |
msgid "Last requested cost"
|
4861 |
msgstr ""
|
4862 |
|
4863 |
-
#: tpl/page_optm/settings_css.tpl.php:99 tpl/page_optm/settings_css.tpl.php:
|
4864 |
#: tpl/page_optm/settings_vpi.tpl.php:54
|
4865 |
msgid "URL list in %s queue waiting for cron"
|
4866 |
msgstr ""
|
4867 |
|
4868 |
#: tpl/page_optm/settings_css.tpl.php:120
|
4869 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4870 |
msgid "Run %s Queue Manually"
|
4871 |
msgstr ""
|
4872 |
|
4873 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4874 |
msgid ""
|
4875 |
"Inline UCSS to reduce the extra CSS file loading. This option will not be "
|
4876 |
"automatically turned on for %1$s pages. To use it on %1$s pages, please set "
|
4877 |
"it to ON."
|
4878 |
msgstr ""
|
4879 |
|
4880 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4881 |
msgid "This option will automatically bypass %s option."
|
4882 |
msgstr ""
|
4883 |
|
4884 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4885 |
msgid ""
|
4886 |
"Include external CSS and inline CSS in combined file when %1$s is also "
|
4887 |
"enabled. This option helps maintain the priorities of CSS, which should "
|
4888 |
"minimize potential errors caused by CSS Combine."
|
4889 |
msgstr ""
|
4890 |
|
4891 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4892 |
msgid "Optimize CSS delivery."
|
4893 |
msgstr ""
|
4894 |
|
4895 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4896 |
#: tpl/page_optm/settings_html.tpl.php:129 tpl/page_optm/settings_js.tpl.php:67
|
4897 |
msgid ""
|
4898 |
"This can improve your speed score in services like Pingdom, GTmetrix and "
|
4899 |
"PageSpeed."
|
4900 |
msgstr ""
|
4901 |
|
4902 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4903 |
msgid ""
|
4904 |
"Use QUIC.cloud online service to generate critical CSS and load remaining "
|
4905 |
"CSS asynchronously."
|
4906 |
msgstr ""
|
4907 |
|
4908 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4909 |
msgid ""
|
4910 |
"Automatic generation of critical CSS is in the background via a cron-based "
|
4911 |
"queue."
|
4912 |
msgstr ""
|
4913 |
|
4914 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4915 |
msgid ""
|
4916 |
"When this option is turned %s, it will also load Google Fonts asynchronously."
|
4917 |
msgstr ""
|
4918 |
|
4919 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4920 |
msgid "Elements with attribute %s in HTML code will be excluded."
|
4921 |
msgstr ""
|
4922 |
|
4923 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4924 |
msgid "This option is bypassed due to %s option."
|
4925 |
msgstr ""
|
4926 |
|
4927 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4928 |
msgid ""
|
4929 |
"Disable this option to generate CCSS per Post Type instead of per page. This "
|
4930 |
"can save significant CCSS quota, however it may result in incorrect CSS "
|
4931 |
"styling if your site uses a page builder."
|
4932 |
msgstr ""
|
4933 |
|
4934 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4935 |
msgid "This will inline the asynchronous CSS library to avoid render blocking."
|
4936 |
msgstr ""
|
4937 |
|
4938 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4939 |
msgid "Default"
|
4940 |
msgstr ""
|
4941 |
|
4942 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4943 |
msgid ""
|
4944 |
"Set this to append %1$s to all %2$s rules before caching CSS to specify how "
|
4945 |
"fonts should be displayed while being downloaded."
|
4946 |
msgstr ""
|
4947 |
|
4948 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4949 |
msgid "%s is recommended."
|
4950 |
msgstr ""
|
4951 |
|
4952 |
-
#: tpl/page_optm/settings_css.tpl.php:
|
4953 |
msgid "Swap"
|
4954 |
msgstr ""
|
4955 |
|
@@ -5119,7 +5146,7 @@ msgid ""
|
|
5119 |
msgstr ""
|
5120 |
|
5121 |
#: tpl/page_optm/settings_localization.tpl.php:127
|
5122 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5123 |
msgid "Example"
|
5124 |
msgstr ""
|
5125 |
|
@@ -5134,7 +5161,7 @@ msgid "Load images only when they enter the viewport."
|
|
5134 |
msgstr ""
|
5135 |
|
5136 |
#: tpl/page_optm/settings_media.tpl.php:28
|
5137 |
-
#: tpl/page_optm/settings_media.tpl.php:
|
5138 |
msgid "This can improve page loading time by reducing initial HTTP requests."
|
5139 |
msgstr ""
|
5140 |
|
@@ -5249,17 +5276,17 @@ msgstr ""
|
|
5249 |
msgid "Size list in queue waiting for cron"
|
5250 |
msgstr ""
|
5251 |
|
5252 |
-
#: tpl/page_optm/settings_media.tpl.php:
|
5253 |
msgid "Load iframes only when they enter the viewport."
|
5254 |
msgstr ""
|
5255 |
|
5256 |
-
#: tpl/page_optm/settings_media.tpl.php:
|
5257 |
msgid ""
|
5258 |
"Set an explicit width and height on image elements to reduce layout shifts "
|
5259 |
"and improve CLS (a Core Web Vitals metric)."
|
5260 |
msgstr ""
|
5261 |
|
5262 |
-
#: tpl/page_optm/settings_media.tpl.php:
|
5263 |
msgid "Use %1$s to bypass remote image dimension check when %2$s is ON."
|
5264 |
msgstr ""
|
5265 |
|
@@ -5316,7 +5343,7 @@ msgid "Predefined list will also be combined w/ the above settings"
|
|
5316 |
msgstr ""
|
5317 |
|
5318 |
#: tpl/page_optm/settings_tuning.tpl.php:52
|
5319 |
-
msgid "Listed JS files or inline JS code will not be deferred."
|
5320 |
msgstr ""
|
5321 |
|
5322 |
#: tpl/page_optm/settings_tuning.tpl.php:73
|
@@ -5327,13 +5354,13 @@ msgstr ""
|
|
5327 |
msgid "Prevent any optimization of listed pages."
|
5328 |
msgstr ""
|
5329 |
|
5330 |
-
#: tpl/page_optm/settings_tuning.tpl.php:
|
5331 |
msgid ""
|
5332 |
"Only optimize pages for guest (not logged in) visitors. If turned this OFF, "
|
5333 |
"CSS/JS/CCSS files will be doubled by each user group."
|
5334 |
msgstr ""
|
5335 |
|
5336 |
-
#: tpl/page_optm/settings_tuning.tpl.php:
|
5337 |
msgid "Selected roles will be excluded from all optimizations."
|
5338 |
msgstr ""
|
5339 |
|
@@ -5417,7 +5444,7 @@ msgid ""
|
|
5417 |
"without delay."
|
5418 |
msgstr ""
|
5419 |
|
5420 |
-
#: tpl/page_optm/settings_vpi.tpl.php:
|
5421 |
msgid "Enable Viewport Images auto generation cron."
|
5422 |
msgstr ""
|
5423 |
|
@@ -5653,54 +5680,54 @@ msgstr ""
|
|
5653 |
msgid "Restore Settings"
|
5654 |
msgstr ""
|
5655 |
|
5656 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5657 |
msgid "Try GitHub Version"
|
5658 |
msgstr ""
|
5659 |
|
5660 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5661 |
msgid ""
|
5662 |
"Use this section to switch plugin versions. To beta test a GitHub commit, "
|
5663 |
"enter the commit URL in the field below."
|
5664 |
msgstr ""
|
5665 |
|
5666 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5667 |
msgid "Use latest GitHub Dev commit"
|
5668 |
msgstr ""
|
5669 |
|
5670 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5671 |
msgid "Use latest GitHub Master commit"
|
5672 |
msgstr ""
|
5673 |
|
5674 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5675 |
msgid "Use latest WordPress release version"
|
5676 |
msgstr ""
|
5677 |
|
5678 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5679 |
msgid "OR"
|
5680 |
msgstr ""
|
5681 |
|
5682 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5683 |
msgid ""
|
5684 |
"Downgrade not recommended. May cause fatal error due to refactored code."
|
5685 |
msgstr ""
|
5686 |
|
5687 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5688 |
msgid ""
|
5689 |
"Press the %s button to use the most recent GitHub commit. Master is for "
|
5690 |
"release candidate & Dev is for experimental testing."
|
5691 |
msgstr ""
|
5692 |
|
5693 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5694 |
msgid "Use latest GitHub Dev/Master commit"
|
5695 |
msgstr ""
|
5696 |
|
5697 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5698 |
msgid ""
|
5699 |
"Press the %s button to stop beta testing and go back to the current release "
|
5700 |
"from the WordPress Plugin Directory."
|
5701 |
msgstr ""
|
5702 |
|
5703 |
-
#: tpl/toolbox/beta_test.tpl.php:
|
5704 |
msgid ""
|
5705 |
"In order to avoid an upgrade error, you must be using %1$s or later before "
|
5706 |
"you can upgrade to %2$s versions."
|
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.3.1\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
|
7 |
+
"POT-Creation-Date: 2022-12-03 01:59:59+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
111 |
#: src/admin-display.cls.php:929 src/admin-display.cls.php:980
|
112 |
#: tpl/cache/settings-cache.tpl.php:19
|
113 |
#: tpl/cache/settings_inc.cache_mobile.tpl.php:71 tpl/cdn/settings.tpl.php:49
|
114 |
+
#: tpl/page_optm/settings_css.tpl.php:177
|
115 |
#: tpl/page_optm/settings_media.tpl.php:159
|
116 |
#: tpl/toolbox/settings-debug.tpl.php:46
|
117 |
msgid "ON"
|
204 |
msgstr ""
|
205 |
|
206 |
#: src/admin-display.cls.php:1180 tpl/cache/settings-esi.tpl.php:95
|
207 |
+
#: tpl/page_optm/settings_css.tpl.php:179
|
208 |
#: tpl/page_optm/settings_html.tpl.php:85
|
209 |
+
#: tpl/page_optm/settings_media.tpl.php:236
|
210 |
#: tpl/page_optm/settings_media_exc.tpl.php:26
|
211 |
#: tpl/page_optm/settings_tuning.tpl.php:35
|
212 |
#: tpl/page_optm/settings_tuning.tpl.php:56
|
213 |
#: tpl/page_optm/settings_tuning.tpl.php:77
|
214 |
+
#: tpl/page_optm/settings_tuning.tpl.php:96
|
215 |
#: tpl/page_optm/settings_tuning_css.tpl.php:24
|
216 |
#: tpl/page_optm/settings_tuning_css.tpl.php:84
|
217 |
#: tpl/toolbox/edit_htaccess.tpl.php:54 tpl/toolbox/edit_htaccess.tpl.php:71
|
325 |
"that the account still exists and must be deleted separately."
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: src/cdn-setup.cls.php:322 src/cloud.cls.php:781 src/cloud.cls.php:789
|
329 |
+
#: src/cloud.cls.php:1179
|
330 |
msgid "Message from QUIC.cloud server"
|
331 |
msgstr ""
|
332 |
|
333 |
#: src/cloud.cls.php:379 src/cloud.cls.php:392 src/cloud.cls.php:437
|
334 |
+
#: src/cloud.cls.php:462 src/cloud.cls.php:608 src/cloud.cls.php:1148
|
335 |
msgid "Cloud Error"
|
336 |
msgstr ""
|
337 |
|
343 |
msgid "No available Cloud Node after checked server load."
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: src/cloud.cls.php:566
|
347 |
+
msgid "In order to use QC services, need a real domain name, cannot use an IP."
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: src/cloud.cls.php:608
|
351 |
msgid "Please try after %1$s for service %2$s."
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: src/cloud.cls.php:695 src/cloud.cls.php:716
|
355 |
msgid "Failed to request via WordPress"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: src/cloud.cls.php:736
|
359 |
msgid "Redetected node"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: src/cloud.cls.php:744
|
363 |
msgid ""
|
364 |
"We are working hard to improve your online service experience. The service "
|
365 |
"will be unavailable while we work. We apologize for any inconvenience."
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: src/cloud.cls.php:797
|
369 |
msgid "Good news from QUIC.cloud server"
|
370 |
msgstr ""
|
371 |
|
372 |
+
#: src/cloud.cls.php:806
|
373 |
msgid "%1$s plugin version %2$s required for this action."
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: src/cloud.cls.php:863 src/cloud.cls.php:1168
|
377 |
msgid "Failed to communicate with QUIC.cloud server"
|
378 |
msgstr ""
|
379 |
|
380 |
+
#: src/cloud.cls.php:905
|
381 |
msgid ""
|
382 |
"Site not recognized. Domain Key has been automatically removed. Please "
|
383 |
"request a new one."
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: src/cloud.cls.php:906 src/error.cls.php:48
|
387 |
msgid "Click here to set."
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: src/cloud.cls.php:971
|
391 |
msgid "Cannot request REST API, no token saved."
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: src/cloud.cls.php:997
|
395 |
msgid "Cloud REST Error"
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: src/cloud.cls.php:1015
|
399 |
msgid "Cloud REST API returned error: "
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: src/cloud.cls.php:1187
|
403 |
msgid ""
|
404 |
"Applied for Domain Key successfully. Please wait for result. Domain Key will "
|
405 |
"be automatically sent to your WordPress."
|
406 |
msgstr ""
|
407 |
|
408 |
+
#: src/cloud.cls.php:1241
|
409 |
msgid ""
|
410 |
"Congratulations, your Domain Key has been approved! The setting has been "
|
411 |
"updated accordingly."
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: src/cloud.cls.php:1325
|
415 |
msgid "Domain Key hash mismatch"
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: src/cloud.cls.php:1447
|
419 |
msgid "Sync credit allowance with Cloud Server successfully."
|
420 |
msgstr ""
|
421 |
|
423 |
msgid "Changed setting successfully."
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: src/core.cls.php:331
|
427 |
msgid "Notified LiteSpeed Web Server to purge everything."
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: src/core.cls.php:336
|
431 |
msgid "Notified LiteSpeed Web Server to purge the list."
|
432 |
msgstr ""
|
433 |
|
581 |
msgid "Current Online Server IPs"
|
582 |
msgstr ""
|
583 |
|
584 |
+
#: src/doc.cls.php:131
|
585 |
+
msgid "The queue is processed asynchronously. It may take time."
|
586 |
+
msgstr ""
|
587 |
+
|
588 |
#: src/error.cls.php:42
|
589 |
msgid "The setting %s is currently enabled."
|
590 |
msgstr ""
|
813 |
msgstr ""
|
814 |
|
815 |
#: src/gui.cls.php:497 src/gui.cls.php:657 src/lang.cls.php:114
|
816 |
+
#: tpl/dash/dashboard.tpl.php:422 tpl/toolbox/purge.tpl.php:52
|
817 |
msgid "Object Cache"
|
818 |
msgstr ""
|
819 |
|
888 |
"%2$s"
|
889 |
msgstr ""
|
890 |
|
891 |
+
#: src/img-optm.cls.php:144
|
892 |
msgid "No new image gathered."
|
893 |
msgstr ""
|
894 |
|
895 |
+
#: src/img-optm.cls.php:179
|
896 |
msgid "Gathered %d images successfully."
|
897 |
msgstr ""
|
898 |
|
899 |
+
#: src/img-optm.cls.php:471
|
900 |
msgid "Pushed %1$s to Cloud server, accepted %2$s."
|
901 |
msgstr ""
|
902 |
|
903 |
+
#: src/img-optm.cls.php:508
|
904 |
msgid "Bypassed %1$s duplicated images."
|
905 |
msgstr ""
|
906 |
|
907 |
+
#: src/img-optm.cls.php:546
|
908 |
msgid "Cleared %1$s invalid images."
|
909 |
msgstr ""
|
910 |
|
911 |
+
#: src/img-optm.cls.php:624
|
912 |
msgid "No valid image found in the current request."
|
913 |
msgstr ""
|
914 |
|
915 |
+
#: src/img-optm.cls.php:647
|
916 |
msgid "No valid image found by Cloud server in the current request."
|
917 |
msgstr ""
|
918 |
|
919 |
+
#: src/img-optm.cls.php:886
|
920 |
msgid "Pull Cron is running"
|
921 |
msgstr ""
|
922 |
|
923 |
+
#: src/img-optm.cls.php:945
|
924 |
msgid "Some optimized image file(s) has expired and was cleared."
|
925 |
msgstr ""
|
926 |
|
927 |
+
#: src/img-optm.cls.php:962
|
928 |
msgid "One or more pulled images does not match with the notified image md5"
|
929 |
msgstr ""
|
930 |
|
931 |
+
#: src/img-optm.cls.php:1006
|
932 |
msgid "Optimized WebP file expired and was cleared."
|
933 |
msgstr ""
|
934 |
|
935 |
+
#: src/img-optm.cls.php:1023
|
936 |
msgid "Pulled WebP image md5 does not match the notified WebP image md5."
|
937 |
msgstr ""
|
938 |
|
939 |
+
#: src/img-optm.cls.php:1083
|
940 |
msgid "Pulled %d image(s)"
|
941 |
msgstr ""
|
942 |
|
943 |
+
#: src/img-optm.cls.php:1170
|
944 |
msgid "Cleaned up unfinished data successfully."
|
945 |
msgstr ""
|
946 |
|
947 |
+
#: src/img-optm.cls.php:1241
|
948 |
msgid "Destroy all optimization data successfully."
|
949 |
msgstr ""
|
950 |
|
951 |
+
#: src/img-optm.cls.php:1273 src/img-optm.cls.php:1338
|
952 |
msgid "Rescanned successfully."
|
953 |
msgstr ""
|
954 |
|
955 |
+
#: src/img-optm.cls.php:1338
|
956 |
msgid "Rescanned %d images successfully."
|
957 |
msgstr ""
|
958 |
|
959 |
+
#: src/img-optm.cls.php:1397
|
960 |
msgid "Calculated backups successfully."
|
961 |
msgstr ""
|
962 |
|
963 |
+
#: src/img-optm.cls.php:1459
|
964 |
msgid "Removed backups successfully."
|
965 |
msgstr ""
|
966 |
|
967 |
+
#: src/img-optm.cls.php:1631
|
968 |
msgid "Switched images successfully."
|
969 |
msgstr ""
|
970 |
|
971 |
+
#: src/img-optm.cls.php:1659
|
972 |
msgid "Disabled WebP file successfully."
|
973 |
msgstr ""
|
974 |
|
975 |
+
#: src/img-optm.cls.php:1665
|
976 |
msgid "Enabled WebP file successfully."
|
977 |
msgstr ""
|
978 |
|
979 |
+
#: src/img-optm.cls.php:1681
|
980 |
msgid "Restored original file successfully."
|
981 |
msgstr ""
|
982 |
|
983 |
+
#: src/img-optm.cls.php:1688
|
984 |
msgid "Switched to optimized file successfully."
|
985 |
msgstr ""
|
986 |
|
987 |
+
#: src/img-optm.cls.php:1751
|
988 |
msgid "Reset the optimized data successfully."
|
989 |
msgstr ""
|
990 |
|
1004 |
msgid "Images not requested"
|
1005 |
msgstr ""
|
1006 |
|
1007 |
+
#: src/lang.cls.php:24 tpl/dash/dashboard.tpl.php:363
|
1008 |
msgid "Images requested"
|
1009 |
msgstr ""
|
1010 |
|
1011 |
+
#: src/lang.cls.php:25 tpl/dash/dashboard.tpl.php:373
|
1012 |
msgid "Images notified to pull"
|
1013 |
msgstr ""
|
1014 |
|
1079 |
msgid "Enable Cache"
|
1080 |
msgstr ""
|
1081 |
|
1082 |
+
#: src/lang.cls.php:91 tpl/dash/dashboard.tpl.php:423
|
1083 |
#: tpl/presets/standard.tpl.php:12
|
1084 |
msgid "Browser Cache"
|
1085 |
msgstr ""
|
1377 |
msgstr ""
|
1378 |
|
1379 |
#: src/lang.cls.php:169
|
1380 |
+
msgid "JS Deferred / Delayed Excludes"
|
1381 |
msgstr ""
|
1382 |
|
1383 |
#: src/lang.cls.php:170
|
1550 |
msgstr ""
|
1551 |
|
1552 |
#: src/lang.cls.php:217 tpl/page_optm/settings_css.tpl.php:112
|
1553 |
+
#: tpl/page_optm/settings_css.tpl.php:223 tpl/page_optm/settings_vpi.tpl.php:67
|
1554 |
msgid "Vary Group"
|
1555 |
msgstr ""
|
1556 |
|
1855 |
msgid "LiteSpeed Options"
|
1856 |
msgstr ""
|
1857 |
|
1858 |
+
#: src/object.lib.php:515
|
1859 |
+
msgid "Cache key must not be an empty string."
|
1860 |
+
msgstr ""
|
1861 |
+
|
1862 |
+
#. translators: %s: The type of the given cache key.
|
1863 |
+
#: src/object.lib.php:517
|
1864 |
+
msgid "Cache key must be integer or non-empty string, %s given."
|
1865 |
+
msgstr ""
|
1866 |
+
|
1867 |
#: src/placeholder.cls.php:80 tpl/dash/network_dash.tpl.php:30
|
1868 |
msgid "LQIP"
|
1869 |
msgstr ""
|
1945 |
msgstr ""
|
1946 |
|
1947 |
#: src/root.cls.php:185
|
1948 |
+
msgid "All QUIC.cloud service queues have been cleared."
|
1949 |
msgstr ""
|
1950 |
|
1951 |
#: src/task.cls.php:122
|
2064 |
msgid "Dismiss this notice"
|
2065 |
msgstr ""
|
2066 |
|
2067 |
+
#. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 5.3.1) #-#-#-#-#
|
2068 |
#. Plugin Name of the plugin/theme
|
2069 |
#: tpl/banner/new_version.php:57 tpl/banner/new_version_dev.tpl.php:12
|
2070 |
#: tpl/cache/more_settings_tip.tpl.php:15 tpl/inc/admin_footer.php:8
|
2080 |
msgstr ""
|
2081 |
|
2082 |
#: tpl/banner/new_version.php:69 tpl/banner/new_version_dev.tpl.php:24
|
2083 |
+
#: tpl/toolbox/beta_test.tpl.php:66
|
2084 |
msgid "Upgrade"
|
2085 |
msgstr ""
|
2086 |
|
2104 |
msgid "Thank You for Using the LiteSpeed Cache Plugin!"
|
2105 |
msgstr ""
|
2106 |
|
2107 |
+
#: tpl/banner/score.php:28 tpl/dash/dashboard.tpl.php:204
|
2108 |
msgid "Page Load Time"
|
2109 |
msgstr ""
|
2110 |
|
2111 |
#: tpl/banner/score.php:34 tpl/banner/score.php:74
|
2112 |
+
#: tpl/dash/dashboard.tpl.php:217 tpl/dash/dashboard.tpl.php:285
|
2113 |
msgid "Before"
|
2114 |
msgstr ""
|
2115 |
|
2116 |
#: tpl/banner/score.php:45 tpl/banner/score.php:84
|
2117 |
+
#: tpl/dash/dashboard.tpl.php:226 tpl/dash/dashboard.tpl.php:293
|
2118 |
msgid "After"
|
2119 |
msgstr ""
|
2120 |
|
2121 |
#: tpl/banner/score.php:55 tpl/banner/score.php:94
|
2122 |
+
#: tpl/dash/dashboard.tpl.php:234 tpl/dash/dashboard.tpl.php:301
|
2123 |
msgid "Improved by"
|
2124 |
msgstr ""
|
2125 |
|
2126 |
+
#: tpl/banner/score.php:68 tpl/dash/dashboard.tpl.php:261
|
2127 |
msgid "PageSpeed Score"
|
2128 |
msgstr ""
|
2129 |
|
2387 |
#: tpl/cache/settings-esi.tpl.php:35 tpl/cdn/manage.tpl.php:21
|
2388 |
#: tpl/crawler/summary.tpl.php:48 tpl/inc/check_cache_disabled.php:31
|
2389 |
#: tpl/inc/check_if_network_disable_all.php:18
|
2390 |
+
#: tpl/page_optm/settings_css.tpl.php:61 tpl/page_optm/settings_css.tpl.php:168
|
2391 |
#: tpl/page_optm/settings_localization.tpl.php:11
|
2392 |
msgid "WARNING"
|
2393 |
msgstr ""
|
2427 |
#: tpl/page_optm/settings_tuning.tpl.php:36
|
2428 |
#: tpl/page_optm/settings_tuning.tpl.php:57
|
2429 |
#: tpl/page_optm/settings_tuning.tpl.php:78
|
2430 |
+
#: tpl/page_optm/settings_tuning.tpl.php:97
|
2431 |
#: tpl/page_optm/settings_tuning_css.tpl.php:25
|
2432 |
#: tpl/page_optm/settings_tuning_css.tpl.php:85
|
2433 |
msgid "Filter %s is supported."
|
3504 |
msgid "Sitemap Total"
|
3505 |
msgstr ""
|
3506 |
|
3507 |
+
#: tpl/crawler/map.tpl.php:44 tpl/dash/dashboard.tpl.php:572
|
3508 |
msgid "Crawler Status"
|
3509 |
msgstr ""
|
3510 |
|
3677 |
msgid "Run time for previous crawler"
|
3678 |
msgstr ""
|
3679 |
|
3680 |
+
#: tpl/crawler/summary.tpl.php:85 tpl/dash/dashboard.tpl.php:585
|
3681 |
msgid "Current crawler started at"
|
3682 |
msgstr ""
|
3683 |
|
3684 |
+
#: tpl/crawler/summary.tpl.php:92 tpl/dash/dashboard.tpl.php:592
|
3685 |
msgid "Last interval"
|
3686 |
msgstr ""
|
3687 |
|
3688 |
+
#: tpl/crawler/summary.tpl.php:99 tpl/dash/dashboard.tpl.php:599
|
3689 |
msgid "Ended reason"
|
3690 |
msgstr ""
|
3691 |
|
3789 |
msgid "CDN Bandwidth"
|
3790 |
msgstr ""
|
3791 |
|
3792 |
+
#: tpl/dash/dashboard.tpl.php:59 tpl/dash/dashboard.tpl.php:508
|
3793 |
msgid "Low Quality Image Placeholder"
|
3794 |
msgstr ""
|
3795 |
|
3796 |
+
#: tpl/dash/dashboard.tpl.php:117 tpl/dash/network_dash.tpl.php:78
|
3797 |
msgid "Fast Queue Usage"
|
3798 |
msgstr ""
|
3799 |
|
3800 |
+
#: tpl/dash/dashboard.tpl.php:117 tpl/dash/network_dash.tpl.php:78
|
3801 |
msgid "Usage"
|
3802 |
msgstr ""
|
3803 |
|
3804 |
+
#: tpl/dash/dashboard.tpl.php:130 tpl/dash/network_dash.tpl.php:90
|
3805 |
msgid "PAYG Balance"
|
3806 |
msgstr ""
|
3807 |
|
3808 |
+
#: tpl/dash/dashboard.tpl.php:131
|
3809 |
+
msgid "PAYG used this month"
|
3810 |
+
msgstr ""
|
3811 |
+
|
3812 |
+
#: tpl/dash/dashboard.tpl.php:131
|
3813 |
+
msgid "PAYG balance and usage not included in above quota calculation."
|
3814 |
msgstr ""
|
3815 |
|
3816 |
+
#: tpl/dash/dashboard.tpl.php:133 tpl/dash/network_dash.tpl.php:93
|
3817 |
msgid "Pay as You Go Usage Statistics"
|
3818 |
msgstr ""
|
3819 |
|
3820 |
+
#: tpl/dash/dashboard.tpl.php:151 tpl/dash/network_dash.tpl.php:100
|
3821 |
msgid "Total Usage"
|
3822 |
msgstr ""
|
3823 |
|
3824 |
+
#: tpl/dash/dashboard.tpl.php:152 tpl/dash/network_dash.tpl.php:101
|
3825 |
msgid "Total images optimized in this month"
|
3826 |
msgstr ""
|
3827 |
|
3828 |
+
#: tpl/dash/dashboard.tpl.php:161
|
3829 |
msgid "Remaining Daily Quota"
|
3830 |
msgstr ""
|
3831 |
|
3832 |
+
#: tpl/dash/dashboard.tpl.php:172
|
3833 |
msgid "Partner Benefits Provided by"
|
3834 |
msgstr ""
|
3835 |
|
3836 |
+
#: tpl/dash/dashboard.tpl.php:195
|
3837 |
msgid "Go to QUIC.cloud dashboard"
|
3838 |
msgstr ""
|
3839 |
|
3840 |
+
#: tpl/dash/dashboard.tpl.php:207
|
3841 |
msgid "Refresh page load time"
|
3842 |
msgstr ""
|
3843 |
|
3844 |
+
#: tpl/dash/dashboard.tpl.php:248 tpl/dash/dashboard.tpl.php:317
|
3845 |
+
#: tpl/dash/dashboard.tpl.php:467 tpl/dash/dashboard.tpl.php:500
|
3846 |
+
#: tpl/dash/dashboard.tpl.php:532 tpl/dash/dashboard.tpl.php:564
|
3847 |
msgid "Last requested"
|
3848 |
msgstr ""
|
3849 |
|
3850 |
+
#: tpl/dash/dashboard.tpl.php:253
|
3851 |
msgid "Current closest Cloud server is %s. Click to redetect."
|
3852 |
msgstr ""
|
3853 |
|
3854 |
+
#: tpl/dash/dashboard.tpl.php:253 tpl/img_optm/summary.tpl.php:57
|
3855 |
+
#: tpl/page_optm/settings_css.tpl.php:93 tpl/page_optm/settings_css.tpl.php:204
|
3856 |
#: tpl/page_optm/settings_media.tpl.php:176
|
3857 |
#: tpl/page_optm/settings_vpi.tpl.php:48
|
3858 |
msgid ""
|
3859 |
"Are you sure you want to redetect the closest cloud server for this service?"
|
3860 |
msgstr ""
|
3861 |
|
3862 |
+
#: tpl/dash/dashboard.tpl.php:264
|
3863 |
msgid "Refresh page score"
|
3864 |
msgstr ""
|
3865 |
|
3866 |
+
#: tpl/dash/dashboard.tpl.php:325 tpl/img_optm/entry.tpl.php:6
|
3867 |
msgid "Image Optimization Summary"
|
3868 |
msgstr ""
|
3869 |
|
3870 |
+
#: tpl/dash/dashboard.tpl.php:326 tpl/dash/dashboard.tpl.php:415
|
3871 |
+
#: tpl/dash/dashboard.tpl.php:443 tpl/dash/dashboard.tpl.php:476
|
3872 |
+
#: tpl/dash/dashboard.tpl.php:509 tpl/dash/dashboard.tpl.php:541
|
3873 |
+
#: tpl/dash/dashboard.tpl.php:573
|
3874 |
msgid "More"
|
3875 |
msgstr ""
|
3876 |
|
3877 |
+
#: tpl/dash/dashboard.tpl.php:336
|
3878 |
msgid "Image Groups Prepared"
|
3879 |
msgstr ""
|
3880 |
|
3881 |
+
#: tpl/dash/dashboard.tpl.php:351
|
3882 |
msgid "Images Requested"
|
3883 |
msgstr ""
|
3884 |
|
3885 |
+
#: tpl/dash/dashboard.tpl.php:383 tpl/img_optm/summary.tpl.php:342
|
3886 |
msgid "Last Request"
|
3887 |
msgstr ""
|
3888 |
|
3889 |
+
#: tpl/dash/dashboard.tpl.php:386
|
3890 |
msgid "Last Pull"
|
3891 |
msgstr ""
|
3892 |
|
3893 |
+
#: tpl/dash/dashboard.tpl.php:414
|
3894 |
msgid "Cache Status"
|
3895 |
msgstr ""
|
3896 |
|
3897 |
+
#: tpl/dash/dashboard.tpl.php:420
|
3898 |
msgid "Public Cache"
|
3899 |
msgstr ""
|
3900 |
|
3901 |
+
#: tpl/dash/dashboard.tpl.php:421
|
3902 |
msgid "Private Cache"
|
3903 |
msgstr ""
|
3904 |
|
3905 |
+
#: tpl/dash/dashboard.tpl.php:442 tpl/toolbox/purge.tpl.php:70
|
3906 |
msgid "Critical CSS"
|
3907 |
msgstr ""
|
3908 |
|
3909 |
+
#: tpl/dash/dashboard.tpl.php:448 tpl/dash/dashboard.tpl.php:481
|
3910 |
+
#: tpl/dash/dashboard.tpl.php:514 tpl/dash/dashboard.tpl.php:546
|
3911 |
+
#: tpl/page_optm/settings_css.tpl.php:84 tpl/page_optm/settings_css.tpl.php:195
|
3912 |
#: tpl/page_optm/settings_media.tpl.php:170
|
3913 |
#: tpl/page_optm/settings_vpi.tpl.php:42
|
3914 |
msgid "Last generated"
|
3915 |
msgstr ""
|
3916 |
|
3917 |
+
#: tpl/dash/dashboard.tpl.php:451 tpl/dash/dashboard.tpl.php:484
|
3918 |
+
#: tpl/dash/dashboard.tpl.php:517 tpl/dash/dashboard.tpl.php:549
|
3919 |
msgid "Time to execute previous request"
|
3920 |
msgstr ""
|
3921 |
|
3922 |
+
#: tpl/dash/dashboard.tpl.php:456 tpl/dash/dashboard.tpl.php:489
|
3923 |
+
#: tpl/dash/dashboard.tpl.php:522 tpl/dash/dashboard.tpl.php:554
|
3924 |
msgid "Requests in queue"
|
3925 |
msgstr ""
|
3926 |
|
3927 |
+
#: tpl/dash/dashboard.tpl.php:459 tpl/dash/dashboard.tpl.php:492
|
3928 |
+
#: tpl/dash/dashboard.tpl.php:524 tpl/dash/dashboard.tpl.php:556
|
3929 |
msgid "Force cron"
|
3930 |
msgstr ""
|
3931 |
|
3932 |
+
#: tpl/dash/dashboard.tpl.php:475 tpl/toolbox/purge.tpl.php:79
|
3933 |
msgid "Unique CSS"
|
3934 |
msgstr ""
|
3935 |
|
3936 |
+
#: tpl/dash/dashboard.tpl.php:540
|
3937 |
msgid "Viewport Image"
|
3938 |
msgstr ""
|
3939 |
|
3940 |
+
#: tpl/dash/dashboard.tpl.php:577
|
3941 |
msgid "Crawler(s)"
|
3942 |
msgstr ""
|
3943 |
|
3944 |
+
#: tpl/dash/dashboard.tpl.php:580
|
3945 |
msgid "Currently active crawler"
|
3946 |
msgstr ""
|
3947 |
|
3948 |
+
#: tpl/dash/dashboard.tpl.php:606
|
3949 |
msgid "<b>Last crawled:</b> %d item(s)"
|
3950 |
msgstr ""
|
3951 |
|
3969 |
msgid "Pay as You Go"
|
3970 |
msgstr ""
|
3971 |
|
3972 |
+
#: tpl/dash/network_dash.tpl.php:91
|
3973 |
+
msgid "This Month Usage"
|
3974 |
+
msgstr ""
|
3975 |
+
|
3976 |
#: tpl/db_optm/entry.tpl.php:10 tpl/db_optm/settings.tpl.php:10
|
3977 |
msgid "DB Optimization Settings"
|
3978 |
msgstr ""
|
4196 |
#: tpl/general/settings.tpl.php:83 tpl/general/settings.tpl.php:94
|
4197 |
#: tpl/general/settings.tpl.php:106 tpl/general/settings.tpl.php:183
|
4198 |
#: tpl/general/settings.tpl.php:189 tpl/general/settings.tpl.php:195
|
4199 |
+
#: tpl/general/settings.tpl.php:212 tpl/page_optm/settings_media.tpl.php:232
|
4200 |
#: tpl/page_optm/settings_vpi.tpl.php:32
|
4201 |
msgid "Notice"
|
4202 |
msgstr ""
|
4291 |
msgid "Your %1s quota on %2s will still be in use."
|
4292 |
msgstr ""
|
4293 |
|
4294 |
+
#: tpl/general/settings.tpl.php:183 tpl/page_optm/settings_media.tpl.php:232
|
4295 |
#: tpl/page_optm/settings_vpi.tpl.php:32
|
4296 |
msgid "%s must be turned ON for this setting to work."
|
4297 |
msgstr ""
|
4465 |
msgstr ""
|
4466 |
|
4467 |
#: tpl/img_optm/summary.tpl.php:57 tpl/page_optm/settings_css.tpl.php:93
|
4468 |
+
#: tpl/page_optm/settings_css.tpl.php:204
|
4469 |
#: tpl/page_optm/settings_media.tpl.php:176
|
4470 |
#: tpl/page_optm/settings_vpi.tpl.php:48
|
4471 |
msgid "Current closest Cloud server is %s. Click to redetect."
|
4883 |
msgid "This option is bypassed because %1$s option is %2$s."
|
4884 |
msgstr ""
|
4885 |
|
4886 |
+
#: tpl/page_optm/settings_css.tpl.php:87 tpl/page_optm/settings_css.tpl.php:198
|
4887 |
msgid "Last requested cost"
|
4888 |
msgstr ""
|
4889 |
|
4890 |
+
#: tpl/page_optm/settings_css.tpl.php:99 tpl/page_optm/settings_css.tpl.php:210
|
4891 |
#: tpl/page_optm/settings_vpi.tpl.php:54
|
4892 |
msgid "URL list in %s queue waiting for cron"
|
4893 |
msgstr ""
|
4894 |
|
4895 |
#: tpl/page_optm/settings_css.tpl.php:120
|
4896 |
+
#: tpl/page_optm/settings_css.tpl.php:231 tpl/page_optm/settings_vpi.tpl.php:74
|
4897 |
msgid "Run %s Queue Manually"
|
4898 |
msgstr ""
|
4899 |
|
4900 |
+
#: tpl/page_optm/settings_css.tpl.php:137
|
4901 |
msgid ""
|
4902 |
"Inline UCSS to reduce the extra CSS file loading. This option will not be "
|
4903 |
"automatically turned on for %1$s pages. To use it on %1$s pages, please set "
|
4904 |
"it to ON."
|
4905 |
msgstr ""
|
4906 |
|
4907 |
+
#: tpl/page_optm/settings_css.tpl.php:139
|
4908 |
msgid "This option will automatically bypass %s option."
|
4909 |
msgstr ""
|
4910 |
|
4911 |
+
#: tpl/page_optm/settings_css.tpl.php:153
|
4912 |
msgid ""
|
4913 |
"Include external CSS and inline CSS in combined file when %1$s is also "
|
4914 |
"enabled. This option helps maintain the priorities of CSS, which should "
|
4915 |
"minimize potential errors caused by CSS Combine."
|
4916 |
msgstr ""
|
4917 |
|
4918 |
+
#: tpl/page_optm/settings_css.tpl.php:172
|
4919 |
msgid "Optimize CSS delivery."
|
4920 |
msgstr ""
|
4921 |
|
4922 |
+
#: tpl/page_optm/settings_css.tpl.php:173
|
4923 |
#: tpl/page_optm/settings_html.tpl.php:129 tpl/page_optm/settings_js.tpl.php:67
|
4924 |
msgid ""
|
4925 |
"This can improve your speed score in services like Pingdom, GTmetrix and "
|
4926 |
"PageSpeed."
|
4927 |
msgstr ""
|
4928 |
|
4929 |
+
#: tpl/page_optm/settings_css.tpl.php:174
|
4930 |
msgid ""
|
4931 |
"Use QUIC.cloud online service to generate critical CSS and load remaining "
|
4932 |
"CSS asynchronously."
|
4933 |
msgstr ""
|
4934 |
|
4935 |
+
#: tpl/page_optm/settings_css.tpl.php:176
|
4936 |
msgid ""
|
4937 |
"Automatic generation of critical CSS is in the background via a cron-based "
|
4938 |
"queue."
|
4939 |
msgstr ""
|
4940 |
|
4941 |
+
#: tpl/page_optm/settings_css.tpl.php:177
|
4942 |
msgid ""
|
4943 |
"When this option is turned %s, it will also load Google Fonts asynchronously."
|
4944 |
msgstr ""
|
4945 |
|
4946 |
+
#: tpl/page_optm/settings_css.tpl.php:180
|
4947 |
msgid "Elements with attribute %s in HTML code will be excluded."
|
4948 |
msgstr ""
|
4949 |
|
4950 |
+
#: tpl/page_optm/settings_css.tpl.php:185
|
4951 |
msgid "This option is bypassed due to %s option."
|
4952 |
msgstr ""
|
4953 |
|
4954 |
+
#: tpl/page_optm/settings_css.tpl.php:247
|
4955 |
msgid ""
|
4956 |
"Disable this option to generate CCSS per Post Type instead of per page. This "
|
4957 |
"can save significant CCSS quota, however it may result in incorrect CSS "
|
4958 |
"styling if your site uses a page builder."
|
4959 |
msgstr ""
|
4960 |
|
4961 |
+
#: tpl/page_optm/settings_css.tpl.php:260
|
4962 |
msgid "This will inline the asynchronous CSS library to avoid render blocking."
|
4963 |
msgstr ""
|
4964 |
|
4965 |
+
#: tpl/page_optm/settings_css.tpl.php:271
|
4966 |
msgid "Default"
|
4967 |
msgstr ""
|
4968 |
|
4969 |
+
#: tpl/page_optm/settings_css.tpl.php:273
|
4970 |
msgid ""
|
4971 |
"Set this to append %1$s to all %2$s rules before caching CSS to specify how "
|
4972 |
"fonts should be displayed while being downloaded."
|
4973 |
msgstr ""
|
4974 |
|
4975 |
+
#: tpl/page_optm/settings_css.tpl.php:274
|
4976 |
msgid "%s is recommended."
|
4977 |
msgstr ""
|
4978 |
|
4979 |
+
#: tpl/page_optm/settings_css.tpl.php:274
|
4980 |
msgid "Swap"
|
4981 |
msgstr ""
|
4982 |
|
5146 |
msgstr ""
|
5147 |
|
5148 |
#: tpl/page_optm/settings_localization.tpl.php:127
|
5149 |
+
#: tpl/toolbox/beta_test.tpl.php:34
|
5150 |
msgid "Example"
|
5151 |
msgstr ""
|
5152 |
|
5161 |
msgstr ""
|
5162 |
|
5163 |
#: tpl/page_optm/settings_media.tpl.php:28
|
5164 |
+
#: tpl/page_optm/settings_media.tpl.php:215
|
5165 |
msgid "This can improve page loading time by reducing initial HTTP requests."
|
5166 |
msgstr ""
|
5167 |
|
5276 |
msgid "Size list in queue waiting for cron"
|
5277 |
msgstr ""
|
5278 |
|
5279 |
+
#: tpl/page_optm/settings_media.tpl.php:214
|
5280 |
msgid "Load iframes only when they enter the viewport."
|
5281 |
msgstr ""
|
5282 |
|
5283 |
+
#: tpl/page_optm/settings_media.tpl.php:228
|
5284 |
msgid ""
|
5285 |
"Set an explicit width and height on image elements to reduce layout shifts "
|
5286 |
"and improve CLS (a Core Web Vitals metric)."
|
5287 |
msgstr ""
|
5288 |
|
5289 |
+
#: tpl/page_optm/settings_media.tpl.php:237
|
5290 |
msgid "Use %1$s to bypass remote image dimension check when %2$s is ON."
|
5291 |
msgstr ""
|
5292 |
|
5343 |
msgstr ""
|
5344 |
|
5345 |
#: tpl/page_optm/settings_tuning.tpl.php:52
|
5346 |
+
msgid "Listed JS files or inline JS code will not be deferred or delayed."
|
5347 |
msgstr ""
|
5348 |
|
5349 |
#: tpl/page_optm/settings_tuning.tpl.php:73
|
5354 |
msgid "Prevent any optimization of listed pages."
|
5355 |
msgstr ""
|
5356 |
|
5357 |
+
#: tpl/page_optm/settings_tuning.tpl.php:111
|
5358 |
msgid ""
|
5359 |
"Only optimize pages for guest (not logged in) visitors. If turned this OFF, "
|
5360 |
"CSS/JS/CCSS files will be doubled by each user group."
|
5361 |
msgstr ""
|
5362 |
|
5363 |
+
#: tpl/page_optm/settings_tuning.tpl.php:123
|
5364 |
msgid "Selected roles will be excluded from all optimizations."
|
5365 |
msgstr ""
|
5366 |
|
5444 |
"without delay."
|
5445 |
msgstr ""
|
5446 |
|
5447 |
+
#: tpl/page_optm/settings_vpi.tpl.php:91
|
5448 |
msgid "Enable Viewport Images auto generation cron."
|
5449 |
msgstr ""
|
5450 |
|
5680 |
msgid "Restore Settings"
|
5681 |
msgstr ""
|
5682 |
|
5683 |
+
#: tpl/toolbox/beta_test.tpl.php:29
|
5684 |
msgid "Try GitHub Version"
|
5685 |
msgstr ""
|
5686 |
|
5687 |
+
#: tpl/toolbox/beta_test.tpl.php:33
|
5688 |
msgid ""
|
5689 |
"Use this section to switch plugin versions. To beta test a GitHub commit, "
|
5690 |
"enter the commit URL in the field below."
|
5691 |
msgstr ""
|
5692 |
|
5693 |
+
#: tpl/toolbox/beta_test.tpl.php:38
|
5694 |
msgid "Use latest GitHub Dev commit"
|
5695 |
msgstr ""
|
5696 |
|
5697 |
+
#: tpl/toolbox/beta_test.tpl.php:40
|
5698 |
msgid "Use latest GitHub Master commit"
|
5699 |
msgstr ""
|
5700 |
|
5701 |
+
#: tpl/toolbox/beta_test.tpl.php:42 tpl/toolbox/beta_test.tpl.php:58
|
5702 |
msgid "Use latest WordPress release version"
|
5703 |
msgstr ""
|
5704 |
|
5705 |
+
#: tpl/toolbox/beta_test.tpl.php:42
|
5706 |
msgid "OR"
|
5707 |
msgstr ""
|
5708 |
|
5709 |
+
#: tpl/toolbox/beta_test.tpl.php:53
|
5710 |
msgid ""
|
5711 |
"Downgrade not recommended. May cause fatal error due to refactored code."
|
5712 |
msgstr ""
|
5713 |
|
5714 |
+
#: tpl/toolbox/beta_test.tpl.php:57
|
5715 |
msgid ""
|
5716 |
"Press the %s button to use the most recent GitHub commit. Master is for "
|
5717 |
"release candidate & Dev is for experimental testing."
|
5718 |
msgstr ""
|
5719 |
|
5720 |
+
#: tpl/toolbox/beta_test.tpl.php:57
|
5721 |
msgid "Use latest GitHub Dev/Master commit"
|
5722 |
msgstr ""
|
5723 |
|
5724 |
+
#: tpl/toolbox/beta_test.tpl.php:58
|
5725 |
msgid ""
|
5726 |
"Press the %s button to stop beta testing and go back to the current release "
|
5727 |
"from the WordPress Plugin Directory."
|
5728 |
msgstr ""
|
5729 |
|
5730 |
+
#: tpl/toolbox/beta_test.tpl.php:63
|
5731 |
msgid ""
|
5732 |
"In order to avoid an upgrade error, you must be using %1$s or later before "
|
5733 |
"you can upgrade to %2$s versions."
|
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.3
|
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.3' );
|
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
|
@@ -76,6 +76,7 @@ if ( ( defined( 'WP_CLI' ) && WP_CLI ) || PHP_SAPI == 'cli' ) {
|
|
76 |
WP_CLI::add_command( 'litespeed-online', 'LiteSpeed\CLI\Online' );
|
77 |
WP_CLI::add_command( 'litespeed-image', 'LiteSpeed\CLI\Image' );
|
78 |
WP_CLI::add_command( 'litespeed-debug', 'LiteSpeed\CLI\Debug' );
|
|
|
79 |
}
|
80 |
}
|
81 |
|
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.3.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.3.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
|
76 |
WP_CLI::add_command( 'litespeed-online', 'LiteSpeed\CLI\Online' );
|
77 |
WP_CLI::add_command( 'litespeed-image', 'LiteSpeed\CLI\Image' );
|
78 |
WP_CLI::add_command( 'litespeed-debug', 'LiteSpeed\CLI\Debug' );
|
79 |
+
WP_CLI::add_command( 'litespeed-presets', 'LiteSpeed\CLI\Presets' );
|
80 |
}
|
81 |
}
|
82 |
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
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.
|
6 |
-
Stable tag: 5.3
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
9 |
|
@@ -250,6 +250,19 @@ The vast majority of plugins and themes are compatible with LiteSpeed Cache. The
|
|
250 |
|
251 |
== Changelog ==
|
252 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
= 5.3 - Oct 31 2022 =
|
254 |
* 🌱**Presets** New `Presets` feature and menu item.
|
255 |
* 🌱**UCSS** New option `UCSS File Excludes and Inline` to increase page score. (Ankit)
|
2 |
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.1.1
|
6 |
+
Stable tag: 5.3.1
|
7 |
License: GPLv3
|
8 |
License URI: http://www.gnu.org/licenses/gpl.html
|
9 |
|
250 |
|
251 |
== Changelog ==
|
252 |
|
253 |
+
= 5.3.1 - Dec 12 2022 =
|
254 |
+
* **CLI** Presets feature is now usable from the CLI. (xLukii)
|
255 |
+
* **CLI** Added 'import_remote' for litespeed-option to enable importing options from URLs. (xLukii)
|
256 |
+
* **Cache** Added LiteSpeed headers to site health check for full page cache.
|
257 |
+
* **Crawler* Fixed unauthorized crawler toggle operation. (#CVE-2022-46800)
|
258 |
+
* **UCSS** Fixed a bug where items weren't added back to the UCSS queue after purging.
|
259 |
+
* **Page Optimize** Fixed a bug where generated CSS would return 404 after upgrading via CLI.
|
260 |
+
* **3rd** Fixed a bug where a WooCommerce session doesn't exist when checking cart, notices (Jason Levy/Gilles)
|
261 |
+
* **GUI** Made LiteSpeed admin notice icon grayscale to avoid distraction. (martinsauter)
|
262 |
+
* **GUI** Fixed RTL style for notification icon.
|
263 |
+
* **API** Added a new hook `litespeed_optm_uri_exc` to exclude URI from page optimization.
|
264 |
+
* **API** Excluded `.well-known` path from page optimization.
|
265 |
+
|
266 |
= 5.3 - Oct 31 2022 =
|
267 |
* 🌱**Presets** New `Presets` feature and menu item.
|
268 |
* 🌱**UCSS** New option `UCSS File Excludes and Inline` to increase page score. (Ankit)
|
src/cloud.cls.php
CHANGED
@@ -560,6 +560,14 @@ class Cloud extends Base {
|
|
560 |
return false;
|
561 |
}
|
562 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
563 |
/** @since 5.0 If in valid err_domains, bypass request */
|
564 |
if ( $this->_is_err_domain( $home_url ) ) {
|
565 |
return false;
|
@@ -995,14 +1003,22 @@ class Cloud extends Base {
|
|
995 |
$json = json_decode( $response[ 'body' ], true );
|
996 |
|
997 |
if (!$json['success']) {
|
|
|
998 |
if (isset($json['info']['errors'])) {
|
999 |
$errs = array();
|
1000 |
foreach ($json['info']['errors'] as $err) {
|
1001 |
$errs[] = 'Error ' . $err['code'] . ': ' . $err['message'];
|
|
|
|
|
|
|
1002 |
}
|
1003 |
$error_message = implode('<br>', $errs);
|
1004 |
} else {
|
1005 |
-
$error_message = 'Unknown error,
|
|
|
|
|
|
|
|
|
1006 |
}
|
1007 |
Admin_Display::error( __( 'Cloud REST API returned error: ', 'litespeed-cache' ) . $error_message );
|
1008 |
return $error_message;
|
560 |
return false;
|
561 |
}
|
562 |
|
563 |
+
// Deny if is IP
|
564 |
+
if ( preg_match( '#^(([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)\.){3}([1-9]?\d|1\d\d|25[0-5]|2[0-4]\d)$#', Utility::parse_url_safe($home_url, PHP_URL_HOST) ) ) {
|
565 |
+
self::debug( "IP home url is not allowed for cloud service." );
|
566 |
+
$msg = __( 'In order to use QC services, need a real domain name, cannot use an IP.', 'litespeed-cache' );
|
567 |
+
Admin_Display::error( $msg );
|
568 |
+
return false;
|
569 |
+
}
|
570 |
+
|
571 |
/** @since 5.0 If in valid err_domains, bypass request */
|
572 |
if ( $this->_is_err_domain( $home_url ) ) {
|
573 |
return false;
|
1003 |
$json = json_decode( $response[ 'body' ], true );
|
1004 |
|
1005 |
if (!$json['success']) {
|
1006 |
+
$contactSupport = false;
|
1007 |
if (isset($json['info']['errors'])) {
|
1008 |
$errs = array();
|
1009 |
foreach ($json['info']['errors'] as $err) {
|
1010 |
$errs[] = 'Error ' . $err['code'] . ': ' . $err['message'];
|
1011 |
+
if ($err['code'] == 1113) {
|
1012 |
+
$contactSupport = true;
|
1013 |
+
}
|
1014 |
}
|
1015 |
$error_message = implode('<br>', $errs);
|
1016 |
} else {
|
1017 |
+
$error_message = __('Unknown error.', 'litespeed-cache');
|
1018 |
+
$contactSupport = true;
|
1019 |
+
}
|
1020 |
+
if ($contactSupport) {
|
1021 |
+
$error_message .= ' <a href="https://www.quic.cloud/support/" target="_blank">' . __( 'Contact QUIC.cloud support', 'litespeed-cache' ) . '</a>';
|
1022 |
}
|
1023 |
Admin_Display::error( __( 'Cloud REST API returned error: ', 'litespeed-cache' ) . $error_message );
|
1024 |
return $error_message;
|
src/control.cls.php
CHANGED
@@ -94,7 +94,7 @@ class Control extends Root {
|
|
94 |
}
|
95 |
|
96 |
$roles = explode( ',', $role );
|
97 |
-
$found = array_intersect( $roles,
|
98 |
|
99 |
return $found ? implode( ',', $found ) : false;
|
100 |
}
|
94 |
}
|
95 |
|
96 |
$roles = explode( ',', $role );
|
97 |
+
$found = array_intersect( $roles, $this->conf( Base::O_CACHE_EXC_ROLES ) );
|
98 |
|
99 |
return $found ? implode( ',', $found ) : false;
|
100 |
}
|
src/core.cls.php
CHANGED
@@ -95,6 +95,18 @@ class Core extends Root {
|
|
95 |
add_action( $event, __NAMESPACE__ . '\Purge::purge_all' );
|
96 |
}
|
97 |
// add_filter( 'upgrader_pre_download', 'Purge::filter_with_purge_all' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
}
|
99 |
|
100 |
add_action( 'after_setup_theme', array( $this, 'init' ) );
|
95 |
add_action( $event, __NAMESPACE__ . '\Purge::purge_all' );
|
96 |
}
|
97 |
// add_filter( 'upgrader_pre_download', 'Purge::filter_with_purge_all' );
|
98 |
+
|
99 |
+
// Add headers to site health check for full page cache
|
100 |
+
// @since 5.4
|
101 |
+
add_filter( 'site_status_page_cache_supported_cache_headers', function( $cache_headers ) {
|
102 |
+
$is_cache_hit = function( $header_value ) {
|
103 |
+
return false !== strpos( strtolower( $header_value ), 'hit' );
|
104 |
+
};
|
105 |
+
$cache_headers['x-litespeed-cache'] = $is_cache_hit;
|
106 |
+
$cache_headers['x-lsadc-cache'] = $is_cache_hit;
|
107 |
+
$cache_headers['x-qc-cache'] = $is_cache_hit;
|
108 |
+
return $cache_headers;
|
109 |
+
});
|
110 |
}
|
111 |
|
112 |
add_action( 'after_setup_theme', array( $this, 'init' ) );
|
src/crawler-map.cls.php
CHANGED
@@ -450,7 +450,7 @@ class Crawler_Map extends Root {
|
|
450 |
* Read via wp func to avoid allow_url_fopen = off
|
451 |
* @since 2.2.7
|
452 |
*/
|
453 |
-
$response = wp_remote_get( $sitemap, array( 'timeout' => $this->_conf_map_timeout ) );
|
454 |
if ( is_wp_error( $response ) ) {
|
455 |
$error_message = $response->get_error_message();
|
456 |
Debug2::debug( '🐞🗺️ failed to read sitemap: ' . $error_message );
|
450 |
* Read via wp func to avoid allow_url_fopen = off
|
451 |
* @since 2.2.7
|
452 |
*/
|
453 |
+
$response = wp_remote_get( $sitemap, array( 'timeout' => $this->_conf_map_timeout, 'sslverify' => false ) );
|
454 |
if ( is_wp_error( $response ) ) {
|
455 |
$error_message = $response->get_error_message();
|
456 |
Debug2::debug( '🐞🗺️ failed to read sitemap: ' . $error_message );
|
src/data.cls.php
CHANGED
@@ -656,6 +656,20 @@ class Data extends Root {
|
|
656 |
return $list;
|
657 |
}
|
658 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
659 |
/**
|
660 |
* Get list from `data/esi.nonces.txt`
|
661 |
*
|
656 |
return $list;
|
657 |
}
|
658 |
|
659 |
+
/**
|
660 |
+
* Get list from `data/optm_uri_exc.txt`
|
661 |
+
*
|
662 |
+
* @since 5.4
|
663 |
+
*/
|
664 |
+
public function load_optm_uri_exc( $list ) {
|
665 |
+
$data = $this->_load_per_line( 'optm_uri_exc.txt' );
|
666 |
+
if ( $data ) {
|
667 |
+
$list = array_unique( array_filter( array_merge( $list, $data ) ) );
|
668 |
+
}
|
669 |
+
|
670 |
+
return $list;
|
671 |
+
}
|
672 |
+
|
673 |
/**
|
674 |
* Get list from `data/esi.nonces.txt`
|
675 |
*
|
src/doc.cls.php
CHANGED
@@ -120,4 +120,21 @@ class Doc {
|
|
120 |
echo '</div>';
|
121 |
}
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
}
|
120 |
echo '</div>';
|
121 |
}
|
122 |
|
123 |
+
/**
|
124 |
+
* Gentle reminder that web services run asynchronously
|
125 |
+
*
|
126 |
+
* @since 5.3.1
|
127 |
+
* @access public
|
128 |
+
*/
|
129 |
+
public static function queue_issues( $return = false ) {
|
130 |
+
$str = '<div class="litespeed-desc">'
|
131 |
+
. esc_html__( 'The queue is processed asynchronously. It may take time.', 'litespeed-cache' )
|
132 |
+
. self::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/troubleshoot/#quiccloud-queue-issues', false, false, false, true )
|
133 |
+
. '</div>';
|
134 |
+
if ( $return ) {
|
135 |
+
return $str;
|
136 |
+
}
|
137 |
+
echo $str;
|
138 |
+
}
|
139 |
+
|
140 |
}
|
src/lang.cls.php
CHANGED
@@ -166,7 +166,7 @@ class Lang extends Base {
|
|
166 |
self::O_OPTM_CCSS_CON => __( 'Critical CSS Rules', 'litespeed-cache' ),
|
167 |
self::O_OPTM_CCSS_SEP_POSTTYPE => __( 'Separate CCSS Cache Post Types', 'litespeed-cache' ),
|
168 |
self::O_OPTM_CCSS_SEP_URI => __( 'Separate CCSS Cache URIs', 'litespeed-cache' ),
|
169 |
-
self::O_OPTM_JS_DEFER_EXC => __( 'JS Deferred Excludes', 'litespeed-cache' ),
|
170 |
self::O_OPTM_GM_JS_EXC => __( 'Guest Mode JS Excludes', 'litespeed-cache' ),
|
171 |
self::O_OPTM_EMOJI_RM => __( 'Remove WordPress Emoji', 'litespeed-cache' ),
|
172 |
self::O_OPTM_NOSCRIPT_RM => __( 'Remove Noscript Tags', 'litespeed-cache' ),
|
166 |
self::O_OPTM_CCSS_CON => __( 'Critical CSS Rules', 'litespeed-cache' ),
|
167 |
self::O_OPTM_CCSS_SEP_POSTTYPE => __( 'Separate CCSS Cache Post Types', 'litespeed-cache' ),
|
168 |
self::O_OPTM_CCSS_SEP_URI => __( 'Separate CCSS Cache URIs', 'litespeed-cache' ),
|
169 |
+
self::O_OPTM_JS_DEFER_EXC => __( 'JS Deferred / Delayed Excludes', 'litespeed-cache' ),
|
170 |
self::O_OPTM_GM_JS_EXC => __( 'Guest Mode JS Excludes', 'litespeed-cache' ),
|
171 |
self::O_OPTM_EMOJI_RM => __( 'Remove WordPress Emoji', 'litespeed-cache' ),
|
172 |
self::O_OPTM_NOSCRIPT_RM => __( 'Remove Noscript Tags', 'litespeed-cache' ),
|
src/object.lib.php
CHANGED
@@ -21,81 +21,177 @@ require_once __DIR__ . '/object-cache.cls.php';
|
|
21 |
* Sets up Object Cache Global and assigns it.
|
22 |
*
|
23 |
* @since 1.8
|
|
|
|
|
24 |
*/
|
25 |
function wp_cache_init() {
|
26 |
$GLOBALS['wp_object_cache'] = WP_Object_Cache::get_instance();
|
27 |
}
|
28 |
|
29 |
/**
|
30 |
-
*
|
31 |
*
|
32 |
* @since 1.8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
*/
|
34 |
-
function
|
35 |
global $wp_object_cache;
|
36 |
|
37 |
-
return $wp_object_cache->
|
38 |
}
|
39 |
|
40 |
/**
|
41 |
-
*
|
42 |
*
|
43 |
-
* @since
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
*/
|
45 |
-
function
|
46 |
global $wp_object_cache;
|
47 |
|
48 |
-
return $wp_object_cache->
|
49 |
}
|
50 |
|
51 |
/**
|
52 |
-
*
|
53 |
*
|
54 |
* @since 1.8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
*/
|
56 |
-
function
|
57 |
global $wp_object_cache;
|
58 |
|
59 |
-
return $wp_object_cache->
|
60 |
}
|
61 |
|
62 |
/**
|
63 |
-
*
|
|
|
|
|
64 |
*
|
65 |
* @since 1.8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
*/
|
67 |
-
function
|
68 |
global $wp_object_cache;
|
69 |
|
70 |
-
return $wp_object_cache->
|
71 |
}
|
72 |
|
73 |
/**
|
74 |
-
*
|
75 |
*
|
76 |
-
* @since
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
*/
|
78 |
-
function
|
79 |
global $wp_object_cache;
|
80 |
|
81 |
-
return $wp_object_cache->
|
82 |
}
|
83 |
|
84 |
/**
|
85 |
-
*
|
86 |
*
|
87 |
* @since 1.8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
*/
|
89 |
-
function
|
90 |
global $wp_object_cache;
|
91 |
|
92 |
-
return $wp_object_cache->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
}
|
94 |
|
95 |
/**
|
96 |
* Removes the cache contents matching key and group.
|
97 |
*
|
98 |
* @since 1.8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
*/
|
100 |
function wp_cache_delete( $key, $group = '' ) {
|
101 |
global $wp_object_cache;
|
@@ -103,10 +199,74 @@ function wp_cache_delete( $key, $group = '' ) {
|
|
103 |
return $wp_object_cache->delete( $key, $group );
|
104 |
}
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
/**
|
107 |
* Removes all cache items.
|
108 |
*
|
109 |
* @since 1.8
|
|
|
|
|
|
|
|
|
|
|
110 |
*/
|
111 |
function wp_cache_flush() {
|
112 |
global $wp_object_cache;
|
@@ -114,10 +274,90 @@ function wp_cache_flush() {
|
|
114 |
return $wp_object_cache->flush();
|
115 |
}
|
116 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
/**
|
118 |
* Adds a group or set of groups to the list of global groups.
|
119 |
*
|
120 |
* @since 1.8
|
|
|
|
|
|
|
|
|
|
|
121 |
*/
|
122 |
function wp_cache_add_global_groups( $groups ) {
|
123 |
global $wp_object_cache;
|
@@ -129,6 +369,8 @@ function wp_cache_add_global_groups( $groups ) {
|
|
129 |
* Adds a group or set of groups to the list of non-persistent groups.
|
130 |
*
|
131 |
* @since 1.8
|
|
|
|
|
132 |
*/
|
133 |
function wp_cache_add_non_persistent_groups( $groups ) {
|
134 |
global $wp_object_cache;
|
@@ -154,15 +396,6 @@ function wp_cache_switch_to_blog( $blog_id ) {
|
|
154 |
$wp_object_cache->switch_to_blog( $blog_id );
|
155 |
}
|
156 |
|
157 |
-
/**
|
158 |
-
* Closes the cache.
|
159 |
-
*
|
160 |
-
* @since 1.8
|
161 |
-
*/
|
162 |
-
function wp_cache_close() {
|
163 |
-
return true;
|
164 |
-
}
|
165 |
-
|
166 |
|
167 |
|
168 |
class WP_Object_Cache {
|
@@ -180,10 +413,12 @@ class WP_Object_Cache {
|
|
180 |
private $count_miss = 0;
|
181 |
private $count_set = 0;
|
182 |
|
|
|
183 |
private $blog_prefix;
|
|
|
184 |
|
185 |
/**
|
186 |
-
* Init
|
187 |
*
|
188 |
* @since 1.8
|
189 |
*/
|
@@ -201,42 +436,343 @@ class WP_Object_Cache {
|
|
201 |
}
|
202 |
|
203 |
/**
|
204 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
*
|
206 |
* @since 1.8
|
207 |
* @access public
|
208 |
*/
|
209 |
public function debug() {
|
210 |
-
|
211 |
. ' [hit_incall] ' . $this->count_hit_incall
|
212 |
. ' [hit] ' . $this->count_hit
|
213 |
. ' [miss_incall] ' . $this->count_miss_incall
|
214 |
. ' [miss] ' . $this->count_miss
|
215 |
. ' [set] ' . $this->count_set;
|
|
|
216 |
|
217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
}
|
219 |
|
220 |
/**
|
221 |
-
*
|
222 |
*
|
223 |
-
* @since
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
* @access public
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
*/
|
226 |
public function get( $key, $group = 'default', $force = false, &$found = null ) {
|
227 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
// error_log('');
|
229 |
-
// error_log("oc: get \t\t\t[key] " . $
|
230 |
$found = false;
|
231 |
$found_in_oc = false;
|
232 |
$cache_val = false;
|
233 |
-
if ( array_key_exists( $
|
234 |
$found = true;
|
235 |
-
$cache_val = $this->_cache[ $
|
236 |
$this->count_hit_incall ++;
|
237 |
}
|
238 |
-
elseif ( ! array_key_exists( $
|
239 |
-
$v = $this->_object_cache->get( $
|
240 |
|
241 |
if ( $v !== null ) {
|
242 |
$v = @maybe_unserialize( $v );
|
@@ -250,8 +786,8 @@ class WP_Object_Cache {
|
|
250 |
$cache_val = $v[ 'data' ];
|
251 |
}
|
252 |
else { // Can't find key, cache it to 404
|
253 |
-
// error_log("oc: add404\t\t\t[key] " . $
|
254 |
-
$this->_cache_404[ $
|
255 |
$this->count_miss ++;
|
256 |
}
|
257 |
}
|
@@ -272,7 +808,7 @@ class WP_Object_Cache {
|
|
272 |
}
|
273 |
|
274 |
if ( $found_in_oc ) {
|
275 |
-
$this->_cache[ $
|
276 |
}
|
277 |
|
278 |
$this->cache_total ++;
|
@@ -281,83 +817,137 @@ class WP_Object_Cache {
|
|
281 |
}
|
282 |
|
283 |
/**
|
284 |
-
*
|
285 |
*
|
286 |
-
* @since
|
287 |
* @access public
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
*/
|
289 |
-
public function
|
290 |
-
$
|
291 |
-
|
292 |
-
if ( is_object( $data ) ) {
|
293 |
-
$data = clone $data;
|
294 |
-
}
|
295 |
-
// error_log("oc: set \t\t\t[key] " . $final_key );
|
296 |
-
$this->_cache[ $final_key ] = $data;
|
297 |
-
|
298 |
-
if( array_key_exists( $final_key, $this->_cache_404 ) ) {
|
299 |
-
// error_log("oc: unset404\t\t\t[key] " . $final_key );
|
300 |
-
unset( $this->_cache_404[ $final_key ] );
|
301 |
-
}
|
302 |
|
303 |
-
|
304 |
-
$this->
|
305 |
-
$this->count_set ++;
|
306 |
}
|
307 |
|
308 |
-
|
309 |
-
$this->_transient_set( $key, $data, $group, $expire );
|
310 |
-
}
|
311 |
-
|
312 |
-
return true;
|
313 |
}
|
314 |
|
315 |
/**
|
316 |
-
*
|
|
|
|
|
317 |
*
|
318 |
* @since 1.8
|
319 |
* @access public
|
|
|
|
|
|
|
|
|
|
|
320 |
*/
|
321 |
-
public function
|
322 |
-
if (
|
323 |
return false;
|
324 |
}
|
325 |
|
326 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
|
328 |
-
if (
|
329 |
return false;
|
330 |
}
|
331 |
|
332 |
-
return $this->
|
333 |
}
|
334 |
|
335 |
/**
|
336 |
-
*
|
337 |
*
|
338 |
-
* @since
|
339 |
* @access public
|
|
|
|
|
|
|
|
|
|
|
340 |
*/
|
341 |
-
public function
|
342 |
-
$
|
343 |
|
344 |
-
|
345 |
-
|
346 |
}
|
347 |
|
348 |
-
return $
|
349 |
}
|
350 |
|
351 |
/**
|
352 |
* Increments numeric cache item's value.
|
353 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
* @since 1.8
|
355 |
* @access public
|
356 |
*/
|
357 |
public function incr_desr( $key, $offset = 1, $group = 'default', $incr = true ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
358 |
$cache_val = $this->get( $key, $group );
|
359 |
|
360 |
-
if (
|
361 |
return false;
|
362 |
}
|
363 |
|
@@ -384,36 +974,12 @@ class WP_Object_Cache {
|
|
384 |
}
|
385 |
|
386 |
/**
|
387 |
-
*
|
388 |
*
|
389 |
* @since 1.8
|
390 |
* @access public
|
391 |
-
*/
|
392 |
-
public function delete( $key, $group = 'default' ) {
|
393 |
-
|
394 |
-
$final_key = $this->_key( $key, $group );
|
395 |
-
|
396 |
-
if ( $this->_object_cache->store_transients( $group ) ) {
|
397 |
-
$this->_transient_del( $key, $group );
|
398 |
-
}
|
399 |
-
|
400 |
-
if ( array_key_exists( $final_key, $this->_cache ) ) {
|
401 |
-
unset( $this->_cache[ $final_key ] );
|
402 |
-
}
|
403 |
-
// error_log("oc: delete \t\t\t[key] " . $final_key );
|
404 |
-
|
405 |
-
if ( $this->_object_cache->is_non_persistent( $group ) ) {
|
406 |
-
return false;
|
407 |
-
}
|
408 |
-
|
409 |
-
return $this->_object_cache->delete( $final_key );
|
410 |
-
}
|
411 |
-
|
412 |
-
/**
|
413 |
-
* Clear all cached data
|
414 |
*
|
415 |
-
* @
|
416 |
-
* @access public
|
417 |
*/
|
418 |
public function flush() {
|
419 |
$this->_cache = array();
|
@@ -426,35 +992,29 @@ class WP_Object_Cache {
|
|
426 |
}
|
427 |
|
428 |
/**
|
429 |
-
*
|
430 |
*
|
431 |
* @since 1.8
|
432 |
* @access public
|
|
|
|
|
433 |
*/
|
434 |
public function add_global_groups( $groups ) {
|
|
|
|
|
435 |
$this->_object_cache->add_global_groups( $groups );
|
436 |
}
|
437 |
|
438 |
/**
|
439 |
-
*
|
440 |
*
|
441 |
* @since 1.8
|
442 |
* @access public
|
443 |
*/
|
444 |
public function add_non_persistent_groups( $groups ) {
|
445 |
-
$
|
446 |
-
}
|
447 |
-
|
448 |
-
/**
|
449 |
-
* Get the final key
|
450 |
-
*
|
451 |
-
* @since 1.8
|
452 |
-
* @access private
|
453 |
-
*/
|
454 |
-
private function _key( $key, $group = 'default' ) {
|
455 |
-
$prefix = $this->_object_cache->is_global( $group ) ? '' : $this->blog_prefix;
|
456 |
|
457 |
-
|
458 |
}
|
459 |
|
460 |
/**
|
@@ -463,6 +1023,7 @@ class WP_Object_Cache {
|
|
463 |
* This changes the blog ID used to create keys in blog specific groups.
|
464 |
*
|
465 |
* @since 1.8
|
|
|
466 |
*
|
467 |
* @param int $blog_id Blog ID.
|
468 |
*/
|
@@ -539,23 +1100,23 @@ class WP_Object_Cache {
|
|
539 |
$transient_option = '_transient_' . $transient;
|
540 |
if ( false === get_option( $transient_option ) ) {
|
541 |
$autoload = 'yes';
|
542 |
-
if ( $expiration ) {
|
543 |
$autoload = 'no';
|
544 |
-
add_option( $transient_timeout, time() + $expiration, '', 'no' );
|
545 |
}
|
546 |
$result = add_option( $transient_option, $value, '', $autoload );
|
547 |
} else {
|
548 |
// If expiration is requested, but the transient has no timeout option,
|
549 |
// delete, then re-create transient rather than update.
|
550 |
$update = true;
|
551 |
-
if ( $expiration ) {
|
552 |
if ( false === get_option( $transient_timeout ) ) {
|
553 |
delete_option( $transient_option );
|
554 |
-
add_option( $transient_timeout, time() + $expiration, '', 'no' );
|
555 |
$result = add_option( $transient_option, $value, '', 'no' );
|
556 |
$update = false;
|
557 |
} else {
|
558 |
-
update_option( $transient_timeout, time() + $expiration );
|
559 |
}
|
560 |
}
|
561 |
if ( $update ) {
|
@@ -569,12 +1130,12 @@ class WP_Object_Cache {
|
|
569 |
$transient_timeout = '_site_transient_timeout_' . $transient;
|
570 |
$option = '_site_transient_' . $transient;
|
571 |
if ( false === get_site_option( $option ) ) {
|
572 |
-
if ( $expiration )
|
573 |
-
add_site_option( $transient_timeout, time() + $expiration );
|
574 |
$result = add_site_option( $option, $value );
|
575 |
} else {
|
576 |
-
if ( $expiration )
|
577 |
-
update_site_option( $transient_timeout, time() + $expiration );
|
578 |
$result = update_site_option( $option, $value );
|
579 |
}
|
580 |
/**** Ori WP func end ****/
|
21 |
* Sets up Object Cache Global and assigns it.
|
22 |
*
|
23 |
* @since 1.8
|
24 |
+
*
|
25 |
+
* @global WP_Object_Cache $wp_object_cache
|
26 |
*/
|
27 |
function wp_cache_init() {
|
28 |
$GLOBALS['wp_object_cache'] = WP_Object_Cache::get_instance();
|
29 |
}
|
30 |
|
31 |
/**
|
32 |
+
* Adds data to the cache, if the cache key doesn't already exist.
|
33 |
*
|
34 |
* @since 1.8
|
35 |
+
*
|
36 |
+
* @see WP_Object_Cache::add()
|
37 |
+
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
|
38 |
+
*
|
39 |
+
* @param int|string $key The cache key to use for retrieval later.
|
40 |
+
* @param mixed $data The data to add to the cache.
|
41 |
+
* @param string $group Optional. The group to add the cache to. Enables the same key
|
42 |
+
* to be used across groups. Default empty.
|
43 |
+
* @param int $expire Optional. When the cache data should expire, in seconds.
|
44 |
+
* Default 0 (no expiration).
|
45 |
+
* @return bool True on success, false if cache key and group already exist.
|
46 |
*/
|
47 |
+
function wp_cache_add( $key, $data, $group = '', $expire = 0 ) {
|
48 |
global $wp_object_cache;
|
49 |
|
50 |
+
return $wp_object_cache->add( $key, $data, $group, (int) $expire );
|
51 |
}
|
52 |
|
53 |
/**
|
54 |
+
* Adds multiple values to the cache in one call.
|
55 |
*
|
56 |
+
* @since 5.4
|
57 |
+
*
|
58 |
+
* @see WP_Object_Cache::add_multiple()
|
59 |
+
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
|
60 |
+
*
|
61 |
+
* @param array $data Array of keys and values to be set.
|
62 |
+
* @param string $group Optional. Where the cache contents are grouped. Default empty.
|
63 |
+
* @param int $expire Optional. When to expire the cache contents, in seconds.
|
64 |
+
* Default 0 (no expiration).
|
65 |
+
* @return bool[] Array of return values, grouped by key. Each value is either
|
66 |
+
* true on success, or false if cache key and group already exist.
|
67 |
*/
|
68 |
+
function wp_cache_add_multiple( array $data, $group = '', $expire = 0 ) {
|
69 |
global $wp_object_cache;
|
70 |
|
71 |
+
return $wp_object_cache->add_multiple( $data, $group, $expire );
|
72 |
}
|
73 |
|
74 |
/**
|
75 |
+
* Replaces the contents of the cache with new data.
|
76 |
*
|
77 |
* @since 1.8
|
78 |
+
*
|
79 |
+
* @see WP_Object_Cache::replace()
|
80 |
+
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
|
81 |
+
*
|
82 |
+
* @param int|string $key The key for the cache data that should be replaced.
|
83 |
+
* @param mixed $data The new data to store in the cache.
|
84 |
+
* @param string $group Optional. The group for the cache data that should be replaced.
|
85 |
+
* Default empty.
|
86 |
+
* @param int $expire Optional. When to expire the cache contents, in seconds.
|
87 |
+
* Default 0 (no expiration).
|
88 |
+
* @return bool True if contents were replaced, false if original value does not exist.
|
89 |
*/
|
90 |
+
function wp_cache_replace( $key, $data, $group = '', $expire = 0 ) {
|
91 |
global $wp_object_cache;
|
92 |
|
93 |
+
return $wp_object_cache->replace( $key, $data, $group, (int) $expire );
|
94 |
}
|
95 |
|
96 |
/**
|
97 |
+
* Saves the data to the cache.
|
98 |
+
*
|
99 |
+
* Differs from wp_cache_add() and wp_cache_replace() in that it will always write data.
|
100 |
*
|
101 |
* @since 1.8
|
102 |
+
*
|
103 |
+
* @see WP_Object_Cache::set()
|
104 |
+
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
|
105 |
+
*
|
106 |
+
* @param int|string $key The cache key to use for retrieval later.
|
107 |
+
* @param mixed $data The contents to store in the cache.
|
108 |
+
* @param string $group Optional. Where to group the cache contents. Enables the same key
|
109 |
+
* to be used across groups. Default empty.
|
110 |
+
* @param int $expire Optional. When to expire the cache contents, in seconds.
|
111 |
+
* Default 0 (no expiration).
|
112 |
+
* @return bool True on success, false on failure.
|
113 |
*/
|
114 |
+
function wp_cache_set( $key, $data, $group = '', $expire = 0 ) {
|
115 |
global $wp_object_cache;
|
116 |
|
117 |
+
return $wp_object_cache->set( $key, $data, $group, (int) $expire );
|
118 |
}
|
119 |
|
120 |
/**
|
121 |
+
* Sets multiple values to the cache in one call.
|
122 |
*
|
123 |
+
* @since 5.4
|
124 |
+
*
|
125 |
+
* @see WP_Object_Cache::set_multiple()
|
126 |
+
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
|
127 |
+
*
|
128 |
+
* @param array $data Array of keys and values to be set.
|
129 |
+
* @param string $group Optional. Where the cache contents are grouped. Default empty.
|
130 |
+
* @param int $expire Optional. When to expire the cache contents, in seconds.
|
131 |
+
* Default 0 (no expiration).
|
132 |
+
* @return bool[] Array of return values, grouped by key. Each value is either
|
133 |
+
* true on success, or false on failure.
|
134 |
*/
|
135 |
+
function wp_cache_set_multiple( array $data, $group = '', $expire = 0 ) {
|
136 |
global $wp_object_cache;
|
137 |
|
138 |
+
return $wp_object_cache->set_multiple( $data, $group, $expire );
|
139 |
}
|
140 |
|
141 |
/**
|
142 |
+
* Retrieves the cache contents from the cache by key and group.
|
143 |
*
|
144 |
* @since 1.8
|
145 |
+
*
|
146 |
+
* @see WP_Object_Cache::get()
|
147 |
+
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
|
148 |
+
*
|
149 |
+
* @param int|string $key The key under which the cache contents are stored.
|
150 |
+
* @param string $group Optional. Where the cache contents are grouped. Default empty.
|
151 |
+
* @param bool $force Optional. Whether to force an update of the local cache
|
152 |
+
* from the persistent cache. Default false.
|
153 |
+
* @param bool $found Optional. Whether the key was found in the cache (passed by reference).
|
154 |
+
* Disambiguates a return of false, a storable value. Default null.
|
155 |
+
* @return mixed|false The cache contents on success, false on failure to retrieve contents.
|
156 |
*/
|
157 |
+
function wp_cache_get( $key, $group = '', $force = false, &$found = null ) {
|
158 |
global $wp_object_cache;
|
159 |
|
160 |
+
return $wp_object_cache->get( $key, $group, $force, $found );
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Retrieves multiple values from the cache in one call.
|
165 |
+
*
|
166 |
+
* @since 5.4
|
167 |
+
*
|
168 |
+
* @see WP_Object_Cache::get_multiple()
|
169 |
+
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
|
170 |
+
*
|
171 |
+
* @param array $keys Array of keys under which the cache contents are stored.
|
172 |
+
* @param string $group Optional. Where the cache contents are grouped. Default empty.
|
173 |
+
* @param bool $force Optional. Whether to force an update of the local cache
|
174 |
+
* from the persistent cache. Default false.
|
175 |
+
* @return array Array of return values, grouped by key. Each value is either
|
176 |
+
* the cache contents on success, or false on failure.
|
177 |
+
*/
|
178 |
+
function wp_cache_get_multiple( $keys, $group = '', $force = false ) {
|
179 |
+
global $wp_object_cache;
|
180 |
+
|
181 |
+
return $wp_object_cache->get_multiple( $keys, $group, $force );
|
182 |
}
|
183 |
|
184 |
/**
|
185 |
* Removes the cache contents matching key and group.
|
186 |
*
|
187 |
* @since 1.8
|
188 |
+
*
|
189 |
+
* @see WP_Object_Cache::delete()
|
190 |
+
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
|
191 |
+
*
|
192 |
+
* @param int|string $key What the contents in the cache are called.
|
193 |
+
* @param string $group Optional. Where the cache contents are grouped. Default empty.
|
194 |
+
* @return bool True on successful removal, false on failure.
|
195 |
*/
|
196 |
function wp_cache_delete( $key, $group = '' ) {
|
197 |
global $wp_object_cache;
|
199 |
return $wp_object_cache->delete( $key, $group );
|
200 |
}
|
201 |
|
202 |
+
/**
|
203 |
+
* Deletes multiple values from the cache in one call.
|
204 |
+
*
|
205 |
+
* @since 5.4
|
206 |
+
*
|
207 |
+
* @see WP_Object_Cache::delete_multiple()
|
208 |
+
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
|
209 |
+
*
|
210 |
+
* @param array $keys Array of keys under which the cache to deleted.
|
211 |
+
* @param string $group Optional. Where the cache contents are grouped. Default empty.
|
212 |
+
* @return bool[] Array of return values, grouped by key. Each value is either
|
213 |
+
* true on success, or false if the contents were not deleted.
|
214 |
+
*/
|
215 |
+
function wp_cache_delete_multiple( array $keys, $group = '' ) {
|
216 |
+
global $wp_object_cache;
|
217 |
+
|
218 |
+
return $wp_object_cache->delete_multiple( $keys, $group );
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Increments numeric cache item's value.
|
223 |
+
*
|
224 |
+
* @since 1.8
|
225 |
+
*
|
226 |
+
* @see WP_Object_Cache::incr()
|
227 |
+
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
|
228 |
+
*
|
229 |
+
* @param int|string $key The key for the cache contents that should be incremented.
|
230 |
+
* @param int $offset Optional. The amount by which to increment the item's value.
|
231 |
+
* Default 1.
|
232 |
+
* @param string $group Optional. The group the key is in. Default empty.
|
233 |
+
* @return int|false The item's new value on success, false on failure.
|
234 |
+
*/
|
235 |
+
function wp_cache_incr( $key, $offset = 1, $group = '' ) {
|
236 |
+
global $wp_object_cache;
|
237 |
+
|
238 |
+
return $wp_object_cache->incr( $key, $offset, $group );
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Decrements numeric cache item's value.
|
243 |
+
*
|
244 |
+
* @since 1.8
|
245 |
+
*
|
246 |
+
* @see WP_Object_Cache::decr()
|
247 |
+
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
|
248 |
+
*
|
249 |
+
* @param int|string $key The cache key to decrement.
|
250 |
+
* @param int $offset Optional. The amount by which to decrement the item's value.
|
251 |
+
* Default 1.
|
252 |
+
* @param string $group Optional. The group the key is in. Default empty.
|
253 |
+
* @return int|false The item's new value on success, false on failure.
|
254 |
+
*/
|
255 |
+
function wp_cache_decr( $key, $offset = 1, $group = '' ) {
|
256 |
+
global $wp_object_cache;
|
257 |
+
|
258 |
+
return $wp_object_cache->decr( $key, $offset, $group );
|
259 |
+
}
|
260 |
+
|
261 |
/**
|
262 |
* Removes all cache items.
|
263 |
*
|
264 |
* @since 1.8
|
265 |
+
*
|
266 |
+
* @see WP_Object_Cache::flush()
|
267 |
+
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
|
268 |
+
*
|
269 |
+
* @return bool True on success, false on failure.
|
270 |
*/
|
271 |
function wp_cache_flush() {
|
272 |
global $wp_object_cache;
|
274 |
return $wp_object_cache->flush();
|
275 |
}
|
276 |
|
277 |
+
/**
|
278 |
+
* Removes all cache items from the in-memory runtime cache.
|
279 |
+
*
|
280 |
+
* @since 5.4
|
281 |
+
*
|
282 |
+
* @see WP_Object_Cache::flush()
|
283 |
+
*
|
284 |
+
* @return bool True on success, false on failure.
|
285 |
+
*/
|
286 |
+
function wp_cache_flush_runtime() {
|
287 |
+
return wp_cache_flush();
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Removes all cache items in a group, if the object cache implementation supports it.
|
292 |
+
*
|
293 |
+
* Before calling this function, always check for group flushing support using the
|
294 |
+
* `wp_cache_supports( 'flush_group' )` function.
|
295 |
+
*
|
296 |
+
* @since 5.4
|
297 |
+
*
|
298 |
+
* @see WP_Object_Cache::flush_group()
|
299 |
+
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
|
300 |
+
*
|
301 |
+
* @param string $group Name of group to remove from cache.
|
302 |
+
* @return bool True if group was flushed, false otherwise.
|
303 |
+
*/
|
304 |
+
function wp_cache_flush_group( $group ) {
|
305 |
+
global $wp_object_cache;
|
306 |
+
|
307 |
+
return $wp_object_cache->flush_group( $group );
|
308 |
+
}
|
309 |
+
|
310 |
+
/**
|
311 |
+
* Determines whether the object cache implementation supports a particular feature.
|
312 |
+
*
|
313 |
+
* @since 5.4
|
314 |
+
*
|
315 |
+
* @param string $feature Name of the feature to check for. Possible values include:
|
316 |
+
* 'add_multiple', 'set_multiple', 'get_multiple', 'delete_multiple',
|
317 |
+
* 'flush_runtime', 'flush_group'.
|
318 |
+
* @return bool True if the feature is supported, false otherwise.
|
319 |
+
*/
|
320 |
+
function wp_cache_supports( $feature ) {
|
321 |
+
switch ( $feature ) {
|
322 |
+
case 'add_multiple':
|
323 |
+
case 'set_multiple':
|
324 |
+
case 'get_multiple':
|
325 |
+
case 'delete_multiple':
|
326 |
+
case 'flush_runtime':
|
327 |
+
case 'flush_group':
|
328 |
+
return true;
|
329 |
+
|
330 |
+
default:
|
331 |
+
return false;
|
332 |
+
}
|
333 |
+
}
|
334 |
+
|
335 |
+
/**
|
336 |
+
* Closes the cache.
|
337 |
+
*
|
338 |
+
* This function has ceased to do anything since WordPress 2.5. The
|
339 |
+
* functionality was removed along with the rest of the persistent cache.
|
340 |
+
*
|
341 |
+
* This does not mean that plugins can't implement this function when they need
|
342 |
+
* to make sure that the cache is cleaned up after WordPress no longer needs it.
|
343 |
+
*
|
344 |
+
* @since 1.8
|
345 |
+
*
|
346 |
+
* @return true Always returns true.
|
347 |
+
*/
|
348 |
+
function wp_cache_close() {
|
349 |
+
return true;
|
350 |
+
}
|
351 |
+
|
352 |
/**
|
353 |
* Adds a group or set of groups to the list of global groups.
|
354 |
*
|
355 |
* @since 1.8
|
356 |
+
*
|
357 |
+
* @see WP_Object_Cache::add_global_groups()
|
358 |
+
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
|
359 |
+
*
|
360 |
+
* @param string|string[] $groups A group or an array of groups to add.
|
361 |
*/
|
362 |
function wp_cache_add_global_groups( $groups ) {
|
363 |
global $wp_object_cache;
|
369 |
* Adds a group or set of groups to the list of non-persistent groups.
|
370 |
*
|
371 |
* @since 1.8
|
372 |
+
*
|
373 |
+
* @param string|string[] $groups A group or an array of groups to add.
|
374 |
*/
|
375 |
function wp_cache_add_non_persistent_groups( $groups ) {
|
376 |
global $wp_object_cache;
|
396 |
$wp_object_cache->switch_to_blog( $blog_id );
|
397 |
}
|
398 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
399 |
|
400 |
|
401 |
class WP_Object_Cache {
|
413 |
private $count_miss = 0;
|
414 |
private $count_set = 0;
|
415 |
|
416 |
+
protected $global_groups = array();
|
417 |
private $blog_prefix;
|
418 |
+
private $multisite;
|
419 |
|
420 |
/**
|
421 |
+
* Init.
|
422 |
*
|
423 |
* @since 1.8
|
424 |
*/
|
436 |
}
|
437 |
|
438 |
/**
|
439 |
+
* Makes private properties readable for backward compatibility.
|
440 |
+
*
|
441 |
+
* @since 5.4
|
442 |
+
* @access public
|
443 |
+
*
|
444 |
+
* @param string $name Property to get.
|
445 |
+
* @return mixed Property.
|
446 |
+
*/
|
447 |
+
public function __get( $name ) {
|
448 |
+
return $this->$name;
|
449 |
+
}
|
450 |
+
|
451 |
+
/**
|
452 |
+
* Makes private properties settable for backward compatibility.
|
453 |
+
*
|
454 |
+
* @since 5.4
|
455 |
+
* @access public
|
456 |
+
*
|
457 |
+
* @param string $name Property to set.
|
458 |
+
* @param mixed $value Property value.
|
459 |
+
* @return mixed Newly-set property.
|
460 |
+
*/
|
461 |
+
public function __set( $name, $value ) {
|
462 |
+
return $this->$name = $value;
|
463 |
+
}
|
464 |
+
|
465 |
+
/**
|
466 |
+
* Makes private properties checkable for backward compatibility.
|
467 |
+
*
|
468 |
+
* @since 5.4
|
469 |
+
* @access public
|
470 |
+
*
|
471 |
+
* @param string $name Property to check if set.
|
472 |
+
* @return bool Whether the property is set.
|
473 |
+
*/
|
474 |
+
public function __isset( $name ) {
|
475 |
+
return isset( $this->$name );
|
476 |
+
}
|
477 |
+
|
478 |
+
/**
|
479 |
+
* Makes private properties un-settable for backward compatibility.
|
480 |
+
*
|
481 |
+
* @since 5.4
|
482 |
+
* @access public
|
483 |
+
*
|
484 |
+
* @param string $name Property to unset.
|
485 |
+
*/
|
486 |
+
public function __unset( $name ) {
|
487 |
+
unset( $this->$name );
|
488 |
+
}
|
489 |
+
|
490 |
+
/**
|
491 |
+
* Serves as a utility function to determine whether a key is valid.
|
492 |
+
*
|
493 |
+
* @since 5.4
|
494 |
+
* @access protected
|
495 |
+
*
|
496 |
+
* @param int|string $key Cache key to check for validity.
|
497 |
+
* @return bool Whether the key is valid.
|
498 |
+
*/
|
499 |
+
protected function is_valid_key( $key ) {
|
500 |
+
if ( is_int( $key ) ) {
|
501 |
+
return true;
|
502 |
+
}
|
503 |
+
|
504 |
+
if ( is_string( $key ) && trim( $key ) !== '' ) {
|
505 |
+
return true;
|
506 |
+
}
|
507 |
+
|
508 |
+
$type = gettype( $key );
|
509 |
+
|
510 |
+
if ( ! function_exists( '__' ) ) {
|
511 |
+
wp_load_translations_early();
|
512 |
+
}
|
513 |
+
|
514 |
+
$message = is_string( $key )
|
515 |
+
? __( 'Cache key must not be an empty string.' )
|
516 |
+
/* translators: %s: The type of the given cache key. */
|
517 |
+
: sprintf( __( 'Cache key must be integer or non-empty string, %s given.' ), $type );
|
518 |
+
|
519 |
+
_doing_it_wrong(
|
520 |
+
sprintf( '%s::%s', __CLASS__, debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 2 )[1]['function'] ),
|
521 |
+
$message,
|
522 |
+
'6.1.0'
|
523 |
+
);
|
524 |
+
|
525 |
+
return false;
|
526 |
+
}
|
527 |
+
|
528 |
+
/**
|
529 |
+
* Get the final key.
|
530 |
+
*
|
531 |
+
* @since 1.8
|
532 |
+
* @access private
|
533 |
+
*/
|
534 |
+
private function _key( $key, $group = 'default' ) {
|
535 |
+
if ( empty( $group ) ) {
|
536 |
+
$group = 'default';
|
537 |
+
}
|
538 |
+
|
539 |
+
$prefix = $this->_object_cache->is_global( $group ) ? '' : $this->blog_prefix;
|
540 |
+
|
541 |
+
return LSOC_PREFIX . $prefix . $group . '.' . $key;
|
542 |
+
}
|
543 |
+
|
544 |
+
/**
|
545 |
+
* Output debug info.
|
546 |
*
|
547 |
* @since 1.8
|
548 |
* @access public
|
549 |
*/
|
550 |
public function debug() {
|
551 |
+
return ' [total] ' . $this->cache_total
|
552 |
. ' [hit_incall] ' . $this->count_hit_incall
|
553 |
. ' [hit] ' . $this->count_hit
|
554 |
. ' [miss_incall] ' . $this->count_miss_incall
|
555 |
. ' [miss] ' . $this->count_miss
|
556 |
. ' [set] ' . $this->count_set;
|
557 |
+
}
|
558 |
|
559 |
+
/**
|
560 |
+
* Adds data to the cache if it doesn't already exist.
|
561 |
+
*
|
562 |
+
* @since 1.8
|
563 |
+
* @access public
|
564 |
+
*
|
565 |
+
* @uses WP_Object_Cache::_exists() Checks to see if the cache already has data.
|
566 |
+
* @uses WP_Object_Cache::set() Sets the data after the checking the cache
|
567 |
+
* contents existence.
|
568 |
+
*
|
569 |
+
* @param int|string $key What to call the contents in the cache.
|
570 |
+
* @param mixed $data The contents to store in the cache.
|
571 |
+
* @param string $group Optional. Where to group the cache contents. Default 'default'.
|
572 |
+
* @param int $expire Optional. When to expire the cache contents, in seconds.
|
573 |
+
* Default 0 (no expiration).
|
574 |
+
* @return bool True on success, false if cache key and group already exist.
|
575 |
+
*/
|
576 |
+
public function add( $key, $data, $group = 'default', $expire = 0 ) {
|
577 |
+
if ( wp_suspend_cache_addition() ) {
|
578 |
+
return false;
|
579 |
+
}
|
580 |
+
|
581 |
+
if ( ! $this->is_valid_key( $key ) ) {
|
582 |
+
return false;
|
583 |
+
}
|
584 |
+
|
585 |
+
if ( empty( $group ) ) {
|
586 |
+
$group = 'default';
|
587 |
+
}
|
588 |
+
|
589 |
+
$id = $this->_key( $key, $group );
|
590 |
+
|
591 |
+
if ( array_key_exists( $id, $this->_cache ) ) {
|
592 |
+
return false;
|
593 |
+
}
|
594 |
+
|
595 |
+
return $this->set( $key, $data, $group, (int) $expire );
|
596 |
}
|
597 |
|
598 |
/**
|
599 |
+
* Adds multiple values to the cache in one call.
|
600 |
*
|
601 |
+
* @since 5.4
|
602 |
+
* @access public
|
603 |
+
*
|
604 |
+
* @param array $data Array of keys and values to be added.
|
605 |
+
* @param string $group Optional. Where the cache contents are grouped. Default empty.
|
606 |
+
* @param int $expire Optional. When to expire the cache contents, in seconds.
|
607 |
+
* Default 0 (no expiration).
|
608 |
+
* @return bool[] Array of return values, grouped by key. Each value is either
|
609 |
+
* true on success, or false if cache key and group already exist.
|
610 |
+
*/
|
611 |
+
public function add_multiple( array $data, $group = '', $expire = 0 ) {
|
612 |
+
$values = array();
|
613 |
+
|
614 |
+
foreach ( $data as $key => $value ) {
|
615 |
+
$values[ $key ] = $this->add( $key, $value, $group, $expire );
|
616 |
+
}
|
617 |
+
|
618 |
+
return $values;
|
619 |
+
}
|
620 |
+
|
621 |
+
/**
|
622 |
+
* Replaces the contents in the cache, if contents already exist.
|
623 |
+
*
|
624 |
+
* @since 1.8
|
625 |
+
* @access public
|
626 |
+
*
|
627 |
+
* @see WP_Object_Cache::set()
|
628 |
+
*
|
629 |
+
* @param int|string $key What to call the contents in the cache.
|
630 |
+
* @param mixed $data The contents to store in the cache.
|
631 |
+
* @param string $group Optional. Where to group the cache contents. Default 'default'.
|
632 |
+
* @param int $expire Optional. When to expire the cache contents, in seconds.
|
633 |
+
* Default 0 (no expiration).
|
634 |
+
* @return bool True if contents were replaced, false if original value does not exist.
|
635 |
+
*/
|
636 |
+
public function replace( $key, $data, $group = 'default', $expire = 0 ) {
|
637 |
+
if ( ! $this->is_valid_key( $key ) ) {
|
638 |
+
return false;
|
639 |
+
}
|
640 |
+
|
641 |
+
if ( empty( $group ) ) {
|
642 |
+
$group = 'default';
|
643 |
+
}
|
644 |
+
|
645 |
+
$id = $this->_key( $key, $group );
|
646 |
+
|
647 |
+
if ( ! array_key_exists( $id, $this->_cache ) ) {
|
648 |
+
return false;
|
649 |
+
}
|
650 |
+
|
651 |
+
return $this->set( $key, $data, $group, (int) $expire );
|
652 |
+
}
|
653 |
+
|
654 |
+
/**
|
655 |
+
* Sets the data contents into the cache.
|
656 |
+
*
|
657 |
+
* The cache contents are grouped by the $group parameter followed by the
|
658 |
+
* $key. This allows for duplicate IDs in unique groups. Therefore, naming of
|
659 |
+
* the group should be used with care and should follow normal function
|
660 |
+
* naming guidelines outside of core WordPress usage.
|
661 |
+
*
|
662 |
+
* The $expire parameter is not used, because the cache will automatically
|
663 |
+
* expire for each time a page is accessed and PHP finishes. The method is
|
664 |
+
* more for cache plugins which use files.
|
665 |
+
*
|
666 |
+
* @since 1.8
|
667 |
+
* @since 5.4 Returns false if cache key is invalid.
|
668 |
+
* @access public
|
669 |
+
*
|
670 |
+
* @param int|string $key What to call the contents in the cache.
|
671 |
+
* @param mixed $data The contents to store in the cache.
|
672 |
+
* @param string $group Optional. Where to group the cache contents. Default 'default'.
|
673 |
+
* @param int $expire Optional. When to expire the cache contents, in seconds.
|
674 |
+
* Default 0 (no expiration).
|
675 |
+
* @return bool True if contents were set, false if key is invalid.
|
676 |
+
*/
|
677 |
+
public function set( $key, $data, $group = 'default', $expire = 0 ) {
|
678 |
+
if ( ! $this->is_valid_key( $key ) ) {
|
679 |
+
return false;
|
680 |
+
}
|
681 |
+
|
682 |
+
if ( empty( $group ) ) {
|
683 |
+
$group = 'default';
|
684 |
+
}
|
685 |
+
|
686 |
+
$id = $this->_key( $key, $group );
|
687 |
+
|
688 |
+
if ( is_object( $data ) ) {
|
689 |
+
$data = clone $data;
|
690 |
+
}
|
691 |
+
// error_log("oc: set \t\t\t[key] " . $id );
|
692 |
+
$this->_cache[ $id ] = $data;
|
693 |
+
|
694 |
+
if( array_key_exists( $id, $this->_cache_404 ) ) {
|
695 |
+
// error_log("oc: unset404\t\t\t[key] " . $id );
|
696 |
+
unset( $this->_cache_404[ $id ] );
|
697 |
+
}
|
698 |
+
|
699 |
+
if ( ! $this->_object_cache->is_non_persistent( $group ) ) {
|
700 |
+
$this->_object_cache->set( $id, serialize( array( 'data' => $data ) ), (int) $expire );
|
701 |
+
$this->count_set ++;
|
702 |
+
}
|
703 |
+
|
704 |
+
if ( $this->_object_cache->store_transients( $group ) ) {
|
705 |
+
$this->_transient_set( $key, $data, $group, (int) $expire );
|
706 |
+
}
|
707 |
+
|
708 |
+
return true;
|
709 |
+
}
|
710 |
+
|
711 |
+
/**
|
712 |
+
* Sets multiple values to the cache in one call.
|
713 |
+
*
|
714 |
+
* @since 5.4
|
715 |
+
* @access public
|
716 |
+
*
|
717 |
+
* @param array $data Array of key and value to be set.
|
718 |
+
* @param string $group Optional. Where the cache contents are grouped. Default empty.
|
719 |
+
* @param int $expire Optional. When to expire the cache contents, in seconds.
|
720 |
+
* Default 0 (no expiration).
|
721 |
+
* @return bool[] Array of return values, grouped by key. Each value is always true.
|
722 |
+
*/
|
723 |
+
public function set_multiple( array $data, $group = '', $expire = 0 ) {
|
724 |
+
$values = array();
|
725 |
+
|
726 |
+
foreach ( $data as $key => $value ) {
|
727 |
+
$values[ $key ] = $this->set( $key, $value, $group, $expire );
|
728 |
+
}
|
729 |
+
|
730 |
+
return $values;
|
731 |
+
}
|
732 |
+
|
733 |
+
/**
|
734 |
+
* Retrieves the cache contents, if it exists.
|
735 |
+
*
|
736 |
+
* The contents will be first attempted to be retrieved by searching by the
|
737 |
+
* key in the cache group. If the cache is hit (success) then the contents
|
738 |
+
* are returned.
|
739 |
+
*
|
740 |
+
* On failure, the number of cache misses will be incremented.
|
741 |
+
*
|
742 |
+
* @since 1.8
|
743 |
* @access public
|
744 |
+
*
|
745 |
+
* @param int|string $key The key under which the cache contents are stored.
|
746 |
+
* @param string $group Optional. Where the cache contents are grouped. Default 'default'.
|
747 |
+
* @param bool $force Optional. Unused. Whether to force an update of the local cache
|
748 |
+
* from the persistent cache. Default false.
|
749 |
+
* @param bool $found Optional. Whether the key was found in the cache (passed by reference).
|
750 |
+
* Disambiguates a return of false, a storable value. Default null.
|
751 |
+
* @return mixed|false The cache contents on success, false on failure to retrieve contents.
|
752 |
*/
|
753 |
public function get( $key, $group = 'default', $force = false, &$found = null ) {
|
754 |
+
if ( ! $this->is_valid_key( $key ) ) {
|
755 |
+
return false;
|
756 |
+
}
|
757 |
+
|
758 |
+
if ( empty( $group ) ) {
|
759 |
+
$group = 'default';
|
760 |
+
}
|
761 |
+
|
762 |
+
$id = $this->_key( $key, $group );
|
763 |
+
|
764 |
// error_log('');
|
765 |
+
// error_log("oc: get \t\t\t[key] " . $id . ( $force ? "\t\t\t [forced] " : '' ) );
|
766 |
$found = false;
|
767 |
$found_in_oc = false;
|
768 |
$cache_val = false;
|
769 |
+
if ( array_key_exists( $id, $this->_cache ) && ! $force ) {
|
770 |
$found = true;
|
771 |
+
$cache_val = $this->_cache[ $id ];
|
772 |
$this->count_hit_incall ++;
|
773 |
}
|
774 |
+
elseif ( ! array_key_exists( $id, $this->_cache_404 ) && ! $this->_object_cache->is_non_persistent( $group ) ) {
|
775 |
+
$v = $this->_object_cache->get( $id );
|
776 |
|
777 |
if ( $v !== null ) {
|
778 |
$v = @maybe_unserialize( $v );
|
786 |
$cache_val = $v[ 'data' ];
|
787 |
}
|
788 |
else { // Can't find key, cache it to 404
|
789 |
+
// error_log("oc: add404\t\t\t[key] " . $id );
|
790 |
+
$this->_cache_404[ $id ] = 1;
|
791 |
$this->count_miss ++;
|
792 |
}
|
793 |
}
|
808 |
}
|
809 |
|
810 |
if ( $found_in_oc ) {
|
811 |
+
$this->_cache[ $id ] = $cache_val;
|
812 |
}
|
813 |
|
814 |
$this->cache_total ++;
|
817 |
}
|
818 |
|
819 |
/**
|
820 |
+
* Retrieves multiple values from the cache in one call.
|
821 |
*
|
822 |
+
* @since 5.4
|
823 |
* @access public
|
824 |
+
*
|
825 |
+
* @param array $keys Array of keys under which the cache contents are stored.
|
826 |
+
* @param string $group Optional. Where the cache contents are grouped. Default 'default'.
|
827 |
+
* @param bool $force Optional. Whether to force an update of the local cache
|
828 |
+
* from the persistent cache. Default false.
|
829 |
+
* @return array Array of return values, grouped by key. Each value is either
|
830 |
+
* the cache contents on success, or false on failure.
|
831 |
*/
|
832 |
+
public function get_multiple( $keys, $group = 'default', $force = false ) {
|
833 |
+
$values = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
834 |
|
835 |
+
foreach ( $keys as $key ) {
|
836 |
+
$values[ $key ] = $this->get( $key, $group, $force );
|
|
|
837 |
}
|
838 |
|
839 |
+
return $values;
|
|
|
|
|
|
|
|
|
840 |
}
|
841 |
|
842 |
/**
|
843 |
+
* Removes the contents of the cache key in the group.
|
844 |
+
*
|
845 |
+
* If the cache key does not exist in the group, then nothing will happen.
|
846 |
*
|
847 |
* @since 1.8
|
848 |
* @access public
|
849 |
+
*
|
850 |
+
* @param int|string $key What the contents in the cache are called.
|
851 |
+
* @param string $group Optional. Where the cache contents are grouped. Default 'default'.
|
852 |
+
* @param bool $deprecated Optional. Unused. Default false.
|
853 |
+
* @return bool True on success, false if the contents were not deleted.
|
854 |
*/
|
855 |
+
public function delete( $key, $group = 'default', $deprecated = false ) {
|
856 |
+
if ( ! $this->is_valid_key( $key ) ) {
|
857 |
return false;
|
858 |
}
|
859 |
|
860 |
+
if ( empty( $group ) ) {
|
861 |
+
$group = 'default';
|
862 |
+
}
|
863 |
+
|
864 |
+
$id = $this->_key( $key, $group );
|
865 |
+
|
866 |
+
if ( $this->_object_cache->store_transients( $group ) ) {
|
867 |
+
$this->_transient_del( $key, $group );
|
868 |
+
}
|
869 |
+
|
870 |
+
if ( array_key_exists( $id, $this->_cache ) ) {
|
871 |
+
unset( $this->_cache[ $id ] );
|
872 |
+
}
|
873 |
+
// error_log("oc: delete \t\t\t[key] " . $id );
|
874 |
|
875 |
+
if ( $this->_object_cache->is_non_persistent( $group ) ) {
|
876 |
return false;
|
877 |
}
|
878 |
|
879 |
+
return $this->_object_cache->delete( $id );
|
880 |
}
|
881 |
|
882 |
/**
|
883 |
+
* Deletes multiple values from the cache in one call.
|
884 |
*
|
885 |
+
* @since 5.4
|
886 |
* @access public
|
887 |
+
*
|
888 |
+
* @param array $keys Array of keys to be deleted.
|
889 |
+
* @param string $group Optional. Where the cache contents are grouped. Default empty.
|
890 |
+
* @return bool[] Array of return values, grouped by key. Each value is either
|
891 |
+
* true on success, or false if the contents were not deleted.
|
892 |
*/
|
893 |
+
public function delete_multiple( array $keys, $group = '' ) {
|
894 |
+
$values = array();
|
895 |
|
896 |
+
foreach ( $keys as $key ) {
|
897 |
+
$values[ $key ] = $this->delete( $key, $group );
|
898 |
}
|
899 |
|
900 |
+
return $values;
|
901 |
}
|
902 |
|
903 |
/**
|
904 |
* Increments numeric cache item's value.
|
905 |
*
|
906 |
+
* @since 5.4
|
907 |
+
*
|
908 |
+
* @param int|string $key The cache key to increment.
|
909 |
+
* @param int $offset Optional. The amount by which to increment the item's value.
|
910 |
+
* Default 1.
|
911 |
+
* @param string $group Optional. The group the key is in. Default 'default'.
|
912 |
+
* @return int|false The item's new value on success, false on failure.
|
913 |
+
*/
|
914 |
+
public function incr( $key, $offset = 1, $group = 'default' ) {
|
915 |
+
return incr_desr( $key, $offset, $group, true );
|
916 |
+
}
|
917 |
+
|
918 |
+
/**
|
919 |
+
* Decrements numeric cache item's value.
|
920 |
+
*
|
921 |
+
* @since 5.4
|
922 |
+
*
|
923 |
+
* @param int|string $key The cache key to decrement.
|
924 |
+
* @param int $offset Optional. The amount by which to decrement the item's value.
|
925 |
+
* Default 1.
|
926 |
+
* @param string $group Optional. The group the key is in. Default 'default'.
|
927 |
+
* @return int|false The item's new value on success, false on failure.
|
928 |
+
*/
|
929 |
+
public function decr( $key, $offset = 1, $group = 'default' ) {
|
930 |
+
return incr_desr( $key, $offset, $group, false );
|
931 |
+
}
|
932 |
+
|
933 |
+
/**
|
934 |
+
* Increments or decrements numeric cache item's value.
|
935 |
+
*
|
936 |
* @since 1.8
|
937 |
* @access public
|
938 |
*/
|
939 |
public function incr_desr( $key, $offset = 1, $group = 'default', $incr = true ) {
|
940 |
+
if ( ! $this->is_valid_key( $key ) ) {
|
941 |
+
return false;
|
942 |
+
}
|
943 |
+
|
944 |
+
if ( empty( $group ) ) {
|
945 |
+
$group = 'default';
|
946 |
+
}
|
947 |
+
|
948 |
$cache_val = $this->get( $key, $group );
|
949 |
|
950 |
+
if ( false === $cache_val ) {
|
951 |
return false;
|
952 |
}
|
953 |
|
974 |
}
|
975 |
|
976 |
/**
|
977 |
+
* Clears the object cache of all data.
|
978 |
*
|
979 |
* @since 1.8
|
980 |
* @access public
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
981 |
*
|
982 |
+
* @return true Always returns true.
|
|
|
983 |
*/
|
984 |
public function flush() {
|
985 |
$this->_cache = array();
|
992 |
}
|
993 |
|
994 |
/**
|
995 |
+
* Sets the list of global cache groups.
|
996 |
*
|
997 |
* @since 1.8
|
998 |
* @access public
|
999 |
+
*
|
1000 |
+
* @param string|string[] $groups List of groups that are global.
|
1001 |
*/
|
1002 |
public function add_global_groups( $groups ) {
|
1003 |
+
$groups = (array) $groups;
|
1004 |
+
|
1005 |
$this->_object_cache->add_global_groups( $groups );
|
1006 |
}
|
1007 |
|
1008 |
/**
|
1009 |
+
* Sets the list of non-persistent cache groups.
|
1010 |
*
|
1011 |
* @since 1.8
|
1012 |
* @access public
|
1013 |
*/
|
1014 |
public function add_non_persistent_groups( $groups ) {
|
1015 |
+
$groups = (array) $groups;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1016 |
|
1017 |
+
$this->_object_cache->add_non_persistent_groups( $groups );
|
1018 |
}
|
1019 |
|
1020 |
/**
|
1023 |
* This changes the blog ID used to create keys in blog specific groups.
|
1024 |
*
|
1025 |
* @since 1.8
|
1026 |
+
* @access public
|
1027 |
*
|
1028 |
* @param int $blog_id Blog ID.
|
1029 |
*/
|
1100 |
$transient_option = '_transient_' . $transient;
|
1101 |
if ( false === get_option( $transient_option ) ) {
|
1102 |
$autoload = 'yes';
|
1103 |
+
if ( (int) $expiration ) {
|
1104 |
$autoload = 'no';
|
1105 |
+
add_option( $transient_timeout, time() + (int) $expiration, '', 'no' );
|
1106 |
}
|
1107 |
$result = add_option( $transient_option, $value, '', $autoload );
|
1108 |
} else {
|
1109 |
// If expiration is requested, but the transient has no timeout option,
|
1110 |
// delete, then re-create transient rather than update.
|
1111 |
$update = true;
|
1112 |
+
if ( (int) $expiration ) {
|
1113 |
if ( false === get_option( $transient_timeout ) ) {
|
1114 |
delete_option( $transient_option );
|
1115 |
+
add_option( $transient_timeout, time() + (int) $expiration, '', 'no' );
|
1116 |
$result = add_option( $transient_option, $value, '', 'no' );
|
1117 |
$update = false;
|
1118 |
} else {
|
1119 |
+
update_option( $transient_timeout, time() + (int) $expiration );
|
1120 |
}
|
1121 |
}
|
1122 |
if ( $update ) {
|
1130 |
$transient_timeout = '_site_transient_timeout_' . $transient;
|
1131 |
$option = '_site_transient_' . $transient;
|
1132 |
if ( false === get_site_option( $option ) ) {
|
1133 |
+
if ( (int) $expiration )
|
1134 |
+
add_site_option( $transient_timeout, time() + (int) $expiration );
|
1135 |
$result = add_site_option( $option, $value );
|
1136 |
} else {
|
1137 |
+
if ( (int) $expiration )
|
1138 |
+
update_site_option( $transient_timeout, time() + (int) $expiration );
|
1139 |
$result = update_site_option( $option, $value );
|
1140 |
}
|
1141 |
/**** Ori WP func end ****/
|
src/optimize.cls.php
CHANGED
@@ -224,7 +224,9 @@ class Optimize extends Base {
|
|
224 |
}
|
225 |
|
226 |
// Check if hit URI excludes
|
227 |
-
|
|
|
|
|
228 |
if ( $result ) {
|
229 |
Debug2::debug( '[Optm] bypass: hit URI Excludes setting: ' . $result );
|
230 |
return $content;
|
224 |
}
|
225 |
|
226 |
// Check if hit URI excludes
|
227 |
+
add_filter( 'litespeed_optm_uri_exc', array( $this->cls( 'Data' ), 'load_optm_uri_exc' ) );
|
228 |
+
$excludes = apply_filters( 'litespeed_optm_uri_exc', $this->conf( self::O_OPTM_EXC ) );
|
229 |
+
$result = Utility::str_hit_array( $_SERVER[ 'REQUEST_URI' ], $excludes );
|
230 |
if ( $result ) {
|
231 |
Debug2::debug( '[Optm] bypass: hit URI Excludes setting: ' . $result );
|
232 |
return $content;
|
src/purge.cls.php
CHANGED
@@ -343,8 +343,8 @@ class Purge extends Base {
|
|
343 |
* @access private
|
344 |
*/
|
345 |
private function _purge_all_cssjs( $silence = false ) {
|
346 |
-
if ( defined( 'LITESPEED_DID_send_headers' ) ) {
|
347 |
-
self::debug( "❌ Bypassed cssjs delete as header sent (lscache purge after this point will fail)" );
|
348 |
return;
|
349 |
}
|
350 |
$this->_purge_all_lscache( $silence ); // Purge CSSJS must purge lscache too to avoid 404
|
@@ -488,7 +488,7 @@ class Purge extends Base {
|
|
488 |
}
|
489 |
else {
|
490 |
@header( $curr_built );
|
491 |
-
if ( defined( 'LITESPEED_DID_send_headers' )
|
492 |
self::update_option( $purge2 ? self::DB_QUEUE2 : self::DB_QUEUE, $curr_built );
|
493 |
self::debug( 'Output existed, queue stored: ' . $curr_built );
|
494 |
}
|
343 |
* @access private
|
344 |
*/
|
345 |
private function _purge_all_cssjs( $silence = false ) {
|
346 |
+
if ( defined( 'DOING_CRON' ) || defined( 'LITESPEED_DID_send_headers' ) ) {
|
347 |
+
self::debug( "❌ Bypassed cssjs delete as header sent (lscache purge after this point will fail) or doing cron" );
|
348 |
return;
|
349 |
}
|
350 |
$this->_purge_all_lscache( $silence ); // Purge CSSJS must purge lscache too to avoid 404
|
488 |
}
|
489 |
else {
|
490 |
@header( $curr_built );
|
491 |
+
if ( defined( 'DOING_CRON' ) || defined( 'LITESPEED_DID_send_headers' ) || apply_filters( 'litespeed_delay_purge', false ) ) {
|
492 |
self::update_option( $purge2 ? self::DB_QUEUE2 : self::DB_QUEUE, $curr_built );
|
493 |
self::debug( 'Output existed, queue stored: ' . $curr_built );
|
494 |
}
|
src/rest.cls.php
CHANGED
@@ -36,7 +36,9 @@ class REST extends Root {
|
|
36 |
register_rest_route( 'litespeed/v1', '/toggle_crawler_state', array(
|
37 |
'methods' => 'POST',
|
38 |
'callback' => array( $this, 'toggle_crawler_state' ),
|
39 |
-
'permission_callback' =>
|
|
|
|
|
40 |
) );
|
41 |
|
42 |
register_rest_route( 'litespeed/v1', '/tool/check_ip', array(
|
36 |
register_rest_route( 'litespeed/v1', '/toggle_crawler_state', array(
|
37 |
'methods' => 'POST',
|
38 |
'callback' => array( $this, 'toggle_crawler_state' ),
|
39 |
+
'permission_callback' => function() {
|
40 |
+
return current_user_can( 'manage_network_options' ) || current_user_can( 'manage_options' );
|
41 |
+
}
|
42 |
) );
|
43 |
|
44 |
register_rest_route( 'litespeed/v1', '/tool/check_ip', array(
|
src/root.cls.php
CHANGED
@@ -182,7 +182,7 @@ abstract class Root {
|
|
182 |
unlink( $static_path );
|
183 |
}
|
184 |
|
185 |
-
$msg = __( '
|
186 |
Admin_Display::succeed( $msg );
|
187 |
}
|
188 |
|
182 |
unlink( $static_path );
|
183 |
}
|
184 |
|
185 |
+
$msg = __( 'All QUIC.cloud service queues have been cleared.', 'litespeed-cache' );
|
186 |
Admin_Display::succeed( $msg );
|
187 |
}
|
188 |
|
src/ucss.cls.php
CHANGED
@@ -142,9 +142,8 @@ class UCSS extends Base {
|
|
142 |
foreach ( $url_files as $url_file ) {
|
143 |
$vary = $url_file[ 'vary' ];
|
144 |
$request_url = $url_file[ 'url' ];
|
145 |
-
$is_mobile = $url_file[ '
|
146 |
-
$is_webp = $url_file[ '
|
147 |
-
$request_url = $url_file[ 'url' ];
|
148 |
$url_tag = self::get_url_tag( $request_url );
|
149 |
|
150 |
$queue_k = ( strlen( $vary ) > 32 ? md5( $vary ) : $vary ) . ' ' . $url_tag;
|
142 |
foreach ( $url_files as $url_file ) {
|
143 |
$vary = $url_file[ 'vary' ];
|
144 |
$request_url = $url_file[ 'url' ];
|
145 |
+
$is_mobile = $url_file[ 'mobile' ];
|
146 |
+
$is_webp = $url_file[ 'webp' ];
|
|
|
147 |
$url_tag = self::get_url_tag( $request_url );
|
148 |
|
149 |
$queue_k = ( strlen( $vary ) > 32 ? md5( $vary ) : $vary ) . ' ' . $url_tag;
|
thirdparty/woocommerce.cls.php
CHANGED
@@ -445,8 +445,8 @@ class WooCommerce extends Base {
|
|
445 |
}
|
446 |
|
447 |
// Check if product has a cache ttl limit or not
|
448 |
-
$sale_from = get_post_meta( $id, '_sale_price_dates_from', true ) ;
|
449 |
-
$sale_to = get_post_meta( $id, '_sale_price_dates_to', true ) ;
|
450 |
$now = current_time( 'timestamp' ) ;
|
451 |
$ttl = false ;
|
452 |
if ( $sale_from && $now < $sale_from ) {
|
@@ -511,7 +511,7 @@ class WooCommerce extends Base {
|
|
511 |
}
|
512 |
|
513 |
$woocom = WC() ;
|
514 |
-
if ( !
|
515 |
return ;
|
516 |
}
|
517 |
|
@@ -532,13 +532,10 @@ class WooCommerce extends Base {
|
|
532 |
* From woo/inc/class-wc-cache-helper.php:prevent_caching()
|
533 |
* @since 1.4
|
534 |
*/
|
535 |
-
$page_ids = array_filter( array( wc_get_page_id( 'checkout' ), wc_get_page_id( 'myaccount' ) ) );
|
536 |
if ( isset( $_GET['download_file'] ) || isset( $_GET['add-to-cart'] ) || is_page( $page_ids ) ) {
|
537 |
$err = 'woo non cacheable pages' ;
|
538 |
}
|
539 |
-
elseif ( is_page( wc_get_page_id( 'cart' ) ) && $woocom->cart->get_cart_contents_count() !== 0 ) {
|
540 |
-
$err = 'cart is not empty' ;
|
541 |
-
}
|
542 |
elseif ( function_exists( 'wc_notice_count' ) && wc_notice_count() > 0 ) {
|
543 |
$err = 'has wc notice' ;
|
544 |
}
|
445 |
}
|
446 |
|
447 |
// Check if product has a cache ttl limit or not
|
448 |
+
$sale_from = (int) get_post_meta( $id, '_sale_price_dates_from', true ) ;
|
449 |
+
$sale_to = (int) get_post_meta( $id, '_sale_price_dates_to', true ) ;
|
450 |
$now = current_time( 'timestamp' ) ;
|
451 |
$ttl = false ;
|
452 |
if ( $sale_from && $now < $sale_from ) {
|
511 |
}
|
512 |
|
513 |
$woocom = WC() ;
|
514 |
+
if ( ! $woocom || empty( $woocom->session ) ) {
|
515 |
return ;
|
516 |
}
|
517 |
|
532 |
* From woo/inc/class-wc-cache-helper.php:prevent_caching()
|
533 |
* @since 1.4
|
534 |
*/
|
535 |
+
$page_ids = array_filter( array( wc_get_page_id( 'cart' ), wc_get_page_id( 'checkout' ), wc_get_page_id( 'myaccount' ) ) );
|
536 |
if ( isset( $_GET['download_file'] ) || isset( $_GET['add-to-cart'] ) || is_page( $page_ids ) ) {
|
537 |
$err = 'woo non cacheable pages' ;
|
538 |
}
|
|
|
|
|
|
|
539 |
elseif ( function_exists( 'wc_notice_count' ) && wc_notice_count() > 0 ) {
|
540 |
$err = 'has wc notice' ;
|
541 |
}
|
tpl/cache/settings_inc.object.tpl.php
CHANGED
@@ -76,6 +76,7 @@ else {
|
|
76 |
<?php $this->build_input( $id ); ?>
|
77 |
<div class="litespeed-desc">
|
78 |
<?php echo sprintf( __( 'Your %s Hostname or IP address.', 'litespeed-cache' ), 'Memcached/<a href="https://docs.litespeedtech.com/products/lsmcd/" target="_blank">LSMCD</a>/Redis' ) ; ?>
|
|
|
79 |
</div>
|
80 |
</td>
|
81 |
</tr>
|
@@ -90,6 +91,7 @@ else {
|
|
90 |
<div class="litespeed-desc">
|
91 |
<?php echo sprintf( __( 'Default port for %1$s is %2$s.', 'litespeed-cache' ), 'Memcached', '<code>11211</code>' ) ; ?>
|
92 |
<?php echo sprintf( __( 'Default port for %1$s is %2$s.', 'litespeed-cache' ), 'Redis', '<code>6379</code>' ) ; ?>
|
|
|
93 |
</div>
|
94 |
</td>
|
95 |
</tr>
|
76 |
<?php $this->build_input( $id ); ?>
|
77 |
<div class="litespeed-desc">
|
78 |
<?php echo sprintf( __( 'Your %s Hostname or IP address.', 'litespeed-cache' ), 'Memcached/<a href="https://docs.litespeedtech.com/products/lsmcd/" target="_blank">LSMCD</a>/Redis' ) ; ?>
|
79 |
+
<br /><?php echo sprintf( __( 'If you are using a %1$s socket, %2$s should be set to %3$s', 'litespeed-cache' ), 'UNIX', Lang::title( $id ), '<code>/path/to/memcached.sock</code>' ); ?>
|
80 |
</div>
|
81 |
</td>
|
82 |
</tr>
|
91 |
<div class="litespeed-desc">
|
92 |
<?php echo sprintf( __( 'Default port for %1$s is %2$s.', 'litespeed-cache' ), 'Memcached', '<code>11211</code>' ) ; ?>
|
93 |
<?php echo sprintf( __( 'Default port for %1$s is %2$s.', 'litespeed-cache' ), 'Redis', '<code>6379</code>' ) ; ?>
|
94 |
+
<br /><?php echo sprintf( __( 'If you are using a %1$s socket, %2$s should be set to %3$s', 'litespeed-cache' ), 'UNIX', Lang::title( $id ), '<code>0</code>' ); ?>
|
95 |
</div>
|
96 |
</td>
|
97 |
</tr>
|
tpl/dash/dashboard.tpl.php
CHANGED
@@ -80,6 +80,7 @@ $vpi_queue_count = count( $this->load_queue( 'vpi' ) );
|
|
80 |
}
|
81 |
|
82 |
if ( $pag_total ) {
|
|
|
83 |
$pag_width = round( $pag_used / $pag_total * 100 ) . '%';
|
84 |
}
|
85 |
|
@@ -127,7 +128,7 @@ $vpi_queue_count = count( $this->load_queue( 'vpi' ) );
|
|
127 |
<?php if ( $pag_total > 0 ) { ?>
|
128 |
<p class="litespeed-dashboard-stats-payg <?php echo $pag_txt_color; ?>">
|
129 |
<?php echo __('PAYG Balance','litespeed-cache'); ?>: <strong><?php echo $pag_bal; ?></strong>
|
130 |
-
<button class="litespeed-info-button" data-balloon-pos="up" aria-label="<?php echo __('
|
131 |
<span class="dashicons dashicons-info"></span>
|
132 |
<span class="screen-reader-text"><?php echo __( 'Pay as You Go Usage Statistics', 'litespeed-cache' );?></span>
|
133 |
</button>
|
80 |
}
|
81 |
|
82 |
if ( $pag_total ) {
|
83 |
+
// $finished_percentage = floor( ($pag_used+$usage[ 'used' ]) * 100 / ($usage[ 'quota' ]+$pag_total) );
|
84 |
$pag_width = round( $pag_used / $pag_total * 100 ) . '%';
|
85 |
}
|
86 |
|
128 |
<?php if ( $pag_total > 0 ) { ?>
|
129 |
<p class="litespeed-dashboard-stats-payg <?php echo $pag_txt_color; ?>">
|
130 |
<?php echo __('PAYG Balance','litespeed-cache'); ?>: <strong><?php echo $pag_bal; ?></strong>
|
131 |
+
<button class="litespeed-info-button" data-balloon-pos="up" aria-label="<?php echo __('PAYG used this month','litespeed-cache'); ?>: <?php echo $pag_used;?>. <?php echo __('PAYG balance and usage not included in above quota calculation.','litespeed-cache'); ?>">
|
132 |
<span class="dashicons dashicons-info"></span>
|
133 |
<span class="screen-reader-text"><?php echo __( 'Pay as You Go Usage Statistics', 'litespeed-cache' );?></span>
|
134 |
</button>
|
tpl/page_optm/settings_css.tpl.php
CHANGED
@@ -119,6 +119,7 @@ $ucss_queue = $this->load_queue( 'ucss' );
|
|
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; ?>
|
123 |
</div>
|
124 |
|
@@ -229,6 +230,7 @@ $ucss_queue = $this->load_queue( 'ucss' );
|
|
229 |
<a href="<?php echo Utility::build_url( Router::ACTION_CSS, CSS::TYPE_GEN_CCSS ); ?>" class="button litespeed-btn-success">
|
230 |
<?php echo sprintf( __( 'Run %s Queue Manually', 'litespeed-cache' ), 'CCSS' ); ?>
|
231 |
</a>
|
|
|
232 |
<?php endif; ?>
|
233 |
</div>
|
234 |
</td>
|
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 Doc::queue_issues(); ?>
|
123 |
<?php endif; ?>
|
124 |
</div>
|
125 |
|
230 |
<a href="<?php echo Utility::build_url( Router::ACTION_CSS, CSS::TYPE_GEN_CCSS ); ?>" class="button litespeed-btn-success">
|
231 |
<?php echo sprintf( __( 'Run %s Queue Manually', 'litespeed-cache' ), 'CCSS' ); ?>
|
232 |
</a>
|
233 |
+
<?php Doc::queue_issues(); ?>
|
234 |
<?php endif; ?>
|
235 |
</div>
|
236 |
</td>
|
tpl/page_optm/settings_media.tpl.php
CHANGED
@@ -197,6 +197,7 @@ $lqip_queue = $this->load_queue( 'lqip' );
|
|
197 |
<a href="<?php echo Utility::build_url( Router::ACTION_PLACEHOLDER, Placeholder::TYPE_GENERATE ); ?>" class="button litespeed-btn-success">
|
198 |
<?php echo __( 'Run Queue Manually', 'litespeed-cache' ); ?>
|
199 |
</a>
|
|
|
200 |
<?php endif; ?>
|
201 |
</div>
|
202 |
</td>
|
197 |
<a href="<?php echo Utility::build_url( Router::ACTION_PLACEHOLDER, Placeholder::TYPE_GENERATE ); ?>" class="button litespeed-btn-success">
|
198 |
<?php echo __( 'Run Queue Manually', 'litespeed-cache' ); ?>
|
199 |
</a>
|
200 |
+
<?php Doc::queue_issues(); ?>
|
201 |
<?php endif; ?>
|
202 |
</div>
|
203 |
</td>
|
tpl/page_optm/settings_tuning.tpl.php
CHANGED
@@ -49,7 +49,7 @@ ksort( $roles );
|
|
49 |
<td>
|
50 |
<?php $this->build_textarea( $id ); ?>
|
51 |
<div class="litespeed-desc">
|
52 |
-
<?php echo __( 'Listed JS files or inline JS code will not be deferred.', 'litespeed-cache' ); ?>
|
53 |
<?php Doc::full_or_partial_url(); ?>
|
54 |
<?php Doc::one_per_line(); ?>
|
55 |
<br /><span class="litespeed-success">
|
@@ -92,6 +92,10 @@ ksort( $roles );
|
|
92 |
<div class="litespeed-desc">
|
93 |
<?php echo __( 'Prevent any optimization of listed pages.', 'litespeed-cache' ); ?>
|
94 |
<?php $this->_uri_usage_example(); ?>
|
|
|
|
|
|
|
|
|
95 |
</div>
|
96 |
</td>
|
97 |
</tr>
|
49 |
<td>
|
50 |
<?php $this->build_textarea( $id ); ?>
|
51 |
<div class="litespeed-desc">
|
52 |
+
<?php echo __( 'Listed JS files or inline JS code will not be deferred or delayed.', 'litespeed-cache' ); ?>
|
53 |
<?php Doc::full_or_partial_url(); ?>
|
54 |
<?php Doc::one_per_line(); ?>
|
55 |
<br /><span class="litespeed-success">
|
92 |
<div class="litespeed-desc">
|
93 |
<?php echo __( 'Prevent any optimization of listed pages.', 'litespeed-cache' ); ?>
|
94 |
<?php $this->_uri_usage_example(); ?>
|
95 |
+
<br /><span class="litespeed-success">
|
96 |
+
<?php echo __( 'API', 'litespeed-cache' ); ?>:
|
97 |
+
<?php echo sprintf( __( 'Filter %s is supported.', 'litespeed-cache' ), '<code>litespeed_optm_uri_exc</code>' ); ?>
|
98 |
+
</span>
|
99 |
</div>
|
100 |
</td>
|
101 |
</tr>
|
tpl/page_optm/settings_vpi.tpl.php
CHANGED
@@ -73,6 +73,7 @@ $queue = $this->load_queue( 'vpi' );
|
|
73 |
<a href="<?php echo Utility::build_url( Router::ACTION_VPI, VPI::TYPE_GEN ); ?>" class="button litespeed-btn-success">
|
74 |
<?php echo sprintf( __( 'Run %s Queue Manually', 'litespeed-cache' ), 'VPI' ); ?>
|
75 |
</a>
|
|
|
76 |
<?php endif; ?>
|
77 |
</div>
|
78 |
|
73 |
<a href="<?php echo Utility::build_url( Router::ACTION_VPI, VPI::TYPE_GEN ); ?>" class="button litespeed-btn-success">
|
74 |
<?php echo sprintf( __( 'Run %s Queue Manually', 'litespeed-cache' ), 'VPI' ); ?>
|
75 |
</a>
|
76 |
+
<?php Doc::queue_issues(); ?>
|
77 |
<?php endif; ?>
|
78 |
</div>
|
79 |
|
tpl/toolbox/beta_test.tpl.php
CHANGED
@@ -4,6 +4,7 @@ defined( 'WPINC' ) || exit;
|
|
4 |
|
5 |
// Existing public version list
|
6 |
$v_list = array(
|
|
|
7 |
'5.3',
|
8 |
'5.2.1',
|
9 |
'5.2',
|
4 |
|
5 |
// Existing public version list
|
6 |
$v_list = array(
|
7 |
+
'5.3.1',
|
8 |
'5.3',
|
9 |
'5.2.1',
|
10 |
'5.2',
|