diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 000000000..43e3edcf4
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,26 @@
+name: CI
+
+on:
+ push:
+ branches:
+ - master
+ - dev
+ - 'v*.*'
+ pull_request:
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: actions/setup-node@v3
+ with:
+ node-version: '20'
+ check-latest: true
+ cache: npm
+ cache-dependency-path: package-lock.json
+
+ - run: npm ci
+
+ - run: npm run format-check
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..5ac2a3cc3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+*.local
+*.log
+*.swp
+.DS_Store
+.cache
+.env*
+.vscode
+node_modules
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 000000000..c5ec21291
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,16 @@
+**/*.min.*
+**/*.ori.*
+**/*.tpl.php
+assets/js/css_async.js
+assets/js/webfontloader.js
+lib
+tpl/banner
+tpl/esi_widget_edit.php
+tpl/inc/api_key.php
+tpl/inc/check_cache_disabled.php
+tpl/inc/check_if_network_disable_all.php
+tpl/inc/modal.header.php
+!tpl/cache/network_settings-browser.tpl.php
+!tpl/cache/network_settings-object.tpl.php
+!tpl/cache/settings-browser.tpl.php
+!tpl/cache/settings-object.tpl.php
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 000000000..09fdb315e
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,24 @@
+{
+ "overrides": [
+ {
+ "files": ".prettierrc",
+ "options": { "parser": "json" }
+ },
+ {
+ "files": "**/*.{yml,yaml}",
+ "options": { "tabWidth": 2 }
+ }
+ ],
+ "plugins": ["@prettier/plugin-php"],
+ "arrowParens": "avoid",
+ "braceStyle": "per-cs",
+ "endOfLine": "auto",
+ "phpVersion": "5.3",
+ "printWidth": 180,
+ "semi": true,
+ "singleQuote": true,
+ "tabWidth": 4,
+ "trailingComma": "all",
+ "trailingCommaPHP": true,
+ "useTabs": true
+}
diff --git a/assets/css/litespeed-legacy.css b/assets/css/litespeed-legacy.css
index af1e5d2a1..2e71731ae 100644
--- a/assets/css/litespeed-legacy.css
+++ b/assets/css/litespeed-legacy.css
@@ -1,20 +1,18 @@
-.litespeed-wrap h2.nav-tab-wrapper, .litespeed-wrap h3.nav-tab-wrapper{
- margin-bottom:0;
+.litespeed-wrap h2.nav-tab-wrapper,
+.litespeed-wrap h3.nav-tab-wrapper {
+ margin-bottom: 0;
}
-.litespeed-wrap h2 .nav-tab{
- font-size:14px;
+.litespeed-wrap h2 .nav-tab {
+ font-size: 14px;
}
-
.litespeed-wrap .striped > tbody > :nth-child(odd),
.litespeed-wrap ul.striped > :nth-child(odd),
.litespeed-wrap .alternate {
background-color: #f9f9f9;
}
-
-
.litespeed-wrap .notice,
.litespeed-wrap div.updated,
.litespeed-wrap div.error {
@@ -55,4 +53,4 @@
.litespeed-wrap .notice-info.notice-alt {
background-color: #e5f5fa;
-}
\ No newline at end of file
+}
diff --git a/assets/css/litespeed.css b/assets/css/litespeed.css
index f3c4a7739..d04573829 100644
--- a/assets/css/litespeed.css
+++ b/assets/css/litespeed.css
@@ -1,7 +1,8 @@
@font-face {
font-family: 'litespeedfont';
src: url('fonts/litespeedfont.eot?rs8ttq');
- src: url('fonts/litespeedfont.eot?rs8ttq#iefix') format('embedded-opentype'),
+ src:
+ url('fonts/litespeedfont.eot?rs8ttq#iefix') format('embedded-opentype'),
url('fonts/litespeedfont.ttf?rs8ttq') format('truetype'),
url('fonts/litespeedfont.woff?rs8ttq') format('woff'),
url('fonts/litespeedfont.svg?rs8ttq#litespeedfont') format('svg');
@@ -12,7 +13,7 @@
#adminmenu #toplevel_page_lscache-settings .menu-icon-generic div.wp-menu-image:before,
#adminmenu #toplevel_page_litespeed .menu-icon-generic div.wp-menu-image:before,
.litespeed-top-toolbar .ab-icon::before {
- content: "\e900";
+ content: '\e900';
font-family: 'litespeedfont' !important;
speak: none;
font-style: normal;
@@ -24,92 +25,90 @@
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-
}
*[litespeed-accesskey]:before {
- content: '['attr(litespeed-accesskey) '] ';
+ content: '[' attr(litespeed-accesskey) '] ';
}
-
/* =======================================
UTILITIES - toggle UI
======================================= */
-input[type="checkbox"].litespeed-tiny-toggle {
- -webkit-appearance: none;
- -moz-appearance: none;
- appearance: none;
-
- -webkit-tap-highlight-color: transparent;
-
- width: auto;
- height: auto;
- vertical-align: middle;
- position: relative;
- border: 0;
- outline: 0;
- cursor: pointer;
- margin: 0 4px;
- background: none;
- box-shadow: none;
-}
-input[type="checkbox"].litespeed-tiny-toggle:focus {
- box-shadow: none;
-}
-input[type="checkbox"].litespeed-tiny-toggle:after {
- content: '';
- font-size: 8px;
- font-weight: 400;
- line-height: 18px;
- text-indent: -14px;
- color: #ffffff;
- width: 36px;
- height: 18px;
- display: inline-block;
- background-color: #a7aaad;
- border-radius: 72px;
- box-shadow: 0 0 12px rgb(0 0 0 / 15%) inset;
-}
-input[type="checkbox"].litespeed-tiny-toggle:before {
- content: '';
- width: 14px;
- height: 14px;
- display: block;
- position: absolute;
- top: 2px;
- left: 2px;
- margin: 0;
- border-radius: 50%;
- background-color: #ffffff;
-}
-
-input[type="checkbox"].litespeed-tiny-toggle:checked:before {
- left: 20px;
- margin: 0;
- background-color: #ffffff;
-}
-
-input[type="checkbox"].litespeed-tiny-toggle,
-input[type="checkbox"].litespeed-tiny-toggle:before,
-input[type="checkbox"].litespeed-tiny-toggle:after,
-input[type="checkbox"].litespeed-tiny-toggle:checked:before,
-input[type="checkbox"].litespeed-tiny-toggle:checked:after {
- transition: ease .15s;
-}
-input[type="checkbox"].litespeed-tiny-toggle:checked:after {
- /*content: 'ON';*/
- background-color: #2271b1;
-}
-
-.block-editor__container input[type="checkbox"].litespeed-tiny-toggle {
+input[type='checkbox'].litespeed-tiny-toggle {
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+
+ -webkit-tap-highlight-color: transparent;
+
+ width: auto;
+ height: auto;
+ vertical-align: middle;
+ position: relative;
+ border: 0;
+ outline: 0;
+ cursor: pointer;
+ margin: 0 4px;
+ background: none;
+ box-shadow: none;
+}
+input[type='checkbox'].litespeed-tiny-toggle:focus {
+ box-shadow: none;
+}
+input[type='checkbox'].litespeed-tiny-toggle:after {
+ content: '';
+ font-size: 8px;
+ font-weight: 400;
+ line-height: 18px;
+ text-indent: -14px;
+ color: #ffffff;
+ width: 36px;
+ height: 18px;
+ display: inline-block;
+ background-color: #a7aaad;
+ border-radius: 72px;
+ box-shadow: 0 0 12px rgb(0 0 0 / 15%) inset;
+}
+input[type='checkbox'].litespeed-tiny-toggle:before {
+ content: '';
+ width: 14px;
+ height: 14px;
+ display: block;
+ position: absolute;
+ top: 2px;
+ left: 2px;
+ margin: 0;
+ border-radius: 50%;
+ background-color: #ffffff;
+}
+
+input[type='checkbox'].litespeed-tiny-toggle:checked:before {
+ left: 20px;
+ margin: 0;
+ background-color: #ffffff;
+}
+
+input[type='checkbox'].litespeed-tiny-toggle,
+input[type='checkbox'].litespeed-tiny-toggle:before,
+input[type='checkbox'].litespeed-tiny-toggle:after,
+input[type='checkbox'].litespeed-tiny-toggle:checked:before,
+input[type='checkbox'].litespeed-tiny-toggle:checked:after {
+ transition: ease 0.15s;
+}
+input[type='checkbox'].litespeed-tiny-toggle:checked:after {
+ /*content: 'ON';*/
+ background-color: #2271b1;
+}
+
+.block-editor__container input[type='checkbox'].litespeed-tiny-toggle {
border: 0 !important;
}
-.block-editor__container input[type="checkbox"].litespeed-tiny-toggle:before {
+.block-editor__container input[type='checkbox'].litespeed-tiny-toggle:before {
top: 5px;
left: 7px;
}
-.block-editor__container input[type="checkbox"].litespeed-tiny-toggle:checked:before {
+.block-editor__container input[type='checkbox'].litespeed-tiny-toggle:checked:before {
left: 23px;
}
@@ -117,6 +116,37 @@ input[type="checkbox"].litespeed-tiny-toggle:checked:after {
UTILITIES - structure
======================================= */
+.litespeed_icon:before {
+ /* content: "\e900";
+ font-family: 'litespeedfont' !important; */
+ content: '';
+ background-image: url('../img/lscwp_grayscale_font-icon_22px.svg');
+ /* filter: grayscale(1); */
+ background-size: 22px;
+ background-repeat: no-repeat;
+ width: 22px;
+ height: 22px;
+ vertical-align: middle;
+ display: inline-block;
+ position: absolute;
+ left: 5px;
+ top: 8px;
+}
+
+.rtl .litespeed_icon:before {
+ left: initial;
+ right: 5px;
+}
+
+.litespeed_icon {
+ padding-left: 30px !important;
+ position: relative;
+}
+
+.rtl .litespeed_icon {
+ padding-right: 40px;
+}
+
.litespeed-quic-icon {
background-image: url('../img/quic-cloud-icon-16x16.svg');
background-repeat: no-repeat;
@@ -126,7 +156,6 @@ input[type="checkbox"].litespeed-tiny-toggle:checked:after {
display: inline-block;
}
-
.litespeed-row {
margin-top: 5px;
}
@@ -146,7 +175,7 @@ input[type="checkbox"].litespeed-tiny-toggle:checked:after {
height: auto;
}
-.litespeed-flex-container>* {
+.litespeed-flex-container > * {
box-sizing: border-box;
}
@@ -268,6 +297,10 @@ input[type="checkbox"].litespeed-tiny-toggle:checked:after {
margin-left: 20px;
}
+.litespeed-wrap .litespeed-bg-quic-cloud {
+ background: linear-gradient(rgba(230, 242, 242, 1) 10%, rgba(250, 255, 255, 1) 30%);
+}
+
.litespeed-left50 {
margin-left: 50px;
}
@@ -301,7 +334,6 @@ input[type="checkbox"].litespeed-tiny-toggle:checked:after {
margin-bottom: 0px !important;
}
-
.litespeed-empty-space-xlarge {
margin-top: 8em;
}
@@ -322,7 +354,6 @@ input[type="checkbox"].litespeed-tiny-toggle:checked:after {
margin-top: 1em;
}
-
/* =======================================
UTILITIES - typography
======================================= */
@@ -332,7 +363,7 @@ input[type="checkbox"].litespeed-tiny-toggle:checked:after {
}
.litespeed-text-large {
- font-size: .75em !important;
+ font-size: 0.75em !important;
}
.litespeed-text-md {
@@ -360,11 +391,11 @@ input[type="checkbox"].litespeed-tiny-toggle:checked:after {
}
.litespeed-primary {
- color: #3366CC !important;
+ color: #3366cc !important;
}
.litespeed-info {
- color: #3FBFBF !important;
+ color: #3fbfbf !important;
}
.litespeed-success {
@@ -372,7 +403,7 @@ input[type="checkbox"].litespeed-tiny-toggle:checked:after {
}
.litespeed-warning {
- color: #FF8C00 !important;
+ color: #ff8c00 !important;
}
.litespeed-danger {
@@ -402,7 +433,7 @@ button.litespeed-form-action:hover {
}
.litespeed-bg-primary {
- background-color: #3366CC !important;
+ background-color: #3366cc !important;
}
.litespeed-bg-info {
@@ -414,7 +445,7 @@ button.litespeed-form-action:hover {
}
.litespeed-bg-warning {
- background-color: #FF8C00 !important;
+ background-color: #ff8c00 !important;
}
.litespeed-bg-danger {
@@ -433,6 +464,18 @@ button.litespeed-form-action:hover {
margin: 10px 20px 0 2px;
}
+.litespeed-wrap .nav-tab-wrapper {
+ display: flex;
+ flex-wrap: wrap-reverse;
+}
+
+.litespeed-wrap .nav-tab {
+ border-bottom-color: inherit;
+ border-bottom-style: solid;
+ border-bottom-width: 1px;
+ margin: 11px 10px -1px 0;
+}
+
.litespeed-wrap .nav-tab-active {
background: #fff;
border-bottom-color: #fff;
@@ -447,11 +490,11 @@ button.litespeed-form-action:hover {
.litespeed-body {
background: #fff;
border: 1px solid #e5e5e5;
- box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
padding: 1px 20px 20px 20px;
}
-.litespeed-header+.litespeed-body {
+.litespeed-header + .litespeed-body {
border-top: none;
}
@@ -482,11 +525,11 @@ button.litespeed-form-action:hover {
/*max-width: 840px;*/
}
-.litespeed-desc+.litespeed-desc {
- margin-top: -5px
+.litespeed-desc + .litespeed-desc {
+ margin-top: -5px;
}
-td>.litespeed-desc:first-child {
+td > .litespeed-desc:first-child {
margin-top: 0px;
line-height: 2.24;
}
@@ -562,7 +605,6 @@ h3 .litespeed-learn-more {
padding-right: 50px;
padding-left: 3px;
padding-bottom: 3px;
-
}
.litespeed-title .button {
@@ -614,7 +656,6 @@ h3 .litespeed-learn-more {
color: #72777c;
}
-
/* =======================================
LAYOUT - table
======================================= */
@@ -623,7 +664,7 @@ h3 .litespeed-learn-more {
font-size: 14px;
}
-.litespeed-body tbody>tr>th {
+.litespeed-body tbody > tr > th {
padding-left: 20px;
}
@@ -641,20 +682,19 @@ h3 .litespeed-learn-more {
vertical-align: middle;
}
-.litespeed-body .widefat td input+p {
- margin-top: .8em;
+.litespeed-body .widefat td input + p {
+ margin-top: 0.8em;
}
-.litespeed-body .striped>tbody>:nth-child(even) .notice {
+.litespeed-body .striped > tbody > :nth-child(even) .notice {
background-color: #f9f9f9;
- box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .05);
+ box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.05);
border-top: 1px solid #e5e5e5;
border-bottom: 1px solid #e5e5e5;
border-right: 1px solid #e5e5e5;
-
}
-.litespeed-body .striped>tbody>:nth-child(even) .notice:first-child {
+.litespeed-body .striped > tbody > :nth-child(even) .notice:first-child {
margin-top: 0;
}
@@ -754,7 +794,7 @@ h3 .litespeed-learn-more {
min-height: 75px;
box-sizing: border-box;
background: #f9fafc;
- transition: .25s;
+ transition: 0.25s;
}
.litespeed-panel:hover {
@@ -767,7 +807,7 @@ h3 .litespeed-learn-more {
height: 100%;
}
-[class*="litespeed-panel-icon-"] {
+[class*='litespeed-panel-icon-'] {
background-size: contain;
width: 60px;
height: 60px;
@@ -777,91 +817,95 @@ h3 .litespeed-learn-more {
}
.litespeed-panel-icon-all {
- background-image: url("../img/icons/all.svg");
+ background-image: url('../img/icons/all.svg');
}
.litespeed-panel-icon-revision {
- background-image: url("../img/icons/revision.svg");
+ background-image: url('../img/icons/revision.svg');
+}
+
+.litespeed-panel-icon-orphaned_post_meta {
+ background-image: url('../img/icons/revision.svg');
}
.litespeed-panel-icon-auto_draft {
- background-image: url("../img/icons/auto_draft.svg");
+ background-image: url('../img/icons/auto_draft.svg');
}
.litespeed-panel-icon-trash_post {
- background-image: url("../img/icons/trash_post.svg");
+ background-image: url('../img/icons/trash_post.svg');
}
.litespeed-panel-icon-spam_comment {
- background-image: url("../img/icons/spam_comment.svg");
+ background-image: url('../img/icons/spam_comment.svg');
}
.litespeed-panel-icon-trash_comment {
- background-image: url("../img/icons/trash_comment.svg");
+ background-image: url('../img/icons/trash_comment.svg');
}
.litespeed-panel-icon-trackback-pingback {
- background-image: url("../img/icons/trackback-pingback.svg");
+ background-image: url('../img/icons/trackback-pingback.svg');
}
.litespeed-panel-icon-expired_transient {
- background-image: url("../img/icons/expired_transient.svg");
+ background-image: url('../img/icons/expired_transient.svg');
}
.litespeed-panel-icon-all_transients {
- background-image: url("../img/icons/all_transients.svg");
+ background-image: url('../img/icons/all_transients.svg');
}
.litespeed-panel-icon-optimize_tables {
- background-image: url("../img/icons/optimize_tables.svg");
+ background-image: url('../img/icons/optimize_tables.svg');
}
.litespeed-panel-icon-purge-front {
- background-image: url("../img/icons/purge-front.svg");
+ background-image: url('../img/icons/purge-front.svg');
}
.litespeed-panel-icon-purge-pages {
- background-image: url("../img/icons/purge-pages.svg");
+ background-image: url('../img/icons/purge-pages.svg');
}
.litespeed-panel-icon-purge-cssjs {
- background-image: url("../img/icons/purge-cssjs.svg");
+ background-image: url('../img/icons/purge-cssjs.svg');
}
.litespeed-panel-icon-purge-object {
- background-image: url("../img/icons/purge-object.svg");
+ background-image: url('../img/icons/purge-object.svg');
}
.litespeed-panel-icon-purge-opcache {
- background-image: url("../img/icons/purge-opcache.svg");
+ background-image: url('../img/icons/purge-opcache.svg');
}
.litespeed-panel-icon-purge-all {
- background-image: url("../img/icons/purge-all.svg");
+ background-image: url('../img/icons/purge-all.svg');
}
.litespeed-panel-icon-empty-cache {
- background-image: url("../img/icons/empty-cache.svg");
+ background-image: url('../img/icons/empty-cache.svg');
}
.litespeed-panel-icon-purge-403 {
- background-image: url("../img/icons/purge-403.svg");
+ background-image: url('../img/icons/purge-403.svg');
}
.litespeed-panel-icon-purge-404 {
- background-image: url("../img/icons/purge-404.svg");
+ background-image: url('../img/icons/purge-404.svg');
}
.litespeed-panel-icon-purge-500 {
- background-image: url("../img/icons/purge-500.svg");
+ background-image: url('../img/icons/purge-500.svg');
}
.litespeed-panel-top-right-icon-cross {
- background-image: url("../img/icons/cross_icon.svg");
+ background-image: url('../img/icons/cross_icon.svg');
}
.litespeed-panel-top-right-icon-tick {
- background-image: url("../img/icons/success_icon.svg");
+ background-image: url('../img/icons/success_icon.svg');
}
.litespeed-panel-content {
@@ -989,7 +1033,11 @@ h3 .litespeed-learn-more {
border-color: #538ac6 #2264ad #2264ad;
color: #fff;
box-shadow: 0 1px 0 #2264ad;
- text-shadow: 0 -1px 1px #2264ad, 1px 0 1px #2264ad, 0 1px 1px #2264ad, -1px 0 1px #2264ad;
+ text-shadow:
+ 0 -1px 1px #2264ad,
+ 1px 0 1px #2264ad,
+ 0 1px 1px #2264ad,
+ -1px 0 1px #2264ad;
}
.litespeed-wrap .button-primary:focus,
@@ -1007,7 +1055,9 @@ h3 .litespeed-learn-more {
background: #5891ce;
border-color: #2264ad;
color: #fff;
- box-shadow: 0 1px 0 #0073aa, 0 0 2px 1px #33b3db;
+ box-shadow:
+ 0 1px 0 #0073aa,
+ 0 0 2px 1px #33b3db;
}
.litespeed .litespeed-btn-primary,
@@ -1037,7 +1087,7 @@ h3 .litespeed-learn-more {
margin-left: 5px;
}
-.litespeed-wrap .button+.button {
+.litespeed-wrap .button + .button {
margin-left: 10px;
}
@@ -1096,8 +1146,8 @@ h3 .litespeed-learn-more {
.litespeed-wrap .litespeed-btn-large {
font-size: 1.5em;
- padding: .75em 1.5em;
- margin: 0 .25em;
+ padding: 0.75em 1.5em;
+ margin: 0 0.25em;
height: auto;
}
@@ -1106,7 +1156,6 @@ h3 .litespeed-learn-more {
width: auto;
}
-
/* =======================================
SWITCH
======================================= */
@@ -1119,17 +1168,23 @@ h3 .litespeed-learn-more {
position: relative;
}
-.litespeed-switch input:checked:active+label {
- box-shadow: 0 2px 0 rgba(27, 146, 146, 0.7), inset 0 2px 5px -3px rgba(0, 0, 0, .5);
+.litespeed-switch input:checked:active + label {
+ box-shadow:
+ 0 2px 0 rgba(27, 146, 146, 0.7),
+ inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
}
-.litespeed-switch input:checked+label {
+.litespeed-switch input:checked + label {
background-color: #36b0b0;
color: #fff;
border: 1px solid #36b0b0;
box-shadow: 0 2px 0 #1b9292;
z-index: 2;
- text-shadow: 0 -1px 1px #1b9292, 1px 0 1px #1b9292, 0 1px 1px #1b9292, -1px 0 1px #1b9292;
+ text-shadow:
+ 0 -1px 1px #1b9292,
+ 1px 0 1px #1b9292,
+ 0 1px 1px #1b9292,
+ -1px 0 1px #1b9292;
}
.litespeed-switch label {
@@ -1161,37 +1216,35 @@ h3 .litespeed-learn-more {
border-bottom-left-radius: 3px;
}
-.litespeed-switch input:hover+label {
+.litespeed-switch input:hover + label {
border-color: #1a9292;
box-shadow: 0 2px 0 #1a9292;
z-index: 2;
color: #117171;
-
}
-.litespeed-switch input:focus+label {
+.litespeed-switch input:focus + label {
color: #117171;
box-shadow: 0 0px 0px 2px rgba(28, 138, 128, 0.85);
border-color: transparent;
z-index: 2;
-
}
-.litespeed-switch input:focus+label+input+input:hover+label,
-.litespeed-switch input:focus+label+input:hover+label {
+.litespeed-switch input:focus + label + input + input:hover + label,
+.litespeed-switch input:focus + label + input:hover + label {
z-index: 1;
}
-.litespeed-switch input:active+label {
- box-shadow: 0 2px 0 #1b9292, inset 0 2px 5px -3px rgba(0, 0, 0, .5);
+.litespeed-switch input:active + label {
+ box-shadow:
+ 0 2px 0 #1b9292,
+ inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
}
-.litespeed-switch input:checked:hover+label,
-.litespeed-switch input:checked:focus+label {
+.litespeed-switch input:checked:hover + label,
+.litespeed-switch input:checked:focus + label {
background-color: #36b0b0;
color: #fff;
-
-
}
.litespeed-switch input {
@@ -1224,7 +1277,7 @@ h3 .litespeed-learn-more {
align-items: center;
}
-.litespeed-toggle-wrapper+.litespeed-toggle-wrapper {
+.litespeed-toggle-wrapper + .litespeed-toggle-wrapper {
margin-top: 0.75rem;
}
@@ -1346,8 +1399,8 @@ h3 .litespeed-learn-more {
.litespeed-toggle-btn.litespeed-toggle-active {
background-image: none;
outline: 0;
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.litespeed-toggle-btn-default:active,
@@ -1358,9 +1411,9 @@ h3 .litespeed-learn-more {
/* =======================================
LABEL/TAG
======================================= */
-[class*="litespeed-label-"] {
+[class*='litespeed-label-'] {
display: inline;
- padding: .2em .6em .3em;
+ padding: 0.2em 0.6em 0.3em;
font-size: 75%;
font-weight: bold;
line-height: 1;
@@ -1368,17 +1421,17 @@ h3 .litespeed-learn-more {
text-align: center;
white-space: nowrap;
vertical-align: baseline;
- border-radius: .25em;
+ border-radius: 0.25em;
}
-[class*="litespeed-label-"]:hover,
-[class*="litespeed-label-"]:focus {
+[class*='litespeed-label-']:hover,
+[class*='litespeed-label-']:focus {
color: #fff;
text-decoration: none;
cursor: pointer;
}
-[class*="litespeed-label-"]:empty {
+[class*='litespeed-label-']:empty {
display: none;
}
@@ -1467,7 +1520,7 @@ h3 .litespeed-learn-more {
.litespeed-shell-header-bg {
opacity: 0.4;
- background-color: #CCCCCC;
+ background-color: #cccccc;
position: absolute;
top: 0;
bottom: 0;
@@ -1485,7 +1538,7 @@ h3 .litespeed-learn-more {
left: 0;
z-index: 10;
height: 2px;
- background-color: #F48024;
+ background-color: #f48024;
}
.litespeed-shell-header-icon-container {
@@ -1508,8 +1561,11 @@ ul.litespeed-shell-body {
padding: 5px;
list-style: none;
background: #141414;
- color: #45D40C;
- font: 0.8em 'Andale Mono', Consolas, 'Courier New';
+ color: #45d40c;
+ font:
+ 0.8em 'Andale Mono',
+ Consolas,
+ 'Courier New';
line-height: 1.6em;
-webkit-border-bottom-right-radius: 3px;
@@ -1518,7 +1574,6 @@ ul.litespeed-shell-body {
-moz-border-radius-bottomleft: 3px;
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
-
}
.litespeed-shell-body li:before {
@@ -1541,7 +1596,6 @@ ul.litespeed-shell-body {
margin: 5px -15px;
}
-
/* =======================================
CALLOUT / NOTICE
======================================= */
@@ -1610,7 +1664,7 @@ ul.litespeed-shell-body {
background: none;
}
-.litespeed-tick-list .litespeed-tick input[type="checkbox"] {
+.litespeed-tick-list .litespeed-tick input[type='checkbox'] {
margin-left: 0;
}
@@ -1618,8 +1672,7 @@ ul.litespeed-shell-body {
color: inherit;
}
-
-.litespeed-tick input[type="checkbox"] {
+.litespeed-tick input[type='checkbox'] {
height: 18px;
width: 18px;
vertical-align: middle;
@@ -1633,20 +1686,19 @@ ul.litespeed-shell-body {
cursor: pointer;
}
-.litespeed-tick input[type="checkbox"]:not(:disabled):hover {
+.litespeed-tick input[type='checkbox']:not(:disabled):hover {
border-color: #538ac6;
-
}
-.litespeed-tick input[type="checkbox"]:active:not(:disabled) {
+.litespeed-tick input[type='checkbox']:active:not(:disabled) {
border-color: #538ac6;
}
-.litespeed-tick input[type="checkbox"]:focus {
+.litespeed-tick input[type='checkbox']:focus {
outline: none;
}
-.litespeed-tick input[type="checkbox"]:checked {
+.litespeed-tick input[type='checkbox']:checked {
border-color: #538ac6;
background-color: #538ac6;
-moz-box-shadow: none;
@@ -1654,7 +1706,7 @@ ul.litespeed-shell-body {
box-shadow: none;
}
-.litespeed-tick input[type="checkbox"]:checked:before {
+.litespeed-tick input[type='checkbox']:checked:before {
content: '';
display: block;
width: 5px;
@@ -1689,7 +1741,7 @@ ul.litespeed-shell-body {
padding-left: 1.5rem;
}
-.litespeed-radio-row input[type=radio] {
+.litespeed-radio-row input[type='radio'] {
margin-top: 0;
margin-bottom: 0;
position: absolute;
@@ -1768,11 +1820,11 @@ ul.litespeed-shell-body {
min-width: 110px;
}
-input.litespeed-input[type="file"] {
+input.litespeed-input[type='file'] {
padding: 9px;
min-width: 500px;
border: 1px solid #ddd;
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, .07);
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
background-color: #fff;
color: #32373c;
outline: 0;
@@ -1804,7 +1856,7 @@ input.litespeed-input-warning {
margin: 0;
}
-.litespeed-textarea-recommended>div:first-child {
+.litespeed-textarea-recommended > div:first-child {
margin-top: 1.7em;
font-size: 12px;
margin-right: 25px;
@@ -1816,7 +1868,7 @@ input.litespeed-input-warning {
text-align: center;
}
-.litespeed-collection-button[data-action="add"] {
+.litespeed-collection-button[data-action='add'] {
margin-top: -5px;
margin-left: -5px;
}
@@ -1831,11 +1883,8 @@ input.litespeed-input-warning {
top: 0;
}
-@media screen and (max-width: 1023px) and (min-width: 681px) {}
-
@media screen and (max-width: 680px) {
-
- .litespeed-body tbody>tr>th {
+ .litespeed-body tbody > tr > th {
display: block;
padding: 18px 0 5px 12px;
}
@@ -1856,7 +1905,7 @@ input.litespeed-input-warning {
flex-direction: column;
}
- .litespeed-textarea-recommended>div:first-child {
+ .litespeed-textarea-recommended > div:first-child {
margin-bottom: 1.7em;
margin-top: 0;
}
@@ -1936,7 +1985,7 @@ input.litespeed-input-warning {
}
.litespeed-banner-promo-slacklogo {
- background-image: url("../img/slack-logo.png");
+ background-image: url('../img/slack-logo.png');
background-size: contain;
width: 75px;
height: 75px;
@@ -1964,7 +2013,7 @@ input.litespeed-input-warning {
.litespeed-banner-promo-slack-line2 {
font-size: 15px;
margin: 0px;
- line-height: .75em;
+ line-height: 0.75em;
}
.litespeed-banner-promo-slack-link {
@@ -2035,7 +2084,15 @@ a.litespeed-btn-xs.litespeed-banner-promo-slack-btn {
}
.litespeed-tweet-text {
- font: 14px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
+ font:
+ 14px system-ui,
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ Ubuntu,
+ 'Helvetica Neue',
+ sans-serif;
line-height: 1.3125;
}
@@ -2044,9 +2101,8 @@ a.litespeed-btn-xs.litespeed-banner-promo-slack-btn {
margin-top: 1em;
}
-
.litespeed-tweet-cta a {
- background-color: #1DA1F2;
+ background-color: #1da1f2;
line-height: 1.3125;
color: #fff;
font-weight: bold;
@@ -2058,7 +2114,7 @@ a.litespeed-btn-xs.litespeed-banner-promo-slack-btn {
}
.litespeed-tweet-cta a:hover {
- background-color: #1E98E1;
+ background-color: #1e98e1;
}
.litespeed-tweet-cta a svg {
@@ -2082,7 +2138,7 @@ a.litespeed-btn-xs.litespeed-banner-promo-slack-btn {
vertical-align: middle;
}
-.litespeed-tweet-img+p {
+.litespeed-tweet-img + p {
margin-top: 0;
}
@@ -2094,7 +2150,7 @@ a.litespeed-btn-xs.litespeed-banner-promo-slack-btn {
display: inline-table;
}
-[class*="litespeed-icon-media-"] {
+[class*='litespeed-icon-media-'] {
background-size: contain;
width: 25px;
height: 25px;
@@ -2104,24 +2160,24 @@ a.litespeed-btn-xs.litespeed-banner-promo-slack-btn {
display: inline-block;
}
-[class*="litespeed-icon-media-"]:hover {
+[class*='litespeed-icon-media-']:hover {
opacity: 0.7;
}
.litespeed-icon-media-webp {
- background-image: url("../img/icons/img_webp.svg");
+ background-image: url('../img/icons/img_webp.svg');
}
.litespeed-icon-media-webp-disabled {
- background-image: url("../img/icons/img_webp_disabled.svg");
+ background-image: url('../img/icons/img_webp_disabled.svg');
}
.litespeed-icon-media-optm {
- background-image: url("../img/icons/img_optm.svg");
+ background-image: url('../img/icons/img_optm.svg');
}
.litespeed-icon-media-optm-disabled {
- background-image: url("../img/icons/img_optm_disabled.svg");
+ background-image: url('../img/icons/img_optm_disabled.svg');
}
p.litespeed-media-p {
@@ -2162,7 +2218,6 @@ p.litespeed-txt-disabled {
margin: 5px 5px 5px 0;
}
-
circle.litespeed-pie_bg {
stroke: #efefef;
stroke-width: 2;
@@ -2182,7 +2237,6 @@ circle.litespeed-pie_circle {
fill: none;
}
-
.litespeed-pie.litespeed-pie-tiny {
margin: 0 2px 0 0;
}
@@ -2190,7 +2244,6 @@ circle.litespeed-pie_circle {
.litespeed-pie.litespeed-pie-tiny text {
font-weight: bold;
fill: #828282;
-
}
.litespeed-pie.litespeed-pie-tiny circle {
@@ -2287,7 +2340,7 @@ g.litespeed-pie_info .litespeed-pie-done {
margin-left: 10px;
}
-#cookie_crawler>p:first-child {
+#cookie_crawler > p:first-child {
margin-top: 5px;
}
@@ -2309,7 +2362,7 @@ g.litespeed-pie_info .litespeed-pie-done {
color: #fff;
text-align: center;
background-color: #007bff;
- transition: width .6s ease;
+ transition: width 0.6s ease;
}
.litespeed-progress-bar-yellow {
@@ -2322,7 +2375,7 @@ g.litespeed-pie_info .litespeed-pie-done {
display: flex;
height: 12px;
overflow: hidden;
- font-size: .75rem;
+ font-size: 0.75rem;
background-color: #e9ecef;
border: 1px solid #dddddd;
border-radius: 8px;
@@ -2378,10 +2431,9 @@ g.litespeed-pie_info .litespeed-pie-done {
}
.litespeed-guide li.litespeed-guide-done {
- opacity: .9;
+ opacity: 0.9;
}
-
/* =======================================
VIEW - image optimization
======================================= */
@@ -2390,7 +2442,6 @@ g.litespeed-pie_info .litespeed-pie-done {
padding: 0;
}
-
.litespeed-cache_page_litespeed-img_optm .nav-tab-wrapper {
border-bottom: none;
position: relative;
@@ -2407,7 +2458,7 @@ g.litespeed-pie_info .litespeed-pie-done {
.litespeed-cache_page_litespeed-img_optm [data-litespeed-layout]:not([data-litespeed-layout='summary']) {
background: #fff;
border: 1px solid #e5e5e5;
- box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
padding: 1px 20px 20px 20px;
}
@@ -2415,23 +2466,23 @@ g.litespeed-pie_info .litespeed-pie-done {
background: #f9fafc;
}
-.litespeed-column-with-boxes>div:first-child {
+.litespeed-column-with-boxes > div:first-child {
padding-right: 25px;
}
-.litespeed-column-with-boxes>div:last-child {
+.litespeed-column-with-boxes > div:last-child {
background: #f1f1f1;
padding-top: 0;
padding-right: 0;
padding-left: 0;
}
-.litespeed-column-with-boxes>div:last-child .litespeed-postbox:last-child {
+.litespeed-column-with-boxes > div:last-child .litespeed-postbox:last-child {
margin-bottom: 0;
}
.litespeed-image-optim-summary {
- box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
position: relative;
padding: 1px 20px 20px 20px;
background: #fff;
@@ -2463,12 +2514,12 @@ g.litespeed-pie_info .litespeed-pie-done {
margin-top: 0;
}
-.litespeed-image-optim-summary>h3:first-child {
+.litespeed-image-optim-summary > h3:first-child {
margin-top: 1.6em;
font-size: 1.2em;
}
-.litespeed-image-optim-summary>h3:first-child .litespeed-quic-icon {
+.litespeed-image-optim-summary > h3:first-child .litespeed-quic-icon {
width: 1.2em;
height: 1.4em;
background-size: contain;
@@ -2497,7 +2548,7 @@ g.litespeed-pie_info .litespeed-pie-done {
}
@media screen and (max-width: 814px) {
- .litespeed-column-with-boxes>div:first-child {
+ .litespeed-column-with-boxes > div:first-child {
padding-right: 0;
margin-bottom: 1rem;
}
@@ -2516,7 +2567,7 @@ g.litespeed-pie_info .litespeed-pie-done {
margin-top: 0;
}
-.imgoptm.column-imgoptm p+.row-actions {
+.imgoptm.column-imgoptm p + .row-actions {
margin-top: 0.5em;
}
@@ -2549,7 +2600,7 @@ g.litespeed-pie_info .litespeed-pie-done {
margin-bottom: 1rem;
}
-.litespeed-dashboard-group>.litespeed-flex-container {
+.litespeed-dashboard-group > .litespeed-flex-container {
margin: 0 -10px;
min-width: 100%;
width: auto;
@@ -2557,7 +2608,6 @@ g.litespeed-pie_info .litespeed-pie-done {
.litespeed-dashboard .litespeed-postbox {
margin: 10px;
-
}
.litespeed-dashboard-title a {
@@ -2601,7 +2651,7 @@ g.litespeed-pie_info .litespeed-pie-done {
color: #777;
}
-.litespeed-dashboard-stats h3+p {
+.litespeed-dashboard-stats h3 + p {
margin-top: 0;
margin-bottom: 0;
}
@@ -2647,7 +2697,7 @@ g.litespeed-pie_info .litespeed-pie-done {
height: 60px;
}
-.litespeed-dashboard-stats-wrapper .litespeed-flex-container+p:not(:last-child) {
+.litespeed-dashboard-stats-wrapper .litespeed-flex-container + p:not(:last-child) {
margin-bottom: 0.55em;
}
@@ -2659,12 +2709,11 @@ g.litespeed-pie_info .litespeed-pie-done {
color: #444;
}
-.postbox .inside>p.litespeed-dashboard-stats-payg {
+.postbox .inside > p.litespeed-dashboard-stats-payg {
margin-top: 1.35em;
}
-.postbox .inside>p.litespeed-dashboard-stats-payg:last-child {
-
+.postbox .inside > p.litespeed-dashboard-stats-payg:last-child {
margin-bottom: -5px !important;
}
@@ -2755,16 +2804,16 @@ g.litespeed-pie_info .litespeed-pie-done {
.litespeed-label-dashboard {
font-size: 0.92em;
- padding: .3em .6em .35em .6em;
+ padding: 0.3em 0.6em 0.35em 0.6em;
font-weight: normal;
display: inline-block;
- margin-left: .2em;
+ margin-left: 0.2em;
min-width: 2em;
}
.litespeed-label-dashboard:first-child {
margin-left: 0;
- margin-right: .35em;
+ margin-right: 0.35em;
}
.litespeed-postbox .inside {
@@ -2786,12 +2835,16 @@ g.litespeed-pie_info .litespeed-pie-done {
margin-top: 0;
}
+.litespeed-postbox-footer a,
+a.litespeed-redetect {
+ text-decoration: none;
+}
+
.litespeed-postbox .inside.litespeed-postbox-footer--compact {
padding: 7px 20px 8px 20px;
font-size: 12px;
}
-
.litespeed-postbox-imgopt .litespeed-pie {
width: 55px;
height: 55px;
@@ -2802,15 +2855,15 @@ g.litespeed-pie_info .litespeed-pie-done {
margin-bottom: 10px;
}
-.litespeed-postbox-imgopt .litespeed-flex-container .litespeed-icon-vertical-middle+div h3 {
+.litespeed-postbox-imgopt .litespeed-flex-container .litespeed-icon-vertical-middle + div h3 {
margin-top: 0;
}
-.litespeed-postbox-imgopt .litespeed-flex-container .litespeed-icon-vertical-middle+div p {
+.litespeed-postbox-imgopt .litespeed-flex-container .litespeed-icon-vertical-middle + div p {
line-height: 1.2;
}
-.litespeed-postbox-imgopt .litespeed-postbox-double-col:last-child>*:first-child {
+.litespeed-postbox-imgopt .litespeed-postbox-double-col:last-child > *:first-child {
margin-top: 7px;
}
@@ -2854,7 +2907,7 @@ g.litespeed-pie_info .litespeed-pie-done {
margin-bottom: 1em;
}
-.litespeed-links-group>span:not(:last-child):after {
+.litespeed-links-group > span:not(:last-child):after {
content: '|';
margin: 0 10px;
color: #ddd;
@@ -2888,11 +2941,11 @@ g.litespeed-pie_info .litespeed-pie-done {
line-height: 1;
}
-span[data-balloon-pos] {
+.litespeed-wrap span[data-balloon-pos] {
border-bottom: 1px dashed;
}
-span[aria-label][data-balloon-pos] {
+.litespeed-wrap span[aria-label][data-balloon-pos] {
cursor: default;
}
@@ -2915,7 +2968,6 @@ span[aria-label][data-balloon-pos] {
}
@media screen and (max-width: 1023px) {
-
.litespeed-dashboard-stats-wrapper {
flex-wrap: wrap;
}
@@ -2969,12 +3021,10 @@ span[aria-label][data-balloon-pos] {
/********************************* todo *******************************/
-
/* image optimize page */
-
.litespeed-column-java {
- background: #5CADAD !important;
+ background: #5cadad !important;
}
.litespeed-text-shipgrey {
@@ -2990,19 +3040,19 @@ span[aria-label][data-balloon-pos] {
}
.litespeed-text-whisper {
- color: #E6E6E6 !important;
+ color: #e6e6e6 !important;
}
.litespeed-text-malibu {
- color: #5CBDDE !important;
+ color: #5cbdde !important;
}
.litespeed-text-morningglory {
- color: #99CCCC !important;
+ color: #99cccc !important;
}
.litespeed-text-fern {
- color: #66CC66 !important;
+ color: #66cc66 !important;
}
.litespeed-text-persiangreen {
@@ -3032,7 +3082,7 @@ span[aria-label][data-balloon-pos] {
.litespeed-hr {
padding-bottom: 1.5em;
- border-bottom: .5px solid #97CACA;
+ border-bottom: 0.5px solid #97caca;
}
.litespeed-hr-with-space {
@@ -3047,7 +3097,6 @@ span[aria-label][data-balloon-pos] {
margin: 0px 10px 0px 10px;
}
-
.litespeed-column-java .litespeed-danger {
color: #c1c53a !important;
}
@@ -3070,7 +3119,7 @@ span[aria-label][data-balloon-pos] {
}
.litespeed-refresh:after {
- content: "⟳";
+ content: '⟳';
width: 20px;
height: 20px;
color: #40ad3a;
@@ -3091,7 +3140,7 @@ span[aria-label][data-balloon-pos] {
}
.litespeed-silence {
- color: #B1B1B1;
+ color: #b1b1b1;
}
.litespeed-column-java .litespeed-congratulate {
@@ -3117,11 +3166,11 @@ span[aria-label][data-balloon-pos] {
}
.litespeed-column-java svg.litespeed-pie circle.litespeed-pie_circle {
- stroke: #97CACA;
+ stroke: #97caca;
}
.litespeed-column-java svg .litespeed-pie_info text {
- fill: #F5FFEB;
+ fill: #f5ffeb;
}
.litespeed-column-java svg g.litespeed-pie_info .litespeed-pie-done {
@@ -3137,12 +3186,12 @@ span[aria-label][data-balloon-pos] {
}
.litespeed-progress-bar-blue {
- background-color: #33ADFF;
+ background-color: #33adff;
}
.litespeed-status-current {
font-size: 3.5em;
- margin: 1.25em 0em .75em 0em;
+ margin: 1.25em 0em 0.75em 0em;
}
/* .litespeed-title, .litespeed-title-short {
@@ -3152,71 +3201,70 @@ span[aria-label][data-balloon-pos] {
} */
.litespeed-column-java .litespeed-desc {
- color: #CAE4E4;
+ color: #cae4e4;
}
.litespeed-column-java .litespeed-warning {
- color: #FFD597 !important;
+ color: #ffd597 !important;
}
.litespeed-column-java .litespeed-btn-success {
- color: #DDF1E4;
- border: 1px solid #33AD5C;
- background: #33AD5C;
+ color: #ddf1e4;
+ border: 1px solid #33ad5c;
+ background: #33ad5c;
}
.litespeed-column-java .litespeed-btn-success:hover {
- color: #FFFFFF;
- border: 1px solid #7DCA97;
+ color: #ffffff;
+ border: 1px solid #7dca97;
background: #009933;
}
.litespeed-column-java .litespeed-btn-warning {
- color: #FFF1DD;
- border: 1px solid #FF9933;
- background-color: #FF9933;
+ color: #fff1dd;
+ border: 1px solid #ff9933;
+ background-color: #ff9933;
}
.litespeed-column-java .litespeed-btn-warning:hover {
- color: #FFFFFF;
- border-color: #FFCA7D;
- background: #FF9900;
+ color: #ffffff;
+ border-color: #ffca7d;
+ background: #ff9900;
}
.litespeed-column-java .litespeed-btn-danger {
- color: #FFEADD !important;
- border: 1px solid #FF6600 !important;
- background: #FF5C5C;
+ color: #ffeadd !important;
+ border: 1px solid #ff6600 !important;
+ background: #ff5c5c;
}
.litespeed-column-java .litespeed-btn-danger:hover {
- color: #FFFFFF;
- border: 1px solid #FF9797 !important;
- background: #FF0000;
+ color: #ffffff;
+ border: 1px solid #ff9797 !important;
+ background: #ff0000;
}
.litespeed-column-java .litepseed-dash-icon-success,
.litepseed-dash-icon-success {
- color: #5CDEDE;
+ color: #5cdede;
font-size: 2em;
- margin-top: -.25em;
+ margin-top: -0.25em;
}
.litespeed-column-java .litepseed-dash-icon-success:hover,
.litepseed-dash-icon-success:hover {
- color: #7DE5E5;
+ color: #7de5e5;
}
.litespeed-dashicons-large {
font-size: 2em;
}
-
.litespeed-column-java p {
- color: #FFFFFF;
+ color: #ffffff;
}
-.litespeed-body tbody>tr>th.litespeed-padding-left {
+.litespeed-body tbody > tr > th.litespeed-padding-left {
padding-left: 3em;
}
@@ -3242,9 +3290,9 @@ span[aria-label][data-balloon-pos] {
a.litespeed-media-href svg:hover {
border-radius: 50%;
- background: #F1FCFF;
- fill: #5CCAD7;
- box-shadow: 0 0 5px 1px #7DD5DF;
+ background: #f1fcff;
+ fill: #5ccad7;
+ box-shadow: 0 0 5px 1px #7dd5df;
transition: all 0.2s ease-out;
transform: scale(1.05);
}
@@ -3258,21 +3306,21 @@ a.litespeed-media-href svg:hover {
}
.litespeed-media-p a .dashicons-trash:hover {
- transition: all .2s ease-out;
- color: #FFA500 !important;
- background: #FFF5E6;
- box-shadow: 0 0 10px 1px #FF8C00;
+ transition: all 0.2s ease-out;
+ color: #ffa500 !important;
+ background: #fff5e6;
+ box-shadow: 0 0 10px 1px #ff8c00;
}
-.litespeed-media-p div>svg circle.litespeed-pie_bg {
+.litespeed-media-p div > svg circle.litespeed-pie_bg {
stroke: #ecf2f9;
}
-.litespeed-media-p div>svg circle.litespeed-pie_circle {
+.litespeed-media-p div > svg circle.litespeed-pie_circle {
stroke: #9fbfdf;
}
-.litespeed-media-p div>svg {
+.litespeed-media-p div > svg {
fill: #538cc6;
background: rgba(236, 242, 249, 0.1);
border-radius: 50%;
@@ -3320,16 +3368,9 @@ a.litespeed-media-href svg:hover {
.litespeed-notice-dismiss:hover,
.litespeed-notice-dismiss:active,
.litespeed-notice-dismiss:focus {
- color: #CC2929;
+ color: #cc2929;
}
-
-
-
-
-
-
-
.litespeed-dot {
display: inline-block;
border-radius: 50%;
@@ -3348,30 +3389,183 @@ a.litespeed-media-href svg:hover {
text-align: center;
}
+/* =======================================
+ Comparison Cards - Presets
+======================================= */
+
+.litespeed-comparison-card {
+ box-sizing: border-box;
+}
+
+.litespeed-comparison-card-rec .litespeed-card-content > div.litespeed-card-body {
+ font-size: 14px;
+}
+
+.litespeed-comparison-card-rec .litespeed-card-action {
+ margin-bottom: 0.25rem;
+}
+
+.litespeed-comparison-card-rec h3 {
+ font-size: 20px;
+}
+
+.litespeed-card-content > div,
+.litespeed-card-action {
+ padding: 0.85rem 1.25rem;
+}
+
+.litespeed-card-header {
+ border-bottom: 1px solid #eee;
+ background: #f9fafc;
+}
+
+.litespeed-card-content > div.litespeed-card-body {
+ align-self: stretch;
+ justify-content: flex-end;
+ font-size: 15px;
+ padding-bottom: 0.5rem;
+ padding-top: 1rem;
+}
+
+.litespeed-card-content > div.litespeed-card-footer {
+ align-self: stretch;
+ justify-content: flex-end;
+ padding-bottom: 0;
+ padding-top: 0.25rem;
+}
+
+.litespeed-card-action {
+ justify-content: flex-end;
+}
+
+.litespeed-comparison-card ul {
+ padding-left: 20px;
+ list-style: none;
+ list-style-position: outside;
+ margin: 0;
+}
+
+.litespeed-comparison-card li {
+ margin-bottom: 0.5em;
+ line-height: 1.4;
+}
+
+.litespeed-comparison-card li:last-child {
+ margin-bottom: 0;
+}
+
+.litespeed-comparison-card ul li:before {
+ content: '✓';
+ margin-left: -1em;
+ margin-right: 0.35em;
+ color: #329c74;
+}
+
+@media screen and (max-width: 1279px) {
+ .litespeed-comparison-card {
+ margin: 0 0 -1px 0;
+ }
+}
+
+@media screen and (min-width: 640px) and (max-width: 1279px) {
+ .litespeed-comparison-cards {
+ max-width: 740px;
+ }
+
+ .litespeed-card-content {
+ display: flex;
+ flex-wrap: wrap;
+ }
+
+ .litespeed-card-content .litespeed-card-header {
+ width: 100%;
+ }
+
+ .litespeed-card-content > div.litespeed-card-body {
+ align-self: initial;
+ width: 50%;
+ box-sizing: border-box;
+ }
+
+ .litespeed-card-content > div.litespeed-card-footer {
+ width: 50%;
+ align-self: initial;
+ box-sizing: border-box;
+ }
+
+ .litespeed-card-content > div.litespeed-card-footer h4 {
+ margin-top: 1rem;
+ }
+}
+
+@media screen and (min-width: 1280px) {
+ .litespeed-comparison-cards {
+ display: flex;
+ margin: 3rem 0 2rem 0;
+ max-width: 1720px;
+ }
+
+ .litespeed-comparison-card {
+ width: 19%;
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
+ margin-right: -1px;
+ justify-content: space-between;
+ }
+
+ .litespeed-comparison-card:first-child {
+ border-top-left-radius: 5px;
+ border-bottom-left-radius: 5px;
+ overflow: hidden;
+ }
+
+ .litespeed-comparison-card:last-child {
+ border-top-right-radius: 5px;
+ border-bottom-right-radius: 5px;
+ overflow: hidden;
+ }
+
+ .litespeed-comparison-card-rec {
+ width: 23%;
+ padding-top: 1rem;
+ padding-bottom: 0.75rem;
+ margin-top: -1rem;
+ margin-bottom: 0.25rem;
+ border-radius: 5px;
+ overflow: hidden;
+ }
+
+ .litespeed-comparison-card-rec .litespeed-card-header {
+ margin-top: -1rem;
+ padding-top: 1.75rem;
+ padding-bottom: 0.95rem;
+ }
+}
/* =======================================
BALLOON PURE CSS TOOLTIPS
======================================= */
-:root {
+.litespeed-wrap {
--balloon-color: rgba(16, 16, 16, 0.95);
--balloon-font-size: 12px;
--balloon-move: 4px;
}
-button[aria-label][data-balloon-pos] {
+.litespeed-wrap button[aria-label][data-balloon-pos] {
overflow: visible;
}
-[aria-label][data-balloon-pos] {
+.litespeed-wrap [aria-label][data-balloon-pos] {
position: relative;
cursor: pointer;
}
-[aria-label][data-balloon-pos]:after {
+.litespeed-wrap [aria-label][data-balloon-pos]:after {
opacity: 0;
pointer-events: none;
- transition: all .2s ease .05s;
+ transition: all 0.2s ease 0.05s;
text-indent: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-weight: normal;
@@ -3382,55 +3576,66 @@ button[aria-label][data-balloon-pos] {
border-radius: 2px;
color: #fff;
content: attr(aria-label);
- padding: .5em 1em;
+ padding: 0.5em 1em;
position: absolute;
white-space: nowrap;
z-index: 10;
line-height: 1.4;
}
-[aria-label][data-balloon-pos]:before {
+.litespeed-wrap [aria-label][data-balloon-pos]:before {
width: 0;
height: 0;
border: 5px solid transparent;
border-top-color: var(--balloon-color);
opacity: 0;
pointer-events: none;
- transition: all .2s ease .05s;
- content: "";
+ transition: all 0.2s ease 0.05s;
+ content: '';
position: absolute;
z-index: 10;
}
-[aria-label][data-balloon-pos]:hover:before,
-[aria-label][data-balloon-pos]:hover:after,
-[aria-label][data-balloon-pos][data-balloon-visible]:before,
-[aria-label][data-balloon-pos][data-balloon-visible]:after,
-[aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:before,
-[aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:after {
+.litespeed-wrap [aria-label][data-balloon-pos]:hover:before,
+.litespeed-wrap [aria-label][data-balloon-pos]:hover:after,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-visible]:before,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-visible]:after,
+.litespeed-wrap [aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:before,
+.litespeed-wrap [aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:after {
opacity: 1;
pointer-events: none;
}
-[aria-label][data-balloon-pos].font-awesome:after {
- font-family: FontAwesome, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
+.litespeed-wrap [aria-label][data-balloon-pos].font-awesome:after {
+ font-family:
+ FontAwesome,
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ Oxygen,
+ Ubuntu,
+ Cantarell,
+ 'Open Sans',
+ 'Helvetica Neue',
+ sans-serif;
}
-[aria-label][data-balloon-pos][data-balloon-break]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-break]:after {
white-space: pre;
}
-[aria-label][data-balloon-pos][data-balloon-break][data-balloon-length]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-break][data-balloon-length]:after {
white-space: pre-line;
word-break: break-word;
}
-[aria-label][data-balloon-pos][data-balloon-blunt]:before,
-[aria-label][data-balloon-pos][data-balloon-blunt]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-blunt]:before,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-blunt]:after {
transition: none;
}
-[aria-label][data-balloon-pos][data-balloon-pos="up"]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up']:after {
bottom: 100%;
left: 50%;
margin-bottom: 10px;
@@ -3438,24 +3643,24 @@ button[aria-label][data-balloon-pos] {
transform-origin: top;
}
-[aria-label][data-balloon-pos][data-balloon-pos="up"]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up']:before {
bottom: 100%;
left: 50%;
transform: translate(-50%, var(--balloon-move));
transform-origin: top;
}
-[aria-label][data-balloon-pos][data-balloon-pos="up"]:hover:after,
-[aria-label][data-balloon-pos][data-balloon-pos="up"][data-balloon-visible]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up']:hover:after,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up'][data-balloon-visible]:after {
transform: translate(-50%, 0);
}
-[aria-label][data-balloon-pos][data-balloon-pos="up"]:hover:before,
-[aria-label][data-balloon-pos][data-balloon-pos="up"][data-balloon-visible]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up']:hover:before,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up'][data-balloon-visible]:before {
transform: translate(-50%, 0);
}
-[aria-label][data-balloon-pos][data-balloon-pos="up-left"]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up-left']:after {
bottom: 100%;
left: 0;
margin-bottom: 10px;
@@ -3463,24 +3668,24 @@ button[aria-label][data-balloon-pos] {
transform-origin: top;
}
-[aria-label][data-balloon-pos][data-balloon-pos="up-left"]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up-left']:before {
bottom: 100%;
left: 5px;
transform: translate(0, var(--balloon-move));
transform-origin: top;
}
-[aria-label][data-balloon-pos][data-balloon-pos="up-left"]:hover:after,
-[aria-label][data-balloon-pos][data-balloon-pos="up-left"][data-balloon-visible]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up-left']:hover:after,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up-left'][data-balloon-visible]:after {
transform: translate(0, 0);
}
-[aria-label][data-balloon-pos][data-balloon-pos="up-left"]:hover:before,
-[aria-label][data-balloon-pos][data-balloon-pos="up-left"][data-balloon-visible]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up-left']:hover:before,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up-left'][data-balloon-visible]:before {
transform: translate(0, 0);
}
-[aria-label][data-balloon-pos][data-balloon-pos="up-right"]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up-right']:after {
bottom: 100%;
right: 0;
margin-bottom: 10px;
@@ -3488,31 +3693,31 @@ button[aria-label][data-balloon-pos] {
transform-origin: top;
}
-[aria-label][data-balloon-pos][data-balloon-pos="up-right"]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up-right']:before {
bottom: 100%;
right: 5px;
transform: translate(0, var(--balloon-move));
transform-origin: top;
}
-[aria-label][data-balloon-pos][data-balloon-pos="up-right"]:hover:after,
-[aria-label][data-balloon-pos][data-balloon-pos="up-right"][data-balloon-visible]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up-right']:hover:after,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up-right'][data-balloon-visible]:after {
transform: translate(0, 0);
}
-[aria-label][data-balloon-pos][data-balloon-pos="up-right"]:hover:before,
-[aria-label][data-balloon-pos][data-balloon-pos="up-right"][data-balloon-visible]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up-right']:hover:before,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='up-right'][data-balloon-visible]:before {
transform: translate(0, 0);
}
-[aria-label][data-balloon-pos][data-balloon-pos="down"]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down']:after {
left: 50%;
margin-top: 10px;
top: 100%;
transform: translate(-50%, calc(var(--balloon-move) * -1));
}
-[aria-label][data-balloon-pos][data-balloon-pos="down"]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down']:before {
width: 0;
height: 0;
border: 5px solid transparent;
@@ -3522,24 +3727,24 @@ button[aria-label][data-balloon-pos] {
transform: translate(-50%, calc(var(--balloon-move) * -1));
}
-[aria-label][data-balloon-pos][data-balloon-pos="down"]:hover:after,
-[aria-label][data-balloon-pos][data-balloon-pos="down"][data-balloon-visible]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down']:hover:after,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down'][data-balloon-visible]:after {
transform: translate(-50%, 0);
}
-[aria-label][data-balloon-pos][data-balloon-pos="down"]:hover:before,
-[aria-label][data-balloon-pos][data-balloon-pos="down"][data-balloon-visible]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down']:hover:before,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down'][data-balloon-visible]:before {
transform: translate(-50%, 0);
}
-[aria-label][data-balloon-pos][data-balloon-pos="down-left"]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down-left']:after {
left: 0;
margin-top: 10px;
top: 100%;
transform: translate(0, calc(var(--balloon-move) * -1));
}
-[aria-label][data-balloon-pos][data-balloon-pos="down-left"]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down-left']:before {
width: 0;
height: 0;
border: 5px solid transparent;
@@ -3549,24 +3754,24 @@ button[aria-label][data-balloon-pos] {
transform: translate(0, calc(var(--balloon-move) * -1));
}
-[aria-label][data-balloon-pos][data-balloon-pos="down-left"]:hover:after,
-[aria-label][data-balloon-pos][data-balloon-pos="down-left"][data-balloon-visible]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down-left']:hover:after,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down-left'][data-balloon-visible]:after {
transform: translate(0, 0);
}
-[aria-label][data-balloon-pos][data-balloon-pos="down-left"]:hover:before,
-[aria-label][data-balloon-pos][data-balloon-pos="down-left"][data-balloon-visible]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down-left']:hover:before,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down-left'][data-balloon-visible]:before {
transform: translate(0, 0);
}
-[aria-label][data-balloon-pos][data-balloon-pos="down-right"]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down-right']:after {
right: 0;
margin-top: 10px;
top: 100%;
transform: translate(0, calc(var(--balloon-move) * -1));
}
-[aria-label][data-balloon-pos][data-balloon-pos="down-right"]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down-right']:before {
width: 0;
height: 0;
border: 5px solid transparent;
@@ -3576,24 +3781,24 @@ button[aria-label][data-balloon-pos] {
transform: translate(0, calc(var(--balloon-move) * -1));
}
-[aria-label][data-balloon-pos][data-balloon-pos="down-right"]:hover:after,
-[aria-label][data-balloon-pos][data-balloon-pos="down-right"][data-balloon-visible]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down-right']:hover:after,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down-right'][data-balloon-visible]:after {
transform: translate(0, 0);
}
-[aria-label][data-balloon-pos][data-balloon-pos="down-right"]:hover:before,
-[aria-label][data-balloon-pos][data-balloon-pos="down-right"][data-balloon-visible]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down-right']:hover:before,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='down-right'][data-balloon-visible]:before {
transform: translate(0, 0);
}
-[aria-label][data-balloon-pos][data-balloon-pos="left"]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='left']:after {
margin-right: 10px;
right: 100%;
top: 50%;
transform: translate(var(--balloon-move), -50%);
}
-[aria-label][data-balloon-pos][data-balloon-pos="left"]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='left']:before {
width: 0;
height: 0;
border: 5px solid transparent;
@@ -3603,24 +3808,24 @@ button[aria-label][data-balloon-pos] {
transform: translate(var(--balloon-move), -50%);
}
-[aria-label][data-balloon-pos][data-balloon-pos="left"]:hover:after,
-[aria-label][data-balloon-pos][data-balloon-pos="left"][data-balloon-visible]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='left']:hover:after,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='left'][data-balloon-visible]:after {
transform: translate(0, -50%);
}
-[aria-label][data-balloon-pos][data-balloon-pos="left"]:hover:before,
-[aria-label][data-balloon-pos][data-balloon-pos="left"][data-balloon-visible]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='left']:hover:before,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='left'][data-balloon-visible]:before {
transform: translate(0, -50%);
}
-[aria-label][data-balloon-pos][data-balloon-pos="right"]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='right']:after {
left: 100%;
margin-left: 10px;
top: 50%;
transform: translate(calc(var(--balloon-move) * -1), -50%);
}
-[aria-label][data-balloon-pos][data-balloon-pos="right"]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='right']:before {
width: 0;
height: 0;
border: 5px solid transparent;
@@ -3630,44 +3835,44 @@ button[aria-label][data-balloon-pos] {
transform: translate(calc(var(--balloon-move) * -1), -50%);
}
-[aria-label][data-balloon-pos][data-balloon-pos="right"]:hover:after,
-[aria-label][data-balloon-pos][data-balloon-pos="right"][data-balloon-visible]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='right']:hover:after,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='right'][data-balloon-visible]:after {
transform: translate(0, -50%);
}
-[aria-label][data-balloon-pos][data-balloon-pos="right"]:hover:before,
-[aria-label][data-balloon-pos][data-balloon-pos="right"][data-balloon-visible]:before {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='right']:hover:before,
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos='right'][data-balloon-visible]:before {
transform: translate(0, -50%);
}
-[aria-label][data-balloon-pos][data-balloon-length="small"]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-length='small']:after {
white-space: normal;
width: 80px;
}
-[aria-label][data-balloon-pos][data-balloon-length="medium"]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-length='medium']:after {
white-space: normal;
width: 150px;
}
-[aria-label][data-balloon-pos][data-balloon-length="large"]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-length='large']:after {
white-space: normal;
width: 260px;
}
-[aria-label][data-balloon-pos][data-balloon-length="xlarge"]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-length='xlarge']:after {
white-space: normal;
width: 380px;
}
@media screen and (max-width: 768px) {
- [aria-label][data-balloon-pos][data-balloon-length="xlarge"]:after {
+ .litespeed-wrap [aria-label][data-balloon-pos][data-balloon-length='xlarge']:after {
white-space: normal;
width: 90vw;
}
}
-[aria-label][data-balloon-pos][data-balloon-length="fit"]:after {
+.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-length='fit']:after {
white-space: normal;
width: 100%;
-}
\ No newline at end of file
+}
diff --git a/assets/img/iconlscwp.svg b/assets/img/iconlscwp.svg
new file mode 100644
index 000000000..af5b1f32a
--- /dev/null
+++ b/assets/img/iconlscwp.svg
@@ -0,0 +1,12 @@
+
+
+
diff --git a/assets/img/lscwp_blue_font-icon_22px.svg b/assets/img/lscwp_blue_font-icon_22px.svg
new file mode 100644
index 000000000..c30f19191
--- /dev/null
+++ b/assets/img/lscwp_blue_font-icon_22px.svg
@@ -0,0 +1,17 @@
+
+
+
+
diff --git a/assets/img/lscwp_font-icon_32px.svg b/assets/img/lscwp_font-icon_32px.svg
new file mode 100644
index 000000000..7a4d2045d
--- /dev/null
+++ b/assets/img/lscwp_font-icon_32px.svg
@@ -0,0 +1,24 @@
+
+
+
+
diff --git a/assets/img/lscwp_gray-yellow_font-icon_22px.svg b/assets/img/lscwp_gray-yellow_font-icon_22px.svg
new file mode 100644
index 000000000..5e459a166
--- /dev/null
+++ b/assets/img/lscwp_gray-yellow_font-icon_22px.svg
@@ -0,0 +1,17 @@
+
+
+
+
diff --git a/assets/img/lscwp_gray_font-icon_22px.svg b/assets/img/lscwp_gray_font-icon_22px.svg
new file mode 100644
index 000000000..3375bf0e2
--- /dev/null
+++ b/assets/img/lscwp_gray_font-icon_22px.svg
@@ -0,0 +1,17 @@
+
+
+
+
diff --git a/assets/img/lscwp_grayscale_font-icon_22px.svg b/assets/img/lscwp_grayscale_font-icon_22px.svg
new file mode 100644
index 000000000..424b1c6cb
--- /dev/null
+++ b/assets/img/lscwp_grayscale_font-icon_22px.svg
@@ -0,0 +1,18 @@
+
+
+
+
diff --git a/assets/img/quic-cloud-logo-light_stack_300px.png b/assets/img/quic-cloud-logo-light_stack_300px.png
new file mode 100644
index 000000000..5af6321f6
Binary files /dev/null and b/assets/img/quic-cloud-logo-light_stack_300px.png differ
diff --git a/assets/img/quic-cloud-logo.svg b/assets/img/quic-cloud-logo.svg
new file mode 100644
index 000000000..12f2c82c8
--- /dev/null
+++ b/assets/img/quic-cloud-logo.svg
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+]>
+
diff --git a/assets/js/component.cdn.js b/assets/js/component.cdn.js
index 36f275f8d..d186dc407 100644
--- a/assets/js/component.cdn.js
+++ b/assets/js/component.cdn.js
@@ -3,50 +3,51 @@
* @author Hai Zheng
*/
class CDNMapping extends React.Component {
- constructor( props ) {
- super( props );
+ constructor(props) {
+ super(props);
this.state = {
- list: props.list
+ list: props.list,
};
- this.onChange = this.onChange.bind( this );
- this.delRow = this.delRow.bind( this );
- this.addNew = this.addNew.bind( this );
+ this.onChange = this.onChange.bind(this);
+ this.delRow = this.delRow.bind(this);
+ this.addNew = this.addNew.bind(this);
}
- onChange( e, index ) {
+ onChange(e, index) {
const target = e.currentTarget;
- const value = target.dataset.hasOwnProperty('value') ? Boolean(target.dataset.value*1) : target.value;
+ const value = target.dataset.hasOwnProperty('value') ? Boolean(target.dataset.value * 1) : target.value;
const list = this.state.list;
- list[ index ][ target.dataset.type ] = value;
+ list[index][target.dataset.type] = value;
- this.setState( {
- list: list
- } );
+ this.setState({
+ list: list,
+ });
}
- delRow( index ) {
+ delRow(index) {
const data = this.state.list;
- data.splice( index, 1 );
- this.setState( { list: data } );
+ data.splice(index, 1);
+ this.setState({ list: data });
}
addNew() {
const list = this.state.list;
- list.push( { url: '' } );
- this.setState( { list: list } );
+ list.push({ url: '' });
+ this.setState({ list: list });
}
render() {
return (
Please add/replace the following codes into the beginning of %1$s:
" "%2$s" msgstr "" -#: src/img-optm.cls.php:147 -msgid "No new image gathered." -msgstr "" - -#: src/img-optm.cls.php:180 -msgid "Gathered %d images successfully." -msgstr "" - -#: src/img-optm.cls.php:472 +#: src/img-optm.cls.php:352 msgid "Pushed %1$s to Cloud server, accepted %2$s." msgstr "" -#: src/img-optm.cls.php:509 -msgid "Bypassed %1$s duplicated images." -msgstr "" - -#: src/img-optm.cls.php:547 +#: src/img-optm.cls.php:600 msgid "Cleared %1$s invalid images." msgstr "" -#: src/img-optm.cls.php:626 +#: src/img-optm.cls.php:657 msgid "No valid image found in the current request." msgstr "" -#: src/img-optm.cls.php:649 +#: src/img-optm.cls.php:680 msgid "No valid image found by Cloud server in the current request." msgstr "" -#: src/img-optm.cls.php:888 -msgid "Pull Cron is running" +#: src/img-optm.cls.php:866 +msgid "Started async image optimization request" msgstr "" #: src/img-optm.cls.php:947 -msgid "Some optimized image file(s) has expired and was cleared." -msgstr "" - -#: src/img-optm.cls.php:964 -msgid "One or more pulled images does not match with the notified image md5" +msgid "Pull Cron is running" msgstr "" -#: src/img-optm.cls.php:1008 -msgid "Optimized WebP file expired and was cleared." +#: src/img-optm.cls.php:1040 src/img-optm.cls.php:1066 +msgid "Some optimized image file(s) has expired and was cleared." msgstr "" -#: src/img-optm.cls.php:1025 +#: src/img-optm.cls.php:1083 msgid "Pulled WebP image md5 does not match the notified WebP image md5." msgstr "" -#: src/img-optm.cls.php:1085 -msgid "Pulled %d image(s)" +#: src/img-optm.cls.php:1119 +msgid "One or more pulled images does not match with the notified image md5" msgstr "" -#: src/img-optm.cls.php:1172 +#: src/img-optm.cls.php:1312 msgid "Cleaned up unfinished data successfully." msgstr "" -#: src/img-optm.cls.php:1243 +#: src/img-optm.cls.php:1396 msgid "Destroy all optimization data successfully." msgstr "" -#: src/img-optm.cls.php:1275 src/img-optm.cls.php:1340 +#: src/img-optm.cls.php:1459 src/img-optm.cls.php:1521 msgid "Rescanned successfully." msgstr "" -#: src/img-optm.cls.php:1340 +#: src/img-optm.cls.php:1521 msgid "Rescanned %d images successfully." msgstr "" -#: src/img-optm.cls.php:1399 +#: src/img-optm.cls.php:1588 msgid "Calculated backups successfully." msgstr "" -#: src/img-optm.cls.php:1461 +#: src/img-optm.cls.php:1682 msgid "Removed backups successfully." msgstr "" -#: src/img-optm.cls.php:1656 +#: src/img-optm.cls.php:1864 msgid "Switched images successfully." msgstr "" -#: src/img-optm.cls.php:1684 +#: src/img-optm.cls.php:1909 src/img-optm.cls.php:1955 +msgid "Switched to optimized file successfully." +msgstr "" + +#: src/img-optm.cls.php:1928 msgid "Disabled WebP file successfully." msgstr "" -#: src/img-optm.cls.php:1690 +#: src/img-optm.cls.php:1933 msgid "Enabled WebP file successfully." msgstr "" -#: src/img-optm.cls.php:1706 +#: src/img-optm.cls.php:1949 msgid "Restored original file successfully." msgstr "" -#: src/img-optm.cls.php:1713 -msgid "Switched to optimized file successfully." -msgstr "" - -#: src/img-optm.cls.php:1776 +#: src/img-optm.cls.php:2006 msgid "Reset the optimized data successfully." msgstr "" -#: src/import.cls.php:75 +#: src/import.cls.php:81 msgid "Import failed due to file error." msgstr "" -#: src/import.cls.php:132 +#: src/import.cls.php:134 msgid "Imported setting file %s successfully." msgstr "" -#: src/import.cls.php:156 +#: src/import.cls.php:157 msgid "Reset successfully." msgstr "" -#: src/lang.cls.php:23 -msgid "Images not requested" -msgstr "" - -#: src/lang.cls.php:24 tpl/dash/dashboard.tpl.php:337 -msgid "Images requested" -msgstr "" - -#: src/lang.cls.php:25 tpl/dash/dashboard.tpl.php:347 -msgid "Images notified to pull" -msgstr "" - #: src/lang.cls.php:26 -msgid "Images optimized and pulled" +msgid "Images not requested" msgstr "" #: src/lang.cls.php:27 -msgid "Images failed to pull" -msgstr "" - -#: src/lang.cls.php:28 src/lang.cls.php:29 -msgid "Images failed to fetch" -msgstr "" - -#: src/lang.cls.php:30 -msgid "Images previously optimized" +msgid "Images ready to request" msgstr "" -#: src/lang.cls.php:31 -msgid "Images failed with other errors" -msgstr "" - -#: src/lang.cls.php:32 -msgid "Image files missing" +#: src/lang.cls.php:28 tpl/dash/dashboard.tpl.php:361 +msgid "Images requested" msgstr "" -#: src/lang.cls.php:33 -msgid "Duplicate image files ignored" +#: src/lang.cls.php:29 tpl/dash/dashboard.tpl.php:371 +msgid "Images notified to pull" msgstr "" -#: src/lang.cls.php:34 -msgid "Images with wrong meta" +#: src/lang.cls.php:30 +msgid "Images optimized and pulled" msgstr "" -#: src/lang.cls.php:51 +#: src/lang.cls.php:49 msgid "" "Unable to automatically add %1$s as a Domain Alias for main %2$s domain, due " "to potential CDN conflict." @@ -1041,1009 +1082,1021 @@ msgid "" "Unable to automatically add %1$s as a Domain Alias for main %2$s domain." msgstr "" -#: src/lang.cls.php:55 +#: src/lang.cls.php:56 msgid "Alias is in use by another QUIC.cloud account." msgstr "" -#: src/lang.cls.php:85 +#: src/lang.cls.php:89 msgid "Server IP" msgstr "" -#: src/lang.cls.php:86 +#: src/lang.cls.php:90 msgid "Domain Key" msgstr "" -#: src/lang.cls.php:87 +#: src/lang.cls.php:91 msgid "Guest Mode User Agents" msgstr "" -#: src/lang.cls.php:88 +#: src/lang.cls.php:92 msgid "Guest Mode IPs" msgstr "" -#: src/lang.cls.php:90 +#: src/lang.cls.php:94 msgid "Enable Cache" msgstr "" -#: src/lang.cls.php:91 tpl/dash/dashboard.tpl.php:397 +#: src/lang.cls.php:95 tpl/dash/dashboard.tpl.php:421 +#: tpl/presets/standard.tpl.php:12 msgid "Browser Cache" msgstr "" -#: src/lang.cls.php:92 +#: src/lang.cls.php:96 msgid "Default Public Cache TTL" msgstr "" -#: src/lang.cls.php:93 +#: src/lang.cls.php:97 msgid "Default Private Cache TTL" msgstr "" -#: src/lang.cls.php:94 +#: src/lang.cls.php:98 msgid "Default Front Page TTL" msgstr "" -#: src/lang.cls.php:95 +#: src/lang.cls.php:99 msgid "Default Feed TTL" msgstr "" -#: src/lang.cls.php:96 +#: src/lang.cls.php:100 msgid "Default REST TTL" msgstr "" -#: src/lang.cls.php:97 +#: src/lang.cls.php:101 msgid "Default HTTP Status Code Page TTL" msgstr "" -#: src/lang.cls.php:98 +#: src/lang.cls.php:102 msgid "Browser Cache TTL" msgstr "" -#: src/lang.cls.php:99 +#: src/lang.cls.php:103 msgid "Automatically Upgrade" msgstr "" -#: src/lang.cls.php:100 +#: src/lang.cls.php:104 msgid "Guest Mode" msgstr "" -#: src/lang.cls.php:101 +#: src/lang.cls.php:105 msgid "Guest Optimization" msgstr "" -#: src/lang.cls.php:102 +#: src/lang.cls.php:106 msgid "Notifications" msgstr "" -#: src/lang.cls.php:103 +#: src/lang.cls.php:107 msgid "Cache Logged-in Users" msgstr "" -#: src/lang.cls.php:104 +#: src/lang.cls.php:108 msgid "Cache Commenters" msgstr "" -#: src/lang.cls.php:105 +#: src/lang.cls.php:109 msgid "Cache REST API" msgstr "" -#: src/lang.cls.php:106 +#: src/lang.cls.php:110 msgid "Cache Login Page" msgstr "" -#: src/lang.cls.php:107 +#: src/lang.cls.php:111 msgid "Cache favicon.ico" msgstr "" -#: src/lang.cls.php:108 +#: src/lang.cls.php:112 msgid "Cache PHP Resources" msgstr "" -#: src/lang.cls.php:109 tpl/cache/settings_inc.cache_mobile.tpl.php:71 +#: src/lang.cls.php:113 tpl/cache/settings_inc.cache_mobile.tpl.php:71 msgid "Cache Mobile" msgstr "" -#: src/lang.cls.php:110 tpl/cache/settings_inc.cache_mobile.tpl.php:71 +#: src/lang.cls.php:114 tpl/cache/settings_inc.cache_mobile.tpl.php:71 msgid "List of Mobile User Agents" msgstr "" -#: src/lang.cls.php:111 +#: src/lang.cls.php:115 msgid "Private Cached URIs" msgstr "" -#: src/lang.cls.php:112 +#: src/lang.cls.php:116 msgid "Drop Query String" msgstr "" -#: src/lang.cls.php:115 +#: src/lang.cls.php:119 msgid "Method" msgstr "" -#: src/lang.cls.php:116 +#: src/lang.cls.php:120 msgid "Host" msgstr "" -#: src/lang.cls.php:117 +#: src/lang.cls.php:121 msgid "Port" msgstr "" -#: src/lang.cls.php:118 +#: src/lang.cls.php:122 msgid "Default Object Lifetime" msgstr "" -#: src/lang.cls.php:119 +#: src/lang.cls.php:123 msgid "Username" msgstr "" -#: src/lang.cls.php:120 +#: src/lang.cls.php:124 msgid "Password" msgstr "" -#: src/lang.cls.php:121 +#: src/lang.cls.php:125 msgid "Redis Database ID" msgstr "" -#: src/lang.cls.php:122 +#: src/lang.cls.php:126 msgid "Global Groups" msgstr "" -#: src/lang.cls.php:123 +#: src/lang.cls.php:127 msgid "Do Not Cache Groups" msgstr "" -#: src/lang.cls.php:124 +#: src/lang.cls.php:128 msgid "Persistent Connection" msgstr "" -#: src/lang.cls.php:125 +#: src/lang.cls.php:129 msgid "Cache WP-Admin" msgstr "" -#: src/lang.cls.php:126 +#: src/lang.cls.php:130 msgid "Store Transients" msgstr "" -#: src/lang.cls.php:128 +#: src/lang.cls.php:132 msgid "Purge All On Upgrade" msgstr "" -#: src/lang.cls.php:129 +#: src/lang.cls.php:133 msgid "Serve Stale" msgstr "" -#: src/lang.cls.php:130 tpl/cache/settings-purge.tpl.php:130 +#: src/lang.cls.php:134 tpl/cache/settings-purge.tpl.php:130 msgid "Scheduled Purge URLs" msgstr "" -#: src/lang.cls.php:131 tpl/cache/settings-purge.tpl.php:105 +#: src/lang.cls.php:135 tpl/cache/settings-purge.tpl.php:105 msgid "Scheduled Purge Time" msgstr "" -#: src/lang.cls.php:132 +#: src/lang.cls.php:136 msgid "Force Cache URIs" msgstr "" -#: src/lang.cls.php:133 +#: src/lang.cls.php:137 msgid "Force Public Cache URIs" msgstr "" -#: src/lang.cls.php:134 +#: src/lang.cls.php:138 msgid "Do Not Cache URIs" msgstr "" -#: src/lang.cls.php:135 +#: src/lang.cls.php:139 msgid "Do Not Cache Query Strings" msgstr "" -#: src/lang.cls.php:136 +#: src/lang.cls.php:140 msgid "Do Not Cache Categories" msgstr "" -#: src/lang.cls.php:137 +#: src/lang.cls.php:141 msgid "Do Not Cache Tags" msgstr "" -#: src/lang.cls.php:138 +#: src/lang.cls.php:142 msgid "Do Not Cache Roles" msgstr "" -#: src/lang.cls.php:139 +#: src/lang.cls.php:143 msgid "CSS Minify" msgstr "" -#: src/lang.cls.php:140 +#: src/lang.cls.php:144 msgid "CSS Combine" msgstr "" -#: src/lang.cls.php:141 +#: src/lang.cls.php:145 msgid "CSS Combine External and Inline" msgstr "" -#: src/lang.cls.php:142 +#: src/lang.cls.php:146 msgid "Generate UCSS" msgstr "" -#: src/lang.cls.php:143 +#: src/lang.cls.php:147 msgid "UCSS Inline" msgstr "" -#: src/lang.cls.php:144 -msgid "UCSS Allowlist" +#: src/lang.cls.php:148 +msgid "UCSS Selector Allowlist" msgstr "" -#: src/lang.cls.php:145 +#: src/lang.cls.php:149 +msgid "UCSS File Excludes and Inline" +msgstr "" + +#: src/lang.cls.php:150 msgid "UCSS URI Excludes" msgstr "" -#: src/lang.cls.php:146 +#: src/lang.cls.php:151 msgid "JS Minify" msgstr "" -#: src/lang.cls.php:148 +#: src/lang.cls.php:153 msgid "JS Combine External and Inline" msgstr "" -#: src/lang.cls.php:149 +#: src/lang.cls.php:154 msgid "HTML Minify" msgstr "" -#: src/lang.cls.php:150 +#: src/lang.cls.php:155 msgid "HTML Lazy Load Selectors" msgstr "" -#: src/lang.cls.php:151 tpl/page_optm/settings_tuning.tpl.php:148 +#: src/lang.cls.php:156 tpl/page_optm/settings_tuning_css.tpl.php:131 msgid "Load CSS Asynchronously" msgstr "" -#: src/lang.cls.php:152 +#: src/lang.cls.php:157 msgid "CCSS Per URL" msgstr "" -#: src/lang.cls.php:153 +#: src/lang.cls.php:158 msgid "Inline CSS Async Lib" msgstr "" -#: src/lang.cls.php:154 +#: src/lang.cls.php:159 tpl/presets/standard.tpl.php:39 msgid "Font Display Optimization" msgstr "" -#: src/lang.cls.php:155 +#: src/lang.cls.php:160 msgid "Load JS Deferred" msgstr "" -#: src/lang.cls.php:156 +#: src/lang.cls.php:161 msgid "Localize Resources" msgstr "" -#: src/lang.cls.php:157 +#: src/lang.cls.php:162 msgid "Localization Files" msgstr "" -#: src/lang.cls.php:158 +#: src/lang.cls.php:163 msgid "DNS Prefetch" msgstr "" -#: src/lang.cls.php:159 +#: src/lang.cls.php:164 msgid "DNS Prefetch Control" msgstr "" -#: src/lang.cls.php:160 +#: src/lang.cls.php:165 +msgid "DNS Preconnect" +msgstr "" + +#: src/lang.cls.php:166 msgid "CSS Excludes" msgstr "" -#: src/lang.cls.php:161 +#: src/lang.cls.php:167 +msgid "JS Delayed Includes" +msgstr "" + +#: src/lang.cls.php:168 msgid "JS Excludes" msgstr "" -#: src/lang.cls.php:162 +#: src/lang.cls.php:169 msgid "Remove Query Strings" msgstr "" -#: src/lang.cls.php:163 +#: src/lang.cls.php:170 msgid "Load Google Fonts Asynchronously" msgstr "" -#: src/lang.cls.php:164 +#: src/lang.cls.php:171 msgid "Remove Google Fonts" msgstr "" -#: src/lang.cls.php:165 +#: src/lang.cls.php:172 msgid "Critical CSS Rules" msgstr "" -#: src/lang.cls.php:166 +#: src/lang.cls.php:173 msgid "Separate CCSS Cache Post Types" msgstr "" -#: src/lang.cls.php:167 +#: src/lang.cls.php:174 msgid "Separate CCSS Cache URIs" msgstr "" -#: src/lang.cls.php:168 -msgid "JS Deferred Excludes" +#: src/lang.cls.php:175 +msgid "JS Deferred / Delayed Excludes" msgstr "" -#: src/lang.cls.php:169 +#: src/lang.cls.php:176 msgid "Guest Mode JS Excludes" msgstr "" -#: src/lang.cls.php:170 +#: src/lang.cls.php:177 tpl/presets/standard.tpl.php:44 msgid "Remove WordPress Emoji" msgstr "" -#: src/lang.cls.php:171 +#: src/lang.cls.php:178 tpl/presets/standard.tpl.php:45 msgid "Remove Noscript Tags" msgstr "" -#: src/lang.cls.php:172 +#: src/lang.cls.php:179 msgid "URI Excludes" msgstr "" -#: src/lang.cls.php:173 +#: src/lang.cls.php:180 msgid "Optimize for Guests Only" msgstr "" -#: src/lang.cls.php:174 +#: src/lang.cls.php:181 msgid "Role Excludes" msgstr "" -#: src/lang.cls.php:177 +#: src/lang.cls.php:184 msgid "Gravatar Cache Cron" msgstr "" -#: src/lang.cls.php:178 +#: src/lang.cls.php:185 msgid "Gravatar Cache TTL" msgstr "" -#: src/lang.cls.php:180 +#: src/lang.cls.php:187 +msgid "Preload Featured Image" +msgstr "" + +#: src/lang.cls.php:188 msgid "Lazy Load Images" msgstr "" -#: src/lang.cls.php:181 +#: src/lang.cls.php:189 msgid "Lazy Load Image Excludes" msgstr "" -#: src/lang.cls.php:182 +#: src/lang.cls.php:190 msgid "Lazy Load Image Class Name Excludes" msgstr "" -#: src/lang.cls.php:183 +#: src/lang.cls.php:191 msgid "Lazy Load Image Parent Class Name Excludes" msgstr "" -#: src/lang.cls.php:184 +#: src/lang.cls.php:192 msgid "Lazy Load Iframe Class Name Excludes" msgstr "" -#: src/lang.cls.php:185 +#: src/lang.cls.php:193 msgid "Lazy Load Iframe Parent Class Name Excludes" msgstr "" -#: src/lang.cls.php:186 +#: src/lang.cls.php:194 msgid "Lazy Load URI Excludes" msgstr "" -#: src/lang.cls.php:187 +#: src/lang.cls.php:195 msgid "LQIP Excludes" msgstr "" -#: src/lang.cls.php:188 +#: src/lang.cls.php:196 msgid "Basic Image Placeholder" msgstr "" -#: src/lang.cls.php:189 +#: src/lang.cls.php:197 msgid "Responsive Placeholder" msgstr "" -#: src/lang.cls.php:190 +#: src/lang.cls.php:198 msgid "Responsive Placeholder Color" msgstr "" -#: src/lang.cls.php:191 +#: src/lang.cls.php:199 msgid "Responsive Placeholder SVG" msgstr "" -#: src/lang.cls.php:192 +#: src/lang.cls.php:200 msgid "LQIP Cloud Generator" msgstr "" -#: src/lang.cls.php:193 +#: src/lang.cls.php:201 msgid "LQIP Quality" msgstr "" -#: src/lang.cls.php:194 +#: src/lang.cls.php:202 msgid "LQIP Minimum Dimensions" msgstr "" -#: src/lang.cls.php:196 +#: src/lang.cls.php:204 msgid "Generate LQIP In Background" msgstr "" -#: src/lang.cls.php:197 +#: src/lang.cls.php:205 msgid "Lazy Load Iframes" msgstr "" -#: src/lang.cls.php:198 +#: src/lang.cls.php:206 msgid "Add Missing Sizes" msgstr "" -#: src/lang.cls.php:199 src/metabox.cls.php:31 src/metabox.cls.php:32 +#: src/lang.cls.php:207 src/metabox.cls.php:33 src/metabox.cls.php:34 #: tpl/page_optm/settings_vpi.tpl.php:12 msgid "Viewport Images" msgstr "" -#: src/lang.cls.php:200 +#: src/lang.cls.php:208 msgid "Viewport Images Cron" msgstr "" -#: src/lang.cls.php:202 +#: src/lang.cls.php:210 msgid "Auto Request Cron" msgstr "" -#: src/lang.cls.php:203 +#: src/lang.cls.php:211 msgid "Auto Pull Cron" msgstr "" -#: src/lang.cls.php:204 +#: src/lang.cls.php:212 msgid "Optimize Original Images" msgstr "" -#: src/lang.cls.php:205 +#: src/lang.cls.php:213 msgid "Remove Original Backups" msgstr "" -#: src/lang.cls.php:206 -msgid "Create WebP Versions" +#: src/lang.cls.php:214 +msgid "Image WebP Replacement" msgstr "" -#: src/lang.cls.php:207 +#: src/lang.cls.php:215 msgid "Optimize Losslessly" msgstr "" -#: src/lang.cls.php:208 +#: src/lang.cls.php:216 msgid "Preserve EXIF/XMP data" msgstr "" -#: src/lang.cls.php:209 +#: src/lang.cls.php:217 msgid "WebP Attribute To Replace" msgstr "" -#: src/lang.cls.php:210 +#: src/lang.cls.php:218 msgid "WebP For Extra srcset" msgstr "" -#: src/lang.cls.php:211 +#: src/lang.cls.php:219 msgid "WordPress Image Quality Control" msgstr "" -#: src/lang.cls.php:212 tpl/esi_widget_edit.php:36 +#: src/lang.cls.php:220 tpl/esi_widget_edit.php:36 msgid "Enable ESI" msgstr "" -#: src/lang.cls.php:213 +#: src/lang.cls.php:221 msgid "Cache Admin Bar" msgstr "" -#: src/lang.cls.php:214 +#: src/lang.cls.php:222 msgid "Cache Comment Form" msgstr "" -#: src/lang.cls.php:215 +#: src/lang.cls.php:223 msgid "ESI Nonces" msgstr "" -#: src/lang.cls.php:216 tpl/page_optm/settings_css.tpl.php:112 -#: tpl/page_optm/settings_css.tpl.php:222 tpl/page_optm/settings_vpi.tpl.php:67 +#: src/lang.cls.php:224 tpl/page_optm/settings_css.tpl.php:121 +#: tpl/page_optm/settings_css.tpl.php:238 tpl/page_optm/settings_vpi.tpl.php:67 msgid "Vary Group" msgstr "" -#: src/lang.cls.php:217 +#: src/lang.cls.php:225 msgid "Purge All Hooks" msgstr "" -#: src/lang.cls.php:218 +#: src/lang.cls.php:226 msgid "Improve HTTP/HTTPS Compatibility" msgstr "" -#: src/lang.cls.php:219 +#: src/lang.cls.php:227 msgid "Instant Click" msgstr "" -#: src/lang.cls.php:220 +#: src/lang.cls.php:228 msgid "Do Not Cache Cookies" msgstr "" -#: src/lang.cls.php:221 +#: src/lang.cls.php:229 msgid "Do Not Cache User Agents" msgstr "" -#: src/lang.cls.php:222 +#: src/lang.cls.php:230 msgid "Login Cookie" msgstr "" -#: src/lang.cls.php:223 -msgid "Image WebP Replacement" +#: src/lang.cls.php:231 +msgid "Vary Cookies" msgstr "" -#: src/lang.cls.php:225 +#: src/lang.cls.php:233 msgid "Frontend Heartbeat Control" msgstr "" -#: src/lang.cls.php:226 +#: src/lang.cls.php:234 msgid "Frontend Heartbeat TTL" msgstr "" -#: src/lang.cls.php:227 +#: src/lang.cls.php:235 msgid "Backend Heartbeat Control" msgstr "" -#: src/lang.cls.php:228 +#: src/lang.cls.php:236 msgid "Backend Heartbeat TTL" msgstr "" -#: src/lang.cls.php:229 +#: src/lang.cls.php:237 msgid "Editor Heartbeat" msgstr "" -#: src/lang.cls.php:230 +#: src/lang.cls.php:238 msgid "Editor Heartbeat TTL" msgstr "" -#: src/lang.cls.php:232 +#: src/lang.cls.php:240 msgid "QUIC.cloud CDN" msgstr "" -#: src/lang.cls.php:233 +#: src/lang.cls.php:241 msgid "Use CDN Mapping" msgstr "" -#: src/lang.cls.php:234 +#: src/lang.cls.php:242 msgid "CDN URL" msgstr "" -#: src/lang.cls.php:235 +#: src/lang.cls.php:243 msgid "Include Images" msgstr "" -#: src/lang.cls.php:236 +#: src/lang.cls.php:244 msgid "Include CSS" msgstr "" -#: src/lang.cls.php:237 +#: src/lang.cls.php:245 msgid "Include JS" msgstr "" -#: src/lang.cls.php:238 tpl/cdn/settings.tpl.php:102 +#: src/lang.cls.php:246 tpl/cdn/settings.tpl.php:102 msgid "Include File Types" msgstr "" -#: src/lang.cls.php:239 +#: src/lang.cls.php:247 msgid "HTML Attribute To Replace" msgstr "" -#: src/lang.cls.php:240 +#: src/lang.cls.php:248 msgid "Original URLs" msgstr "" -#: src/lang.cls.php:241 +#: src/lang.cls.php:249 msgid "Included Directories" msgstr "" -#: src/lang.cls.php:242 +#: src/lang.cls.php:250 msgid "Exclude Path" msgstr "" -#: src/lang.cls.php:243 +#: src/lang.cls.php:251 msgid "Cloudflare API" msgstr "" -#: src/lang.cls.php:246 +#: src/lang.cls.php:254 msgid "Delay" msgstr "" -#: src/lang.cls.php:247 +#: src/lang.cls.php:255 msgid "Run Duration" msgstr "" -#: src/lang.cls.php:248 +#: src/lang.cls.php:256 msgid "Interval Between Runs" msgstr "" -#: src/lang.cls.php:249 +#: src/lang.cls.php:257 msgid "Crawl Interval" msgstr "" -#: src/lang.cls.php:250 +#: src/lang.cls.php:258 msgid "Threads" msgstr "" -#: src/lang.cls.php:251 +#: src/lang.cls.php:259 msgid "Timeout" msgstr "" -#: src/lang.cls.php:252 +#: src/lang.cls.php:260 msgid "Server Load Limit" msgstr "" -#: src/lang.cls.php:253 +#: src/lang.cls.php:261 msgid "Role Simulation" msgstr "" -#: src/lang.cls.php:254 +#: src/lang.cls.php:262 msgid "Cookie Simulation" msgstr "" -#: src/lang.cls.php:255 +#: src/lang.cls.php:263 msgid "Custom Sitemap" msgstr "" -#: src/lang.cls.php:256 +#: src/lang.cls.php:264 msgid "Drop Domain from Sitemap" msgstr "" -#: src/lang.cls.php:257 +#: src/lang.cls.php:265 msgid "Sitemap Timeout" msgstr "" -#: src/lang.cls.php:259 tpl/inc/disabled_all.php:5 +#: src/lang.cls.php:267 tpl/inc/disabled_all.php:5 msgid "Disable All Features" msgstr "" -#: src/lang.cls.php:260 tpl/toolbox/log_viewer.tpl.php:11 +#: src/lang.cls.php:268 tpl/toolbox/log_viewer.tpl.php:11 msgid "Debug Log" msgstr "" -#: src/lang.cls.php:261 +#: src/lang.cls.php:269 msgid "Admin IPs" msgstr "" -#: src/lang.cls.php:262 +#: src/lang.cls.php:270 msgid "Debug Level" msgstr "" -#: src/lang.cls.php:263 +#: src/lang.cls.php:271 msgid "Log File Size Limit" msgstr "" -#: src/lang.cls.php:264 +#: src/lang.cls.php:272 msgid "Log Cookies" msgstr "" -#: src/lang.cls.php:265 +#: src/lang.cls.php:273 msgid "Collapse Query Strings" msgstr "" -#: src/lang.cls.php:266 +#: src/lang.cls.php:274 msgid "Debug URI Includes" msgstr "" -#: src/lang.cls.php:267 +#: src/lang.cls.php:275 msgid "Debug URI Excludes" msgstr "" -#: src/lang.cls.php:268 +#: src/lang.cls.php:276 msgid "Debug String Excludes" msgstr "" -#: src/lang.cls.php:270 +#: src/lang.cls.php:278 msgid "Revisions Max Number" msgstr "" -#: src/lang.cls.php:271 +#: src/lang.cls.php:279 msgid "Revisions Max Age" msgstr "" -#: src/media.cls.php:199 +#: src/media.cls.php:241 msgid "LiteSpeed Optimization" msgstr "" -#: src/media.cls.php:249 src/media.cls.php:274 src/media.cls.php:303 -#: src/media.cls.php:327 +#: src/media.cls.php:292 src/media.cls.php:321 src/media.cls.php:343 +#: src/media.cls.php:377 msgid "(optm)" msgstr "" -#: src/media.cls.php:250 +#: src/media.cls.php:293 msgid "Currently using optimized version of file." msgstr "" -#: src/media.cls.php:250 src/media.cls.php:304 +#: src/media.cls.php:293 src/media.cls.php:347 msgid "Click to switch to original (unoptimized) version." msgstr "" -#: src/media.cls.php:254 src/media.cls.php:308 +#: src/media.cls.php:296 src/media.cls.php:350 msgid "(non-optm)" msgstr "" -#: src/media.cls.php:255 +#: src/media.cls.php:297 msgid "Currently using original (unoptimized) version of file." msgstr "" -#: src/media.cls.php:255 src/media.cls.php:309 +#: src/media.cls.php:297 src/media.cls.php:354 msgid "Click to switch to optimized version." msgstr "" -#: src/media.cls.php:259 +#: src/media.cls.php:303 msgid "Original file reduced by %1$s (%2$s)" msgstr "" -#: src/media.cls.php:265 +#: src/media.cls.php:307 msgid "Orig saved %s" msgstr "" -#: src/media.cls.php:273 src/media.cls.php:326 +#: src/media.cls.php:320 src/media.cls.php:376 msgid "Using optimized version of file. " msgstr "" -#: src/media.cls.php:273 +#: src/media.cls.php:320 msgid "No backup of original file exists." msgstr "" -#: src/media.cls.php:282 +#: src/media.cls.php:325 msgid "Congratulation! Your file was already optimized" msgstr "" -#: src/media.cls.php:285 +#: src/media.cls.php:326 msgid "Orig %s" msgstr "" -#: src/media.cls.php:285 +#: src/media.cls.php:326 msgid "(no savings)" msgstr "" -#: src/media.cls.php:288 +#: src/media.cls.php:328 msgid "Orig" msgstr "" -#: src/media.cls.php:304 +#: src/media.cls.php:345 msgid "Currently using optimized version of WebP file." msgstr "" -#: src/media.cls.php:309 +#: src/media.cls.php:352 msgid "Currently using original (unoptimized) version of WebP file." msgstr "" -#: src/media.cls.php:313 +#: src/media.cls.php:360 msgid "WebP file reduced by %1$s (%2$s)" msgstr "" -#: src/media.cls.php:318 +#: src/media.cls.php:363 msgid "WebP saved %s" msgstr "" -#: src/media.cls.php:326 +#: src/media.cls.php:376 msgid "No backup of unoptimized WebP file exists." msgstr "" -#: src/media.cls.php:332 +#: src/media.cls.php:381 msgid "WebP" msgstr "" -#: src/media.cls.php:342 +#: src/media.cls.php:391 msgid "Restore from backup" msgstr "" -#: src/metabox.cls.php:28 +#: src/metabox.cls.php:30 msgid "Disable Cache" msgstr "" -#: src/metabox.cls.php:29 +#: src/metabox.cls.php:31 msgid "Disable Image Lazyload" msgstr "" -#: src/metabox.cls.php:30 +#: src/metabox.cls.php:32 msgid "Disable VPI" msgstr "" -#: src/metabox.cls.php:32 +#: src/metabox.cls.php:34 msgid "Mobile" msgstr "" -#: src/metabox.cls.php:53 +#: src/metabox.cls.php:63 msgid "LiteSpeed Options" msgstr "" -#: src/placeholder.cls.php:80 tpl/dash/network_dash.tpl.php:30 +#: src/object-cache.cls.php:473 +msgid "Redis encountered a fatal error: %s (code: %d)" +msgstr "" + +#: src/object.lib.php:543 +msgid "Cache key must not be an empty string." +msgstr "" + +#. translators: %s: The type of the given cache key. +#: src/object.lib.php:545 +msgid "Cache key must be integer or non-empty string, %s given." +msgstr "" + +#: src/placeholder.cls.php:88 tpl/dash/network_dash.tpl.php:30 msgid "LQIP" msgstr "" -#: src/placeholder.cls.php:138 +#: src/placeholder.cls.php:147 msgid "LQIP image preview for size %s" msgstr "" -#: src/purge.cls.php:197 +#: src/purge.cls.php:214 msgid "Purged all caches successfully." msgstr "" -#: src/purge.cls.php:216 +#: src/purge.cls.php:234 msgid "Notified LiteSpeed Web Server to purge all LSCache entries." msgstr "" -#: src/purge.cls.php:235 +#: src/purge.cls.php:254 msgid "Cleaned all Critical CSS files." msgstr "" -#: src/purge.cls.php:254 +#: src/purge.cls.php:274 msgid "Cleaned all Unique CSS files." msgstr "" -#: src/purge.cls.php:288 +#: src/purge.cls.php:314 msgid "Cleaned all LQIP files." msgstr "" -#: src/purge.cls.php:305 +#: src/purge.cls.php:332 msgid "Cleaned all Gravatar files." msgstr "" -#: src/purge.cls.php:322 +#: src/purge.cls.php:350 msgid "Cleaned all localized resource entries." msgstr "" -#: src/purge.cls.php:356 +#: src/purge.cls.php:385 msgid "Notified LiteSpeed Web Server to purge CSS/JS entries." msgstr "" -#: src/purge.cls.php:372 +#: src/purge.cls.php:402 msgid "Opcode cache is not enabled." msgstr "" -#: src/purge.cls.php:384 +#: src/purge.cls.php:414 msgid "Reset the entire opcode cache successfully." msgstr "" -#: src/purge.cls.php:412 +#: src/purge.cls.php:444 msgid "Object cache is not enabled." msgstr "" -#: src/purge.cls.php:425 +#: src/purge.cls.php:457 msgid "Purge all object caches successfully." msgstr "" -#: src/purge.cls.php:638 +#: src/purge.cls.php:678 msgid "Notified LiteSpeed Web Server to purge the front page." msgstr "" -#: src/purge.cls.php:651 +#: src/purge.cls.php:692 msgid "Notified LiteSpeed Web Server to purge all pages." msgstr "" -#: src/purge.cls.php:670 +#: src/purge.cls.php:712 msgid "Notified LiteSpeed Web Server to purge error pages." msgstr "" -#: src/purge.cls.php:697 +#: src/purge.cls.php:740 msgid "Purge category %s" msgstr "" -#: src/purge.cls.php:724 +#: src/purge.cls.php:767 msgid "Purge tag %s" msgstr "" -#: src/purge.cls.php:755 +#: src/purge.cls.php:799 msgid "Purge url %s" msgstr "" -#: src/root.cls.php:185 -msgid "Queue cleared successfully." +#: src/root.cls.php:197 +msgid "All QUIC.cloud service queues have been cleared." msgstr "" -#: src/task.cls.php:122 +#: src/task.cls.php:177 msgid "Every Minute" msgstr "" -#: src/task.cls.php:141 +#: src/task.cls.php:197 msgid "LiteSpeed Crawler Cron" msgstr "" -#: src/utility.cls.php:236 +#: src/utility.cls.php:235 msgid "right now" msgstr "" -#: src/utility.cls.php:236 +#: src/utility.cls.php:235 msgid "just now" msgstr "" -#: src/utility.cls.php:239 +#: src/utility.cls.php:238 msgid " %s ago" msgstr "" -#: thirdparty/litespeed-check.cls.php:111 +#: thirdparty/litespeed-check.cls.php:74 thirdparty/litespeed-check.cls.php:127 msgid "" "Please consider disabling the following detected plugins, as they may " "conflict with LiteSpeed Cache:" msgstr "" -#: thirdparty/woocommerce.content.tpl.php:16 +#: thirdparty/woocommerce.content.tpl.php:17 msgid "WooCommerce Settings" msgstr "" -#: thirdparty/woocommerce.content.tpl.php:21 +#: thirdparty/woocommerce.content.tpl.php:22 #: tpl/cache/settings-advanced.tpl.php:12 #: tpl/cache/settings_inc.browser.tpl.php:12 tpl/toolbox/heartbeat.tpl.php:14 #: tpl/toolbox/report.tpl.php:29 msgid "NOTICE:" msgstr "" -#: thirdparty/woocommerce.content.tpl.php:22 +#: thirdparty/woocommerce.content.tpl.php:23 msgid "After verifying that the cache works in general, please test the cart." msgstr "" -#: thirdparty/woocommerce.content.tpl.php:23 +#: thirdparty/woocommerce.content.tpl.php:24 msgid "To test the cart, visit the FAQ." msgstr "" -#: thirdparty/woocommerce.content.tpl.php:24 +#: thirdparty/woocommerce.content.tpl.php:25 msgid "" "By default, the My Account, Checkout, and Cart pages are automatically " "excluded from caching. Misconfiguration of page associations in WooCommerce " "settings may cause some pages to be erroneously excluded." msgstr "" -#: thirdparty/woocommerce.content.tpl.php:31 -msgid "Use ESI for Cart" -msgstr "" - -#: thirdparty/woocommerce.content.tpl.php:36 -msgid "" -"When the option is ON, cart information will be implemented as ESI blocks. " -"NOTE: To make it work, you need to turn on %1$s under ESI settings." -msgstr "" - -#: thirdparty/woocommerce.content.tpl.php:43 +#: thirdparty/woocommerce.content.tpl.php:33 msgid "Product Update Interval" msgstr "" -#: thirdparty/woocommerce.content.tpl.php:48 +#: thirdparty/woocommerce.content.tpl.php:38 msgid "Purge product on changes to the quantity or stock status." msgstr "" -#: thirdparty/woocommerce.content.tpl.php:48 +#: thirdparty/woocommerce.content.tpl.php:38 msgid "Purge categories only when stock status changes." msgstr "" -#: thirdparty/woocommerce.content.tpl.php:49 +#: thirdparty/woocommerce.content.tpl.php:39 msgid "Purge product and categories only when the stock status changes." msgstr "" -#: thirdparty/woocommerce.content.tpl.php:50 +#: thirdparty/woocommerce.content.tpl.php:40 msgid "Purge product only when the stock status changes." msgstr "" -#: thirdparty/woocommerce.content.tpl.php:50 +#: thirdparty/woocommerce.content.tpl.php:40 msgid "Do not purge categories on changes to the quantity or stock status." msgstr "" -#: thirdparty/woocommerce.content.tpl.php:51 +#: thirdparty/woocommerce.content.tpl.php:41 msgid "" "Always purge both product and categories on changes to the quantity or stock " "status." msgstr "" -#: thirdparty/woocommerce.content.tpl.php:64 +#: thirdparty/woocommerce.content.tpl.php:54 msgid "" "Determines how changes in product quantity and product stock status affect " "product pages and their associated category pages." msgstr "" -#: thirdparty/woocommerce.content.tpl.php:72 -msgid "Use Front Page TTL for the Shop Page" +#: thirdparty/woocommerce.content.tpl.php:62 +msgid "Vary for Mini Cart" msgstr "" -#: thirdparty/woocommerce.content.tpl.php:77 +#: thirdparty/woocommerce.content.tpl.php:69 msgid "" -"Checking this option will force the shop page to use the front page TTL " -"setting." +"Generate a separate vary cache copy for the mini cart when the cart is not " +"empty." msgstr "" -#: thirdparty/woocommerce.content.tpl.php:78 +#: thirdparty/woocommerce.content.tpl.php:70 msgid "" -"For example, if the homepage for the site is located at %1$s, the shop page " -"may be located at %2$s." -msgstr "" - -#: thirdparty/woocommerce.content.tpl.php:86 -msgid "Privately Cache Cart" -msgstr "" - -#: thirdparty/woocommerce.content.tpl.php:91 -msgid "Privately cache cart when not empty." +"If your theme does not use JS to update the mini cart, you must enable this " +"option to display the correct cart contents." msgstr "" #: thirdparty/woocommerce.tab.tpl.php:3 @@ -2074,10 +2127,10 @@ msgstr "" msgid "Dismiss this notice" msgstr "" -#. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 5.2) #-#-#-#-# +#. #-#-#-#-# litespeed-cache.pot (LiteSpeed Cache 6.1) #-#-#-#-# #. Plugin Name of the plugin/theme #: tpl/banner/new_version.php:57 tpl/banner/new_version_dev.tpl.php:12 -#: tpl/cache/more_settings_tip.tpl.php:15 tpl/inc/admin_footer.php:8 +#: tpl/cache/more_settings_tip.tpl.php:15 tpl/inc/admin_footer.php:10 msgid "LiteSpeed Cache" msgstr "" @@ -2114,26 +2167,26 @@ msgstr "" msgid "Thank You for Using the LiteSpeed Cache Plugin!" msgstr "" -#: tpl/banner/score.php:28 tpl/dash/dashboard.tpl.php:178 +#: tpl/banner/score.php:28 tpl/dash/dashboard.tpl.php:209 msgid "Page Load Time" msgstr "" #: tpl/banner/score.php:34 tpl/banner/score.php:74 -#: tpl/dash/dashboard.tpl.php:191 tpl/dash/dashboard.tpl.php:259 +#: tpl/dash/dashboard.tpl.php:223 tpl/dash/dashboard.tpl.php:292 msgid "Before" msgstr "" #: tpl/banner/score.php:45 tpl/banner/score.php:84 -#: tpl/dash/dashboard.tpl.php:200 tpl/dash/dashboard.tpl.php:267 +#: tpl/dash/dashboard.tpl.php:232 tpl/dash/dashboard.tpl.php:300 msgid "After" msgstr "" #: tpl/banner/score.php:55 tpl/banner/score.php:94 -#: tpl/dash/dashboard.tpl.php:208 tpl/dash/dashboard.tpl.php:275 +#: tpl/dash/dashboard.tpl.php:240 tpl/dash/dashboard.tpl.php:308 msgid "Improved by" msgstr "" -#: tpl/banner/score.php:68 tpl/dash/dashboard.tpl.php:235 +#: tpl/banner/score.php:68 tpl/dash/dashboard.tpl.php:267 msgid "PageSpeed Score" msgstr "" @@ -2213,11 +2266,11 @@ msgstr "" #: tpl/cache/more_settings_tip.tpl.php:12 #: tpl/cache/settings-excludes.tpl.php:61 -#: tpl/cache/settings-excludes.tpl.php:94 tpl/cdn/auto_setup.tpl.php:235 -#: tpl/cdn/auto_setup.tpl.php:246 tpl/cdn/settings.tpl.php:78 -#: tpl/crawler/settings-general.tpl.php:39 -#: tpl/crawler/settings-general.tpl.php:140 -#: tpl/crawler/settings-general.tpl.php:145 +#: tpl/cache/settings-excludes.tpl.php:94 tpl/cdn/auto_setup.tpl.php:245 +#: tpl/cdn/auto_setup.tpl.php:256 tpl/cdn/settings.tpl.php:78 +#: tpl/crawler/settings-general.tpl.php:43 +#: tpl/crawler/settings-general.tpl.php:144 +#: tpl/crawler/settings-general.tpl.php:149 msgid "NOTE" msgstr "" @@ -2296,7 +2349,7 @@ msgstr "" msgid "Please visit the Information page on how to test the cache." msgstr "" -#: tpl/cache/settings-cache.tpl.php:27 tpl/page_optm/entry.tpl.php:31 +#: tpl/cache/settings-cache.tpl.php:27 tpl/page_optm/entry.tpl.php:32 msgid "NOTICE" msgstr "" @@ -2394,10 +2447,10 @@ msgstr "" msgid "ESI sample for developers" msgstr "" -#: tpl/cache/settings-esi.tpl.php:35 tpl/cdn/manage.tpl.php:21 +#: tpl/cache/settings-esi.tpl.php:35 tpl/cdn/manage.tpl.php:23 #: tpl/crawler/summary.tpl.php:48 tpl/inc/check_cache_disabled.php:31 #: tpl/inc/check_if_network_disable_all.php:18 -#: tpl/page_optm/settings_css.tpl.php:61 tpl/page_optm/settings_css.tpl.php:167 +#: tpl/page_optm/settings_css.tpl.php:67 tpl/page_optm/settings_css.tpl.php:180 #: tpl/page_optm/settings_localization.tpl.php:11 msgid "WARNING" msgstr "" @@ -2434,11 +2487,13 @@ msgstr "" #: tpl/cache/settings-esi.tpl.php:96 #: tpl/page_optm/settings_media_exc.tpl.php:27 -#: tpl/page_optm/settings_tuning.tpl.php:36 -#: tpl/page_optm/settings_tuning.tpl.php:57 +#: tpl/page_optm/settings_tuning.tpl.php:40 +#: tpl/page_optm/settings_tuning.tpl.php:60 +#: tpl/page_optm/settings_tuning.tpl.php:81 #: tpl/page_optm/settings_tuning.tpl.php:102 -#: tpl/page_optm/settings_tuning.tpl.php:166 -#: tpl/page_optm/settings_tuning.tpl.php:187 +#: tpl/page_optm/settings_tuning.tpl.php:121 +#: tpl/page_optm/settings_tuning_css.tpl.php:25 +#: tpl/page_optm/settings_tuning_css.tpl.php:85 msgid "Filter %s is supported." msgstr "" @@ -2572,7 +2627,7 @@ msgstr "" #: tpl/cache/settings-purge.tpl.php:50 tpl/cache/settings-purge.tpl.php:89 #: tpl/cache/settings-purge.tpl.php:113 -#: tpl/page_optm/settings_tuning.tpl.php:77 +#: tpl/page_optm/settings_tuning_css.tpl.php:60 msgid "Note" msgstr "" @@ -2754,71 +2809,77 @@ msgstr "" msgid "user agents" msgstr "" -#: tpl/cache/settings_inc.login_cookie.tpl.php:17 +#: tpl/cache/settings_inc.login_cookie.tpl.php:19 +#: tpl/cache/settings_inc.login_cookie.tpl.php:77 msgid "SYNTAX: alphanumeric and \"_\"." msgstr "" -#: tpl/cache/settings_inc.login_cookie.tpl.php:18 +#: tpl/cache/settings_inc.login_cookie.tpl.php:20 +#: tpl/cache/settings_inc.login_cookie.tpl.php:78 msgid "No spaces and case sensitive." msgstr "" -#: tpl/cache/settings_inc.login_cookie.tpl.php:19 +#: tpl/cache/settings_inc.login_cookie.tpl.php:21 msgid "MUST BE UNIQUE FROM OTHER WEB APPLICATIONS." msgstr "" -#: tpl/cache/settings_inc.login_cookie.tpl.php:22 +#: tpl/cache/settings_inc.login_cookie.tpl.php:24 msgid "The default login cookie is %s." msgstr "" -#: tpl/cache/settings_inc.login_cookie.tpl.php:23 +#: tpl/cache/settings_inc.login_cookie.tpl.php:25 msgid "" "The server will determine if the user is logged in based on the existence of " "this cookie." msgstr "" -#: tpl/cache/settings_inc.login_cookie.tpl.php:24 +#: tpl/cache/settings_inc.login_cookie.tpl.php:26 msgid "" "This setting is useful for those that have multiple web applications for the " "same domain." msgstr "" -#: tpl/cache/settings_inc.login_cookie.tpl.php:25 +#: tpl/cache/settings_inc.login_cookie.tpl.php:27 msgid "" "If every web application uses the same cookie, the server may confuse " "whether a user is logged in or not." msgstr "" -#: tpl/cache/settings_inc.login_cookie.tpl.php:26 +#: tpl/cache/settings_inc.login_cookie.tpl.php:28 msgid "The cookie set here will be used for this WordPress installation." msgstr "" -#: tpl/cache/settings_inc.login_cookie.tpl.php:29 +#: tpl/cache/settings_inc.login_cookie.tpl.php:31 msgid "Example use case:" msgstr "" -#: tpl/cache/settings_inc.login_cookie.tpl.php:31 +#: tpl/cache/settings_inc.login_cookie.tpl.php:33 msgid "There is a WordPress installed for %s." msgstr "" -#: tpl/cache/settings_inc.login_cookie.tpl.php:33 +#: tpl/cache/settings_inc.login_cookie.tpl.php:35 msgid "Then another WordPress is installed (NOT MULTISITE) at %s" msgstr "" -#: tpl/cache/settings_inc.login_cookie.tpl.php:34 +#: tpl/cache/settings_inc.login_cookie.tpl.php:36 msgid "" "The cache needs to distinguish who is logged into which WordPress site in " "order to cache correctly." msgstr "" -#: tpl/cache/settings_inc.login_cookie.tpl.php:42 +#: tpl/cache/settings_inc.login_cookie.tpl.php:43 msgid "Invalid login cookie. Invalid characters found." msgstr "" -#: tpl/cache/settings_inc.login_cookie.tpl.php:56 +#: tpl/cache/settings_inc.login_cookie.tpl.php:57 msgid "" "WARNING: The .htaccess login cookie and Database login cookie do not match." msgstr "" +#: tpl/cache/settings_inc.login_cookie.tpl.php:81 +msgid "You can list the 3rd party vary cookies here." +msgstr "" + #: tpl/cache/settings_inc.object.tpl.php:6 msgid "Enabled" msgstr "" @@ -2835,70 +2896,75 @@ msgstr "" msgid "Passed" msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:20 +#: tpl/cache/settings_inc.object.tpl.php:21 msgid "Failed" msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:27 +#: tpl/cache/settings_inc.object.tpl.php:28 msgid "Object Cache Settings" msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:41 +#: tpl/cache/settings_inc.object.tpl.php:42 msgid "Use external object cache functionality." msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:47 tpl/crawler/blacklist.tpl.php:32 -#: tpl/crawler/summary.tpl.php:124 +#: tpl/cache/settings_inc.object.tpl.php:48 tpl/crawler/blacklist.tpl.php:32 +#: tpl/crawler/summary.tpl.php:130 msgid "Status" msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:50 #: tpl/cache/settings_inc.object.tpl.php:51 +#: tpl/cache/settings_inc.object.tpl.php:52 msgid "%s Extension" msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:52 +#: tpl/cache/settings_inc.object.tpl.php:53 msgid "Connection Test" msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:78 +#: tpl/cache/settings_inc.object.tpl.php:79 msgid "Your %s Hostname or IP address." msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:91 -#: tpl/cache/settings_inc.object.tpl.php:92 +#: tpl/cache/settings_inc.object.tpl.php:80 +#: tpl/cache/settings_inc.object.tpl.php:95 +msgid "If you are using a %1$s socket, %2$s should be set to %3$s" +msgstr "" + +#: tpl/cache/settings_inc.object.tpl.php:93 +#: tpl/cache/settings_inc.object.tpl.php:94 msgid "Default port for %1$s is %2$s." msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:105 +#: tpl/cache/settings_inc.object.tpl.php:108 msgid "Default TTL for cached objects." msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:118 +#: tpl/cache/settings_inc.object.tpl.php:121 msgid "Only available when %s is installed." msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:131 +#: tpl/cache/settings_inc.object.tpl.php:134 msgid "Specify the password used when connecting." msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:144 +#: tpl/cache/settings_inc.object.tpl.php:147 msgid "Database to be used" msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:157 +#: tpl/cache/settings_inc.object.tpl.php:160 msgid "Groups cached at the network level." msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:184 +#: tpl/cache/settings_inc.object.tpl.php:187 msgid "Use keep-alive connections to speed up cache operations." msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:197 +#: tpl/cache/settings_inc.object.tpl.php:200 msgid "Improve wp-admin speed through caching. (May encounter expired data)" msgstr "" -#: tpl/cache/settings_inc.object.tpl.php:210 +#: tpl/cache/settings_inc.object.tpl.php:213 msgid "Save transients in database when %1$s is %2$s." msgstr "" @@ -2908,300 +2974,301 @@ msgid "" "the WordPress core is upgraded." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:34 +#: tpl/cdn/auto_setup.tpl.php:36 msgid "Not running" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:35 +#: tpl/cdn/auto_setup.tpl.php:37 msgid "Run CDN Setup" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:42 +#: tpl/cdn/auto_setup.tpl.php:44 msgid "Done" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:44 +#: tpl/cdn/auto_setup.tpl.php:46 msgid "Completed at %s" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:50 +#: tpl/cdn/auto_setup.tpl.php:52 msgid "Paused" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:54 +#: tpl/cdn/auto_setup.tpl.php:56 msgid "Verifying, waiting for nameservers to be updated." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:54 +#: tpl/cdn/auto_setup.tpl.php:56 msgid "Click the refresh button below to refresh status." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:56 +#: tpl/cdn/auto_setup.tpl.php:58 msgid "Last Verification Result" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:59 +#: tpl/cdn/auto_setup.tpl.php:61 msgid "In Progress" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:60 +#: tpl/cdn/auto_setup.tpl.php:62 msgid "You will receive an email upon status update." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:60 +#: tpl/cdn/auto_setup.tpl.php:62 msgid "This process may take several minutes." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:62 +#: tpl/cdn/auto_setup.tpl.php:64 msgid "Refresh CDN Setup Status" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:68 +#: tpl/cdn/auto_setup.tpl.php:70 msgid "Auto QUIC.cloud CDN Setup" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:71 +#: tpl/cdn/auto_setup.tpl.php:73 msgid "" "This is a three step process for configuring your site to use QUIC.cloud CDN " "with QUIC.cloud DNS. This setup will perform the following actions" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:74 +#: tpl/cdn/auto_setup.tpl.php:76 msgid "Set up a QUIC.cloud account." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:75 +#: tpl/cdn/auto_setup.tpl.php:77 msgid "" "Prepare the site for QUIC.cloud CDN, detect the DNS, and create a DNS Zone." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:76 +#: tpl/cdn/auto_setup.tpl.php:78 msgid "Provide the nameservers necessary to enable the CDN." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:78 +#: tpl/cdn/auto_setup.tpl.php:80 msgid "" "After successful DNS detection, QUIC.cloud will attempt to generate an SSL " "certificate and enable the CDN." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:79 +#: tpl/cdn/auto_setup.tpl.php:81 msgid "This last stage could take 15 to 20 minutes." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:80 +#: tpl/cdn/auto_setup.tpl.php:82 msgid "" "Your site will be available, but browsers may issue a \"not secure\" warning " "during this time." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:85 +#: tpl/cdn/auto_setup.tpl.php:87 msgid "" "After you set your nameservers, QUIC.cloud will detect the change and " "automatically enable the CDN." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:89 tpl/toolbox/report.tpl.php:81 +#: tpl/cdn/auto_setup.tpl.php:91 tpl/toolbox/report.tpl.php:81 msgid "Notes" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:93 +#: tpl/cdn/auto_setup.tpl.php:95 msgid "QUIC.cloud CDN/DNS does not support DNSSEC." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:94 +#: tpl/cdn/auto_setup.tpl.php:96 msgid "" "If you have this enabled for your domain, you must disable DNSSEC to " "continue." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:97 +#: tpl/cdn/auto_setup.tpl.php:99 msgid "" "This setup process will create a DNS zone on QUIC.cloud if one does not " "currently exist." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:98 +#: tpl/cdn/auto_setup.tpl.php:101 msgid "" "If you prefer to use the CNAME setup, please set up the CDN manually " "at QUIC.cloud." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:102 +#: tpl/cdn/auto_setup.tpl.php:106 msgid "QUIC.cloud will detect most normal DNS entries." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:103 +#: tpl/cdn/auto_setup.tpl.php:107 msgid "" "If you have custom DNS records, it is possible that they are not detected." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:104 +#: tpl/cdn/auto_setup.tpl.php:108 msgid "" "Visit your QUIC.cloud dashboard after the DNS Zone is set up to confirm your " "DNS zone." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:109 +#: tpl/cdn/auto_setup.tpl.php:113 msgid "Set up QUIC.cloud Account" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:114 +#: tpl/cdn/auto_setup.tpl.php:118 msgid "Account is linked!" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:117 +#: tpl/cdn/auto_setup.tpl.php:122 msgid "Manage CDN" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:121 +#: tpl/cdn/auto_setup.tpl.php:128 msgid "Manage DNS Zone" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:127 +#: tpl/cdn/auto_setup.tpl.php:135 msgid "Ready to run CDN setup." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:129 +#: tpl/cdn/auto_setup.tpl.php:137 msgid "Domain key and QUIC.cloud link detected." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:130 +#: tpl/cdn/auto_setup.tpl.php:138 msgid "Begin QUIC.cloud CDN Setup" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:132 tpl/general/settings.tpl.php:75 -#: tpl/general/settings.tpl.php:77 tpl/general/settings.tpl.php:106 +#: tpl/cdn/auto_setup.tpl.php:140 tpl/dash/dashboard.tpl.php:196 +#: tpl/dash/dashboard.tpl.php:198 tpl/general/settings.tpl.php:78 +#: tpl/general/settings.tpl.php:80 tpl/general/settings.tpl.php:109 msgid "Link to QUIC.cloud" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:136 +#: tpl/cdn/auto_setup.tpl.php:144 msgid "CDN Setup Status" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:150 +#: tpl/cdn/auto_setup.tpl.php:158 msgid "QUIC.cloud Detected Records Summary" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:156 +#: tpl/cdn/auto_setup.tpl.php:164 msgid "Record Type" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:159 +#: tpl/cdn/auto_setup.tpl.php:167 msgid "Count" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:171 +#: tpl/cdn/auto_setup.tpl.php:179 msgid "Record names found" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:174 +#: tpl/cdn/auto_setup.tpl.php:182 msgid "Is something missing?" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:176 +#: tpl/cdn/auto_setup.tpl.php:185 msgid "Review DNS records" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:181 +#: tpl/cdn/auto_setup.tpl.php:191 msgid "" "Note: For 15 to 20 minutes after setup completes, browsers may issue a \"not " "secure\" warning for your site while QUIC.cloud generates your SSL " "certificate." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:193 +#: tpl/cdn/auto_setup.tpl.php:203 msgid "Nameservers" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:198 +#: tpl/cdn/auto_setup.tpl.php:208 msgid "Please update your domain registrar to use these custom nameservers:" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:208 +#: tpl/cdn/auto_setup.tpl.php:218 msgid "QUIC.cloud will attempt to verify the DNS update." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:209 +#: tpl/cdn/auto_setup.tpl.php:219 msgid "" "If it does not verify within 24 hours, the CDN setup will mark the " "verification as failed." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:210 +#: tpl/cdn/auto_setup.tpl.php:220 msgid "" "At that stage, you may re-start the verification process by pressing the Run " "CDN Setup button." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:214 +#: tpl/cdn/auto_setup.tpl.php:224 msgid "" "This section will automatically populate once nameservers are configured for " "the site." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:223 +#: tpl/cdn/auto_setup.tpl.php:233 msgid "Action" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:226 +#: tpl/cdn/auto_setup.tpl.php:236 msgid "The following actions are available:" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:228 tpl/cdn/auto_setup.tpl.php:253 +#: tpl/cdn/auto_setup.tpl.php:238 tpl/cdn/auto_setup.tpl.php:263 msgid "Reset CDN Setup" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:229 +#: tpl/cdn/auto_setup.tpl.php:239 msgid "" "Resets all LiteSpeed Cache plugin settings related to CDN setup back to the " "initial state and disables the CDN." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:230 +#: tpl/cdn/auto_setup.tpl.php:240 msgid "QUIC.cloud DNS settings are not changed." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:231 +#: tpl/cdn/auto_setup.tpl.php:241 msgid "This allows you to try Auto CDN setup again." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:236 +#: tpl/cdn/auto_setup.tpl.php:246 msgid "This action will not update anything on the QUIC.cloud servers." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:241 tpl/cdn/auto_setup.tpl.php:256 +#: tpl/cdn/auto_setup.tpl.php:251 tpl/cdn/auto_setup.tpl.php:266 msgid "Delete QUIC.cloud data" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:242 +#: tpl/cdn/auto_setup.tpl.php:252 msgid "" "Resets all LiteSpeed Cache plugin settings related to CDN setup back to the " "initial state and deletes the DNS Zone, if one exists for the domain." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:243 +#: tpl/cdn/auto_setup.tpl.php:253 msgid "" "This allows you to try Auto CDN setup again, or abandon the setup entirely." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:247 +#: tpl/cdn/auto_setup.tpl.php:257 msgid "" "This action is not available if there is no domain key, the domain is not " "linked, or the DNS Zone is in active use." msgstr "" -#: tpl/cdn/auto_setup.tpl.php:248 +#: tpl/cdn/auto_setup.tpl.php:258 msgid "" "If you have not yet done so, please replace the QUIC.cloud nameservers at " "your domain registrar before proceeding. " msgstr "" -#: tpl/cdn/auto_setup.tpl.php:252 +#: tpl/cdn/auto_setup.tpl.php:262 msgid "Are you sure you want to reset CDN Setup?" msgstr "" -#: tpl/cdn/auto_setup.tpl.php:255 +#: tpl/cdn/auto_setup.tpl.php:265 msgid "Are you sure you want to delete QUIC.cloud data?" msgstr "" @@ -3217,71 +3284,71 @@ msgstr "" msgid "LiteSpeed Cache CDN" msgstr "" -#: tpl/cdn/manage.tpl.php:12 +#: tpl/cdn/manage.tpl.php:14 msgid "QUIC.cloud" msgstr "" -#: tpl/cdn/manage.tpl.php:14 +#: tpl/cdn/manage.tpl.php:16 msgid "To manage QUIC.cloud options, please visit" msgstr "" -#: tpl/cdn/manage.tpl.php:23 +#: tpl/cdn/manage.tpl.php:25 msgid "" "To enable the following functionality, turn ON Cloudflare API in CDN " "Settings." msgstr "" -#: tpl/cdn/manage.tpl.php:28 +#: tpl/cdn/manage.tpl.php:30 msgid "Cloudflare Domain" msgstr "" -#: tpl/cdn/manage.tpl.php:29 +#: tpl/cdn/manage.tpl.php:31 msgid "Cloudflare Zone" msgstr "" -#: tpl/cdn/manage.tpl.php:32 +#: tpl/cdn/manage.tpl.php:34 msgid "Development Mode" msgstr "" -#: tpl/cdn/manage.tpl.php:34 +#: tpl/cdn/manage.tpl.php:36 msgid "Turn ON" msgstr "" -#: tpl/cdn/manage.tpl.php:37 +#: tpl/cdn/manage.tpl.php:39 msgid "Turn OFF" msgstr "" -#: tpl/cdn/manage.tpl.php:40 +#: tpl/cdn/manage.tpl.php:42 msgid "Check Status" msgstr "" -#: tpl/cdn/manage.tpl.php:49 +#: tpl/cdn/manage.tpl.php:51 msgid "Current status is %1$s since %2$s." msgstr "" -#: tpl/cdn/manage.tpl.php:55 +#: tpl/cdn/manage.tpl.php:56 msgid "Current status is %s." msgstr "" -#: tpl/cdn/manage.tpl.php:56 +#: tpl/cdn/manage.tpl.php:57 msgid "Development mode will be automatically turned off in %s." msgstr "" -#: tpl/cdn/manage.tpl.php:64 +#: tpl/cdn/manage.tpl.php:65 msgid "" "Temporarily bypass Cloudflare cache. This allows changes to the origin " "server to be seen in realtime." msgstr "" -#: tpl/cdn/manage.tpl.php:65 +#: tpl/cdn/manage.tpl.php:66 msgid "Development Mode will be turned off automatically after three hours." msgstr "" -#: tpl/cdn/manage.tpl.php:71 +#: tpl/cdn/manage.tpl.php:72 msgid "Cloudflare Cache" msgstr "" -#: tpl/cdn/manage.tpl.php:77 +#: tpl/cdn/manage.tpl.php:78 msgid "Purge Everything" msgstr "" @@ -3343,11 +3410,11 @@ msgid "" "Specify which HTML element attributes will be replaced with CDN Mapping." msgstr "" -#: tpl/cdn/settings.tpl.php:127 tpl/img_optm/settings.tpl.php:140 +#: tpl/cdn/settings.tpl.php:127 tpl/img_optm/settings.tpl.php:127 msgid "Only attributes listed here will be replaced." msgstr "" -#: tpl/cdn/settings.tpl.php:128 tpl/img_optm/settings.tpl.php:141 +#: tpl/cdn/settings.tpl.php:128 tpl/img_optm/settings.tpl.php:128 msgid "Use the format %1$s or %2$s (element is optional)." msgstr "" @@ -3429,16 +3496,16 @@ msgstr "" msgid "Blocklist" msgstr "" -#: tpl/crawler/blacklist.tpl.php:25 tpl/img_optm/summary.tpl.php:200 +#: tpl/crawler/blacklist.tpl.php:25 tpl/img_optm/summary.tpl.php:166 msgid "Total" msgstr "" -#: tpl/crawler/blacklist.tpl.php:31 tpl/crawler/map.tpl.php:43 +#: tpl/crawler/blacklist.tpl.php:31 tpl/crawler/map.tpl.php:57 #: tpl/toolbox/purge.tpl.php:224 msgid "URL" msgstr "" -#: tpl/crawler/blacklist.tpl.php:33 tpl/crawler/map.tpl.php:45 +#: tpl/crawler/blacklist.tpl.php:33 tpl/crawler/map.tpl.php:59 msgid "Operation" msgstr "" @@ -3458,12 +3525,12 @@ msgstr "" msgid "Not blocklisted" msgstr "" -#: tpl/crawler/blacklist.tpl.php:61 tpl/crawler/map.tpl.php:69 +#: tpl/crawler/blacklist.tpl.php:61 tpl/crawler/map.tpl.php:84 msgid "Blocklisted due to not cacheable" msgstr "" -#: tpl/crawler/blacklist.tpl.php:62 tpl/crawler/map.tpl.php:70 -#: tpl/crawler/summary.tpl.php:160 tpl/crawler/summary.tpl.php:184 +#: tpl/crawler/blacklist.tpl.php:62 tpl/crawler/map.tpl.php:85 +#: tpl/crawler/summary.tpl.php:166 tpl/crawler/summary.tpl.php:190 msgid "Blocklisted" msgstr "" @@ -3476,8 +3543,8 @@ msgid "Map" msgstr "" #: tpl/crawler/entry.tpl.php:9 tpl/general/entry.tpl.php:6 -#: tpl/general/entry.tpl.php:12 tpl/general/network_settings.tpl.php:8 -#: tpl/general/settings.tpl.php:42 +#: tpl/general/entry.tpl.php:12 tpl/general/network_settings.tpl.php:9 +#: tpl/general/settings.tpl.php:44 msgid "General Settings" msgstr "" @@ -3493,86 +3560,90 @@ msgstr "" msgid "LiteSpeed Cache Crawler" msgstr "" -#: tpl/crawler/map.tpl.php:16 +#: tpl/crawler/map.tpl.php:18 msgid "Clean Crawler Map" msgstr "" -#: tpl/crawler/map.tpl.php:20 +#: tpl/crawler/map.tpl.php:22 msgid "Refresh Crawler Map" msgstr "" -#: tpl/crawler/map.tpl.php:27 +#: tpl/crawler/map.tpl.php:29 msgid "Generated at %s" msgstr "" -#: tpl/crawler/map.tpl.php:33 +#: tpl/crawler/map.tpl.php:35 msgid "Sitemap List" msgstr "" -#: tpl/crawler/map.tpl.php:37 +#: tpl/crawler/map.tpl.php:39 msgid "Sitemap Total" msgstr "" -#: tpl/crawler/map.tpl.php:44 tpl/dash/dashboard.tpl.php:546 +#: tpl/crawler/map.tpl.php:44 +msgid "URL Search" +msgstr "" + +#: tpl/crawler/map.tpl.php:58 tpl/dash/dashboard.tpl.php:568 msgid "Crawler Status" msgstr "" -#: tpl/crawler/map.tpl.php:58 +#: tpl/crawler/map.tpl.php:73 msgid "Add to Blocklist" msgstr "" -#: tpl/crawler/map.tpl.php:67 +#: tpl/crawler/map.tpl.php:82 msgid "Cache Hit" msgstr "" -#: tpl/crawler/map.tpl.php:68 +#: tpl/crawler/map.tpl.php:83 msgid "Cache Miss" msgstr "" -#: tpl/crawler/settings-general.tpl.php:9 +#: tpl/crawler/settings-general.tpl.php:11 msgid "Crawler General Settings" msgstr "" -#: tpl/crawler/settings-general.tpl.php:22 +#: tpl/crawler/settings-general.tpl.php:25 msgid "This will enable crawler cron." msgstr "" -#: tpl/crawler/settings-general.tpl.php:33 +#: tpl/crawler/settings-general.tpl.php:37 msgid "microseconds" msgstr "" -#: tpl/crawler/settings-general.tpl.php:35 +#: tpl/crawler/settings-general.tpl.php:39 msgid "" "Specify time in microseconds for the delay between requests during a crawl." msgstr "" -#: tpl/crawler/settings-general.tpl.php:40 +#: tpl/crawler/settings-general.tpl.php:44 msgid "Server allowed min value" msgstr "" -#: tpl/crawler/settings-general.tpl.php:62 +#: tpl/crawler/settings-general.tpl.php:66 msgid "Specify time in seconds for the duration of the crawl interval." msgstr "" -#: tpl/crawler/settings-general.tpl.php:76 +#: tpl/crawler/settings-general.tpl.php:80 msgid "Specify time in seconds for the time between each run interval." msgstr "" -#: tpl/crawler/settings-general.tpl.php:91 +#: tpl/crawler/settings-general.tpl.php:95 msgid "" "Specify how long in seconds before the crawler should initiate crawling the " "entire sitemap again." msgstr "" -#: tpl/crawler/settings-general.tpl.php:105 +#: tpl/crawler/settings-general.tpl.php:109 msgid "Specify Number of Threads to use while crawling." msgstr "" -#: tpl/crawler/settings-general.tpl.php:120 +#: tpl/crawler/settings-general.tpl.php:124 msgid "Specify the timeout while crawling each URL." msgstr "" -#: tpl/crawler/settings-general.tpl.php:135 +#: tpl/crawler/settings-general.tpl.php:139 msgid "" "The maximum average server load allowed while crawling. The number of " "crawler threads in use will be actively reduced until average server load " @@ -3580,11 +3651,11 @@ msgid "" "current crawler run will be terminated." msgstr "" -#: tpl/crawler/settings-general.tpl.php:141 +#: tpl/crawler/settings-general.tpl.php:145 msgid "Server enforced value" msgstr "" -#: tpl/crawler/settings-general.tpl.php:146 +#: tpl/crawler/settings-general.tpl.php:150 msgid "Server allowed max value" msgstr "" @@ -3618,39 +3689,23 @@ msgid "" "to your sitemap here." msgstr "" -#: tpl/crawler/settings-sitemap.tpl.php:35 +#: tpl/crawler/settings-sitemap.tpl.php:36 msgid "" "The crawler will parse the sitemap and save into the database before " "crawling. When parsing the sitemap, dropping the domain can save DB storage." msgstr "" -#: tpl/crawler/settings-sitemap.tpl.php:36 +#: tpl/crawler/settings-sitemap.tpl.php:37 msgid "" "If you are using multiple domains for one site, and have multiple domains in " "the sitemap, please keep this option OFF so the crawler knows to crawl every " "domain." msgstr "" -#: tpl/crawler/settings-sitemap.tpl.php:49 +#: tpl/crawler/settings-sitemap.tpl.php:50 msgid "Specify the timeout while parsing the sitemap." msgstr "" -#: tpl/crawler/summary.tpl.php:23 -msgid "%d hours" -msgstr "" - -#: tpl/crawler/summary.tpl.php:26 -msgid "%d hour" -msgstr "" - -#: tpl/crawler/summary.tpl.php:33 -msgid "%d minutes" -msgstr "" - -#: tpl/crawler/summary.tpl.php:36 -msgid "%d minute" -msgstr "" - #: tpl/crawler/summary.tpl.php:42 msgid "Crawler Cron" msgstr "" @@ -3686,270 +3741,313 @@ msgstr "" msgid "Run time for previous crawler" msgstr "" -#: tpl/crawler/summary.tpl.php:85 tpl/dash/dashboard.tpl.php:559 +#: tpl/crawler/summary.tpl.php:85 tpl/dash/dashboard.tpl.php:581 msgid "Current crawler started at" msgstr "" -#: tpl/crawler/summary.tpl.php:92 tpl/dash/dashboard.tpl.php:566 +#: tpl/crawler/summary.tpl.php:91 +msgid "Current server load" +msgstr "" + +#: tpl/crawler/summary.tpl.php:97 tpl/dash/dashboard.tpl.php:588 msgid "Last interval" msgstr "" -#: tpl/crawler/summary.tpl.php:99 tpl/dash/dashboard.tpl.php:573 +#: tpl/crawler/summary.tpl.php:104 tpl/dash/dashboard.tpl.php:595 msgid "Ended reason" msgstr "" -#: tpl/crawler/summary.tpl.php:106 +#: tpl/crawler/summary.tpl.php:111 msgid "Last crawled: %s item(s)" msgstr "" -#: tpl/crawler/summary.tpl.php:111 +#: tpl/crawler/summary.tpl.php:116 msgid "Reset position" msgstr "" -#: tpl/crawler/summary.tpl.php:114 +#: tpl/crawler/summary.tpl.php:119 msgid "Manually run" msgstr "" -#: tpl/crawler/summary.tpl.php:122 +#: tpl/crawler/summary.tpl.php:128 msgid "Cron Name" msgstr "" -#: tpl/crawler/summary.tpl.php:123 +#: tpl/crawler/summary.tpl.php:129 msgid "Run Frequency" msgstr "" -#: tpl/crawler/summary.tpl.php:125 +#: tpl/crawler/summary.tpl.php:131 msgid "Activate" msgstr "" -#: tpl/crawler/summary.tpl.php:126 +#: tpl/crawler/summary.tpl.php:132 msgid "Running" msgstr "" -#: tpl/crawler/summary.tpl.php:157 +#: tpl/crawler/summary.tpl.php:163 msgid "Waiting" msgstr "" -#: tpl/crawler/summary.tpl.php:158 +#: tpl/crawler/summary.tpl.php:164 msgid "Hit" msgstr "" -#: tpl/crawler/summary.tpl.php:159 +#: tpl/crawler/summary.tpl.php:165 msgid "Miss" msgstr "" -#: tpl/crawler/summary.tpl.php:170 +#: tpl/crawler/summary.tpl.php:176 msgid "running" msgstr "" -#: tpl/crawler/summary.tpl.php:181 +#: tpl/crawler/summary.tpl.php:187 msgid "Waiting to be Crawled" msgstr "" -#: tpl/crawler/summary.tpl.php:182 +#: tpl/crawler/summary.tpl.php:188 msgid "Already Cached" msgstr "" -#: tpl/crawler/summary.tpl.php:183 +#: tpl/crawler/summary.tpl.php:189 msgid "Successfully Crawled" msgstr "" -#: tpl/crawler/summary.tpl.php:188 +#: tpl/crawler/summary.tpl.php:194 msgid "Run frequency is set by the Interval Between Runs setting." msgstr "" -#: tpl/crawler/summary.tpl.php:189 +#: tpl/crawler/summary.tpl.php:195 msgid "Crawlers cannot run concurrently." msgstr "" -#: tpl/crawler/summary.tpl.php:190 +#: tpl/crawler/summary.tpl.php:196 msgid "" " If both the cron and a manual run start at similar times, the first to " "be started will take precedence." msgstr "" -#: tpl/crawler/summary.tpl.php:191 +#: tpl/crawler/summary.tpl.php:197 msgid "" "Please see Hooking WP-Cron Into the System Task Scheduler to learn " "how to create the system cron task." msgstr "" -#: tpl/crawler/summary.tpl.php:196 +#: tpl/crawler/summary.tpl.php:202 msgid "Watch Crawler Status" msgstr "" -#: tpl/crawler/summary.tpl.php:203 +#: tpl/crawler/summary.tpl.php:209 msgid "Show crawler status" msgstr "" -#: tpl/crawler/summary.tpl.php:221 +#: tpl/crawler/summary.tpl.php:227 msgid "No crawler meta file generated yet" msgstr "" -#: tpl/dash/dashboard.tpl.php:43 +#: tpl/dash/dashboard.tpl.php:39 msgid "QUIC.cloud Service Usage Statistics" msgstr "" -#: tpl/dash/dashboard.tpl.php:46 +#: tpl/dash/dashboard.tpl.php:41 tpl/dash/dashboard.tpl.php:212 +#: tpl/dash/dashboard.tpl.php:270 +msgid "Sync" +msgstr "" + +#: tpl/dash/dashboard.tpl.php:42 msgid "Sync data from Cloud" msgstr "" -#: tpl/dash/dashboard.tpl.php:58 tpl/dash/network_dash.tpl.php:29 +#: tpl/dash/dashboard.tpl.php:54 tpl/dash/network_dash.tpl.php:29 msgid "CDN Bandwidth" msgstr "" -#: tpl/dash/dashboard.tpl.php:59 tpl/dash/dashboard.tpl.php:482 +#: tpl/dash/dashboard.tpl.php:55 tpl/dash/dashboard.tpl.php:504 msgid "Low Quality Image Placeholder" msgstr "" -#: tpl/dash/dashboard.tpl.php:116 tpl/dash/network_dash.tpl.php:78 +#: tpl/dash/dashboard.tpl.php:113 tpl/dash/network_dash.tpl.php:78 msgid "Fast Queue Usage" msgstr "" -#: tpl/dash/dashboard.tpl.php:116 tpl/dash/network_dash.tpl.php:78 +#: tpl/dash/dashboard.tpl.php:113 tpl/dash/network_dash.tpl.php:78 msgid "Usage" msgstr "" -#: tpl/dash/dashboard.tpl.php:129 tpl/dash/network_dash.tpl.php:90 +#: tpl/dash/dashboard.tpl.php:126 tpl/dash/network_dash.tpl.php:90 msgid "PAYG Balance" msgstr "" -#: tpl/dash/dashboard.tpl.php:130 tpl/dash/network_dash.tpl.php:91 -msgid "This Month Usage" +#: tpl/dash/dashboard.tpl.php:127 +msgid "PAYG used this month" +msgstr "" + +#: tpl/dash/dashboard.tpl.php:127 +msgid "PAYG balance and usage not included in above quota calculation." msgstr "" -#: tpl/dash/dashboard.tpl.php:132 tpl/dash/network_dash.tpl.php:93 +#: tpl/dash/dashboard.tpl.php:129 tpl/dash/network_dash.tpl.php:93 msgid "Pay as You Go Usage Statistics" msgstr "" -#: tpl/dash/dashboard.tpl.php:150 tpl/dash/network_dash.tpl.php:100 +#: tpl/dash/dashboard.tpl.php:148 tpl/dash/network_dash.tpl.php:100 msgid "Total Usage" msgstr "" -#: tpl/dash/dashboard.tpl.php:151 tpl/dash/network_dash.tpl.php:101 +#: tpl/dash/dashboard.tpl.php:149 tpl/dash/network_dash.tpl.php:101 msgid "Total images optimized in this month" msgstr "" -#: tpl/dash/dashboard.tpl.php:160 +#: tpl/dash/dashboard.tpl.php:158 msgid "Remaining Daily Quota" msgstr "" #: tpl/dash/dashboard.tpl.php:169 +msgid "Partner Benefits Provided by" +msgstr "" + +#: tpl/dash/dashboard.tpl.php:194 msgid "Go to QUIC.cloud dashboard" msgstr "" -#: tpl/dash/dashboard.tpl.php:181 +#: tpl/dash/dashboard.tpl.php:213 msgid "Refresh page load time" msgstr "" -#: tpl/dash/dashboard.tpl.php:222 tpl/dash/dashboard.tpl.php:291 -#: tpl/dash/dashboard.tpl.php:441 tpl/dash/dashboard.tpl.php:474 -#: tpl/dash/dashboard.tpl.php:506 tpl/dash/dashboard.tpl.php:538 +#: tpl/dash/dashboard.tpl.php:254 tpl/dash/dashboard.tpl.php:324 +#: tpl/dash/dashboard.tpl.php:464 tpl/dash/dashboard.tpl.php:496 +#: tpl/dash/dashboard.tpl.php:528 tpl/dash/dashboard.tpl.php:560 msgid "Last requested" msgstr "" -#: tpl/dash/dashboard.tpl.php:227 +#: tpl/dash/dashboard.tpl.php:259 msgid "Current closest Cloud server is %s. Click to redetect." msgstr "" -#: tpl/dash/dashboard.tpl.php:227 tpl/img_optm/summary.tpl.php:57 -#: tpl/page_optm/settings_css.tpl.php:93 tpl/page_optm/settings_css.tpl.php:203 -#: tpl/page_optm/settings_media.tpl.php:176 +#: tpl/dash/dashboard.tpl.php:259 tpl/img_optm/summary.tpl.php:43 +#: tpl/page_optm/settings_css.tpl.php:101 +#: tpl/page_optm/settings_css.tpl.php:218 +#: tpl/page_optm/settings_media.tpl.php:196 #: tpl/page_optm/settings_vpi.tpl.php:48 msgid "" "Are you sure you want to redetect the closest cloud server for this service?" msgstr "" -#: tpl/dash/dashboard.tpl.php:238 +#: tpl/dash/dashboard.tpl.php:259 tpl/general/settings.tpl.php:130 +#: tpl/img_optm/summary.tpl.php:43 tpl/img_optm/summary.tpl.php:45 +#: tpl/page_optm/settings_css.tpl.php:101 +#: tpl/page_optm/settings_css.tpl.php:218 +#: tpl/page_optm/settings_media.tpl.php:196 +#: tpl/page_optm/settings_vpi.tpl.php:48 +msgid "Redetect" +msgstr "" + +#: tpl/dash/dashboard.tpl.php:271 msgid "Refresh page score" msgstr "" -#: tpl/dash/dashboard.tpl.php:299 tpl/img_optm/entry.tpl.php:6 +#: tpl/dash/dashboard.tpl.php:332 tpl/img_optm/entry.tpl.php:6 msgid "Image Optimization Summary" msgstr "" -#: tpl/dash/dashboard.tpl.php:300 tpl/dash/dashboard.tpl.php:389 -#: tpl/dash/dashboard.tpl.php:417 tpl/dash/dashboard.tpl.php:450 -#: tpl/dash/dashboard.tpl.php:483 tpl/dash/dashboard.tpl.php:515 -#: tpl/dash/dashboard.tpl.php:547 +#: tpl/dash/dashboard.tpl.php:333 tpl/dash/dashboard.tpl.php:413 +#: tpl/dash/dashboard.tpl.php:441 tpl/dash/dashboard.tpl.php:473 +#: tpl/dash/dashboard.tpl.php:505 tpl/dash/dashboard.tpl.php:537 +#: tpl/dash/dashboard.tpl.php:569 msgid "More" msgstr "" -#: tpl/dash/dashboard.tpl.php:310 -msgid "Image Groups Prepared" +#: tpl/dash/dashboard.tpl.php:344 tpl/img_optm/summary.tpl.php:64 +msgid "Send Optimization Request" +msgstr "" + +#: tpl/dash/dashboard.tpl.php:350 tpl/img_optm/summary.tpl.php:269 +msgid "Total Reduction" msgstr "" -#: tpl/dash/dashboard.tpl.php:325 -msgid "Images Requested" +#: tpl/dash/dashboard.tpl.php:353 tpl/img_optm/summary.tpl.php:272 +msgid "Images Pulled" msgstr "" -#: tpl/dash/dashboard.tpl.php:357 tpl/img_optm/summary.tpl.php:342 +#: tpl/dash/dashboard.tpl.php:381 tpl/img_optm/summary.tpl.php:275 msgid "Last Request" msgstr "" -#: tpl/dash/dashboard.tpl.php:360 +#: tpl/dash/dashboard.tpl.php:384 msgid "Last Pull" msgstr "" -#: tpl/dash/dashboard.tpl.php:388 +#: tpl/dash/dashboard.tpl.php:412 msgid "Cache Status" msgstr "" -#: tpl/dash/dashboard.tpl.php:394 +#: tpl/dash/dashboard.tpl.php:418 msgid "Public Cache" msgstr "" -#: tpl/dash/dashboard.tpl.php:395 +#: tpl/dash/dashboard.tpl.php:419 msgid "Private Cache" msgstr "" -#: tpl/dash/dashboard.tpl.php:416 tpl/toolbox/purge.tpl.php:70 +#: tpl/dash/dashboard.tpl.php:440 tpl/toolbox/purge.tpl.php:70 msgid "Critical CSS" msgstr "" -#: tpl/dash/dashboard.tpl.php:422 tpl/dash/dashboard.tpl.php:455 -#: tpl/dash/dashboard.tpl.php:488 tpl/dash/dashboard.tpl.php:520 -#: tpl/page_optm/settings_css.tpl.php:84 tpl/page_optm/settings_css.tpl.php:194 -#: tpl/page_optm/settings_media.tpl.php:170 +#: tpl/dash/dashboard.tpl.php:446 tpl/dash/dashboard.tpl.php:478 +#: tpl/dash/dashboard.tpl.php:510 tpl/dash/dashboard.tpl.php:542 +#: tpl/page_optm/settings_css.tpl.php:92 tpl/page_optm/settings_css.tpl.php:209 +#: tpl/page_optm/settings_media.tpl.php:190 #: tpl/page_optm/settings_vpi.tpl.php:42 msgid "Last generated" msgstr "" -#: tpl/dash/dashboard.tpl.php:425 tpl/dash/dashboard.tpl.php:458 -#: tpl/dash/dashboard.tpl.php:491 tpl/dash/dashboard.tpl.php:523 +#: tpl/dash/dashboard.tpl.php:449 tpl/dash/dashboard.tpl.php:481 +#: tpl/dash/dashboard.tpl.php:513 tpl/dash/dashboard.tpl.php:545 msgid "Time to execute previous request" msgstr "" -#: tpl/dash/dashboard.tpl.php:430 tpl/dash/dashboard.tpl.php:463 -#: tpl/dash/dashboard.tpl.php:496 tpl/dash/dashboard.tpl.php:528 +#: tpl/dash/dashboard.tpl.php:454 tpl/dash/dashboard.tpl.php:486 +#: tpl/dash/dashboard.tpl.php:518 tpl/dash/dashboard.tpl.php:550 msgid "Requests in queue" msgstr "" -#: tpl/dash/dashboard.tpl.php:433 tpl/dash/dashboard.tpl.php:466 -#: tpl/dash/dashboard.tpl.php:498 tpl/dash/dashboard.tpl.php:530 +#: tpl/dash/dashboard.tpl.php:456 tpl/dash/dashboard.tpl.php:488 +#: tpl/dash/dashboard.tpl.php:520 tpl/dash/dashboard.tpl.php:552 msgid "Force cron" msgstr "" -#: tpl/dash/dashboard.tpl.php:449 tpl/toolbox/purge.tpl.php:79 +#: tpl/dash/dashboard.tpl.php:472 tpl/toolbox/purge.tpl.php:79 msgid "Unique CSS" msgstr "" -#: tpl/dash/dashboard.tpl.php:514 +#: tpl/dash/dashboard.tpl.php:536 msgid "Viewport Image" msgstr "" -#: tpl/dash/dashboard.tpl.php:551 +#: tpl/dash/dashboard.tpl.php:573 msgid "Crawler(s)" msgstr "" -#: tpl/dash/dashboard.tpl.php:554 +#: tpl/dash/dashboard.tpl.php:576 msgid "Currently active crawler" msgstr "" -#: tpl/dash/dashboard.tpl.php:580 +#: tpl/dash/dashboard.tpl.php:602 msgid "Last crawled: %d item(s)" msgstr "" +#: tpl/dash/dashboard.tpl.php:616 +msgid "Try QUIC.cloud CDN!" +msgstr "" + +#: tpl/dash/dashboard.tpl.php:619 +msgid "Best available WordPress performance" +msgstr "" + +#: tpl/dash/dashboard.tpl.php:622 +msgid "Globally fast TTFB, easy setup, and more!" +msgstr "" + #: tpl/dash/entry.tpl.php:11 msgid "Network Dashboard" msgstr "" @@ -3970,6 +4068,10 @@ msgstr "" msgid "Pay as You Go" msgstr "" +#: tpl/dash/network_dash.tpl.php:91 +msgid "This Month Usage" +msgstr "" + #: tpl/db_optm/entry.tpl.php:10 tpl/db_optm/settings.tpl.php:10 msgid "DB Optimization Settings" msgstr "" @@ -3978,123 +4080,131 @@ msgstr "" msgid "LiteSpeed Cache Database Optimization" msgstr "" -#: tpl/db_optm/manage.tpl.php:7 +#: tpl/db_optm/manage.tpl.php:9 msgid "Clean All" msgstr "" -#: tpl/db_optm/manage.tpl.php:11 +#: tpl/db_optm/manage.tpl.php:13 msgid "Post Revisions" msgstr "" -#: tpl/db_optm/manage.tpl.php:12 +#: tpl/db_optm/manage.tpl.php:14 msgid "Clean all post revisions" msgstr "" -#: tpl/db_optm/manage.tpl.php:15 +#: tpl/db_optm/manage.tpl.php:17 +msgid "Orphaned Post Meta" +msgstr "" + +#: tpl/db_optm/manage.tpl.php:18 +msgid "Clean all orphaned post meta records" +msgstr "" + +#: tpl/db_optm/manage.tpl.php:21 msgid "Auto Drafts" msgstr "" -#: tpl/db_optm/manage.tpl.php:16 +#: tpl/db_optm/manage.tpl.php:22 msgid "Clean all auto saved drafts" msgstr "" -#: tpl/db_optm/manage.tpl.php:19 +#: tpl/db_optm/manage.tpl.php:25 msgid "Trashed Posts" msgstr "" -#: tpl/db_optm/manage.tpl.php:20 +#: tpl/db_optm/manage.tpl.php:26 msgid "Clean all trashed posts and pages" msgstr "" -#: tpl/db_optm/manage.tpl.php:23 +#: tpl/db_optm/manage.tpl.php:29 msgid "Spam Comments" msgstr "" -#: tpl/db_optm/manage.tpl.php:24 +#: tpl/db_optm/manage.tpl.php:30 msgid "Clean all spam comments" msgstr "" -#: tpl/db_optm/manage.tpl.php:27 +#: tpl/db_optm/manage.tpl.php:33 msgid "Trashed Comments" msgstr "" -#: tpl/db_optm/manage.tpl.php:28 +#: tpl/db_optm/manage.tpl.php:34 msgid "Clean all trashed comments" msgstr "" -#: tpl/db_optm/manage.tpl.php:31 +#: tpl/db_optm/manage.tpl.php:37 msgid "Trackbacks/Pingbacks" msgstr "" -#: tpl/db_optm/manage.tpl.php:32 +#: tpl/db_optm/manage.tpl.php:38 msgid "Clean all trackbacks and pingbacks" msgstr "" -#: tpl/db_optm/manage.tpl.php:35 +#: tpl/db_optm/manage.tpl.php:41 msgid "Expired Transients" msgstr "" -#: tpl/db_optm/manage.tpl.php:36 +#: tpl/db_optm/manage.tpl.php:42 msgid "Clean expired transient options" msgstr "" -#: tpl/db_optm/manage.tpl.php:39 +#: tpl/db_optm/manage.tpl.php:45 msgid "All Transients" msgstr "" -#: tpl/db_optm/manage.tpl.php:40 +#: tpl/db_optm/manage.tpl.php:46 msgid "Clean all transient options" msgstr "" -#: tpl/db_optm/manage.tpl.php:43 +#: tpl/db_optm/manage.tpl.php:49 msgid "Optimize Tables" msgstr "" -#: tpl/db_optm/manage.tpl.php:44 +#: tpl/db_optm/manage.tpl.php:50 msgid "Optimize all tables in your database" msgstr "" -#: tpl/db_optm/manage.tpl.php:51 +#: tpl/db_optm/manage.tpl.php:57 msgid "Clean revisions older than %1$s day(s), excluding %2$s latest revisions" msgstr "" -#: tpl/db_optm/manage.tpl.php:72 +#: tpl/db_optm/manage.tpl.php:78 msgid "Database Optimizer" msgstr "" -#: tpl/db_optm/manage.tpl.php:99 +#: tpl/db_optm/manage.tpl.php:105 msgid "Database Table Engine Converter" msgstr "" -#: tpl/db_optm/manage.tpl.php:106 +#: tpl/db_optm/manage.tpl.php:113 msgid "Table" msgstr "" -#: tpl/db_optm/manage.tpl.php:107 +#: tpl/db_optm/manage.tpl.php:114 msgid "Engine" msgstr "" -#: tpl/db_optm/manage.tpl.php:108 +#: tpl/db_optm/manage.tpl.php:115 msgid "Tool" msgstr "" -#: tpl/db_optm/manage.tpl.php:122 +#: tpl/db_optm/manage.tpl.php:130 msgid "Convert to InnoDB" msgstr "" -#: tpl/db_optm/manage.tpl.php:130 +#: tpl/db_optm/manage.tpl.php:138 msgid "We are good. No table uses MyISAM engine." msgstr "" -#: tpl/db_optm/manage.tpl.php:151 +#: tpl/db_optm/manage.tpl.php:160 msgid "Database Summary" msgstr "" -#: tpl/db_optm/manage.tpl.php:166 +#: tpl/db_optm/manage.tpl.php:176 msgid "Option Name" msgstr "" -#: tpl/db_optm/manage.tpl.php:167 +#: tpl/db_optm/manage.tpl.php:177 msgid "Size" msgstr "" @@ -4137,6 +4247,7 @@ msgid "A TTL of 0 indicates do not cache." msgstr "" #: tpl/general/entry.tpl.php:7 tpl/page_optm/entry.tpl.php:13 +#: tpl/page_optm/entry.tpl.php:14 msgid "Tuning" msgstr "" @@ -4144,189 +4255,188 @@ msgstr "" msgid "LiteSpeed Cache General Settings" msgstr "" -#: tpl/general/network_settings.tpl.php:20 +#: tpl/general/network_settings.tpl.php:21 msgid "Use Primary Site Configuration" msgstr "" -#: tpl/general/network_settings.tpl.php:24 +#: tpl/general/network_settings.tpl.php:25 msgid "" "Check this option to use the primary site's configuration for all subsites." msgstr "" -#: tpl/general/network_settings.tpl.php:25 +#: tpl/general/network_settings.tpl.php:26 msgid "This will disable the settings page on all subsites." msgstr "" -#: tpl/general/settings.tpl.php:16 +#: tpl/general/settings.tpl.php:18 msgid "Request Domain Key" msgstr "" -#: tpl/general/settings.tpl.php:18 +#: tpl/general/settings.tpl.php:20 msgid "Refresh Domain Key" msgstr "" -#: tpl/general/settings.tpl.php:20 +#: tpl/general/settings.tpl.php:22 msgid "Waiting for Refresh" msgstr "" -#: tpl/general/settings.tpl.php:24 +#: tpl/general/settings.tpl.php:25 msgid "Waiting for Approval" msgstr "" -#: tpl/general/settings.tpl.php:29 +#: tpl/general/settings.tpl.php:30 msgid "Requested" msgstr "" -#: tpl/general/settings.tpl.php:32 +#: tpl/general/settings.tpl.php:33 msgid "Approved" msgstr "" -#: tpl/general/settings.tpl.php:36 +#: tpl/general/settings.tpl.php:37 msgid "Next available request time:After %s
"
msgstr ""
-#: tpl/general/settings.tpl.php:73
+#: tpl/general/settings.tpl.php:76
msgid "Visit My Dashboard on QUIC.cloud"
msgstr ""
-#: tpl/general/settings.tpl.php:82 tpl/general/settings.tpl.php:93
-#: tpl/general/settings.tpl.php:105 tpl/general/settings.tpl.php:182
-#: tpl/general/settings.tpl.php:188 tpl/general/settings.tpl.php:194
-#: tpl/general/settings.tpl.php:200 tpl/general/settings.tpl.php:217
-#: tpl/page_optm/settings_media.tpl.php:231
+#: tpl/general/settings.tpl.php:85 tpl/general/settings.tpl.php:96
+#: tpl/general/settings.tpl.php:108 tpl/general/settings.tpl.php:189
+#: tpl/general/settings.tpl.php:196 tpl/general/settings.tpl.php:203
+#: tpl/general/settings.tpl.php:220 tpl/page_optm/settings_media.tpl.php:254
#: tpl/page_optm/settings_vpi.tpl.php:32
msgid "Notice"
msgstr ""
-#: tpl/general/settings.tpl.php:83
+#: tpl/general/settings.tpl.php:86
msgid ""
"There was a problem with retrieving your Domain Key. Please click the %s "
"button to retry."
msgstr ""
-#: tpl/general/settings.tpl.php:84
+#: tpl/general/settings.tpl.php:87
msgid ""
"There are two reasons why we might not be able to communicate with your "
-"domain:"
+"domain"
msgstr ""
-#: tpl/general/settings.tpl.php:85
+#: tpl/general/settings.tpl.php:88
msgid "The POST callback to %s failed."
msgstr ""
-#: tpl/general/settings.tpl.php:86
+#: tpl/general/settings.tpl.php:89
msgid "Our %s was not allowlisted."
msgstr ""
-#: tpl/general/settings.tpl.php:87
+#: tpl/general/settings.tpl.php:90
msgid ""
"Please verify that your other plugins are not blocking REST API calls, "
"allowlist our server IPs, or contact your server admin for assistance."
msgstr ""
-#: tpl/general/settings.tpl.php:94
+#: tpl/general/settings.tpl.php:97
msgid ""
"Request submitted. Please wait, then refresh the page to see approval "
"notification."
msgstr ""
-#: tpl/general/settings.tpl.php:100
+#: tpl/general/settings.tpl.php:103
msgid "Warning"
msgstr ""
-#: tpl/general/settings.tpl.php:101
+#: tpl/general/settings.tpl.php:104
msgid "You must have %1$s first before linking to QUIC.cloud."
msgstr ""
-#: tpl/general/settings.tpl.php:106
+#: tpl/general/settings.tpl.php:109
msgid ""
"You must click the %s button if you wish to associate this site with a QUIC."
"cloud account."
msgstr ""
-#: tpl/general/settings.tpl.php:107
+#: tpl/general/settings.tpl.php:110
msgid "Benefits of linking to a QUIC.cloud account"
msgstr ""
-#: tpl/general/settings.tpl.php:112
+#: tpl/general/settings.tpl.php:115
msgid "A Domain Key is required for QUIC.cloud online services."
msgstr ""
-#: tpl/general/settings.tpl.php:116
+#: tpl/general/settings.tpl.php:119
msgid "Main domain"
msgstr ""
-#: tpl/general/settings.tpl.php:119
+#: tpl/general/settings.tpl.php:122
msgid "Main domain not generated yet"
msgstr ""
-#: tpl/general/settings.tpl.php:126
+#: tpl/general/settings.tpl.php:129
msgid "Current Cloud Nodes in Service"
msgstr ""
-#: tpl/general/settings.tpl.php:127
+#: tpl/general/settings.tpl.php:130
msgid "Click to clear all nodes for further redetection."
msgstr ""
-#: tpl/general/settings.tpl.php:127
+#: tpl/general/settings.tpl.php:130
msgid "Are you sure you want to clear all cloud nodes?"
msgstr ""
-#: tpl/general/settings.tpl.php:139
+#: tpl/general/settings.tpl.php:142
msgid "No cloud services currently in use"
msgstr ""
-#: tpl/general/settings.tpl.php:160
+#: tpl/general/settings.tpl.php:165
msgid "This option enables maximum optimization for Guest Mode visitors."
msgstr ""
-#: tpl/general/settings.tpl.php:161
+#: tpl/general/settings.tpl.php:166
msgid "Please read all warnings before enabling this option."
msgstr ""
-#: tpl/general/settings.tpl.php:175
+#: tpl/general/settings.tpl.php:181
msgid "Your %1s quota on %2s will still be in use."
msgstr ""
-#: tpl/general/settings.tpl.php:182 tpl/page_optm/settings_media.tpl.php:231
+#: tpl/general/settings.tpl.php:189 tpl/page_optm/settings_media.tpl.php:254
#: tpl/page_optm/settings_vpi.tpl.php:32
msgid "%s must be turned ON for this setting to work."
msgstr ""
-#: tpl/general/settings.tpl.php:188 tpl/general/settings.tpl.php:200
+#: tpl/general/settings.tpl.php:196
msgid "You need to turn %s on to get maximum result."
msgstr ""
-#: tpl/general/settings.tpl.php:194
+#: tpl/general/settings.tpl.php:203
msgid ""
"You need to turn %s on and finish all WebP generation to get maximum result."
msgstr ""
-#: tpl/general/settings.tpl.php:215
+#: tpl/general/settings.tpl.php:218
msgid ""
"Enter this site's IP address to allow cloud services directly call IP "
"instead of domain name. This eliminates the overhead of DNS and CDN lookups."
msgstr ""
-#: tpl/general/settings.tpl.php:216
+#: tpl/general/settings.tpl.php:219
msgid "Your server IP"
msgstr ""
-#: tpl/general/settings.tpl.php:216
+#: tpl/general/settings.tpl.php:219
msgid "Check my public IP from"
msgstr ""
-#: tpl/general/settings.tpl.php:217
+#: tpl/general/settings.tpl.php:220
msgid ""
"the auto-detected IP may not be accurate if you have an additional outgoing "
"IP set, or you have multiple IPs configured on your server."
msgstr ""
-#: tpl/general/settings.tpl.php:218
+#: tpl/general/settings.tpl.php:221
msgid "Please make sure this IP is the correct one for visiting your site."
msgstr ""
-#: tpl/general/settings.tpl.php:233
+#: tpl/general/settings.tpl.php:236
msgid ""
"Turn this option ON to show latest news automatically, including hotfixes, "
"new releases, available beta versions, and promotions."
@@ -4367,16 +4477,17 @@ msgstr ""
msgid "Guest Mode failed to test."
msgstr ""
-#: tpl/general/settings_tuning.tpl.php:7
-#: tpl/page_optm/settings_tuning.tpl.php:18
+#: tpl/general/settings_tuning.tpl.php:8
+#: tpl/page_optm/settings_tuning.tpl.php:20
+#: tpl/page_optm/settings_tuning_css.tpl.php:7
msgid "Tuning Settings"
msgstr ""
-#: tpl/general/settings_tuning.tpl.php:28
+#: tpl/general/settings_tuning.tpl.php:29
msgid "Listed User Agents will be considered as Guest Mode visitors."
msgstr ""
-#: tpl/general/settings_tuning.tpl.php:50
+#: tpl/general/settings_tuning.tpl.php:51
msgid "Listed IPs will be considered as Guest Mode visitors."
msgstr ""
@@ -4389,7 +4500,11 @@ msgstr ""
msgid "LiteSpeed Cache Image Optimization"
msgstr ""
-#: tpl/img_optm/settings.media_webp.tpl.php:14
+#: tpl/img_optm/settings.media_webp.tpl.php:17
+msgid "Request WebP versions of original images when doing optimization."
+msgstr ""
+
+#: tpl/img_optm/settings.media_webp.tpl.php:18
msgid ""
"Significantly improve load time by replacing images with their optimized %s "
"versions."
@@ -4415,11 +4530,11 @@ msgid ""
"images."
msgstr ""
-#: tpl/img_optm/settings.tpl.php:66 tpl/img_optm/summary.tpl.php:236
+#: tpl/img_optm/settings.tpl.php:66 tpl/img_optm/summary.tpl.php:196
msgid "This is irreversible."
msgstr ""
-#: tpl/img_optm/settings.tpl.php:67 tpl/img_optm/summary.tpl.php:237
+#: tpl/img_optm/settings.tpl.php:67 tpl/img_optm/summary.tpl.php:197
msgid "You will be unable to Revert Optimization once the backups are deleted!"
msgstr ""
@@ -4442,249 +4557,229 @@ msgstr ""
msgid "This will increase the size of optimized files."
msgstr ""
-#: tpl/img_optm/settings.tpl.php:109
-msgid "Request WebP versions of original images when doing optimization."
-msgstr ""
-
-#: tpl/img_optm/settings.tpl.php:139
+#: tpl/img_optm/settings.tpl.php:126
msgid "Specify which element attributes will be replaced with WebP."
msgstr ""
-#: tpl/img_optm/settings.tpl.php:155
+#: tpl/img_optm/settings.tpl.php:142
msgid ""
"Enable replacement of WebP in %s elements that were generated outside of "
"WordPress logic."
msgstr ""
-#: tpl/img_optm/settings.tpl.php:169
+#: tpl/img_optm/settings.tpl.php:156
msgid "The image compression quality setting of WordPress out of 100."
msgstr ""
-#: tpl/img_optm/summary.tpl.php:57 tpl/page_optm/settings_css.tpl.php:93
-#: tpl/page_optm/settings_css.tpl.php:203
-#: tpl/page_optm/settings_media.tpl.php:176
+#: tpl/img_optm/summary.tpl.php:43 tpl/page_optm/settings_css.tpl.php:101
+#: tpl/page_optm/settings_css.tpl.php:218
+#: tpl/page_optm/settings_media.tpl.php:196
#: tpl/page_optm/settings_vpi.tpl.php:48
msgid "Current closest Cloud server is %s.
Click to redetect."
msgstr ""
-#: tpl/img_optm/summary.tpl.php:61
+#: tpl/img_optm/summary.tpl.php:47
msgid "Optimize images with our QUIC.cloud server"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:66
+#: tpl/img_optm/summary.tpl.php:52
msgid "You can request a maximum of %s images at once."
msgstr ""
-#: tpl/img_optm/summary.tpl.php:71
+#: tpl/img_optm/summary.tpl.php:57
msgid ""
"To make sure our server can communicate with your server without any issues "
-"and everything works fine, for the few first requests the number of images "
-"allowed in a single request is limited."
+"and everything works fine, for the few first requests the number of image "
+"groups allowed in a single request is limited."
msgstr ""
-#: tpl/img_optm/summary.tpl.php:72
+#: tpl/img_optm/summary.tpl.php:58
msgid "Current limit is"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:84
-msgid "Gather Image Data"
-msgstr ""
-
-#: tpl/img_optm/summary.tpl.php:84
-msgid "Send Optimization Request"
-msgstr ""
-
-#: tpl/img_optm/summary.tpl.php:87
+#: tpl/img_optm/summary.tpl.php:67
msgid "Only press the button if the pull cron job is disabled."
msgstr ""
-#: tpl/img_optm/summary.tpl.php:87
+#: tpl/img_optm/summary.tpl.php:67
msgid "Images will be pulled automatically if the cron job is running."
msgstr ""
-#: tpl/img_optm/summary.tpl.php:94
+#: tpl/img_optm/summary.tpl.php:68
msgid "Pull Images"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:100
+#: tpl/img_optm/summary.tpl.php:74
msgid "Optimization Status"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:117
+#: tpl/img_optm/summary.tpl.php:107
msgid ""
"After the QUIC.cloud Image Optimization server finishes optimization, it "
"will notify your site to pull the optimized images."
msgstr ""
-#: tpl/img_optm/summary.tpl.php:118
+#: tpl/img_optm/summary.tpl.php:108
msgid "This process is automatic."
msgstr ""
-#: tpl/img_optm/summary.tpl.php:133
+#: tpl/img_optm/summary.tpl.php:123
msgid "Last pull initiated by cron at %s."
msgstr ""
-#: tpl/img_optm/summary.tpl.php:182
+#: tpl/img_optm/summary.tpl.php:148
msgid "Storage Optimization"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:186
+#: tpl/img_optm/summary.tpl.php:152
msgid "A backup of each image is saved before it is optimized."
msgstr ""
-#: tpl/img_optm/summary.tpl.php:193
+#: tpl/img_optm/summary.tpl.php:159
msgid "Last calculated"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:197 tpl/img_optm/summary.tpl.php:248
+#: tpl/img_optm/summary.tpl.php:163 tpl/img_optm/summary.tpl.php:208
msgid "Files"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:208
+#: tpl/img_optm/summary.tpl.php:174
msgid "Calculate Original Image Storage"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:215
+#: tpl/img_optm/summary.tpl.php:175
msgid "Calculate Backups Disk Space"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:222
+#: tpl/img_optm/summary.tpl.php:182
msgid "Image Thumbnail Group Sizes"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:233
+#: tpl/img_optm/summary.tpl.php:193
msgid "Delete all backups of the original images"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:245
+#: tpl/img_optm/summary.tpl.php:205
#: tpl/page_optm/settings_localization.tpl.php:51
msgid "Last ran"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:251
+#: tpl/img_optm/summary.tpl.php:211
msgid "Saved"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:255
+#: tpl/img_optm/summary.tpl.php:215
msgid "Are you sure you want to remove all image backups?"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:256
+#: tpl/img_optm/summary.tpl.php:216
msgid "Remove Original Image Backups"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:267
+#: tpl/img_optm/summary.tpl.php:227
msgid "Image Information"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:276 tpl/img_optm/summary.tpl.php:303
-msgid "Images total"
-msgstr ""
-
-#: tpl/img_optm/summary.tpl.php:280 tpl/img_optm/summary.tpl.php:307
-msgid "What is a group?"
+#: tpl/img_optm/summary.tpl.php:236
+msgid "Image groups total"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:282 tpl/img_optm/summary.tpl.php:309
-msgid "What is an image group?"
+#: tpl/img_optm/summary.tpl.php:241
+msgid "Congratulations, all requested!"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:287
-msgid "Images not yet gathered"
+#: tpl/img_optm/summary.tpl.php:244
+msgid "What is a group?"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:290
-msgid "Congratulations, all gathered!"
+#: tpl/img_optm/summary.tpl.php:246
+msgid "What is an image group?"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:314
-msgid "Images not yet requested"
+#: tpl/img_optm/summary.tpl.php:250
+msgid "Current image post id position"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:317
-msgid "Congratulations, all requested!"
+#: tpl/img_optm/summary.tpl.php:251
+msgid "Maximum image post id"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:324
+#: tpl/img_optm/summary.tpl.php:257
msgid ""
"Scan for any new unoptimized image thumbnail sizes and resend necessary "
"image optimization requests."
msgstr ""
-#: tpl/img_optm/summary.tpl.php:325
+#: tpl/img_optm/summary.tpl.php:258
msgid "Rescan New Thumbnails"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:333
+#: tpl/img_optm/summary.tpl.php:266
msgid "Optimization Summary"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:336
-msgid "Total Reduction"
-msgstr ""
-
-#: tpl/img_optm/summary.tpl.php:339
-msgid "Images Pulled"
+#: tpl/img_optm/summary.tpl.php:278
+msgid "Last Pulled"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:346
+#: tpl/img_optm/summary.tpl.php:283
msgid "Results can be checked in Media Library."
msgstr ""
-#: tpl/img_optm/summary.tpl.php:352
+#: tpl/img_optm/summary.tpl.php:289
msgid "Optimization Tools"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:355
+#: tpl/img_optm/summary.tpl.php:292
msgid ""
"You can quickly switch between using original (unoptimized versions) and "
"optimized image files. It will affect all images on your website, both "
"regular and webp versions if available."
msgstr ""
-#: tpl/img_optm/summary.tpl.php:360
+#: tpl/img_optm/summary.tpl.php:297
msgid "Use original images (unoptimized) on your site"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:361
+#: tpl/img_optm/summary.tpl.php:298
msgid "Use Original Files"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:364
+#: tpl/img_optm/summary.tpl.php:301
msgid "Switch back to using optimized images on your site"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:365
+#: tpl/img_optm/summary.tpl.php:302
msgid "Use Optimized Files"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:373
+#: tpl/img_optm/summary.tpl.php:310
msgid "Are you sure to destroy all optimized images?"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:374
+#: tpl/img_optm/summary.tpl.php:311
msgid "Destroy All Optimization Data"
msgstr ""
-#: tpl/img_optm/summary.tpl.php:378
+#: tpl/img_optm/summary.tpl.php:315
msgid ""
"Remove all previous image optimization requests/results, revert completed "
"optimizations, and delete all optimization files."
msgstr ""
-#: tpl/inc/admin_footer.php:8
+#: tpl/inc/admin_footer.php:10
msgid "Rate %s on %s"
msgstr ""
-#: tpl/inc/admin_footer.php:11
+#: tpl/inc/admin_footer.php:13
msgid "Read LiteSpeed Documentation"
msgstr ""
-#: tpl/inc/admin_footer.php:13
+#: tpl/inc/admin_footer.php:15
msgid "Visit LSCWP support forum"
msgstr ""
-#: tpl/inc/admin_footer.php:15
+#: tpl/inc/admin_footer.php:17
msgid "Join LiteSpeed Slack community"
msgstr ""
@@ -4728,72 +4823,72 @@ msgid ""
"configuration data upgrade."
msgstr ""
-#: tpl/inc/show_display_installed.php:5
+#: tpl/inc/show_display_installed.php:7
msgid "LiteSpeed Cache plugin is installed!"
msgstr ""
-#: tpl/inc/show_display_installed.php:6
+#: tpl/inc/show_display_installed.php:10
msgid ""
"This message indicates that the plugin was installed by the server admin."
msgstr ""
-#: tpl/inc/show_display_installed.php:7
+#: tpl/inc/show_display_installed.php:12
msgid ""
"The LiteSpeed Cache plugin is used to cache pages - a simple way to improve "
"the performance of the site."
msgstr ""
-#: tpl/inc/show_display_installed.php:8
+#: tpl/inc/show_display_installed.php:14
msgid ""
"However, there is no way of knowing all the possible customizations that "
"were implemented."
msgstr ""
-#: tpl/inc/show_display_installed.php:9
+#: tpl/inc/show_display_installed.php:16
msgid ""
"For that reason, please test the site to make sure everything still "
"functions properly."
msgstr ""
-#: tpl/inc/show_display_installed.php:11
+#: tpl/inc/show_display_installed.php:18
msgid "Examples of test cases include:"
msgstr ""
-#: tpl/inc/show_display_installed.php:13
+#: tpl/inc/show_display_installed.php:21
msgid "Visit the site while logged out."
msgstr ""
-#: tpl/inc/show_display_installed.php:14
+#: tpl/inc/show_display_installed.php:24
msgid "Create a post, make sure the front page is accurate."
msgstr ""
-#: tpl/inc/show_display_installed.php:16
+#: tpl/inc/show_display_installed.php:28
msgid ""
"If there are any questions, the team is always happy to answer any questions "
"on the support forum."
msgstr ""
-#: tpl/inc/show_display_installed.php:19
+#: tpl/inc/show_display_installed.php:32
msgid ""
"If you would rather not move at litespeed, you can deactivate this plugin."
msgstr ""
-#: tpl/inc/show_error_cookie.php:5
+#: tpl/inc/show_error_cookie.php:6
msgid "NOTICE: Database login cookie did not match your login cookie."
msgstr ""
-#: tpl/inc/show_error_cookie.php:6
+#: tpl/inc/show_error_cookie.php:8
msgid ""
"If the login cookie was recently changed in the settings, please log out and "
"back in."
msgstr ""
-#: tpl/inc/show_error_cookie.php:7
+#: tpl/inc/show_error_cookie.php:10
msgid ""
"If not, please verify the setting in the Advanced tab."
msgstr ""
-#: tpl/inc/show_error_cookie.php:11
+#: tpl/inc/show_error_cookie.php:13
msgid ""
"If using OpenLiteSpeed, the server must be restarted once for the changes to "
"take effect."
@@ -4807,19 +4902,19 @@ msgid ""
"dismissed. (Learn More)"
msgstr ""
-#: tpl/page_optm/entry.tpl.php:6 tpl/page_optm/settings_css.tpl.php:18
+#: tpl/page_optm/entry.tpl.php:6 tpl/page_optm/settings_css.tpl.php:20
msgid "CSS Settings"
msgstr ""
-#: tpl/page_optm/entry.tpl.php:7 tpl/page_optm/settings_js.tpl.php:7
+#: tpl/page_optm/entry.tpl.php:7 tpl/page_optm/settings_js.tpl.php:9
msgid "JS Settings"
msgstr ""
-#: tpl/page_optm/entry.tpl.php:8 tpl/page_optm/settings_html.tpl.php:7
+#: tpl/page_optm/entry.tpl.php:8 tpl/page_optm/settings_html.tpl.php:9
msgid "HTML Settings"
msgstr ""
-#: tpl/page_optm/entry.tpl.php:9 tpl/page_optm/settings_media.tpl.php:14
+#: tpl/page_optm/entry.tpl.php:9 tpl/page_optm/settings_media.tpl.php:16
msgid "Media Settings"
msgstr ""
@@ -4835,247 +4930,252 @@ msgstr ""
msgid "Localization"
msgstr ""
-#: tpl/page_optm/entry.tpl.php:20
+#: tpl/page_optm/entry.tpl.php:21
msgid "LiteSpeed Cache Page Optimization"
msgstr ""
-#: tpl/page_optm/entry.tpl.php:32
+#: tpl/page_optm/entry.tpl.php:33
msgid ""
"Please test thoroughly when enabling any option in this list. After changing "
"Minify/Combine settings, please do a Purge All action."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:32
+#: tpl/page_optm/settings_css.tpl.php:36
msgid "Minify CSS files and inline CSS code."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:45
+#: tpl/page_optm/settings_css.tpl.php:50
msgid "Combine CSS files and inline CSS code."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:46 tpl/page_optm/settings_js.tpl.php:35
+#: tpl/page_optm/settings_css.tpl.php:51 tpl/page_optm/settings_js.tpl.php:40
msgid "How to Fix Problems Caused by CSS/JS Optimization."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:66
+#: tpl/page_optm/settings_css.tpl.php:72
msgid "Use QUIC.cloud online service to generate unique CSS."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:67
+#: tpl/page_optm/settings_css.tpl.php:73
msgid "This will drop the unused CSS on each page from the combined file."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:69
+#: tpl/page_optm/settings_css.tpl.php:75
msgid ""
"Automatic generation of unique CSS is in the background via a cron-based "
"queue."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:70
+#: tpl/page_optm/settings_css.tpl.php:77
msgid "Filter %s available for UCSS per page type generation."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:74
+#: tpl/page_optm/settings_css.tpl.php:82
msgid "This option is bypassed because %1$s option is %2$s."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:87 tpl/page_optm/settings_css.tpl.php:197
+#: tpl/page_optm/settings_css.tpl.php:95 tpl/page_optm/settings_css.tpl.php:212
msgid "Last requested cost"
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:99 tpl/page_optm/settings_css.tpl.php:209
-#: tpl/page_optm/settings_vpi.tpl.php:54
+#: tpl/page_optm/settings_css.tpl.php:107
+#: tpl/page_optm/settings_css.tpl.php:224 tpl/page_optm/settings_vpi.tpl.php:54
msgid "URL list in %s queue waiting for cron"
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:120
-#: tpl/page_optm/settings_css.tpl.php:230 tpl/page_optm/settings_vpi.tpl.php:74
+#: tpl/page_optm/settings_css.tpl.php:129
+#: tpl/page_optm/settings_css.tpl.php:246 tpl/page_optm/settings_vpi.tpl.php:74
msgid "Run %s Queue Manually"
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:136
+#: tpl/page_optm/settings_css.tpl.php:147
msgid ""
"Inline UCSS to reduce the extra CSS file loading. This option will not be "
"automatically turned on for %1$s pages. To use it on %1$s pages, please set "
"it to ON."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:138
+#: tpl/page_optm/settings_css.tpl.php:150
msgid "This option will automatically bypass %s option."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:152
+#: tpl/page_optm/settings_css.tpl.php:164
msgid ""
"Include external CSS and inline CSS in combined file when %1$s is also "
"enabled. This option helps maintain the priorities of CSS, which should "
"minimize potential errors caused by CSS Combine."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:171
+#: tpl/page_optm/settings_css.tpl.php:184
msgid "Optimize CSS delivery."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:172
-#: tpl/page_optm/settings_html.tpl.php:129 tpl/page_optm/settings_js.tpl.php:67
+#: tpl/page_optm/settings_css.tpl.php:185
+#: tpl/page_optm/settings_html.tpl.php:150 tpl/page_optm/settings_js.tpl.php:73
msgid ""
"This can improve your speed score in services like Pingdom, GTmetrix and "
"PageSpeed."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:173
+#: tpl/page_optm/settings_css.tpl.php:186
msgid ""
"Use QUIC.cloud online service to generate critical CSS and load remaining "
"CSS asynchronously."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:175
+#: tpl/page_optm/settings_css.tpl.php:188
msgid ""
"Automatic generation of critical CSS is in the background via a cron-based "
"queue."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:176
+#: tpl/page_optm/settings_css.tpl.php:189
msgid ""
"When this option is turned %s, it will also load Google Fonts asynchronously."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:179
+#: tpl/page_optm/settings_css.tpl.php:193
msgid "Elements with attribute %s in HTML code will be excluded."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:184
+#: tpl/page_optm/settings_css.tpl.php:199
msgid "This option is bypassed due to %s option."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:245
+#: tpl/page_optm/settings_css.tpl.php:262
msgid ""
"Disable this option to generate CCSS per Post Type instead of per page. This "
"can save significant CCSS quota, however it may result in incorrect CSS "
"styling if your site uses a page builder."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:258
+#: tpl/page_optm/settings_css.tpl.php:275
msgid "This will inline the asynchronous CSS library to avoid render blocking."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:269
+#: tpl/page_optm/settings_css.tpl.php:286
msgid "Default"
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:271
+#: tpl/page_optm/settings_css.tpl.php:288
msgid ""
"Set this to append %1$s to all %2$s rules before caching CSS to specify how "
"fonts should be displayed while being downloaded."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:272
+#: tpl/page_optm/settings_css.tpl.php:289
msgid "%s is recommended."
msgstr ""
-#: tpl/page_optm/settings_css.tpl.php:272
+#: tpl/page_optm/settings_css.tpl.php:289
msgid "Swap"
msgstr ""
-#: tpl/page_optm/settings_html.tpl.php:20
+#: tpl/page_optm/settings_html.tpl.php:23
msgid "Minify HTML content."
msgstr ""
-#: tpl/page_optm/settings_html.tpl.php:33
+#: tpl/page_optm/settings_html.tpl.php:36
msgid "Prefetching DNS can reduce latency for visitors."
msgstr ""
-#: tpl/page_optm/settings_html.tpl.php:34
+#: tpl/page_optm/settings_html.tpl.php:37
+#: tpl/page_optm/settings_html.tpl.php:68
msgid "For example"
msgstr ""
-#: tpl/page_optm/settings_html.tpl.php:49
+#: tpl/page_optm/settings_html.tpl.php:52
msgid ""
"Automatically enable DNS prefetching for all URLs in the document, including "
"images, CSS, JavaScript, and so forth."
msgstr ""
-#: tpl/page_optm/settings_html.tpl.php:50
+#: tpl/page_optm/settings_html.tpl.php:53
msgid "This can improve the page loading speed."
msgstr ""
-#: tpl/page_optm/settings_html.tpl.php:64
+#: tpl/page_optm/settings_html.tpl.php:67
+msgid "Preconnecting speeds up future loads from a given origin."
+msgstr ""
+
+#: tpl/page_optm/settings_html.tpl.php:83
msgid "Delay rendering off-screen HTML elements by its selector."
msgstr ""
-#: tpl/page_optm/settings_html.tpl.php:79
+#: tpl/page_optm/settings_html.tpl.php:98
msgid "Remove query strings from internal static resources."
msgstr ""
-#: tpl/page_optm/settings_html.tpl.php:82
+#: tpl/page_optm/settings_html.tpl.php:102
msgid "Google reCAPTCHA will be bypassed automatically."
msgstr ""
-#: tpl/page_optm/settings_html.tpl.php:86
+#: tpl/page_optm/settings_html.tpl.php:107
msgid "Append query string %s to the resources to bypass this action."
msgstr ""
-#: tpl/page_optm/settings_html.tpl.php:100
+#: tpl/page_optm/settings_html.tpl.php:121
msgid ""
"Use Web Font Loader library to load Google Fonts asynchronously while "
"leaving other CSS intact."
msgstr ""
-#: tpl/page_optm/settings_html.tpl.php:101
+#: tpl/page_optm/settings_html.tpl.php:122
msgid ""
"This will also add a preconnect to Google Fonts to establish a connection "
"earlier."
msgstr ""
-#: tpl/page_optm/settings_html.tpl.php:115
+#: tpl/page_optm/settings_html.tpl.php:136
msgid "Prevent Google Fonts from loading on all pages."
msgstr ""
-#: tpl/page_optm/settings_html.tpl.php:128
+#: tpl/page_optm/settings_html.tpl.php:149
msgid ""
"Stop loading WordPress.org emoji. Browser default emoji will be displayed "
"instead."
msgstr ""
-#: tpl/page_optm/settings_html.tpl.php:142
+#: tpl/page_optm/settings_html.tpl.php:163
msgid "This option will remove all %s tags from HTML."
msgstr ""
-#: tpl/page_optm/settings_js.tpl.php:21
+#: tpl/page_optm/settings_js.tpl.php:25
msgid "Minify JS files and inline JS codes."
msgstr ""
-#: tpl/page_optm/settings_js.tpl.php:34
+#: tpl/page_optm/settings_js.tpl.php:39
msgid "Combine all local JS files into a single file."
msgstr ""
-#: tpl/page_optm/settings_js.tpl.php:37 tpl/page_optm/settings_js.tpl.php:70
+#: tpl/page_optm/settings_js.tpl.php:43 tpl/page_optm/settings_js.tpl.php:77
msgid ""
"This option may result in a JS error or layout issue on frontend pages with "
"certain themes/plugins."
msgstr ""
-#: tpl/page_optm/settings_js.tpl.php:38
+#: tpl/page_optm/settings_js.tpl.php:44
msgid ""
"JS error can be found from the developer console of browser by right "
"clicking and choosing Inspect."
msgstr ""
-#: tpl/page_optm/settings_js.tpl.php:52
+#: tpl/page_optm/settings_js.tpl.php:58
msgid ""
"Include external JS and inline JS in combined file when %1$s is also "
"enabled. This option helps maintain the priorities of JS execution, which "
"should minimize potential errors caused by JS Combine."
msgstr ""
-#: tpl/page_optm/settings_js.tpl.php:63
+#: tpl/page_optm/settings_js.tpl.php:69
msgid "Deferred"
msgstr ""
-#: tpl/page_optm/settings_js.tpl.php:63
+#: tpl/page_optm/settings_js.tpl.php:69
msgid "Delayed"
msgstr ""
-#: tpl/page_optm/settings_js.tpl.php:65
+#: tpl/page_optm/settings_js.tpl.php:71
msgid ""
"Deferring until page is parsed or delaying till interaction can help reduce "
"resource contention and improve performance causing a lower FID (Core Web "
@@ -5110,7 +5210,7 @@ msgid "Avatar list in queue waiting for update"
msgstr ""
#: tpl/page_optm/settings_localization.tpl.php:62
-#: tpl/page_optm/settings_media.tpl.php:198
+#: tpl/page_optm/settings_media.tpl.php:219
msgid "Run Queue Manually"
msgstr ""
@@ -5152,137 +5252,144 @@ msgid ""
"expected."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:27
+#: tpl/page_optm/settings_media.tpl.php:30
+msgid ""
+"Load a post's Featured Image first, before the page begins to render. Leads "
+"to performance improvements and minimizes the risk of render blocking by "
+"Featured Images."
+msgstr ""
+
+#: tpl/page_optm/settings_media.tpl.php:44
msgid "Load images only when they enter the viewport."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:28
-#: tpl/page_optm/settings_media.tpl.php:214
+#: tpl/page_optm/settings_media.tpl.php:45
+#: tpl/page_optm/settings_media.tpl.php:236
msgid "This can improve page loading time by reducing initial HTTP requests."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:31
+#: tpl/page_optm/settings_media.tpl.php:49
msgid "Adding Style to Your Lazy-Loaded Images"
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:45
+#: tpl/page_optm/settings_media.tpl.php:63
msgid ""
"Specify a base64 image to be used as a simple placeholder while images "
"finish loading."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:46
+#: tpl/page_optm/settings_media.tpl.php:64
msgid ""
"This can be predefined in %2$s as well using constant %1$s, with this "
"setting taking priority."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:47
+#: tpl/page_optm/settings_media.tpl.php:65
msgid "By default a gray image placeholder %s will be used."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:48
+#: tpl/page_optm/settings_media.tpl.php:66
msgid "For example, %s can be used for a transparent placeholder."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:61
+#: tpl/page_optm/settings_media.tpl.php:80
msgid ""
"Responsive image placeholders can help to reduce layout reshuffle when "
"images are loaded."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:62
+#: tpl/page_optm/settings_media.tpl.php:81
msgid ""
"This will generate the placeholder with same dimensions as the image if it "
"has the width and height attributes."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:75
+#: tpl/page_optm/settings_media.tpl.php:94
msgid "Specify an SVG to be used as a placeholder when generating locally."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:76
+#: tpl/page_optm/settings_media.tpl.php:95
msgid "It will be converted to a base64 SVG placeholder on-the-fly."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:77
+#: tpl/page_optm/settings_media.tpl.php:96
msgid "Variables %s will be replaced with the corresponding image properties."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:78
+#: tpl/page_optm/settings_media.tpl.php:97
msgid "Variables %s will be replaced with the configured background color."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:92
+#: tpl/page_optm/settings_media.tpl.php:111
msgid "Specify the responsive placeholder SVG color."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:106
+#: tpl/page_optm/settings_media.tpl.php:126
msgid ""
"Use QUIC.cloud LQIP (Low Quality Image Placeholder) generator service for "
"responsive image previews while loading."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:107
+#: tpl/page_optm/settings_media.tpl.php:127
msgid "Keep this off to use plain color placeholders."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:121
+#: tpl/page_optm/settings_media.tpl.php:141
msgid "Specify the quality when generating LQIP."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:122
+#: tpl/page_optm/settings_media.tpl.php:142
msgid ""
"Larger number will generate higher resolution quality placeholder, but will "
"result in larger files which will increase page size and consume more points."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:125
+#: tpl/page_optm/settings_media.tpl.php:145
msgid ""
"Changes to this setting do not apply to already-generated LQIPs. To "
"regenerate existing LQIPs, please %s first from the admin bar menu."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:138
+#: tpl/page_optm/settings_media.tpl.php:158
msgid "pixels"
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:140
+#: tpl/page_optm/settings_media.tpl.php:160
msgid ""
"LQIP requests will not be sent for images where both width and height are "
"smaller than these dimensions."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:156
+#: tpl/page_optm/settings_media.tpl.php:176
msgid "Automatically generate LQIP in the background via a cron-based queue."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:158
+#: tpl/page_optm/settings_media.tpl.php:178
msgid ""
"If set to %1$s, before the placeholder is localized, the %2$s configuration "
"will be used."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:162
+#: tpl/page_optm/settings_media.tpl.php:182
msgid ""
"If set to %s this is done in the foreground, which may slow down page load."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:182
+#: tpl/page_optm/settings_media.tpl.php:202
msgid "Size list in queue waiting for cron"
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:213
+#: tpl/page_optm/settings_media.tpl.php:235
msgid "Load iframes only when they enter the viewport."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:227
+#: tpl/page_optm/settings_media.tpl.php:249
msgid ""
"Set an explicit width and height on image elements to reduce layout shifts "
"and improve CLS (a Core Web Vitals metric)."
msgstr ""
-#: tpl/page_optm/settings_media.tpl.php:236
+#: tpl/page_optm/settings_media.tpl.php:260
msgid "Use %1$s to bypass remote image dimension check when %2$s is ON."
msgstr ""
@@ -5296,10 +5403,10 @@ msgid ""
msgstr ""
#: tpl/page_optm/settings_media_exc.tpl.php:28
-#: tpl/page_optm/settings_tuning.tpl.php:37
-#: tpl/page_optm/settings_tuning.tpl.php:58
-#: tpl/page_optm/settings_tuning.tpl.php:167
-#: tpl/page_optm/settings_tuning.tpl.php:188
+#: tpl/page_optm/settings_tuning.tpl.php:61
+#: tpl/page_optm/settings_tuning.tpl.php:82
+#: tpl/page_optm/settings_tuning.tpl.php:103
+#: tpl/page_optm/settings_tuning_css.tpl.php:26
msgid "Elements with attribute %s in html code will be excluded."
msgstr ""
@@ -5327,117 +5434,357 @@ msgstr ""
msgid "These images will not generate LQIP."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:31
-msgid "Listed CSS files or inline CSS code will not be minified/combined."
+#: tpl/page_optm/settings_tuning.tpl.php:34
+msgid "Listed JS files or inline JS code will be delayed."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:38
-#: tpl/page_optm/settings_tuning.tpl.php:59
+#: tpl/page_optm/settings_tuning.tpl.php:54
+msgid "Listed JS files or inline JS code will not be minified/combined."
+msgstr ""
+
+#: tpl/page_optm/settings_tuning.tpl.php:62
#: tpl/page_optm/settings_tuning.tpl.php:83
-#: tpl/page_optm/settings_tuning.tpl.php:168
+#: tpl/page_optm/settings_tuning_css.tpl.php:27
+#: tpl/page_optm/settings_tuning_css.tpl.php:66
msgid "Predefined list will also be combined w/ the above settings"
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:52
-msgid "Listed JS files or inline JS code will not be minified/combined."
+#: tpl/page_optm/settings_tuning.tpl.php:76
+msgid "Listed JS files or inline JS code will not be deferred or delayed."
+msgstr ""
+
+#: tpl/page_optm/settings_tuning.tpl.php:97
+msgid "Listed JS files or inline JS code will not be optimized by %s."
+msgstr ""
+
+#: tpl/page_optm/settings_tuning.tpl.php:117
+msgid "Prevent any optimization of listed pages."
+msgstr ""
+
+#: tpl/page_optm/settings_tuning.tpl.php:135
+msgid ""
+"Only optimize pages for guest (not logged in) visitors. If turned this OFF, "
+"CSS/JS/CCSS files will be doubled by each user group."
+msgstr ""
+
+#: tpl/page_optm/settings_tuning.tpl.php:147
+msgid "Selected roles will be excluded from all optimizations."
+msgstr ""
+
+#: tpl/page_optm/settings_tuning_css.tpl.php:20
+msgid "Listed CSS files or inline CSS code will not be minified/combined."
+msgstr ""
+
+#: tpl/page_optm/settings_tuning_css.tpl.php:41
+msgid "Listed CSS files will be excluded from UCSS and saved to inline."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:73
+#: tpl/page_optm/settings_tuning_css.tpl.php:56
msgid ""
"List the CSS selector that its style should be always contained in UCSS."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:74
+#: tpl/page_optm/settings_tuning_css.tpl.php:57
msgid "How to choose an UCSS allowlist selector?"
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:75
+#: tpl/page_optm/settings_tuning_css.tpl.php:58
msgid "Wildcard %s supported."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:79
+#: tpl/page_optm/settings_tuning_css.tpl.php:62
msgid ""
"The selector must exist in the CSS. Parent classes in the HTML will not work."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:97
+#: tpl/page_optm/settings_tuning_css.tpl.php:80
msgid "Listed URI will not generate UCSS."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:104
+#: tpl/page_optm/settings_tuning_css.tpl.php:87
msgid ""
"Use %1$s to generate one single UCSS for the pages which page type is %2$s "
"while other page types still per URL."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:105
+#: tpl/page_optm/settings_tuning_css.tpl.php:88
msgid "Use %1$s to bypass UCSS for the pages which page type is %2$s."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:119
+#: tpl/page_optm/settings_tuning_css.tpl.php:102
msgid ""
"List post types where each item of that type should have its own CCSS "
"generated."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:120
+#: tpl/page_optm/settings_tuning_css.tpl.php:103
msgid ""
"For example, if every Page on the site has different formatting, enter %s in "
"the box. Separate critical CSS files will be stored for every Page on the "
"site."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:134
+#: tpl/page_optm/settings_tuning_css.tpl.php:117
msgid ""
"Separate critical CSS files will be generated for paths containing these "
"strings."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:148
+#: tpl/page_optm/settings_tuning_css.tpl.php:131
msgid "Specify critical CSS rules for above-the-fold content when enabling %s."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:161
-msgid "Listed JS files or inline JS code will not be deferred."
+#: tpl/page_optm/settings_vpi.tpl.php:26
+msgid ""
+"When you use Lazy Load, it will delay the loading of all images on a page."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:182
-msgid "Listed JS files or inline JS code will not be optimized by %s."
+#: tpl/page_optm/settings_vpi.tpl.php:27
+msgid ""
+"The Viewport Images service detects which images appear above the fold, and "
+"excludes them from lazy load."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:202
-msgid "Prevent any optimization of listed pages."
+#: tpl/page_optm/settings_vpi.tpl.php:28
+msgid ""
+"This enables the page's initial screenful of imagery to be fully displayed "
+"without delay."
+msgstr ""
+
+#: tpl/page_optm/settings_vpi.tpl.php:91
+msgid "Enable Viewport Images auto generation cron."
+msgstr ""
+
+#: tpl/presets/entry.tpl.php:6
+msgid "Standard Presets"
+msgstr ""
+
+#: tpl/presets/entry.tpl.php:7 tpl/toolbox/entry.tpl.php:10
+msgid "Import / Export"
+msgstr ""
+
+#: tpl/presets/entry.tpl.php:14
+msgid "LiteSpeed Cache Configuration Presets"
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:216
+#: tpl/presets/standard.tpl.php:8
+msgid "Essentials"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:10
+msgid "Default Cache"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:11
+msgid "Higher TTL"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:15
msgid ""
-"Only optimize pages for guest (not logged in) visitors. If turned this OFF, "
-"CSS/JS/CCSS files will be doubled by each user group."
+"This no-risk preset is appropriate for all websites. Good for new users, "
+"simple websites, or cache-oriented development."
msgstr ""
-#: tpl/page_optm/settings_tuning.tpl.php:228
-msgid "Selected roles will be excluded from all optimizations."
+#: tpl/presets/standard.tpl.php:16
+msgid ""
+"A Domain Key is not required to use this preset. Only basic caching features "
+"are enabled."
msgstr ""
-#: tpl/page_optm/settings_vpi.tpl.php:26
+#: tpl/presets/standard.tpl.php:21 tpl/toolbox/settings-debug.tpl.php:82
+msgid "Basic"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:23
+msgid "Everything in Essentials, Plus"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:25
+msgid "Mobile Cache"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:28
msgid ""
-"When you use Lazy Load, it will delay the loading of all images on a page."
+"This low-risk preset introduces basic optimizations for speed and user "
+"experience. Appropriate for enthusiastic beginners."
msgstr ""
-#: tpl/page_optm/settings_vpi.tpl.php:27
+#: tpl/presets/standard.tpl.php:29
msgid ""
-"The Viewport Images service detects which images appear above the fold, and "
-"excludes them from lazy load."
+"A Domain Key is required to use this preset. Includes optimizations known to "
+"improve site score in page speed measurement tools."
msgstr ""
-#: tpl/page_optm/settings_vpi.tpl.php:28
+#: tpl/presets/standard.tpl.php:34
+msgid "Advanced (Recommended)"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:36
+msgid "Everything in Basic, Plus"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:37
+msgid "Guest Mode and Guest Optimization"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:38
+msgid "CSS, JS and HTML Minification"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:40
+msgid "JS Defer for both external and inline JS"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:41
+msgid "DNS Prefetch for static files"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:43
+msgid "Remove Query Strings from Static Files"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:48
msgid ""
-"This enables the page's initial screenful of imagery to be fully displayed "
-"without delay."
+"This preset is good for most websites, and is unlikely to cause conflicts. "
+"Any CSS or JS conflicts may be resolved with Page Optimization > Tuning "
+"tools."
msgstr ""
-#: tpl/page_optm/settings_vpi.tpl.php:90
-msgid "Enable Viewport Images auto generation cron."
+#: tpl/presets/standard.tpl.php:49 tpl/presets/standard.tpl.php:64
+msgid ""
+"A Domain Key is required to use this preset. Includes many optimizations "
+"known to improve page speed scores."
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:54
+msgid "Aggressive"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:56
+msgid "Everything in Advanced, Plus"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:57
+msgid "CSS & JS Combine"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:58
+msgid "Asynchronous CSS Loading with Critical CSS"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:59
+msgid "Removed Unused CSS for Users"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:60
+msgid "Lazy Load for Iframes"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:63
+msgid ""
+"This preset might work out of the box for some websites, but be sure to "
+"test! Some CSS or JS exclusions may be necessary in Page Optimization > "
+"Tuning."
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:69
+msgid "Extreme"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:71
+msgid "Everything in Aggressive, Plus"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:72
+msgid "Lazy Load for Images"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:73
+msgid "Viewport Image Generation"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:74
+msgid "JS Delayed"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:75
+msgid "Inline JS added to Combine"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:76
+msgid "Inline CSS added to Combine"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:79
+msgid ""
+"This preset almost certainly will require testing and exclusions for some "
+"CSS, JS and Lazy Loaded images. Pay special attention to logos, or HTML-"
+"based slider images."
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:80
+msgid ""
+"A Domain Key is required to use this preset. Enables the maximum level of "
+"optimizations for improved page speed scores."
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:87
+msgid "LiteSpeed Cache Standard Presets"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:91
+msgid ""
+"Use an official LiteSpeed-designed Preset to configure your site in one "
+"click. Try no-risk caching essentials, extreme optimization, or something in "
+"between."
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:116
+msgid "Who should use this preset?"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:126
+msgid ""
+"This will back up your current settings and replace them with the %1$s "
+"preset settings. Do you want to continue?"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:128
+msgid "Apply Preset"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:147
+msgid "unknown"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:158
+msgid "History"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:168
+msgid "Error: Failed to apply the settings %1$s"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:170
+msgid "Restored backup settings %1$s"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:173
+msgid "Applied the %1$s preset %2$s"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:184
+msgid "Backup created %1$s before applying the %2$s preset"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:188
+msgid ""
+"This will restore the backup settings created %1$s before applying the %2$s "
+"preset. Any changes made since then will be lost. Do you want to continue?"
+msgstr ""
+
+#: tpl/presets/standard.tpl.php:190
+msgid "Restore Settings"
msgstr ""
#: tpl/toolbox/beta_test.tpl.php:27
@@ -5525,10 +5872,6 @@ msgstr ""
msgid "Current %s Contents"
msgstr ""
-#: tpl/toolbox/entry.tpl.php:10
-msgid "Import / Export"
-msgstr ""
-
#: tpl/toolbox/entry.tpl.php:14
msgid "View .htaccess"
msgstr ""
@@ -5945,10 +6288,6 @@ msgstr ""
msgid "More information about the available commands can be found here."
msgstr ""
-#: tpl/toolbox/settings-debug.tpl.php:82
-msgid "Basic"
-msgstr ""
-
#: tpl/toolbox/settings-debug.tpl.php:84
msgid "Advanced level will log more details."
msgstr ""
diff --git a/lib/css-min/minifier.cls.php b/lib/css-min/minifier.cls.php
index 1475a2093..32753beeb 100644
--- a/lib/css-min/minifier.cls.php
+++ b/lib/css-min/minifier.cls.php
@@ -320,8 +320,10 @@ private function minify($css)
);
// Process strings so their content doesn't get accidentally minified
+ $double_quoted = '"(?:[^"\\\\]|\\\\.)*"';
+ $single_quoted = "'(?:[^'\\\\]|\\\\.)*'";
$css = preg_replace_callback(
- '/(?:"(?:[^\\\\"]|\\\\.|\\\\)*")|'."(?:'(?:[^\\\\']|\\\\.|\\\\)*')/S",
+ "/(?_conf = file_get_contents( LSCWP_CONTENT_FOLDER . '/' . self::CONF_FILE );
- if ( $this->_conf ) {
- $this->_conf = json_decode( $this->_conf, true );
+ $this->_conf = file_get_contents(LSCWP_CONTENT_FOLDER . '/' . self::CONF_FILE);
+ if ($this->_conf) {
+ $this->_conf = json_decode($this->_conf, true);
}
- if ( ! empty( $this->_conf[ self::O_CACHE_LOGIN_COOKIE ] ) ) {
- self::$_vary_name = $this->_conf[ self::O_CACHE_LOGIN_COOKIE ];
+ if (!empty($this->_conf[self::O_CACHE_LOGIN_COOKIE])) {
+ self::$_vary_name = $this->_conf[self::O_CACHE_LOGIN_COOKIE];
}
}
@@ -43,33 +46,38 @@ public function __construct() {
*
* @since 4.0
*/
- public function update_guest_vary() {
+ public function update_guest_vary()
+ {
// This process must not be cached
- header( 'X-LiteSpeed-Cache-Control: no-cache' );
+ /**
+ * @reference https://wordpress.org/support/topic/soft-404-from-google-search-on-litespeed-cache-guest-vary-php/#post-16838583
+ */
+ header('X-Robots-Tag: noindex');
+ header('X-LiteSpeed-Cache-Control: no-cache');
- if ( $this->always_guest() ) {
+ if ($this->always_guest()) {
echo '[]';
exit;
}
// If contains vary already, don't reload to avoid infinite loop when parent page having browser cache
- if ( $this->_conf && self::has_vary() ) {
+ if ($this->_conf && self::has_vary()) {
echo '[]';
exit;
}
// Send vary cookie
$vary = 'guest_mode:1';
- if ( $this->_conf && empty( $this->_conf[ self::O_DEBUG ] ) ) {
- $vary = md5( $this->_conf[ self::HASH ] . $vary );
+ if ($this->_conf && empty($this->_conf[self::O_DEBUG])) {
+ $vary = md5($this->_conf[self::HASH] . $vary);
}
$expire = time() + 2 * 86400;
- $is_ssl = ! empty( $this->_conf[ self::O_UTIL_NO_HTTPS_VARY ] ) ? false : $this->is_ssl();
- setcookie( self::$_vary_name, $vary, $expire, '/', false, $is_ssl, true );
+ $is_ssl = !empty($this->_conf[self::O_UTIL_NO_HTTPS_VARY]) ? false : $this->is_ssl();
+ setcookie(self::$_vary_name, $vary, $expire, '/', false, $is_ssl, true);
// return json
- echo json_encode( array( 'reload' => 'yes' ) );
+ echo json_encode(array('reload' => 'yes'));
exit;
}
@@ -78,16 +86,17 @@ public function update_guest_vary() {
*
* @since 4.1
*/
- private function is_ssl() {
- if ( isset( $_SERVER['HTTPS'] ) ) {
- if ( 'on' === strtolower( $_SERVER['HTTPS'] ) ) {
+ private function is_ssl()
+ {
+ if (isset($_SERVER['HTTPS'])) {
+ if ('on' === strtolower($_SERVER['HTTPS'])) {
return true;
}
- if ( '1' == $_SERVER['HTTPS'] ) {
+ if ('1' == $_SERVER['HTTPS']) {
return true;
}
- } elseif ( isset( $_SERVER['SERVER_PORT'] ) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
+ } elseif (isset($_SERVER['SERVER_PORT']) && ('443' == $_SERVER['SERVER_PORT'])) {
return true;
}
return false;
@@ -99,11 +108,12 @@ private function is_ssl() {
* @since 1.1.3
* @access public
*/
- public static function has_vary() {
- if ( empty( $_COOKIE[ self::$_vary_name ] ) ) {
+ public static function has_vary()
+ {
+ if (empty($_COOKIE[self::$_vary_name])) {
return false;
}
- return $_COOKIE[ self::$_vary_name ];
+ return $_COOKIE[self::$_vary_name];
}
/**
@@ -111,23 +121,24 @@ public static function has_vary() {
*
* @since 4.0
*/
- public function always_guest() {
- if ( empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) ) {
+ public function always_guest()
+ {
+ if (empty($_SERVER['HTTP_USER_AGENT'])) {
return false;
}
- if ( $this->_conf[ self::O_GUEST_UAS ] ) {
+ if ($this->_conf[self::O_GUEST_UAS]) {
$quoted_uas = array();
- foreach ( $this->_conf[ self::O_GUEST_UAS ] as $v ) {
- $quoted_uas[] = preg_quote( $v, '#' );
+ foreach ($this->_conf[self::O_GUEST_UAS] as $v) {
+ $quoted_uas[] = preg_quote($v, '#');
}
- $match = preg_match( '#' . implode( '|', $quoted_uas ) . '#i', $_SERVER[ 'HTTP_USER_AGENT' ] );
- if ( $match ) {
+ $match = preg_match('#' . implode('|', $quoted_uas) . '#i', $_SERVER['HTTP_USER_AGENT']);
+ if ($match) {
return true;
}
}
- if ( $this->ip_access( $this->_conf[ self::O_GUEST_IPS ] ) ) {
+ if ($this->ip_access($this->_conf[self::O_GUEST_IPS])) {
return true;
}
@@ -140,11 +151,12 @@ public function always_guest() {
* @since 1.1.0
* @access public
*/
- public function ip_access( $ip_list ) {
- if ( ! $ip_list ) {
+ public function ip_access($ip_list)
+ {
+ if (!$ip_list) {
return false;
}
- if ( ! isset( self::$_ip ) ) {
+ if (!isset(self::$_ip)) {
self::$_ip = self::get_ip();
}
// $uip = explode('.', $_ip);
@@ -154,7 +166,7 @@ public function ip_access( $ip_list ) {
// if(count($ip) != 4) continue;
// for($i = 0; $i <= 3; $i++) if($ip[$i] == '*') $ip_list[$key][$i] = $uip[$i];
// }
- return in_array( self::$_ip, $ip_list );
+ return in_array(self::$_ip, $ip_list);
}
/**
@@ -165,24 +177,22 @@ public function ip_access( $ip_list ) {
* @access public
* @return string
*/
- public static function get_ip() {
+ public static function get_ip()
+ {
$_ip = '';
- if ( function_exists( 'apache_request_headers' ) ) {
+ if (function_exists('apache_request_headers')) {
$apache_headers = apache_request_headers();
- $_ip = ! empty( $apache_headers['True-Client-IP'] ) ? $apache_headers['True-Client-IP'] : false;
- if ( ! $_ip ) {
- $_ip = ! empty( $apache_headers['X-Forwarded-For'] ) ? $apache_headers['X-Forwarded-For'] : false;
- $_ip = explode( ',', $_ip );
- $_ip = $_ip[ 0 ];
+ $_ip = !empty($apache_headers['True-Client-IP']) ? $apache_headers['True-Client-IP'] : false;
+ if (!$_ip) {
+ $_ip = !empty($apache_headers['X-Forwarded-For']) ? $apache_headers['X-Forwarded-For'] : false;
+ $_ip = explode(',', $_ip);
+ $_ip = $_ip[0];
}
-
}
- if ( ! $_ip ) {
- $_ip = ! empty( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : false;
+ if (!$_ip) {
+ $_ip = !empty($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : false;
}
return $_ip;
}
-
-
-}
\ No newline at end of file
+}
diff --git a/lib/html-min.cls.php b/lib/html-min.cls.php
index e8fd4d781..1e11b78bb 100644
--- a/lib/html-min.cls.php
+++ b/lib/html-min.cls.php
@@ -17,6 +17,11 @@
class HTML_MIN
{
+ /**
+ * @var string
+ */
+ protected $_html = '';
+
/**
* @var boolean
*/
diff --git a/litespeed-cache.php b/litespeed-cache.php
index c6d12166d..65799190a 100644
--- a/litespeed-cache.php
+++ b/litespeed-cache.php
@@ -1,9 +1,10 @@
.
*/
-defined( 'WPINC' ) || exit;
+defined('WPINC') || exit();
-if ( defined( 'LSCWP_V' ) ) {
+if (defined('LSCWP_V')) {
return;
}
-! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '5.2.1' );
+!defined('LSCWP_V') && define('LSCWP_V', '6.1');
-! defined( 'LSCWP_CONTENT_DIR' ) && define( 'LSCWP_CONTENT_DIR', WP_CONTENT_DIR ) ;
-! defined( 'LSCWP_DIR' ) && define( 'LSCWP_DIR', __DIR__ . '/' ) ;// Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
-! defined( 'LSCWP_BASENAME' ) && define( 'LSCWP_BASENAME', 'litespeed-cache/litespeed-cache.php' ) ;//LSCWP_BASENAME='litespeed-cache/litespeed-cache.php'
+!defined('LSCWP_CONTENT_DIR') && define('LSCWP_CONTENT_DIR', WP_CONTENT_DIR);
+!defined('LSCWP_DIR') && define('LSCWP_DIR', __DIR__ . '/'); // Full absolute path '/var/www/html/***/wp-content/plugins/litespeed-cache/' or MU
+!defined('LSCWP_BASENAME') && define('LSCWP_BASENAME', 'litespeed-cache/litespeed-cache.php'); //LSCWP_BASENAME='litespeed-cache/litespeed-cache.php'
/**
* This needs to be before activation because admin-rules.class.php need const `LSCWP_CONTENT_FOLDER`
@@ -45,75 +46,77 @@
* @since 5.2 Auto correct protocol for CONTENT URL
*/
$WP_CONTENT_URL = WP_CONTENT_URL;
-$home_url = home_url( '/' );
-if ( substr( $WP_CONTENT_URL, 0, 5 ) == 'http:' && substr( $home_url, 0, 5 ) == 'https' ) $WP_CONTENT_URL = str_replace( 'http://', 'https://', $WP_CONTENT_URL );
-! defined( 'LSCWP_CONTENT_FOLDER' ) && define( 'LSCWP_CONTENT_FOLDER', str_replace( $home_url, '', $WP_CONTENT_URL ) ) ; // `wp-content`
-! defined( 'LSWCP_PLUGIN_URL' ) && define( 'LSWCP_PLUGIN_URL', plugin_dir_url( __FILE__ ) ) ;// Full URL path '//example.com/wp-content/plugins/litespeed-cache/'
+$home_url = home_url('/');
+if (substr($WP_CONTENT_URL, 0, 5) == 'http:' && substr($home_url, 0, 5) == 'https') {
+ $WP_CONTENT_URL = str_replace('http://', 'https://', $WP_CONTENT_URL);
+}
+!defined('LSCWP_CONTENT_FOLDER') && define('LSCWP_CONTENT_FOLDER', str_replace($home_url, '', $WP_CONTENT_URL)); // `wp-content`
+!defined('LSWCP_PLUGIN_URL') && define('LSWCP_PLUGIN_URL', plugin_dir_url(__FILE__)); // Full URL path '//example.com/wp-content/plugins/litespeed-cache/'
/**
* Static cache files consts
* @since 3.0
*/
-! defined( 'LITESPEED_STATIC_URL' ) && define( 'LITESPEED_STATIC_URL', $WP_CONTENT_URL . '/litespeed' ) ;// Full static cache folder URL '//example.com/wp-content/litespeed'
-! defined( 'LITESPEED_STATIC_DIR' ) && define( 'LITESPEED_STATIC_DIR', LSCWP_CONTENT_DIR . '/litespeed' ) ;// Full static cache folder path '/var/www/html/***/wp-content/litespeed'
+!defined('LITESPEED_STATIC_URL') && define('LITESPEED_STATIC_URL', $WP_CONTENT_URL . '/litespeed'); // Full static cache folder URL '//example.com/wp-content/litespeed'
+!defined('LITESPEED_STATIC_DIR') && define('LITESPEED_STATIC_DIR', LSCWP_CONTENT_DIR . '/litespeed'); // Full static cache folder path '/var/www/html/***/wp-content/litespeed'
-! defined( 'LITESPEED_TIME_OFFSET' ) && define( 'LITESPEED_TIME_OFFSET', get_option( 'gmt_offset' ) * 60 * 60 ) ;
+!defined('LITESPEED_TIME_OFFSET') && define('LITESPEED_TIME_OFFSET', get_option('gmt_offset') * 60 * 60);
// Placeholder for lazyload img
-! defined( 'LITESPEED_PLACEHOLDER' ) && define( 'LITESPEED_PLACEHOLDER', 'data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=' ) ;
+!defined('LITESPEED_PLACEHOLDER') && define('LITESPEED_PLACEHOLDER', 'data:image/gif;base64,R0lGODdhAQABAPAAAMPDwwAAACwAAAAAAQABAAACAkQBADs=');
// Auto register LiteSpeed classes
-require_once LSCWP_DIR . 'autoload.php' ;
+require_once LSCWP_DIR . 'autoload.php';
// Define CLI
-if ( ( defined( 'WP_CLI' ) && WP_CLI ) || PHP_SAPI == 'cli' ) {
- ! defined( 'LITESPEED_CLI' ) && define( 'LITESPEED_CLI', true );
+if ((defined('WP_CLI') && WP_CLI) || PHP_SAPI == 'cli') {
+ !defined('LITESPEED_CLI') && define('LITESPEED_CLI', true);
// Register CLI cmd
- if ( method_exists( 'WP_CLI', 'add_command' ) ) {
- WP_CLI::add_command( 'litespeed-option', 'LiteSpeed\CLI\Option' );
- WP_CLI::add_command( 'litespeed-purge', 'LiteSpeed\CLI\Purge' );
- WP_CLI::add_command( 'litespeed-online', 'LiteSpeed\CLI\Online' );
- WP_CLI::add_command( 'litespeed-image', 'LiteSpeed\CLI\Image' );
- WP_CLI::add_command( 'litespeed-debug', 'LiteSpeed\CLI\Debug' );
+ if (method_exists('WP_CLI', 'add_command')) {
+ WP_CLI::add_command('litespeed-option', 'LiteSpeed\CLI\Option');
+ WP_CLI::add_command('litespeed-purge', 'LiteSpeed\CLI\Purge');
+ WP_CLI::add_command('litespeed-online', 'LiteSpeed\CLI\Online');
+ WP_CLI::add_command('litespeed-image', 'LiteSpeed\CLI\Image');
+ WP_CLI::add_command('litespeed-debug', 'LiteSpeed\CLI\Debug');
+ WP_CLI::add_command('litespeed-presets', 'LiteSpeed\CLI\Presets');
+ WP_CLI::add_command('litespeed-crawler', 'LiteSpeed\CLI\Crawler');
}
}
// Server type
-if ( ! defined( 'LITESPEED_SERVER_TYPE' ) ) {
- if ( isset( $_SERVER['HTTP_X_LSCACHE'] ) && $_SERVER['HTTP_X_LSCACHE'] ) {
- define( 'LITESPEED_SERVER_TYPE', 'LITESPEED_SERVER_ADC' );
- }
- elseif ( isset( $_SERVER['LSWS_EDITION'] ) && strpos( $_SERVER['LSWS_EDITION'], 'Openlitespeed' ) === 0 ) {
- define( 'LITESPEED_SERVER_TYPE', 'LITESPEED_SERVER_OLS' );
- }
- elseif ( isset( $_SERVER['SERVER_SOFTWARE'] ) && $_SERVER['SERVER_SOFTWARE'] == 'LiteSpeed' ) {
- define( 'LITESPEED_SERVER_TYPE', 'LITESPEED_SERVER_ENT' );
- }
- else {
- define( 'LITESPEED_SERVER_TYPE', 'NONE' );
+if (!defined('LITESPEED_SERVER_TYPE')) {
+ if (isset($_SERVER['HTTP_X_LSCACHE']) && $_SERVER['HTTP_X_LSCACHE']) {
+ define('LITESPEED_SERVER_TYPE', 'LITESPEED_SERVER_ADC');
+ } elseif (isset($_SERVER['LSWS_EDITION']) && strpos($_SERVER['LSWS_EDITION'], 'Openlitespeed') === 0) {
+ define('LITESPEED_SERVER_TYPE', 'LITESPEED_SERVER_OLS');
+ } elseif (isset($_SERVER['SERVER_SOFTWARE']) && $_SERVER['SERVER_SOFTWARE'] == 'LiteSpeed') {
+ define('LITESPEED_SERVER_TYPE', 'LITESPEED_SERVER_ENT');
+ } else {
+ define('LITESPEED_SERVER_TYPE', 'NONE');
}
}
// Checks if caching is allowed via server variable
-if ( ! empty ( $_SERVER['X-LSCACHE'] ) || LITESPEED_SERVER_TYPE === 'LITESPEED_SERVER_ADC' || defined( 'LITESPEED_CLI' ) ) {
- ! defined( 'LITESPEED_ALLOWED' ) && define( 'LITESPEED_ALLOWED', true );
+if (!empty($_SERVER['X-LSCACHE']) || LITESPEED_SERVER_TYPE === 'LITESPEED_SERVER_ADC' || defined('LITESPEED_CLI')) {
+ !defined('LITESPEED_ALLOWED') && define('LITESPEED_ALLOWED', true);
}
// ESI const defination
-if ( ! defined( 'LSWCP_ESI_SUPPORT' ) ) {
- define( 'LSWCP_ESI_SUPPORT', LITESPEED_SERVER_TYPE !== 'LITESPEED_SERVER_OLS' ? true : false );
+if (!defined('LSWCP_ESI_SUPPORT')) {
+ define('LSWCP_ESI_SUPPORT', LITESPEED_SERVER_TYPE !== 'LITESPEED_SERVER_OLS' ? true : false);
}
-if ( ! defined( 'LSWCP_TAG_PREFIX' ) ) {
- define( 'LSWCP_TAG_PREFIX', substr( md5( LSCWP_DIR ), -3 ) );
+if (!defined('LSWCP_TAG_PREFIX')) {
+ define('LSWCP_TAG_PREFIX', substr(md5(LSCWP_DIR), -3));
}
/**
* Handle exception
*/
-if ( ! function_exists( 'litespeed_exception_handler' ) ) {
- function litespeed_exception_handler( $errno, $errstr, $errfile, $errline ) {
+if (!function_exists('litespeed_exception_handler')) {
+ function litespeed_exception_handler($errno, $errstr, $errfile, $errline)
+ {
throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
}
}
@@ -122,40 +125,42 @@ function litespeed_exception_handler( $errno, $errstr, $errfile, $errline ) {
* Overwride the WP nonce funcs outside of LiteSpeed namespace
* @since 3.0
*/
-if ( ! function_exists( 'litespeed_define_nonce_func' ) ) {
- function litespeed_define_nonce_func() {
+if (!function_exists('litespeed_define_nonce_func')) {
+ function litespeed_define_nonce_func()
+ {
/**
* If the nonce is in none_actions filter, convert it to ESI
*/
- function wp_create_nonce( $action = -1 ) {
- if ( ! defined( 'LITESPEED_DISABLE_ALL' ) ) {
- $control = \LiteSpeed\ESI::cls()->is_nonce_action( $action );
- if ( $control !== null ) {
+ function wp_create_nonce($action = -1)
+ {
+ if (!defined('LITESPEED_DISABLE_ALL')) {
+ $control = \LiteSpeed\ESI::cls()->is_nonce_action($action);
+ if ($control !== null) {
$params = array(
- 'action' => $action,
+ 'action' => $action,
);
- return \LiteSpeed\ESI::cls()->sub_esi_block( 'nonce', 'wp_create_nonce ' . $action, $params, $control, true, true, true );
+ return \LiteSpeed\ESI::cls()->sub_esi_block('nonce', 'wp_create_nonce ' . $action, $params, $control, true, true, true);
}
}
- return wp_create_nonce_litespeed_esi( $action );
-
+ return wp_create_nonce_litespeed_esi($action);
}
/**
* Ori WP wp_create_nonce
*/
- function wp_create_nonce_litespeed_esi( $action = -1 ) {
- $uid = get_current_user_id();
- if ( ! $uid ) {
+ function wp_create_nonce_litespeed_esi($action = -1)
+ {
+ $uid = get_current_user_id();
+ if (!$uid) {
/** This filter is documented in wp-includes/pluggable.php */
- $uid = apply_filters( 'nonce_user_logged_out', $uid, $action );
+ $uid = apply_filters('nonce_user_logged_out', $uid, $action);
}
$token = wp_get_session_token();
- $i = wp_nonce_tick();
+ $i = wp_nonce_tick();
- return substr( wp_hash( $i . '|' . $action . '|' . $uid . '|' . $token, 'nonce' ), -12, 10 );
+ return substr(wp_hash($i . '|' . $action . '|' . $uid . '|' . $token, 'nonce'), -12, 10);
}
}
}
@@ -165,15 +170,16 @@ function wp_create_nonce_litespeed_esi( $action = -1 ) {
*
* @since 1.0.0
*/
-if ( ! function_exists( 'run_litespeed_cache' ) ) {
- function run_litespeed_cache() {
+if (!function_exists('run_litespeed_cache')) {
+ function run_litespeed_cache()
+ {
//Check minimum PHP requirements, which is 5.3 at the moment.
- if ( version_compare( PHP_VERSION, '5.3.0', '<' ) ) {
+ if (version_compare(PHP_VERSION, '5.3.0', '<')) {
return;
}
//Check minimum WP requirements, which is 4.0 at the moment.
- if ( version_compare( $GLOBALS['wp_version'], '4.0', '<' ) ) {
+ if (version_compare($GLOBALS['wp_version'], '4.0', '<')) {
return;
}
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 000000000..3d9d5096e
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,105 @@
+{
+ "name": "litespeed-cache",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "litespeed-cache",
+ "license": "GPLv3",
+ "devDependencies": {
+ "@prettier/plugin-php": "^0.21.0",
+ "prettier": "^3.0.3"
+ }
+ },
+ "node_modules/@prettier/plugin-php": {
+ "version": "0.21.0",
+ "resolved": "https://registry.npmjs.org/@prettier/plugin-php/-/plugin-php-0.21.0.tgz",
+ "integrity": "sha512-vWC6HIUUfhvl/7F5IxVQ0ItGB/7ZY+jDlX7KsTqvfKMODW/zvzj8r1Ab4harS22+O3xxHykVVd5jvylmxMMctg==",
+ "dev": true,
+ "dependencies": {
+ "linguist-languages": "^7.21.0",
+ "mem": "^9.0.2",
+ "php-parser": "^3.1.5"
+ },
+ "peerDependencies": {
+ "prettier": "^3.0.0"
+ }
+ },
+ "node_modules/linguist-languages": {
+ "version": "7.27.0",
+ "resolved": "https://registry.npmjs.org/linguist-languages/-/linguist-languages-7.27.0.tgz",
+ "integrity": "sha512-Wzx/22c5Jsv2ag+uKy+ITanGA5hzvBZngrNGDXLTC7ZjGM6FLCYGgomauTkxNJeP9of353OM0pWqngYA180xgw==",
+ "dev": true
+ },
+ "node_modules/map-age-cleaner": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
+ "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
+ "dev": true,
+ "dependencies": {
+ "p-defer": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/mem": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz",
+ "integrity": "sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==",
+ "dev": true,
+ "dependencies": {
+ "map-age-cleaner": "^0.1.3",
+ "mimic-fn": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=12.20"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/mem?sponsor=1"
+ }
+ },
+ "node_modules/mimic-fn": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
+ "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-defer": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
+ "integrity": "sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/php-parser": {
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/php-parser/-/php-parser-3.1.5.tgz",
+ "integrity": "sha512-jEY2DcbgCm5aclzBdfW86GM6VEIWcSlhTBSHN1qhJguVePlYe28GhwS0yoeLYXpM2K8y6wzLwrbq814n2PHSoQ==",
+ "dev": true
+ },
+ "node_modules/prettier": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
+ "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==",
+ "dev": true,
+ "bin": {
+ "prettier": "bin/prettier.cjs"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 000000000..85ef1dede
--- /dev/null
+++ b/package.json
@@ -0,0 +1,13 @@
+{
+ "name": "litespeed-cache",
+ "description": "High-performance page caching and site optimization from LiteSpeed",
+ "license": "GPLv3",
+ "scripts": {
+ "format": "prettier --write . '**/*.php'",
+ "format-check": "prettier --check . '**/*.php'"
+ },
+ "devDependencies": {
+ "@prettier/plugin-php": "^0.21.0",
+ "prettier": "^3.0.3"
+ }
+}
diff --git a/readme.txt b/readme.txt
index 8ad5a59a8..efcd2cb5b 100644
--- a/readme.txt
+++ b/readme.txt
@@ -2,8 +2,8 @@
Contributors: LiteSpeedTech
Tags: caching, optimize, performance, pagespeed, core web vitals, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
Requires at least: 4.0
-Tested up to: 6.0.2
-Stable tag: 5.2.1
+Tested up to: 6.4.3
+Stable tag: 6.1
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl.html
@@ -250,1910 +250,70 @@ The vast majority of plugins and themes are compatible with LiteSpeed Cache. The
== Changelog ==
-= 5.2.1 - Sep 7 2022 =
-* 🐞**Core** Fixed a fatal error that occurred when uninstalling. (#894556 Hostinger)
-* **Dash** Show partner info on the dashboard for partner-tier QC accounts.
-* **UCSS** Auto-purge UCSS on post update. (Ankit)
-* 🕸️**Crawler** Respect the `LITESPEED_CRAWLER_DISABLE_BLOCKLIST` constant for unexpected results too. (Abe)
-
-= 5.2 - Aug 17 2022 =
-* 🌱**UCSS** Added UCSS message queue to improve service quality and reliability
-* 🐞**VPI** Fixed conflict w/ image lazyload; used HTML before image lazyload to avoid invalid `data:base64` results.
-* **VPI** Changed VPI Cron default setting to OFF.
-* **VPI** Automatically resend requests when VPI result contains invalid `data:` image value.
-* **Conf** Fixed an issue with URI Excludes, where paths using both ^ and $ were not correctly excluded (Eric/Abe)
-* **Conf** Auto corrected `WP_CONTENT_URL` protocol if it was explicitly set to `http://`.
-* **Cloud** No longer sync the configuration to QUIC.cloud if configuration is unchanged.
-* **Cloud** Appended home_url value into synced configuration data for wp-content folder path correction.
-* 🕸️**Crawler** Improved compatibility with server `open_basedir` PHP setting limit when detecting load before crawling. (Tom Robak/mmieszalski)
-
-= 5.1 - Aug 1 2022 =
-* 🌱**Toolbox** Debug log can now show Purge/Crawler logs as well. (Tynan)
-* **UCSS** Prepared for future message queue.
-* **UCSS** Moved UCSS class to its own file.
-* **3rd** Added 3rd-party support for WC PDF Product Vouchers. (Tynan)
-* **Core** Fixed potential PHP warning when saving summary data. (Sarah Richardson)
-* **Purge** Purge can now clear the summary correctly. (Kevin)
-* **VPI** Added `queue_k` to API notification.
-
-= 5.0.1 - Jul 27 2022 =
-* 🐞**Cloud** Fixed a potential PHP error that could occur with the cloud service summary. (Bruno Cantuaria)
-* **3rd** Added Autoptimize back to compatibility list.
-
-= 5.0.0.1 - Jul 26 2022 =
-* 🔥🐞**Cloud** Fixed an issue with the cloud request timestamp update which causes a usage sync failure. (great thanks to Kevin)
-
-= 5.0 - Jul 25 2022 =
-* 🌱**VPI** Added Viewport Images feature to LiteSpeed Options metabox on Post Edit page.
-* 🌱**CDN** Added Auto CDN Setup feature for simple QUIC.cloud CDN setup. (Kevin)
-* 🌱**Page Optimize** Automatically cache remote CSS/JS files when fetching for optimization (Lauren)
-* 🌱**Cache** Added LiteSpeed Options for page-level cache control on Post Edit page. (denisgomesfranco)
-* 🌱**Cloud** Auto Alias feature.
-* 🌱**Debug** Added `Debug String Excludes` option. (Hanna)
-* 🌱**UCSS** Added `Purge this page - UCSS` option to Admin Bar dropdown menu. (Ankit)
-* 🌱**Guest** Added `litespeed_guest_off=1` URL query string parameter to bypass Guest Mode. (cbdfactum)
-* 🐞**Page Optimize** Fixed an issue where CSS anchors could be wrongly converted to a full path when minifying. (Tynan)
-* **Page Optimize** Bypass CCSS/UCSS generation when a self-crawled CSS resource returns a 404 code. (Abe)
-* **Object** Allow `LSCWP_OBJECT_CACHE` predefined to turn off Object Cache. (knutsp)
-* **Data** Fixed an issue where empty version tags in the database repeatedly toggled the upgrade banner and reset settings to default.
-* **Purge** Fixed an issue where the site's index page could be purged upon deletion of an unviewable post. (Kevin)
-* **Toolbox** Added `View site before optimization` button under `Debug` tab. (Ryan D)
-* **Admin** Switch to using the `DONOTCACHEPAGE` constant to indicated WP-Admin pages are not cacheable.
-* **Admin** Moved no-cache header to very beginning to avoid caching unexpected exits.
-* **Cloud** Added message queue service for VPI. (Abe)
-* **Cloud** Bypassed 503 error nodes from node redetection process. (Abe)
-* **Cloud** Fixed a failure to detect `out_of_quota`. (Lauren)
-* **Cloud** Added ability to display dismissable banners generated by QUIC.cloud.
-* 🕸️**Crawler** Added realtime load detection before crawl.
-* 🕸️**Crawler** Adjusted crawler behavior for Divi pages to allow for Divi's CCSS generation process. (miketemby)
-* 🕸️**API** PHP constant `LITESPEED_CRAWLER_DISABLE_BLOCKLIST` and filter `litespeed_crawler_disable_blocklist` to disable blocklist. (Tobolo)
-* **CDN** Automatically add a trailing slash to `CDN URL` and `Original URLs` if user didn't provide one. (Lucas)
-* **Cache** When a URL redirects to a URL with a query string, consider these as different for caching purposes. (Shivam)
-* **Media** Added ability to disable lazyload from the LiteSpeed Options metabox on Post Edit page.
-* **Media** Added new default values to `WebP Attribute to Replace` setting for WPBakery and Slider Revolution. (JibsouX)
-* **Image Optimize** Dropped redundant `Page Speed` user agent when serving WebP images. (serpentdriver)
-* **GUI** Fixed an issue where manually dismissable admin messages were instead being treated as one-time messages. (Tynan Beatty)
-* **GUI** Fixed an issue where subsequent admin alerts would overwrite existing alerts in the queue. (Kevin/Tynan)
-* **GUI** Updated time offset in log. (Ruikai #PR444 #PR445)
-* **GUI** Added `litespeed_media_ignore_remote_missing_sizes` API description.
-* **CCSS** Fixed an issue where CCSS was unexpectedly bypassed if `CSS Combine` was OFF and `UCSS Inline` was ON. (Ruikai)
-* **Debug** Added resposne headers to debug log. (Kevin)
-
-= 4.6 - Mar 29 2022 =
-* **Page Optimize** Improved compatibility for JS Delay.
-* 🐞**Page Optimize** Fixed an issue for network subsites that occurred when only CSS/JS Minify are enabled.
-* **Localization** Added query string compatibility for Resource URLs.
-* **Vary** Fixed a potential PHP warning when server variable `REQUEST_METHOD` is not detected.
-* **Cache** Guest Mode now respects Cache Excludes settings.
-* **GUI** Added warning notice when enabling `Localize Resources` feature; each localized JS resource requires thorough testing!
-* **GUI** Fixed a PHP Deprecated warning that occurred with the Mobile Cache User Agent setting on PHP v8.1+. (jrmora)
-* **Conf** Removed Google related scripts from default `Localization Files` value.
-* **Media** WordPress core Lazy Load feature is now automatically disabled when LiteSpeed Lazy Load Images option is enabled. (VR51 #Issue440)
-* 🐞**API** Filter `litespeed_ucss_per_pagetype` for UCSS now also applies to CSS Combine to avoid UCSS failure. (Ankit)
-* **API** Added a filter `litespeed_media_ignore_remote_missing_sizes` to disable auto detection for remote images that are missing dimensions. (Lucas)
-
-= 4.5.0.1 - Feb 24 2022 =
-* 🔥🐞**Media** Fixed an issue where lazy-loaded images would disappear when using custom CSS image loading effects.
-
-= 4.5 - Feb 23 2022 =
-* 🌱**Page Optimize** Localization is back.
-* **Guest** Fixed organic traffic issue as different browsers may fail to set `document.referrer`.
-* **Image Optimize** Improved wp_postmeta table compatibility when gathering images. (Thanks to Thomas Stroemme)
-* 🐞**Page Optimize** Fixed a potential CSS/JS 404 issue for existing records that have been marked as expired.
-* **ESI** `LITESPEED_ESI_OFF` now affects `litespeed_esi_url` API filter too.
-* **Guest** Added a check to determine if Guest Mode is blocked by a third-party, and display warning if it is (Ruikai)
-* **Guest** To support WP sites with multiple domains, Guest Mode detection URL no longer uses domain.
-* **Report** Network now shows Toolbox page when having a large number of subsites.
-* **DB Optimize** Reduced default subsites count from 10 to 3 under Network Admin -> DB Optimize page to avoid timeout.
-* **Cloud** Fixed potential `lack_of_token` error when requesting domain key for cases where local summary value was not historically included in the array.
-* **Cloud** Fixed a PHP fatal error that occurred when encountering a frequency issue under CLI. (Dean Taylor #Issue410)
-* **Avatar** Force gravatar cache refresh in browsers and on CDN (rafaucau #PR430)
-* **API** New filter `litespeed_purge_ucss` to purge a single page UCSS. (#376681)
-* **API** New filter `litespeed_ucss_per_pagetype` for UCSS per page type generation. (Ankit)
-* **GUI** Replaced some GUI text and settings with more inclusive language (kebbet #PR437 #PR435)
-* **3rd** Excluded `WP Statistics` from inline JS optimize. (Ryan D)
-* **3rd** Added API filter `litespeed_3rd_aelia_cookies` for Aelia CurrencySwitcher.
-* **Media** Updated image lazyload library to 17.5.0.
-
-= 4.4.7 - Jan 11 2022 =
-* **Page Optimize** Dropped `Inline Lazy Load Images Library` option. Now will always inline lazyload library. (Ankit)
-* **3rd** Prevented JavaScript files from being appended to Rank Math SEO sitemap.
-* **Purge** Dropped default stale purge when purging a post.
-* **Cloud** Dropped unused API calls.
-* **Cloud** Dropped redundant IP validation in API calls.
-
-= 4.4.6 - Dec 27 2022 =
-* **Guest** Restored `document.referrer` for organic traffic purposes when Guest Mode is enabled. (michelefns)
-* **Image Optimize** Fixed a potential PHP notice when uploading images in WP w/ PHP7.4+. (titsmaker)
-* **ESI** Fixed an issue where ESI settings were not updated on customized widgets(#422 Abe)
-* **3rd** Reverted ESI Adminbar change on Elementor front pages for backward compatibility (#423 Abe)
-* **3rd** Fixed an issue where disabling ESI potential caused a PHP warning when using `Perfmatters`. (Jeffrey Zhang)
-* **Misc** Check whether HTTP_REFERER is set or not before using it in Router class. (#425 Abe)
-
-= 4.4.5 - Dec 1 2021 =
-* **Data** Fixed potential PHP notice when generating CSS/JS optimized files w/ PHP v7.4+. (Sarah Richardson/silencedgd/slr1979)
-* **API** Added `LITESPEED_ESI_OFF` constant to disable ESI, when defined before the WP `init` hook.
-* **API** Added `LSCWP_DEBUG_PATH` constant to specify debug log path. (khanh-nt)
-* 🐞**GUI** Fixed an issue where admin messages were not displayed. (Daniel McD)
-* **CDN** Used WP remote function to communicate w/ Cloudflare per WP guidance.
-* **3rd** Added compatibility for Perfmatters plugin's script manager (#417 Abe)
-* **3rd** Added compatibility for Elementor's Editor button when ESI is on (#418 Abe)
-
-= 4.4.4 - Nov 23 2021 =
-* **Page Optimize** Delay deletion of outdated CSS/JS files for a default of 20 days to avoid 404 errors with cached search engine copies.
-* **Cache** When caching, no longer send a purge request for CSS/JS removal to avoid cache engine conflicts.
-* 🐞**Core** Optimized SQL queries while autoloading if expected options are missing; reduced by 7 and 3 queries on backend and frontend respectively. (#396425 Jackson)
-* **Page Optimize** Fixed a 404 issue that occured when upgrading the plugin manually, with a package upload or through the plugin manager. (Tobolo/Małgorzata/Abe)
-* **API** Added `litespeed_ccss_url` and `litespeed_ucss_url` API to manipulate the request URL for CCSS and UCSS.
-* **REST** Fixed a potential warning when detecting cacheable status on REST call. (rafaucau)
-* **OLS** Fixed an issue where the `COOKIEHASH` constant was undefined when used with OpenLiteSpeed as an MU plugin or with network activation.
-* **3rd** Sanitized POST data for nextgengallery.
-* **Cloud** Sanitized GET data when linking to QUIC.cloud. (#591762 WPScan)
-
-= 4.4.3 - Oct 13 2021 =
-* 🐞**Media** Fixed an issue where WebP is served erroneously under Guest Mode on older versions of Safari. (hash73)
-* 🐞**Media** Reverted regex change to fix `Lazy Load Image Parent Class Name Excludes` failure. (thpstock)
-* **Purge** Disabled `Purge Delay` in the optimization process by default.
-* **Conf** Dropped `.htaccess Path Settings` options for security concern. (WP)
-* **Conf** Dropped `CSS HTTP/2 Push`/`JS HTTP/2 Push` options. (Kevin)
-* **Conf** Set `Guest Optimization` default to OFF.
-* **Conf** Set `CCSS Per URL` default to OFF to avoid consuming more quota than intended after upgrade to v4. (n111)
-* **Object** Fixed an issue with Object Cache warnings during upgrade, when Guest Mode is enabled.
-* ☁️**Cloud** Fixed an issue with PHP notices when inquiring about quota usage for a service not currently in use.
-* **GUI** Added GO detail warning. (n111)
-* **GUI** Moved "quota wil be still in use" warning from Guest Mode to Guest Optimization section.
-* **API** Added `LITESPEED_CFG_HTACCESS` PHP Constant to specify .htaccess path.
-* **API** Added `litespeed_qs_forbidden` hook to bypass `?LSCWP_CTRL=` query string. (minhduc)
-* **API** Added `litespeed_delay_purge` hook to delay the following Purge header until the next request.
-* **API** Added `litespeed_wpconfig_readonly` hook to disable `WP_CACHE` constant update based on the wp-config.php file. (#633545)
-
-= 4.4.2 - Sep 23 2021 =
-* **Purge** In order to clear pages containing 404 CSS/JS, the purge header will always be sent even in cases where purge must be delayed.
-* 🐞**Purge** Fixed a potential PHP warning caused when generating different optimized filenames.
-* **Cron** Dropped unnecessary HTML response in cron which sometimes resulted in wp-cron report email. (Gilles)
-* **Page Optimize** Purge caused by CSS/JS file deletion will now be silent.
-* **Page Optimize** Fixed an issue where the homepage failed to purge when addressing the 404 CSS/JS issue.
-* **Avatar** Fixed potential localized Avatar folder creation warning. (mattk0220/josebab)
-* **API** Added filter `litespeed_optm_html_after_head` to move all optimized code(UCSS/CCSS/Combined CSS/Combined JS) to be right before the `` tag. (ducpl/Kris Regmi)
-* **Debug** Under debug mode, cache/purge tags will be plaintext.
-
-= 4.4.1 - Sep 16 2021 =
-* 🐞**ESI** Fixed ESI failure on non-cached pages caused by `DONOTCACHEPAGE` constant.
-* 🐞**Page Optimize** Fixed an issue where the minified CSS/JS file failed to update when the file was changed. (ceap80)
-* 🐞**Page Optimize** Fixed an issue where the combined CSS/JS file randomly returned a 404 error when visiting the same URL with different query strings. (Abe)
-* **API** Added `litespeed_const_DONOTCACHEPAGE` hook to control the cache-or-not result of the `DONOTCACHEPAGE` constant.
-
-= 4.4 - Sep 8 2021 =
-* 🌱**Crawler** Added the ability to enable or disable specific crawlers. (⭐ Contributed by Astrid Wang #PR390)
-* 🌱**UCSS** Added `UCSS Inline` option. (Ankit).
-* 🌱**UCSS** Added `UCSS URI Excludes` option. (RC Verma).
-* 🐞**Page Optimize** Fixed an issue where combined CSS/JS files would potentially return 404 errors after a Purge All. (Special thanks to Abe & Ruikai)
-* **Page Optimize** Minimized the potential for 404 errors by query string when Purging All.
-* **Page Optimize** Dropped redundant query strings for minified CSS/JS files.
-* **Conf** Ugrade configuration safely to avoid the issue of new functions not being found in old codebase.
-* **Conf** Configuration upgrade process now adds a notification to admin pages and disables configuration save until upgrade is complete. (Lisa)
-* **JS** Fixed an issue where JS Defer caused a `litespeed_var_1_ is not defined` error when enabled w/ ESI options. (Tobolo)
-* 🐞**JS** Fixed an issue where `JS Delay` doesn't work for combined JS when `JS Combine` is enabled. (Special thanks to Joshua & Ankit)
-* **JS** `JS Delay` now will continue loading JS, even if there is an error in the current JS loading process.
-* 🐞**CCSS** If CCSS fails to generate, Load CSS Asynchronously will now be disabled. (Stars #54074166)
-* 🐞**UCSS** If UCSS generation fails the generated error will no longer be served inside the file. (Ryan D)
-* **Log** Updated the Debug log to use less code for prefix.
-* **3rd** Always respect `DONOTCACHEPAGE` constant defination to fix DIVI dynamic css calculation process.
-
-= 4.3 - Aug 16 2021 =
-* **UCSS** Separated UCSS Purge from CCSS Purge. (⭐ Contributed by Alice Tang #PR388)
-* 🐞**Cloud** Fixed an issue where CCSS/UCSS quota data failed to update locally.
-* **Cloud** Added server load as a factor when detecting node availability.
-* **Cloud** Improved the speed of checking daily quota and showing the related error message.
-* **Cloud** Added ability to re-detect node availability if the current node is responding w/ a heavy load code.
-* **Cloud** CCSS/UCSS/LQIP queue now exits immediately when quota is depleted.
-* **Cloud** Replaced separate `d/regionnodes` with a single `d/nodes` in the node list API for image optimization.
-* **LQIP** Fixed an issue with LQIP network compatibility. (⭐ Contributed by Alice Tang #PR387)
-* **GUEST** JS no longer preloads for Guest Optimization. (Ankit)
-* 🐞**Data** Fixed an issue where deleting the `cssjs` data folder causes a failure in the upgrade process. (Joshua #PR391)
-* **GUI** Fixed a potential dashboard PHP warning when no queue existed. (jrmora)
-* **GUI** Added daily quota on dashboard.
-* **GUI** Added downgrade warning to Toolbox -> Beta Test.
-* **GUI** Tuned `.litespeed-desc` class to full width in CSS.
-* **Conf** `Preserve EXIF/XMP data` now defaults to ON due to copyright concerns. (Tobolo)
-* 🐞**3rd** Fixed a PHP warning when using Google AMP w/ /amp as structure. (thanhstran98)
-
-= 4.2 - Jul 29 2021 =
-* **Cloud** Auto redirect to a new node if the current node is not available anymore.
-* **Cloud** Combined CCSS/UCSS to sub services of Page Optimization.
-* **Cloud** Added a daily quota rate limit to help mitigate the heavy service load at the beginning of the month.
-* **Cloud** Cached the node IP list in order to speed up security check. (Lucas)
-* 🐞**GUEST** Fixed an issue where Guest Mode remained enabled even when the UA setting is empty. (Stars)
-* **GUEST** Guest Mode will no longer cache POST requests.
-* **UCSS** Purging CSS/JS now purges the UCSS queue as well, to avoid failure when generating UCSS.
-* **UCSS** Separated service entry `UCSS` from `CCSS`.
-* **CCSS** Simplified `load_queue/save_queue/build_filepath_prefix` functions. (⭐ Contributed by Alice Tang #PR373)
-* **CCSS** If CCSS request fails, details are now saved in the CSS file.
-* **CCSS** Renamed CCSS ID in inline HTML from `litespeed-optm-css-rules` to `litespeed-ccss`. (Alice)
-* **Page Optimize** CCSS/UCSS now supports Cloud queue/notify for asynchronous generation.
-* **Page Optimize** Simplified CCSS/UCSS generation function.
-* **Page Optimize** Added the ability to cancel CCSS/UCSS Cloud requests.
-* **Page Optimize** Unnecessary quesry strings will now be dropped from CSS/JS combined files.
-* **Crawler** Reset position now resets crawler running status too.
-* **REST** Cloud request to REST will now detect whether an IP in in the Cloud IP list for security reasons.
-* **Object** Enhanced Object Cache compatibility for `CONF_FILE` constant detection.
-* **API** Added shorter alias `litespeed_tag` and other similar aliases for Cache Tag API.
-* **API** Renamed `LITESPEED_BYPASS_OPTM` to `LITESPEED_NO_OPTM` for Page Optimization.
-* **Toolbox** Dropped v3.6.4- versions in Beta Test as they will cause a fatal error in downgrade.
-* **GUI** Added shortcut links to each section on the Dashboard.
-* **GUI** Added UCSS whitelist usage description. (wyb)
-* **GUI** Showed the default recommended values for Guest Mode UA/IPs.
-* **3rd** Fixed AMP plugin compatibility. (⭐ Contributed by Alice Tang #PR368)
-* **3rd** Bypassed all page optimization including CDN/WebP for AMP pages.
-* **3rd** Improved compatibility with All in One SEO plugin sitemap. (arnaudbroes/flschaves #Issue372)
-* **3rd** Added wsform nonce. (#365 cstrouse)
-* **3rd** Added Easy Digital Download (EDD) & WP Menu Cart nonce. (#PR366 AkramiPro)
-* **3rd** Improved compatibility w/ Restrict Content Pro. (Abe #PR370)
-* **3rd** Improved compatibility w/ Gravity Forms. (Ruikai #371)
-
-= 4.1 - Jun 25 2021 =
-* 🌱**UCSS/CCSS/LQIP** Moved queue storage to file system from database wp-options table to lessen the IO load. (#633504)
-* 🌱**3rd** Added an option to disable ESI for the WooCommerce Cart. (#358 Anna Feng/Astrid Wang)
-* **ESI** Fixed an ESI nonce issue introduced in v4.0. (Andrew Choi)
-* **Object** Used new `.litespeed_conf.dat` instead of `.object-cache.ini` for object cache configuration storage.
-* **Conf** Now updating related files after plugin upgrade and not just after activation.
-* 🌱**Guest** Added a Guest Mode JS Excludes option. (Ankit/Mamac/Rcverma)
-* **Guest** Guest Mode now uses a lightweight script to update guest vary for reduced server load.
-* **Guest** Guest Mode now adds missing image dimensions.
-* **Guest** Guest vary will no longer update if there's already a vary in place to address the infinite loop caused by CloudFlare's incorrect cache control setting for PHP.
-* **Guest** Guest vary update request will no longer be sent if `lscache_vary` is already set.
-* **Guest** Added a Configurable Guest Mode UA/IP under the Tuning tab in the General menu.
-* **Guest** Guest Mode now allows cron to be hooked, even when UCSS/CCSS options are off. (#338437 Stars)
-* **Guest** Simplified the vary generation process under Guest Mode.
-* **Guest** Added a Guest Mode HTML comment for easier debugging. (Ruikai)
-* **Guest** Guest vary update ajax now bypasses potential POST cache.
-* **CCSS** Added back the options `Separate CCSS Cache Post Types` and `Separate CCSS Cache URIs`. (Joshua/Ankit)
-* **CCSS** CCSS/UCSS queue is now limited to a maximum of 500 entries.
-* **Control** The cache control constant `LSCACHE_NO_CACHE` will now have a higher priority than the Forced Public Cache setting.
-* **Crawler** The Crawler can now crawl Guest Mode pages.
-* **Crawler** Fixed a potential XSS vulnerability in the Crawler settings. (#927355)
-* **Crawler** The Crawler now supports a cookie value of `_null`. (Tobolo)
-* **Media** Updated the default value for the Responsive Placeholder SVG to be transparent.
-* **Media** WebP images in the background may now be served in Guest Mode.
-* **Media** WebP images in CSS may now be bypassed if the requesting Guest Mode client doesn't support WebP.
-* **Media** Fixed empty default image placeholder under Guest Mode.
-* 🐞**Image Optimize** Changed the missing `$_POST` to `$post_data` so the database status is properly updated. (#345 Lucas)
-* **Import** Export file is now readable to allow importing of partial configurations. (Ryan D/Joshua)
-* **Page Optimize** Fixed W3 validator errors in Guest Mode. (#61393817)
-* **3rd** A fatal WooCommerce error is no longer triggered by a custom theme reusing a previous LSCWP cache detection tag.
-* **3rd** AMP may now bypass Guest Mode automatically.
-* **Localize** Dropped the `Localize Resources` option as Guest Mode is a sufficient replacement. (Note: Due to user feedback during the development period, we have decided to reinstate this option in a future version.)
-* **Cloud** Changed the WP API url.
-* **Lang** Corrected a missing language folder.
-* **GUI** Added a CCSS/UCSS loading page visualization. (⭐ Contributed by Astrid Wang & Anna Feng #PR360)
-* **GUI** Added a warning to indicate when Guest Mode CCSS/UCSS quota is in use. (Contributed by Astrid Wang & Anna Feng #PR361)
-* **GUI** Added a `litespeed-info` text color. (Astrid Wang)
-* **GUI** Implemented various UI/UX improvements. (Joshua/Lisa)
-* **GUI** Duplicate cloud service messages with the same content will only display once now. (Marc Dahl)
-* **GUI** Added a WebP replacement warning for Guest Mode Optimization if WebP replacement is off.
-* **Misc** Dropped `wp_assets` from distribution to reduce the package size. (lowwebtech)
-* **Misc** Increased the new version and score detection intervals.
-* **Misc** Optimized WP Assets images. (#352 lowwebtech)
-* **Debug** Dropped the redundant error_log debug info.
-
-= 4.0 - Apr 30 2021 =
-* 🌱🌱🌱**Guest** Introduced `Guest Mode` for instantly cacheable content on the first visit.
-* 🌱**UCSS** Added a new service: `Unique CSS`, to drop unused CSS from elements from combined CSS
-* 🌱**CCSS** Added `HTML Lazyload` option. (Ankit)
-* 🌱**CCSS** Added `CCSS Per URL` option to allow Critical CSS to be generated for each page instead of for each Post Type.
-* 🌱**Media** Added `Add Missing Sizes` setting for improving Cumulative Layout Shift. (Fahim)
-* 🌱**JS** Switched to new JS minification library for better compression and compatibility w/ template literals. (LuminSol)
-* **Media** WebP may now be replaced in CSS.
-* **Media** Can now drop image tags in noscript to avoid lazyload. (Abe #314 /mattthomas-photography)
-* **Media** Bypass optimization if a page is not cacheable.
-* **Image Optimize** Auto hook to `wp_update_attachment_metadata` to automate image gathering process, and to handle the new thumbnail generation after images are uploaded. (smerriman).
-* **Image Optimize** Repeated image thumbnails won't be gathered anymore.
-* **Image Optimize** Simplified the rescan/gather/upload_hook for existing image detection.
-* **Image Optimize** Fixed the duplicated optimize size records in the postmeta table. (Abe #315)
-* **Image Optimize** Allow either JSON POST request or normal form request in `notify_img`. (Lucas #313)
-* **Image Optimize** Optimized SQL query for better efficiency. (lucas/Lauren)
-* **Image Optimize** Fixed issue where rescan mass created duplicate images. (#954399)
-* **Image Optimize** Image optimization pie will not show 100% anymore if there is still a small amount in the unfinished queue.
-* **Image Optimize** WebP generation defaults to ON for Guest Mode.
-* **Image Optimize** `Priority Line` package now can have smaller request interval.
-* **ESI** Disable ESI when page is not cacheable. (titsmaker)
-* **ESI** Fixed an issue where Divi was disabling all in edit mode, but couldn't disable ESI. (Abe)
-* **ESI** ESI init moved under `init` hook from `plugin_loaded` hook.
-* **CDN** Add basic support for CloudFlare API Tokens (Abe #320)
-* **CSS** Simplified `Font Display Optimization` option.
-* **CSS** Fixed manual cron timeout issue. (jesse Distad)
-* **CSS** Inline CSS may now use `data-no-optimize` to be excluded from optimization. (popaionut)
-* **JS** Combined `Load JS Defer` and `Load Inline JS Defer` options.
-* **JS** Forced async to defer.
-* **JS** Moved Google Analytics JS from constant default to setting default for removal.
-* **JS** Fixed potential JS parsing issue caused by JS src being changed to data-src by other plugins. (ankit)
-* **JS** Excluded spotlight from JS optimize. (tobolo)
-* **CCSS** Fixed CCSS/UCSS manual cron timeout issue.
-* **CCSS** Only 10 items will be kept for CCSS history.
-* **CCSS** The appearance of CCSS Purge in the topbar menu will be determined by the existance of CCSS cache, and not the setting only.
-* **CCSS** To avoid stuck queues when the current request keeps failing, the CCSS queue will always drop once requested.
-* **CCSS** CCSS will no longer hide adminbar.
-* **CCSS** CCSS may now be separate for network subsites. (Joshua)
-* **CCSS** Gave CCSS a unique filename per URL per user role per subsite.
-* **CCSS** Dropped `Separate CCSS Cache Post Types` option.
-* **CCSS** Dropped `Separate CCSS Cache URIs` option.
-* **CCSS** Subsites purge Avatar/CSS/JS/CCSS will not affect the whole network anymore.
-* **CCSS** Implemented a better queue list for CCSS that auto collapses if there are more than 20 entries, and shows the total on top.
-* **CSSJS** Now using separate CSS and JS folders instead of `cssjs`.
-* **CSSJS** Automatically purge cache after CCSS is generated.
-* **Network** Dropped network CSS/JS rewrite rules.
-* **Cache** Send cache tag header whenever adding a tag to make it effective in the page optimization process.
-* **Core** Used hook for buffer optimization; Used `init()` instead of `constructor`.
-* **Object** Used `cls` instead of `get_instance` for init.
-* **Cloud** Replaced one-time message with a dismissible-only message when the domain key has been automatically cleared due to domain/key dismatch.
-* **API** Dropped function `hook_vary_add()`.
-* **API** Dropped function `vary_add()`.
-* **API** Dropped function `filter_vary_cookies()`.
-* **API** Dropped function `hook_vary()`.
-* **API** Dropped action `litespeed_vary_add`.
-* **API** Dropped filter `litespeed_api_vary`.
-* **API** Use `litespeed_vary_curr_cookies` and `litespeed_vary_cookies` for Vary cookie operations instead.
-* **API** Dropped action `litespeed_vary_append`.
-* **Vary** 3rd party vary cookies will not append into .htaccess anymore but only present in response vary header if in use.
-* **Vary** Dropped function `append()`.
-* **Vary** Commenter cookie is now considered cacheable.
-* **Crawler** Minor update to crawler user agent to accommodate mobile_detect.php (Abe #304)
-* **Data** Added a table truncate function.
-* **Data** Added new tables url & url_file.
-* **Data** Dropped cssjs table.
-* **Data** Options/Summary data is now stored in JSON format to speed up backend visit. (#233250)
-* **Data** Default `CSS Combine External and Inline` and `JS Combine External and Inline` to On for new installations for better compatibility.
-* **Purge** Fixed potential purge warning for certain themes.
-* **Purge** Purge will be stored for next valid visit to trigger if it is initially generated by CLI.
-* **Page Optimize** `CSS Combine`/`JS Combine` will now share the same file if the contents are the same. Limited disk usage for better file usage and fewer issues with random string problems.
-* **Page Optimize** Dropped option CSS/JS Cache TTL.
-* **Page Optimize** Bypass optimization if page not cacheable.
-* **Page Optimize** Purge CSS/JS will purge the `url_file` table too.
-* **Page Optimize** Optionally store a vary with a shorter value.
-* **Page Optimize** Removing query strings will no longer affect external assets. (ankit)
-* **Page Optimize** Better regex for optimization parsing.
-* **Page Optimize** Eliminated w3 validator for DNS prefetch and duplicated ID errors. (sumit Pandey)
-* **Page Optimize** New Optimization for Guest Only option under Tuning.
-* **Page Optimize** Now forbidding external link redirection for localization.
-* **Debug** Implemented a better debug format for the 2nd parameter in the log.
-* **GUI** Bypass page score banner when score is not detected (both 0). (ankit)
-* **GUI** Fixed deprecated JQuery function warning in WP-Admin. (krzxsiek)
-
-= 3.6.4 - Mar 15 2021 =
-* **Toolbox** Fixed Beta Test upgrade error when upgrading to v3.7+.
-
-= 3.6.3 - Mar 10 2021 =
-* **Core** Fixed potential upgrade failure when new versions have changes in activation related functions.
-* **Core** Upgrade process won't get deactivated anymore on Network setup.
-
-= 3.6.2 - Feb 1 2021 =
-* **Page Optimize** Fixed an issue where network purge CSS/JS caused 404 errors for subsites.
-* **Page Optimize** Fixed an issue where purge CSS/JS only caused 404 errors.
-* **Page Optimize** Added a notice for CSS/JS data detection and potential random string issue.
-* **Page Optimize** Limited localization resources to specified .js only. (closte #292/ormonk)
-* **JS** Data src may now be bypassed from JS Combine. (ankit)
-* **CLI** Fixed a message typo in Purge. (flixwatchsupport)
-* **Browser** Added font/otf to Browser Cache expire list. (ruikai)
-* **Data** Updated data files to accept PR from dev branch only.
-* **3rd** Add data-view-breakpoint-pointer to js_excludes.txt for the Events Calendar plugin. (therealgilles)
-* **Cloud** Bypassed invalid requests.
-* **Doc** CDN Mapping description improvement. (mihai A.)
-
-= 3.6.1 - Dec 21 2020 =
-* **WP** Tested up to WP v5.6.
-* **WebP** Reverted WebP support on Safari Big Sur and Safari v14.0.1+ due to an inability to detect MacOS versions from UA. (@antomal)
-* **CDN** Dropped the option `Load JQuery Remotely`.
-* **CDN** Fixed CDN URL replacement issue in optimized CSS files. (@ankit)
-* **CDN** Fixed an issue where CDN CLI wouldn't set mapping image/CSS/JS to OFF when `false` was the value.
-* **CDN** Started using React for CDN Mapping settings.
-* **GUI** Secured Server IP setting from potential XSS issues. (@WonTae Jang)
-* **Toolbox** Supported both dev and master branches for Beta Test. Latest version updated to v3.6.1.
-* **Purge** Purge Pages now can purge non-archive pages too.
-* **Admin** Simplified the admin JS.
-* **Admin** Limited crawler-related react JS to crawler page only.
-
-= 3.6 - Dec 14 2020 =
-* 🌱**WebP** Added WebP support on Safari Big Sur or Safari v14.0.1+. (@ruikai)
-* 🐞**Config** Fixed an issue where new installations were not getting the correct default .htaccess content.
-* **Crawler** Will auto bypass empty sub-sitemap instead of throwing an exception. (@nanoprobes @Tobolo)
-* **Crawler** Now using React for Cookie Simulation settings instead of Vue.js. Dropped Vue.js.
-* **Crawler** Dropped `Sitemap Generation` (will only use 3rd party sitemap for crawler).
-* **CSS** Added `CSS Combine External and Inline` option for backward compatibility. (@lisa)
-* **Object** Forbid .object-cache.ini visits. (@Tarik)
-* **Page Optimize** Dropped `Remove Comments` option to avoid combine error.
-* **CSS** Added a predefined CSS exclude file `data/css_excludes.txt`.
-* **CSS** Excluded Flatsome theme random inline CSS from combine.
-* **CSS** Excluded WoodMart theme from combine. (@moemauphie)
-* **Page Optimize** Excluded tagDiv.com Newspaper theme dynamic CSS/JS from CSS/JS Combine.
-* **CSS** Added predefined JS defer excludes list. (@Shivam)
-* **JS** `data-no-defer` option now supports inline JS. (@rafaucau)
-* **Media** Lazyload inline library is now bypassed by JS Combine.
-* **Admin** Fixed WP-Admin console ID duplicate warnings.
-* **Cloud** Dropped QUIC.cloud sync options that have long been unused.
-* **CSS** Dropped `Unique CSS File` option (UCSS will always generate unique file, will use whitelist to group post type to one CSS).
-* **GUI** Dropped Help tab.
-* **Toolbox** Added 3.5.2 to version list.
-
-= 3.5.2 - Oct 27 2020 =
-* **CSS** `CSS Combine` is now compatible w/ inline noscript CSS. (@galbaras)
-* **GUI** Added ability to manually dismiss the JS option reset message in v3.5.1 upgrade process. (#473917)
-* 🐞**CSS** `CSS Excludes` setting will no longer lose items beginning w/ `#`. (@ankit)
-* **API** New `litespeed_media_reset` API function for image editing purposes. (@Andro)
-
-= 3.5.1 - Oct 20 2020 =
-* **JS** Inline JS containing nonces can now be combined.
-* **JS** Reset JS Combine/Defer to OFF when upgrading to avoid breaking sites.
-* **JS** Added new option JS Combine External and Inline to allow backwards compatibility.
-* **JS** Added Inline JS Defer option back. (@ankit)
-* **Page Optimize** Dropped Inline JS Minify option and merged the feature into JS Minify.
-* **JS** Pre-added jQuery to the default JS excludes/defer list for better layout compatibility for new users.
-* **JS** Excluded Stripe/PayPal/Google Map from JS optimization. (@FPCSJames)
-* **JS** Allowed excluded JS to still be HTTP2 pushed. (@joshua)
-* **CCSS** Critical CSS now can avoid network pollution from other sites. (@ankit)
-* **Toolbox** Beta Test now displays recent public versions so it is easier to revert to an older version
-* **Vary** Server environment variable Vary can now be passed to original server from QUIC.cloud for non-LiteSpeed servers.
-* **ESI** Improved backward compatibility for ESI nonce list. (@zach E)
-* 🐞**Misc** Fixed failure of upgrade button on plugin news banner and made cosmetic improvements.
-* **Doc** Added note that LSCWP works with ClassicPress.
-
-= 3.5.0.2 - Sep 30 2020 =
-* This is a temporary revert fix. Code is SAME as v3.4.2.
-
-= 3.5.0.1 - Sep 29 2020 =
-* 🔥🐞**CSS** Fixed print media query issue when having CSS Combine. (@paddy-duncan)
-
-= 3.5 - Sep 29 2020 =
-* **Page Optimize** Refactored CSS/JS optimization.
-* **Page Optimize** CSS and JS Combine now each save to a single file without memory usage issues.
-* **CSS** Inline CSS Minify is now a part of CSS Minify, and will respect thr original priorities. (thanks to @galbaras)
-* **JS** JS Combine now generates a single JS file in the footer. (Special thanks to @ankit)
-* **JS** JS Combine now combines external JS files, too. (Thanks to @ankit)
-* **JS** JS Deferred Excludes now uses the original path/filename as keywords instead of the minified path/filename, when JS Minify is enabled.
-* **JS** JS Combine now combines inline JS, too.
-* **JS** JS Excludes may now be used for inline JS snippet.
-* **Page Optimize** Inline CSS Minify and Max Combined File Size retired due to changes listed above.
-* **CSS** Combined CSS Priority retired due to changes listed above.
-* **JS** Exclude JQuery, Combined JS Priority, Load Inline JS Deferred, and Inline JS Deferred Excludes retired due to changes listed above.
-* **JS** Predefined data file data/js_excludes.txt now available for JS Excludes.
-* **ESI** Predefined data file data/esi.nonces.txt now available for ESI Nonces.
-* **ESI** Remote Fetch ESI Nonces functionality retired.
-* **API** Added support for new litespeed_esi_nonces filter.
-* **Object** Object Cache will not try to reconnect after failure to connect in a single process.
-* **CCSS** Remote read CSS will add the scheme if it is missing from the URL.
-* **CCSS** CSS will no longer be prepared for a URL if 404 result is detected.
-* **CCSS** Fixed most failures caused by third party CSS syntax errors.
-* **CCSS** Remote read CSS will fix the scheme if the URL doesn't have it.
-* **CCSS** Excluded 404 when preparing CSS before request.
-* **CCSS** Adjusted CCSS timeout from 180 seconds to 30 seconds.
-* **Image Optimize** Fixed the delete attachment database error that occurred when not using the image optimization service yet.
-* **Media** Added iOS 14 WebP support.
-* **Data** Fixed database creation failure for MySQL v8.
-* **Cloud** Error code err_key will clear the domain key in order to avoid duplicate invalid requests.
-* **Network** Fixed issue with object cache password file storage that occurred when resaving the settings. (#302358)
-* **Misc** Fixed IP detect compatibility w/ Apache.
-* **GUI** Fixed the description for Do Not Cache Categories.
-* **Preload** Upgraded Instant Click to a new stable preload library. (@stasonua0)
-
-= 3.4.2 - Sep 8 2020 =
-* **CCSS** Corrected the issue that wrongly appended non-CSS files to CSS in links before sending request.
-* **3rd** YITH wishlist now sends a combined single sub request for all widgets contained in one page. (LSWS v5.4.9 build 3+ required)
-* **ESI** Added support for ESI combine feature.
-* **GUI** Dropped banner notification for missing domain key when domain key is not initialized.
-* **Log** When QC whitelist check fails, a detailed failure log is now appended.
-
-= 3.4.1 - Sep 2 2020 =
-* 🐞**CCSS** Fixed an issue where dynamically generated CSS failed with `TypeError: Cannot read property type of undefined`.
-* 🐞**Page Optimize** Fixed CSS optimization compatibility for CSS dynamically generated with PHP.
-* **Page Optimize** Added the ability to defer JS even when the resource is excluded from other JS optimizations. (@slr1979)
-* **ESI** Added support for ESI last paramater inline value.
-* **3rd** YITH Wishlist, when cached for the first time, will no longer send sub requests.
-
-= 3.4 - Aug 26 2020 =
-* 🌱**LQIP** New setting **LQIP Excludes**.
-* 🌱**LQIP** Added a Clear LQIP Queue button.
-* 🌱**CCSS** Added a Clear CCSS Queue button.
-* **CCSS** Fixed an issue which wrongly included preloaded images in CCSS. (@pixtweaks)
-* **Network** Primary site and subsite settings now display correctly.
-* **Page Optimize** Noscript tags generated by LSCWP will only be dropped when the corresponding option is enabled. (@ankit)
-* **DB Optimize** Fixed database optimizer conflicts w/ object cache transient setting. (#752931)
-* **3rd** Fixed an issue with WooCommerce product purge when order is placed.
-* **3rd** Improved WooCommerce product comment compatibility with **WooCommerce Photo Reviews Premium** plugin when using ESI.
-* **CDN** Fixed Remote jQuery compatibility with WordPress v5.5. (@pixtweaks)
-* **API** New API `litespeed_purge_all_object` and `litespeed_purged_all_object` action hooks.
-
-= 3.3.1 - Aug 12 2020 =
-* 🌱**Page Optimize** New option to Remove Noscript Tags. (@phuc88bmt)
-* 🐞**LQIP** Fixed a critical bug that bypassed all requests in v3.3.
-* **LQIP** Requests are now bypassed if domain has no credit left.
-* **Page Optimize** Inline defer will be bypassed if document listener is detected in the code. (@ssurfer)
-* **CCSS** Print-only styles will no longer be included in Critical CSS.
-* **API** Added hooks to Purge action to handle file deletions. (@biati)
-* **Cloud** Plain permalinks are no longer required for use of cloud services.
-* **Data** Added an access denial to work with OpenLiteSpeed. (@spenweb #PR228)
-* **GUI** Spelling and grammar adjustments. (@blastoise186 #PR253)
-
-= 3.3 - Aug 6 2020 =
-* 🌱**Page Optimize** Added a new setting, Inline JS Deferred Excludes. (@ankit)
-* **Page Optimize** CSS/JS Combine/Minify file versions will be differentiated by query string hash instead of new filename to reduce DB/file system storage.
-* **Page Optimize** Added the ability to use local copies of external JS files for better control over page score impacts.
-* **Page Optimize** Improved combination of CSS media queries. (@galbaras)
-* **Page Optimize** Reprioritized Inline JS Defer to be optimized before encoding, for a significantly smaller result.
-* **LQIP** Detect if the file exists before sending LQIP request to QUIC.cloud.
-* **CCSS** Sped up CCSS process significantly by sending HTML and CSS in request.
-* **CCSS** Improvements to mobile CSS support in CCSS.
-* **CCSS** Minimize CCSS failures by attempting to automatically fix CSS syntax errors.
-* **Cloud** Domain Key will be deleted after QUIC.cloud site_not_registered error to avoid endless repeated requests.
-* **CDN** CDN Original URL will default to WP Site URL if not set. (@ruikai)
-* **CLI** Global output format `--format=json/yaml/dump` and `--json` support in CLI. (@alya1992)
-* **CDN** Improved handling of non-image CSS `url()` sources in CDN. (@daniel McD)
-* 🐞**CDN** Fixed CDN replacement conflict w/ JS/CSS Optimize. (@ankit)
-* **Crawler** Only reset Crawler waiting queues when crawling begins. (@ruikai)
-* **Network** Network Enable Cache is no longer reset to ON Use Network Settings in enabled. (@RavanH)
-* 🐞**Activation** Fixed a PHP warning that appeared during uninstall. (@RavanH)
-* **Debug** Automatically omit long strings when dumping an array to debug log.
-* **Report** Subsites report now shows overwritten values along w/ original values. (#52593959)
-* **REST** Improved WP5.5 REST compatibility. (@oldrup)
-* **GUI** Server IP setting moved from Crawler menu to General menu.
-* **GUI** Localize resources moved to Localization tab.
-* **Config** News option now defaults to ON.
-
-= 3.2.4 - Jul 8 2020 =
-* **Object** New installations no longer get custom data.ini reset, as this could cause lost configuration. (@Eric)
-* **ESI** Now using `svar` to load nonces more quickly. (@Lauren)
-* **ESI** Fixed the conflicts between nonces in inline JS and ESI Nonces when Inline JS Deferred is enabled. (@JesseDistad)
-* 🐞**ESI** Fixed Fetch Latest Predefined Nonce button.
-* 🐞**Cache** Fixed an issue where mobile visits were not being cached when Cache Mobile was disabled.
-* **CDN** Bypass CDN constant `LITESPEED_BYPASS_CDN` now will apply to all CDN replacements.
-* **Router** Dropped `Router::get_uid()` function.
-* **Crawler** Updated role simulator function for future UCSS usage.
-* **GUI** Textarea will now automatically adjust the height based on the number of rows input.
-* **CLI** Fixed an issue that caused WP-Cron to exit when a task errored out. (@DovidLevine @MatthewJohnson)
-* **Cloud** No longer communcate with QUIC.cloud when Domain Key is not set and Debug is enabled.
-* **Cloud** Score banner no longer automatically fetches a new score. (@LucasRolff)
-
-= 3.2.3.2 - Jun 19 2020 =
-* 🔥🐞**Page Optimize** Hotfix for CSS/JS minify/combine. (@jdelgadoesteban @martin_bailey)
-
-= 3.2.3.1 - Jun 18 2020 =
-* **API** New filter `litespeed_buffer_before` and `litespeed_buffer_after`. (#PR243 @joejordanbrown)
-
-= 3.2.3 - Jun 18 2020 =
-* 🌱**Page Optimize** Added Unique CSS option for future removal of unused CSS per page. (@moongear)
-* **Page Optimize** Fixed an issue where Font Optimization could fail when having Load JS Deferred and Load Inline JS Deferred. (#PR241 @joejordanbrown)
-* 🐞**Page Optimize** Fixed an issue with Font Display Optimization which caused Google Fonts to load incorrectly. (#PR240 @joejordanbrown @haidan)
-* 🐞**Network** Use Primary Site Configuration setting for network sites now works properly with Object Cache and Browser Cache. (#56175101)
-* **API** Added filter `litespeed_is_from_cloud` to detect if the current request is from QC or not. (@lechon)
-* **ESI** ESI Nonce now can fetch latest list with one click.
-* **GUI** Updated remaining documentation links & some minor UI tweaks. (@Joshua Reynolds)
-
-= 3.2.2 - Jun 10 2020 =
-* 🌱**Purge** Scheduled Purge URLs now supports wildcard. (#427338)
-* 🌱**ESI** ESI Nonce supports wildcard match now.
-* **Network** Use Primary Site Settings now can support Domain Key, and override mechanism improved. (@alican532 #96266273)
-* **Cloud** Debug mode will now have no interval limit for most cloud requests. (@ruikai)
-* **Conf** Default Purge Stale to OFF.
-* **GUI** Purge Stale renamed to Serve Stale.
-* **Data** Predefined nonce list located in `/litespeed-cache/data/esi.nonce.txt`. Pull requests welcome.
-* **Debug** Limited parameter log length.
-* 🐞**CDN** Fixed an issue where upgrading lost value of CDN switch setting. (#888668)
-* **3rd** Caldera Forms ESI Nonce enhancement. (@paconarud16 @marketingsweet)
-* **3rd** Elementor now purges correctly after post/page updates.
-* **3rd** Disabled Page Optimization features on AMP to avoid webfont JS inject. (@rahulgupta1985)
-
-= 3.2.1 - Jun 1 2020 =
-* **Cloud** LQIP/CCSS rate limit tweaks. (@ianpegg)
-* **Admin** Improved frontend Admin Bar menu functionality. (#708642)
-* **Crawler** Fixed an issue where cleaning up a crawler map with a leftover page number would cause a MySQL error. (@saowp)
-* **Image Optimize** Added WP default thumbnails to image optimization summary list. (@johnny Nguyen)
-* **REST** Improved REST compatibility w/ WP4.4-. (#767203)
-* **GUI** Moved Use Primary Site Configuration to General menu. (@joshua)
-
-= 3.2 - May 27 2020 =
-* **Image Optimize** Major improvements in queue management, scalability, and speed. (@LucasRolff)
-* **Cloud** Implemented a series of communication enhancements. (@Lucas Rolff)
-* **Crawler** Enhanced PHP 5.3 compatibility. (@JTS-FIN #230)
-* **Page Optimize** Appended image template in wpDiscuz script into default lazyload image exclude list. (@philipfaster @szmigieldesign)
-* **Page Optimize** Eliminated the 404 issue for CSS/JS in server environments with missing SCRIPT_URI. (@ankit)
-* **Data** ENhanced summary data storage typecasting.
-
-= 3.1 - May 20 2020 =
-* 🌱**Network** Added Debug settings to network level when on network.
-* 🐞**Purge** Network now can purge all.
-* 🐞**Network** Fixed issue where saving the network primary site settings failed.
-* **Network** Moved Beta Test to network level when on network.
-* 🐞**Cache** Fixed issue in admin where new post editor was wrongly cached for non-admin roles. (@TEKFused)
-* 🐞**Data** Fixed issue with crawler & img_optm table creation failure. (@berdini @piercand)
-* 🐞**Core** Improved plugin activation compatibility on Windows 10 #224 (@greenphp)
-* **Core** Improved compatibility for .htaccess path search.
-* **Object** Catch RedisException. (@elparts)
-* Fixed Script URI issue in 3.0.9 #223 (@aonsyed)
-* **Image Optimize** Show thumbnail size set list in image optimization summary. (@Johnny Nguyen)
-* **Debug** Parameters will now be logged.
-
-= 3.0.9 - May 13 2020 =
-* **Purge** Comment cache can be successfully purged now.
-* **Data** Better MySQL charset support for crawler/image optimize table creation. (@Roshan Jonah)
-* **API** New hook to fire after Purge All. (@salvatorefresta)
-* **Crawler** Resolve IP for crawler.
-* **Task** PHP5.3 Cron compatibility fix.
-* **3rd** Elementor edit mode compatibility.
-* **Page Optimize** Fixed an issue where Purge Stale returned 404 for next visitor on CSS/JS.
-* **Page Optimize** Fixed the PHP warning when srcset doesn't have size info inside. (@gvidano)
-* **Cloud** Fixed the potential PHP warning when applying for the domain key.
-* **Core** PHP __DIR__ const replacement. (@MathiasReker)
-
-= 3.0.8.6 - May 4 2020 =
-* **CCSS** Bypassed CCSS functionality on frontend when domain key isn't setup yet.
-* **Cloud** Fixed WP node redetection bug when node expired. (@Joshua Reynolds)
-* **Crawler** Fixed an issue where URL is wrongly blacklisted when using ADC.
-
-= 3.0.8.5 - May 1 2020 =
-* 🔥🐞**3rd** Hotfix for WPLister critical error due to v3.0.8.4 changes.
-* **Image Optimize** Unfinished queue now will get more detailed info to indicate the proceeding status on node.
-* **CLI** Options can now use true/false as value for bool. (@gavin)
-* **CLI** Detect error if the ID does not exist when get/set an option value.
-* **Doc** An API comment typo for `litespeed_esi_load-` is fixed.
-
-= 3.0.8.4 - Apr 30 2020 =
-* 🌱**Crawler** New setting: Sitemap timeout. (#364607)
-* **Image Optimize** Images that fail to optimize are now counted to increase next request limit.
-* **Cloud** Redetect fastest node every 3 days.
-* **Cloud** Suppressed auto upgrade version detection error. (@marc Dahl)
-* **3rd** 3rd party namespace compatibility. (#366352)
-
-= 3.0.8.3 - Apr 28 2020 =
-* **Cloud** Better compatibility for the Link to QUIC.cloud operation. (@Ronei de Sousa Almeida)
-* **Image Optimize** Automatically clear invalid image sources before sending requests. (@Richard Hordern)
-
-= 3.0.8.2 - Apr 27 2020 =
-* **GUI** Corrected the Request Domain Key wording.
-
-= 3.0.8.1 - Apr 27 2020 =
-* **Object** Object cache compatibility for upgrade from v2.9.9- versions.
-
-= 3.0.8 - Apr 27 2020 =
-* Released v3 on WordPress officially.
-
-= 3.0.4 - Apr 23 2020 =
-* **Cloud** Apply Domain Key now receives error info in next apply action if failed to generate.
-* **GUI** Apply Domain Key timeout now displays troubleshooting guidance.
-* **REST** Added /ping and /token to REST GET for easier debug.
-* **Cache** Dropped `advanced-cache.php` file detection and usage.
-
-= 3.0.3 - Apr 21 2020 =
-* **Conf** Settings from all options (data ini, defined constant, and forced) will be filtered and cast to expected type.
-* **Upgrade** CDN mapping and other multiple line settings will now migrate correctly when upgrading from v2 to v3.
-
-= 3.0.2 - Apr 17 2020 =
-* **GUI** More guidance on domain key setting page.
-* **Cloud** Now Apply Domain Key will append the server IP if it exists in Crawler Server IP setting.
-
-= 3.0.1 - Apr 16 2020 =
-* **Data** Increased timeout for database upgrade related to version upgrade. Display a banner while update in progress.
-* **Page Optimize** All appended HTML attributes now will use double quotes to reduce the conflicts when the optimized resources are in JS snippets.
-
-= 3.0 - Apr 15 2020 =
-* 🌱**Media** LQIP (Low Quality Image Placeholder).
-* 🌱**Page Optimize** Load Inline JS Deferred Compatibility Mode. (Special thanks to @joe B - AppsON)
-* 🌱**Cloud** New QUIC.cloud API key setting.
-* 🌱**ESI** New ESI nonce setting.
-* 🌱**Media** JPG quality control. (@geckomist)
-* 🌱**Media** Responsive local SVG placeholder.
-* 🌱**Discussion** Gravatar warmup cron.
-* 🌱**DB** Table Engine Converter tool. (@johnny Nguyen)
-* 🌱**DB** Database summary: Autoload size. (@JohnnyNguyen)
-* 🌱**DB** Database summary: Autoload entries list.
-* 🌱**DB** Revisions older than. (@thememasterguru)
-* 🌱**Cache** Forced public cache setting. (#308207)
-* 🌱**Crawler** New timeout setting to avoid incorrect blacklist addition. (#900171)
-* 🌱**Htaccess** Frontend & backend .htaccess path customize. (@jon81)
-* 🌱**Toolbox** Detailed Heartbeat Control (@K9Heaven)
-* 🌱**Purge** Purge Stale setting.
-* 🌱**Page Optimize** Font display optimization. (@Joeee)
-* 🌱**Page Optimize** Google font URL display optimization.
-* 🌱**Page Optimize** Load Inline JS deferred.
-* 🌱**Page Optimize** Store gravatar locally. (@zzTaLaNo1zz @JohnnyNguyen)
-* 🌱**Page Optimize** DNS prefetch control setting.
-* 🌱**Page Optimize** Lazy Load Image Parent Class Name Excludes. (@pako69)
-* 🌱**Page Optimize** Lazy load iframe class excludes. (@vnnloser)
-* 🌱**Page Optimize** Lazy load exclude URIs. (@wordpress_fan1 @aminaz)
-* 🌱**GUI** New Dashboard and new menus.
-* 🌱**Image Optimize** Supported GIF WebP optimization. (@Lucas Rolff)
-* 🌱**Image Optimize** New workflow for image optimization (Gather first, request second).
-* 🌱**Image Optimize** The return of Rescan.
-* 🌱**CLI** Get single option cmd.
-* 🌱**CLI** QUIC.cloud cmd supported.
-* 🌱**CLI** CLI can send report now.
-* 🌱**Health** Page speed and page score now are in dashboard.
-* 🌱**Conf** Supported consts overwritten of `LITESPEED_CONF__` for all settings. (@menathor)
-* 🌱**REST** New REST TTL setting. (@thekendog)
-* 🌱**CDN** New setting `HTML Attribute To Replace`. CDN can now support any HTML attribute to be replaced. (@danushkaj91)
-* 🌱**Debug** Debug URI includes/excludes setings.
-* 🌱**Crawler** 🐞 Support for multiple domains in custom sitemap. (@alchem)
-* 🌱**Crawler** New Crawler dashboard. New sitemap w/ crawler status. New blacklist w/ reason.
-* 🌱**Media** LQIP minimum dimensions setting. (@Lukasz Szmigiel)
-* **Crawler** Able to add single rows to blacklist.
-* **Crawler** Crawler data now saved into database instead of creating new files.
-* **Crawler** Larger timeout to avoid wrongly added to blacklist.
-* **Crawler** Manually changed the priority of mobile and WebP. (@rafaucau)
-* **Browser** Larger Browser Cache TTL for Google Page Score improvement. (@max2348)
-* **Task** Task refactored. Disabled cron will not show in cron list anymore.
-* **Task** Speed up task load speed.
-* **ESI** Added Bloom nonce to ESI for Elegant Themes.
-* **Cloud** Able to redetect cloud nodes now.
-* **Img_optm** Fixed stale data in redirected links.
-* **Lazyload** CSS class `litespeed_lazyloaded` is now appended to HTML body after lazyload is finished. (@Adam Wilson)
-* **Cache** Default drop qs values. (@gijo Varghese)
-* **LQIP** Show all LQIP images in Media column.
-* **CDN** Can now support custom REST API prefix other than wp-json. (#174 @therealgilles)
-* **IAPI** Used REST for notify/destroy/check_img; Removed callback passive/aggreesive IAPI func
-* **CSSJS** Saved all static files to litespeed folder; Uninstallation will remove static cache folder too; Reduced .htaccess rules by serving CSS/JS directly.
-* **Object** Fixed override different ports issue. (@timofeycom #ISSUE178)
-* **Conf** DB Tables will now only create when activating/upgrading/changing settings.
-* **DB** Simplified table operation funcs.
-* **CSSJS** Bypassed CSS/JS generation to return 404 if file is empty (@grubyy)
-* **CSSJS** Inline JS defer will not conflict with JS inline optm anymore.
-* **CDN** settings will not be overwritten by primary settings in network anymore. (@rudi Khoury)
-* **OPcache** Purged all opcache when updating cache file. (@closte #170)
-* **CLI** CLI cmd renamed.
-* **CLI** Well-formated table to show all options.
-* **Purge** Only purge related posts that have a status of "published" to avoid unnecessary "draft" purges. (@Jakub Knytl)
-* **GUI** Removed basic/adv mode for settings. Moved non-cache settings to its own menu.
-* **Htaccess** Protected .htaccess.bk file. Only kept one backup. (@teflonmann)
-* **Crawler** Crawler cookie now support `_null` as empty value.
-* **Crawler** Avoid crawler PHP fatal error on Windows OS. (@technisolutions)
-* **Admin** Simplified admin setting logic.
-* **Conf** Multi values settings now uniformed to multi lines for easier setting.
-* **Conf** New preset default data file `data/consts.default.ini`.
-* **Conf** Config setting renamed and uniformed.
-* **Conf** Dropped `Conf::option()`. Used `Conf::val()` instead.
-* **Conf** Improved conf initialization and upgrade convertion workflow.
-* **Core** Code base refactored. New namespace LiteSpeed.
-* **API** New API: iframe lazyload exclude filter.
-* **GUI** human readable seconds. (@MarkCanada)
-* **API** API refactored. * NOTE: All 3rd party plugins that are using previous APIs, especially `LiteSpeed_Cache_API`, need to be adjusted to the latest one. Same for ESI blocks.* ESI shortcode doesn't change.
-* **API** New hook `litespeed_update_confs` to settings update.
-* **API** New Hooks `litespeed_frontend_shortcut` and `litespeed_backend_shortcut` for dropdown menu. (@callaloo)
-* **API** Removed `litespeed_option_*` hooks. Use `litespeed_force_option` hook insteadly
-* **API** Renamed `litespeed_force_option` to `litespeed_conf_force`.
-* **API** Removed function `litespeed_purge_single_post`.
-* **REST** New rest API to fetch public IP.
-* **GUI** Hiding Cloudflare/Object Cache/Cloud API key credentials. (@menathor)
-* **GUI** Renamed all backend link tag from lscache to litespeed.
-* **GUI** fixed duplicated form tag.
-* **GUI** Fix cron doc link. (@arnab Mohapatra)
-* **GUI** Frontend adminbar menu added `Purge All` actions. (@Monarobase)
-* **GUI** Localized vue.js to avoid CloudFlare cookie. (@politicske)
-* **GUI** Always show optm column in Media Library for future single row optm operation. (@mikeyhash)
-* **GUI** Displayed TTL range below the corresponding setting.
-* **GUI** GUI refactored.
-* **Debug** Report can now append notes.
-* **3rd** Default added parallax-image to webp replacement for BB.
-* **3rd** User Switching plugin compatibility. (@robert Staddon)
-* **3rd** Beaver Builder plugin compatibility with v3.0.
-* **3rd** Avada plugin compatibility w/ BBPress. (@pimg)
-* **3rd** WooCommerce PayPal Checkout Gateway compatibility. (#960642 @Glen Cabusas)
-* **Network** Fixed potential timeout issue when containing a large volume of sites. (@alican532)
-* **Debug** `Disable All Features` now will see the warning banner if ON.
-* **Debug** Dropped `log filters` section.
-* **Debug** Debug and Tools sections combined into new `Toolbox` section.
-* 🐞**Crawler** Multi sites will now use separate sitemap even when `Use Primary Site` is ON. (@mrhuynhanh)
-* 🐞**Img_optm** Fixed large volume image table storage issue. (#328956)
-* 🐞 **Cloud** Cloud callback hash validation fixed OC conflict. (@pbpiotr)
-* 🎊 Any user that had the contribution to our WP community or changelog (even just bug report/feedback/suggestion) can apply for extra credits in QUIC.cloud.
-
-= 2.9.9.2 - Nov 24 2019 =
-* 🌱**GUI** New settings to limit News Feed to plugin page only.
-
-= 2.9.9.1 - Nov 18 2019 =
-* 🌱**Env** Environment Report can now append a passwordless link for support access without wp-admin password.
-* **Admin** The latest v3.0 beta test link may now be shown on the admin page when it's available.
-* **3rd** Compatibility with [DoLogin Security](https://wordpress.org/plugins/dologin/).
-* 🐞**ESI** Fixed a failure issue with Vary Group save. (@rafasshop)
-* 🐞**3rd** In browsers where WebP is not supported, Divi image picker will no longer serve WebP. (@Austin Tinius)
-
-= 2.9.9 - Oct 28 2019 =
-* Core: Preload all classes to avoid getting error for upcoming v3.0 upgrade.
-* Object: Improved compatibility with upcoming v3.0 release.
-* ESI: Unlocked ESI for OLS in case OLS is using QUIC.cloud CDN which supports ESI.
-* 3rd: Elementor Edit button will now show when ESI enabled. (#PR149 #335322 @maxgorky)
-* 🐞Media: Fixed missing Media optimization column when Admin role is excluded from optimization in settings. (@mikeyhash @pako69 @dgilfillan)
-
-= 2.9.8.7 - Oct 11 2019 =
-* 3rd: Enhanced WP stateless compatibility. (#PR143)
-* 3rd: Fixed a PHP warning caused by previous PR for AMP. (#PR176)
-
-= 2.9.8.6 - Sep 24 2019 =
-* 3rd: Bypassed page optimizations for AMP. (#359748 #PR169)
-* GUI: Firefox compatibility with radio button state when reloading pages. (#288940 #PR162)
-* GUI: Updated Slack invitation link. (#PR173)
-
-= 2.9.8.5 - Aug 21 2019 =
-* CCSS: Removed potential PHP notice when getting post_type. (@amcgiffert)
-* CDN: Bypassed CDN replacement on admin page when adding media to page/post. (@martin_bailey)
-* 🐞Media: Fixed inability to update or destroy postmeta data for child images. (#167713)
-
-= 2.9.8.4 - Jul 25 2019 =
-* Object: Increased compatibility with phpredis 5.0.
-* Object: Appended `wc_session_id` to default Do Not Cache Groups setting to avoid issue where WooCommerce cart items were missing when Object Cache is used. NOTE: Existing users must add `wc_session_id` manually! (#895333)
-* CSS: Added null onload handler for CSS async loading. (@joejordanbrown)
-* 🕷️: Increased crawler timeout to avoid wrongly adding a URL to the blacklist.
-* 3rd: WooCommerce Advanced Bulk Edit can now purge cache automatically.
-
-= 2.9.8.3 - Jul 9 2019 =
-* CSS: Enhanced the CSS Minify compatibility for CSS with missing closing bracket syntax errors. (@fa508210020)
-* 🕷️: Crawler now supports both cookie and no-cookie cases. (@tabare)
-* CCSS: Enhanced compatibility with requested pages where meta info size exceeds 8k. (@Joe B)
-* CCSS: No longer processing "font" or "import" directives as they are not considered critical. (@Ankit @Joe B)
-* IAPI: Removed IPv6 from all servers to avoid invalid firewall whitelist.
-
-= 2.9.8.2 - Jun 17 2019 =
-* 🔥🐞 3rd: Fixed PHP 5.3 compatibility issue with Facetwp.
-
-= 2.9.8.1 - Jun 17 2019 =
-* 3rd: Set ESI template hook priority to highest number to prevent ESI conflict with Enfold theme. (#289354)
-* 3rd: Improved Facetwp reset button compatibility with ESI. (@emilyel)
-* 3rd: Enabled user role change to fix duplicate login issue for plugins that use alternative login processes. (#114165 #717223 @sergiom87)
-* GUI: Wrapped static text with translate function. (@halilemreozen)
-
-= 2.9.8 - May 22 2019 =
-* Core: Refactored loading priority so user related functions & optimization features are set after user initialization. (#717223 #114165 #413338)
-* Media: Improved backup file calculation query to prevent out-of-memory issue.
-* Conf: Feed cache now defaults to ON.
-* API: Fully remote attachment compatibility API of image optimization now supported.
-* 🕷️: Bypassed vary change for crawler; crawler can now simulate default vary cookie.
-* ESI: Refactored ESI widget. Removed `widget_load_get_options()` function.
-* ESI: Changed the input name of widget fields in form.
-* 3rd: Elementor can now save ESI widget settings in frontend builder.
-* 3rd: WP-Stateless compatibility.
-* IAPI: Image optimization can now successfully finish the destroy process with large volume images with automatic continual mode.
-* 🐞CDN: Fixed issue with Load JQuery Remotely setting where WP 5.2.1 provided an unexpected jQuery version.
-* 🐞3rd: Login process now gets the correct role; fixed double login issue.
-
-= 2.9.7.2 - May 2 2019 =
-* Conf: Enhanced compatibility when an option is not properly initialized.
-* Conf: Prevent non-array instance in widget from causing 500 error. (#210407)
-* CCSS: Increase CCSS generation timeout to 60s.
-* Media: Renamed lazyload CSS class to avoid conflicts with other plugins. (@DynamoProd)
-* JS: Improved W3 validator. (@istanbulantik)
-* QUIC: Synced cache tag prefix for static files cache.
-* ESI: Restored query strings to ESI admin bar for accurate rendering. (#977284)
-* ESI: Tweaked ESI init priority to honor LITESPEED_DISABLE_ALL const. ESI will now init after plugin loaded.
-* 🐞ESI: No longer initialize ESI if ESI option is OFF.
-* API: New "Disable All" API function.
-* API: New "Force public cache" API function.
-* 🐞Vary: Fixed an issue with saving vary groups.
-* 🐞IAPI: Fixed an issue where image md5 validation failed due to whitespace in the image path.
-* 🐞3rd: Bypass all optimization/ESI/Cache features when entering Divi Theme Builder frontend editor.
-* 🐞3rd: Fixed an issue where DIVI admin bar exit button didn't work when ESI was ON.
-
-= 2.9.7.1 - Apr 9 2019 =
-* Purge: Purge All no longer includes Purge CCSS/Placeholder.
-* 3rd: Divi Theme Builder no longer experiences nonce expiration issues in the contact form widget. (#475461)
-
-= 2.9.7 - Apr 1 2019 =
-* 🌱🌱🌱 QUIC.cloud CDN feature. Now Apache/Nginx can use LiteSpeed cache freely.
-
-= 2.9.6 - Mar 27 2019 =
-* 🌱IAPI: Appended XMP to `Preserve EXIF data` setting. WebP will now honor this setting. (#902219)
-* Object: Fixed SASL connection with LSMCD.
-* ESI: Converted ESI URI parameters to JSON; Added ESI validation.
-* Import: Import/Export will now use JSON format. Please re-export any backed up settings. Previous backup format is no longer recognized.
-* Media: WebP replacement will honor `Role Excludes` setting now. (@mfazio26)
-* Data: Forbid direct visit to const.default.ini.
-* Utility: Can handle WHM passed in `LITESPEED_ERR` constant now.
-* IAPI: Communicate via JSON encoding.
-* IAPI: IAPI v2.9.6.
-
-= 2.9.5 - Mar 14 2019 =
-* 🌱 Auto convert default WordPress nonce to ESI to avoid expiration.
-* 🌱 API: Ability to easily convert custom nonce to ESI by registering `LiteSpeed_Cache_API::nonce_action`.
-* OPTM: Tweaked redundant attr `data-no-optimize` in func `_analyse_links` to `data-ignore-optimize` to offer the API to bypass optimization but still move src to top of source code.
-* API: Renamed default nonce ESI ID from `lscwp_nonce_esi` to `nonce`.
-* API: Added WebP generation & validation hook API. (@alim #wp-stateless)
-* API: Added hook to bypass vary commenter check. (#wpdiscuz)
-* Doc: Clarified Cache Mobile description. (@JohnnyNguyen)
-* Doc: Replaced incorrect link in description. (@JohnnyNguyen)
-* 3rd: Improved wpDiscuz compatibility.
-* 🐞3rd: Fixed Divi Theme Builder comment compatibility on non-builder pages. (#410919)
-* 3rd: Added YITH ESI adjustment.
-
-= 2.9.4.1 - Feb 28 2019 =
-* 🔥🐞Tag: Fixed issue where unnecessary warning potentially displayed after upgrade process when object cache is enabled.
-
-= 2.9.4 - Feb 27 2019 =
-* 🐞REST: New REST class with better WP5 Gutenberg and internal REST call support when ESI is embedded.
-* ESI: ESI block ID is now in plain text in ESI URL parameters.
-* 🐞ESI: Fixed a redundant ESI 301 redirect when comma is in ESI URL.
-* ESI: REST call can now parse shortcodes in ESI.
-* API: Changed ESI `parse_esi_param()` function to private and `load_esi_block` function to non-static.
-* API: Added `litespeed_is_json` hook for buffer JSON conversion.
-* GUI: Prepended plugin name to new version notification banner.
-* 3rd: WPML multi domains can now be handled in optimization without CDN tricks.
-
-= 2.9.3 - Feb 20 2019 =
-* ESI: ESI shortcodes can now be saved in Gutenberg editor.
-* ESI: ESI now honors the parent page JSON data type to avoid breaking REST calls (LSWS 5.3.6+).
-* ESI: Added is_json parameter support for admin_bar.
-* ESI: Simplified comment form code.
-* 3rd: Better page builder plugin compatibility within AJAX calls.
-* 3rd: Compatibility with FacetWP (LSWS 5.3.6+).
-* 3rd: Compatibility with Beaver Builder.
-* Debug: Added ESI buffer content to log.
-* Tag: Only append blog ID to cache tags when site is part of a network.
-* IAPI: Optimized database query for pulling images.
-* GUI: Added more plugin version checking for better feature compatibility.
-* GUI: Ability to bypass non-critical banners with the file .litespeed_no_banner.
-* Media: Background image WebP replacement now supports quotes around src.
-
-= 2.9.2 - Feb 5 2019 =
-* API: Add a hook `litespeed_esi_shortcode-*` for ESI shortcodes.
-* 3rd: WooCommerce can purge products now when variation stock is changed.
-* 🐞🕷️: Forced HTTP1.1 for crawler due to a CURL HTTP2 bug.
-
-= 2.9.1 - Jan 25 2019 =
-* Compatibility: Fixed fatal error for PHP 5.3.
-* Compatibility: Fixed PHP warning in htmlspecialchars when building URLs. (@souljahn2)
-* Media: Excluded invalid image src from lazyload. (@andrew55)
-* Optm: Improved URL compatibility when detecting closest cloud server.
-* ESI: Supported JSON format comment format in ESI with `is_json` parameter.
-* API: Added filters to CCSS/CSS/JS content. (@lhoucine)
-* 3rd: Improved comment compatibility with Elegant Divi Builder.
-* IAPI: New Europe Image Optimization server (EU5). Please whitelist the new [IAPI IP List](https://wp.api.litespeedtech.com/ips).
-* GUI: No longer show banners when `Disable All` in `Debug` is ON. (@rabbitwordpress)
-* GUI: Fixed button style for RTL languages.
-* GUI: Removed unnecessary translation in report.
-* GUI: Updated readme wiki links.
-* GUI: Fixed pie styles in image optimization page.
-
-= 2.9 - Dec 31 2018 =
-* 🌱Media: Lazy Load Image Classname Excludes. (@thinkmedia)
-* 🌱: New EU/AS cloud servers for faster image optimization handling.
-* 🌱: New EU/AS cloud servers for faster CCSS generation.
-* 🌱: New EU/AS cloud servers for faster responsive placeholder generation.
-* 🌱Conf: Ability to set single options via link.
-* 🌱Cache: Ability to add custom TTLs to Force Cache URIs.
-* Purge: Added post type to Purge tags.
-* Purge: Redefined CCSS page types.
-* Core: Using Exception for .htaccess R/W.
-* IAPI: New cloud servers added. Please whitelist the new [IAPI IP List](https://wp.api.litespeedtech.com/ips).
-* Optm: Trim BOM when detecting if the page is HTML.
-* GUI: Added PageSpeed Score comparison into promotion banner.
-* GUI: Refactored promotion banner logic.
-* GUI: Removed page optimized comment when ESI Silence is requested.
-* GUI: WHM transient changed to option instead of transient when storing.
-* GUI: Appending more descriptions to CDN filetype setting.
-* IAPI: Removed duplicate messages.
-* IAPI: Removed taken_failed/client_pull(duplicated) status.
-* Debug: Environment report no longer generates hash for validation.
-* 3rd: Non-cacheable pages no longer punch ESI holes for Divi compatibility.
-* 🐞Network: Added slashes for mobile rules when activating plugin.
-* 🐞CCSS: Eliminated a PHP notice when appending CCSS.
-
-= 2.8.1 - Dec 5 2018 =
-* 🐞🕷️: Fixed an activation warning related to cookie crawler. (@kacper3355 @rastel72)
-* 🐞Media: Replace safely by checking if pulled images is empty or not first. (@Monarobase)
-* 3rd: Shortcode ESI compatibility with Elementor.
-
-= 2.8 - Nov 30 2018 =
-* 🌱: ESI shortcodes.
-* 🌱: Mobile crawler.
-* 🌱: Cookie crawler.
-* API: Can now add `_litespeed_rm_qs=0` to bypass Remove Query Strings.
-* Optm: Removed error log when minify JS failed.
-* 🐞Core: Fixed a bug that caused network activation PHP warning.
-* Media: Removed canvas checking for WebP to support TOR. (@odeskumair)
-* Media: Eliminated potential image placeholder PHP warning.
-* 3rd: Bypassed Google recaptcha from Remove Query Strings for better compatibility.
-* IAPI: Showed destroy timeout details.
-* Debug: Moved Google Fonts log to advanced level.
-* GUI: Replaced all Learn More links for functions.
-* GUI: Cosmetic updates including Emoji.
-* 🕷️: Removed duplicated data in sitemap and blacklist.
-
-= 2.7.3 - Nov 26 2018 =
-* Optm: Improved page render speed with Web Font Loader JS library for Load Google Fonts Asynchronously.
-* Optm: Directly used JS library files in plugin folder instead of short links `/min/`.
-* Optm: Handled exceptions in JS optimization when meeting badly formatted JS.
-* 3rd: Added Adobe Lightroom support for NextGen Gallery.
-* 3rd: Improved Postman app support for POST JSON requests.
-* IAPI: US3 server IP changed to 68.183.60.185.
-
-= 2.7.2 - Nov 19 2018 =
-* 🌱: Auto Upgrade feature.
-* CDN: Bypass CDN for cron to avoid WP jQuery deregister warning.
-
-= 2.7.1 - Nov 15 2018 =
-* 🌱CLI: Ability to set CDN mapping by `set_option litespeed-cache-cdn_mapping[url][0] https://url`.
-* 🌱CDN: Ability to customize default CDN mapping data in default.ini.
-* 🌱API: Default.ini now supports both text-area items and on/off options.
-* Vary: Refactored Vary and related API.
-* Vary: New hook to manipulate vary cookies value.
-* Core: Activation now can generate Object Cache file.
-* Core: Unified Object Cache/rewrite rules generation process across activation/import/reset/CLI.
-* Core: Always hook activation to make activation available through the front end.
-* 🐞IAPI: Fixed a bug where environment report gave incorrect image optimization data.
-* 🐞OLS: Fixed a bug where login cookie kept showing a warning on OpenLiteSpeed.
-* 🐞Core: Fixed a bug where Import/Activation/CLI was missing CDN mapping settings.
-* API: Filters `litespeed_cache_media_lazy_img_excludes/litespeed_optm_js_defer_exc` passed-in parameter is changed from string to array.
-
-= 2.7 - Nov 2 2018 =
-* 🌱: Separate Purge log for better debugging.
-* 3rd: Now fully compatible with WPML.
-* IAPI: Sped up Image Optimization workflow.
-* GUI: Current IP now shows in Debug settings.
-* GUI: Space separated placeholder queue list for better look.
-* IAPI: EU3 server IP changed to 165.227.131.98.
-
-= 2.6.4.1 - Oct 25 2018 =
-* 🔥🐞Media: Fixed a bug where the wrong table was used in the Image Optimization process.
-* IAPI: IAPI v2.6.4.1.
-
-= 2.6.4 - Oct 24 2018 =
-* 🌱: Ability to create custom default config options per hosting company.
-* 🌱: Ability to generate mobile Critical CSS.
-* 🐞Media: Fixed a bug where Network sites could incorrectly override optimized images.
-* 🐞CDN: Fixed a bug where image URLs containing backslashes were matched.
-* Cache: Added default Mobile UA config setting.
-* GUI: Fixed unknown shortcut characters for non-English languages Setting tabs.
-
-= 2.6.3 - Oct 18 2018 =
-* 🌱: Ability to Reset All Options.
-* 🌱CLI: Added new `lscache-admin reset_options` command.
-* GUI: Added shortcuts for more of the Settings tabs.
-* Media: Updated Lazy Load JS library to the most recent version.
-* There is no longer any need to explicitly Save Settings upon Import.
-* Remove Query String now will remove *all* query strings in JS/CSS static files.
-* IAPI: Added summary info to debug log.
-
-= 2.6.2 - Oct 11 2018 =
-* Setting: Automatically correct invalid numeric values in configuration settings upon submit.
-* 🐞Media: Fixed the issue where iframe lazy load was broken by latest Chrome release. (@ofmarconi)
-* 🐞: Fixed an issue with Multisite where subsites failed to purge when only primary site has WooCommerce . (@kierancalv)
-
-= 2.6.1 - Oct 4 2018 =
-* 🌱: Ability to generate separate Critical CSS Cache for Post Types & URIs.
-* API: Filter `litespeed_frontend_htaccess` for frontend htaccess path.
-* Media: Removed responsive placeholder generation history to save space.
-
-= 2.6.0.1 - Sep 24 2018 =
-* 🔥🐞: Fixed an issue in responsive placeholder generation where redundant history data was being saved and using a lot of space.
-
-= 2.6 - Sep 22 2018 =
-* Vary: Moved `litespeed_cache_api_vary` hook outside of OLS condition for .htaccess generation.
-* CDN: Trim spaces in original URL of CDN setting.
-* API: New filter `litespeed_option_` to change all options dynamically.
-* API: New `LiteSpeed_Cache_API::force_option()` to change all options dynamically.
-* API: New `LiteSpeed_Cache_API::vary()` to set default vary directly for easier compaitiblity with WPML WooCommerce Multilingual.
-* API: New `LiteSpeed_Cache_API::nonce()` to safely and easily allow caching of wp-nonce.
-* API: New `LiteSpeed_Cache_API::hook_vary_add()` to add new vary.
-* Optm: Changed HTML/JS/CSS optimization options assignment position from constructor to `finalize()`.
-* Doc: Added nonce to FAQ and mentioned nonce in 3rd Party Compatibility section.
-* GUI: Moved inline minify to under html minify due to the dependency.
-* 3rd: Cached Aelia CurrencySwitcher by default.
-* 🐞: Fixed issue where enabling remote JQuery caused missing jquery-migrate library error.
-
-= 2.5.1 - Sep 11 2018 =
-* 🌱 Responsive placeholder. (@szmigieldesign)
-* Changed CSS::ccss_realpath function scope to private.
-* 🐞 Detected JS filetype before optimizing to avoid PHP source conflict. (@closte #50)
-
-= 2.5 - Sep 6 2018 =
-* [IMPROVEMENT] CLI can now execute Remove Original Image Backups. (@Shon)
-* [UPDATE] Fixed issue where WP-PostViews documentation contained extra slashes. (#545638)
-* [UPDATE] Check LITESPEED_SERVER_TYPE for more accurate LSCache Disabled messaging.
-* [IAPI] Fixed a bug where optimize/fetch error notification was not being received. (@LucasRolff)
-
-= 2.4.4 - Aug 31 2018 =
-* [NEW] CLI can now support image optimization. (@Shon)
-* [IMPROVEMENT] GUI Cron/CLI will not create admin message anymore.
-* [UPDATE] Media Fixed a PHP notice that appeared when pulling optimized images.
-* [UPDATE] Fixed a PHP notice when detecting origin of ajax call. (@iosoft)
-* [DEBUG] Debug log can now log referer URL.
-* [DEBUG] Changes to options will now be logged.
-
-= 2.4.3 - Aug 27 2018 =
-* [NEW] Media Ability to inline image lazyload JS library. (@Music47ell)
-* [IMPROVEMENT] Media Deleting images will now clear related optimization file & info too.
-* [IMPROVEMENT] Media Non-image postfix data will now be bypassed before sending image optimization request.
-* [BUGFIX] CDN CDN URL will no longer be replaced during admin ajax call. (@pankaj)
-* [BUGFIX] CLI WPCLI can now save options without incorrectly clearing textarea items. (@Shon)
-* [GUI] Moved Settings above Manage on the main menu.
-
-= 2.4.2 - Aug 21 2018 =
-* [IMPROVEMENT] Media Sped up Image Optimization process by replacing IAPI server pull communication.
-* [IMPROVEMENT] Media Ability to delete optimized WebP/original image by item in Media Library. (@redgoodapple)
-* [IMPROVEMENT] CSS Optimize Generate new optimized CSS name based on purge timestamp. Allows CSS cache to be cleared for visitors. (@bradbrownmagic)
-* [IMPROVEMENT] API added litespeed_img_optm_options_per_image. (@gintsg)
-* [UPDATE] Stopped showing "No Image Found" message when all images have finished optimization. (@knutsp)
-* [UPDATE] Improved a PHP warning when saving settings. (@sergialarconrecio)
-* [UPDATE] Changed backend adminbar icon default behavior from Purge All to Purge LSCache.
-* [UPDATE] Clearing CCSS cache will clear unfinished queue too.
-* [UPDATE] Added "$" exact match when adding URL by frontend adminbar dropdown menu, to avoid affecting any sub-URLs.
-* [UPDATE] Fixed IAPI error message showing array bug. (@thiomas)
-* [UPDATE] Debug Disable All will do a Purge All.
-* [UPDATE] Critical CSS server IP changed to 142.93.3.57.
-* [GUI] Showed plugin update link for IAPI version message.
-* [GUI] Bypassed null IAPI response message.
-* [GUI] Grouped related settings with indent.
-* [IAPI] Added 503 handler for IAPI response.
-* [IAPI] IAPI v2.4.2.
-* [IAPI] Center Server IP Changed from 34.198.229.186 to 142.93.112.87.
-
-= 2.4.1 - Jul 19 2018 =
-* [NEW FEATURE] Media Auto Level Up. Auto refill credit.
-* [NEW FEATURE] Media Auto delete original backups after pulled. (@borisov87 @JMCA2)
-* [NEW FEATURE] Media Auto request image optimization. (@ericsondr)
-* [IMPROVEMENT] Media Fetch 404 error will notify client as other errors.
-* [IMPROVEMENT] Media Support WebP for PageSpeed Insights. (@LucasRolff)
-* [BUGFIX] CLI Fixed the issue where CLI import/export caused certain textarea settings to be lost. (#767519)
-* [BUGFIX] CSS Optimize Fixed the issue that duplicated optimized CSS and caused rapid expansion of CSS cache folder.
-* [GUI] Media Refactored operation workflow and interface.
-* [UPDATE] Media Set timeout seconds to avoid pulling timeout. (@Jose)
-* [UPDATE] CDNFixed the notice when no path is in URL. (@sabitkamera)
-* [UPDATE] Media Auto correct credits when pulling.
-* [UPDATE] GUI Removed redundant double quote in gui.cls. (@DaveyJake)
-* [IAPI] IAPI v2.4.1.
-* [IAPI] Allow new error status notification and success message from IAPI.
-
-= 2.4 - Jul 2 2018 =
-* [NEW FEATURE] Media Added lossless optimization.
-* [NEW FEATURE] Media Added Request Orignal Images ON/OFF.
-* [NEW FEATURE] Media Added Request WebP ON/OFF. (@JMCA2)
-* [IMPROVEMENT] Media Improved optimization tools to archive maximum compression and score.
-* [IMPROVEMENT] Media Improved speed of image pull.
-* [IMPROVEMENT] Media Automatically recover credit after pulled.
-* [REFACTOR] Config Separated configure const class.
-* [BUGFIX] Report Report can be sent successfully with emoji now. (@music47ell)
-* [IAPI] New Europe Image Optimization server (EU3/EU4).
-* [IAPI] New America Image Optimization server (US3/US4/US5/US6).
-* [IAPI] New Asian Image Optimization server (AS3).
-* [IAPI] Refactored optimization process.
-* [IAPI] Increased credit limit.
-* [IAPI] Removed request interval limit.
-* [IAPI] IAPI v2.4.
-* We strongly recommended that you re-optimize your image library to get a better compression result.
-
-= 2.3.1 - Jun 18 2018 =
-* [IMPROVEMENT] New setting to disable Generate Critical CSS. (@cybmeta)
-* [IMPROVEMENT] Added filter to can_cdn/can_optm check. (@Jacob)
-* [UPDATE] *Critical CSS* Added 404 css. Limit cron interval.
-* [UPDATE] AJAX will not bypass CDN anymore by default. (@Jacob)
-* [GUI] Show Disable All Features warning if it is on in Debug tab.
-
-= 2.3 - Jun 13 2018 =
-* [NEW FEATURE] Automatically generate critical CSS. (@joeee @ivan_ivanov @3dseo)
-* [BUGFIX] "Mark this page as..." from dropdown menu will not reset settings anymore. (@cbratschi)
-
-= 2.2.7 - Jun 4 2018 =
-* [IMPROVEMENT] Improved redirection for manual image pull to avoid too many redirections warning.
-* [IAPI] Increased credit limit.
-* [BUGFIX] Fixed 503 error when enabling log filters in Debug tab. (#525206)
-* [UPDATE] Improve compatibility when using sitemap url on servers with allow_url_open off.
-* [UPDATE] Removed Crawler HTTP2 option due to causing no-cache blacklist issue for certain environments.
-* [UPDATE] Privacy policy can be now translated. (@Josemi)
-* [UPDATE] IAPI Increased default img request max to 3000.
-
-= 2.2.6 - May 24 2018 =
-* [NEW FEATURE] Original image backups can be removed now. (@borisov87 @JMCA2)
-* [BUGFIX] Role Excludes in Tuning tab can save now. (@pako69)
-* [UPDATE] Added privacy policy support.
-
-= 2.2.5 - May 14 2018 =
-* [IAPI] Image Optimization New Asian Image Optimization server (AS2).
-* [INTEGRATION] Removed wpForo 3rd party file. (@massimod)
-
-= 2.2.4 - May 7 2018 =
-* [IMPROVEMENT] Improved compatibility with themes using the same js_min library. (#129093 @Darren)
-* [BUGFIX] Fixed a bug when checking image path for dynamic files. (@miladk)
-* [INTEGRATION] Compatibility with Universal Star Rating. (@miladk)
-
-= 2.2.3 - Apr 27 2018 =
-* [NEW FEATURE] WebP For Extra srcset setting in Media tab. (@vengen)
-* [REFACTOR] Removed redundant LS consts.
-* [REFACTOR] Refactored adv_cache generation flow.
-* [BUGFIX] Fixed issue where inline JS minify exception caused a blank page. (@oomskaap @kenb1978)
-* [UPDATE] Changed HTTP/2 Crawl default value to OFF.
-* [UPDATE] Added img.data-src to default WebP replacement value for WooCommerce WebP support.
-* [UPDATE] Detached crawler from LSCache LITESPEED_ON status.
-* [API] Improved ESI API to honor the cache control in ESI wrapper.
-* [API] Added LITESPEED_PURGE_SILENT const to bypass the notification when purging
-* [INTEGRATION] Fixed issue with nonce expiration when using ESI API. (#923505 @Dan)
-* [INTEGRATION] Improved compatibility with Ninja Forms by bypassing non-javascript JS from inline JS minify.
-* [INTEGRATION] Added a hook for plugins that change the CSS/JS path e.g. Hide My WordPress.
-
-= 2.2.2 - Apr 16 2018 =
-* [NEW FEATURE] WebP Attribute To Replace setting in Media tab. (@vengen)
-* [IMPROVEMENT] Generate adv_cache file automatically when it is lost.
-* [IMPROVEMENT] Improved compatibility with ajax login. (@veganostomy)
-* [UPDATE] Added object cache lib check in case user downgrades LSCWP to non-object-cache versions.
-* [UPDATE] Avoided infinite loop when users enter invalid hook values in Purge All Hooks settings.
-* [UPDATE] Updated log format in media&cdn class.
-* [UPDATE] Added more items to Report.
-
-= 2.2.1 - Apr 10 2018 =
-* [NEW FEATURE] Included Directories setting in CDN tab. (@Dave)
-* [NEW FEATURE] Purge All Hooks setting in Advanced tab.
-* [UPDATE] Added background-image WebP replacement support. (@vengen)
-* [UPDATE] Show recommended values for textarea items in settings.
-* [UPDATE] Moved CSS/JS optimizer log to Advanced level.
-* [INTEGRATION] Added WebP support for Avada Fusion Sliders. (@vengen)
-
-= 2.2.0.2 - Apr 3 2018 =
-* [HOTFIX] Object Cache Fixed the PHP warning caused by previous improvement to Object Cache.
-
-= 2.2.0.1 - Apr 3 2018 =
-* [HOTFIX] Object parameter will no longer cause warnings to be logged for Purge and Cache classes. (@kelltech @khrifat)
-* [UPDATE] Removed duplicated del_file func from Object Cache class.
-* [BUGFIX] `CLI` no longer shows 400 error upon successful result.
-
-= 2.2 - Apr 2 2018 =
-* [NEW FEATURE] Debug Disable All Features setting in Debug tab. (@monarobase)
-* [NEW FEATURE] Cache Force Cacheable URIs setting in Excludes tab.
-* [NEW FEATURE] Purge Purge all LSCache and other caches in one link.
-* [REFACTOR] Purge Refactored Purge class.
-* [BUGFIX] Query strings in DoNotCacheURI setting now works.
-* [BUGFIX] Cache Mobile cache compatibility with WebP vary. (@Shivam #987121)
-* [UPDATE] Purge Moved purge_all to Purge class from core class.
-* [API] Set cacheable/Set force cacheable. (@Jacob)
-
-= 2.1.2 - Mar 28 2018 =
-* [NEW FEATURE] Image Optimization Clean Up Unfinished Data feature.
-* [IAPI] IAPI v2.1.2.
-* [IMPROVEMENT] CSS/JS Minify Reduced loading time significantly by improving CSS/JS minify loading process. (@kokers)
-* [IMPROVEMENT] CSS/JS Minify Cache empty JS Minify content. (@kokers)
-* [IMPROVEMENT] Cache Cache 301 redirect when scheme/host are same.
-* [BUGFIX] Media Lazy load now can support WebP. (@relle)
-* [UPDATE] CSS/JS Optimize Serve static files for CSS async & lazy load JS library.
-* [UPDATE] Report Appended Basic/Advanced View setting to Report.
-* [UPDATE] CSS/JS Minify Removed zero-width space from CSS/JS content.
-* [GUI] Added Purge CSS/JS Cache link in Admin.
-
-= 2.1.1.1 - Mar 21 2018 =
-* [BUGFIX] Fixed issue where activation failed to add rules to .htaccess.
-* [BUGFIX] Fixed issue where 304 header was blank on feed page refresh.
-
-= 2.1.1 - Mar 20 2018 =
-* [NEW FEATURE] Browser Cache Unlocked for non-LiteSpeed users.
-* [IMPROVEMENT] Image Optimization Fixed issue where images with bad postmeta value continued to show in not-yet-requested queue.
-
-= 2.1 - Mar 15 2018 =
-* [NEW FEATURE] Image Optimization Unlocked for non-LiteSpeed users.
-* [NEW FEATURE] Object Cache Unlocked for non-LiteSpeed users.
-* [NEW FEATURE] Crawler Unlocked for non-LiteSpeed users.
-* [NEW FEATURE] Database Cleaner and Optimizer Unlocked for non-LiteSpeed users.
-* [NEW FEATURE] Lazy Load Images Unlocked for non-LiteSpeed users.
-* [NEW FEATURE] CSS/JS/HTML Minify/Combine Optimize Unlocked for non-LiteSpeed users.
-* [IAPI] IAPI v2.0.
-* [IAPI] Increased max rows prefetch when client has additional credit.
-* [IMPROVEMENT] CDN Multiple domains may now be used.
-* [IMPROVEMENT] Report Added WP environment constants for better debugging.
-* [REFACTOR] Separated Cloudflare CDN class.
-* [BUGFIX] Image Optimization Fixed issue where certain MySQL version failed to create img_optm table. (@philippwidmer)
-* [BUGFIX] Image Optimization Fixed issue where callback validation failed when pulling and sending request simultaneously.
-* [GUI] Added Slack community banner.
-* [INTEGRATION] CDN compatibility with WPML multiple domains. (@egemensarica)
-
-= 2.0 - Mar 7 2018 =
-* [NEW FEATURE] Image Optimization Added level up guidance.
-* [REFACTOR] Image Optimization Refactored Image Optimization class.
-* [IAPI] Image Optimization New European Image Optimization server (EU2).
-* [IMPROVEMENT] Image Optimization Manual pull action continues pulling until complete.
-* [IMPROVEMENT] CDN Multiple CDNs can now be randomized for a single resource.
-* [IMPROVEMENT] Image Optimization Improved compatibility of long src images.
-* [IMPROVEMENT] Image Optimization Reduced runtime load.
-* [IMPROVEMENT] Image Optimization Avoid potential loss/reset of notified images status when pulling.
-* [IMPROVEMENT] Image Optimization Avoid duplicated optimization for multiple records in Media that have the same image source.
-* [IMPROVEMENT] Image Optimization Fixed issue where phantom images continued to show in not-yet-requested queue.
-* [BUGFIX] Core Improved compatibility when upgrading outside of WP Admin. (@jikatal @TylorB)
-* [BUGFIX] Crawler Improved HTTP/2 compatibility to avoid erroneous blacklisting.
-* [BUGFIX] Crawler Changing Delay setting will use server variable for min value validation if set.
-* [UPDATE] Crawler Added HTTP/2 protocol switch in the Crawler settings.
-* [UPDATE] Removed unnecessary translation strings.
-* [GUI] Display translated role group name string instead of English values. (@Richard Hordern)
-* [GUI] Added Join LiteSpeed Slack link.
-* [GUI] Import / Export Cosmetic changes to Import Settings file field.
-* [INTEGRATION] Improved compatibility with WPML Media for Image Optimization. (@szmigieldesign)
-
-= 1.9.1.1 - February 20 2018 =
-* [Hotfix] Removed empty crawler when no role simulation is set.
-
-= 1.9.1 - February 20 2018 =
-* [NEW FEATURE] Role Simulation crawler.
-* [NEW FEATURE] WebP multiple crawler.
-* [NEW FEATURE] HTTP/2 support for crawler.
-* [BUGFIX] Fixed a js bug with the auto complete mobile user agents field when cache mobile is turned on.
-* [BUGFIX] Fixed a constant undefined warning after activation.
-* [GUI] Sitemap generation settings are no longer hidden when using a custom sitemap.
-
-= 1.9 - February 12 2018 =
-* [NEW FEATURE] Inline CSS/JS Minify.
-* [IMPROVEMENT] Removed Composer vendor to thin the plugin folder.
-* [UPDATE] Tweaked H2 to H1 in Admin headings for accessibility. (@steverep)
-* [GUI] Added Mobile User Agents to basic view.
-* [GUI] Moved Object Cache & Browser Cache from Cache tab to Advanced tab.
-* [GUI] Moved LSCache Purge All from Adminbar to dropdown menu.
-
-= 1.8.3 - February 2 2018 =
-* [NEW FEATURE] Crawler server variable limitation support.
-* [IMPROVEMENT] Added Store Transients option to fix transients missing issue when Cache Wp-Admin setting is OFF.
-* [IMPROVEMENT] Tweaked ARIA support. (@steverep)
-* [IMPROVEMENT] Used strpos instead of strncmp for performance. (@Zach E)
-* [BUGFIX] Transient cache can now be removed when the Cache Wp-Admin setting is ON in Object Cache.
-* [BUGFIX] Network sites can now save Advanced settings.
-* [BUGFIX] Media list now shows in network sites.
-* [BUGFIX] Show Crawler Status button is working again.
-* [UPDATE] Fixed a couple of potential PHP notices in the Network cache tab and when no vary group is set.
-* [GUI] Added Learn More link to all setting pages.
-
-= 1.8.2 - January 29 2018 =
-* [NEW FEATURE] Instant Click in the Advanced tab.
-* [NEW FEATURE] Import/Export settings.
-* [NEW FEATURE] Opcode Cache support.
-* [NEW FEATURE] Basic/Advanced setting view.
-* [IMPROVEMENT] Added ARIA support in widget settings.
-* [BUGFIX] Multiple WordPress instances with same Object Cache address will no longer see shared data.
-* [BUGFIX] WebP Replacement may now be set at the Network level.
-* [BUGFIX] Object Cache file can now be removed at the Network level uninstall.
-
-= 1.8.1 - January 22 2018 =
-* [NEW FEATURE] Object Cache now supports Redis.
-* [IMPROVEMENT] Memcached Object Cache now supports authorization.
-* [IMPROVEMENT] A 500 error will no longer be encountered when turning on Object Cache without the proper PHP extension installed.
-* [BUGFIX] Object Cache settings can now be saved at the Network level.
-* [BUGFIX] Mu-plugin now supports Network setting.
-* [BUGFIX] Fixed admin bar showing inaccurate Edit Page link.
-* [UPDATE] Removed warning information when no Memcached server is available.
-
-= 1.8 - January 17 2018 =
-* [NEW FEATURE] Object Cache.
-* [REFACTOR] Refactored Log class.
-* [REFACTOR] Refactored LSCWP basic const initialization.
-* [BUGFIX] Fixed Cloudflare domain search breaking when saving more than 50 domains under a single account.
-* [UPDATE] Log filter settings are now their own item in the wp-option table.
-
-= 1.7.2 - January 5 2018 =
-* [NEW FEATURE] Cloudflare API support.
-* [IMPROVEMENT] IAPI key can now be reset to avoid issues when domain is changed.
-* [BUGFIX] Fixed JS optimizer breaking certain plugins JS.
-* [UPDATE] Added cdn settings to environment report.
-* [GUI] Added more shortcuts to backend adminbar.
-* [INTEGRATION] WooCommerce visitors are now served from public cache when cart is empty.
-
-= 1.7.1.1 - December 29 2017 =
-* [BUGFIX] Fixed an extra trailing underscore issue when saving multiple lines with DNS Prefetch.
-* [UPDATE] Cleaned up unused dependency vendor files.
-
-= 1.7.1 - December 28 2017 =
-* [NEW FEATURE] Added DNS Prefetch setting on the Optimize page.
-* [NEW FEATURE] Added Combined File Max Size setting on the Tuning page.
-* [IMPROVEMENT] Improved JS/CSS minify to achieve higher page scores.
-* [IMPROVEMENT] Optimized JS/CSS files will not be served from private cache for OLS or with ESI off.
-* [UPDATE] Fixed a potential warning for new installations on the Settings page.
-* [UPDATE] Fixed an issue with guest users occasionally receiving PHP warnings.
-* [BUGFIX] Fixed a bug with the Improve HTTPS Compatibility setting failing to save.
-* Thanks to all of our users for your encouragement and support! Happy New Year!
-* PS: Lookout 2018, we're back!
-
-= 1.7 - December 22 2017 =
-* [NEW FEATURE] Drop Query Strings setting in the Cache tab.
-* [NEW FEATURE] Multiple CDN Mapping in the CDN tab.
-* [IMPROVEMENT] Improve HTTP/HTTPS Compatibility setting in the Advanced tab.
-* [IMPROVEMENT] Keep JS/CSS original position in HTML when excluded in setting.
-* [IAPI] Reset client level credit after Image Optimization data is destroyed.
-* [REFACTOR] Refactored build_input/textarea functions in admin_display class.
-* [REFACTOR] Refactored CDN class.
-* [GUI] Added a notice to Image Optimization and Crawler to warn when cache is disabled.
-* [GUI] Improved image optimization indicator styles in Media Library List.
-
-= 1.6.7 - December 15 2017 =
-* [IAPI] Added ability to scan for new image thumbnail sizes and auto-resend image optimization requests.
-* [IAPI] Added ability to destroy all optimization data.
-* [IAPI] Updated IAPI to v1.6.7.
-* [INTEGRATION] Fixed certain 3rd party plugins calling REST without user nonce causing logged in users to be served as guest.
-
-= 1.6.6.1 - December 8 2017 =
-* [IAPI] Limit first-time submission to one image group for test-run purposes.
-* [BUGFIX] Fixed vary group generation issue associated with custom user role plugins.
-* [BUGFIX] Fixed WooCommerce issue where logged-in users were erroneously purged when ESI is off.
-* [BUGFIX] Fixed WooCommerce cache miss issue when ESI is off.
-
-= 1.6.6 - December 6 2017 =
-* [NEW FEATURE] Preserve EXIF in Media setting.
-* [NEW FEATURE] Clear log button in Debug Log Viewer.
-* [IAPI] Fixed notified images resetting to previous status when pulling.
-* [IAPI] Fixed HTTPS compatibility for image optimization initialization.
-* [IAPI] An error message is now displayed when image optimization request submission is bypassed due to a lack of credit.
-* [IAPI] IAPI v1.6.6.
-* [IMPROVEMENT] Support JS data-no-optimize attribute to bypass optimization.
-* [GUI] Added image group wiki link.
-* [INTEGRATION] Improved compatibility with Login With Ajax.
-* [INTEGRATION] Added function_exists check for WooCommerce to avoid 500 errors.
-
-= 1.6.5.1 - December 1 2017 =
-* [HOTFIX] Fixed warning message on Edit .htaccess page.
-
-= 1.6.5 - November 30 2017 =
-* [IAPI] Manually pull image optimization action button.
-* [IAPI] Automatic credit system for image optimization to bypass unfinished image optimization error.
-* [IAPI] Notify failed images from LiteSpeed's Image Server.
-* [IAPI] Reset/Clear failed images feature.
-* [IAPI] Redesigned report page.
-* [REFACTOR] Moved pull_img logic from admin_api to media.
-* [BUGFIX] Fixed a compatibility issue for clients who have allow_url_open setting off.
-* [BUGFIX] Fixed logged in users sometimes being served from guest cache.
-* [UPDATE] Environment report is no longer saved to a file.
-* [UPDATE] Removed crawler reset notification.
-* [GUI] Added more details on image optimization.
-* [GUI] Removed info page from admin menu.
-* [GUI] Moved environment report from network level to single site level.
-* [GUI] Crawler time added in a user friendly format.
-* [INTEGRATION] Improved compatibility with FacetWP json call.
-
-= 1.6.4 - November 22 2017 =
-* [NEW FEATURE] Send env reports privately with a new built-in report number referral system.
-* [IAPI] Increased request timeout to fix a cUrl 28 timeout issue.
-* [BUGFIX] Fixed a TTL max value validation bug.
-* [INTEGRATION] Improved Contact Form 7 REST call compatibility for logged in users.
-* Thanks for all your ratings. That encouraged us to be more diligent. Happy Thanksgiving.
-
-= 1.6.3 - November 17 2017 =
-* [NEW FEATURE] Only async Google Fonts setting.
-* [NEW FEATURE] Only create WebP images when optimizing setting.
-* [NEW FEATURE] Batch switch images to original/optimized versions in Image Optimization.
-* [NEW FEATURE] Browser Cache TTL setting.
-* [NEW FEATURE] Cache WooCommerce Cart setting.
-* [IMPROVEMENT] Moved optimized JS/CSS snippet in header html to after meta charset.
-* [IMPROVEMENT] Added a constant for better JS/CSS optimization compatibility for different dir WordPress installation.
-* [IAPI] Take over failed callback check instead of bypassing it.
-* [IAPI] Image optimization requests are now limited to 500 images per request.
-* [BUGFIX] Fixed a parsing failure bug not using attributes in html elements with dash.
-* [BUGFIX] Fixed a bug causing non-script code to move to the top of a page when not using combination.
-* [UPDATE] Added detailed logs for external link detection.
-* [UPDATE] Added new lines in footer comment to avoid Firefox crash when enabled HTML minify.
-* [API] `Purge private` / `Purge private all` / `Add private tag` functions.
-* [GUI] Redesigned image optimization operation links in Media Lib list.
-* [GUI] Tweaked wp-admin form save button position.
-* [GUI] Added "learn more" link for image optimization.
-
-= 1.6.2.1 - November 6 2017 =
-* [INTEGRATION] Improved compatibility with old WooCommerce versions to avoid unknown 500 errors.
-* [BUGFIX] Fixed WebP images sometimes being used in non-supported browsers.
-* [BUGFIX] Kept query strings for HTTP/2 push to avoid re-fetching pushed sources.
-* [BUGFIX] Excluded JS/CSS from HTTP/2 push when using CDN.
-* [GUI] Fixed a typo in Media list.
-* [GUI] Made more image optimization strings translatable.
-* [GUI] Updated Tuning description to include API documentation.
-
-= 1.6.2 - November 3 2017 =
-* [NEW FEATURE] Do Not Cache Roles.
-* [NEW FEATURE] Use WebP Images for supported browsers.
-* [NEW FEATURE] Disable Optimization Poll ON/OFF Switch in Media tab.
-* [NEW FEATURE] Revert image optimization per image in Media list.
-* [NEW FEATURE] Disable/Enable image WebP per image in Media list.
-* [IAPI] Limit optimized images fetching cron to a single process.
-* [IAPI] Updated IAPI to v1.6.2.
-* [IAPI] Fixed repeating image request issue by adding a failure status to local images.
-* [REFACTOR] Refactored login vary logic.
-
-= 1.6.1 - October 29 2017 =
-* [IAPI] Updated LiteSpeed Image Optimization Server API to v1.6.1.
-
-= 1.6 - October 27 2017 =
-* [NEW FEATURE] Image Optimization.
-* [NEW FEATURE] Role Excludes for Optimization.
-* [NEW FEATURE] Combined CSS/JS Priority.
-* [IMPROVEMENT] Bypass CDN for login/register page.
-* [UPDATE] Expanded ExpiresByType rules to include new font types. ( Thanks to JMCA2 )
-* [UPDATE] Removed duplicated type param in admin action link.
-* [BUGFIX] Fixed CDN wrongly replacing img base64 and "fake" src in JS.
-* [BUGFIX] Fixed image lazy load replacing base64 src.
-* [BUGFIX] Fixed a typo in Optimize class exception.
-* [GUI] New Tuning tab in admin settings panel.
-* [REFACTOR] Simplified router by reducing actions and adding types.
-* [REFACTOR] Renamed `run()` to `finalize()` in buffer process.
-
-= 1.5 - October 17 2017 =
-* [NEW FEATURE] Exclude JQuery (to fix inline JS error when using JS Combine).
-* [NEW FEATURE] Load JQuery Remotely.
-* [NEW FEATURE] JS Deferred Excludes.
-* [NEW FEATURE] Lazy Load Images Excludes.
-* [NEW FEATURE] Lazy Load Image Placeholder.
-* [IMPROVEMENT] Improved Lazy Load size attribute for w3c validator.
-* [UPDATE] Added basic caching info and LSCWP version to HTML comment.
-* [UPDATE] Added debug log to HTML detection.
-* [BUGFIX] Fixed potential font CORS issue when using CDN.
-* [GUI] Added API docs to setting description.
-* [REFACTOR] Relocated all classes under includes with backwards compatibility.
-* [REFACTOR] Relocated admin templates.
-
-= 1.4 - October 11 2017 =
-* [NEW FEATURE] Lazy load images/iframes.
-* [NEW FEATURE] Clean CSS/JS optimizer data functionality in DB Optimizer panel.
-* [NEW FEATURE] Exclude certain URIs from optimizer.
-* [IMPROVEMENT] Improved optimizer HTML check compatibility to avoid conflicts with ESI functions.
-* [IMPROVEMENT] Added support for using ^ when matching the start of a path in matching settings.
-* [IMPROVEMENT] Added wildcard support in CDN original URL.
-* [IMPROVEMENT] Moved optimizer table initialization to admin setting panel with failure warning.
-* [UPDATE] Added a one-time welcome banner.
-* [UPDATE] Partly relocated class: 'api'.
-* [API] Added API wrapper for removing wrapped HTML output.
-* [INTEGRATION] Fixed WooCommerce conflict with optimizer.
-* [INTEGRATION] Private cache support for WooCommerce v3.2.0+.
-* [GUI] Added No Optimization menu to frontend.
-
-= 1.3.1.1 - October 6 2017 =
-* [BUGFIX] Improved optimizer table creating process in certain database charset to avoid css/js minify/combination failure.
-
-= 1.3.1 - October 5 2017 =
-* [NEW FEATURE] Remove WP Emoji Option.
-* [IMPROVEMENT] Separated optimizer data from wp_options to improve compatibility with backup plugins.
-* [IMPROVEMENT] Enhanced crawler cron hook to prevent de-scheduling in some cases.
-* [IMPROVEMENT] Enhanced Remove Query Strings to also remove Emoji query strings.
-* [IMPROVEMENT] Enhanced HTML detection when extra spaces are present at the beginning.
-* [UPDATE] Added private cache support for OLS.
-* [BUGFIX] Self-redirects are no longer cached.
-* [BUGFIX] Fixed css async lib warning when loading in HTTP/2 push.
-
-= 1.3 - October 1 2017 =
-* [NEW FEATURE] Added Browser Cache support.
-* [NEW FEATURE] Added Remove Query Strings support.
-* [NEW FEATURE] Added Remove Google Fonts support.
-* [NEW FEATURE] Added Load CSS Asynchronously support.
-* [NEW FEATURE] Added Load JS Deferred support.
-* [NEW FEATURE] Added Critical CSS Rules support.
-* [NEW FEATURE] Added Private Cached URIs support.
-* [NEW FEATURE] Added Do Not Cache Query Strings support.
-* [NEW FEATURE] Added frontend adminbar shortcuts ( Purge this page/Do Not Cache/Private cache ).
-* [IMPROVEMENT] Do Not Cache URIs now supports full URLs.
-* [IMPROVEMENT] Improved performance of Do Not Cache settings.
-* [IMPROVEMENT] Encrypted vary cookie.
-* [IMPROVEMENT] Enhanced HTML optimizer.
-* [IMPROVEMENT] Limited combined file size to avoid heavy memory usage.
-* [IMPROVEMENT] CDN supports custom upload folder for media files.
-* [API] Added purge single post API.
-* [API] Added version compare API.
-* [API] Enhanced ESI API for third party plugins.
-* [INTEGRATION] Compatibility with NextGEN Gallery v2.2.14.
-* [INTEGRATION] Compatibility with Caldera Forms v1.5.6.2+.
-* [BUGFIX] Fixed CDN&Minify compatibility with css url links.
-* [BUGFIX] Fixed .htaccess being regenerated despite there being no changes.
-* [BUGFIX] Fixed CDN path bug for subfolder WP instance.
-* [BUGFIX] Fixed crawler path bug for subfolder WP instance with different site url and home url.
-* [BUGFIX] Fixed a potential Optimizer generating redundant duplicated JS in HTML bug.
-* [GUI] Added a more easily accessed submit button in admin settings.
-* [GUI] Admin settings page cosmetic changes.
-* [GUI] Reorganized GUI css/img folder structure.
-* [REFACTOR] Refactored configuration init.
-* [REFACTOR] Refactored admin setting save.
-* [REFACTOR] Refactored .htaccess operator and rewrite rule generation.
-
-= 1.2.3.1 - September 20 2017 =
-* [UPDATE] Improved PHP5.3 compatibility.
-
-= 1.2.3 - September 20 2017 =
-* [NEW FEATURE] Added CDN support.
-* [IMPROVEMENT] Improved compatibility when upgrading by fixing a possible fatal error.
-* [IMPROVEMENT] Added support for custom wp-content paths.
-* [BUGFIX] Fixed non-primary network blogs not being able to minify.
-* [BUGFIX] Fixed HTML Minify preventing Facebook from being able to parse og tags.
-* [BUGFIX] Preview page is no longer cacheable.
-* [BUGFIX] Corrected log and crawler timezone to match set WP timezone.
-* [GUI] Revamp of plugin GUI.
-
-= 1.2.2 - September 15 2017 =
-* [NEW FEATURE] Added CSS/JS minification.
-* [NEW FEATURE] Added CSS/JS combining.
-* [NEW FEATURE] Added CSS/JS HTTP/2 server push.
-* [NEW FEATURE] Added HTML minification.
-* [NEW FEATURE] Added CSS/JS cache purge button in management.
-* [UPDATE] Improved debug log formatting.
-* [UPDATE] Fixed some description typos.
-
-= 1.2.1 - September 7 2017 =
-* [NEW FEATURE] Added Database Optimizer.
-* [NEW FEATURE] Added Tab switch shortcut.
-* [IMPROVEMENT] Added cache disabled check for management pages.
-* [IMPROVEMENT] Renamed .htaccess backup for security.
-* [BUGFIX] Fixed woocommerce default ESI setting bug.
-* [REFACTOR] Show ESI page for OLS with notice.
-* [REFACTOR] Management Purge GUI updated.
-
-= 1.2.0.1 - September 1 2017 =
-* [BUGFIX] Fixed a naming bug for network constant ON2.
-
-= 1.2.0 - September 1 2017 =
-* [NEW FEATURE] Added ESI support.
-* [NEW FEATURE] Added a private cache TTL setting.
-* [NEW FEATURE] Debug level can now be set to either 'Basic' or 'Advanced'.
-* [REFACTOR] Renamed const 'NOTSET' to 'ON2' in class config.
-
-= 1.1.6 - August 23 2017 =
-* [NEW FEATURE] Added option to privately cache logged-in users.
-* [NEW FEATURE] Added option to privately cache commenters.
-* [NEW FEATURE] Added option to cache requests made through WordPress REST API.
-* [BUGFIX] Fixed network 3rd-party full-page cache detection bug.
-* [GUI] New Cache and Purge menus in Settings.
-
-= 1.1.5.1 - August 16 2017 =
-* [IMPROVEMENT] Improved compatibility of frontend&backend .htaccess path detection when site url is different than installation path.
-* [UPDATE] Removed unused format string from header tags.
-* [BUGFIX] 'showheader' Admin Query String now works.
-* [REFACTOR] Cache tags will no longer output if not needed.
-
-= 1.1.5 - August 10 2017 =
-* [NEW FEATURE] Scheduled Purge URLs feature.
-* [NEW FEATURE] Added buffer callback to improve compatibility with some plugins that force buffer cleaning.
-* [NEW FEATURE] Hide purge_all admin bar quick link if cache is disabled.
-* [NEW FEATURE] Required htaccess rules are now displayed when .htaccess is not writable.
-* [NEW FEATURE] Debug log features: filter log support; heartbeat control; log file size limit; log viewer.
-* [IMPROVEMENT] Separate crawler access log.
-* [IMPROVEMENT] Lazy PURGE requests made after output are now queued and working.
-* [IMPROVEMENT] Improved readme.txt with keywords relating to our compatible plugins list.
-* [UPDATE] 'ExpiresDefault' conflict msg is now closeable and only appears in the .htaccess edit screen.
-* [UPDATE] Improved debug log formatting.
-* [INTEGRATION] Compatibility with MainWP plugin.
-* [BUGFIX] Fixed Woocommerce order not purging product stock quantity.
-* [BUGFIX] Fixed Woocommerce scheduled sale price not updating issue.
-* [REFACTOR] Combined cache_enable functions into a single function.
-
-= 1.1.4 - August 1 2017 =
-* [IMPROVEMENT] Unexpected rewrite rules will now show an error message.
-* [IMPROVEMENT] Added Cache Tag Prefix setting info in the Env Report and Info page.
-* [IMPROVEMENT] LSCWP setting link is now displayed in the plugin list.
-* [IMPROVEMENT] Improved performance when setting cache control.
-* [UPDATE] Added backward compatibility for v1.1.2.2 API calls. (used by 3rd-party plugins)
-* [BUGFIX] Fixed WPCLI purge tag/category never succeeding.
-
-= 1.1.3 - July 31 2017 =
-* [NEW FEATURE] New LiteSpeed_Cache_API class and documentation for 3rd party integration.
-* [NEW FEATURE] New API function litespeed_purge_single_post($post_id).
-* [NEW FEATURE] PHP CLI support for crawler.
-* [IMPROVEMENT] Set 'no cache' for same location 301 redirects.
-* [IMPROVEMENT] Improved LiteSpeed footer comment compatibility.
-* [UPDATE] Removed 'cache tag prefix' setting.
-* [BUGFIX] Fixed a bug involving CLI purge all.
-* [BUGFIX] Crawler now honors X-LiteSpeed-Cache-Control for the 'no-cache' header.
-* [BUGFIX] Cache/rewrite rules are now cleared when the plugin is uninstalled.
-* [BUGFIX] Prevent incorrect removal of the advanced-cache.php on deactivation if it was added by another plugin.
-* [BUGFIX] Fixed subfolder WP installations being unable to Purge By URL using a full URL path.
-* [REFACTOR] Reorganized existing code for an upcoming ESI release.
-
-= 1.1.2.2 - July 13 2017 =
-* [BUGFIX] Fixed blank page in Hebrew language post editor by removing unused font-awesome and jquery-ui css libraries.
-
-= 1.1.2.1 - July 5 2017 =
-* [UPDATE] Improved compatibility with WooCommerce v3.1.0.
-
-= 1.1.2 - June 20 2017 =
-* [BUGFIX] Fixed missing form close tag.
-* [UPDATE] Added a wiki link for enabling the crawler.
-* [UPDATE] Improved Site IP description.
-* [UPDATE] Added an introduction to the crawler on the Information page.
-* [REFACTOR] Added more detailed error messages for Site IP and Custom Sitemap settings.
-
-= 1.1.1.1 - June 15 2017 =
-* [BUGFIX] Hotfix for insufficient validation of site IP value in crawler settings.
-
-= 1.1.1 - June 15 2017 =
-* [NEW] As of LiteSpeed Web Server v.5.1.16, the crawler can now be enabled/disabled at the server level.
-* [NEW] Added the ability to provide a custom sitemap for crawling.
-* [NEW] Added ability to use site IP address directly in crawler settings.
-* [NEW] Crawler performance improved with the use of new custom user agent 'lsrunner'.
-* [NEW] "Purge By URLs" now supports full URL paths.
-* [NEW] Added thirdparty WP-PostRatings compatibility.
-* [BUGFIX] Cache is now cleared when changing post status from published to draft.
-* [BUGFIX] WHM activation message no longer continues to reappear after being dismissed.
-* [COSMETIC] Display recommended values for settings.
-
-= 1.1.0.1 - June 8 2017 =
-* [UPDATE] Improved default crawler interval setting.
-* [UPDATE] Tested up to WP 4.8.
-* [BUGFIX] Fixed compatibility with plugins that output json data.
-* [BUGFIX] Fixed tab switching bug.
-* [BUGFIX] Removed occasional duplicated messages on save.
-* [COSMETIC] Improved crawler tooltips and descriptions.
-
-= 1.1.0 - June 6 2017 =
-* [NEW] Added a crawler - this includes configuration options and a dedicated admin page. Uses wp-cron
-* [NEW] Added integration for WPLister
-* [NEW] Added integration for Avada
-* [UPDATE] General structure of the plugin revamped
-* [UPDATE] Improved look of admin pages
-* [BUGFIX] Fix any/all wp-content path retrieval issues
-* [BUGFIX] Use realpath to clear symbolic link when determining .htaccess paths
-* [BUGFIX] Fixed a bug where upgrading multiple plugins did not trigger a purge all
-* [BUGFIX] Fixed a bug where cli import_options did not actually update the options.
-* [REFACTOR] Most of the files in the code were split into more, smaller files
-
-= 1.0.15 - April 20 2017 =
-* [NEW] Added Purge Pages and Purge Recent Posts Widget pages options.
-* [NEW] Added wp-cli command for setting and getting options.
-* [NEW] Added an import/export options cli command.
-* [NEW] Added wpForo integration.
-* [NEW] Added Theme My Login integration.
-* [UPDATE] Purge adjacent posts when publish a new post.
-* [UPDATE] Change environment report file to .php and increase security.
-* [UPDATE] Added new purgeby option to wp-cli.
-* [UPDATE] Remove nag for multiple sites.
-* [UPDATE] Only inject LiteSpeed javascripts in LiteSpeed pages.
-* [REFACTOR] Properly check for zero in ttl settings.
-* [BUGFIX] Fixed the 404 issue that can be caused by some certain plugins when save the settings.
-* [BUGFIX] Fixed mu-plugin compatibility.
-* [BUGFIX] Fixed problem with creating zip backup.
-* [BUGFIX] Fixed conflict with jetpack.
-
-= 1.0.14.1 - January 31 2017 =
-* [UPDATE] Removed Freemius integration due to feedback.
-
-= 1.0.14 - January 30 2017 =
-* [NEW] Added error page caching. Currently supports 403, 404, 500s.
-* [NEW] Added a purge errors action.
-* [NEW] Added wp-cli integration.
-* [UPDATE] Added support for multiple varies.
-* [UPDATE] Reorganize the admin interface to be less cluttered.
-* [UPDATE] Add support for LiteSpeed Web ADC.
-* [UPDATE] Add Freemius integration.
-* [REFACTOR] Made some changes so that the rewrite rules are a little more consistent.
-* [BUGFIX] Check member type before adding purge all button.
-* [BUGFIX] Fixed a bug where activating/deactivating the plugin quickly caused the WP_CACHE error to show up.
-* [BUGFIX] Handle more characters in the rewrite parser.
-* [BUGFIX] Correctly purge posts when they are made public/private.
-
-= 1.0.13.1 - November 30 2016 =
-* [BUGFIX] Fixed a bug where a global was being used without checking existence first, causing unnecessary log entries.
-
-= 1.0.13 - November 28 2016 =
-* [NEW] Add an Empty Entire Cache button.
-* [NEW] Add stale logic to certain purge actions.
-* [NEW] Add option to use primary site settings for all subsites in a multisite environment.
-* [NEW] Add support for Aelia CurrencySwitcher
-* [UPDATE] Add logic to allow third party vary headers
-* [UPDATE] Handle password protected pages differently.
-* [BUGFIX] Fixed bug caused by saving settings.
-* [BUGFIX] FIxed bug when searching for advanced-cache.php
-
-= 1.0.12 - November 14 2016 =
-* [NEW] Added logic to generate environment reports.
-* [NEW] Created a notice that will be triggered when the WHM Plugin installs this plugin. This will notify users when the plugin is installed by their server admin.
-* [NEW] Added the option to cache 404 pages via 404 Page TTL setting.
-* [NEW] Reworked log system to be based on selection of yes or no instead of log level.
-* [NEW] Added support for Autoptimize.
-* [NEW] Added Better WP Minify integration.
-* [UPDATE] On plugin disable, clear .htaccess.
-* [UPDATE] Introduced URL tag. Changed Purge by URL to use this new tag.
-* [BUGFIX] Fixed a bug triggered when .htaccess files were empty.
-* [BUGFIX] Correctly determine when to clear files in multisite environments (wp-config, advanced-cache, etc.).
-* [BUGFIX] When disabling the cache, settings changed in the same save will now be saved.
-* [BUGFIX] Various bugs from setting changes and multisite fixed.
-* [BUGFIX] Fixed two bugs with the .htaccess path search.
-* [BUGFIX] Do not alter $_GET in add_quick_purge. This may cause issues for functionality occurring later in the same request.
-* [BUGFIX] Right to left radio settings were incorrectly displayed. The radio buttons themselves were the opposite direction of the associated text.
-
-= 1.0.11 - October 11 2016 =
-* [NEW] The plugin will now set cachelookup public on.
-* [NEW] New option - check advanced-cache.php. This enables users to have two caching plugins enabled at the same time as long as the other plugin is not used for caching purposes. For example, using another cache plugin for css/js minification.
-* [UPDATE] Rules added by the plugin will now be inserted into an LSCACHE START/END PLUGIN comment block.
-* [UPDATE] For woocommerce pages, if a user visits a non-cached page with a non-empty cart, do not cache the page.
-* [UPDATE] If woocommerce needs to display any notice, do not cache the page.
-* [UPDATE] Single site settings are now in both the litespeed cache submenu and the settings submenu.
-* [BUGFIX] Multisite network options were not updated on upgrade. This is now corrected.
-
-= 1.0.10 - September 16 2016 =
-* Added a check for LSCACHE_NO_CACHE definition.
-* Added a Purge All button to the admin bar.
-* Added logic to purge the cache when upgrading a plugin or theme. By default this is enabled on single site installations and disabled on multisite installations.
-* Added support for WooCommerce Versions < 2.5.0.
-* Added .htaccess backup rotation. Every 10 backups, an .htaccess archive will be created. If one already exists, it will be overwritten.
-* Moved some settings to the new Specific Pages tab to reduce clutter in the General tab.
-* The .htaccess editor is now disabled if DISALLOW_FILE_EDIT is set.
-* After saving the Cache Tag Prefix setting, all cache will be purged.
-
-= 1.0.9.1 - August 26 2016 =
-* Fixed a bug where an error displayed on the configuration screen despite not being an error.
-* Change logic to check .htaccess file less often.
-
-= 1.0.9 - August 25 2016 =
-* [NEW] Added functionality to cache and purge feeds.
-* [NEW] Added cache tag prefix setting to avoid conflicts when using LiteSpeed Cache for WordPress with LiteSpeed Cache for XenForo and LiteMage.
-* [NEW] Added hooks to allow third party plugins to create config options.
-* [NEW] Added WooCommerce config options.
-* The plugin now also checks for wp-config in the parent directory.
-* Improved WooCommerce support.
-* Changed .htaccess backup process. Will create a .htaccess_lscachebak_orig file if one does not exist. If it does already exist, creates a backup using the date and timestamp.
-* Fixed a bug where get_home_path() sometimes returned an invalid path.
-* Fixed a bug where if the .htaccess was removed from a WordPress subdirectory, it was not handled properly.
-
-= 1.0.8.1 - July 28 2016 =
-* Fixed a bug where check cacheable was sometimes not hit.
-* Fixed a bug where extra slashes in clear rules were stripped.
-
-= 1.0.8 - July 25 2016 =
-* Added purge all on update check to purge by post id logic.
-* Added uninstall logic.
-* Added configuration for caching favicons.
-* Added configuration for caching the login page.
-* Added configuration for caching php resources (scripts/stylesheets accessed as .php).
-* Set login cookie if user is logged in and it isn’t set.
-* Improved NextGenGallery support to include new actions.
-* Now displays a notice on the network admin if WP_CACHE is not set.
-* Fixed a few php syntax issues.
-* Fixed a bug where purge by pid didn’t work.
-* Fixed a bug where the Network Admin settings were shown when the plugin was active in a subsite, but not network active.
-* Fixed a bug where the Advanced Cache check would sometimes not work.
-
-= 1.0.7.1 - May 26 2016 =
-* Fixed a bug where enabling purge all in the auto purge on update settings page did not purge the correct blogs.
-* Fixed a bug reported by user wpc on our forums where enabling purge all in the auto purge on update settings page caused nothing to be cached.
-
-= 1.0.7 - May 24 2016 =
-* Added login cookie configuration to the Advanced Settings page.
-* Added support for WPTouch plugin.
-* Added support for WP-Polls plugin.
-* Added Like Dislike Counter third party integration.
-* Added support for Admin IP Query String Actions.
-* Added confirmation pop up for purge all.
-* Refactor: LiteSpeed_Cache_Admin is now split into LiteSpeed_Cache_Admin, LiteSpeed_Cache_Admin_Display, and LiteSpeed_Cache_Admin_Rules
-* Refactor: Rename functions to accurately represent their functionality
-* Fixed a bug that sometimes caused a “no valid header” error message.
-
-= 1.0.6 - May 5 2016 =
-* Fixed a bug reported by Knut Sparhell that prevented dashboard widgets from being opened or closed.
-* Fixed a bug reported by Knut Sparhell that caused problems with https support for admin pages.
-
-= 1.0.5 - April 26 2016 =
-* [BETA] Added NextGen Gallery plugin support.
-* Added third party plugin integration.
-* Improved cache tag system.
-* Improved formatting for admin settings pages.
-* Converted bbPress to use the new third party integration system.
-* Converted WooCommerce to use the new third party integration system.
-* If .htaccess is not writable, disable separate mobile view and do not cache cookies/user agents.
-* Cache is now automatically purged when disabled.
-* Fixed a bug where .htaccess was not checked properly when adding common rules.
-* Fixed a bug where multisite setups would be completely purged when one site requested a purge all.
-
-= 1.0.4 - April 7 2016 =
-* Added logic to cache commenters.
-* Added htaccess backup to the install script.
-* Added an htaccess editor in the wp-admin dashboard.
-* Added do not cache user agents.
-* Added do not cache cookies.
-* Created new LiteSpeed Cache Settings submenu entries.
-* Implemented Separate Mobile View.
-* Modified WP_CACHE not defined message to only show up for users who can manage options.
-* Moved enabled all/disable all from network management to network settings.
-* Fixed a bug where WP_CACHE was not defined on activation if it was commented out.
-
-= 1.0.3 - March 23 2016 =
-* Added a Purge Front Page button to the LiteSpeed Cache Management page.
-* Added a Default Front Page TTL option to the general settings.
-* Added ability to define web application specific cookie names through rewrite rules to handle logged-in cookie conflicts when using multiple web applications. [Requires LSWS 5.0.15+]
-* Improved WooCommerce handling.
-* Fixed a bug where activating lscwp sets the “enable cache” radio button to enabled, but the cache was not enabled by default.
-* Refactored code to make it cleaner.
-* Updated readme.txt.
-
-= 1.0.2 - March 11 2016 =
-* Added a "Use Network Admin Setting" option for "Enable LiteSpeed Cache". For single sites, this choice will default to enabled.
-* Added enable/disable all buttons for network admin. This controls the setting of all managed sites with "Use Network Admin Setting" selected for "Enable LiteSpeed Cache".
-* Exclude by Category/Tag are now text areas to avoid slow load times on the LiteSpeed Cache Settings page for sites with a large number of categories/tags.
-* Added a new line to advanced-cache.php to allow identification as a LiteSpeed Cache file.
-* Activation/Deactivation are now better handled in multi-site environments.
-* Enable LiteSpeed Cache setting is now a radio button selection instead of a single checkbox.
-* Can now add '$' to the end of a URL in Exclude URI to perform an exact match.
-* The _lscache_vary cookie will now be deleted upon logout.
-* Fixed a bug in multi-site setups that would cause a "function already defined" error.
-
-= 1.0.1 - March 8 2016 =
-* Added Do Not Cache by URI, by Category, and by Tag. URI is a prefix/string equals match.
-* Added a help tab for plugin compatibilities.
-* Created logic for other plugins to purge a single post if updated.
-* Fixed a bug where woocommerce pages that display the cart were cached.
-* Fixed a bug where admin menus in multi-site setups were not correctly displayed.
-* Fixed a bug where logged in users were served public cached pages.
-* Fixed a compatibility bug with bbPress. If there is a new forum/topic/reply, the parent pages will now be purged as well.
-* Fixed a bug that didn't allow cron job to update scheduled posts.
-
-= 1.0.0 - January 20 2016 =
-* Initial Release.
+= 6.1 - Feb 5 2024 =
+* 🌱**Database** New Clear Orphaned Post Meta optimizer function.
+* **Image Optimize** Fixed possible PHP warning for WP requests library response.
+* **Image Optimize** Unlocked `noabort` to all async tasks to avoid image optimization timeout. (Peter Wells)
+* **Image Optimize** Fixed an issue where images weren't being pulled with older versions of WordPress. (PR#608)
+* **Image Optimize** Improved exception handling when node server cert expire.
+* 🐞**Image Optimize** The failed to pull images due to 404 expiry will now be able to send the request again.
+* **Crawler** CLI will now be able to force crawling even if a crawl was recently initiated within the plugin GUI.
+* **Page Optimize** Fixed a dynamic property creation warning in PHP8. (PR#606)
+* **Page Optimize** Fixed an issue where getimagesize could cause page optimization to fail. (PR#607)
+* **Tag** Fixed an array to string conversion warning. (PR#604)
+* **Object Cache** Return false to prevent PHP warning when Redis fails to set a value. (PR#612)
+* **Cache Tag** Fixed an issue where $wp_query is null when getting cache tags. (PR#589)
+
+= 6.0.0.1 - Dec 15 2023 =
+* 🐞**Image Optimize** Grouped the taken notification to regional center servers to reduce the load after image pulled.
+
+= 6.0 - Dec 12 2023 =
+* 🌱**Image Optimize** Parallel pull. (⭐ Contributed by Peter Wells #581)
+* 🌱**Cache** CLI Crawler.
+* 🌱**Cache** New Vary Cookies option.
+* 🌱**Media** New Preload Featured Image option. (Ankit)
+* **Core** Codebase safety review. (Special thanks to Rafie Muhammad @ Patchstack)
+* **Purge** Purge will not show QC message if no queue is cleared.
+* **Purge** Fixed a potential warning when post type is not as expected. (victorzink)
+* **Conf** Server IP field may now be emptied. (#111647)
+* **Conf** CloudFlare CDN setting vulnerability patch. (Gulshan Kumar #541805)
+* **Crawler** Suppressed sitemap generation msg when running by cron.
+* **Crawler** PHP v8.2 Dynamic property creation warning fix. (oldrup #586)
+* **VPI** VPI can now support non-alphabet filenames.
+* **VPI** Fixed PHP8.2 deprecated warning. (Ryan D)
+* **ESI** Fixed ESI nonce showing only HTML comment issue. (Giorgos K.)
+* 🐞**Page Optimize** Fixed a fatal PHP error caused by the WHM plugin's Mass Enable for services not in use. (Michael)
+* 🐞**Network** Fix in-memory options for multisites. (Tynan #588)
+* **Network** Correct `Disable All Features` link for Multisite.
+* 🐞**Image Optimize** Removing original image will also remove optimized images.
+* **Image Optimize** Increased time limit for pull process.
+* **Image Optimize** Last pull time and cron tag now included in optimization summary.
+* **Image Optimize** Fixed Elementors Slideshow unusal background images. (Ryan D)
+* 🐞**Database Optimize** Fix an issue where cleaning post revisions would fail while cleaning postmeta. (Tynan #596)
+* **Crawler** Added status updates to CLI. (Lars)
+* **3rd** WPML product category purge for WooCommerce. (Tynan #577)
+
+= 5.7.0.1 - Oct 25 2023 =
+* **GUI** Improvements to admin banner messaging. (#694622)
+* **CDN** Improvements to CDN Setup. (#694622)
+* **Image Optimize** Improvements to the process of checking image identification. (#694622)
+
+= 5.7 - Oct 10 2023 =
+* 🌱**Page Optimize** New option available: Preconnect. (xguiboy/Mukesh Patel)
+* 🌱**3rd** New Vary for Mini Cart option for Woocommerce. (Ruikai)
+* **Cloud** Force syncing the configuration to QUIC.cloud if CDN is reenabled.
+* **Cloud** Force syncing the configuration to QUIC.cloud if domain key is readded.
+* **Cloud** Limit multi-line fields when posting to QC.
+* **Cache** Treat HEAD requests as cacheable as GET. (George Wang)
+* 🐞**ESI** Patched a possible vulnerability issue. (István Márton@Wordfence #841011)
+* 🐞**ESI** Overwrite SCRIPT_URI to prevent ESI sub request resulting in redirections. (Tobolo)
+* 🐞**Image Optimize** Bypass unnecessary image processing when images were only partially optimized. (Ruikai)
+* 🐞**Guest** Guest mode will not enable WebP directly anymore. (Michael Heymann)
+* **CDN** Auto disable CDN if CDN URL is invalid. (Ruikai)
+* **CDN** Fixed a null parameter warning for PHP v8.1 (#584)
+* **API** Added `litespeed_media_add_missing_sizes` filter to allow bypassing Media's "add missing sizes" option (for Guest Optimization and otherwise). (PR #564)
+* **Guest** Fixed soft 404 and robots.txt report for guest.vary.php.
+* **Vary** Enabled `litespeed_vary_cookies` for LSWS Enterprise.
+* **GUI** Stopped WebP tip from wrongly displaying when Guest Mode is off.
+* **GUI** Added QUIC.cloud promotion postbox on dashboard page.
+* **3rd** Added `pagespeed ninja` to blocklist due to its bad bahavior.
diff --git a/security.md b/security.md
new file mode 100644
index 000000000..a0131803b
--- /dev/null
+++ b/security.md
@@ -0,0 +1,5 @@
+# Security Policy
+
+## Reporting Security Bugs
+
+Please report security bugs found in the LiteSpeed Cache plugin's source code through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/litespeed-cache). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin.
diff --git a/src/activation.cls.php b/src/activation.cls.php
index 359b41f4b..137791133 100644
--- a/src/activation.cls.php
+++ b/src/activation.cls.php
@@ -10,9 +10,10 @@
*/
namespace LiteSpeed;
-defined( 'WPINC' ) || exit;
+defined('WPINC') || exit();
-class Activation extends Base {
+class Activation extends Base
+{
const TYPE_UPGRADE = 'upgrade';
const TYPE_INSTALL_3RD = 'install_3rd';
const TYPE_INSTALL_ZIP = 'install_zip';
@@ -27,7 +28,8 @@ class Activation extends Base {
*
* @since 4.1
*/
- public function __construct() {
+ public function __construct()
+ {
self::$_data_file = LSCWP_CONTENT_DIR . '/' . self::CONF_FILE;
}
@@ -37,37 +39,46 @@ public function __construct() {
* @since 1.0.0
* @access public
*/
- public static function register_activation() {
+ public static function register_activation()
+ {
+ global $wp_version;
+ $advanced_cache = LSCWP_CONTENT_DIR . '/advanced-cache.php';
+ if (version_compare($wp_version, '5.3', '<') && !file_exists($advanced_cache)) {
+ $file_pointer = fopen($advanced_cache, 'w');
+ fwrite($file_pointer, "insert_ls_wrapper();
- } catch ( \Exception $ex ) {
- Admin_Display::error( $ex->getMessage() );
+ } catch (\Exception $ex) {
+ Admin_Display::error($ex->getMessage());
}
}
}
}
- if ( defined( 'LSCWP_REF' ) && LSCWP_REF == 'whm' ) {
- GUI::update_option( GUI::WHM_MSG, GUI::WHM_MSG_VAL );
+ if (defined('LSCWP_REF') && LSCWP_REF == 'whm') {
+ GUI::update_option(GUI::WHM_MSG, GUI::WHM_MSG_VAL);
}
}
@@ -75,29 +86,30 @@ public static function register_activation() {
* Uninstall plugin
* @since 1.1.0
*/
- public static function uninstall_litespeed_cache() {
+ public static function uninstall_litespeed_cache()
+ {
Task::destroy();
// Delete options
- foreach ( Conf::cls()->load_default_vals() as $k => $v ) {
- Base::delete_option( $k );
+ foreach (Conf::cls()->load_default_vals() as $k => $v) {
+ Base::delete_option($k);
}
// Delete site options
- if ( is_multisite() ) {
- foreach ( Conf::cls()->load_default_site_vals() as $k => $v ) {
- Base::delete_site_option( $k );
+ if (is_multisite()) {
+ foreach (Conf::cls()->load_default_site_vals() as $k => $v) {
+ Base::delete_site_option($k);
}
}
// Delete avatar table
Data::cls()->tables_del();
- if ( file_exists( LITESPEED_STATIC_DIR ) ) {
- File::rrmdir( LITESPEED_STATIC_DIR );
+ if (file_exists(LITESPEED_STATIC_DIR)) {
+ File::rrmdir(LITESPEED_STATIC_DIR);
}
- Cloud::version_check( 'uninstall' );
+ Cloud::version_check('uninstall');
// Files has been deleted when deactivated
}
@@ -111,19 +123,19 @@ public static function uninstall_litespeed_cache() {
* @access public
* @return array The array of blog ids.
*/
- public static function get_network_ids( $args = array() ) {
+ public static function get_network_ids($args = array())
+ {
global $wp_version;
- if ( version_compare( $wp_version, '4.6', '<' ) ) {
- $blogs = wp_get_sites( $args );
- if ( ! empty( $blogs ) ) {
- foreach ( $blogs as $key => $blog ) {
- $blogs[ $key ] = $blog[ 'blog_id' ];
+ if (version_compare($wp_version, '4.6', '<')) {
+ $blogs = wp_get_sites($args);
+ if (!empty($blogs)) {
+ foreach ($blogs as $key => $blog) {
+ $blogs[$key] = $blog['blog_id'];
}
}
- }
- else {
- $args[ 'fields' ] = 'ids';
- $blogs = get_sites( $args );
+ } else {
+ $args['fields'] = 'ids';
+ $blogs = get_sites($args);
}
return $blogs;
}
@@ -134,24 +146,25 @@ public static function get_network_ids( $args = array() ) {
* @since 1.0.12
* @access private
*/
- private static function get_network_count() {
- $count = get_site_transient( self::NETWORK_TRANSIENT_COUNT );
- if ( $count !== false ) {
- return intval( $count );
+ private static function get_network_count()
+ {
+ $count = get_site_transient(self::NETWORK_TRANSIENT_COUNT);
+ if ($count !== false) {
+ return intval($count);
}
// need to update
$default = array();
$count = 0;
- $sites = self::get_network_ids( array( 'deleted' => 0 ) );
- if ( empty( $sites ) ) {
+ $sites = self::get_network_ids(array('deleted' => 0));
+ if (empty($sites)) {
return false;
}
- foreach ( $sites as $site ) {
- $bid = is_object( $site ) && property_exists( $site, 'blog_id' ) ? $site->blog_id : $site;
- $plugins = get_blog_option( $bid , 'active_plugins', $default );
- if ( in_array( LSCWP_BASENAME, $plugins, true ) ) {
+ foreach ($sites as $site) {
+ $bid = is_object($site) && property_exists($site, 'blog_id') ? $site->blog_id : $site;
+ $plugins = get_blog_option($bid, 'active_plugins', $default);
+ if (in_array(LSCWP_BASENAME, $plugins, true)) {
$count++;
}
}
@@ -161,11 +174,11 @@ private static function get_network_count() {
* @see https://codex.wordpress.org/Function_Reference/is_plugin_active_for_network
* @since 2.0
*/
- if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
- require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
+ if (!function_exists('is_plugin_active_for_network')) {
+ require_once ABSPATH . '/wp-admin/includes/plugin.php';
}
- if ( is_plugin_active_for_network( LSCWP_BASENAME ) ) {
+ if (is_plugin_active_for_network(LSCWP_BASENAME)) {
$count++;
}
return $count;
@@ -177,19 +190,20 @@ private static function get_network_count() {
* @since 1.0.12
* @access private
*/
- private static function is_deactivate_last() {
+ private static function is_deactivate_last()
+ {
$count = self::get_network_count();
- if ( $count === false ) {
+ if ($count === false) {
return false;
}
- if ( $count !== 1 ) {
+ if ($count !== 1) {
// Not deactivating the last one.
$count--;
- set_site_transient( self::NETWORK_TRANSIENT_COUNT, $count, DAY_IN_SECONDS );
+ set_site_transient(self::NETWORK_TRANSIENT_COUNT, $count, DAY_IN_SECONDS);
return false;
}
- delete_site_transient( self::NETWORK_TRANSIENT_COUNT );
+ delete_site_transient(self::NETWORK_TRANSIENT_COUNT);
return true;
}
@@ -201,22 +215,22 @@ private static function is_deactivate_last() {
* @since 1.0.0
* @access public
*/
- public static function register_deactivation() {
+ public static function register_deactivation()
+ {
Task::destroy();
- ! defined( 'LSCWP_LOG_TAG' ) && define( 'LSCWP_LOG_TAG', 'Deactivate_' . get_current_blog_id() );
+ !defined('LSCWP_LOG_TAG') && define('LSCWP_LOG_TAG', 'Deactivate_' . get_current_blog_id());
Purge::purge_all();
- if ( is_multisite() ) {
-
- if ( ! self::is_deactivate_last() ) {
- if ( is_network_admin() ) {
+ if (is_multisite()) {
+ if (!self::is_deactivate_last()) {
+ if (is_network_admin()) {
// Still other activated subsite left, set .htaccess with only CacheLookUp
try {
Htaccess::cls()->insert_ls_wrapper();
- } catch ( \Exception $ex ) {
- Admin_Display::error( $ex->getMessage() );
+ } catch (\Exception $ex) {
+ Admin_Display::error($ex->getMessage());
}
}
return;
@@ -226,11 +240,11 @@ public static function register_deactivation() {
/* 1) wp-config.php; */
try {
- self::cls()->_manage_wp_cache_const( false );
- } catch ( \Exception $ex ) {
- error_log('In wp-config.php: WP_CACHE could not be set to false during deactivation!') ;
+ self::cls()->_manage_wp_cache_const(false);
+ } catch (\Exception $ex) {
+ error_log('In wp-config.php: WP_CACHE could not be set to false during deactivation!');
- Admin_Display::error( $ex->getMessage() );
+ Admin_Display::error($ex->getMessage());
}
/* 2) adv-cache.php; Dropped in v3.0.4 */
@@ -243,8 +257,8 @@ public static function register_deactivation() {
try {
Htaccess::cls()->clear_rules();
- } catch ( \Exception $ex ) {
- Admin_Display::error( $ex->getMessage() );
+ } catch (\Exception $ex) {
+ Admin_Display::error($ex->getMessage());
}
/* 5) .litespeed_conf.dat; */
@@ -270,11 +284,12 @@ public static function register_deactivation() {
* @since 3.0
* @access public
*/
- public function update_files() {
- Debug2::debug( '🗂️ [Activation] update_files' );
+ public function update_files()
+ {
+ Debug2::debug('🗂️ [Activation] update_files');
// Update cache setting `_CACHE`
- $this->cls( 'Conf' )->define_cache();
+ $this->cls('Conf')->define_cache();
// Site options applied already
$options = $this->get_options();
@@ -282,35 +297,34 @@ public function update_files() {
/* 1) wp-config.php; */
try {
- $this->_manage_wp_cache_const( $options[ self::_CACHE ] );
- } catch ( \Exception $ex ) {
+ $this->_manage_wp_cache_const($options[self::_CACHE]);
+ } catch (\Exception $ex) {
// Add msg to admin page or CLI
- Admin_Display::error( $ex->getMessage() );
+ Admin_Display::error($ex->getMessage());
}
/* 2) adv-cache.php; Dropped in v3.0.4 */
/* 3) object-cache.php; */
- if ( $options[ self::O_OBJECT ] && ( ! $options[ self::O_DEBUG_DISABLE_ALL ] || is_multisite() ) ) {
- $this->cls( 'Object_Cache' )->update_file( $options );
- }
- else {
- $this->cls( 'Object_Cache' )->del_file(); // Note: because it doesn't reconnect, which caused setting page OC option changes delayed, thus may meet Connect Test Failed issue (Next refresh will correct it). Not a big deal, will keep as is.
+ if ($options[self::O_OBJECT] && (!$options[self::O_DEBUG_DISABLE_ALL] || is_multisite())) {
+ $this->cls('Object_Cache')->update_file($options);
+ } else {
+ $this->cls('Object_Cache')->del_file(); // Note: because it doesn't reconnect, which caused setting page OC option changes delayed, thus may meet Connect Test Failed issue (Next refresh will correct it). Not a big deal, will keep as is.
}
/* 4) .htaccess; */
try {
- $this->cls( 'Htaccess' )->update( $options );
- } catch ( \Exception $ex ) {
- Admin_Display::error( $ex->getMessage() );
+ $this->cls('Htaccess')->update($options);
+ } catch (\Exception $ex) {
+ Admin_Display::error($ex->getMessage());
}
/* 5) .litespeed_conf.dat; */
- if ( ( $options[ self::O_GUEST ] || $options[ self::O_OBJECT ] ) && ( ! $options[ self::O_DEBUG_DISABLE_ALL ] || is_multisite() ) ) {
- $this->_update_conf_data_file( $options );
+ if (($options[self::O_GUEST] || $options[self::O_OBJECT]) && (!$options[self::O_DEBUG_DISABLE_ALL] || is_multisite())) {
+ $this->_update_conf_data_file($options);
}
}
@@ -319,9 +333,10 @@ public function update_files() {
*
* @since 4.1
*/
- private static function _del_conf_data_file() {
- if ( file_exists( self::$_data_file ) ) {
- unlink( self::$_data_file );
+ private static function _del_conf_data_file()
+ {
+ if (file_exists(self::$_data_file)) {
+ unlink(self::$_data_file);
}
}
@@ -330,9 +345,10 @@ private static function _del_conf_data_file() {
*
* @since 4.1
*/
- private function _update_conf_data_file( $options ) {
+ private function _update_conf_data_file($options)
+ {
$ids = array();
- if ( $options[ self::O_OBJECT ] ) {
+ if ($options[self::O_OBJECT]) {
$this_ids = array(
self::O_OBJECT_KIND,
self::O_OBJECT_HOST,
@@ -347,32 +363,24 @@ private function _update_conf_data_file( $options ) {
self::O_OBJECT_GLOBAL_GROUPS,
self::O_OBJECT_NON_PERSISTENT_GROUPS,
);
- $ids = array_merge( $ids, $this_ids );
+ $ids = array_merge($ids, $this_ids);
}
- if ( $options[ self::O_GUEST ] ) {
- $this_ids = array(
- self::HASH,
- self::O_CACHE_LOGIN_COOKIE,
- self::O_DEBUG,
- self::O_DEBUG_IPS,
- self::O_UTIL_NO_HTTPS_VARY,
- self::O_GUEST_UAS,
- self::O_GUEST_IPS,
- );
- $ids = array_merge( $ids, $this_ids );
+ if ($options[self::O_GUEST]) {
+ $this_ids = array(self::HASH, self::O_CACHE_LOGIN_COOKIE, self::O_DEBUG, self::O_DEBUG_IPS, self::O_UTIL_NO_HTTPS_VARY, self::O_GUEST_UAS, self::O_GUEST_IPS);
+ $ids = array_merge($ids, $this_ids);
}
$data = array();
- foreach ( $ids as $v ) {
- $data[ $v ] = $options[ $v ];
+ foreach ($ids as $v) {
+ $data[$v] = $options[$v];
}
- $data = json_encode( $data );
+ $data = json_encode($data);
- $old_data = File::read( self::$_data_file );
- if ( $old_data != $data ) {
- defined( 'LSCWP_LOG' ) && Debug2::debug( '[Activation] Updating .litespeed_conf.dat' );
- File::save( self::$_data_file, $data );
+ $old_data = File::read(self::$_data_file);
+ if ($old_data != $data) {
+ defined('LSCWP_LOG') && Debug2::debug('[Activation] Updating .litespeed_conf.dat');
+ File::save(self::$_data_file, $data);
}
}
@@ -386,18 +394,18 @@ private function _update_conf_data_file( $options ) {
* @since 3.0 Refactored
* @access private
*/
- private function _manage_wp_cache_const( $enable ) {
- if ( $enable ) {
- if ( defined( 'WP_CACHE' ) && WP_CACHE ) {
+ private function _manage_wp_cache_const($enable)
+ {
+ if ($enable) {
+ if (defined('WP_CACHE') && WP_CACHE) {
return false;
}
- }
- elseif ( ! defined( 'WP_CACHE' ) || ( defined( 'WP_CACHE' ) && ! WP_CACHE ) ) {
- return false;
+ } elseif (!defined('WP_CACHE') || (defined('WP_CACHE') && !WP_CACHE)) {
+ return false;
}
- if ( apply_filters( 'litespeed_wpconfig_readonly', false ) ) {
- throw new \Exception( 'wp-config file is forbidden to modify due to API hook: litespeed_wpconfig_readonly' );
+ if (apply_filters('litespeed_wpconfig_readonly', false)) {
+ throw new \Exception('wp-config file is forbidden to modify due to API hook: litespeed_wpconfig_readonly');
}
/**
@@ -405,30 +413,29 @@ private function _manage_wp_cache_const( $enable ) {
* @see wp-load.php
*/
$conf_file = ABSPATH . 'wp-config.php';
- if ( ! file_exists( $conf_file ) ) {
- $conf_file = dirname( ABSPATH ) . '/wp-config.php';
+ if (!file_exists($conf_file)) {
+ $conf_file = dirname(ABSPATH) . '/wp-config.php';
}
- $content = File::read( $conf_file );
- if ( ! $content ) {
- throw new \Exception( 'wp-config file content is empty: ' . $conf_file );
-
+ $content = File::read($conf_file);
+ if (!$content) {
+ throw new \Exception('wp-config file content is empty: ' . $conf_file);
}
// Remove the line `define('WP_CACHE', true/false);` first
- if ( defined( 'WP_CACHE' ) ) {
- $content = preg_replace( '/define\(\s*([\'"])WP_CACHE\1\s*,\s*\w+\s*\)\s*;/sU', '', $content );
+ if (defined('WP_CACHE')) {
+ $content = preg_replace('/define\(\s*([\'"])WP_CACHE\1\s*,\s*\w+\s*\)\s*;/sU', '', $content);
}
// Insert const
- if ( $enable ) {
- $content = preg_replace( '/^<\?php/', "conf( Base::O_AUTO_UPGRADE ) ) {
+ public function auto_update()
+ {
+ if (!$this->conf(Base::O_AUTO_UPGRADE)) {
return;
}
- add_filter( 'auto_update_plugin', array( $this, 'auto_update_hook' ), 10, 2 );
+ add_filter('auto_update_plugin', array($this, 'auto_update_hook'), 10, 2);
}
/**
@@ -454,11 +462,12 @@ public function auto_update() {
* @since 3.0
* @access public
*/
- public function auto_update_hook( $update, $item ) {
- if ( $item->slug == 'litespeed-cache' ) {
- $auto_v = Cloud::version_check( 'auto_update_plugin' );
+ public function auto_update_hook($update, $item)
+ {
+ if (!empty($item->slug) && 'litespeed-cache' === $item->slug) {
+ $auto_v = Cloud::version_check('auto_update_plugin');
- if ( ! empty( $auto_v[ 'latest' ] ) && ! empty( $item->new_version ) && $auto_v[ 'latest' ] === $item->new_version ) {
+ if (!empty($auto_v['latest']) && !empty($item->new_version) && $auto_v['latest'] === $item->new_version) {
return true;
}
}
@@ -472,7 +481,8 @@ public function auto_update_hook( $update, $item ) {
* @since 2.9
* @access public
*/
- public function upgrade() {
+ public function upgrade()
+ {
$plugin = Core::PLUGIN_FILE;
/**
@@ -485,23 +495,24 @@ public function upgrade() {
try {
ob_start();
$skin = new \WP_Ajax_Upgrader_Skin();
- $upgrader = new \Plugin_Upgrader( $skin );
- $result = $upgrader->upgrade( $plugin );
- if ( ! is_plugin_active( $plugin ) ) {// todo: upgrade should reactivate the plugin again by WP. Need to check why disabled after upgraded.
- activate_plugin( $plugin, '', is_multisite() );
+ $upgrader = new \Plugin_Upgrader($skin);
+ $result = $upgrader->upgrade($plugin);
+ if (!is_plugin_active($plugin)) {
+ // todo: upgrade should reactivate the plugin again by WP. Need to check why disabled after upgraded.
+ activate_plugin($plugin, '', is_multisite());
}
ob_end_clean();
- } catch ( \Exception $e ) {
- Admin_Display::error( __( 'Failed to upgrade.', 'litespeed-cache' ) );
+ } catch (\Exception $e) {
+ Admin_Display::error(__('Failed to upgrade.', 'litespeed-cache'));
return;
}
- if ( is_wp_error( $result ) ) {
- Admin_Display::error( __( 'Failed to upgrade.', 'litespeed-cache' ) );
+ if (is_wp_error($result)) {
+ Admin_Display::error(__('Failed to upgrade.', 'litespeed-cache'));
return;
}
- Admin_Display::succeed( __( 'Upgraded successfully.', 'litespeed-cache' ) );
+ Admin_Display::succeed(__('Upgraded successfully.', 'litespeed-cache'));
}
/**
@@ -509,12 +520,13 @@ public function upgrade() {
*
* @since 1.0
*/
- public function dash_notifier_is_plugin_active( $plugin ) {
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
+ public function dash_notifier_is_plugin_active($plugin)
+ {
+ include_once ABSPATH . 'wp-admin/includes/plugin.php';
$plugin_path = $plugin . '/' . $plugin . '.php';
- return is_plugin_active( $plugin_path );
+ return is_plugin_active($plugin_path);
}
/**
@@ -522,14 +534,15 @@ public function dash_notifier_is_plugin_active( $plugin ) {
*
* @since 1.0
*/
- public function dash_notifier_is_plugin_installed( $plugin ) {
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
+ public function dash_notifier_is_plugin_installed($plugin)
+ {
+ include_once ABSPATH . 'wp-admin/includes/plugin.php';
$plugin_path = $plugin . '/' . $plugin . '.php';
- $valid = validate_plugin( $plugin_path );
+ $valid = validate_plugin($plugin_path);
- return ! is_wp_error( $valid );
+ return !is_wp_error($valid);
}
/**
@@ -537,11 +550,12 @@ public function dash_notifier_is_plugin_installed( $plugin ) {
*
* @since 1.0
*/
- public function dash_notifier_get_plugin_info( $slug ) {
- include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
- $result = plugins_api( 'plugin_information', array( 'slug' => $slug ) );
+ public function dash_notifier_get_plugin_info($slug)
+ {
+ include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
+ $result = plugins_api('plugin_information', array('slug' => $slug));
- if ( is_wp_error( $result ) ) {
+ if (is_wp_error($result)) {
return false;
}
@@ -553,13 +567,14 @@ public function dash_notifier_get_plugin_info( $slug ) {
*
* @since 1.0
*/
- public function dash_notifier_install_3rd() {
- ! defined( 'SILENCE_INSTALL' ) && define( 'SILENCE_INSTALL', true );
+ public function dash_notifier_install_3rd()
+ {
+ !defined('SILENCE_INSTALL') && define('SILENCE_INSTALL', true);
- $slug = ! empty( $_GET[ 'plugin' ] ) ? $_GET[ 'plugin' ] : false;
+ $slug = !empty($_GET['plugin']) ? $_GET['plugin'] : false;
// Check if plugin is installed already
- if ( ! $slug || $this->dash_notifier_is_plugin_active( $slug ) ) {
+ if (!$slug || $this->dash_notifier_is_plugin_active($slug)) {
return;
}
@@ -572,27 +587,26 @@ public function dash_notifier_install_3rd() {
$plugin_path = $slug . '/' . $slug . '.php';
- if ( ! $this->dash_notifier_is_plugin_installed( $slug ) ) {
- $plugin_info = $this->dash_notifier_get_plugin_info( $slug );
- if ( ! $plugin_info ) {
+ if (!$this->dash_notifier_is_plugin_installed($slug)) {
+ $plugin_info = $this->dash_notifier_get_plugin_info($slug);
+ if (!$plugin_info) {
return;
}
// Try to install plugin
try {
ob_start();
$skin = new \Automatic_Upgrader_Skin();
- $upgrader = new \Plugin_Upgrader( $skin );
- $result = $upgrader->install( $plugin_info->download_link );
+ $upgrader = new \Plugin_Upgrader($skin);
+ $result = $upgrader->install($plugin_info->download_link);
ob_end_clean();
- } catch ( \Exception $e ) {
+ } catch (\Exception $e) {
return;
}
}
- if ( ! is_plugin_active( $plugin_path ) ) {
- activate_plugin( $plugin_path );
+ if (!is_plugin_active($plugin_path)) {
+ activate_plugin($plugin_path);
}
-
}
/**
@@ -601,30 +615,31 @@ public function dash_notifier_install_3rd() {
* @since 2.9
* @access public
*/
- public function handler() {
+ public function handler()
+ {
$type = Router::verify_type();
- switch ( $type ) {
- case self::TYPE_UPGRADE :
+ switch ($type) {
+ case self::TYPE_UPGRADE:
$this->upgrade();
break;
- case self::TYPE_INSTALL_3RD :
+ case self::TYPE_INSTALL_3RD:
$this->dash_notifier_install_3rd();
break;
case self::TYPE_DISMISS_RECOMMENDED:
Cloud::reload_summary();
- Cloud::save_summary( array( 'news.new' => 0 ) );
+ Cloud::save_summary(array('news.new' => 0));
break;
case self::TYPE_INSTALL_ZIP:
Cloud::reload_summary();
$summary = Cloud::get_summary();
- if ( ! empty( $summary[ 'news.zip' ] ) ) {
- Cloud::save_summary( array( 'news.new' => 0 ) );
+ if (!empty($summary['news.zip'])) {
+ Cloud::save_summary(array('news.new' => 0));
- $this->cls( 'Debug2' )->beta_test( $summary[ 'zip' ] );
+ $this->cls('Debug2')->beta_test($summary['zip']);
}
break;
@@ -634,5 +649,4 @@ public function handler() {
Admin::redirect();
}
-
}
diff --git a/src/admin-display.cls.php b/src/admin-display.cls.php
index 2f8a6d9ba..bbac5068a 100644
--- a/src/admin-display.cls.php
+++ b/src/admin-display.cls.php
@@ -1,4 +1,5 @@
*/
+
namespace LiteSpeed;
-defined( 'WPINC' ) || exit;
+defined('WPINC') || exit();
-class Admin_Display extends Base {
+class Admin_Display extends Base
+{
const LOG_TAG = '👮♀️';
const NOTICE_BLUE = 'notice notice-info';
@@ -46,30 +49,30 @@ class Admin_Display extends Base {
*
* @since 1.0.7
*/
- public function __construct() {
+ public function __construct()
+ {
// main css
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_style' ) );
+ add_action('admin_enqueue_scripts', array($this, 'enqueue_style'));
// Main js
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
+ add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
$this->_is_network_admin = is_network_admin();
$this->_is_multisite = is_multisite();
// Quick access menu
- if ( is_multisite() && $this->_is_network_admin ) {
+ if (is_multisite() && $this->_is_network_admin) {
$manage = 'manage_network_options';
- }
- else {
+ } else {
$manage = 'manage_options';
}
- if ( current_user_can( $manage ) ) {
- if ( ! defined( 'LITESPEED_DISABLE_ALL' ) ) {
- add_action( 'wp_before_admin_bar_render', array( GUI::cls(), 'backend_shortcut' ) );
+ if (current_user_can($manage)) {
+ if (!defined('LITESPEED_DISABLE_ALL')) {
+ add_action('wp_before_admin_bar_render', array(GUI::cls(), 'backend_shortcut'));
}
// `admin_notices` is after `admin_enqueue_scripts`
// @see wp-admin/admin-header.php
- add_action( $this->_is_network_admin ? 'network_admin_notices' : 'admin_notices', array( $this, 'display_messages' ) );
+ add_action($this->_is_network_admin ? 'network_admin_notices' : 'admin_notices', array($this, 'display_messages'));
}
/**
@@ -77,19 +80,18 @@ public function __construct() {
* @see https://codex.wordpress.org/Function_Reference/is_plugin_active_for_network
* @since 2.0
*/
- if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
- require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
+ if (!function_exists('is_plugin_active_for_network')) {
+ require_once ABSPATH . '/wp-admin/includes/plugin.php';
}
// add menus ( Also check for mu-plugins)
- if ( $this->_is_network_admin && ( is_plugin_active_for_network( LSCWP_BASENAME ) || defined( 'LSCWP_MU_PLUGIN' ) ) ) {
- add_action( 'network_admin_menu', array( $this, 'register_admin_menu' ) );
- }
- else {
- add_action( 'admin_menu', array( $this, 'register_admin_menu' ) );
+ if ($this->_is_network_admin && (is_plugin_active_for_network(LSCWP_BASENAME) || defined('LSCWP_MU_PLUGIN'))) {
+ add_action('network_admin_menu', array($this, 'register_admin_menu'));
+ } else {
+ add_action('admin_menu', array($this, 'register_admin_menu'));
}
- $this->cls( 'Metabox' )->register_settings();
+ $this->cls('Metabox')->register_settings();
}
/**
@@ -98,8 +100,9 @@ public function __construct() {
* @since 3.0
* @access public
*/
- public function title( $id ) {
- echo Lang::title( $id );
+ public function title($id)
+ {
+ echo Lang::title($id);
}
/**
@@ -108,31 +111,33 @@ public function title( $id ) {
* @since 1.0.0
* @access public
*/
- public function register_admin_menu() {
+ public function register_admin_menu()
+ {
$capability = $this->_is_network_admin ? 'manage_network_options' : 'manage_options';
- if ( current_user_can( $capability ) ) {
-
+ if (current_user_can($capability)) {
// root menu
- add_menu_page( 'LiteSpeed Cache', 'LiteSpeed Cache', 'manage_options', 'litespeed' );
+ add_menu_page('LiteSpeed Cache', 'LiteSpeed Cache', 'manage_options', 'litespeed');
// sub menus
- $this->_add_submenu( __( 'Dashboard', 'litespeed-cache' ), 'litespeed', 'show_menu_dash' );
+ $this->_add_submenu(__('Dashboard', 'litespeed-cache'), 'litespeed', 'show_menu_dash');
+
+ $this->_add_submenu(__('Presets', 'litespeed-cache'), 'litespeed-presets', 'show_menu_presets');
- $this->_add_submenu( __( 'General', 'litespeed-cache' ), 'litespeed-general', 'show_menu_general' );
+ $this->_add_submenu(__('General', 'litespeed-cache'), 'litespeed-general', 'show_menu_general');
- $this->_add_submenu( __( 'Cache', 'litespeed-cache' ), 'litespeed-cache', 'show_menu_cache' );
+ $this->_add_submenu(__('Cache', 'litespeed-cache'), 'litespeed-cache', 'show_menu_cache');
- ! $this->_is_network_admin && $this->_add_submenu( __( 'CDN', 'litespeed-cache' ), 'litespeed-cdn', 'show_menu_cdn' );
+ !$this->_is_network_admin && $this->_add_submenu(__('CDN', 'litespeed-cache'), 'litespeed-cdn', 'show_menu_cdn');
- $this->_add_submenu( __( 'Image Optimization', 'litespeed-cache' ), 'litespeed-img_optm', 'show_img_optm' );
+ $this->_add_submenu(__('Image Optimization', 'litespeed-cache'), 'litespeed-img_optm', 'show_img_optm');
- ! $this->_is_network_admin && $this->_add_submenu( __( 'Page Optimization', 'litespeed-cache' ), 'litespeed-page_optm', 'show_page_optm' );
+ !$this->_is_network_admin && $this->_add_submenu(__('Page Optimization', 'litespeed-cache'), 'litespeed-page_optm', 'show_page_optm');
- $this->_add_submenu( __( 'Database', 'litespeed-cache' ), 'litespeed-db_optm', 'show_db_optm' );
+ $this->_add_submenu(__('Database', 'litespeed-cache'), 'litespeed-db_optm', 'show_db_optm');
- ! $this->_is_network_admin && $this->_add_submenu( __( 'Crawler', 'litespeed-cache' ), 'litespeed-crawler', 'show_crawler' );
+ !$this->_is_network_admin && $this->_add_submenu(__('Crawler', 'litespeed-cache'), 'litespeed-crawler', 'show_crawler');
- $this->_add_submenu( __( 'Toolbox', 'litespeed-cache' ), 'litespeed-toolbox', 'show_toolbox' );
+ $this->_add_submenu(__('Toolbox', 'litespeed-cache'), 'litespeed-toolbox', 'show_toolbox');
// sub menus under options
add_options_page('LiteSpeed Cache', 'LiteSpeed Cache', $capability, 'litespeed-cache-options', array($this, 'show_menu_cache'));
@@ -148,8 +153,9 @@ public function register_admin_menu() {
* @param string $menu_slug The slug of the page.
* @param string $callback The callback to call if selected.
*/
- private function _add_submenu( $menu_title, $menu_slug, $callback ) {
- add_submenu_page( 'litespeed', $menu_title, $menu_title, 'manage_options', $menu_slug, array( $this, $callback ) );
+ private function _add_submenu($menu_title, $menu_slug, $callback)
+ {
+ add_submenu_page('litespeed', $menu_title, $menu_title, 'manage_options', $menu_slug, array($this, $callback));
}
/**
@@ -158,7 +164,8 @@ private function _add_submenu( $menu_title, $menu_slug, $callback ) {
* @since 1.0.14
* @access public
*/
- public function enqueue_style() {
+ public function enqueue_style()
+ {
wp_enqueue_style(Core::PLUGIN_NAME, LSWCP_PLUGIN_URL . 'assets/css/litespeed.css', array(), Core::VER, 'all');
}
@@ -168,95 +175,96 @@ public function enqueue_style() {
* @since 1.0.0
* @access public
*/
- public function enqueue_scripts() {
- wp_register_script( Core::PLUGIN_NAME, LSWCP_PLUGIN_URL . 'assets/js/litespeed-cache-admin.js', array(), Core::VER, false );
+ public function enqueue_scripts()
+ {
+ wp_register_script(Core::PLUGIN_NAME, LSWCP_PLUGIN_URL . 'assets/js/litespeed-cache-admin.js', array(), Core::VER, false);
$localize_data = array();
- if ( GUI::has_whm_msg() ) {
- $ajax_url_dismiss_whm = Utility::build_url( Core::ACTION_DISMISS, GUI::TYPE_DISMISS_WHM, true );
- $localize_data[ 'ajax_url_dismiss_whm' ] = $ajax_url_dismiss_whm;
+ if (GUI::has_whm_msg()) {
+ $ajax_url_dismiss_whm = Utility::build_url(Core::ACTION_DISMISS, GUI::TYPE_DISMISS_WHM, true);
+ $localize_data['ajax_url_dismiss_whm'] = $ajax_url_dismiss_whm;
}
- if ( GUI::has_msg_ruleconflict() ) {
- $ajax_url = Utility::build_url( Core::ACTION_DISMISS, GUI::TYPE_DISMISS_EXPIRESDEFAULT, true );
- $localize_data[ 'ajax_url_dismiss_ruleconflict' ] = $ajax_url;
+ if (GUI::has_msg_ruleconflict()) {
+ $ajax_url = Utility::build_url(Core::ACTION_DISMISS, GUI::TYPE_DISMISS_EXPIRESDEFAULT, true);
+ $localize_data['ajax_url_dismiss_ruleconflict'] = $ajax_url;
}
- $promo_tag = GUI::cls()->show_promo( true );
- if ( $promo_tag ) {
- $ajax_url_promo = Utility::build_url( Core::ACTION_DISMISS, GUI::TYPE_DISMISS_PROMO, true, null, array( 'promo_tag' => $promo_tag ) );
- $localize_data[ 'ajax_url_promo' ] = $ajax_url_promo;
+ $promo_tag = GUI::cls()->show_promo(true);
+ if ($promo_tag) {
+ $ajax_url_promo = Utility::build_url(Core::ACTION_DISMISS, GUI::TYPE_DISMISS_PROMO, true, null, array('promo_tag' => $promo_tag));
+ $localize_data['ajax_url_promo'] = $ajax_url_promo;
}
// Injection to LiteSpeed pages
global $pagenow;
- if ( $pagenow == 'admin.php' && ! empty( $_GET[ 'page' ] ) && ( strpos( $_GET[ 'page' ], 'litespeed-' ) === 0 || $_GET[ 'page' ] == 'litespeed' ) ) {
+ if ($pagenow == 'admin.php' && !empty($_GET['page']) && (strpos($_GET['page'], 'litespeed-') === 0 || $_GET['page'] == 'litespeed')) {
// Admin footer
add_filter('admin_footer_text', array($this, 'admin_footer_text'), 1);
- if ( $_GET[ 'page' ] == 'litespeed-crawler' || $_GET[ 'page' ] == 'litespeed-cdn' ) {
+ if ($_GET['page'] == 'litespeed-crawler' || $_GET['page'] == 'litespeed-cdn') {
// Babel JS type correction
- add_filter( 'script_loader_tag', array( $this, 'bable_type' ), 10, 3 );
+ add_filter('script_loader_tag', array($this, 'bable_type'), 10, 3);
- wp_enqueue_script( Core::PLUGIN_NAME . '-lib-react', LSWCP_PLUGIN_URL . 'assets/js/react.min.js', array(), Core::VER, false );
- wp_enqueue_script( Core::PLUGIN_NAME . '-lib-babel', LSWCP_PLUGIN_URL . 'assets/js/babel.min.js', array(), Core::VER, false );
+ wp_enqueue_script(Core::PLUGIN_NAME . '-lib-react', LSWCP_PLUGIN_URL . 'assets/js/react.min.js', array(), Core::VER, false);
+ wp_enqueue_script(Core::PLUGIN_NAME . '-lib-babel', LSWCP_PLUGIN_URL . 'assets/js/babel.min.js', array(), Core::VER, false);
}
// Crawler Cookie Simulation
- if ( $_GET[ 'page' ] == 'litespeed-crawler' ) {
- wp_enqueue_script( Core::PLUGIN_NAME . '-crawler', LSWCP_PLUGIN_URL . 'assets/js/component.crawler.js', array(), Core::VER, false );
- $localize_data[ 'lang' ] = array();
- $localize_data[ 'lang' ][ 'cookie_name' ] = __( 'Cookie Name', 'litespeed-cache' );
- $localize_data[ 'lang' ][ 'cookie_value' ] = __( 'Cookie Values', 'litespeed-cache' );
- $localize_data[ 'lang' ][ 'one_per_line' ] = Doc::one_per_line( true );
- $localize_data[ 'lang' ][ 'remove_cookie_simulation' ] = __( 'Remove cookie simulation', 'litespeed-cache' );
- $localize_data[ 'lang' ][ 'add_cookie_simulation_row' ] = __( 'Add new cookie to simulate', 'litespeed-cache' );
- empty( $localize_data[ 'ids' ] ) && $localize_data[ 'ids' ] = array();
- $localize_data[ 'ids' ][ 'crawler_cookies' ] = self::O_CRAWLER_COOKIES;
+ if ($_GET['page'] == 'litespeed-crawler') {
+ wp_enqueue_script(Core::PLUGIN_NAME . '-crawler', LSWCP_PLUGIN_URL . 'assets/js/component.crawler.js', array(), Core::VER, false);
+ $localize_data['lang'] = array();
+ $localize_data['lang']['cookie_name'] = __('Cookie Name', 'litespeed-cache');
+ $localize_data['lang']['cookie_value'] = __('Cookie Values', 'litespeed-cache');
+ $localize_data['lang']['one_per_line'] = Doc::one_per_line(true);
+ $localize_data['lang']['remove_cookie_simulation'] = __('Remove cookie simulation', 'litespeed-cache');
+ $localize_data['lang']['add_cookie_simulation_row'] = __('Add new cookie to simulate', 'litespeed-cache');
+ empty($localize_data['ids']) && ($localize_data['ids'] = array());
+ $localize_data['ids']['crawler_cookies'] = self::O_CRAWLER_COOKIES;
}
// CDN mapping
- if ( $_GET[ 'page' ] == 'litespeed-cdn' ) {
- $home_url = home_url( '/' );
- $parsed = parse_url( $home_url );
- $home_url = str_replace( $parsed[ 'scheme' ] . ':', '', $home_url );
- $cdn_url = 'https://cdn.' . substr( $home_url, 2 );
-
- wp_enqueue_script( Core::PLUGIN_NAME . '-cdn', LSWCP_PLUGIN_URL . 'assets/js/component.cdn.js', array(), Core::VER, false );
- $localize_data[ 'lang' ] = array();
- $localize_data[ 'lang' ][ 'cdn_mapping_url' ] = Lang::title( self::CDN_MAPPING_URL );
- $localize_data[ 'lang' ][ 'cdn_mapping_inc_img' ] = Lang::title( self::CDN_MAPPING_INC_IMG );
- $localize_data[ 'lang' ][ 'cdn_mapping_inc_css' ] = Lang::title( self::CDN_MAPPING_INC_CSS );
- $localize_data[ 'lang' ][ 'cdn_mapping_inc_js' ] = Lang::title( self::CDN_MAPPING_INC_JS );
- $localize_data[ 'lang' ][ 'cdn_mapping_filetype' ] = Lang::title( self::CDN_MAPPING_FILETYPE );
- $localize_data[ 'lang' ][ 'cdn_mapping_url_desc' ] = sprintf( __( 'CDN URL to be used. For example, %s', 'litespeed-cache' ), '' . $cdn_url . '
' );
- $localize_data[ 'lang' ][ 'one_per_line' ] = Doc::one_per_line( true );
- $localize_data[ 'lang' ][ 'cdn_mapping_remove' ] = __( 'Remove CDN URL', 'litespeed-cache' );
- $localize_data[ 'lang' ][ 'add_cdn_mapping_row' ] = __( 'Add new CDN URL', 'litespeed-cache' );
- $localize_data[ 'lang' ][ 'on' ] = __( 'ON', 'litespeed-cache' );
- $localize_data[ 'lang' ][ 'off' ] = __( 'OFF', 'litespeed-cache' );
- empty( $localize_data[ 'ids' ] ) && $localize_data[ 'ids' ] = array();
- $localize_data[ 'ids' ][ 'cdn_mapping' ] = self::O_CDN_MAPPING;
+ if ($_GET['page'] == 'litespeed-cdn') {
+ $home_url = home_url('/');
+ $parsed = parse_url($home_url);
+ $home_url = str_replace($parsed['scheme'] . ':', '', $home_url);
+ $cdn_url = 'https://cdn.' . substr($home_url, 2);
+
+ wp_enqueue_script(Core::PLUGIN_NAME . '-cdn', LSWCP_PLUGIN_URL . 'assets/js/component.cdn.js', array(), Core::VER, false);
+ $localize_data['lang'] = array();
+ $localize_data['lang']['cdn_mapping_url'] = Lang::title(self::CDN_MAPPING_URL);
+ $localize_data['lang']['cdn_mapping_inc_img'] = Lang::title(self::CDN_MAPPING_INC_IMG);
+ $localize_data['lang']['cdn_mapping_inc_css'] = Lang::title(self::CDN_MAPPING_INC_CSS);
+ $localize_data['lang']['cdn_mapping_inc_js'] = Lang::title(self::CDN_MAPPING_INC_JS);
+ $localize_data['lang']['cdn_mapping_filetype'] = Lang::title(self::CDN_MAPPING_FILETYPE);
+ $localize_data['lang']['cdn_mapping_url_desc'] = sprintf(__('CDN URL to be used. For example, %s', 'litespeed-cache'), '' . $cdn_url . '
');
+ $localize_data['lang']['one_per_line'] = Doc::one_per_line(true);
+ $localize_data['lang']['cdn_mapping_remove'] = __('Remove CDN URL', 'litespeed-cache');
+ $localize_data['lang']['add_cdn_mapping_row'] = __('Add new CDN URL', 'litespeed-cache');
+ $localize_data['lang']['on'] = __('ON', 'litespeed-cache');
+ $localize_data['lang']['off'] = __('OFF', 'litespeed-cache');
+ empty($localize_data['ids']) && ($localize_data['ids'] = array());
+ $localize_data['ids']['cdn_mapping'] = self::O_CDN_MAPPING;
}
// If on Server IP setting page, append getIP link
- if ( $_GET[ 'page' ] == 'litespeed-general' ) {
- $localize_data[ 'ajax_url_getIP' ] = function_exists( 'get_rest_url' ) ? get_rest_url( null, 'litespeed/v1/tool/check_ip' ) : '/';
- $localize_data[ 'nonce' ] = wp_create_nonce( 'wp_rest' );
+ if ($_GET['page'] == 'litespeed-general') {
+ $localize_data['ajax_url_getIP'] = function_exists('get_rest_url') ? get_rest_url(null, 'litespeed/v1/tool/check_ip') : '/';
+ $localize_data['nonce'] = wp_create_nonce('wp_rest');
}
// Activate or deactivate a specific crawler
- if ( $_GET[ 'page' ] == 'litespeed-crawler' ) {
- $localize_data[ 'ajax_url_crawler_switch' ] = function_exists( 'get_rest_url' ) ? get_rest_url( null, 'litespeed/v1/toggle_crawler_state' ) : '/';
- $localize_data[ 'nonce' ] = wp_create_nonce( 'wp_rest' );
+ if ($_GET['page'] == 'litespeed-crawler') {
+ $localize_data['ajax_url_crawler_switch'] = function_exists('get_rest_url') ? get_rest_url(null, 'litespeed/v1/toggle_crawler_state') : '/';
+ $localize_data['nonce'] = wp_create_nonce('wp_rest');
}
}
- if ( $localize_data ) {
- wp_localize_script( Core::PLUGIN_NAME, 'litespeed_data', $localize_data );
+ if ($localize_data) {
+ wp_localize_script(Core::PLUGIN_NAME, 'litespeed_data', $localize_data);
}
- wp_enqueue_script( Core::PLUGIN_NAME );
+ wp_enqueue_script(Core::PLUGIN_NAME);
}
/**
@@ -264,8 +272,9 @@ public function enqueue_scripts() {
*
* @since 3.6
*/
- public function bable_type( $tag, $handle, $src ) {
- if ( $handle != Core::PLUGIN_NAME . '-crawler' && $handle != Core::PLUGIN_NAME . '-cdn' ) {
+ public function bable_type($tag, $handle, $src)
+ {
+ if ($handle != Core::PLUGIN_NAME . '-crawler' && $handle != Core::PLUGIN_NAME . '-cdn') {
return $tag;
}
@@ -280,7 +289,8 @@ public function bable_type( $tag, $handle, $src ) {
* @param array $links Previously added links from other plugins.
* @return array Links array with the litespeed cache one appended.
*/
- public function add_plugin_links($links) {
+ public function add_plugin_links($links)
+ {
// $links[] = '' . __('Settings', 'litespeed-cache') . '';
$links[] = '' . __('Settings', 'litespeed-cache') . '';
@@ -294,7 +304,8 @@ public function add_plugin_links($links) {
* @param string $footer_text
* @return string
*/
- public function admin_footer_text($footer_text) {
+ public function admin_footer_text($footer_text)
+ {
require_once LSCWP_DIR . 'tpl/inc/admin_footer.php';
return $footer_text;
@@ -309,19 +320,19 @@ public function admin_footer_text($footer_text) {
* @param string $str The notice message.
* @return string The built notice html.
*/
- public static function build_notice( $color, $str, $irremovable = false ) {
+ public static function build_notice($color, $str, $irremovable = false)
+ {
$cls = $color;
- if ( $irremovable ) {
+ if ($irremovable) {
$cls .= ' litespeed-irremovable';
- }
- else {
+ } else {
$cls .= ' is-dismissible';
}
// possible translation
- $str = Lang::maybe_translate( $str );
+ $str = Lang::maybe_translate($str);
- return ''. $str . '
' . wp_kses_post($str) . '
' . Base::conf_const( $id ) . '
' );
+ if ($const_val !== null) {
+ echo sprintf(__('This setting is overwritten by the PHP constant %s', 'litespeed-cache'), '' . Base::conf_const($id) . '
');
} else {
- if ( get_current_blog_id() != BLOG_ID_CURRENT_SITE && $this->conf( self::NETWORK_O_USE_PRIMARY ) ) {
- echo __( 'This setting is overwritten by the primary site setting', 'litespeed-cache' );
- }
- else {
- echo __( 'This setting is overwritten by the Network setting', 'litespeed-cache' );
+ if (get_current_blog_id() != BLOG_ID_CURRENT_SITE && $this->conf(self::NETWORK_O_USE_PRIMARY)) {
+ echo __('This setting is overwritten by the primary site setting', 'litespeed-cache');
+ } else {
+ echo __('This setting is overwritten by the Network setting', 'litespeed-cache');
}
}
- echo ', ' . sprintf( __( 'currently set to %s', 'litespeed-cache' ), "$val
" ) . '$val
") . '$val
";
- $val = __( 'Default value', 'litespeed-cache' ) . ': '.$val;
+ $val = __('Default value', 'litespeed-cache') . ': ' . $val;
}
- echo $val;
+ echo $val;
}
}
@@ -1044,20 +1102,21 @@ public function recommended( $id ) {
*
* @since 3.0
*/
- protected function _validate_syntax( $id ) {
- $val = $this->conf( $id, true );
+ protected function _validate_syntax($id)
+ {
+ $val = $this->conf($id, true);
- if ( ! $val ) {
+ if (!$val) {
return;
}
- if ( ! is_array( $val ) ) {
- $val = array( $val );
+ if (!is_array($val)) {
+ $val = array($val);
}
- foreach ( $val as $v ) {
- if ( ! Utility::syntax_checker( $v ) ) {
- echo '' . $v . '
';
+ foreach ($val as $v) {
+ if (!Utility::syntax_checker($v)) {
+ echo '' . $v . '
';
}
}
}
@@ -1067,14 +1126,15 @@ protected function _validate_syntax( $id ) {
*
* @since 3.0
*/
- protected function _validate_htaccess_path( $id ) {
- $val = $this->conf( $id, true );
- if ( ! $val ) {
+ protected function _validate_htaccess_path($id)
+ {
+ $val = $this->conf($id, true);
+ if (!$val) {
return;
}
- if ( substr( $val, -10 ) !== '/.htaccess' ) {
- echo '/.htaccess
' ) . '';
+ if (substr($val, -10) !== '/.htaccess') {
+ echo '/.htaccess
') . '';
}
}
@@ -1083,44 +1143,43 @@ protected function _validate_htaccess_path( $id ) {
*
* @since 3.0
*/
- protected function _validate_ttl( $id, $min = false, $max = false, $allow_zero = false ) {
- $val = $this->conf( $id, true );
+ protected function _validate_ttl($id, $min = false, $max = false, $allow_zero = false)
+ {
+ $val = $this->conf($id, true);
- if ( $allow_zero && ! $val ) {
+ if ($allow_zero && !$val) {
// return;
}
$tip = array();
- if ( $min && $val < $min && ( ! $allow_zero || $val != 0 ) ) {
- $tip[] = __( 'Minimum value', 'litespeed-cache' ) . ': ' . $min . '
.';
+ if ($min && $val < $min && (!$allow_zero || $val != 0)) {
+ $tip[] = __('Minimum value', 'litespeed-cache') . ': ' . $min . '
.';
}
- if ( $max && $val > $max ) {
- $tip[] = __( 'Maximum value', 'litespeed-cache' ) . ': ' . $max . '
.';
+ if ($max && $val > $max) {
+ $tip[] = __('Maximum value', 'litespeed-cache') . ': ' . $max . '
.';
}
echo '' . $range . '
';
+ echo __('Value range', 'litespeed-cache') . ': ' . $range . '
';
}
/**
@@ -1128,29 +1187,30 @@ protected function _validate_ttl( $id, $min = false, $max = false, $allow_zero =
*
* @since 3.0
*/
- protected function _validate_ip( $id ) {
- $val = $this->conf( $id, true );
- if ( ! $val ) {
+ protected function _validate_ip($id)
+ {
+ $val = $this->conf($id, true);
+ if (!$val) {
return;
}
- if ( ! is_array( $val ) ) {
- $val = array( $val );
+ if (!is_array($val)) {
+ $val = array($val);
}
$tip = array();
- foreach ( $val as $v ) {
- if ( ! $v ) {
+ foreach ($val as $v) {
+ if (!$v) {
continue;
}
- if ( ! \WP_Http::is_ip_address( $v ) ) {
- $tip[] = __( 'Invalid IP', 'litespeed-cache' ) . ': ' . esc_textarea( $v ) . '
.';
+ if (!\WP_Http::is_ip_address($v)) {
+ $tip[] = __('Invalid IP', 'litespeed-cache') . ': ' . esc_textarea($v) . '
.';
}
}
- if ( $tip ) {
- echo '' . implode( '
, ', $args ) . '
';
+ $s = '' . implode('
, ', $args) . '
';
- echo ' '
- . __( 'API', 'litespeed-cache' ) . ': '
- . sprintf( __( 'Server variable(s) %s available to override this setting.', 'litespeed-cache' ), $s );
+ echo ' ' .
+ __('API', 'litespeed-cache') .
+ ': ' .
+ sprintf(__('Server variable(s) %s available to override this setting.', 'litespeed-cache'), $s);
- Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/admin/#limiting-the-crawler' );
+ Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/admin/#limiting-the-crawler');
}
/**
@@ -1177,13 +1239,14 @@ protected function _api_env_var() {
* @since 2.6.1
* @access protected
*/
- protected function _uri_usage_example() {
- echo __( 'The URLs will be compared to the REQUEST_URI server variable.', 'litespeed-cache' );
- echo ' ' . sprintf( __( 'For example, for %s, %s can be used here.', 'litespeed-cache' ), '/mypath/mypage?aa=bb
', 'mypage?aa=
' );
+ protected function _uri_usage_example()
+ {
+ echo __('The URLs will be compared to the REQUEST_URI server variable.', 'litespeed-cache');
+ echo ' ' . sprintf(__('For example, for %s, %s can be used here.', 'litespeed-cache'), '/mypath/mypage?aa=bb
', 'mypage?aa=
');
echo '^
' );
- echo ' ' . sprintf( __( 'To do an exact match, add %s to the end of the URL.', 'litespeed-cache' ), '$
' );
- echo ' ' . __( 'One per line.', 'litespeed-cache' );
+ echo sprintf(__('To match the beginning, add %s to the beginning of the item.', 'litespeed-cache'), '^
');
+ echo ' ' . sprintf(__('To do an exact match, add %s to the end of the URL.', 'litespeed-cache'), '$
');
+ echo ' ' . __('One per line.', 'litespeed-cache');
echo '';
}
@@ -1193,27 +1256,27 @@ protected function _uri_usage_example() {
* @since 2.0
* @access public
*/
- public static function print_plural( $num, $kind = 'group' ) {
- if ( $num > 1 ) {
- switch ( $kind ) {
- case 'group' :
- return sprintf( __( '%s groups', 'litespeed-cache' ), $num );
+ public static function print_plural($num, $kind = 'group')
+ {
+ if ($num > 1) {
+ switch ($kind) {
+ case 'group':
+ return sprintf(__('%s groups', 'litespeed-cache'), $num);
- case 'image' :
- return sprintf( __( '%s images', 'litespeed-cache' ), $num );
+ case 'image':
+ return sprintf(__('%s images', 'litespeed-cache'), $num);
default:
return $num;
}
-
}
- switch ( $kind ) {
- case 'group' :
- return sprintf( __( '%s group', 'litespeed-cache' ), $num );
+ switch ($kind) {
+ case 'group':
+ return sprintf(__('%s group', 'litespeed-cache'), $num);
- case 'image' :
- return sprintf( __( '%s image', 'litespeed-cache' ), $num );
+ case 'image':
+ return sprintf(__('%s image', 'litespeed-cache'), $num);
default:
return $num;
@@ -1226,22 +1289,20 @@ public static function print_plural( $num, $kind = 'group' ) {
* @since 2.0
* @access public
*/
- public static function guidance( $title, $steps, $current_step ) {
- if ( $current_step === 'done' ) {
- $current_step = count( $steps ) + 1;
+ public static function guidance($title, $steps, $current_step)
+ {
+ if ($current_step === 'done') {
+ $current_step = count($steps) + 1;
}
- $percentage = ' (' . floor( ( $current_step - 1 ) * 100 / count( $steps ) ) . '%)';
+ $percentage = ' (' . floor((($current_step - 1) * 100) / count($steps)) . '%)';
- $html = '' . $service_tag . '
' );
- Admin_Display::error( array( 'cloud_trylater' => $msg ) );
+ if ($service_tag !== self::API_VER) {
+ $msg =
+ __('Cloud Error', 'litespeed-cache') .
+ ': ' .
+ sprintf(__('Please try after %1$s for service %2$s.', 'litespeed-cache'), Utility::readable_time($expired, 0, true), '' . $service_tag . '
');
+ Admin_Display::error(array('cloud_trylater' => $msg));
}
return false;
}
}
- if ( in_array( $service_tag, self::$_PUB_SVC_SET ) ) {
+ if (in_array($service_tag, self::$_PUB_SVC_SET)) {
return true;
}
- if ( ! $this->_api_key ) {
- Admin_Display::error( Error::msg( 'lack_of_api_key' ) );
+ if (!$this->_api_key()) {
+ Admin_Display::error(Error::msg('lack_of_api_key'));
return false;
}
@@ -617,9 +647,10 @@ private function _maybe_cloud( $service_tag ) {
* @since 3.0
* @access public
*/
- public static function post( $service, $data = false, $time_out = false ) {
+ public static function post($service, $data = false, $time_out = false)
+ {
$instance = self::cls();
- return $instance->_post( $service, $data, $time_out );
+ return $instance->_post($service, $data, $time_out);
}
/**
@@ -628,42 +659,43 @@ public static function post( $service, $data = false, $time_out = false ) {
* @since 3.0
* @access private
*/
- private function _post( $service, $data = false, $time_out = false ) {
+ private function _post($service, $data = false, $time_out = false)
+ {
$service_tag = $service;
- if ( ! empty( $data[ 'action' ] ) ) {
- $service_tag .= '-' . $data[ 'action' ];
+ if (!empty($data['action'])) {
+ $service_tag .= '-' . $data['action'];
}
- if ( ! $this->_maybe_cloud( $service_tag ) ) {
+ if (!$this->_maybe_cloud($service_tag)) {
return;
}
- $server = $this->detect_cloud( $service );
- if ( ! $server ) {
+ $server = $this->detect_cloud($service);
+ if (!$server) {
return;
}
- $url = $server . '/' . $this->_maybe_queue( $service );
+ $url = $server . '/' . $this->_maybe_queue($service);
- self::debug( 'posting to : ' . $url );
+ self::debug('posting to : ' . $url);
- if ( $data ) {
- $data[ 'service_type' ] = $service; // For queue distribution usage
+ if ($data) {
+ $data['service_type'] = $service; // For queue distribution usage
}
$param = array(
- 'site_url' => home_url(),
- 'domain_key' => $this->_api_key,
- 'main_domain' => ! empty( $this->_summary[ 'main_domain' ] ) ? $this->_summary[ 'main_domain' ] : '',
- 'ver' => Core::VER,
- 'data' => $data,
+ 'site_url' => home_url(),
+ 'domain_key' => $this->_api_key(),
+ 'main_domain' => !empty($this->_summary['main_domain']) ? $this->_summary['main_domain'] : '',
+ 'ver' => Core::VER,
+ 'data' => $data,
);
- self::save_summary( array( 'curr_request.' . $service_tag => time() ) );
+ self::save_summary(array('curr_request.' . $service_tag => time()));
- $response = wp_remote_post( $url, array( 'body' => $param, 'timeout' => $time_out ?: 15, 'sslverify' => true ) );
+ $response = wp_remote_post($url, array('body' => $param, 'timeout' => $time_out ?: 15, 'sslverify' => true));
- return $this->_parse_response( $response, $service, $service_tag, $server );
+ return $this->_parse_response($response, $service, $service_tag, $server);
}
/**
@@ -672,85 +704,113 @@ private function _post( $service, $data = false, $time_out = false ) {
*
* @since 3.0
*/
- private function _parse_response( $response, $service, $service_tag, $server ) {
- if ( is_wp_error( $response ) ) {
+ private function _parse_response($response, $service, $service_tag, $server)
+ {
+ if (is_wp_error($response)) {
$error_message = $response->get_error_message();
- self::debug( 'failed to request: ' . $error_message );
+ self::debug('failed to request: ' . $error_message);
- if ( $service !== self::API_VER ) {
- $msg = __( 'Failed to request via WordPress', 'litespeed-cache' ) . ': ' . $error_message . " [server] $server [service] $service";
- Admin_Display::error( $msg );
+ if ($service !== self::API_VER) {
+ $msg = __('Failed to request via WordPress', 'litespeed-cache') . ': ' . $error_message . " [server] $server [service] $service";
+ Admin_Display::error($msg);
// Tmp disabled this node from reusing in 1 day
- if (empty($this->_summary['disabled_node'])) $this->_summary['disabled_node'] = array();
+ if (empty($this->_summary['disabled_node'])) {
+ $this->_summary['disabled_node'] = array();
+ }
$this->_summary['disabled_node'][$server] = time();
self::save_summary();
// Force redetect node
- self::debug( 'Node error, redetecting node [svc] ' . $service );
- $this->detect_cloud( $service, true );
+ self::debug('Node error, redetecting node [svc] ' . $service);
+ $this->detect_cloud($service, true);
}
return;
}
- $json = json_decode( $response[ 'body' ], true );
+ $json = json_decode($response['body'], true);
- if ( ! is_array( $json ) ) {
- self::debug( 'failed to decode response json: ' . $response[ 'body' ] );
+ if (!is_array($json)) {
+ self::debug('failed to decode response json: ' . $response['body']);
- if ( $service !== self::API_VER ) {
- $msg = __( 'Failed to request via WordPress', 'litespeed-cache' ) . ': ' . $response[ 'body' ] . " [server] $server [service] $service";
- Admin_Display::error( $msg );
+ if ($service !== self::API_VER) {
+ $msg = __('Failed to request via WordPress', 'litespeed-cache') . ': ' . $response['body'] . " [server] $server [service] $service";
+ Admin_Display::error($msg);
// Tmp disabled this node from reusing in 1 day
- if (empty($this->_summary['disabled_node'])) $this->_summary['disabled_node'] = array();
+ if (empty($this->_summary['disabled_node'])) {
+ $this->_summary['disabled_node'] = array();
+ }
$this->_summary['disabled_node'][$server] = time();
self::save_summary();
// Force redetect node
- self::debug( 'Node error, redetecting node [svc] ' . $service );
- $this->detect_cloud( $service, true );
+ self::debug('Node error, redetecting node [svc] ' . $service);
+ $this->detect_cloud($service, true);
}
return;
}
- if ( ! empty( $json[ '_code' ] ) ) {
- if ( $json[ '_code' ] == 'heavy_load' || $json[ '_code' ] == 'redetect_node' ) {
+ if (!empty($json['_code'])) {
+ self::debug('Hit err _code: ' . $json['_code']);
+ if ($json['_code'] == 'unpulled_images') {
+ $msg = __('Cloud server refused the current request due to unpulled images. Please pull the images first.', 'litespeed-cache');
+ Admin_Display::error($msg);
+ return;
+ }
+ if ($json['_code'] == 'blocklisted') {
+ $msg = __('Your domain_key has been temporarily blocklisted to prevent abuse. You may contact support at QUIC.cloud to learn more.', 'litespeed-cache');
+ Admin_Display::error($msg);
+ return;
+ }
+
+ if ($json['_code'] == 'rate_limit') {
+ self::debug('Cloud server rate limit exceeded.');
+ $msg = __('Cloud server refused the current request due to rate limiting. Please try again later.', 'litespeed-cache');
+ Admin_Display::error($msg);
+ return;
+ }
+
+ if ($json['_code'] == 'heavy_load' || $json['_code'] == 'redetect_node') {
// Force redetect node
- self::debug( 'Node redetecting node [svc] ' . $service );
- Admin_Display::info( __( 'Redetected node', 'litespeed-cache' ) . ': ' . Error::msg( $json[ '_code' ] ) );
- $this->detect_cloud( $service, true );
+ self::debug('Node redetecting node [svc] ' . $service);
+ Admin_Display::info(__('Redetected node', 'litespeed-cache') . ': ' . Error::msg($json['_code']));
+ $this->detect_cloud($service, true);
}
}
- if ( ! empty( $json[ '_503' ] ) ) {
- self::debug( 'service 503 unavailable temporarily. ' . $json[ '_503' ] );
+ if (!empty($json['_503'])) {
+ self::debug('service 503 unavailable temporarily. ' . $json['_503']);
- $msg = __( 'We are working hard to improve your online service experience. The service will be unavailable while we work. We apologize for any inconvenience.', 'litespeed-cache' );
- $msg .= ' ' . $json[ '_503' ] . " [server] $server [service] $service";
- Admin_Display::error( $msg );
+ $msg = __(
+ 'We are working hard to improve your online service experience. The service will be unavailable while we work. We apologize for any inconvenience.',
+ 'litespeed-cache'
+ );
+ $msg .= ' ' . $json['_503'] . " [server] $server [service] $service";
+ Admin_Display::error($msg);
// Force redetect node
- self::debug( 'Node error, redetecting node [svc] ' . $service );
- $this->detect_cloud( $service, true );
+ self::debug('Node error, redetecting node [svc] ' . $service);
+ $this->detect_cloud($service, true);
return;
}
- list( $json, $return ) = $this->extract_msg( $json, $service, $server );
- if ( $return ) return;
+ list($json, $return) = $this->extract_msg($json, $service, $server);
+ if ($return) {
+ return;
+ }
- self::save_summary( array(
- 'last_request.' . $service_tag => $this->_summary[ 'curr_request.' . $service_tag ],
- 'curr_request.' . $service_tag => 0
+ self::save_summary(array(
+ 'last_request.' . $service_tag => $this->_summary['curr_request.' . $service_tag],
+ 'curr_request.' . $service_tag => 0,
));
- if ( $json ) {
- self::debug2( 'response ok', $json );
- }
- else {
- self::debug2( 'response ok' );
+ if ($json) {
+ self::debug2('response ok', $json);
+ } else {
+ self::debug2('response ok');
}
// Only successful request return Array
@@ -761,74 +821,77 @@ private function _parse_response( $response, $service, $service_tag, $server ) {
* Extract msg from json
* @since 5.0
*/
- public function extract_msg( $json, $service, $server = false, $is_callback = false ) {
- if ( ! empty( $json[ '_info' ] ) ) {
- self::debug( '_info: ' . $json[ '_info' ] );
- $msg = __( 'Message from QUIC.cloud server', 'litespeed-cache' ) . ': ' . $json[ '_info' ];
- $msg .= $this->_parse_link( $json );
- Admin_Display::info( $msg );
- unset( $json[ '_info' ] );
+ public function extract_msg($json, $service, $server = false, $is_callback = false)
+ {
+ if (!empty($json['_info'])) {
+ self::debug('_info: ' . $json['_info']);
+ $msg = __('Message from QUIC.cloud server', 'litespeed-cache') . ': ' . $json['_info'];
+ $msg .= $this->_parse_link($json);
+ Admin_Display::info($msg);
+ unset($json['_info']);
}
- if ( ! empty( $json[ '_note' ] ) ) {
- self::debug( '_note: ' . $json[ '_note' ] );
- $msg = __( 'Message from QUIC.cloud server', 'litespeed-cache' ) . ': ' . $json[ '_note' ];
- $msg .= $this->_parse_link( $json );
- Admin_Display::note( $msg );
- unset( $json[ '_note' ] );
+ if (!empty($json['_note'])) {
+ self::debug('_note: ' . $json['_note']);
+ $msg = __('Message from QUIC.cloud server', 'litespeed-cache') . ': ' . $json['_note'];
+ $msg .= $this->_parse_link($json);
+ Admin_Display::note($msg);
+ unset($json['_note']);
}
- if ( ! empty( $json[ '_success' ] ) ) {
- self::debug( '_success: ' . $json[ '_success' ] );
- $msg = __( 'Good news from QUIC.cloud server', 'litespeed-cache' ) . ': ' . $json[ '_success' ];
- $msg .= $this->_parse_link( $json );
- Admin_Display::succeed( $msg );
- unset( $json[ '_success' ] );
+ if (!empty($json['_success'])) {
+ self::debug('_success: ' . $json['_success']);
+ $msg = __('Good news from QUIC.cloud server', 'litespeed-cache') . ': ' . $json['_success'];
+ $msg .= $this->_parse_link($json);
+ Admin_Display::succeed($msg);
+ unset($json['_success']);
}
// Upgrade is required
- if ( ! empty( $json[ '_err_req_v' ] ) ) {
- self::debug( '_err_req_v: ' . $json[ '_err_req_v' ] );
- $msg = sprintf( __( '%1$s plugin version %2$s required for this action.', 'litespeed-cache' ), Core::NAME, 'v' . $json[ '_err_req_v' ] . '+' ) . " [server] $server [service] $service";
+ if (!empty($json['_err_req_v'])) {
+ self::debug('_err_req_v: ' . $json['_err_req_v']);
+ $msg =
+ sprintf(__('%1$s plugin version %2$s required for this action.', 'litespeed-cache'), Core::NAME, 'v' . $json['_err_req_v'] . '+') .
+ " [server] $server [service] $service";
// Append upgrade link
- $msg2 = ' ' . GUI::plugin_upgrade_link( Core::NAME, Core::PLUGIN_NAME, $json[ '_err_req_v' ] );
+ $msg2 = ' ' . GUI::plugin_upgrade_link(Core::NAME, Core::PLUGIN_NAME, $json['_err_req_v']);
- $msg2 .= $this->_parse_link( $json );
- Admin_Display::error( $msg . $msg2 );
- return array( $json, true );
+ $msg2 .= $this->_parse_link($json);
+ Admin_Display::error($msg . $msg2);
+ return array($json, true);
}
// Parse _carry_on info
- if ( ! empty( $json[ '_carry_on' ] ) ) {
- self::debug( 'Carry_on usage', $json[ '_carry_on' ] );
+ if (!empty($json['_carry_on'])) {
+ self::debug('Carry_on usage', $json['_carry_on']);
// Store generic info
- foreach ( array( 'usage', 'promo', 'partner', '_err', '_info', '_note', '_success' ) as $v ) {
- if ( ! empty( $json[ '_carry_on' ][ $v ] ) ) {
- switch ( $v ) {
+ foreach (array('usage', 'promo', 'partner', '_err', '_info', '_note', '_success') as $v) {
+ if (!empty($json['_carry_on'][$v])) {
+ switch ($v) {
case 'usage':
- $usage_svc_tag = in_array( $service, array( self::SVC_CCSS, self::SVC_UCSS, self::SVC_VPI ) ) ? self::SVC_PAGE_OPTM : $service;
- $this->_summary[ 'usage.' . $usage_svc_tag ] = $json[ '_carry_on' ][ $v ];
+ $usage_svc_tag = in_array($service, array(self::SVC_CCSS, self::SVC_UCSS, self::SVC_VPI)) ? self::SVC_PAGE_OPTM : $service;
+ $this->_summary['usage.' . $usage_svc_tag] = $json['_carry_on'][$v];
break;
case 'promo':
- if ( empty( $this->_summary[ $v ] ) || ! is_array( $this->_summary[ $v ] ) ) {
- $this->_summary[ $v ] = array();
+ if (empty($this->_summary[$v]) || !is_array($this->_summary[$v])) {
+ $this->_summary[$v] = array();
}
- $this->_summary[ $v ][] = $json[ '_carry_on' ][ $v ];
+ $this->_summary[$v][] = $json['_carry_on'][$v];
break;
case 'partner':
- $this->_summary[ $v ] = $json[ '_carry_on' ][ $v ];
+ $this->_summary[$v] = $json['_carry_on'][$v];
break;
case '_error':
case '_info':
case '_note':
case '_success':
- $color_mode = substr( $v, 1 );
- $msgs = $json[ '_carry_on' ][ $v ];
- Admin_Display::add_unique_notice( $color_mode, $msgs, true );
+ $color_mode = substr($v, 1);
+ $msgs = $json['_carry_on'][$v];
+ Admin_Display::add_unique_notice($color_mode, $msgs, true);
break;
default:
@@ -837,98 +900,103 @@ public function extract_msg( $json, $service, $server = false, $is_callback = fa
}
}
self::save_summary();
- unset( $json[ '_carry_on' ] );
+ unset($json['_carry_on']);
}
// Parse general error msg
- if ( !$is_callback && ( empty( $json[ '_res' ] ) || $json[ '_res' ] !== 'ok' ) ) {
- $json_msg = ! empty( $json[ '_msg' ] ) ? $json[ '_msg' ] : 'unknown';
- self::debug( '❌ _err: ' . $json_msg, $json );
+ if (!$is_callback && (empty($json['_res']) || $json['_res'] !== 'ok')) {
+ $json_msg = !empty($json['_msg']) ? $json['_msg'] : 'unknown';
+ self::debug('❌ _err: ' . $json_msg, $json);
- $str_translated = Error::msg( $json_msg );
- $msg = __( 'Failed to communicate with QUIC.cloud server', 'litespeed-cache' ) . ': ' . $str_translated . " [server] $server [service] $service";
- $msg .= $this->_parse_link( $json );
- Admin_Display::error( $msg );
+ $str_translated = Error::msg($json_msg);
+ $msg = __('Failed to communicate with QUIC.cloud server', 'litespeed-cache') . ': ' . $str_translated . " [server] $server [service] $service";
+ $msg .= $this->_parse_link($json);
+ Admin_Display::error($msg);
// QC may try auto alias
/** @since 5.0 Store the domain as `err_domains` only for QC auto alias feature */
- if ( $json_msg == 'err_alias' ) {
- if ( empty( $this->_summary[ 'err_domains' ] ) ) {
- $this->_summary[ 'err_domains' ] = array();
+ if ($json_msg == 'err_alias') {
+ if (empty($this->_summary['err_domains'])) {
+ $this->_summary['err_domains'] = array();
}
$home_url = home_url();
- if ( ! array_key_exists( $home_url, $this->_summary[ 'err_domains' ] ) ) {
- $this->_summary[ 'err_domains' ][ $home_url ] = time();
+ if (!array_key_exists($home_url, $this->_summary['err_domains'])) {
+ $this->_summary['err_domains'][$home_url] = time();
}
self::save_summary();
}
// Site not on QC, delete invalid domain key
- if ( $json_msg == 'site_not_registered' || $json_msg == 'err_key' ) {
+ if ($json_msg == 'site_not_registered' || $json_msg == 'err_key') {
$this->_clean_api_key();
}
- return array( $json, true );
+ return array($json, true);
}
- unset( $json[ '_res' ] );
- if ( ! empty( $json[ '_msg' ] ) ) {
- unset( $json[ '_msg' ] );
+ unset($json['_res']);
+ if (!empty($json['_msg'])) {
+ unset($json['_msg']);
}
- return array( $json, false );
+ return array($json, false);
}
/**
* Clear API key and QC linked status
* @since 5.0
*/
- private function _clean_api_key() {
- $this->cls( 'Conf' )->update_confs( array( self::O_API_KEY => '' ) );
+ private function _clean_api_key()
+ {
+ $this->cls('Conf')->update_confs(array(self::O_API_KEY => ''));
$this->_summary['is_linked'] = 0;
self::save_summary();
- $msg = __( 'Site not recognized. Domain Key has been automatically removed. Please request a new one.', 'litespeed-cache' );
- $msg .= Doc::learn_more( admin_url( 'admin.php?page=litespeed-general' ), __( 'Click here to set.', 'litespeed-cache' ), true, false, true );
- $msg .= Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/general/#domain-key', false, false, false, true );
- Admin_Display::error( $msg, false, true );
+ $msg = __('Site not recognized. Domain Key has been automatically removed. Please request a new one.', 'litespeed-cache');
+ $msg .= Doc::learn_more(admin_url('admin.php?page=litespeed-general'), __('Click here to set.', 'litespeed-cache'), true, false, true);
+ $msg .= Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/general/#domain-key', false, false, false, true);
+ Admin_Display::error($msg, false, true);
}
/**
* REST call: check if the error domain is valid call for auto alias purpose
* @since 5.0
*/
- public function rest_err_domains() {
+ public function rest_err_domains()
+ {
// Validate token hash first
- if ( empty( $_POST[ 'hash' ] ) || empty( $_POST[ 'main_domain' ] ) || empty( $_POST[ 'alias' ] ) ) {
- return self::err( 'lack_of_param' );
+ if (empty($_POST['hash']) || empty($_POST['main_domain']) || empty($_POST['alias'])) {
+ return self::err('lack_of_param');
}
- if ( ! $this->_api_key || $_POST[ 'hash' ] !== md5( substr( $this->_api_key, 1, 8 ) ) ) {
- return self::err( 'wrong_hash' );
+ if (!$this->_api_key() || $_POST['hash'] !== md5(substr($this->_api_key(), 1, 8))) {
+ return self::err('wrong_hash');
}
- list( $post_data ) = $this->extract_msg( $_POST, 'Quic.cloud', false, true );
+ list($post_data) = $this->extract_msg($_POST, 'Quic.cloud', false, true);
- if ( $this->_is_err_domain( $_POST[ 'alias' ] ) ) {
- $this->_remove_domain_from_err_list( $_POST[ 'alias' ] );
+ if ($this->_is_err_domain($_POST['alias'])) {
+ if ($_POST['alias'] == home_url()) {
+ $this->_remove_domain_from_err_list($_POST['alias']);
+ }
- $res_hash = substr( $this->_api_key, 2, 4 );
+ $res_hash = substr($this->_api_key(), 2, 4);
- self::debug( '__callback IP request hash: md5(' . $res_hash . ')' );
+ self::debug('__callback IP request hash: md5(' . $res_hash . ')');
- return self::ok( array( 'hash' => md5( $res_hash ) ) );
+ return self::ok(array('hash' => md5($res_hash)));
}
- return self::err( 'Not an alias req from here' );
+ return self::err('Not an alias req from here');
}
/**
* Remove a domain from err domain
* @since 5.0
*/
- private function _remove_domain_from_err_list( $url ) {
- unset( $this->_summary[ 'err_domains' ][ $url ] );
+ private function _remove_domain_from_err_list($url)
+ {
+ unset($this->_summary['err_domains'][$url]);
self::save_summary();
}
@@ -936,25 +1004,30 @@ private function _remove_domain_from_err_list( $url ) {
* Check if is err domain
* @since 5.0
*/
- private function _is_err_domain( $home_url ) {
- if ( empty( $this->_summary[ 'err_domains' ] ) ) return false;
- if ( ! array_key_exists( $home_url, $this->_summary[ 'err_domains' ] ) ) return false;
+ private function _is_err_domain($home_url)
+ {
+ if (empty($this->_summary['err_domains'])) {
+ return false;
+ }
+ if (!array_key_exists($home_url, $this->_summary['err_domains'])) {
+ return false;
+ }
// Auto delete if too long ago
- if ( time() - $this->_summary[ 'err_domains' ][ $home_url ] > 86400 * 10 ) {
- $this->_remove_domain_from_err_list( $home_url );
+ if (time() - $this->_summary['err_domains'][$home_url] > 86400 * 10) {
+ $this->_remove_domain_from_err_list($home_url);
+ }
+ if (time() - $this->_summary['err_domains'][$home_url] > 86400) {
+ return false;
}
- if ( time() - $this->_summary[ 'err_domains' ][ $home_url ] > 86400 ) return false;
return true;
}
public function req_rest_api($api, $body = array())
{
-
$token = $this->_setup_token;
if (empty($token)) {
-
- Admin_Display::error( __( 'Cannot request REST API, no token saved.', 'litespeed-cache' ));
+ Admin_Display::error(__('Cannot request REST API, no token saved.', 'litespeed-cache'));
return;
}
$req_args = array(
@@ -976,27 +1049,36 @@ public function req_rest_api($api, $body = array())
private function _parse_rest_response($response)
{
- if ( is_wp_error( $response ) ) {
-
+ if (is_wp_error($response)) {
$error_message = $response->get_error_message();
- self::debug( 'failed to request REST API: ' . $error_message );
- Admin_Display::error( __( 'Cloud REST Error', 'litespeed-cache' ) . ': ' . $error_message );
+ self::debug('failed to request REST API: ' . $error_message);
+ Admin_Display::error(__('Cloud REST Error', 'litespeed-cache') . ': ' . $error_message);
return $error_message;
+ } elseif (wp_remote_retrieve_response_code($response) == '401') {
+ return 'unauthorized access to REST API.';
}
- $json = json_decode( $response[ 'body' ], true );
+ $json = json_decode($response['body'], true);
if (!$json['success']) {
+ $contactSupport = false;
if (isset($json['info']['errors'])) {
$errs = array();
foreach ($json['info']['errors'] as $err) {
$errs[] = 'Error ' . $err['code'] . ': ' . $err['message'];
+ if ($err['code'] == 1113) {
+ $contactSupport = true;
+ }
}
$error_message = implode('' . Utility::readable_time( $is_upgrading ) . '
' ) . ' [LiteSpeed]', true );
+ Admin_Display::info(
+ sprintf(
+ __('The database has been upgrading in the background since %s. This message will disappear once upgrade is complete.', 'litespeed-cache'),
+ '' . Utility::readable_time($is_upgrading) . '
'
+ ) . ' [LiteSpeed]',
+ true
+ );
}
/**
@@ -229,12 +233,12 @@ public function check_upgrading_msg() {
*
* @since 3.0.1
*/
- private function _set_upgrade_lock( $lock ) {
- if ( ! $lock ) {
- update_option( 'litespeed.data.upgrading', -1 );
- }
- else {
- update_option( 'litespeed.data.upgrading', time() );
+ private function _set_upgrade_lock($lock)
+ {
+ if (!$lock) {
+ update_option('litespeed.data.upgrading', -1);
+ } else {
+ update_option('litespeed.data.upgrading', time());
}
}
@@ -246,53 +250,53 @@ private function _set_upgrade_lock( $lock ) {
* @since 3.0
* @access public
*/
- public function try_upgrade_conf_3_0() {
- $previous_options = get_option( 'litespeed-cache-conf' );
- if ( ! $previous_options ) {
- Cloud::version_check( 'new' );
+ public function try_upgrade_conf_3_0()
+ {
+ $previous_options = get_option('litespeed-cache-conf');
+ if (!$previous_options) {
+ Cloud::version_check('new');
return;
}
- $ver = $previous_options[ 'version' ];
+ $ver = $previous_options['version'];
- ! defined( 'LSCWP_CUR_V' ) && define( 'LSCWP_CUR_V', $ver );
+ !defined('LSCWP_CUR_V') && define('LSCWP_CUR_V', $ver);
// Init log manually
- if ( $this->conf( Base::O_DEBUG ) ) {
- $this->cls( 'Debug2' )->init();
+ if ($this->conf(Base::O_DEBUG)) {
+ $this->cls('Debug2')->init();
}
- Debug2::debug( '[Data] Upgrading previous settings [from] ' . $ver . ' [to] v3.0' );
+ Debug2::debug('[Data] Upgrading previous settings [from] ' . $ver . ' [to] v3.0');
- if ( $this->_get_upgrade_lock() ) {
+ if ($this->_get_upgrade_lock()) {
return;
}
- $this->_set_upgrade_lock( true );
+ $this->_set_upgrade_lock(true);
require_once LSCWP_DIR . 'src/data.upgrade.func.php';
// Here inside will update the version to v3.0
- litespeed_update_3_0( $ver );
+ litespeed_update_3_0($ver);
- $this->_set_upgrade_lock( false );
+ $this->_set_upgrade_lock(false);
- Debug2::debug( '[Data] Upgraded to v3.0' );
+ Debug2::debug('[Data] Upgraded to v3.0');
// Upgrade from 3.0 to latest version
$ver = '3.0';
- if ( Core::VER != $ver ) {
- $this->conf_upgrade( $ver );
- }
- else {
+ if (Core::VER != $ver) {
+ $this->conf_upgrade($ver);
+ } else {
// Reload options
- $this->cls( 'Conf' )->load_options();
+ $this->cls('Conf')->load_options();
$this->correct_tb_existance();
- ! defined( 'LSWCP_EMPTYCACHE') && define( 'LSWCP_EMPTYCACHE', true );// clear all sites caches
+ !defined('LSWCP_EMPTYCACHE') && define('LSWCP_EMPTYCACHE', true); // clear all sites caches
Purge::purge_all();
- Cloud::version_check( 'upgrade' );
+ Cloud::version_check('upgrade');
}
}
@@ -302,10 +306,11 @@ public function try_upgrade_conf_3_0() {
* @since 3.0
* @access public
*/
- public function tb( $tb ) {
+ public function tb($tb)
+ {
global $wpdb;
- switch ( $tb ) {
+ switch ($tb) {
case 'img_optm':
return $wpdb->prefix . self::TB_IMG_OPTM;
break;
@@ -337,7 +342,6 @@ public function tb( $tb ) {
default:
break;
}
-
}
/**
@@ -346,9 +350,10 @@ public function tb( $tb ) {
* @since 3.0
* @access public
*/
- public function tb_exist( $tb ) {
+ public function tb_exist($tb)
+ {
global $wpdb;
- return $wpdb->get_var( "SHOW TABLES LIKE '" . $this->tb( $tb ) . "'" );
+ return $wpdb->get_var("SHOW TABLES LIKE '" . $this->tb($tb) . "'");
}
/**
@@ -357,8 +362,9 @@ public function tb_exist( $tb ) {
* @since 2.0
* @access private
*/
- private function _tb_structure( $tb ) {
- return File::read( LSCWP_DIR . 'src/data_structure/' . $tb . '.sql' );
+ private function _tb_structure($tb)
+ {
+ return File::read(LSCWP_DIR . 'src/data_structure/' . $tb . '.sql');
}
/**
@@ -367,29 +373,30 @@ private function _tb_structure( $tb ) {
* @since 3.0
* @access public
*/
- public function tb_create( $tb ) {
+ public function tb_create($tb)
+ {
global $wpdb;
- Debug2::debug2( '[Data] Checking table ' . $tb );
+ Debug2::debug2('[Data] Checking table ' . $tb);
// Check if table exists first
- if ( $this->tb_exist( $tb ) ) {
- Debug2::debug2( '[Data] Existed' );
+ if ($this->tb_exist($tb)) {
+ Debug2::debug2('[Data] Existed');
return;
}
- Debug2::debug( '[Data] Creating ' . $tb );
+ Debug2::debug('[Data] Creating ' . $tb);
$sql = sprintf(
- 'CREATE TABLE IF NOT EXISTS `%1$s` (' . $this->_tb_structure( $tb ) . ') %2$s;',
- $this->tb( $tb ),
+ 'CREATE TABLE IF NOT EXISTS `%1$s` (' . $this->_tb_structure($tb) . ') %2$s;',
+ $this->tb($tb),
$wpdb->get_charset_collate() // 'DEFAULT CHARSET=utf8'
);
- $res = $wpdb->query( $sql );
- if ( $res !== true ) {
- Debug2::debug( '[Data] Warning! Creating table failed!', $sql );
- Admin_Display::error( Error::msg( 'failed_tb_creation', array( '' . $tb . '
', '' . $sql . '
' ) ) );
+ $res = $wpdb->query($sql);
+ if ($res !== true) {
+ Debug2::debug('[Data] Warning! Creating table failed!', $sql);
+ Admin_Display::error(Error::msg('failed_tb_creation', array('' . $tb . '
', '' . $sql . '
')));
}
}
@@ -399,17 +406,18 @@ public function tb_create( $tb ) {
* @since 3.0
* @access public
*/
- public function tb_del( $tb ) {
+ public function tb_del($tb)
+ {
global $wpdb;
- if ( ! $this->tb_exist( $tb ) ) {
+ if (!$this->tb_exist($tb)) {
return;
}
- Debug2::debug( '[Data] Deleting table ' . $tb );
+ Debug2::debug('[Data] Deleting table ' . $tb);
- $q = 'DROP TABLE IF EXISTS ' . $this->tb( $tb );
- $wpdb->query( $q );
+ $q = 'DROP TABLE IF EXISTS ' . $this->tb($tb);
+ $wpdb->query($q);
}
/**
@@ -418,12 +426,13 @@ public function tb_del( $tb ) {
* @since 3.0
* @access public
*/
- public function tables_del() {
- $this->tb_del( 'avatar' );
- $this->tb_del( 'crawler' );
- $this->tb_del( 'crawler_blacklist' );
- $this->tb_del( 'url' );
- $this->tb_del( 'url_file' );
+ public function tables_del()
+ {
+ $this->tb_del('avatar');
+ $this->tb_del('crawler');
+ $this->tb_del('crawler_blacklist');
+ $this->tb_del('url');
+ $this->tb_del('url_file');
// Deleting img_optm only can be done when destroy all optm images
}
@@ -433,10 +442,11 @@ public function tables_del() {
*
* @since 4.0
*/
- public function table_truncate( $tb ) {
+ public function table_truncate($tb)
+ {
global $wpdb;
- $q = 'TRUNCATE TABLE ' . $this->tb( $tb );
- $wpdb->query( $q );
+ $q = 'TRUNCATE TABLE ' . $this->tb($tb);
+ $wpdb->query($q);
}
/**
@@ -444,88 +454,94 @@ public function table_truncate( $tb ) {
*
* @since 4.0
*/
- public function url_file_clean( $file_type ) {
+ public function url_file_clean($file_type)
+ {
global $wpdb;
- $type = $this->_url_file_types[ $file_type ];
- $q = 'DELETE FROM ' . $this->tb( 'url_file' ) . ' WHERE `type` = %d';
- $wpdb->query( $wpdb->prepare( $q, $type ) );
+
+ if (!$this->tb_exist('url_file')) {
+ return;
+ }
+
+ $type = $this->_url_file_types[$file_type];
+ $q = 'DELETE FROM ' . $this->tb('url_file') . ' WHERE `type` = %d';
+ $wpdb->query($wpdb->prepare($q, $type));
}
/**
* Generate filename based on URL, if content md5 existed, reuse existing file.
* @since 4.0
*/
- public function save_url( $request_url, $vary, $file_type, $filecon_md5, $path, $mobile = false, $webp = false ) {
+ public function save_url($request_url, $vary, $file_type, $filecon_md5, $path, $mobile = false, $webp = false)
+ {
global $wpdb;
- if ( strlen( $vary ) > 32 ) {
- $vary = md5( $vary );
+ if (strlen($vary) > 32) {
+ $vary = md5($vary);
}
- $type = $this->_url_file_types[ $file_type ];
+ $type = $this->_url_file_types[$file_type];
- $tb_url = $this->tb( 'url' );
- $tb_url_file = $this->tb( 'url_file' );
+ $tb_url = $this->tb('url');
+ $tb_url_file = $this->tb('url_file');
$q = "SELECT * FROM `$tb_url` WHERE url=%s";
- $url_row = $wpdb->get_row( $wpdb->prepare( $q, $request_url ), ARRAY_A );
- if ( ! $url_row ) {
+ $url_row = $wpdb->get_row($wpdb->prepare($q, $request_url), ARRAY_A);
+ if (!$url_row) {
$q = "INSERT INTO `$tb_url` SET url=%s";
- $wpdb->query( $wpdb->prepare( $q, $request_url ) );
+ $wpdb->query($wpdb->prepare($q, $request_url));
$url_id = $wpdb->insert_id;
- }
- else {
- $url_id = $url_row[ 'id' ];
+ } else {
+ $url_id = $url_row['id'];
}
$q = "SELECT * FROM `$tb_url_file` WHERE url_id=%d AND vary=%s AND type=%d AND expired=0";
- $file_row = $wpdb->get_row( $wpdb->prepare( $q, array( $url_id, $vary, $type ) ), ARRAY_A );
+ $file_row = $wpdb->get_row($wpdb->prepare($q, array($url_id, $vary, $type)), ARRAY_A);
// Check if has previous file or not
- if ( $file_row && $file_row[ 'filename' ] == $filecon_md5 ) {
+ if ($file_row && $file_row['filename'] == $filecon_md5) {
return;
}
// If the new $filecon_md5 is marked as expired by previous records, clear those records
$q = "DELETE FROM `$tb_url_file` WHERE filename = %s AND expired > 0";
- $wpdb->query( $wpdb->prepare( $q, $filecon_md5 ) );
+ $wpdb->query($wpdb->prepare($q, $filecon_md5));
// Check if there is any other record used the same filename or not
$q = "SELECT id FROM `$tb_url_file` WHERE filename = %s AND expired = 0 AND id != %d LIMIT 1";
- if ( $file_row && $wpdb->get_var( $wpdb->prepare( $q, array( $file_row[ 'filename' ], $file_row[ 'id' ] ) ) ) ) {
+ if ($file_row && $wpdb->get_var($wpdb->prepare($q, array($file_row['filename'], $file_row['id'])))) {
$q = "UPDATE `$tb_url_file` SET filename=%s WHERE id=%d";
- $wpdb->query( $wpdb->prepare( $q, array( $filecon_md5, $file_row[ 'id' ] ) ) );
+ $wpdb->query($wpdb->prepare($q, array($filecon_md5, $file_row['id'])));
return;
}
// New record needed
$q = "INSERT INTO `$tb_url_file` SET url_id=%d, vary=%s, filename=%s, type=%d, mobile=%d, webp=%d, expired=0";
- $wpdb->query( $wpdb->prepare( $q, array( $url_id, $vary, $filecon_md5, $type, $mobile?1:0, $webp?1:0 ) ) );
+ $wpdb->query($wpdb->prepare($q, array($url_id, $vary, $filecon_md5, $type, $mobile ? 1 : 0, $webp ? 1 : 0)));
// Mark existing rows as expired
- if ( $file_row ) {
+ if ($file_row) {
$q = "UPDATE `$tb_url_file` SET expired=%d WHERE id=%d";
- $expired = time() + 86400 * apply_filters( 'litespeed_url_file_expired_days', 20 );
- $wpdb->query( $wpdb->prepare( $q, array( $expired, $file_row[ 'id' ] ) ) );
+ $expired = time() + 86400 * apply_filters('litespeed_url_file_expired_days', 20);
+ $wpdb->query($wpdb->prepare($q, array($expired, $file_row['id'])));
// Also check if has other files expired already to be deleted
$q = "SELECT * FROM `$tb_url_file` WHERE url_id = %d AND expired BETWEEN 1 AND %d";
- $q = $wpdb->prepare( $q, array( $url_id, time() ) );
- $list = $wpdb->get_results( $q, ARRAY_A );
- if ( $list ) {
- foreach ( $list as $v ) {
- $file_to_del = $path . '/' . $v[ 'filename' ] . '.' . ( $file_type == 'js' ? 'js' : 'css' );
- if ( file_exists( $file_to_del ) ) {
+ $q = $wpdb->prepare($q, array($url_id, time()));
+ $list = $wpdb->get_results($q, ARRAY_A);
+ if ($list) {
+ foreach ($list as $v) {
+ $file_to_del = $path . '/' . $v['filename'] . '.' . ($file_type == 'js' ? 'js' : 'css');
+ if (file_exists($file_to_del)) {
// Safe to delete
- Debug2::debug( '[Data] Delete expired unused file: ' . $file_to_del );
+ Debug2::debug('[Data] Delete expired unused file: ' . $file_to_del);
// Clear related lscache first to avoid cache copy of same URL w/ diff QS
// Purge::add( Tag::TYPE_MIN . '.' . $file_row[ 'filename' ] . '.' . $file_type );
- unlink( $file_to_del );
+ unlink($file_to_del);
}
}
$q = "DELETE FROM `$tb_url_file` WHERE url_id = %d AND expired BETWEEN 1 AND %d";
- $wpdb->query( $wpdb->prepare( $q, array( $url_id, time() ) ) );
+ $wpdb->query($wpdb->prepare($q, array($url_id, time())));
}
}
@@ -537,65 +553,67 @@ public function save_url( $request_url, $vary, $file_type, $filecon_md5, $path,
* Load CCSS related file
* @since 4.0
*/
- public function load_url_file( $request_url, $vary, $file_type ) {
+ public function load_url_file($request_url, $vary, $file_type)
+ {
global $wpdb;
- if ( strlen( $vary ) > 32 ) {
- $vary = md5( $vary );
+ if (strlen($vary) > 32) {
+ $vary = md5($vary);
}
- $type = $this->_url_file_types[ $file_type ];
+ $type = $this->_url_file_types[$file_type];
- self::debug2( 'load url file: ' . $request_url );
+ self::debug2('load url file: ' . $request_url);
- $tb_url = $this->tb( 'url' );
+ $tb_url = $this->tb('url');
$q = "SELECT * FROM `$tb_url` WHERE url=%s";
- $url_row = $wpdb->get_row( $wpdb->prepare( $q, $request_url ), ARRAY_A );
- if ( ! $url_row ) {
+ $url_row = $wpdb->get_row($wpdb->prepare($q, $request_url), ARRAY_A);
+ if (!$url_row) {
return false;
}
- $url_id = $url_row[ 'id' ];
+ $url_id = $url_row['id'];
- $tb_url_file = $this->tb( 'url_file' );
+ $tb_url_file = $this->tb('url_file');
$q = "SELECT * FROM `$tb_url_file` WHERE url_id=%d AND vary=%s AND type=%d AND expired=0";
- $file_row = $wpdb->get_row( $wpdb->prepare( $q, array( $url_id, $vary, $type ) ), ARRAY_A );
- if ( ! $file_row ) {
+ $file_row = $wpdb->get_row($wpdb->prepare($q, array($url_id, $vary, $type)), ARRAY_A);
+ if (!$file_row) {
return false;
}
- return $file_row[ 'filename' ];
+ return $file_row['filename'];
}
/**
* Mark all entries of one URL to expired
* @since 4.5
*/
- public function mark_as_expired( $request_url, $auto_q = false ) {
+ public function mark_as_expired($request_url, $auto_q = false)
+ {
global $wpdb;
- Debug2::debug( '[Data] Try to mark as expired: ' . $request_url );
- $tb_url = $this->tb( 'url' );
+ Debug2::debug('[Data] Try to mark as expired: ' . $request_url);
+ $tb_url = $this->tb('url');
$q = "SELECT * FROM `$tb_url` WHERE url=%s";
- $url_row = $wpdb->get_row( $wpdb->prepare( $q, $request_url ), ARRAY_A );
- if ( ! $url_row ) {
+ $url_row = $wpdb->get_row($wpdb->prepare($q, $request_url), ARRAY_A);
+ if (!$url_row) {
return;
}
- Debug2::debug( '[Data] Mark url_id=' . $url_row[ 'id' ] . ' as expired' );
+ Debug2::debug('[Data] Mark url_id=' . $url_row['id'] . ' as expired');
- $tb_url = $this->tb( 'url' );
- $tb_url_file = $this->tb( 'url_file' );
+ $tb_url = $this->tb('url');
+ $tb_url_file = $this->tb('url_file');
$existing_url_files = array();
- if ( $auto_q ) {
+ if ($auto_q) {
$q = "SELECT a.*, b.url FROM `$tb_url_file` a LEFT JOIN `$tb_url` b ON b.id=a.url_id WHERE a.url_id=%d AND a.type=4 AND a.expired=0";
- $q = $wpdb->prepare( $q, $url_row[ 'id' ] );
- $existing_url_files = $wpdb->get_results( $q, ARRAY_A );
+ $q = $wpdb->prepare($q, $url_row['id']);
+ $existing_url_files = $wpdb->get_results($q, ARRAY_A);
}
$q = "UPDATE `$tb_url_file` SET expired=%d WHERE url_id=%d AND type=4 AND expired=0";
- $expired = time() + 86400 * apply_filters( 'litespeed_url_file_expired_days', 20 );
- $wpdb->query( $wpdb->prepare( $q, array( $expired, $url_row[ 'id' ] ) ) );
+ $expired = time() + 86400 * apply_filters('litespeed_url_file_expired_days', 20);
+ $wpdb->query($wpdb->prepare($q, array($expired, $url_row['id'])));
return $existing_url_files;
}
@@ -605,10 +623,11 @@ public function mark_as_expired( $request_url, $auto_q = false ) {
*
* @since 3.6
*/
- public function load_css_exc( $list ) {
- $data = $this->_load_per_line( 'css_excludes.txt' );
- if ( $data ) {
- $list = array_unique( array_filter( array_merge( $list, $data ) ) );
+ public function load_css_exc($list)
+ {
+ $data = $this->_load_per_line('css_excludes.txt');
+ if ($data) {
+ $list = array_unique(array_filter(array_merge($list, $data)));
}
return $list;
@@ -619,10 +638,11 @@ public function load_css_exc( $list ) {
*
* @since 4.0
*/
- public function load_ucss_whitelist( $list ) {
- $data = $this->_load_per_line( 'ucss_whitelist.txt' );
- if ( $data ) {
- $list = array_unique( array_filter( array_merge( $list, $data ) ) );
+ public function load_ucss_whitelist($list)
+ {
+ $data = $this->_load_per_line('ucss_whitelist.txt');
+ if ($data) {
+ $list = array_unique(array_filter(array_merge($list, $data)));
}
return $list;
@@ -633,10 +653,11 @@ public function load_ucss_whitelist( $list ) {
*
* @since 3.5
*/
- public function load_js_exc( $list ) {
- $data = $this->_load_per_line( 'js_excludes.txt' );
- if ( $data ) {
- $list = array_unique( array_filter( array_merge( $list, $data ) ) );
+ public function load_js_exc($list)
+ {
+ $data = $this->_load_per_line('js_excludes.txt');
+ if ($data) {
+ $list = array_unique(array_filter(array_merge($list, $data)));
}
return $list;
@@ -647,10 +668,26 @@ public function load_js_exc( $list ) {
*
* @since 3.6
*/
- public function load_js_defer_exc( $list ) {
- $data = $this->_load_per_line( 'js_defer_excludes.txt' );
- if ( $data ) {
- $list = array_unique( array_filter( array_merge( $list, $data ) ) );
+ public function load_js_defer_exc($list)
+ {
+ $data = $this->_load_per_line('js_defer_excludes.txt');
+ if ($data) {
+ $list = array_unique(array_filter(array_merge($list, $data)));
+ }
+
+ return $list;
+ }
+
+ /**
+ * Get list from `data/optm_uri_exc.txt`
+ *
+ * @since 5.4
+ */
+ public function load_optm_uri_exc($list)
+ {
+ $data = $this->_load_per_line('optm_uri_exc.txt');
+ if ($data) {
+ $list = array_unique(array_filter(array_merge($list, $data)));
}
return $list;
@@ -661,10 +698,11 @@ public function load_js_defer_exc( $list ) {
*
* @since 3.5
*/
- public function load_esi_nonces( $list ) {
- $data = $this->_load_per_line( 'esi.nonces.txt' );
- if ( $data ) {
- $list = array_unique( array_filter( array_merge( $list, $data ) ) );
+ public function load_esi_nonces($list)
+ {
+ $data = $this->_load_per_line('esi.nonces.txt');
+ if ($data) {
+ $list = array_unique(array_filter(array_merge($list, $data)));
}
return $list;
@@ -679,20 +717,21 @@ public function load_esi_nonces( $list ) {
*
* @since 3.5
*/
- private function _load_per_line( $file ) {
- $data = File::read( LSCWP_DIR . 'data/' . $file );
- $data = explode( PHP_EOL, $data );
+ private function _load_per_line($file)
+ {
+ $data = File::read(LSCWP_DIR . 'data/' . $file);
+ $data = explode(PHP_EOL, $data);
$list = array();
- foreach ( $data as $v ) {
+ foreach ($data as $v) {
// Drop two kinds of comments
- if ( strpos( $v, '##' ) !== false ) {
- $v = trim( substr( $v, 0, strpos( $v, '##' ) ) );
+ if (strpos($v, '##') !== false) {
+ $v = trim(substr($v, 0, strpos($v, '##')));
}
- if ( strpos( $v, '# ' ) !== false ) {
- $v = trim( substr( $v, 0, strpos( $v, '# ' ) ) );
+ if (strpos($v, '# ') !== false) {
+ $v = trim(substr($v, 0, strpos($v, '# ')));
}
- if ( ! $v ) {
+ if (!$v) {
continue;
}
@@ -701,5 +740,4 @@ private function _load_per_line( $file ) {
return $list;
}
-
-}
\ No newline at end of file
+}
diff --git a/src/data.upgrade.func.php b/src/data.upgrade.func.php
index 9ea58b6d2..60cff570a 100644
--- a/src/data.upgrade.func.php
+++ b/src/data.upgrade.func.php
@@ -6,7 +6,7 @@
*
* @since 3.0
*/
-defined( 'WPINC' ) || exit;
+defined('WPINC') || exit();
use LiteSpeed\Debug2;
use LiteSpeed\Conf;
@@ -17,16 +17,20 @@
* Append webp/mobile to url_file
* @since 5.3
*/
-function litespeed_update_5_3() {
+function litespeed_update_5_3()
+{
global $wpdb;
- Debug2::debug( "[Data] Upgrade url_file table" );
- $tb_exists = $wpdb->get_var( 'SHOW TABLES LIKE "' . $wpdb->prefix . 'litespeed_url_file"' );
- if ( $tb_exists ) {
- $q = 'ALTER TABLE `' . $wpdb->prefix . 'litespeed_url_file`
+ Debug2::debug('[Data] Upgrade url_file table');
+ $tb_exists = $wpdb->get_var('SHOW TABLES LIKE "' . $wpdb->prefix . 'litespeed_url_file"');
+ if ($tb_exists) {
+ $q =
+ 'ALTER TABLE `' .
+ $wpdb->prefix .
+ 'litespeed_url_file`
ADD COLUMN `mobile` tinyint(4) NOT NULL COMMENT "mobile=1",
ADD COLUMN `webp` tinyint(4) NOT NULL COMMENT "webp=1"
';
- $wpdb->query( $q );
+ $wpdb->query($q);
}
}
@@ -34,17 +38,21 @@ function litespeed_update_5_3() {
* Add expired to url_file table
* @since 4.4.4
*/
-function litespeed_update_4_4_4() {
+function litespeed_update_4_4_4()
+{
global $wpdb;
- Debug2::debug( "[Data] Upgrade url_file table" );
- $tb_exists = $wpdb->get_var( 'SHOW TABLES LIKE "' . $wpdb->prefix . 'litespeed_url_file"' );
- if ( $tb_exists ) {
- $q = 'ALTER TABLE `' . $wpdb->prefix . 'litespeed_url_file`
+ Debug2::debug('[Data] Upgrade url_file table');
+ $tb_exists = $wpdb->get_var('SHOW TABLES LIKE "' . $wpdb->prefix . 'litespeed_url_file"');
+ if ($tb_exists) {
+ $q =
+ 'ALTER TABLE `' .
+ $wpdb->prefix .
+ 'litespeed_url_file`
ADD COLUMN `expired` int(11) NOT NULL DEFAULT 0,
ADD KEY `filename_2` (`filename`,`expired`),
ADD KEY `url_id` (`url_id`,`expired`)
';
- $wpdb->query( $q );
+ $wpdb->query($q);
}
}
@@ -52,9 +60,10 @@ function litespeed_update_4_4_4() {
* Drop cssjs table and rm cssjs folder
* @since 4.3
*/
-function litespeed_update_4_3() {
- if ( file_exists( LITESPEED_STATIC_DIR . '/ccsjs' ) ) {
- File::rrmdir( LITESPEED_STATIC_DIR . '/ccsjs' );
+function litespeed_update_4_3()
+{
+ if (file_exists(LITESPEED_STATIC_DIR . '/ccsjs')) {
+ File::rrmdir(LITESPEED_STATIC_DIR . '/ccsjs');
}
}
@@ -62,9 +71,10 @@ function litespeed_update_4_3() {
* Drop object cache data file
* @since 4.1
*/
-function litespeed_update_4_1() {
- if ( file_exists( WP_CONTENT_DIR . '/.object-cache.ini' ) ) {
- unlink( WP_CONTENT_DIR . '/.object-cache.ini' );
+function litespeed_update_4_1()
+{
+ if (file_exists(WP_CONTENT_DIR . '/.object-cache.ini')) {
+ unlink(WP_CONTENT_DIR . '/.object-cache.ini');
}
}
@@ -72,19 +82,20 @@ function litespeed_update_4_1() {
* Drop cssjs table and rm cssjs folder
* @since 4.0
*/
-function litespeed_update_4() {
+function litespeed_update_4()
+{
global $wpdb;
$tb = $wpdb->prefix . 'litespeed_cssjs';
- $existed = $wpdb->get_var( "SHOW TABLES LIKE '$tb'" );
- if ( ! $existed ) {
+ $existed = $wpdb->get_var("SHOW TABLES LIKE '$tb'");
+ if (!$existed) {
return;
}
$q = 'DROP TABLE IF EXISTS ' . $tb;
- $wpdb->query( $q );
+ $wpdb->query($q);
- if ( file_exists( LITESPEED_STATIC_DIR . '/ccsjs' ) ) {
- File::rrmdir( LITESPEED_STATIC_DIR . '/ccsjs' );
+ if (file_exists(LITESPEED_STATIC_DIR . '/ccsjs')) {
+ File::rrmdir(LITESPEED_STATIC_DIR . '/ccsjs');
}
}
@@ -94,30 +105,38 @@ function litespeed_update_4() {
*
* @since 3.5.1
*/
-function litespeed_update_3_5() {
+function litespeed_update_3_5()
+{
$__conf = Conf::cls();
// Excludes jQuery
- foreach ( array( 'optm-js_exc', 'optm-js_defer_exc' ) as $v ) {
- $curr_setting = $__conf->conf( $v );
+ foreach (array('optm-js_exc', 'optm-js_defer_exc') as $v) {
+ $curr_setting = $__conf->conf($v);
$curr_setting[] = 'jquery.js';
$curr_setting[] = 'jquery.min.js';
- $__conf->update( $v, $curr_setting );
+ $__conf->update($v, $curr_setting);
}
// Turn off JS Combine and defer
$show_msg = false;
- foreach ( array( 'optm-js_comb', 'optm-js_defer', 'optm-js_inline_defer' ) as $v ) {
- $curr_setting = $__conf->conf( $v );
- if ( ! $curr_setting ) {
+ foreach (array('optm-js_comb', 'optm-js_defer', 'optm-js_inline_defer') as $v) {
+ $curr_setting = $__conf->conf($v);
+ if (!$curr_setting) {
continue;
}
$show_msg = true;
- $__conf->update( $v, false );
+ $__conf->update($v, false);
}
- if ( $show_msg ) {
- $msg = sprintf( __( 'LiteSpeed Cache upgraded successfully. NOTE: Due to changes in this version, the settings %1$s and %2$s have been turned OFF. Please turn them back on manually and verify that your site layout is correct, and you have no JS errors.', 'litespeed-cache' ), '' . __( 'JS Combine', 'litespeed-cache' ) . '
', '' . __( 'JS Defer', 'litespeed-cache' ) . '
' );
- $msg .= sprintf( ' %s.', __( 'Click here to settings', 'litespeed-cache' ) );
- Admin_Display::info( $msg, false, true );
+ if ($show_msg) {
+ $msg = sprintf(
+ __(
+ 'LiteSpeed Cache upgraded successfully. NOTE: Due to changes in this version, the settings %1$s and %2$s have been turned OFF. Please turn them back on manually and verify that your site layout is correct, and you have no JS errors.',
+ 'litespeed-cache'
+ ),
+ '' . __('JS Combine', 'litespeed-cache') . '
',
+ '' . __('JS Defer', 'litespeed-cache') . '
'
+ );
+ $msg .= sprintf(' %s.', __('Click here to settings', 'litespeed-cache'));
+ Admin_Display::info($msg, false, true);
}
}
@@ -126,327 +145,318 @@ function litespeed_update_3_5() {
*
* @since 3.0
*/
-function litespeed_update_2_0( $ver ) {
- global $wpdb ;
+function litespeed_update_2_0($ver)
+{
+ global $wpdb;
// Table version only exists after all old data migrated
// Last modified is v2.4.2
- if ( version_compare( $ver, '2.4.2', '<' ) ) {
+ if (version_compare($ver, '2.4.2', '<')) {
/**
* Convert old data from postmeta to img_optm table
* @since 2.0
*/
// Migrate data from `wp_postmeta` to `wp_litespeed_img_optm`
- $mids_to_del = array() ;
- $q = "SELECT * FROM $wpdb->postmeta WHERE meta_key = %s ORDER BY meta_id" ;
- $meta_value_list = $wpdb->get_results( $wpdb->prepare( $q, 'litespeed-optimize-data' ) ) ;
- if ( $meta_value_list ) {
- $max_k = count( $meta_value_list ) - 1 ;
- foreach ( $meta_value_list as $k => $v ) {
- $md52src_list = maybe_unserialize( $v->meta_value ) ;
- foreach ( $md52src_list as $md5 => $v2 ) {
+ $mids_to_del = array();
+ $q = "SELECT * FROM $wpdb->postmeta WHERE meta_key = %s ORDER BY meta_id";
+ $meta_value_list = $wpdb->get_results($wpdb->prepare($q, 'litespeed-optimize-data'));
+ if ($meta_value_list) {
+ $max_k = count($meta_value_list) - 1;
+ foreach ($meta_value_list as $k => $v) {
+ $md52src_list = maybe_unserialize($v->meta_value);
+ foreach ($md52src_list as $md5 => $v2) {
$f = array(
- 'post_id' => $v->post_id,
- 'optm_status' => $v2[ 1 ],
- 'src' => $v2[ 0 ],
- 'srcpath_md5' => md5( $v2[ 0 ] ),
- 'src_md5' => $md5,
- 'server' => $v2[ 2 ],
- ) ;
- $wpdb->replace( $wpdb->prefix . 'litespeed_img_optm', $f ) ;
+ 'post_id' => $v->post_id,
+ 'optm_status' => $v2[1],
+ 'src' => $v2[0],
+ 'srcpath_md5' => md5($v2[0]),
+ 'src_md5' => $md5,
+ 'server' => $v2[2],
+ );
+ $wpdb->replace($wpdb->prefix . 'litespeed_img_optm', $f);
}
- $mids_to_del[] = $v->meta_id ;
+ $mids_to_del[] = $v->meta_id;
// Delete from postmeta
- if ( count( $mids_to_del ) > 100 || $k == $max_k ) {
- $q = "DELETE FROM $wpdb->postmeta WHERE meta_id IN ( " . implode( ',', array_fill( 0, count( $mids_to_del ), '%s' ) ) . " ) " ;
- $wpdb->query( $wpdb->prepare( $q, $mids_to_del ) ) ;
+ if (count($mids_to_del) > 100 || $k == $max_k) {
+ $q = "DELETE FROM $wpdb->postmeta WHERE meta_id IN ( " . implode(',', array_fill(0, count($mids_to_del), '%s')) . ' ) ';
+ $wpdb->query($wpdb->prepare($q, $mids_to_del));
- $mids_to_del = array() ;
+ $mids_to_del = array();
}
}
- Debug2::debug( '[Data] img_optm inserted records: ' . $k ) ;
+ Debug2::debug('[Data] img_optm inserted records: ' . $k);
}
- $q = "DELETE FROM $wpdb->postmeta WHERE meta_key = %s" ;
- $rows = $wpdb->query( $wpdb->prepare( $q, 'litespeed-optimize-status' ) ) ;
- Debug2::debug( '[Data] img_optm delete optm_status records: ' . $rows ) ;
-
+ $q = "DELETE FROM $wpdb->postmeta WHERE meta_key = %s";
+ $rows = $wpdb->query($wpdb->prepare($q, 'litespeed-optimize-status'));
+ Debug2::debug('[Data] img_optm delete optm_status records: ' . $rows);
}
/**
* Add target_md5 field to table
* @since 2.4.2
*/
- if ( version_compare( $ver, '2.4.2', '<' ) && version_compare( $ver, '2.0', '>=' ) ) {// NOTE: For new users, need to bypass this section
- $sql = sprintf(
- 'ALTER TABLE `%1$s` ADD `server_info` text NOT NULL, DROP COLUMN `server`',
- $wpdb->prefix . 'litespeed_img_optm'
- ) ;
-
- $res = $wpdb->query( $sql ) ;
- if ( $res !== true ) {
- Debug2::debug( '[Data] Warning: Alter table img_optm failed!', $sql ) ;
+ if (version_compare($ver, '2.4.2', '<') && version_compare($ver, '2.0', '>=')) {
+ // NOTE: For new users, need to bypass this section
+ $sql = sprintf('ALTER TABLE `%1$s` ADD `server_info` text NOT NULL, DROP COLUMN `server`', $wpdb->prefix . 'litespeed_img_optm');
+
+ $res = $wpdb->query($sql);
+ if ($res !== true) {
+ Debug2::debug('[Data] Warning: Alter table img_optm failed!', $sql);
+ } else {
+ Debug2::debug('[Data] Successfully upgraded table img_optm.');
}
- else {
- Debug2::debug( '[Data] Successfully upgraded table img_optm.' ) ;
- }
-
}
// Delete img optm tb version
- delete_option( $wpdb->prefix . 'litespeed_img_optm' ) ;
-
+ delete_option($wpdb->prefix . 'litespeed_img_optm');
// Delete possible HTML optm data from wp_options
- delete_option( 'litespeed-cache-optimized' ) ;
+ delete_option('litespeed-cache-optimized');
// Delete HTML optm tb version
- delete_option( $wpdb->prefix . 'litespeed_optimizer' ) ;
-
+ delete_option($wpdb->prefix . 'litespeed_optimizer');
}
-
-
/**
* Move all options in litespeed-cache-conf from v3.0- to separate records
*
* @since 3.0
*/
-function litespeed_update_3_0( $ver ) {
+function litespeed_update_3_0($ver)
+{
global $wpdb;
// Upgrade v2.0- to v2.0 first
- if ( version_compare( $ver, '2.0', '<' ) ) {
- litespeed_update_2_0( $ver ) ;
+ if (version_compare($ver, '2.0', '<')) {
+ litespeed_update_2_0($ver);
}
- set_time_limit( 86400 );
+ set_time_limit(86400);
// conv items to litespeed.conf.*
- Debug2::debug( "[Data] Conv items to litespeed.conf.*" );
+ Debug2::debug('[Data] Conv items to litespeed.conf.*');
$data = array(
- 'litespeed-cache-exclude-cache-roles' => 'cache-exc_roles',
- 'litespeed-cache-drop_qs' => 'cache-drop_qs',
- 'litespeed-forced_cache_uri' => 'cache-force_uri',
- 'litespeed-cache_uri_priv' => 'cache-priv_uri',
- 'litespeed-excludes_uri' => 'cache-exc',
- 'litespeed-cache-vary-group' => 'cache-vary_group',
- 'litespeed-adv-purge_all_hooks' => 'purge-hook_all',
- 'litespeed-object_global_groups' => 'object-global_groups',
- 'litespeed-object_non_persistent_groups' => 'object-non_persistent_groups',
- 'litespeed-media-lazy-img-excludes' => 'media-lazy_exc',
- 'litespeed-media-lazy-img-cls-excludes' => 'media-lazy_cls_exc',
- 'litespeed-media-webp_attribute' => 'img_optm-webp_attr',
- 'litespeed-optm-css' => 'optm-ccss_con',
- 'litespeed-optm_excludes' => 'optm-exc',
- 'litespeed-optm-ccss-separate_posttype' => 'optm-ccss_sep_posttype',
- 'litespeed-optm-css-separate_uri' => 'optm-ccss_sep_uri',
- 'litespeed-optm-js-defer-excludes' => 'optm-js_defer_exc',
- 'litespeed-cache-dns_prefetch' => 'optm-dns_prefetch',
+ 'litespeed-cache-exclude-cache-roles' => 'cache-exc_roles',
+ 'litespeed-cache-drop_qs' => 'cache-drop_qs',
+ 'litespeed-forced_cache_uri' => 'cache-force_uri',
+ 'litespeed-cache_uri_priv' => 'cache-priv_uri',
+ 'litespeed-excludes_uri' => 'cache-exc',
+ 'litespeed-cache-vary-group' => 'cache-vary_group',
+ 'litespeed-adv-purge_all_hooks' => 'purge-hook_all',
+ 'litespeed-object_global_groups' => 'object-global_groups',
+ 'litespeed-object_non_persistent_groups' => 'object-non_persistent_groups',
+ 'litespeed-media-lazy-img-excludes' => 'media-lazy_exc',
+ 'litespeed-media-lazy-img-cls-excludes' => 'media-lazy_cls_exc',
+ 'litespeed-media-webp_attribute' => 'img_optm-webp_attr',
+ 'litespeed-optm-css' => 'optm-ccss_con',
+ 'litespeed-optm_excludes' => 'optm-exc',
+ 'litespeed-optm-ccss-separate_posttype' => 'optm-ccss_sep_posttype',
+ 'litespeed-optm-css-separate_uri' => 'optm-ccss_sep_uri',
+ 'litespeed-optm-js-defer-excludes' => 'optm-js_defer_exc',
+ 'litespeed-cache-dns_prefetch' => 'optm-dns_prefetch',
'litespeed-cache-exclude-optimization-roles' => 'optm-exc_roles',
- 'litespeed-log_ignore_filters' => 'debug-log_no_filters', // depreciated
- 'litespeed-log_ignore_part_filters' => 'debug-log_no_part_filters', // depreciated
- 'litespeed-cdn-ori_dir' => 'cdn-ori_dir',
- 'litespeed-cache-cdn_mapping' => 'cdn-mapping',
- 'litespeed-crawler-as-uids' => 'crawler-roles',
- 'litespeed-crawler-cookies' => 'crawler-cookies',
- ) ;
- foreach ( $data as $k => $v ) {
- $old_data = get_option( $k ) ;
- if ( $old_data ) {
- Debug2::debug( "[Data] Convert $k" );
+ 'litespeed-log_ignore_filters' => 'debug-log_no_filters', // depreciated
+ 'litespeed-log_ignore_part_filters' => 'debug-log_no_part_filters', // depreciated
+ 'litespeed-cdn-ori_dir' => 'cdn-ori_dir',
+ 'litespeed-cache-cdn_mapping' => 'cdn-mapping',
+ 'litespeed-crawler-as-uids' => 'crawler-roles',
+ 'litespeed-crawler-cookies' => 'crawler-cookies',
+ );
+ foreach ($data as $k => $v) {
+ $old_data = get_option($k);
+ if ($old_data) {
+ Debug2::debug("[Data] Convert $k");
// They must be an array
- if ( ! is_array( $old_data ) && $v != 'optm-ccss_con' ) {
- $old_data = explode( "\n", $old_data ) ;
+ if (!is_array($old_data) && $v != 'optm-ccss_con') {
+ $old_data = explode("\n", $old_data);
}
- if ( $v == 'crawler-cookies' ) {
- $tmp = array() ;
- $i = 0 ;
- foreach ( $old_data as $k2 => $v2 ) {
- $tmp[ $i ][ 'name' ] = $k2 ;
- $tmp[ $i ][ 'vals' ] = explode( "\n", $v2 ) ;
- $i ++ ;
+ if ($v == 'crawler-cookies') {
+ $tmp = array();
+ $i = 0;
+ foreach ($old_data as $k2 => $v2) {
+ $tmp[$i]['name'] = $k2;
+ $tmp[$i]['vals'] = explode("\n", $v2);
+ $i++;
}
- $old_data = $tmp ;
+ $old_data = $tmp;
}
- add_option( 'litespeed.conf.' . $v, $old_data ) ;
+ add_option('litespeed.conf.' . $v, $old_data);
}
- Debug2::debug( "[Data] Delete $k" );
- delete_option( $k ) ;
+ Debug2::debug("[Data] Delete $k");
+ delete_option($k);
}
// conv other items
$data = array(
- 'litespeed-setting-mode' => 'litespeed.setting.mode',
- 'litespeed-media-need-pull' => 'litespeed.img_optm.need_pull',
- 'litespeed-env-ref' => 'litespeed.env.ref',
+ 'litespeed-setting-mode' => 'litespeed.setting.mode',
+ 'litespeed-media-need-pull' => 'litespeed.img_optm.need_pull',
+ 'litespeed-env-ref' => 'litespeed.env.ref',
'litespeed-cache-cloudflare_status' => 'litespeed.cdn.cloudflare.status',
-
- ) ;
- foreach ( $data as $k => $v ) {
- $old_data = get_option( $k ) ;
- if ( $old_data ) {
- add_option( $v, $old_data ) ;
+ );
+ foreach ($data as $k => $v) {
+ $old_data = get_option($k);
+ if ($old_data) {
+ add_option($v, $old_data);
}
- delete_option( $k ) ;
+ delete_option($k);
}
// Conv conf from litespeed-cache-conf child to litespeed.conf.*
- Debug2::debug( "[Data] Conv conf from litespeed-cache-conf child to litespeed.conf.*" );
- $previous_options = get_option( 'litespeed-cache-conf' ) ;
+ Debug2::debug('[Data] Conv conf from litespeed-cache-conf child to litespeed.conf.*');
+ $previous_options = get_option('litespeed-cache-conf');
$data = array(
- 'radio_select' => 'cache',
- 'hash' => 'hash',
- 'auto_upgrade' => 'auto_upgrade',
- 'news' => 'news',
- 'crawler_domain_ip' => 'server_ip',
-
- 'esi_enabled' => 'esi',
- 'esi_cached_admbar' => 'esi-cache_admbar',
- 'esi_cached_commform' => 'esi-cache_commform',
-
- 'heartbeat' => 'misc-heartbeat_front',
-
- 'cache_browser' => 'cache-browser',
- 'cache_browser_ttl' => 'cache-ttl_browser',
- 'instant_click' => 'util-instant_click',
- 'use_http_for_https_vary' => 'util-no_https_vary',
-
- 'purge_upgrade' => 'purge-upgrade',
- 'timed_urls' => 'purge-timed_urls',
- 'timed_urls_time' => 'purge-timed_urls_time',
-
- 'cache_priv' => 'cache-priv',
- 'cache_commenter' => 'cache-commenter',
- 'cache_rest' => 'cache-rest',
- 'cache_page_login' => 'cache-page_login',
- 'cache_favicon' => 'cache-favicon',
- 'cache_resources' => 'cache-resources',
- 'mobileview_enabled' => 'cache-mobile',
- 'mobileview_rules' => 'cache-mobile_rules',
- 'nocache_useragents' => 'cache-exc_useragents',
- 'nocache_cookies' => 'cache-exc_cookies',
- 'excludes_qs' => 'cache-exc_qs',
- 'excludes_cat' => 'cache-exc_cat',
- 'excludes_tag' => 'cache-exc_tag',
- 'public_ttl' => 'cache-ttl_pub',
- 'private_ttl' => 'cache-ttl_priv',
- 'front_page_ttl' => 'cache-ttl_frontpage',
- 'feed_ttl' => 'cache-ttl_feed',
- 'login_cookie' => 'cache-login_cookie',
-
- 'debug_disable_all' => 'debug-disable_all',
- 'debug' => 'debug',
- 'admin_ips' => 'debug-ips',
- 'debug_level' => 'debug-level',
- 'log_file_size' => 'debug-filesize',
- 'debug_cookie' => 'debug-cookie',
- 'collaps_qs' => 'debug-collaps_qs',
+ 'radio_select' => 'cache',
+ 'hash' => 'hash',
+ 'auto_upgrade' => 'auto_upgrade',
+ 'news' => 'news',
+ 'crawler_domain_ip' => 'server_ip',
+
+ 'esi_enabled' => 'esi',
+ 'esi_cached_admbar' => 'esi-cache_admbar',
+ 'esi_cached_commform' => 'esi-cache_commform',
+
+ 'heartbeat' => 'misc-heartbeat_front',
+
+ 'cache_browser' => 'cache-browser',
+ 'cache_browser_ttl' => 'cache-ttl_browser',
+ 'instant_click' => 'util-instant_click',
+ 'use_http_for_https_vary' => 'util-no_https_vary',
+
+ 'purge_upgrade' => 'purge-upgrade',
+ 'timed_urls' => 'purge-timed_urls',
+ 'timed_urls_time' => 'purge-timed_urls_time',
+
+ 'cache_priv' => 'cache-priv',
+ 'cache_commenter' => 'cache-commenter',
+ 'cache_rest' => 'cache-rest',
+ 'cache_page_login' => 'cache-page_login',
+ 'cache_favicon' => 'cache-favicon',
+ 'cache_resources' => 'cache-resources',
+ 'mobileview_enabled' => 'cache-mobile',
+ 'mobileview_rules' => 'cache-mobile_rules',
+ 'nocache_useragents' => 'cache-exc_useragents',
+ 'nocache_cookies' => 'cache-exc_cookies',
+ 'excludes_qs' => 'cache-exc_qs',
+ 'excludes_cat' => 'cache-exc_cat',
+ 'excludes_tag' => 'cache-exc_tag',
+ 'public_ttl' => 'cache-ttl_pub',
+ 'private_ttl' => 'cache-ttl_priv',
+ 'front_page_ttl' => 'cache-ttl_frontpage',
+ 'feed_ttl' => 'cache-ttl_feed',
+ 'login_cookie' => 'cache-login_cookie',
+
+ 'debug_disable_all' => 'debug-disable_all',
+ 'debug' => 'debug',
+ 'admin_ips' => 'debug-ips',
+ 'debug_level' => 'debug-level',
+ 'log_file_size' => 'debug-filesize',
+ 'debug_cookie' => 'debug-cookie',
+ 'collaps_qs' => 'debug-collaps_qs',
// 'log_filters' => 'debug-log_filters',
- 'crawler_cron_active' => 'crawler',
+ 'crawler_cron_active' => 'crawler',
// 'crawler_include_posts' => 'crawler-inc_posts',
// 'crawler_include_pages' => 'crawler-inc_pages',
// 'crawler_include_cats' => 'crawler-inc_cats',
// 'crawler_include_tags' => 'crawler-inc_tags',
// 'crawler_excludes_cpt' => 'crawler-exc_cpt',
// 'crawler_order_links' => 'crawler-order_links',
- 'crawler_usleep' => 'crawler-usleep',
- 'crawler_run_duration' => 'crawler-run_duration',
- 'crawler_run_interval' => 'crawler-run_interval',
- 'crawler_crawl_interval' => 'crawler-crawl_interval',
- 'crawler_threads' => 'crawler-threads',
- 'crawler_load_limit' => 'crawler-load_limit',
- 'crawler_custom_sitemap' => 'crawler-sitemap',
-
- 'cache_object' => 'object',
- 'cache_object_kind' => 'object-kind',
- 'cache_object_host' => 'object-host',
- 'cache_object_port' => 'object-port',
- 'cache_object_life' => 'object-life',
- 'cache_object_persistent' => 'object-persistent',
- 'cache_object_admin' => 'object-admin',
- 'cache_object_transients' => 'object-transients',
- 'cache_object_db_id' => 'object-db_id',
- 'cache_object_user' => 'object-user',
- 'cache_object_pswd' => 'object-psw',
-
- 'cdn' => 'cdn',
- 'cdn_ori' => 'cdn-ori',
- 'cdn_exclude' => 'cdn-exc',
+ 'crawler_usleep' => 'crawler-usleep',
+ 'crawler_run_duration' => 'crawler-run_duration',
+ 'crawler_run_interval' => 'crawler-run_interval',
+ 'crawler_crawl_interval' => 'crawler-crawl_interval',
+ 'crawler_threads' => 'crawler-threads',
+ 'crawler_load_limit' => 'crawler-load_limit',
+ 'crawler_custom_sitemap' => 'crawler-sitemap',
+
+ 'cache_object' => 'object',
+ 'cache_object_kind' => 'object-kind',
+ 'cache_object_host' => 'object-host',
+ 'cache_object_port' => 'object-port',
+ 'cache_object_life' => 'object-life',
+ 'cache_object_persistent' => 'object-persistent',
+ 'cache_object_admin' => 'object-admin',
+ 'cache_object_transients' => 'object-transients',
+ 'cache_object_db_id' => 'object-db_id',
+ 'cache_object_user' => 'object-user',
+ 'cache_object_pswd' => 'object-psw',
+
+ 'cdn' => 'cdn',
+ 'cdn_ori' => 'cdn-ori',
+ 'cdn_exclude' => 'cdn-exc',
// 'cdn_remote_jquery' => 'cdn-remote_jq',
- 'cdn_quic' => 'cdn-quic',
- 'cdn_cloudflare' => 'cdn-cloudflare',
- 'cdn_cloudflare_email' => 'cdn-cloudflare_email',
- 'cdn_cloudflare_key' => 'cdn-cloudflare_key',
- 'cdn_cloudflare_name' => 'cdn-cloudflare_name',
- 'cdn_cloudflare_zone' => 'cdn-cloudflare_zone',
-
- 'media_img_lazy' => 'media-lazy',
- 'media_img_lazy_placeholder' => 'media-lazy_placeholder',
- 'media_placeholder_resp' => 'media-placeholder_resp',
- 'media_placeholder_resp_color' => 'media-placeholder_resp_color',
- 'media_placeholder_resp_async' => 'media-placeholder_resp_async',
- 'media_iframe_lazy' => 'media-iframe_lazy',
+ 'cdn_quic' => 'cdn-quic',
+ 'cdn_cloudflare' => 'cdn-cloudflare',
+ 'cdn_cloudflare_email' => 'cdn-cloudflare_email',
+ 'cdn_cloudflare_key' => 'cdn-cloudflare_key',
+ 'cdn_cloudflare_name' => 'cdn-cloudflare_name',
+ 'cdn_cloudflare_zone' => 'cdn-cloudflare_zone',
+
+ 'media_img_lazy' => 'media-lazy',
+ 'media_img_lazy_placeholder' => 'media-lazy_placeholder',
+ 'media_placeholder_resp' => 'media-placeholder_resp',
+ 'media_placeholder_resp_color' => 'media-placeholder_resp_color',
+ 'media_placeholder_resp_async' => 'media-placeholder_resp_async',
+ 'media_iframe_lazy' => 'media-iframe_lazy',
// 'media_img_lazyjs_inline' => 'media-lazyjs_inline',
- 'media_optm_auto' => 'img_optm-auto',
- 'media_optm_cron' => 'img_optm-cron',
- 'media_optm_ori' => 'img_optm-ori',
- 'media_rm_ori_bkup' => 'img_optm-rm_bkup',
- 'media_optm_webp' => 'img_optm-webp',
- 'media_optm_lossless' => 'img_optm-lossless',
- 'media_optm_exif' => 'img_optm-exif',
- 'media_webp_replace' => 'img_optm-webp_replace',
- 'media_webp_replace_srcset' => 'img_optm-webp_replace_srcset',
-
- 'css_minify' => 'optm-css_min',
+ 'media_optm_auto' => 'img_optm-auto',
+ 'media_optm_cron' => 'img_optm-cron',
+ 'media_optm_ori' => 'img_optm-ori',
+ 'media_rm_ori_bkup' => 'img_optm-rm_bkup',
+ // 'media_optm_webp' => 'img_optm-webp',
+ 'media_webp_replace' => 'img_optm-webp',
+ 'media_optm_lossless' => 'img_optm-lossless',
+ 'media_optm_exif' => 'img_optm-exif',
+ 'media_webp_replace_srcset' => 'img_optm-webp_replace_srcset',
+
+ 'css_minify' => 'optm-css_min',
// 'css_inline_minify' => 'optm-css_inline_min',
- 'css_combine' => 'optm-css_comb',
+ 'css_combine' => 'optm-css_comb',
// 'css_combined_priority' => 'optm-css_comb_priority',
// 'css_http2' => 'optm-css_http2',
- 'css_exclude' => 'optm-css_exc',
- 'js_minify' => 'optm-js_min',
+ 'css_exclude' => 'optm-css_exc',
+ 'js_minify' => 'optm-js_min',
// 'js_inline_minify' => 'optm-js_inline_min',
- 'js_combine' => 'optm-js_comb',
+ 'js_combine' => 'optm-js_comb',
// 'js_combined_priority' => 'optm-js_comb_priority',
// 'js_http2' => 'optm-js_http2',
- 'js_exclude' => 'optm-js_exc',
+ 'js_exclude' => 'optm-js_exc',
// 'optimize_ttl' => 'optm-ttl',
- 'html_minify' => 'optm-html_min',
- 'optm_qs_rm' => 'optm-qs_rm',
- 'optm_ggfonts_rm' => 'optm-ggfonts_rm',
- 'optm_css_async' => 'optm-css_async',
+ 'html_minify' => 'optm-html_min',
+ 'optm_qs_rm' => 'optm-qs_rm',
+ 'optm_ggfonts_rm' => 'optm-ggfonts_rm',
+ 'optm_css_async' => 'optm-css_async',
// 'optm_ccss_gen' => 'optm-ccss_gen',
// 'optm_ccss_async' => 'optm-ccss_async',
- 'optm_css_async_inline' => 'optm-css_async_inline',
- 'optm_js_defer' => 'optm-js_defer',
- 'optm_emoji_rm' => 'optm-emoji_rm',
+ 'optm_css_async_inline' => 'optm-css_async_inline',
+ 'optm_js_defer' => 'optm-js_defer',
+ 'optm_emoji_rm' => 'optm-emoji_rm',
// 'optm_exclude_jquery' => 'optm-exc_jq',
- 'optm_ggfonts_async' => 'optm-ggfonts_async',
+ 'optm_ggfonts_async' => 'optm-ggfonts_async',
// 'optm_max_size' => 'optm-max_size',
// 'optm_rm_comment' => 'optm-rm_comment',
- ) ;
- foreach ( $data as $k => $v ) {
- if ( ! isset( $previous_options[ $k ] ) ) {
- continue ;
+ );
+ foreach ($data as $k => $v) {
+ if (!isset($previous_options[$k])) {
+ continue;
}
// The folllowing values must be array
- if ( ! is_array( $previous_options[ $k ] ) ) {
- if ( in_array( $v, array( 'cdn-ori', 'cache-exc_cat', 'cache-exc_tag' ) ) ) {
- $previous_options[ $k ] = explode( ',', $previous_options[ $k ] ) ;
- $previous_options[ $k ] = array_filter( $previous_options[ $k ] ) ;
- }
- elseif ( in_array( $v, array( 'cache-mobile_rules', 'cache-exc_useragents', 'cache-exc_cookies' ) ) ) {
- $previous_options[ $k ] = explode( '|', str_replace( '\\ ', ' ', $previous_options[ $k ] ) ) ;
- $previous_options[ $k ] = array_filter( $previous_options[ $k ] ) ;
- }
- elseif ( in_array( $v, array(
+ if (!is_array($previous_options[$k])) {
+ if (in_array($v, array('cdn-ori', 'cache-exc_cat', 'cache-exc_tag'))) {
+ $previous_options[$k] = explode(',', $previous_options[$k]);
+ $previous_options[$k] = array_filter($previous_options[$k]);
+ } elseif (in_array($v, array('cache-mobile_rules', 'cache-exc_useragents', 'cache-exc_cookies'))) {
+ $previous_options[$k] = explode('|', str_replace('\\ ', ' ', $previous_options[$k]));
+ $previous_options[$k] = array_filter($previous_options[$k]);
+ } elseif (
+ in_array($v, array(
'purge-timed_urls',
'cache-exc_qs',
'debug-ips',
@@ -454,59 +464,60 @@ function litespeed_update_3_0( $ver ) {
'cdn-exc',
'optm-css_exc',
'optm-js_exc',
- ) ) ) {
- $previous_options[ $k ] = explode( "\n", $previous_options[ $k ] ) ;
- $previous_options[ $k ] = array_filter( $previous_options[ $k ] ) ;
+ ))
+ ) {
+ $previous_options[$k] = explode("\n", $previous_options[$k]);
+ $previous_options[$k] = array_filter($previous_options[$k]);
}
}
// Special handler for heartbeat
- if ( $v == 'misc-heartbeat_front' ) {
- if ( ! $previous_options[ $k ] ) {
- add_option( 'litespeed.conf.misc-heartbeat_front', true ) ;
- add_option( 'litespeed.conf.misc-heartbeat_back', true ) ;
- add_option( 'litespeed.conf.misc-heartbeat_editor', true ) ;
- add_option( 'litespeed.conf.misc-heartbeat_front_ttl', 0 ) ;
- add_option( 'litespeed.conf.misc-heartbeat_back_ttl', 0 ) ;
- add_option( 'litespeed.conf.misc-heartbeat_editor_ttl', 0 ) ;
+ if ($v == 'misc-heartbeat_front') {
+ if (!$previous_options[$k]) {
+ add_option('litespeed.conf.misc-heartbeat_front', true);
+ add_option('litespeed.conf.misc-heartbeat_back', true);
+ add_option('litespeed.conf.misc-heartbeat_editor', true);
+ add_option('litespeed.conf.misc-heartbeat_front_ttl', 0);
+ add_option('litespeed.conf.misc-heartbeat_back_ttl', 0);
+ add_option('litespeed.conf.misc-heartbeat_editor_ttl', 0);
}
- continue ;
+ continue;
}
- add_option( 'litespeed.conf.' . $v, $previous_options[ $k ] ) ;
+ add_option('litespeed.conf.' . $v, $previous_options[$k]);
}
// Conv purge_by_post
$data = array(
- '-' => 'purge-post_all',
- 'F' => 'purge-post_f',
- 'H' => 'purge-post_h',
- 'PGS' => 'purge-post_p',
- 'PGSRP' => 'purge-post_pwrp',
- 'A' => 'purge-post_a',
- 'Y' => 'purge-post_y',
- 'M' => 'purge-post_m',
- 'D' => 'purge-post_d',
- 'T' => 'purge-post_t',
- 'PT' => 'purge-post_pt',
- ) ;
- if ( isset( $previous_options[ 'purge_by_post' ] ) ) {
- $purge_by_post = explode( '.', $previous_options[ 'purge_by_post' ] ) ;
- foreach ( $data as $k => $v ) {
- add_option( 'litespeed.conf.' . $v, in_array( $k, $purge_by_post ) ) ;
+ '-' => 'purge-post_all',
+ 'F' => 'purge-post_f',
+ 'H' => 'purge-post_h',
+ 'PGS' => 'purge-post_p',
+ 'PGSRP' => 'purge-post_pwrp',
+ 'A' => 'purge-post_a',
+ 'Y' => 'purge-post_y',
+ 'M' => 'purge-post_m',
+ 'D' => 'purge-post_d',
+ 'T' => 'purge-post_t',
+ 'PT' => 'purge-post_pt',
+ );
+ if (isset($previous_options['purge_by_post'])) {
+ $purge_by_post = explode('.', $previous_options['purge_by_post']);
+ foreach ($data as $k => $v) {
+ add_option('litespeed.conf.' . $v, in_array($k, $purge_by_post));
}
}
// Conv 404/403/500 TTL
- $ttl_status = array() ;
- if ( isset( $previous_options[ '403_ttl' ] ) ) {
- $ttl_status[] = '403 ' . $previous_options[ '403_ttl' ] ;
+ $ttl_status = array();
+ if (isset($previous_options['403_ttl'])) {
+ $ttl_status[] = '403 ' . $previous_options['403_ttl'];
}
- if ( isset( $previous_options[ '404_ttl' ] ) ) {
- $ttl_status[] = '404 ' . $previous_options[ '404_ttl' ] ;
+ if (isset($previous_options['404_ttl'])) {
+ $ttl_status[] = '404 ' . $previous_options['404_ttl'];
}
- if ( isset( $previous_options[ '500_ttl' ] ) ) {
- $ttl_status[] = '500 ' . $previous_options[ '500_ttl' ] ;
+ if (isset($previous_options['500_ttl'])) {
+ $ttl_status[] = '500 ' . $previous_options['500_ttl'];
}
- add_option( 'litespeed.conf.cache-ttl_status', $ttl_status ) ;
+ add_option('litespeed.conf.cache-ttl_status', $ttl_status);
/**
* Resave cdn cfg from lscfg to separate cfg when upgrade to v1.7
@@ -515,16 +526,16 @@ function litespeed_update_3_0( $ver ) {
*
* @since 1.7
*/
- if ( isset( $previous_options[ 'cdn_url' ] ) ) {
+ if (isset($previous_options['cdn_url'])) {
$cdn_mapping = array(
- 'url' => $previous_options[ 'cdn_url' ],
- 'inc_img' => $previous_options[ 'cdn_inc_img' ],
- 'inc_css' => $previous_options[ 'cdn_inc_css' ],
- 'inc_js' => $previous_options[ 'cdn_inc_js' ],
- 'filetype' => $previous_options[ 'cdn_filetype' ],
- ) ;
- add_option( 'litespeed.conf.cdn-mapping', array( $cdn_mapping ) ) ;
- Debug2::debug( "[Data] plugin_upgrade option adding CDN map" ) ;
+ 'url' => $previous_options['cdn_url'],
+ 'inc_img' => $previous_options['cdn_inc_img'],
+ 'inc_css' => $previous_options['cdn_inc_css'],
+ 'inc_js' => $previous_options['cdn_inc_js'],
+ 'filetype' => $previous_options['cdn_filetype'],
+ );
+ add_option('litespeed.conf.cdn-mapping', array($cdn_mapping));
+ Debug2::debug('[Data] plugin_upgrade option adding CDN map');
}
/**
@@ -534,122 +545,121 @@ function litespeed_update_3_0( $ver ) {
*
* @since 2.3
*/
- if ( isset( $previous_options[ 'forced_cache_uri' ] ) ) {
- add_option( 'litespeed.conf.cache-force_uri', $previous_options[ 'forced_cache_uri' ] ) ;
+ if (isset($previous_options['forced_cache_uri'])) {
+ add_option('litespeed.conf.cache-force_uri', $previous_options['forced_cache_uri']);
}
- if ( isset( $previous_options[ 'cache_uri_priv' ] ) ) {
- add_option( 'litespeed.conf.cache-priv_uri', $previous_options[ 'cache_uri_priv' ] ) ;
+ if (isset($previous_options['cache_uri_priv'])) {
+ add_option('litespeed.conf.cache-priv_uri', $previous_options['cache_uri_priv']);
}
- if ( isset( $previous_options[ 'optm_excludes' ] ) ) {
- add_option( 'litespeed.conf.optm-exc', $previous_options[ 'optm_excludes' ] ) ;
+ if (isset($previous_options['optm_excludes'])) {
+ add_option('litespeed.conf.optm-exc', $previous_options['optm_excludes']);
}
- if ( isset( $previous_options[ 'excludes_uri' ] ) ) {
- add_option( 'litespeed.conf.cache-exc', $previous_options[ 'excludes_uri' ] ) ;
+ if (isset($previous_options['excludes_uri'])) {
+ add_option('litespeed.conf.cache-exc', $previous_options['excludes_uri']);
}
// Backup stale conf
- Debug2::debug( "[Data] Backup stale conf" );
- delete_option( 'litespeed-cache-conf' );
- add_option( 'litespeed-cache-conf.bk', $previous_options );
+ Debug2::debug('[Data] Backup stale conf');
+ delete_option('litespeed-cache-conf');
+ add_option('litespeed-cache-conf.bk', $previous_options);
// Upgrade site_options if is network
- if ( is_multisite() ) {
- $ver = get_site_option( 'litespeed.conf._version' ) ;
- if ( ! $ver ) {
- Debug2::debug( "[Data] Conv multisite" );
- $previous_site_options = get_site_option( 'litespeed-cache-conf' ) ;
+ if (is_multisite()) {
+ $ver = get_site_option('litespeed.conf._version');
+ if (!$ver) {
+ Debug2::debug('[Data] Conv multisite');
+ $previous_site_options = get_site_option('litespeed-cache-conf');
$data = array(
- 'network_enabled' => 'cache',
- 'use_primary_settings' => 'use_primary_settings',
- 'auto_upgrade' => 'auto_upgrade',
- 'purge_upgrade' => 'purge-upgrade',
-
- 'cache_favicon' => 'cache-favicon',
- 'cache_resources' => 'cache-resources',
- 'mobileview_enabled' => 'cache-mobile',
- 'mobileview_rules' => 'cache-mobile_rules',
- 'login_cookie' => 'cache-login_cookie',
- 'nocache_cookies' => 'cache-exc_cookies',
- 'nocache_useragents' => 'cache-exc_useragents',
-
- 'cache_object' => 'object',
- 'cache_object_kind' => 'object-kind',
- 'cache_object_host' => 'object-host',
- 'cache_object_port' => 'object-port',
- 'cache_object_life' => 'object-life',
- 'cache_object_persistent' => 'object-persistent',
- 'cache_object_admin' => 'object-admin',
- 'cache_object_transients' => 'object-transients',
- 'cache_object_db_id' => 'object-db_id',
- 'cache_object_user' => 'object-user',
- 'cache_object_pswd' => 'object-psw',
-
- 'cache_browser' => 'cache-browser',
- 'cache_browser_ttl' => 'cache-ttl_browser',
-
- 'media_webp_replace' => 'img_optm-webp_replace',
- ) ;
- foreach ( $data as $k => $v ) {
- if ( ! isset( $previous_site_options[ $k ] ) ) {
- continue ;
+ 'network_enabled' => 'cache',
+ 'use_primary_settings' => 'use_primary_settings',
+ 'auto_upgrade' => 'auto_upgrade',
+ 'purge_upgrade' => 'purge-upgrade',
+
+ 'cache_favicon' => 'cache-favicon',
+ 'cache_resources' => 'cache-resources',
+ 'mobileview_enabled' => 'cache-mobile',
+ 'mobileview_rules' => 'cache-mobile_rules',
+ 'login_cookie' => 'cache-login_cookie',
+ 'nocache_cookies' => 'cache-exc_cookies',
+ 'nocache_useragents' => 'cache-exc_useragents',
+
+ 'cache_object' => 'object',
+ 'cache_object_kind' => 'object-kind',
+ 'cache_object_host' => 'object-host',
+ 'cache_object_port' => 'object-port',
+ 'cache_object_life' => 'object-life',
+ 'cache_object_persistent' => 'object-persistent',
+ 'cache_object_admin' => 'object-admin',
+ 'cache_object_transients' => 'object-transients',
+ 'cache_object_db_id' => 'object-db_id',
+ 'cache_object_user' => 'object-user',
+ 'cache_object_pswd' => 'object-psw',
+
+ 'cache_browser' => 'cache-browser',
+ 'cache_browser_ttl' => 'cache-ttl_browser',
+
+ 'media_webp_replace' => 'img_optm-webp',
+ );
+ foreach ($data as $k => $v) {
+ if (!isset($previous_site_options[$k])) {
+ continue;
}
// The folllowing values must be array
- if ( ! is_array( $previous_site_options[ $k ] ) ) {
- if ( in_array( $v, array( 'cache-mobile_rules', 'cache-exc_useragents', 'cache-exc_cookies' ) ) ) {
- $previous_site_options[ $k ] = explode( '|', str_replace( '\\ ', ' ', $previous_site_options[ $k ] ) ) ;
- $previous_site_options[ $k ] = array_filter( $previous_site_options[ $k ] ) ;
+ if (!is_array($previous_site_options[$k])) {
+ if (in_array($v, array('cache-mobile_rules', 'cache-exc_useragents', 'cache-exc_cookies'))) {
+ $previous_site_options[$k] = explode('|', str_replace('\\ ', ' ', $previous_site_options[$k]));
+ $previous_site_options[$k] = array_filter($previous_site_options[$k]);
}
}
- add_site_option( 'litespeed.conf.' . $v, $previous_site_options[ $k ] ) ;
+ add_site_option('litespeed.conf.' . $v, $previous_site_options[$k]);
}
// These are already converted to single record in single site
- $data = array(
- 'object-global_groups',
- 'object-non_persistent_groups',
- ) ;
- foreach ( $data as $v ) {
- $old_data = get_option( $v ) ;
- if ( $old_data ) {
- add_site_option( 'litespeed.conf.' . $v, $old_data ) ;
+ $data = array('object-global_groups', 'object-non_persistent_groups');
+ foreach ($data as $v) {
+ $old_data = get_option($v);
+ if ($old_data) {
+ add_site_option('litespeed.conf.' . $v, $old_data);
}
}
- delete_site_option( 'litespeed-cache-conf' ) ;
+ delete_site_option('litespeed-cache-conf');
- add_site_option( 'litespeed.conf._version', '3.0' ) ;
+ add_site_option('litespeed.conf._version', '3.0');
}
-
}
// delete tables
- Debug2::debug( "[Data] Drop litespeed_optimizer" );
- $q = 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'litespeed_optimizer' ;
- $wpdb->query( $q ) ;
+ Debug2::debug('[Data] Drop litespeed_optimizer');
+ $q = 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'litespeed_optimizer';
+ $wpdb->query($q);
// Update image optm table
- Debug2::debug( "[Data] Upgrade img_optm table" );
- $tb_exists = $wpdb->get_var( 'SHOW TABLES LIKE "' . $wpdb->prefix . 'litespeed_img_optm"' );
- if ( $tb_exists ) {
+ Debug2::debug('[Data] Upgrade img_optm table');
+ $tb_exists = $wpdb->get_var('SHOW TABLES LIKE "' . $wpdb->prefix . 'litespeed_img_optm"');
+ if ($tb_exists) {
$status_mapping = array(
- 'requested' => 3,
- 'notified' => 6,
- 'pulled' => 9,
- 'failed' => -1,
- 'miss' => -3,
- 'err' => -9,
- 'err_fetch' => -5,
- 'err_optm' => -7,
- 'xmeta' => -8,
+ 'requested' => 3,
+ 'notified' => 6,
+ 'pulled' => 9,
+ 'failed' => -1,
+ 'miss' => -3,
+ 'err' => -9,
+ 'err_fetch' => -5,
+ 'err_optm' => -7,
+ 'xmeta' => -8,
);
- foreach ( $status_mapping as $k => $v ) {
- $q = "UPDATE `" . $wpdb->prefix . "litespeed_img_optm` SET optm_status='$v' WHERE optm_status='$k'";
- $wpdb->query( $q ) ;
+ foreach ($status_mapping as $k => $v) {
+ $q = 'UPDATE `' . $wpdb->prefix . "litespeed_img_optm` SET optm_status='$v' WHERE optm_status='$k'";
+ $wpdb->query($q);
}
- $q = 'ALTER TABLE `' . $wpdb->prefix . 'litespeed_img_optm`
+ $q =
+ 'ALTER TABLE `' .
+ $wpdb->prefix .
+ 'litespeed_img_optm`
DROP INDEX `post_id_2`,
DROP INDEX `root_id`,
DROP INDEX `src_md5`,
@@ -664,36 +674,12 @@ function litespeed_update_3_0( $ver ) {
MODIFY COLUMN `optm_status` tinyint(4) NOT NULL DEFAULT 0,
MODIFY COLUMN `src` text COLLATE utf8mb4_unicode_ci NOT NULL
';
- $wpdb->query( $q ) ;
+ $wpdb->query($q);
}
- delete_option( 'litespeed-recommended' );
-
- Debug2::debug( "[Data] litespeed_update_3_0 done!" );
+ delete_option('litespeed-recommended');
- add_option( 'litespeed.conf._version', '3.0' ) ;
+ Debug2::debug('[Data] litespeed_update_3_0 done!');
+ add_option('litespeed.conf._version', '3.0');
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/db-optm.cls.php b/src/db-optm.cls.php
index a1204061c..d62337e44 100644
--- a/src/db-optm.cls.php
+++ b/src/db-optm.cls.php
@@ -1,4 +1,5 @@
*/
+
namespace LiteSpeed;
-defined( 'WPINC' ) || exit;
+defined('WPINC') || exit();
-class DB_Optm extends Root {
+class DB_Optm extends Root
+{
private static $_hide_more = false;
- private static $TYPES = array( 'revision', 'auto_draft', 'trash_post', 'spam_comment', 'trash_comment', 'trackback-pingback', 'expired_transient', 'all_transients', 'optimize_tables' );
+ private static $TYPES = array(
+ 'revision',
+ 'orphaned_post_meta',
+ 'auto_draft',
+ 'trash_post',
+ 'spam_comment',
+ 'trash_comment',
+ 'trackback-pingback',
+ 'expired_transient',
+ 'all_transients',
+ 'optimize_tables',
+ );
const TYPE_CONV_TB = 'conv_innodb';
/**
@@ -23,7 +37,8 @@ class DB_Optm extends Root {
*
* @since 3.0
*/
- public static function hide_more() {
+ public static function hide_more()
+ {
return self::$_hide_more;
}
@@ -36,27 +51,28 @@ public static function hide_more() {
* @param bool $ignore_multisite If ignore multisite check
* @return int The rows that will be affected
*/
- public function db_count( $type, $ignore_multisite = false ) {
- if ( $type === 'all' ) {
+ public function db_count($type, $ignore_multisite = false)
+ {
+ if ($type === 'all') {
$num = 0;
- foreach ( self::$TYPES as $v ) {
- $num += $this->db_count( $v );
+ foreach (self::$TYPES as $v) {
+ $num += $this->db_count($v);
}
return $num;
}
- if ( ! $ignore_multisite ) {
- if ( is_multisite() && is_network_admin() ) {
+ if (!$ignore_multisite) {
+ if (is_multisite() && is_network_admin()) {
$num = 0;
$blogs = Activation::get_network_ids();
- foreach ( $blogs as $k => $blog_id ) {
- if ( $k > 3 ) {
+ foreach ($blogs as $k => $blog_id) {
+ if ($k > 3) {
self::$_hide_more = true;
break;
}
- switch_to_blog( $blog_id );
- $num += $this->db_count( $type, true );
+ switch_to_blog($blog_id);
+ $num += $this->db_count($type, true);
restore_current_blog();
}
return $num;
@@ -65,48 +81,51 @@ public function db_count( $type, $ignore_multisite = false ) {
global $wpdb;
- switch ( $type ) {
+ switch ($type) {
case 'revision':
- $rev_max = (int) $this->conf( Base::O_DB_OPTM_REVISIONS_MAX );
- $rev_age = (int) $this->conf( Base::O_DB_OPTM_REVISIONS_AGE );
+ $rev_max = (int) $this->conf(Base::O_DB_OPTM_REVISIONS_MAX);
+ $rev_age = (int) $this->conf(Base::O_DB_OPTM_REVISIONS_AGE);
$sql_add = '';
- if ( $rev_age ) {
+ if ($rev_age) {
$sql_add = " and post_modified < DATE_SUB( NOW(), INTERVAL $rev_age DAY ) ";
}
$sql = "SELECT COUNT(*) FROM `$wpdb->posts` WHERE post_type = 'revision' $sql_add";
- if ( ! $rev_max ) {
- return $wpdb->get_var( $sql );
+ if (!$rev_max) {
+ return $wpdb->get_var($sql);
}
// Has count limit
$sql = "SELECT COUNT(*)-$rev_max FROM `$wpdb->posts` WHERE post_type = 'revision' $sql_add GROUP BY post_parent HAVING count(*)>$rev_max";
- $res = $wpdb->get_results( $sql, ARRAY_N );
+ $res = $wpdb->get_results($sql, ARRAY_N);
Utility::compatibility();
- return array_sum( array_column( $res, 0 ) );
+ return array_sum(array_column($res, 0));
+
+ case 'orphaned_post_meta':
+ return $wpdb->get_var("SELECT COUNT(*) FROM `$wpdb->postmeta` a LEFT JOIN `$wpdb->posts` b ON b.ID=a.post_id WHERE b.ID IS NULL");
case 'auto_draft':
- return $wpdb->get_var( "SELECT COUNT(*) FROM `$wpdb->posts` WHERE post_status = 'auto-draft'" );
+ return $wpdb->get_var("SELECT COUNT(*) FROM `$wpdb->posts` WHERE post_status = 'auto-draft'");
case 'trash_post':
- return $wpdb->get_var( "SELECT COUNT(*) FROM `$wpdb->posts` WHERE post_status = 'trash'" );
+ return $wpdb->get_var("SELECT COUNT(*) FROM `$wpdb->posts` WHERE post_status = 'trash'");
case 'spam_comment':
- return $wpdb->get_var( "SELECT COUNT(*) FROM `$wpdb->comments` WHERE comment_approved = 'spam'" );
+ return $wpdb->get_var("SELECT COUNT(*) FROM `$wpdb->comments` WHERE comment_approved = 'spam'");
case 'trash_comment':
- return $wpdb->get_var( "SELECT COUNT(*) FROM `$wpdb->comments` WHERE comment_approved = 'trash'" );
+ return $wpdb->get_var("SELECT COUNT(*) FROM `$wpdb->comments` WHERE comment_approved = 'trash'");
case 'trackback-pingback':
- return $wpdb->get_var( "SELECT COUNT(*) FROM `$wpdb->comments` WHERE comment_type = 'trackback' OR comment_type = 'pingback'" );
+ return $wpdb->get_var("SELECT COUNT(*) FROM `$wpdb->comments` WHERE comment_type = 'trackback' OR comment_type = 'pingback'");
case 'expired_transient':
- return $wpdb->get_var( "SELECT COUNT(*) FROM `$wpdb->options` WHERE option_name LIKE '_transient_timeout%' AND option_value < " . time() );
+ return $wpdb->get_var("SELECT COUNT(*) FROM `$wpdb->options` WHERE option_name LIKE '_transient_timeout%' AND option_value < " . time());
case 'all_transients':
- return $wpdb->get_var( "SELECT COUNT(*) FROM `$wpdb->options` WHERE option_name LIKE '%_transient_%'" );
+ return $wpdb->get_var("SELECT COUNT(*) FROM `$wpdb->options` WHERE option_name LIKE '%_transient_%'");
case 'optimize_tables':
- return $wpdb->get_var( "SELECT COUNT(*) FROM information_schema.tables WHERE TABLE_SCHEMA = '" . DB_NAME . "' and ENGINE <> 'InnoDB' and DATA_FREE > 0" );
+ return $wpdb->get_var("SELECT COUNT(*) FROM information_schema.tables WHERE TABLE_SCHEMA = '" . DB_NAME . "' and ENGINE <> 'InnoDB' and DATA_FREE > 0");
}
return '-';
@@ -119,79 +138,113 @@ public function db_count( $type, $ignore_multisite = false ) {
* @since 3.0 changed to private
* @access private
*/
- private function _db_clean( $type ) {
- if ( $type === 'all' ) {
- foreach ( self::$TYPES as $v ) {
- $this->_db_clean( $v );
+ private function _db_clean($type)
+ {
+ if ($type === 'all') {
+ foreach (self::$TYPES as $v) {
+ $this->_db_clean($v);
}
- return __( 'Clean all successfully.', 'litespeed-cache' );
+ return __('Clean all successfully.', 'litespeed-cache');
}
global $wpdb;
- switch ( $type ) {
+ switch ($type) {
case 'revision':
- $rev_max = (int) $this->conf( Base::O_DB_OPTM_REVISIONS_MAX );
- $rev_age = (int) $this->conf( Base::O_DB_OPTM_REVISIONS_AGE );
-
- $sql_add = '';
- if ( $rev_age ) {
- $sql_add = " and post_modified < DATE_SUB( NOW(), INTERVAL $rev_age DAY ) ";
- }
-
- if ( ! $rev_max ) {
- $sql = "DELETE FROM `$wpdb->posts` WHERE post_type = 'revision' $sql_add";
- $wpdb->query( $sql );
- }
- else { // Has count limit
- $sql = "SELECT COUNT(*)-$rev_max as del_max,post_parent FROM `$wpdb->posts` WHERE post_type = 'revision' $sql_add GROUP BY post_parent HAVING count(*)>$rev_max";
- $res = $wpdb->get_results( $sql );
- foreach ( $res as $v ) {
- $sql = "DELETE FROM `$wpdb->posts` WHERE post_type = 'revision' AND post_parent = %d ORDER BY ID LIMIT %d";
- $wpdb->query( $wpdb->prepare( $sql, array( $v->post_parent, $v->del_max ) ) );
+ $rev_max = (int) $this->conf(Base::O_DB_OPTM_REVISIONS_MAX);
+ $rev_age = (int) $this->conf(Base::O_DB_OPTM_REVISIONS_AGE);
+
+ $postmeta = "`$wpdb->postmeta`";
+ $posts = "`$wpdb->posts`";
+
+ $sql_postmeta_join = function ($table) use ($postmeta, $posts) {
+ return "
+ $postmeta
+ CROSS JOIN $table
+ ON $posts.ID = $postmeta.post_id
+ ";
+ };
+
+ $sql_where = "WHERE $posts.post_type = 'revision'";
+
+ $sql_add = $rev_age ? "AND $posts.post_modified < DATE_SUB( NOW(), INTERVAL $rev_age DAY )" : '';
+
+ if (!$rev_max) {
+ $sql_where = "$sql_where $sql_add";
+ $sql_postmeta = $sql_postmeta_join($posts);
+ $wpdb->query("DELETE $postmeta FROM $sql_postmeta $sql_where");
+ $wpdb->query("DELETE FROM $posts $sql_where");
+ } else {
+ // Has count limit
+ $sql = "
+ SELECT COUNT(*) - $rev_max
+ AS del_max, post_parent
+ FROM $posts
+ WHERE post_type = 'revision'
+ $sql_add
+ GROUP BY post_parent
+ HAVING COUNT(*) > $rev_max
+ ";
+ $res = $wpdb->get_results($sql);
+ $sql_where = "
+ $sql_where
+ AND post_parent = %d
+ ORDER BY ID
+ LIMIT %d
+ ";
+ $sql_postmeta = $sql_postmeta_join("(SELECT ID FROM $posts $sql_where) AS $posts");
+ foreach ($res as $v) {
+ $args = array($v->post_parent, $v->del_max);
+ $sql = $wpdb->prepare("DELETE $postmeta FROM $sql_postmeta", $args);
+ $wpdb->query($sql);
+ $sql = $wpdb->prepare("DELETE FROM $posts $sql_where", $args);
+ $wpdb->query($sql);
}
}
- return __( 'Clean post revisions successfully.', 'litespeed-cache' );
+ return __('Clean post revisions successfully.', 'litespeed-cache');
+
+ case 'orphaned_post_meta':
+ $wpdb->query("DELETE a FROM `$wpdb->postmeta` a LEFT JOIN `$wpdb->posts` b ON b.ID=a.post_id WHERE b.ID IS NULL");
+ return __('Clean orphaned post meta successfully.', 'litespeed-cache');
case 'auto_draft':
- $wpdb->query( "DELETE FROM `$wpdb->posts` WHERE post_status = 'auto-draft'" );
- return __( 'Clean auto drafts successfully.', 'litespeed-cache' );
+ $wpdb->query("DELETE FROM `$wpdb->posts` WHERE post_status = 'auto-draft'");
+ return __('Clean auto drafts successfully.', 'litespeed-cache');
case 'trash_post':
- $wpdb->query( "DELETE FROM `$wpdb->posts` WHERE post_status = 'trash'" );
- return __( 'Clean trashed posts and pages successfully.', 'litespeed-cache' );
+ $wpdb->query("DELETE FROM `$wpdb->posts` WHERE post_status = 'trash'");
+ return __('Clean trashed posts and pages successfully.', 'litespeed-cache');
case 'spam_comment':
- $wpdb->query( "DELETE FROM `$wpdb->comments` WHERE comment_approved = 'spam'" );
- return __( 'Clean spam comments successfully.', 'litespeed-cache' );
+ $wpdb->query("DELETE FROM `$wpdb->comments` WHERE comment_approved = 'spam'");
+ return __('Clean spam comments successfully.', 'litespeed-cache');
case 'trash_comment':
- $wpdb->query( "DELETE FROM `$wpdb->comments` WHERE comment_approved = 'trash'" );
- return __( 'Clean trashed comments successfully.', 'litespeed-cache' );
+ $wpdb->query("DELETE FROM `$wpdb->comments` WHERE comment_approved = 'trash'");
+ return __('Clean trashed comments successfully.', 'litespeed-cache');
case 'trackback-pingback':
- $wpdb->query( "DELETE FROM `$wpdb->comments` WHERE comment_type = 'trackback' OR comment_type = 'pingback'" );
- return __( 'Clean trackbacks and pingbacks successfully.', 'litespeed-cache' );
+ $wpdb->query("DELETE FROM `$wpdb->comments` WHERE comment_type = 'trackback' OR comment_type = 'pingback'");
+ return __('Clean trackbacks and pingbacks successfully.', 'litespeed-cache');
case 'expired_transient':
- $wpdb->query( "DELETE FROM `$wpdb->options` WHERE option_name LIKE '_transient_timeout%' AND option_value < " . time() );
- return __( 'Clean expired transients successfully.', 'litespeed-cache' );
+ $wpdb->query("DELETE FROM `$wpdb->options` WHERE option_name LIKE '_transient_timeout%' AND option_value < " . time());
+ return __('Clean expired transients successfully.', 'litespeed-cache');
case 'all_transients':
- $wpdb->query( "DELETE FROM `$wpdb->options` WHERE option_name LIKE '%\\_transient\\_%'" );
- return __( 'Clean all transients successfully.', 'litespeed-cache' );
+ $wpdb->query("DELETE FROM `$wpdb->options` WHERE option_name LIKE '%\\_transient\\_%'");
+ return __('Clean all transients successfully.', 'litespeed-cache');
case 'optimize_tables':
$sql = "SELECT table_name, DATA_FREE FROM information_schema.tables WHERE TABLE_SCHEMA = '" . DB_NAME . "' and ENGINE <> 'InnoDB' and DATA_FREE > 0";
- $result = $wpdb->get_results( $sql );
- if ( $result ) {
- foreach ( $result as $row ) {
- $wpdb->query( 'OPTIMIZE TABLE ' . $row->table_name );
+ $result = $wpdb->get_results($sql);
+ if ($result) {
+ foreach ($result as $row) {
+ $wpdb->query('OPTIMIZE TABLE ' . $row->table_name);
}
}
- return __( 'Optimized all tables.', 'litespeed-cache' );
+ return __('Optimized all tables.', 'litespeed-cache');
}
-
}
/**
@@ -200,10 +253,11 @@ private function _db_clean( $type ) {
* @since 3.0
* @access public
*/
- public function list_myisam() {
+ public function list_myisam()
+ {
global $wpdb;
$q = "SELECT * FROM information_schema.tables WHERE TABLE_SCHEMA = '" . DB_NAME . "' and ENGINE = 'myisam' AND TABLE_NAME LIKE '{$wpdb->prefix}%'";
- return $wpdb->get_results( $q );
+ return $wpdb->get_results($q);
}
/**
@@ -212,37 +266,37 @@ public function list_myisam() {
* @since 3.0
* @access private
*/
- private function _conv_innodb() {
+ private function _conv_innodb()
+ {
global $wpdb;
- if ( empty( $_GET[ 'tb' ] ) ) {
- Admin_Display::error( 'No table to convert' );
+ if (empty($_GET['tb'])) {
+ Admin_Display::error('No table to convert');
return;
}
$tb = false;
$list = $this->list_myisam();
- foreach ( $list as $v ) {
- if ( $v->TABLE_NAME == $_GET[ 'tb' ] ) {
+ foreach ($list as $v) {
+ if ($v->TABLE_NAME == $_GET['tb']) {
$tb = $v->TABLE_NAME;
break;
}
}
- if ( ! $tb ) {
- Admin_Display::error( 'No existing table' );
+ if (!$tb) {
+ Admin_Display::error('No existing table');
return;
}
$q = 'ALTER TABLE ' . DB_NAME . '.' . $tb . ' ENGINE = InnoDB';
- $wpdb->query( $q );
-
- Debug2::debug( "[DB] Converted $tb to InnoDB" );
+ $wpdb->query($q);
- $msg = __( 'Converted to InnoDB successfully.', 'litespeed-cache' );
- Admin_Display::succeed( $msg );
+ Debug2::debug("[DB] Converted $tb to InnoDB");
+ $msg = __('Converted to InnoDB successfully.', 'litespeed-cache');
+ Admin_Display::succeed($msg);
}
/**
@@ -251,12 +305,15 @@ private function _conv_innodb() {
* @since 3.0
* @access public
*/
- public function autoload_summary() {
+ public function autoload_summary()
+ {
global $wpdb;
- $summary = $wpdb->get_row( "SELECT SUM(LENGTH(option_value)) AS autoload_size,COUNT(*) AS autload_entries FROM `$wpdb->options` WHERE autoload='yes'" );
+ $summary = $wpdb->get_row("SELECT SUM(LENGTH(option_value)) AS autoload_size,COUNT(*) AS autload_entries FROM `$wpdb->options` WHERE autoload='yes'");
- $summary->autoload_toplist = $wpdb->get_results( "SELECT option_name, LENGTH(option_value) AS option_value_length FROM `$wpdb->options` WHERE autoload='yes' ORDER BY option_value_length DESC LIMIT 20" );
+ $summary->autoload_toplist = $wpdb->get_results(
+ "SELECT option_name, LENGTH(option_value) AS option_value_length FROM `$wpdb->options` WHERE autoload='yes' ORDER BY option_value_length DESC LIMIT 20"
+ );
return $summary;
}
@@ -267,27 +324,27 @@ public function autoload_summary() {
* @since 3.0
* @access public
*/
- public function handler() {
+ public function handler()
+ {
$type = Router::verify_type();
- switch ( $type ) {
+ switch ($type) {
case 'all':
- case in_array( $type, self::$TYPES ):
- if ( is_multisite() && is_network_admin() ) {
+ case in_array($type, self::$TYPES):
+ if (is_multisite() && is_network_admin()) {
$blogs = Activation::get_network_ids();
- foreach ( $blogs as $blog_id ) {
- switch_to_blog( $blog_id );
- $msg = $this->_db_clean( $type );
+ foreach ($blogs as $blog_id) {
+ switch_to_blog($blog_id);
+ $msg = $this->_db_clean($type);
restore_current_blog();
}
+ } else {
+ $msg = $this->_db_clean($type);
}
- else {
- $msg = $this->_db_clean( $type );
- }
- Admin_Display::succeed( $msg );
+ Admin_Display::succeed($msg);
break;
- case self::TYPE_CONV_TB :
+ case self::TYPE_CONV_TB:
$this->_conv_innodb();
break;
@@ -297,6 +354,4 @@ public function handler() {
Admin::redirect();
}
-
}
-
diff --git a/src/debug2.cls.php b/src/debug2.cls.php
index bdfffa48f..d7a1b3c1b 100644
--- a/src/debug2.cls.php
+++ b/src/debug2.cls.php
@@ -1,12 +1,15 @@
conf( Base::O_DEBUG_LEVEL ) ) {
- ! defined( 'LSCWP_LOG_MORE' ) && define( 'LSCWP_LOG_MORE', true );
+ if ($this->conf(Base::O_DEBUG_LEVEL)) {
+ !defined('LSCWP_LOG_MORE') && define('LSCWP_LOG_MORE', true);
}
- defined( 'LSCWP_DEBUG_EXC_STRINGS' ) || define( 'LSCWP_DEBUG_EXC_STRINGS', $this->conf( Base::O_DEBUG_EXC_STRINGS ) );
+ defined('LSCWP_DEBUG_EXC_STRINGS') || define('LSCWP_DEBUG_EXC_STRINGS', $this->conf(Base::O_DEBUG_EXC_STRINGS));
}
/**
@@ -47,9 +51,12 @@ public function __construct() {
* @since 4.7
* @access public
*/
- public static function ended() {
- self::debug( 'Response headers', headers_list() );
- self::debug( "End response\n--------------------------------------------------------------------------------\n" );
+ public static function ended()
+ {
+ self::debug('Response headers', headers_list());
+
+ $elapsed_time = number_format((microtime(true) - LSCWP_TS_0) * 1000, 2);
+ self::debug("End response\n--------------------------------------------------Duration: " . $elapsed_time . " ms------------------------------\n");
}
/**
@@ -58,33 +65,33 @@ public static function ended() {
* @since 2.9.5
* @access public
*/
- public function beta_test( $zip = false ) {
- if ( ! $zip ) {
- if ( empty( $_REQUEST[ self::BETA_TEST_URL ] ) ) {
+ public function beta_test($zip = false)
+ {
+ if (!$zip) {
+ if (empty($_REQUEST[self::BETA_TEST_URL])) {
return;
}
- $zip = $_REQUEST[ self::BETA_TEST_URL ];
- if ( $zip !== Debug2::BETA_TEST_URL_WP ) {
- if ( $zip === 'latest' ) {
+ $zip = $_REQUEST[self::BETA_TEST_URL];
+ if ($zip !== Debug2::BETA_TEST_URL_WP) {
+ if ($zip === 'latest') {
$zip = Debug2::BETA_TEST_URL_WP;
- }
- else {
+ } else {
// Generate zip url
- $zip = $this->_package_zip( $zip );
+ $zip = $this->_package_zip($zip);
}
}
}
- if ( ! $zip ) {
- Debug2::debug( '[Debug2] ❌ No ZIP file' );
+ if (!$zip) {
+ Debug2::debug('[Debug2] ❌ No ZIP file');
return;
}
- Debug2::debug( '[Debug2] ZIP file ' . $zip );
+ Debug2::debug('[Debug2] ZIP file ' . $zip);
- $update_plugins = get_site_transient( 'update_plugins' );
- if ( ! is_object( $update_plugins ) ) {
+ $update_plugins = get_site_transient('update_plugins');
+ if (!is_object($update_plugins)) {
$update_plugins = new \stdClass();
}
@@ -95,9 +102,9 @@ public function beta_test( $zip = false ) {
$plugin_info->package = $zip;
$plugin_info->url = 'https://wordpress.org/plugins/litespeed-cache/';
- $update_plugins->response[ Core::PLUGIN_FILE ] = $plugin_info;
+ $update_plugins->response[Core::PLUGIN_FILE] = $plugin_info;
- set_site_transient( 'update_plugins', $update_plugins );
+ set_site_transient('update_plugins', $update_plugins);
// Run upgrade
Activation::cls()->upgrade();
@@ -109,17 +116,18 @@ public function beta_test( $zip = false ) {
* @since 2.9.5
* @access private
*/
- private function _package_zip( $commit ) {
+ private function _package_zip($commit)
+ {
$data = array(
- 'commit' => $commit,
+ 'commit' => $commit,
);
- $res = Cloud::get( Cloud::API_BETA_TEST, $data );
+ $res = Cloud::get(Cloud::API_BETA_TEST, $data);
- if ( empty( $res[ 'zip' ] ) ) {
+ if (empty($res['zip'])) {
return false;
}
- return $res[ 'zip' ];
+ return $res['zip'];
}
/**
@@ -128,20 +136,20 @@ private function _package_zip( $commit ) {
* @since 2.7
* @access public
*/
- public static function log_purge( $purge_header ) {
+ public static function log_purge($purge_header)
+ {
// Check if debug is ON
- if ( ! defined( 'LSCWP_LOG' ) && ! defined( 'LSCWP_LOG_BYPASS_NOTADMIN' ) ) {
+ if (!defined('LSCWP_LOG') && !defined('LSCWP_LOG_BYPASS_NOTADMIN')) {
return;
}
$purge_file = self::$log_path_prefix . '/debug.purge.log';
- self::cls()->_init_request( $purge_file );
-
- $msg = $purge_header . self::_backtrace_info( 6 );
+ self::cls()->_init_request($purge_file);
- File::append( $purge_file, self::format_message( $msg ) );
+ $msg = $purge_header . self::_backtrace_info(6);
+ File::append($purge_file, self::format_message($msg));
}
/**
@@ -150,11 +158,12 @@ public static function log_purge( $purge_header ) {
* @since 1.1.0
* @access public
*/
- public function init() {
- $debug = $this->conf( Base::O_DEBUG );
- if ( $debug == Base::VAL_ON2 ) {
- if ( ! $this->cls( 'Router' )->is_admin_ip() ) {
- defined( 'LSCWP_LOG_BYPASS_NOTADMIN' ) || define( 'LSCWP_LOG_BYPASS_NOTADMIN', true );
+ public function init()
+ {
+ $debug = $this->conf(Base::O_DEBUG);
+ if ($debug == Base::VAL_ON2) {
+ if (!$this->cls('Router')->is_admin_ip()) {
+ defined('LSCWP_LOG_BYPASS_NOTADMIN') || define('LSCWP_LOG_BYPASS_NOTADMIN', true);
return;
}
}
@@ -164,26 +173,26 @@ public function init() {
* This is after LSCWP_LOG_BYPASS_NOTADMIN to make `log_purge()` still work
* @since 3.0
*/
- $list = $this->conf( Base::O_DEBUG_INC );
- if ( $list ) {
- $result = Utility::str_hit_array( $_SERVER[ 'REQUEST_URI' ], $list );
- if ( ! $result ) {
+ $list = $this->conf(Base::O_DEBUG_INC);
+ if ($list) {
+ $result = Utility::str_hit_array($_SERVER['REQUEST_URI'], $list);
+ if (!$result) {
return;
}
}
- $list = $this->conf( Base::O_DEBUG_EXC );
- if ( $list ) {
- $result = Utility::str_hit_array( $_SERVER[ 'REQUEST_URI' ], $list );
- if ( $result ) {
+ $list = $this->conf(Base::O_DEBUG_EXC);
+ if ($list) {
+ $result = Utility::str_hit_array($_SERVER['REQUEST_URI'], $list);
+ if ($result) {
return;
}
}
- if ( ! defined( 'LSCWP_LOG' ) ) {// If not initialized, do it now
+ if (!defined('LSCWP_LOG')) {
+ // If not initialized, do it now
$this->_init_request();
- define( 'LSCWP_LOG', true );
-
+ define('LSCWP_LOG', true);
}
}
@@ -193,23 +202,24 @@ public function init() {
* @since 1.0.12
* @access private
*/
- private function _init_request( $log_file = null ) {
- if ( ! $log_file ) {
+ private function _init_request($log_file = null)
+ {
+ if (!$log_file) {
$log_file = self::$log_path;
}
// Check log file size
- $log_file_size = $this->conf( Base::O_DEBUG_FILESIZE );
- if ( file_exists( $log_file ) && filesize( $log_file ) > $log_file_size * 1000000 ) {
- File::save( $log_file, '' );
+ $log_file_size = $this->conf(Base::O_DEBUG_FILESIZE);
+ if (file_exists($log_file) && filesize($log_file) > $log_file_size * 1000000) {
+ File::save($log_file, '');
}
// For more than 2s's requests, add more break
- if ( file_exists( $log_file ) && time() - filemtime( $log_file ) > 2 ) {
- File::append( $log_file, "\n\n\n\n" );
+ if (file_exists($log_file) && time() - filemtime($log_file) > 2) {
+ File::append($log_file, "\n\n\n\n");
}
- if ( PHP_SAPI == 'cli' ) {
+ if (PHP_SAPI == 'cli') {
return;
}
@@ -219,66 +229,67 @@ private function _init_request( $log_file = null ) {
'HTTP_USER_AGENT' => '',
'HTTP_ACCEPT_ENCODING' => '',
'HTTP_COOKIE' => '',
+ 'REQUEST_METHOD' => '',
+ 'SERVER_PROTOCOL' => '',
'X-LSCACHE' => '',
'LSCACHE_VARY_COOKIE' => '',
'LSCACHE_VARY_VALUE' => '',
'ESI_CONTENT_TYPE' => '',
);
- $server = array_merge( $servervars, $_SERVER );
+ $server = array_merge($servervars, $_SERVER);
$params = array();
- if ( isset( $_SERVER[ 'HTTPS' ] ) && $_SERVER[ 'HTTPS' ] == 'on' ) {
+ if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
$server['SERVER_PROTOCOL'] .= ' (HTTPS) ';
}
- $param = sprintf( '💓 ------%s %s %s', $server['REQUEST_METHOD'], $server['SERVER_PROTOCOL'], strtok( $server['REQUEST_URI'], '?' ) );
+ $param = sprintf('💓 ------%s %s %s', $server['REQUEST_METHOD'], $server['SERVER_PROTOCOL'], strtok($server['REQUEST_URI'], '?'));
- $qs = ! empty( $server['QUERY_STRING'] ) ? $server['QUERY_STRING'] : '';
- if ( $this->conf( Base::O_DEBUG_COLLAPS_QS ) ) {
- if ( strlen( $qs ) > 53 ) {
- $qs = substr( $qs, 0, 53 ) . '...';
+ $qs = !empty($server['QUERY_STRING']) ? $server['QUERY_STRING'] : '';
+ if ($this->conf(Base::O_DEBUG_COLLAPS_QS)) {
+ if (strlen($qs) > 53) {
+ $qs = substr($qs, 0, 53) . '...';
}
- if ( $qs ) {
+ if ($qs) {
$param .= ' ? ' . $qs;
}
$params[] = $param;
- }
- else {
+ } else {
$params[] = $param;
$params[] = 'Query String: ' . $qs;
}
- if ( ! empty( $_SERVER[ 'HTTP_REFERER' ] ) ) {
- $params[] = 'HTTP_REFERER: ' . $server[ 'HTTP_REFERER' ];
+ if (!empty($_SERVER['HTTP_REFERER'])) {
+ $params[] = 'HTTP_REFERER: ' . $server['HTTP_REFERER'];
}
- if ( defined( 'LSCWP_LOG_MORE' ) ) {
- $params[] = 'User Agent: ' . $server[ 'HTTP_USER_AGENT' ];
+ if (defined('LSCWP_LOG_MORE')) {
+ $params[] = 'User Agent: ' . $server['HTTP_USER_AGENT'];
$params[] = 'Accept: ' . $server['HTTP_ACCEPT'];
$params[] = 'Accept Encoding: ' . $server['HTTP_ACCEPT_ENCODING'];
}
- if ( $this->conf( Base::O_DEBUG_COOKIE ) ) {
+ if ($this->conf(Base::O_DEBUG_COOKIE)) {
$params[] = 'Cookie: ' . $server['HTTP_COOKIE'];
}
- if ( isset( $_COOKIE[ '_lscache_vary' ] ) ) {
- $params[] = 'Cookie _lscache_vary: ' . $_COOKIE[ '_lscache_vary' ];
+ if (isset($_COOKIE['_lscache_vary'])) {
+ $params[] = 'Cookie _lscache_vary: ' . $_COOKIE['_lscache_vary'];
}
- if ( defined( 'LSCWP_LOG_MORE' ) ) {
- $params[] = 'X-LSCACHE: ' . ( ! empty( $server[ 'X-LSCACHE' ] ) ? 'true' : 'false' );
+ if (defined('LSCWP_LOG_MORE')) {
+ $params[] = 'X-LSCACHE: ' . (!empty($server['X-LSCACHE']) ? 'true' : 'false');
}
- if( $server['LSCACHE_VARY_COOKIE'] ) {
+ if ($server['LSCACHE_VARY_COOKIE']) {
$params[] = 'LSCACHE_VARY_COOKIE: ' . $server['LSCACHE_VARY_COOKIE'];
}
- if( $server['LSCACHE_VARY_VALUE'] ) {
+ if ($server['LSCACHE_VARY_VALUE']) {
$params[] = 'LSCACHE_VARY_VALUE: ' . $server['LSCACHE_VARY_VALUE'];
}
- if( $server['ESI_CONTENT_TYPE'] ) {
+ if ($server['ESI_CONTENT_TYPE']) {
$params[] = 'ESI_CONTENT_TYPE: ' . $server['ESI_CONTENT_TYPE'];
}
- $request = array_map( __CLASS__ . '::format_message', $params );
+ $request = array_map(__CLASS__ . '::format_message', $params);
- File::append( $log_file, $request );
+ File::append($log_file, $request);
}
/**
@@ -289,32 +300,33 @@ private function _init_request( $log_file = null ) {
* @param string $msg The log message to write.
* @return string The formatted log message.
*/
- private static function format_message( $msg ) {
+ private static function format_message($msg)
+ {
// If call here without calling get_enabled() first, improve compatibility
- if ( ! defined( 'LSCWP_LOG_TAG' ) ) {
+ if (!defined('LSCWP_LOG_TAG')) {
return $msg . "\n";
}
- if ( ! isset( self::$_prefix ) ) {
+ if (!isset(self::$_prefix)) {
// address
- if ( PHP_SAPI == 'cli' ) {
+ if (PHP_SAPI == 'cli') {
$addr = '=CLI=';
- if ( isset( $_SERVER[ 'USER' ] ) ) {
- $addr .= $_SERVER[ 'USER' ];
- }
- elseif ( $_SERVER[ 'HTTP_X_FORWARDED_FOR' ] ) {
- $addr .= $_SERVER[ 'HTTP_X_FORWARDED_FOR' ];
+ if (isset($_SERVER['USER'])) {
+ $addr .= $_SERVER['USER'];
+ } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
+ $addr .= $_SERVER['HTTP_X_FORWARDED_FOR'];
}
- }
- else {
- $addr = $_SERVER[ 'REMOTE_ADDR' ] . ':' . $_SERVER[ 'REMOTE_PORT' ];
+ } else {
+ $addr = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
+ $port = isset($_SERVER['REMOTE_PORT']) ? $_SERVER['REMOTE_PORT'] : '';
+ $addr = "$addr:$port";
}
// Generate a unique string per request
- self::$_prefix = sprintf( " [%s %s %s] ", $addr, LSCWP_LOG_TAG, Str::rrand( 3 ) );
+ self::$_prefix = sprintf(' [%s %s %s] ', $addr, LSCWP_LOG_TAG, Str::rrand(3));
}
- list( $usec, $sec ) = explode(' ', microtime() );
- return date( 'm/d/y H:i:s', $sec + LITESPEED_TIME_OFFSET ) . substr( $usec, 1, 4 ) . self::$_prefix . $msg . "\n";
+ list($usec, $sec) = explode(' ', microtime());
+ return date('m/d/y H:i:s', $sec + LITESPEED_TIME_OFFSET) . substr($usec, 1, 4) . self::$_prefix . $msg . "\n";
}
/**
@@ -323,45 +335,46 @@ private static function format_message( $msg ) {
* @since 1.1.3
* @access public
*/
- public static function debug( $msg, $backtrace_limit = false ) {
- if ( ! defined( 'LSCWP_LOG' ) ) {
+ public static function debug($msg, $backtrace_limit = false)
+ {
+ if (!defined('LSCWP_LOG')) {
return;
}
- if ( defined( 'LSCWP_DEBUG_EXC_STRINGS' ) && Utility::str_hit_array( $msg, LSCWP_DEBUG_EXC_STRINGS ) ) {
+ if (defined('LSCWP_DEBUG_EXC_STRINGS') && Utility::str_hit_array($msg, LSCWP_DEBUG_EXC_STRINGS)) {
return;
}
- if ( $backtrace_limit !== false ) {
- if ( ! is_numeric( $backtrace_limit ) ) {
- $backtrace_limit = self::trim_longtext( $backtrace_limit );
- if ( is_array( $backtrace_limit ) && count( $backtrace_limit ) == 1 && ! empty( $backtrace_limit[ 0 ] ) ) {
- $msg .= ' --- ' . $backtrace_limit[ 0 ];
+ if ($backtrace_limit !== false) {
+ if (!is_numeric($backtrace_limit)) {
+ $backtrace_limit = self::trim_longtext($backtrace_limit);
+ if (is_array($backtrace_limit) && count($backtrace_limit) == 1 && !empty($backtrace_limit[0])) {
+ $msg .= ' --- ' . $backtrace_limit[0];
+ } else {
+ $msg .= ' --- ' . var_export($backtrace_limit, true);
}
- else {
- $msg .= ' --- ' . var_export( $backtrace_limit, true );
- }
- self::push( $msg );
+ self::push($msg);
return;
}
- self::push( $msg, $backtrace_limit + 1 );
+ self::push($msg, $backtrace_limit + 1);
return;
}
- self::push( $msg );
+ self::push($msg);
}
/**
* Trim long string before array dump
* @since 3.3
*/
- public static function trim_longtext( $backtrace_limit ) {
- if ( is_array( $backtrace_limit ) ) {
- $backtrace_limit = array_map( __CLASS__ . '::trim_longtext', $backtrace_limit );
+ public static function trim_longtext($backtrace_limit)
+ {
+ if (is_array($backtrace_limit)) {
+ $backtrace_limit = array_map(__CLASS__ . '::trim_longtext', $backtrace_limit);
}
- if ( is_string( $backtrace_limit ) && strlen( $backtrace_limit ) > 500 ) {
- $backtrace_limit = substr( $backtrace_limit, 0, 1000 ) . '...';
+ if (is_string($backtrace_limit) && strlen($backtrace_limit) > 500) {
+ $backtrace_limit = substr($backtrace_limit, 0, 1000) . '...';
}
return $backtrace_limit;
}
@@ -372,11 +385,12 @@ public static function trim_longtext( $backtrace_limit ) {
* @since 1.2.0
* @access public
*/
- public static function debug2( $msg, $backtrace_limit = false ) {
- if ( ! defined( 'LSCWP_LOG_MORE' ) ) {
+ public static function debug2($msg, $backtrace_limit = false)
+ {
+ if (!defined('LSCWP_LOG_MORE')) {
return;
}
- self::debug( $msg, $backtrace_limit );
+ self::debug($msg, $backtrace_limit);
}
/**
@@ -387,13 +401,14 @@ public static function debug2( $msg, $backtrace_limit = false ) {
* @param string $msg The debug message.
* @param int $backtrace_limit Backtrace depth.
*/
- private static function push( $msg, $backtrace_limit = false ) {
+ private static function push($msg, $backtrace_limit = false)
+ {
// backtrace handler
- if ( defined( 'LSCWP_LOG_MORE' ) && $backtrace_limit !== false ) {
- $msg .= self::_backtrace_info( $backtrace_limit );
+ if (defined('LSCWP_LOG_MORE') && $backtrace_limit !== false) {
+ $msg .= self::_backtrace_info($backtrace_limit);
}
- File::append( self::$log_path, self::format_message( $msg ) );
+ File::append(self::$log_path, self::format_message($msg));
}
/**
@@ -401,40 +416,41 @@ private static function push( $msg, $backtrace_limit = false ) {
*
* @since 2.7
*/
- private static function _backtrace_info( $backtrace_limit ) {
+ private static function _backtrace_info($backtrace_limit)
+ {
$msg = '';
- $trace = version_compare( PHP_VERSION, '5.4.0', '<' ) ? debug_backtrace() : debug_backtrace( false, $backtrace_limit + 3 );
- for ( $i=2; $i <= $backtrace_limit + 2; $i++ ) {// 0st => _backtrace_info(), 1st => push()
- if ( empty( $trace[ $i ][ 'class' ] ) ) {
- if ( empty( $trace[ $i ][ 'file' ] ) ) {
+ $trace = version_compare(PHP_VERSION, '5.4.0', '<') ? debug_backtrace() : debug_backtrace(false, $backtrace_limit + 3);
+ for ($i = 2; $i <= $backtrace_limit + 2; $i++) {
+ // 0st => _backtrace_info(), 1st => push()
+ if (empty($trace[$i]['class'])) {
+ if (empty($trace[$i]['file'])) {
break;
}
- $log = "\n" . $trace[ $i ][ 'file' ];
- }
- else {
- if ( $trace[$i]['class'] == __CLASS__ ) {
+ $log = "\n" . $trace[$i]['file'];
+ } else {
+ if ($trace[$i]['class'] == __CLASS__) {
continue;
}
$args = '';
- if ( ! empty( $trace[ $i ][ 'args' ] ) ) {
- foreach ( $trace[ $i ][ 'args' ] as $v ) {
- if ( is_array( $v ) ) {
+ if (!empty($trace[$i]['args'])) {
+ foreach ($trace[$i]['args'] as $v) {
+ if (is_array($v)) {
$v = 'ARRAY';
}
- if ( is_string( $v ) || is_numeric( $v ) ) {
+ if (is_string($v) || is_numeric($v)) {
$args .= $v . ',';
}
}
- $args = substr( $args, 0, strlen( $args ) > 100 ? 100 : -1 );
+ $args = substr($args, 0, strlen($args) > 100 ? 100 : -1);
}
$log = str_replace('Core', 'LSC', $trace[$i]['class']) . $trace[$i]['type'] . $trace[$i]['function'] . '(' . $args . ')';
}
- if ( ! empty( $trace[$i-1]['line'] ) ) {
- $log .= '@' . $trace[$i-1]['line'];
+ if (!empty($trace[$i - 1]['line'])) {
+ $log .= '@' . $trace[$i - 1]['line'];
}
$msg .= " => $log";
}
@@ -448,10 +464,11 @@ private static function _backtrace_info( $backtrace_limit ) {
* @since 1.6.6
* @access private
*/
- private function _clear_log() {
- $logs = array( 'debug', 'debug.purge', 'crawler' );
- foreach ( $logs as $log ) {
- File::save( self::$log_path_prefix . "/{$log}.log", '' );
+ private function _clear_log()
+ {
+ $logs = array('debug', 'debug.purge', 'crawler');
+ foreach ($logs as $log) {
+ File::save(self::$log_path_prefix . "/{$log}.log", '');
}
}
@@ -461,15 +478,16 @@ private function _clear_log() {
* @since 1.6.6
* @access public
*/
- public function handler() {
+ public function handler()
+ {
$type = Router::verify_type();
- switch ( $type ) {
- case self::TYPE_CLEAR_LOG :
+ switch ($type) {
+ case self::TYPE_CLEAR_LOG:
$this->_clear_log();
break;
- case self::TYPE_BETA_TEST :
+ case self::TYPE_BETA_TEST:
$this->beta_test();
break;
diff --git a/src/doc.cls.php b/src/doc.cls.php
index 6bcc4d316..28d61ab38 100644
--- a/src/doc.cls.php
+++ b/src/doc.cls.php
@@ -1,4 +1,5 @@
*/
+
namespace LiteSpeed;
-defined( 'WPINC' ) || exit;
+defined('WPINC') || exit();
-class Doc {
+class Doc
+{
// protected static $_instance;
+ /**
+ * Show option is actually ON by GM
+ *
+ * @since 5.5
+ * @access public
+ */
+ public static function maybe_on_by_gm($id)
+ {
+ if (apply_filters('litespeed_conf', $id)) {
+ return;
+ }
+ if (!apply_filters('litespeed_conf', Base::O_GUEST)) {
+ return;
+ }
+ if (!apply_filters('litespeed_conf', Base::O_GUEST_OPTM)) {
+ return;
+ }
+ echo '';
+ echo '⚠️ ' .
+ sprintf(
+ __('This setting is %1$s for certain qualifying requests due to %2$s!', 'litespeed-cache'),
+ '' . __('ON', 'litespeed-cache') . '
',
+ Lang::title(Base::O_GUEST_OPTM)
+ );
+ self::learn_more('https://docs.litespeedtech.com/lscache/lscwp/general/#guest-optimization');
+ echo '';
+ }
+
/**
* Changes affect crawler list warning
*
* @since 4.3
* @access public
*/
- public static function crawler_affected() {
+ public static function crawler_affected()
+ {
echo '';
- echo '⚠️ ' . __( 'This setting will regenerate crawler list and clear the disabled list!' , 'litespeed-cache' );
+ echo '⚠️ ' . __('This setting will regenerate crawler list and clear the disabled list!', 'litespeed-cache');
echo '';
}
@@ -32,32 +64,39 @@ public static function crawler_affected() {
* @since 2.2.7
* @access public
*/
- public static function privacy_policy() {
- return __( 'This site utilizes caching in order to facilitate a faster response time and better user experience. Caching potentially stores a duplicate copy of every web page that is on display on this site. All cache files are temporary, and are never accessed by any third party, except as necessary to obtain technical support from the cache plugin vendor. Cache files expire on a schedule set by the site administrator, but may easily be purged by the admin before their natural expiration, if necessary. We may use QUIC.cloud services to process & cache your data temporarily.', 'litespeed-cache' )
- . sprintf( __( 'Please see %s for more details.', 'litespeed-cache' ), 'https://quic.cloud/privacy-policy/' );
+ public static function privacy_policy()
+ {
+ return __(
+ 'This site utilizes caching in order to facilitate a faster response time and better user experience. Caching potentially stores a duplicate copy of every web page that is on display on this site. All cache files are temporary, and are never accessed by any third party, except as necessary to obtain technical support from the cache plugin vendor. Cache files expire on a schedule set by the site administrator, but may easily be purged by the admin before their natural expiration, if necessary. We may use QUIC.cloud services to process & cache your data temporarily.',
+ 'litespeed-cache'
+ ) .
+ sprintf(
+ __('Please see %s for more details.', 'litespeed-cache'),
+ 'https://quic.cloud/privacy-policy/'
+ );
}
-
/**
* Learn more link
*
* @since 2.4.2
* @access public
*/
- public static function learn_more( $url, $title = false, $self = false, $class = false, $return = false ) {
- if ( ! $class ) {
+ public static function learn_more($url, $title = false, $self = false, $class = false, $return = false)
+ {
+ if (!$class) {
$class = 'litespeed-learn-more';
}
- if ( ! $title ) {
- $title = __( 'Learn More', 'litespeed-cache' );
+ if (!$title) {
+ $title = __('Learn More', 'litespeed-cache');
}
$self = $self ? '' : "target='_blank'";
$txt = " $title";
- if ( $return ) {
+ if ($return) {
return $txt;
}
@@ -70,9 +109,10 @@ public static function learn_more( $url, $title = false, $self = false, $class =
* @since 3.0
* @access public
*/
- public static function one_per_line( $return = false ) {
- $str = __( 'One per line.', 'litespeed-cache' );
- if ( $return ) {
+ public static function one_per_line($return = false)
+ {
+ $str = __('One per line.', 'litespeed-cache');
+ if ($return) {
return $str;
}
echo $str;
@@ -84,12 +124,12 @@ public static function one_per_line( $return = false ) {
* @since 3.4
* @access public
*/
- public static function full_or_partial_url( $string_only = false ) {
- if ( $string_only ) {
- echo __( 'Both full and partial strings can be used.', 'litespeed-cache' );
- }
- else {
- echo __( 'Both full URLs and partial strings can be used.', 'litespeed-cache' );
+ public static function full_or_partial_url($string_only = false)
+ {
+ if ($string_only) {
+ echo __('Both full and partial strings can be used.', 'litespeed-cache');
+ } else {
+ echo __('Both full URLs and partial strings can be used.', 'litespeed-cache');
}
}
@@ -99,10 +139,13 @@ public static function full_or_partial_url( $string_only = false ) {
* @since 3.0
* @access public
*/
- public static function notice_htaccess() {
+ public static function notice_htaccess()
+ {
echo '';
- echo '⚠️ ' . __( 'This setting will edit the .htaccess file.', 'litespeed-cache' );
- echo ' ' . __( 'Learn More', 'litespeed-cache' ) . '';
+ echo '⚠️ ' . __('This setting will edit the .htaccess file.', 'litespeed-cache');
+ echo ' ' .
+ __('Learn More', 'litespeed-cache') .
+ '';
echo '';
}
@@ -112,12 +155,31 @@ public static function notice_htaccess() {
* @since 3.0
* @access public
*/
- public static function notice_ips() {
+ public static function notice_ips()
+ {
echo '' . substr( $code, strlen( 'unfinished_queue ' ) ) . '
' );
+ case strpos($code, 'unfinished_queue ') === 0:
+ $msg = sprintf(
+ __('There is proceeding queue not pulled yet. Queue info: %s.', 'litespeed-cache'),
+ '' . substr($code, strlen('unfinished_queue ')) . '
'
+ );
break;
case 'err_alias':
- $msg = __( 'The site is not a valid alias on QUIC.cloud.', 'litespeed-cache' );
+ $msg = __('The site is not a valid alias on QUIC.cloud.', 'litespeed-cache');
break;
case 'site_not_registered':
- $msg = __( 'The site is not registered on QUIC.cloud.', 'litespeed-cache' );
+ $msg = __('The site is not registered on QUIC.cloud.', 'litespeed-cache');
break;
case 'err_key':
- $msg = __( 'The domain key is not correct. Please try to sync your domain key again.', 'litespeed-cache' );
+ $msg = __('The domain key is not correct. Please try to sync your domain key again.', 'litespeed-cache');
break;
case 'heavy_load':
- $msg = __( 'The current server is under heavy load.', 'litespeed-cache' );
+ $msg = __('The current server is under heavy load.', 'litespeed-cache');
break;
case 'redetect_node':
- $msg = __( 'Online node needs to be redetected.', 'litespeed-cache' );
+ $msg = __('Online node needs to be redetected.', 'litespeed-cache');
break;
case 'err_overdraw':
- $msg = __( 'Credits are not enough to proceed the current request.', 'litespeed-cache' );
+ $msg = __('Credits are not enough to proceed the current request.', 'litespeed-cache');
break;
case 'W':
- $msg = __( '%s file not writable.', 'litespeed-cache' );
+ $msg = __('%s file not writable.', 'litespeed-cache');
break;
case 'HTA_DNF':
- if ( ! is_array( $args ) ) {
- $args = array( '' . $args . '
' );
+ if (!is_array($args)) {
+ $args = array('' . $args . '
');
}
$args[] = '.htaccess';
- $msg = __( 'Could not find %1$s in %2$s.', 'litespeed-cache' );
+ $msg = __('Could not find %1$s in %2$s.', 'litespeed-cache');
break;
case 'HTA_LOGIN_COOKIE_INVALID':
- $msg = sprintf( __( 'Invalid login cookie. Please check the %s file.', 'litespeed-cache' ), '.htaccess' );
+ $msg = sprintf(__('Invalid login cookie. Please check the %s file.', 'litespeed-cache'), '.htaccess');
break;
case 'HTA_BK':
- $msg = sprintf( __( 'Failed to back up %s file, aborted changes.', 'litespeed-cache' ), '.htaccess' );
+ $msg = sprintf(__('Failed to back up %s file, aborted changes.', 'litespeed-cache'), '.htaccess');
break;
case 'HTA_R':
- $msg = sprintf( __( '%s file not readable.', 'litespeed-cache' ), '.htaccess' );
+ $msg = sprintf(__('%s file not readable.', 'litespeed-cache'), '.htaccess');
break;
case 'HTA_W':
- $msg = sprintf( __( '%s file not writable.', 'litespeed-cache' ), '.htaccess' );
+ $msg = sprintf(__('%s file not writable.', 'litespeed-cache'), '.htaccess');
break;
case 'HTA_GET':
- $msg = sprintf( __( 'Failed to get %s file contents.', 'litespeed-cache' ), '.htaccess' );
+ $msg = sprintf(__('Failed to get %s file contents.', 'litespeed-cache'), '.htaccess');
break;
case 'failed_tb_creation':
- $msg = __( 'Failed to create table %s! SQL: %s.', 'litespeed-cache' );
+ $msg = __('Failed to create table %s! SQL: %s.', 'litespeed-cache');
break;
case 'crawler_disabled':
- $msg = __( 'Crawler disabled by the server admin.', 'litespeed-cache' );
+ $msg = __('Crawler disabled by the server admin.', 'litespeed-cache');
break;
/*** QC error code ***/
case 'try_later':
- $msg = __( 'Previous request too recent. Please try again later.', 'litespeed-cache' );
+ $msg = __('Previous request too recent. Please try again later.', 'litespeed-cache');
break;
- case strpos( $code, 'try_later ' ) === 0:
- $msg = sprintf( __( 'Previous request too recent. Please try again after %s.', 'litespeed-cache' ), '' . Utility::readable_time( substr( $code, strlen( 'try_later ' ) ), 3600, true ) . '
' );
+ case strpos($code, 'try_later ') === 0:
+ $msg = sprintf(
+ __('Previous request too recent. Please try again after %s.', 'litespeed-cache'),
+ '' . Utility::readable_time(substr($code, strlen('try_later ')), 3600, true) . '
'
+ );
break;
case 'waiting_for_approval':
- $msg = __( 'Your application is waiting for approval.', 'litespeed-cache' );
+ $msg = __('Your application is waiting for approval.', 'litespeed-cache');
break;
case 'callback_fail_hash':
- $msg = __( 'The callback validation to your domain failed due to hash mismatch.', 'litespeed-cache' );
+ $msg = __('The callback validation to your domain failed due to hash mismatch.', 'litespeed-cache');
break;
case 'callback_fail':
- $msg = __( 'The callback validation to your domain failed. Please make sure there is no firewall blocking our servers.', 'litespeed-cache' );
+ $msg = __('The callback validation to your domain failed. Please make sure there is no firewall blocking our servers.', 'litespeed-cache');
break;
- case substr( $code, 0, 14 ) === 'callback_fail ':
- $msg = __( 'The callback validation to your domain failed. Please make sure there is no firewall blocking our servers. Response code: ', 'litespeed-cache' ) . substr( $code, 14 );
+ case substr($code, 0, 14) === 'callback_fail ':
+ $msg =
+ __('The callback validation to your domain failed. Please make sure there is no firewall blocking our servers. Response code: ', 'litespeed-cache') .
+ substr($code, 14);
break;
case 'forbidden':
- $msg = __( 'Your domain has been forbidden from using our services due to a previous policy violation.', 'litespeed-cache' );
+ $msg = __('Your domain has been forbidden from using our services due to a previous policy violation.', 'litespeed-cache');
break;
case 'err_dns_active':
- $msg = __( 'You cannot remove this DNS zone, because it is still in use. Please update the domain\'s nameservers, then try to delete this zone again, otherwise your site will become inaccessible.', 'litespeed-cache' );
+ $msg = __(
+ 'You cannot remove this DNS zone, because it is still in use. Please update the domain\'s nameservers, then try to delete this zone again, otherwise your site will become inaccessible.',
+ 'litespeed-cache'
+ );
break;
default:
- $msg = __( 'Unknown error', 'litespeed-cache' ) . ': ' . $code;
+ $msg = __('Unknown error', 'litespeed-cache') . ': ' . $code;
break;
}
- if ( $args !== null ) {
- $msg = is_array( $args ) ? vsprintf( $msg, $args ) : sprintf( $msg, $args );
+ if ($args !== null) {
+ $msg = is_array($args) ? vsprintf($msg, $args) : sprintf($msg, $args);
}
- if ( isset( self::$CODE_SET[ $code ] ) ) {
- $msg = 'ERROR ' . self::$CODE_SET[ $code ] . ': ' . $msg;
+ if (isset(self::$CODE_SET[$code])) {
+ $msg = 'ERROR ' . self::$CODE_SET[$code] . ': ' . $msg;
}
return $msg;
}
-}
\ No newline at end of file
+}
diff --git a/src/esi.cls.php b/src/esi.cls.php
index 42fbc7718..25e724acb 100644
--- a/src/esi.cls.php
+++ b/src/esi.cls.php
@@ -1,4 +1,5 @@
*/
+
namespace LiteSpeed;
-defined( 'WPINC' ) || exit;
+defined('WPINC') || exit();
+
+class ESI extends Root
+{
+ const LOG_TAG = '⏺';
-class ESI extends Root {
private static $has_esi = false;
private static $_combine_ids = array();
private $esi_args = null;
private $_esi_preserve_list = array();
- private $_nonce_actions = array( -1 => '' ); // val is cache control
+ private $_nonce_actions = array(-1 => ''); // val is cache control
const QS_ACTION = 'lsesi';
const QS_PARAMS = 'esi';
@@ -38,21 +43,22 @@ class ESI extends Root {
* @since 1.2.0
* @since 4.0 Change to be after Vary init in hook 'after_setup_theme'
*/
- public function init() {
+ public function init()
+ {
/**
* Bypass ESI related funcs if disabled ESI to fix potential DIVI compatibility issue
* @since 2.9.7.2
*/
- if ( Router::is_ajax() || ! $this->cls( 'Router' )->esi_enabled() ) {
+ if (Router::is_ajax() || !$this->cls('Router')->esi_enabled()) {
return;
}
// Guest mode, don't need to use ESI
- if ( defined( 'LITESPEED_GUEST' ) && LITESPEED_GUEST ) {
+ if (defined('LITESPEED_GUEST') && LITESPEED_GUEST) {
return;
}
- if ( defined( 'LITESPEED_ESI_OFF' ) ) {
+ if (defined('LITESPEED_ESI_OFF')) {
return;
}
@@ -65,7 +71,7 @@ public function init() {
*/
$this->_transform_nonce();
- ! defined( 'LITESPEED_ESI_INITED' ) && define( 'LITESPEED_ESI_INITED', true );
+ !defined('LITESPEED_ESI_INITED') && define('LITESPEED_ESI_INITED', true);
}
/**
@@ -77,17 +83,19 @@ public function init() {
* @since 4.0 Changed to private from public
* @access private
*/
- private function _hooks() {
- add_filter( 'template_include', array( $this, 'esi_template' ), 99999 );
+ private function _hooks()
+ {
+ add_filter('template_include', array($this, 'esi_template'), 99999);
- add_action( 'load-widgets.php', __NAMESPACE__ . '\Purge::purge_widget' );
- add_action( 'wp_update_comment_count', __NAMESPACE__ . '\Purge::purge_comment_widget' );
+ add_action('load-widgets.php', __NAMESPACE__ . '\Purge::purge_widget');
+ add_action('wp_update_comment_count', __NAMESPACE__ . '\Purge::purge_comment_widget');
/**
* Recover REQUEST_URI
* @since 1.8.1
*/
- if ( ! empty( $_GET[ self::QS_ACTION ] ) ) {
+ if (!empty($_GET[self::QS_ACTION])) {
+ self::debug('ESI req');
$this->_register_esi_actions();
}
@@ -105,10 +113,9 @@ private function _hooks() {
* @since 2.8
* @since 2.8.1 Check is_admin for Elementor compatibility #726013
*/
- if ( ! is_admin() ) {
- add_shortcode( 'esi', array( $this, 'shortcode' ) );
+ if (!is_admin()) {
+ add_shortcode('esi', array($this, 'shortcode'));
}
-
}
/**
@@ -116,21 +123,22 @@ private function _hooks() {
*
* @since 2.9.5
*/
- private function _transform_nonce() {
- if ( is_admin() ) {
+ private function _transform_nonce()
+ {
+ if (is_admin()) {
return;
}
// Load ESI nonces in conf
- $nonces = $this->conf( Base::O_ESI_NONCE );
- add_filter( 'litespeed_esi_nonces', array( $this->cls( 'Data' ), 'load_esi_nonces' ) );
- if ( $nonces = apply_filters( 'litespeed_esi_nonces', $nonces ) ) {
- foreach ( $nonces as $action ) {
- $this->nonce_action( $action );
+ $nonces = $this->conf(Base::O_ESI_NONCE);
+ add_filter('litespeed_esi_nonces', array($this->cls('Data'), 'load_esi_nonces'));
+ if ($nonces = apply_filters('litespeed_esi_nonces', $nonces)) {
+ foreach ($nonces as $action) {
+ $this->nonce_action($action);
}
}
- add_action( 'litespeed_nonce', array( $this, 'nonce_action' ) );
+ add_action('litespeed_nonce', array($this, 'nonce_action'));
}
/**
@@ -138,22 +146,23 @@ private function _transform_nonce() {
*
* @since 2.9.5
*/
- public function nonce_action( $action ) {
+ public function nonce_action($action)
+ {
// Split the Cache Control
- $action = explode( ' ', $action );
- $control = ! empty( $action[ 1 ] ) ? $action[ 1 ] : '';
- $action = $action[ 0 ];
+ $action = explode(' ', $action);
+ $control = !empty($action[1]) ? $action[1] : '';
+ $action = $action[0];
// Wildcard supported
- $action = Utility::wildcard2regex( $action );
+ $action = Utility::wildcard2regex($action);
- if ( array_key_exists( $action, $this->_nonce_actions ) ) {
+ if (array_key_exists($action, $this->_nonce_actions)) {
return;
}
- $this->_nonce_actions[ $action ] = $control;
+ $this->_nonce_actions[$action] = $control;
- Debug2::debug( '[ESI] Appended nonce action to nonce list [action] ' . $action );
+ Debug2::debug('[ESI] Appended nonce action to nonce list [action] ' . $action);
}
/**
@@ -161,28 +170,28 @@ public function nonce_action( $action ) {
*
* @since 2.9.5
*/
- public function is_nonce_action( $action ) {
+ public function is_nonce_action($action)
+ {
// If GM not run yet, then ESI not init yet, then ESI nonce will not be allowed even nonce func replaced.
- if ( ! defined( 'LITESPEED_ESI_INITED' ) ) {
+ if (!defined('LITESPEED_ESI_INITED')) {
return null;
}
- if ( is_admin() ) {
+ if (is_admin()) {
return null;
}
- if ( defined( 'LITESPEED_ESI_OFF' ) ) {
+ if (defined('LITESPEED_ESI_OFF')) {
return null;
}
- foreach ( $this->_nonce_actions as $k => $v ) {
- if ( strpos( $k, '*' ) !== false ) {
- if( preg_match( '#' . $k . '#iU', $action ) ) {
+ foreach ($this->_nonce_actions as $k => $v) {
+ if (strpos($k, '*') !== false) {
+ if (preg_match('#' . $k . '#iU', $action)) {
return $v;
}
- }
- else {
- if ( $k == $action ) {
+ } else {
+ if ($k == $action) {
return $v;
}
}
@@ -197,27 +206,28 @@ public function is_nonce_action( $action ) {
* @since 2.8
* @access public
*/
- public function shortcode( $atts ) {
- if ( empty( $atts[ 0 ] ) ) {
- Debug2::debug( '[ESI] ===shortcode wrong format', $atts );
+ public function shortcode($atts)
+ {
+ if (empty($atts[0])) {
+ Debug2::debug('[ESI] ===shortcode wrong format', $atts);
return 'Wrong shortcode esi format';
}
$cache = 'public,no-vary';
- if ( ! empty( $atts[ 'cache' ] ) ) {
- $cache = $atts[ 'cache' ];
- unset( $atts[ 'cache' ] );
+ if (!empty($atts['cache'])) {
+ $cache = $atts['cache'];
+ unset($atts['cache']);
}
$silence = false;
- if ( ! empty( $atts[ '_ls_silence' ] ) ) {
+ if (!empty($atts['_ls_silence'])) {
$silence = true;
}
- do_action( 'litespeed_esi_shortcode-' . $atts[ 0 ] );
+ do_action('litespeed_esi_shortcode-' . $atts[0]);
// Show ESI link
- return $this->sub_esi_block( 'esi', 'esi-shortcode', $atts, $cache, $silence );
+ return $this->sub_esi_block('esi', 'esi-shortcode', $atts, $cache, $silence);
}
/**
@@ -228,7 +238,8 @@ public function shortcode( $atts ) {
* @access public
* @return string Esi On header if request has esi, empty string otherwise.
*/
- public static function has_esi() {
+ public static function has_esi()
+ {
return self::$has_esi;
}
@@ -238,7 +249,8 @@ public static function has_esi() {
* @since 1.1.3
* @access public
*/
- public static function set_has_esi() {
+ public static function set_has_esi()
+ {
self::$has_esi = true;
}
@@ -249,21 +261,39 @@ public static function set_has_esi() {
* @since 1.1.3
* @access private
*/
- private function _register_esi_actions() {
- ! defined( 'LSCACHE_IS_ESI' ) && define( 'LSCACHE_IS_ESI', $_GET[ self::QS_ACTION ] );// Reused this to ESI block ID
+ private function _register_esi_actions()
+ {
+ /**
+ * This hook is in `init`
+ * For any plugin need to check if page is ESI, use `LSCACHE_IS_ESI` check after `init` hook
+ */
+ !defined('LSCACHE_IS_ESI') && define('LSCACHE_IS_ESI', $_GET[self::QS_ACTION]); // Reused this to ESI block ID
- ! empty( $_SERVER[ 'ESI_REFERER' ] ) && defined( 'LSCWP_LOG' ) && Debug2::debug( '[ESI] ESI_REFERER: ' . $_SERVER[ 'ESI_REFERER' ] );
+ !empty($_SERVER['ESI_REFERER']) && defined('LSCWP_LOG') && Debug2::debug('[ESI] ESI_REFERER: ' . $_SERVER['ESI_REFERER']);
/**
* Only when ESI's parent is not REST, replace REQUEST_URI to avoid breaking WP5 editor REST call
* @since 2.9.3
*/
- if ( ! empty( $_SERVER[ 'ESI_REFERER' ] ) && ! $this->cls( 'REST' )->is_rest( $_SERVER[ 'ESI_REFERER' ] ) ) {
- $_SERVER[ 'REQUEST_URI' ] = $_SERVER[ 'ESI_REFERER' ];
+ if (!empty($_SERVER['ESI_REFERER']) && !$this->cls('REST')->is_rest($_SERVER['ESI_REFERER'])) {
+ self::debug('overwrite REQUEST_URI to ESI_REFERER [from] ' . $_SERVER['REQUEST_URI'] . ' [to] ' . $_SERVER['ESI_REFERER']);
+ if (!empty($_SERVER['ESI_REFERER'])) {
+ $_SERVER['REQUEST_URI'] =
+ substr(get_option('permalink_structure'), -1) === '/' && strpos($_SERVER['ESI_REFERER'], '?') === false
+ ? trailingslashit($_SERVER['ESI_REFERER'])
+ : $_SERVER['ESI_REFERER'];
+ }
+ # Prevent from 301 redirecting
+ if (!empty($_SERVER['SCRIPT_URI'])) {
+ $SCRIPT_URI = parse_url($_SERVER['SCRIPT_URI']);
+ $SCRIPT_URI['path'] = $_SERVER['REQUEST_URI'];
+ Utility::compatibility();
+ $_SERVER['SCRIPT_URI'] = http_build_url($SCRIPT_URI);
+ }
}
- if ( ! empty( $_SERVER[ 'ESI_CONTENT_TYPE' ] ) && strpos( $_SERVER[ 'ESI_CONTENT_TYPE' ], 'application/json' ) === 0 ) {
- add_filter( 'litespeed_is_json', '__return_true' );
+ if (!empty($_SERVER['ESI_CONTENT_TYPE']) && strpos($_SERVER['ESI_CONTENT_TYPE'], 'application/json') === 0) {
+ add_filter('litespeed_is_json', '__return_true');
}
/**
@@ -271,17 +301,17 @@ private function _register_esi_actions() {
* NOTE: Not effective due to ESI req are all to `/` yet
* @since 2.9.4
*/
- add_action( 'rest_api_init', array( $this, 'load_esi_block' ), 101 );
+ add_action('rest_api_init', array($this, 'load_esi_block'), 101);
// Register ESI blocks
add_action('litespeed_esi_load-widget', array($this, 'load_widget_block'));
add_action('litespeed_esi_load-admin-bar', array($this, 'load_admin_bar_block'));
add_action('litespeed_esi_load-comment-form', array($this, 'load_comment_form_block'));
- add_action('litespeed_esi_load-nonce', array( $this, 'load_nonce_block' ) );
- add_action('litespeed_esi_load-esi', array( $this, 'load_esi_shortcode' ) );
+ add_action('litespeed_esi_load-nonce', array($this, 'load_nonce_block'));
+ add_action('litespeed_esi_load-esi', array($this, 'load_esi_shortcode'));
- add_action('litespeed_esi_load-' . self::COMBO, array( $this, 'load_combo' ) );
+ add_action('litespeed_esi_load-' . self::COMBO, array($this, 'load_combo'));
}
/**
@@ -293,13 +323,15 @@ private function _register_esi_actions() {
* @param string $template The template path filtered.
* @return string The new template path.
*/
- public function esi_template( $template ) {
+ public function esi_template($template)
+ {
// Check if is an ESI request
- if ( defined( 'LSCACHE_IS_ESI' ) ) {
- Debug2::debug( '[ESI] calling template' );
+ if (defined('LSCACHE_IS_ESI')) {
+ self::debug('calling ESI template');
return LSCWP_DIR . 'tpl/esi.tpl.php';
}
+ self::debug('calling default template');
$this->_register_not_esi_actions();
return $template;
}
@@ -311,30 +343,30 @@ public function esi_template( $template ) {
* @since 1.1.3
* @access private
*/
- private function _register_not_esi_actions() {
- do_action( 'litespeed_tpl_normal' );
+ private function _register_not_esi_actions()
+ {
+ do_action('litespeed_tpl_normal');
- if ( ! Control::is_cacheable() ) {
+ if (!Control::is_cacheable()) {
return;
}
- if ( Router::is_ajax() ) {
+ if (Router::is_ajax()) {
return;
}
- add_filter('widget_display_callback', array( $this, 'sub_widget_block' ), 0, 3);
+ add_filter('widget_display_callback', array($this, 'sub_widget_block'), 0, 3);
// Add admin_bar esi
- if ( Router::is_logged_in() ) {
+ if (Router::is_logged_in()) {
remove_action('wp_footer', 'wp_admin_bar_render', 1000);
add_action('wp_footer', array($this, 'sub_admin_bar_block'), 1000);
}
// Add comment forum esi for logged-in user or commenter
- if ( ! Router::is_ajax() && Vary::has_vary() ) {
- add_filter( 'comment_form_defaults', array( $this, 'register_comment_form_actions' ) );
+ if (!Router::is_ajax() && Vary::has_vary()) {
+ add_filter('comment_form_defaults', array($this, 'register_comment_form_actions'));
}
-
}
/**
@@ -342,12 +374,13 @@ private function _register_not_esi_actions() {
*
* @since 3.4.2
*/
- public static function combine( $block_id ) {
- if ( ! isset( $_SERVER[ 'X-LSCACHE' ] ) || strpos( $_SERVER[ 'X-LSCACHE' ], 'combine' ) === false ) {
+ public static function combine($block_id)
+ {
+ if (!isset($_SERVER['X-LSCACHE']) || strpos($_SERVER['X-LSCACHE'], 'combine') === false) {
return;
}
- if ( in_array( $block_id, self::$_combine_ids ) ) {
+ if (in_array($block_id, self::$_combine_ids)) {
return;
}
@@ -359,29 +392,30 @@ public static function combine( $block_id ) {
*
* @since 3.4.2
*/
- public function load_combo() {
- Control::set_nocache( 'ESI combine request' );
+ public function load_combo()
+ {
+ Control::set_nocache('ESI combine request');
- if ( empty( $_POST[ 'esi_include' ] ) ) {
+ if (empty($_POST['esi_include'])) {
return;
}
self::set_has_esi();
- Debug2::debug( '[ESI] 🍔 Load combo', $_POST[ 'esi_include' ] );
+ Debug2::debug('[ESI] 🍔 Load combo', $_POST['esi_include']);
$output = '';
- foreach ( $_POST[ 'esi_include' ] as $url ) {
- $qs = parse_url( htmlspecialchars_decode( $url ), PHP_URL_QUERY );
- parse_str( $qs, $qs );
- if ( empty( $qs[ self::QS_ACTION ] ) ) {
+ foreach ($_POST['esi_include'] as $url) {
+ $qs = parse_url(htmlspecialchars_decode($url), PHP_URL_QUERY);
+ parse_str($qs, $qs);
+ if (empty($qs[self::QS_ACTION])) {
continue;
}
- $esi_id = $qs[ self::QS_ACTION ];
- $esi_param = ! empty( $qs[ self::QS_PARAMS ] ) ? $this->_parse_esi_param( $qs[ self::QS_PARAMS ] ) : false;
- $inline_param = apply_filters( 'litespeed_esi_inline-' . $esi_id, array(), $esi_param ); // Returned array need to be [ val, control, tag ]
- if ( $inline_param ) {
- $output .= self::_build_inline( $url, $inline_param );
+ $esi_id = $qs[self::QS_ACTION];
+ $esi_param = !empty($qs[self::QS_PARAMS]) ? $this->_parse_esi_param($qs[self::QS_PARAMS]) : false;
+ $inline_param = apply_filters('litespeed_esi_inline-' . $esi_id, array(), $esi_param); // Returned array need to be [ val, control, tag ]
+ if ($inline_param) {
+ $output .= self::_build_inline($url, $inline_param);
}
}
@@ -393,12 +427,17 @@ public function load_combo() {
*
* @since 3.4.2
*/
- private static function _build_inline( $url, $inline_param ) {
- if ( ! $url || empty( $inline_param[ 'val' ] ) || empty( $inline_param[ 'control' ] ) || empty( $inline_param[ 'tag' ] ) ) {
+ private static function _build_inline($url, $inline_param)
+ {
+ if (!$url || empty($inline_param['val']) || empty($inline_param['control']) || empty($inline_param['tag'])) {
return '';
}
- return "