Plugin Directory

Changeset 3123399


Ignore:
Timestamp:
07/22/2024 06:17:47 PM (17 months ago)
Author:
LiteSpeedTech
Message:

Release v6.3

Location:
litespeed-cache
Files:
336 added
72 edited

Legend:

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

    r3076030 r3123399  
    34893489}
    34903490
    3491 .litespeed-banner-desciption-content {
     3491.litespeed-banner-description-content {
    34923492    margin: 0px;
    34933493    line-height: 1.25em;
  • litespeed-cache/trunk/assets/js/instant_click.min.js

    r2407814 r3123399  
    1 let mouseoverTimer,lastTouchTimestamp;const prefetches=new Set,prefetchElement=document.createElement("link"),isSupported=prefetchElement.relList&&prefetchElement.relList.supports&&prefetchElement.relList.supports("prefetch")&&window.IntersectionObserver&&"isIntersecting"in IntersectionObserverEntry.prototype,allowQueryString="instantAllowQueryString"in document.body.dataset,allowExternalLinks="instantAllowExternalLinks"in document.body.dataset,useWhitelist="instantWhitelist"in document.body.dataset,mousedownShortcut="instantMousedownShortcut"in document.body.dataset,DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION=1111;let delayOnHover=65,useMousedown=!1,useMousedownOnly=!1,useViewport=!1;if("instantIntensity"in document.body.dataset){const e=document.body.dataset.instantIntensity;if("mousedown"==e.substr(0,"mousedown".length))useMousedown=!0,"mousedown-only"==e&&(useMousedownOnly=!0);else if("viewport"==e.substr(0,"viewport".length))navigator.connection&&(navigator.connection.saveData||navigator.connection.effectiveType&&navigator.connection.effectiveType.includes("2g"))||("viewport"==e?document.documentElement.clientWidth*document.documentElement.clientHeight<45e4&&(useViewport=!0):"viewport-all"==e&&(useViewport=!0));else{const t=parseInt(e);isNaN(t)||(delayOnHover=t)}}if(isSupported){const e={capture:!0,passive:!0};if(useMousedownOnly||document.addEventListener("touchstart",touchstartListener,e),useMousedown?mousedownShortcut||document.addEventListener("mousedown",mousedownListener,e):document.addEventListener("mouseover",mouseoverListener,e),mousedownShortcut&&document.addEventListener("mousedown",mousedownShortcutListener,e),useViewport){let e;(e=window.requestIdleCallback?e=>{requestIdleCallback(e,{timeout:1500})}:e=>{e()})(()=>{const e=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){const n=t.target;e.unobserve(n),preload(n.href)}})});document.querySelectorAll("a").forEach(t=>{isPreloadable(t)&&e.observe(t)})})}}function touchstartListener(e){lastTouchTimestamp=performance.now();const t=e.target.closest("a");isPreloadable(t)&&preload(t.href)}function mouseoverListener(e){if(performance.now()-lastTouchTimestamp<DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION)return;const t=e.target.closest("a");isPreloadable(t)&&(t.addEventListener("mouseout",mouseoutListener,{passive:!0}),mouseoverTimer=setTimeout(()=>{preload(t.href),mouseoverTimer=void 0},delayOnHover))}function mousedownListener(e){const t=e.target.closest("a");isPreloadable(t)&&preload(t.href)}function mouseoutListener(e){e.relatedTarget&&e.target.closest("a")==e.relatedTarget.closest("a")||mouseoverTimer&&(clearTimeout(mouseoverTimer),mouseoverTimer=void 0)}function mousedownShortcutListener(e){if(performance.now()-lastTouchTimestamp<DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION)return;const t=e.target.closest("a");if(e.which>1||e.metaKey||e.ctrlKey)return;if(!t)return;t.addEventListener("click",function(e){1337!=e.detail&&e.preventDefault()},{capture:!0,passive:!1,once:!0});const n=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1,detail:1337});t.dispatchEvent(n)}function isPreloadable(e){if(e&&e.href&&(!useWhitelist||"instant"in e.dataset)&&(allowExternalLinks||e.origin==location.origin||"instant"in e.dataset)&&["http:","https:"].includes(e.protocol)&&("http:"!=e.protocol||"https:"!=location.protocol)&&(allowQueryString||!e.search||"instant"in e.dataset)&&!(e.hash&&e.pathname+e.search==location.pathname+location.search||"noInstant"in e.dataset))return!0}function preload(e){if(prefetches.has(e))return;const t=document.createElement("link");t.rel="prefetch",t.href=e,document.head.appendChild(t),prefetches.add(e)}
     1let t,e,n,o,i,a=null,s=65,c=new Set;const r=1111;function d(t){o=performance.now();const e=t.target.closest("a");m(e)&&p(e.href,"high")}function u(t){if(performance.now()-o<r)return;if(!("closest"in t.target))return;const e=t.target.closest("a");m(e)&&(e.addEventListener("mouseout",f,{passive:!0}),i=setTimeout(()=>{p(e.href,"high"),i=void 0},s))}function l(t){const e=t.target.closest("a");m(e)&&p(e.href,"high")}function f(t){t.relatedTarget&&t.target.closest("a")==t.relatedTarget.closest("a")||i&&(clearTimeout(i),i=void 0)}function h(t){if(performance.now()-o<r)return;const e=t.target.closest("a");if(t.which>1||t.metaKey||t.ctrlKey)return;if(!e)return;e.addEventListener("click",function(t){1337!=t.detail&&t.preventDefault()},{capture:!0,passive:!1,once:!0});const n=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1,detail:1337});e.dispatchEvent(n)}function m(o){if(o&&o.href&&(!n||"instant"in o.dataset)){if(o.origin!=location.origin){if(!(e||"instant"in o.dataset)||!a)return}if(["http:","https:"].includes(o.protocol)&&("http:"!=o.protocol||"https:"!=location.protocol)&&(t||!o.search||"instant"in o.dataset)&&!(o.hash&&o.pathname+o.search==location.pathname+location.search||"noInstant"in o.dataset))return!0}}function p(t,e="auto"){if(c.has(t))return;const n=document.createElement("link");n.rel="prefetch",n.href=t,n.fetchPriority=e,n.as="document",document.head.appendChild(n),c.add(t)}!function(){if(!document.createElement("link").relList.supports("prefetch"))return;const o="instantVaryAccept"in document.body.dataset||"Shopify"in window,i=navigator.userAgent.indexOf("Chrome/");i>-1&&(a=parseInt(navigator.userAgent.substring(i+"Chrome/".length)));if(o&&a&&a<110)return;const c="instantMousedownShortcut"in document.body.dataset;t="instantAllowQueryString"in document.body.dataset,e="instantAllowExternalLinks"in document.body.dataset,n="instantWhitelist"in document.body.dataset;const r={capture:!0,passive:!0};let f=!1,v=!1,g=!1;if("instantIntensity"in document.body.dataset){const t=document.body.dataset.instantIntensity;if(t.startsWith("mousedown"))f=!0,"mousedown-only"==t&&(v=!0);else if(t.startsWith("viewport")){const e=navigator.connection&&navigator.connection.saveData,n=navigator.connection&&navigator.connection.effectiveType&&navigator.connection.effectiveType.includes("2g");e||n||("viewport"==t?document.documentElement.clientWidth*document.documentElement.clientHeight<45e4&&(g=!0):"viewport-all"==t&&(g=!0))}else{const e=parseInt(t);isNaN(e)||(s=e)}}v||document.addEventListener("touchstart",d,r);f?c||document.addEventListener("mousedown",l,r):document.addEventListener("mouseover",u,r);c&&document.addEventListener("mousedown",h,r);if(g){let t=window.requestIdleCallback;t||(t=(t=>{t()})),t(function(){const t=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const n=e.target;t.unobserve(n),p(n.href)}})});document.querySelectorAll("a").forEach(e=>{m(e)&&t.observe(e)})},{timeout:1500})}}();
  • litespeed-cache/trunk/assets/js/instant_click.ori.js

    r2407814 r3123399  
    1 /*! instant.page v5.1.0 - (C) 2019-2020 Alexandre Dieulot - https://instant.page/license */
    2 
    3 let mouseoverTimer
    4 let lastTouchTimestamp
    5 const prefetches = new Set()
    6 const prefetchElement = document.createElement('link')
    7 const isSupported = prefetchElement.relList && prefetchElement.relList.supports && prefetchElement.relList.supports('prefetch')
    8                     && window.IntersectionObserver && 'isIntersecting' in IntersectionObserverEntry.prototype
    9 const allowQueryString = 'instantAllowQueryString' in document.body.dataset
    10 const allowExternalLinks = 'instantAllowExternalLinks' in document.body.dataset
    11 const useWhitelist = 'instantWhitelist' in document.body.dataset
    12 const mousedownShortcut = 'instantMousedownShortcut' in document.body.dataset
    13 const DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION = 1111
    14 
    15 let delayOnHover = 65
    16 let useMousedown = false
    17 let useMousedownOnly = false
    18 let useViewport = false
    19 
    20 if ('instantIntensity' in document.body.dataset) {
    21   const intensity = document.body.dataset.instantIntensity
    22 
    23   if (intensity.substr(0, 'mousedown'.length) == 'mousedown') {
    24     useMousedown = true
    25     if (intensity == 'mousedown-only') {
    26       useMousedownOnly = true
    27     }
    28   }
    29   else if (intensity.substr(0, 'viewport'.length) == 'viewport') {
    30     if (!(navigator.connection && (navigator.connection.saveData || (navigator.connection.effectiveType && navigator.connection.effectiveType.includes('2g'))))) {
    31       if (intensity == "viewport") {
    32         /* Biggest iPhone resolution (which we want): 414 × 896 = 370944
    33          * Small 7" tablet resolution (which we don’t want): 600 × 1024 = 614400
    34          * Note that the viewport (which we check here) is smaller than the resolution due to the UI’s chrome */
    35         if (document.documentElement.clientWidth * document.documentElement.clientHeight < 450000) {
    36           useViewport = true
    37         }
     1/*! instant.page v5.2.0 - (C) 2019-2024 Alexandre Dieulot - https://instant.page/license */
     2
     3let _chromiumMajorVersionInUserAgent = null
     4  , _speculationRulesType
     5  , _allowQueryString
     6  , _allowExternalLinks
     7  , _useWhitelist
     8  , _delayOnHover = 65
     9  , _lastTouchstartEvent
     10  , _mouseoverTimer
     11  , _preloadedList = new Set()
     12
     13init()
     14
     15function init() {
     16  const supportCheckRelList = document.createElement('link').relList
     17  const isSupported = supportCheckRelList.supports('prefetch')
     18    && supportCheckRelList.supports('modulepreload')
     19  // instant.page is meant to be loaded with <script type=module>
     20  // (though sometimes webmasters load it as a regular script).
     21  // So it’s normally executed (and must not cause JavaScript errors) in:
     22  // - Chromium 61+
     23  // - Gecko in Firefox 60+
     24  // - WebKit in Safari 10.1+ (iOS 10.3+, macOS 10.10+)
     25  //
     26  // The check above used to check for IntersectionObserverEntry.isIntersecting
     27  // but module scripts support implies this compatibility — except in Safari
     28  // 10.1–12.0, but this prefetch check takes care of it.
     29  //
     30  // The modulepreload check is used to drop support for Firefox < 115 in order
     31  // to lessen maintenance.
     32  // This implies Safari 17+ (if it supported prefetch), if we ever support
     33  // fetch()-based preloading for Safari we might want to OR that check with
     34  // something that Safari 15.4 or 16.4 supports.
     35  // Also implies Chromium 66+.
     36
     37  if (!isSupported) {
     38    return
     39  }
     40
     41  const handleVaryAcceptHeader = 'instantVaryAccept' in document.body.dataset || 'Shopify' in window
     42  // The `Vary: Accept` header when received in Chromium 79–109 makes prefetches
     43  // unusable, as Chromium used to send a different `Accept` header.
     44  // It’s applied on all Shopify sites by default, as Shopify is very popular
     45  // and is the main source of this problem.
     46  // `window.Shopify` only exists on “classic” Shopify sites. Those using
     47  // Hydrogen (Remix SPA) aren’t concerned.
     48
     49  const chromiumUserAgentIndex = navigator.userAgent.indexOf('Chrome/')
     50  if (chromiumUserAgentIndex > -1) {
     51    _chromiumMajorVersionInUserAgent = parseInt(navigator.userAgent.substring(chromiumUserAgentIndex + 'Chrome/'.length))
     52  }
     53  // The user agent client hints API is a theoretically more reliable way to
     54  // get Chromium’s version… but it’s not available in Samsung Internet 20.
     55  // It also requires a secure context, which would make debugging harder,
     56  // and is only available in recent Chromium versions.
     57  // In practice, Chromium browsers never shy from announcing "Chrome" in
     58  // their regular user agent string, as that maximizes their compatibility.
     59
     60  if (handleVaryAcceptHeader && _chromiumMajorVersionInUserAgent && _chromiumMajorVersionInUserAgent < 110) {
     61    return
     62  }
     63
     64  _speculationRulesType = 'none'
     65  if (HTMLScriptElement.supports && HTMLScriptElement.supports('speculationrules')) {
     66    const speculationRulesConfig = document.body.dataset.instantSpecrules
     67    if (speculationRulesConfig == 'prerender') {
     68      _speculationRulesType = 'prerender'
     69    } else if (speculationRulesConfig != 'no') {
     70      _speculationRulesType = 'prefetch'
     71    }
     72  }
     73
     74  const useMousedownShortcut = 'instantMousedownShortcut' in document.body.dataset
     75  _allowQueryString = 'instantAllowQueryString' in document.body.dataset
     76  _allowExternalLinks = 'instantAllowExternalLinks' in document.body.dataset
     77  _useWhitelist = 'instantWhitelist' in document.body.dataset
     78
     79  let preloadOnMousedown = false
     80  let preloadOnlyOnMousedown = false
     81  let preloadWhenVisible = false
     82  if ('instantIntensity' in document.body.dataset) {
     83    const intensityParameter = document.body.dataset.instantIntensity
     84
     85    if (intensityParameter == 'mousedown' && !useMousedownShortcut) {
     86      preloadOnMousedown = true
     87    }
     88
     89    if (intensityParameter == 'mousedown-only' && !useMousedownShortcut) {
     90      preloadOnMousedown = true
     91      preloadOnlyOnMousedown = true
     92    }
     93
     94    if (intensityParameter == 'viewport') {
     95      const isOnSmallScreen = document.documentElement.clientWidth * document.documentElement.clientHeight < 450000
     96      // Smartphones are the most likely to have a slow connection, and
     97      // their small screen size limits the number of links (and thus
     98      // server load).
     99      //
     100      // Foldable phones (being expensive as of 2023), tablets and PCs
     101      // generally have a decent connection, and a big screen displaying
     102      // more links that would put more load on the server.
     103      //
     104      // iPhone 14 Pro Max (want): 430×932 = 400 760
     105      // Samsung Galaxy S22 Ultra with display size set to 80% (want):
     106      // 450×965 = 434 250
     107      // Small tablet (don’t want): 600×960 = 576 000
     108      // Those number are virtual screen size, the viewport (used for
     109      // the check above) will be smaller with the browser’s interface.
     110
     111      const isNavigatorConnectionSaveDataEnabled = navigator.connection && navigator.connection.saveData
     112      const isNavigatorConnectionLike2g = navigator.connection && navigator.connection.effectiveType && navigator.connection.effectiveType.includes('2g')
     113      const isNavigatorConnectionAdequate = !isNavigatorConnectionSaveDataEnabled && !isNavigatorConnectionLike2g
     114
     115      if (isOnSmallScreen && isNavigatorConnectionAdequate) {
     116        preloadWhenVisible = true
    38117      }
    39       else if (intensity == "viewport-all") {
    40         useViewport = true
    41       }
    42     }
    43   }
    44   else {
    45     const milliseconds = parseInt(intensity)
    46     if (!isNaN(milliseconds)) {
    47       delayOnHover = milliseconds
    48     }
    49   }
    50 }
    51 
    52 if (isSupported) {
     118    }
     119
     120    if (intensityParameter == 'viewport-all') {
     121      preloadWhenVisible = true
     122    }
     123
     124    const intensityAsInteger = parseInt(intensityParameter)
     125    if (!isNaN(intensityAsInteger)) {
     126      _delayOnHover = intensityAsInteger
     127    }
     128  }
     129
    53130  const eventListenersOptions = {
    54131    capture: true,
     
    56133  }
    57134
    58   if (!useMousedownOnly) {
     135  if (preloadOnlyOnMousedown) {
     136    document.addEventListener('touchstart', touchstartEmptyListener, eventListenersOptions)
     137  }
     138  else {
    59139    document.addEventListener('touchstart', touchstartListener, eventListenersOptions)
    60140  }
    61141
    62   if (!useMousedown) {
     142  if (!preloadOnMousedown) {
    63143    document.addEventListener('mouseover', mouseoverListener, eventListenersOptions)
    64144  }
    65   else if (!mousedownShortcut) {
    66       document.addEventListener('mousedown', mousedownListener, eventListenersOptions)
    67   }
    68 
    69   if (mousedownShortcut) {
     145
     146  if (preloadOnMousedown) {
     147    document.addEventListener('mousedown', mousedownListener, eventListenersOptions)
     148  }
     149  if (useMousedownShortcut) {
    70150    document.addEventListener('mousedown', mousedownShortcutListener, eventListenersOptions)
    71151  }
    72152
    73   if (useViewport) {
    74     let triggeringFunction
    75     if (window.requestIdleCallback) {
    76       triggeringFunction = (callback) => {
    77         requestIdleCallback(callback, {
    78           timeout: 1500,
    79         })
     153  if (preloadWhenVisible) {
     154    let requestIdleCallbackOrFallback = window.requestIdleCallback
     155    // Safari has no support as of 16.3: https://webkit.org/b/164193
     156    if (!requestIdleCallbackOrFallback) {
     157      requestIdleCallbackOrFallback = (callback) => {
     158        callback()
     159        // A smarter fallback like setTimeout is not used because devices that
     160        // may eventually be eligible to a Safari version supporting prefetch
     161        // will be very powerful.
     162        // The weakest devices that could be eligible are the 2017 iPad and
     163        // the 2016 MacBook.
    80164      }
    81165    }
    82     else {
    83       triggeringFunction = (callback) => {
    84         callback()
    85       }
    86     }
    87 
    88     triggeringFunction(() => {
     166
     167    requestIdleCallbackOrFallback(function observeIntersection() {
    89168      const intersectionObserver = new IntersectionObserver((entries) => {
    90169        entries.forEach((entry) => {
    91170          if (entry.isIntersecting) {
    92             const linkElement = entry.target
    93             intersectionObserver.unobserve(linkElement)
    94             preload(linkElement.href)
     171            const anchorElement = entry.target
     172            intersectionObserver.unobserve(anchorElement)
     173            preload(anchorElement.href)
    95174          }
    96175        })
    97176      })
    98177
    99       document.querySelectorAll('a').forEach((linkElement) => {
    100         if (isPreloadable(linkElement)) {
    101           intersectionObserver.observe(linkElement)
     178      document.querySelectorAll('a').forEach((anchorElement) => {
     179        if (isPreloadable(anchorElement)) {
     180          intersectionObserver.observe(anchorElement)
    102181        }
    103182      })
     183    }, {
     184      timeout: 1500,
    104185    })
    105186  }
     
    107188
    108189function touchstartListener(event) {
    109   /* Chrome on Android calls mouseover before touchcancel so `lastTouchTimestamp`
    110    * must be assigned on touchstart to be measured on mouseover. */
    111   lastTouchTimestamp = performance.now()
    112 
    113   const linkElement = event.target.closest('a')
    114 
    115   if (!isPreloadable(linkElement)) {
    116     return
    117   }
    118 
    119   preload(linkElement.href)
     190  _lastTouchstartEvent = event
     191
     192  const anchorElement = event.target.closest('a')
     193
     194  if (!isPreloadable(anchorElement)) {
     195    return
     196  }
     197
     198  preload(anchorElement.href, 'high')
     199}
     200
     201function touchstartEmptyListener(event) {
     202  _lastTouchstartEvent = event
    120203}
    121204
    122205function mouseoverListener(event) {
    123   if (performance.now() - lastTouchTimestamp < DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION) {
    124     return
    125   }
    126 
    127   const linkElement = event.target.closest('a')
    128 
    129   if (!isPreloadable(linkElement)) {
    130     return
    131   }
    132 
    133   linkElement.addEventListener('mouseout', mouseoutListener, {passive: true})
    134 
    135   mouseoverTimer = setTimeout(() => {
    136     preload(linkElement.href)
    137     mouseoverTimer = undefined
    138   }, delayOnHover)
     206  if (isEventLikelyTriggeredByTouch(event)) {
     207    // This avoids uselessly adding a mouseout event listener and setting a timer.
     208    return
     209  }
     210
     211  if (!('closest' in event.target)) {
     212    return
     213    // Without this check sometimes an error “event.target.closest is not a function” is thrown, for unknown reasons
     214    // That error denotes that `event.target` isn’t undefined. My best guess is that it’s the Document.
     215    //
     216    // Details could be gleaned from throwing such an error:
     217    //throw new TypeError(`instant.page non-element event target: timeStamp=${~~event.timeStamp}, type=${event.type}, typeof=${typeof event.target}, nodeType=${event.target.nodeType}, nodeName=${event.target.nodeName}, viewport=${innerWidth}x${innerHeight}, coords=${event.clientX}x${event.clientY}, scroll=${scrollX}x${scrollY}`)
     218  }
     219  const anchorElement = event.target.closest('a')
     220
     221  if (!isPreloadable(anchorElement)) {
     222    return
     223  }
     224
     225  anchorElement.addEventListener('mouseout', mouseoutListener, {passive: true})
     226
     227  _mouseoverTimer = setTimeout(() => {
     228    preload(anchorElement.href, 'high')
     229    _mouseoverTimer = null
     230  }, _delayOnHover)
    139231}
    140232
    141233function mousedownListener(event) {
    142   const linkElement = event.target.closest('a')
    143 
    144   if (!isPreloadable(linkElement)) {
    145     return
    146   }
    147 
    148   preload(linkElement.href)
     234  if (isEventLikelyTriggeredByTouch(event)) {
     235    // When preloading only on mousedown, not touch, we need to stop there
     236    // because touches send compatibility mouse events including mousedown.
     237    //
     238    // (When preloading on touchstart, instructions below this block would
     239    // have no effect.)
     240    return
     241  }
     242
     243  const anchorElement = event.target.closest('a')
     244
     245  if (!isPreloadable(anchorElement)) {
     246    return
     247  }
     248
     249  preload(anchorElement.href, 'high')
    149250}
    150251
     
    154255  }
    155256
    156   if (mouseoverTimer) {
    157     clearTimeout(mouseoverTimer)
    158     mouseoverTimer = undefined
     257  if (_mouseoverTimer) {
     258    clearTimeout(_mouseoverTimer)
     259    _mouseoverTimer = null
    159260  }
    160261}
    161262
    162263function mousedownShortcutListener(event) {
    163   if (performance.now() - lastTouchTimestamp < DELAY_TO_NOT_BE_CONSIDERED_A_TOUCH_INITIATED_ACTION) {
    164     return
    165   }
    166 
    167   const linkElement = event.target.closest('a')
     264  if (isEventLikelyTriggeredByTouch(event)) {
     265    // Due to a high potential for complications with this mousedown shortcut
     266    // combined with other parties’ JavaScript code, we don’t want it to run
     267    // at all on touch devices, even though mousedown and click are triggered
     268    // at almost the same time on touch.
     269    return
     270  }
     271
     272  const anchorElement = event.target.closest('a')
    168273
    169274  if (event.which > 1 || event.metaKey || event.ctrlKey) {
     
    171276  }
    172277
    173   if (!linkElement) {
    174     return
    175   }
    176 
    177   linkElement.addEventListener('click', function (event) {
     278  if (!anchorElement) {
     279    return
     280  }
     281
     282  anchorElement.addEventListener('click', function (event) {
    178283    if (event.detail == 1337) {
    179284      return
     
    184289
    185290  const customEvent = new MouseEvent('click', {view: window, bubbles: true, cancelable: false, detail: 1337})
    186   linkElement.dispatchEvent(customEvent)
    187 }
    188 
    189 function isPreloadable(linkElement) {
    190   if (!linkElement || !linkElement.href) {
    191     return
    192   }
    193 
    194   if (useWhitelist && !('instant' in linkElement.dataset)) {
    195     return
    196   }
    197 
    198   if (!allowExternalLinks && linkElement.origin != location.origin && !('instant' in linkElement.dataset)) {
    199     return
    200   }
    201 
    202   if (!['http:', 'https:'].includes(linkElement.protocol)) {
    203     return
    204   }
    205 
    206   if (linkElement.protocol == 'http:' && location.protocol == 'https:') {
    207     return
    208   }
    209 
    210   if (!allowQueryString && linkElement.search && !('instant' in linkElement.dataset)) {
    211     return
    212   }
    213 
    214   if (linkElement.hash && linkElement.pathname + linkElement.search == location.pathname + location.search) {
    215     return
    216   }
    217 
    218   if ('noInstant' in linkElement.dataset) {
     291  anchorElement.dispatchEvent(customEvent)
     292}
     293
     294function isEventLikelyTriggeredByTouch(event) {
     295  // Touch devices fire “mouseover” and “mousedown” (and other) events after
     296  // a touch for compatibility reasons.
     297  // This function checks if it’s likely that we’re dealing with such an event.
     298
     299  if (!_lastTouchstartEvent || !event) {
     300    return false
     301  }
     302
     303  if (event.target != _lastTouchstartEvent.target) {
     304    return false
     305  }
     306
     307  const now = event.timeStamp
     308  // Chromium (tested Chrome 95 and 122 on Android) sometimes uses the same
     309  // event.timeStamp value in touchstart, mouseover, and mousedown.
     310  // Testable in test/extras/delay-not-considered-touch.html
     311  // This is okay for our purpose: two equivalent timestamps will be less
     312  // than the max duration, which means they’re related events.
     313  // TODO: fill/find Chromium bug
     314  const durationBetweenLastTouchstartAndNow = now - _lastTouchstartEvent.timeStamp
     315
     316  const MAX_DURATION_TO_BE_CONSIDERED_TRIGGERED_BY_TOUCHSTART = 2500
     317  // How long after a touchstart event can a simulated mouseover/mousedown event fire?
     318  // /test/extras/delay-not-considered-touch.html tries to answer that question.
     319  // I saw up to 1450 ms on an overwhelmed Samsung Galaxy S2.
     320  // On the other hand, how soon can an unrelated mouseover event happen after an unrelated touchstart?
     321  // Meaning the user taps a link, then grabs their pointing device and clicks another/the same link.
     322  // That scenario could occur if a user taps a link, thinks it hasn’t worked, and thus fall back to their pointing device.
     323  // I do that in about 1200 ms on a Chromebook. In which case this function returns a false positive.
     324  // False positives are okay, as this function is only used to decide to abort handling mouseover/mousedown/mousedownShortcut.
     325  // False negatives could lead to unforeseen state, particularly in mousedownShortcutListener.
     326
     327  return durationBetweenLastTouchstartAndNow < MAX_DURATION_TO_BE_CONSIDERED_TRIGGERED_BY_TOUCHSTART
     328
     329  // TODO: Investigate if pointer events could be used.
     330  // https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType
     331
     332  // TODO: Investigate if InputDeviceCapabilities could be used to make it
     333  // less hacky on Chromium browsers.
     334  // https://developer.mozilla.org/en-US/docs/Web/API/InputDeviceCapabilities_API
     335  // https://wicg.github.io/input-device-capabilities/
     336  // Needs careful reading of the spec and tests (notably, what happens with a
     337  // mouse connected to an Android or iOS smartphone?) to make sure it’s solid.
     338  // Also need to judge if WebKit could implement it differently, as they
     339  // don’t mind doing when a spec gives room to interpretation.
     340  // It seems to work well on Chrome on ChromeOS.
     341
     342  // TODO: Consider using event screen position as another heuristic.
     343}
     344
     345function isPreloadable(anchorElement) {
     346  if (!anchorElement || !anchorElement.href) {
     347    return
     348  }
     349
     350  if (_useWhitelist && !('instant' in anchorElement.dataset)) {
     351    return
     352  }
     353
     354  if (anchorElement.origin != location.origin) {
     355    let allowed = _allowExternalLinks || 'instant' in anchorElement.dataset
     356    if (!allowed || !_chromiumMajorVersionInUserAgent) {
     357      // Chromium-only: see comment on “restrictive prefetch” and “cross-site speculation rules prefetch”
     358      return
     359    }
     360  }
     361
     362  if (!['http:', 'https:'].includes(anchorElement.protocol)) {
     363    return
     364  }
     365
     366  if (anchorElement.protocol == 'http:' && location.protocol == 'https:') {
     367    return
     368  }
     369
     370  if (!_allowQueryString && anchorElement.search && !('instant' in anchorElement.dataset)) {
     371    return
     372  }
     373
     374  if (anchorElement.hash && anchorElement.pathname + anchorElement.search == location.pathname + location.search) {
     375    return
     376  }
     377
     378  if ('noInstant' in anchorElement.dataset) {
    219379    return
    220380  }
     
    223383}
    224384
    225 function preload(url) {
    226   if (prefetches.has(url)) {
    227     return
    228   }
    229 
    230   const prefetcher = document.createElement('link')
    231   prefetcher.rel = 'prefetch'
    232   prefetcher.href = url
    233   document.head.appendChild(prefetcher)
    234 
    235   prefetches.add(url)
    236 }
     385function preload(url, fetchPriority = 'auto') {
     386  if (_preloadedList.has(url)) {
     387    return
     388  }
     389
     390  if (_speculationRulesType != 'none') {
     391    preloadUsingSpeculationRules(url)
     392  } else {
     393    preloadUsingLinkElement(url, fetchPriority)
     394  }
     395
     396  _preloadedList.add(url)
     397}
     398
     399function preloadUsingSpeculationRules(url) {
     400  const scriptElement = document.createElement('script')
     401  scriptElement.type = 'speculationrules'
     402
     403  scriptElement.textContent = JSON.stringify({
     404    [_speculationRulesType]: [{
     405      source: 'list',
     406      urls: [url]
     407    }]
     408  })
     409
     410  // When using speculation rules, cross-site prefetch is supported, but will
     411  // only work if the user has no cookies for the destination site. The
     412  // prefetch will not be sent, if the user does have such cookies.
     413
     414  document.head.appendChild(scriptElement)
     415}
     416
     417function preloadUsingLinkElement(url, fetchPriority = 'auto') {
     418  const linkElement = document.createElement('link')
     419  linkElement.rel = 'prefetch'
     420  linkElement.href = url
     421
     422  linkElement.fetchPriority = fetchPriority
     423  // By default, a prefetch is loaded with a low priority.
     424  // When there’s a fair chance that this prefetch is going to be used in the
     425  // near term (= after a touch/mouse event), giving it a high priority helps
     426  // make the page load faster in case there are other resources loading.
     427  // Prioritizing it implicitly means deprioritizing every other resource
     428  // that’s loading on the page. Due to HTML documents usually being much
     429  // smaller than other resources (notably images and JavaScript), and
     430  // prefetches happening once the initial page is sufficiently loaded,
     431  // this theft of bandwidth should rarely be detrimental.
     432
     433  linkElement.as = 'document'
     434  // as=document is Chromium-only and allows cross-origin prefetches to be
     435  // usable for navigation. They call it “restrictive prefetch” and intend
     436  // to remove it: https://crbug.com/1352371
     437  //
     438  // This document from the Chrome team dated 2022-08-10
     439  // https://docs.google.com/document/d/1x232KJUIwIf-k08vpNfV85sVCRHkAxldfuIA5KOqi6M
     440  // claims (I haven’t tested) that data- and battery-saver modes as well as
     441  // the setting to disable preloading do not disable restrictive prefetch,
     442  // unlike regular prefetch. That’s good for prefetching on a touch/mouse
     443  // event, but might be bad when prefetching every link in the viewport.
     444
     445  document.head.appendChild(linkElement)
     446}
  • litespeed-cache/trunk/changelog.txt

    r3009052 r3123399  
    161161* **GUI** Added `litespeed_media_ignore_remote_missing_sizes` API description.
    162162* **CCSS** Fixed an issue where CCSS was unexpectedly bypassed if `CSS Combine` was OFF and `UCSS Inline` was ON. (Ruikai)
    163 * **Debug** Added resposne headers to debug log. (Kevin)
     163* **Debug** Added response headers to debug log. (Kevin)
    164164
    165165= 4.6 - Mar 29 2022 =
     
    227227* **Cache** When caching, no longer send a purge request for CSS/JS removal to avoid cache engine conflicts.
    228228* 🐞**Core** Optimized SQL queries while autoloading if expected options are missing; reduced by 7 and 3 queries on backend and frontend respectively. (#396425 Jackson)
    229 * **Page Optimize** Fixed a 404 issue that occured when upgrading the plugin manually, with a package upload or through the plugin manager. (Tobolo/Małgorzata/Abe)
     229* **Page Optimize** Fixed a 404 issue that occurred when upgrading the plugin manually, with a package upload or through the plugin manager. (Tobolo/Małgorzata/Abe)
    230230* **API** Added `litespeed_ccss_url` and `litespeed_ucss_url` API to manipulate the request URL for CCSS and UCSS.
    231231* **REST** Fixed a potential warning when detecting cacheable status on REST call. (rafaucau)
     
    245245* ☁️**Cloud** Fixed an issue with PHP notices when inquiring about quota usage for a service not currently in use.
    246246* **GUI** Added GO detail warning. (n111)
    247 * **GUI** Moved "quota wil be still in use" warning from Guest Mode to Guest Optimization section.
     247* **GUI** Moved "quota will be still in use" warning from Guest Mode to Guest Optimization section.
    248248* **API** Added `LITESPEED_CFG_HTACCESS` PHP Constant to specify .htaccess path.
    249249* **API** Added `litespeed_qs_forbidden` hook to bypass `?LSCWP_CTRL=` query string. (minhduc)
     
    282282* 🐞**UCSS** If UCSS generation fails the generated error will no longer be served inside the file. (Ryan D)
    283283* **Log** Updated the Debug log to use less code for prefix.
    284 * **3rd** Always respect `DONOTCACHEPAGE` constant defination to fix DIVI dynamic css calculation process.
     284* **3rd** Always respect `DONOTCACHEPAGE` constant definition to fix DIVI dynamic css calculation process.
    285285
    286286= 4.3 - Aug 16 2021 =
     
    414414* **CCSS** Fixed CCSS/UCSS manual cron timeout issue.
    415415* **CCSS** Only 10 items will be kept for CCSS history.
    416 * **CCSS** The appearance of CCSS Purge in the topbar menu will be determined by the existance of CCSS cache, and not the setting only.
     416* **CCSS** The appearance of CCSS Purge in the topbar menu will be determined by the existence of CCSS cache, and not the setting only.
    417417* **CCSS** To avoid stuck queues when the current request keeps failing, the CCSS queue will always drop once requested.
    418418* **CCSS** CCSS will no longer hide adminbar.
     
    549549* **Page Optimize** Refactored CSS/JS optimization.
    550550* **Page Optimize** CSS and JS Combine now each save to a single file without memory usage issues.
    551 * **CSS** Inline CSS Minify is now a part of CSS Minify, and will respect thr original priorities. (thanks to @galbaras)
     551* **CSS** Inline CSS Minify is now a part of CSS Minify, and will respect the original priorities. (thanks to @galbaras)
    552552* **JS** JS Combine now generates a single JS file in the footer. (Special thanks to @ankit)
    553553* **JS** JS Combine now combines external JS files, too. (Thanks to @ankit)
     
    589589* 🐞**Page Optimize** Fixed CSS optimization compatibility for CSS dynamically generated with PHP.
    590590* **Page Optimize** Added the ability to defer JS even when the resource is excluded from other JS optimizations. (@slr1979)
    591 * **ESI** Added support for ESI last paramater inline value.
     591* **ESI** Added support for ESI last parameter inline value.
    592592* **3rd** YITH Wishlist, when cached for the first time, will no longer send sub requests.
    593593
     
    812812* 🌱**REST** New REST TTL setting.  (@thekendog)
    813813* 🌱**CDN** New setting `HTML Attribute To Replace`. CDN can now support any HTML attribute to be replaced. (@danushkaj91)
    814 * 🌱**Debug** Debug URI includes/excludes setings.
     814* 🌱**Debug** Debug URI includes/excludes settings.
    815815* 🌱**Crawler** 🐞 Support for multiple domains in custom sitemap. (@alchem)
    816816* 🌱**Crawler** New Crawler dashboard. New sitemap w/ crawler status. New blacklist w/ reason.
     
    840840* **OPcache** Purged all opcache when updating cache file. (@closte #170)
    841841* **CLI** CLI cmd renamed.
    842 * **CLI** Well-formated table to show all options.
     842* **CLI** Well-formatted table to show all options.
    843843* **Purge** Only purge related posts that have a status of "published" to avoid unnecessary "draft" purges. (@Jakub Knytl)
    844844* **GUI** Removed basic/adv mode for settings. Moved non-cache settings to its own menu.
     
    851851* **Conf** Config setting renamed and uniformed.
    852852* **Conf** Dropped `Conf::option()`. Used `Conf::val()` instead.
    853 * **Conf** Improved conf initialization and upgrade convertion workflow.
     853* **Conf** Improved conf initialization and upgrade conversion workflow.
    854854* **Core** Code base refactored. New namespace LiteSpeed.
    855855* **API** New API: iframe lazyload exclude filter.
     
    12421242= 2.4 - Jul 2 2018 =
    12431243* [NEW FEATURE] <strong>Media</strong> Added lossless optimization.
    1244 * [NEW FEATURE] <strong>Media</strong> Added Request Orignal Images ON/OFF.
     1244* [NEW FEATURE] <strong>Media</strong> Added Request Original Images ON/OFF.
    12451245* [NEW FEATURE] <strong>Media</strong> Added Request WebP ON/OFF. (@JMCA2)
    12461246* [IMPROVEMENT] <strong>Media</strong> Improved optimization tools to archive maximum compression and score.
  • litespeed-cache/trunk/data/const.default.ini

    r3076030 r3123399  
    267267debug-cookie = false
    268268
    269 ; O_DEBUG_COLLAPS_QS
    270 debug-collaps_qs = false
     269; O_DEBUG_COLLAPSE_QS
     270debug-collapse_qs = false
    271271
    272272; O_DEBUG_INC
  • litespeed-cache/trunk/data/const.network_default.ini

    r3076030 r3123399  
    125125debug-cookie = false
    126126
    127 ; O_DEBUG_COLLAPS_QS
    128 debug-collaps_qs = false
     127; O_DEBUG_COLLAPSE_QS
     128debug-collapse_qs = false
    129129
    130130; O_DEBUG_INC
  • litespeed-cache/trunk/data/css_excludes.txt

    r2443924 r3123399  
    2020#banner-
    2121#map-
    22 #text-box-
     22#text-
    2323#page-header-
    2424#section_
  • litespeed-cache/trunk/data/esi.nonces.txt

    r3076030 r3123399  
    4646swpmtxnonce
    4747
     48# The Events Calendar
     49_tec_view_rest_nonce_primary
     50_tec_view_rest_nonce_secondary
     51
    4852# wpDataTables #986128
    4953wdt*
     
    7377# Premium Addons for Elementor
    7478pa-blog-widget-nonce
     79
     80# WPUF User Frontend
     81wpuf* private
     82
     83# MetForm
     84form_nonce
     85
     86# Mobile hamburger menu - jetMenu #306983 #163710 PR#419
     87tgmpa-*
     88bulk-*
     89
     90# WP Data Access
     91wpda-*
     92
  • litespeed-cache/trunk/data/js_defer_excludes.txt

    r3076030 r3123399  
    66# JS file URL excludes
    77adsbygoogle
     8turnstile
     9challenges.cloudflare.com
    810
    911stats.wp.com/e-
    1012_stq
    1113## JetPack Stats
     14
     15# Cloudflare turnstile - Tobolo
     16turnstile
     17challenges.cloudflare.com
  • litespeed-cache/trunk/data/js_excludes.txt

    r2869601 r3123399  
    1212/syntaxhighlighter/
    1313spotlight-social-photo-feeds ## https://docs.spotlightwp.com/article/757-autoptimize-compatibility @Tobolo
     14challenges.cloudflare.com
    1415
    1516# Inline JS excludes
     
    1920dataLayer
    2021adsbygoogle
     22turnstile
    2123
    2224block_tdi_ ## Theme: Newspaper by tagDiv.com
     
    2931_stq
    3032## JetPack Stats
     33
     34# Cloudflare turnstile - Tobolo
     35turnstile
     36challenges.cloudflare.com
  • litespeed-cache/trunk/lang/litespeed-cache.pot

    r3076030 r3123399  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: LiteSpeed Cache 6.2\n"
     5"Project-Id-Version: LiteSpeed Cache 6.3\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n"
    7 "POT-Creation-Date: 2024-04-23 18:38:49+00:00\n"
     7"POT-Creation-Date: 2024-07-22 17:55:22+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=UTF-8\n"
     
    4545msgstr ""
    4646
    47 #: src/activation.cls.php:508 src/activation.cls.php:513
     47#: src/activation.cls.php:509 src/activation.cls.php:514
    4848msgid "Failed to upgrade."
    4949msgstr ""
    5050
    51 #: src/activation.cls.php:517
     51#: src/activation.cls.php:518
    5252msgid "Upgraded successfully."
    5353msgstr ""
     
    7474msgstr ""
    7575
    76 #: src/admin-display.cls.php:132 src/gui.cls.php:628
     76#: src/admin-display.cls.php:132 src/gui.cls.php:638
    7777#: tpl/dash/dashboard.tpl.php:52 tpl/dash/network_dash.tpl.php:27
    7878#: tpl/presets/standard.tpl.php:24
     
    8181
    8282#: src/admin-display.cls.php:134 tpl/dash/dashboard.tpl.php:53
     83#: tpl/dash/network_dash.tpl.php:28
    8384msgid "Page Optimization"
    8485msgstr ""
     
    8889msgstr ""
    8990
    90 #: src/admin-display.cls.php:138 src/lang.cls.php:251
     91#: src/admin-display.cls.php:138 src/lang.cls.php:253
    9192msgid "Crawler"
    9293msgstr ""
     
    144145msgstr ""
    145146
    146 #: src/admin-display.cls.php:295 src/gui.cls.php:619
     147#: src/admin-display.cls.php:295 src/gui.cls.php:629
    147148msgid "Settings"
    148149msgstr ""
     
    222223#: src/admin-display.cls.php:1230 tpl/cache/settings-esi.tpl.php:95
    223224#: tpl/page_optm/settings_css.tpl.php:192
    224 #: tpl/page_optm/settings_html.tpl.php:106
     225#: tpl/page_optm/settings_html.tpl.php:123
    225226#: tpl/page_optm/settings_media.tpl.php:245
    226227#: tpl/page_optm/settings_media_exc.tpl.php:26
     
    232233#: tpl/page_optm/settings_tuning_css.tpl.php:24
    233234#: tpl/page_optm/settings_tuning_css.tpl.php:84
    234 #: tpl/toolbox/edit_htaccess.tpl.php:54 tpl/toolbox/edit_htaccess.tpl.php:71
     235#: tpl/toolbox/edit_htaccess.tpl.php:58 tpl/toolbox/edit_htaccess.tpl.php:76
    235236msgid "API"
    236237msgstr ""
     
    309310
    310311#: src/cdn-setup.cls.php:79
    311 msgid "There was an error during CDN setup: "
     312msgid "There was an error during QUIC.cloud CDN auto setup: "
    312313msgstr ""
    313314
     
    343344msgstr ""
    344345
    345 #: src/cdn-setup.cls.php:348 src/cloud.cls.php:829 src/cloud.cls.php:837
    346 #: src/cloud.cls.php:1252
     346#: src/cdn-setup.cls.php:349 src/cloud.cls.php:829 src/cloud.cls.php:837
     347#: src/cloud.cls.php:1255
    347348msgid "Message from QUIC.cloud server"
    348349msgstr ""
    349350
    350351#: src/cloud.cls.php:388 src/cloud.cls.php:401 src/cloud.cls.php:445
    351 #: src/cloud.cls.php:470 src/cloud.cls.php:623 src/cloud.cls.php:1221
     352#: src/cloud.cls.php:470 src/cloud.cls.php:623 src/cloud.cls.php:1224
    352353msgid "Cloud Error"
    353354msgstr ""
     
    409410msgstr ""
    410411
    411 #: src/cloud.cls.php:913 src/cloud.cls.php:1241
     412#: src/cloud.cls.php:913 src/cloud.cls.php:1244
    412413msgid "Failed to communicate with QUIC.cloud server"
    413414msgstr ""
     
    427428msgstr ""
    428429
    429 #: src/cloud.cls.php:1056
     430#: src/cloud.cls.php:1057
    430431msgid "Cloud REST Error"
    431432msgstr ""
    432433
    433 #: src/cloud.cls.php:1076
     434#: src/cloud.cls.php:1060
     435msgid "Unauthorized access to REST API. Your token has expired."
     436msgstr ""
     437
     438#: src/cloud.cls.php:1079
    434439msgid "Unknown error."
    435440msgstr ""
    436441
    437 #: src/cloud.cls.php:1080
     442#: src/cloud.cls.php:1083
    438443msgid "Contact QUIC.cloud support"
    439444msgstr ""
    440445
    441 #: src/cloud.cls.php:1082
     446#: src/cloud.cls.php:1085
    442447msgid "Cloud REST API returned error: "
    443448msgstr ""
    444449
    445 #: src/cloud.cls.php:1260
     450#: src/cloud.cls.php:1263
    446451msgid ""
    447452"Applied for Domain Key successfully. Please wait for result. Domain Key will "
     
    449454msgstr ""
    450455
    451 #: src/cloud.cls.php:1316
     456#: src/cloud.cls.php:1319
    452457msgid ""
    453458"Congratulations, your Domain Key has been approved! The setting has been "
     
    455460msgstr ""
    456461
    457 #: src/cloud.cls.php:1415
     462#: src/cloud.cls.php:1416
    458463msgid "QUIC.cloud account has been created and successfully linked."
    459464msgstr ""
    460465
    461 #: src/cloud.cls.php:1417
     466#: src/cloud.cls.php:1418
    462467msgid "QUIC.cloud account has been successfully linked."
    463468msgstr ""
    464469
    465 #: src/cloud.cls.php:1425
     470#: src/cloud.cls.php:1427
     471msgid "Domain Key hash nonce missing."
     472msgstr ""
     473
     474#: src/cloud.cls.php:1435
     475msgid "Domain Key hash nonce mismatch. Please correct your server clock."
     476msgstr ""
     477
     478#: src/cloud.cls.php:1440
    466479msgid "Domain Key hash mismatch"
    467480msgstr ""
    468481
    469 #: src/cloud.cls.php:1567
     482#: src/cloud.cls.php:1452
     483msgid "Failed to verify domain nonce."
     484msgstr ""
     485
     486#: src/cloud.cls.php:1585
    470487msgid "Sync credit allowance with Cloud Server successfully."
    471488msgstr ""
     
    533550msgstr ""
    534551
    535 #: src/data.upgrade.func.php:135 src/lang.cls.php:151
     552#: src/data.upgrade.func.php:135 src/lang.cls.php:152
    536553msgid "JS Combine"
    537554msgstr ""
     
    618635
    619636#: src/doc.cls.php:92 src/doc.cls.php:147 tpl/cdn/manage.tpl.php:67
    620 #: tpl/dash/dashboard.tpl.php:46 tpl/dash/dashboard.tpl.php:613
     637#: tpl/dash/dashboard.tpl.php:46 tpl/dash/dashboard.tpl.php:618
    621638#: tpl/img_optm/summary.tpl.php:48 tpl/inc/check_cache_disabled.php:42
    622639msgid "Learn More"
     
    679696#: src/error.cls.php:76
    680697msgid ""
    681 "You have too many notified images, please pull down notified images first."
     698"You have images waiting to be pulled. Please wait for the automatic pull to "
     699"complete, or pull them down manually now."
    682700msgstr ""
    683701
     
    755773msgstr ""
    756774
    757 #: src/error.cls.php:164
     775#: src/error.cls.php:163
    758776msgid "Previous request too recent. Please try again later."
    759777msgstr ""
    760778
    761 #: src/error.cls.php:169
     779#: src/error.cls.php:168
    762780msgid "Previous request too recent. Please try again after %s."
    763781msgstr ""
    764782
    765 #: src/error.cls.php:175
     783#: src/error.cls.php:174
    766784msgid "Your application is waiting for approval."
    767785msgstr ""
    768786
    769 #: src/error.cls.php:179
     787#: src/error.cls.php:178
    770788msgid "The callback validation to your domain failed due to hash mismatch."
    771789msgstr ""
    772790
    773 #: src/error.cls.php:183
     791#: src/error.cls.php:182
    774792msgid ""
    775793"The callback validation to your domain failed. Please make sure there is no "
     
    777795msgstr ""
    778796
    779 #: src/error.cls.php:188
     797#: src/error.cls.php:187
    780798msgid ""
    781799"The callback validation to your domain failed. Please make sure there is no "
     
    783801msgstr ""
    784802
    785 #: src/error.cls.php:193
     803#: src/error.cls.php:192
    786804msgid ""
    787805"Your domain has been forbidden from using our services due to a previous "
     
    789807msgstr ""
    790808
    791 #: src/error.cls.php:197
     809#: src/error.cls.php:196
    792810msgid ""
    793811"You cannot remove this DNS zone, because it is still in use. Please update "
     
    796814msgstr ""
    797815
    798 #: src/error.cls.php:204
     816#: src/error.cls.php:203
    799817msgid "Unknown error"
    800818msgstr ""
     
    858876#: src/gui.cls.php:487 src/gui.cls.php:495 src/gui.cls.php:503
    859877#: src/gui.cls.php:512 src/gui.cls.php:522 src/gui.cls.php:532
    860 #: src/gui.cls.php:542 src/gui.cls.php:551 src/gui.cls.php:561
    861 #: src/gui.cls.php:571 src/gui.cls.php:637 src/gui.cls.php:645
    862 #: src/gui.cls.php:653 src/gui.cls.php:662 src/gui.cls.php:672
     878#: src/gui.cls.php:542 src/gui.cls.php:552 src/gui.cls.php:561
     879#: src/gui.cls.php:571 src/gui.cls.php:581 src/gui.cls.php:647
     880#: src/gui.cls.php:655 src/gui.cls.php:663 src/gui.cls.php:672
    863881#: src/gui.cls.php:682 src/gui.cls.php:692 src/gui.cls.php:702
    864 #: src/gui.cls.php:711 src/gui.cls.php:721 src/gui.cls.php:731
    865 #: tpl/page_optm/settings_media.tpl.php:131 tpl/toolbox/purge.tpl.php:37
    866 #: tpl/toolbox/purge.tpl.php:43 tpl/toolbox/purge.tpl.php:52
    867 #: tpl/toolbox/purge.tpl.php:61 tpl/toolbox/purge.tpl.php:70
    868 #: tpl/toolbox/purge.tpl.php:79 tpl/toolbox/purge.tpl.php:88
    869 #: tpl/toolbox/purge.tpl.php:97 tpl/toolbox/purge.tpl.php:106
    870 #: tpl/toolbox/purge.tpl.php:115
     882#: src/gui.cls.php:712 src/gui.cls.php:721 src/gui.cls.php:731
     883#: src/gui.cls.php:741 tpl/page_optm/settings_media.tpl.php:131
     884#: tpl/toolbox/purge.tpl.php:37 tpl/toolbox/purge.tpl.php:43
     885#: tpl/toolbox/purge.tpl.php:52 tpl/toolbox/purge.tpl.php:61
     886#: tpl/toolbox/purge.tpl.php:70 tpl/toolbox/purge.tpl.php:79
     887#: tpl/toolbox/purge.tpl.php:88 tpl/toolbox/purge.tpl.php:97
     888#: tpl/toolbox/purge.tpl.php:106 tpl/toolbox/purge.tpl.php:115
    871889msgid "Purge All"
    872890msgstr ""
    873891
    874 #: src/gui.cls.php:495 src/gui.cls.php:595 src/gui.cls.php:645
     892#: src/gui.cls.php:495 src/gui.cls.php:605 src/gui.cls.php:655
    875893msgid "LSCache"
    876894msgstr ""
    877895
    878 #: src/gui.cls.php:503 src/gui.cls.php:653 tpl/toolbox/purge.tpl.php:43
     896#: src/gui.cls.php:503 src/gui.cls.php:663 tpl/toolbox/purge.tpl.php:43
    879897msgid "CSS/JS Cache"
    880898msgstr ""
    881899
    882 #: src/gui.cls.php:512 src/gui.cls.php:672 src/lang.cls.php:117
    883 #: tpl/dash/dashboard.tpl.php:420 tpl/toolbox/purge.tpl.php:52
     900#: src/gui.cls.php:512 src/gui.cls.php:672 tpl/cdn/manage.tpl.php:19
     901msgid "Cloudflare"
     902msgstr ""
     903
     904#: src/gui.cls.php:522 src/gui.cls.php:682 src/lang.cls.php:118
     905#: tpl/dash/dashboard.tpl.php:425 tpl/toolbox/purge.tpl.php:52
    884906msgid "Object Cache"
    885907msgstr ""
    886908
    887 #: src/gui.cls.php:522 src/gui.cls.php:682 tpl/toolbox/purge.tpl.php:61
     909#: src/gui.cls.php:532 src/gui.cls.php:692 tpl/toolbox/purge.tpl.php:61
    888910msgid "Opcode Cache"
    889911msgstr ""
    890912
    891 #: src/gui.cls.php:551 src/gui.cls.php:711 tpl/toolbox/purge.tpl.php:88
     913#: src/gui.cls.php:561 src/gui.cls.php:721 tpl/toolbox/purge.tpl.php:88
    892914msgid "Localized Resources"
    893915msgstr ""
    894916
    895 #: src/gui.cls.php:561 src/gui.cls.php:721
     917#: src/gui.cls.php:571 src/gui.cls.php:731
    896918#: tpl/page_optm/settings_media.tpl.php:131 tpl/toolbox/purge.tpl.php:97
    897919msgid "LQIP Cache"
    898920msgstr ""
    899921
    900 #: src/gui.cls.php:571 src/gui.cls.php:731 src/lang.cls.php:182
     922#: src/gui.cls.php:581 src/gui.cls.php:741 src/lang.cls.php:184
    901923#: tpl/presets/standard.tpl.php:42 tpl/toolbox/purge.tpl.php:106
    902924msgid "Gravatar Cache"
    903925msgstr ""
    904926
    905 #: src/gui.cls.php:595
     927#: src/gui.cls.php:605
    906928msgid "LiteSpeed Cache Purge All"
    907929msgstr ""
    908930
    909 #: src/gui.cls.php:611 tpl/cdn/entry.tpl.php:8 tpl/cdn/settings.tpl.php:194
     931#: src/gui.cls.php:621 tpl/cdn/entry.tpl.php:8 tpl/cdn/settings.tpl.php:194
    910932#: tpl/db_optm/entry.tpl.php:6
    911933msgid "Manage"
    912934msgstr ""
    913935
    914 #: src/gui.cls.php:662 tpl/cdn/manage.tpl.php:19
    915 msgid "Cloudflare"
    916 msgstr ""
    917 
    918 #: src/gui.cls.php:751 tpl/img_optm/summary.tpl.php:141
     936#: src/gui.cls.php:761 tpl/img_optm/summary.tpl.php:141
    919937msgid "Remove all previous unfinished image optimization requests."
    920938msgstr ""
    921939
    922 #: src/gui.cls.php:752 tpl/img_optm/summary.tpl.php:143
     940#: src/gui.cls.php:762 tpl/img_optm/summary.tpl.php:143
    923941msgid "Clean Up Unfinished Data"
    924942msgstr ""
    925943
    926 #: src/gui.cls.php:771
     944#: src/gui.cls.php:781
    927945msgid "Install %s"
    928946msgstr ""
    929947
    930 #: src/gui.cls.php:772
     948#: src/gui.cls.php:782
    931949msgid "Install Now"
    932950msgstr ""
    933951
    934 #: src/gui.cls.php:792
     952#: src/gui.cls.php:802
    935953msgid ""
    936954"<a href=\"%1$s\" %2$s>View version %3$s details</a> or <a href=\"%4$s\" %5$s "
     
    938956msgstr ""
    939957
    940 #: src/gui.cls.php:794
     958#: src/gui.cls.php:804
    941959msgid "View %1$s version %2$s details"
    942960msgstr ""
    943961
    944 #: src/gui.cls.php:797
     962#: src/gui.cls.php:807
    945963msgid "Update %s now"
    946964msgstr ""
     
    956974msgstr ""
    957975
    958 #: src/img-optm.cls.php:352
     976#: src/img-optm.cls.php:343
    959977msgid "Pushed %1$s to Cloud server, accepted %2$s."
    960978msgstr ""
    961979
    962 #: src/img-optm.cls.php:600
     980#: src/img-optm.cls.php:591
    963981msgid "Cleared %1$s invalid images."
    964982msgstr ""
    965983
    966 #: src/img-optm.cls.php:657
     984#: src/img-optm.cls.php:650
    967985msgid "No valid image found in the current request."
    968986msgstr ""
    969987
    970 #: src/img-optm.cls.php:680
     988#: src/img-optm.cls.php:673
    971989msgid "No valid image found by Cloud server in the current request."
    972990msgstr ""
    973991
    974 #: src/img-optm.cls.php:866
     992#: src/img-optm.cls.php:859
    975993msgid "Started async image optimization request"
    976994msgstr ""
    977995
    978 #: src/img-optm.cls.php:947
     996#: src/img-optm.cls.php:940
    979997msgid "Pull Cron is running"
    980998msgstr ""
    981999
    982 #: src/img-optm.cls.php:1040 src/img-optm.cls.php:1066
     1000#: src/img-optm.cls.php:1033 src/img-optm.cls.php:1059
    9831001msgid "Some optimized image file(s) has expired and was cleared."
    9841002msgstr ""
    9851003
    986 #: src/img-optm.cls.php:1083
     1004#: src/img-optm.cls.php:1076
    9871005msgid "Pulled WebP image md5 does not match the notified WebP image md5."
    9881006msgstr ""
    9891007
    990 #: src/img-optm.cls.php:1119
     1008#: src/img-optm.cls.php:1112
    9911009msgid "One or more pulled images does not match with the notified image md5"
    9921010msgstr ""
    9931011
    994 #: src/img-optm.cls.php:1312
     1012#: src/img-optm.cls.php:1305
    9951013msgid "Cleaned up unfinished data successfully."
    9961014msgstr ""
    9971015
    998 #: src/img-optm.cls.php:1396
     1016#: src/img-optm.cls.php:1389
    9991017msgid "Destroy all optimization data successfully."
    10001018msgstr ""
    10011019
    1002 #: src/img-optm.cls.php:1459 src/img-optm.cls.php:1521
     1020#: src/img-optm.cls.php:1452 src/img-optm.cls.php:1514
    10031021msgid "Rescanned successfully."
    10041022msgstr ""
    10051023
    1006 #: src/img-optm.cls.php:1521
     1024#: src/img-optm.cls.php:1514
    10071025msgid "Rescanned %d images successfully."
    10081026msgstr ""
    10091027
    1010 #: src/img-optm.cls.php:1588
     1028#: src/img-optm.cls.php:1581
    10111029msgid "Calculated backups successfully."
    10121030msgstr ""
    10131031
    1014 #: src/img-optm.cls.php:1682
     1032#: src/img-optm.cls.php:1675
    10151033msgid "Removed backups successfully."
    10161034msgstr ""
    10171035
    1018 #: src/img-optm.cls.php:1834
     1036#: src/img-optm.cls.php:1827
    10191037msgid "Switched images successfully."
    10201038msgstr ""
    10211039
    1022 #: src/img-optm.cls.php:1934 src/img-optm.cls.php:1980
     1040#: src/img-optm.cls.php:1927 src/img-optm.cls.php:1973
    10231041msgid "Switched to optimized file successfully."
    10241042msgstr ""
    10251043
    1026 #: src/img-optm.cls.php:1953
     1044#: src/img-optm.cls.php:1946
    10271045msgid "Disabled WebP file successfully."
    10281046msgstr ""
    10291047
    1030 #: src/img-optm.cls.php:1958
     1048#: src/img-optm.cls.php:1951
    10311049msgid "Enabled WebP file successfully."
    10321050msgstr ""
    10331051
    1034 #: src/img-optm.cls.php:1974
     1052#: src/img-optm.cls.php:1967
    10351053msgid "Restored original file successfully."
    10361054msgstr ""
    10371055
    1038 #: src/img-optm.cls.php:2031
     1056#: src/img-optm.cls.php:2024
    10391057msgid "Reset the optimized data successfully."
    10401058msgstr ""
     
    10601078msgstr ""
    10611079
    1062 #: src/lang.cls.php:28 tpl/dash/dashboard.tpl.php:361
     1080#: src/lang.cls.php:28 tpl/dash/dashboard.tpl.php:366
    10631081msgid "Images requested"
    10641082msgstr ""
    10651083
    1066 #: src/lang.cls.php:29 tpl/dash/dashboard.tpl.php:371
     1084#: src/lang.cls.php:29 tpl/dash/dashboard.tpl.php:376
    10671085msgid "Images notified to pull"
    10681086msgstr ""
     
    11071125msgstr ""
    11081126
    1109 #: src/lang.cls.php:95 tpl/dash/dashboard.tpl.php:421
     1127#: src/lang.cls.php:95 tpl/dash/dashboard.tpl.php:426
    11101128#: tpl/presets/standard.tpl.php:12
    11111129msgid "Browser Cache"
     
    11411159
    11421160#: src/lang.cls.php:103
     1161msgid "AJAX Cache TTL"
     1162msgstr ""
     1163
     1164#: src/lang.cls.php:104
    11431165msgid "Automatically Upgrade"
    11441166msgstr ""
    11451167
    1146 #: src/lang.cls.php:104
     1168#: src/lang.cls.php:105
    11471169msgid "Guest Mode"
    11481170msgstr ""
    11491171
    1150 #: src/lang.cls.php:105
     1172#: src/lang.cls.php:106
    11511173msgid "Guest Optimization"
    11521174msgstr ""
    11531175
    1154 #: src/lang.cls.php:106
     1176#: src/lang.cls.php:107
    11551177msgid "Notifications"
    11561178msgstr ""
    11571179
    1158 #: src/lang.cls.php:107
     1180#: src/lang.cls.php:108
    11591181msgid "Cache Logged-in Users"
    11601182msgstr ""
    11611183
    1162 #: src/lang.cls.php:108
     1184#: src/lang.cls.php:109
    11631185msgid "Cache Commenters"
    11641186msgstr ""
    11651187
    1166 #: src/lang.cls.php:109
     1188#: src/lang.cls.php:110
    11671189msgid "Cache REST API"
    11681190msgstr ""
    11691191
    1170 #: src/lang.cls.php:110
     1192#: src/lang.cls.php:111
    11711193msgid "Cache Login Page"
    11721194msgstr ""
    11731195
    1174 #: src/lang.cls.php:111
     1196#: src/lang.cls.php:112
    11751197msgid "Cache PHP Resources"
    11761198msgstr ""
    11771199
    1178 #: src/lang.cls.php:112 tpl/cache/settings_inc.cache_mobile.tpl.php:71
     1200#: src/lang.cls.php:113 tpl/cache/settings_inc.cache_mobile.tpl.php:71
    11791201msgid "Cache Mobile"
    11801202msgstr ""
    11811203
    1182 #: src/lang.cls.php:113 tpl/cache/settings_inc.cache_mobile.tpl.php:71
     1204#: src/lang.cls.php:114 tpl/cache/settings_inc.cache_mobile.tpl.php:71
    11831205msgid "List of Mobile User Agents"
    11841206msgstr ""
    11851207
    1186 #: src/lang.cls.php:114
     1208#: src/lang.cls.php:115
    11871209msgid "Private Cached URIs"
    11881210msgstr ""
    11891211
    1190 #: src/lang.cls.php:115
     1212#: src/lang.cls.php:116
    11911213msgid "Drop Query String"
    11921214msgstr ""
    11931215
    1194 #: src/lang.cls.php:118
     1216#: src/lang.cls.php:119
    11951217msgid "Method"
    11961218msgstr ""
    11971219
    1198 #: src/lang.cls.php:119
     1220#: src/lang.cls.php:120
    11991221msgid "Host"
    12001222msgstr ""
    12011223
    1202 #: src/lang.cls.php:120
     1224#: src/lang.cls.php:121
    12031225msgid "Port"
    12041226msgstr ""
    12051227
    1206 #: src/lang.cls.php:121
     1228#: src/lang.cls.php:122
    12071229msgid "Default Object Lifetime"
    12081230msgstr ""
    12091231
    1210 #: src/lang.cls.php:122
     1232#: src/lang.cls.php:123
    12111233msgid "Username"
    12121234msgstr ""
    12131235
    1214 #: src/lang.cls.php:123
     1236#: src/lang.cls.php:124
    12151237msgid "Password"
    12161238msgstr ""
    12171239
    1218 #: src/lang.cls.php:124
     1240#: src/lang.cls.php:125
    12191241msgid "Redis Database ID"
    12201242msgstr ""
    12211243
    1222 #: src/lang.cls.php:125
     1244#: src/lang.cls.php:126
    12231245msgid "Global Groups"
    12241246msgstr ""
    12251247
    1226 #: src/lang.cls.php:126
     1248#: src/lang.cls.php:127
    12271249msgid "Do Not Cache Groups"
    12281250msgstr ""
    12291251
    1230 #: src/lang.cls.php:127
     1252#: src/lang.cls.php:128
    12311253msgid "Persistent Connection"
    12321254msgstr ""
    12331255
    1234 #: src/lang.cls.php:128
     1256#: src/lang.cls.php:129
    12351257msgid "Cache WP-Admin"
    12361258msgstr ""
    12371259
    1238 #: src/lang.cls.php:129
     1260#: src/lang.cls.php:130
    12391261msgid "Store Transients"
    12401262msgstr ""
    12411263
    1242 #: src/lang.cls.php:131
     1264#: src/lang.cls.php:132
    12431265msgid "Purge All On Upgrade"
    12441266msgstr ""
    12451267
    1246 #: src/lang.cls.php:132
     1268#: src/lang.cls.php:133
    12471269msgid "Serve Stale"
    12481270msgstr ""
    12491271
    1250 #: src/lang.cls.php:133 tpl/cache/settings-purge.tpl.php:130
     1272#: src/lang.cls.php:134 tpl/cache/settings-purge.tpl.php:130
    12511273msgid "Scheduled Purge URLs"
    12521274msgstr ""
    12531275
    1254 #: src/lang.cls.php:134 tpl/cache/settings-purge.tpl.php:105
     1276#: src/lang.cls.php:135 tpl/cache/settings-purge.tpl.php:105
    12551277msgid "Scheduled Purge Time"
    12561278msgstr ""
    12571279
    1258 #: src/lang.cls.php:135
     1280#: src/lang.cls.php:136
    12591281msgid "Force Cache URIs"
    12601282msgstr ""
    12611283
    1262 #: src/lang.cls.php:136
     1284#: src/lang.cls.php:137
    12631285msgid "Force Public Cache URIs"
    12641286msgstr ""
    12651287
    1266 #: src/lang.cls.php:137
     1288#: src/lang.cls.php:138
    12671289msgid "Do Not Cache URIs"
    12681290msgstr ""
    12691291
    1270 #: src/lang.cls.php:138
     1292#: src/lang.cls.php:139
    12711293msgid "Do Not Cache Query Strings"
    12721294msgstr ""
    12731295
    1274 #: src/lang.cls.php:139
     1296#: src/lang.cls.php:140
    12751297msgid "Do Not Cache Categories"
    12761298msgstr ""
    12771299
    1278 #: src/lang.cls.php:140
     1300#: src/lang.cls.php:141
    12791301msgid "Do Not Cache Tags"
    12801302msgstr ""
    12811303
    1282 #: src/lang.cls.php:141
     1304#: src/lang.cls.php:142
    12831305msgid "Do Not Cache Roles"
    12841306msgstr ""
    12851307
    1286 #: src/lang.cls.php:142
     1308#: src/lang.cls.php:143
    12871309msgid "CSS Minify"
    12881310msgstr ""
    12891311
    1290 #: src/lang.cls.php:143
     1312#: src/lang.cls.php:144
    12911313msgid "CSS Combine"
    12921314msgstr ""
    12931315
    1294 #: src/lang.cls.php:144
     1316#: src/lang.cls.php:145
    12951317msgid "CSS Combine External and Inline"
    12961318msgstr ""
    12971319
    1298 #: src/lang.cls.php:145
     1320#: src/lang.cls.php:146
    12991321msgid "Generate UCSS"
    13001322msgstr ""
    13011323
    1302 #: src/lang.cls.php:146
     1324#: src/lang.cls.php:147
    13031325msgid "UCSS Inline"
    13041326msgstr ""
    13051327
    1306 #: src/lang.cls.php:147
     1328#: src/lang.cls.php:148
    13071329msgid "UCSS Selector Allowlist"
    13081330msgstr ""
    13091331
    1310 #: src/lang.cls.php:148
     1332#: src/lang.cls.php:149
    13111333msgid "UCSS File Excludes and Inline"
    13121334msgstr ""
    13131335
    1314 #: src/lang.cls.php:149
     1336#: src/lang.cls.php:150
    13151337msgid "UCSS URI Excludes"
    13161338msgstr ""
    13171339
    1318 #: src/lang.cls.php:150
     1340#: src/lang.cls.php:151
    13191341msgid "JS Minify"
    13201342msgstr ""
    13211343
    1322 #: src/lang.cls.php:152
     1344#: src/lang.cls.php:153
    13231345msgid "JS Combine External and Inline"
    13241346msgstr ""
    13251347
    1326 #: src/lang.cls.php:153
     1348#: src/lang.cls.php:154
    13271349msgid "HTML Minify"
    13281350msgstr ""
    13291351
    1330 #: src/lang.cls.php:154
     1352#: src/lang.cls.php:155
    13311353msgid "HTML Lazy Load Selectors"
    13321354msgstr ""
    13331355
    1334 #: src/lang.cls.php:155 tpl/page_optm/settings_tuning_css.tpl.php:131
     1356#: src/lang.cls.php:156
     1357msgid "HTML Keep Comments"
     1358msgstr ""
     1359
     1360#: src/lang.cls.php:157 tpl/page_optm/settings_tuning_css.tpl.php:131
    13351361msgid "Load CSS Asynchronously"
    13361362msgstr ""
    13371363
    1338 #: src/lang.cls.php:156
     1364#: src/lang.cls.php:158
    13391365msgid "CCSS Per URL"
    13401366msgstr ""
    13411367
    1342 #: src/lang.cls.php:157
     1368#: src/lang.cls.php:159
    13431369msgid "Inline CSS Async Lib"
    13441370msgstr ""
    13451371
    1346 #: src/lang.cls.php:158 tpl/presets/standard.tpl.php:39
     1372#: src/lang.cls.php:160 tpl/presets/standard.tpl.php:39
    13471373msgid "Font Display Optimization"
    13481374msgstr ""
    13491375
    1350 #: src/lang.cls.php:159
     1376#: src/lang.cls.php:161
    13511377msgid "Load JS Deferred"
    13521378msgstr ""
    13531379
    1354 #: src/lang.cls.php:160
     1380#: src/lang.cls.php:162
    13551381msgid "Localize Resources"
    13561382msgstr ""
    13571383
    1358 #: src/lang.cls.php:161
     1384#: src/lang.cls.php:163
    13591385msgid "Localization Files"
    13601386msgstr ""
    13611387
    1362 #: src/lang.cls.php:162
     1388#: src/lang.cls.php:164
    13631389msgid "DNS Prefetch"
    13641390msgstr ""
    13651391
    1366 #: src/lang.cls.php:163
     1392#: src/lang.cls.php:165
    13671393msgid "DNS Prefetch Control"
    13681394msgstr ""
    13691395
    1370 #: src/lang.cls.php:164
     1396#: src/lang.cls.php:166
    13711397msgid "DNS Preconnect"
    13721398msgstr ""
    13731399
    1374 #: src/lang.cls.php:165
     1400#: src/lang.cls.php:167
    13751401msgid "CSS Excludes"
    13761402msgstr ""
    13771403
    1378 #: src/lang.cls.php:166
     1404#: src/lang.cls.php:168
    13791405msgid "JS Delayed Includes"
    13801406msgstr ""
    13811407
    1382 #: src/lang.cls.php:167
     1408#: src/lang.cls.php:169
    13831409msgid "JS Excludes"
    13841410msgstr ""
    13851411
    1386 #: src/lang.cls.php:168
     1412#: src/lang.cls.php:170
    13871413msgid "Remove Query Strings"
    13881414msgstr ""
    13891415
    1390 #: src/lang.cls.php:169
     1416#: src/lang.cls.php:171
    13911417msgid "Load Google Fonts Asynchronously"
    13921418msgstr ""
    13931419
    1394 #: src/lang.cls.php:170
     1420#: src/lang.cls.php:172
    13951421msgid "Remove Google Fonts"
    13961422msgstr ""
    13971423
    1398 #: src/lang.cls.php:171
     1424#: src/lang.cls.php:173
    13991425msgid "Critical CSS Rules"
    14001426msgstr ""
    14011427
    1402 #: src/lang.cls.php:172
     1428#: src/lang.cls.php:174
    14031429msgid "Separate CCSS Cache Post Types"
    14041430msgstr ""
    14051431
    1406 #: src/lang.cls.php:173
     1432#: src/lang.cls.php:175
    14071433msgid "Separate CCSS Cache URIs"
    14081434msgstr ""
    14091435
    1410 #: src/lang.cls.php:174
     1436#: src/lang.cls.php:176
    14111437msgid "JS Deferred / Delayed Excludes"
    14121438msgstr ""
    14131439
    1414 #: src/lang.cls.php:175
     1440#: src/lang.cls.php:177
    14151441msgid "Guest Mode JS Excludes"
    14161442msgstr ""
    14171443
    1418 #: src/lang.cls.php:176 tpl/presets/standard.tpl.php:44
     1444#: src/lang.cls.php:178 tpl/presets/standard.tpl.php:44
    14191445msgid "Remove WordPress Emoji"
    14201446msgstr ""
    14211447
    1422 #: src/lang.cls.php:177 tpl/presets/standard.tpl.php:45
     1448#: src/lang.cls.php:179 tpl/presets/standard.tpl.php:45
    14231449msgid "Remove Noscript Tags"
    14241450msgstr ""
    14251451
    1426 #: src/lang.cls.php:178
     1452#: src/lang.cls.php:180
    14271453msgid "URI Excludes"
    14281454msgstr ""
    14291455
    1430 #: src/lang.cls.php:179
     1456#: src/lang.cls.php:181
    14311457msgid "Optimize for Guests Only"
    14321458msgstr ""
    14331459
    1434 #: src/lang.cls.php:180
     1460#: src/lang.cls.php:182
    14351461msgid "Role Excludes"
    14361462msgstr ""
    14371463
    1438 #: src/lang.cls.php:183
     1464#: src/lang.cls.php:185
    14391465msgid "Gravatar Cache Cron"
    14401466msgstr ""
    14411467
    1442 #: src/lang.cls.php:184
     1468#: src/lang.cls.php:186
    14431469msgid "Gravatar Cache TTL"
    14441470msgstr ""
    14451471
    1446 #: src/lang.cls.php:186
     1472#: src/lang.cls.php:188
    14471473msgid "Lazy Load Images"
    14481474msgstr ""
    14491475
    1450 #: src/lang.cls.php:187
     1476#: src/lang.cls.php:189
    14511477msgid "Lazy Load Image Excludes"
    14521478msgstr ""
    14531479
    1454 #: src/lang.cls.php:188
     1480#: src/lang.cls.php:190
    14551481msgid "Lazy Load Image Class Name Excludes"
    14561482msgstr ""
    14571483
    1458 #: src/lang.cls.php:189
     1484#: src/lang.cls.php:191
    14591485msgid "Lazy Load Image Parent Class Name Excludes"
    14601486msgstr ""
    14611487
    1462 #: src/lang.cls.php:190
     1488#: src/lang.cls.php:192
    14631489msgid "Lazy Load Iframe Class Name Excludes"
    14641490msgstr ""
    14651491
    1466 #: src/lang.cls.php:191
     1492#: src/lang.cls.php:193
    14671493msgid "Lazy Load Iframe Parent Class Name Excludes"
    14681494msgstr ""
    14691495
    1470 #: src/lang.cls.php:192
     1496#: src/lang.cls.php:194
    14711497msgid "Lazy Load URI Excludes"
    14721498msgstr ""
    14731499
    1474 #: src/lang.cls.php:193
     1500#: src/lang.cls.php:195
    14751501msgid "LQIP Excludes"
    14761502msgstr ""
    14771503
    1478 #: src/lang.cls.php:194
     1504#: src/lang.cls.php:196
    14791505msgid "Basic Image Placeholder"
    14801506msgstr ""
    14811507
    1482 #: src/lang.cls.php:195
     1508#: src/lang.cls.php:197
    14831509msgid "Responsive Placeholder"
    14841510msgstr ""
    14851511
    1486 #: src/lang.cls.php:196
     1512#: src/lang.cls.php:198
    14871513msgid "Responsive Placeholder Color"
    14881514msgstr ""
    14891515
    1490 #: src/lang.cls.php:197
     1516#: src/lang.cls.php:199
    14911517msgid "Responsive Placeholder SVG"
    14921518msgstr ""
    14931519
    1494 #: src/lang.cls.php:198
     1520#: src/lang.cls.php:200
    14951521msgid "LQIP Cloud Generator"
    14961522msgstr ""
    14971523
    1498 #: src/lang.cls.php:199
     1524#: src/lang.cls.php:201
    14991525msgid "LQIP Quality"
    15001526msgstr ""
    15011527
    1502 #: src/lang.cls.php:200
     1528#: src/lang.cls.php:202
    15031529msgid "LQIP Minimum Dimensions"
    15041530msgstr ""
    15051531
    1506 #: src/lang.cls.php:202
     1532#: src/lang.cls.php:204
    15071533msgid "Generate LQIP In Background"
    15081534msgstr ""
    15091535
    1510 #: src/lang.cls.php:203
     1536#: src/lang.cls.php:205
    15111537msgid "Lazy Load Iframes"
    15121538msgstr ""
    15131539
    1514 #: src/lang.cls.php:204
     1540#: src/lang.cls.php:206
    15151541msgid "Add Missing Sizes"
    15161542msgstr ""
    15171543
    1518 #: src/lang.cls.php:205 src/metabox.cls.php:33 src/metabox.cls.php:34
     1544#: src/lang.cls.php:207 src/metabox.cls.php:33 src/metabox.cls.php:34
    15191545#: tpl/page_optm/settings_vpi.tpl.php:12
    15201546msgid "Viewport Images"
    15211547msgstr ""
    15221548
    1523 #: src/lang.cls.php:206
     1549#: src/lang.cls.php:208
    15241550msgid "Viewport Images Cron"
    15251551msgstr ""
    15261552
    1527 #: src/lang.cls.php:208
     1553#: src/lang.cls.php:210
    15281554msgid "Auto Request Cron"
    15291555msgstr ""
    15301556
    1531 #: src/lang.cls.php:209
     1557#: src/lang.cls.php:211
    15321558msgid "Auto Pull Cron"
    15331559msgstr ""
    15341560
    1535 #: src/lang.cls.php:210
     1561#: src/lang.cls.php:212
    15361562msgid "Optimize Original Images"
    15371563msgstr ""
    15381564
    1539 #: src/lang.cls.php:211
     1565#: src/lang.cls.php:213
    15401566msgid "Remove Original Backups"
    15411567msgstr ""
    15421568
    1543 #: src/lang.cls.php:212
     1569#: src/lang.cls.php:214
    15441570msgid "Image WebP Replacement"
    15451571msgstr ""
    15461572
    1547 #: src/lang.cls.php:213
     1573#: src/lang.cls.php:215
    15481574msgid "Optimize Losslessly"
    15491575msgstr ""
    15501576
    1551 #: src/lang.cls.php:214
     1577#: src/lang.cls.php:216
    15521578msgid "Preserve EXIF/XMP data"
    15531579msgstr ""
    15541580
    1555 #: src/lang.cls.php:215
     1581#: src/lang.cls.php:217
    15561582msgid "WebP Attribute To Replace"
    15571583msgstr ""
    15581584
    1559 #: src/lang.cls.php:216
     1585#: src/lang.cls.php:218
    15601586msgid "WebP For Extra srcset"
    15611587msgstr ""
    15621588
    1563 #: src/lang.cls.php:217
     1589#: src/lang.cls.php:219
    15641590msgid "WordPress Image Quality Control"
    15651591msgstr ""
    15661592
    1567 #: src/lang.cls.php:218 tpl/esi_widget_edit.php:36
     1593#: src/lang.cls.php:220 tpl/esi_widget_edit.php:36
    15681594msgid "Enable ESI"
    15691595msgstr ""
    15701596
    1571 #: src/lang.cls.php:219
     1597#: src/lang.cls.php:221
    15721598msgid "Cache Admin Bar"
    15731599msgstr ""
    15741600
    1575 #: src/lang.cls.php:220
     1601#: src/lang.cls.php:222
    15761602msgid "Cache Comment Form"
    15771603msgstr ""
    15781604
    1579 #: src/lang.cls.php:221
     1605#: src/lang.cls.php:223
    15801606msgid "ESI Nonces"
    15811607msgstr ""
    15821608
    1583 #: src/lang.cls.php:222 tpl/page_optm/settings_css.tpl.php:121
     1609#: src/lang.cls.php:224 tpl/page_optm/settings_css.tpl.php:121
    15841610#: tpl/page_optm/settings_css.tpl.php:238 tpl/page_optm/settings_vpi.tpl.php:67
    15851611msgid "Vary Group"
    15861612msgstr ""
    15871613
    1588 #: src/lang.cls.php:223
     1614#: src/lang.cls.php:225
    15891615msgid "Purge All Hooks"
    15901616msgstr ""
    15911617
    1592 #: src/lang.cls.php:224
     1618#: src/lang.cls.php:226
    15931619msgid "Improve HTTP/HTTPS Compatibility"
    15941620msgstr ""
    15951621
    1596 #: src/lang.cls.php:225
     1622#: src/lang.cls.php:227
    15971623msgid "Instant Click"
    15981624msgstr ""
    15991625
    1600 #: src/lang.cls.php:226
     1626#: src/lang.cls.php:228
    16011627msgid "Do Not Cache Cookies"
    16021628msgstr ""
    16031629
    1604 #: src/lang.cls.php:227
     1630#: src/lang.cls.php:229
    16051631msgid "Do Not Cache User Agents"
    16061632msgstr ""
    16071633
    1608 #: src/lang.cls.php:228
     1634#: src/lang.cls.php:230
    16091635msgid "Login Cookie"
    16101636msgstr ""
    16111637
    1612 #: src/lang.cls.php:229
     1638#: src/lang.cls.php:231
    16131639msgid "Vary Cookies"
    16141640msgstr ""
    16151641
    1616 #: src/lang.cls.php:231
     1642#: src/lang.cls.php:233
    16171643msgid "Frontend Heartbeat Control"
    16181644msgstr ""
    16191645
    1620 #: src/lang.cls.php:232
     1646#: src/lang.cls.php:234
    16211647msgid "Frontend Heartbeat TTL"
    16221648msgstr ""
    16231649
    1624 #: src/lang.cls.php:233
     1650#: src/lang.cls.php:235
    16251651msgid "Backend Heartbeat Control"
    16261652msgstr ""
    16271653
    1628 #: src/lang.cls.php:234
     1654#: src/lang.cls.php:236
    16291655msgid "Backend Heartbeat TTL"
    16301656msgstr ""
    16311657
    1632 #: src/lang.cls.php:235
     1658#: src/lang.cls.php:237
    16331659msgid "Editor Heartbeat"
    16341660msgstr ""
    16351661
    1636 #: src/lang.cls.php:236
     1662#: src/lang.cls.php:238
    16371663msgid "Editor Heartbeat TTL"
    16381664msgstr ""
    16391665
    1640 #: src/lang.cls.php:238
     1666#: src/lang.cls.php:240
    16411667msgid "QUIC.cloud CDN"
    16421668msgstr ""
    16431669
    1644 #: src/lang.cls.php:239
     1670#: src/lang.cls.php:241
    16451671msgid "Use CDN Mapping"
    16461672msgstr ""
    16471673
    1648 #: src/lang.cls.php:240
     1674#: src/lang.cls.php:242
    16491675msgid "CDN URL"
    16501676msgstr ""
    16511677
    1652 #: src/lang.cls.php:241
     1678#: src/lang.cls.php:243
    16531679msgid "Include Images"
    16541680msgstr ""
    16551681
    1656 #: src/lang.cls.php:242
     1682#: src/lang.cls.php:244
    16571683msgid "Include CSS"
    16581684msgstr ""
    16591685
    1660 #: src/lang.cls.php:243
     1686#: src/lang.cls.php:245
    16611687msgid "Include JS"
    16621688msgstr ""
    16631689
    1664 #: src/lang.cls.php:244 tpl/cdn/settings.tpl.php:102
     1690#: src/lang.cls.php:246 tpl/cdn/settings.tpl.php:102
    16651691msgid "Include File Types"
    16661692msgstr ""
    16671693
    1668 #: src/lang.cls.php:245
     1694#: src/lang.cls.php:247
    16691695msgid "HTML Attribute To Replace"
    16701696msgstr ""
    16711697
    1672 #: src/lang.cls.php:246
     1698#: src/lang.cls.php:248
    16731699msgid "Original URLs"
    16741700msgstr ""
    16751701
    1676 #: src/lang.cls.php:247
     1702#: src/lang.cls.php:249
    16771703msgid "Included Directories"
    16781704msgstr ""
    16791705
    1680 #: src/lang.cls.php:248
     1706#: src/lang.cls.php:250
    16811707msgid "Exclude Path"
    16821708msgstr ""
    16831709
    1684 #: src/lang.cls.php:249
     1710#: src/lang.cls.php:251
    16851711msgid "Cloudflare API"
    16861712msgstr ""
    16871713
    1688 #: src/lang.cls.php:252
     1714#: src/lang.cls.php:254
    16891715msgid "Delay"
    16901716msgstr ""
    16911717
    1692 #: src/lang.cls.php:253
     1718#: src/lang.cls.php:255
    16931719msgid "Run Duration"
    16941720msgstr ""
    16951721
    1696 #: src/lang.cls.php:254
     1722#: src/lang.cls.php:256
    16971723msgid "Interval Between Runs"
    16981724msgstr ""
    16991725
    1700 #: src/lang.cls.php:255
     1726#: src/lang.cls.php:257
    17011727msgid "Crawl Interval"
    17021728msgstr ""
    17031729
    1704 #: src/lang.cls.php:256
     1730#: src/lang.cls.php:258
    17051731msgid "Threads"
    17061732msgstr ""
    17071733
    1708 #: src/lang.cls.php:257
     1734#: src/lang.cls.php:259
    17091735msgid "Timeout"
    17101736msgstr ""
    17111737
    1712 #: src/lang.cls.php:258
     1738#: src/lang.cls.php:260
    17131739msgid "Server Load Limit"
    17141740msgstr ""
    17151741
    1716 #: src/lang.cls.php:259
     1742#: src/lang.cls.php:261
    17171743msgid "Role Simulation"
    17181744msgstr ""
    17191745
    1720 #: src/lang.cls.php:260
     1746#: src/lang.cls.php:262
    17211747msgid "Cookie Simulation"
    17221748msgstr ""
    17231749
    1724 #: src/lang.cls.php:261
     1750#: src/lang.cls.php:263
    17251751msgid "Custom Sitemap"
    17261752msgstr ""
    17271753
    1728 #: src/lang.cls.php:262
     1754#: src/lang.cls.php:264
    17291755msgid "Drop Domain from Sitemap"
    17301756msgstr ""
    17311757
    1732 #: src/lang.cls.php:263
     1758#: src/lang.cls.php:265
    17331759msgid "Sitemap Timeout"
    17341760msgstr ""
    17351761
    1736 #: src/lang.cls.php:265 tpl/inc/disabled_all.php:5
     1762#: src/lang.cls.php:267 tpl/inc/disabled_all.php:5
    17371763msgid "Disable All Features"
    17381764msgstr ""
    17391765
    1740 #: src/lang.cls.php:266 tpl/toolbox/log_viewer.tpl.php:11
     1766#: src/lang.cls.php:268 tpl/toolbox/log_viewer.tpl.php:11
    17411767msgid "Debug Log"
    17421768msgstr ""
    17431769
    1744 #: src/lang.cls.php:267
     1770#: src/lang.cls.php:269
    17451771msgid "Admin IPs"
    17461772msgstr ""
    17471773
    1748 #: src/lang.cls.php:268
     1774#: src/lang.cls.php:270
    17491775msgid "Debug Level"
    17501776msgstr ""
    17511777
    1752 #: src/lang.cls.php:269
     1778#: src/lang.cls.php:271
    17531779msgid "Log File Size Limit"
    17541780msgstr ""
    17551781
    1756 #: src/lang.cls.php:270
     1782#: src/lang.cls.php:272
    17571783msgid "Log Cookies"
    17581784msgstr ""
    17591785
    1760 #: src/lang.cls.php:271
     1786#: src/lang.cls.php:273
    17611787msgid "Collapse Query Strings"
    17621788msgstr ""
    17631789
    1764 #: src/lang.cls.php:272
     1790#: src/lang.cls.php:274
    17651791msgid "Debug URI Includes"
    17661792msgstr ""
    17671793
    1768 #: src/lang.cls.php:273
     1794#: src/lang.cls.php:275
    17691795msgid "Debug URI Excludes"
    17701796msgstr ""
    17711797
    1772 #: src/lang.cls.php:274
     1798#: src/lang.cls.php:276
    17731799msgid "Debug String Excludes"
    17741800msgstr ""
    17751801
    1776 #: src/lang.cls.php:276
     1802#: src/lang.cls.php:278
    17771803msgid "Revisions Max Number"
    17781804msgstr ""
    17791805
    1780 #: src/lang.cls.php:277
     1806#: src/lang.cls.php:279
    17811807msgid "Revisions Max Age"
    17821808msgstr ""
     
    18911917msgstr ""
    18921918
    1893 #: src/object-cache.cls.php:477
     1919#: src/object-cache.cls.php:494
    18941920msgid "Redis encountered a fatal error: %s (code: %d)"
    18951921msgstr ""
     
    19041930msgstr ""
    19051931
    1906 #: src/placeholder.cls.php:88 tpl/dash/network_dash.tpl.php:30
     1932#: src/placeholder.cls.php:88
    19071933msgid "LQIP"
    19081934msgstr ""
     
    20192045
    20202046#: thirdparty/woocommerce.content.tpl.php:22
    2021 #: tpl/cache/settings-advanced.tpl.php:12
     2047#: tpl/cache/settings-advanced.tpl.php:14
    20222048#: tpl/cache/settings_inc.browser.tpl.php:12 tpl/toolbox/heartbeat.tpl.php:14
    20232049#: tpl/toolbox/report.tpl.php:29
     
    21202146msgstr ""
    21212147
    2122 #. #-#-#-#-#  litespeed-cache.pot (LiteSpeed Cache 6.2)  #-#-#-#-#
     2148#. #-#-#-#-#  litespeed-cache.pot (LiteSpeed Cache 6.3)  #-#-#-#-#
    21232149#. Plugin Name of the plugin/theme
    21242150#: tpl/banner/new_version.php:59 tpl/banner/new_version_dev.tpl.php:12
     
    21362162
    21372163#: tpl/banner/new_version.php:71 tpl/banner/new_version_dev.tpl.php:24
    2138 #: tpl/toolbox/beta_test.tpl.php:64
     2164#: tpl/toolbox/beta_test.tpl.php:58
    21392165msgid "Upgrade"
    21402166msgstr ""
     
    21602186msgstr ""
    21612187
    2162 #: tpl/banner/score.php:28 tpl/dash/dashboard.tpl.php:209
     2188#: tpl/banner/score.php:28 tpl/dash/dashboard.tpl.php:214
    21632189msgid "Page Load Time"
    21642190msgstr ""
    21652191
    21662192#: tpl/banner/score.php:34 tpl/banner/score.php:74
    2167 #: tpl/dash/dashboard.tpl.php:223 tpl/dash/dashboard.tpl.php:292
     2193#: tpl/dash/dashboard.tpl.php:228 tpl/dash/dashboard.tpl.php:297
    21682194msgid "Before"
    21692195msgstr ""
    21702196
    21712197#: tpl/banner/score.php:45 tpl/banner/score.php:84
    2172 #: tpl/dash/dashboard.tpl.php:232 tpl/dash/dashboard.tpl.php:300
     2198#: tpl/dash/dashboard.tpl.php:237 tpl/dash/dashboard.tpl.php:305
    21732199msgid "After"
    21742200msgstr ""
    21752201
    21762202#: tpl/banner/score.php:55 tpl/banner/score.php:94
    2177 #: tpl/dash/dashboard.tpl.php:240 tpl/dash/dashboard.tpl.php:308
     2203#: tpl/dash/dashboard.tpl.php:245 tpl/dash/dashboard.tpl.php:313
    21782204msgid "Improved by"
    21792205msgstr ""
    21802206
    2181 #: tpl/banner/score.php:68 tpl/dash/dashboard.tpl.php:267
     2207#: tpl/banner/score.php:68 tpl/dash/dashboard.tpl.php:272
    21822208msgid "PageSpeed Score"
    21832209msgstr ""
     
    22722298
    22732299#: tpl/cache/network_settings-advanced.tpl.php:7
    2274 #: tpl/cache/settings-advanced.tpl.php:7
     2300#: tpl/cache/settings-advanced.tpl.php:9
    22752301msgid "Advanced Settings"
    22762302msgstr ""
     
    23122338msgstr ""
    23132339
    2314 #: tpl/cache/settings-advanced.tpl.php:13
     2340#: tpl/cache/settings-advanced.tpl.php:15
    23152341msgid "These settings are meant for ADVANCED USERS ONLY."
    23162342msgstr ""
    23172343
    2318 #: tpl/cache/settings-advanced.tpl.php:32
     2344#: tpl/cache/settings-advanced.tpl.php:33
     2345msgid ""
     2346"Specify an AJAX action in POST/GET and the number of seconds to cache that "
     2347"request, separated by a space."
     2348msgstr ""
     2349
     2350#: tpl/cache/settings-advanced.tpl.php:53
    23192351msgid ""
    23202352"Enable this option if you are using both HTTP and HTTPS in the same domain "
     
    23222354msgstr ""
    23232355
    2324 #: tpl/cache/settings-advanced.tpl.php:46
     2356#: tpl/cache/settings-advanced.tpl.php:67
    23252357msgid ""
    23262358"When a visitor hovers over a page link, preload that page. This will speed "
     
    23282360msgstr ""
    23292361
    2330 #: tpl/cache/settings-advanced.tpl.php:50
     2362#: tpl/cache/settings-advanced.tpl.php:72
    23312363msgid ""
    23322364"This will generate extra requests to the server, which will increase server "
     
    31193151msgstr ""
    31203152
    3121 #: tpl/cdn/auto_setup.tpl.php:140 tpl/dash/dashboard.tpl.php:196
    3122 #: tpl/dash/dashboard.tpl.php:198 tpl/general/settings.tpl.php:78
     3153#: tpl/cdn/auto_setup.tpl.php:140 tpl/dash/dashboard.tpl.php:200
     3154#: tpl/dash/dashboard.tpl.php:202 tpl/general/settings.tpl.php:78
    31233155#: tpl/general/settings.tpl.php:80 tpl/general/settings.tpl.php:109
    31243156msgid "Link to QUIC.cloud"
     
    35763608msgstr ""
    35773609
    3578 #: tpl/crawler/map.tpl.php:68 tpl/dash/dashboard.tpl.php:568
     3610#: tpl/crawler/map.tpl.php:68 tpl/dash/dashboard.tpl.php:573
    35793611msgid "Crawler Status"
    35803612msgstr ""
     
    37253757msgstr ""
    37263758
    3727 #: tpl/crawler/summary.tpl.php:85 tpl/dash/dashboard.tpl.php:581
     3759#: tpl/crawler/summary.tpl.php:85 tpl/dash/dashboard.tpl.php:586
    37283760msgid "Current crawler started at"
    37293761msgstr ""
     
    37333765msgstr ""
    37343766
    3735 #: tpl/crawler/summary.tpl.php:97 tpl/dash/dashboard.tpl.php:588
     3767#: tpl/crawler/summary.tpl.php:97 tpl/dash/dashboard.tpl.php:593
    37363768msgid "Last interval"
    37373769msgstr ""
    37383770
    3739 #: tpl/crawler/summary.tpl.php:104 tpl/dash/dashboard.tpl.php:595
     3771#: tpl/crawler/summary.tpl.php:104 tpl/dash/dashboard.tpl.php:600
    37403772msgid "Ended reason"
    37413773msgstr ""
     
    38333865msgstr ""
    38343866
    3835 #: tpl/dash/dashboard.tpl.php:41 tpl/dash/dashboard.tpl.php:212
    3836 #: tpl/dash/dashboard.tpl.php:270
     3867#: tpl/dash/dashboard.tpl.php:41 tpl/dash/dashboard.tpl.php:217
     3868#: tpl/dash/dashboard.tpl.php:275
    38373869msgid "Sync"
    38383870msgstr ""
     
    38463878msgstr ""
    38473879
    3848 #: tpl/dash/dashboard.tpl.php:55 tpl/dash/dashboard.tpl.php:504
     3880#: tpl/dash/dashboard.tpl.php:55 tpl/dash/dashboard.tpl.php:509
     3881#: tpl/dash/network_dash.tpl.php:30
    38493882msgid "Low Quality Image Placeholder"
    38503883msgstr ""
     
    38903923msgstr ""
    38913924
    3892 #: tpl/dash/dashboard.tpl.php:194
     3925#: tpl/dash/dashboard.tpl.php:198
    38933926msgid "Go to QUIC.cloud dashboard"
    38943927msgstr ""
    38953928
    3896 #: tpl/dash/dashboard.tpl.php:213
     3929#: tpl/dash/dashboard.tpl.php:218
    38973930msgid "Refresh page load time"
    38983931msgstr ""
    38993932
    3900 #: tpl/dash/dashboard.tpl.php:254 tpl/dash/dashboard.tpl.php:324
    3901 #: tpl/dash/dashboard.tpl.php:464 tpl/dash/dashboard.tpl.php:496
    3902 #: tpl/dash/dashboard.tpl.php:528 tpl/dash/dashboard.tpl.php:560
     3933#: tpl/dash/dashboard.tpl.php:259 tpl/dash/dashboard.tpl.php:329
     3934#: tpl/dash/dashboard.tpl.php:469 tpl/dash/dashboard.tpl.php:501
     3935#: tpl/dash/dashboard.tpl.php:533 tpl/dash/dashboard.tpl.php:565
    39033936msgid "Last requested"
    39043937msgstr ""
    39053938
    3906 #: tpl/dash/dashboard.tpl.php:259
     3939#: tpl/dash/dashboard.tpl.php:264
    39073940msgid "Current closest Cloud server is %s.&#10;Click to redetect."
    39083941msgstr ""
    39093942
    3910 #: tpl/dash/dashboard.tpl.php:259 tpl/img_optm/summary.tpl.php:43
     3943#: tpl/dash/dashboard.tpl.php:264 tpl/img_optm/summary.tpl.php:43
    39113944#: tpl/page_optm/settings_css.tpl.php:101
    39123945#: tpl/page_optm/settings_css.tpl.php:218
     
    39173950msgstr ""
    39183951
    3919 #: tpl/dash/dashboard.tpl.php:259 tpl/general/settings.tpl.php:130
     3952#: tpl/dash/dashboard.tpl.php:264 tpl/general/settings.tpl.php:130
    39203953#: tpl/img_optm/summary.tpl.php:43 tpl/img_optm/summary.tpl.php:45
    39213954#: tpl/page_optm/settings_css.tpl.php:101
     
    39263959msgstr ""
    39273960
    3928 #: tpl/dash/dashboard.tpl.php:271
     3961#: tpl/dash/dashboard.tpl.php:276
    39293962msgid "Refresh page score"
    39303963msgstr ""
    39313964
    3932 #: tpl/dash/dashboard.tpl.php:332 tpl/img_optm/entry.tpl.php:6
     3965#: tpl/dash/dashboard.tpl.php:337 tpl/img_optm/entry.tpl.php:6
    39333966msgid "Image Optimization Summary"
    39343967msgstr ""
    39353968
    3936 #: tpl/dash/dashboard.tpl.php:333 tpl/dash/dashboard.tpl.php:413
    3937 #: tpl/dash/dashboard.tpl.php:441 tpl/dash/dashboard.tpl.php:473
    3938 #: tpl/dash/dashboard.tpl.php:505 tpl/dash/dashboard.tpl.php:537
    3939 #: tpl/dash/dashboard.tpl.php:569
    3940 msgid "More"
    3941 msgstr ""
    3942 
    3943 #: tpl/dash/dashboard.tpl.php:344 tpl/img_optm/summary.tpl.php:64
    3944 msgid "Send Optimization Request"
    3945 msgstr ""
    3946 
    3947 #: tpl/dash/dashboard.tpl.php:350 tpl/img_optm/summary.tpl.php:269
    3948 msgid "Total Reduction"
    3949 msgstr ""
    3950 
    3951 #: tpl/dash/dashboard.tpl.php:353 tpl/img_optm/summary.tpl.php:272
    3952 msgid "Images Pulled"
    3953 msgstr ""
    3954 
    3955 #: tpl/dash/dashboard.tpl.php:381 tpl/img_optm/summary.tpl.php:275
    3956 msgid "Last Request"
    3957 msgstr ""
    3958 
    3959 #: tpl/dash/dashboard.tpl.php:384
    3960 msgid "Last Pull"
    3961 msgstr ""
    3962 
    3963 #: tpl/dash/dashboard.tpl.php:412
    3964 msgid "Cache Status"
    3965 msgstr ""
    3966 
    3967 #: tpl/dash/dashboard.tpl.php:418
    3968 msgid "Public Cache"
    3969 msgstr ""
    3970 
    3971 #: tpl/dash/dashboard.tpl.php:419
    3972 msgid "Private Cache"
    3973 msgstr ""
    3974 
    3975 #: tpl/dash/dashboard.tpl.php:440 tpl/toolbox/purge.tpl.php:70
    3976 msgid "Critical CSS"
    3977 msgstr ""
    3978 
     3969#: tpl/dash/dashboard.tpl.php:338 tpl/dash/dashboard.tpl.php:418
    39793970#: tpl/dash/dashboard.tpl.php:446 tpl/dash/dashboard.tpl.php:478
    39803971#: tpl/dash/dashboard.tpl.php:510 tpl/dash/dashboard.tpl.php:542
     3972#: tpl/dash/dashboard.tpl.php:574
     3973msgid "More"
     3974msgstr ""
     3975
     3976#: tpl/dash/dashboard.tpl.php:349 tpl/img_optm/summary.tpl.php:64
     3977msgid "Send Optimization Request"
     3978msgstr ""
     3979
     3980#: tpl/dash/dashboard.tpl.php:355 tpl/img_optm/summary.tpl.php:269
     3981msgid "Total Reduction"
     3982msgstr ""
     3983
     3984#: tpl/dash/dashboard.tpl.php:358 tpl/img_optm/summary.tpl.php:272
     3985msgid "Images Pulled"
     3986msgstr ""
     3987
     3988#: tpl/dash/dashboard.tpl.php:386 tpl/img_optm/summary.tpl.php:275
     3989msgid "Last Request"
     3990msgstr ""
     3991
     3992#: tpl/dash/dashboard.tpl.php:389
     3993msgid "Last Pull"
     3994msgstr ""
     3995
     3996#: tpl/dash/dashboard.tpl.php:417
     3997msgid "Cache Status"
     3998msgstr ""
     3999
     4000#: tpl/dash/dashboard.tpl.php:423
     4001msgid "Public Cache"
     4002msgstr ""
     4003
     4004#: tpl/dash/dashboard.tpl.php:424
     4005msgid "Private Cache"
     4006msgstr ""
     4007
     4008#: tpl/dash/dashboard.tpl.php:445 tpl/toolbox/purge.tpl.php:70
     4009msgid "Critical CSS"
     4010msgstr ""
     4011
     4012#: tpl/dash/dashboard.tpl.php:451 tpl/dash/dashboard.tpl.php:483
     4013#: tpl/dash/dashboard.tpl.php:515 tpl/dash/dashboard.tpl.php:547
    39814014#: tpl/page_optm/settings_css.tpl.php:92 tpl/page_optm/settings_css.tpl.php:209
    39824015#: tpl/page_optm/settings_media.tpl.php:176
     
    39854018msgstr ""
    39864019
    3987 #: tpl/dash/dashboard.tpl.php:449 tpl/dash/dashboard.tpl.php:481
    3988 #: tpl/dash/dashboard.tpl.php:513 tpl/dash/dashboard.tpl.php:545
    3989 msgid "Time to execute previous request"
    3990 msgstr ""
    3991 
    39924020#: tpl/dash/dashboard.tpl.php:454 tpl/dash/dashboard.tpl.php:486
    39934021#: tpl/dash/dashboard.tpl.php:518 tpl/dash/dashboard.tpl.php:550
     4022msgid "Time to execute previous request"
     4023msgstr ""
     4024
     4025#: tpl/dash/dashboard.tpl.php:459 tpl/dash/dashboard.tpl.php:491
     4026#: tpl/dash/dashboard.tpl.php:523 tpl/dash/dashboard.tpl.php:555
    39944027msgid "Requests in queue"
    39954028msgstr ""
    39964029
    3997 #: tpl/dash/dashboard.tpl.php:456 tpl/dash/dashboard.tpl.php:488
    3998 #: tpl/dash/dashboard.tpl.php:520 tpl/dash/dashboard.tpl.php:552
     4030#: tpl/dash/dashboard.tpl.php:461 tpl/dash/dashboard.tpl.php:493
     4031#: tpl/dash/dashboard.tpl.php:525 tpl/dash/dashboard.tpl.php:557
    39994032msgid "Force cron"
    40004033msgstr ""
    40014034
    4002 #: tpl/dash/dashboard.tpl.php:472 tpl/toolbox/purge.tpl.php:79
     4035#: tpl/dash/dashboard.tpl.php:477 tpl/toolbox/purge.tpl.php:79
    40034036msgid "Unique CSS"
    40044037msgstr ""
    40054038
    4006 #: tpl/dash/dashboard.tpl.php:536
     4039#: tpl/dash/dashboard.tpl.php:541
    40074040msgid "Viewport Image"
    40084041msgstr ""
    40094042
    4010 #: tpl/dash/dashboard.tpl.php:573
     4043#: tpl/dash/dashboard.tpl.php:578
    40114044msgid "Crawler(s)"
    40124045msgstr ""
    40134046
    4014 #: tpl/dash/dashboard.tpl.php:576
     4047#: tpl/dash/dashboard.tpl.php:581
    40154048msgid "Currently active crawler"
    40164049msgstr ""
    40174050
    4018 #: tpl/dash/dashboard.tpl.php:602
     4051#: tpl/dash/dashboard.tpl.php:607
    40194052msgid "<b>Last crawled:</b> %d item(s)"
    40204053msgstr ""
    40214054
    4022 #: tpl/dash/dashboard.tpl.php:616
     4055#: tpl/dash/dashboard.tpl.php:621
    40234056msgid "Try QUIC.cloud CDN!"
    40244057msgstr ""
    40254058
    4026 #: tpl/dash/dashboard.tpl.php:619
     4059#: tpl/dash/dashboard.tpl.php:624
    40274060msgid "Best available WordPress performance"
    40284061msgstr ""
    40294062
    4030 #: tpl/dash/dashboard.tpl.php:622
     4063#: tpl/dash/dashboard.tpl.php:627
    40314064msgid "Globally fast TTFB, easy setup, and <a %s>more</a>!"
    40324065msgstr ""
     
    40424075#: tpl/dash/network_dash.tpl.php:19
    40434076msgid "Usage Statistics"
    4044 msgstr ""
    4045 
    4046 #: tpl/dash/network_dash.tpl.php:28
    4047 msgid "CCSS"
    40484077msgstr ""
    40494078
     
    46694698
    46704699#: tpl/img_optm/summary.tpl.php:241
    4671 msgid "Congratulations, all requested!"
     4700msgid "Congratulations, all gathered!"
    46724701msgstr ""
    46734702
     
    49955024
    49965025#: tpl/page_optm/settings_css.tpl.php:185
    4997 #: tpl/page_optm/settings_html.tpl.php:150 tpl/page_optm/settings_js.tpl.php:73
     5026#: tpl/page_optm/settings_html.tpl.php:167 tpl/page_optm/settings_js.tpl.php:73
    49985027msgid ""
    49995028"This can improve your speed score in services like Pingdom, GTmetrix and "
     
    50875116
    50885117#: tpl/page_optm/settings_html.tpl.php:98
     5118msgid ""
     5119"When minifying HTML do not discard comments that match a specified pattern."
     5120msgstr ""
     5121
     5122#: tpl/page_optm/settings_html.tpl.php:100
     5123msgid "If comment to be kept is like: %s write: %s"
     5124msgstr ""
     5125
     5126#: tpl/page_optm/settings_html.tpl.php:115
    50895127msgid "Remove query strings from internal static resources."
    50905128msgstr ""
    50915129
    5092 #: tpl/page_optm/settings_html.tpl.php:102
     5130#: tpl/page_optm/settings_html.tpl.php:119
    50935131msgid "Google reCAPTCHA will be bypassed automatically."
    50945132msgstr ""
    50955133
    5096 #: tpl/page_optm/settings_html.tpl.php:107
     5134#: tpl/page_optm/settings_html.tpl.php:124
    50975135msgid "Append query string %s to the resources to bypass this action."
    50985136msgstr ""
    50995137
    5100 #: tpl/page_optm/settings_html.tpl.php:121
     5138#: tpl/page_optm/settings_html.tpl.php:138
    51015139msgid ""
    51025140"Use Web Font Loader library to load Google Fonts asynchronously while "
     
    51045142msgstr ""
    51055143
    5106 #: tpl/page_optm/settings_html.tpl.php:122
     5144#: tpl/page_optm/settings_html.tpl.php:139
    51075145msgid ""
    51085146"This will also add a preconnect to Google Fonts to establish a connection "
     
    51105148msgstr ""
    51115149
    5112 #: tpl/page_optm/settings_html.tpl.php:136
     5150#: tpl/page_optm/settings_html.tpl.php:153
    51135151msgid "Prevent Google Fonts from loading on all pages."
    51145152msgstr ""
    51155153
    5116 #: tpl/page_optm/settings_html.tpl.php:149
     5154#: tpl/page_optm/settings_html.tpl.php:166
    51175155msgid ""
    51185156"Stop loading WordPress.org emoji. Browser default emoji will be displayed "
     
    51205158msgstr ""
    51215159
    5122 #: tpl/page_optm/settings_html.tpl.php:163
     5160#: tpl/page_optm/settings_html.tpl.php:180
    51235161msgid "This option will remove all %s tags from HTML."
    51245162msgstr ""
     
    52265264
    52275265#: tpl/page_optm/settings_localization.tpl.php:127
    5228 #: tpl/toolbox/beta_test.tpl.php:32
     5266#: tpl/toolbox/beta_test.tpl.php:26
    52295267msgid "Example"
    52305268msgstr ""
     
    57645802msgstr ""
    57655803
    5766 #: tpl/toolbox/beta_test.tpl.php:27
     5804#: tpl/toolbox/beta_test.tpl.php:21
    57675805msgid "Try GitHub Version"
    57685806msgstr ""
    57695807
    5770 #: tpl/toolbox/beta_test.tpl.php:31
     5808#: tpl/toolbox/beta_test.tpl.php:25
    57715809msgid ""
    57725810"Use this section to switch plugin versions. To beta test a GitHub commit, "
     
    57745812msgstr ""
    57755813
    5776 #: tpl/toolbox/beta_test.tpl.php:36
     5814#: tpl/toolbox/beta_test.tpl.php:30
    57775815msgid "Use latest GitHub Dev commit"
    57785816msgstr ""
    57795817
    5780 #: tpl/toolbox/beta_test.tpl.php:38
     5818#: tpl/toolbox/beta_test.tpl.php:32
    57815819msgid "Use latest GitHub Master commit"
    57825820msgstr ""
    57835821
    5784 #: tpl/toolbox/beta_test.tpl.php:40 tpl/toolbox/beta_test.tpl.php:56
     5822#: tpl/toolbox/beta_test.tpl.php:34 tpl/toolbox/beta_test.tpl.php:50
    57855823msgid "Use latest WordPress release version"
    57865824msgstr ""
    57875825
    5788 #: tpl/toolbox/beta_test.tpl.php:40
     5826#: tpl/toolbox/beta_test.tpl.php:34
    57895827msgid "OR"
    57905828msgstr ""
    57915829
    5792 #: tpl/toolbox/beta_test.tpl.php:51
     5830#: tpl/toolbox/beta_test.tpl.php:45
    57935831msgid ""
    57945832"Downgrade not recommended. May cause fatal error due to refactored code."
    57955833msgstr ""
    57965834
    5797 #: tpl/toolbox/beta_test.tpl.php:55
     5835#: tpl/toolbox/beta_test.tpl.php:49
    57985836msgid ""
    57995837"Press the %s button to use the most recent GitHub commit. Master is for "
     
    58015839msgstr ""
    58025840
    5803 #: tpl/toolbox/beta_test.tpl.php:55
     5841#: tpl/toolbox/beta_test.tpl.php:49
    58045842msgid "Use latest GitHub Dev/Master commit"
    58055843msgstr ""
    58065844
    5807 #: tpl/toolbox/beta_test.tpl.php:56
     5845#: tpl/toolbox/beta_test.tpl.php:50
    58085846msgid ""
    58095847"Press the %s button to stop beta testing and go back to the current release "
     
    58115849msgstr ""
    58125850
    5813 #: tpl/toolbox/beta_test.tpl.php:61
     5851#: tpl/toolbox/beta_test.tpl.php:55
    58145852msgid ""
    58155853"In order to avoid an upgrade error, you must be using %1$s or later before "
     
    58175855msgstr ""
    58185856
    5819 #: tpl/toolbox/edit_htaccess.tpl.php:36
     5857#: tpl/toolbox/edit_htaccess.tpl.php:38
    58205858msgid "LiteSpeed Cache View .htaccess"
    58215859msgstr ""
    58225860
    5823 #: tpl/toolbox/edit_htaccess.tpl.php:41
     5861#: tpl/toolbox/edit_htaccess.tpl.php:43
    58245862msgid ".htaccess Path"
    58255863msgstr ""
    58265864
    5827 #: tpl/toolbox/edit_htaccess.tpl.php:47
     5865#: tpl/toolbox/edit_htaccess.tpl.php:50
    58285866msgid "Frontend .htaccess Path"
    58295867msgstr ""
    58305868
    5831 #: tpl/toolbox/edit_htaccess.tpl.php:52 tpl/toolbox/edit_htaccess.tpl.php:69
     5869#: tpl/toolbox/edit_htaccess.tpl.php:55 tpl/toolbox/edit_htaccess.tpl.php:73
    58325870msgid "Default path is"
    58335871msgstr ""
    58345872
    5835 #: tpl/toolbox/edit_htaccess.tpl.php:55 tpl/toolbox/edit_htaccess.tpl.php:72
     5873#: tpl/toolbox/edit_htaccess.tpl.php:59 tpl/toolbox/edit_htaccess.tpl.php:77
    58365874msgid "PHP Constant %s is supported."
    58375875msgstr ""
    58385876
    5839 #: tpl/toolbox/edit_htaccess.tpl.php:56 tpl/toolbox/edit_htaccess.tpl.php:73
     5877#: tpl/toolbox/edit_htaccess.tpl.php:60 tpl/toolbox/edit_htaccess.tpl.php:78
    58405878msgid "You can use this code %1$s in %2$s to specify the htaccess file path."
    58415879msgstr ""
    58425880
    5843 #: tpl/toolbox/edit_htaccess.tpl.php:64
     5881#: tpl/toolbox/edit_htaccess.tpl.php:68
    58445882msgid "Backend .htaccess Path"
    58455883msgstr ""
    58465884
    5847 #: tpl/toolbox/edit_htaccess.tpl.php:82
     5885#: tpl/toolbox/edit_htaccess.tpl.php:88
    58485886msgid "Current %s Contents"
    58495887msgstr ""
  • litespeed-cache/trunk/lib/css-min/minifier.cls.php

    r2869601 r3123399  
    124124
    125125    /**
    126      * Sets the approximate column after which long lines will be splitted in the output
     126     * Sets the approximate column after which long lines will be split in the output
    127127     * with a linebreak.
    128128     * @param int $position
     
    313313
    314314        // Process quoted unquotable attribute selectors to unquote them. Covers most common cases.
    315         // Likelyhood of a quoted attribute selector being a substring in a string: Very very low.
     315        // Likelihood of a quoted attribute selector being a substring in a string: Very very low.
    316316        $css = preg_replace(
    317317            '/\[\s*([a-z][a-z-]+)\s*([\*\|\^\$~]?=)\s*[\'"](-?[a-z_][a-z0-9-_]+)[\'"]\s*\]/Ssi',
  • litespeed-cache/trunk/lib/guest.cls.php

    r2977143 r3123399  
    2424
    2525    /**
    26      * Construtor
     26     * Constructor
    2727     *
    2828     * @since 4.1
  • litespeed-cache/trunk/lib/html-min.cls.php

    r3031822 r3123399  
    2727     */
    2828    protected $_jsCleanComments = true;
     29    protected $_skipComments = array();
    2930
    3031    /**
     
    8586        if (isset($options['jsCleanComments'])) {
    8687            $this->_jsCleanComments = (bool)$options['jsCleanComments'];
     88        }
     89        if (isset($options['skipComments'])) {
     90            $this->_skipComments = $options['skipComments'];
    8791        }
    8892    }
     
    167171    }
    168172
     173    /**
     174     * From LSCWP 6.2: Changed the function to test for special comments that will be skipped. See: https://github.com/litespeedtech/lscache_wp/pull/622
     175     */
    169176    protected function _commentCB($m)
    170177    {
    171         return (0 === strpos($m[1], '[') || false !== strpos($m[1], '<!['))
    172             ? $m[0]
    173             : '';
     178        // If is IE conditional comment return it.
     179        if(0 === strpos($m[1], '[') || false !== strpos($m[1], '<![')) return $m[0];
     180
     181        // Check if comment text is present in Page Optimization -> HTML Settings -> HTML Keep comments
     182        if(count($this->_skipComments) > 0){
     183            foreach ($this->_skipComments as $comment) {
     184                if ($comment && strpos($m[1], $comment) !== false) {
     185                    return $m[0];
     186                }
     187            }
     188        }
     189
     190        // Comment can be removed.
     191        return '';
    174192    }
    175193
  • litespeed-cache/trunk/lib/object-cache.php

    r2761310 r3123399  
    11<?php
    2 defined( 'WPINC' ) || exit;
     2
     3/**
     4 * Plugin Name:       LiteSpeed Cache - Object Cache (Drop-in)
     5 * Plugin URI:        https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration
     6 * Description:       High-performance page caching and site optimization from LiteSpeed.
     7 * Version:           6.3
     8 * Author:            LiteSpeed Technologies
     9 * Author URI:        https://www.litespeedtech.com
     10 */
     11
     12defined('WPINC') || exit;
    313/**
    414 * LiteSpeed Object Cache
     
    717 */
    818
    9 ! defined( 'LSCWP_OBJECT_CACHE' ) && define( 'LSCWP_OBJECT_CACHE', true );
     19!defined('LSCWP_OBJECT_CACHE') && define('LSCWP_OBJECT_CACHE', true);
    1020
    11 // Initialize const `LSCWP_DIR` and locate LSCWP plugin foder
    12 $lscwp_dir = ( defined( 'WP_PLUGIN_DIR' ) ? WP_PLUGIN_DIR : WP_CONTENT_DIR . '/plugins' ) . '/litespeed-cache/';
     21// Initialize const `LSCWP_DIR` and locate LSCWP plugin folder
     22$lscwp_dir = (defined('WP_PLUGIN_DIR') ? WP_PLUGIN_DIR : WP_CONTENT_DIR . '/plugins') . '/litespeed-cache/';
     23
    1324// Use plugin as higher priority than MU plugin
    14 if ( ! file_exists( $lscwp_dir . 'litespeed-cache.php' ) ) {
     25if (!file_exists($lscwp_dir . 'litespeed-cache.php')) {
    1526    // Check if is mu plugin or not
    16     $lscwp_dir = ( defined( 'WPMU_PLUGIN_DIR' ) ? WPMU_PLUGIN_DIR : WP_CONTENT_DIR . '/mu-plugins' ) . '/litespeed-cache/';
    17     if ( ! file_exists( $lscwp_dir . 'litespeed-cache.php' ) ) {
     27    $lscwp_dir = (defined('WPMU_PLUGIN_DIR') ? WPMU_PLUGIN_DIR : WP_CONTENT_DIR . '/mu-plugins') . '/litespeed-cache/';
     28    if (!file_exists($lscwp_dir . 'litespeed-cache.php')) {
    1829        $lscwp_dir = '';
    1930    }
     
    2435
    2536// Can't find LSCWP location, terminate object cache process
    26 if ( ! $lscwp_dir || ! file_exists( $data_file ) || ( ! file_exists( $lib_file ) ) ) {
    27     if ( ! is_admin() ) { // Bypass object cache for frontend
     37if (!$lscwp_dir || !file_exists($data_file) || (!file_exists($lib_file))) {
     38    if (!is_admin()) { // Bypass object cache for frontend
    2839        require_once ABSPATH . WPINC . '/cache.php';
     40    } else {
     41        $err = 'Can NOT find LSCWP path for object cache initialization in ' . __FILE__;
     42        error_log($err);
     43        add_action(is_network_admin() ? 'network_admin_notices' : 'admin_notices', function () use (&$err) {
     44            echo $err;
     45        });
    2946    }
    30     else {
    31         $err = 'Can NOT find LSCWP path for object cache initialization in ' . __FILE__;
    32         error_log( $err );
    33         add_action( is_network_admin() ? 'network_admin_notices' : 'admin_notices', function() use ( &$err ) {
    34             echo $err;
    35         } );
    36     }
    37 }
    38 else {
    39     if ( ! LSCWP_OBJECT_CACHE ) { // Disable cache
     47} else {
     48    if (!LSCWP_OBJECT_CACHE) { // Disable cache
    4049        wp_using_ext_object_cache(false);
    4150    }
    4251    // Init object cache & LSCWP
    43     else if ( file_exists( $lib_file ) ) {
     52    else if (file_exists($lib_file)) {
    4453        require_once $lib_file;
    4554    }
  • litespeed-cache/trunk/litespeed-cache.php

    r3077216 r3123399  
    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:           6.2.0.1
     7 * Version:           6.3
    88 * Author:            LiteSpeed Technologies
    99 * Author URI:        https://www.litespeedtech.com
     
    3535}
    3636
    37 !defined('LSCWP_V') && define('LSCWP_V', '6.2.0.1');
     37!defined('LSCWP_V') && define('LSCWP_V', '6.3');
    3838
    3939!defined('LSCWP_CONTENT_DIR') && define('LSCWP_CONTENT_DIR', WP_CONTENT_DIR);
     
    5858 * @since  3.0
    5959 */
    60 !defined('LITESPEED_STATIC_URL') && define('LITESPEED_STATIC_URL', $WP_CONTENT_URL . '/litespeed'); // Full static cache folder URL '//example.com/wp-content/litespeed'
    61 !defined('LITESPEED_STATIC_DIR') && define('LITESPEED_STATIC_DIR', LSCWP_CONTENT_DIR . '/litespeed'); // Full static cache folder path '/var/www/html/***/wp-content/litespeed'
     60!defined('LITESPEED_DATA_FOLDER') && define('LITESPEED_DATA_FOLDER', 'litespeed');
     61!defined('LITESPEED_STATIC_URL') && define('LITESPEED_STATIC_URL', $WP_CONTENT_URL . '/' . LITESPEED_DATA_FOLDER); // Full static cache folder URL '//example.com/wp-content/litespeed'
     62!defined('LITESPEED_STATIC_DIR') && define('LITESPEED_STATIC_DIR', LSCWP_CONTENT_DIR . '/' . LITESPEED_DATA_FOLDER); // Full static cache folder path '/var/www/html/***/wp-content/litespeed'
    6263
    6364!defined('LITESPEED_TIME_OFFSET') && define('LITESPEED_TIME_OFFSET', get_option('gmt_offset') * 60 * 60);
     
    103104}
    104105
    105 // ESI const defination
     106// ESI const definition
    106107if (!defined('LSWCP_ESI_SUPPORT')) {
    107108    define('LSWCP_ESI_SUPPORT', LITESPEED_SERVER_TYPE !== 'LITESPEED_SERVER_OLS' ? true : false);
     
    123124
    124125/**
    125  * Overwride the WP nonce funcs outside of LiteSpeed namespace
     126 * Overwrite the WP nonce funcs outside of LiteSpeed namespace
    126127 * @since  3.0
    127128 */
  • litespeed-cache/trunk/readme.txt

    r3077240 r3123399  
    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.5.2
    6 Stable tag: 6.2.0.1
     5Tested up to: 6.6
     6Stable tag: 6.3
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl.html
     
    251251== Changelog ==
    252252
     253= 6.3 - Jul 22 2024 =
     254* 🌱**Page Optimize** HTML Keep Comments: When minifying HTML do not discard comments that match a specified pattern. (#328853)
     255* 🌱**Cache** Cache POST requests. Now can configure POST/GET AJAX requests to be cached. (#647300)
     256* **Cache** Bypass admin initialization when doing ajax call. (Tim)
     257* **Cache** Better control over the cache location #541 (Gal Baras/Tanvir Israq)
     258* **Cloud** Added nonce for callback validation to enhance security. (Chloe@Wordfence)
     259* **Cloud** Fixed an error message for daily quota.
     260* **Cloud** Display error message when communicating with QUIC.cloud causes a token error.
     261* **ESI** Bypass ESI at an earlier stage when getting `DONOTCACHEPAGE`.
     262* **ESI** Added ESI nonce for Events Calendar and jetMenu mobile hamburger menu. (#306983 #163710 PR#419)
     263* **ESI** Added WP Data Access nonce (PR#665)
     264* **ESI** Added WP User Frontend ESI nonce (PR#675)
     265* **Media** Ignored images from JS in image size detection (PR#660)
     266* **GUI** Moved Preset menu from network level to site level for multisite networks.
     267* **GUI** Suppressed sitemap generation message if not triggered manually.
     268* **GUI** Added CloudFlare purge to front end menu.
     269* **GUI** Allowed customized partner CDN login link on dash.
     270* **Page Optimize** Cleaned up litespeed_url table when clearing url files. (PR#664)
     271* **Page Optimize** Updated Instant Click library to version 5.2.0.
     272* **Page Optimize** Added Flatsome theme random string excludes. (PR#415)
     273* **Page Optimize** Exclude Cloudflare turnstile from JS optimizations. (Tobolo)
     274* **Page Optimize** Fixed Cloudflare Turnstile issues. (Contributolo PR#671/672)
     275* **Object** Improved debug log for object cache status. (PR#669)
     276* **Object** Added brief parseable header comments to the drop-in file. (OllieJones)
     277* **Debug** Trimmed debug log.
     278* **Misc** Improved compatibility and sped up resolving for JSON functions `json_encode/json_decode`. (hosni/szepeviktor #693)
     279* **Misc** Fixed typos in params and comments. (szepeviktor #688)
     280* **Image Optimization** Fixed an issue which suppressed new requests when there were no new images in the library but there were unprocessed images in the send queue.
     281* **Image Optimization** Improved Cloud side quota check by disallowing new requests if notified but not pulled.
     282* **Image Optimization** Keep image attributes when replacing dimensions. (PR#686 #381779)
     283
    253284= 6.2.0.1 - Apr 25 2024 =
    254285* 🔥🐞**Page Optimize** Fixed the image display issue that occurs with Elementor's `data-settings` attribute when the WebP image is not yet ready. (kanten/cbwwebmaster/reedock #132840 #680939 #326525)
     
    317348* **Image Optimize** Increased time limit for pull process.
    318349* **Image Optimize** Last pull time and cron tag now included in optimization summary.
    319 * **Image Optimize** Fixed Elementors Slideshow unusal background images. (Ryan D)
     350* **Image Optimize** Fixed Elementors Slideshow unusual background images. (Ryan D)
    320351* 🐞**Database Optimize** Fix an issue where cleaning post revisions would fail while cleaning postmeta. (Tynan #596)
    321352* **Crawler** Added status updates to CLI. (Lars)
     
    345376* **GUI** Stopped WebP tip from wrongly displaying when Guest Mode is off.
    346377* **GUI** Added QUIC.cloud promotion postbox on dashboard page.
    347 * **3rd** Added `pagespeed ninja` to blocklist due to its bad bahavior.
     378* **3rd** Added `pagespeed ninja` to blocklist due to its bad behavior.
  • litespeed-cache/trunk/src/activation.cls.php

    r3076030 r3123399  
    353353        if ($options[self::O_OBJECT]) {
    354354            $this_ids = array(
     355                self::O_DEBUG,
    355356                self::O_OBJECT_KIND,
    356357                self::O_OBJECT_HOST,
     
    370371
    371372        if ($options[self::O_GUEST]) {
    372             $this_ids = array(self::HASH, self::O_CACHE_LOGIN_COOKIE, self::O_DEBUG, self::O_DEBUG_IPS, self::O_UTIL_NO_HTTPS_VARY, self::O_GUEST_UAS, self::O_GUEST_IPS);
     373            $this_ids = array(self::HASH, self::O_CACHE_LOGIN_COOKIE, self::O_DEBUG_IPS, self::O_UTIL_NO_HTTPS_VARY, self::O_GUEST_UAS, self::O_GUEST_IPS);
    373374            $ids = array_merge($ids, $this_ids);
    374375        }
     
    378379            $data[$v] = $options[$v];
    379380        }
    380         $data = json_encode($data);
     381        $data = \json_encode($data);
    381382
    382383        $old_data = File::read(self::$_data_file);
  • litespeed-cache/trunk/src/admin-display.cls.php

    r3076030 r3123399  
    122122            $this->_add_submenu(__('Dashboard', 'litespeed-cache'), 'litespeed', 'show_menu_dash');
    123123
    124             $this->_add_submenu(__('Presets', 'litespeed-cache'), 'litespeed-presets', 'show_menu_presets');
     124            !$this->_is_network_admin && $this->_add_submenu(__('Presets', 'litespeed-cache'), 'litespeed-presets', 'show_menu_presets');
    125125
    126126            $this->_add_submenu(__('General', 'litespeed-cache'), 'litespeed-general', 'show_menu_general');
     
    205205            if ($_GET['page'] == 'litespeed-crawler' || $_GET['page'] == 'litespeed-cdn') {
    206206                // Babel JS type correction
    207                 add_filter('script_loader_tag', array($this, 'bable_type'), 10, 3);
     207                add_filter('script_loader_tag', array($this, 'babel_type'), 10, 3);
    208208
    209209                wp_enqueue_script(Core::PLUGIN_NAME . '-lib-react', LSWCP_PLUGIN_URL . 'assets/js/react.min.js', array(), Core::VER, false);
     
    273273     * @since  3.6
    274274     */
    275     public function bable_type($tag, $handle, $src)
     275    public function babel_type($tag, $handle, $src)
    276276    {
    277277        if ($handle != Core::PLUGIN_NAME . '-crawler' && $handle != Core::PLUGIN_NAME . '-cdn') {
     
    412412            if (is_numeric($k)) {
    413413                $k = md5($str);
    414             } // Use key to make it overwriteable to previous same msg
     414            } // Use key to make it overwritable to previous same msg
    415415            $filtered_msgs[$k] = $str;
    416416        }
  • litespeed-cache/trunk/src/admin-settings.cls.php

    r3009052 r3123399  
    354354        if (!strpos($_SERVER['HTTP_REFERER'], '/wp-admin/customize.php')) {
    355355            if (!$current || $esi != $current[ESI::WIDGET_O_ESIENABLE]) {
    356                 Purge::purge_all('Wdiget ESI_enable changed');
     356                Purge::purge_all('Widget ESI_enable changed');
    357357            } elseif ($ttl != 0 && $ttl != $current[ESI::WIDGET_O_TTL]) {
    358358                Purge::add(Tag::TYPE_WIDGET . $widget->id);
    359359            }
    360360
    361             Purge::purge_all('Wdiget saved');
     361            Purge::purge_all('Widget saved');
    362362        }
    363363        return $instance;
  • litespeed-cache/trunk/src/api.cls.php

    r3009052 r3123399  
    4949     * Define hooks to be used in other plugins.
    5050     *
    51      * The benefit to use hooks other than functions is no need to detech if LSCWP enabled and function existed or not anymore
     51     * The benefit to use hooks other than functions is no need to detach if LSCWP enabled and function existed or not anymore
    5252     *
    5353     * @since  3.0
     
    144144         * Cloud
    145145         */
    146         add_filter('litespeed_is_from_cloud', array($this, 'is_from_cloud')); // Check if current request is from QC (usally its to check REST access) // @see https://wordpress.org/support/topic/image-optimization-not-working-3/
     146        add_filter('litespeed_is_from_cloud', array($this, 'is_from_cloud')); // Check if current request is from QC (usually its to check REST access) // @see https://wordpress.org/support/topic/image-optimization-not-working-3/
    147147
    148148        /**
  • litespeed-cache/trunk/src/avatar.cls.php

    r3009052 r3123399  
    5959    }
    6060    /**
    61      * Get gravatar URL from DB and regenarate
     61     * Get gravatar URL from DB and regenerate
    6262     *
    6363     * @since  3.0
  • litespeed-cache/trunk/src/base.cls.php

    r3076030 r3123399  
    6464    const O_CACHE_TTL_STATUS = 'cache-ttl_status';
    6565    const O_CACHE_TTL_BROWSER = 'cache-ttl_browser';
     66    const O_CACHE_AJAX_TTL = 'cache-ajax_ttl';
    6667    const O_CACHE_LOGIN_COOKIE = 'cache-login_cookie';
    6768    const O_CACHE_VARY_COOKIES = 'cache-vary_cookies';
     
    111112    const O_DEBUG_FILESIZE = 'debug-filesize';
    112113    const O_DEBUG_COOKIE = 'debug-cookie';
    113     const O_DEBUG_COLLAPS_QS = 'debug-collaps_qs';
     114    const O_DEBUG_COLLAPSE_QS = 'debug-collapse_qs';
     115    const O_DEBUG_COLLAPS_QS = 'debug-collapse_qs'; // For backwards compatibility, will drop after v6.5
    114116    const O_DEBUG_INC = 'debug-inc';
    115117    const O_DEBUG_EXC = 'debug-exc';
     
    141143    const O_OPTM_HTML_MIN = 'optm-html_min';
    142144    const O_OPTM_HTML_LAZY = 'optm-html_lazy';
     145    const O_OPTM_HTML_SKIP_COMMENTS = 'optm-html_skip_comment';
    143146    const O_OPTM_QS_RM = 'optm-qs_rm';
    144147    const O_OPTM_GGFONTS_RM = 'optm-ggfonts_rm';
     
    366369        self::O_CACHE_TTL_STATUS => array(),
    367370        self::O_CACHE_LOGIN_COOKIE => '',
     371        self::O_CACHE_AJAX_TTL => array(),
    368372        self::O_CACHE_VARY_COOKIES => array(),
    369373        self::O_CACHE_VARY_GROUP => array(),
     
    404408        self::O_DEBUG_FILESIZE => 0,
    405409        self::O_DEBUG_COOKIE => false,
    406         self::O_DEBUG_COLLAPS_QS => false,
     410        self::O_DEBUG_COLLAPSE_QS => false,
    407411        self::O_DEBUG_INC => array(),
    408412        self::O_DEBUG_EXC => array(),
     
    430434        self::O_OPTM_HTML_MIN => false,
    431435        self::O_OPTM_HTML_LAZY => array(),
     436        self::O_OPTM_HTML_SKIP_COMMENTS => array(),
    432437        self::O_OPTM_QS_RM => false,
    433438        self::O_OPTM_GGFONTS_RM => false,
     
    590595        self::O_DEBUG_FILESIZE => 0,
    591596        self::O_DEBUG_COOKIE => false,
    592         self::O_DEBUG_COLLAPS_QS => false,
     597        self::O_DEBUG_COLLAPSE_QS => false,
    593598        self::O_DEBUG_INC => array(),
    594599        self::O_DEBUG_EXC => array(),
     
    794799
    795800    /**
    796      * Append a new multi swith max limit for the bool option
     801     * Append a new multi switch max limit for the bool option
    797802     *
    798803     * @since  3.0
  • litespeed-cache/trunk/src/cdn-setup.cls.php

    r3076030 r3123399  
    4343    public function maybe_extract_token()
    4444    {
    45         $params = $this->cls('Cloud')->parse_qc_redir(array('token'));
    46 
    47         if (isset($params['token'])) {
    48             $this->_setup_token = esc_html($params['token']);
     45        $token = $this->cls('Cloud')->parse_qc_redir(true);
     46
     47        if ($token) {
     48            $this->_setup_token = esc_html($token);
    4949            $this->cls('Conf')->update_confs(array(self::O_QC_TOKEN => $this->_setup_token));
    5050            unset($_GET['token']);
     
    7777            $msg = wp_kses_post($_POST['result']['_msg']);
    7878            self::save_summary(array('cdn_setup_err' => $msg));
    79             Admin_Display::error(__('There was an error during CDN setup: ', 'litespeed-cache') . $msg);
     79            Admin_Display::error(__('There was an error during QUIC.cloud CDN auto setup: ', 'litespeed-cache') . $msg);
    8080        } else {
    8181            $this->_process_cdn_status($_POST['result']);
     
    255255            'site_url' => home_url(),
    256256            'ref' => get_admin_url(null, 'admin.php?page=litespeed-cdn'),
     257            'nonce' => wp_create_nonce('litespeed_qc_link'),
    257258        );
    258259        $api_key = $this->conf(self::O_API_KEY);
     
    260261            $data['domain_hash'] = md5(substr($api_key, 0, 8));
    261262        }
    262 
     263        self::debug2('qc link created', $data);
    263264        wp_redirect(Cloud::CLOUD_SERVER_DASH . '/u/wptoken?data=' . Utility::arr2str($data));
    264265        exit();
  • litespeed-cache/trunk/src/cdn.cls.php

    r3076030 r3123399  
    303303        /**
    304304         * Excludes `\` from URL matching
    305          * @see  #959152 - Wordpress LSCache CDN Mapping causing malformed URLS
     305         * @see  #959152 - WordPress LSCache CDN Mapping causing malformed URLS
    306306         * @see  #685485
    307307         * @since 3.0
     
    496496
    497497    /**
    498      * Check if is orignal URL of CDN or not
     498     * Check if is original URL of CDN or not
    499499     *
    500500     * @since  2.1
  • litespeed-cache/trunk/src/cdn/cloudflare.cls.php

    r3009052 r3123399  
    243243        if ($data) {
    244244            if (is_array($data)) {
    245                 $data = json_encode($data);
     245                $data = \json_encode($data);
    246246            }
    247247            $wp_args['body'] = $data;
     
    259259        $result = wp_remote_retrieve_body($resp);
    260260
    261         $json = json_decode($result, true);
     261        $json = \json_decode($result, true);
    262262
    263263        if ($json && $json['success'] && $json['result']) {
  • litespeed-cache/trunk/src/cdn/quic.cls.php

    r3009052 r3123399  
    7777        $options['_tp_cookies'] = apply_filters('litespeed_vary_cookies', array());
    7878
    79         $conf_md5 = md5(json_encode($options));
     79        $conf_md5 = md5(\json_encode($options));
    8080        if (!empty($this->_summary['conf_md5']) && $conf_md5 == $this->_summary['conf_md5']) {
    8181            if (!$force) {
  • litespeed-cache/trunk/src/cloud.cls.php

    r3076030 r3123399  
    4848    const API_REPORT = 'wp/report';
    4949    const API_NEWS = 'news';
    50     const API_VER = 'ver';
     50    const API_VER = 'ver_check';
    5151    const API_BETA_TEST = 'beta_test';
    5252
     
    168168        );
    169169        if (defined('LITESPEED_ERR')) {
    170             $req_data['err'] = base64_encode(!is_string(LITESPEED_ERR) ? json_encode(LITESPEED_ERR) : LITESPEED_ERR);
    171         }
    172         $data = self::get(self::API_VER, $req_data);
     170            $req_data['err'] = base64_encode(!is_string(LITESPEED_ERR) ? \json_encode(LITESPEED_ERR) : LITESPEED_ERR);
     171        }
     172        $data = self::post(self::API_VER, $req_data);
    173173
    174174        return $data;
     
    326326        }
    327327
    328         self::debug('sync_usage ' . json_encode($usage));
     328        self::debug('sync_usage ' . \json_encode($usage));
    329329
    330330        foreach (self::$SERVICES as $v) {
     
    399399
    400400            if ($json) {
    401                 $msg = __('Cloud Error', 'litespeed-cache') . ": [Service] $service [Info] " . json_encode($json);
     401                $msg = __('Cloud Error', 'litespeed-cache') . ": [Service] $service [Info] " . \json_encode($json);
    402402                Admin_Display::error($msg);
    403403            }
     
    461461                }
    462462
    463                 $curr_load = json_decode($response['body'], true);
     463                $curr_load = \json_decode($response['body'], true);
    464464                if (!empty($curr_load['_res']) && $curr_load['_res'] == 'ok' && isset($curr_load['load'])) {
    465465                    $valid_cloud_loads[$v] = $curr_load['load'];
     
    730730        }
    731731
    732         $json = json_decode($response['body'], true);
     732        $json = \json_decode($response['body'], true);
    733733
    734734        if (!is_array($json)) {
     
    10381038            ),
    10391039        );
     1040        self::debug('Req rest api to QC [api] ' . $api);
    10401041        if (!empty($body)) {
    1041             $req_args['body'] = json_encode($body);
     1042            $req_args['body'] = \json_encode($body);
    10421043
    10431044            $response = wp_remote_post(self::CLOUD_SERVER . '/v2' . $api, $req_args);
     
    10571058            return $error_message;
    10581059        } elseif (wp_remote_retrieve_response_code($response) == '401') {
     1060            Admin_Display::error(__('Unauthorized access to REST API. Your token has expired.', 'litespeed-cache'));
    10591061            return 'unauthorized access to REST API.';
    10601062        }
    10611063
    1062         $json = json_decode($response['body'], true);
     1064        $json = \json_decode($response['body'], true);
     1065        self::debug('QC response', $json);
    10631066
    10641067        if (!$json['success']) {
     
    12231226        }
    12241227
    1225         $json = json_decode($response['body'], true);
     1228        $json = \json_decode($response['body'], true);
    12261229
    12271230        // Save token option
     
    13981401     * @since  5.0 renamed update_is_linked_status -> parse_qc_redir, add param for additional args. Return args if exist.
    13991402     */
    1400     public function parse_qc_redir($extra = array())
    1401     {
    1402         $extraRet = array();
    1403         $qsDrop = array();
     1403    public function parse_qc_redir($check_token = false)
     1404    {
    14041405        if (!$this->_api_key() && !empty($this->_summary['is_linked'])) {
    14051406            $this->_summary['is_linked'] = 0;
     
    14081409
    14091410        if (empty($_GET['qc_res'])) {
    1410             return $extraRet;
     1411            return false;
    14111412        }
    14121413
     
    14191420        }
    14201421
     1422        $qsDrop = array();
    14211423        $qsDrop[] = ".replace( '&qc_res=" . sanitize_key($_GET['qc_res']) . ', \'\' )';
    14221424
    14231425        if (!empty($_GET['domain_hash'])) {
     1426            if (empty($_GET['domain_hash_nonce'])) {
     1427                Admin_Display::error(__('Domain Key hash nonce missing.', 'litespeed-cache'), true);
     1428                return false;
     1429            }
     1430            $salt = substr($this->_api_key(), 3, 8);
     1431            $tick = ceil(time() / 43200);
     1432            $nonce = md5($salt . $tick);
     1433            $nonce2 = md5($salt . ($tick - 1));
     1434            if ($_GET['domain_hash_nonce'] != $nonce && $_GET['domain_hash_nonce'] != $nonce2) {
     1435                Admin_Display::error(__('Domain Key hash nonce mismatch. Please correct your server clock.', 'litespeed-cache'), true);
     1436                return false;
     1437            }
     1438
    14241439            if (md5(substr($this->_api_key(), 2, 8)) !== $_GET['domain_hash']) {
    14251440                Admin_Display::error(__('Domain Key hash mismatch', 'litespeed-cache'), true);
    1426                 return $extraRet;
     1441                return false;
    14271442            }
    14281443
     
    14311446        }
    14321447
    1433         if (!empty($extra)) {
    1434             foreach ($extra as $key) {
    1435                 if (!empty($_GET[$key])) {
    1436                     $extraRet[$key] = $_GET[$key];
    1437                     $qsDrop[] = ".replace( '&$key=" . urlencode($_GET[$key]) . ', \'\' )';
    1438                 }
    1439             }
     1448        $token = '';
     1449        if ($check_token && !empty($_GET['token'])) {
     1450            // Validate nonce `litespeed_qc_link`
     1451            if (empty($_GET['nonce']) || !wp_verify_nonce($_GET['nonce'], 'litespeed_qc_link')) {
     1452                Admin_Display::error(__('Failed to verify domain nonce.', 'litespeed-cache'), true);
     1453                return false;
     1454            }
     1455
     1456            $token = preg_replace('/[^0-9a-zA-Z]/', '', $_GET['token']);
     1457            $qsDrop[] = ".replace( '&token=" . urlencode($_GET['token']) . ', \'\' )';
    14401458        }
    14411459
     
    14441462        // Drop QS
    14451463        echo "<script>window.history.pushState( 'remove_gen_link', document.title, window.location.href" . $replaceStr . ' );</script>';
    1446         return $extraRet;
     1464        return $token;
    14471465    }
    14481466
     
    15021520        }
    15031521
    1504         $json = json_decode($response['body'], true);
     1522        $json = \json_decode($response['body'], true);
    15051523
    15061524        self::debug('Load ips', $json);
  • litespeed-cache/trunk/src/conf.cls.php

    r3009052 r3123399  
    324324         */
    325325        if ($ver && $ver != Core::VER) {
    326             // Site plugin versin will change inside
     326            // Site plugin version will change inside
    327327            Data::cls()->conf_site_upgrade($ver);
    328328        }
     
    513513
    514514        // Update related tables
    515         $this->cls('Data')->correct_tb_existance();
     515        $this->cls('Data')->correct_tb_existence();
    516516
    517517        // Update related files
  • litespeed-cache/trunk/src/control.cls.php

    r3076030 r3123399  
    135135        }
    136136
     137        // AJAX cache
     138        $ajax_cache = $this->conf(Base::O_CACHE_AJAX_TTL);
     139        foreach ($ajax_cache as $v) {
     140            $v = explode(' ', $v);
     141            if (empty($v[0]) || empty($v[1])) {
     142                continue;
     143            }
     144            // self::debug("Initializing cacheable status for wp_ajax_nopriv_" . $v[0]);
     145            add_action(
     146                'wp_ajax_nopriv_' . $v[0],
     147                function () use ($v) {
     148                    self::set_custom_ttl($v[1]);
     149                    self::force_cacheable('ajax Cache setting for action ' . $v[0]);
     150                },
     151                4
     152            );
     153        }
     154
    137155        // Check error page
    138156        add_filter('status_header', array($this, 'check_error_codes'), 10, 2);
     
    146164     * @param $status_header
    147165     * @param $code
    148      * @return $eror_status
     166     * @return $error_status
    149167     */
    150168    public function check_error_codes($status_header, $code)
  • litespeed-cache/trunk/src/core.cls.php

    r3076030 r3123399  
    193193        }
    194194
    195         if (is_admin()) {
     195        if (is_admin() && !(defined('DOING_AJAX') && DOING_AJAX)) {
    196196            $this->cls('Admin');
    197197        }
     
    290290            $this->cls('Localization')->init();
    291291
    292             // Hook cdn for attachements
     292            // Hook cdn for attachments
    293293            $this->cls('CDN')->init();
    294294
     
    394394
    395395    /**
    396      * Tigger coment info display hook
     396     * Trigger comment info display hook
    397397     *
    398398     * @since 1.3
     
    453453     * For compatibility with those plugins have 'Bad' logic that forced all buffer output even it is NOT their buffer :(
    454454     *
    455      * Usually this is called after send_headers() if following orignal WP process
     455     * Usually this is called after send_headers() if following original WP process
    456456     *
    457457     * @since 1.1.5
     
    529529
    530530        if (apply_filters('litespeed_is_json', false)) {
    531             if (json_decode($buffer, true) == null) {
     531            if (\json_decode($buffer, true) == null) {
    532532                Debug2::debug('[Core] Buffer converting to JSON');
    533                 $buffer = json_encode($buffer);
     533                $buffer = \json_encode($buffer);
    534534                $buffer = trim($buffer, '"');
    535535            } else {
  • litespeed-cache/trunk/src/crawler-map.cls.php

    r3076030 r3123399  
    366366     * @access public
    367367     */
    368     public function gen()
     368    public function gen($manual = false)
    369369    {
    370370        $count = $this->_gen();
     
    375375        }
    376376
    377         if (!defined('DOING_CRON')) {
     377        if (!defined('DOING_CRON') && $manual) {
    378378            $msg = sprintf(__('Sitemap created successfully: %d items', 'litespeed-cache'), $count);
    379379            Admin_Display::succeed($msg);
  • litespeed-cache/trunk/src/crawler.cls.php

    r3031822 r3123399  
    145145
    146146    /**
    147      * Overwride get_summary to init elements
     147     * Overwrite get_summary to init elements
    148148     *
    149149     * @since  3.0
     
    189189
    190190    /**
    191      * Overwride save_summary
     191     * Overwrite save_summary
    192192     *
    193193     * @since  3.0
     
    205205        parent::save_summary($data, $reload, $overwrite);
    206206
    207         File::save(LITESPEED_STATIC_DIR . '/crawler/' . $instance->_sitemeta, json_encode($data), true);
     207        File::save(LITESPEED_STATIC_DIR . '/crawler/' . $instance->_sitemeta, \json_encode($data), true);
    208208    }
    209209
     
    13031303        switch ($type) {
    13041304            case self::TYPE_REFRESH_MAP:
    1305                 $this->cls('Crawler_Map')->gen();
     1305                $this->cls('Crawler_Map')->gen(true);
    13061306                break;
    13071307
  • litespeed-cache/trunk/src/data.cls.php

    r3009052 r3123399  
    5959
    6060    /**
    61      * Correct table existance
    62      *
    63      * Call when activate -> upadte_confs()
    64      * Call when upadte_confs()
     61     * Correct table existence
     62     *
     63     * Call when activate -> update_confs()
     64     * Call when update_confs()
    6565     *
    6666     * @since  3.0
    6767     * @access public
    6868     */
    69     public function correct_tb_existance()
     69    public function correct_tb_existence()
    7070    {
    7171        // Gravatar
     
    129129        $this->cls('Conf')->load_options();
    130130
    131         $this->correct_tb_existance();
     131        $this->correct_tb_existence();
    132132
    133133        // Update related files
     
    292292            $this->cls('Conf')->load_options();
    293293
    294             $this->correct_tb_existance();
     294            $this->correct_tb_existence();
    295295
    296296            !defined('LSWCP_EMPTYCACHE') && define('LSWCP_EMPTYCACHE', true); // clear all sites caches
     
    466466        $q = 'DELETE FROM ' . $this->tb('url_file') . ' WHERE `type` = %d';
    467467        $wpdb->query($wpdb->prepare($q, $type));
     468
     469        // Added to cleanup url table. See issue: https://wordpress.org/support/topic/wp_litespeed_url-1-1-gb-in-db-huge-big/
     470        $wpdb->query(
     471            'DELETE d
     472            FROM `' .
     473                $this->tb('url') .
     474                '` AS d
     475            LEFT JOIN `' .
     476                $this->tb('url_file') .
     477                '` AS f ON d.`id` = f.`url_id`
     478            WHERE f.`url_id` IS NULL'
     479        );
    468480    }
    469481
     
    592604    {
    593605        global $wpdb;
     606        $tb_url = $this->tb('url');
    594607
    595608        Debug2::debug('[Data] Try to mark as expired: ' . $request_url);
    596         $tb_url = $this->tb('url');
    597609        $q = "SELECT * FROM `$tb_url` WHERE url=%s";
    598610        $url_row = $wpdb->get_row($wpdb->prepare($q, $request_url), ARRAY_A);
     
    603615        Debug2::debug('[Data] Mark url_id=' . $url_row['id'] . ' as expired');
    604616
    605         $tb_url = $this->tb('url');
    606617        $tb_url_file = $this->tb('url_file');
    607618
  • litespeed-cache/trunk/src/data.upgrade.func.php

    r3009052 r3123399  
    358358        'log_file_size' => 'debug-filesize',
    359359        'debug_cookie' => 'debug-cookie',
    360         'collaps_qs' => 'debug-collaps_qs',
     360        'collapse_qs' => 'debug-collapse_qs',
    361361        // 'log_filters'                => 'debug-log_filters',
    362362
     
    448448            continue;
    449449        }
    450         // The folllowing values must be array
     450        // The following values must be array
    451451        if (!is_array($previous_options[$k])) {
    452452            if (in_array($v, array('cdn-ori', 'cache-exc_cat', 'cache-exc_tag'))) {
     
    606606                    continue;
    607607                }
    608                 // The folllowing values must be array
     608                // The following values must be array
    609609                if (!is_array($previous_site_options[$k])) {
    610610                    if (in_array($v, array('cache-mobile_rules', 'cache-exc_useragents', 'cache-exc_cookies'))) {
  • litespeed-cache/trunk/src/debug2.cls.php

    r3009052 r3123399  
    247247
    248248        $qs = !empty($server['QUERY_STRING']) ? $server['QUERY_STRING'] : '';
    249         if ($this->conf(Base::O_DEBUG_COLLAPS_QS)) {
    250             if (strlen($qs) > 53) {
    251                 $qs = substr($qs, 0, 53) . '...';
    252             }
     249        if ($this->conf(Base::O_DEBUG_COLLAPSE_QS)) {
     250            $qs = $this->_omit_long_message($qs);
    253251            if ($qs) {
    254252                $param .= ' ? ' . $qs;
     
    261259
    262260        if (!empty($_SERVER['HTTP_REFERER'])) {
    263             $params[] = 'HTTP_REFERER: ' . $server['HTTP_REFERER'];
     261            $params[] = 'HTTP_REFERER: ' . $this->_omit_long_message($server['HTTP_REFERER']);
    264262        }
    265263
    266264        if (defined('LSCWP_LOG_MORE')) {
    267             $params[] = 'User Agent: ' . $server['HTTP_USER_AGENT'];
     265            $params[] = 'User Agent: ' . $this->_omit_long_message($server['HTTP_USER_AGENT']);
    268266            $params[] = 'Accept: ' . $server['HTTP_ACCEPT'];
    269267            $params[] = 'Accept Encoding: ' . $server['HTTP_ACCEPT_ENCODING'];
     
    291289
    292290        File::append($log_file, $request);
     291    }
     292
     293    /**
     294     * Trim long msg to keep log neat
     295     * @since 6.3
     296     */
     297    private function _omit_long_message($msg)
     298    {
     299        if (strlen($msg) > 53) {
     300            $msg = substr($msg, 0, 53) . '...';
     301        }
     302        return $msg;
    293303    }
    294304
  • litespeed-cache/trunk/src/error.cls.php

    r3009052 r3123399  
    7474
    7575            case 'too_many_notified':
    76                 $msg = __('You have too many notified images, please pull down notified images first.', 'litespeed-cache');
     76                $msg = __('You have images waiting to be pulled. Please wait for the automatic pull to complete, or pull them down manually now.', 'litespeed-cache');
    7777                break;
    7878
     
    160160                break;
    161161
    162             /*** QC error code ***/
    163             case 'try_later':
     162            case 'try_later': // QC error code
    164163                $msg = __('Previous request too recent. Please try again later.', 'litespeed-cache');
    165164                break;
  • litespeed-cache/trunk/src/esi.cls.php

    r3031822 r3123399  
    6363        }
    6464
     65        // If page is not cacheable
     66        if (defined('DONOTCACHEPAGE') && apply_filters('litespeed_const_DONOTCACHEPAGE', DONOTCACHEPAGE)) {
     67            return;
     68        }
     69
    6570        // Init ESI in `after_setup_theme` hook after detected if LITESPEED_DISABLE_ALL is ON or not
    6671        $this->_hooks();
     
    103108         * Shortcode ESI
    104109         *
    105          * To use it, just change the origianl shortcode as below:
     110         * To use it, just change the original shortcode as below:
    106111         *      old: [someshortcode aa='bb']
    107112         *      new: [esi someshortcode aa='bb' cache='private,no-vary' ttl='600']
     
    454459     * @param bool $silence If generate wrapper comment or not
    455460     * @param bool $preserved   If this ESI block is used in any filter, need to temporarily convert it to a string to avoid the HTML tag being removed/filtered.
    456      * @param bool $svar        If store the value in memory or not, in memory wil be faster
     461     * @param bool $svar        If store the value in memory or not, in memory will be faster
    457462     * @param array $inline_val     If show the current value for current request( this can avoid multiple esi requests in first time cache generating process )
    458463     */
     
    503508        }
    504509        if ($params) {
    505             $appended_params[self::QS_PARAMS] = base64_encode(json_encode($params));
     510            $appended_params[self::QS_PARAMS] = base64_encode(\json_encode($params));
    506511            Debug2::debug2('[ESI] param ', $params);
    507512        }
     
    609614        Debug2::debug2('[ESI] parms', $unencrypted);
    610615        // $unencoded = urldecode($unencrypted); no need to do this as $_GET is already parsed
    611         $params = json_decode($unencrypted, true);
     616        $params = \json_decode($unencrypted, true);
    612617
    613618        return $params;
     
    10071012
    10081013    /**
    1009      * Replace preseved blocks
     1014     * Replace preserved blocks
    10101015     *
    10111016     * @since  2.6
  • litespeed-cache/trunk/src/gui.cls.php

    r3076030 r3123399  
    7676
    7777    /**
    78      * Print a loading message when redirecting CCSS/UCSS page to aviod whiteboard confusion
     78     * Print a loading message when redirecting CCSS/UCSS page to avoid whiteboard confusion
    7979     */
    8080    public static function print_loading($counter, $type)
     
    210210        if (Router::is_ajax()) {
    211211            // All dismiss actions are considered as ajax call, so just exit
    212             exit(json_encode(array('success' => 1)));
     212            exit(\json_encode(array('success' => 1)));
    213213        }
    214214
     
    506506        ));
    507507
     508        if ($this->conf(self::O_CDN_CLOUDFLARE)) {
     509            $wp_admin_bar->add_menu(array(
     510                'parent' => 'litespeed-menu',
     511                'id' => 'litespeed-purge-cloudflare',
     512                'title' => __('Purge All', 'litespeed-cache') . ' - ' . __('Cloudflare', 'litespeed-cache'),
     513                'href' => Utility::build_url(Router::ACTION_CDN_CLOUDFLARE, CDN\Cloudflare::TYPE_PURGE_ALL),
     514                'meta' => array('tabindex' => '0'),
     515            ));
     516        }
     517
    508518        if (defined('LSCWP_OBJECT_CACHE')) {
    509519            $wp_admin_bar->add_menu(array(
  • litespeed-cache/trunk/src/img-optm.cls.php

    r3076030 r3123399  
    211211
    212212        // Check if has credit to push
    213         $allowance = Cloud::cls()->allowance(Cloud::SVC_IMG_OPTM);
     213        $err = false;
     214        $allowance = Cloud::cls()->allowance(Cloud::SVC_IMG_OPTM, $err);
    214215
    215216        $wet_limit = $this->wet_limit();
     
    222223        if (!$allowance) {
    223224            self::debug('❌ No credit');
    224             Admin_Display::error(Error::msg('out_of_quota'));
     225            Admin_Display::error(Error::msg($err));
    225226            $this->_finished_running();
    226227            return;
     
    243244        }
    244245
     246        $allowance -= $total_requested;
     247
     248        if ($allowance < 1) {
     249            self::debug('❌ Too many requested images ' . $total_requested);
     250            Admin_Display::error(Error::msg('too_many_requested'));
     251            $this->_finished_running();
     252            return;
     253        }
     254
    245255        // Limit maximum number of items waiting to be pulled
    246256        $q = "SELECT COUNT(1) FROM `$this->_table_img_optming` WHERE optm_status = %d";
    247257        $q = $wpdb->prepare($q, array(self::STATUS_NOTIFIED));
    248258        $total_notified = $wpdb->get_var($q);
    249         $max_notified = $allowance * 5;
    250 
    251         if ($total_notified > $max_notified) {
    252             self::debug('❌ Too many notified images (' . $total_notified . ' > ' . $max_notified . ')');
     259        if ($total_notified > 0) {
     260            self::debug('❌ Too many notified images (' . $total_notified . ')');
    253261            Admin_Display::error(Error::msg('too_many_notified'));
    254262            $this->_finished_running();
     
    259267        $q = $wpdb->prepare($q, array(self::STATUS_NEW, self::STATUS_RAW));
    260268        $total_new = $wpdb->get_var($q);
    261         $allowance -= $total_new;
    262 
    263         // Get images
     269        // $allowance -= $total_new;
     270
     271        // May need to get more images
    264272        $list = array();
    265         if ($allowance > 0) {
     273        $more = $allowance - $total_new;
     274        if ($more > 0) {
    266275            $q = "SELECT b.post_id, b.meta_value
    267276                FROM `$wpdb->posts` a
     
    275284                LIMIT %d
    276285                ";
    277             $q = $wpdb->prepare($q, array($this->_summary['next_post_id'], $allowance));
     286            $q = $wpdb->prepare($q, array($this->_summary['next_post_id'], $more));
    278287            $list = $wpdb->get_results($q);
    279         }
    280 
    281         if (!$list) {
    282             // $msg = __('No new image to send.', 'litespeed-cache');
    283             // Admin_Display::succeed($msg);
    284 
    285             // self::debug('new_req() bypass: no new image found');
    286             // $this->_finished_running();
    287             // return;
    288         }
    289 
    290         if ($list) {
    291288            foreach ($list as $v) {
    292289                if (!$v->post_id) {
     
    316313            self::save_summary();
    317314
    318             if (!$this->_img_in_queue) {
    319                 self::debug('gather_images bypass: empty _img_in_queue');
    320                 $this->_finished_running();
    321                 return;
    322             }
    323 
    324315            $num_a = count($this->_img_in_queue);
    325316            self::debug('Images found: ' . $num_a);
     
    341332
    342333        // Push to Cloud server
    343         $accepted_imgs = $this->_send_request();
     334        $accepted_imgs = $this->_send_request($allowance);
    344335
    345336        $this->_finished_running();
     
    610601     * @access private
    611602     */
    612     private function _send_request()
     603    private function _send_request($allowance)
    613604    {
    614605        global $wpdb;
    615606
    616         $_img_in_queue = $wpdb->get_results("SELECT id,src,post_id FROM `$this->_table_img_optming` WHERE optm_status=" . self::STATUS_RAW);
     607        $q = "SELECT id, src, post_id FROM `$this->_table_img_optming` WHERE optm_status=%d LIMIT %d";
     608        $q = $wpdb->prepare($q, array(self::STATUS_RAW, $allowance));
     609        $_img_in_queue = $wpdb->get_results($q);
    617610        if (!$_img_in_queue) {
    618611            return;
     
    662655        $data = array(
    663656            'action' => self::CLOUD_ACTION_NEW_REQ,
    664             'list' => json_encode($list),
     657            'list' => \json_encode($list),
    665658            'optm_ori' => $this->conf(self::O_IMG_OPTM_ORI) ? 1 : 0,
    666659            'optm_webp' => $this->conf(self::O_IMG_OPTM_WEBP) ? 1 : 0,
     
    708701        }
    709702
    710         $post_data = json_decode(file_get_contents('php://input'), true);
     703        $post_data = \json_decode(file_get_contents('php://input'), true);
    711704        if (is_null($post_data)) {
    712705            $post_data = $_POST;
     
    811804                // Update status and data in working table
    812805                $q = "UPDATE `$this->_table_img_optming` SET optm_status = %d, server_info = %s WHERE id = %d ";
    813                 $wpdb->query($wpdb->prepare($q, array($status, json_encode($server_info), $v->id)));
     806                $wpdb->query($wpdb->prepare($q, array($status, \json_encode($server_info), $v->id)));
    814807
    815808                // Update postmeta for optm summary
     
    991984                foreach ($img_rows as $row_img) {
    992985                    // request original image
    993                     $server_info = json_decode($row_img->server_info, true);
     986                    $server_info = \json_decode($row_img->server_info, true);
    994987                    if (!empty($server_info['ori'])) {
    995988                        $image_url = $server_info['server'] . '/' . $server_info['ori'];
     
    10321025                    $row_img = $row_data['data'];
    10331026                    $local_file = $this->wp_upload_dir['basedir'] . '/' . $row_img->src;
    1034                     $server_info = json_decode($row_img->server_info, true);
     1027                    $server_info = \json_decode($row_img->server_info, true);
    10351028
    10361029                    if (empty($response->success)) {
     
    13241317        global $wpdb;
    13251318
    1326         self::debug('excuting DESTROY process');
     1319        self::debug('executing DESTROY process');
    13271320
    13281321        $offset = !empty($_GET['litespeed_i']) ? $_GET['litespeed_i'] : 0;
     
    15071500        }
    15081501
    1509         self::debug('rescaned [img] ' . count($this->_img_in_queue));
     1502        self::debug('rescanned [img] ' . count($this->_img_in_queue));
    15101503
    15111504        $count = count($this->_img_in_queue);
     
    21192112                break;
    21202113
    2121             /**
    2122              * Batch switch
    2123              * @since 1.6.3
    2124              */
    21252114            case self::TYPE_BATCH_SWITCH_ORI:
    21262115            case self::TYPE_BATCH_SWITCH_OPTM:
  • litespeed-cache/trunk/src/import.cls.php

    r3009052 r3123399  
    4343        $data = array();
    4444        foreach ($raw_data as $k => $v) {
    45             $data[] = json_encode(array($k, $v));
     45            $data[] = \json_encode(array($k, $v));
    4646        }
    4747
     
    7777        if (!$file) {
    7878            if (empty($_FILES['ls_file']['name']) || substr($_FILES['ls_file']['name'], -5) != '.data' || empty($_FILES['ls_file']['tmp_name'])) {
    79                 Debug2::debug('Import: Failed to import, wront ls_file');
     79                Debug2::debug('Import: Failed to import, wrong ls_file');
    8080
    8181                $msg = __('Import failed due to file error.', 'litespeed-cache');
     
    109109                        continue;
    110110                    }
    111                     list($k, $v) = json_decode($v, true);
     111                    list($k, $v) = \json_decode($v, true);
    112112                    $ori_data[$k] = $v;
    113113                }
    114114            } else {
    115                 $ori_data = json_decode(base64_decode($data), true);
     115                $ori_data = \json_decode(base64_decode($data), true);
    116116            }
    117117        } catch (\Exception $ex) {
  • litespeed-cache/trunk/src/lang.cls.php

    r3076030 r3123399  
    101101            self::O_CACHE_TTL_STATUS => __('Default HTTP Status Code Page TTL', 'litespeed-cache'),
    102102            self::O_CACHE_TTL_BROWSER => __('Browser Cache TTL', 'litespeed-cache'),
     103            self::O_CACHE_AJAX_TTL => __('AJAX Cache TTL', 'litespeed-cache'),
    103104            self::O_AUTO_UPGRADE => __('Automatically Upgrade', 'litespeed-cache'),
    104105            self::O_GUEST => __('Guest Mode', 'litespeed-cache'),
     
    153154            self::O_OPTM_HTML_MIN => __('HTML Minify', 'litespeed-cache'),
    154155            self::O_OPTM_HTML_LAZY => __('HTML Lazy Load Selectors', 'litespeed-cache'),
     156            self::O_OPTM_HTML_SKIP_COMMENTS => __('HTML Keep Comments', 'litespeed-cache'),
    155157            self::O_OPTM_CSS_ASYNC => __('Load CSS Asynchronously', 'litespeed-cache'),
    156158            self::O_OPTM_CCSS_PER_URL => __('CCSS Per URL', 'litespeed-cache'),
     
    269271            self::O_DEBUG_FILESIZE => __('Log File Size Limit', 'litespeed-cache'),
    270272            self::O_DEBUG_COOKIE => __('Log Cookies', 'litespeed-cache'),
    271             self::O_DEBUG_COLLAPS_QS => __('Collapse Query Strings', 'litespeed-cache'),
     273            self::O_DEBUG_COLLAPSE_QS => __('Collapse Query Strings', 'litespeed-cache'),
    272274            self::O_DEBUG_INC => __('Debug URI Includes', 'litespeed-cache'),
    273275            self::O_DEBUG_EXC => __('Debug URI Excludes', 'litespeed-cache'),
  • litespeed-cache/trunk/src/localization.cls.php

    r3009052 r3123399  
    5252            $type = 'js';
    5353            $domain = $v;
    54             // Try to parse space splitted value
     54            // Try to parse space split value
    5555            if (strpos($v, ' ')) {
    5656                $v = explode(' ', $v);
     
    171171            $type = 'js';
    172172            $domain = $v;
    173             // Try to parse space splitted value
     173            // Try to parse space split value
    174174            if (strpos($v, ' ')) {
    175175                $v = explode(' ', $v);
  • litespeed-cache/trunk/src/media.cls.php

    r3077216 r3123399  
    660660        $placeholder_list = array();
    661661
    662         $content = preg_replace(array('#<!--.*-->#sU', '#<noscript([^>]*)>.*</noscript>#isU'), '', $this->content);
     662        $content = preg_replace(
     663            array(
     664                '#<!--.*-->#sU',
     665                '#<noscript([^>]*)>.*</noscript>#isU',
     666                '#<script([^>]*)>.*</script>#isU', // Added to remove warning of file not found when image size detection is turned ON.
     667            ),
     668            '',
     669            $this->content
     670        );
    663671        /**
    664672         * Exclude parent classes
     
    751759                        $attrs['width'] = $ori_width;
    752760                        $attrs['height'] = $ori_height;
    753                         $new_html = preg_replace('#\s+(width|height)=(["\'])[^\2]*\2#', '', $match[0]);
     761                        $new_html = preg_replace('#\s+(width|height)=(["\'])[^\2]*?\2#', '', $match[0]);
    754762                        $new_html = preg_replace('#<img\s+#i', '<img width="' . $attrs['width'] . '" height="' . $attrs['height'] . '" ', $new_html);
    755763                        self::debug('Add missing sizes ' . $attrs['width'] . 'x' . $attrs['height'] . ' to ' . $attrs['src']);
     
    959967            $url = trim($url, '\'"');
    960968
    961             // Fix Elementors Slideshow unusal background images like  style="background-image: url(&quot;https://xxxx.png&quot;);"
     969            // Fix Elementors Slideshow unusual background images like  style="background-image: url(&quot;https://xxxx.png&quot;);"
    962970            if (strpos($url, '&quot;') === 0 && substr($url, -6) == '&quot;') {
    963971                $url = substr($url, 6, -6);
     
    9951003            $jsonString = html_entity_decode($match[1]);
    9961004
    997             $jsonData = json_decode($jsonString, true);
     1005            $jsonData = \json_decode($jsonString, true);
    9981006
    9991007            if (json_last_error() === JSON_ERROR_NONE) {
     
    10131021                if ($did_webp_replace) {
    10141022                    // Re-encode the modified array back to a JSON string
    1015                     $newJsonString = json_encode($jsonData);
     1023                    $newJsonString = \json_encode($jsonData);
    10161024
    10171025                    // Re-encode the JSON string to HTML entities only if it was originally encoded
  • litespeed-cache/trunk/src/metabox.cls.php

    r3009052 r3123399  
    4848
    4949    /**
    50      * Regsiter meta box
     50     * Register meta box
    5151     * @since 4.7
    5252     */
  • litespeed-cache/trunk/src/object-cache.cls.php

    r3076030 r3123399  
    1515class Object_Cache extends Root
    1616{
     17    const O_DEBUG = 'debug';
    1718    const O_OBJECT = 'object';
    1819    const O_OBJECT_KIND = 'object-kind';
     
    3031
    3132    private $_conn;
     33    private $_cfg_debug;
    3234    private $_cfg_enabled;
    3335    private $_cfg_method;
     
    5759    public function __construct($cfg = false)
    5860    {
    59         defined('LSCWP_LOG') && Debug2::debug2('[Object] init');
     61        $this->debug_oc('-------------');
     62        $this->debug_oc('init');
    6063
    6164        if ($cfg) {
     
    6669                $cfg[Base::O_OBJECT_NON_PERSISTENT_GROUPS] = explode("\n", $cfg[Base::O_OBJECT_NON_PERSISTENT_GROUPS]);
    6770            }
     71            $this->_cfg_debug = $cfg[Base::O_DEBUG] ? $cfg[Base::O_DEBUG] : false;
    6872            $this->_cfg_method = $cfg[Base::O_OBJECT_KIND] ? true : false;
    6973            $this->_cfg_host = $cfg[Base::O_OBJECT_HOST];
     
    8488            $this->_cfg_enabled = $cfg[Base::O_OBJECT] && class_exists($this->_oc_driver) && $this->_cfg_host;
    8589
    86             defined('LSCWP_LOG') && Debug2::debug('[Object] init with cfg result : ', $this->_cfg_enabled);
     90            $this->debug_oc('init with cfg result : ', $this->_cfg_enabled);
    8791        }
    8892        // If OC is OFF, will hit here to init OC after conf initialized
    8993        elseif (defined('LITESPEED_CONF_LOADED')) {
     94            $this->_cfg_debug = $this->conf(Base::O_DEBUG) ? $this->conf(Base::O_DEBUG) : false;
    9095            $this->_cfg_method = $this->conf(Base::O_OBJECT_KIND) ? true : false;
    9196            $this->_cfg_host = $this->conf(Base::O_OBJECT_HOST);
     
    108113            // Get cfg from _data_file
    109114            // Use self::const to avoid loading more classes
    110             $cfg = json_decode(file_get_contents(WP_CONTENT_DIR . '/' . self::CONF_FILE), true);
     115            $cfg = \json_decode(file_get_contents(WP_CONTENT_DIR . '/' . self::CONF_FILE), true);
    111116            if (!empty($cfg[self::O_OBJECT_HOST])) {
     117                $this->_cfg_debug = !empty($cfg[Base::O_DEBUG]) ? $cfg[Base::O_DEBUG] : false;
    112118                $this->_cfg_method = !empty($cfg[self::O_OBJECT_KIND]) ? $cfg[self::O_OBJECT_KIND] : false;
    113119                $this->_cfg_host = $cfg[self::O_OBJECT_HOST];
     
    136142
    137143    /**
     144     * Add debug.
     145     *
     146     * @since  6.3
     147     * @access private
     148     */
     149    private function debug_oc($text, $show_error = false)
     150    {
     151        if (defined('LSCWP_LOG')) {
     152            Debug2::debug($text);
     153
     154            return;
     155        }
     156
     157        if (!$show_error && !$this->_cfg_debug) {
     158            return;
     159        }
     160
     161        error_log(gmdate('m/d/y H:i:s') . ' - ' . $text . PHP_EOL, 3, WP_CONTENT_DIR . '/debug.log');
     162    }
     163
     164    /**
    138165     * Get `Store Transients` setting value
    139166     *
     
    173200        // Update cls file
    174201        if (!file_exists($_oc_wp_file) || md5_file($_oc_wp_file) !== md5_file($_oc_ori_file)) {
    175             defined('LSCWP_LOG') && Debug2::debug('[Object] copying object-cache.php file to ' . $_oc_wp_file);
     202            $this->debug_oc('copying object-cache.php file to ' . $_oc_wp_file);
    176203            copy($_oc_ori_file, $_oc_wp_file);
    177204
     
    200227
    201228        if (file_exists($_oc_wp_file) && md5_file($_oc_wp_file) === md5_file($_oc_ori_file)) {
    202             defined('LSCWP_LOG') && Debug2::debug('[Object] removing ' . $_oc_wp_file);
     229            $this->debug_oc('removing ' . $_oc_wp_file);
    203230            unlink($_oc_wp_file);
    204231        }
     
    224251    private function _reconnect($cfg)
    225252    {
    226         defined('LSCWP_LOG') && Debug2::debug('[Object] Reconnecting');
    227         // error_log( 'Object: reconnect !' );
     253        $this->debug_oc('Reconnecting');
    228254        if (isset($this->_conn)) {
    229             // error_log( 'Object: Quiting existing connection!' );
    230             defined('LSCWP_LOG') && Debug2::debug('[Object] Quiting existing connection');
     255            // error_log( 'Object: Quitting existing connection!' );
     256            $this->debug_oc('Quitting existing connection');
    231257            $this->flush();
    232258            $this->_conn = null;
     
    262288        }
    263289
    264         defined('LSCWP_LOG') && Debug2::debug('[Object] connecting to ' . $this->_cfg_host . ':' . $this->_cfg_port);
     290        $this->debug_oc('Init ' . $this->_oc_driver . ' connection');
     291        $this->debug_oc('connecting to ' . $this->_cfg_host . ':' . $this->_cfg_port);
    265292
    266293        $failed = false;
     
    272299         */
    273300        if ($this->_oc_driver == 'Redis') {
    274             defined('LSCWP_LOG') && Debug2::debug('[Object] Init ' . $this->_oc_driver . ' connection');
    275 
    276301            set_error_handler('litespeed_exception_handler');
    277302            try {
     
    311336                }
    312337            } catch (\Exception $e) {
    313                 error_log($e->getMessage());
     338                $this->debug_oc('Redis connect exception: ' . $e->getMessage(), true);
    314339                $failed = true;
    315340            } catch (\ErrorException $e) {
    316                 error_log($e->getMessage());
     341                $this->debug_oc('Redis connect error: ' . $e->getMessage(), true);
    317342                $failed = true;
    318343            }
     
    321346         * Connect to Memcached
    322347         */ else {
    323             defined('LSCWP_LOG') && Debug2::debug('[Object] Init ' . $this->_oc_driver . ' connection');
    324348            if ($this->_cfg_persistent) {
    325349                $this->_conn = new \Memcached($this->_get_mem_id());
     
    328352                if ($this->_validate_mem_server()) {
    329353                    // error_log( 'Object: _validate_mem_server' );
    330                     defined('LSCWP_LOG') && Debug2::debug('[Object] Got persistent ' . $this->_oc_driver . ' connection');
     354                    $this->debug_oc('Got persistent ' . $this->_oc_driver . ' connection');
    331355                    return true;
    332356                }
    333357
    334                 defined('LSCWP_LOG') && Debug2::debug('[Object] No persistent ' . $this->_oc_driver . ' server list!');
     358                $this->debug_oc('No persistent ' . $this->_oc_driver . ' server list!');
    335359            } else {
    336360                // error_log( 'Object: new memcached!' );
     
    359383        // If failed to connect
    360384        if ($failed) {
    361             defined('LSCWP_LOG') && Debug2::debug('[Object] Failed to connect ' . $this->_oc_driver . ' server!');
     385            $this->debug_oc('❌ Failed to connect ' . $this->_oc_driver . ' server!', true);
    362386            $this->_conn = null;
    363387            $this->_cfg_enabled = false;
     
    367391        }
    368392
    369         defined('LSCWP_LOG') && Debug2::debug2('[Object] Connected');
     393        $this->debug_oc('Connected');
    370394
    371395        return true;
     
    432456            return null;
    433457        }
    434 
    435         // defined( 'LSCWP_LOG' ) && Debug2::debug2( '[Object] get ' . $key );
    436458
    437459        $res = $this->_conn->get($key);
     
    463485            return null;
    464486        }
    465 
    466         // defined( 'LSCWP_LOG' ) && Debug2::debug2( '[Object] set ' . $key );
    467 
    468         // error_log( 'Object: set ' . $key );
    469 
    470487        $ttl = $expire ?: $this->_cfg_life;
    471488
     
    476493                $res = false;
    477494                $msg = sprintf(__('Redis encountered a fatal error: %s (code: %d)', 'litespeed-cache'), $ex->getMessage(), $ex->getCode());
    478                 Debug2::debug('[Object] ' . $msg);
     495                $this->debug_oc($msg);
    479496                Admin_Display::error($msg);
    480497            }
     
    515532            return null;
    516533        }
    517 
    518         // defined( 'LSCWP_LOG' ) && Debug2::debug2( '[Object] delete ' . $key );
    519534
    520535        if ($this->_oc_driver == 'Redis') {
     
    536551    {
    537552        if (!$this->_cfg_enabled) {
    538             defined('LSCWP_LOG') && Debug2::debug('[Object] bypass flushing');
     553            $this->debug_oc('bypass flushing');
    539554            return null;
    540555        }
     
    544559        }
    545560
    546         defined('LSCWP_LOG') && Debug2::debug('[Object] flush!');
     561        $this->debug_oc('flush!');
    547562
    548563        if ($this->_oc_driver == 'Redis') {
  • litespeed-cache/trunk/src/optimize.cls.php

    r3076030 r3123399  
    847847
    848848        $qs_hash = substr(md5(self::get_option(self::ITEM_TIMESTAMP_PURGE_CSS)), -5);
    849         // As filename is alreay realted to filecon md5, no need QS anymore
     849        // As filename is already related to filecon md5, no need QS anymore
    850850        $filepath_prefix = $this->_build_filepath_prefix($type);
    851851        return LITESPEED_STATIC_URL . $filepath_prefix . $filename . '?ver=' . $qs_hash;
  • litespeed-cache/trunk/src/optimizer.cls.php

    r3009052 r3123399  
    4545        }
    4646
     47        $skip_comments = $this->conf(Base::O_OPTM_HTML_SKIP_COMMENTS);
     48        if ($skip_comments) {
     49            $options['skipComments'] = $skip_comments;
     50        }
     51
    4752        /**
    4853         * Added exception capture when minify
  • litespeed-cache/trunk/src/placeholder.cls.php

    r3009052 r3123399  
    393393        $file = $this->_placeholder_realpath($src, $size);
    394394
    395         // Local generate SVG to serve ( Repeatly doing this here to remove stored cron queue in case the setting _conf_lqip is changed )
     395        // Local generate SVG to serve ( Repeatedly doing this here to remove stored cron queue in case the setting _conf_lqip is changed )
    396396        if (!$this->_conf_lqip || !$this->_lqip_size_check($size)) {
    397397            $data = $this->_generate_placeholder_locally($size);
  • litespeed-cache/trunk/src/preset.cls.php

    r3009052 r3123399  
    219219                        continue;
    220220                    }
    221                     list($key, $value) = json_decode($line, true);
     221                    list($key, $value) = \json_decode($line, true);
    222222                    $parsed[$key] = $value;
    223223                }
    224224            } else {
    225                 $parsed = json_decode(base64_decode($contents), true);
     225                $parsed = \json_decode(base64_decode($contents), true);
    226226            }
    227227        } catch (\Exception $ex) {
  • litespeed-cache/trunk/src/purge.cls.php

    r3009052 r3123399  
    11191119
    11201120    /**
    1121      * Check if this purge blongs to a subsite purge
     1121     * Check if this purge belongs to a subsite purge
    11221122     *
    11231123     * @since  4.0
  • litespeed-cache/trunk/src/report.cls.php

    r3076030 r3123399  
    185185        $buf = $this->_format_report_section('Server Variables', $server_vars);
    186186
    187         $buf .= $this->_format_report_section('Wordpress Specific Extras', $extras);
     187        $buf .= $this->_format_report_section('WordPress Specific Extras', $extras);
    188188
    189189        $buf .= $this->_format_report_section('LSCache Plugin Options', $options);
  • litespeed-cache/trunk/src/root.cls.php

    r3009052 r3123399  
    156156        $queue = array();
    157157        if (file_exists($static_path)) {
    158             $queue = json_decode(file_get_contents($static_path), true) ?: array();
     158            $queue = \json_decode(file_get_contents($static_path), true) ?: array();
    159159        }
    160160
     
    173173        $static_path = LITESPEED_STATIC_DIR . $filepath_prefix . '.litespeed_conf.dat';
    174174
    175         $data = json_encode($list);
     175        $data = \json_encode($list);
    176176
    177177        File::save($static_path, $data, true);
     
    368368            }
    369369
    370             // Network orignal value will be in _network_options
     370            // Network original value will be in _network_options
    371371            if (!is_network_admin() || !$this->has_network_conf($id)) {
    372372                return self::$_options[$id];
     
    541541    {
    542542        if (!is_array($v)) {
    543             $v2 = json_decode($v, true);
     543            $v2 = \json_decode($v, true);
    544544            if ($v2 !== null) {
    545545                $v = $v2;
     
    557557    {
    558558        if (is_array($v)) {
    559             $v = json_encode($v) ?: $v; // Non utf-8 encoded value will get failed, then used ori value
     559            $v = \json_encode($v) ?: $v; // Non utf-8 encoded value will get failed, then used ori value
    560560        }
    561561        return $v;
  • litespeed-cache/trunk/src/router.cls.php

    r3009052 r3123399  
    618618
    619619            default:
    620                 Debug2::debug('[Router] LSCWP_CTRL match falied: ' . $action);
     620                Debug2::debug('[Router] LSCWP_CTRL match failed: ' . $action);
    621621                return;
    622622        }
  • litespeed-cache/trunk/src/task.cls.php

    r3031822 r3123399  
    2828    private static $_guest_options = array(Base::O_OPTM_CSS_ASYNC, Base::O_OPTM_UCSS, Base::O_MEDIA_VPI);
    2929
    30     const FITLER_CRAWLER = 'litespeed_crawl_filter';
    31     const FITLER = 'litespeed_filter';
     30    const FILTER_CRAWLER = 'litespeed_crawl_filter';
     31    const FILTER = 'litespeed_filter';
    3232
    3333    /**
     
    6363                self::debug('Cron hook register [name] ' . $trigger['name']);
    6464
    65                 wp_schedule_event(time(), $id == Base::O_CRAWLER ? self::FITLER_CRAWLER : self::FITLER, $trigger['name']);
     65                wp_schedule_event(time(), $id == Base::O_CRAWLER ? self::FILTER_CRAWLER : self::FILTER, $trigger['name']);
    6666            }
    6767
     
    172172    public function lscache_cron_filter($schedules)
    173173    {
    174         if (!array_key_exists(self::FITLER, $schedules)) {
    175             $schedules[self::FITLER] = array(
     174        if (!array_key_exists(self::FILTER, $schedules)) {
     175            $schedules[self::FILTER] = array(
    176176                'interval' => 60,
    177177                'display' => __('Every Minute', 'litespeed-cache'),
     
    191191        $interval = $this->conf(Base::O_CRAWLER_RUN_INTERVAL);
    192192        // $wp_schedules = wp_get_schedules();
    193         if (!array_key_exists(self::FITLER_CRAWLER, $schedules)) {
     193        if (!array_key_exists(self::FILTER_CRAWLER, $schedules)) {
    194194            //  self::debug('Crawler cron log: cron filter '.$interval.' added');
    195             $schedules[self::FITLER_CRAWLER] = array(
     195            $schedules[self::FILTER_CRAWLER] = array(
    196196                'interval' => $interval,
    197197                'display' => __('LiteSpeed Crawler Cron', 'litespeed-cache'),
  • litespeed-cache/trunk/src/ucss.cls.php

    r3009052 r3123399  
    502502    public function notify()
    503503    {
    504         $post_data = json_decode(file_get_contents('php://input'), true);
     504        $post_data = \json_decode(file_get_contents('php://input'), true);
    505505        if (is_null($post_data)) {
    506506            $post_data = $_POST;
  • litespeed-cache/trunk/src/utility.cls.php

    r3031822 r3123399  
    189189     * @access public
    190190     */
    191     public static function readable_time($seconds_or_timestamp, $timeout = 3600, $forword = false)
     191    public static function readable_time($seconds_or_timestamp, $timeout = 3600, $forward = false)
    192192    {
    193193        if (strlen($seconds_or_timestamp) == 10) {
     
    233233
    234234        if (!$res) {
    235             return $forword ? __('right now', 'litespeed-cache') : __('just now', 'litespeed-cache');
    236         }
    237 
    238         $res = $forword ? $res : sprintf(__(' %s ago', 'litespeed-cache'), $res);
     235            return $forward ? __('right now', 'litespeed-cache') : __('just now', 'litespeed-cache');
     236        }
     237
     238        $res = $forward ? $res : sprintf(__(' %s ago', 'litespeed-cache'), $res);
    239239
    240240        return $res;
     
    253253        }
    254254
    255         return base64_encode(json_encode($arr));
     255        return base64_encode(\json_encode($arr));
    256256    }
    257257
     
    616616
    617617        if (in_array('trailingslash', $types)) {
    618             $arr = array_map('trailingslashit', $arr); // Append trailing slach, `https://example.com` -> `https://example.com/`
     618            $arr = array_map('trailingslashit', $arr); // Append trailing slash, `https://example.com` -> `https://example.com/`
    619619            $changed = true;
    620620        }
  • litespeed-cache/trunk/src/vary.cls.php

    r3009052 r3123399  
    172172        // If is the request to update vary, then no guest
    173173        // Don't need anymore as it is always ajax call
    174         // Still keep it in case some WP blocked the lightweigh guest vary update script, WP can still update the vary
     174        // Still keep it in case some WP blocked the lightweight guest vary update script, WP can still update the vary
    175175        if (!empty($_GET['litespeed_guest'])) {
    176176            return;
     
    214214
    215215        // return json
    216         echo json_encode(array('reload' => 'yes'));
     216        echo \json_encode(array('reload' => 'yes'));
    217217        exit();
    218218    }
     
    715715        }
    716716
    717         return $values_json ? json_encode($cookies) : $cookies;
     717        return $values_json ? \json_encode($cookies) : $cookies;
    718718    }
    719719
  • litespeed-cache/trunk/src/vpi.cls.php

    r3009052 r3123399  
    8989    public function notify()
    9090    {
    91         $post_data = json_decode(file_get_contents('php://input'), true);
     91        $post_data = \json_decode(file_get_contents('php://input'), true);
    9292        if (is_null($post_data)) {
    9393            $post_data = $_POST;
  • litespeed-cache/trunk/tpl/banner/cloud_news.tpl.php

    r2407814 r3123399  
    1212        <div class="litespeed-banner-description" style="flex-direction: column;">
    1313            <div class="litespeed-banner-description-padding-right-15">
    14                 <p class="litespeed-banner-desciption-content">
     14                <p class="litespeed-banner-description-content">
    1515                    <?php echo $this->_summary[ 'news.content' ]; ?>
    1616                </p>
  • litespeed-cache/trunk/tpl/banner/new_version.php

    r3076030 r3123399  
    6060        <div class="litespeed-banner-description">
    6161            <div class="litespeed-banner-description-padding-right-15">
    62                 <p class="litespeed-banner-desciption-content">
     62                <p class="litespeed-banner-description-content">
    6363                    <?php echo sprintf(__('New release %s is available now.', 'litespeed-cache'), 'v' . $this->_summary['new_version.v']); ?>
    6464                </p>
  • litespeed-cache/trunk/tpl/banner/new_version_dev.tpl.php

    r2292926 r3123399  
    1313        <div class="litespeed-banner-description">
    1414            <div class="litespeed-banner-description-padding-right-15">
    15                 <p class="litespeed-banner-desciption-content">
     15                <p class="litespeed-banner-description-content">
    1616                    <?php echo sprintf( __( 'New developer version %s is available now.', 'litespeed-cache' ), 'v' . $this->_summary[ 'version.dev' ] ) ; ?>
    1717                </p>
  • litespeed-cache/trunk/tpl/banner/slack.php

    r2292926 r3123399  
    1010        <div class="litespeed-banner-description">
    1111            <div class="litespeed-banner-description-padding-right-15">
    12                 <p class="litespeed-banner-desciption-content">
     12                <p class="litespeed-banner-description-content">
    1313                    <?php echo __( 'Want to connect with other LiteSpeed users?', 'litespeed-cache' ) ; ?>
    1414                    <?php echo sprintf( __( 'Join the %s community.', 'litespeed-cache' ), '<a href="https://join.slack.com/t/golitespeed/shared_invite/enQtMzE5ODgxMTUyNTgzLTNiNWQ1MWZlYmI4YjEzNTM4NjdiODY2YTQ0OWVlMzBlNGZkY2E3Y2E4MjIzNmNmZmU0ZjIyNWM1ZmNmMWRlOTk" target="_blank" class="litespeed-banner-promo-slack-textlink">LiteSpeed Slack</a>' ) ; ?>
  • litespeed-cache/trunk/tpl/cache/settings-advanced.tpl.php

    r2683957 r3123399  
    11<?php
     2
    23namespace LiteSpeed;
    3 defined( 'WPINC' ) || exit;
     4
     5defined('WPINC') || exit;
    46?>
    57
    68<h3 class="litespeed-title-short">
    7     <?php echo __( 'Advanced Settings', 'litespeed-cache' ); ?>
    8     <?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#advanced-tab' ); ?>
     9    <?php echo __('Advanced Settings', 'litespeed-cache'); ?>
     10    <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/cache/#advanced-tab'); ?>
    911</h3>
    1012
    1113<div class="litespeed-callout notice notice-warning inline">
    12     <h4><?php echo __( 'NOTICE:', 'litespeed-cache' ); ?></h4>
    13     <p><?php echo __( 'These settings are meant for ADVANCED USERS ONLY.', 'litespeed-cache' ); ?></p>
     14    <h4><?php echo __('NOTICE:', 'litespeed-cache'); ?></h4>
     15    <p><?php echo __('These settings are meant for ADVANCED USERS ONLY.', 'litespeed-cache'); ?></p>
    1416</div>
    1517
    16 <table class="wp-list-table striped litespeed-table"><tbody>
     18<table class="wp-list-table striped litespeed-table">
     19    <tbody>
    1720
    18     <?php
    19         if ( ! $this->_is_multisite ) :
     21        <tr>
     22            <th>
     23                <?php $id = Base::O_CACHE_AJAX_TTL; ?>
     24                <?php $this->title($id); ?>
     25            </th>
     26            <td>
     27                <div class="litespeed-textarea-recommended">
     28                    <div>
     29                        <?php $this->build_textarea($id, 60); ?>
     30                    </div>
     31                </div>
     32                <div class="litespeed-desc">
     33                    <?php echo __('Specify an AJAX action in POST/GET and the number of seconds to cache that request, separated by a space.', 'litespeed-cache'); ?>
     34                    <?php Doc::one_per_line(); ?>
     35                </div>
     36            </td>
     37        </tr>
     38
     39        <?php
     40        if (!$this->_is_multisite) :
    2041            require LSCWP_DIR . 'tpl/cache/settings_inc.login_cookie.tpl.php';
    2142        endif;
    22     ?>
     43        ?>
    2344
    24     <tr>
    25         <th>
    26             <?php $id = Base::O_UTIL_NO_HTTPS_VARY; ?>
    27             <?php $this->title( $id ); ?>
    28         </th>
    29         <td>
    30             <?php $this->build_switch( $id ); ?>
    31             <div class="litespeed-desc">
    32                 <?php echo __( 'Enable this option if you are using both HTTP and HTTPS in the same domain and are noticing cache irregularities.', 'litespeed-cache' ); ?>
    33                 <?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#improve-httphttps-compatibility' ); ?>
    34             </div>
    35         </td>
    36     </tr>
     45        <tr>
     46            <th>
     47                <?php $id = Base::O_UTIL_NO_HTTPS_VARY; ?>
     48                <?php $this->title($id); ?>
     49            </th>
     50            <td>
     51                <?php $this->build_switch($id); ?>
     52                <div class="litespeed-desc">
     53                    <?php echo __('Enable this option if you are using both HTTP and HTTPS in the same domain and are noticing cache irregularities.', 'litespeed-cache'); ?>
     54                    <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/cache/#improve-httphttps-compatibility'); ?>
     55                </div>
     56            </td>
     57        </tr>
    3758
    38     <tr>
    39         <th>
    40             <?php $id = Base::O_UTIL_INSTANT_CLICK; ?>
    41             <?php $this->title( $id ); ?>
    42         </th>
    43         <td>
    44             <?php $this->build_switch( $id ); ?>
    45             <div class="litespeed-desc">
    46                 <?php echo __( 'When a visitor hovers over a page link, preload that page. This will speed up the visit to that link.', 'litespeed-cache' ); ?>
    47                 <?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/cache/#instant-click' ); ?>
    48                 <br /><font class="litespeed-danger">
    49                     ⚠️
    50                     <?php echo __( 'This will generate extra requests to the server, which will increase server load.', 'litespeed-cache' ); ?>
    51                 </font>
     59        <tr>
     60            <th>
     61                <?php $id = Base::O_UTIL_INSTANT_CLICK; ?>
     62                <?php $this->title($id); ?>
     63            </th>
     64            <td>
     65                <?php $this->build_switch($id); ?>
     66                <div class="litespeed-desc">
     67                    <?php echo __('When a visitor hovers over a page link, preload that page. This will speed up the visit to that link.', 'litespeed-cache'); ?>
     68                    <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/cache/#instant-click'); ?>
     69                    <br />
     70                    <font class="litespeed-danger">
     71                        ⚠️
     72                        <?php echo __('This will generate extra requests to the server, which will increase server load.', 'litespeed-cache'); ?>
     73                    </font>
    5274
    53             </div>
    54         </td>
    55     </tr>
     75                </div>
     76            </td>
     77        </tr>
    5678
    57 </tbody></table>
     79    </tbody>
     80</table>
  • litespeed-cache/trunk/tpl/cdn/auto_setup.tpl.php

    r3076030 r3123399  
    2020$has_setup_token = $__cdnsetup->has_cdn_setup_token();
    2121
     22if (!empty($setup_summary['cdn_setup_err'])) {
     23    $cdn_setup_err = $setup_summary['cdn_setup_err'];
     24}
     25
    2226if (!empty($setup_summary['cdn_setup_ts'])) {
    2327    $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'];
    27     }
    2828
    2929    if ($this->conf(Base::O_QC_NAMESERVERS)) {
     
    4141
    4242if ($cdn_setup_done_ts) {
    43     $curr_status = '<span class="litespeed-success dashicons dashicons-yes"></span> '. __('Done', 'litespeed-cache');
     43    $curr_status = '<span class="litespeed-success dashicons dashicons-yes"></span> ' . __('Done', 'litespeed-cache');
    4444    // wp_date requires WP v5.3+
    4545    if (function_exists('wp_date')) {
    46         $curr_status .= ' <span class="litespeed-desc litespeed-left10">'. sprintf(__('Completed at %s', 'litespeed-cache'), wp_date(get_option('date_format') . ' ' . get_option('time_format'), $cdn_setup_done_ts)). '</span>';
     46        $curr_status .= ' <span class="litespeed-desc litespeed-left10">' . sprintf(__('Completed at %s', 'litespeed-cache'), wp_date(get_option('date_format') . ' ' . get_option('time_format'), $cdn_setup_done_ts)) . '</span>';
    4747    }
    4848    $disabled = 'disabled';
  • litespeed-cache/trunk/tpl/dash/dashboard.tpl.php

    r3031822 r3123399  
    191191
    192192    <p class="litespeed-right litespeed-qc-dashboard-link">
    193         <?php if (!empty($cloud_summary['is_linked'])) : ?>
    194             <a href="<?php echo Cloud::cls()->qc_link(); ?>" class="litespeed-link-with-icon" target="_blank"><?php echo __('Go to QUIC.cloud dashboard', 'litespeed-cache'); ?> <span class="dashicons dashicons-external"></span></a>
    195         <?php elseif ($__cloud->can_link_qc()) : ?>
    196             <?php Doc::learn_more(Utility::build_url(Router::ACTION_CLOUD, Cloud::TYPE_LINK), __('Link to QUIC.cloud', 'litespeed-cache'), true, 'button litespeed-btn-warning'); ?>
     193        <?php if (!empty($cloud_summary['partner']) && !empty($cloud_summary['partner']['login_title']) && !empty($cloud_summary['partner']['login_link'])) : ?>
     194            <?php Doc::learn_more($cloud_summary['partner']['login_link'], $cloud_summary['partner']['login_title'], true, 'button litespeed-btn-warning'); ?>
     195        <?php elseif (!empty($cloud_summary['partner']) && !empty($cloud_summary['partner']['disable_qc_login'])) : ?>
    197196        <?php else : ?>
    198             <?php Doc::learn_more('javascript:;', __('Link to QUIC.cloud', 'litespeed-cache'), true, 'button disabled litespeed-btn-warning'); ?>
     197            <?php if (!empty($cloud_summary['is_linked'])) : ?>
     198                <a href="<?php echo Cloud::cls()->qc_link(); ?>" class="litespeed-link-with-icon" target="_blank"><?php echo __('Go to QUIC.cloud dashboard', 'litespeed-cache'); ?> <span class="dashicons dashicons-external"></span></a>
     199            <?php elseif ($__cloud->can_link_qc()) : ?>
     200                <?php Doc::learn_more(Utility::build_url(Router::ACTION_CLOUD, Cloud::TYPE_LINK), __('Link to QUIC.cloud', 'litespeed-cache'), true, 'button litespeed-btn-warning'); ?>
     201            <?php else : ?>
     202                <?php Doc::learn_more('javascript:;', __('Link to QUIC.cloud', 'litespeed-cache'), true, 'button disabled litespeed-btn-warning'); ?>
     203            <?php endif; ?>
    199204        <?php endif; ?>
    200205    </p>
  • litespeed-cache/trunk/tpl/dash/network_dash.tpl.php

    r2634373 r3123399  
    2525        <?php
    2626            $cat_list = array(
    27                 'img_optm'  => __( 'Image Optimization', 'litespeed-cache' ),
    28                 'ccss'      => __( 'CCSS', 'litespeed-cache' ),
    29                 'cdn'       => __( 'CDN Bandwidth', 'litespeed-cache' ),
    30                 'lqip'      => __( 'LQIP', 'litespeed-cache' ),
     27                'img_optm'  => __('Image Optimization', 'litespeed-cache'),
     28                'page_optm' => __('Page Optimization', 'litespeed-cache'),
     29                'cdn'       => __('CDN Bandwidth', 'litespeed-cache'),
     30                'lqip'      => __('Low Quality Image Placeholder', 'litespeed-cache'),
    3131            );
    3232
  • litespeed-cache/trunk/tpl/img_optm/summary.tpl.php

    r3009052 r3123399  
    137137
    138138                    <p><?php echo sprintf(
    139                             '<a href="%1$s" class="button button-secondary" data-balloon-pos="right" aria-label="%2$s" %3$s><span class="dashicons dashicons-editor-removeformatting"></span>&nbsp;%4$s</a>',
     139                            '<a href="%1$s" class="button button-secondary litespeed-btn-warning" data-balloon-pos="right" aria-label="%2$s" %3$s><span class="dashicons dashicons-editor-removeformatting"></span>&nbsp;%4$s</a>',
    140140                            ($unfinished_num ? Utility::build_url(Router::ACTION_IMG_OPTM, Img_Optm::TYPE_CLEAN) : 'javascript:;'),
    141141                            __('Remove all previous unfinished image optimization requests.', 'litespeed-cache'),
     
    239239                                <code><?php echo Admin_Display::print_plural($img_count['groups_new'], 'group'); ?></code>
    240240                            <?php else : ?>
    241                                 <font class="litespeed-congratulate"><?php echo __('Congratulations, all requested!', 'litespeed-cache'); ?></font>
     241                                <font class="litespeed-congratulate"><?php echo __('Congratulations, all gathered!', 'litespeed-cache'); ?></font>
    242242                            <?php endif; ?>
    243243
  • litespeed-cache/trunk/tpl/page_optm/settings_html.tpl.php

    r2977143 r3123399  
    9090        <tr>
    9191            <th>
     92                <?php $id = Base::O_OPTM_HTML_SKIP_COMMENTS; ?>
     93                <?php $this->title($id); ?>
     94            </th>
     95            <td>
     96                <?php $this->build_textarea($id); ?>
     97                <div class="litespeed-desc">
     98                    <?php echo __('When minifying HTML do not discard comments that match a specified pattern.', 'litespeed-cache'); ?>
     99                    <br />
     100                    <?php echo sprintf( __('If comment to be kept is like: %s write: %s', 'litespeed-cache'), '<code>&lt;!-- A comment that needs to be here --&gt;</code>', '<code>A comment that needs to be here</code>'); ?>
     101                    <br />
     102                    <?php Doc::one_per_line(); ?>
     103                </div>
     104            </td>
     105        </tr>
     106
     107        <tr>
     108            <th>
    92109                <?php $id = Base::O_OPTM_QS_RM; ?>
    93110                <?php $this->title($id); ?>
  • litespeed-cache/trunk/tpl/toolbox/beta_test.tpl.php

    r3077216 r3123399  
    77// Existing public version list
    88$v_list = array(
     9    '6.3',
    910    '6.2.0.1',
    1011    '6.1',
  • litespeed-cache/trunk/tpl/toolbox/edit_htaccess.tpl.php

    r2613854 r3123399  
    11<?php
     2
    23namespace LiteSpeed;
    3 defined( 'WPINC' ) || exit;
     4
     5defined('WPINC') || exit;
    46
    57$content = null;
    68try {
    79    $content = Htaccess::cls()->htaccess_read();
    8 } catch( \Exception $e ) {
    9     echo '<div class="notice notice-error is-dismissible"><p>'. $e->getMessage() . '</p></div>';
     10} catch (\Exception $e) {
     11    echo '<div class="notice notice-error is-dismissible"><p>' . $e->getMessage() . '</p></div>';
    1012}
    1113
     
    1315
    1416// Check if there is `ExpiresDefault` in .htaccess
    15 if ( defined( 'LITESPEED_ON' ) ) {
    16     if ( $content && stripos( $content, "\nExpiresDefault" ) !== false ) {
    17         $is_dismissed = GUI::get_option( self::DB_DISMISS_MSG );
    18         if ( $is_dismissed !== self::RULECONFLICT_DISMISSED ) {
     17if (defined('LITESPEED_ON')) {
     18    if ($content && stripos($content, "\nExpiresDefault") !== false) {
     19        $is_dismissed = GUI::get_option(self::DB_DISMISS_MSG);
     20        if ($is_dismissed !== self::RULECONFLICT_DISMISSED) {
    1921            // Need to add a notice for browser cache compatibility
    20             if ( $is_dismissed !== self::RULECONFLICT_ON ) {
    21                 GUI::update_option( self::DB_DISMISS_MSG, self::RULECONFLICT_ON );
     22            if ($is_dismissed !== self::RULECONFLICT_ON) {
     23                GUI::update_option(self::DB_DISMISS_MSG, self::RULECONFLICT_ON);
    2224            }
    2325            require_once LSCWP_DIR . 'tpl/inc/show_rule_conflict.php';
     
    3537<h3 class="litespeed-title">
    3638    <?php echo __('LiteSpeed Cache View .htaccess', 'litespeed-cache'); ?>
    37     <?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/toolbox/#edit-htaccess-tab' ); ?>
     39    <?php Doc::learn_more('https://docs.litespeedtech.com/lscache/lscwp/toolbox/#view-htaccess-tab'); ?>
    3840</h3>
    3941
    4042<h3 class="litespeed-title-short">
    41     <?php echo __( '.htaccess Path', 'litespeed-cache' ); ?>
     43    <?php echo __('.htaccess Path', 'litespeed-cache'); ?>
    4244</h3>
    4345
    44 <table class="wp-list-table striped litespeed-table"><tbody>
    45     <tr>
    46         <th>
    47             <?php echo __( 'Frontend .htaccess Path', 'litespeed-cache' ); ?>
    48         </th>
    49         <td>
    50             <code><?php echo $htaccess_path; ?></code>
    51             <div class="litespeed-desc">
    52                 <?php echo __( 'Default path is', 'litespeed-cache' ); ?>: <code><?php echo Htaccess::get_frontend_htaccess( true ); ?></code>
    53                 <br /><font class="litespeed-success">
    54                     <?php echo __( 'API', 'litespeed-cache' ); ?>:
    55                     <?php echo sprintf( __( 'PHP Constant %s is supported.', 'litespeed-cache' ), '<code>LITESPEED_CFG_HTACCESS</code>' ); ?>
    56                     <?php echo sprintf( __( 'You can use this code %1$s in %2$s to specify the htaccess file path.', 'litespeed-cache' ), '<code>defined("LITESPEED_CFG_HTACCESS") || define("LITESPEED_CFG_HTACCESS", "your path on server");</code>', '<code>wp-config.php</code>' ); ?>
    57                 </font>
    58             </div>
    59         </td>
    60     </tr>
     46<table class="wp-list-table striped litespeed-table">
     47    <tbody>
     48        <tr>
     49            <th>
     50                <?php echo __('Frontend .htaccess Path', 'litespeed-cache'); ?>
     51            </th>
     52            <td>
     53                <code><?php echo $htaccess_path; ?></code>
     54                <div class="litespeed-desc">
     55                    <?php echo __('Default path is', 'litespeed-cache'); ?>: <code><?php echo Htaccess::get_frontend_htaccess(true); ?></code>
     56                    <br />
     57                    <font class="litespeed-success">
     58                        <?php echo __('API', 'litespeed-cache'); ?>:
     59                        <?php echo sprintf(__('PHP Constant %s is supported.', 'litespeed-cache'), '<code>LITESPEED_CFG_HTACCESS</code>'); ?>
     60                        <?php echo sprintf(__('You can use this code %1$s in %2$s to specify the htaccess file path.', 'litespeed-cache'), '<code>defined("LITESPEED_CFG_HTACCESS") || define("LITESPEED_CFG_HTACCESS", "your path on server");</code>', '<code>wp-config.php</code>'); ?>
     61                    </font>
     62                </div>
     63            </td>
     64        </tr>
    6165
    62     <tr>
    63         <th>
    64             <?php echo __( 'Backend .htaccess Path', 'litespeed-cache' ); ?>
    65         </th>
    66         <td>
    67             <?php echo Htaccess::get_backend_htaccess(); ?>
    68             <div class="litespeed-desc">
    69                 <?php echo __( 'Default path is', 'litespeed-cache' ); ?>: <code><?php echo Htaccess::get_backend_htaccess( true ); ?></code>
    70                 <br /><font class="litespeed-success">
    71                     <?php echo __( 'API', 'litespeed-cache' ); ?>:
    72                     <?php echo sprintf( __( 'PHP Constant %s is supported.', 'litespeed-cache' ), '<code>LITESPEED_CFG_HTACCESS_BACKEND</code>' ); ?>
    73                     <?php echo sprintf( __( 'You can use this code %1$s in %2$s to specify the htaccess file path.', 'litespeed-cache' ), '<code>defined("LITESPEED_CFG_HTACCESS_BACKEND") || define("LITESPEED_CFG_HTACCESS_BACKEND", "your path on server");</code>', '<code>wp-config.php</code>' ); ?>
    74                 </font>
    75             </div>
    76         </td>
    77     </tr>
    78 </tbody></table>
     66        <tr>
     67            <th>
     68                <?php echo __('Backend .htaccess Path', 'litespeed-cache'); ?>
     69            </th>
     70            <td>
     71                <?php echo Htaccess::get_backend_htaccess(); ?>
     72                <div class="litespeed-desc">
     73                    <?php echo __('Default path is', 'litespeed-cache'); ?>: <code><?php echo Htaccess::get_backend_htaccess(true); ?></code>
     74                    <br />
     75                    <font class="litespeed-success">
     76                        <?php echo __('API', 'litespeed-cache'); ?>:
     77                        <?php echo sprintf(__('PHP Constant %s is supported.', 'litespeed-cache'), '<code>LITESPEED_CFG_HTACCESS_BACKEND</code>'); ?>
     78                        <?php echo sprintf(__('You can use this code %1$s in %2$s to specify the htaccess file path.', 'litespeed-cache'), '<code>defined("LITESPEED_CFG_HTACCESS_BACKEND") || define("LITESPEED_CFG_HTACCESS_BACKEND", "your path on server");</code>', '<code>wp-config.php</code>'); ?>
     79                    </font>
     80                </div>
     81            </td>
     82        </tr>
     83    </tbody>
     84</table>
    7985
    80 <?php if( $content !== null ) : ?>
     86<?php if ($content !== null) : ?>
    8187
    8288    <h3 class="litespeed-title"><?php echo sprintf(__('Current %s Contents', 'litespeed-cache'), '.htaccess'); ?></h3>
  • litespeed-cache/trunk/tpl/toolbox/settings-debug.tpl.php

    r2761310 r3123399  
    117117    <tr>
    118118        <th>
    119             <?php $id = Base::O_DEBUG_COLLAPS_QS; ?>
     119            <?php $id = Base::O_DEBUG_COLLAPSE_QS; ?>
    120120            <?php $this->title( $id ); ?>
    121121        </th>
Note: See TracChangeset for help on using the changeset viewer.