Changeset 3359287
- Timestamp:
- 09/10/2025 03:48:29 PM (3 months ago)
- Location:
- litespeed-cache
- Files:
-
- 346 added
- 21 edited
-
tags/7.5 (added)
-
tags/7.5/LICENSE (added)
-
tags/7.5/assets (added)
-
tags/7.5/assets/css (added)
-
tags/7.5/assets/css/iziModal.min.css (added)
-
tags/7.5/assets/css/litespeed-dummy.css (added)
-
tags/7.5/assets/css/litespeed-legacy.css (added)
-
tags/7.5/assets/css/litespeed.css (added)
-
tags/7.5/assets/img (added)
-
tags/7.5/assets/img/Litespeed.icon.svg (added)
-
tags/7.5/assets/img/iconlscwp.svg (added)
-
tags/7.5/assets/img/icons (added)
-
tags/7.5/assets/img/icons/all.svg (added)
-
tags/7.5/assets/img/icons/all_transients.svg (added)
-
tags/7.5/assets/img/icons/auto_draft.svg (added)
-
tags/7.5/assets/img/icons/cross_icon.svg (added)
-
tags/7.5/assets/img/icons/db.svg (added)
-
tags/7.5/assets/img/icons/empty-cache.svg (added)
-
tags/7.5/assets/img/icons/expired_transient.svg (added)
-
tags/7.5/assets/img/icons/img_optm.svg (added)
-
tags/7.5/assets/img/icons/img_optm_disabled.svg (added)
-
tags/7.5/assets/img/icons/img_webp.svg (added)
-
tags/7.5/assets/img/icons/img_webp_disabled.svg (added)
-
tags/7.5/assets/img/icons/optimize_tables.svg (added)
-
tags/7.5/assets/img/icons/purge-403.svg (added)
-
tags/7.5/assets/img/icons/purge-404.svg (added)
-
tags/7.5/assets/img/icons/purge-500.svg (added)
-
tags/7.5/assets/img/icons/purge-all.svg (added)
-
tags/7.5/assets/img/icons/purge-cssjs.svg (added)
-
tags/7.5/assets/img/icons/purge-front.svg (added)
-
tags/7.5/assets/img/icons/purge-object.svg (added)
-
tags/7.5/assets/img/icons/purge-opcache.svg (added)
-
tags/7.5/assets/img/icons/purge-pages.svg (added)
-
tags/7.5/assets/img/icons/revision.svg (added)
-
tags/7.5/assets/img/icons/spam_comment.svg (added)
-
tags/7.5/assets/img/icons/success_icon.svg (added)
-
tags/7.5/assets/img/icons/trackback-pingback.svg (added)
-
tags/7.5/assets/img/icons/trash_comment.svg (added)
-
tags/7.5/assets/img/icons/trash_post.svg (added)
-
tags/7.5/assets/img/lscwp-logo_90x90.png (added)
-
tags/7.5/assets/img/lscwp_blue_font-icon_22px.svg (added)
-
tags/7.5/assets/img/lscwp_font-icon_32px.svg (added)
-
tags/7.5/assets/img/lscwp_gray-yellow_font-icon_22px.svg (added)
-
tags/7.5/assets/img/lscwp_gray_font-icon_22px.svg (added)
-
tags/7.5/assets/img/lscwp_grayscale_font-icon_22px.svg (added)
-
tags/7.5/assets/img/quic-cloud-icon-16x16.svg (added)
-
tags/7.5/assets/img/quic-cloud-logo-light_stack_300px.png (added)
-
tags/7.5/assets/img/quic-cloud-logo.svg (added)
-
tags/7.5/assets/img/slack-logo.png (added)
-
tags/7.5/assets/js (added)
-
tags/7.5/assets/js/babel.min.js (added)
-
tags/7.5/assets/js/component.cdn.js (added)
-
tags/7.5/assets/js/component.crawler.js (added)
-
tags/7.5/assets/js/css_async.js (added)
-
tags/7.5/assets/js/css_async.min.js (added)
-
tags/7.5/assets/js/guest.docref.js (added)
-
tags/7.5/assets/js/guest.docref.min.js (added)
-
tags/7.5/assets/js/guest.js (added)
-
tags/7.5/assets/js/guest.min.js (added)
-
tags/7.5/assets/js/instant_click.min.js (added)
-
tags/7.5/assets/js/instant_click.ori.js (added)
-
tags/7.5/assets/js/iziModal.min.js (added)
-
tags/7.5/assets/js/js_delay.js (added)
-
tags/7.5/assets/js/js_delay.min.js (added)
-
tags/7.5/assets/js/lazyload.init.js (added)
-
tags/7.5/assets/js/lazyload.lib.js (added)
-
tags/7.5/assets/js/lazyload.min.js (added)
-
tags/7.5/assets/js/litespeed-cache-admin.js (added)
-
tags/7.5/assets/js/react.min.js (added)
-
tags/7.5/assets/js/webfontloader.js (added)
-
tags/7.5/assets/js/webfontloader.min.js (added)
-
tags/7.5/autoload.php (added)
-
tags/7.5/changelog.txt (added)
-
tags/7.5/cli (added)
-
tags/7.5/cli/crawler.cls.php (added)
-
tags/7.5/cli/database.cls.php (added)
-
tags/7.5/cli/debug.cls.php (added)
-
tags/7.5/cli/image.cls.php (added)
-
tags/7.5/cli/online.cls.php (added)
-
tags/7.5/cli/option.cls.php (added)
-
tags/7.5/cli/presets.cls.php (added)
-
tags/7.5/cli/purge.cls.php (added)
-
tags/7.5/composer.json (added)
-
tags/7.5/composer.lock (added)
-
tags/7.5/data (added)
-
tags/7.5/data/.htaccess (added)
-
tags/7.5/data/cache_nocacheable.txt (added)
-
tags/7.5/data/ccss_whitelist.txt (added)
-
tags/7.5/data/const.default.json (added)
-
tags/7.5/data/const.network_default.json (added)
-
tags/7.5/data/css_excludes.txt (added)
-
tags/7.5/data/esi.nonce.txt (added)
-
tags/7.5/data/esi.nonces.txt (added)
-
tags/7.5/data/js_defer_excludes.txt (added)
-
tags/7.5/data/js_excludes.txt (added)
-
tags/7.5/data/optm_uri_exc.txt (added)
-
tags/7.5/data/preset (added)
-
tags/7.5/data/preset/advanced.data (added)
-
tags/7.5/data/preset/aggressive.data (added)
-
tags/7.5/data/preset/basic.data (added)
-
tags/7.5/data/preset/essentials.data (added)
-
tags/7.5/data/preset/extreme.data (added)
-
tags/7.5/data/ucss_whitelist.txt (added)
-
tags/7.5/guest.vary.php (added)
-
tags/7.5/lang (added)
-
tags/7.5/lang/litespeed-cache.pot (added)
-
tags/7.5/lib (added)
-
tags/7.5/lib/css_js_min (added)
-
tags/7.5/lib/css_js_min/minify (added)
-
tags/7.5/lib/css_js_min/minify/LICENSE (added)
-
tags/7.5/lib/css_js_min/minify/css.cls.php (added)
-
tags/7.5/lib/css_js_min/minify/data (added)
-
tags/7.5/lib/css_js_min/minify/data/js (added)
-
tags/7.5/lib/css_js_min/minify/data/js/keywords_after.txt (added)
-
tags/7.5/lib/css_js_min/minify/data/js/keywords_before.txt (added)
-
tags/7.5/lib/css_js_min/minify/data/js/keywords_reserved.txt (added)
-
tags/7.5/lib/css_js_min/minify/data/js/operators.txt (added)
-
tags/7.5/lib/css_js_min/minify/data/js/operators_after.txt (added)
-
tags/7.5/lib/css_js_min/minify/data/js/operators_before.txt (added)
-
tags/7.5/lib/css_js_min/minify/exception.cls.php (added)
-
tags/7.5/lib/css_js_min/minify/js.cls.php (added)
-
tags/7.5/lib/css_js_min/minify/minify.cls.php (added)
-
tags/7.5/lib/css_js_min/pathconverter (added)
-
tags/7.5/lib/css_js_min/pathconverter/LICENSE (added)
-
tags/7.5/lib/css_js_min/pathconverter/converter.cls.php (added)
-
tags/7.5/lib/guest.cls.php (added)
-
tags/7.5/lib/html-min.cls.php (added)
-
tags/7.5/lib/object-cache.php (added)
-
tags/7.5/lib/php-compatibility.func.php (added)
-
tags/7.5/lib/urirewriter.cls.php (added)
-
tags/7.5/litespeed-cache.php (added)
-
tags/7.5/package-lock.json (added)
-
tags/7.5/package.json (added)
-
tags/7.5/phpcs.ruleset.xml (added)
-
tags/7.5/phpcs.xml.dist (added)
-
tags/7.5/qc-ping.txt (added)
-
tags/7.5/readme.txt (added)
-
tags/7.5/security.md (added)
-
tags/7.5/src (added)
-
tags/7.5/src/activation.cls.php (added)
-
tags/7.5/src/admin-display.cls.php (added)
-
tags/7.5/src/admin-settings.cls.php (added)
-
tags/7.5/src/admin.cls.php (added)
-
tags/7.5/src/api.cls.php (added)
-
tags/7.5/src/avatar.cls.php (added)
-
tags/7.5/src/base.cls.php (added)
-
tags/7.5/src/cdn (added)
-
tags/7.5/src/cdn.cls.php (added)
-
tags/7.5/src/cdn/cloudflare.cls.php (added)
-
tags/7.5/src/cdn/quic.cls.php (added)
-
tags/7.5/src/cloud.cls.php (added)
-
tags/7.5/src/conf.cls.php (added)
-
tags/7.5/src/control.cls.php (added)
-
tags/7.5/src/core.cls.php (added)
-
tags/7.5/src/crawler-map.cls.php (added)
-
tags/7.5/src/crawler.cls.php (added)
-
tags/7.5/src/css.cls.php (added)
-
tags/7.5/src/data.cls.php (added)
-
tags/7.5/src/data.upgrade.func.php (added)
-
tags/7.5/src/data_structure (added)
-
tags/7.5/src/data_structure/avatar.sql (added)
-
tags/7.5/src/data_structure/crawler.sql (added)
-
tags/7.5/src/data_structure/crawler_blacklist.sql (added)
-
tags/7.5/src/data_structure/img_optm.sql (added)
-
tags/7.5/src/data_structure/img_optming.sql (added)
-
tags/7.5/src/data_structure/url.sql (added)
-
tags/7.5/src/data_structure/url_file.sql (added)
-
tags/7.5/src/db-optm.cls.php (added)
-
tags/7.5/src/debug2.cls.php (added)
-
tags/7.5/src/doc.cls.php (added)
-
tags/7.5/src/error.cls.php (added)
-
tags/7.5/src/esi.cls.php (added)
-
tags/7.5/src/file.cls.php (added)
-
tags/7.5/src/gui.cls.php (added)
-
tags/7.5/src/health.cls.php (added)
-
tags/7.5/src/htaccess.cls.php (added)
-
tags/7.5/src/img-optm.cls.php (added)
-
tags/7.5/src/import.cls.php (added)
-
tags/7.5/src/import.preset.cls.php (added)
-
tags/7.5/src/lang.cls.php (added)
-
tags/7.5/src/localization.cls.php (added)
-
tags/7.5/src/media.cls.php (added)
-
tags/7.5/src/metabox.cls.php (added)
-
tags/7.5/src/object-cache-wp.cls.php (added)
-
tags/7.5/src/object-cache.cls.php (added)
-
tags/7.5/src/object.lib.php (added)
-
tags/7.5/src/optimize.cls.php (added)
-
tags/7.5/src/optimizer.cls.php (added)
-
tags/7.5/src/placeholder.cls.php (added)
-
tags/7.5/src/purge.cls.php (added)
-
tags/7.5/src/report.cls.php (added)
-
tags/7.5/src/rest.cls.php (added)
-
tags/7.5/src/root.cls.php (added)
-
tags/7.5/src/router.cls.php (added)
-
tags/7.5/src/str.cls.php (added)
-
tags/7.5/src/tag.cls.php (added)
-
tags/7.5/src/task.cls.php (added)
-
tags/7.5/src/tool.cls.php (added)
-
tags/7.5/src/ucss.cls.php (added)
-
tags/7.5/src/utility.cls.php (added)
-
tags/7.5/src/vary.cls.php (added)
-
tags/7.5/src/vpi.cls.php (added)
-
tags/7.5/thirdparty (added)
-
tags/7.5/thirdparty/aelia-currencyswitcher.cls.php (added)
-
tags/7.5/thirdparty/amp.cls.php (added)
-
tags/7.5/thirdparty/autoptimize.cls.php (added)
-
tags/7.5/thirdparty/avada.cls.php (added)
-
tags/7.5/thirdparty/bbpress.cls.php (added)
-
tags/7.5/thirdparty/beaver-builder.cls.php (added)
-
tags/7.5/thirdparty/caldera-forms.cls.php (added)
-
tags/7.5/thirdparty/divi-theme-builder.cls.php (added)
-
tags/7.5/thirdparty/elementor.cls.php (added)
-
tags/7.5/thirdparty/entry.inc.php (added)
-
tags/7.5/thirdparty/facetwp.cls.php (added)
-
tags/7.5/thirdparty/gravity-forms.cls.php (added)
-
tags/7.5/thirdparty/litespeed-check.cls.php (added)
-
tags/7.5/thirdparty/nextgengallery.cls.php (added)
-
tags/7.5/thirdparty/perfmatters.cls.php (added)
-
tags/7.5/thirdparty/theme-my-login.cls.php (added)
-
tags/7.5/thirdparty/user-switching.cls.php (added)
-
tags/7.5/thirdparty/wc-pdf-product-vouchers.cls.php (added)
-
tags/7.5/thirdparty/wcml.cls.php (added)
-
tags/7.5/thirdparty/woo-paypal.cls.php (added)
-
tags/7.5/thirdparty/woocommerce.cls.php (added)
-
tags/7.5/thirdparty/woocommerce.content.tpl.php (added)
-
tags/7.5/thirdparty/woocommerce.tab.tpl.php (added)
-
tags/7.5/thirdparty/wp-polls.cls.php (added)
-
tags/7.5/thirdparty/wp-postratings.cls.php (added)
-
tags/7.5/thirdparty/wpdiscuz.cls.php (added)
-
tags/7.5/thirdparty/wplister.cls.php (added)
-
tags/7.5/thirdparty/wpml.cls.php (added)
-
tags/7.5/thirdparty/wptouch.cls.php (added)
-
tags/7.5/thirdparty/yith-wishlist.cls.php (added)
-
tags/7.5/tpl (added)
-
tags/7.5/tpl/banner (added)
-
tags/7.5/tpl/banner/ajax.php (added)
-
tags/7.5/tpl/banner/cloud_news.tpl.php (added)
-
tags/7.5/tpl/banner/cloud_promo.tpl.php (added)
-
tags/7.5/tpl/banner/new_version.php (added)
-
tags/7.5/tpl/banner/new_version_dev.tpl.php (added)
-
tags/7.5/tpl/banner/score.php (added)
-
tags/7.5/tpl/banner/slack.php (added)
-
tags/7.5/tpl/cache (added)
-
tags/7.5/tpl/cache/entry.tpl.php (added)
-
tags/7.5/tpl/cache/entry_network.tpl.php (added)
-
tags/7.5/tpl/cache/more_settings_tip.tpl.php (added)
-
tags/7.5/tpl/cache/network_settings-advanced.tpl.php (added)
-
tags/7.5/tpl/cache/network_settings-browser.tpl.php (added)
-
tags/7.5/tpl/cache/network_settings-cache.tpl.php (added)
-
tags/7.5/tpl/cache/network_settings-excludes.tpl.php (added)
-
tags/7.5/tpl/cache/network_settings-object.tpl.php (added)
-
tags/7.5/tpl/cache/network_settings-purge.tpl.php (added)
-
tags/7.5/tpl/cache/settings-advanced.tpl.php (added)
-
tags/7.5/tpl/cache/settings-browser.tpl.php (added)
-
tags/7.5/tpl/cache/settings-cache.tpl.php (added)
-
tags/7.5/tpl/cache/settings-esi.tpl.php (added)
-
tags/7.5/tpl/cache/settings-excludes.tpl.php (added)
-
tags/7.5/tpl/cache/settings-object.tpl.php (added)
-
tags/7.5/tpl/cache/settings-purge.tpl.php (added)
-
tags/7.5/tpl/cache/settings-ttl.tpl.php (added)
-
tags/7.5/tpl/cache/settings_inc.browser.tpl.php (added)
-
tags/7.5/tpl/cache/settings_inc.cache_dropquery.tpl.php (added)
-
tags/7.5/tpl/cache/settings_inc.cache_mobile.tpl.php (added)
-
tags/7.5/tpl/cache/settings_inc.exclude_cookies.tpl.php (added)
-
tags/7.5/tpl/cache/settings_inc.exclude_useragent.tpl.php (added)
-
tags/7.5/tpl/cache/settings_inc.login_cookie.tpl.php (added)
-
tags/7.5/tpl/cache/settings_inc.object.tpl.php (added)
-
tags/7.5/tpl/cache/settings_inc.purge_on_upgrade.tpl.php (added)
-
tags/7.5/tpl/cdn (added)
-
tags/7.5/tpl/cdn/cf.tpl.php (added)
-
tags/7.5/tpl/cdn/entry.tpl.php (added)
-
tags/7.5/tpl/cdn/other.tpl.php (added)
-
tags/7.5/tpl/cdn/qc.tpl.php (added)
-
tags/7.5/tpl/crawler (added)
-
tags/7.5/tpl/crawler/blacklist.tpl.php (added)
-
tags/7.5/tpl/crawler/entry.tpl.php (added)
-
tags/7.5/tpl/crawler/map.tpl.php (added)
-
tags/7.5/tpl/crawler/settings.tpl.php (added)
-
tags/7.5/tpl/crawler/summary.tpl.php (added)
-
tags/7.5/tpl/dash (added)
-
tags/7.5/tpl/dash/dashboard.tpl.php (added)
-
tags/7.5/tpl/dash/entry.tpl.php (added)
-
tags/7.5/tpl/dash/network_dash.tpl.php (added)
-
tags/7.5/tpl/db_optm (added)
-
tags/7.5/tpl/db_optm/entry.tpl.php (added)
-
tags/7.5/tpl/db_optm/manage.tpl.php (added)
-
tags/7.5/tpl/db_optm/settings.tpl.php (added)
-
tags/7.5/tpl/esi.tpl.php (added)
-
tags/7.5/tpl/esi_widget_edit.php (added)
-
tags/7.5/tpl/general (added)
-
tags/7.5/tpl/general/entry.tpl.php (added)
-
tags/7.5/tpl/general/network_settings.tpl.php (added)
-
tags/7.5/tpl/general/online.tpl.php (added)
-
tags/7.5/tpl/general/settings.tpl.php (added)
-
tags/7.5/tpl/general/settings_inc.auto_upgrade.tpl.php (added)
-
tags/7.5/tpl/general/settings_inc.guest.tpl.php (added)
-
tags/7.5/tpl/general/settings_tuning.tpl.php (added)
-
tags/7.5/tpl/img_optm (added)
-
tags/7.5/tpl/img_optm/entry.tpl.php (added)
-
tags/7.5/tpl/img_optm/network_settings.tpl.php (added)
-
tags/7.5/tpl/img_optm/settings.media_webp.tpl.php (added)
-
tags/7.5/tpl/img_optm/settings.tpl.php (added)
-
tags/7.5/tpl/img_optm/summary.tpl.php (added)
-
tags/7.5/tpl/inc (added)
-
tags/7.5/tpl/inc/admin_footer.php (added)
-
tags/7.5/tpl/inc/check_cache_disabled.php (added)
-
tags/7.5/tpl/inc/check_if_network_disable_all.php (added)
-
tags/7.5/tpl/inc/in_upgrading.php (added)
-
tags/7.5/tpl/inc/metabox.php (added)
-
tags/7.5/tpl/inc/modal.deactivation.php (added)
-
tags/7.5/tpl/inc/show_display_installed.php (added)
-
tags/7.5/tpl/inc/show_error_cookie.php (added)
-
tags/7.5/tpl/inc/show_rule_conflict.php (added)
-
tags/7.5/tpl/optimax (added)
-
tags/7.5/tpl/optimax/entry.tpl.php (added)
-
tags/7.5/tpl/optimax/settings.tpl.php (added)
-
tags/7.5/tpl/optimax/summary.tpl.php (added)
-
tags/7.5/tpl/page_optm (added)
-
tags/7.5/tpl/page_optm/entry.tpl.php (added)
-
tags/7.5/tpl/page_optm/settings_css.tpl.php (added)
-
tags/7.5/tpl/page_optm/settings_html.tpl.php (added)
-
tags/7.5/tpl/page_optm/settings_js.tpl.php (added)
-
tags/7.5/tpl/page_optm/settings_localization.tpl.php (added)
-
tags/7.5/tpl/page_optm/settings_media.tpl.php (added)
-
tags/7.5/tpl/page_optm/settings_media_exc.tpl.php (added)
-
tags/7.5/tpl/page_optm/settings_tuning.tpl.php (added)
-
tags/7.5/tpl/page_optm/settings_tuning_css.tpl.php (added)
-
tags/7.5/tpl/page_optm/settings_vpi.tpl.php (added)
-
tags/7.5/tpl/presets (added)
-
tags/7.5/tpl/presets/entry.tpl.php (added)
-
tags/7.5/tpl/presets/standard.tpl.php (added)
-
tags/7.5/tpl/toolbox (added)
-
tags/7.5/tpl/toolbox/beta_test.tpl.php (added)
-
tags/7.5/tpl/toolbox/edit_htaccess.tpl.php (added)
-
tags/7.5/tpl/toolbox/entry.tpl.php (added)
-
tags/7.5/tpl/toolbox/heartbeat.tpl.php (added)
-
tags/7.5/tpl/toolbox/import_export.tpl.php (added)
-
tags/7.5/tpl/toolbox/log_viewer.tpl.php (added)
-
tags/7.5/tpl/toolbox/purge.tpl.php (added)
-
tags/7.5/tpl/toolbox/report.tpl.php (added)
-
tags/7.5/tpl/toolbox/settings-debug.tpl.php (added)
-
tags/7.5/typos.toml (added)
-
trunk/assets/css/litespeed.css (modified) (1 diff)
-
trunk/lang/litespeed-cache.pot (modified) (24 diffs)
-
trunk/litespeed-cache.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/admin-display.cls.php (modified) (8 diffs)
-
trunk/src/admin-settings.cls.php (modified) (2 diffs)
-
trunk/src/base.cls.php (modified) (40 diffs)
-
trunk/src/cloud.cls.php (modified) (9 diffs)
-
trunk/src/conf.cls.php (modified) (2 diffs)
-
trunk/src/control.cls.php (modified) (1 diff)
-
trunk/src/crawler-map.cls.php (modified) (2 diffs)
-
trunk/src/crawler.cls.php (modified) (7 diffs)
-
trunk/src/db-optm.cls.php (modified) (1 diff)
-
trunk/src/debug2.cls.php (modified) (1 diff)
-
trunk/src/htaccess.cls.php (modified) (2 diffs)
-
trunk/src/img-optm.cls.php (modified) (26 diffs)
-
trunk/src/lang.cls.php (modified) (2 diffs)
-
trunk/src/task.cls.php (modified) (1 diff)
-
trunk/src/utility.cls.php (modified) (3 diffs)
-
trunk/tpl/img_optm/settings.tpl.php (modified) (1 diff)
-
trunk/tpl/optimax (added)
-
trunk/tpl/optimax/entry.tpl.php (added)
-
trunk/tpl/optimax/settings.tpl.php (added)
-
trunk/tpl/optimax/summary.tpl.php (added)
-
trunk/tpl/toolbox/beta_test.tpl.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
litespeed-cache/trunk/assets/css/litespeed.css
r3352087 r3359287 4311 4311 } 4312 4312 4313 input#input_api_key + .button {4314 margin-top: 10px;4315 margin-left: 0;4316 }4317 4318 input#input_api_key + .button + .litespeed-desc {4319 display: block;4320 }4321 4322 input#input_api_key + .button + .litespeed-desc + .button {4323 margin-left: 0;4324 }4325 4326 4313 .litespeed-body .litespeed-table td .litespeed-right { 4327 4314 float: none !important; -
litespeed-cache/trunk/lang/litespeed-cache.pot
r3352087 r3359287 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: LiteSpeed Cache 7. 4\n"5 "Project-Id-Version: LiteSpeed Cache 7.5\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/litespeed-cache\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2025-0 8-28T14:08:48+00:00\n"12 "POT-Creation-Date: 2025-09-10T14:42:22+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.11.0\n" … … 90 90 msgstr "" 91 91 92 #: src/admin-display.cls.php: 30492 #: src/admin-display.cls.php:250 93 93 #: tpl/dash/entry.tpl.php:16 94 94 msgid "Dashboard" 95 95 msgstr "" 96 96 97 #: src/admin-display.cls.php:307 97 #: src/admin-display.cls.php:251 98 #: src/lang.cls.php:269 99 msgid "OptimaX" 100 msgstr "" 101 102 #: src/admin-display.cls.php:252 98 103 msgid "Presets" 99 104 msgstr "" 100 105 101 #: src/admin-display.cls.php: 310106 #: src/admin-display.cls.php:253 102 107 msgid "General" 103 108 msgstr "" 104 109 105 #: src/admin-display.cls.php:311 110 #: src/admin-display.cls.php:254 111 #: src/admin-display.cls.php:264 106 112 #: tpl/cache/entry.tpl.php:16 107 113 #: tpl/cache/entry_network.tpl.php:16 … … 109 115 msgstr "" 110 116 111 #: src/admin-display.cls.php: 314117 #: src/admin-display.cls.php:255 112 118 msgid "CDN" 113 119 msgstr "" 114 120 115 #: src/admin-display.cls.php: 317121 #: src/admin-display.cls.php:256 116 122 #: src/gui.cls.php:727 117 123 #: tpl/dash/dashboard.tpl.php:203 … … 124 130 msgstr "" 125 131 126 #: src/admin-display.cls.php: 320132 #: src/admin-display.cls.php:257 127 133 #: tpl/dash/dashboard.tpl.php:204 128 134 #: tpl/dash/network_dash.tpl.php:37 … … 133 139 msgstr "" 134 140 135 #: src/admin-display.cls.php: 323141 #: src/admin-display.cls.php:258 136 142 msgid "Database" 137 143 msgstr "" 138 144 139 #: src/admin-display.cls.php: 326140 #: src/lang.cls.php:24 8145 #: src/admin-display.cls.php:259 146 #: src/lang.cls.php:249 141 147 msgid "Crawler" 142 148 msgstr "" 143 149 144 #: src/admin-display.cls.php: 329150 #: src/admin-display.cls.php:260 145 151 msgid "Toolbox" 146 152 msgstr "" 147 153 148 #: src/admin-display.cls.php:4 03154 #: src/admin-display.cls.php:451 149 155 msgid "Cookie Name" 150 156 msgstr "" 151 157 152 #: src/admin-display.cls.php:4 04158 #: src/admin-display.cls.php:452 153 159 #: tpl/crawler/settings.tpl.php:179 154 160 msgid "Cookie Values" 155 161 msgstr "" 156 162 157 #: src/admin-display.cls.php:4 06163 #: src/admin-display.cls.php:454 158 164 msgid "Remove cookie simulation" 159 165 msgstr "" 160 166 161 #: src/admin-display.cls.php:4 07167 #: src/admin-display.cls.php:455 162 168 msgid "Add new cookie to simulate" 163 169 msgstr "" 164 170 165 #: src/admin-display.cls.php:4 30171 #: src/admin-display.cls.php:478 166 172 msgid "CDN URL to be used. For example, %s" 167 173 msgstr "" 168 174 169 #: src/admin-display.cls.php:4 32175 #: src/admin-display.cls.php:480 170 176 msgid "Remove CDN URL" 171 177 msgstr "" 172 178 173 #: src/admin-display.cls.php:4 33179 #: src/admin-display.cls.php:481 174 180 msgid "Add new CDN URL" 175 181 msgstr "" 176 182 177 #: src/admin-display.cls.php:4 34178 #: src/admin-display.cls.php:1 240179 #: src/admin-display.cls.php:1 270180 #: src/admin-display.cls.php:1 352183 #: src/admin-display.cls.php:482 184 #: src/admin-display.cls.php:1163 185 #: src/admin-display.cls.php:1193 186 #: src/admin-display.cls.php:1275 181 187 #: src/doc.cls.php:39 182 188 #: tpl/cache/settings-cache.tpl.php:28 … … 194 200 msgstr "" 195 201 196 #: src/admin-display.cls.php:4 35197 #: src/admin-display.cls.php:1 241198 #: src/admin-display.cls.php:1 270199 #: src/admin-display.cls.php:1 352202 #: src/admin-display.cls.php:483 203 #: src/admin-display.cls.php:1164 204 #: src/admin-display.cls.php:1193 205 #: src/admin-display.cls.php:1275 200 206 #: tpl/cache/settings-cache.tpl.php:28 201 207 #: tpl/cache/settings_inc.object.tpl.php:280 … … 213 219 msgstr "" 214 220 215 #: src/admin-display.cls.php: 496221 #: src/admin-display.cls.php:544 216 222 #: src/gui.cls.php:718 217 223 #: tpl/crawler/entry.tpl.php:17 … … 219 225 msgstr "" 220 226 221 #: src/admin-display.cls.php: 767227 #: src/admin-display.cls.php:801 222 228 #: tpl/banner/new_version.php:114 223 229 #: tpl/banner/score.php:142 … … 226 232 msgstr "" 227 233 228 #: src/admin-display.cls.php: 1071229 #: src/admin-display.cls.php: 1076234 #: src/admin-display.cls.php:994 235 #: src/admin-display.cls.php:999 230 236 msgid "Save Changes" 231 237 msgstr "" 232 238 233 #: src/admin-display.cls.php:1 366239 #: src/admin-display.cls.php:1289 234 240 msgid "This value is overwritten by the %s variable." 235 241 msgstr "" 236 242 237 #: src/admin-display.cls.php:1 370243 #: src/admin-display.cls.php:1293 238 244 msgid "This value is overwritten by the filter." 239 245 msgstr "" 240 246 241 #: src/admin-display.cls.php:1 373247 #: src/admin-display.cls.php:1296 242 248 msgid "This value is overwritten by the PHP constant %s." 243 249 msgstr "" 244 250 245 #: src/admin-display.cls.php:13 77251 #: src/admin-display.cls.php:1300 246 252 msgid "This value is overwritten by the primary site setting." 247 253 msgstr "" 248 254 249 #: src/admin-display.cls.php:13 79255 #: src/admin-display.cls.php:1302 250 256 msgid "This value is overwritten by the Network setting." 251 257 msgstr "" 252 258 253 #: src/admin-display.cls.php:13 83259 #: src/admin-display.cls.php:1306 254 260 msgid "Currently set to %s" 255 261 msgstr "" 256 262 257 #: src/admin-display.cls.php:13 96263 #: src/admin-display.cls.php:1319 258 264 msgid "Value from filter applied" 259 265 msgstr "" 260 266 261 #: src/admin-display.cls.php:1 410267 #: src/admin-display.cls.php:1333 262 268 #: tpl/cache/settings_inc.object.tpl.php:162 263 269 #: tpl/crawler/settings.tpl.php:43 … … 266 272 msgstr "" 267 273 268 #: src/admin-display.cls.php:1 436269 #: src/admin-display.cls.php:1 455274 #: src/admin-display.cls.php:1359 275 #: src/admin-display.cls.php:1378 270 276 #: tpl/cdn/other.tpl.php:108 271 277 msgid "Default value" 272 278 msgstr "" 273 279 274 #: src/admin-display.cls.php:14 83280 #: src/admin-display.cls.php:1406 275 281 msgid "Invalid rewrite rule" 276 282 msgstr "" 277 283 278 #: src/admin-display.cls.php:1 503284 #: src/admin-display.cls.php:1426 279 285 msgid "Path must end with %s" 280 286 msgstr "" 281 287 282 #: src/admin-display.cls.php:1 523288 #: src/admin-display.cls.php:1446 283 289 msgid "Minimum value" 284 290 msgstr "" 285 291 286 #: src/admin-display.cls.php:1 526292 #: src/admin-display.cls.php:1449 287 293 msgid "Maximum value" 288 294 msgstr "" 289 295 290 #: src/admin-display.cls.php:1 538296 #: src/admin-display.cls.php:1461 291 297 msgid "Zero, or" 292 298 msgstr "" 293 299 294 #: src/admin-display.cls.php:1 544300 #: src/admin-display.cls.php:1467 295 301 msgid "Larger than" 296 302 msgstr "" 297 303 298 #: src/admin-display.cls.php:1 546304 #: src/admin-display.cls.php:1469 299 305 msgid "Smaller than" 300 306 msgstr "" 301 307 302 #: src/admin-display.cls.php:1 549308 #: src/admin-display.cls.php:1472 303 309 msgid "Value range" 304 310 msgstr "" 305 311 306 #: src/admin-display.cls.php:15 77312 #: src/admin-display.cls.php:1500 307 313 msgid "Invalid IP" 308 314 msgstr "" 309 315 310 #: src/admin-display.cls.php:15 97316 #: src/admin-display.cls.php:1520 311 317 #: tpl/cache/settings-esi.tpl.php:103 312 318 #: tpl/page_optm/settings_css.tpl.php:87 … … 330 336 331 337 #. translators: %s: list of server variables in <code> tags 332 #: src/admin-display.cls.php:1 600338 #: src/admin-display.cls.php:1523 333 339 msgid "Server variable(s) %s available to override this setting." 334 340 msgstr "" 335 341 336 #: src/admin-display.cls.php:1 616342 #: src/admin-display.cls.php:1539 337 343 msgid "The URLs will be compared to the REQUEST_URI server variable." 338 344 msgstr "" 339 345 340 346 #. translators: 1: example URL, 2: pattern example 341 #: src/admin-display.cls.php:1 618347 #: src/admin-display.cls.php:1541 342 348 msgid "For example, for %1$s, %2$s can be used here." 343 349 msgstr "" 344 350 345 351 #. translators: %s: caret symbol 346 #: src/admin-display.cls.php:1 621352 #: src/admin-display.cls.php:1544 347 353 msgid "To match the beginning, add %s to the beginning of the item." 348 354 msgstr "" 349 355 350 356 #. translators: %s: dollar symbol 351 #: src/admin-display.cls.php:1 623357 #: src/admin-display.cls.php:1546 352 358 msgid "To do an exact match, add %s to the end of the URL." 353 359 msgstr "" 354 360 355 #: src/admin-display.cls.php:1 624361 #: src/admin-display.cls.php:1547 356 362 #: src/doc.cls.php:108 357 363 msgid "One per line." 358 364 msgstr "" 359 365 360 #: src/admin-display.cls.php:1 641366 #: src/admin-display.cls.php:1564 361 367 msgid "%s groups" 362 368 msgstr "" 363 369 364 #: src/admin-display.cls.php:1 644370 #: src/admin-display.cls.php:1567 365 371 msgid "%s images" 366 372 msgstr "" 367 373 368 #: src/admin-display.cls.php:1 653374 #: src/admin-display.cls.php:1576 369 375 msgid "%s group" 370 376 msgstr "" 371 377 372 #: src/admin-display.cls.php:1 656378 #: src/admin-display.cls.php:1579 373 379 msgid "%s image" 374 380 msgstr "" 375 381 376 382 #: src/admin-settings.cls.php:40 377 #: src/admin-settings.cls.php:3 07383 #: src/admin-settings.cls.php:313 378 384 msgid "No fields" 379 385 msgstr "" … … 383 389 msgstr "" 384 390 385 #: src/admin-settings.cls.php:29 1386 #: src/admin-settings.cls.php:3 27391 #: src/admin-settings.cls.php:297 392 #: src/admin-settings.cls.php:333 387 393 msgid "Options saved." 388 394 msgstr "" … … 477 483 msgstr "" 478 484 479 #: src/cloud.cls.php:97 3480 #: src/cloud.cls.php:9 86481 #: src/cloud.cls.php:102 4482 #: src/cloud.cls.php:109 0483 #: src/cloud.cls.php:123 1485 #: src/cloud.cls.php:978 486 #: src/cloud.cls.php:991 487 #: src/cloud.cls.php:1029 488 #: src/cloud.cls.php:1095 489 #: src/cloud.cls.php:1236 484 490 msgid "Cloud Error" 485 491 msgstr "" 486 492 487 #: src/cloud.cls.php:102 4493 #: src/cloud.cls.php:1029 488 494 msgid "No available Cloud Node after checked server load." 489 495 msgstr "" 490 496 491 #: src/cloud.cls.php:109 0497 #: src/cloud.cls.php:1095 492 498 msgid "No available Cloud Node." 493 499 msgstr "" 494 500 495 #: src/cloud.cls.php:11 85501 #: src/cloud.cls.php:1190 496 502 msgid "In order to use QC services, need a real domain name, cannot use an IP." 497 503 msgstr "" 498 504 499 #: src/cloud.cls.php:123 4505 #: src/cloud.cls.php:1239 500 506 msgid "Please try after %1$s for service %2$s." 501 507 msgstr "" 502 508 503 #: src/cloud.cls.php:14 11504 #: src/cloud.cls.php:14 34509 #: src/cloud.cls.php:1435 510 #: src/cloud.cls.php:1458 505 511 msgid "Failed to request via WordPress" 506 512 msgstr "" 507 513 508 #: src/cloud.cls.php:14 66514 #: src/cloud.cls.php:1490 509 515 msgid "Cloud server refused the current request due to unpulled images. Please pull the images first." 510 516 msgstr "" 511 517 512 #: src/cloud.cls.php:14 71518 #: src/cloud.cls.php:1495 513 519 msgid "Your domain_key has been temporarily blocklisted to prevent abuse. You may contact support at QUIC.cloud to learn more." 514 520 msgstr "" 515 521 516 #: src/cloud.cls.php:1 478522 #: src/cloud.cls.php:1502 517 523 msgid "Cloud server refused the current request due to rate limiting. Please try again later." 518 524 msgstr "" 519 525 520 #: src/cloud.cls.php:1 486526 #: src/cloud.cls.php:1510 521 527 msgid "Redetected node" 522 528 msgstr "" 523 529 524 #: src/cloud.cls.php:1 494530 #: src/cloud.cls.php:1518 525 531 msgid "We are working hard to improve your online service experience. The service will be unavailable while we work. We apologize for any inconvenience." 526 532 msgstr "" 527 533 528 #: src/cloud.cls.php:15 39529 #: src/cloud.cls.php:15 47534 #: src/cloud.cls.php:1563 535 #: src/cloud.cls.php:1571 530 536 msgid "Message from QUIC.cloud server" 531 537 msgstr "" 532 538 533 #: src/cloud.cls.php:15 55539 #: src/cloud.cls.php:1579 534 540 msgid "Good news from QUIC.cloud server" 535 541 msgstr "" 536 542 537 #: src/cloud.cls.php:15 65543 #: src/cloud.cls.php:1589 538 544 msgid "%1$s plugin version %2$s required for this action." 539 545 msgstr "" 540 546 541 #: src/cloud.cls.php:16 32547 #: src/cloud.cls.php:1656 542 548 msgid "Failed to communicate with QUIC.cloud server" 543 549 msgstr "" 544 550 545 #: src/cloud.cls.php:1 685551 #: src/cloud.cls.php:1709 546 552 msgid "Site not recognized. QUIC.cloud deactivated automatically. Please reactivate your QUIC.cloud account." 547 553 msgstr "" 548 554 549 #: src/cloud.cls.php:1 686555 #: src/cloud.cls.php:1710 550 556 msgid "Click here to proceed." 551 557 msgstr "" 552 558 553 #: src/cloud.cls.php:19 53559 #: src/cloud.cls.php:1977 554 560 msgid "Linked to QUIC.cloud preview environment, for testing purpose only." 555 561 msgstr "" 556 562 557 #: src/cloud.cls.php:20 05563 #: src/cloud.cls.php:2029 558 564 msgid "Sync QUIC.cloud status successfully." 559 565 msgstr "" 560 566 561 #: src/cloud.cls.php:20 12567 #: src/cloud.cls.php:2036 562 568 msgid "Sync credit allowance with Cloud Server successfully." 563 569 msgstr "" … … 1047 1053 msgstr "" 1048 1054 1049 #: src/htaccess.cls.php:32 71055 #: src/htaccess.cls.php:325 1050 1056 msgid "Mobile Agent Rules" 1051 1057 msgstr "" 1052 1058 1053 #: src/htaccess.cls.php:78 61059 #: src/htaccess.cls.php:784 1054 1060 msgid "<p>Please add/replace the following codes into the beginning of %1$s:</p> %2$s" 1055 1061 msgstr "" 1056 1062 1057 #: src/img-optm.cls.php:3 421063 #: src/img-optm.cls.php:350 1058 1064 msgid "Pushed %1$s to Cloud server, accepted %2$s." 1059 1065 msgstr "" 1060 1066 1061 #: src/img-optm.cls.php:6 031067 #: src/img-optm.cls.php:618 1062 1068 msgid "Cleared %1$s invalid images." 1063 1069 msgstr "" 1064 1070 1065 #: src/img-optm.cls.php:6 601071 #: src/img-optm.cls.php:675 1066 1072 msgid "No valid image found in the current request." 1067 1073 msgstr "" 1068 1074 1069 #: src/img-optm.cls.php: 6851075 #: src/img-optm.cls.php:700 1070 1076 msgid "No valid image found by Cloud server in the current request." 1071 1077 msgstr "" 1072 1078 1073 #: src/img-optm.cls.php:8 751079 #: src/img-optm.cls.php:890 1074 1080 msgid "Started async image optimization request" 1075 1081 msgstr "" 1076 1082 1077 #: src/img-optm.cls.php:9 611083 #: src/img-optm.cls.php:976 1078 1084 msgid "Pull Cron is running" 1079 1085 msgstr "" 1080 1086 1081 #: src/img-optm.cls.php:10 711087 #: src/img-optm.cls.php:1086 1082 1088 msgid "Some optimized image file(s) has expired and was cleared." 1083 1089 msgstr "" 1084 1090 1085 #: src/img-optm.cls.php:1 0861091 #: src/img-optm.cls.php:1101 1086 1092 msgid "Pulled WebP image md5 does not match the notified WebP image md5." 1087 1093 msgstr "" 1088 1094 1089 #: src/img-optm.cls.php:11 151095 #: src/img-optm.cls.php:1130 1090 1096 msgid "Pulled AVIF image md5 does not match the notified AVIF image md5." 1091 1097 msgstr "" 1092 1098 1093 #: src/img-optm.cls.php:11 501099 #: src/img-optm.cls.php:1165 1094 1100 msgid "One or more pulled images does not match with the notified image md5" 1095 1101 msgstr "" 1096 1102 1097 #: src/img-optm.cls.php:13 421103 #: src/img-optm.cls.php:1357 1098 1104 msgid "Cleaned up unfinished data successfully." 1099 1105 msgstr "" 1100 1106 1101 #: src/img-optm.cls.php:13 591107 #: src/img-optm.cls.php:1374 1102 1108 msgid "Reset image optimization counter successfully." 1103 1109 msgstr "" 1104 1110 1105 #: src/img-optm.cls.php:14 431111 #: src/img-optm.cls.php:1458 1106 1112 msgid "Destroy all optimization data successfully." 1107 1113 msgstr "" 1108 1114 1109 #: src/img-optm.cls.php:15 081110 #: src/img-optm.cls.php:15 701115 #: src/img-optm.cls.php:1523 1116 #: src/img-optm.cls.php:1587 1111 1117 msgid "Rescanned successfully." 1112 1118 msgstr "" 1113 1119 1114 #: src/img-optm.cls.php:15 701120 #: src/img-optm.cls.php:1587 1115 1121 msgid "Rescanned %d images successfully." 1116 1122 msgstr "" 1117 1123 1118 #: src/img-optm.cls.php:16 361124 #: src/img-optm.cls.php:1653 1119 1125 msgid "Calculated backups successfully." 1120 1126 msgstr "" 1121 1127 1122 #: src/img-optm.cls.php:17 281128 #: src/img-optm.cls.php:1745 1123 1129 msgid "Removed backups successfully." 1124 1130 msgstr "" 1125 1131 1126 #: src/img-optm.cls.php:18 751132 #: src/img-optm.cls.php:1892 1127 1133 msgid "Switched images successfully." 1128 1134 msgstr "" 1129 1135 1130 #: src/img-optm.cls.php:19 721131 #: src/img-optm.cls.php:20 321136 #: src/img-optm.cls.php:1989 1137 #: src/img-optm.cls.php:2049 1132 1138 msgid "Switched to optimized file successfully." 1133 1139 msgstr "" 1134 1140 1135 #: src/img-optm.cls.php: 19911141 #: src/img-optm.cls.php:2008 1136 1142 msgid "Disabled WebP file successfully." 1137 1143 msgstr "" 1138 1144 1139 #: src/img-optm.cls.php: 19961145 #: src/img-optm.cls.php:2013 1140 1146 msgid "Enabled WebP file successfully." 1141 1147 msgstr "" 1142 1148 1143 #: src/img-optm.cls.php:20 051149 #: src/img-optm.cls.php:2022 1144 1150 msgid "Disabled AVIF file successfully." 1145 1151 msgstr "" 1146 1152 1147 #: src/img-optm.cls.php:20 101153 #: src/img-optm.cls.php:2027 1148 1154 msgid "Enabled AVIF file successfully." 1149 1155 msgstr "" 1150 1156 1151 #: src/img-optm.cls.php:20 261157 #: src/img-optm.cls.php:2043 1152 1158 msgid "Restored original file successfully." 1153 1159 msgstr "" 1154 1160 1155 #: src/img-optm.cls.php:20 821161 #: src/img-optm.cls.php:2099 1156 1162 msgid "Reset the optimized data successfully." 1157 1163 msgstr "" … … 1682 1688 1683 1689 #: src/lang.cls.php:211 1690 msgid "Optimize Image Sizes" 1691 msgstr "" 1692 1693 #: src/lang.cls.php:212 1684 1694 msgid "Preserve EXIF/XMP data" 1685 1695 msgstr "" 1686 1696 1687 #: src/lang.cls.php:21 21697 #: src/lang.cls.php:213 1688 1698 msgid "WebP/AVIF Attribute To Replace" 1689 1699 msgstr "" 1690 1700 1691 #: src/lang.cls.php:21 31701 #: src/lang.cls.php:214 1692 1702 msgid "WebP/AVIF For Extra srcset" 1693 1703 msgstr "" 1694 1704 1695 #: src/lang.cls.php:21 41705 #: src/lang.cls.php:215 1696 1706 msgid "WordPress Image Quality Control" 1697 1707 msgstr "" 1698 1708 1699 #: src/lang.cls.php:21 51709 #: src/lang.cls.php:216 1700 1710 #: tpl/esi_widget_edit.php:43 1701 1711 msgid "Enable ESI" 1702 1712 msgstr "" 1703 1713 1704 #: src/lang.cls.php:21 61714 #: src/lang.cls.php:217 1705 1715 msgid "Cache Admin Bar" 1706 1716 msgstr "" 1707 1717 1708 #: src/lang.cls.php:21 71718 #: src/lang.cls.php:218 1709 1719 msgid "Cache Comment Form" 1710 1720 msgstr "" 1711 1721 1712 #: src/lang.cls.php:21 81722 #: src/lang.cls.php:219 1713 1723 msgid "ESI Nonces" 1714 1724 msgstr "" 1715 1725 1716 #: src/lang.cls.php:2 191726 #: src/lang.cls.php:220 1717 1727 #: tpl/page_optm/settings_css.tpl.php:140 1718 1728 #: tpl/page_optm/settings_css.tpl.php:277 … … 1721 1731 msgstr "" 1722 1732 1723 #: src/lang.cls.php:22 01733 #: src/lang.cls.php:221 1724 1734 msgid "Purge All Hooks" 1725 1735 msgstr "" 1726 1736 1727 #: src/lang.cls.php:22 11737 #: src/lang.cls.php:222 1728 1738 msgid "Improve HTTP/HTTPS Compatibility" 1729 1739 msgstr "" 1730 1740 1731 #: src/lang.cls.php:22 21741 #: src/lang.cls.php:223 1732 1742 msgid "Instant Click" 1733 1743 msgstr "" 1734 1744 1735 #: src/lang.cls.php:22 31745 #: src/lang.cls.php:224 1736 1746 msgid "Do Not Cache Cookies" 1737 1747 msgstr "" 1738 1748 1739 #: src/lang.cls.php:22 41749 #: src/lang.cls.php:225 1740 1750 msgid "Do Not Cache User Agents" 1741 1751 msgstr "" 1742 1752 1743 #: src/lang.cls.php:22 51753 #: src/lang.cls.php:226 1744 1754 msgid "Login Cookie" 1745 1755 msgstr "" 1746 1756 1747 #: src/lang.cls.php:22 61757 #: src/lang.cls.php:227 1748 1758 msgid "Vary Cookies" 1749 1759 msgstr "" 1750 1760 1751 #: src/lang.cls.php:22 81761 #: src/lang.cls.php:229 1752 1762 msgid "Frontend Heartbeat Control" 1753 1763 msgstr "" 1754 1764 1755 #: src/lang.cls.php:2 291765 #: src/lang.cls.php:230 1756 1766 msgid "Frontend Heartbeat TTL" 1757 1767 msgstr "" 1758 1768 1759 #: src/lang.cls.php:23 01769 #: src/lang.cls.php:231 1760 1770 msgid "Backend Heartbeat Control" 1761 1771 msgstr "" 1762 1772 1763 #: src/lang.cls.php:23 11773 #: src/lang.cls.php:232 1764 1774 msgid "Backend Heartbeat TTL" 1765 1775 msgstr "" 1766 1776 1767 #: src/lang.cls.php:23 21777 #: src/lang.cls.php:233 1768 1778 msgid "Editor Heartbeat" 1769 1779 msgstr "" 1770 1780 1771 #: src/lang.cls.php:23 31781 #: src/lang.cls.php:234 1772 1782 msgid "Editor Heartbeat TTL" 1773 1783 msgstr "" 1774 1784 1775 #: src/lang.cls.php:23 51785 #: src/lang.cls.php:236 1776 1786 msgid "Use CDN Mapping" 1777 1787 msgstr "" 1778 1788 1779 #: src/lang.cls.php:23 61789 #: src/lang.cls.php:237 1780 1790 msgid "CDN URL" 1781 1791 msgstr "" 1782 1792 1783 #: src/lang.cls.php:23 71793 #: src/lang.cls.php:238 1784 1794 msgid "Include Images" 1785 1795 msgstr "" 1786 1796 1787 #: src/lang.cls.php:23 81797 #: src/lang.cls.php:239 1788 1798 msgid "Include CSS" 1789 1799 msgstr "" 1790 1800 1791 #: src/lang.cls.php:2 391801 #: src/lang.cls.php:240 1792 1802 msgid "Include JS" 1793 1803 msgstr "" 1794 1804 1795 #: src/lang.cls.php:24 01805 #: src/lang.cls.php:241 1796 1806 #: tpl/cdn/other.tpl.php:113 1797 1807 msgid "Include File Types" 1798 1808 msgstr "" 1799 1809 1800 #: src/lang.cls.php:24 11810 #: src/lang.cls.php:242 1801 1811 msgid "HTML Attribute To Replace" 1802 1812 msgstr "" 1803 1813 1804 #: src/lang.cls.php:24 21814 #: src/lang.cls.php:243 1805 1815 msgid "Original URLs" 1806 1816 msgstr "" 1807 1817 1808 #: src/lang.cls.php:24 31818 #: src/lang.cls.php:244 1809 1819 msgid "Included Directories" 1810 1820 msgstr "" 1811 1821 1812 #: src/lang.cls.php:24 41822 #: src/lang.cls.php:245 1813 1823 msgid "Exclude Path" 1814 1824 msgstr "" 1815 1825 1816 #: src/lang.cls.php:24 51826 #: src/lang.cls.php:246 1817 1827 msgid "Cloudflare API" 1818 1828 msgstr "" 1819 1829 1820 #: src/lang.cls.php:24 61830 #: src/lang.cls.php:247 1821 1831 msgid "Clear Cloudflare cache" 1822 1832 msgstr "" 1823 1833 1824 #: src/lang.cls.php:2 491834 #: src/lang.cls.php:250 1825 1835 msgid "Crawl Interval" 1826 1836 msgstr "" 1827 1837 1828 #: src/lang.cls.php:25 01838 #: src/lang.cls.php:251 1829 1839 msgid "Server Load Limit" 1830 1840 msgstr "" 1831 1841 1832 #: src/lang.cls.php:25 11842 #: src/lang.cls.php:252 1833 1843 msgid "Role Simulation" 1834 1844 msgstr "" 1835 1845 1836 #: src/lang.cls.php:25 21846 #: src/lang.cls.php:253 1837 1847 msgid "Cookie Simulation" 1838 1848 msgstr "" 1839 1849 1840 #: src/lang.cls.php:25 31850 #: src/lang.cls.php:254 1841 1851 msgid "Custom Sitemap" 1842 1852 msgstr "" 1843 1853 1844 #: src/lang.cls.php:25 51854 #: src/lang.cls.php:256 1845 1855 msgid "Disable All Features" 1846 1856 msgstr "" 1847 1857 1848 #: src/lang.cls.php:25 61858 #: src/lang.cls.php:257 1849 1859 #: tpl/toolbox/log_viewer.tpl.php:18 1850 1860 msgid "Debug Log" 1851 1861 msgstr "" 1852 1862 1853 #: src/lang.cls.php:25 71863 #: src/lang.cls.php:258 1854 1864 msgid "Admin IPs" 1855 1865 msgstr "" 1856 1866 1857 #: src/lang.cls.php:25 81867 #: src/lang.cls.php:259 1858 1868 msgid "Debug Level" 1859 1869 msgstr "" 1860 1870 1861 #: src/lang.cls.php:2 591871 #: src/lang.cls.php:260 1862 1872 msgid "Log File Size Limit" 1863 1873 msgstr "" 1864 1874 1865 #: src/lang.cls.php:26 01875 #: src/lang.cls.php:261 1866 1876 msgid "Collapse Query Strings" 1867 1877 msgstr "" 1868 1878 1869 #: src/lang.cls.php:26 11879 #: src/lang.cls.php:262 1870 1880 msgid "Debug URI Includes" 1871 1881 msgstr "" 1872 1882 1873 #: src/lang.cls.php:26 21883 #: src/lang.cls.php:263 1874 1884 msgid "Debug URI Excludes" 1875 1885 msgstr "" 1876 1886 1877 #: src/lang.cls.php:26 31887 #: src/lang.cls.php:264 1878 1888 msgid "Debug String Excludes" 1879 1889 msgstr "" 1880 1890 1881 #: src/lang.cls.php:26 51891 #: src/lang.cls.php:266 1882 1892 msgid "Revisions Max Number" 1883 1893 msgstr "" 1884 1894 1885 #: src/lang.cls.php:26 61895 #: src/lang.cls.php:267 1886 1896 msgid "Revisions Max Age" 1887 1897 msgstr "" … … 2147 2157 #: tpl/cache/settings-advanced.tpl.php:21 2148 2158 #: tpl/cache/settings_inc.browser.tpl.php:23 2149 #: tpl/toolbox/beta_test.tpl.php: 392159 #: tpl/toolbox/beta_test.tpl.php:40 2150 2160 #: tpl/toolbox/heartbeat.tpl.php:24 2151 2161 #: tpl/toolbox/report.tpl.php:46 … … 2255 2265 #: tpl/banner/new_version.php:77 2256 2266 #: tpl/banner/new_version_dev.tpl.php:41 2257 #: tpl/toolbox/beta_test.tpl.php:8 52267 #: tpl/toolbox/beta_test.tpl.php:86 2258 2268 msgid "Upgrade" 2259 2269 msgstr "" … … 3218 3228 3219 3229 #: tpl/cdn/other.tpl.php:137 3220 #: tpl/img_optm/settings.tpl.php:1 243230 #: tpl/img_optm/settings.tpl.php:150 3221 3231 msgid "Only attributes listed here will be replaced." 3222 3232 msgstr "" 3223 3233 3224 3234 #: tpl/cdn/other.tpl.php:141 3225 #: tpl/img_optm/settings.tpl.php:1 253235 #: tpl/img_optm/settings.tpl.php:151 3226 3236 msgid "Use the format %1$s or %2$s (element is optional)." 3227 3237 msgstr "" … … 4539 4549 msgstr "" 4540 4550 4541 #: tpl/img_optm/settings.tpl.php:94 4551 #: tpl/img_optm/settings.tpl.php:104 4552 msgid "No sizes found." 4553 msgstr "" 4554 4555 #: tpl/img_optm/settings.tpl.php:107 4556 msgid "Choose which image sizes to optimize." 4557 msgstr "" 4558 4559 #: tpl/img_optm/settings.tpl.php:120 4542 4560 msgid "Preserve EXIF data (copyright, GPS, comments, keywords, etc) when optimizing." 4543 4561 msgstr "" 4544 4562 4545 #: tpl/img_optm/settings.tpl.php: 954563 #: tpl/img_optm/settings.tpl.php:121 4546 4564 msgid "This will increase the size of optimized files." 4547 4565 msgstr "" 4548 4566 4549 #: tpl/img_optm/settings.tpl.php:1 234567 #: tpl/img_optm/settings.tpl.php:149 4550 4568 msgid "Specify which element attributes will be replaced with WebP/AVIF." 4551 4569 msgstr "" 4552 4570 4553 #: tpl/img_optm/settings.tpl.php:1 394571 #: tpl/img_optm/settings.tpl.php:165 4554 4572 msgid "Enable replacement of WebP/AVIF in %s elements that were generated outside of WordPress logic." 4555 4573 msgstr "" … … 4885 4903 #: tpl/inc/show_rule_conflict.php:16 4886 4904 msgid "Unexpected cache rule %2$s found in %1$s file. This rule may cause visitors to see old versions of pages due to the browser caching HTML pages. If you are sure that HTML pages are not being browser cached, this message can be dismissed. (%3$sLearn More%4$s)" 4905 msgstr "" 4906 4907 #: tpl/optimax/entry.tpl.php:16 4908 msgid "OptimaX Summary" 4909 msgstr "" 4910 4911 #: tpl/optimax/entry.tpl.php:17 4912 #: tpl/optimax/entry.tpl.php:22 4913 #: tpl/optimax/settings.tpl.php:19 4914 msgid "OptimaX Settings" 4915 msgstr "" 4916 4917 #: tpl/optimax/entry.tpl.php:30 4918 msgid "LiteSpeed Cache OptimaX" 4919 msgstr "" 4920 4921 #: tpl/optimax/settings.tpl.php:34 4922 msgid "Turn on OptimaX. This will automatically request your pages OptimaX result via cron job." 4887 4923 msgstr "" 4888 4924 … … 5217 5253 5218 5254 #: tpl/page_optm/settings_localization.tpl.php:137 5219 #: tpl/toolbox/beta_test.tpl.php:4 85255 #: tpl/toolbox/beta_test.tpl.php:49 5220 5256 msgid "Example" 5221 5257 msgstr "" … … 5715 5751 msgstr "" 5716 5752 5717 #: tpl/toolbox/beta_test.tpl.php:3 35753 #: tpl/toolbox/beta_test.tpl.php:34 5718 5754 msgid "Try GitHub Version" 5719 5755 msgstr "" 5720 5756 5721 #: tpl/toolbox/beta_test.tpl.php:4 05757 #: tpl/toolbox/beta_test.tpl.php:41 5722 5758 msgid "LiteSpeed Cache is disabled. This functionality will not work." 5723 5759 msgstr "" 5724 5760 5725 #: tpl/toolbox/beta_test.tpl.php:4 55761 #: tpl/toolbox/beta_test.tpl.php:46 5726 5762 msgid "Use this section to switch plugin versions. To beta test a GitHub commit, enter the commit URL in the field below." 5727 5763 msgstr "" 5728 5764 5729 #: tpl/toolbox/beta_test.tpl.php:5 45765 #: tpl/toolbox/beta_test.tpl.php:55 5730 5766 msgid "Use latest GitHub Dev commit" 5731 5767 msgstr "" 5732 5768 5733 #: tpl/toolbox/beta_test.tpl.php:5 85769 #: tpl/toolbox/beta_test.tpl.php:59 5734 5770 msgid "Use latest GitHub Master commit" 5735 5771 msgstr "" 5736 5772 5737 #: tpl/toolbox/beta_test.tpl.php:6 25738 #: tpl/toolbox/beta_test.tpl.php:7 85773 #: tpl/toolbox/beta_test.tpl.php:63 5774 #: tpl/toolbox/beta_test.tpl.php:79 5739 5775 msgid "Use latest WordPress release version" 5740 5776 msgstr "" 5741 5777 5742 #: tpl/toolbox/beta_test.tpl.php:6 25778 #: tpl/toolbox/beta_test.tpl.php:63 5743 5779 msgid "OR" 5744 5780 msgstr "" 5745 5781 5746 #: tpl/toolbox/beta_test.tpl.php:7 05782 #: tpl/toolbox/beta_test.tpl.php:71 5747 5783 msgid "Downgrade not recommended. May cause fatal error due to refactored code." 5748 5784 msgstr "" 5749 5785 5750 #: tpl/toolbox/beta_test.tpl.php:7 55786 #: tpl/toolbox/beta_test.tpl.php:76 5751 5787 msgid "Press the %s button to use the most recent GitHub commit. Master is for release candidate & Dev is for experimental testing." 5752 5788 msgstr "" 5753 5789 5754 #: tpl/toolbox/beta_test.tpl.php:7 55790 #: tpl/toolbox/beta_test.tpl.php:76 5755 5791 msgid "Use latest GitHub Dev/Master commit" 5756 5792 msgstr "" 5757 5793 5758 #: tpl/toolbox/beta_test.tpl.php:7 85794 #: tpl/toolbox/beta_test.tpl.php:79 5759 5795 msgid "Press the %s button to stop beta testing and go back to the current release from the WordPress Plugin Directory." 5760 5796 msgstr "" 5761 5797 5762 #: tpl/toolbox/beta_test.tpl.php:8 25798 #: tpl/toolbox/beta_test.tpl.php:83 5763 5799 msgid "In order to avoid an upgrade error, you must be using %1$s or later before you can upgrade to %2$s versions." 5764 5800 msgstr "" -
litespeed-cache/trunk/litespeed-cache.php
r3352087 r3359287 4 4 * Plugin URI: https://www.litespeedtech.com/products/cache-plugins/wordpress-acceleration 5 5 * Description: High-performance page caching and site optimization from LiteSpeed 6 * Version: 7. 46 * Version: 7.5 7 7 * Author: LiteSpeed Technologies 8 8 * Author URI: https://www.litespeedtech.com … … 36 36 } 37 37 38 ! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '7. 4' );38 ! defined( 'LSCWP_V' ) && define( 'LSCWP_V', '7.5' ); 39 39 40 40 ! defined( 'LSCWP_CONTENT_DIR' ) && define( 'LSCWP_CONTENT_DIR', WP_CONTENT_DIR ); … … 76 76 77 77 // Define CLI 78 if ( ( defined( 'WP_CLI' ) && WP_CLI) || 'cli' === PHP_SAPI ) {78 if ( ( defined( 'WP_CLI' ) && constant('WP_CLI') ) || 'cli' === PHP_SAPI ) { 79 79 ! defined( 'LITESPEED_CLI' ) && define( 'LITESPEED_CLI', true ); 80 80 -
litespeed-cache/trunk/readme.txt
r3352091 r3359287 5 5 Requires PHP: 7.2 6 6 Tested up to: 6.8 7 Stable tag: 7. 47 Stable tag: 7.5 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl.html … … 257 257 258 258 == Changelog == 259 260 = 7.5 - Sep 10 2025 = 261 * 🌱**Image Optimize** New option `Optimize Image Sizes` to allow user to choose which image sizes to include in optimization request. 262 * 🐞**Purge** Purge Time setting will respect WP timezone setting now. (PR#893) 263 * 🐞**Conf** Fixed a minor type-casting bug, which could cause unnecessary QUIC.cloud sync configuration when the setting is empty. 264 * **Misc** Dropped unused rewrite rule from htaccess. 259 265 260 266 = 7.4 - Aug 28 2025 = -
litespeed-cache/trunk/src/admin-display.cls.php
r3352087 r3359287 234 234 235 235 /** 236 * Flat pages map: menu slug to template metadata. 237 * 238 * @var array<string,array{title:string,tpl:string,network?:bool}> 239 */ 240 private $_pages = []; 241 242 /** 236 243 * Initialize the class and set its properties. 237 244 * … … 239 246 */ 240 247 public function __construct() { 248 $this->_pages = [ 249 // Site-level pages 250 'litespeed' => [ 'title' => __( 'Dashboard', 'litespeed-cache' ), 'tpl' => 'dash/entry.tpl.php' ], 251 'litespeed-optimax' => [ 'title' => __( 'OptimaX', 'litespeed-cache' ), 'tpl' => 'optimax/entry.tpl.php' ], 252 'litespeed-presets' => [ 'title' => __( 'Presets', 'litespeed-cache' ), 'tpl' => 'presets/entry.tpl.php' ], 253 'litespeed-general' => [ 'title' => __( 'General', 'litespeed-cache' ), 'tpl' => 'general/entry.tpl.php' ], 254 'litespeed-cache' => [ 'title' => __( 'Cache', 'litespeed-cache' ), 'tpl' => 'cache/entry.tpl.php' ], 255 'litespeed-cdn' => [ 'title' => __( 'CDN', 'litespeed-cache' ), 'tpl' => 'cdn/entry.tpl.php' ], 256 'litespeed-img_optm' => [ 'title' => __( 'Image Optimization', 'litespeed-cache'), 'tpl' => 'img_optm/entry.tpl.php' ], 257 'litespeed-page_optm' => [ 'title' => __( 'Page Optimization', 'litespeed-cache' ), 'tpl' => 'page_optm/entry.tpl.php' ], 258 'litespeed-db_optm' => [ 'title' => __( 'Database', 'litespeed-cache' ), 'tpl' => 'db_optm/entry.tpl.php' ], 259 'litespeed-crawler' => [ 'title' => __( 'Crawler', 'litespeed-cache' ), 'tpl' => 'crawler/entry.tpl.php' ], 260 'litespeed-toolbox' => [ 'title' => __( 'Toolbox', 'litespeed-cache' ), 'tpl' => 'toolbox/entry.tpl.php' ], 261 262 // Network-level pages 263 'litespeed-network' => [ 'title' => 'LiteSpeed Cache (Network)', 'tpl' => 'dash/entry_network.tpl.php', 'network' => true ], 264 'litespeed-cache-network' => [ 'title' => __( 'Cache', 'litespeed-cache' ), 'tpl' => 'cache/entry_network.tpl.php', 'network' => true ], 265 ]; 266 241 267 // main css 242 268 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_style' ) ); … … 290 316 291 317 /** 318 * Bind per-page admin hooks for a given page hook. 319 * 320 * Adds footer text filter and preview banner when loading the page. 321 * 322 * @param string $hook Page hook suffix returned by add_*_page(). 323 * @return void 324 */ 325 private function bind_page( $hook ) { 326 add_action( "load-$hook", function () { 327 add_filter( 328 'admin_footer_text', 329 function ( $footer_text ) { 330 $this->cls( 'Cloud' )->maybe_preview_banner(); 331 require_once LSCWP_DIR . 'tpl/inc/admin_footer.php'; 332 return $footer_text; 333 }, 334 1 335 ); 336 } ); 337 } 338 339 /** 340 * Render an admin page by slug using its mapped template file. 341 * 342 * @param string $slug The menu slug registered in $_pages. 343 * @return void 344 */ 345 private function render_page( $slug ) { 346 $tpl = LSCWP_DIR . 'tpl/' . $this->_pages[ $slug ]['tpl']; 347 is_file( $tpl ) ? require $tpl : wp_die( 'Template not found' ); 348 } 349 350 /** 292 351 * Register the admin menu display. 293 352 * … … 297 356 public function register_admin_menu() { 298 357 $capability = $this->_is_network_admin ? 'manage_network_options' : 'manage_options'; 299 if ( current_user_can( $capability ) ) { 300 // root menu. 301 add_menu_page( 'LiteSpeed Cache', 'LiteSpeed Cache', 'manage_options', 'litespeed' ); 302 303 // sub menus. 304 $this->_add_submenu( __( 'Dashboard', 'litespeed-cache' ), 'litespeed', 'show_menu_dash' ); 305 306 if ( ! $this->_is_network_admin ) { 307 $this->_add_submenu( __( 'Presets', 'litespeed-cache' ), 'litespeed-presets', 'show_menu_presets' ); 308 } 309 310 $this->_add_submenu( __( 'General', 'litespeed-cache' ), 'litespeed-general', 'show_menu_general' ); 311 $this->_add_submenu( __( 'Cache', 'litespeed-cache' ), 'litespeed-cache', 'show_menu_cache' ); 312 313 if ( ! $this->_is_network_admin ) { 314 $this->_add_submenu( __( 'CDN', 'litespeed-cache' ), 'litespeed-cdn', 'show_menu_cdn' ); 315 } 316 317 $this->_add_submenu( __( 'Image Optimization', 'litespeed-cache' ), 'litespeed-img_optm', 'show_img_optm' ); 318 319 if ( ! $this->_is_network_admin ) { 320 $this->_add_submenu( __( 'Page Optimization', 'litespeed-cache' ), 'litespeed-page_optm', 'show_page_optm' ); 321 } 322 323 $this->_add_submenu( __( 'Database', 'litespeed-cache' ), 'litespeed-db_optm', 'show_db_optm' ); 324 325 if ( ! $this->_is_network_admin ) { 326 $this->_add_submenu( __( 'Crawler', 'litespeed-cache' ), 'litespeed-crawler', 'show_crawler' ); 327 } 328 329 $this->_add_submenu( __( 'Toolbox', 'litespeed-cache' ), 'litespeed-toolbox', 'show_toolbox' ); 330 331 // sub menus under options. 332 add_options_page( 'LiteSpeed Cache', 'LiteSpeed Cache', $capability, 'litespeed-cache-options', array( $this, 'show_menu_cache' ) ); 333 } 334 } 335 336 /** 337 * Helper to create a submenu. 338 * 339 * @since 1.0.4 340 * @access private 341 * 342 * @param string $menu_title The title that appears on the menu. 343 * @param string $menu_slug The slug of the page. 344 * @param string $callback The callback to call if selected. 345 * @return void 346 */ 347 private function _add_submenu( $menu_title, $menu_slug, $callback ) { 348 add_submenu_page( 'litespeed', $menu_title, $menu_title, 'manage_options', $menu_slug, array( $this, $callback ) ); 358 $scope = $this->_is_network_admin ? 'network' : 'site'; 359 $root = $this->_is_network_admin ? 'litespeed-network' : 'litespeed'; 360 361 add_menu_page( 362 'LiteSpeed Cache', 363 'LiteSpeed Cache', 364 $capability, 365 $root, 366 ); 367 368 foreach ( $this->_pages as $slug => $meta ) { 369 if ( 'litespeed-optimax' === $slug && !defined( 'LITESPEED_OX' ) ) { 370 continue; 371 } 372 $curr_scope = ! empty( $meta['network'] ) ? 'network' : 'site'; 373 if ( $curr_scope !== $scope ) { 374 continue; 375 } 376 $hook = add_submenu_page( 377 $root, 378 $meta['title'], 379 $meta['title'], 380 $capability, 381 $slug, 382 function () use ( $slug ) { 383 $this->render_page( $slug ); 384 } 385 ); 386 $this->bind_page( $hook ); 387 } 388 389 // sub menus under options. 390 $hook = add_options_page( 391 'LiteSpeed Cache', 392 'LiteSpeed Cache', 393 $capability, 394 'litespeed-cache-options', 395 function () { 396 $this->render_page( 'litespeed-cache' ); 397 } 398 ); 399 $this->bind_page( $hook ); 349 400 } 350 401 … … 385 436 386 437 if ( 'admin.php' === $pagenow && $page && ( 0 === strpos( $page, 'litespeed-' ) || 'litespeed' === $page ) ) { 387 // Admin footer388 add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 1 );389 390 438 if ( in_array( $page, array( 'litespeed-crawler', 'litespeed-cdn' ), true ) ) { 391 439 // Babel JS type correction … … 500 548 501 549 /** 502 * Change the admin footer text on LiteSpeed Cache admin pages.503 *504 * @since 1.0.13505 *506 * @param string $footer_text Footer text.507 * @return string508 */509 public function admin_footer_text( $footer_text ) {510 require_once LSCWP_DIR . 'tpl/inc/admin_footer.php';511 512 return $footer_text;513 }514 515 /**516 550 * Build a single notice HTML string. 517 551 * … … 671 705 if ( defined( 'LITESPEED_CLI' ) || wp_doing_cron() ) { 672 706 // WP CLI will show the info directly 673 if ( defined( 'WP_CLI' ) && WP_CLI) {707 if ( defined( 'WP_CLI' ) && constant('WP_CLI') ) { 674 708 if ( ! is_array( $msg ) ) { 675 709 $msg = array( $msg ); … … 871 905 public function show_widget_edit( $widget, $return_val, $instance ) { 872 906 require LSCWP_DIR . 'tpl/esi_widget_edit.php'; 873 }874 875 /**876 * Displays the dashboard page.877 *878 * @since 3.0879 * @return void880 */881 public function show_menu_dash() {882 $this->cls( 'Cloud' )->maybe_preview_banner();883 require_once LSCWP_DIR . 'tpl/dash/entry.tpl.php';884 }885 886 /**887 * Displays the Presets page.888 *889 * @since 5.3890 * @return void891 */892 public function show_menu_presets() {893 require_once LSCWP_DIR . 'tpl/presets/entry.tpl.php';894 }895 896 /**897 * Displays the General page.898 *899 * @since 3.0900 * @return void901 */902 public function show_menu_general() {903 $this->cls( 'Cloud' )->maybe_preview_banner();904 require_once LSCWP_DIR . 'tpl/general/entry.tpl.php';905 }906 907 /**908 * Displays the CDN page.909 *910 * @since 3.0911 * @return void912 */913 public function show_menu_cdn() {914 $this->cls( 'Cloud' )->maybe_preview_banner();915 require_once LSCWP_DIR . 'tpl/cdn/entry.tpl.php';916 }917 918 /**919 * Outputs the LiteSpeed Cache settings page.920 *921 * @since 1.0.0922 * @return void923 */924 public function show_menu_cache() {925 if ( $this->_is_network_admin ) {926 require_once LSCWP_DIR . 'tpl/cache/entry_network.tpl.php';927 } else {928 require_once LSCWP_DIR . 'tpl/cache/entry.tpl.php';929 }930 }931 932 /**933 * Tools page.934 *935 * @since 3.0936 * @return void937 */938 public function show_toolbox() {939 $this->cls( 'Cloud' )->maybe_preview_banner();940 require_once LSCWP_DIR . 'tpl/toolbox/entry.tpl.php';941 }942 943 /**944 * Outputs the crawler operation page.945 *946 * @since 1.1.0947 * @return void948 */949 public function show_crawler() {950 $this->cls( 'Cloud' )->maybe_preview_banner();951 require_once LSCWP_DIR . 'tpl/crawler/entry.tpl.php';952 }953 954 /**955 * Outputs the image optimization page.956 *957 * @since 1.6958 * @return void959 */960 public function show_img_optm() {961 $this->cls( 'Cloud' )->maybe_preview_banner();962 require_once LSCWP_DIR . 'tpl/img_optm/entry.tpl.php';963 }964 965 /**966 * Page optimization page.967 *968 * @since 3.0969 * @return void970 */971 public function show_page_optm() {972 $this->cls( 'Cloud' )->maybe_preview_banner();973 require_once LSCWP_DIR . 'tpl/page_optm/entry.tpl.php';974 }975 976 /**977 * DB optimization page.978 *979 * @since 3.0980 * @return void981 */982 public function show_db_optm() {983 require_once LSCWP_DIR . 'tpl/db_optm/entry.tpl.php';984 907 } 985 908 -
litespeed-cache/trunk/src/admin-settings.cls.php
r3352087 r3359287 80 80 if ( $child ) { 81 81 // []=xxx or [0]=xxx 82 $data = ! empty( $raw_data[ $id ][ $child ] ) ? $raw_data[ $id ][ $child ] : false;82 $data = ! empty( $raw_data[ $id ][ $child ] ) ? $raw_data[ $id ][ $child ] : $this->type_casting(false, $id); 83 83 } else { 84 $data = ! empty( $raw_data[ $id ] ) ? $raw_data[ $id ] : false;84 $data = ! empty( $raw_data[ $id ] ) ? $raw_data[ $id ] : $this->type_casting(false, $id); 85 85 } 86 86 … … 216 216 $data = $data2; 217 217 break; 218 219 case self::O_IMG_OPTM_SIZES_SKIPPED: // Skip image sizes 220 $image_sizes = Utility::prepare_image_sizes_array(); 221 $saved_sizes = isset( $raw_data[$id] ) ? $raw_data[$id] : []; 222 $data = array_diff( $image_sizes, $saved_sizes ); 223 break; 218 224 219 225 default: -
litespeed-cache/trunk/src/base.cls.php
r3352087 r3359287 1 1 <?php 2 // phpcs:ignoreFile3 2 /** 4 * The base const s3 * The base constants and defaults for LiteSpeed Cache. 5 4 * 6 * @since 3.7 5 * Defines all option keys, default values, and helper methods shared across the plugin. 6 * 7 * @since 3.7 8 * @package LiteSpeed 7 9 */ 8 10 … … 11 13 defined('WPINC') || exit(); 12 14 15 /** 16 * Class Base 17 * 18 * Core definitions and helpers shared across LiteSpeed Cache. 19 */ 13 20 class Base extends Root { 14 21 … … 25 32 const HASH = 'hash'; // Not set-able 26 33 const O_AUTO_UPGRADE = 'auto_upgrade'; 27 const O_API_KEY = 'api_key'; // Deprecated since v6.4. TODO: Will drop after v 6.534 const O_API_KEY = 'api_key'; // Deprecated since v6.4. TODO: Will drop after v8 (still need to keep for v7 upgrade conf usage as v6.5.4 has a major user base) 28 35 const O_SERVER_IP = 'server_ip'; 29 36 const O_GUEST = 'guest'; … … 41 48 const O_CACHE_REST = 'cache-rest'; 42 49 const O_CACHE_PAGE_LOGIN = 'cache-page_login'; 43 const O_CACHE_FAVICON = 'cache-favicon'; // Deprecated since v6.2. TODO: Will drop after v6.544 50 const O_CACHE_RES = 'cache-resources'; // Deprecated since v7.2. TODO: Drop after v7.5 45 51 const O_CACHE_MOBILE = 'cache-mobile'; … … 230 236 const O_IMG_OPTM_WEBP = 'img_optm-webp'; 231 237 const O_IMG_OPTM_LOSSLESS = 'img_optm-lossless'; 238 const O_IMG_OPTM_SIZES_SKIPPED = 'img_optm-sizes_skipped'; 232 239 const O_IMG_OPTM_EXIF = 'img_optm-exif'; 233 240 const O_IMG_OPTM_WEBP_ATTR = 'img_optm-webp_attr'; … … 280 287 const O_QC_CNAME = 'qc-cname'; 281 288 289 // -------------------------------------------------- ## 290 // -------------- OptimaX ----------------- ## 291 // -------------------------------------------------- ## 292 const O_OPTIMAX = 'optimax'; 293 282 294 const NETWORK_O_USE_PRIMARY = 'use_primary_settings'; 283 295 … … 312 324 const IMG_OPTM_BM_AVIF = 16; // @Deprecated since v7.0 313 325 314 /* Site related options (Will not overwrite other sites' config) */ 315 protected static $SINGLE_SITE_OPTIONS = array( 326 /** 327 * Site related options (Will not overwrite other sites' config). 328 * 329 * @var string[] 330 */ 331 protected static $single_site_options = [ 316 332 self::O_CRAWLER, 317 333 self::O_CRAWLER_SITEMAP, … … 330 346 self::O_QC_NAMESERVERS, 331 347 self::O_QC_CNAME, 332 ); 333 334 protected static $_default_options = array( 348 ]; 349 350 /** 351 * Default options for single-site installs. 352 * 353 * @var array<string,mixed> 354 */ 355 protected static $_default_options = [ 335 356 self::_VER => '', 336 357 self::HASH => '', … … 341 362 self::O_GUEST_OPTM => false, 342 363 self::O_NEWS => false, 343 self::O_GUEST_UAS => array(),344 self::O_GUEST_IPS => array(),364 self::O_GUEST_UAS => [], 365 self::O_GUEST_IPS => [], 345 366 346 367 // Cache … … 351 372 self::O_CACHE_PAGE_LOGIN => false, 352 373 self::O_CACHE_MOBILE => false, 353 self::O_CACHE_MOBILE_RULES => array(),374 self::O_CACHE_MOBILE_RULES => [], 354 375 self::O_CACHE_BROWSER => false, 355 self::O_CACHE_EXC_USERAGENTS => array(),356 self::O_CACHE_EXC_COOKIES => array(),357 self::O_CACHE_EXC_QS => array(),358 self::O_CACHE_EXC_CAT => array(),359 self::O_CACHE_EXC_TAG => array(),360 self::O_CACHE_FORCE_URI => array(),361 self::O_CACHE_FORCE_PUB_URI => array(),362 self::O_CACHE_PRIV_URI => array(),363 self::O_CACHE_EXC => array(),364 self::O_CACHE_EXC_ROLES => array(),365 self::O_CACHE_DROP_QS => array(),376 self::O_CACHE_EXC_USERAGENTS => [], 377 self::O_CACHE_EXC_COOKIES => [], 378 self::O_CACHE_EXC_QS => [], 379 self::O_CACHE_EXC_CAT => [], 380 self::O_CACHE_EXC_TAG => [], 381 self::O_CACHE_FORCE_URI => [], 382 self::O_CACHE_FORCE_PUB_URI => [], 383 self::O_CACHE_PRIV_URI => [], 384 self::O_CACHE_EXC => [], 385 self::O_CACHE_EXC_ROLES => [], 386 self::O_CACHE_DROP_QS => [], 366 387 self::O_CACHE_TTL_PUB => 0, 367 388 self::O_CACHE_TTL_PRIV => 0, … … 370 391 self::O_CACHE_TTL_REST => 0, 371 392 self::O_CACHE_TTL_BROWSER => 0, 372 self::O_CACHE_TTL_STATUS => array(),393 self::O_CACHE_TTL_STATUS => [], 373 394 self::O_CACHE_LOGIN_COOKIE => '', 374 self::O_CACHE_AJAX_TTL => array(),375 self::O_CACHE_VARY_COOKIES => array(),376 self::O_CACHE_VARY_GROUP => array(),395 self::O_CACHE_AJAX_TTL => [], 396 self::O_CACHE_VARY_COOKIES => [], 397 self::O_CACHE_VARY_GROUP => [], 377 398 378 399 // Purge … … 390 411 self::O_PURGE_POST_TERM => false, 391 412 self::O_PURGE_POST_POSTTYPE => false, 392 self::O_PURGE_TIMED_URLS => array(),413 self::O_PURGE_TIMED_URLS => [], 393 414 self::O_PURGE_TIMED_URLS_TIME => '', 394 self::O_PURGE_HOOK_ALL => array(),415 self::O_PURGE_HOOK_ALL => [], 395 416 396 417 // ESI … … 398 419 self::O_ESI_CACHE_ADMBAR => false, 399 420 self::O_ESI_CACHE_COMMFORM => false, 400 self::O_ESI_NONCE => array(),421 self::O_ESI_NONCE => [], 401 422 402 423 // Util … … 407 428 self::O_DEBUG_DISABLE_ALL => false, 408 429 self::O_DEBUG => false, 409 self::O_DEBUG_IPS => array(),430 self::O_DEBUG_IPS => [], 410 431 self::O_DEBUG_LEVEL => false, 411 432 self::O_DEBUG_FILESIZE => 0, 412 433 self::O_DEBUG_COLLAPSE_QS => false, 413 self::O_DEBUG_INC => array(),414 self::O_DEBUG_EXC => array(),415 self::O_DEBUG_EXC_STRINGS => array(),434 self::O_DEBUG_INC => [], 435 self::O_DEBUG_EXC => [], 436 self::O_DEBUG_EXC_STRINGS => [], 416 437 417 438 // DB Optm … … 425 446 self::O_OPTM_UCSS => false, 426 447 self::O_OPTM_UCSS_INLINE => false, 427 self::O_OPTM_UCSS_SELECTOR_WHITELIST => array(),428 self::O_OPTM_UCSS_FILE_EXC_INLINE => array(),429 self::O_OPTM_UCSS_EXC => array(),430 self::O_OPTM_CSS_EXC => array(),448 self::O_OPTM_UCSS_SELECTOR_WHITELIST => [], 449 self::O_OPTM_UCSS_FILE_EXC_INLINE => [], 450 self::O_OPTM_UCSS_EXC => [], 451 self::O_OPTM_CSS_EXC => [], 431 452 self::O_OPTM_JS_MIN => false, 432 453 self::O_OPTM_JS_COMB => false, 433 454 self::O_OPTM_JS_COMB_EXT_INL => false, 434 self::O_OPTM_JS_DELAY_INC => array(),435 self::O_OPTM_JS_EXC => array(),455 self::O_OPTM_JS_DELAY_INC => [], 456 self::O_OPTM_JS_EXC => [], 436 457 self::O_OPTM_HTML_MIN => false, 437 self::O_OPTM_HTML_LAZY => array(),438 self::O_OPTM_HTML_SKIP_COMMENTS => array(),458 self::O_OPTM_HTML_LAZY => [], 459 self::O_OPTM_HTML_SKIP_COMMENTS => [], 439 460 self::O_OPTM_QS_RM => false, 440 461 self::O_OPTM_GGFONTS_RM => false, 441 462 self::O_OPTM_CSS_ASYNC => false, 442 463 self::O_OPTM_CCSS_PER_URL => false, 443 self::O_OPTM_CCSS_SEP_POSTTYPE => array(),444 self::O_OPTM_CCSS_SEP_URI => array(),445 self::O_OPTM_CCSS_SELECTOR_WHITELIST => array(),464 self::O_OPTM_CCSS_SEP_POSTTYPE => [], 465 self::O_OPTM_CCSS_SEP_URI => [], 466 self::O_OPTM_CCSS_SELECTOR_WHITELIST => [], 446 467 self::O_OPTM_CSS_ASYNC_INLINE => false, 447 468 self::O_OPTM_CSS_FONT_DISPLAY => false, … … 450 471 self::O_OPTM_NOSCRIPT_RM => false, 451 472 self::O_OPTM_GGFONTS_ASYNC => false, 452 self::O_OPTM_EXC_ROLES => array(),473 self::O_OPTM_EXC_ROLES => [], 453 474 self::O_OPTM_CCSS_CON => '', 454 self::O_OPTM_JS_DEFER_EXC => array(),455 self::O_OPTM_GM_JS_EXC => array(),456 self::O_OPTM_DNS_PREFETCH => array(),475 self::O_OPTM_JS_DEFER_EXC => [], 476 self::O_OPTM_GM_JS_EXC => [], 477 self::O_OPTM_DNS_PREFETCH => [], 457 478 self::O_OPTM_DNS_PREFETCH_CTRL => false, 458 self::O_OPTM_DNS_PRECONNECT => array(),459 self::O_OPTM_EXC => array(),479 self::O_OPTM_DNS_PRECONNECT => [], 480 self::O_OPTM_EXC => [], 460 481 self::O_OPTM_GUEST_ONLY => false, 461 482 … … 472 493 self::O_OBJECT_USER => '', 473 494 self::O_OBJECT_PSWD => '', 474 self::O_OBJECT_GLOBAL_GROUPS => array(),475 self::O_OBJECT_NON_PERSISTENT_GROUPS => array(),495 self::O_OBJECT_GLOBAL_GROUPS => [], 496 self::O_OBJECT_NON_PERSISTENT_GROUPS => [], 476 497 477 498 // Discuss … … 480 501 self::O_DISCUSS_AVATAR_CACHE_TTL => 0, 481 502 self::O_OPTM_LOCALIZE => false, 482 self::O_OPTM_LOCALIZE_DOMAINS => array(),503 self::O_OPTM_LOCALIZE_DOMAINS => [], 483 504 484 505 // Media … … 495 516 self::O_MEDIA_IFRAME_LAZY => false, 496 517 self::O_MEDIA_ADD_MISSING_SIZES => false, 497 self::O_MEDIA_LAZY_EXC => array(),498 self::O_MEDIA_LAZY_CLS_EXC => array(),499 self::O_MEDIA_LAZY_PARENT_CLS_EXC => array(),500 self::O_MEDIA_IFRAME_LAZY_CLS_EXC => array(),501 self::O_MEDIA_IFRAME_LAZY_PARENT_CLS_EXC => array(),502 self::O_MEDIA_LAZY_URI_EXC => array(),503 self::O_MEDIA_LQIP_EXC => array(),518 self::O_MEDIA_LAZY_EXC => [], 519 self::O_MEDIA_LAZY_CLS_EXC => [], 520 self::O_MEDIA_LAZY_PARENT_CLS_EXC => [], 521 self::O_MEDIA_IFRAME_LAZY_CLS_EXC => [], 522 self::O_MEDIA_IFRAME_LAZY_PARENT_CLS_EXC => [], 523 self::O_MEDIA_LAZY_URI_EXC => [], 524 self::O_MEDIA_LQIP_EXC => [], 504 525 self::O_MEDIA_VPI => false, 505 526 self::O_MEDIA_VPI_CRON => false, … … 512 533 self::O_IMG_OPTM_WEBP => false, 513 534 self::O_IMG_OPTM_LOSSLESS => false, 535 self::O_IMG_OPTM_SIZES_SKIPPED => [], 514 536 self::O_IMG_OPTM_EXIF => false, 515 self::O_IMG_OPTM_WEBP_ATTR => array(),537 self::O_IMG_OPTM_WEBP_ATTR => [], 516 538 self::O_IMG_OPTM_WEBP_REPLACE_SRCSET => false, 517 539 self::O_IMG_OPTM_JPG_QUALITY => 0, … … 522 544 self::O_CRAWLER_LOAD_LIMIT => 0, 523 545 self::O_CRAWLER_SITEMAP => '', 524 self::O_CRAWLER_ROLES => array(),525 self::O_CRAWLER_COOKIES => array(),546 self::O_CRAWLER_ROLES => [], 547 self::O_CRAWLER_COOKIES => [], 526 548 527 549 // Misc … … 535 557 // CDN 536 558 self::O_CDN => false, 537 self::O_CDN_ORI => array(),538 self::O_CDN_ORI_DIR => array(),539 self::O_CDN_EXC => array(),559 self::O_CDN_ORI => [], 560 self::O_CDN_ORI_DIR => [], 561 self::O_CDN_EXC => [], 540 562 self::O_CDN_QUIC => false, 541 563 self::O_CDN_CLOUDFLARE => false, … … 545 567 self::O_CDN_CLOUDFLARE_ZONE => '', 546 568 self::O_CDN_CLOUDFLARE_CLEAR => false, 547 self::O_CDN_MAPPING => array(),548 self::O_CDN_ATTR => array(),569 self::O_CDN_MAPPING => [], 570 self::O_CDN_ATTR => [], 549 571 550 572 self::O_QC_NAMESERVERS => '', … … 552 574 553 575 self::DEBUG_TMP_DISABLE => 0, 554 ); 555 556 protected static $_default_site_options = array( 576 ]; 577 578 /** 579 * Default options for multisite (site-level options stored network-wide). 580 * 581 * @var array<string,mixed> 582 */ 583 protected static $_default_site_options = [ 557 584 self::_VER => '', 558 585 self::O_CACHE => false, … … 563 590 self::O_CACHE_BROWSER => false, 564 591 self::O_CACHE_MOBILE => false, 565 self::O_CACHE_MOBILE_RULES => array(),592 self::O_CACHE_MOBILE_RULES => [], 566 593 self::O_CACHE_LOGIN_COOKIE => '', 567 self::O_CACHE_VARY_COOKIES => array(),568 self::O_CACHE_EXC_COOKIES => array(),569 self::O_CACHE_EXC_USERAGENTS => array(),594 self::O_CACHE_VARY_COOKIES => [], 595 self::O_CACHE_EXC_COOKIES => [], 596 self::O_CACHE_EXC_USERAGENTS => [], 570 597 self::O_CACHE_TTL_BROWSER => 0, 571 598 … … 583 610 self::O_OBJECT_USER => '', 584 611 self::O_OBJECT_PSWD => '', 585 self::O_OBJECT_GLOBAL_GROUPS => array(),586 self::O_OBJECT_NON_PERSISTENT_GROUPS => array(),612 self::O_OBJECT_GLOBAL_GROUPS => [], 613 self::O_OBJECT_NON_PERSISTENT_GROUPS => [], 587 614 588 615 // Debug 589 616 self::O_DEBUG_DISABLE_ALL => false, 590 617 self::O_DEBUG => false, 591 self::O_DEBUG_IPS => array(),618 self::O_DEBUG_IPS => [], 592 619 self::O_DEBUG_LEVEL => false, 593 620 self::O_DEBUG_FILESIZE => 0, 594 621 self::O_DEBUG_COLLAPSE_QS => false, 595 self::O_DEBUG_INC => array(),596 self::O_DEBUG_EXC => array(),597 self::O_DEBUG_EXC_STRINGS => array(),622 self::O_DEBUG_INC => [], 623 self::O_DEBUG_EXC => [], 624 self::O_DEBUG_EXC_STRINGS => [], 598 625 599 626 self::O_IMG_OPTM_WEBP => false, 600 ); 601 602 // NOTE: all the val of following items will be int while not bool 603 protected static $_multi_switch_list = array( 627 ]; 628 629 /** 630 * Multi-switch options: option ID => max state (int). 631 * NOTE: all the val of following items will be int while not bool 632 * 633 * @var array<string,int> 634 */ 635 protected static $_multi_switch_list = [ 604 636 self::O_DEBUG => 2, 605 637 self::O_OPTM_JS_DEFER => 2, 606 638 self::O_IMG_OPTM_WEBP => 2, 607 );608 609 /** 610 * Correct the option type 639 ]; 640 641 /** 642 * Correct the option type. 611 643 * 612 644 * TODO: add similar network func 613 645 * 614 * @since 3.0.3 646 * @since 3.0.3 647 * 648 * @param mixed $val Incoming value. 649 * @param string $id Option ID. 650 * @param bool $is_site_conf Whether using site-level defaults. 651 * @return mixed 615 652 */ 616 653 protected function type_casting( $val, $id, $is_site_conf = false ) { 617 $default_v = ! $is_site_conf ? self::$_default_options[$id] : self::$_default_site_options[$id];618 if ( is_bool($default_v)) {619 if ( $val === 'true') {654 $default_v = ! $is_site_conf ? self::$_default_options[ $id ] : self::$_default_site_options[ $id ]; 655 if ( is_bool( $default_v ) ) { 656 if ( 'true' === $val ) { 620 657 $val = true; 621 658 } 622 if ( $val === 'false') {659 if ( 'false' === $val ) { 623 660 $val = false; 624 661 } 625 662 626 $max = $this->_conf_multi_switch( $id);627 if ( $max) {663 $max = $this->_conf_multi_switch( $id ); 664 if ( $max ) { 628 665 $val = (int) $val; 629 666 $val %= $max + 1; … … 631 668 $val = (bool) $val; 632 669 } 633 } elseif ( is_array($default_v)) {670 } elseif ( is_array( $default_v ) ) { 634 671 // from textarea input 635 if ( !is_array($val)) {636 $val = Utility::sanitize_lines( $val, $this->_conf_filter($id));672 if ( ! is_array( $val ) ) { 673 $val = Utility::sanitize_lines( $val, $this->_conf_filter( $id ) ); 637 674 } 638 } elseif ( !is_string($default_v)) {675 } elseif ( ! is_string( $default_v ) ) { 639 676 $val = (int) $val; 640 677 } else { 641 678 // Check if the string has a limit set 642 $val = $this->_conf_string_val( $id, $val);679 $val = $this->_conf_string_val( $id, $val ); 643 680 } 644 681 … … 649 686 * Load default network settings from data.ini 650 687 * 651 * @since 3.0 688 * @since 3.0 689 * @return array<string,mixed> 652 690 */ 653 691 public function load_default_site_vals() { 654 692 // Load network_default.json 655 if ( file_exists(LSCWP_DIR . 'data/const.network_default.json')) {656 $default_ini_cfg = json_decode( File::read(LSCWP_DIR . 'data/const.network_default.json'), true);657 foreach ( self::$_default_site_options as $k => $v) {658 if ( !array_key_exists($k, $default_ini_cfg)) {693 if ( file_exists( LSCWP_DIR . 'data/const.network_default.json' ) ) { 694 $default_ini_cfg = json_decode( File::read( LSCWP_DIR . 'data/const.network_default.json' ), true ); 695 foreach ( self::$_default_site_options as $k => $v ) { 696 if ( ! array_key_exists( $k, $default_ini_cfg ) ) { 659 697 continue; 660 698 } 661 699 662 700 // Parse value in ini file 663 $ini_v = $this->type_casting( $default_ini_cfg[$k], $k, true);664 665 if ( $ini_v == $v) {701 $ini_v = $this->type_casting( $default_ini_cfg[ $k ], $k, true ); 702 703 if ( $ini_v === $v ) { 666 704 continue; 667 705 } 668 706 669 self::$_default_site_options[ $k] = $ini_v;707 self::$_default_site_options[ $k ] = $ini_v; 670 708 } 671 709 } 672 710 673 self::$_default_site_options[ self::_VER] = Core::VER;711 self::$_default_site_options[ self::_VER ] = Core::VER; 674 712 675 713 return self::$_default_site_options; … … 681 719 * @since 3.0 682 720 * @access public 721 * @return array<string,mixed> 683 722 */ 684 723 public function load_default_vals() { 685 724 // Load default.json 686 if ( file_exists(LSCWP_DIR . 'data/const.default.json')) {687 $default_ini_cfg = json_decode( File::read(LSCWP_DIR . 'data/const.default.json'), true);688 foreach ( self::$_default_options as $k => $v) {689 if ( !array_key_exists($k, $default_ini_cfg)) {725 if ( file_exists( LSCWP_DIR . 'data/const.default.json' ) ) { 726 $default_ini_cfg = json_decode( File::read( LSCWP_DIR . 'data/const.default.json' ), true ); 727 foreach ( self::$_default_options as $k => $v ) { 728 if ( ! array_key_exists( $k, $default_ini_cfg ) ) { 690 729 continue; 691 730 } 692 731 693 732 // Parse value in ini file 694 $ini_v = $this->type_casting( $default_ini_cfg[$k], $k);733 $ini_v = $this->type_casting( $default_ini_cfg[ $k ], $k ); 695 734 696 735 // NOTE: Multiple lines value must be stored as array … … 698 737 * Special handler for CDN_mapping 699 738 * 700 * format in .ini:739 * Format in .ini: 701 740 * [cdn-mapping] 702 741 * url[0] = 'https://example.com/' … … 709 748 * [0] = [ 'url' => 'https://example.com', 'inc_js' => true, 'filetype' => [ '.css', '.js', '.jpg' ] ] 710 749 */ 711 if ( $k == self::O_CDN_MAPPING) {712 $mapping_fields = array(750 if ( self::O_CDN_MAPPING === $k ) { 751 $mapping_fields = [ 713 752 self::CDN_MAPPING_URL, 714 753 self::CDN_MAPPING_INC_IMG, … … 716 755 self::CDN_MAPPING_INC_JS, 717 756 self::CDN_MAPPING_FILETYPE, // Array 718 );719 $ini_v2 = array();720 foreach ( $ini_v[self::CDN_MAPPING_URL] as $k2 => $v2) {757 ]; 758 $ini_v2 = []; 759 foreach ( $ini_v[ self::CDN_MAPPING_URL ] as $k2 => $v2 ) { 721 760 // $k2 is numeric 722 $this_row = array(); 723 foreach ($mapping_fields as $v3) { 724 $this_v = !empty($ini_v[$v3][$k2]) ? $ini_v[$v3][$k2] : false; 725 if ($v3 == self::CDN_MAPPING_URL) { 726 $this_v = $this_v ?: ''; 761 $this_row = []; 762 foreach ( $mapping_fields as $v3 ) { 763 $this_v = ! empty( $ini_v[ $v3 ][ $k2 ] ) ? $ini_v[ $v3 ][ $k2 ] : false; 764 if ( self::CDN_MAPPING_URL === $v3 ) { 765 if ( empty( $this_v ) ) { 766 $this_v = ''; 767 } 727 768 } 728 if ( $v3 == self::CDN_MAPPING_FILETYPE) {729 $this_v = $this_v ? Utility::sanitize_lines( $this_v) : array(); // Note: Since v3.0 its already an array769 if ( self::CDN_MAPPING_FILETYPE === $v3 ) { 770 $this_v = $this_v ? Utility::sanitize_lines( $this_v ) : []; // Note: Since v3.0 its already an array 730 771 } 731 $this_row[ $v3] = $this_v;772 $this_row[ $v3 ] = $this_v; 732 773 } 733 $ini_v2[ $k2] = $this_row;774 $ini_v2[ $k2 ] = $this_row; 734 775 } 735 776 $ini_v = $ini_v2; 736 777 } 737 778 738 if ( $ini_v == $v) {779 if ( $ini_v === $v ) { 739 780 continue; 740 781 } 741 782 742 self::$_default_options[ $k] = $ini_v;783 self::$_default_options[ $k ] = $ini_v; 743 784 } 744 785 } … … 746 787 // Load internal default vals 747 788 // Setting the default bool to int is also to avoid type casting override it back to bool 748 self::$_default_options[ self::O_CACHE] = is_multisite() ? self::VAL_ON2 : self::VAL_ON; // For multi site, default is 2 (Use Network Admin Settings). For single site, default is 1 (Enabled).789 self::$_default_options[ self::O_CACHE ] = is_multisite() ? self::VAL_ON2 : self::VAL_ON; // For multi site, default is 2 (Use Network Admin Settings). For single site, default is 1 (Enabled). 749 790 750 791 // Load default vals containing variables 751 if ( !self::$_default_options[self::O_CDN_ORI_DIR]) {752 self::$_default_options[ self::O_CDN_ORI_DIR] = LSCWP_CONTENT_FOLDER . "\nwp-includes";753 self::$_default_options[ self::O_CDN_ORI_DIR] = explode("\n", self::$_default_options[self::O_CDN_ORI_DIR]);754 self::$_default_options[ self::O_CDN_ORI_DIR] = array_map('trim', self::$_default_options[self::O_CDN_ORI_DIR]);792 if ( ! self::$_default_options[ self::O_CDN_ORI_DIR ] ) { 793 self::$_default_options[ self::O_CDN_ORI_DIR ] = LSCWP_CONTENT_FOLDER . "\nwp-includes"; 794 self::$_default_options[ self::O_CDN_ORI_DIR ] = explode( "\n", self::$_default_options[ self::O_CDN_ORI_DIR ] ); 795 self::$_default_options[ self::O_CDN_ORI_DIR ] = array_map( 'trim', self::$_default_options[ self::O_CDN_ORI_DIR ] ); 755 796 } 756 797 757 798 // Set security key if not initialized yet 758 if ( !self::$_default_options[self::HASH]) {759 self::$_default_options[ self::HASH] = Str::rrand(32);799 if ( ! self::$_default_options[ self::HASH ] ) { 800 self::$_default_options[ self::HASH ] = Str::rrand( 32 ); 760 801 } 761 802 762 self::$_default_options[ self::_VER] = Core::VER;803 self::$_default_options[ self::_VER ] = Core::VER; 763 804 764 805 return self::$_default_options; … … 766 807 767 808 /** 768 * Format the string value 769 * 770 * @since 3.0 809 * Format the string value. 810 * 811 * @since 3.0 812 * 813 * @param string $id Option ID. 814 * @param mixed $val Value. 815 * @return string 771 816 */ 772 817 protected function _conf_string_val( $id, $val ) { 773 return $val; 774 } 775 776 /** 777 * If the switch setting is a triple value or not 778 * 779 * @since 3.0 818 return (string) $val; 819 } 820 821 /** 822 * If the switch setting is a triple value or not. 823 * 824 * @since 3.0 825 * 826 * @param string $id Option ID. 827 * @return int|false 780 828 */ 781 829 protected function _conf_multi_switch( $id ) { 782 if ( !empty(self::$_multi_switch_list[$id])) {783 return self::$_multi_switch_list[ $id];830 if ( ! empty( self::$_multi_switch_list[ $id ] ) ) { 831 return self::$_multi_switch_list[ $id ]; 784 832 } 785 833 786 if ( $id == self::O_CACHE && is_multisite()) {834 if ( self::O_CACHE === $id && is_multisite() ) { 787 835 return self::VAL_ON2; 788 836 } … … 792 840 793 841 /** 794 * Append a new multi switch max limit for the bool option 795 * 796 * @since 3.0 842 * Append a new multi switch max limit for the bool option. 843 * 844 * @since 3.0 845 * 846 * @param string $id Option ID. 847 * @param int $v Max state. 848 * @return void 797 849 */ 798 850 public static function set_multi_switch( $id, $v ) { 799 self::$_multi_switch_list[$id] = $v; 800 } 801 802 /** 803 * Generate const name based on $id 804 * 805 * @since 3.0 851 self::$_multi_switch_list[ $id ] = $v; 852 } 853 854 /** 855 * Generate const name based on $id. 856 * 857 * @since 3.0 858 * 859 * @param string $id Option ID. 860 * @return string 806 861 */ 807 862 public static function conf_const( $id ) { 808 return 'LITESPEED_CONF__' . strtoupper(str_replace('-', '__', $id)); 809 } 810 811 /** 812 * Filter to be used when saving setting 813 * 814 * @since 3.0 863 return 'LITESPEED_CONF__' . strtoupper( str_replace( '-', '__', $id ) ); 864 } 865 866 /** 867 * Filter to be used when saving setting. 868 * 869 * @since 3.0 870 * 871 * @param string $id Option ID. 872 * @return string|false 815 873 */ 816 874 protected function _conf_filter( $id ) { 817 $filters = array(875 $filters = [ 818 876 self::O_MEDIA_LAZY_EXC => 'uri', 819 877 self::O_DEBUG_INC => 'relative', … … 835 893 // self:: => '', 836 894 // self:: => '', 837 );838 839 if ( !empty($filters[$id])) {840 return $filters[ $id];895 ]; 896 897 if ( ! empty( $filters[ $id ] ) ) { 898 return $filters[ $id ]; 841 899 } 842 900 … … 845 903 846 904 /** 847 * If the setting changes worth a purge or not 848 * 849 * @since 3.0 905 * If the setting changes worth a purge or not. 906 * 907 * @since 3.0 908 * 909 * @param string $id Option ID. 910 * @return bool 850 911 */ 851 912 protected function _conf_purge( $id ) { 852 $check_ids = array(913 $check_ids = [ 853 914 self::O_MEDIA_LAZY_URI_EXC, 854 915 self::O_OPTM_EXC, … … 858 919 self::O_CACHE_FORCE_PUB_URI, 859 920 self::O_CACHE_EXC, 860 ); 861 862 return in_array($id, $check_ids); 863 } 864 865 /** 866 * If the setting changes worth a purge ALL or not 867 * 868 * @since 3.0 921 ]; 922 923 return in_array( $id, $check_ids, true ); 924 } 925 926 /** 927 * If the setting changes worth a purge ALL or not. 928 * 929 * @since 3.0 930 * 931 * @param string $id Option ID. 932 * @return bool 869 933 */ 870 934 protected function _conf_purge_all( $id ) { 871 $check_ids = array( self::O_CACHE, self::O_ESI, self::O_DEBUG_DISABLE_ALL, self::NETWORK_O_USE_PRIMARY ); 872 873 return in_array($id, $check_ids); 874 } 875 876 /** 877 * If the setting is a pswd or not 878 * 879 * @since 3.0 935 $check_ids = [ self::O_CACHE, self::O_ESI, self::O_DEBUG_DISABLE_ALL, self::NETWORK_O_USE_PRIMARY ]; 936 937 return in_array( $id, $check_ids, true ); 938 } 939 940 /** 941 * If the setting is a password or not. 942 * 943 * @since 3.0 944 * 945 * @param string $id Option ID. 946 * @return bool 880 947 */ 881 948 protected function _conf_pswd( $id ) { 882 $check_ids = array( self::O_CDN_CLOUDFLARE_KEY, self::O_OBJECT_PSWD ); 883 884 return in_array($id, $check_ids); 885 } 886 887 /** 888 * If the setting is cron related or not 889 * 890 * @since 3.0 949 $check_ids = [ self::O_CDN_CLOUDFLARE_KEY, self::O_OBJECT_PSWD ]; 950 951 return in_array( $id, $check_ids, true ); 952 } 953 954 /** 955 * If the setting is cron related or not. 956 * 957 * @since 3.0 958 * 959 * @param string $id Option ID. 960 * @return bool 891 961 */ 892 962 protected function _conf_cron( $id ) { 893 $check_ids = array( self::O_OPTM_CSS_ASYNC, self::O_MEDIA_PLACEHOLDER_RESP_ASYNC, self::O_DISCUSS_AVATAR_CRON, self::O_IMG_OPTM_AUTO, self::O_CRAWLER ); 894 895 return in_array($id, $check_ids); 896 } 897 898 /** 899 * If the setting changes worth a purge, return the tag 900 * 901 * @since 3.0 963 $check_ids = [ self::O_OPTM_CSS_ASYNC, self::O_MEDIA_PLACEHOLDER_RESP_ASYNC, self::O_DISCUSS_AVATAR_CRON, self::O_IMG_OPTM_AUTO, self::O_CRAWLER ]; 964 965 return in_array( $id, $check_ids, true ); 966 } 967 968 /** 969 * If the setting changes worth a purge, return the tag. 970 * 971 * @since 3.0 972 * 973 * @param string $id Option ID. 974 * @return string|false 902 975 */ 903 976 protected function _conf_purge_tag( $id ) { 904 $check_ids = array(977 $check_ids = [ 905 978 self::O_CACHE_PAGE_LOGIN => Tag::TYPE_LOGIN, 906 );907 908 if ( !empty($check_ids[$id])) {909 return $check_ids[ $id];979 ]; 980 981 if ( ! empty( $check_ids[ $id ] ) ) { 982 return $check_ids[ $id ]; 910 983 } 911 984 … … 914 987 915 988 /** 916 * Generate server vars 989 * Generate server vars. 917 990 * 918 991 * @since 2.4.1 992 * 993 * @return array<string,mixed> Map of constant name => value|null. 919 994 */ 920 995 public function server_vars() { 921 $consts = array(996 $consts = [ 922 997 'WP_SITEURL', 923 998 'WP_HOME', … … 934 1009 'LSWCP_TAG_PREFIX', 935 1010 'COOKIEHASH', 936 );937 $server_vars = array();938 foreach ( $consts as $v) {939 $server_vars[ $v] = defined($v) ? constant($v) : null;1011 ]; 1012 $server_vars = []; 1013 foreach ( $consts as $v ) { 1014 $server_vars[ $v ] = defined( $v ) ? constant( $v ) : null; 940 1015 } 941 1016 -
litespeed-cache/trunk/src/cloud.cls.php
r3352087 r3359287 756 756 'php' => phpversion(), 757 757 ); 758 // If code ver is smaller than db ver, bypass 759 if (!empty($req_data['v']) && version_compare(Core::VER, $req_data['v'], '<')) { 760 return; 761 } 758 762 if (defined('LITESPEED_ERR')) { 759 $req_data['err'] = base64_encode(!is_string(LITESPEED_ERR) ? \json_encode(LITESPEED_ERR) : LITESPEED_ERR); 763 $LITESPEED_ERR = constant('LITESPEED_ERR'); 764 $req_data['err'] = base64_encode(!is_string($LITESPEED_ERR) ? \json_encode($LITESPEED_ERR) : $LITESPEED_ERR); 760 765 } 761 766 $data = self::post(self::API_VER, $req_data); … … 1157 1162 1158 1163 self::save_summary(array( 'curr_request.' . $service_tag => time() )); 1159 File::save( LITESPEED_STATIC_DIR . '/qc_curr_request' . md5($service_tag), time(), true);1164 File::save($this->_qc_time_file($service_tag, 'curr'), time(), true); 1160 1165 1161 1166 $response = wp_safe_remote_get($url, array( … … 1215 1220 $expiration_req = self::EXPIRATION_REQ; 1216 1221 // Limit frequent unfinished request to 5min 1217 $timestamp_tag = 'curr _request.';1222 $timestamp_tag = 'curr'; 1218 1223 if ($service_tag == self::SVC_IMG_OPTM . '-' . Img_Optm::TYPE_NEW_REQ) { 1219 $timestamp_tag = 'last _request.';1224 $timestamp_tag = 'last'; 1220 1225 } 1221 1226 1222 1227 // For all other requests, if is under debug mode, will always allow 1223 1228 if (!$this->conf(self::O_DEBUG)) { 1224 if (!empty($this->_summary[$timestamp_tag . $service_tag])) {1225 $expired = $this->_summary[$timestamp_tag . $service_tag] + $expiration_req - time();1229 if (!empty($this->_summary[$timestamp_tag . '_request.' . $service_tag])) { 1230 $expired = $this->_summary[$timestamp_tag . '_request.' . $service_tag] + $expiration_req - time(); 1226 1231 if ($expired > 0) { 1227 1232 self::debug("❌ try [$service_tag] after $expired seconds"); … … 1242 1247 } 1243 1248 } else { 1244 // May fail to store to db if db died. Need to store to file to prevent from duplicate calls1245 $file_path = LITESPEED_STATIC_DIR . '/qc_' . $timestamp_tag . md5($service_tag);1249 // May fail to store to db if db is oc cached/dead/locked/readonly. Need to store to file to prevent from duplicate calls 1250 $file_path = $this->_qc_time_file($service_tag, $timestamp_tag); 1246 1251 if (file_exists($file_path)) { 1247 1252 $last_request = file_get_contents($file_path); … … 1254 1259 // For ver check, additional check to prevent frequent calls as old DB ver may be cached 1255 1260 if (self::API_VER === $service_tag) { 1256 $file_path = LITESPEED_STATIC_DIR . '/qc_last_request' . md5($service_tag);1261 $file_path = $this->_qc_time_file($service_tag); 1257 1262 if (file_exists($file_path)) { 1258 1263 $last_request = file_get_contents($file_path); … … 1262 1267 return false; 1263 1268 } 1269 // } else { 1270 // File::save(LITESPEED_STATIC_DIR . '/qc_curr_request' . md5($service_tag), time(), true); 1264 1271 } 1265 1272 } … … 1277 1284 1278 1285 return true; 1286 } 1287 1288 /** 1289 * Get QC req ts file path 1290 * 1291 * @since 7.5 1292 */ 1293 private function _qc_time_file( $service_tag, $type = 'last' ) { 1294 if ('curr' !== $type) { 1295 $type = 'last'; 1296 } 1297 $legacy_file = LITESPEED_STATIC_DIR . '/qc_' . $type . '_request' . md5($service_tag); 1298 if (file_exists($legacy_file)) { 1299 wp_delete_file($legacy_file); 1300 } 1301 $service_tag = preg_replace('/[^a-zA-Z0-9]/', '', $service_tag); 1302 return LITESPEED_STATIC_DIR . '/qc.' . $type . '.' . $service_tag; 1279 1303 } 1280 1304 … … 1380 1404 1381 1405 self::save_summary(array( 'curr_request.' . $service_tag => time() )); 1382 File::save( LITESPEED_STATIC_DIR . '/qc_curr_request' . md5($service_tag), time(), true);1406 File::save($this->_qc_time_file($service_tag, 'curr'), time(), true); 1383 1407 1384 1408 $response = wp_safe_remote_post($url, array( … … 1516 1540 'curr_request.' . $service_tag => 0, 1517 1541 )); 1518 File::save( LITESPEED_STATIC_DIR . '/qc_last_request' . md5($service_tag), $curr_request, true);1519 File::save( LITESPEED_STATIC_DIR . '/qc_curr_request' . md5($service_tag), 0, true);1542 File::save($this->_qc_time_file($service_tag), $curr_request, true); 1543 File::save($this->_qc_time_file($service_tag, 'curr'), 0, true); 1520 1544 1521 1545 if ($json) { -
litespeed-cache/trunk/src/conf.cls.php
r3352087 r3359287 164 164 // This is to load the primary settings ONLY 165 165 // These options are the ones that can be overwritten by primary 166 $options = array_diff_key($options, array_flip(self::$ SINGLE_SITE_OPTIONS));166 $options = array_diff_key($options, array_flip(self::$single_site_options)); 167 167 168 168 $this->set_primary_conf($options); … … 435 435 * @access public 436 436 */ 437 public function update_confs( $the_matrix = false) {437 public function update_confs( $the_matrix = array() ) { 438 438 if ($the_matrix) { 439 439 foreach ($the_matrix as $id => $val) { -
litespeed-cache/trunk/src/control.cls.php
r3352087 r3359287 467 467 // Use time limit ttl 468 468 $scheduled_time = strtotime($timed_urls_time); 469 $ttl = $scheduled_time - time();469 $ttl = $scheduled_time - current_time('timestamp'); 470 470 if ($ttl < 0) { 471 471 $ttl += 86400; // add one day -
litespeed-cache/trunk/src/crawler-map.cls.php
r3352087 r3359287 37 37 $this->_tb = $this->__data->tb('crawler'); 38 38 $this->_tb_blacklist = $this->__data->tb('crawler_blacklist'); 39 $this->_conf_map_timeout = defined('LITESPEED_CRAWLER_MAP_TIMEOUT') ? LITESPEED_CRAWLER_MAP_TIMEOUT: 180; // Specify the timeout while parsing the sitemap39 $this->_conf_map_timeout = defined('LITESPEED_CRAWLER_MAP_TIMEOUT') ? constant('LITESPEED_CRAWLER_MAP_TIMEOUT') : 180; // Specify the timeout while parsing the sitemap 40 40 } 41 41 … … 414 414 415 415 if (is_array($this->_urls) && !empty($this->_urls)) { 416 if (defined('LITESPEED_CRAWLER_DROP_DOMAIN') && LITESPEED_CRAWLER_DROP_DOMAIN) {416 if (defined('LITESPEED_CRAWLER_DROP_DOMAIN') && constant('LITESPEED_CRAWLER_DROP_DOMAIN')) { 417 417 foreach ($this->_urls as $k => $v) { 418 418 if (stripos($v, $this->_site_url) !== 0) { -
litespeed-cache/trunk/src/crawler.cls.php
r3352087 r3359287 396 396 */ 397 397 $this->_crawler_conf['run_delay'] = 500; // microseconds 398 if (defined('LITESPEED_CRAWLER_USLEEP') && LITESPEED_CRAWLER_USLEEP> $this->_crawler_conf['run_delay']) {399 $this->_crawler_conf['run_delay'] = LITESPEED_CRAWLER_USLEEP;398 if (defined('LITESPEED_CRAWLER_USLEEP') && constant('LITESPEED_CRAWLER_USLEEP') > $this->_crawler_conf['run_delay']) { 399 $this->_crawler_conf['run_delay'] = constant('LITESPEED_CRAWLER_USLEEP'); 400 400 } 401 401 if (!empty($_SERVER[Base::ENV_CRAWLER_USLEEP]) && $_SERVER[Base::ENV_CRAWLER_USLEEP] > $this->_crawler_conf['run_delay']) { … … 442 442 */ 443 443 public function get_crawler_duration() { 444 $RUN_DURATION = defined('LITESPEED_CRAWLER_DURATION') ? LITESPEED_CRAWLER_DURATION: 900;444 $RUN_DURATION = defined('LITESPEED_CRAWLER_DURATION') ? constant('LITESPEED_CRAWLER_DURATION') : 900; 445 445 if ($RUN_DURATION > 900) { 446 446 $RUN_DURATION = 900; // reset to default value if defined in conf file is higher than 900 seconds for security enhancement … … 536 536 $curload /= $this->_ncpu; 537 537 // $curload = 1; 538 $CRAWLER_THREADS = defined('LITESPEED_CRAWLER_THREADS') ? LITESPEED_CRAWLER_THREADS: 3;538 $CRAWLER_THREADS = defined('LITESPEED_CRAWLER_THREADS') ? constant('LITESPEED_CRAWLER_THREADS') : 3; 539 539 540 540 if ($this->_cur_threads == -1) { … … 916 916 } 917 917 $mh = curl_multi_init(); 918 $CRAWLER_DROP_DOMAIN = defined('LITESPEED_CRAWLER_DROP_DOMAIN') ? LITESPEED_CRAWLER_DROP_DOMAIN: false;918 $CRAWLER_DROP_DOMAIN = defined('LITESPEED_CRAWLER_DROP_DOMAIN') ? constant('LITESPEED_CRAWLER_DROP_DOMAIN') : false; 919 919 $curls = array(); 920 920 foreach ($rows as $row) { … … 1049 1049 1050 1050 // If blacklist is disabled 1051 if ((defined('LITESPEED_CRAWLER_DISABLE_BLOCKLIST') && LITESPEED_CRAWLER_DISABLE_BLOCKLIST) || apply_filters('litespeed_crawler_disable_blocklist', false, $url)) {1051 if ((defined('LITESPEED_CRAWLER_DISABLE_BLOCKLIST') && constant('LITESPEED_CRAWLER_DISABLE_BLOCKLIST')) || apply_filters('litespeed_crawler_disable_blocklist', false, $url)) { 1052 1052 return self::STATUS_MISS; 1053 1053 } … … 1071 1071 1072 1072 // If blacklist is disabled 1073 if ((defined('LITESPEED_CRAWLER_DISABLE_BLOCKLIST') && LITESPEED_CRAWLER_DISABLE_BLOCKLIST) || apply_filters('litespeed_crawler_disable_blocklist', false, $url)) {1073 if ((defined('LITESPEED_CRAWLER_DISABLE_BLOCKLIST') && constant('LITESPEED_CRAWLER_DISABLE_BLOCKLIST')) || apply_filters('litespeed_crawler_disable_blocklist', false, $url)) { 1074 1074 return self::STATUS_MISS; 1075 1075 } … … 1085 1085 */ 1086 1086 private function _get_curl_options( $crawler_only = false ) { 1087 $CRAWLER_TIMEOUT = defined('LITESPEED_CRAWLER_TIMEOUT') ? LITESPEED_CRAWLER_TIMEOUT: 30;1087 $CRAWLER_TIMEOUT = defined('LITESPEED_CRAWLER_TIMEOUT') ? constant('LITESPEED_CRAWLER_TIMEOUT') : 30; 1088 1088 $options = array( 1089 1089 CURLOPT_RETURNTRANSFER => true, -
litespeed-cache/trunk/src/db-optm.cls.php
r3352087 r3359287 360 360 public function handler_clean_db_cli($args) 361 361 { 362 if (defined('WP_CLI') && WP_CLI) {362 if (defined('WP_CLI') && constant('WP_CLI')) { 363 363 return $this->_db_clean($args); 364 364 } -
litespeed-cache/trunk/src/debug2.cls.php
r3352087 r3359287 516 516 $msg = ''; 517 517 518 $trace = version_compare(PHP_VERSION, '5.4.0', '<') ? debug_backtrace() :debug_backtrace(false, $backtrace_limit + 3);518 $trace = debug_backtrace(false, $backtrace_limit + 3); 519 519 for ($i = 2; $i <= $backtrace_limit + 2; $i++) { 520 520 // 0st => _backtrace_info(), 1st => push() -
litespeed-cache/trunk/src/htaccess.cls.php
r3352087 r3359287 51 51 const MARKER_END = ' end ###'; 52 52 53 const RW_PATTERN_RES = '/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php';54 55 53 /** 56 54 * Initialize the class and set its properties. … … 63 61 $this->_default_backend_htaccess = $this->backend_htaccess; 64 62 65 $frontend_htaccess = defined('LITESPEED_CFG_HTACCESS') ? LITESPEED_CFG_HTACCESS: false;63 $frontend_htaccess = defined('LITESPEED_CFG_HTACCESS') ? constant('LITESPEED_CFG_HTACCESS') : false; 66 64 if ($frontend_htaccess && substr($frontend_htaccess, -10) === '/.htaccess') { 67 65 $this->frontend_htaccess = $frontend_htaccess; 68 66 } 69 $backend_htaccess = defined('LITESPEED_CFG_HTACCESS_BACKEND') ? LITESPEED_CFG_HTACCESS_BACKEND: false;67 $backend_htaccess = defined('LITESPEED_CFG_HTACCESS_BACKEND') ? constant('LITESPEED_CFG_HTACCESS_BACKEND') : false; 70 68 if ($backend_htaccess && substr($backend_htaccess, -10) === '/.htaccess') { 71 69 $this->backend_htaccess = $backend_htaccess; -
litespeed-cache/trunk/src/img-optm.cls.php
r3352087 r3359287 59 59 private $tmp_type; 60 60 private $tmp_path; 61 private $_img_in_queue = array();62 private $_existed_src_list = array();63 private $_pids_set = array();61 private $_img_in_queue = []; 62 private $_existed_src_list = []; 63 private $_pids_set = []; 64 64 private $_thumbnail_set = ''; 65 65 private $_table_img_optm; 66 66 private $_table_img_optming; 67 67 private $_cron_ran = false; 68 private $_sizes_skipped = []; 68 69 69 70 private $__media; … … 96 97 } 97 98 } 99 100 // Allow users to ignore custom sizes. 101 $this->_sizes_skipped = apply_filters( 'litespeed_imgoptm_sizes_skipped', $this->conf( Base::O_IMG_OPTM_SIZES_SKIPPED ) ); 98 102 } 99 103 … … 140 144 $this->_append_img_queue($meta_value, true); 141 145 if (!empty($meta_value['sizes'])) { 142 array_map(array( $this, '_append_img_queue' ), $meta_value['sizes']); 146 foreach( $meta_value['sizes'] as $img_size_name => $img_size ){ 147 $this->_append_img_queue($img_size, false, $img_size_name ); 148 } 143 149 } 144 150 … … 269 275 270 276 // May need to get more images 271 $list = array();277 $list = []; 272 278 $more = $allowance - $total_new; 273 279 if ($more > 0) { … … 306 312 $this->_append_img_queue($meta_value, true); 307 313 if (!empty($meta_value['sizes'])) { 308 array_map(array( $this, '_append_img_queue' ), $meta_value['sizes']); 314 foreach( $meta_value['sizes'] as $img_size_name => $img_size ){ 315 $this->_append_img_queue($img_size, false, $img_size_name ); 316 } 309 317 } 310 318 } … … 356 364 * 357 365 * @since 1.6 366 * @since 7.5 Allow to choose which image sizes should be optimized + added parameter $img_size_name. 358 367 * @access private 359 368 */ 360 private function _append_img_queue( $meta_value, $is_ori_file = false ) {369 private function _append_img_queue( $meta_value, $is_ori_file = false, $img_size_name = false ) { 361 370 if (empty($meta_value['file']) || empty($meta_value['width']) || empty($meta_value['height'])) { 362 371 self::debug2('bypass image due to lack of file/w/h: pid ' . $this->tmp_pid, $meta_value); … … 366 375 $short_file_path = $meta_value['file']; 367 376 377 // Test if need to skip image size. 368 378 if (!$is_ori_file) { 369 379 $short_file_path = $this->tmp_path . $short_file_path; 380 $skip = false !== array_search( $img_size_name, $this->_sizes_skipped, true ); 381 if($skip){ 382 self::debug2( 'bypass image ' . $short_file_path . ' due to skipped size: ' . $img_size_name ); 383 return; 384 } 370 385 } 371 386 … … 427 442 return; 428 443 } 429 $data = array();430 $pid_list = array();444 $data = []; 445 $pid_list = []; 431 446 foreach ($this->_img_in_queue as $k => $v) { 432 447 $_img_info = $this->__media->info($v['src'], $v['pid']); … … 457 472 self::debug('Added raw images [total] ' . $count); 458 473 459 $this->_img_in_queue = array();474 $this->_img_in_queue = []; 460 475 461 476 // Save thumbnail groups for future rescan index … … 468 483 469 484 $existed_meta = $wpdb->get_results("SELECT * FROM `$wpdb->postmeta` WHERE post_id IN ('" . implode("','", $pid_list) . "') AND meta_key='" . self::DB_SET . "'"); 470 $existed_pid = array();485 $existed_pid = []; 471 486 if ($existed_meta) { 472 487 foreach ($existed_meta as $v) { … … 503 518 return; 504 519 } 505 $set = array();520 $set = []; 506 521 foreach (Media::cls()->get_image_sizes() as $size) { 507 522 $curr_size = $size['width'] . 'x' . $size['height']; … … 523 538 global $wpdb; 524 539 525 $srcpath_list = array();540 $srcpath_list = []; 526 541 527 542 $list = $wpdb->get_results("SELECT src FROM `$this->_table_img_optming`"); … … 556 571 } 557 572 558 $finished_ids = array();573 $finished_ids = []; 559 574 560 575 Utility::compatibility(); … … 584 599 */ 585 600 private function _filter_invalid_src() { 586 $img_in_queue_invalid = array();601 $img_in_queue_invalid = []; 587 602 foreach ($this->_img_in_queue as $k => $v) { 588 603 if ($v['src']) { … … 625 640 self::debug('Load img in queue [total] ' . count($_img_in_queue)); 626 641 627 $list = array();642 $list = []; 628 643 foreach ($_img_in_queue as $v) { 629 644 $_img_info = $this->__media->info($v->src, $v->post_id); … … 754 769 ' )'; 755 770 $list = $wpdb->get_results($wpdb->prepare($q, array_merge(array( self::DB_SIZE ), array_keys($notified_data)))); 756 $ls_optm_size_row_exists_postids = array();771 $ls_optm_size_row_exists_postids = []; 757 772 foreach ($list as $v) { 758 773 $json = $notified_data[$v->id]; … … 903 918 } 904 919 905 if (defined('LITESPEED_IMG_OPTM_PULL_CRON') && ! LITESPEED_IMG_OPTM_PULL_CRON) {920 if (defined('LITESPEED_IMG_OPTM_PULL_CRON') && !constant('LITESPEED_IMG_OPTM_PULL_CRON')) { 906 921 self::debug('Cron disabled [define] LITESPEED_IMG_OPTM_PULL_CRON'); 907 922 return; … … 921 936 922 937 if (defined('LITESPEED_IMG_OPTM_PULL_THREADS')) { 923 return LITESPEED_IMG_OPTM_PULL_THREADS;938 return constant('LITESPEED_IMG_OPTM_PULL_THREADS'); 924 939 } 925 940 … … 978 993 $total_pulled_avif = 0; 979 994 980 $server_list = array();995 $server_list = []; 981 996 982 997 try { … … 1002 1017 1003 1018 // Run requests in parallel 1004 $requests = array(); // store each request URL for Requests::request_multiple()1005 $imgs_by_req = array(); // store original request data so that we can reference it in the response1019 $requests = []; // store each request URL for Requests::request_multiple() 1020 $imgs_by_req = []; // store original request data so that we can reference it in the response 1006 1021 $req_counter = 0; 1007 1022 foreach ($img_rows as $row_img) { … … 1182 1197 // Save server_list to notify taken 1183 1198 if (empty($server_list[$server_info['server']])) { 1184 $server_list[$server_info['server']] = array();1199 $server_list[$server_info['server']] = []; 1185 1200 } 1186 1201 … … 1191 1206 }; 1192 1207 1193 $force_wp_remote_get = defined('LITESPEED_FORCE_WP_REMOTE_GET') && LITESPEED_FORCE_WP_REMOTE_GET;1194 if (!$force_wp_remote_get && class_exists('\WpOrg\Requests\Requests') && class_exists('\WpOrg\Requests\Autoload') && version_compare(PHP_VERSION, '5.6.0', '>=')) {1208 $force_wp_remote_get = defined('LITESPEED_FORCE_WP_REMOTE_GET') && constant('LITESPEED_FORCE_WP_REMOTE_GET'); 1209 if (!$force_wp_remote_get && class_exists('\WpOrg\Requests\Requests') && class_exists('\WpOrg\Requests\Autoload')) { 1195 1210 // Make sure Requests can load internal classes. 1196 1211 Autoload::register(); … … 1521 1536 1522 1537 // Prepare post_ids to inquery gathered images 1523 $pid_set = array();1524 $scanned_list = array();1538 $pid_set = []; 1539 $scanned_list = []; 1525 1540 foreach ($list as $v) { 1526 1541 $meta_value = $this->_parse_wp_meta_value($v); … … 1552 1567 $this->_append_img_queue($meta_value, true); 1553 1568 if (!empty($meta_value['sizes'])) { 1554 array_map(array( $this, '_append_img_queue' ), $meta_value['sizes']); 1569 foreach( $meta_value['sizes'] as $img_size_name => $img_size ){ 1570 $this->_append_img_queue($img_size, false, $img_size_name ); 1571 } 1555 1572 } 1556 1573 } … … 2097 2114 self::debug('Check image [ID] ' . $pid); 2098 2115 2099 $data = array();2116 $data = []; 2100 2117 2101 2118 $data['img_count'] = $this->img_count(); … … 2108 2125 $q = "SELECT * FROM `$this->_table_img_optm` WHERE post_id = %d"; 2109 2126 $list = $wpdb->get_results($wpdb->prepare($q, $pid)); 2110 $img_data = array();2127 $img_data = []; 2111 2128 if ($list) { 2112 2129 foreach ($list as $v) { -
litespeed-cache/trunk/src/lang.cls.php
r3352087 r3359287 209 209 self::O_IMG_OPTM_WEBP => __('Next-Gen Image Format', 'litespeed-cache'), 210 210 self::O_IMG_OPTM_LOSSLESS => __('Optimize Losslessly', 'litespeed-cache'), 211 self::O_IMG_OPTM_SIZES_SKIPPED => __('Optimize Image Sizes', 'litespeed-cache'), 211 212 self::O_IMG_OPTM_EXIF => __('Preserve EXIF/XMP data', 'litespeed-cache'), 212 213 self::O_IMG_OPTM_WEBP_ATTR => __('WebP/AVIF Attribute To Replace', 'litespeed-cache'), … … 265 266 self::O_DB_OPTM_REVISIONS_MAX => __('Revisions Max Number', 'litespeed-cache'), 266 267 self::O_DB_OPTM_REVISIONS_AGE => __('Revisions Max Age', 'litespeed-cache'), 268 269 self::O_OPTIMAX => __('OptimaX', 'litespeed-cache'), 267 270 ); 268 271 -
litespeed-cache/trunk/src/task.cls.php
r3352087 r3359287 225 225 */ 226 226 public function lscache_cron_filter_crawler( $schedules ) { 227 $CRAWLER_RUN_INTERVAL = defined('LITESPEED_CRAWLER_RUN_INTERVAL') ? LITESPEED_CRAWLER_RUN_INTERVAL: 600;227 $CRAWLER_RUN_INTERVAL = defined('LITESPEED_CRAWLER_RUN_INTERVAL') ? constant('LITESPEED_CRAWLER_RUN_INTERVAL') : 600; 228 228 // $wp_schedules = wp_get_schedules(); 229 229 if (!array_key_exists(self::FILTER_CRAWLER, $schedules)) { -
litespeed-cache/trunk/src/utility.cls.php
r3352087 r3359287 694 694 if (!defined('LITESPEED_FRONTEND_HOST')) { 695 695 if (defined('WP_HOME')) { 696 $home_host = WP_HOME; // Also think of `WP_SITEURL`696 $home_host = constant('WP_HOME'); // Also think of `WP_SITEURL` 697 697 } else { 698 698 $home_host = get_option('home'); … … 774 774 if (substr($url_parsed['path'], 0, 1) === '/') { 775 775 if (defined('LITESPEED_WP_REALPATH')) { 776 $file_path_ori = $_SERVER['DOCUMENT_ROOT'] . LITESPEED_WP_REALPATH. $url_parsed['path'];776 $file_path_ori = $_SERVER['DOCUMENT_ROOT'] . constant('LITESPEED_WP_REALPATH') . $url_parsed['path']; 777 777 } else { 778 778 $file_path_ori = $_SERVER['DOCUMENT_ROOT'] . $url_parsed['path']; … … 922 922 return $q; 923 923 } 924 925 /** 926 * Prepare image sizes for optimization. 927 * 928 * @since 7.5 929 * @access public 930 */ 931 public static function prepare_image_sizes_array( $detailed = false ) { 932 $image_sizes = wp_get_registered_image_subsizes(); 933 $sizes = []; 934 935 foreach ( $image_sizes as $current_size_name => $current_size ) { 936 if( empty( $current_size['width'] ) && empty( $current_size['height'] ) ) continue; 937 938 if( !$detailed ) { 939 $sizes[] = $current_size_name; 940 } 941 else{ 942 $label = $current_size['width'] . 'x' . $current_size['height']; 943 if( $current_size_name !== $label ){ 944 $label = ucfirst( $current_size_name ) . ' ( ' . $label . ' )'; 945 } 946 947 $sizes[] = [ 948 "label" => $label, 949 "file_size" => $current_size_name, 950 "width" => $current_size['width'], 951 "height" => $current_size['height'], 952 ]; 953 } 954 } 955 956 return $sizes; 957 } 924 958 } -
litespeed-cache/trunk/tpl/img_optm/settings.tpl.php
r3333851 r3359287 86 86 <tr> 87 87 <th> 88 <?php 89 $option_id = Base::O_IMG_OPTM_SIZES_SKIPPED; 90 $image_sizes = Utility::prepare_image_sizes_array(true); 91 $option_value = $this->conf( $option_id ); 92 ?> 93 <?php $this->title( $option_id ); ?> 94 </th> 95 <td> 96 <?php if ( count($image_sizes) > 0 ) : ?> 97 <?php 98 foreach ( $image_sizes as $current_size ) { 99 $checked = false === array_search( $current_size['file_size'], $option_value, true ); 100 $this->build_checkbox( $option_id . '[]', esc_html( $current_size['label'] ), $checked, $current_size['file_size'] ); 101 } 102 ?> 103 <?php else : ?> 104 <p><?php esc_html_e( 'No sizes found.', 'litespeed-cache' ); ?></p> 105 <?php endif; ?> 106 <div class="litespeed-desc"> 107 <?php esc_html_e( 'Choose which image sizes to optimize.', 'litespeed-cache' ); ?> 108 </div> 109 </td> 110 </tr> 111 112 <tr> 113 <th> 88 114 <?php $option_id = Base::O_IMG_OPTM_EXIF; ?> 89 115 <?php $this->title( $option_id ); ?> -
litespeed-cache/trunk/tpl/toolbox/beta_test.tpl.php
r3352087 r3359287 15 15 // List of available public versions 16 16 $v_list = array( 17 '7.5', 17 18 '7.4', 18 19 '7.3.0.1',
Note: See TracChangeset
for help on using the changeset viewer.