Plugin Directory

Changeset 2954001


Ignore:
Timestamp:
08/15/2023 06:49:53 PM (2 years ago)
Author:
LiteSpeedTech
Message:

Release v5.6

Location:
litespeed-cache
Files:
330 added
14 edited

Legend:

Unmodified
Added
Removed
  • litespeed-cache/trunk/assets/css/litespeed.css

    r2928795 r2954001  
    18751875}
    18761876
    1877 @media screen and (max-width: 1023px) and (min-width: 681px) {}
    1878 
    18791877@media screen and (max-width: 680px) {
    18801878
     
    29362934}
    29372935
    2938 span[data-balloon-pos] {
     2936.litespeed-wrap span[data-balloon-pos] {
    29392937    border-bottom: 1px dashed;
    29402938}
    29412939
    2942 span[aria-label][data-balloon-pos] {
     2940.litespeed-wrap span[aria-label][data-balloon-pos] {
    29432941    cursor: default;
    29442942}
     
    35563554======================================= */
    35573555
    3558 :root {
     3556.litespeed-wrap {
    35593557    --balloon-color: rgba(16, 16, 16, 0.95);
    35603558    --balloon-font-size: 12px;
     
    35623560}
    35633561
    3564 button[aria-label][data-balloon-pos] {
     3562.litespeed-wrap button[aria-label][data-balloon-pos] {
    35653563    overflow: visible;
    35663564}
    35673565
    3568 [aria-label][data-balloon-pos] {
     3566.litespeed-wrap [aria-label][data-balloon-pos] {
    35693567    position: relative;
    35703568    cursor: pointer;
    35713569}
    35723570
    3573 [aria-label][data-balloon-pos]:after {
     3571.litespeed-wrap [aria-label][data-balloon-pos]:after {
    35743572    opacity: 0;
    35753573    pointer-events: none;
     
    35923590}
    35933591
    3594 [aria-label][data-balloon-pos]:before {
     3592.litespeed-wrap [aria-label][data-balloon-pos]:before {
    35953593    width: 0;
    35963594    height: 0;
     
    36053603}
    36063604
    3607 [aria-label][data-balloon-pos]:hover:before,
    3608 [aria-label][data-balloon-pos]:hover:after,
    3609 [aria-label][data-balloon-pos][data-balloon-visible]:before,
    3610 [aria-label][data-balloon-pos][data-balloon-visible]:after,
    3611 [aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:before,
    3612 [aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:after {
     3605.litespeed-wrap [aria-label][data-balloon-pos]:hover:before,
     3606.litespeed-wrap [aria-label][data-balloon-pos]:hover:after,
     3607.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-visible]:before,
     3608.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-visible]:after,
     3609.litespeed-wrap [aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:before,
     3610.litespeed-wrap [aria-label][data-balloon-pos]:not([data-balloon-nofocus]):focus:after {
    36133611    opacity: 1;
    36143612    pointer-events: none;
    36153613}
    36163614
    3617 [aria-label][data-balloon-pos].font-awesome:after {
     3615.litespeed-wrap [aria-label][data-balloon-pos].font-awesome:after {
    36183616    font-family: FontAwesome, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    36193617}
    36203618
    3621 [aria-label][data-balloon-pos][data-balloon-break]:after {
     3619.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-break]:after {
    36223620    white-space: pre;
    36233621}
    36243622
    3625 [aria-label][data-balloon-pos][data-balloon-break][data-balloon-length]:after {
     3623.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-break][data-balloon-length]:after {
    36263624    white-space: pre-line;
    36273625    word-break: break-word;
    36283626}
    36293627
    3630 [aria-label][data-balloon-pos][data-balloon-blunt]:before,
    3631 [aria-label][data-balloon-pos][data-balloon-blunt]:after {
     3628.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-blunt]:before,
     3629.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-blunt]:after {
    36323630    transition: none;
    36333631}
    36343632
    3635 [aria-label][data-balloon-pos][data-balloon-pos="up"]:after {
     3633.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up"]:after {
    36363634    bottom: 100%;
    36373635    left: 50%;
     
    36413639}
    36423640
    3643 [aria-label][data-balloon-pos][data-balloon-pos="up"]:before {
     3641.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up"]:before {
    36443642    bottom: 100%;
    36453643    left: 50%;
     
    36483646}
    36493647
    3650 [aria-label][data-balloon-pos][data-balloon-pos="up"]:hover:after,
    3651 [aria-label][data-balloon-pos][data-balloon-pos="up"][data-balloon-visible]:after {
     3648.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up"]:hover:after,
     3649.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up"][data-balloon-visible]:after {
    36523650    transform: translate(-50%, 0);
    36533651}
    36543652
    3655 [aria-label][data-balloon-pos][data-balloon-pos="up"]:hover:before,
    3656 [aria-label][data-balloon-pos][data-balloon-pos="up"][data-balloon-visible]:before {
     3653.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up"]:hover:before,
     3654.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up"][data-balloon-visible]:before {
    36573655    transform: translate(-50%, 0);
    36583656}
    36593657
    3660 [aria-label][data-balloon-pos][data-balloon-pos="up-left"]:after {
     3658.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up-left"]:after {
    36613659    bottom: 100%;
    36623660    left: 0;
     
    36663664}
    36673665
    3668 [aria-label][data-balloon-pos][data-balloon-pos="up-left"]:before {
     3666.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up-left"]:before {
    36693667    bottom: 100%;
    36703668    left: 5px;
     
    36733671}
    36743672
    3675 [aria-label][data-balloon-pos][data-balloon-pos="up-left"]:hover:after,
    3676 [aria-label][data-balloon-pos][data-balloon-pos="up-left"][data-balloon-visible]:after {
     3673.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up-left"]:hover:after,
     3674.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up-left"][data-balloon-visible]:after {
    36773675    transform: translate(0, 0);
    36783676}
    36793677
    3680 [aria-label][data-balloon-pos][data-balloon-pos="up-left"]:hover:before,
    3681 [aria-label][data-balloon-pos][data-balloon-pos="up-left"][data-balloon-visible]:before {
     3678.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up-left"]:hover:before,
     3679.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up-left"][data-balloon-visible]:before {
    36823680    transform: translate(0, 0);
    36833681}
    36843682
    3685 [aria-label][data-balloon-pos][data-balloon-pos="up-right"]:after {
     3683.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up-right"]:after {
    36863684    bottom: 100%;
    36873685    right: 0;
     
    36913689}
    36923690
    3693 [aria-label][data-balloon-pos][data-balloon-pos="up-right"]:before {
     3691.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up-right"]:before {
    36943692    bottom: 100%;
    36953693    right: 5px;
     
    36983696}
    36993697
    3700 [aria-label][data-balloon-pos][data-balloon-pos="up-right"]:hover:after,
    3701 [aria-label][data-balloon-pos][data-balloon-pos="up-right"][data-balloon-visible]:after {
     3698.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up-right"]:hover:after,
     3699.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up-right"][data-balloon-visible]:after {
    37023700    transform: translate(0, 0);
    37033701}
    37043702
    3705 [aria-label][data-balloon-pos][data-balloon-pos="up-right"]:hover:before,
    3706 [aria-label][data-balloon-pos][data-balloon-pos="up-right"][data-balloon-visible]:before {
     3703.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up-right"]:hover:before,
     3704.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="up-right"][data-balloon-visible]:before {
    37073705    transform: translate(0, 0);
    37083706}
    37093707
    3710 [aria-label][data-balloon-pos][data-balloon-pos="down"]:after {
     3708.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down"]:after {
    37113709    left: 50%;
    37123710    margin-top: 10px;
     
    37153713}
    37163714
    3717 [aria-label][data-balloon-pos][data-balloon-pos="down"]:before {
     3715.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down"]:before {
    37183716    width: 0;
    37193717    height: 0;
     
    37253723}
    37263724
    3727 [aria-label][data-balloon-pos][data-balloon-pos="down"]:hover:after,
    3728 [aria-label][data-balloon-pos][data-balloon-pos="down"][data-balloon-visible]:after {
     3725.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down"]:hover:after,
     3726.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down"][data-balloon-visible]:after {
    37293727    transform: translate(-50%, 0);
    37303728}
    37313729
    3732 [aria-label][data-balloon-pos][data-balloon-pos="down"]:hover:before,
    3733 [aria-label][data-balloon-pos][data-balloon-pos="down"][data-balloon-visible]:before {
     3730.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down"]:hover:before,
     3731.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down"][data-balloon-visible]:before {
    37343732    transform: translate(-50%, 0);
    37353733}
    37363734
    3737 [aria-label][data-balloon-pos][data-balloon-pos="down-left"]:after {
     3735.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down-left"]:after {
    37383736    left: 0;
    37393737    margin-top: 10px;
     
    37423740}
    37433741
    3744 [aria-label][data-balloon-pos][data-balloon-pos="down-left"]:before {
     3742.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down-left"]:before {
    37453743    width: 0;
    37463744    height: 0;
     
    37523750}
    37533751
    3754 [aria-label][data-balloon-pos][data-balloon-pos="down-left"]:hover:after,
    3755 [aria-label][data-balloon-pos][data-balloon-pos="down-left"][data-balloon-visible]:after {
     3752.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down-left"]:hover:after,
     3753.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down-left"][data-balloon-visible]:after {
    37563754    transform: translate(0, 0);
    37573755}
    37583756
    3759 [aria-label][data-balloon-pos][data-balloon-pos="down-left"]:hover:before,
    3760 [aria-label][data-balloon-pos][data-balloon-pos="down-left"][data-balloon-visible]:before {
     3757.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down-left"]:hover:before,
     3758.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down-left"][data-balloon-visible]:before {
    37613759    transform: translate(0, 0);
    37623760}
    37633761
    3764 [aria-label][data-balloon-pos][data-balloon-pos="down-right"]:after {
     3762.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down-right"]:after {
    37653763    right: 0;
    37663764    margin-top: 10px;
     
    37693767}
    37703768
    3771 [aria-label][data-balloon-pos][data-balloon-pos="down-right"]:before {
     3769.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down-right"]:before {
    37723770    width: 0;
    37733771    height: 0;
     
    37793777}
    37803778
    3781 [aria-label][data-balloon-pos][data-balloon-pos="down-right"]:hover:after,
    3782 [aria-label][data-balloon-pos][data-balloon-pos="down-right"][data-balloon-visible]:after {
     3779.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down-right"]:hover:after,
     3780.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down-right"][data-balloon-visible]:after {
    37833781    transform: translate(0, 0);
    37843782}
    37853783
    3786 [aria-label][data-balloon-pos][data-balloon-pos="down-right"]:hover:before,
    3787 [aria-label][data-balloon-pos][data-balloon-pos="down-right"][data-balloon-visible]:before {
     3784.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down-right"]:hover:before,
     3785.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="down-right"][data-balloon-visible]:before {
    37883786    transform: translate(0, 0);
    37893787}
    37903788
    3791 [aria-label][data-balloon-pos][data-balloon-pos="left"]:after {
     3789.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="left"]:after {
    37923790    margin-right: 10px;
    37933791    right: 100%;
     
    37963794}
    37973795
    3798 [aria-label][data-balloon-pos][data-balloon-pos="left"]:before {
     3796.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="left"]:before {
    37993797    width: 0;
    38003798    height: 0;
     
    38063804}
    38073805
    3808 [aria-label][data-balloon-pos][data-balloon-pos="left"]:hover:after,
    3809 [aria-label][data-balloon-pos][data-balloon-pos="left"][data-balloon-visible]:after {
     3806.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="left"]:hover:after,
     3807.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="left"][data-balloon-visible]:after {
    38103808    transform: translate(0, -50%);
    38113809}
    38123810
    3813 [aria-label][data-balloon-pos][data-balloon-pos="left"]:hover:before,
    3814 [aria-label][data-balloon-pos][data-balloon-pos="left"][data-balloon-visible]:before {
     3811.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="left"]:hover:before,
     3812.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="left"][data-balloon-visible]:before {
    38153813    transform: translate(0, -50%);
    38163814}
    38173815
    3818 [aria-label][data-balloon-pos][data-balloon-pos="right"]:after {
     3816.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="right"]:after {
    38193817    left: 100%;
    38203818    margin-left: 10px;
     
    38233821}
    38243822
    3825 [aria-label][data-balloon-pos][data-balloon-pos="right"]:before {
     3823.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="right"]:before {
    38263824    width: 0;
    38273825    height: 0;
     
    38333831}
    38343832
    3835 [aria-label][data-balloon-pos][data-balloon-pos="right"]:hover:after,
    3836 [aria-label][data-balloon-pos][data-balloon-pos="right"][data-balloon-visible]:after {
     3833.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="right"]:hover:after,
     3834.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="right"][data-balloon-visible]:after {
    38373835    transform: translate(0, -50%);
    38383836}
    38393837
    3840 [aria-label][data-balloon-pos][data-balloon-pos="right"]:hover:before,
    3841 [aria-label][data-balloon-pos][data-balloon-pos="right"][data-balloon-visible]:before {
     3838.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="right"]:hover:before,
     3839.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-pos="right"][data-balloon-visible]:before {
    38423840    transform: translate(0, -50%);
    38433841}
    38443842
    3845 [aria-label][data-balloon-pos][data-balloon-length="small"]:after {
     3843.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-length="small"]:after {
    38463844    white-space: normal;
    38473845    width: 80px;
    38483846}
    38493847
    3850 [aria-label][data-balloon-pos][data-balloon-length="medium"]:after {
     3848.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-length="medium"]:after {
    38513849    white-space: normal;
    38523850    width: 150px;
    38533851}
    38543852
    3855 [aria-label][data-balloon-pos][data-balloon-length="large"]:after {
     3853.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-length="large"]:after {
    38563854    white-space: normal;
    38573855    width: 260px;
    38583856}
    38593857
    3860 [aria-label][data-balloon-pos][data-balloon-length="xlarge"]:after {
     3858.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-length="xlarge"]:after {
    38613859    white-space: normal;
    38623860    width: 380px;
     
    38643862
    38653863@media screen and (max-width: 768px) {
    3866     [aria-label][data-balloon-pos][data-balloon-length="xlarge"]:after {
     3864    .litespeed-wrap [aria-label][data-balloon-pos][data-balloon-length="xlarge"]:after {
    38673865        white-space: normal;
    38683866        width: 90vw;
     
    38703868}
    38713869
    3872 [aria-label][data-balloon-pos][data-balloon-length="fit"]:after {
     3870.litespeed-wrap [aria-label][data-balloon-pos][data-balloon-length="fit"]:after {
    38733871    white-space: normal;
    38743872    width: 100%;
  • litespeed-cache/trunk/lang/litespeed-cache.pot

    r2928795 r2954001  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: LiteSpeed Cache 5.5\n"
     5"Project-Id-Version: LiteSpeed Cache 5.6\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
    7 "POT-Creation-Date: 2023-06-19 16:35:40+00:00\n"
     7"POT-Creation-Date: 2023-07-26 13:52:36+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=UTF-8\n"
     
    7272msgstr ""
    7373
    74 #: src/admin-display.cls.php:135 src/lang.cls.php:238
     74#: src/admin-display.cls.php:135 src/lang.cls.php:243
    7575msgid "Crawler"
    7676msgstr ""
     
    209209#: tpl/page_optm/settings_media.tpl.php:245
    210210#: tpl/page_optm/settings_media_exc.tpl.php:26
    211 #: tpl/page_optm/settings_tuning.tpl.php:35
    212 #: tpl/page_optm/settings_tuning.tpl.php:56
    213 #: tpl/page_optm/settings_tuning.tpl.php:77
    214 #: tpl/page_optm/settings_tuning.tpl.php:96
     211#: tpl/page_optm/settings_tuning.tpl.php:39
     212#: tpl/page_optm/settings_tuning.tpl.php:59
     213#: tpl/page_optm/settings_tuning.tpl.php:80
     214#: tpl/page_optm/settings_tuning.tpl.php:101
     215#: tpl/page_optm/settings_tuning.tpl.php:120
    215216#: tpl/page_optm/settings_tuning_css.tpl.php:24
    216217#: tpl/page_optm/settings_tuning_css.tpl.php:84
     
    326327msgstr ""
    327328
    328 #: src/cdn-setup.cls.php:322 src/cloud.cls.php:808 src/cloud.cls.php:816
    329 #: src/cloud.cls.php:1223
     329#: src/cdn-setup.cls.php:322 src/cloud.cls.php:820 src/cloud.cls.php:828
     330#: src/cloud.cls.php:1235
    330331msgid "Message from QUIC.cloud server"
    331332msgstr ""
    332333
    333334#: src/cloud.cls.php:394 src/cloud.cls.php:407 src/cloud.cls.php:452
    334 #: src/cloud.cls.php:477 src/cloud.cls.php:625 src/cloud.cls.php:1192
     335#: src/cloud.cls.php:477 src/cloud.cls.php:625 src/cloud.cls.php:1204
    335336msgid "Cloud Error"
    336337msgstr ""
     
    358359#: src/cloud.cls.php:755
    359360msgid ""
     361"Cloud server refused the current request due to unpulled images. Please pull "
     362"the images first."
     363msgstr ""
     364
     365#: src/cloud.cls.php:760
     366msgid ""
     367"Your domain_key has been temporarily blocklisted to prevent abuse. You may "
     368"contact support at QUIC.cloud to learn more."
     369msgstr ""
     370
     371#: src/cloud.cls.php:767
     372msgid ""
    360373"Cloud server refused the current request due to rate limiting. Please try "
    361374"again later."
    362375msgstr ""
    363376
    364 #: src/cloud.cls.php:763
     377#: src/cloud.cls.php:775
    365378msgid "Redetected node"
    366379msgstr ""
    367380
    368 #: src/cloud.cls.php:771
     381#: src/cloud.cls.php:783
    369382msgid ""
    370383"We are working hard to improve your online service experience. The service "
     
    372385msgstr ""
    373386
    374 #: src/cloud.cls.php:824
     387#: src/cloud.cls.php:836
    375388msgid "Good news from QUIC.cloud server"
    376389msgstr ""
    377390
    378 #: src/cloud.cls.php:833
     391#: src/cloud.cls.php:845
    379392msgid "%1$s plugin version %2$s required for this action."
    380393msgstr ""
    381394
    382 #: src/cloud.cls.php:890 src/cloud.cls.php:1212
     395#: src/cloud.cls.php:902 src/cloud.cls.php:1224
    383396msgid "Failed to communicate with QUIC.cloud server"
    384397msgstr ""
    385398
    386 #: src/cloud.cls.php:933
     399#: src/cloud.cls.php:945
    387400msgid ""
    388401"Site not recognized. Domain Key has been automatically removed. Please "
     
    390403msgstr ""
    391404
    392 #: src/cloud.cls.php:934 src/error.cls.php:48
     405#: src/cloud.cls.php:946 src/error.cls.php:48
    393406msgid "Click here to set."
    394407msgstr ""
    395408
    396 #: src/cloud.cls.php:1002
     409#: src/cloud.cls.php:1014
    397410msgid "Cannot request REST API, no token saved."
    398411msgstr ""
    399412
    400 #: src/cloud.cls.php:1028
     413#: src/cloud.cls.php:1040
    401414msgid "Cloud REST Error"
    402415msgstr ""
    403416
    404 #: src/cloud.cls.php:1048
     417#: src/cloud.cls.php:1060
    405418msgid "Unknown error."
    406419msgstr ""
    407420
    408 #: src/cloud.cls.php:1052
     421#: src/cloud.cls.php:1064
    409422msgid "Contact QUIC.cloud support"
    410423msgstr ""
    411424
    412 #: src/cloud.cls.php:1054
     425#: src/cloud.cls.php:1066
    413426msgid "Cloud REST API returned error: "
    414427msgstr ""
    415428
    416 #: src/cloud.cls.php:1231
     429#: src/cloud.cls.php:1243
    417430msgid ""
    418431"Applied for Domain Key successfully. Please wait for result. Domain Key will "
     
    420433msgstr ""
    421434
    422 #: src/cloud.cls.php:1287
     435#: src/cloud.cls.php:1299
    423436msgid ""
    424437"Congratulations, your Domain Key has been approved! The setting has been "
     
    426439msgstr ""
    427440
    428 #: src/cloud.cls.php:1383
     441#: src/cloud.cls.php:1395
    429442msgid "QUIC.cloud account has been created and successfully linked."
    430443msgstr ""
    431444
    432 #: src/cloud.cls.php:1384
     445#: src/cloud.cls.php:1396
    433446msgid "QUIC.cloud account has been successfully linked."
    434447msgstr ""
    435448
    436 #: src/cloud.cls.php:1392
     449#: src/cloud.cls.php:1404
    437450msgid "Domain Key hash mismatch"
    438451msgstr ""
    439452
    440 #: src/cloud.cls.php:1518
     453#: src/cloud.cls.php:1530
    441454msgid "Sync credit allowance with Cloud Server successfully."
    442455msgstr ""
     
    462475msgstr ""
    463476
    464 #: src/crawler-map.cls.php:323
     477#: src/crawler-map.cls.php:329
    465478msgid "No valid sitemap parsed for crawler."
    466479msgstr ""
    467480
    468 #: src/crawler-map.cls.php:327
     481#: src/crawler-map.cls.php:333
    469482msgid "Sitemap created successfully: %d items"
    470483msgstr ""
     
    504517msgstr ""
    505518
    506 #: src/data.upgrade.func.php:118 src/lang.cls.php:141
     519#: src/data.upgrade.func.php:118 src/lang.cls.php:145
    507520msgid "JS Combine"
    508521msgstr ""
     
    847860msgstr ""
    848861
    849 #: src/gui.cls.php:497 src/gui.cls.php:657 src/lang.cls.php:107
     862#: src/gui.cls.php:497 src/gui.cls.php:657 src/lang.cls.php:111
    850863#: tpl/dash/dashboard.tpl.php:420 tpl/toolbox/purge.tpl.php:52
    851864msgid "Object Cache"
     
    865878msgstr ""
    866879
    867 #: src/gui.cls.php:556 src/gui.cls.php:716 src/lang.cls.php:170
     880#: src/gui.cls.php:556 src/gui.cls.php:716 src/lang.cls.php:175
    868881#: tpl/presets/standard.tpl.php:42 tpl/toolbox/purge.tpl.php:106
    869882msgid "Gravatar Cache"
     
    931944msgstr ""
    932945
    933 #: src/img-optm.cls.php:625
     946#: src/img-optm.cls.php:631
    934947msgid "No valid image found in the current request."
    935948msgstr ""
    936949
    937 #: src/img-optm.cls.php:648
     950#: src/img-optm.cls.php:654
    938951msgid "No valid image found by Cloud server in the current request."
    939952msgstr ""
    940953
    941 #: src/img-optm.cls.php:831
     954#: src/img-optm.cls.php:837
    942955msgid "Started async image optimization request"
    943956msgstr ""
    944957
    945 #: src/img-optm.cls.php:868
     958#: src/img-optm.cls.php:874
    946959msgid "Pull Cron is running"
    947960msgstr ""
     
    955968msgstr ""
    956969
    957 #: src/img-optm.cls.php:975
     970#: src/img-optm.cls.php:974
    958971msgid "Optimized WebP file expired and was cleared."
    959972msgstr ""
    960973
    961 #: src/img-optm.cls.php:989
     974#: src/img-optm.cls.php:988
    962975msgid "Pulled WebP image md5 does not match the notified WebP image md5."
    963976msgstr ""
    964977
    965 #: src/img-optm.cls.php:1134
     978#: src/img-optm.cls.php:1133
    966979msgid "Cleaned up unfinished data successfully."
    967980msgstr ""
    968981
    969 #: src/img-optm.cls.php:1210
     982#: src/img-optm.cls.php:1209
    970983msgid "Destroy all optimization data successfully."
    971984msgstr ""
    972985
    973 #: src/img-optm.cls.php:1271 src/img-optm.cls.php:1333
     986#: src/img-optm.cls.php:1270 src/img-optm.cls.php:1332
    974987msgid "Rescanned successfully."
    975988msgstr ""
    976989
    977 #: src/img-optm.cls.php:1333
     990#: src/img-optm.cls.php:1332
    978991msgid "Rescanned %d images successfully."
    979992msgstr ""
    980993
    981 #: src/img-optm.cls.php:1398
     994#: src/img-optm.cls.php:1397
    982995msgid "Calculated backups successfully."
    983996msgstr ""
    984997
    985 #: src/img-optm.cls.php:1490
     998#: src/img-optm.cls.php:1489
    986999msgid "Removed backups successfully."
    9871000msgstr ""
    9881001
    989 #: src/img-optm.cls.php:1675
     1002#: src/img-optm.cls.php:1674
    9901003msgid "Switched images successfully."
    9911004msgstr ""
    9921005
    993 #: src/img-optm.cls.php:1720 src/img-optm.cls.php:1766
     1006#: src/img-optm.cls.php:1719 src/img-optm.cls.php:1765
    9941007msgid "Switched to optimized file successfully."
    9951008msgstr ""
    9961009
    997 #: src/img-optm.cls.php:1739
     1010#: src/img-optm.cls.php:1738
    9981011msgid "Disabled WebP file successfully."
    9991012msgstr ""
    10001013
    1001 #: src/img-optm.cls.php:1744
     1014#: src/img-optm.cls.php:1743
    10021015msgid "Enabled WebP file successfully."
    10031016msgstr ""
    10041017
    1005 #: src/img-optm.cls.php:1760
     1018#: src/img-optm.cls.php:1759
    10061019msgid "Restored original file successfully."
    10071020msgstr ""
    10081021
    1009 #: src/img-optm.cls.php:1817
     1022#: src/img-optm.cls.php:1816
    10101023msgid "Reset the optimized data successfully."
    10111024msgstr ""
     
    10231036msgstr ""
    10241037
    1025 #: src/lang.cls.php:23
     1038#: src/lang.cls.php:26
    10261039msgid "Images not requested"
    10271040msgstr ""
    10281041
    1029 #: src/lang.cls.php:24
     1042#: src/lang.cls.php:27
    10301043msgid "Images ready to request"
    10311044msgstr ""
    10321045
    1033 #: src/lang.cls.php:25 tpl/dash/dashboard.tpl.php:361
     1046#: src/lang.cls.php:28 tpl/dash/dashboard.tpl.php:361
    10341047msgid "Images requested"
    10351048msgstr ""
    10361049
    1037 #: src/lang.cls.php:26 tpl/dash/dashboard.tpl.php:371
     1050#: src/lang.cls.php:29 tpl/dash/dashboard.tpl.php:371
    10381051msgid "Images notified to pull"
    10391052msgstr ""
    10401053
    1041 #: src/lang.cls.php:27
     1054#: src/lang.cls.php:30
    10421055msgid "Images optimized and pulled"
    10431056msgstr ""
    10441057
    1045 #: src/lang.cls.php:44
     1058#: src/lang.cls.php:48
    10461059msgid ""
    10471060"Unable to automatically add %1$s as a Domain Alias for main %2$s domain, due "
     
    10491062msgstr ""
    10501063
    1051 #: src/lang.cls.php:47
     1064#: src/lang.cls.php:51
    10521065msgid ""
    10531066"Unable to automatically add %1$s as a Domain Alias for main %2$s domain."
    10541067msgstr ""
    10551068
    1056 #: src/lang.cls.php:48
     1069#: src/lang.cls.php:52
    10571070msgid "Alias is in use by another QUIC.cloud account."
    10581071msgstr ""
    10591072
    1060 #: src/lang.cls.php:78
     1073#: src/lang.cls.php:82
    10611074msgid "Server IP"
    10621075msgstr ""
    10631076
    1064 #: src/lang.cls.php:79
     1077#: src/lang.cls.php:83
    10651078msgid "Domain Key"
    10661079msgstr ""
    10671080
    1068 #: src/lang.cls.php:80
     1081#: src/lang.cls.php:84
    10691082msgid "Guest Mode User Agents"
    10701083msgstr ""
    10711084
    1072 #: src/lang.cls.php:81
     1085#: src/lang.cls.php:85
    10731086msgid "Guest Mode IPs"
    10741087msgstr ""
    10751088
    1076 #: src/lang.cls.php:83
     1089#: src/lang.cls.php:87
    10771090msgid "Enable Cache"
    10781091msgstr ""
    10791092
    1080 #: src/lang.cls.php:84 tpl/dash/dashboard.tpl.php:421
     1093#: src/lang.cls.php:88 tpl/dash/dashboard.tpl.php:421
    10811094#: tpl/presets/standard.tpl.php:12
    10821095msgid "Browser Cache"
    10831096msgstr ""
    10841097
    1085 #: src/lang.cls.php:85
     1098#: src/lang.cls.php:89
    10861099msgid "Default Public Cache TTL"
    10871100msgstr ""
    10881101
    1089 #: src/lang.cls.php:86
     1102#: src/lang.cls.php:90
    10901103msgid "Default Private Cache TTL"
    10911104msgstr ""
    10921105
    1093 #: src/lang.cls.php:87
     1106#: src/lang.cls.php:91
    10941107msgid "Default Front Page TTL"
    10951108msgstr ""
    10961109
    1097 #: src/lang.cls.php:88
     1110#: src/lang.cls.php:92
    10981111msgid "Default Feed TTL"
    10991112msgstr ""
    11001113
    1101 #: src/lang.cls.php:89
     1114#: src/lang.cls.php:93
    11021115msgid "Default REST TTL"
    11031116msgstr ""
    11041117
    1105 #: src/lang.cls.php:90
     1118#: src/lang.cls.php:94
    11061119msgid "Default HTTP Status Code Page TTL"
    11071120msgstr ""
    11081121
    1109 #: src/lang.cls.php:91
     1122#: src/lang.cls.php:95
    11101123msgid "Browser Cache TTL"
    11111124msgstr ""
    11121125
    1113 #: src/lang.cls.php:92
     1126#: src/lang.cls.php:96
    11141127msgid "Automatically Upgrade"
    11151128msgstr ""
    11161129
    1117 #: src/lang.cls.php:93
     1130#: src/lang.cls.php:97
    11181131msgid "Guest Mode"
    11191132msgstr ""
    11201133
    1121 #: src/lang.cls.php:94
     1134#: src/lang.cls.php:98
    11221135msgid "Guest Optimization"
    11231136msgstr ""
    11241137
    1125 #: src/lang.cls.php:95
     1138#: src/lang.cls.php:99
    11261139msgid "Notifications"
    11271140msgstr ""
    11281141
    1129 #: src/lang.cls.php:96
     1142#: src/lang.cls.php:100
    11301143msgid "Cache Logged-in Users"
    11311144msgstr ""
    11321145
    1133 #: src/lang.cls.php:97
     1146#: src/lang.cls.php:101
    11341147msgid "Cache Commenters"
    11351148msgstr ""
    11361149
    1137 #: src/lang.cls.php:98
     1150#: src/lang.cls.php:102
    11381151msgid "Cache REST API"
    11391152msgstr ""
    11401153
    1141 #: src/lang.cls.php:99
     1154#: src/lang.cls.php:103
    11421155msgid "Cache Login Page"
    11431156msgstr ""
    11441157
    1145 #: src/lang.cls.php:100
     1158#: src/lang.cls.php:104
    11461159msgid "Cache favicon.ico"
    11471160msgstr ""
    11481161
    1149 #: src/lang.cls.php:101
     1162#: src/lang.cls.php:105
    11501163msgid "Cache PHP Resources"
    11511164msgstr ""
    11521165
    1153 #: src/lang.cls.php:102 tpl/cache/settings_inc.cache_mobile.tpl.php:71
     1166#: src/lang.cls.php:106 tpl/cache/settings_inc.cache_mobile.tpl.php:71
    11541167msgid "Cache Mobile"
    11551168msgstr ""
    11561169
    1157 #: src/lang.cls.php:103 tpl/cache/settings_inc.cache_mobile.tpl.php:71
     1170#: src/lang.cls.php:107 tpl/cache/settings_inc.cache_mobile.tpl.php:71
    11581171msgid "List of Mobile User Agents"
    11591172msgstr ""
    11601173
    1161 #: src/lang.cls.php:104
     1174#: src/lang.cls.php:108
    11621175msgid "Private Cached URIs"
    11631176msgstr ""
    11641177
    1165 #: src/lang.cls.php:105
     1178#: src/lang.cls.php:109
    11661179msgid "Drop Query String"
    11671180msgstr ""
    11681181
    1169 #: src/lang.cls.php:108
     1182#: src/lang.cls.php:112
    11701183msgid "Method"
    11711184msgstr ""
    11721185
    1173 #: src/lang.cls.php:109
     1186#: src/lang.cls.php:113
    11741187msgid "Host"
    11751188msgstr ""
    11761189
    1177 #: src/lang.cls.php:110
     1190#: src/lang.cls.php:114
    11781191msgid "Port"
    11791192msgstr ""
    11801193
    1181 #: src/lang.cls.php:111
     1194#: src/lang.cls.php:115
    11821195msgid "Default Object Lifetime"
    11831196msgstr ""
    11841197
    1185 #: src/lang.cls.php:112
     1198#: src/lang.cls.php:116
    11861199msgid "Username"
    11871200msgstr ""
    11881201
    1189 #: src/lang.cls.php:113
     1202#: src/lang.cls.php:117
    11901203msgid "Password"
    11911204msgstr ""
    11921205
    1193 #: src/lang.cls.php:114
     1206#: src/lang.cls.php:118
    11941207msgid "Redis Database ID"
    11951208msgstr ""
    11961209
    1197 #: src/lang.cls.php:115
     1210#: src/lang.cls.php:119
    11981211msgid "Global Groups"
    11991212msgstr ""
    12001213
    1201 #: src/lang.cls.php:116
     1214#: src/lang.cls.php:120
    12021215msgid "Do Not Cache Groups"
    12031216msgstr ""
    12041217
    1205 #: src/lang.cls.php:117
     1218#: src/lang.cls.php:121
    12061219msgid "Persistent Connection"
    12071220msgstr ""
    12081221
    1209 #: src/lang.cls.php:118
     1222#: src/lang.cls.php:122
    12101223msgid "Cache WP-Admin"
    12111224msgstr ""
    12121225
    1213 #: src/lang.cls.php:119
     1226#: src/lang.cls.php:123
    12141227msgid "Store Transients"
    12151228msgstr ""
    12161229
    1217 #: src/lang.cls.php:121
     1230#: src/lang.cls.php:125
    12181231msgid "Purge All On Upgrade"
    12191232msgstr ""
    12201233
    1221 #: src/lang.cls.php:122
     1234#: src/lang.cls.php:126
    12221235msgid "Serve Stale"
    12231236msgstr ""
    12241237
    1225 #: src/lang.cls.php:123 tpl/cache/settings-purge.tpl.php:130
     1238#: src/lang.cls.php:127 tpl/cache/settings-purge.tpl.php:130
    12261239msgid "Scheduled Purge URLs"
    12271240msgstr ""
    12281241
    1229 #: src/lang.cls.php:124 tpl/cache/settings-purge.tpl.php:105
     1242#: src/lang.cls.php:128 tpl/cache/settings-purge.tpl.php:105
    12301243msgid "Scheduled Purge Time"
    12311244msgstr ""
    12321245
    1233 #: src/lang.cls.php:125
     1246#: src/lang.cls.php:129
    12341247msgid "Force Cache URIs"
    12351248msgstr ""
    12361249
    1237 #: src/lang.cls.php:126
     1250#: src/lang.cls.php:130
    12381251msgid "Force Public Cache URIs"
    12391252msgstr ""
    12401253
    1241 #: src/lang.cls.php:127
     1254#: src/lang.cls.php:131
    12421255msgid "Do Not Cache URIs"
    12431256msgstr ""
    12441257
    1245 #: src/lang.cls.php:128
     1258#: src/lang.cls.php:132
    12461259msgid "Do Not Cache Query Strings"
    12471260msgstr ""
    12481261
    1249 #: src/lang.cls.php:129
     1262#: src/lang.cls.php:133
    12501263msgid "Do Not Cache Categories"
    12511264msgstr ""
    12521265
    1253 #: src/lang.cls.php:130
     1266#: src/lang.cls.php:134
    12541267msgid "Do Not Cache Tags"
    12551268msgstr ""
    12561269
    1257 #: src/lang.cls.php:131
     1270#: src/lang.cls.php:135
    12581271msgid "Do Not Cache Roles"
    12591272msgstr ""
    12601273
    1261 #: src/lang.cls.php:132
     1274#: src/lang.cls.php:136
    12621275msgid "CSS Minify"
    12631276msgstr ""
    12641277
    1265 #: src/lang.cls.php:133
     1278#: src/lang.cls.php:137
    12661279msgid "CSS Combine"
    12671280msgstr ""
    12681281
    1269 #: src/lang.cls.php:134
     1282#: src/lang.cls.php:138
    12701283msgid "CSS Combine External and Inline"
    12711284msgstr ""
    12721285
    1273 #: src/lang.cls.php:135
     1286#: src/lang.cls.php:139
    12741287msgid "Generate UCSS"
    12751288msgstr ""
    12761289
    1277 #: src/lang.cls.php:136
     1290#: src/lang.cls.php:140
    12781291msgid "UCSS Inline"
    12791292msgstr ""
    12801293
    1281 #: src/lang.cls.php:137
     1294#: src/lang.cls.php:141
    12821295msgid "UCSS Selector Allowlist"
    12831296msgstr ""
    12841297
    1285 #: src/lang.cls.php:138
     1298#: src/lang.cls.php:142
    12861299msgid "UCSS File Excludes and Inline"
    12871300msgstr ""
    12881301
    1289 #: src/lang.cls.php:139
     1302#: src/lang.cls.php:143
    12901303msgid "UCSS URI Excludes"
    12911304msgstr ""
    12921305
    1293 #: src/lang.cls.php:140
     1306#: src/lang.cls.php:144
    12941307msgid "JS Minify"
    12951308msgstr ""
    12961309
    1297 #: src/lang.cls.php:142
     1310#: src/lang.cls.php:146
    12981311msgid "JS Combine External and Inline"
    12991312msgstr ""
    13001313
    1301 #: src/lang.cls.php:143
     1314#: src/lang.cls.php:147
    13021315msgid "HTML Minify"
    13031316msgstr ""
    13041317
    1305 #: src/lang.cls.php:144
     1318#: src/lang.cls.php:148
    13061319msgid "HTML Lazy Load Selectors"
    13071320msgstr ""
    13081321
    1309 #: src/lang.cls.php:145 tpl/page_optm/settings_tuning_css.tpl.php:131
     1322#: src/lang.cls.php:149 tpl/page_optm/settings_tuning_css.tpl.php:131
    13101323msgid "Load CSS Asynchronously"
    13111324msgstr ""
    13121325
    1313 #: src/lang.cls.php:146
     1326#: src/lang.cls.php:150
    13141327msgid "CCSS Per URL"
    13151328msgstr ""
    13161329
    1317 #: src/lang.cls.php:147
     1330#: src/lang.cls.php:151
    13181331msgid "Inline CSS Async Lib"
    13191332msgstr ""
    13201333
    1321 #: src/lang.cls.php:148 tpl/presets/standard.tpl.php:39
     1334#: src/lang.cls.php:152 tpl/presets/standard.tpl.php:39
    13221335msgid "Font Display Optimization"
    13231336msgstr ""
    13241337
    1325 #: src/lang.cls.php:149
     1338#: src/lang.cls.php:153
    13261339msgid "Load JS Deferred"
    13271340msgstr ""
    13281341
    1329 #: src/lang.cls.php:150
     1342#: src/lang.cls.php:154
    13301343msgid "Localize Resources"
    13311344msgstr ""
    13321345
    1333 #: src/lang.cls.php:151
     1346#: src/lang.cls.php:155
    13341347msgid "Localization Files"
    13351348msgstr ""
    13361349
    1337 #: src/lang.cls.php:152
     1350#: src/lang.cls.php:156
    13381351msgid "DNS Prefetch"
    13391352msgstr ""
    13401353
    1341 #: src/lang.cls.php:153
     1354#: src/lang.cls.php:157
    13421355msgid "DNS Prefetch Control"
    13431356msgstr ""
    13441357
    1345 #: src/lang.cls.php:154
     1358#: src/lang.cls.php:158
    13461359msgid "CSS Excludes"
    13471360msgstr ""
    13481361
    1349 #: src/lang.cls.php:155
     1362#: src/lang.cls.php:159
     1363msgid "JS Delayed Includes"
     1364msgstr ""
     1365
     1366#: src/lang.cls.php:160
    13501367msgid "JS Excludes"
    13511368msgstr ""
    13521369
    1353 #: src/lang.cls.php:156
     1370#: src/lang.cls.php:161
    13541371msgid "Remove Query Strings"
    13551372msgstr ""
    13561373
    1357 #: src/lang.cls.php:157
     1374#: src/lang.cls.php:162
    13581375msgid "Load Google Fonts Asynchronously"
    13591376msgstr ""
    13601377
    1361 #: src/lang.cls.php:158
     1378#: src/lang.cls.php:163
    13621379msgid "Remove Google Fonts"
    13631380msgstr ""
    13641381
    1365 #: src/lang.cls.php:159
     1382#: src/lang.cls.php:164
    13661383msgid "Critical CSS Rules"
    13671384msgstr ""
    13681385
    1369 #: src/lang.cls.php:160
     1386#: src/lang.cls.php:165
    13701387msgid "Separate CCSS Cache Post Types"
    13711388msgstr ""
    13721389
    1373 #: src/lang.cls.php:161
     1390#: src/lang.cls.php:166
    13741391msgid "Separate CCSS Cache URIs"
    13751392msgstr ""
    13761393
    1377 #: src/lang.cls.php:162
     1394#: src/lang.cls.php:167
    13781395msgid "JS Deferred / Delayed Excludes"
    13791396msgstr ""
    13801397
    1381 #: src/lang.cls.php:163
     1398#: src/lang.cls.php:168
    13821399msgid "Guest Mode JS Excludes"
    13831400msgstr ""
    13841401
    1385 #: src/lang.cls.php:164 tpl/presets/standard.tpl.php:44
     1402#: src/lang.cls.php:169 tpl/presets/standard.tpl.php:44
    13861403msgid "Remove WordPress Emoji"
    13871404msgstr ""
    13881405
    1389 #: src/lang.cls.php:165 tpl/presets/standard.tpl.php:45
     1406#: src/lang.cls.php:170 tpl/presets/standard.tpl.php:45
    13901407msgid "Remove Noscript Tags"
    13911408msgstr ""
    13921409
    1393 #: src/lang.cls.php:166
     1410#: src/lang.cls.php:171
    13941411msgid "URI Excludes"
    13951412msgstr ""
    13961413
    1397 #: src/lang.cls.php:167
     1414#: src/lang.cls.php:172
    13981415msgid "Optimize for Guests Only"
    13991416msgstr ""
    14001417
    1401 #: src/lang.cls.php:168
     1418#: src/lang.cls.php:173
    14021419msgid "Role Excludes"
    14031420msgstr ""
    14041421
    1405 #: src/lang.cls.php:171
     1422#: src/lang.cls.php:176
    14061423msgid "Gravatar Cache Cron"
    14071424msgstr ""
    14081425
    1409 #: src/lang.cls.php:172
     1426#: src/lang.cls.php:177
    14101427msgid "Gravatar Cache TTL"
    14111428msgstr ""
    14121429
    1413 #: src/lang.cls.php:174
     1430#: src/lang.cls.php:179
    14141431msgid "Lazy Load Images"
    14151432msgstr ""
    14161433
    1417 #: src/lang.cls.php:175
     1434#: src/lang.cls.php:180
    14181435msgid "Lazy Load Image Excludes"
    14191436msgstr ""
    14201437
    1421 #: src/lang.cls.php:176
     1438#: src/lang.cls.php:181
    14221439msgid "Lazy Load Image Class Name Excludes"
    14231440msgstr ""
    14241441
    1425 #: src/lang.cls.php:177
     1442#: src/lang.cls.php:182
    14261443msgid "Lazy Load Image Parent Class Name Excludes"
    14271444msgstr ""
    14281445
    1429 #: src/lang.cls.php:178
     1446#: src/lang.cls.php:183
    14301447msgid "Lazy Load Iframe Class Name Excludes"
    14311448msgstr ""
    14321449
    1433 #: src/lang.cls.php:179
     1450#: src/lang.cls.php:184
    14341451msgid "Lazy Load Iframe Parent Class Name Excludes"
    14351452msgstr ""
    14361453
    1437 #: src/lang.cls.php:180
     1454#: src/lang.cls.php:185
    14381455msgid "Lazy Load URI Excludes"
    14391456msgstr ""
    14401457
    1441 #: src/lang.cls.php:181
     1458#: src/lang.cls.php:186
    14421459msgid "LQIP Excludes"
    14431460msgstr ""
    14441461
    1445 #: src/lang.cls.php:182
     1462#: src/lang.cls.php:187
    14461463msgid "Basic Image Placeholder"
    14471464msgstr ""
    14481465
    1449 #: src/lang.cls.php:183
     1466#: src/lang.cls.php:188
    14501467msgid "Responsive Placeholder"
    14511468msgstr ""
    14521469
    1453 #: src/lang.cls.php:184
     1470#: src/lang.cls.php:189
    14541471msgid "Responsive Placeholder Color"
    14551472msgstr ""
    14561473
    1457 #: src/lang.cls.php:185
     1474#: src/lang.cls.php:190
    14581475msgid "Responsive Placeholder SVG"
    14591476msgstr ""
    14601477
    1461 #: src/lang.cls.php:186
     1478#: src/lang.cls.php:191
    14621479msgid "LQIP Cloud Generator"
    14631480msgstr ""
    14641481
    1465 #: src/lang.cls.php:187
     1482#: src/lang.cls.php:192
    14661483msgid "LQIP Quality"
    14671484msgstr ""
    14681485
    1469 #: src/lang.cls.php:188
     1486#: src/lang.cls.php:193
    14701487msgid "LQIP Minimum Dimensions"
    14711488msgstr ""
    14721489
    1473 #: src/lang.cls.php:190
     1490#: src/lang.cls.php:195
    14741491msgid "Generate LQIP In Background"
    14751492msgstr ""
    14761493
    1477 #: src/lang.cls.php:191
     1494#: src/lang.cls.php:196
    14781495msgid "Lazy Load Iframes"
    14791496msgstr ""
    14801497
    1481 #: src/lang.cls.php:192
     1498#: src/lang.cls.php:197
    14821499msgid "Add Missing Sizes"
    14831500msgstr ""
    14841501
    1485 #: src/lang.cls.php:193 src/metabox.cls.php:31 src/metabox.cls.php:32
     1502#: src/lang.cls.php:198 src/metabox.cls.php:31 src/metabox.cls.php:32
    14861503#: tpl/page_optm/settings_vpi.tpl.php:12
    14871504msgid "Viewport Images"
    14881505msgstr ""
    14891506
    1490 #: src/lang.cls.php:194
     1507#: src/lang.cls.php:199
    14911508msgid "Viewport Images Cron"
    14921509msgstr ""
    14931510
    1494 #: src/lang.cls.php:196
     1511#: src/lang.cls.php:201
    14951512msgid "Auto Request Cron"
    14961513msgstr ""
    14971514
    1498 #: src/lang.cls.php:197
     1515#: src/lang.cls.php:202
    14991516msgid "Auto Pull Cron"
    15001517msgstr ""
    15011518
    1502 #: src/lang.cls.php:198
     1519#: src/lang.cls.php:203
    15031520msgid "Optimize Original Images"
    15041521msgstr ""
    15051522
    1506 #: src/lang.cls.php:199
     1523#: src/lang.cls.php:204
    15071524msgid "Remove Original Backups"
    15081525msgstr ""
    15091526
    1510 #: src/lang.cls.php:200
     1527#: src/lang.cls.php:205
    15111528msgid "Image WebP Replacement"
    15121529msgstr ""
    15131530
    1514 #: src/lang.cls.php:201
     1531#: src/lang.cls.php:206
    15151532msgid "Optimize Losslessly"
    15161533msgstr ""
    15171534
    1518 #: src/lang.cls.php:202
     1535#: src/lang.cls.php:207
    15191536msgid "Preserve EXIF/XMP data"
    15201537msgstr ""
    15211538
    1522 #: src/lang.cls.php:203
     1539#: src/lang.cls.php:208
    15231540msgid "WebP Attribute To Replace"
    15241541msgstr ""
    15251542
    1526 #: src/lang.cls.php:204
     1543#: src/lang.cls.php:209
    15271544msgid "WebP For Extra srcset"
    15281545msgstr ""
    15291546
    1530 #: src/lang.cls.php:205
     1547#: src/lang.cls.php:210
    15311548msgid "WordPress Image Quality Control"
    15321549msgstr ""
    15331550
    1534 #: src/lang.cls.php:206 tpl/esi_widget_edit.php:36
     1551#: src/lang.cls.php:211 tpl/esi_widget_edit.php:36
    15351552msgid "Enable ESI"
    15361553msgstr ""
    15371554
    1538 #: src/lang.cls.php:207
     1555#: src/lang.cls.php:212
    15391556msgid "Cache Admin Bar"
    15401557msgstr ""
    15411558
    1542 #: src/lang.cls.php:208
     1559#: src/lang.cls.php:213
    15431560msgid "Cache Comment Form"
    15441561msgstr ""
    15451562
    1546 #: src/lang.cls.php:209
     1563#: src/lang.cls.php:214
    15471564msgid "ESI Nonces"
    15481565msgstr ""
    15491566
    1550 #: src/lang.cls.php:210 tpl/page_optm/settings_css.tpl.php:121
     1567#: src/lang.cls.php:215 tpl/page_optm/settings_css.tpl.php:121
    15511568#: tpl/page_optm/settings_css.tpl.php:238 tpl/page_optm/settings_vpi.tpl.php:67
    15521569msgid "Vary Group"
    15531570msgstr ""
    15541571
    1555 #: src/lang.cls.php:211
     1572#: src/lang.cls.php:216
    15561573msgid "Purge All Hooks"
    15571574msgstr ""
    15581575
    1559 #: src/lang.cls.php:212
     1576#: src/lang.cls.php:217
    15601577msgid "Improve HTTP/HTTPS Compatibility"
    15611578msgstr ""
    15621579
    1563 #: src/lang.cls.php:213
     1580#: src/lang.cls.php:218
    15641581msgid "Instant Click"
    15651582msgstr ""
    15661583
    1567 #: src/lang.cls.php:214
     1584#: src/lang.cls.php:219
    15681585msgid "Do Not Cache Cookies"
    15691586msgstr ""
    15701587
    1571 #: src/lang.cls.php:215
     1588#: src/lang.cls.php:220
    15721589msgid "Do Not Cache User Agents"
    15731590msgstr ""
    15741591
    1575 #: src/lang.cls.php:216
     1592#: src/lang.cls.php:221
    15761593msgid "Login Cookie"
    15771594msgstr ""
    15781595
    1579 #: src/lang.cls.php:218
     1596#: src/lang.cls.php:223
    15801597msgid "Frontend Heartbeat Control"
    15811598msgstr ""
    15821599
    1583 #: src/lang.cls.php:219
     1600#: src/lang.cls.php:224
    15841601msgid "Frontend Heartbeat TTL"
    15851602msgstr ""
    15861603
    1587 #: src/lang.cls.php:220
     1604#: src/lang.cls.php:225
    15881605msgid "Backend Heartbeat Control"
    15891606msgstr ""
    15901607
    1591 #: src/lang.cls.php:221
     1608#: src/lang.cls.php:226
    15921609msgid "Backend Heartbeat TTL"
    15931610msgstr ""
    15941611
    1595 #: src/lang.cls.php:222
     1612#: src/lang.cls.php:227
    15961613msgid "Editor Heartbeat"
    15971614msgstr ""
    15981615
    1599 #: src/lang.cls.php:223
     1616#: src/lang.cls.php:228
    16001617msgid "Editor Heartbeat TTL"
    16011618msgstr ""
    16021619
    1603 #: src/lang.cls.php:225
     1620#: src/lang.cls.php:230
    16041621msgid "QUIC.cloud CDN"
    16051622msgstr ""
    16061623
    1607 #: src/lang.cls.php:226
     1624#: src/lang.cls.php:231
    16081625msgid "Use CDN Mapping"
    16091626msgstr ""
    16101627
    1611 #: src/lang.cls.php:227
     1628#: src/lang.cls.php:232
    16121629msgid "CDN URL"
    16131630msgstr ""
    16141631
    1615 #: src/lang.cls.php:228
     1632#: src/lang.cls.php:233
    16161633msgid "Include Images"
    16171634msgstr ""
    16181635
    1619 #: src/lang.cls.php:229
     1636#: src/lang.cls.php:234
    16201637msgid "Include CSS"
    16211638msgstr ""
    16221639
    1623 #: src/lang.cls.php:230
     1640#: src/lang.cls.php:235
    16241641msgid "Include JS"
    16251642msgstr ""
    16261643
    1627 #: src/lang.cls.php:231 tpl/cdn/settings.tpl.php:102
     1644#: src/lang.cls.php:236 tpl/cdn/settings.tpl.php:102
    16281645msgid "Include File Types"
    16291646msgstr ""
    16301647
    1631 #: src/lang.cls.php:232
     1648#: src/lang.cls.php:237
    16321649msgid "HTML Attribute To Replace"
    16331650msgstr ""
    16341651
    1635 #: src/lang.cls.php:233
     1652#: src/lang.cls.php:238
    16361653msgid "Original URLs"
    16371654msgstr ""
    16381655
    1639 #: src/lang.cls.php:234
     1656#: src/lang.cls.php:239
    16401657msgid "Included Directories"
    16411658msgstr ""
    16421659
    1643 #: src/lang.cls.php:235
     1660#: src/lang.cls.php:240
    16441661msgid "Exclude Path"
    16451662msgstr ""
    16461663
    1647 #: src/lang.cls.php:236
     1664#: src/lang.cls.php:241
    16481665msgid "Cloudflare API"
    16491666msgstr ""
    16501667
    1651 #: src/lang.cls.php:239
     1668#: src/lang.cls.php:244
    16521669msgid "Delay"
    16531670msgstr ""
    16541671
    1655 #: src/lang.cls.php:240
     1672#: src/lang.cls.php:245
    16561673msgid "Run Duration"
    16571674msgstr ""
    16581675
    1659 #: src/lang.cls.php:241
     1676#: src/lang.cls.php:246
    16601677msgid "Interval Between Runs"
    16611678msgstr ""
    16621679
    1663 #: src/lang.cls.php:242
     1680#: src/lang.cls.php:247
    16641681msgid "Crawl Interval"
    16651682msgstr ""
    16661683
    1667 #: src/lang.cls.php:243
     1684#: src/lang.cls.php:248
    16681685msgid "Threads"
    16691686msgstr ""
    16701687
    1671 #: src/lang.cls.php:244
     1688#: src/lang.cls.php:249
    16721689msgid "Timeout"
    16731690msgstr ""
    16741691
    1675 #: src/lang.cls.php:245
     1692#: src/lang.cls.php:250
    16761693msgid "Server Load Limit"
    16771694msgstr ""
    16781695
    1679 #: src/lang.cls.php:246
     1696#: src/lang.cls.php:251
    16801697msgid "Role Simulation"
    16811698msgstr ""
    16821699
    1683 #: src/lang.cls.php:247
     1700#: src/lang.cls.php:252
    16841701msgid "Cookie Simulation"
    16851702msgstr ""
    16861703
    1687 #: src/lang.cls.php:248
     1704#: src/lang.cls.php:253
    16881705msgid "Custom Sitemap"
    16891706msgstr ""
    16901707
    1691 #: src/lang.cls.php:249
     1708#: src/lang.cls.php:254
    16921709msgid "Drop Domain from Sitemap"
    16931710msgstr ""
    16941711
    1695 #: src/lang.cls.php:250
     1712#: src/lang.cls.php:255
    16961713msgid "Sitemap Timeout"
    16971714msgstr ""
    16981715
    1699 #: src/lang.cls.php:252 tpl/inc/disabled_all.php:5
     1716#: src/lang.cls.php:257 tpl/inc/disabled_all.php:5
    17001717msgid "Disable All Features"
    17011718msgstr ""
    17021719
    1703 #: src/lang.cls.php:253 tpl/toolbox/log_viewer.tpl.php:11
     1720#: src/lang.cls.php:258 tpl/toolbox/log_viewer.tpl.php:11
    17041721msgid "Debug Log"
    17051722msgstr ""
    17061723
    1707 #: src/lang.cls.php:254
     1724#: src/lang.cls.php:259
    17081725msgid "Admin IPs"
    17091726msgstr ""
    17101727
    1711 #: src/lang.cls.php:255
     1728#: src/lang.cls.php:260
    17121729msgid "Debug Level"
    17131730msgstr ""
    17141731
    1715 #: src/lang.cls.php:256
     1732#: src/lang.cls.php:261
    17161733msgid "Log File Size Limit"
    17171734msgstr ""
    17181735
    1719 #: src/lang.cls.php:257
     1736#: src/lang.cls.php:262
    17201737msgid "Log Cookies"
    17211738msgstr ""
    17221739
    1723 #: src/lang.cls.php:258
     1740#: src/lang.cls.php:263
    17241741msgid "Collapse Query Strings"
    17251742msgstr ""
    17261743
    1727 #: src/lang.cls.php:259
     1744#: src/lang.cls.php:264
    17281745msgid "Debug URI Includes"
    17291746msgstr ""
    17301747
    1731 #: src/lang.cls.php:260
     1748#: src/lang.cls.php:265
    17321749msgid "Debug URI Excludes"
    17331750msgstr ""
    17341751
    1735 #: src/lang.cls.php:261
     1752#: src/lang.cls.php:266
    17361753msgid "Debug String Excludes"
    17371754msgstr ""
    17381755
    1739 #: src/lang.cls.php:263
     1756#: src/lang.cls.php:268
    17401757msgid "Revisions Max Number"
    17411758msgstr ""
    17421759
    1743 #: src/lang.cls.php:264
     1760#: src/lang.cls.php:269
    17441761msgid "Revisions Max Age"
    17451762msgstr ""
     
    19231940msgstr ""
    19241941
    1925 #: src/purge.cls.php:650
     1942#: src/purge.cls.php:651
    19261943msgid "Notified LiteSpeed Web Server to purge the front page."
    19271944msgstr ""
    19281945
    1929 #: src/purge.cls.php:663
     1946#: src/purge.cls.php:664
    19301947msgid "Notified LiteSpeed Web Server to purge all pages."
    19311948msgstr ""
    19321949
    1933 #: src/purge.cls.php:682
     1950#: src/purge.cls.php:683
    19341951msgid "Notified LiteSpeed Web Server to purge error pages."
    19351952msgstr ""
    19361953
    1937 #: src/purge.cls.php:709
     1954#: src/purge.cls.php:710
    19381955msgid "Purge category %s"
    19391956msgstr ""
    19401957
    1941 #: src/purge.cls.php:736
     1958#: src/purge.cls.php:737
    19421959msgid "Purge tag %s"
    19431960msgstr ""
    19441961
    1945 #: src/purge.cls.php:767
     1962#: src/purge.cls.php:768
    19461963msgid "Purge url %s"
    19471964msgstr ""
     
    20672084msgstr ""
    20682085
    2069 #. #-#-#-#-#  litespeed-cache.pot (LiteSpeed Cache 5.5)  #-#-#-#-#
     2086#. #-#-#-#-#  litespeed-cache.pot (LiteSpeed Cache 5.6)  #-#-#-#-#
    20702087#. Plugin Name of the plugin/theme
    20712088#: tpl/banner/new_version.php:57 tpl/banner/new_version_dev.tpl.php:12
     
    20832100
    20842101#: tpl/banner/new_version.php:69 tpl/banner/new_version_dev.tpl.php:24
    2085 #: tpl/toolbox/beta_test.tpl.php:70
     2102#: tpl/toolbox/beta_test.tpl.php:62
    20862103msgid "Upgrade"
    20872104msgstr ""
     
    24272444#: tpl/cache/settings-esi.tpl.php:96
    24282445#: tpl/page_optm/settings_media_exc.tpl.php:27
    2429 #: tpl/page_optm/settings_tuning.tpl.php:36
    2430 #: tpl/page_optm/settings_tuning.tpl.php:57
    2431 #: tpl/page_optm/settings_tuning.tpl.php:78
    2432 #: tpl/page_optm/settings_tuning.tpl.php:97
     2446#: tpl/page_optm/settings_tuning.tpl.php:40
     2447#: tpl/page_optm/settings_tuning.tpl.php:60
     2448#: tpl/page_optm/settings_tuning.tpl.php:81
     2449#: tpl/page_optm/settings_tuning.tpl.php:102
     2450#: tpl/page_optm/settings_tuning.tpl.php:121
    24332451#: tpl/page_optm/settings_tuning_css.tpl.php:25
    24342452#: tpl/page_optm/settings_tuning_css.tpl.php:85
     
    34333451msgstr ""
    34343452
    3435 #: tpl/crawler/blacklist.tpl.php:31 tpl/crawler/map.tpl.php:43
     3453#: tpl/crawler/blacklist.tpl.php:31 tpl/crawler/map.tpl.php:57
    34363454#: tpl/toolbox/purge.tpl.php:224
    34373455msgid "URL"
    34383456msgstr ""
    34393457
    3440 #: tpl/crawler/blacklist.tpl.php:33 tpl/crawler/map.tpl.php:45
     3458#: tpl/crawler/blacklist.tpl.php:33 tpl/crawler/map.tpl.php:59
    34413459msgid "Operation"
    34423460msgstr ""
     
    34583476msgstr ""
    34593477
    3460 #: tpl/crawler/blacklist.tpl.php:61 tpl/crawler/map.tpl.php:69
     3478#: tpl/crawler/blacklist.tpl.php:61 tpl/crawler/map.tpl.php:84
    34613479msgid "Blocklisted due to not cacheable"
    34623480msgstr ""
    34633481
    3464 #: tpl/crawler/blacklist.tpl.php:62 tpl/crawler/map.tpl.php:70
     3482#: tpl/crawler/blacklist.tpl.php:62 tpl/crawler/map.tpl.php:85
    34653483#: tpl/crawler/summary.tpl.php:166 tpl/crawler/summary.tpl.php:190
    34663484msgid "Blocklisted"
     
    34933511msgstr ""
    34943512
    3495 #: tpl/crawler/map.tpl.php:16
     3513#: tpl/crawler/map.tpl.php:18
    34963514msgid "Clean Crawler Map"
    34973515msgstr ""
    34983516
    3499 #: tpl/crawler/map.tpl.php:20
     3517#: tpl/crawler/map.tpl.php:22
    35003518msgid "Refresh Crawler Map"
    35013519msgstr ""
    35023520
    3503 #: tpl/crawler/map.tpl.php:27
     3521#: tpl/crawler/map.tpl.php:29
    35043522msgid "Generated at %s"
    35053523msgstr ""
    35063524
    3507 #: tpl/crawler/map.tpl.php:33
     3525#: tpl/crawler/map.tpl.php:35
    35083526msgid "Sitemap List"
    35093527msgstr ""
    35103528
    3511 #: tpl/crawler/map.tpl.php:37
     3529#: tpl/crawler/map.tpl.php:39
    35123530msgid "Sitemap Total"
    35133531msgstr ""
    35143532
    3515 #: tpl/crawler/map.tpl.php:44 tpl/dash/dashboard.tpl.php:568
     3533#: tpl/crawler/map.tpl.php:44
     3534msgid "URL Search"
     3535msgstr ""
     3536
     3537#: tpl/crawler/map.tpl.php:58 tpl/dash/dashboard.tpl.php:568
    35163538msgid "Crawler Status"
    35173539msgstr ""
    35183540
    3519 #: tpl/crawler/map.tpl.php:58
     3541#: tpl/crawler/map.tpl.php:73
    35203542msgid "Add to Blocklist"
    35213543msgstr ""
    35223544
    3523 #: tpl/crawler/map.tpl.php:67
     3545#: tpl/crawler/map.tpl.php:82
    35243546msgid "Cache Hit"
    35253547msgstr ""
    35263548
    3527 #: tpl/crawler/map.tpl.php:68
     3549#: tpl/crawler/map.tpl.php:83
    35283550msgid "Cache Miss"
    35293551msgstr ""
     
    44034425
    44044426#: tpl/general/settings_tuning.tpl.php:8
    4405 #: tpl/page_optm/settings_tuning.tpl.php:18
     4427#: tpl/page_optm/settings_tuning.tpl.php:20
    44064428#: tpl/page_optm/settings_tuning_css.tpl.php:7
    44074429msgid "Tuning Settings"
     
    51585180
    51595181#: tpl/page_optm/settings_localization.tpl.php:127
    5160 #: tpl/toolbox/beta_test.tpl.php:38
     5182#: tpl/toolbox/beta_test.tpl.php:30
    51615183msgid "Example"
    51625184msgstr ""
     
    53125334
    53135335#: tpl/page_optm/settings_media_exc.tpl.php:28
    5314 #: tpl/page_optm/settings_tuning.tpl.php:37
    5315 #: tpl/page_optm/settings_tuning.tpl.php:58
    5316 #: tpl/page_optm/settings_tuning.tpl.php:79
     5336#: tpl/page_optm/settings_tuning.tpl.php:61
     5337#: tpl/page_optm/settings_tuning.tpl.php:82
     5338#: tpl/page_optm/settings_tuning.tpl.php:103
    53175339#: tpl/page_optm/settings_tuning_css.tpl.php:26
    53185340msgid "Elements with attribute %s in html code will be excluded."
     
    53435365msgstr ""
    53445366
    5345 #: tpl/page_optm/settings_tuning.tpl.php:31
     5367#: tpl/page_optm/settings_tuning.tpl.php:34
     5368msgid "Listed JS files or inline JS code will be delayed."
     5369msgstr ""
     5370
     5371#: tpl/page_optm/settings_tuning.tpl.php:54
    53465372msgid "Listed JS files or inline JS code will not be minified/combined."
    53475373msgstr ""
    53485374
    5349 #: tpl/page_optm/settings_tuning.tpl.php:38
    5350 #: tpl/page_optm/settings_tuning.tpl.php:59
     5375#: tpl/page_optm/settings_tuning.tpl.php:62
     5376#: tpl/page_optm/settings_tuning.tpl.php:83
    53515377#: tpl/page_optm/settings_tuning_css.tpl.php:27
    53525378#: tpl/page_optm/settings_tuning_css.tpl.php:66
     
    53545380msgstr ""
    53555381
    5356 #: tpl/page_optm/settings_tuning.tpl.php:52
     5382#: tpl/page_optm/settings_tuning.tpl.php:76
    53575383msgid "Listed JS files or inline JS code will not be deferred or delayed."
    53585384msgstr ""
    53595385
    5360 #: tpl/page_optm/settings_tuning.tpl.php:73
     5386#: tpl/page_optm/settings_tuning.tpl.php:97
    53615387msgid "Listed JS files or inline JS code will not be optimized by %s."
    53625388msgstr ""
    53635389
    5364 #: tpl/page_optm/settings_tuning.tpl.php:93
     5390#: tpl/page_optm/settings_tuning.tpl.php:117
    53655391msgid "Prevent any optimization of listed pages."
    53665392msgstr ""
    53675393
    5368 #: tpl/page_optm/settings_tuning.tpl.php:111
     5394#: tpl/page_optm/settings_tuning.tpl.php:135
    53695395msgid ""
    53705396"Only optimize pages for guest (not logged in) visitors. If turned this OFF, "
     
    53725398msgstr ""
    53735399
    5374 #: tpl/page_optm/settings_tuning.tpl.php:123
     5400#: tpl/page_optm/settings_tuning.tpl.php:147
    53755401msgid "Selected roles will be excluded from all optimizations."
    53765402msgstr ""
     
    56925718msgstr ""
    56935719
    5694 #: tpl/toolbox/beta_test.tpl.php:33
     5720#: tpl/toolbox/beta_test.tpl.php:25
    56955721msgid "Try GitHub Version"
    56965722msgstr ""
    56975723
    5698 #: tpl/toolbox/beta_test.tpl.php:37
     5724#: tpl/toolbox/beta_test.tpl.php:29
    56995725msgid ""
    57005726"Use this section to switch plugin versions. To beta test a GitHub commit, "
     
    57025728msgstr ""
    57035729
    5704 #: tpl/toolbox/beta_test.tpl.php:42
     5730#: tpl/toolbox/beta_test.tpl.php:34
    57055731msgid "Use latest GitHub Dev commit"
    57065732msgstr ""
    57075733
    5708 #: tpl/toolbox/beta_test.tpl.php:44
     5734#: tpl/toolbox/beta_test.tpl.php:36
    57095735msgid "Use latest GitHub Master commit"
    57105736msgstr ""
    57115737
    5712 #: tpl/toolbox/beta_test.tpl.php:46 tpl/toolbox/beta_test.tpl.php:62
     5738#: tpl/toolbox/beta_test.tpl.php:38 tpl/toolbox/beta_test.tpl.php:54
    57135739msgid "Use latest WordPress release version"
    57145740msgstr ""
    57155741
    5716 #: tpl/toolbox/beta_test.tpl.php:46
     5742#: tpl/toolbox/beta_test.tpl.php:38
    57175743msgid "OR"
    57185744msgstr ""
    57195745
    5720 #: tpl/toolbox/beta_test.tpl.php:57
     5746#: tpl/toolbox/beta_test.tpl.php:49
    57215747msgid ""
    57225748"Downgrade not recommended. May cause fatal error due to refactored code."
    57235749msgstr ""
    57245750
    5725 #: tpl/toolbox/beta_test.tpl.php:61
     5751#: tpl/toolbox/beta_test.tpl.php:53
    57265752msgid ""
    57275753"Press the %s button to use the most recent GitHub commit. Master is for "
     
    57295755msgstr ""
    57305756
    5731 #: tpl/toolbox/beta_test.tpl.php:61
     5757#: tpl/toolbox/beta_test.tpl.php:53
    57325758msgid "Use latest GitHub Dev/Master commit"
    57335759msgstr ""
    57345760
    5735 #: tpl/toolbox/beta_test.tpl.php:62
     5761#: tpl/toolbox/beta_test.tpl.php:54
    57365762msgid ""
    57375763"Press the %s button to stop beta testing and go back to the current release "
     
    57395765msgstr ""
    57405766
    5741 #: tpl/toolbox/beta_test.tpl.php:67
     5767#: tpl/toolbox/beta_test.tpl.php:59
    57425768msgid ""
    57435769"In order to avoid an upgrade error, you must be using %1$s or later before "
  • litespeed-cache/trunk/litespeed-cache.php

    r2940517 r2954001  
    55 * Plugin URI:        https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
    66 * Description:       High-performance page caching and site optimization from LiteSpeed
    7  * Version:           5.5.1
     7 * Version:           5.6
    88 * Author:            LiteSpeed Technologies
    99 * Author URI:        https://www.litespeedtech.com
     
    3535}
    3636
    37 !defined('LSCWP_V') && define('LSCWP_V', '5.5.1');
     37!defined('LSCWP_V') && define('LSCWP_V', '5.6');
    3838
    3939!defined('LSCWP_CONTENT_DIR') && define('LSCWP_CONTENT_DIR', WP_CONTENT_DIR);
  • litespeed-cache/trunk/readme.txt

    r2940517 r2954001  
    33Tags: caching, optimize, performance, pagespeed, core web vitals, seo, speed, image optimize, compress, object cache, redis, memcached, database cleaner
    44Requires at least: 4.0
    5 Tested up to: 6.2.2
    6 Stable tag: 5.5.1
     5Tested up to: 6.3
     6Stable tag: 5.6
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl.html
     
    250250
    251251== Changelog ==
     252
     253= 5.6 - Aug 15 2023 =
     254* 🌱**Page Optimize** New JS Delay Includes option. (Mitchell Krog/Gerard Reches/Ignacy Hołoga)
     255* **Crawler** Sitemap can use search for URL now.
     256* **GUI** Restrict the scope of balloon CSS rules to avoid conflicts. (#567)
     257* **Object Cache** Detect Memcached in more situations. (#568)
     258* **API** Support `litespeed_purged_front` hook. (Umberto Fiorelli)
    252259
    253260= 5.5.1 - Jul 19 2023 =
  • litespeed-cache/trunk/src/base.cls.php

    r2808204 r2954001  
    11<?php
     2
    23/**
    34 * The base consts
     
    56 * @since       3.7
    67 */
     8
    79namespace LiteSpeed;
    810
    9 defined( 'WPINC' ) || exit;
    10 
    11 class Base extends Root {
     11defined('WPINC') || exit;
     12
     13class Base extends Root
     14{
    1215    // This is redundant since v3.0
    1316    // New conf items are `litespeed.key`
     
    133136    const O_OPTM_JS_COMB            = 'optm-js_comb';
    134137    const O_OPTM_JS_COMB_EXT_INL    = 'optm-js_comb_ext_inl';
     138    const O_OPTM_JS_DELAY_INC       = 'optm-js_delay_inc';
    135139    const O_OPTM_JS_EXC             = 'optm-js_exc';
    136140    const O_OPTM_HTML_MIN           = 'optm-html_min';
     
    258262    const O_CDN_QUIC            = 'cdn-quic';
    259263    const O_CDN_CLOUDFLARE      = 'cdn-cloudflare';
    260     const O_CDN_CLOUDFLARE_EMAIL= 'cdn-cloudflare_email';
     264    const O_CDN_CLOUDFLARE_EMAIL = 'cdn-cloudflare_email';
    261265    const O_CDN_CLOUDFLARE_KEY  = 'cdn-cloudflare_key';
    262266    const O_CDN_CLOUDFLARE_NAME = 'cdn-cloudflare_name';
     
    421425        self::O_OPTM_JS_COMB            => false,
    422426        self::O_OPTM_JS_COMB_EXT_INL    => false,
     427        self::O_OPTM_JS_DELAY_INC           => array(),
    423428        self::O_OPTM_JS_EXC             => array(),
    424429        self::O_OPTM_HTML_MIN           => false,
     
    607612     * @since  3.0.3
    608613     */
    609     protected function type_casting( $val, $id, $is_site_conf = false ) {
    610         $default_v = ! $is_site_conf ? self::$_default_options[ $id ] : self::$_default_site_options[ $id ];
    611         if ( is_bool( $default_v ) ) {
    612             if ( $val === 'true' ) {
     614    protected function type_casting($val, $id, $is_site_conf = false)
     615    {
     616        $default_v = !$is_site_conf ? self::$_default_options[$id] : self::$_default_site_options[$id];
     617        if (is_bool($default_v)) {
     618            if ($val === 'true') {
    613619                $val = true;
    614620            }
    615             if ( $val === 'false' ) {
     621            if ($val === 'false') {
    616622                $val = false;
    617623            }
    618624
    619             $max = $this->_conf_multi_switch( $id );
    620             if ( $max ) {
     625            $max = $this->_conf_multi_switch($id);
     626            if ($max) {
    621627                $val = (int) $val;
    622628                $val %= $max + 1;
    623             }
    624             else {
     629            } else {
    625630                $val = (bool) $val;
    626631            }
     632        } elseif (is_array($default_v)) {
     633            // from textarea input
     634            if (!is_array($val)) {
     635                $val = Utility::sanitize_lines($val, $this->_conf_filter($id));
     636            }
     637        } elseif (!is_string($default_v)) {
     638            $val = (int) $val;
     639        } else {
     640            // Check if the string has a limit set
     641            $val = $this->_conf_string_val($id, $val);
    627642        }
    628         elseif ( is_array( $default_v ) ) {
    629             // from textarea input
    630             if ( ! is_array( $val ) ) {
    631                 $val = Utility::sanitize_lines( $val, $this->_conf_filter( $id ) );
     643
     644        return $val;
     645    }
     646
     647    /**
     648     * Load default network settings from data.ini
     649     *
     650     * @since  3.0
     651     */
     652    public function load_default_site_vals()
     653    {
     654        // Load network_default.ini
     655        if (file_exists(LSCWP_DIR . 'data/const.network_default.ini')) {
     656            $default_ini_cfg = parse_ini_file(LSCWP_DIR . 'data/const.network_default.ini', true);
     657            foreach (self::$_default_site_options as $k => $v) {
     658                if (!array_key_exists($k, $default_ini_cfg)) {
     659                    continue;
     660                }
     661
     662                // Parse value in ini file
     663                $ini_v = $this->type_casting($default_ini_cfg[$k], $k, true);
     664
     665                if ($ini_v == $v) {
     666                    continue;
     667                }
     668
     669                self::$_default_site_options[$k] = $ini_v;
    632670            }
    633671        }
    634         elseif ( ! is_string( $default_v ) ) {
    635             $val = (int) $val;
    636         }
    637         else {
    638             // Check if the string has a limit set
    639             $val = $this->_conf_string_val( $id, $val );
    640         }
    641 
    642         return $val;
    643     }
    644 
    645     /**
    646      * Load default network settings from data.ini
    647      *
    648      * @since  3.0
    649      */
    650     public function load_default_site_vals() {
    651         // Load network_default.ini
    652         if ( file_exists( LSCWP_DIR . 'data/const.network_default.ini' ) ) {
    653             $default_ini_cfg = parse_ini_file( LSCWP_DIR . 'data/const.network_default.ini', true );
    654             foreach ( self::$_default_site_options as $k => $v ) {
    655                 if ( ! array_key_exists( $k, $default_ini_cfg ) ) {
     672
     673        self::$_default_site_options[self::_VER] = Core::VER;
     674
     675        return self::$_default_site_options;
     676    }
     677
     678    /**
     679     * Load default values from default.ini
     680     *
     681     * @since 3.0
     682     * @access public
     683     */
     684    public function load_default_vals()
     685    {
     686        // Load default.ini
     687        if (file_exists(LSCWP_DIR . 'data/const.default.ini')) {
     688            $default_ini_cfg = parse_ini_file(LSCWP_DIR . 'data/const.default.ini', true);
     689            foreach (self::$_default_options as $k => $v) {
     690                if (!array_key_exists($k, $default_ini_cfg)) {
    656691                    continue;
    657692                }
    658693
    659694                // Parse value in ini file
    660                 $ini_v = $this->type_casting( $default_ini_cfg[ $k ], $k, true );
    661 
    662                 if ( $ini_v == $v ) {
    663                     continue;
    664                 }
    665 
    666                 self::$_default_site_options[ $k ] = $ini_v;
    667 
    668             }
    669         }
    670 
    671         self::$_default_site_options[ self::_VER ] = Core::VER;
    672 
    673         return self::$_default_site_options;
    674     }
    675 
    676     /**
    677      * Load default values from default.ini
    678      *
    679      * @since 3.0
    680      * @access public
    681      */
    682     public function load_default_vals() {
    683         // Load default.ini
    684         if ( file_exists( LSCWP_DIR . 'data/const.default.ini' ) ) {
    685             $default_ini_cfg = parse_ini_file( LSCWP_DIR . 'data/const.default.ini', true );
    686             foreach ( self::$_default_options as $k => $v ) {
    687                 if ( ! array_key_exists( $k, $default_ini_cfg ) ) {
    688                     continue;
    689                 }
    690 
    691                 // Parse value in ini file
    692                 $ini_v = $this->type_casting( $default_ini_cfg[ $k ], $k );
     695                $ini_v = $this->type_casting($default_ini_cfg[$k], $k);
    693696
    694697                // NOTE: Multiple lines value must be stored as array
     
    707710                 *      [0] = [ 'url' => 'https://example.com', 'inc_js' => true, 'filetype' => [ '.css', '.js', '.jpg' ] ]
    708711                 */
    709                 if ( $k == self::O_CDN_MAPPING ) {
     712                if ($k == self::O_CDN_MAPPING) {
    710713                    $mapping_fields = array(
    711714                        self::CDN_MAPPING_URL,
     
    716719                    );
    717720                    $ini_v2 = array();
    718                     foreach ( $ini_v[ self::CDN_MAPPING_URL ] as $k2 => $v2 ) {// $k2 is numeric
     721                    foreach ($ini_v[self::CDN_MAPPING_URL] as $k2 => $v2) { // $k2 is numeric
    719722                        $this_row = array();
    720                         foreach ( $mapping_fields as $v3 ) {
    721                             $this_v = ! empty( $ini_v[ $v3 ][ $k2 ] ) ? $ini_v[ $v3 ][ $k2 ] : false;
    722                             if ( $v3 == self::CDN_MAPPING_URL ) {
    723                                 $this_v = $this_v ? : '';
     723                        foreach ($mapping_fields as $v3) {
     724                            $this_v = !empty($ini_v[$v3][$k2]) ? $ini_v[$v3][$k2] : false;
     725                            if ($v3 == self::CDN_MAPPING_URL) {
     726                                $this_v = $this_v ?: '';
    724727                            }
    725                             if ( $v3 == self::CDN_MAPPING_FILETYPE ) {
    726                                 $this_v = $this_v ? Utility::sanitize_lines( $this_v ) : array(); // Note: Since v3.0 its already an array
     728                            if ($v3 == self::CDN_MAPPING_FILETYPE) {
     729                                $this_v = $this_v ? Utility::sanitize_lines($this_v) : array(); // Note: Since v3.0 its already an array
    727730                            }
    728                             $this_row[ $v3 ] = $this_v;
     731                            $this_row[$v3] = $this_v;
    729732                        }
    730                         $ini_v2[ $k2 ] = $this_row;
     733                        $ini_v2[$k2] = $this_row;
    731734                    }
    732735                    $ini_v = $ini_v2;
    733736                }
    734737
    735                 if ( $ini_v == $v ) {
     738                if ($ini_v == $v) {
    736739                    continue;
    737740                }
    738741
    739                 self::$_default_options[ $k ] = $ini_v;
     742                self::$_default_options[$k] = $ini_v;
    740743            }
    741 
    742744        }
    743745
    744746        // Load internal default vals
    745747        // Setting the default bool to int is also to avoid type casting override it back to bool
    746         self::$_default_options[ self::O_CACHE ] = is_multisite() ? self::VAL_ON2 : self::VAL_ON; //For multi site, default is 2 (Use Network Admin Settings). For single site, default is 1 (Enabled).
     748        self::$_default_options[self::O_CACHE] = is_multisite() ? self::VAL_ON2 : self::VAL_ON; //For multi site, default is 2 (Use Network Admin Settings). For single site, default is 1 (Enabled).
    747749
    748750        // Load default vals containing variables
    749         if ( ! self::$_default_options[ self::O_CDN_ORI_DIR ] ) {
    750             self::$_default_options[ self::O_CDN_ORI_DIR ] = LSCWP_CONTENT_FOLDER . "\nwp-includes";
    751             self::$_default_options[ self::O_CDN_ORI_DIR ] = explode( "\n", self::$_default_options[ self::O_CDN_ORI_DIR ] );
    752             self::$_default_options[ self::O_CDN_ORI_DIR ] = array_map( 'trim', self::$_default_options[ self::O_CDN_ORI_DIR ] );
     751        if (!self::$_default_options[self::O_CDN_ORI_DIR]) {
     752            self::$_default_options[self::O_CDN_ORI_DIR] = LSCWP_CONTENT_FOLDER . "\nwp-includes";
     753            self::$_default_options[self::O_CDN_ORI_DIR] = explode("\n", self::$_default_options[self::O_CDN_ORI_DIR]);
     754            self::$_default_options[self::O_CDN_ORI_DIR] = array_map('trim', self::$_default_options[self::O_CDN_ORI_DIR]);
    753755        }
    754756
    755757        // Set security key if not initialized yet
    756         if ( ! self::$_default_options[ self::HASH ] ) {
    757             self::$_default_options[ self::HASH ] = Str::rrand( 32 );
     758        if (!self::$_default_options[self::HASH]) {
     759            self::$_default_options[self::HASH] = Str::rrand(32);
    758760        }
    759761
    760         self::$_default_options[ self::_VER ] = Core::VER;
     762        self::$_default_options[self::_VER] = Core::VER;
    761763
    762764        return self::$_default_options;
     
    768770     * @since  3.0
    769771     */
    770     protected function _conf_string_val( $id, $val ) {
     772    protected function _conf_string_val($id, $val)
     773    {
    771774        return $val;
    772775    }
     
    777780     * @since  3.0
    778781     */
    779     protected function _conf_multi_switch( $id ) {
    780         if ( ! empty( self::$_multi_switch_list[ $id ] ) ) {
    781             return self::$_multi_switch_list[ $id ];
     782    protected function _conf_multi_switch($id)
     783    {
     784        if (!empty(self::$_multi_switch_list[$id])) {
     785            return self::$_multi_switch_list[$id];
    782786        }
    783787
    784         if ( $id == self::O_CACHE && is_multisite() ) {
     788        if ($id == self::O_CACHE && is_multisite()) {
    785789            return self::VAL_ON2;
    786790        }
     
    794798     * @since  3.0
    795799     */
    796     public static function set_multi_switch( $id, $v ) {
    797         self::$_multi_switch_list[ $id ] = $v;
     800    public static function set_multi_switch($id, $v)
     801    {
     802        self::$_multi_switch_list[$id] = $v;
    798803    }
    799804
     
    803808     * @since  3.0
    804809     */
    805     public static function conf_const( $id ) {
    806         return 'LITESPEED_CONF__' . strtoupper( str_replace( '-', '__', $id ) );
     810    public static function conf_const($id)
     811    {
     812        return 'LITESPEED_CONF__' . strtoupper(str_replace('-', '__', $id));
    807813    }
    808814
     
    812818     * @since  3.0
    813819     */
    814     protected function _conf_filter( $id ) {
     820    protected function _conf_filter($id)
     821    {
    815822        $filters = array(
    816823            self::O_MEDIA_LAZY_EXC      => 'uri',
     
    835842        );
    836843
    837         if ( ! empty( $filters[ $id ] ) ) {
    838             return $filters[ $id ];
     844        if (!empty($filters[$id])) {
     845            return $filters[$id];
    839846        }
    840847
     
    847854     * @since  3.0
    848855     */
    849     protected function _conf_purge( $id ) {
     856    protected function _conf_purge($id)
     857    {
    850858        $check_ids = array(
    851859            self::O_MEDIA_LAZY_URI_EXC,
     
    858866        );
    859867
    860         return in_array( $id, $check_ids );
     868        return in_array($id, $check_ids);
    861869    }
    862870
     
    866874     * @since  3.0
    867875     */
    868     protected function _conf_purge_all( $id ) {
     876    protected function _conf_purge_all($id)
     877    {
    869878        $check_ids = array(
    870879            self::O_CACHE,
     
    874883        );
    875884
    876         return in_array( $id, $check_ids );
     885        return in_array($id, $check_ids);
    877886    }
    878887
     
    882891     * @since  3.0
    883892     */
    884     protected function _conf_pswd( $id ) {
     893    protected function _conf_pswd($id)
     894    {
    885895        $check_ids = array(
    886896            self::O_CDN_CLOUDFLARE_KEY,
     
    890900        );
    891901
    892         return in_array( $id, $check_ids );
     902        return in_array($id, $check_ids);
    893903    }
    894904
     
    898908     * @since  3.0
    899909     */
    900     protected function _conf_cron( $id ) {
     910    protected function _conf_cron($id)
     911    {
    901912        $check_ids = array(
    902913            self::O_IMG_OPTM_CRON,
     
    908919        );
    909920
    910         return in_array( $id, $check_ids );
     921        return in_array($id, $check_ids);
    911922    }
    912923
     
    916927     * @since  3.0
    917928     */
    918     protected function _conf_purge_tag( $id ) {
     929    protected function _conf_purge_tag($id)
     930    {
    919931        $check_ids = array(
    920932            self::O_CACHE_PAGE_LOGIN    => Tag::TYPE_LOGIN,
    921933        );
    922934
    923         if ( ! empty( $check_ids[ $id ] ) ) {
    924             return $check_ids[ $id ];
     935        if (!empty($check_ids[$id])) {
     936            return $check_ids[$id];
    925937        }
    926938
     
    933945     * @since 2.4.1
    934946     */
    935     public function server_vars() {
     947    public function server_vars()
     948    {
    936949        $consts = array(
    937950            'WP_SITEURL',
     
    951964        );
    952965        $server_vars = array();
    953         foreach ( $consts as $v ) {
    954             $server_vars[ $v ] = defined( $v ) ? constant( $v ) : NULL;
     966        foreach ($consts as $v) {
     967            $server_vars[$v] = defined($v) ? constant($v) : NULL;
    955968        }
    956969
    957970        return $server_vars;
    958971    }
    959 
    960972}
  • litespeed-cache/trunk/src/core.cls.php

    r2928795 r2954001  
    626626                $this->_comment($vary_header);
    627627            }
     628        }
     629
     630        if (defined('LITESPEED_ON') && defined('LSCWP_LOG')) {
     631            $vary = $this->cls('Vary')->finalize_full_varies();
     632            if ($vary) $this->_comment('Full varies: ' . $vary);
    628633        }
    629634
  • litespeed-cache/trunk/src/crawler-map.cls.php

    r2928795 r2954001  
    289289        }
    290290
     291        $where = '';
     292        if (!empty($_POST['kw'])) {
     293            $q = "SELECT * FROM `$this->_tb` WHERE url LIKE %s ORDER BY id LIMIT %d, %d";
     294            $where = '%' . $wpdb->esc_like($_POST['kw']) . '%';
     295            return $wpdb->get_results($wpdb->prepare($q, $where, $offset, $limit), ARRAY_A);
     296        }
    291297
    292298        $q = "SELECT * FROM `$this->_tb` ORDER BY id LIMIT %d, %d";
  • litespeed-cache/trunk/src/lang.cls.php

    r2901384 r2954001  
    11<?php
     2
    23/**
    34 * The language class.
     
    89 * @author      LiteSpeed Technologies <[email protected]>
    910 */
    10 namespace LiteSpeed ;
    11 
    12 defined( 'WPINC' ) || exit ;
    13 
    14 class Lang extends Base {
     11
     12namespace LiteSpeed;
     13
     14defined('WPINC') || exit;
     15
     16class Lang extends Base
     17{
    1518    /**
    1619     * Get image status per status bit
     
    1821     * @since  3.0
    1922     */
    20     public static function img_status( $status = null )
     23    public static function img_status($status = null)
    2124    {
    2225        $list = array(
    23             Img_Optm::STATUS_NEW        => __( 'Images not requested', 'litespeed-cache' ),
    24             Img_Optm::STATUS_RAW        => __( 'Images ready to request', 'litespeed-cache' ),
    25             Img_Optm::STATUS_REQUESTED  => __( 'Images requested', 'litespeed-cache' ),
    26             Img_Optm::STATUS_NOTIFIED   => __( 'Images notified to pull', 'litespeed-cache' ),
    27             Img_Optm::STATUS_PULLED     => __( 'Images optimized and pulled', 'litespeed-cache' ),
     26            Img_Optm::STATUS_NEW        => __('Images not requested', 'litespeed-cache'),
     27            Img_Optm::STATUS_RAW        => __('Images ready to request', 'litespeed-cache'),
     28            Img_Optm::STATUS_REQUESTED  => __('Images requested', 'litespeed-cache'),
     29            Img_Optm::STATUS_NOTIFIED   => __('Images notified to pull', 'litespeed-cache'),
     30            Img_Optm::STATUS_PULLED     => __('Images optimized and pulled', 'litespeed-cache'),
    2831        );
    2932
    30         if ( $status !== null ) {
    31             return ! empty( $list[ $status ] ) ? $list[ $status ] : 'N/A';
     33        if ($status !== null) {
     34            return !empty($list[$status]) ? $list[$status] : 'N/A';
    3235        }
    3336
     
    4043     * @since  4.7
    4144     */
    42     public static function maybe_translate( $raw_string ) {
     45    public static function maybe_translate($raw_string)
     46    {
    4347        $map = array(
    44             'auto_alias_failed_cdn' => __( 'Unable to automatically add %1$s as a Domain Alias for main %2$s domain, due to potential CDN conflict.', 'litespeed-cache' ) . ' ' . Doc::learn_more( 'https://quic.cloud/docs/cdn/dns/how-to-setup-domain-alias/', false, false, false, true ),
     48            'auto_alias_failed_cdn' => __('Unable to automatically add %1$s as a Domain Alias for main %2$s domain, due to potential CDN conflict.', 'litespeed-cache') . ' ' . Doc::learn_more('https://quic.cloud/docs/cdn/dns/how-to-setup-domain-alias/', false, false, false, true),
    4549
    4650            'auto_alias_failed_uid' =>
    47                 __( 'Unable to automatically add %1$s as a Domain Alias for main %2$s domain.', 'litespeed-cache' ) .
    48                 ' ' . __( 'Alias is in use by another QUIC.cloud account.', 'litespeed-cache' ) .
    49                 ' ' . Doc::learn_more( 'https://quic.cloud/docs/cdn/dns/how-to-setup-domain-alias/', false, false, false, true ),
     51            __('Unable to automatically add %1$s as a Domain Alias for main %2$s domain.', 'litespeed-cache') .
     52                ' ' . __('Alias is in use by another QUIC.cloud account.', 'litespeed-cache') .
     53                ' ' . Doc::learn_more('https://quic.cloud/docs/cdn/dns/how-to-setup-domain-alias/', false, false, false, true),
    5054        );
    5155
    5256        // Maybe has placeholder
    53         if ( strpos( $raw_string, '::' ) ) {
    54             $replacements = explode( '::', $raw_string );
    55             if ( empty( $map[ $replacements[0] ] ) ) {
     57        if (strpos($raw_string, '::')) {
     58            $replacements = explode('::', $raw_string);
     59            if (empty($map[$replacements[0]])) {
    5660                return $raw_string;
    5761            }
    58             $tpl = $map[ $replacements[0] ];
     62            $tpl = $map[$replacements[0]];
    5963            unset($replacements[0]);
    60             return vsprintf( $tpl, array_values( $replacements ) );
     64            return vsprintf($tpl, array_values($replacements));
    6165        }
    6266
    6367        // Direct translation only
    64         if ( empty( $map[ $raw_string ] ) ) return $raw_string;
    65 
    66         return $map[ $raw_string ];
     68        if (empty($map[$raw_string])) return $raw_string;
     69
     70        return $map[$raw_string];
    6771    }
    6872
     
    7377     * @access public
    7478     */
    75     public static function title( $id )
     79    public static function title($id)
    7680    {
    7781        $_lang_list = array(
    78             self::O_SERVER_IP                   => __( 'Server IP', 'litespeed-cache' ),
    79             self::O_API_KEY                     => __( 'Domain Key', 'litespeed-cache' ),
    80             self::O_GUEST_UAS                   => __( 'Guest Mode User Agents', 'litespeed-cache' ),
    81             self::O_GUEST_IPS                   => __( 'Guest Mode IPs', 'litespeed-cache' ),
    82 
    83             self::O_CACHE                       => __( 'Enable Cache', 'litespeed-cache' ),
    84             self::O_CACHE_BROWSER               => __( 'Browser Cache', 'litespeed-cache' ),
    85             self::O_CACHE_TTL_PUB               => __( 'Default Public Cache TTL', 'litespeed-cache' ),
    86             self::O_CACHE_TTL_PRIV              => __( 'Default Private Cache TTL', 'litespeed-cache' ),
    87             self::O_CACHE_TTL_FRONTPAGE         => __( 'Default Front Page TTL', 'litespeed-cache' ),
    88             self::O_CACHE_TTL_FEED              => __( 'Default Feed TTL', 'litespeed-cache' ),
    89             self::O_CACHE_TTL_REST              => __( 'Default REST TTL', 'litespeed-cache' ),
    90             self::O_CACHE_TTL_STATUS            => __( 'Default HTTP Status Code Page TTL', 'litespeed-cache' ),
    91             self::O_CACHE_TTL_BROWSER           => __( 'Browser Cache TTL', 'litespeed-cache' ),
    92             self::O_AUTO_UPGRADE                => __( 'Automatically Upgrade', 'litespeed-cache' ),
    93             self::O_GUEST                       => __( 'Guest Mode', 'litespeed-cache' ),
    94             self::O_GUEST_OPTM                  => __( 'Guest Optimization', 'litespeed-cache' ),
    95             self::O_NEWS                        => __( 'Notifications', 'litespeed-cache' ),
    96             self::O_CACHE_PRIV                  => __( 'Cache Logged-in Users', 'litespeed-cache' ),
    97             self::O_CACHE_COMMENTER             => __( 'Cache Commenters', 'litespeed-cache' ),
    98             self::O_CACHE_REST                  => __( 'Cache REST API', 'litespeed-cache' ),
    99             self::O_CACHE_PAGE_LOGIN            => __( 'Cache Login Page', 'litespeed-cache' ),
    100             self::O_CACHE_FAVICON               => __( 'Cache favicon.ico', 'litespeed-cache' ),
    101             self::O_CACHE_RES                   => __( 'Cache PHP Resources', 'litespeed-cache' ),
    102             self::O_CACHE_MOBILE                => __( 'Cache Mobile', 'litespeed-cache' ),
    103             self::O_CACHE_MOBILE_RULES          => __( 'List of Mobile User Agents', 'litespeed-cache' ),
    104             self::O_CACHE_PRIV_URI              => __( 'Private Cached URIs', 'litespeed-cache' ),
    105             self::O_CACHE_DROP_QS               => __( 'Drop Query String', 'litespeed-cache' ),
    106 
    107             self::O_OBJECT                      => __( 'Object Cache', 'litespeed-cache' ),
    108             self::O_OBJECT_KIND                 => __( 'Method', 'litespeed-cache' ),
    109             self::O_OBJECT_HOST                 => __( 'Host', 'litespeed-cache' ),
    110             self::O_OBJECT_PORT                 => __( 'Port', 'litespeed-cache' ),
    111             self::O_OBJECT_LIFE                 => __( 'Default Object Lifetime', 'litespeed-cache' ),
    112             self::O_OBJECT_USER                 => __( 'Username', 'litespeed-cache' ),
    113             self::O_OBJECT_PSWD                 => __( 'Password', 'litespeed-cache' ),
    114             self::O_OBJECT_DB_ID                => __( 'Redis Database ID', 'litespeed-cache' ),
    115             self::O_OBJECT_GLOBAL_GROUPS        => __( 'Global Groups', 'litespeed-cache' ),
    116             self::O_OBJECT_NON_PERSISTENT_GROUPS    => __( 'Do Not Cache Groups', 'litespeed-cache' ),
    117             self::O_OBJECT_PERSISTENT           => __( 'Persistent Connection', 'litespeed-cache' ),
    118             self::O_OBJECT_ADMIN                => __( 'Cache WP-Admin', 'litespeed-cache' ),
    119             self::O_OBJECT_TRANSIENTS           => __( 'Store Transients', 'litespeed-cache' ),
    120 
    121             self::O_PURGE_ON_UPGRADE            => __( 'Purge All On Upgrade', 'litespeed-cache' ),
    122             self::O_PURGE_STALE                 => __( 'Serve Stale', 'litespeed-cache' ),
    123             self::O_PURGE_TIMED_URLS            => __( 'Scheduled Purge URLs', 'litespeed-cache' ),
    124             self::O_PURGE_TIMED_URLS_TIME       => __( 'Scheduled Purge Time', 'litespeed-cache' ),
    125             self::O_CACHE_FORCE_URI             => __( 'Force Cache URIs', 'litespeed-cache' ),
    126             self::O_CACHE_FORCE_PUB_URI         => __( 'Force Public Cache URIs', 'litespeed-cache' ),
    127             self::O_CACHE_EXC                   => __( 'Do Not Cache URIs', 'litespeed-cache' ),
    128             self::O_CACHE_EXC_QS                => __( 'Do Not Cache Query Strings', 'litespeed-cache' ),
    129             self::O_CACHE_EXC_CAT               => __( 'Do Not Cache Categories', 'litespeed-cache' ),
    130             self::O_CACHE_EXC_TAG               => __( 'Do Not Cache Tags', 'litespeed-cache' ),
    131             self::O_CACHE_EXC_ROLES             => __( 'Do Not Cache Roles', 'litespeed-cache' ),
    132             self::O_OPTM_CSS_MIN                => __( 'CSS Minify', 'litespeed-cache' ),
    133             self::O_OPTM_CSS_COMB               => __( 'CSS Combine', 'litespeed-cache' ),
    134             self::O_OPTM_CSS_COMB_EXT_INL       => __( 'CSS Combine External and Inline', 'litespeed-cache' ),
    135             self::O_OPTM_UCSS                   => __( 'Generate UCSS', 'litespeed-cache' ),
    136             self::O_OPTM_UCSS_INLINE            => __( 'UCSS Inline', 'litespeed-cache' ),
    137             self::O_OPTM_UCSS_SELECTOR_WHITELIST    => __( 'UCSS Selector Allowlist', 'litespeed-cache' ),
    138             self::O_OPTM_UCSS_FILE_EXC_INLINE   => __( 'UCSS File Excludes and Inline', 'litespeed-cache' ),
    139             self::O_OPTM_UCSS_EXC               => __( 'UCSS URI Excludes', 'litespeed-cache' ),
    140             self::O_OPTM_JS_MIN                 => __( 'JS Minify', 'litespeed-cache' ),
    141             self::O_OPTM_JS_COMB                => __( 'JS Combine', 'litespeed-cache' ),
    142             self::O_OPTM_JS_COMB_EXT_INL        => __( 'JS Combine External and Inline', 'litespeed-cache' ),
    143             self::O_OPTM_HTML_MIN               => __( 'HTML Minify', 'litespeed-cache' ),
    144             self::O_OPTM_HTML_LAZY              => __( 'HTML Lazy Load Selectors', 'litespeed-cache' ),
    145             self::O_OPTM_CSS_ASYNC              => __( 'Load CSS Asynchronously', 'litespeed-cache' ),
    146             self::O_OPTM_CCSS_PER_URL           => __( 'CCSS Per URL', 'litespeed-cache' ),
    147             self::O_OPTM_CSS_ASYNC_INLINE       => __( 'Inline CSS Async Lib', 'litespeed-cache' ),
    148             self::O_OPTM_CSS_FONT_DISPLAY       => __( 'Font Display Optimization', 'litespeed-cache' ),
    149             self::O_OPTM_JS_DEFER               => __( 'Load JS Deferred', 'litespeed-cache' ),
    150             self::O_OPTM_LOCALIZE               => __( 'Localize Resources', 'litespeed-cache' ),
    151             self::O_OPTM_LOCALIZE_DOMAINS       => __( 'Localization Files', 'litespeed-cache' ),
    152             self::O_OPTM_DNS_PREFETCH           => __( 'DNS Prefetch', 'litespeed-cache' ),
    153             self::O_OPTM_DNS_PREFETCH_CTRL      => __( 'DNS Prefetch Control', 'litespeed-cache' ),
    154             self::O_OPTM_CSS_EXC                => __( 'CSS Excludes', 'litespeed-cache' ),
    155             self::O_OPTM_JS_EXC                 => __( 'JS Excludes', 'litespeed-cache' ),
    156             self::O_OPTM_QS_RM                  => __( 'Remove Query Strings', 'litespeed-cache' ),
    157             self::O_OPTM_GGFONTS_ASYNC          => __( 'Load Google Fonts Asynchronously', 'litespeed-cache' ),
    158             self::O_OPTM_GGFONTS_RM             => __( 'Remove Google Fonts', 'litespeed-cache' ),
    159             self::O_OPTM_CCSS_CON               => __( 'Critical CSS Rules', 'litespeed-cache' ),
    160             self::O_OPTM_CCSS_SEP_POSTTYPE      => __( 'Separate CCSS Cache Post Types', 'litespeed-cache' ),
    161             self::O_OPTM_CCSS_SEP_URI           => __( 'Separate CCSS Cache URIs', 'litespeed-cache' ),
    162             self::O_OPTM_JS_DEFER_EXC           => __( 'JS Deferred / Delayed Excludes', 'litespeed-cache' ),
    163             self::O_OPTM_GM_JS_EXC              => __( 'Guest Mode JS Excludes', 'litespeed-cache' ),
    164             self::O_OPTM_EMOJI_RM               => __( 'Remove WordPress Emoji', 'litespeed-cache' ),
    165             self::O_OPTM_NOSCRIPT_RM            => __( 'Remove Noscript Tags', 'litespeed-cache' ),
    166             self::O_OPTM_EXC                    => __( 'URI Excludes', 'litespeed-cache' ),
    167             self::O_OPTM_GUEST_ONLY             => __( 'Optimize for Guests Only', 'litespeed-cache' ),
    168             self::O_OPTM_EXC_ROLES              => __( 'Role Excludes', 'litespeed-cache' ),
    169 
    170             self::O_DISCUSS_AVATAR_CACHE        => __( 'Gravatar Cache', 'litespeed-cache' ),
    171             self::O_DISCUSS_AVATAR_CRON         => __( 'Gravatar Cache Cron', 'litespeed-cache' ),
    172             self::O_DISCUSS_AVATAR_CACHE_TTL    => __( 'Gravatar Cache TTL', 'litespeed-cache' ),
    173 
    174             self::O_MEDIA_LAZY                  => __( 'Lazy Load Images', 'litespeed-cache' ),
    175             self::O_MEDIA_LAZY_EXC              => __( 'Lazy Load Image Excludes', 'litespeed-cache' ),
    176             self::O_MEDIA_LAZY_CLS_EXC          => __( 'Lazy Load Image Class Name Excludes', 'litespeed-cache' ),
    177             self::O_MEDIA_LAZY_PARENT_CLS_EXC   => __( 'Lazy Load Image Parent Class Name Excludes', 'litespeed-cache' ),
    178             self::O_MEDIA_IFRAME_LAZY_CLS_EXC   => __( 'Lazy Load Iframe Class Name Excludes', 'litespeed-cache' ),
    179             self::O_MEDIA_IFRAME_LAZY_PARENT_CLS_EXC    => __( 'Lazy Load Iframe Parent Class Name Excludes', 'litespeed-cache' ),
    180             self::O_MEDIA_LAZY_URI_EXC          => __( 'Lazy Load URI Excludes', 'litespeed-cache' ),
    181             self::O_MEDIA_LQIP_EXC              => __( 'LQIP Excludes', 'litespeed-cache' ),
    182             self::O_MEDIA_LAZY_PLACEHOLDER      => __( 'Basic Image Placeholder', 'litespeed-cache' ),
    183             self::O_MEDIA_PLACEHOLDER_RESP      => __( 'Responsive Placeholder', 'litespeed-cache' ),
    184             self::O_MEDIA_PLACEHOLDER_RESP_COLOR    => __( 'Responsive Placeholder Color', 'litespeed-cache' ),
    185             self::O_MEDIA_PLACEHOLDER_RESP_SVG  => __( 'Responsive Placeholder SVG', 'litespeed-cache' ),
    186             self::O_MEDIA_LQIP                  => __( 'LQIP Cloud Generator', 'litespeed-cache' ),
    187             self::O_MEDIA_LQIP_QUAL             => __( 'LQIP Quality', 'litespeed-cache' ),
    188             self::O_MEDIA_LQIP_MIN_W            => __( 'LQIP Minimum Dimensions', 'litespeed-cache' ),
     82            self::O_SERVER_IP                   => __('Server IP', 'litespeed-cache'),
     83            self::O_API_KEY                     => __('Domain Key', 'litespeed-cache'),
     84            self::O_GUEST_UAS                   => __('Guest Mode User Agents', 'litespeed-cache'),
     85            self::O_GUEST_IPS                   => __('Guest Mode IPs', 'litespeed-cache'),
     86
     87            self::O_CACHE                       => __('Enable Cache', 'litespeed-cache'),
     88            self::O_CACHE_BROWSER               => __('Browser Cache', 'litespeed-cache'),
     89            self::O_CACHE_TTL_PUB               => __('Default Public Cache TTL', 'litespeed-cache'),
     90            self::O_CACHE_TTL_PRIV              => __('Default Private Cache TTL', 'litespeed-cache'),
     91            self::O_CACHE_TTL_FRONTPAGE         => __('Default Front Page TTL', 'litespeed-cache'),
     92            self::O_CACHE_TTL_FEED              => __('Default Feed TTL', 'litespeed-cache'),
     93            self::O_CACHE_TTL_REST              => __('Default REST TTL', 'litespeed-cache'),
     94            self::O_CACHE_TTL_STATUS            => __('Default HTTP Status Code Page TTL', 'litespeed-cache'),
     95            self::O_CACHE_TTL_BROWSER           => __('Browser Cache TTL', 'litespeed-cache'),
     96            self::O_AUTO_UPGRADE                => __('Automatically Upgrade', 'litespeed-cache'),
     97            self::O_GUEST                       => __('Guest Mode', 'litespeed-cache'),
     98            self::O_GUEST_OPTM                  => __('Guest Optimization', 'litespeed-cache'),
     99            self::O_NEWS                        => __('Notifications', 'litespeed-cache'),
     100            self::O_CACHE_PRIV                  => __('Cache Logged-in Users', 'litespeed-cache'),
     101            self::O_CACHE_COMMENTER             => __('Cache Commenters', 'litespeed-cache'),
     102            self::O_CACHE_REST                  => __('Cache REST API', 'litespeed-cache'),
     103            self::O_CACHE_PAGE_LOGIN            => __('Cache Login Page', 'litespeed-cache'),
     104            self::O_CACHE_FAVICON               => __('Cache favicon.ico', 'litespeed-cache'),
     105            self::O_CACHE_RES                   => __('Cache PHP Resources', 'litespeed-cache'),
     106            self::O_CACHE_MOBILE                => __('Cache Mobile', 'litespeed-cache'),
     107            self::O_CACHE_MOBILE_RULES          => __('List of Mobile User Agents', 'litespeed-cache'),
     108            self::O_CACHE_PRIV_URI              => __('Private Cached URIs', 'litespeed-cache'),
     109            self::O_CACHE_DROP_QS               => __('Drop Query String', 'litespeed-cache'),
     110
     111            self::O_OBJECT                      => __('Object Cache', 'litespeed-cache'),
     112            self::O_OBJECT_KIND                 => __('Method', 'litespeed-cache'),
     113            self::O_OBJECT_HOST                 => __('Host', 'litespeed-cache'),
     114            self::O_OBJECT_PORT                 => __('Port', 'litespeed-cache'),
     115            self::O_OBJECT_LIFE                 => __('Default Object Lifetime', 'litespeed-cache'),
     116            self::O_OBJECT_USER                 => __('Username', 'litespeed-cache'),
     117            self::O_OBJECT_PSWD                 => __('Password', 'litespeed-cache'),
     118            self::O_OBJECT_DB_ID                => __('Redis Database ID', 'litespeed-cache'),
     119            self::O_OBJECT_GLOBAL_GROUPS        => __('Global Groups', 'litespeed-cache'),
     120            self::O_OBJECT_NON_PERSISTENT_GROUPS    => __('Do Not Cache Groups', 'litespeed-cache'),
     121            self::O_OBJECT_PERSISTENT           => __('Persistent Connection', 'litespeed-cache'),
     122            self::O_OBJECT_ADMIN                => __('Cache WP-Admin', 'litespeed-cache'),
     123            self::O_OBJECT_TRANSIENTS           => __('Store Transients', 'litespeed-cache'),
     124
     125            self::O_PURGE_ON_UPGRADE            => __('Purge All On Upgrade', 'litespeed-cache'),
     126            self::O_PURGE_STALE                 => __('Serve Stale', 'litespeed-cache'),
     127            self::O_PURGE_TIMED_URLS            => __('Scheduled Purge URLs', 'litespeed-cache'),
     128            self::O_PURGE_TIMED_URLS_TIME       => __('Scheduled Purge Time', 'litespeed-cache'),
     129            self::O_CACHE_FORCE_URI             => __('Force Cache URIs', 'litespeed-cache'),
     130            self::O_CACHE_FORCE_PUB_URI         => __('Force Public Cache URIs', 'litespeed-cache'),
     131            self::O_CACHE_EXC                   => __('Do Not Cache URIs', 'litespeed-cache'),
     132            self::O_CACHE_EXC_QS                => __('Do Not Cache Query Strings', 'litespeed-cache'),
     133            self::O_CACHE_EXC_CAT               => __('Do Not Cache Categories', 'litespeed-cache'),
     134            self::O_CACHE_EXC_TAG               => __('Do Not Cache Tags', 'litespeed-cache'),
     135            self::O_CACHE_EXC_ROLES             => __('Do Not Cache Roles', 'litespeed-cache'),
     136            self::O_OPTM_CSS_MIN                => __('CSS Minify', 'litespeed-cache'),
     137            self::O_OPTM_CSS_COMB               => __('CSS Combine', 'litespeed-cache'),
     138            self::O_OPTM_CSS_COMB_EXT_INL       => __('CSS Combine External and Inline', 'litespeed-cache'),
     139            self::O_OPTM_UCSS                   => __('Generate UCSS', 'litespeed-cache'),
     140            self::O_OPTM_UCSS_INLINE            => __('UCSS Inline', 'litespeed-cache'),
     141            self::O_OPTM_UCSS_SELECTOR_WHITELIST    => __('UCSS Selector Allowlist', 'litespeed-cache'),
     142            self::O_OPTM_UCSS_FILE_EXC_INLINE   => __('UCSS File Excludes and Inline', 'litespeed-cache'),
     143            self::O_OPTM_UCSS_EXC               => __('UCSS URI Excludes', 'litespeed-cache'),
     144            self::O_OPTM_JS_MIN                 => __('JS Minify', 'litespeed-cache'),
     145            self::O_OPTM_JS_COMB                => __('JS Combine', 'litespeed-cache'),
     146            self::O_OPTM_JS_COMB_EXT_INL        => __('JS Combine External and Inline', 'litespeed-cache'),
     147            self::O_OPTM_HTML_MIN               => __('HTML Minify', 'litespeed-cache'),
     148            self::O_OPTM_HTML_LAZY              => __('HTML Lazy Load Selectors', 'litespeed-cache'),
     149            self::O_OPTM_CSS_ASYNC              => __('Load CSS Asynchronously', 'litespeed-cache'),
     150            self::O_OPTM_CCSS_PER_URL           => __('CCSS Per URL', 'litespeed-cache'),
     151            self::O_OPTM_CSS_ASYNC_INLINE       => __('Inline CSS Async Lib', 'litespeed-cache'),
     152            self::O_OPTM_CSS_FONT_DISPLAY       => __('Font Display Optimization', 'litespeed-cache'),
     153            self::O_OPTM_JS_DEFER               => __('Load JS Deferred', 'litespeed-cache'),
     154            self::O_OPTM_LOCALIZE               => __('Localize Resources', 'litespeed-cache'),
     155            self::O_OPTM_LOCALIZE_DOMAINS       => __('Localization Files', 'litespeed-cache'),
     156            self::O_OPTM_DNS_PREFETCH           => __('DNS Prefetch', 'litespeed-cache'),
     157            self::O_OPTM_DNS_PREFETCH_CTRL      => __('DNS Prefetch Control', 'litespeed-cache'),
     158            self::O_OPTM_CSS_EXC                => __('CSS Excludes', 'litespeed-cache'),
     159            self::O_OPTM_JS_DELAY_INC           => __('JS Delayed Includes', 'litespeed-cache'),
     160            self::O_OPTM_JS_EXC                 => __('JS Excludes', 'litespeed-cache'),
     161            self::O_OPTM_QS_RM                  => __('Remove Query Strings', 'litespeed-cache'),
     162            self::O_OPTM_GGFONTS_ASYNC          => __('Load Google Fonts Asynchronously', 'litespeed-cache'),
     163            self::O_OPTM_GGFONTS_RM             => __('Remove Google Fonts', 'litespeed-cache'),
     164            self::O_OPTM_CCSS_CON               => __('Critical CSS Rules', 'litespeed-cache'),
     165            self::O_OPTM_CCSS_SEP_POSTTYPE      => __('Separate CCSS Cache Post Types', 'litespeed-cache'),
     166            self::O_OPTM_CCSS_SEP_URI           => __('Separate CCSS Cache URIs', 'litespeed-cache'),
     167            self::O_OPTM_JS_DEFER_EXC           => __('JS Deferred / Delayed Excludes', 'litespeed-cache'),
     168            self::O_OPTM_GM_JS_EXC              => __('Guest Mode JS Excludes', 'litespeed-cache'),
     169            self::O_OPTM_EMOJI_RM               => __('Remove WordPress Emoji', 'litespeed-cache'),
     170            self::O_OPTM_NOSCRIPT_RM            => __('Remove Noscript Tags', 'litespeed-cache'),
     171            self::O_OPTM_EXC                    => __('URI Excludes', 'litespeed-cache'),
     172            self::O_OPTM_GUEST_ONLY             => __('Optimize for Guests Only', 'litespeed-cache'),
     173            self::O_OPTM_EXC_ROLES              => __('Role Excludes', 'litespeed-cache'),
     174
     175            self::O_DISCUSS_AVATAR_CACHE        => __('Gravatar Cache', 'litespeed-cache'),
     176            self::O_DISCUSS_AVATAR_CRON         => __('Gravatar Cache Cron', 'litespeed-cache'),
     177            self::O_DISCUSS_AVATAR_CACHE_TTL    => __('Gravatar Cache TTL', 'litespeed-cache'),
     178
     179            self::O_MEDIA_LAZY                  => __('Lazy Load Images', 'litespeed-cache'),
     180            self::O_MEDIA_LAZY_EXC              => __('Lazy Load Image Excludes', 'litespeed-cache'),
     181            self::O_MEDIA_LAZY_CLS_EXC          => __('Lazy Load Image Class Name Excludes', 'litespeed-cache'),
     182            self::O_MEDIA_LAZY_PARENT_CLS_EXC   => __('Lazy Load Image Parent Class Name Excludes', 'litespeed-cache'),
     183            self::O_MEDIA_IFRAME_LAZY_CLS_EXC   => __('Lazy Load Iframe Class Name Excludes', 'litespeed-cache'),
     184            self::O_MEDIA_IFRAME_LAZY_PARENT_CLS_EXC    => __('Lazy Load Iframe Parent Class Name Excludes', 'litespeed-cache'),
     185            self::O_MEDIA_LAZY_URI_EXC          => __('Lazy Load URI Excludes', 'litespeed-cache'),
     186            self::O_MEDIA_LQIP_EXC              => __('LQIP Excludes', 'litespeed-cache'),
     187            self::O_MEDIA_LAZY_PLACEHOLDER      => __('Basic Image Placeholder', 'litespeed-cache'),
     188            self::O_MEDIA_PLACEHOLDER_RESP      => __('Responsive Placeholder', 'litespeed-cache'),
     189            self::O_MEDIA_PLACEHOLDER_RESP_COLOR    => __('Responsive Placeholder Color', 'litespeed-cache'),
     190            self::O_MEDIA_PLACEHOLDER_RESP_SVG  => __('Responsive Placeholder SVG', 'litespeed-cache'),
     191            self::O_MEDIA_LQIP                  => __('LQIP Cloud Generator', 'litespeed-cache'),
     192            self::O_MEDIA_LQIP_QUAL             => __('LQIP Quality', 'litespeed-cache'),
     193            self::O_MEDIA_LQIP_MIN_W            => __('LQIP Minimum Dimensions', 'litespeed-cache'),
    189194            // self::O_MEDIA_LQIP_MIN_H         => __( 'LQIP Minimum Height', 'litespeed-cache' ),
    190             self::O_MEDIA_PLACEHOLDER_RESP_ASYNC    => __( 'Generate LQIP In Background', 'litespeed-cache' ),
    191             self::O_MEDIA_IFRAME_LAZY           => __( 'Lazy Load Iframes', 'litespeed-cache' ),
    192             self::O_MEDIA_ADD_MISSING_SIZES     => __( 'Add Missing Sizes', 'litespeed-cache' ),
    193             self::O_MEDIA_VPI                   => __( 'Viewport Images', 'litespeed-cache' ),
    194             self::O_MEDIA_VPI_CRON              => __( 'Viewport Images Cron', 'litespeed-cache' ),
    195 
    196             self::O_IMG_OPTM_AUTO               => __( 'Auto Request Cron', 'litespeed-cache' ),
    197             self::O_IMG_OPTM_CRON               => __( 'Auto Pull Cron', 'litespeed-cache' ),
    198             self::O_IMG_OPTM_ORI                => __( 'Optimize Original Images', 'litespeed-cache' ),
    199             self::O_IMG_OPTM_RM_BKUP            => __( 'Remove Original Backups', 'litespeed-cache' ),
    200             self::O_IMG_OPTM_WEBP               => __( 'Image WebP Replacement', 'litespeed-cache' ),
    201             self::O_IMG_OPTM_LOSSLESS           => __( 'Optimize Losslessly', 'litespeed-cache' ),
    202             self::O_IMG_OPTM_EXIF               => __( 'Preserve EXIF/XMP data', 'litespeed-cache' ),
    203             self::O_IMG_OPTM_WEBP_ATTR          => __( 'WebP Attribute To Replace', 'litespeed-cache' ),
    204             self::O_IMG_OPTM_WEBP_REPLACE_SRCSET    => __( 'WebP For Extra srcset', 'litespeed-cache' ),
    205             self::O_IMG_OPTM_JPG_QUALITY        => __( 'WordPress Image Quality Control', 'litespeed-cache' ),
    206             self::O_ESI                         => __( 'Enable ESI', 'litespeed-cache' ),
    207             self::O_ESI_CACHE_ADMBAR            => __( 'Cache Admin Bar', 'litespeed-cache' ),
    208             self::O_ESI_CACHE_COMMFORM          => __( 'Cache Comment Form', 'litespeed-cache' ),
    209             self::O_ESI_NONCE                   => __( 'ESI Nonces', 'litespeed-cache' ),
    210             self::O_CACHE_VARY_GROUP            => __( 'Vary Group', 'litespeed-cache' ),
    211             self::O_PURGE_HOOK_ALL              => __( 'Purge All Hooks', 'litespeed-cache' ),
    212             self::O_UTIL_NO_HTTPS_VARY          => __( 'Improve HTTP/HTTPS Compatibility', 'litespeed-cache' ),
    213             self::O_UTIL_INSTANT_CLICK          => __( 'Instant Click', 'litespeed-cache' ),
    214             self::O_CACHE_EXC_COOKIES           => __( 'Do Not Cache Cookies', 'litespeed-cache' ),
    215             self::O_CACHE_EXC_USERAGENTS        => __( 'Do Not Cache User Agents', 'litespeed-cache' ),
    216             self::O_CACHE_LOGIN_COOKIE          => __( 'Login Cookie', 'litespeed-cache' ),
    217 
    218             self::O_MISC_HEARTBEAT_FRONT        => __( 'Frontend Heartbeat Control', 'litespeed-cache' ),
    219             self::O_MISC_HEARTBEAT_FRONT_TTL    => __( 'Frontend Heartbeat TTL', 'litespeed-cache' ),
    220             self::O_MISC_HEARTBEAT_BACK         => __( 'Backend Heartbeat Control', 'litespeed-cache' ),
    221             self::O_MISC_HEARTBEAT_BACK_TTL     => __( 'Backend Heartbeat TTL', 'litespeed-cache' ),
    222             self::O_MISC_HEARTBEAT_EDITOR       => __( 'Editor Heartbeat', 'litespeed-cache' ),
    223             self::O_MISC_HEARTBEAT_EDITOR_TTL   => __( 'Editor Heartbeat TTL', 'litespeed-cache' ),
    224 
    225             self::O_CDN_QUIC                    => __( 'QUIC.cloud CDN', 'litespeed-cache' ),
    226             self::O_CDN                         => __( 'Use CDN Mapping', 'litespeed-cache' ),
    227             self::CDN_MAPPING_URL               => __( 'CDN URL', 'litespeed-cache' ),
    228             self::CDN_MAPPING_INC_IMG           => __( 'Include Images', 'litespeed-cache' ),
    229             self::CDN_MAPPING_INC_CSS           => __( 'Include CSS', 'litespeed-cache' ),
    230             self::CDN_MAPPING_INC_JS            => __( 'Include JS', 'litespeed-cache' ),
    231             self::CDN_MAPPING_FILETYPE          => __( 'Include File Types', 'litespeed-cache' ),
    232             self::O_CDN_ATTR                    => __( 'HTML Attribute To Replace', 'litespeed-cache' ),
    233             self::O_CDN_ORI                     => __( 'Original URLs', 'litespeed-cache' ),
    234             self::O_CDN_ORI_DIR                 => __( 'Included Directories', 'litespeed-cache' ),
    235             self::O_CDN_EXC                     => __( 'Exclude Path', 'litespeed-cache' ),
    236             self::O_CDN_CLOUDFLARE              => __( 'Cloudflare API', 'litespeed-cache' ),
    237 
    238             self::O_CRAWLER                 => __( 'Crawler', 'litespeed-cache' ),
    239             self::O_CRAWLER_USLEEP          => __( 'Delay', 'litespeed-cache' ),
    240             self::O_CRAWLER_RUN_DURATION    => __( 'Run Duration', 'litespeed-cache' ),
    241             self::O_CRAWLER_RUN_INTERVAL    => __( 'Interval Between Runs', 'litespeed-cache' ),
    242             self::O_CRAWLER_CRAWL_INTERVAL  => __( 'Crawl Interval', 'litespeed-cache' ),
    243             self::O_CRAWLER_THREADS         => __( 'Threads', 'litespeed-cache' ),
    244             self::O_CRAWLER_TIMEOUT         => __( 'Timeout', 'litespeed-cache' ),
    245             self::O_CRAWLER_LOAD_LIMIT      => __( 'Server Load Limit', 'litespeed-cache' ),
    246             self::O_CRAWLER_ROLES           => __( 'Role Simulation', 'litespeed-cache' ),
    247             self::O_CRAWLER_COOKIES         => __( 'Cookie Simulation', 'litespeed-cache' ),
    248             self::O_CRAWLER_SITEMAP         => __( 'Custom Sitemap', 'litespeed-cache' ),
    249             self::O_CRAWLER_DROP_DOMAIN     => __( 'Drop Domain from Sitemap', 'litespeed-cache' ),
    250             self::O_CRAWLER_MAP_TIMEOUT     => __( 'Sitemap Timeout', 'litespeed-cache' ),
    251 
    252             self::O_DEBUG_DISABLE_ALL           => __( 'Disable All Features', 'litespeed-cache' ),
    253             self::O_DEBUG                       => __( 'Debug Log', 'litespeed-cache' ),
    254             self::O_DEBUG_IPS                   => __( 'Admin IPs', 'litespeed-cache' ),
    255             self::O_DEBUG_LEVEL                 => __( 'Debug Level', 'litespeed-cache' ),
    256             self::O_DEBUG_FILESIZE              => __( 'Log File Size Limit', 'litespeed-cache' ),
    257             self::O_DEBUG_COOKIE                => __( 'Log Cookies', 'litespeed-cache' ),
    258             self::O_DEBUG_COLLAPS_QS            => __( 'Collapse Query Strings', 'litespeed-cache' ),
    259             self::O_DEBUG_INC                   => __( 'Debug URI Includes', 'litespeed-cache' ),
    260             self::O_DEBUG_EXC                   => __( 'Debug URI Excludes', 'litespeed-cache' ),
    261             self::O_DEBUG_EXC_STRINGS           => __( 'Debug String Excludes', 'litespeed-cache' ),
    262 
    263             self::O_DB_OPTM_REVISIONS_MAX       => __( 'Revisions Max Number', 'litespeed-cache' ),
    264             self::O_DB_OPTM_REVISIONS_AGE       => __( 'Revisions Max Age', 'litespeed-cache' ),
    265 
    266         ) ;
    267 
    268         if ( array_key_exists( $id, $_lang_list ) ) {
    269             return $_lang_list[ $id ] ;
     195            self::O_MEDIA_PLACEHOLDER_RESP_ASYNC    => __('Generate LQIP In Background', 'litespeed-cache'),
     196            self::O_MEDIA_IFRAME_LAZY           => __('Lazy Load Iframes', 'litespeed-cache'),
     197            self::O_MEDIA_ADD_MISSING_SIZES     => __('Add Missing Sizes', 'litespeed-cache'),
     198            self::O_MEDIA_VPI                   => __('Viewport Images', 'litespeed-cache'),
     199            self::O_MEDIA_VPI_CRON              => __('Viewport Images Cron', 'litespeed-cache'),
     200
     201            self::O_IMG_OPTM_AUTO               => __('Auto Request Cron', 'litespeed-cache'),
     202            self::O_IMG_OPTM_CRON               => __('Auto Pull Cron', 'litespeed-cache'),
     203            self::O_IMG_OPTM_ORI                => __('Optimize Original Images', 'litespeed-cache'),
     204            self::O_IMG_OPTM_RM_BKUP            => __('Remove Original Backups', 'litespeed-cache'),
     205            self::O_IMG_OPTM_WEBP               => __('Image WebP Replacement', 'litespeed-cache'),
     206            self::O_IMG_OPTM_LOSSLESS           => __('Optimize Losslessly', 'litespeed-cache'),
     207            self::O_IMG_OPTM_EXIF               => __('Preserve EXIF/XMP data', 'litespeed-cache'),
     208            self::O_IMG_OPTM_WEBP_ATTR          => __('WebP Attribute To Replace', 'litespeed-cache'),
     209            self::O_IMG_OPTM_WEBP_REPLACE_SRCSET    => __('WebP For Extra srcset', 'litespeed-cache'),
     210            self::O_IMG_OPTM_JPG_QUALITY        => __('WordPress Image Quality Control', 'litespeed-cache'),
     211            self::O_ESI                         => __('Enable ESI', 'litespeed-cache'),
     212            self::O_ESI_CACHE_ADMBAR            => __('Cache Admin Bar', 'litespeed-cache'),
     213            self::O_ESI_CACHE_COMMFORM          => __('Cache Comment Form', 'litespeed-cache'),
     214            self::O_ESI_NONCE                   => __('ESI Nonces', 'litespeed-cache'),
     215            self::O_CACHE_VARY_GROUP            => __('Vary Group', 'litespeed-cache'),
     216            self::O_PURGE_HOOK_ALL              => __('Purge All Hooks', 'litespeed-cache'),
     217            self::O_UTIL_NO_HTTPS_VARY          => __('Improve HTTP/HTTPS Compatibility', 'litespeed-cache'),
     218            self::O_UTIL_INSTANT_CLICK          => __('Instant Click', 'litespeed-cache'),
     219            self::O_CACHE_EXC_COOKIES           => __('Do Not Cache Cookies', 'litespeed-cache'),
     220            self::O_CACHE_EXC_USERAGENTS        => __('Do Not Cache User Agents', 'litespeed-cache'),
     221            self::O_CACHE_LOGIN_COOKIE          => __('Login Cookie', 'litespeed-cache'),
     222
     223            self::O_MISC_HEARTBEAT_FRONT        => __('Frontend Heartbeat Control', 'litespeed-cache'),
     224            self::O_MISC_HEARTBEAT_FRONT_TTL    => __('Frontend Heartbeat TTL', 'litespeed-cache'),
     225            self::O_MISC_HEARTBEAT_BACK         => __('Backend Heartbeat Control', 'litespeed-cache'),
     226            self::O_MISC_HEARTBEAT_BACK_TTL     => __('Backend Heartbeat TTL', 'litespeed-cache'),
     227            self::O_MISC_HEARTBEAT_EDITOR       => __('Editor Heartbeat', 'litespeed-cache'),
     228            self::O_MISC_HEARTBEAT_EDITOR_TTL   => __('Editor Heartbeat TTL', 'litespeed-cache'),
     229
     230            self::O_CDN_QUIC                    => __('QUIC.cloud CDN', 'litespeed-cache'),
     231            self::O_CDN                         => __('Use CDN Mapping', 'litespeed-cache'),
     232            self::CDN_MAPPING_URL               => __('CDN URL', 'litespeed-cache'),
     233            self::CDN_MAPPING_INC_IMG           => __('Include Images', 'litespeed-cache'),
     234            self::CDN_MAPPING_INC_CSS           => __('Include CSS', 'litespeed-cache'),
     235            self::CDN_MAPPING_INC_JS            => __('Include JS', 'litespeed-cache'),
     236            self::CDN_MAPPING_FILETYPE          => __('Include File Types', 'litespeed-cache'),
     237            self::O_CDN_ATTR                    => __('HTML Attribute To Replace', 'litespeed-cache'),
     238            self::O_CDN_ORI                     => __('Original URLs', 'litespeed-cache'),
     239            self::O_CDN_ORI_DIR                 => __('Included Directories', 'litespeed-cache'),
     240            self::O_CDN_EXC                     => __('Exclude Path', 'litespeed-cache'),
     241            self::O_CDN_CLOUDFLARE              => __('Cloudflare API', 'litespeed-cache'),
     242
     243            self::O_CRAWLER                 => __('Crawler', 'litespeed-cache'),
     244            self::O_CRAWLER_USLEEP          => __('Delay', 'litespeed-cache'),
     245            self::O_CRAWLER_RUN_DURATION    => __('Run Duration', 'litespeed-cache'),
     246            self::O_CRAWLER_RUN_INTERVAL    => __('Interval Between Runs', 'litespeed-cache'),
     247            self::O_CRAWLER_CRAWL_INTERVAL  => __('Crawl Interval', 'litespeed-cache'),
     248            self::O_CRAWLER_THREADS         => __('Threads', 'litespeed-cache'),
     249            self::O_CRAWLER_TIMEOUT         => __('Timeout', 'litespeed-cache'),
     250            self::O_CRAWLER_LOAD_LIMIT      => __('Server Load Limit', 'litespeed-cache'),
     251            self::O_CRAWLER_ROLES           => __('Role Simulation', 'litespeed-cache'),
     252            self::O_CRAWLER_COOKIES         => __('Cookie Simulation', 'litespeed-cache'),
     253            self::O_CRAWLER_SITEMAP         => __('Custom Sitemap', 'litespeed-cache'),
     254            self::O_CRAWLER_DROP_DOMAIN     => __('Drop Domain from Sitemap', 'litespeed-cache'),
     255            self::O_CRAWLER_MAP_TIMEOUT     => __('Sitemap Timeout', 'litespeed-cache'),
     256
     257            self::O_DEBUG_DISABLE_ALL           => __('Disable All Features', 'litespeed-cache'),
     258            self::O_DEBUG                       => __('Debug Log', 'litespeed-cache'),
     259            self::O_DEBUG_IPS                   => __('Admin IPs', 'litespeed-cache'),
     260            self::O_DEBUG_LEVEL                 => __('Debug Level', 'litespeed-cache'),
     261            self::O_DEBUG_FILESIZE              => __('Log File Size Limit', 'litespeed-cache'),
     262            self::O_DEBUG_COOKIE                => __('Log Cookies', 'litespeed-cache'),
     263            self::O_DEBUG_COLLAPS_QS            => __('Collapse Query Strings', 'litespeed-cache'),
     264            self::O_DEBUG_INC                   => __('Debug URI Includes', 'litespeed-cache'),
     265            self::O_DEBUG_EXC                   => __('Debug URI Excludes', 'litespeed-cache'),
     266            self::O_DEBUG_EXC_STRINGS           => __('Debug String Excludes', 'litespeed-cache'),
     267
     268            self::O_DB_OPTM_REVISIONS_MAX       => __('Revisions Max Number', 'litespeed-cache'),
     269            self::O_DB_OPTM_REVISIONS_AGE       => __('Revisions Max Age', 'litespeed-cache'),
     270
     271        );
     272
     273        if (array_key_exists($id, $_lang_list)) {
     274            return $_lang_list[$id];
    270275        }
    271276
    272         return 'N/A' ;
     277        return 'N/A';
    273278    }
    274 
    275279}
  • litespeed-cache/trunk/src/object-cache.cls.php

    r2928795 r2954001  
    388388                continue;
    389389            }
    390             if ( $v[ 'pid' ] > 0 ) {
     390            if ( !empty($v['pid']) || !empty($v['curr_connections']) ) {
    391391                return true;
    392392            }
  • litespeed-cache/trunk/src/optimize.cls.php

    r2832517 r2954001  
    11<?php
     2
    23/**
    34 * The optimize class.
     
    56 * @since       1.2.2
    67 */
     8
    79namespace LiteSpeed;
    810
    9 defined( 'WPINC' ) || exit;
    10 
    11 class Optimize extends Base {
     11defined('WPINC') || exit;
     12
     13class Optimize extends Base
     14{
    1215    const LIB_FILE_CSS_ASYNC = 'assets/js/css_async.min.js';
    1316    const LIB_FILE_WEBFONTLOADER = 'assets/js/webfontloader.min.js';
     
    2427    private $cfg_js_comb;
    2528    private $cfg_css_async;
     29    private $cfg_js_delay_inc = array();
    2630    private $cfg_js_defer;
    2731    private $cfg_js_defer_exc = false;
     
    4852     * @since  4.0
    4953     */
    50     public function __construct() {
    51         Debug2::debug( '[Optm] init' );
    52         $this->__optimizer = $this->cls( 'Optimizer' );
     54    public function __construct()
     55    {
     56        Debug2::debug('[Optm] init');
     57        $this->__optimizer = $this->cls('Optimizer');
    5358    }
    5459
     
    5964     * @access protected
    6065     */
    61     public function init() {
    62         $this->cfg_css_async = defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_CSS_ASYNC );
    63         if ( $this->cfg_css_async ) {
    64             if ( ! $this->conf( self::O_API_KEY ) ) {
    65                 Debug2::debug( '[Optm] ❌ CCSS set to OFF due to missing domain key' );
     66    public function init()
     67    {
     68        $this->cfg_css_async = defined('LITESPEED_GUEST_OPTM') || $this->conf(self::O_OPTM_CSS_ASYNC);
     69        if ($this->cfg_css_async) {
     70            if (!$this->conf(self::O_API_KEY)) {
     71                Debug2::debug('[Optm] ❌ CCSS set to OFF due to missing domain key');
    6672                $this->cfg_css_async = false;
    6773            }
    68             if ( ( defined( 'LITESPEED_GUEST_OPTM' ) || ( $this->conf( self::O_OPTM_UCSS ) && $this->conf( self::O_OPTM_CSS_COMB ) ) ) && $this->conf( self::O_OPTM_UCSS_INLINE ) ) {
    69                 Debug2::debug( '[Optm] ❌ CCSS set to OFF due to UCSS Inline' );
     74            if ((defined('LITESPEED_GUEST_OPTM') || ($this->conf(self::O_OPTM_UCSS) && $this->conf(self::O_OPTM_CSS_COMB))) && $this->conf(self::O_OPTM_UCSS_INLINE)) {
     75                Debug2::debug('[Optm] ❌ CCSS set to OFF due to UCSS Inline');
    7076                $this->cfg_css_async = false;
    7177            }
    7278        }
    73         $this->cfg_js_defer = $this->conf( self::O_OPTM_JS_DEFER );
    74         if ( defined( 'LITESPEED_GUEST_OPTM' ) ) {
     79        $this->cfg_js_defer = $this->conf(self::O_OPTM_JS_DEFER);
     80        if (defined('LITESPEED_GUEST_OPTM')) {
    7581            $this->cfg_js_defer = 2;
    7682        }
    77         if ( $this->cfg_js_defer == 2 ) {
    78             add_filter( 'litespeed_optm_cssjs', function( $con, $file_type ){
    79                 if ( $file_type == 'js' ) {
    80                     $con = str_replace( 'DOMContentLoaded', 'DOMContentLiteSpeedLoaded', $con );
     83        if ($this->cfg_js_defer == 2) {
     84            add_filter('litespeed_optm_cssjs', function ($con, $file_type) {
     85                if ($file_type == 'js') {
     86                    $con = str_replace('DOMContentLoaded', 'DOMContentLiteSpeedLoaded', $con);
    8187                    // $con = str_replace( 'addEventListener("load"', 'addEventListener("litespeedLoad"', $con );
    8288                }
    8389                return $con;
    84             }, 20, 2 );
     90            }, 20, 2);
    8591        }
    8692
    8793        // To remove emoji from WP
    88         if ( $this->conf( self::O_OPTM_EMOJI_RM ) ) {
     94        if ($this->conf(self::O_OPTM_EMOJI_RM)) {
    8995            $this->_emoji_rm();
    9096        }
    9197
    92         if ( $this->conf( self::O_OPTM_QS_RM ) ) {
    93             add_filter( 'style_loader_src', array( $this, 'remove_query_strings' ), 999 );
    94             add_filter( 'script_loader_src', array( $this, 'remove_query_strings' ), 999 );
     98        if ($this->conf(self::O_OPTM_QS_RM)) {
     99            add_filter('style_loader_src', array($this, 'remove_query_strings'), 999);
     100            add_filter('script_loader_src', array($this, 'remove_query_strings'), 999);
    95101        }
    96102
    97103        // GM JS exclude @since 4.1
    98         if ( defined( 'LITESPEED_GUEST_OPTM' ) ) {
    99             $this->cfg_js_defer_exc = apply_filters( 'litespeed_optm_gm_js_exc', $this->conf( self::O_OPTM_GM_JS_EXC ) );
    100         }
    101         else {
     104        if (defined('LITESPEED_GUEST_OPTM')) {
     105            $this->cfg_js_defer_exc = apply_filters('litespeed_optm_gm_js_exc', $this->conf(self::O_OPTM_GM_JS_EXC));
     106        } else {
    102107            /**
    103108             * Exclude js from deferred setting
    104109             * @since 1.5
    105110             */
    106             if ( $this->cfg_js_defer ) {
    107                 add_filter( 'litespeed_optm_js_defer_exc', array( $this->cls( 'Data' ), 'load_js_defer_exc' ) );
    108                 $this->cfg_js_defer_exc = apply_filters( 'litespeed_optm_js_defer_exc', $this->conf( self::O_OPTM_JS_DEFER_EXC ) );
     111            if ($this->cfg_js_defer) {
     112                add_filter('litespeed_optm_js_defer_exc', array($this->cls('Data'), 'load_js_defer_exc'));
     113                $this->cfg_js_defer_exc = apply_filters('litespeed_optm_js_defer_exc', $this->conf(self::O_OPTM_JS_DEFER_EXC));
     114
     115                $this->cfg_js_delay_inc = apply_filters('litespeed_optm_js_delay_inc', $this->conf(self::O_OPTM_JS_DELAY_INC));
    109116            }
    110117        }
     
    114121         * @since  1.6
    115122         */
    116         add_filter( 'litespeed_vary', array( $this, 'vary_add_role_exclude' ) );
     123        add_filter('litespeed_vary', array($this, 'vary_add_role_exclude'));
    117124
    118125        /**
     
    122129        $this->_dns_prefetch_init();
    123130
    124         add_filter( 'litespeed_buffer_finalize', array( $this, 'finalize' ), 20 );
     131        add_filter('litespeed_buffer_finalize', array($this, 'finalize'), 20);
    125132    }
    126133
     
    131138     * @access public
    132139     */
    133     public function vary_add_role_exclude( $vary ) {
    134         if ( $this->cls( 'Conf' )->in_optm_exc_roles() ) {
    135             $vary[ 'role_exclude_optm' ] = 1;
     140    public function vary_add_role_exclude($vary)
     141    {
     142        if ($this->cls('Conf')->in_optm_exc_roles()) {
     143            $vary['role_exclude_optm'] = 1;
    136144        }
    137145
     
    146154     * @access private
    147155     */
    148     private function _emoji_rm() {
    149         remove_action( 'wp_head' , 'print_emoji_detection_script', 7 );
    150         remove_action( 'admin_print_scripts' , 'print_emoji_detection_script' );
    151         remove_filter( 'the_content_feed' , 'wp_staticize_emoji' );
    152         remove_filter( 'comment_text_rss' , 'wp_staticize_emoji' );
     156    private function _emoji_rm()
     157    {
     158        remove_action('wp_head', 'print_emoji_detection_script', 7);
     159        remove_action('admin_print_scripts', 'print_emoji_detection_script');
     160        remove_filter('the_content_feed', 'wp_staticize_emoji');
     161        remove_filter('comment_text_rss', 'wp_staticize_emoji');
    153162        /**
    154163         * Added for better result
    155164         * @since  1.6.2.1
    156165         */
    157         remove_action( 'wp_print_styles', 'print_emoji_styles' );
    158         remove_action( 'admin_print_styles', 'print_emoji_styles' );
    159         remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
     166        remove_action('wp_print_styles', 'print_emoji_styles');
     167        remove_action('admin_print_styles', 'print_emoji_styles');
     168        remove_filter('wp_mail', 'wp_staticize_emoji_for_email');
    160169    }
    161170
     
    166175     * @access public
    167176     */
    168     public function rm_cache_folder( $subsite_id = false ) {
    169         if ( $subsite_id ) {
    170             file_exists( LITESPEED_STATIC_DIR . '/css/' . $subsite_id ) && File::rrmdir( LITESPEED_STATIC_DIR . '/css/' . $subsite_id );
    171             file_exists( LITESPEED_STATIC_DIR . '/js/' . $subsite_id ) && File::rrmdir( LITESPEED_STATIC_DIR . '/js/' . $subsite_id );
     177    public function rm_cache_folder($subsite_id = false)
     178    {
     179        if ($subsite_id) {
     180            file_exists(LITESPEED_STATIC_DIR . '/css/' . $subsite_id) && File::rrmdir(LITESPEED_STATIC_DIR . '/css/' . $subsite_id);
     181            file_exists(LITESPEED_STATIC_DIR . '/js/' . $subsite_id) && File::rrmdir(LITESPEED_STATIC_DIR . '/js/' . $subsite_id);
    172182            return;
    173183        }
    174184
    175         file_exists( LITESPEED_STATIC_DIR . '/css' ) && File::rrmdir( LITESPEED_STATIC_DIR . '/css' );
    176         file_exists( LITESPEED_STATIC_DIR . '/js' ) && File::rrmdir( LITESPEED_STATIC_DIR . '/js' );
     185        file_exists(LITESPEED_STATIC_DIR . '/css') && File::rrmdir(LITESPEED_STATIC_DIR . '/css');
     186        file_exists(LITESPEED_STATIC_DIR . '/js') && File::rrmdir(LITESPEED_STATIC_DIR . '/js');
    177187    }
    178188
     
    183193     * @access public
    184194     */
    185     public function remove_query_strings( $src ) {
    186         if ( strpos( $src, '_litespeed_rm_qs=0' ) || strpos( $src, '/recaptcha' ) ) {
     195    public function remove_query_strings($src)
     196    {
     197        if (strpos($src, '_litespeed_rm_qs=0') || strpos($src, '/recaptcha')) {
    187198            return $src;
    188199        }
    189200
    190         if ( ! Utility::is_internal_file( $src ) ) {
     201        if (!Utility::is_internal_file($src)) {
    191202            return $src;
    192203        }
    193204
    194         if ( strpos( $src, '.js?' ) !== false || strpos( $src, '.css?' ) !== false ) {
    195             $src = preg_replace( '/\?.*/', '', $src );
     205        if (strpos($src, '.js?') !== false || strpos($src, '.css?') !== false) {
     206            $src = preg_replace('/\?.*/', '', $src);
    196207        }
    197208
     
    207218     * @return  string The content that is after optimization
    208219     */
    209     public function finalize( $content ) {
    210         if ( defined( 'LITESPEED_NO_PAGEOPTM' ) ) {
    211             Debug2::debug2( '[Optm] bypass: NO_PAGEOPTM const' );
     220    public function finalize($content)
     221    {
     222        if (defined('LITESPEED_NO_PAGEOPTM')) {
     223            Debug2::debug2('[Optm] bypass: NO_PAGEOPTM const');
    212224            return $content;
    213225        }
    214226
    215         if ( ! defined( 'LITESPEED_IS_HTML' ) ) {
    216             Debug2::debug( '[Optm] bypass: Not frontend HTML type' );
     227        if (!defined('LITESPEED_IS_HTML')) {
     228            Debug2::debug('[Optm] bypass: Not frontend HTML type');
    217229            return $content;
    218230        }
    219231
    220         if ( ! defined( 'LITESPEED_GUEST_OPTM' ) ) {
    221             if ( ! Control::is_cacheable() ) {
    222                 Debug2::debug( '[Optm] bypass: Not cacheable' );
     232        if (!defined('LITESPEED_GUEST_OPTM')) {
     233            if (!Control::is_cacheable()) {
     234                Debug2::debug('[Optm] bypass: Not cacheable');
    223235                return $content;
    224236            }
    225237
    226238            // Check if hit URI excludes
    227             add_filter( 'litespeed_optm_uri_exc', array( $this->cls( 'Data' ), 'load_optm_uri_exc' ) );
    228             $excludes = apply_filters( 'litespeed_optm_uri_exc', $this->conf( self::O_OPTM_EXC ) );
    229             $result = Utility::str_hit_array( $_SERVER[ 'REQUEST_URI' ], $excludes );
    230             if ( $result ) {
    231                 Debug2::debug( '[Optm] bypass: hit URI Excludes setting: ' . $result );
     239            add_filter('litespeed_optm_uri_exc', array($this->cls('Data'), 'load_optm_uri_exc'));
     240            $excludes = apply_filters('litespeed_optm_uri_exc', $this->conf(self::O_OPTM_EXC));
     241            $result = Utility::str_hit_array($_SERVER['REQUEST_URI'], $excludes);
     242            if ($result) {
     243                Debug2::debug('[Optm] bypass: hit URI Excludes setting: ' . $result);
    232244                return $content;
    233245            }
    234246        }
    235247
    236         Debug2::debug( '[Optm] start' );
     248        Debug2::debug('[Optm] start');
    237249
    238250        $this->content_ori = $this->content = $content;
     
    248260     * @access private
    249261     */
    250     private function _optimize() {
     262    private function _optimize()
     263    {
    251264        global $wp;
    252         $this->_request_url = home_url( $wp->request );
    253 
    254         $this->cfg_css_min = defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_CSS_MIN );
    255         $this->cfg_css_comb = defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_CSS_COMB );
    256         $this->cfg_js_min = defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_JS_MIN );
    257         $this->cfg_js_comb = defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_JS_COMB );
    258         $this->cfg_ggfonts_rm = defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_GGFONTS_RM );
    259         $this->cfg_ggfonts_async = ! defined( 'LITESPEED_GUEST_OPTM' ) && $this->conf( self::O_OPTM_GGFONTS_ASYNC ); // forced rm already
    260         $this->_conf_css_font_display = ! defined( 'LITESPEED_GUEST_OPTM' ) && $this->conf( self::O_OPTM_CSS_FONT_DISPLAY );
    261 
    262         if ( ! $this->cls( 'Router' )->can_optm() ) {
    263             Debug2::debug( '[Optm] bypass: admin/feed/preview' );
     265        $this->_request_url = home_url($wp->request);
     266
     267        $this->cfg_css_min = defined('LITESPEED_GUEST_OPTM') || $this->conf(self::O_OPTM_CSS_MIN);
     268        $this->cfg_css_comb = defined('LITESPEED_GUEST_OPTM') || $this->conf(self::O_OPTM_CSS_COMB);
     269        $this->cfg_js_min = defined('LITESPEED_GUEST_OPTM') || $this->conf(self::O_OPTM_JS_MIN);
     270        $this->cfg_js_comb = defined('LITESPEED_GUEST_OPTM') || $this->conf(self::O_OPTM_JS_COMB);
     271        $this->cfg_ggfonts_rm = defined('LITESPEED_GUEST_OPTM') || $this->conf(self::O_OPTM_GGFONTS_RM);
     272        $this->cfg_ggfonts_async = !defined('LITESPEED_GUEST_OPTM') && $this->conf(self::O_OPTM_GGFONTS_ASYNC); // forced rm already
     273        $this->_conf_css_font_display = !defined('LITESPEED_GUEST_OPTM') && $this->conf(self::O_OPTM_CSS_FONT_DISPLAY);
     274
     275        if (!$this->cls('Router')->can_optm()) {
     276            Debug2::debug('[Optm] bypass: admin/feed/preview');
    264277            return;
    265278        }
    266279
    267         if ( $this->cfg_css_async ) {
    268             $this->_ccss = $this->cls( 'CSS' )->prepare_ccss();
    269             if ( ! $this->_ccss ) {
    270                 Debug2::debug( '[Optm] ❌ CCSS set to OFF due to CCSS not generated yet' );
     280        if ($this->cfg_css_async) {
     281            $this->_ccss = $this->cls('CSS')->prepare_ccss();
     282            if (!$this->_ccss) {
     283                Debug2::debug('[Optm] ❌ CCSS set to OFF due to CCSS not generated yet');
    271284                $this->cfg_css_async = false;
    272             }
    273             else if ( strpos( $this->_ccss, '<style id="litespeed-ccss" data-error' ) === 0 ) {
    274                 Debug2::debug( '[Optm] ❌ CCSS set to OFF due to CCSS failed to generate' );
     285            } else if (strpos($this->_ccss, '<style id="litespeed-ccss" data-error') === 0) {
     286                Debug2::debug('[Optm] ❌ CCSS set to OFF due to CCSS failed to generate');
    275287                $this->cfg_css_async = false;
    276288            }
    277289        }
    278290
    279         do_action( 'litespeed_optm' );
     291        do_action('litespeed_optm');
    280292
    281293        // Parse css from content
    282294        $src_list = false;
    283         if ( $this->cfg_css_min || $this->cfg_css_comb || $this->cfg_ggfonts_rm || $this->cfg_css_async || $this->cfg_ggfonts_async  || $this->_conf_css_font_display ) {
    284             add_filter( 'litespeed_optimize_css_excludes', array( $this->cls( 'Data' ), 'load_css_exc' ) );
    285             list( $src_list, $html_list ) = $this->_parse_css();
     295        if ($this->cfg_css_min || $this->cfg_css_comb || $this->cfg_ggfonts_rm || $this->cfg_css_async || $this->cfg_ggfonts_async  || $this->_conf_css_font_display) {
     296            add_filter('litespeed_optimize_css_excludes', array($this->cls('Data'), 'load_css_exc'));
     297            list($src_list, $html_list) = $this->_parse_css();
    286298        }
    287299
    288300        // css optimizer
    289         if ( $this->cfg_css_min || $this->cfg_css_comb ) {
    290 
    291             if ( $src_list ) {
     301        if ($this->cfg_css_min || $this->cfg_css_comb) {
     302
     303            if ($src_list) {
    292304                // IF combine
    293                 if ( $this->cfg_css_comb ) {
     305                if ($this->cfg_css_comb) {
    294306                    // Check if has inline UCSS enabled or not
    295                     if ( ( defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_UCSS ) ) && $this->conf( self::O_OPTM_UCSS_INLINE ) ) {
    296                         $filename = $this->cls( 'UCSS' )->load( $this->_request_url, true );
    297                         if ( $filename ) {
    298                             $filepath_prefix = $this->_build_filepath_prefix( 'ucss' );
    299                             $this->_ucss = File::read( LITESPEED_STATIC_DIR . $filepath_prefix . $filename );
     307                    if ((defined('LITESPEED_GUEST_OPTM') || $this->conf(self::O_OPTM_UCSS)) && $this->conf(self::O_OPTM_UCSS_INLINE)) {
     308                        $filename = $this->cls('UCSS')->load($this->_request_url, true);
     309                        if ($filename) {
     310                            $filepath_prefix = $this->_build_filepath_prefix('ucss');
     311                            $this->_ucss = File::read(LITESPEED_STATIC_DIR . $filepath_prefix . $filename);
    300312
    301313                            // Drop all css
    302                             $this->content = str_replace( $html_list, '', $this->content );
     314                            $this->content = str_replace($html_list, '', $this->content);
    303315                        }
    304316                    }
    305317
    306                     if ( ! $this->_ucss ) {
    307                         $url = $this->_build_hash_url( $src_list );
    308 
    309                         if ( $url ) {
     318                    if (!$this->_ucss) {
     319                        $url = $this->_build_hash_url($src_list);
     320
     321                        if ($url) {
    310322                            // Handle css async load
    311                             if ( $this->cfg_css_async ) {
     323                            if ($this->cfg_css_async) {
    312324                                $this->html_head .= '<link rel="preload" data-asynced="1" data-optimized="2" as="style" onload="this.onload=null;this.rel=\'stylesheet\'" href="' . $url . '" />'; // todo: How to use " in attr wrapper "
     325                            } else {
     326                                $this->html_head .= '<link data-optimized="2" rel="stylesheet" href="' . $url . '" />'; // use 2 as combined
    313327                            }
    314                             else {
    315                                 $this->html_head .= '<link data-optimized="2" rel="stylesheet" href="' . $url . '" />';// use 2 as combined
    316                             }
    317328
    318329                            // Move all css to top
    319                             $this->content = str_replace( $html_list, '', $this->content );
     330                            $this->content = str_replace($html_list, '', $this->content);
    320331                        }
    321332                    }
    322333                }
    323334                // Only minify
    324                 elseif ( $this->cfg_css_min ) {
     335                elseif ($this->cfg_css_min) {
    325336                    // will handle async css load inside
    326                     $this->_src_queue_handler( $src_list, $html_list );
     337                    $this->_src_queue_handler($src_list, $html_list);
    327338                }
    328339                // Only HTTP2 push
    329340                else {
    330                     foreach ( $src_list as $src_info ) {
    331                         if ( ! empty( $src_info[ 'inl' ] ) ) {
     341                    foreach ($src_list as $src_info) {
     342                        if (!empty($src_info['inl'])) {
    332343                            continue;
    333344                        }
     
    338349
    339350        // Handle css lazy load if not handled async loaded yet
    340         if ( $this->cfg_css_async && ! $this->cfg_css_min && ! $this->cfg_css_comb ) {
     351        if ($this->cfg_css_async && !$this->cfg_css_min && !$this->cfg_css_comb) {
    341352            // async html
    342             $html_list_async = $this->_async_css_list( $html_list, $src_list );
     353            $html_list_async = $this->_async_css_list($html_list, $src_list);
    343354
    344355            // Replace async css
    345             $this->content = str_replace( $html_list, $html_list_async, $this->content );
    346 
     356            $this->content = str_replace($html_list, $html_list_async, $this->content);
    347357        }
    348358
    349359        // Parse js from buffer as needed
    350360        $src_list = false;
    351         if ( $this->cfg_js_min || $this->cfg_js_comb || $this->cfg_js_defer ) {
    352             add_filter( 'litespeed_optimize_js_excludes', array( $this->cls( 'Data' ), 'load_js_exc' ) );
    353             list( $src_list, $html_list ) = $this->_parse_js();
     361        if ($this->cfg_js_min || $this->cfg_js_comb || $this->cfg_js_defer || $this->cfg_js_delay_inc) {
     362            add_filter('litespeed_optimize_js_excludes', array($this->cls('Data'), 'load_js_exc'));
     363            list($src_list, $html_list) = $this->_parse_js();
    354364        }
    355365
    356366        // js optimizer
    357         if ( $src_list ) {
     367        if ($src_list) {
    358368            // IF combine
    359             if ( $this->cfg_js_comb ) {
    360                 $url = $this->_build_hash_url( $src_list, 'js' );
    361                 if ( $url ) {
    362                     $this->html_foot .= $this->_build_js_tag( $url );
     369            if ($this->cfg_js_comb) {
     370                $url = $this->_build_hash_url($src_list, 'js');
     371                if ($url) {
     372                    $this->html_foot .= $this->_build_js_tag($url);
    363373
    364374                    // Will move all JS to bottom combined one
    365                     $this->content = str_replace( $html_list, '', $this->content );
     375                    $this->content = str_replace($html_list, '', $this->content);
    366376                }
    367377            }
    368378            // Only minify
    369             elseif ( $this->cfg_js_min ) {
     379            elseif ($this->cfg_js_min) {
    370380                // Will handle js defer inside
    371                 $this->_src_queue_handler( $src_list, $html_list, 'js' );
     381                $this->_src_queue_handler($src_list, $html_list, 'js');
    372382            }
    373383            // Only HTTP2 push and Defer
    374384            else {
    375                 foreach ( $src_list as $k => $src_info ) {
     385                foreach ($src_list as $k => $src_info) {
    376386                    // Inline JS
    377                     if ( ! empty( $src_info[ 'inl' ] ) ) {
    378                         if ( $this->cfg_js_defer ) {
    379                             $attrs = ! empty( $src_info[ 'attrs' ] ) ? $src_info[ 'attrs' ] : '';
    380                             $deferred = $this->_js_inline_defer( $src_info[ 'src' ], $attrs );
    381                             if ( $deferred ) {
    382                                 $this->content = str_replace( $html_list[ $k ], $deferred, $this->content );
     387                    if (!empty($src_info['inl'])) {
     388                        if ($this->cfg_js_defer) {
     389                            $attrs = !empty($src_info['attrs']) ? $src_info['attrs'] : '';
     390                            $deferred = $this->_js_inline_defer($src_info['src'], $attrs);
     391                            if ($deferred) {
     392                                $this->content = str_replace($html_list[$k], $deferred, $this->content);
    383393                            }
    384394                        }
     
    386396                    // JS files
    387397                    else {
    388                         if ( $this->cfg_js_defer ) {
    389                             $deferred = $this->_js_defer( $html_list[ $k ], $src_info[ 'src' ] );
    390                             if ( $deferred ) {
    391                                 $this->content = str_replace( $html_list[ $k ], $deferred, $this->content );
     398                        if ($this->cfg_js_defer) {
     399                            $deferred = $this->_js_defer($html_list[$k], $src_info['src']);
     400                            if ($deferred) {
     401                                $this->content = str_replace($html_list[$k], $deferred, $this->content);
     402                            }
     403                        } else if ($this->cfg_js_delay_inc) {
     404                            $deferred = $this->_js_delay($html_list[$k], $src_info['src']);
     405                            if ($deferred) {
     406                                $this->content = str_replace($html_list[$k], $deferred, $this->content);
    392407                            }
    393408                        }
     
    399414        // Append JS inline var for preserved ESI
    400415        // Shouldn't give any optm (defer/delay) @since 4.4
    401         if ( $this->_var_preserve_js ) {
    402             $this->html_head .= '<script>var ' . implode( ',', $this->_var_preserve_js ) . ';</script>';
    403             Debug2::debug2( '[Optm] Inline JS defer vars', $this->_var_preserve_js );
     416        if ($this->_var_preserve_js) {
     417            $this->html_head .= '<script>var ' . implode(',', $this->_var_preserve_js) . ';</script>';
     418            Debug2::debug2('[Optm] Inline JS defer vars', $this->_var_preserve_js);
    404419        }
    405420
    406421        // Append async compatibility lib to head
    407         if ( $this->cfg_css_async ) {
     422        if ($this->cfg_css_async) {
    408423            // Inline css async lib
    409             if ( $this->conf( self::O_OPTM_CSS_ASYNC_INLINE ) ) {
    410                 $this->html_head .= $this->_build_js_inline( File::read( LSCWP_DIR . self::LIB_FILE_CSS_ASYNC ), true );
    411             }
    412             else {
     424            if ($this->conf(self::O_OPTM_CSS_ASYNC_INLINE)) {
     425                $this->html_head .= $this->_build_js_inline(File::read(LSCWP_DIR . self::LIB_FILE_CSS_ASYNC), true);
     426            } else {
    413427                $css_async_lib_url = LSWCP_PLUGIN_URL . self::LIB_FILE_CSS_ASYNC;
    414                 $this->html_head .= $this->_build_js_tag( $css_async_lib_url, 'litespeed-css-async-lib' ); // Don't exclude it from defer for now
     428                $this->html_head .= $this->_build_js_tag($css_async_lib_url, 'litespeed-css-async-lib'); // Don't exclude it from defer for now
    415429            }
    416430        }
     
    434448         * HTML Lazyload
    435449         */
    436         if ( $this->conf( self::O_OPTM_HTML_LAZY ) ) {
    437             $this->html_head = $this->cls( 'CSS' )->prepare_html_lazy() . $this->html_head;
     450        if ($this->conf(self::O_OPTM_HTML_LAZY)) {
     451            $this->html_head = $this->cls('CSS')->prepare_html_lazy() . $this->html_head;
    438452        }
    439453
    440454        // Maybe prepend inline UCSS
    441         if ( $this->_ucss ) {
     455        if ($this->_ucss) {
    442456            $this->html_head = '<style id="litespeed-ucss">' . $this->_ucss . '</style>' . $this->html_head;
    443457        }
    444458
    445459        // Check if there is any critical css rules setting
    446         if ( $this->cfg_css_async && $this->_ccss ) {
     460        if ($this->cfg_css_async && $this->_ccss) {
    447461            $this->html_head = $this->_ccss . $this->html_head;
    448462        }
    449463
    450464        // Replace html head part
    451         $this->html_head = apply_filters( 'litespeed_optm_html_head', $this->html_head );
    452         if ( $this->html_head ) {
    453             if ( apply_filters( 'litespeed_optm_html_after_head', false ) ) {
    454                 $this->content = str_replace( '</head>', $this->html_head . '</head>', $this->content );
    455             }
    456             else {
     465        $this->html_head = apply_filters('litespeed_optm_html_head', $this->html_head);
     466        if ($this->html_head) {
     467            if (apply_filters('litespeed_optm_html_after_head', false)) {
     468                $this->content = str_replace('</head>', $this->html_head . '</head>', $this->content);
     469            } else {
    457470                // Put header content to be after charset
    458                 if ( strpos( $this->content, '<meta charset' ) !== false ) {
    459                     $this->content = preg_replace( '#<meta charset([^>]*)>#isU', '<meta charset$1>' . $this->html_head , $this->content, 1 );
    460                 }
    461                 else {
    462                     $this->content = preg_replace( '#<head([^>]*)>#isU', '<head$1>' . $this->html_head , $this->content, 1 );
     471                if (strpos($this->content, '<meta charset') !== false) {
     472                    $this->content = preg_replace('#<meta charset([^>]*)>#isU', '<meta charset$1>' . $this->html_head, $this->content, 1);
     473                } else {
     474                    $this->content = preg_replace('#<head([^>]*)>#isU', '<head$1>' . $this->html_head, $this->content, 1);
    463475                }
    464476            }
     
    466478
    467479        // Replace html foot part
    468         $this->html_foot = apply_filters( 'litespeed_optm_html_foot', $this->html_foot );
    469         if ( $this->html_foot ) {
    470             $this->content = str_replace( '</body>', $this->html_foot . '</body>' , $this->content );
     480        $this->html_foot = apply_filters('litespeed_optm_html_foot', $this->html_foot);
     481        if ($this->html_foot) {
     482            $this->content = str_replace('</body>', $this->html_foot . '</body>', $this->content);
    471483        }
    472484
    473485        // Drop noscript if enabled
    474         if ( $this->conf( self::O_OPTM_NOSCRIPT_RM ) ) {
     486        if ($this->conf(self::O_OPTM_NOSCRIPT_RM)) {
    475487            // $this->content = preg_replace( '#<noscript>.*</noscript>#isU', '', $this->content );
    476488        }
    477489
    478490        // HTML minify
    479         if ( defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_HTML_MIN ) ) {
    480             $this->content = $this->__optimizer->html_min( $this->content );
     491        if (defined('LITESPEED_GUEST_OPTM') || $this->conf(self::O_OPTM_HTML_MIN)) {
     492            $this->content = $this->__optimizer->html_min($this->content);
    481493        }
    482494    }
     
    487499     * @since  4.0
    488500     */
    489     private function _build_js_tag( $src ) {
    490         if ( $this->cfg_js_defer === 2 ) {
     501    private function _build_js_tag($src)
     502    {
     503        if ($this->cfg_js_defer === 2 || Utility::str_hit_array($src, $this->cfg_js_delay_inc)) {
    491504            return '<script data-optimized="1" type="litespeed/javascript" data-src="' . $src . '"></script>';
    492505        }
    493506
    494         if ( $this->cfg_js_defer ) {
     507        if ($this->cfg_js_defer) {
    495508            return '<script data-optimized="1" src="' . $src . '" defer></script>';
    496509        }
     
    504517     * @since  4.0
    505518     */
    506     private function _build_js_inline( $script, $minified = false ) {
    507         if ( $this->cfg_js_defer ) {
    508             $deferred = $this->_js_inline_defer( $script, false, $minified );
    509             if ( $deferred ) {
     519    private function _build_js_inline($script, $minified = false)
     520    {
     521        if ($this->cfg_js_defer) {
     522            $deferred = $this->_js_inline_defer($script, false, $minified);
     523            if ($deferred) {
    510524                return $deferred;
    511525            }
     
    520534     * @since 4.0
    521535     */
    522     private function _maybe_js_delay() {
    523         if ( $this->cfg_js_defer !== 2 ) {
     536    private function _maybe_js_delay()
     537    {
     538        if ($this->cfg_js_defer !== 2 && !$this->cfg_js_delay_inc) {
    524539            return;
    525540        }
    526541
    527         $this->html_foot .= '<script>' . File::read( LSCWP_DIR . self::LIB_FILE_JS_DELAY ) . '</script>';
     542        $this->html_foot .= '<script>' . File::read(LSCWP_DIR . self::LIB_FILE_JS_DELAY) . '</script>';
    528543    }
    529544
     
    534549     * @access private
    535550     */
    536     private function _async_ggfonts() {
    537         if ( ! $this->cfg_ggfonts_async || ! $this->_ggfonts_urls ) {
     551    private function _async_ggfonts()
     552    {
     553        if (!$this->cfg_ggfonts_async || !$this->_ggfonts_urls) {
    538554            return;
    539555        }
    540556
    541         Debug2::debug2( '[Optm] google fonts async found: ', $this->_ggfonts_urls );
     557        Debug2::debug2('[Optm] google fonts async found: ', $this->_ggfonts_urls);
    542558
    543559        $html = '<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />';
     
    553569         *  <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,300,300italic,400italic,600,700,900&#038;subset=latin%2Clatin-ext' />
    554570         */
    555         $script ='WebFontConfig={google:{families:[';
     571        $script = 'WebFontConfig={google:{families:[';
    556572
    557573        $families = array();
    558         foreach ( $this->_ggfonts_urls as $v ) {
    559             $qs = wp_specialchars_decode( $v );
    560             $qs = urldecode( $qs );
    561             $qs = parse_url( $qs, PHP_URL_QUERY );
    562             parse_str( $qs, $qs );
    563 
    564             if ( empty( $qs[ 'family' ] ) ) {
    565                 Debug2::debug( '[Optm] ERR ggfonts failed to find family: ' . $v );
     574        foreach ($this->_ggfonts_urls as $v) {
     575            $qs = wp_specialchars_decode($v);
     576            $qs = urldecode($qs);
     577            $qs = parse_url($qs, PHP_URL_QUERY);
     578            parse_str($qs, $qs);
     579
     580            if (empty($qs['family'])) {
     581                Debug2::debug('[Optm] ERR ggfonts failed to find family: ' . $v);
    566582                continue;
    567583            }
    568584
    569             $subset = empty( $qs[ 'subset' ] ) ? '' : ':' . $qs[ 'subset' ];
    570 
    571             foreach ( array_filter( explode( '|', $qs[ 'family' ] ) ) as $v2 ) {
     585            $subset = empty($qs['subset']) ? '' : ':' . $qs['subset'];
     586
     587            foreach (array_filter(explode('|', $qs['family'])) as $v2) {
    572588                $families[] = $v2 . $subset;
    573589            }
    574590        }
    575591
    576         $script .= '"' . implode( '","', $families ) . ( $this->_conf_css_font_display ? '&display=swap' : '' ) . '"';
     592        $script .= '"' . implode('","', $families) . ($this->_conf_css_font_display ? '&display=swap' : '') . '"';
    577593
    578594        $script .= ']}};';
     
    581597        $script .= 'if ( typeof WebFont === "object" && typeof WebFont.load === "function" ) { WebFont.load( WebFontConfig ); }';
    582598
    583         $html .= $this->_build_js_inline( $script );
     599        $html .= $this->_build_js_inline($script);
    584600
    585601        // https://cdnjs.cloudflare.com/ajax/libs/webfont/1.6.28/webfontloader.js
     
    587603
    588604        // default async, if js defer set use defer
    589         $html .= $this->_build_js_tag( $webfont_lib_url );
     605        $html .= $this->_build_js_tag($webfont_lib_url);
    590606
    591607        // Put this in the very beginning for preconnect
     
    599615     * @access private
    600616     */
    601     private function _font_optm() {
    602         if ( ! $this->_conf_css_font_display || ! $this->_ggfonts_urls ) {
     617    private function _font_optm()
     618    {
     619        if (!$this->_conf_css_font_display || !$this->_ggfonts_urls) {
    603620            return;
    604621        }
    605622
    606         Debug2::debug2( '[Optm] google fonts optm ', $this->_ggfonts_urls );
    607 
    608         foreach ( $this->_ggfonts_urls as $v ) {
    609             if ( strpos( $v, 'display=' ) ) {
     623        Debug2::debug2('[Optm] google fonts optm ', $this->_ggfonts_urls);
     624
     625        foreach ($this->_ggfonts_urls as $v) {
     626            if (strpos($v, 'display=')) {
    610627                continue;
    611628            }
    612             $this->html_head = str_replace( $v, $v . '&#038;display=swap', $this->html_head );
    613             $this->html_foot = str_replace( $v, $v . '&#038;display=swap', $this->html_foot );
    614             $this->content = str_replace( $v, $v . '&#038;display=swap', $this->content );
     629            $this->html_head = str_replace($v, $v . '&#038;display=swap', $this->html_head);
     630            $this->html_foot = str_replace($v, $v . '&#038;display=swap', $this->html_foot);
     631            $this->content = str_replace($v, $v . '&#038;display=swap', $this->content);
    615632        }
    616633    }
     
    622639     * @access private
    623640     */
    624     private function _dns_prefetch_init() {
     641    private function _dns_prefetch_init()
     642    {
    625643        // Widely enable link DNS prefetch
    626         if ( defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( self::O_OPTM_DNS_PREFETCH_CTRL ) ) {
    627             @header( 'X-DNS-Prefetch-Control: on' );
    628         }
    629 
    630         $this->dns_prefetch = $this->conf( self::O_OPTM_DNS_PREFETCH );
    631         if ( ! $this->dns_prefetch ) {
     644        if (defined('LITESPEED_GUEST_OPTM') || $this->conf(self::O_OPTM_DNS_PREFETCH_CTRL)) {
     645            @header('X-DNS-Prefetch-Control: on');
     646        }
     647
     648        $this->dns_prefetch = $this->conf(self::O_OPTM_DNS_PREFETCH);
     649        if (!$this->dns_prefetch) {
    632650            return;
    633651        }
    634652
    635         if ( function_exists( 'wp_resource_hints' ) ) {
    636             add_filter( 'wp_resource_hints', array( $this, 'dns_prefetch_filter' ), 10, 2 );
    637         }
    638         else {
    639             add_action( 'litespeed_optm', array( $this, 'dns_prefetch_output' ) );
     653        if (function_exists('wp_resource_hints')) {
     654            add_filter('wp_resource_hints', array($this, 'dns_prefetch_filter'), 10, 2);
     655        } else {
     656            add_action('litespeed_optm', array($this, 'dns_prefetch_output'));
    640657        }
    641658    }
     
    647664     * @access public
    648665     */
    649     public function dns_prefetch_filter( $urls, $relation_type ) {
    650         if ( $relation_type !== 'dns-prefetch' ) {
     666    public function dns_prefetch_filter($urls, $relation_type)
     667    {
     668        if ($relation_type !== 'dns-prefetch') {
    651669            return $urls;
    652670        }
    653671
    654         foreach ( $this->dns_prefetch as $v ) {
    655             if ( $v ) {
     672        foreach ($this->dns_prefetch as $v) {
     673            if ($v) {
    656674                $urls[] = $v;
    657675            }
     
    667685     * @access public
    668686     */
    669     public function dns_prefetch_output() {
    670         foreach ( $this->dns_prefetch as $v ) {
    671             if ( $v ) {
     687    public function dns_prefetch_output()
     688    {
     689        foreach ($this->dns_prefetch as $v) {
     690            if ($v) {
    672691                $this->html_head .= '<link rel="dns-prefetch" href="' . $v . '" />';
    673692            }
     
    681700     * @access private
    682701     */
    683     private function _src_queue_handler( $src_list, $html_list, $file_type = 'css' ) {
     702    private function _src_queue_handler($src_list, $html_list, $file_type = 'css')
     703    {
    684704        $html_list_ori = $html_list;
    685705
    686         $can_webp = ( defined( 'LITESPEED_GUEST_OPTM' ) || $this->conf( Base::O_IMG_OPTM_WEBP ) ) && $this->cls( 'Media' )->webp_support();
     706        $can_webp = (defined('LITESPEED_GUEST_OPTM') || $this->conf(Base::O_IMG_OPTM_WEBP)) && $this->cls('Media')->webp_support();
    687707
    688708        $tag = $file_type == 'css' ? 'link' : 'script';
    689         foreach ( $src_list as $key => $src_info ) {
     709        foreach ($src_list as $key => $src_info) {
    690710            // Minify inline CSS/JS
    691             if ( ! empty( $src_info[ 'inl' ] ) ) {
    692                 if ( $file_type == 'css' ) {
    693                     $code = Optimizer::minify_css( $src_info[ 'src' ] );
    694                     $can_webp && $code = $this->cls( 'Media' )->replace_background_webp( $code );
    695                     $snippet = str_replace( $src_info[ 'src' ], $code, $html_list[ $key ] );
    696                 }
    697                 else {
     711            if (!empty($src_info['inl'])) {
     712                if ($file_type == 'css') {
     713                    $code = Optimizer::minify_css($src_info['src']);
     714                    $can_webp && $code = $this->cls('Media')->replace_background_webp($code);
     715                    $snippet = str_replace($src_info['src'], $code, $html_list[$key]);
     716                } else {
    698717                    // Inline defer JS
    699                     if ( $this->cfg_js_defer ) {
    700                         $attrs = ! empty( $src_info[ 'attrs' ] ) ? $src_info[ 'attrs' ] : '';
    701                         $snippet = $this->_js_inline_defer( $src_info[ 'src' ], $attrs ) ?: $html_list[ $key ];
     718                    if ($this->cfg_js_defer) {
     719                        $attrs = !empty($src_info['attrs']) ? $src_info['attrs'] : '';
     720                        $snippet = $this->_js_inline_defer($src_info['src'], $attrs) ?: $html_list[$key];
     721                    } else {
     722                        $code = Optimizer::minify_js($src_info['src']);
     723                        $snippet = str_replace($src_info['src'], $code, $html_list[$key]);
    702724                    }
    703                     else {
    704                         $code = Optimizer::minify_js( $src_info[ 'src' ] );
    705                         $snippet = str_replace( $src_info[ 'src' ], $code, $html_list[ $key ] );
    706                     }
    707                 }
    708 
     725                }
    709726            }
    710727            // CSS/JS files
    711728            else {
    712                 $url = $this->_build_single_hash_url( $src_info[ 'src' ], $file_type );
    713                 if ( $url ) {
    714                     $snippet = str_replace( $src_info[ 'src' ], $url, $html_list[ $key ] );
     729                $url = $this->_build_single_hash_url($src_info['src'], $file_type);
     730                if ($url) {
     731                    $snippet = str_replace($src_info['src'], $url, $html_list[$key]);
    715732                }
    716733
    717734                // Handle css async load
    718                 if ( $file_type == 'css' && $this->cfg_css_async ) {
    719                     $snippet = $this->_async_css( $snippet );
     735                if ($file_type == 'css' && $this->cfg_css_async) {
     736                    $snippet = $this->_async_css($snippet);
    720737                }
    721738
    722739                // Handle js defer
    723                 if ( $file_type === 'js' && $this->cfg_js_defer ) {
    724                     $snippet = $this->_js_defer( $snippet, $src_info[ 'src' ] ) ?: $snippet;
    725                 }
    726             }
    727 
    728             $snippet = str_replace( "<$tag ", '<' . $tag . ' data-optimized="1" ', $snippet );
    729             $html_list[ $key ] = $snippet;
    730         }
    731 
    732         $this->content = str_replace( $html_list_ori, $html_list, $this->content );
     740                if ($file_type === 'js' && $this->cfg_js_defer) {
     741                    $snippet = $this->_js_defer($snippet, $src_info['src']) ?: $snippet;
     742                }
     743            }
     744
     745            $snippet = str_replace("<$tag ", '<' . $tag . ' data-optimized="1" ', $snippet);
     746            $html_list[$key] = $snippet;
     747        }
     748
     749        $this->content = str_replace($html_list_ori, $html_list, $this->content);
    733750    }
    734751
     
    737754     * @since  4.0
    738755     */
    739     private function _build_single_hash_url( $src, $file_type = 'css' ) {
    740         $content = $this->__optimizer->load_file( $src, $file_type );
    741 
    742         $is_min = $this->__optimizer->is_min( $src );
    743 
    744         $content = $this->__optimizer->optm_snippet( $content, $file_type, ! $is_min, $src );
    745 
    746         $filepath_prefix = $this->_build_filepath_prefix( $file_type );
     756    private function _build_single_hash_url($src, $file_type = 'css')
     757    {
     758        $content = $this->__optimizer->load_file($src, $file_type);
     759
     760        $is_min = $this->__optimizer->is_min($src);
     761
     762        $content = $this->__optimizer->optm_snippet($content, $file_type, !$is_min, $src);
     763
     764        $filepath_prefix = $this->_build_filepath_prefix($file_type);
    747765
    748766        // Save to file
    749         $filename = $filepath_prefix . md5( $this->remove_query_strings( $src ) ) . '.' . $file_type;
     767        $filename = $filepath_prefix . md5($this->remove_query_strings($src)) . '.' . $file_type;
    750768        $static_file = LITESPEED_STATIC_DIR . $filename;
    751         File::save( $static_file, $content, true );
     769        File::save($static_file, $content, true);
    752770
    753771        // QS is required as $src may contains version info
    754         $qs_hash = substr( md5( $src ), -5 );
     772        $qs_hash = substr(md5($src), -5);
    755773        return LITESPEED_STATIC_URL . "$filename?ver=$qs_hash";
    756774    }
     
    762780     * @access private
    763781     */
    764     private function _build_hash_url( $src_list, $file_type = 'css' ) {
     782    private function _build_hash_url($src_list, $file_type = 'css')
     783    {
    765784        // $url_sensitive = $this->conf( self::O_OPTM_CSS_UNIQUE ) && $file_type == 'css'; // If need to keep unique CSS per URI
    766785
    767786        // Replace preserved ESI (before generating hash)
    768         if ( $file_type == 'js' ) {
    769             foreach ( $src_list as $k => $v ) {
    770                 if ( empty( $v[ 'inl' ] ) ) {
    771                     continue;
    772                 }
    773                 $src_list[ $k ][ 'src' ] = $this->_preserve_esi( $v[ 'src' ] );
     787        if ($file_type == 'js') {
     788            foreach ($src_list as $k => $v) {
     789                if (empty($v['inl'])) {
     790                    continue;
     791                }
     792                $src_list[$k]['src'] = $this->_preserve_esi($v['src']);
    774793            }
    775794        }
    776795
    777796        $minify = $file_type === 'css' ? $this->cfg_css_min : $this->cfg_js_min;
    778         $filename_info = $this->__optimizer->serve( $this->_request_url, $file_type, $minify, $src_list );
    779 
    780         if ( ! $filename_info ) {
     797        $filename_info = $this->__optimizer->serve($this->_request_url, $file_type, $minify, $src_list);
     798
     799        if (!$filename_info) {
    781800            return false; // Failed to generate
    782801        }
    783802
    784         list( $filename, $type ) = $filename_info;
     803        list($filename, $type) = $filename_info;
    785804
    786805        // Add cache tag in case later file deleted to avoid lscache served stale non-existed files @since 4.4.1
    787         Tag::add( Tag::TYPE_MIN . '.' . $filename );
    788 
    789         $qs_hash = substr( md5( self::get_option( self::ITEM_TIMESTAMP_PURGE_CSS) ), -5 );
     806        Tag::add(Tag::TYPE_MIN . '.' . $filename);
     807
     808        $qs_hash = substr(md5(self::get_option(self::ITEM_TIMESTAMP_PURGE_CSS)), -5);
    790809        // As filename is alreay realted to filecon md5, no need QS anymore
    791         $filepath_prefix = $this->_build_filepath_prefix( $type );
     810        $filepath_prefix = $this->_build_filepath_prefix($type);
    792811        return LITESPEED_STATIC_URL . $filepath_prefix . $filename . '?ver=' . $qs_hash;
    793812    }
     
    799818     * @access private
    800819     */
    801     private function _parse_js() {
    802         $excludes = apply_filters( 'litespeed_optimize_js_excludes', $this->conf( self::O_OPTM_JS_EXC ) );
    803 
    804         $combine_ext_inl = $this->conf( self::O_OPTM_JS_COMB_EXT_INL );
     820    private function _parse_js()
     821    {
     822        $excludes = apply_filters('litespeed_optimize_js_excludes', $this->conf(self::O_OPTM_JS_EXC));
     823
     824        $combine_ext_inl = $this->conf(self::O_OPTM_JS_COMB_EXT_INL);
    805825
    806826        $src_list = array();
    807827        $html_list = array();
    808828
    809         $content = preg_replace( '#<!--.*-->#sU', '', $this->content );
    810         preg_match_all( '#<script([^>]*)>(.*)</script>#isU', $content, $matches, PREG_SET_ORDER );
    811         foreach ( $matches as $match ) {
    812             $attrs = empty( $match[ 1 ] ) ? array() : Utility::parse_attr( $match[ 1 ] );
    813 
    814             if ( isset( $attrs[ 'data-optimized' ] ) ) {
     829        $content = preg_replace('#<!--.*-->#sU', '', $this->content);
     830        preg_match_all('#<script([^>]*)>(.*)</script>#isU', $content, $matches, PREG_SET_ORDER);
     831        foreach ($matches as $match) {
     832            $attrs = empty($match[1]) ? array() : Utility::parse_attr($match[1]);
     833
     834            if (isset($attrs['data-optimized'])) {
    815835                continue;
    816836            }
    817             if ( ! empty( $attrs[ 'data-no-optimize' ] ) ) {
     837            if (!empty($attrs['data-no-optimize'])) {
    818838                continue;
    819839            }
    820             if ( ! empty( $attrs[ 'data-cfasync' ] ) && $attrs[ 'data-cfasync' ] === 'false'  ) {
     840            if (!empty($attrs['data-cfasync']) && $attrs['data-cfasync'] === 'false') {
    821841                continue;
    822842            }
    823             if ( ! empty( $attrs[ 'type' ] ) && $attrs[ 'type' ] != 'text/javascript' ) {
     843            if (!empty($attrs['type']) && $attrs['type'] != 'text/javascript') {
    824844                continue;
    825845            }
    826846
    827847            // to avoid multiple replacement
    828             if ( in_array( $match[ 0 ], $html_list ) ) {
     848            if (in_array($match[0], $html_list)) {
    829849                continue;
    830850            }
     
    832852            $this_src_arr = array();
    833853            // JS files
    834             if ( ! empty( $attrs[ 'src' ] ) ) {
     854            if (!empty($attrs['src'])) {
    835855                // Exclude check
    836                 $js_excluded = Utility::str_hit_array( $attrs[ 'src' ], $excludes );
    837                 $is_internal = Utility::is_internal_file( $attrs[ 'src' ] );
    838                 $is_file = substr( $attrs[ 'src' ], 0, 5 ) != 'data:';
    839                 $ext_excluded = ! $combine_ext_inl && ! $is_internal;
    840                 if ( $js_excluded || $ext_excluded || ! $is_file ) {
     856                $js_excluded = Utility::str_hit_array($attrs['src'], $excludes);
     857                $is_internal = Utility::is_internal_file($attrs['src']);
     858                $is_file = substr($attrs['src'], 0, 5) != 'data:';
     859                $ext_excluded = !$combine_ext_inl && !$is_internal;
     860                if ($js_excluded || $ext_excluded || !$is_file) {
    841861                    // Maybe defer
    842                     if ( $this->cfg_js_defer ) {
    843                         $deferred = $this->_js_defer( $match[ 0 ], $attrs[ 'src' ] );
    844                         if ( $deferred ) {
    845                             $this->content = str_replace( $match[ 0 ], $deferred, $this->content );
     862                    if ($this->cfg_js_defer) {
     863                        $deferred = $this->_js_defer($match[0], $attrs['src']);
     864                        if ($deferred) {
     865                            $this->content = str_replace($match[0], $deferred, $this->content);
    846866                        }
    847867                    }
    848868
    849                     Debug2::debug2( '[Optm] _parse_js bypassed due to ' . ( $js_excluded ? 'js files excluded [hit] ' . $js_excluded : 'external js' ) );
    850                     continue;
    851                 }
    852 
    853                 if ( strpos( $attrs[ 'src' ], '/localres/' ) !== false ) {
    854                     continue;
    855                 }
    856 
    857                 if ( strpos( $attrs[ 'src' ], 'instant_click' ) !== false ) {
    858                     continue;
    859                 }
    860 
    861                 $this_src_arr[ 'src' ] = $attrs[ 'src' ];
     869                    Debug2::debug2('[Optm] _parse_js bypassed due to ' . ($js_excluded ? 'js files excluded [hit] ' . $js_excluded : 'external js'));
     870                    continue;
     871                }
     872
     873                if (strpos($attrs['src'], '/localres/') !== false) {
     874                    continue;
     875                }
     876
     877                if (strpos($attrs['src'], 'instant_click') !== false) {
     878                    continue;
     879                }
     880
     881                $this_src_arr['src'] = $attrs['src'];
    862882            }
    863883            // Inline JS
    864             elseif ( ! empty( $match[ 2 ] ) ) {
     884            elseif (!empty($match[2])) {
    865885                // Debug2::debug( '🌹🌹🌹 ' . $match[2] . '🌹' );
    866886                // Exclude check
    867                 $js_excluded = Utility::str_hit_array( $match[ 2 ], $excludes );
    868                 if ( $js_excluded || ! $combine_ext_inl ) {
     887                $js_excluded = Utility::str_hit_array($match[2], $excludes);
     888                if ($js_excluded || !$combine_ext_inl) {
    869889                    // Maybe defer
    870                     if ( $this->cfg_js_defer ) {
    871                         $deferred = $this->_js_inline_defer( $match[ 2 ], $match[ 1 ] );
    872                         if ( $deferred ) {
    873                             $this->content = str_replace( $match[ 0 ], $deferred, $this->content );
     890                    if ($this->cfg_js_defer) {
     891                        $deferred = $this->_js_inline_defer($match[2], $match[1]);
     892                        if ($deferred) {
     893                            $this->content = str_replace($match[0], $deferred, $this->content);
    874894                        }
    875895                    }
    876                     Debug2::debug2( '[Optm] _parse_js bypassed due to ' . ( $js_excluded ? 'js excluded [hit] ' . $js_excluded : 'inline js' ) );
    877                     continue;
    878                 }
    879 
    880                 $this_src_arr[ 'inl' ] = true;
    881                 $this_src_arr[ 'src' ] = $match[ 2 ];
    882                 if ( $match[ 1 ] ) {
    883                     $this_src_arr[ 'attrs' ] = $match[ 1 ];
    884                 }
    885             }
    886             else { // Compatibility to those who changed src to data-src already
    887                 Debug2::debug2( '[Optm] No JS src or inline JS content' );
     896                    Debug2::debug2('[Optm] _parse_js bypassed due to ' . ($js_excluded ? 'js excluded [hit] ' . $js_excluded : 'inline js'));
     897                    continue;
     898                }
     899
     900                $this_src_arr['inl'] = true;
     901                $this_src_arr['src'] = $match[2];
     902                if ($match[1]) {
     903                    $this_src_arr['attrs'] = $match[1];
     904                }
     905            } else { // Compatibility to those who changed src to data-src already
     906                Debug2::debug2('[Optm] No JS src or inline JS content');
    888907                continue;
    889908            }
    890909
    891910            $src_list[] = $this_src_arr;
    892             $html_list[] = $match[ 0 ];
    893         }
    894 
    895         return array( $src_list, $html_list );
     911            $html_list[] = $match[0];
     912        }
     913
     914        return array($src_list, $html_list);
    896915    }
    897916
     
    902921     * @access private
    903922     */
    904     private function _js_inline_defer( $con, $attrs = false, $minified = false ) {
    905         if ( strpos( $attrs, 'data-no-defer' ) !== false ) {
    906             Debug2::debug2( '[Optm] bypass: attr api data-no-defer' );
     923    private function _js_inline_defer($con, $attrs = false, $minified = false)
     924    {
     925        if (strpos($attrs, 'data-no-defer') !== false) {
     926            Debug2::debug2('[Optm] bypass: attr api data-no-defer');
    907927            return false;
    908928        }
    909929
    910         $hit = Utility::str_hit_array( $con, $this->cfg_js_defer_exc );
    911         if ( $hit ) {
    912             Debug2::debug2( '[Optm] inline js defer excluded [setting] ' . $hit );
     930        $hit = Utility::str_hit_array($con, $this->cfg_js_defer_exc);
     931        if ($hit) {
     932            Debug2::debug2('[Optm] inline js defer excluded [setting] ' . $hit);
    913933            return false;
    914934        }
    915935
    916         $con = trim( $con );
     936        $con = trim($con);
    917937        // Minify JS first
    918         if ( ! $minified ) { // && $this->cfg_js_defer !== 2
    919             $con = Optimizer::minify_js( $con );
    920         }
    921 
    922         if ( ! $con ) {
     938        if (!$minified) { // && $this->cfg_js_defer !== 2
     939            $con = Optimizer::minify_js($con);
     940        }
     941
     942        if (!$con) {
    923943            return false;
    924944        }
    925945
    926946        // Check if the content contains ESI nonce or not
    927         $con = $this->_preserve_esi( $con );
    928 
    929         if ( $this->cfg_js_defer === 2 ) {
     947        $con = $this->_preserve_esi($con);
     948
     949        if ($this->cfg_js_defer === 2) {
    930950            // Drop type attribute from $attrs
    931             if ( strpos( $attrs, ' type=' ) !== false ) {
    932                 $attrs = preg_replace( '# type=([\'"])([^\1]+)\1#isU', '', $attrs );
     951            if (strpos($attrs, ' type=') !== false) {
     952                $attrs = preg_replace('# type=([\'"])([^\1]+)\1#isU', '', $attrs);
    933953            }
    934954            // Replace DOMContentLoaded
    935             $con = str_replace( 'DOMContentLoaded', 'DOMContentLiteSpeedLoaded', $con );
     955            $con = str_replace('DOMContentLoaded', 'DOMContentLiteSpeedLoaded', $con);
    936956            return '<script' . $attrs . ' type="litespeed/javascript">' . $con . '</script>';
    937957            // return '<script' . $attrs . ' type="litespeed/javascript" src="data:text/javascript;base64,' . base64_encode( $con ) . '"></script>';
     
    939959        }
    940960
    941         return '<script' . $attrs . ' src="data:text/javascript;base64,' . base64_encode( $con ) . '" defer></script>';
     961        return '<script' . $attrs . ' src="data:text/javascript;base64,' . base64_encode($con) . '" defer></script>';
    942962    }
    943963
     
    947967     * @since  3.5.1
    948968     */
    949     private function _preserve_esi( $con ) {
    950         $esi_placeholder_list = $this->cls( 'ESI' )->contain_preserve_esi( $con );
    951         if ( ! $esi_placeholder_list ) {
     969    private function _preserve_esi($con)
     970    {
     971        $esi_placeholder_list = $this->cls('ESI')->contain_preserve_esi($con);
     972        if (!$esi_placeholder_list) {
    952973            return $con;
    953974        }
    954975
    955         foreach ( $esi_placeholder_list as $esi_placeholder ) {
    956             $js_var = '__litespeed_var_' . ( self::$_var_i ++ ) . '__';
    957             $con = str_replace( $esi_placeholder, $js_var, $con );
     976        foreach ($esi_placeholder_list as $esi_placeholder) {
     977            $js_var = '__litespeed_var_' . (self::$_var_i++) . '__';
     978            $con = str_replace($esi_placeholder, $js_var, $con);
    958979            $this->_var_preserve_js[] = $js_var . '=' . $esi_placeholder;
    959980        }
     
    969990     * @return array  All the src & related raw html list
    970991     */
    971     private function _parse_css() {
    972         $excludes = apply_filters( 'litespeed_optimize_css_excludes', $this->conf( self::O_OPTM_CSS_EXC ) );
    973         $ucss_file_exc_inline = apply_filters( 'litespeed_optimize_ucss_file_exc_inline', $this->conf( self::O_OPTM_UCSS_FILE_EXC_INLINE ) );
    974 
    975         $combine_ext_inl = $this->conf( self::O_OPTM_CSS_COMB_EXT_INL );
    976 
    977         $css_to_be_removed = apply_filters( 'litespeed_optm_css_to_be_removed', array() );
     992    private function _parse_css()
     993    {
     994        $excludes = apply_filters('litespeed_optimize_css_excludes', $this->conf(self::O_OPTM_CSS_EXC));
     995        $ucss_file_exc_inline = apply_filters('litespeed_optimize_ucss_file_exc_inline', $this->conf(self::O_OPTM_UCSS_FILE_EXC_INLINE));
     996
     997        $combine_ext_inl = $this->conf(self::O_OPTM_CSS_COMB_EXT_INL);
     998
     999        $css_to_be_removed = apply_filters('litespeed_optm_css_to_be_removed', array());
    9781000
    9791001        $src_list = array();
     
    9841006        // $items = $dom->find( 'link' );
    9851007
    986         $content = preg_replace( array( '#<!--.*-->#sU', '#<script([^>]*)>.*</script>#isU', '#<noscript([^>]*)>.*</noscript>#isU' ), '', $this->content );
    987         preg_match_all( '#<link ([^>]+)/?>|<style([^>]*)>([^<]+)</style>#isU', $content, $matches, PREG_SET_ORDER );
    988 
    989         foreach ( $matches as $match ) {
     1008        $content = preg_replace(array('#<!--.*-->#sU', '#<script([^>]*)>.*</script>#isU', '#<noscript([^>]*)>.*</noscript>#isU'), '', $this->content);
     1009        preg_match_all('#<link ([^>]+)/?>|<style([^>]*)>([^<]+)</style>#isU', $content, $matches, PREG_SET_ORDER);
     1010
     1011        foreach ($matches as $match) {
    9901012            // to avoid multiple replacement
    991             if ( in_array( $match[ 0 ], $html_list ) ) {
     1013            if (in_array($match[0], $html_list)) {
    9921014                continue;
    9931015            }
    9941016
    995             if ( $exclude = Utility::str_hit_array( $match[ 0 ], $excludes ) ) {
    996                 Debug2::debug2( '[Optm] _parse_css bypassed exclude ' . $exclude );
     1017            if ($exclude = Utility::str_hit_array($match[0], $excludes)) {
     1018                Debug2::debug2('[Optm] _parse_css bypassed exclude ' . $exclude);
    9971019                continue;
    9981020            }
    9991021
    10001022            $this_src_arr = array();
    1001             if ( strpos( $match[ 0 ], '<link' ) === 0 ) {
    1002                 $attrs = Utility::parse_attr( $match[ 1 ] );
    1003                 if ( empty( $attrs[ 'rel' ] ) || $attrs[ 'rel' ] !== 'stylesheet' ) {
    1004                     continue;
    1005                 }
    1006                 if ( empty( $attrs[ 'href' ] ) ) {
     1023            if (strpos($match[0], '<link') === 0) {
     1024                $attrs = Utility::parse_attr($match[1]);
     1025                if (empty($attrs['rel']) || $attrs['rel'] !== 'stylesheet') {
     1026                    continue;
     1027                }
     1028                if (empty($attrs['href'])) {
    10071029                    continue;
    10081030                }
    10091031
    10101032                // Check if need to remove this css
    1011                 if ( Utility::str_hit_array( $attrs[ 'href' ], $css_to_be_removed ) ) {
    1012                     Debug2::debug( '[Optm] rm css snippet ' . $attrs[ 'href' ] );
     1033                if (Utility::str_hit_array($attrs['href'], $css_to_be_removed)) {
     1034                    Debug2::debug('[Optm] rm css snippet ' . $attrs['href']);
    10131035                    // Delete this css snippet from orig html
    1014                     $this->content = str_replace( $match[ 0 ], '', $this->content );
     1036                    $this->content = str_replace($match[0], '', $this->content);
    10151037
    10161038                    continue;
     
    10181040
    10191041                // Check if need to inline this css file
    1020                 if ( Utility::str_hit_array( $attrs[ 'href' ], $ucss_file_exc_inline ) ) {
    1021                     Debug2::debug( '[Optm] ucss_file_exc_inline hit ' . $attrs[ 'href' ] );
     1042                if (Utility::str_hit_array($attrs['href'], $ucss_file_exc_inline)) {
     1043                    Debug2::debug('[Optm] ucss_file_exc_inline hit ' . $attrs['href']);
    10221044                    // Replace this css to inline from orig html
    1023                     $inline_script = '<style>' . $this->__optimizer->load_file($attrs[ 'href' ]) . '</style>';
    1024                     $this->content = str_replace( $match[ 0 ], $inline_script, $this->content );
     1045                    $inline_script = '<style>' . $this->__optimizer->load_file($attrs['href']) . '</style>';
     1046                    $this->content = str_replace($match[0], $inline_script, $this->content);
    10251047
    10261048                    continue;
     
    10281050
    10291051                // Check Google fonts hit
    1030                 if ( strpos( $attrs[ 'href' ], 'fonts.googleapis.com' ) !== false ) {
     1052                if (strpos($attrs['href'], 'fonts.googleapis.com') !== false) {
    10311053                    /**
    10321054                     * For async gg fonts, will add webfont into head, hence remove it from buffer and store the matches to use later
     
    10341056                     * @since  3.0 For font display optm, need to parse google fonts URL too
    10351057                     */
    1036                     if ( ! in_array( $attrs[ 'href' ], $this->_ggfonts_urls ) ) {
    1037                         $this->_ggfonts_urls[] = $attrs[ 'href' ];
     1058                    if (!in_array($attrs['href'], $this->_ggfonts_urls)) {
     1059                        $this->_ggfonts_urls[] = $attrs['href'];
    10381060                    }
    10391061
    1040                     if ( $this->cfg_ggfonts_rm || $this->cfg_ggfonts_async ) {
    1041                         Debug2::debug( '[Optm] rm css snippet [Google fonts] ' . $attrs[ 'href' ] );
    1042                         $this->content = str_replace( $match[ 0 ], '', $this->content );
     1062                    if ($this->cfg_ggfonts_rm || $this->cfg_ggfonts_async) {
     1063                        Debug2::debug('[Optm] rm css snippet [Google fonts] ' . $attrs['href']);
     1064                        $this->content = str_replace($match[0], '', $this->content);
    10431065
    10441066                        continue;
     
    10461068                }
    10471069
    1048                 if ( isset( $attrs[ 'data-optimized' ] ) ) {
     1070                if (isset($attrs['data-optimized'])) {
    10491071                    // $this_src_arr[ 'exc' ] = true;
    10501072                    continue;
    1051                 }
    1052                 elseif ( ! empty( $attrs[ 'data-no-optimize' ] ) ) {
     1073                } elseif (!empty($attrs['data-no-optimize'])) {
    10531074                    // $this_src_arr[ 'exc' ] = true;
    10541075                    continue;
    10551076                }
    10561077
    1057                 $is_internal = Utility::is_internal_file( $attrs[ 'href' ] );
    1058                 $ext_excluded = ! $combine_ext_inl && ! $is_internal;
    1059                 if ( $ext_excluded ) {
    1060                     Debug2::debug2( '[Optm] Bypassed due to external link' );
     1078                $is_internal = Utility::is_internal_file($attrs['href']);
     1079                $ext_excluded = !$combine_ext_inl && !$is_internal;
     1080                if ($ext_excluded) {
     1081                    Debug2::debug2('[Optm] Bypassed due to external link');
    10611082                    // Maybe defer
    1062                     if ( $this->cfg_css_async ) {
    1063                         $snippet = $this->_async_css( $match[ 0 ] );
    1064                         if ( $snippet != $match[ 0 ] ) {
    1065                             $this->content = str_replace( $match[ 0 ], $snippet, $this->content );
     1083                    if ($this->cfg_css_async) {
     1084                        $snippet = $this->_async_css($match[0]);
     1085                        if ($snippet != $match[0]) {
     1086                            $this->content = str_replace($match[0], $snippet, $this->content);
    10661087                        }
    10671088                    }
     
    10701091                }
    10711092
    1072                 if ( ! empty( $attrs[ 'media' ] ) && $attrs[ 'media' ] !== 'all' ) {
    1073                     $this_src_arr[ 'media' ] = $attrs[ 'media' ];
    1074                 }
    1075 
    1076                 $this_src_arr[ 'src' ] = $attrs[ 'href' ];
    1077             }
    1078             else { // Inline style
    1079                 if ( ! $combine_ext_inl ) {
    1080                     Debug2::debug2( '[Optm] Bypassed due to inline' );
    1081                     continue;
    1082                 }
    1083 
    1084                 $attrs = Utility::parse_attr( $match[ 2 ] );
    1085 
    1086                 if ( ! empty( $attrs[ 'data-no-optimize' ] ) ) {
    1087                     continue;
    1088                 }
    1089 
    1090                 if ( ! empty( $attrs[ 'media' ] ) && $attrs[ 'media' ] !== 'all' ) {
    1091                     $this_src_arr[ 'media' ] = $attrs[ 'media' ];
    1092                 }
    1093 
    1094                 $this_src_arr[ 'inl' ] = true;
    1095                 $this_src_arr[ 'src' ] = $match[ 3 ];
     1093                if (!empty($attrs['media']) && $attrs['media'] !== 'all') {
     1094                    $this_src_arr['media'] = $attrs['media'];
     1095                }
     1096
     1097                $this_src_arr['src'] = $attrs['href'];
     1098            } else { // Inline style
     1099                if (!$combine_ext_inl) {
     1100                    Debug2::debug2('[Optm] Bypassed due to inline');
     1101                    continue;
     1102                }
     1103
     1104                $attrs = Utility::parse_attr($match[2]);
     1105
     1106                if (!empty($attrs['data-no-optimize'])) {
     1107                    continue;
     1108                }
     1109
     1110                if (!empty($attrs['media']) && $attrs['media'] !== 'all') {
     1111                    $this_src_arr['media'] = $attrs['media'];
     1112                }
     1113
     1114                $this_src_arr['inl'] = true;
     1115                $this_src_arr['src'] = $match[3];
    10961116            }
    10971117
    10981118            $src_list[] = $this_src_arr;
    10991119
    1100             $html_list[] = $match[ 0 ];
    1101         }
    1102 
    1103         return array( $src_list, $html_list );
     1120            $html_list[] = $match[0];
     1121        }
     1122
     1123        return array($src_list, $html_list);
    11041124    }
    11051125
     
    11101130     * @access private
    11111131     */
    1112     private function _async_css_list( $html_list, $src_list ) {
    1113         foreach ( $html_list as $k => $ori ) {
    1114             if ( ! empty( $src_list[ $k ][ 'inl' ] ) ) {
     1132    private function _async_css_list($html_list, $src_list)
     1133    {
     1134        foreach ($html_list as $k => $ori) {
     1135            if (!empty($src_list[$k]['inl'])) {
    11151136                continue;
    11161137            }
    11171138
    1118             $html_list[ $k ] = $this->_async_css( $ori );
     1139            $html_list[$k] = $this->_async_css($ori);
    11191140        }
    11201141        return $html_list;
     
    11251146     * @since 3.5
    11261147     */
    1127     private function _async_css( $ori ) {
    1128         if ( strpos( $ori, 'data-asynced' ) !== false ) {
    1129             Debug2::debug2( '[Optm] bypass: attr data-asynced exist' );
     1148    private function _async_css($ori)
     1149    {
     1150        if (strpos($ori, 'data-asynced') !== false) {
     1151            Debug2::debug2('[Optm] bypass: attr data-asynced exist');
    11301152            return $ori;
    11311153        }
    11321154
    1133         if ( strpos( $ori, 'data-no-async' ) !== false ) {
    1134             Debug2::debug2( '[Optm] bypass: attr api data-no-async' );
     1155        if (strpos($ori, 'data-no-async') !== false) {
     1156            Debug2::debug2('[Optm] bypass: attr api data-no-async');
    11351157            return $ori;
    11361158        }
    11371159
    11381160        // async replacement
    1139         $v = str_replace( 'stylesheet', 'preload', $ori );
    1140         $v = str_replace( '<link', '<link data-asynced="1" as="style" onload="this.onload=null;this.rel=\'stylesheet\'" ', $v );
     1161        $v = str_replace('stylesheet', 'preload', $ori);
     1162        $v = str_replace('<link', '<link data-asynced="1" as="style" onload="this.onload=null;this.rel=\'stylesheet\'" ', $v);
    11411163        // Append to noscript content
    1142         if ( ! defined( 'LITESPEED_GUEST_OPTM' ) && ! $this->conf( self::O_OPTM_NOSCRIPT_RM ) ) {
    1143             $v .= '<noscript>' . preg_replace( '/ id=\'[\w-]+\' /U', ' ', $ori ) . '</noscript>';
     1164        if (!defined('LITESPEED_GUEST_OPTM') && !$this->conf(self::O_OPTM_NOSCRIPT_RM)) {
     1165            $v .= '<noscript>' . preg_replace('/ id=\'[\w-]+\' /U', ' ', $ori) . '</noscript>';
    11441166        }
    11451167
     
    11521174     * @since  3.5
    11531175     */
    1154     private function _js_defer( $ori, $src ) {
    1155         if ( strpos( $ori, ' async' ) !== false ) {
    1156             $ori = str_replace( ' async', '', $ori );
    1157         }
    1158 
    1159         if ( strpos( $ori, 'defer' ) !== false ) {
     1176    private function _js_defer($ori, $src)
     1177    {
     1178        if (strpos($ori, ' async') !== false) {
     1179            $ori = str_replace(' async', '', $ori);
     1180        }
     1181
     1182        if (strpos($ori, 'defer') !== false) {
    11601183            return false;
    11611184        }
    1162         if ( strpos( $ori, 'data-deferred' ) !== false ) {
    1163             Debug2::debug2( '[Optm] bypass: attr data-deferred exist' );
     1185        if (strpos($ori, 'data-deferred') !== false) {
     1186            Debug2::debug2('[Optm] bypass: attr data-deferred exist');
    11641187            return false;
    11651188        }
    1166         if ( strpos( $ori, 'data-no-defer' ) !== false ) {
    1167             Debug2::debug2( '[Optm] bypass: attr api data-no-defer' );
     1189        if (strpos($ori, 'data-no-defer') !== false) {
     1190            Debug2::debug2('[Optm] bypass: attr api data-no-defer');
    11681191            return false;
    11691192        }
     
    11731196         * @since 1.5
    11741197         */
    1175         if ( Utility::str_hit_array( $src, $this->cfg_js_defer_exc ) ) {
    1176             Debug2::debug( '[Optm] js defer exclude ' . $src );
     1198        if (Utility::str_hit_array($src, $this->cfg_js_defer_exc)) {
     1199            Debug2::debug('[Optm] js defer exclude ' . $src);
    11771200            return false;
    11781201        }
    11791202
    1180         if ( $this->cfg_js_defer === 2 ) {
    1181             if ( strpos( $ori, ' type=' ) !== false ) {
    1182                 $ori = preg_replace( '# type=([\'"])([^\1]+)\1#isU', '', $ori );
    1183             }
    1184             return str_replace( ' src=', ' type="litespeed/javascript" data-src=', $ori );
    1185         }
    1186 
    1187         return str_replace( '></script>', ' defer data-deferred="1"></script>', $ori );
    1188     }
    1189 
     1203        if ($this->cfg_js_defer === 2 || Utility::str_hit_array($src, $this->cfg_js_delay_inc)) {
     1204            if (strpos($ori, ' type=') !== false) {
     1205                $ori = preg_replace('# type=([\'"])([^\1]+)\1#isU', '', $ori);
     1206            }
     1207            return str_replace(' src=', ' type="litespeed/javascript" data-src=', $ori);
     1208        }
     1209
     1210        return str_replace('></script>', ' defer data-deferred="1"></script>', $ori);
     1211    }
     1212
     1213    /**
     1214     * Delay JS for included setting
     1215     *
     1216     * @since 5.6
     1217     */
     1218    private function _js_delay($ori, $src)
     1219    {
     1220        if (strpos($ori, ' async') !== false) {
     1221            $ori = str_replace(' async', '', $ori);
     1222        }
     1223
     1224        if (strpos($ori, 'defer') !== false) {
     1225            return false;
     1226        }
     1227        if (strpos($ori, 'data-deferred') !== false) {
     1228            Debug2::debug2('[Optm] bypass: attr data-deferred exist');
     1229            return false;
     1230        }
     1231        if (strpos($ori, 'data-no-defer') !== false) {
     1232            Debug2::debug2('[Optm] bypass: attr api data-no-defer');
     1233            return false;
     1234        }
     1235
     1236        if (!Utility::str_hit_array($src, $this->cfg_js_delay_inc)) {
     1237            return;
     1238        }
     1239
     1240        if (strpos($ori, ' type=') !== false) {
     1241            $ori = preg_replace('# type=([\'"])([^\1]+)\1#isU', '', $ori);
     1242        }
     1243        return str_replace(' src=', ' type="litespeed/javascript" data-src=', $ori);
     1244    }
    11901245}
  • litespeed-cache/trunk/src/purge.cls.php

    r2869601 r2954001  
    611611        $this->purge_url( $_SERVER[ 'HTTP_REFERER' ] );
    612612
     613        do_action( 'litespeed_purged_front', $_SERVER['HTTP_REFERER'] );
    613614        wp_redirect( $_SERVER[ 'HTTP_REFERER' ] );
    614615        exit();
  • litespeed-cache/trunk/tpl/crawler/map.tpl.php

    r2683957 r2954001  
    11<?php
     2
    23namespace LiteSpeed;
    3 defined( 'WPINC' ) || exit;
     4
     5defined('WPINC') || exit;
    46
    57$crawler_summary = Crawler::get_summary();
     
    79$__map = Crawler_Map::cls();
    810
    9 $list = $__map->list_map( 30 );
     11$list = $__map->list_map(30);
    1012$count = $__map->count_map();
    11 $pagination = Utility::pagination( $count, 30 );
     13$pagination = Utility::pagination($count, 30);
    1214
    1315?>
    1416<p class="litespeed-right">
    15 <a href="<?php echo Utility::build_url( Router::ACTION_CRAWLER, Crawler::TYPE_EMPTY ); ?>" class="button litespeed-btn-warning">
    16     <?php echo __( 'Clean Crawler Map', 'litespeed-cache' ); ?>
    17 </a>
     17    <a href="<?php echo Utility::build_url(Router::ACTION_CRAWLER, Crawler::TYPE_EMPTY); ?>" class="button litespeed-btn-warning">
     18        <?php echo __('Clean Crawler Map', 'litespeed-cache'); ?>
     19    </a>
    1820
    19 <a href="<?php echo Utility::build_url( Router::ACTION_CRAWLER, Crawler::TYPE_REFRESH_MAP ); ?>" class="button button-secondary">
    20     <?php echo __( 'Refresh Crawler Map', 'litespeed-cache' ); ?>
    21 </a>
     21    <a href="<?php echo Utility::build_url(Router::ACTION_CRAWLER, Crawler::TYPE_REFRESH_MAP); ?>" class="button button-secondary">
     22        <?php echo __('Refresh Crawler Map', 'litespeed-cache'); ?>
     23    </a>
    2224</p>
    2325
    2426<p>
    2527    <?php
    26         if ( ! empty( $crawler_summary[ 'sitemap_time' ] ) ) {
    27             echo sprintf( __( 'Generated at %s', 'litespeed-cache' ), Utility::readable_time( $crawler_summary[ 'sitemap_time' ] ) );
    28         }
     28    if (!empty($crawler_summary['sitemap_time'])) {
     29        echo sprintf(__('Generated at %s', 'litespeed-cache'), Utility::readable_time($crawler_summary['sitemap_time']));
     30    }
    2931    ?>
    3032</p>
    3133
    3234<h3 class="litespeed-title">
    33     <?php echo __( 'Sitemap List', 'litespeed-cache' ); ?>
    34     <?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/crawler/#map-tab' ); ?>
     35    <?php echo __('Sitemap List', 'litespeed-cache'); ?>
     36    <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/crawler/#map-tab'); ?>
    3537</h3>
    3638
    37 <?php echo __( 'Sitemap Total', 'litespeed-cache' ) . ': ' . $count; ?>
     39<?php echo __('Sitemap Total', 'litespeed-cache') . ': ' . $count; ?>
    3840
    39 <?php echo $pagination; ?>
     41<div style="display: flex; justify-content: space-between;">
     42    <div style="margin-top:10px;">
     43        <form action="<?php echo admin_url('admin.php?page=litespeed-crawler'); ?>" method="post">
     44            <input type="text" name="kw" value="<?php echo !empty($_POST['kw']) ? esc_html($_POST['kw']) : ''; ?>" placeholder="<?php echo __('URL Search'); ?>" style="width: 600px;" />
     45        </form>
     46    </div>
     47
     48    <div class="">
     49        <?php echo $pagination; ?>
     50    </div>
     51</div>
     52
    4053<table class="wp-list-table widefat striped">
    41     <thead><tr >
    42         <th scope="col">#</th>
    43         <th scope="col"><?php echo __( 'URL', 'litespeed-cache' ); ?></th>
    44         <th scope="col"><?php echo __( 'Crawler Status', 'litespeed-cache' ); ?></th>
    45         <th scope="col"><?php echo __( 'Operation', 'litespeed-cache' ); ?></th>
    46     </tr></thead>
     54    <thead>
     55        <tr>
     56            <th scope="col">#</th>
     57            <th scope="col"><?php echo __('URL', 'litespeed-cache'); ?></th>
     58            <th scope="col"><?php echo __('Crawler Status', 'litespeed-cache'); ?></th>
     59            <th scope="col"><?php echo __('Operation', 'litespeed-cache'); ?></th>
     60        </tr>
     61    </thead>
    4762    <tbody>
    48         <?php foreach ( $list as $i => $v ) : ?>
    49         <tr>
    50             <td><?php echo $i + 1; ?></td>
    51             <td>
    52                 <?php echo $v[ 'url' ]; ?>
    53             </td>
    54             <td>
    55                 <?php echo Crawler::cls()->display_status( $v[ 'res' ], $v[ 'reason' ] ); ?>
    56             </td>
    57             <td>
    58                 <a href="<?php echo Utility::build_url( Router::ACTION_CRAWLER, Crawler::TYPE_BLACKLIST_ADD, false, null, array( 'id' => $v[ 'id' ] ) ); ?>" class="button button-secondary"><?php echo __( 'Add to Blocklist', 'litespeed-cache' ); ?></a>
    59             </td>
    60         </tr>
     63        <?php foreach ($list as $i => $v) : ?>
     64            <tr>
     65                <td><?php echo $i + 1; ?></td>
     66                <td>
     67                    <?php echo $v['url']; ?>
     68                </td>
     69                <td>
     70                    <?php echo Crawler::cls()->display_status($v['res'], $v['reason']); ?>
     71                </td>
     72                <td>
     73                    <a href="<?php echo Utility::build_url(Router::ACTION_CRAWLER, Crawler::TYPE_BLACKLIST_ADD, false, null, array('id' => $v['id'])); ?>" class="button button-secondary"><?php echo __('Add to Blocklist', 'litespeed-cache'); ?></a>
     74                </td>
     75            </tr>
    6176        <?php endforeach; ?>
    6277    </tbody>
     
    6580
    6681<p>
    67     <i class="litespeed-dot litespeed-bg-success"></i> = <?php echo __( 'Cache Hit', 'litespeed-cache' ); ?><br>
    68     <i class="litespeed-dot litespeed-bg-primary"></i> = <?php echo __( 'Cache Miss', 'litespeed-cache' ); ?><br>
    69     <i class="litespeed-dot litespeed-bg-warning"></i> = <?php echo __( 'Blocklisted due to not cacheable', 'litespeed-cache' ); ?><br>
    70     <i class="litespeed-dot litespeed-bg-danger"></i> = <?php echo __( 'Blocklisted', 'litespeed-cache' ); ?><br>
     82    <i class="litespeed-dot litespeed-bg-success"></i> = <?php echo __('Cache Hit', 'litespeed-cache'); ?><br>
     83    <i class="litespeed-dot litespeed-bg-primary"></i> = <?php echo __('Cache Miss', 'litespeed-cache'); ?><br>
     84    <i class="litespeed-dot litespeed-bg-warning"></i> = <?php echo __('Blocklisted due to not cacheable', 'litespeed-cache'); ?><br>
     85    <i class="litespeed-dot litespeed-bg-danger"></i> = <?php echo __('Blocklisted', 'litespeed-cache'); ?><br>
    7186</p>
  • litespeed-cache/trunk/tpl/page_optm/settings_tuning.tpl.php

    r2832517 r2954001  
    11<?php
     2
    23namespace LiteSpeed;
    3 defined( 'WPINC' ) || exit;
     4
     5defined('WPINC') || exit;
    46
    57global $wp_roles;
    6 if ( !isset( $wp_roles ) ) {
     8if (!isset($wp_roles)) {
    79    $wp_roles = new \WP_Roles();
    810}
    911
    1012$roles = array();
    11 foreach ( $wp_roles->roles as $k => $v ) {
    12     $roles[ $k ] = $v[ 'name' ];
     13foreach ($wp_roles->roles as $k => $v) {
     14    $roles[$k] = $v['name'];
    1315}
    14 ksort( $roles );
     16ksort($roles);
    1517
    1618?>
    1719<h3 class="litespeed-title-short">
    18     <?php echo __( 'Tuning Settings', 'litespeed-cache' ); ?>
    19     <?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/pageopt/#tuning-settings-tab' ); ?>
     20    <?php echo __('Tuning Settings', 'litespeed-cache'); ?>
     21    <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/pageopt/#tuning-settings-tab'); ?>
    2022</h3>
    2123
    22 <table class="wp-list-table striped litespeed-table"><tbody>
    23     <tr>
    24         <th>
    25             <?php $id = Base::O_OPTM_JS_EXC; ?>
    26             <?php $this->title( $id ); ?>
    27         </th>
    28         <td>
    29             <?php $this->build_textarea( $id ); ?>
    30             <div class="litespeed-desc">
    31                 <?php echo __( 'Listed JS files or inline JS code will not be minified/combined.', 'litespeed-cache' ); ?>
    32                 <?php Doc::full_or_partial_url(); ?>
    33                 <?php Doc::one_per_line(); ?>
    34                 <br /><font class="litespeed-success">
    35                     <?php echo __( 'API', 'litespeed-cache' ); ?>:
    36                     <?php echo sprintf( __( 'Filter %s is supported.', 'litespeed-cache' ), '<code>litespeed_optimize_js_excludes</code>' ); ?>
    37                     <?php echo sprintf( __( 'Elements with attribute %s in html code will be excluded.', 'litespeed-cache' ), '<code>data-no-optimize="1"</code>' ); ?>
    38                     <br /><?php echo __( 'Predefined list will also be combined w/ the above settings', 'litespeed-cache' ); ?>: <a href="https://github.com/litespeedtech/lscache_wp/blob/dev/data/js_excludes.txt" target="_blank">https://github.com/litespeedtech/lscache_wp/blob/dev/data/js_excludes.txt</a>
    39                 </font>
    40             </div>
    41         </td>
    42     </tr>
     24<table class="wp-list-table striped litespeed-table">
     25    <tbody>
     26        <tr>
     27            <th>
     28                <?php $id = Base::O_OPTM_JS_DELAY_INC; ?>
     29                <?php $this->title($id); ?>
     30            </th>
     31            <td>
     32                <?php $this->build_textarea($id); ?>
     33                <div class="litespeed-desc">
     34                    <?php echo __('Listed JS files or inline JS code will be delayed.', 'litespeed-cache'); ?>
     35                    <?php Doc::full_or_partial_url(); ?>
     36                    <?php Doc::one_per_line(); ?>
     37                    <br />
     38                    <font class="litespeed-success">
     39                        <?php echo __('API', 'litespeed-cache'); ?>:
     40                        <?php echo sprintf(__('Filter %s is supported.', 'litespeed-cache'), '<code>litespeed_optm_js_delay_inc</code>'); ?>
     41                    </font>
     42                </div>
     43            </td>
     44        </tr>
    4345
    44     <tr>
    45         <th>
    46             <?php $id = Base::O_OPTM_JS_DEFER_EXC; ?>
    47             <?php $this->title( $id ); ?>
    48         </th>
    49         <td>
    50             <?php $this->build_textarea( $id ); ?>
    51             <div class="litespeed-desc">
    52                 <?php echo __( 'Listed JS files or inline JS code will not be deferred or delayed.', 'litespeed-cache' ); ?>
    53                 <?php Doc::full_or_partial_url(); ?>
    54                 <?php Doc::one_per_line(); ?>
    55                 <br /><span class="litespeed-success">
    56                     <?php echo __( 'API', 'litespeed-cache' ); ?>:
    57                     <?php echo sprintf( __( 'Filter %s is supported.', 'litespeed-cache' ), '<code>litespeed_optm_js_defer_exc</code>' ); ?>
    58                     <?php echo sprintf( __( 'Elements with attribute %s in html code will be excluded.', 'litespeed-cache' ), '<code>data-no-defer="1"</code>' ); ?>
    59                     <br /><?php echo __( 'Predefined list will also be combined w/ the above settings', 'litespeed-cache' ); ?>: <a href="https://github.com/litespeedtech/lscache_wp/blob/dev/data/js_defer_excludes.txt" target="_blank">https://github.com/litespeedtech/lscache_wp/blob/dev/data/js_defer_excludes.txt</a>
    60                 </span>
    61             </div>
    62         </td>
    63     </tr>
     46        <tr>
     47            <th>
     48                <?php $id = Base::O_OPTM_JS_EXC; ?>
     49                <?php $this->title($id); ?>
     50            </th>
     51            <td>
     52                <?php $this->build_textarea($id); ?>
     53                <div class="litespeed-desc">
     54                    <?php echo __('Listed JS files or inline JS code will not be minified/combined.', 'litespeed-cache'); ?>
     55                    <?php Doc::full_or_partial_url(); ?>
     56                    <?php Doc::one_per_line(); ?>
     57                    <br />
     58                    <font class="litespeed-success">
     59                        <?php echo __('API', 'litespeed-cache'); ?>:
     60                        <?php echo sprintf(__('Filter %s is supported.', 'litespeed-cache'), '<code>litespeed_optimize_js_excludes</code>'); ?>
     61                        <?php echo sprintf(__('Elements with attribute %s in html code will be excluded.', 'litespeed-cache'), '<code>data-no-optimize="1"</code>'); ?>
     62                        <br /><?php echo __('Predefined list will also be combined w/ the above settings', 'litespeed-cache'); ?>: <a href="https://github.com/litespeedtech/lscache_wp/blob/dev/data/js_excludes.txt" target="_blank">https://github.com/litespeedtech/lscache_wp/blob/dev/data/js_excludes.txt</a>
     63                    </font>
     64                </div>
     65            </td>
     66        </tr>
    6467
    65     <tr>
    66         <th>
    67             <?php $id = Base::O_OPTM_GM_JS_EXC; ?>
    68             <?php $this->title( $id ); ?>
    69         </th>
    70         <td>
    71             <?php $this->build_textarea( $id ); ?>
    72             <div class="litespeed-desc">
    73                 <?php echo sprintf( __( 'Listed JS files or inline JS code will not be optimized by %s.', 'litespeed-cache' ), '<code>' . Lang::title( Base::O_GUEST ) . '</code>' ); ?>
    74                 <?php Doc::full_or_partial_url(); ?>
    75                 <?php Doc::one_per_line(); ?>
    76                 <br /><span class="litespeed-success">
    77                     <?php echo __( 'API', 'litespeed-cache' ); ?>:
    78                     <?php echo sprintf( __( 'Filter %s is supported.', 'litespeed-cache' ), '<code>litespeed_optm_gm_js_exc</code>' ); ?>
    79                     <?php echo sprintf( __( 'Elements with attribute %s in html code will be excluded.', 'litespeed-cache' ), '<code>data-no-defer="1"</code>' ); ?>
    80                 </span>
    81             </div>
    82         </td>
    83     </tr>
     68        <tr>
     69            <th>
     70                <?php $id = Base::O_OPTM_JS_DEFER_EXC; ?>
     71                <?php $this->title($id); ?>
     72            </th>
     73            <td>
     74                <?php $this->build_textarea($id); ?>
     75                <div class="litespeed-desc">
     76                    <?php echo __('Listed JS files or inline JS code will not be deferred or delayed.', 'litespeed-cache'); ?>
     77                    <?php Doc::full_or_partial_url(); ?>
     78                    <?php Doc::one_per_line(); ?>
     79                    <br /><span class="litespeed-success">
     80                        <?php echo __('API', 'litespeed-cache'); ?>:
     81                        <?php echo sprintf(__('Filter %s is supported.', 'litespeed-cache'), '<code>litespeed_optm_js_defer_exc</code>'); ?>
     82                        <?php echo sprintf(__('Elements with attribute %s in html code will be excluded.', 'litespeed-cache'), '<code>data-no-defer="1"</code>'); ?>
     83                        <br /><?php echo __('Predefined list will also be combined w/ the above settings', 'litespeed-cache'); ?>: <a href="https://github.com/litespeedtech/lscache_wp/blob/dev/data/js_defer_excludes.txt" target="_blank">https://github.com/litespeedtech/lscache_wp/blob/dev/data/js_defer_excludes.txt</a>
     84                    </span>
     85                </div>
     86            </td>
     87        </tr>
    8488
    85     <tr>
    86         <th>
    87             <?php $id = Base::O_OPTM_EXC; ?>
    88             <?php $this->title( $id ); ?>
    89         </th>
    90         <td>
    91             <?php $this->build_textarea( $id ); ?>
    92             <div class="litespeed-desc">
    93                 <?php echo __( 'Prevent any optimization of listed pages.', 'litespeed-cache' ); ?>
    94                 <?php $this->_uri_usage_example(); ?>
    95                 <br /><span class="litespeed-success">
    96                     <?php echo __( 'API', 'litespeed-cache' ); ?>:
    97                     <?php echo sprintf( __( 'Filter %s is supported.', 'litespeed-cache' ), '<code>litespeed_optm_uri_exc</code>' ); ?>
    98                 </span>
    99             </div>
    100         </td>
    101     </tr>
     89        <tr>
     90            <th>
     91                <?php $id = Base::O_OPTM_GM_JS_EXC; ?>
     92                <?php $this->title($id); ?>
     93            </th>
     94            <td>
     95                <?php $this->build_textarea($id); ?>
     96                <div class="litespeed-desc">
     97                    <?php echo sprintf(__('Listed JS files or inline JS code will not be optimized by %s.', 'litespeed-cache'), '<code>' . Lang::title(Base::O_GUEST) . '</code>'); ?>
     98                    <?php Doc::full_or_partial_url(); ?>
     99                    <?php Doc::one_per_line(); ?>
     100                    <br /><span class="litespeed-success">
     101                        <?php echo __('API', 'litespeed-cache'); ?>:
     102                        <?php echo sprintf(__('Filter %s is supported.', 'litespeed-cache'), '<code>litespeed_optm_gm_js_exc</code>'); ?>
     103                        <?php echo sprintf(__('Elements with attribute %s in html code will be excluded.', 'litespeed-cache'), '<code>data-no-defer="1"</code>'); ?>
     104                    </span>
     105                </div>
     106            </td>
     107        </tr>
    102108
    103     <tr>
    104         <th>
    105             <?php $id = Base::O_OPTM_GUEST_ONLY; ?>
    106             <?php $this->title( $id ); ?>
    107         </th>
    108         <td>
    109             <?php $this->build_switch( $id ); ?>
    110             <div class="litespeed-desc">
    111                 <?php echo __( 'Only optimize pages for guest (not logged in) visitors. If turned this OFF, CSS/JS/CCSS files will be doubled by each user group.', 'litespeed-cache' ); ?>
    112             </div>
    113         </td>
    114     </tr>
     109        <tr>
     110            <th>
     111                <?php $id = Base::O_OPTM_EXC; ?>
     112                <?php $this->title($id); ?>
     113            </th>
     114            <td>
     115                <?php $this->build_textarea($id); ?>
     116                <div class="litespeed-desc">
     117                    <?php echo __('Prevent any optimization of listed pages.', 'litespeed-cache'); ?>
     118                    <?php $this->_uri_usage_example(); ?>
     119                    <br /><span class="litespeed-success">
     120                        <?php echo __('API', 'litespeed-cache'); ?>:
     121                        <?php echo sprintf(__('Filter %s is supported.', 'litespeed-cache'), '<code>litespeed_optm_uri_exc</code>'); ?>
     122                    </span>
     123                </div>
     124            </td>
     125        </tr>
    115126
    116     <tr>
    117         <th>
    118             <?php $id = Base::O_OPTM_EXC_ROLES; ?>
    119             <?php $this->title( $id ); ?>
    120         </th>
    121         <td>
    122             <div class="litespeed-desc">
    123                 <?php echo __( 'Selected roles will be excluded from all optimizations.', 'litespeed-cache' ); ?>
    124             </div>
    125             <div class="litespeed-tick-list">
    126                 <?php foreach ( $roles as $role => $title ): ?>
    127                     <?php $this->build_checkbox( $id . '[]', $title, $this->cls( 'Conf' )->in_optm_exc_roles( $role ), $role ); ?>
    128                 <?php endforeach; ?>
    129             </div>
     127        <tr>
     128            <th>
     129                <?php $id = Base::O_OPTM_GUEST_ONLY; ?>
     130                <?php $this->title($id); ?>
     131            </th>
     132            <td>
     133                <?php $this->build_switch($id); ?>
     134                <div class="litespeed-desc">
     135                    <?php echo __('Only optimize pages for guest (not logged in) visitors. If turned this OFF, CSS/JS/CCSS files will be doubled by each user group.', 'litespeed-cache'); ?>
     136                </div>
     137            </td>
     138        </tr>
    130139
    131         </td>
    132     </tr>
     140        <tr>
     141            <th>
     142                <?php $id = Base::O_OPTM_EXC_ROLES; ?>
     143                <?php $this->title($id); ?>
     144            </th>
     145            <td>
     146                <div class="litespeed-desc">
     147                    <?php echo __('Selected roles will be excluded from all optimizations.', 'litespeed-cache'); ?>
     148                </div>
     149                <div class="litespeed-tick-list">
     150                    <?php foreach ($roles as $role => $title) : ?>
     151                        <?php $this->build_checkbox($id . '[]', $title, $this->cls('Conf')->in_optm_exc_roles($role), $role); ?>
     152                    <?php endforeach; ?>
     153                </div>
    133154
    134 </tbody></table>
     155            </td>
     156        </tr>
     157
     158    </tbody>
     159</table>
  • litespeed-cache/trunk/tpl/toolbox/beta_test.tpl.php

    r2928795 r2954001  
    77// Existing public version list
    88$v_list = array(
     9    '5.6',
     10    '5.5.1',
    911    '5.5',
    1012    '5.4',
Note: See TracChangeset for help on using the changeset viewer.