Plugin Directory

Changeset 2983968


Ignore:
Timestamp:
10/25/2023 05:53:10 PM (2 years ago)
Author:
LiteSpeedTech
Message:

Release v5.7.0.1

Location:
litespeed-cache
Files:
332 added
9 edited

Legend:

Unmodified
Added
Removed
  • litespeed-cache/trunk/lang/litespeed-cache.pot

    r2977143 r2983968  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: LiteSpeed Cache 5.7\n"
     5"Project-Id-Version: LiteSpeed Cache 5.7.0.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
    7 "POT-Creation-Date: 2023-10-10 13:10:37+00:00\n"
     7"POT-Creation-Date: 2023-10-23 20:20:48+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=UTF-8\n"
     
    288288msgstr ""
    289289
    290 #: src/cdn-setup.cls.php:58
     290#: src/cdn-setup.cls.php:73
    291291msgid "Received invalid message from the cloud server. Please submit a ticket."
    292292msgstr ""
    293293
    294 #: src/cdn-setup.cls.php:63
     294#: src/cdn-setup.cls.php:79
    295295msgid "There was an error during CDN setup: "
    296296msgstr ""
    297297
    298 #: src/cdn-setup.cls.php:112
     298#: src/cdn-setup.cls.php:131
    299299msgid ""
    300300"Congratulations, QUIC.cloud successfully set this domain up for the CDN. "
     
    302302msgstr ""
    303303
    304 #: src/cdn-setup.cls.php:132
     304#: src/cdn-setup.cls.php:151
    305305msgid "CDN Setup is running."
    306306msgstr ""
    307307
    308 #: src/cdn-setup.cls.php:164
     308#: src/cdn-setup.cls.php:184
    309309msgid "Notice: CDN Setup only reset locally."
    310310msgstr ""
    311311
    312 #: src/cdn-setup.cls.php:167
     312#: src/cdn-setup.cls.php:187
    313313msgid "Cannot delete, site is not linked."
    314314msgstr ""
    315315
    316 #: src/cdn-setup.cls.php:200
     316#: src/cdn-setup.cls.php:219
    317317msgid ""
    318318"CDN Setup Token and DNS zone deleted. Note: if my.quic.cloud account "
     
    321321msgstr ""
    322322
    323 #: src/cdn-setup.cls.php:202
     323#: src/cdn-setup.cls.php:221
    324324msgid ""
    325325"CDN Setup Token reset. Note: if my.quic.cloud account deletion is desired, "
     
    327327msgstr ""
    328328
    329 #: src/cdn-setup.cls.php:322 src/cloud.cls.php:822 src/cloud.cls.php:830
     329#: src/cdn-setup.cls.php:345 src/cloud.cls.php:822 src/cloud.cls.php:830
    330330#: src/cloud.cls.php:1237
    331331msgid "Message from QUIC.cloud server"
     
    21042104msgstr ""
    21052105
    2106 #. #-#-#-#-#  litespeed-cache.pot (LiteSpeed Cache 5.7)  #-#-#-#-#
     2106#. #-#-#-#-#  litespeed-cache.pot (LiteSpeed Cache 5.7.0.1)  #-#-#-#-#
    21072107#. Plugin Name of the plugin/theme
    21082108#: tpl/banner/new_version.php:57 tpl/banner/new_version_dev.tpl.php:12
     
    21202120
    21212121#: tpl/banner/new_version.php:69 tpl/banner/new_version_dev.tpl.php:24
    2122 #: tpl/toolbox/beta_test.tpl.php:62
     2122#: tpl/toolbox/beta_test.tpl.php:63
    21232123msgid "Upgrade"
    21242124msgstr ""
     
    22432243#: tpl/cache/more_settings_tip.tpl.php:12
    22442244#: tpl/cache/settings-excludes.tpl.php:61
    2245 #: tpl/cache/settings-excludes.tpl.php:94 tpl/cdn/auto_setup.tpl.php:235
    2246 #: tpl/cdn/auto_setup.tpl.php:246 tpl/cdn/settings.tpl.php:78
     2245#: tpl/cache/settings-excludes.tpl.php:94 tpl/cdn/auto_setup.tpl.php:245
     2246#: tpl/cdn/auto_setup.tpl.php:256 tpl/cdn/settings.tpl.php:78
    22472247#: tpl/crawler/settings-general.tpl.php:43
    22482248#: tpl/crawler/settings-general.tpl.php:144
     
    29452945msgstr ""
    29462946
    2947 #: tpl/cdn/auto_setup.tpl.php:34
     2947#: tpl/cdn/auto_setup.tpl.php:36
    29482948msgid "Not running"
    29492949msgstr ""
    29502950
    2951 #: tpl/cdn/auto_setup.tpl.php:35
     2951#: tpl/cdn/auto_setup.tpl.php:37
    29522952msgid "Run CDN Setup"
    29532953msgstr ""
    29542954
    2955 #: tpl/cdn/auto_setup.tpl.php:42
     2955#: tpl/cdn/auto_setup.tpl.php:44
    29562956msgid "Done"
    29572957msgstr ""
    29582958
    2959 #: tpl/cdn/auto_setup.tpl.php:44
     2959#: tpl/cdn/auto_setup.tpl.php:46
    29602960msgid "Completed at %s"
    29612961msgstr ""
    29622962
    2963 #: tpl/cdn/auto_setup.tpl.php:50
     2963#: tpl/cdn/auto_setup.tpl.php:52
    29642964msgid "Paused"
    29652965msgstr ""
    29662966
    2967 #: tpl/cdn/auto_setup.tpl.php:54
     2967#: tpl/cdn/auto_setup.tpl.php:56
    29682968msgid "Verifying, waiting for nameservers to be updated."
    29692969msgstr ""
    29702970
    2971 #: tpl/cdn/auto_setup.tpl.php:54
     2971#: tpl/cdn/auto_setup.tpl.php:56
    29722972msgid "Click the refresh button below to refresh status."
    29732973msgstr ""
    29742974
    2975 #: tpl/cdn/auto_setup.tpl.php:56
     2975#: tpl/cdn/auto_setup.tpl.php:58
    29762976msgid "Last Verification Result"
    29772977msgstr ""
    29782978
    2979 #: tpl/cdn/auto_setup.tpl.php:59
     2979#: tpl/cdn/auto_setup.tpl.php:61
    29802980msgid "In Progress"
    29812981msgstr ""
    29822982
    2983 #: tpl/cdn/auto_setup.tpl.php:60
     2983#: tpl/cdn/auto_setup.tpl.php:62
    29842984msgid "You will receive an email upon status update."
    29852985msgstr ""
    29862986
    2987 #: tpl/cdn/auto_setup.tpl.php:60
     2987#: tpl/cdn/auto_setup.tpl.php:62
    29882988msgid "This process may take several minutes."
    29892989msgstr ""
    29902990
    2991 #: tpl/cdn/auto_setup.tpl.php:62
     2991#: tpl/cdn/auto_setup.tpl.php:64
    29922992msgid "Refresh CDN Setup Status"
    29932993msgstr ""
    29942994
    2995 #: tpl/cdn/auto_setup.tpl.php:68
     2995#: tpl/cdn/auto_setup.tpl.php:70
    29962996msgid "Auto QUIC.cloud CDN Setup"
    29972997msgstr ""
    29982998
    2999 #: tpl/cdn/auto_setup.tpl.php:71
     2999#: tpl/cdn/auto_setup.tpl.php:73
    30003000msgid ""
    30013001"This is a three step process for configuring your site to use QUIC.cloud CDN "
     
    30033003msgstr ""
    30043004
    3005 #: tpl/cdn/auto_setup.tpl.php:74
     3005#: tpl/cdn/auto_setup.tpl.php:76
    30063006msgid "Set up a QUIC.cloud account."
    30073007msgstr ""
    30083008
    3009 #: tpl/cdn/auto_setup.tpl.php:75
     3009#: tpl/cdn/auto_setup.tpl.php:77
    30103010msgid ""
    30113011"Prepare the site for QUIC.cloud CDN, detect the DNS, and create a DNS Zone."
    30123012msgstr ""
    30133013
    3014 #: tpl/cdn/auto_setup.tpl.php:76
     3014#: tpl/cdn/auto_setup.tpl.php:78
    30153015msgid "Provide the nameservers necessary to enable the CDN."
    30163016msgstr ""
    30173017
    3018 #: tpl/cdn/auto_setup.tpl.php:78
     3018#: tpl/cdn/auto_setup.tpl.php:80
    30193019msgid ""
    30203020"After successful DNS detection, QUIC.cloud will attempt to generate an SSL "
     
    30223022msgstr ""
    30233023
    3024 #: tpl/cdn/auto_setup.tpl.php:79
     3024#: tpl/cdn/auto_setup.tpl.php:81
    30253025msgid "This last stage could take 15 to 20 minutes."
    30263026msgstr ""
    30273027
    3028 #: tpl/cdn/auto_setup.tpl.php:80
     3028#: tpl/cdn/auto_setup.tpl.php:82
    30293029msgid ""
    30303030"Your site will be available, but browsers may issue a \"not secure\" warning "
     
    30323032msgstr ""
    30333033
    3034 #: tpl/cdn/auto_setup.tpl.php:85
     3034#: tpl/cdn/auto_setup.tpl.php:87
    30353035msgid ""
    30363036"After you set your nameservers, QUIC.cloud will detect the change and "
     
    30383038msgstr ""
    30393039
    3040 #: tpl/cdn/auto_setup.tpl.php:89 tpl/toolbox/report.tpl.php:81
     3040#: tpl/cdn/auto_setup.tpl.php:91 tpl/toolbox/report.tpl.php:81
    30413041msgid "Notes"
    30423042msgstr ""
    30433043
    3044 #: tpl/cdn/auto_setup.tpl.php:93
     3044#: tpl/cdn/auto_setup.tpl.php:95
    30453045msgid "QUIC.cloud CDN/DNS does not support DNSSEC."
    30463046msgstr ""
    30473047
    3048 #: tpl/cdn/auto_setup.tpl.php:94
     3048#: tpl/cdn/auto_setup.tpl.php:96
    30493049msgid ""
    30503050"If you have this enabled for your domain, you must disable DNSSEC to "
     
    30523052msgstr ""
    30533053
    3054 #: tpl/cdn/auto_setup.tpl.php:97
     3054#: tpl/cdn/auto_setup.tpl.php:99
    30553055msgid ""
    30563056"This setup process will create a DNS zone on QUIC.cloud if one does not "
     
    30583058msgstr ""
    30593059
    3060 #: tpl/cdn/auto_setup.tpl.php:98
     3060#: tpl/cdn/auto_setup.tpl.php:101
    30613061msgid ""
    30623062"If you prefer to use the CNAME setup, please <a %s>set up the CDN manually "
     
    30643064msgstr ""
    30653065
    3066 #: tpl/cdn/auto_setup.tpl.php:102
     3066#: tpl/cdn/auto_setup.tpl.php:106
    30673067msgid "QUIC.cloud will detect most normal DNS entries."
    30683068msgstr ""
    30693069
    3070 #: tpl/cdn/auto_setup.tpl.php:103
     3070#: tpl/cdn/auto_setup.tpl.php:107
    30713071msgid ""
    30723072"If you have custom DNS records, it is possible that they are not detected."
    30733073msgstr ""
    30743074
    3075 #: tpl/cdn/auto_setup.tpl.php:104
     3075#: tpl/cdn/auto_setup.tpl.php:108
    30763076msgid ""
    30773077"Visit your QUIC.cloud dashboard after the DNS Zone is set up to confirm your "
     
    30793079msgstr ""
    30803080
    3081 #: tpl/cdn/auto_setup.tpl.php:109
     3081#: tpl/cdn/auto_setup.tpl.php:113
    30823082msgid "Set up QUIC.cloud Account"
    30833083msgstr ""
    30843084
    3085 #: tpl/cdn/auto_setup.tpl.php:114
     3085#: tpl/cdn/auto_setup.tpl.php:118
    30863086msgid "Account is linked!"
    30873087msgstr ""
    30883088
    3089 #: tpl/cdn/auto_setup.tpl.php:117
     3089#: tpl/cdn/auto_setup.tpl.php:122
    30903090msgid "Manage CDN"
    30913091msgstr ""
    30923092
    3093 #: tpl/cdn/auto_setup.tpl.php:121
     3093#: tpl/cdn/auto_setup.tpl.php:128
    30943094msgid "Manage DNS Zone"
    30953095msgstr ""
    30963096
    3097 #: tpl/cdn/auto_setup.tpl.php:127
     3097#: tpl/cdn/auto_setup.tpl.php:135
    30983098msgid "Ready to run CDN setup."
    30993099msgstr ""
    31003100
    3101 #: tpl/cdn/auto_setup.tpl.php:129
     3101#: tpl/cdn/auto_setup.tpl.php:137
    31023102msgid "Domain key and QUIC.cloud link detected."
    31033103msgstr ""
    31043104
    3105 #: tpl/cdn/auto_setup.tpl.php:130
     3105#: tpl/cdn/auto_setup.tpl.php:138
    31063106msgid "Begin QUIC.cloud CDN Setup"
    31073107msgstr ""
    31083108
    3109 #: tpl/cdn/auto_setup.tpl.php:132 tpl/dash/dashboard.tpl.php:196
     3109#: tpl/cdn/auto_setup.tpl.php:140 tpl/dash/dashboard.tpl.php:196
    31103110#: tpl/dash/dashboard.tpl.php:198 tpl/general/settings.tpl.php:78
    31113111#: tpl/general/settings.tpl.php:80 tpl/general/settings.tpl.php:109
     
    31133113msgstr ""
    31143114
    3115 #: tpl/cdn/auto_setup.tpl.php:136
     3115#: tpl/cdn/auto_setup.tpl.php:144
    31163116msgid "CDN Setup Status"
    31173117msgstr ""
    31183118
    3119 #: tpl/cdn/auto_setup.tpl.php:150
     3119#: tpl/cdn/auto_setup.tpl.php:158
    31203120msgid "QUIC.cloud Detected Records Summary"
    31213121msgstr ""
    31223122
    3123 #: tpl/cdn/auto_setup.tpl.php:156
     3123#: tpl/cdn/auto_setup.tpl.php:164
    31243124msgid "Record Type"
    31253125msgstr ""
    31263126
    3127 #: tpl/cdn/auto_setup.tpl.php:159
     3127#: tpl/cdn/auto_setup.tpl.php:167
    31283128msgid "Count"
    31293129msgstr ""
    31303130
    3131 #: tpl/cdn/auto_setup.tpl.php:171
     3131#: tpl/cdn/auto_setup.tpl.php:179
    31323132msgid "Record names found"
    31333133msgstr ""
    31343134
    3135 #: tpl/cdn/auto_setup.tpl.php:174
     3135#: tpl/cdn/auto_setup.tpl.php:182
    31363136msgid "Is something missing?"
    31373137msgstr ""
    31383138
    3139 #: tpl/cdn/auto_setup.tpl.php:176
     3139#: tpl/cdn/auto_setup.tpl.php:185
    31403140msgid "Review DNS records"
    31413141msgstr ""
    31423142
    3143 #: tpl/cdn/auto_setup.tpl.php:181
     3143#: tpl/cdn/auto_setup.tpl.php:191
    31443144msgid ""
    31453145"Note: For 15 to 20 minutes after setup completes, browsers may issue a \"not "
     
    31483148msgstr ""
    31493149
    3150 #: tpl/cdn/auto_setup.tpl.php:193
     3150#: tpl/cdn/auto_setup.tpl.php:203
    31513151msgid "Nameservers"
    31523152msgstr ""
    31533153
    3154 #: tpl/cdn/auto_setup.tpl.php:198
     3154#: tpl/cdn/auto_setup.tpl.php:208
    31553155msgid "Please update your domain registrar to use these custom nameservers:"
    31563156msgstr ""
    31573157
    3158 #: tpl/cdn/auto_setup.tpl.php:208
     3158#: tpl/cdn/auto_setup.tpl.php:218
    31593159msgid "QUIC.cloud will attempt to verify the DNS update."
    31603160msgstr ""
    31613161
    3162 #: tpl/cdn/auto_setup.tpl.php:209
     3162#: tpl/cdn/auto_setup.tpl.php:219
    31633163msgid ""
    31643164"If it does not verify within 24 hours, the CDN setup will mark the "
     
    31663166msgstr ""
    31673167
    3168 #: tpl/cdn/auto_setup.tpl.php:210
     3168#: tpl/cdn/auto_setup.tpl.php:220
    31693169msgid ""
    31703170"At that stage, you may re-start the verification process by pressing the Run "
     
    31723172msgstr ""
    31733173
    3174 #: tpl/cdn/auto_setup.tpl.php:214
     3174#: tpl/cdn/auto_setup.tpl.php:224
    31753175msgid ""
    31763176"This section will automatically populate once nameservers are configured for "
     
    31783178msgstr ""
    31793179
    3180 #: tpl/cdn/auto_setup.tpl.php:223
     3180#: tpl/cdn/auto_setup.tpl.php:233
    31813181msgid "Action"
    31823182msgstr ""
    31833183
    3184 #: tpl/cdn/auto_setup.tpl.php:226
     3184#: tpl/cdn/auto_setup.tpl.php:236
    31853185msgid "The following actions are available:"
    31863186msgstr ""
    31873187
    3188 #: tpl/cdn/auto_setup.tpl.php:228 tpl/cdn/auto_setup.tpl.php:253
     3188#: tpl/cdn/auto_setup.tpl.php:238 tpl/cdn/auto_setup.tpl.php:263
    31893189msgid "Reset CDN Setup"
    31903190msgstr ""
    31913191
    3192 #: tpl/cdn/auto_setup.tpl.php:229
     3192#: tpl/cdn/auto_setup.tpl.php:239
    31933193msgid ""
    31943194"Resets all LiteSpeed Cache plugin settings related to CDN setup back to the "
     
    31963196msgstr ""
    31973197
    3198 #: tpl/cdn/auto_setup.tpl.php:230
     3198#: tpl/cdn/auto_setup.tpl.php:240
    31993199msgid "QUIC.cloud DNS settings are not changed."
    32003200msgstr ""
    32013201
    3202 #: tpl/cdn/auto_setup.tpl.php:231
     3202#: tpl/cdn/auto_setup.tpl.php:241
    32033203msgid "This allows you to try Auto CDN setup again."
    32043204msgstr ""
    32053205
    3206 #: tpl/cdn/auto_setup.tpl.php:236
     3206#: tpl/cdn/auto_setup.tpl.php:246
    32073207msgid "This action will not update anything on the QUIC.cloud servers."
    32083208msgstr ""
    32093209
    3210 #: tpl/cdn/auto_setup.tpl.php:241 tpl/cdn/auto_setup.tpl.php:256
     3210#: tpl/cdn/auto_setup.tpl.php:251 tpl/cdn/auto_setup.tpl.php:266
    32113211msgid "Delete QUIC.cloud data"
    32123212msgstr ""
    32133213
    3214 #: tpl/cdn/auto_setup.tpl.php:242
     3214#: tpl/cdn/auto_setup.tpl.php:252
    32153215msgid ""
    32163216"Resets all LiteSpeed Cache plugin settings related to CDN setup back to the "
     
    32183218msgstr ""
    32193219
    3220 #: tpl/cdn/auto_setup.tpl.php:243
     3220#: tpl/cdn/auto_setup.tpl.php:253
    32213221msgid ""
    32223222"This allows you to try Auto CDN setup again, or abandon the setup entirely."
    32233223msgstr ""
    32243224
    3225 #: tpl/cdn/auto_setup.tpl.php:247
     3225#: tpl/cdn/auto_setup.tpl.php:257
    32263226msgid ""
    32273227"This action is not available if there is no domain key, the domain is not "
     
    32293229msgstr ""
    32303230
    3231 #: tpl/cdn/auto_setup.tpl.php:248
     3231#: tpl/cdn/auto_setup.tpl.php:258
    32323232msgid ""
    32333233"If you have not yet done so, please replace the QUIC.cloud nameservers at "
     
    32353235msgstr ""
    32363236
    3237 #: tpl/cdn/auto_setup.tpl.php:252
     3237#: tpl/cdn/auto_setup.tpl.php:262
    32383238msgid "Are you sure you want to reset CDN Setup?"
    32393239msgstr ""
    32403240
    3241 #: tpl/cdn/auto_setup.tpl.php:255
     3241#: tpl/cdn/auto_setup.tpl.php:265
    32423242msgid "Are you sure you want to delete QUIC.cloud data?"
    32433243msgstr ""
     
    52055205
    52065206#: tpl/page_optm/settings_localization.tpl.php:127
    5207 #: tpl/toolbox/beta_test.tpl.php:30
     5207#: tpl/toolbox/beta_test.tpl.php:31
    52085208msgid "Example"
    52095209msgstr ""
     
    57435743msgstr ""
    57445744
    5745 #: tpl/toolbox/beta_test.tpl.php:25
     5745#: tpl/toolbox/beta_test.tpl.php:26
    57465746msgid "Try GitHub Version"
    57475747msgstr ""
    57485748
    5749 #: tpl/toolbox/beta_test.tpl.php:29
     5749#: tpl/toolbox/beta_test.tpl.php:30
    57505750msgid ""
    57515751"Use this section to switch plugin versions. To beta test a GitHub commit, "
     
    57535753msgstr ""
    57545754
    5755 #: tpl/toolbox/beta_test.tpl.php:34
     5755#: tpl/toolbox/beta_test.tpl.php:35
    57565756msgid "Use latest GitHub Dev commit"
    57575757msgstr ""
    57585758
    5759 #: tpl/toolbox/beta_test.tpl.php:36
     5759#: tpl/toolbox/beta_test.tpl.php:37
    57605760msgid "Use latest GitHub Master commit"
    57615761msgstr ""
    57625762
    5763 #: tpl/toolbox/beta_test.tpl.php:38 tpl/toolbox/beta_test.tpl.php:54
     5763#: tpl/toolbox/beta_test.tpl.php:39 tpl/toolbox/beta_test.tpl.php:55
    57645764msgid "Use latest WordPress release version"
    57655765msgstr ""
    57665766
    5767 #: tpl/toolbox/beta_test.tpl.php:38
     5767#: tpl/toolbox/beta_test.tpl.php:39
    57685768msgid "OR"
    57695769msgstr ""
    57705770
    5771 #: tpl/toolbox/beta_test.tpl.php:49
     5771#: tpl/toolbox/beta_test.tpl.php:50
    57725772msgid ""
    57735773"Downgrade not recommended. May cause fatal error due to refactored code."
    57745774msgstr ""
    57755775
    5776 #: tpl/toolbox/beta_test.tpl.php:53
     5776#: tpl/toolbox/beta_test.tpl.php:54
    57775777msgid ""
    57785778"Press the %s button to use the most recent GitHub commit. Master is for "
     
    57805780msgstr ""
    57815781
    5782 #: tpl/toolbox/beta_test.tpl.php:53
     5782#: tpl/toolbox/beta_test.tpl.php:54
    57835783msgid "Use latest GitHub Dev/Master commit"
    57845784msgstr ""
    57855785
    5786 #: tpl/toolbox/beta_test.tpl.php:54
     5786#: tpl/toolbox/beta_test.tpl.php:55
    57875787msgid ""
    57885788"Press the %s button to stop beta testing and go back to the current release "
     
    57905790msgstr ""
    57915791
    5792 #: tpl/toolbox/beta_test.tpl.php:59
     5792#: tpl/toolbox/beta_test.tpl.php:60
    57935793msgid ""
    57945794"In order to avoid an upgrade error, you must be using %1$s or later before "
  • litespeed-cache/trunk/litespeed-cache.php

    r2977143 r2983968  
    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.7
     7 * Version:           5.7.0.1
    88 * Author:            LiteSpeed Technologies
    99 * Author URI:        https://www.litespeedtech.com
     
    3535}
    3636
    37 !defined('LSCWP_V') && define('LSCWP_V', '5.7');
     37!defined('LSCWP_V') && define('LSCWP_V', '5.7.0.1');
    3838
    3939!defined('LSCWP_CONTENT_DIR') && define('LSCWP_CONTENT_DIR', WP_CONTENT_DIR);
  • litespeed-cache/trunk/readme.txt

    r2977143 r2983968  
    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.3.1
    6 Stable tag: 5.7
     5Tested up to: 6.3.2
     6Stable tag: 5.7.0.1
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl.html
     
    250250
    251251== Changelog ==
     252
     253= 5.7.0.1 - Oct 25 2023 =
     254* **GUI** Improvements to admin banner messaging. (#694622)
     255* **CDN** Improvements to CDN Setup. (#694622)
     256* **Image Optimize** Improvements to the process of checking image identification. (#694622)
    252257
    253258= 5.7 - Oct 10 2023 =
  • litespeed-cache/trunk/src/admin-display.cls.php

    r2808204 r2983968  
    324324        $str = Lang::maybe_translate( $str );
    325325
    326         return '<div class="litespeed_icon ' . $cls . '"><p>'. $str . '</p></div>';
     326        return '<div class="litespeed_icon ' . $cls . '"><p>' . wp_kses_post($str) . '</p></div>';
    327327    }
    328328
  • litespeed-cache/trunk/src/cdn-setup.cls.php

    r2808204 r2983968  
    11<?php
     2
    23/**
    34 * CDN Setup service cls
     
    56 * @since      3.0
    67 */
     8
    79namespace LiteSpeed;
    8 defined( 'WPINC' ) || exit;
    9 
    10 class Cdn_Setup extends Base {
     10
     11defined('WPINC') || exit;
     12
     13class Cdn_Setup extends Base
     14{
    1115    const LOG_TAG = '👷';
    1216
     
    2630     * @since  3.0
    2731     */
    28     public function __construct() {
    29         $this->_setup_token = $this->conf( self::O_QC_TOKEN );
     32    public function __construct()
     33    {
     34        $this->_setup_token = $this->conf(self::O_QC_TOKEN);
    3035        $this->_summary = self::get_summary();
    3136    }
     
    3641     * @since  3.0
    3742     */
    38     public function maybe_extract_token() {
    39         $params = $this->cls( 'Cloud' )->parse_qc_redir( [ 'token' ] );
    40 
    41         if ( isset( $params[ 'token' ] ) ) {
    42             $this->_setup_token = $params[ 'token' ];
    43             $this->cls( 'Conf' )->update_confs( array( self::O_QC_TOKEN => $this->_setup_token ) );
    44             unset( $_GET[ 'token' ] );
    45         }
    46 
     43    public function maybe_extract_token()
     44    {
     45        $params = $this->cls('Cloud')->parse_qc_redir(['token']);
     46
     47        if (isset($params['token'])) {
     48            $this->_setup_token = $params['token'];
     49            $this->cls('Conf')->update_confs(array(self::O_QC_TOKEN => $this->_setup_token));
     50            unset($_GET['token']);
     51        }
    4752    }
    4853
     
    5358     * @access public
    5459     */
    55     public function update_cdn_status() {
    56 
    57         if ( !isset( $_POST[ 'success' ] ) || !isset( $_POST[ 'result' ] ) ) {
    58             self::save_summary( array( 'cdn_setup_err' => __( 'Received invalid message from the cloud server. Please submit a ticket.', 'litespeed-cache' ) ) );
    59             return self::err( 'lack_of_param' );
    60         }
    61         if (!$_POST[ 'success' ]) {
    62             self::save_summary( array( 'cdn_setup_err' => $_POST[ 'result' ][ '_msg' ] ) );
    63             Admin_Display::error( __( 'There was an error during CDN setup: ', 'litespeed-cache' ) . $_POST[ 'result' ][ '_msg' ] );
     60    public function update_cdn_status()
     61    {
     62        if (empty($_POST['hash'])) {
     63            self::debug('Lack of hash param');
     64            return self::err('lack_of_param');
     65        }
     66
     67        if ($_POST['hash'] !== md5(substr($this->conf(self::O_API_KEY), 3, 8))) {
     68            self::debug('token validate failed: token mismatch hash !== ' . $_POST['hash']);
     69            return self::err('callback_fail_hash');
     70        }
     71
     72        if (!isset($_POST['success']) || !isset($_POST['result'])) {
     73            self::save_summary(array('cdn_setup_err' => __('Received invalid message from the cloud server. Please submit a ticket.', 'litespeed-cache')));
     74            return self::err('lack_of_param');
     75        }
     76        if (!$_POST['success'] && !empty($_POST['result']['_msg'])) {
     77            $msg = wp_kses_post($_POST['result']['_msg']);
     78            self::save_summary(array('cdn_setup_err' => $msg));
     79            Admin_Display::error(__('There was an error during CDN setup: ', 'litespeed-cache') . $msg);
    6480        } else {
    65             $this->_process_cdn_status($_POST[ 'result' ]);
     81            $this->_process_cdn_status($_POST['result']);
    6682        }
    6783
     
    7591     * @access private
    7692     */
    77     private function _qc_refresh() {
     93    private function _qc_refresh()
     94    {
    7895
    7996        $json = $this->cls('Cloud')->req_rest_api('/user/cdn/status');
     
    8299            return;
    83100        } else if (is_string($json)) {
    84             self::save_summary( array( 'cdn_setup_err' => $json ) );
     101            self::save_summary(array('cdn_setup_err' => $json));
    85102            return;
    86103        }
     
    99116     * @access private
    100117     */
    101     private function _process_cdn_status($result) {
    102 
    103         if ( isset($result[ 'nameservers' ] ) ) {
     118    private function _process_cdn_status($result)
     119    {
     120
     121        if (isset($result['nameservers'])) {
    104122            if (isset($this->_summary['cdn_setup_err'])) {
    105123                unset($this->_summary['cdn_setup_err']);
    106124            }
    107             if (isset($result[ 'summary' ])) {
    108                 $this->_summary[ 'cdn_dns_summary' ] = $result[ 'summary' ];
    109             }
    110             $this->cls( 'Cloud' )->set_linked();
    111             $this->cls( 'Conf' )->update_confs( array( self::O_QC_NAMESERVERS => $result[ 'nameservers' ], self::O_CDN_QUIC => true ) );
    112             Admin_Display::succeed( '🎊 ' . __( 'Congratulations, QUIC.cloud successfully set this domain up for the CDN. Please update your nameservers to:', 'litespeed-cache' ) . $result[ 'nameservers' ] );
    113         } else if ( isset($result[ 'done' ] ) ) {
    114             if ( isset( $this->_summary[ 'cdn_setup_err' ] ) ) {
    115                 unset( $this->_summary[ 'cdn_setup_err' ] );
    116             }
    117             if ( isset( $this->_summary[ 'cdn_verify_msg' ] ) ) {
    118                 unset( $this->_summary[ 'cdn_verify_msg' ] );
    119             }
    120             $this->_summary[ 'cdn_setup_done_ts' ] = time();
     125            if (isset($result['summary'])) {
     126                $this->_summary['cdn_dns_summary'] = $result['summary'];
     127            }
     128            $this->cls('Cloud')->set_linked();
     129            $nameservers = esc_html($result['nameservers']);
     130            $this->cls('Conf')->update_confs(array(self::O_QC_NAMESERVERS => $nameservers, self::O_CDN_QUIC => true));
     131            Admin_Display::succeed('🎊 ' . __('Congratulations, QUIC.cloud successfully set this domain up for the CDN. Please update your nameservers to:', 'litespeed-cache') . $nameservers);
     132        } else if (isset($result['done'])) {
     133            if (isset($this->_summary['cdn_setup_err'])) {
     134                unset($this->_summary['cdn_setup_err']);
     135            }
     136            if (isset($this->_summary['cdn_verify_msg'])) {
     137                unset($this->_summary['cdn_verify_msg']);
     138            }
     139            $this->_summary['cdn_setup_done_ts'] = time();
    121140
    122141            $this->_setup_token = '';
    123             $this->cls( 'Conf' )->update_confs( array( self::O_QC_TOKEN => '', self::O_QC_NAMESERVERS => '' ) );
    124         } else if ( isset($result[ '_msg' ] ) ) {
    125             $notice = $result[ '_msg' ];
    126             if ( $this->conf( Base::O_QC_NAMESERVERS )) {
    127                 $this->_summary[ 'cdn_verify_msg' ] = $result[ '_msg' ];
    128                 $notice = array('cdn_verify_msg' => $result[ '_msg' ]);
    129             }
    130             Admin_Display::succeed( $notice );
     142            $this->cls('Conf')->update_confs(array(self::O_QC_TOKEN => '', self::O_QC_NAMESERVERS => ''));
     143        } else if (isset($result['_msg'])) {
     144            $notice = esc_html($result['_msg']);
     145            if ($this->conf(Base::O_QC_NAMESERVERS)) {
     146                $this->_summary['cdn_verify_msg'] = $notice;
     147                $notice = array('cdn_verify_msg' => $notice);
     148            }
     149            Admin_Display::succeed($notice);
    131150        } else {
    132             Admin_Display::succeed( __( 'CDN Setup is running.', 'litespeed-cache' ) );
     151            Admin_Display::succeed(__('CDN Setup is running.', 'litespeed-cache'));
    133152        }
    134153        self::save_summary();
     
    141160     * @access private
    142161     */
    143     private function _qc_reset($delete) {
     162    private function _qc_reset($delete)
     163    {
    144164        $data = array(
    145165            'site_url' => home_url(),
     
    151171
    152172        if (!empty($this->_setup_token)) {
    153             $data['rest'] = function_exists( 'rest_get_url_prefix' ) ? rest_get_url_prefix() : apply_filters( 'rest_url_prefix', 'wp-json' );
     173            $data['rest'] = function_exists('rest_get_url_prefix') ? rest_get_url_prefix() : apply_filters('rest_url_prefix', 'wp-json');
    154174
    155175            $json = $this->cls('Cloud')->req_rest_api('/user/cdn/reset', $data);
     
    158178                return;
    159179            } else if (is_string($json) && $json != 'unauthorized access to REST API.') {
    160                 self::save_summary( array( 'cdn_setup_err' => $json ) );
     180                self::save_summary(array('cdn_setup_err' => $json));
    161181                return;
    162182            }
    163         } else if ( ! isset( $this->_summary[ 'cdn_setup_done_ts' ] ) ||  ! $this->_summary[ 'cdn_setup_done_ts' ] ) {
    164             Admin_Display::info( __( 'Notice: CDN Setup only reset locally.', 'litespeed-cache'));
    165         } else if ( ! Cloud::get_summary( 'is_linked' ) ) {
    166 
    167             Admin_Display::error( __( 'Cannot delete, site is not linked.', 'litespeed-cache' ) );
    168             return;
    169 
     183        } else if (!isset($this->_summary['cdn_setup_done_ts']) ||  !$this->_summary['cdn_setup_done_ts']) {
     184            Admin_Display::info(__('Notice: CDN Setup only reset locally.', 'litespeed-cache'));
     185        } else if (!Cloud::get_summary('is_linked')) {
     186
     187            Admin_Display::error(__('Cannot delete, site is not linked.', 'litespeed-cache'));
     188            return;
    170189        } else {
    171190
    172             $json = Cloud::post( Cloud::SVC_D_DEL_CDN_DNS, $data);
     191            $json = Cloud::post(Cloud::SVC_D_DEL_CDN_DNS, $data);
    173192
    174193            if (!is_array($json)) {
     
    177196        }
    178197
    179         if ( isset( $this->_summary[ 'cdn_setup_ts' ] ) ) {
    180             unset( $this->_summary[ 'cdn_setup_ts' ] );
    181         }
    182         if ( isset( $this->_summary[ 'cdn_setup_done_ts' ] ) ) {
    183             unset( $this->_summary[ 'cdn_setup_done_ts' ] );
    184         }
    185         if ( isset( $this->_summary[ 'cdn_setup_err' ] ) ) {
    186             unset( $this->_summary[ 'cdn_setup_err' ] );
    187         }
    188         if ( isset( $this->_summary[ 'cdn_verify_msg' ] ) ) {
    189             unset( $this->_summary[ 'cdn_verify_msg' ] );
    190         }
    191         if ( isset( $this->_summary[ 'cdn_dns_summary' ] ) ) {
    192             unset( $this->_summary[ 'cdn_dns_summary' ] );
     198        if (isset($this->_summary['cdn_setup_ts'])) {
     199            unset($this->_summary['cdn_setup_ts']);
     200        }
     201        if (isset($this->_summary['cdn_setup_done_ts'])) {
     202            unset($this->_summary['cdn_setup_done_ts']);
     203        }
     204        if (isset($this->_summary['cdn_setup_err'])) {
     205            unset($this->_summary['cdn_setup_err']);
     206        }
     207        if (isset($this->_summary['cdn_verify_msg'])) {
     208            unset($this->_summary['cdn_verify_msg']);
     209        }
     210        if (isset($this->_summary['cdn_dns_summary'])) {
     211            unset($this->_summary['cdn_dns_summary']);
    193212        }
    194213        self::save_summary($this->_summary, false, true);
    195214
    196215        $this->_setup_token = '';
    197         $this->cls( 'Conf' )->update_confs( array( self::O_QC_TOKEN => '', self::O_QC_NAMESERVERS => '', self::O_CDN_QUIC => false ) );
     216        $this->cls('Conf')->update_confs(array(self::O_QC_TOKEN => '', self::O_QC_NAMESERVERS => '', self::O_CDN_QUIC => false));
    198217        $msg = '';
    199218        if ($delete) {
    200             $msg = __( 'CDN Setup Token and DNS zone deleted. Note: if my.quic.cloud account deletion is desired, that the account still exists and must be deleted separately.', 'litespeed-cache' );
     219            $msg = __('CDN Setup Token and DNS zone deleted. Note: if my.quic.cloud account deletion is desired, that the account still exists and must be deleted separately.', 'litespeed-cache');
    201220        } else {
    202             $msg = __( 'CDN Setup Token reset. Note: if my.quic.cloud account deletion is desired, that the account still exists and must be deleted separately.', 'litespeed-cache' );
    203         }
    204         Admin_Display::succeed( $msg );
     221            $msg = __('CDN Setup Token reset. Note: if my.quic.cloud account deletion is desired, that the account still exists and must be deleted separately.', 'litespeed-cache');
     222        }
     223        Admin_Display::succeed($msg);
    205224        return self::ok();
    206225    }
     
    211230     * @since  4.7
    212231     */
    213     public function has_cdn_setup_token() {
    214         return !empty( $this->_setup_token );
     232    public function has_cdn_setup_token()
     233    {
     234        return !empty($this->_setup_token);
    215235    }
    216236
     
    222242     * @since  4.7
    223243     */
    224     private function _qc_link() {
    225         if ( $this->has_cdn_setup_token() ) {
     244    private function _qc_link()
     245    {
     246        if ($this->has_cdn_setup_token()) {
    226247            return;
    227248        }
     
    229250        $data = array(
    230251            'site_url'      => home_url(),
    231             'ref'           => get_admin_url( null, 'admin.php?page=litespeed-cdn' ),
     252            'ref'           => get_admin_url(null, 'admin.php?page=litespeed-cdn'),
    232253        );
    233         $api_key = $this->conf( self::O_API_KEY );
     254        $api_key = $this->conf(self::O_API_KEY);
    234255        if ($api_key) {
    235             $data['domain_hash'] = md5( substr( $api_key, 0, 8 ) );
    236         }
    237 
    238         wp_redirect( Cloud::CLOUD_SERVER_DASH . '/u/wptoken?data=' . Utility::arr2str( $data ) );
     256            $data['domain_hash'] = md5(substr($api_key, 0, 8));
     257        }
     258
     259        wp_redirect(Cloud::CLOUD_SERVER_DASH . '/u/wptoken?data=' . Utility::arr2str($data));
    239260        exit;
    240261    }
     
    247268     * @since  4.7
    248269     */
    249     private function _qc_nolink() {
    250         if ( $this->has_cdn_setup_token() ) {
     270    private function _qc_nolink()
     271    {
     272        if ($this->has_cdn_setup_token()) {
    251273            return;
    252274        }
     
    256278        );
    257279
    258         $json = Cloud::post( Cloud::SVC_D_SETUP_TOKEN, $data);
    259 
    260         if (isset($json[ 'token' ])) {
    261             self::save_summary( array( 'cdn_setup_ts' => time() ) );
    262             $this->_setup_token = $json[ 'token' ];
    263             $this->cls( 'Conf' )->update_confs( array( self::O_QC_TOKEN => $this->_setup_token ) );
     280        $json = Cloud::post(Cloud::SVC_D_SETUP_TOKEN, $data);
     281
     282        if (isset($json['token'])) {
     283            self::save_summary(array('cdn_setup_ts' => time()));
     284            $this->_setup_token = $json['token'];
     285            $this->cls('Conf')->update_confs(array(self::O_QC_TOKEN => $this->_setup_token));
    264286        }
    265287    }
     
    270292     * @since  4.7
    271293     */
    272     private function _qc_run() {
     294    private function _qc_run()
     295    {
    273296
    274297        $data = array(
    275298            'site_url' => home_url(),
    276             'rest'      => function_exists( 'rest_get_url_prefix' ) ? rest_get_url_prefix() : apply_filters( 'rest_url_prefix', 'wp-json' ),
    277             'server_ip' => $this->conf( self::O_SERVER_IP ),
     299            'rest'      => function_exists('rest_get_url_prefix') ? rest_get_url_prefix() : apply_filters('rest_url_prefix', 'wp-json'),
     300            'server_ip' => $this->conf(self::O_SERVER_IP),
    278301        );
    279302
    280         $api_key = $this->conf( self::O_API_KEY );
     303        $api_key = $this->conf(self::O_API_KEY);
    281304        if ($api_key) {
    282             $data['domain_hash'] = md5( substr( $api_key, 0, 8 ) );
    283         }
    284 
    285         $__cloud = $this->cls( 'Cloud' );
     305            $data['domain_hash'] = md5(substr($api_key, 0, 8));
     306        }
     307
     308        $__cloud = $this->cls('Cloud');
    286309        $json = $__cloud->req_rest_api('/user/cdn/', $data);
    287310
     
    289312            return;
    290313        } else if (is_string($json)) {
    291             self::save_summary( array( 'cdn_setup_err' => $json ) );
    292             return;
    293         }
    294 
    295         $this->_summary[ 'cdn_setup_ts' ] = time();
     314            self::save_summary(array('cdn_setup_err' => $json));
     315            return;
     316        }
     317
     318        $this->_summary['cdn_setup_ts'] = time();
    296319
    297320        $msg = '';
     
    302325        $json = $json['result'];
    303326
    304         if ( isset( $this->_summary[ 'cdn_setup_err' ] ) ) {
    305             unset( $this->_summary[ 'cdn_setup_err' ] );
    306         }
    307 
    308         if ( isset( $this->_summary[ 'cdn_verify_msg' ] ) ) {
    309             unset( $this->_summary[ 'cdn_verify_msg' ] );
     327        if (isset($this->_summary['cdn_setup_err'])) {
     328            unset($this->_summary['cdn_setup_err']);
     329        }
     330
     331        if (isset($this->_summary['cdn_verify_msg'])) {
     332            unset($this->_summary['cdn_verify_msg']);
    310333        }
    311334        self::save_summary();
    312335
    313336        // Save token option
    314         if ( ! empty( $json[ 'token' ] ) ) {
    315             $__cloud->set_keygen_token( $json[ 'token' ] );
     337        if (!empty($json['token'])) {
     338            $__cloud->set_keygen_token($json['token']);
    316339        }
    317340
    318341        // This is a ok msg
    319         if ( ! empty( $msg ) ) {
    320             self::debug( '_msg: ' . $msg );
    321 
    322             $msg = __( 'Message from QUIC.cloud server', 'litespeed-cache' ) . ': ' . $msg;
    323             Admin_Display::info( $msg );
    324             return;
    325         }
    326 
    327         self::debug( '✅ Successfully start CDN setup.' );
     342        if (!empty($msg)) {
     343            self::debug('_msg: ' . $msg);
     344
     345            $msg = __('Message from QUIC.cloud server', 'litespeed-cache') . ': ' . $msg;
     346            Admin_Display::info($msg);
     347            return;
     348        }
     349
     350        self::debug('✅ Successfully start CDN setup.');
    328351    }
    329352
     
    333356     * @since  3.0
    334357     */
    335     public static function ok( $data = array() ) {
    336         $data[ '_res' ] = 'ok';
     358    public static function ok($data = array())
     359    {
     360        $data['_res'] = 'ok';
    337361        return $data;
    338362    }
     
    343367     * @since  3.0
    344368     */
    345     public static function err( $code ) {
    346         return array( '_res' => 'err', '_msg' => $code );
     369    public static function err($code)
     370    {
     371        return array('_res' => 'err', '_msg' => $code);
    347372    }
    348373
     
    353378     * @access public
    354379     */
    355     public function handler() {
     380    public function handler()
     381    {
    356382        $type = Router::verify_type();
    357383
    358         switch ( $type ) {
     384        switch ($type) {
    359385
    360386            case self::TYPE_LINK:
  • litespeed-cache/trunk/src/cloud.cls.php

    r2977143 r2983968  
    12551255    {
    12561256        try {
    1257             $this->_validate_hash();
     1257            $this->validate_hash();
    12581258        } catch (\Exception $e) {
    12591259            return self::err($e->getMessage());
     
    12811281
    12821282        try {
    1283             $this->_validate_hash(1);
     1283            $this->validate_hash(1);
    12841284        } catch (\Exception $e) {
    12851285            return self::err($e->getMessage());
     
    13091309     * @since  3.0
    13101310     */
    1311     private function _validate_hash($offset = 0)
     1311    public function validate_hash($offset = 0)
    13121312    {
    13131313        if (empty($_POST['hash'])) {
  • litespeed-cache/trunk/src/rest.cls.php

    r2832517 r2983968  
    11<?php
     2
    23/**
    34 * The REST related class.
     
    56 * @since       2.9.4
    67 */
     8
    79namespace LiteSpeed;
    810
    9 defined( 'WPINC' ) || exit;
    10 
    11 class REST extends Root {
     11defined('WPINC') || exit;
     12
     13class REST extends Root
     14{
    1215    const LOG_TAG = '☎️';
    1316    private $_internal_rest_status = false;
     
    1821     * @since    2.9.4
    1922     */
    20     public function __construct() {
     23    public function __construct()
     24    {
    2125        // Hook to internal REST call
    22         add_filter( 'rest_request_before_callbacks', array( $this, 'set_internal_rest_on' ) );
    23         add_filter( 'rest_request_after_callbacks', array( $this, 'set_internal_rest_off' ) );
    24 
    25         add_action( 'rest_api_init', array( $this, 'rest_api_init' ) );
     26        add_filter('rest_request_before_callbacks', array($this, 'set_internal_rest_on'));
     27        add_filter('rest_request_after_callbacks', array($this, 'set_internal_rest_off'));
     28
     29        add_action('rest_api_init', array($this, 'rest_api_init'));
    2630    }
    2731
     
    3236     * @access public
    3337     */
    34     public function rest_api_init() {
     38    public function rest_api_init()
     39    {
    3540        // Activate or deactivate a specific crawler callback
    36         register_rest_route( 'litespeed/v1', '/toggle_crawler_state', array(
    37             'methods' => 'POST',
    38             'callback' => array( $this, 'toggle_crawler_state' ),
    39             'permission_callback'   => function() {
    40                 return current_user_can( 'manage_network_options' ) || current_user_can( 'manage_options' );
     41        register_rest_route('litespeed/v1', '/toggle_crawler_state', array(
     42            'methods' => 'POST',
     43            'callback' => array($this, 'toggle_crawler_state'),
     44            'permission_callback'   => function () {
     45                return current_user_can('manage_network_options') || current_user_can('manage_options');
    4146            }
    42         ) );
    43 
    44         register_rest_route( 'litespeed/v1', '/tool/check_ip', array(
     47        ));
     48
     49        register_rest_route('litespeed/v1', '/tool/check_ip', array(
    4550            'methods' => 'GET',
    46             'callback' => array( $this, 'check_ip' ),
    47             'permission_callback'   => function() {
    48                 return current_user_can( 'manage_network_options' ) || current_user_can( 'manage_options' );
     51            'callback' => array($this, 'check_ip'),
     52            'permission_callback'   => function () {
     53                return current_user_can('manage_network_options') || current_user_can('manage_options');
    4954            }
    50         ) );
     55        ));
    5156
    5257        // IP callback validate
    53         register_rest_route( 'litespeed/v1', '/ip_validate', array(
    54             'methods' => 'POST',
    55             'callback' => array( $this, 'ip_validate' ),
    56             'permission_callback'   => array( $this, 'is_from_cloud' ),
    57         ) );
     58        register_rest_route('litespeed/v1', '/ip_validate', array(
     59            'methods' => 'POST',
     60            'callback' => array($this, 'ip_validate'),
     61            'permission_callback'   => array($this, 'is_from_cloud'),
     62        ));
    5863
    5964        // Token callback validate
    60         register_rest_route( 'litespeed/v1', '/token', array(
    61             'methods' => 'POST',
    62             'callback' => array( $this, 'token' ),
    63             'permission_callback'   => array( $this, 'is_from_cloud' ),
    64         ) );
    65         register_rest_route( 'litespeed/v1', '/token', array(
     65        register_rest_route('litespeed/v1', '/token', array(
     66            'methods' => 'POST',
     67            'callback' => array($this, 'token'),
     68            'permission_callback'   => array($this, 'is_from_cloud'),
     69        ));
     70        register_rest_route('litespeed/v1', '/token', array(
    6671            'methods' => 'GET',
    67             'callback' => array( $this, 'token_get' ),
    68             'permission_callback'   => array( $this, 'is_from_cloud' ),
    69         ) );
    70         register_rest_route( 'litespeed/v1', '/ping', array(
     72            'callback' => array($this, 'token_get'),
     73            'permission_callback'   => array($this, 'is_from_cloud'),
     74        ));
     75        register_rest_route('litespeed/v1', '/ping', array(
    7176            'methods' => 'GET',
    72             'callback' => array( $this, 'ping' ),
     77            'callback' => array($this, 'ping'),
    7378            'permission_callback'   => '__return_true',
    74         ) );
     79        ));
    7580
    7681        // API key callback notification
    77         register_rest_route( 'litespeed/v1', '/apikey', array(
    78             'methods' => 'POST',
    79             'callback' => array( $this, 'apikey' ),
    80             'permission_callback'   => array( $this, 'is_from_cloud' ),
    81         ) );
     82        register_rest_route('litespeed/v1', '/apikey', array(
     83            'methods' => 'POST',
     84            'callback' => array($this, 'apikey'),
     85            'permission_callback'   => array($this, 'is_from_cloud'),
     86        ));
    8287
    8388        // CDN setup callback notification
    84         register_rest_route( 'litespeed/v1', '/cdn_status', array(
    85             'methods' => 'POST',
    86             'callback' => array( $this, 'cdn_status' ),
    87             'permission_callback'   => array( $this, 'is_from_cloud' ),
    88         ) );
     89        register_rest_route('litespeed/v1', '/cdn_status', array(
     90            'methods' => 'POST',
     91            'callback' => array($this, 'cdn_status'),
     92            'permission_callback'   => array($this, 'is_from_cloud'),
     93        ));
    8994
    9095        // Image optm notify_img
    9196        // Need validation
    92         register_rest_route( 'litespeed/v1', '/notify_img', array(
    93             'methods' => 'POST',
    94             'callback' => array( $this, 'notify_img' ),
    95             'permission_callback'   => array( $this, 'is_from_cloud' ),
    96         ) );
    97 
    98         register_rest_route( 'litespeed/v1', '/notify_ucss', array(
    99             'methods' => 'POST',
    100             'callback' => array( $this, 'notify_ucss' ),
    101             'permission_callback'   => array( $this, 'is_from_cloud' ),
    102         ) );
    103 
    104         register_rest_route( 'litespeed/v1', '/notify_vpi', array(
    105             'methods' => 'POST',
    106             'callback' => array( $this, 'notify_vpi' ),
    107             'permission_callback'   => array( $this, 'is_from_cloud' ),
    108         ) );
    109 
    110         register_rest_route( 'litespeed/v1', '/err_domains', array(
    111             'methods' => 'POST',
    112             'callback' => array( $this, 'err_domains' ),
    113             'permission_callback'   => array( $this, 'is_from_cloud' ),
    114         ) );
     97        register_rest_route('litespeed/v1', '/notify_img', array(
     98            'methods' => 'POST',
     99            'callback' => array($this, 'notify_img'),
     100            'permission_callback'   => array($this, 'is_from_cloud'),
     101        ));
     102
     103        register_rest_route('litespeed/v1', '/notify_ucss', array(
     104            'methods' => 'POST',
     105            'callback' => array($this, 'notify_ucss'),
     106            'permission_callback'   => array($this, 'is_from_cloud'),
     107        ));
     108
     109        register_rest_route('litespeed/v1', '/notify_vpi', array(
     110            'methods' => 'POST',
     111            'callback' => array($this, 'notify_vpi'),
     112            'permission_callback'   => array($this, 'is_from_cloud'),
     113        ));
     114
     115        register_rest_route('litespeed/v1', '/err_domains', array(
     116            'methods' => 'POST',
     117            'callback' => array($this, 'err_domains'),
     118            'permission_callback'   => array($this, 'is_from_cloud'),
     119        ));
    115120
    116121        // Image optm check_img
    117122        // Need validation
    118         register_rest_route( 'litespeed/v1', '/check_img', array(
    119             'methods' => 'POST',
    120             'callback' => array( $this, 'check_img' ),
    121             'permission_callback'   => array( $this, 'is_from_cloud' ),
    122         ) );
    123 
     123        register_rest_route('litespeed/v1', '/check_img', array(
     124            'methods' => 'POST',
     125            'callback' => array($this, 'check_img'),
     126            'permission_callback'   => array($this, 'is_from_cloud'),
     127        ));
    124128    }
    125129
     
    129133     * @since  4.3
    130134     */
    131     public function toggle_crawler_state() {
    132         if( isset( $_POST[ 'crawler_id' ] ) ) {
    133             return $this->cls( 'Crawler' )->toggle_activeness( $_POST[ 'crawler_id' ] ) ? 1 : 0;
     135    public function toggle_crawler_state()
     136    {
     137        if (isset($_POST['crawler_id'])) {
     138            return $this->cls('Crawler')->toggle_activeness($_POST['crawler_id']) ? 1 : 0;
    134139        }
    135140    }
     
    141146     * @since 4.4.7 As there is always token/api key validation, ip validation is redundant
    142147     */
    143     public function is_from_cloud() {
     148    public function is_from_cloud()
     149    {
    144150        return true;
    145151        // return $this->cls( 'Cloud' )->is_from_cloud();
     
    151157     * @since  3.0.4
    152158     */
    153     public function token_get() {
     159    public function token_get()
     160    {
    154161        return Cloud::ok();
    155162    }
     
    160167     * @since  3.0.4
    161168     */
    162     public function ping() {
    163         return Cloud::ok( array( 'ver' => Core::VER ) );
    164     }
    165 
    166     /**
    167      * Launch api call
    168      *
    169      * @since  3.0
    170      */
    171     public function check_ip() {
     169    public function ping()
     170    {
     171        return Cloud::ok(array('ver' => Core::VER));
     172    }
     173
     174    /**
     175     * Launch api call
     176     *
     177     * @since  3.0
     178     */
     179    public function check_ip()
     180    {
    172181        return Tool::cls()->check_ip();
    173182    }
     
    178187     * @since  3.0
    179188     */
    180     public function ip_validate() {
    181         return $this->cls( 'Cloud' )->ip_validate();
    182     }
    183 
    184     /**
    185      * Launch api call
    186      *
    187      * @since  3.0
    188      */
    189     public function token() {
    190         return $this->cls( 'Cloud' )->token_validate();
    191     }
    192 
    193     /**
    194      * Launch api call
    195      *
    196      * @since  3.0
    197      */
    198     public function apikey() {
    199         return $this->cls( 'Cloud' )->save_apikey();
     189    public function ip_validate()
     190    {
     191        return $this->cls('Cloud')->ip_validate();
     192    }
     193
     194    /**
     195     * Launch api call
     196     *
     197     * @since  3.0
     198     */
     199    public function token()
     200    {
     201        return $this->cls('Cloud')->token_validate();
     202    }
     203
     204    /**
     205     * Launch api call
     206     *
     207     * @since  3.0
     208     */
     209    public function apikey()
     210    {
     211        return $this->cls('Cloud')->save_apikey();
    200212    }
    201213
     
    205217     * @since  3.0
    206218     */
    207     public function cdn_status() {
    208         return $this->cls( 'Cdn_Setup' )->update_cdn_status();
    209     }
    210 
    211     /**
    212      * Launch api call
    213      *
    214      * @since  3.0
    215      */
    216     public function notify_img() {
     219    public function cdn_status()
     220    {
     221        return $this->cls('Cdn_Setup')->update_cdn_status();
     222    }
     223
     224    /**
     225     * Launch api call
     226     *
     227     * @since  3.0
     228     */
     229    public function notify_img()
     230    {
    217231        return Img_Optm::cls()->notify_img();
    218232    }
     
    221235     * @since  5.2
    222236     */
    223     public function notify_ucss() {
     237    public function notify_ucss()
     238    {
    224239        self::debug('notify_ucss');
    225240        return UCSS::cls()->notify();
     
    229244     * @since  4.7
    230245     */
    231     public function notify_vpi() {
     246    public function notify_vpi()
     247    {
    232248        self::debug('notify_vpi');
    233249        return VPI::cls()->notify();
     
    237253     * @since  4.7
    238254     */
    239     public function err_domains() {
     255    public function err_domains()
     256    {
    240257        self::debug('err_domains');
    241         return $this->cls( 'Cloud' )->rest_err_domains();
    242     }
    243 
    244     /**
    245      * Launch api call
    246      *
    247      * @since  3.0
    248      */
    249     public function check_img() {
     258        return $this->cls('Cloud')->rest_err_domains();
     259    }
     260
     261    /**
     262     * Launch api call
     263     *
     264     * @since  3.0
     265     */
     266    public function check_img()
     267    {
     268        try {
     269            $this->cls('Cloud')->validate_hash(4);
     270        } catch (\Exception $e) {
     271            return self::err($e->getMessage());
     272        }
     273
    250274        return Img_Optm::cls()->check_img();
    251275    }
    252276
    253277    /**
     278     * Return error
     279     *
     280     * @since  5.7.0.1
     281     */
     282    public static function err($code)
     283    {
     284        return array('_res' => 'err', '_msg' => $code);
     285    }
     286
     287    /**
    254288     * Set internal REST tag to ON
    255289     *
     
    257291     * @access public
    258292     */
    259     public function set_internal_rest_on( $not_used = null )
     293    public function set_internal_rest_on($not_used = null)
    260294    {
    261295        $this->_internal_rest_status = true;
    262         Debug2::debug2( '[REST] ✅ Internal REST ON [filter] rest_request_before_callbacks' );
     296        Debug2::debug2('[REST] ✅ Internal REST ON [filter] rest_request_before_callbacks');
    263297
    264298        return $not_used;
     
    271305     * @access public
    272306     */
    273     public function set_internal_rest_off( $not_used = null )
     307    public function set_internal_rest_off($not_used = null)
    274308    {
    275309        $this->_internal_rest_status = false;
    276         Debug2::debug2( '[REST] ❎ Internal REST OFF [filter] rest_request_after_callbacks' );
     310        Debug2::debug2('[REST] ❎ Internal REST OFF [filter] rest_request_after_callbacks');
    277311
    278312        return $not_used;
     
    297331     * @access public
    298332     */
    299     public function is_rest( $url = false )
     333    public function is_rest($url = false)
    300334    {
    301335        // For WP 4.4.0- compatibility
    302         if ( ! function_exists( 'rest_get_url_prefix' ) ) {
    303             return defined( 'REST_REQUEST' ) && REST_REQUEST;
     336        if (!function_exists('rest_get_url_prefix')) {
     337            return defined('REST_REQUEST') && REST_REQUEST;
    304338        }
    305339
     
    307341
    308342        // Case #1: After WP_REST_Request initialisation
    309         if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) {
     343        if (defined('REST_REQUEST') && REST_REQUEST) {
    310344            return true;
    311345        }
    312346
    313347        // Case #2: Support "plain" permalink settings
    314         if ( isset( $_GET[ 'rest_route' ] ) && strpos( trim( $_GET[ 'rest_route' ], '\\/' ), $prefix , 0 ) === 0 ) {
     348        if (isset($_GET['rest_route']) && strpos(trim($_GET['rest_route'], '\\/'), $prefix, 0) === 0) {
    315349            return true;
    316350        }
    317351
    318         if ( ! $url ) {
     352        if (!$url) {
    319353            return false;
    320354        }
    321355
    322356        // Case #3: URL Path begins with wp-json/ (REST prefix) Safe for subfolder installation
    323         $rest_url = wp_parse_url( site_url( $prefix ) );
    324         $current_url = wp_parse_url( $url );
     357        $rest_url = wp_parse_url(site_url($prefix));
     358        $current_url = wp_parse_url($url);
    325359        // Debug2::debug( '[Util] is_rest check [base] ', $rest_url );
    326360        // Debug2::debug( '[Util] is_rest check [curr] ', $current_url );
    327361        // Debug2::debug( '[Util] is_rest check [curr2] ', wp_parse_url( add_query_arg( array( ) ) ) );
    328         return strpos( $current_url[ 'path' ], $rest_url[ 'path' ] ) === 0;
     362        return strpos($current_url['path'], $rest_url['path']) === 0;
    329363    }
    330364}
  • litespeed-cache/trunk/tpl/cdn/auto_setup.tpl.php

    r2808204 r2983968  
    11<?php
     2
    23namespace LiteSpeed;
    3 defined( 'WPINC' ) || exit;
     4
     5defined('WPINC') || exit;
    46
    57$__cdnsetup = Cdn_Setup::cls();
     
    810$__cdnsetup->maybe_extract_token();
    911
    10 $cloud_linked = Cloud::get_summary( 'is_linked' );
     12$cloud_linked = Cloud::get_summary('is_linked');
    1113$setup_summary = Cdn_Setup::get_summary();
    1214
    1315$cdn_setup_done_ts = 0;
    14 if ( ! empty( $setup_summary[ 'cdn_setup_done_ts' ] ) ) {
    15     $cdn_setup_done_ts = $setup_summary[ 'cdn_setup_done_ts' ];
     16if (!empty($setup_summary['cdn_setup_done_ts'])) {
     17    $cdn_setup_done_ts = $setup_summary['cdn_setup_done_ts'];
    1618}
    1719
    1820$has_setup_token = $__cdnsetup->has_cdn_setup_token();
    1921
    20 if ( ! empty( $setup_summary[ 'cdn_setup_ts' ] ) ) {
    21     $cdn_setup_ts = $setup_summary[ 'cdn_setup_ts' ];
    22 
    23     if ( !empty( $setup_summary[ 'cdn_setup_err' ] ) ) {
    24         $cdn_setup_err = $setup_summary[ 'cdn_setup_err' ];
     22if (!empty($setup_summary['cdn_setup_ts'])) {
     23    $cdn_setup_ts = $setup_summary['cdn_setup_ts'];
     24
     25    if (!empty($setup_summary['cdn_setup_err'])) {
     26        $cdn_setup_err = $setup_summary['cdn_setup_err'];
    2527    }
    2628
    27     if ($this->conf( Base::O_QC_NAMESERVERS )) {
    28         $nameservers = explode(',', $this->conf( Base::O_QC_NAMESERVERS ));
     29    if ($this->conf(Base::O_QC_NAMESERVERS)) {
     30        $nameservers = explode(',', $this->conf(Base::O_QC_NAMESERVERS));
    2931    }
    3032} else {
     
    3335
    3436$curr_status = '<span class="litespeed-desc">' . __('Not running', 'litespeed-cache') . '</span>';
    35 $apply_btn_txt = __( 'Run CDN Setup', 'litespeed-cache' );
     37$apply_btn_txt = __('Run CDN Setup', 'litespeed-cache');
    3638$apply_btn_type = Cdn_Setup::TYPE_RUN;
    3739$disabled = '';
     
    4042if ($cdn_setup_done_ts) {
    4143    $curr_status = '<span class="litespeed-success dashicons dashicons-yes"></span> '
    42                     . __('Done', 'litespeed-cache')
    43                     . ' <span class="litespeed-desc litespeed-left10">'
    44                     . sprintf( __('Completed at %s', 'litespeed-cache'), wp_date(get_option( 'date_format' ) . ' ' . get_option( 'time_format'), $cdn_setup_done_ts) )
    45                     . '</span>';
     44        . __('Done', 'litespeed-cache')
     45        . ' <span class="litespeed-desc litespeed-left10">'
     46        . sprintf(__('Completed at %s', 'litespeed-cache'), wp_date(get_option('date_format') . ' ' . get_option('time_format'), $cdn_setup_done_ts))
     47        . '</span>';
    4648    $disabled = 'disabled';
    4749} else if (!$has_setup_token) {
    4850    $disabled = 'disabled';
    49 } else if ( ! empty( $cdn_setup_err ) ) {
     51} else if (!empty($cdn_setup_err)) {
    5052    $curr_status = '<span class="litespeed-warning dashicons dashicons-controls-pause"></span> ' . __('Paused', 'litespeed-cache');
    5153    $curr_status_subline = '<p class="litespeed-desc">' . $cdn_setup_err . '</p>';
    52 } else if ( $cdn_setup_ts > 0 ) {
    53     if ( isset($nameservers) ) {
     54} else if ($cdn_setup_ts > 0) {
     55    if (isset($nameservers)) {
    5456        $curr_status = '<span class="litespeed-primary dashicons dashicons-hourglass"></span> ' . __('Verifying, waiting for nameservers to be updated.', 'litespeed-cache') . ' ' . __('Click the refresh button below to refresh status.', 'litespeed-cache');
    55         if ( isset( $setup_summary[ 'cdn_verify_msg' ])) {
    56             $curr_status_subline = '<p class="litespeed-desc">' .  __( 'Last Verification Result', 'litespeed-cache' ) . ': ' . $setup_summary[ 'cdn_verify_msg' ] . '</p>';
     57        if (isset($setup_summary['cdn_verify_msg'])) {
     58            $curr_status_subline = '<p class="litespeed-desc">' .  __('Last Verification Result', 'litespeed-cache') . ': ' . $setup_summary['cdn_verify_msg'] . '</p>';
    5759        }
    5860    } else {
    5961        $curr_status = '<span class="litespeed-primary dashicons dashicons-hourglass"></span> ' . __('In Progress', 'litespeed-cache');
    60         $curr_status_subline = '<p class="litespeed-desc">' . __( 'You will receive an email upon status update.', 'litespeed-cache' ) . ' ' . __( 'This process may take several minutes.', 'litespeed-cache' ) . '</p>';
     62        $curr_status_subline = '<p class="litespeed-desc">' . __('You will receive an email upon status update.', 'litespeed-cache') . ' ' . __('This process may take several minutes.', 'litespeed-cache') . '</p>';
    6163    }
    62     $apply_btn_txt = __( 'Refresh CDN Setup Status', 'litespeed-cache' );
     64    $apply_btn_txt = __('Refresh CDN Setup Status', 'litespeed-cache');
    6365    $apply_btn_type = Cdn_Setup::TYPE_STATUS;
    6466}
     
    6668?>
    6769<h3 class="litespeed-title">
    68     <?php echo __( 'Auto QUIC.cloud CDN Setup', 'litespeed-cache' ); ?>
     70    <?php echo __('Auto QUIC.cloud CDN Setup', 'litespeed-cache'); ?>
    6971</h3>
    7072<p>
    71 <?php echo __( 'This is a three step process for configuring your site to use QUIC.cloud CDN with QUIC.cloud DNS. This setup will perform the following actions', 'litespeed-cache' ) . ':'; ?>
     73    <?php echo __('This is a three step process for configuring your site to use QUIC.cloud CDN with QUIC.cloud DNS. This setup will perform the following actions', 'litespeed-cache') . ':'; ?>
    7274</p>
    7375<ol>
    74     <li><?php echo __( 'Set up a QUIC.cloud account.', 'litespeed-cache' ); ?></li>
    75     <li><?php echo __( 'Prepare the site for QUIC.cloud CDN, detect the DNS, and create a DNS Zone.', 'litespeed-cache' ); ?></li>
    76     <li><?php echo __( 'Provide the nameservers necessary to enable the CDN.', 'litespeed-cache' ); ?></li>
    77     <li>
    78         <?php echo __( 'After successful DNS detection, QUIC.cloud will attempt to generate an SSL certificate and enable the CDN.', 'litespeed-cache' ); ?>
    79         <?php echo __( 'This last stage could take 15 to 20 minutes.', 'litespeed-cache' ); ?>
    80         <?php echo __( 'Your site will be available, but browsers may issue a "not secure" warning during this time.', 'litespeed-cache' ); ?>
     76    <li><?php echo __('Set up a QUIC.cloud account.', 'litespeed-cache'); ?></li>
     77    <li><?php echo __('Prepare the site for QUIC.cloud CDN, detect the DNS, and create a DNS Zone.', 'litespeed-cache'); ?></li>
     78    <li><?php echo __('Provide the nameservers necessary to enable the CDN.', 'litespeed-cache'); ?></li>
     79    <li>
     80        <?php echo __('After successful DNS detection, QUIC.cloud will attempt to generate an SSL certificate and enable the CDN.', 'litespeed-cache'); ?>
     81        <?php echo __('This last stage could take 15 to 20 minutes.', 'litespeed-cache'); ?>
     82        <?php echo __('Your site will be available, but browsers may issue a "not secure" warning during this time.', 'litespeed-cache'); ?>
    8183    </li>
    8284</ol>
    8385
    8486<p>
    85 <?php echo __( 'After you set your nameservers, QUIC.cloud will detect the change and automatically enable the CDN.', 'litespeed-cache' ); ?>
     87    <?php echo __('After you set your nameservers, QUIC.cloud will detect the change and automatically enable the CDN.', 'litespeed-cache'); ?>
    8688</p>
    8789
    8890<p class="litespeed-desc">
    89 <?php echo __( 'Notes', 'litespeed-cache' ) . ':'; ?>
     91    <?php echo __('Notes', 'litespeed-cache') . ':'; ?>
    9092</p>
    9193<ul class="litespeed-desc">
    9294    <li>
    93         <?php echo __( 'QUIC.cloud CDN/DNS does not support DNSSEC.', 'litespeed-cache' ); ?>
    94         <?php echo __( 'If you have this enabled for your domain, you must disable DNSSEC to continue.', 'litespeed-cache' ); ?>
    95     </li>
    96     <li>
    97         <?php echo __( 'This setup process will create a DNS zone on QUIC.cloud if one does not currently exist.', 'litespeed-cache' ); ?>
    98         <?php printf(__( 'If you prefer to use the CNAME setup, please <a %s>set up the CDN manually at QUIC.cloud</a>.', 'litespeed-cache' ),
    99                     'href="https://quic.cloud/docs/onboarding/" target="_blank" class="litespeed-learn-more"'); ?>
    100     </li>
    101     <li>
    102         <?php echo __( 'QUIC.cloud will detect most normal DNS entries.', 'litespeed-cache' ); ?>
    103         <?php echo __( 'If you have custom DNS records, it is possible that they are not detected.', 'litespeed-cache' ); ?>
    104         <?php echo __( 'Visit your QUIC.cloud dashboard after the DNS Zone is set up to confirm your DNS zone.', 'litespeed-cache' ); ?>
     95        <?php echo __('QUIC.cloud CDN/DNS does not support DNSSEC.', 'litespeed-cache'); ?>
     96        <?php echo __('If you have this enabled for your domain, you must disable DNSSEC to continue.', 'litespeed-cache'); ?>
     97    </li>
     98    <li>
     99        <?php echo __('This setup process will create a DNS zone on QUIC.cloud if one does not currently exist.', 'litespeed-cache'); ?>
     100        <?php printf(
     101            __('If you prefer to use the CNAME setup, please <a %s>set up the CDN manually at QUIC.cloud</a>.', 'litespeed-cache'),
     102            'href="https://quic.cloud/docs/onboarding/" target="_blank" class="litespeed-learn-more"'
     103        ); ?>
     104    </li>
     105    <li>
     106        <?php echo __('QUIC.cloud will detect most normal DNS entries.', 'litespeed-cache'); ?>
     107        <?php echo __('If you have custom DNS records, it is possible that they are not detected.', 'litespeed-cache'); ?>
     108        <?php echo __('Visit your QUIC.cloud dashboard after the DNS Zone is set up to confirm your DNS zone.', 'litespeed-cache'); ?>
    105109    </li>
    106110</ul>
    107111
    108112<h3 class="litespeed-title-section">
    109     <?php echo __( 'Set up QUIC.cloud Account', 'litespeed-cache' ); ?>
     113    <?php echo __('Set up QUIC.cloud Account', 'litespeed-cache'); ?>
    110114</h3>
    111115
    112 <?php if ( $cdn_setup_done_ts ) : ?>
     116<?php if ($cdn_setup_done_ts) : ?>
    113117    <p>
    114         <?php echo '<span class="litespeed-right10"><span class="litespeed-success dashicons dashicons-yes"></span> ' . __( 'Account is linked!', 'litespeed-cache' ) . '</span>'; ?>
    115         <p>
    116             <?php Doc::learn_more( Cloud::CLOUD_SERVER_DASH . '/dm/' . $dom . '/cdn/',
    117                                     __( 'Manage CDN', 'litespeed-cache' ) . ' <span class="dashicons dashicons-external"></span>',
    118                                     false,
    119                                     'litespeed-link-with-icon' ); ?>
    120             <?php Doc::learn_more( Cloud::CLOUD_SERVER_DASH . '/dns/find/' . $dom,
    121                                     __( 'Manage DNS Zone', 'litespeed-cache' ) . ' <span class="dashicons dashicons-external"></span>',
    122                                     false,
    123                                     'litespeed-link-with-icon' ); ?>
    124         </p>
     118        <?php echo '<span class="litespeed-right10"><span class="litespeed-success dashicons dashicons-yes"></span> ' . __('Account is linked!', 'litespeed-cache') . '</span>'; ?>
     119    <p>
     120        <?php Doc::learn_more(
     121            Cloud::CLOUD_SERVER_DASH . '/dm/' . $dom . '/cdn/',
     122            __('Manage CDN', 'litespeed-cache') . ' <span class="dashicons dashicons-external"></span>',
     123            false,
     124            'litespeed-link-with-icon'
     125        ); ?>
     126        <?php Doc::learn_more(
     127            Cloud::CLOUD_SERVER_DASH . '/dns/find/' . $dom,
     128            __('Manage DNS Zone', 'litespeed-cache') . ' <span class="dashicons dashicons-external"></span>',
     129            false,
     130            'litespeed-link-with-icon'
     131        ); ?>
    125132    </p>
    126 <?php elseif ( $has_setup_token ) : ?>
    127     <?php echo '<span class="litespeed-right10"><span class="litespeed-success dashicons dashicons-yes"></span> ' . __( 'Ready to run CDN setup.', 'litespeed-cache' ) . '</span>'; ?>
    128 <?php elseif ( $cloud_linked ) : ?>
    129     <p><?php echo __( 'Domain key and QUIC.cloud link detected.', 'litespeed-cache' ); ?></p>
    130     <div><?php Doc::learn_more( Utility::build_url( Router::ACTION_CDN_SETUP, Cdn_Setup::TYPE_NOLINK ), __( 'Begin QUIC.cloud CDN Setup', 'litespeed-cache' ), true, 'button button-primary' ); ?></div>
    131 <?php else: ?>
    132     <div><?php Doc::learn_more( Utility::build_url( Router::ACTION_CDN_SETUP, Cdn_Setup::TYPE_LINK ), __( 'Link to QUIC.cloud', 'litespeed-cache' ), true, 'button button-primary' ); ?></div>
     133    </p>
     134<?php elseif ($has_setup_token) : ?>
     135    <?php echo '<span class="litespeed-right10"><span class="litespeed-success dashicons dashicons-yes"></span> ' . __('Ready to run CDN setup.', 'litespeed-cache') . '</span>'; ?>
     136<?php elseif ($cloud_linked) : ?>
     137    <p><?php echo __('Domain key and QUIC.cloud link detected.', 'litespeed-cache'); ?></p>
     138    <div><?php Doc::learn_more(Utility::build_url(Router::ACTION_CDN_SETUP, Cdn_Setup::TYPE_NOLINK), __('Begin QUIC.cloud CDN Setup', 'litespeed-cache'), true, 'button button-primary'); ?></div>
     139<?php else : ?>
     140    <div><?php Doc::learn_more(Utility::build_url(Router::ACTION_CDN_SETUP, Cdn_Setup::TYPE_LINK), __('Link to QUIC.cloud', 'litespeed-cache'), true, 'button button-primary'); ?></div>
    133141<?php endif; ?>
    134142
    135143<h3 class="litespeed-title-section">
    136     <?php echo __( 'CDN Setup Status', 'litespeed-cache' ); ?>
     144    <?php echo __('CDN Setup Status', 'litespeed-cache'); ?>
    137145</h3>
    138146
     
    141149</p>
    142150
    143 <?php if ( isset ( $curr_status_subline ) ) { ?>
     151<?php if (isset($curr_status_subline)) { ?>
    144152    <?php echo $curr_status_subline; ?>
    145153<?php } ?>
    146154
    147 <?php if ( !$cdn_setup_done_ts ) { ?>
    148     <?php if ( isset( $setup_summary[ 'cdn_dns_summary' ] ) ) { ?>
     155<?php if (!$cdn_setup_done_ts) { ?>
     156    <?php if (isset($setup_summary['cdn_dns_summary'])) { ?>
    149157        <h4>
    150             <?php echo __( 'QUIC.cloud Detected Records Summary', 'litespeed-cache' ); ?>
     158            <?php echo __('QUIC.cloud Detected Records Summary', 'litespeed-cache'); ?>
    151159        </h4>
    152160        <table class="wp-list-table widefat striped litespeed-width-auto litespeed-table-compact">
     
    154162                <tr>
    155163                    <th>
    156                         <?php echo __( 'Record Type', 'litespeed-cache' ); ?>
     164                        <?php echo __('Record Type', 'litespeed-cache'); ?>
    157165                    </th>
    158166                    <th>
    159                         <?php echo __( 'Count', 'litespeed-cache' ); ?>
     167                        <?php echo __('Count', 'litespeed-cache'); ?>
    160168                    </th>
    161169                </tr>
    162170            </thead>
    163171            <tbody>
    164                 <?php foreach ( $setup_summary[ 'cdn_dns_summary' ]['types'] as $type => $cnt ) {
    165                     echo '<tr><td>' . $type . '</td><td>' . $cnt . '</td></tr>';
     172                <?php foreach ($setup_summary['cdn_dns_summary']['types'] as $type => $cnt) {
     173                    echo '<tr><td>' . wp_kses_post($type) . '</td><td>' . wp_kses_post($cnt) . '</td></tr>';
    166174                } ?>
    167175            </tbody>
     
    169177
    170178        <p>
    171             <?php echo __( 'Record names found', 'litespeed-cache' ) . ': ' . $setup_summary[ 'cdn_dns_summary' ]['names'] ; ?>
    172         </p>
    173         <p>
    174             <?php echo __( 'Is something missing?', 'litespeed-cache' ) ; ?>
    175             <?php Doc::learn_more( Cloud::CLOUD_SERVER_DASH . '/dns/find/' . $dom,
    176                                     __( 'Review DNS records', 'litespeed-cache' ) . ' <span class="dashicons dashicons-external"></span>',
    177                                     false,
    178                                     'litespeed-link-with-icon' ); ?>
    179         </p>
    180         <p>
    181         <?php echo __('Note: For 15 to 20 minutes after setup completes, browsers may issue a "not secure" warning for your site while QUIC.cloud generates your SSL certificate.', 'litespeed-cache'); ?>
     179            <?php echo __('Record names found', 'litespeed-cache') . ': ' . wp_kses_post($setup_summary['cdn_dns_summary']['names']); ?>
     180        </p>
     181        <p>
     182            <?php echo __('Is something missing?', 'litespeed-cache'); ?>
     183            <?php Doc::learn_more(
     184                Cloud::CLOUD_SERVER_DASH . '/dns/find/' . $dom,
     185                __('Review DNS records', 'litespeed-cache') . ' <span class="dashicons dashicons-external"></span>',
     186                false,
     187                'litespeed-link-with-icon'
     188            ); ?>
     189        </p>
     190        <p>
     191            <?php echo __('Note: For 15 to 20 minutes after setup completes, browsers may issue a "not secure" warning for your site while QUIC.cloud generates your SSL certificate.', 'litespeed-cache'); ?>
    182192        </p>
    183193    <?php } ?>
    184194<?php } ?>
    185195
    186 <?php if ( !$cdn_setup_done_ts ) { ?>
     196<?php if (!$cdn_setup_done_ts) { ?>
    187197
    188198    <div>
    189         <?php Doc::learn_more( ( $disabled ? '#' : Utility::build_url( Router::ACTION_CDN_SETUP, $apply_btn_type ) ), $apply_btn_txt, true, 'button button-primary ' . $disabled ); ?>
     199        <?php Doc::learn_more(($disabled ? '#' : Utility::build_url(Router::ACTION_CDN_SETUP, $apply_btn_type)), $apply_btn_txt, true, 'button button-primary ' . $disabled); ?>
    190200    </div>
    191201
    192202    <h3 class="litespeed-title-section">
    193         <?php echo __( 'Nameservers', 'litespeed-cache' ); ?>
     203        <?php echo __('Nameservers', 'litespeed-cache'); ?>
    194204    </h3>
    195205
    196     <?php if ( isset( $nameservers ) ) { ?>
    197         <p>
    198             <?php echo __( 'Please update your domain registrar to use these custom nameservers:', 'litespeed-cache' ); ?>
     206    <?php if (isset($nameservers)) { ?>
     207        <p>
     208            <?php echo __('Please update your domain registrar to use these custom nameservers:', 'litespeed-cache'); ?>
    199209        </p>
    200210        <ul>
    201211            <?php
    202             foreach ( $nameservers as $nameserver ) {
     212            foreach ($nameservers as $nameserver) {
    203213                echo '<li><strong>' . $nameserver . '</strong></li>';
    204214            }
     
    206216        </ul>
    207217        <p>
    208             <?php echo __( 'QUIC.cloud will attempt to verify the DNS update.', 'litespeed-cache' ); ?>
    209             <?php echo __( 'If it does not verify within 24 hours, the CDN setup will mark the verification as failed.', 'litespeed-cache' ); ?>
    210             <?php echo __( 'At that stage, you may re-start the verification process by pressing the Run CDN Setup button.', 'litespeed-cache' ); ?>
     218            <?php echo __('QUIC.cloud will attempt to verify the DNS update.', 'litespeed-cache'); ?>
     219            <?php echo __('If it does not verify within 24 hours, the CDN setup will mark the verification as failed.', 'litespeed-cache'); ?>
     220            <?php echo __('At that stage, you may re-start the verification process by pressing the Run CDN Setup button.', 'litespeed-cache'); ?>
    211221        </p>
    212222    <?php } else { ?>
    213223        <p>
    214             <?php echo __( 'This section will automatically populate once nameservers are configured for the site.', 'litespeed-cache' ); ?>
     224            <?php echo __('This section will automatically populate once nameservers are configured for the site.', 'litespeed-cache'); ?>
    215225        </p>
    216226    <?php } ?>
     
    218228<?php } ?>
    219229
    220 <?php if ( $has_setup_token || $cdn_setup_done_ts ) { ?>
    221     <?php $disabled = $cdn_setup_done_ts && ! $cloud_linked ? 'disabled' : ''; ?>
     230<?php if ($has_setup_token || $cdn_setup_done_ts) { ?>
     231    <?php $disabled = $cdn_setup_done_ts && !$cloud_linked ? 'disabled' : ''; ?>
    222232    <h3 class="litespeed-title-section">
    223         <?php echo __( 'Action', 'litespeed-cache' ); ?>
     233        <?php echo __('Action', 'litespeed-cache'); ?>
    224234    </h3>
    225235    <div>
    226         <p><?php echo __( 'The following actions are available:', 'litespeed-cache' ); ?></p>
     236        <p><?php echo __('The following actions are available:', 'litespeed-cache'); ?></p>
    227237        <p>
    228238            <strong><?php echo __('Reset CDN Setup', 'litespeed-cache') . ': '; ?></strong>
    229             <?php echo __( 'Resets all LiteSpeed Cache plugin settings related to CDN setup back to the initial state and disables the CDN.', 'litespeed-cache' ); ?>
    230             <?php echo __( 'QUIC.cloud DNS settings are not changed.', 'litespeed-cache' ); ?>
    231             <?php echo __( 'This allows you to try Auto CDN setup again.', 'litespeed-cache' ); ?>
    232             <?php if ( $cdn_setup_done_ts ) : ?>
    233                 <br/>
     239            <?php echo __('Resets all LiteSpeed Cache plugin settings related to CDN setup back to the initial state and disables the CDN.', 'litespeed-cache'); ?>
     240            <?php echo __('QUIC.cloud DNS settings are not changed.', 'litespeed-cache'); ?>
     241            <?php echo __('This allows you to try Auto CDN setup again.', 'litespeed-cache'); ?>
     242            <?php if ($cdn_setup_done_ts) : ?>
     243                <br />
    234244                <span class="litespeed-desc">
    235                     <?php echo __( 'NOTE', 'litespeed-cache' ) . ': '; ?>
    236                     <?php echo __( 'This action will not update anything on the QUIC.cloud servers.', 'litespeed-cache' ); ?>
     245                    <?php echo __('NOTE', 'litespeed-cache') . ': '; ?>
     246                    <?php echo __('This action will not update anything on the QUIC.cloud servers.', 'litespeed-cache'); ?>
    237247                </span>
    238248            <?php endif; ?>
     
    240250        <p>
    241251            <strong><?php echo __('Delete QUIC.cloud data', 'litespeed-cache') . ': '; ?></strong>
    242             <?php echo __( 'Resets all LiteSpeed Cache plugin settings related to CDN setup back to the initial state and deletes the DNS Zone, if one exists for the domain.', 'litespeed-cache' ); ?>
    243             <?php echo __( 'This allows you to try Auto CDN setup again, or abandon the setup entirely.', 'litespeed-cache' ); ?>
    244             <br/>
     252            <?php echo __('Resets all LiteSpeed Cache plugin settings related to CDN setup back to the initial state and deletes the DNS Zone, if one exists for the domain.', 'litespeed-cache'); ?>
     253            <?php echo __('This allows you to try Auto CDN setup again, or abandon the setup entirely.', 'litespeed-cache'); ?>
     254            <br />
    245255            <span class="litespeed-desc">
    246                 <?php echo __( 'NOTE', 'litespeed-cache' ) . ': '; ?>
    247                 <?php echo __( 'This action is not available if there is no domain key, the domain is not linked, or the DNS Zone is in active use.', 'litespeed-cache' ); ?>
    248                 <?php echo __( 'If you have not yet done so, please replace the QUIC.cloud nameservers at your domain registrar before proceeding. ', 'litespeed-cache' ); ?>
     256                <?php echo __('NOTE', 'litespeed-cache') . ': '; ?>
     257                <?php echo __('This action is not available if there is no domain key, the domain is not linked, or the DNS Zone is in active use.', 'litespeed-cache'); ?>
     258                <?php echo __('If you have not yet done so, please replace the QUIC.cloud nameservers at your domain registrar before proceeding. ', 'litespeed-cache'); ?>
    249259            </span>
    250260        </p>
    251261        <div>
    252             <a href="<?php echo Utility::build_url( Router::ACTION_CDN_SETUP, Cdn_Setup::TYPE_RESET ); ?>" data-litespeed-cfm="<?php echo __( 'Are you sure you want to reset CDN Setup?', 'litespeed-cache' ); ?>" class="button litespeed-btn-warning">
    253             <?php echo __( 'Reset CDN Setup', 'litespeed-cache' ); ?>
     262            <a href="<?php echo Utility::build_url(Router::ACTION_CDN_SETUP, Cdn_Setup::TYPE_RESET); ?>" data-litespeed-cfm="<?php echo __('Are you sure you want to reset CDN Setup?', 'litespeed-cache'); ?>" class="button litespeed-btn-warning">
     263                <?php echo __('Reset CDN Setup', 'litespeed-cache'); ?>
    254264            </a>
    255             <a href="<?php echo ( $disabled ? '#' : Utility::build_url( Router::ACTION_CDN_SETUP, Cdn_Setup::TYPE_DELETE ) ); ?>" <?php if (empty($disabled)) : ?> data-litespeed-cfm="<?php echo __( 'Are you sure you want to delete QUIC.cloud data?', 'litespeed-cache' ); ?>"<?php endif; ?> class="button litespeed-btn-danger <?php echo $disabled; ?>" >
    256                 <?php echo __( 'Delete QUIC.cloud data', 'litespeed-cache' ); ?>
     265            <a href="<?php echo ($disabled ? '#' : Utility::build_url(Router::ACTION_CDN_SETUP, Cdn_Setup::TYPE_DELETE)); ?>" <?php if (empty($disabled)) : ?> data-litespeed-cfm="<?php echo __('Are you sure you want to delete QUIC.cloud data?', 'litespeed-cache'); ?>" <?php endif; ?> class="button litespeed-btn-danger <?php echo $disabled; ?>">
     266                <?php echo __('Delete QUIC.cloud data', 'litespeed-cache'); ?>
    257267            </a>
    258268        </div>
  • litespeed-cache/trunk/tpl/toolbox/beta_test.tpl.php

    r2954001 r2983968  
    77// Existing public version list
    88$v_list = array(
     9    '5.7.0.1',
    910    '5.6',
    1011    '5.5.1',
Note: See TracChangeset for help on using the changeset viewer.