Edit File by line
/home/zeestwma/ceyloniy.../wp-conte.../plugins/litespee.../src
File: base.cls.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* The base constants and defaults for LiteSpeed Cache.
[2] Fix | Delete
*
[3] Fix | Delete
* Defines all option keys, default values, and helper methods shared across the plugin.
[4] Fix | Delete
*
[5] Fix | Delete
* @since 3.7
[6] Fix | Delete
* @package LiteSpeed
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
namespace LiteSpeed;
[10] Fix | Delete
[11] Fix | Delete
defined('WPINC') || exit();
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* Class Base
[15] Fix | Delete
*
[16] Fix | Delete
* Core definitions and helpers shared across LiteSpeed Cache.
[17] Fix | Delete
*/
[18] Fix | Delete
class Base extends Root {
[19] Fix | Delete
[20] Fix | Delete
// This is redundant since v3.0
[21] Fix | Delete
// New conf items are `litespeed.key`
[22] Fix | Delete
const OPTION_NAME = 'litespeed-cache-conf';
[23] Fix | Delete
[24] Fix | Delete
const _CACHE = '_cache'; // final cache status from setting
[25] Fix | Delete
[26] Fix | Delete
// -------------------------------------------------- ##
[27] Fix | Delete
// -------------- General ----------------- ##
[28] Fix | Delete
// -------------------------------------------------- ##
[29] Fix | Delete
const _VER = '_version'; // Not set-able
[30] Fix | Delete
const HASH = 'hash'; // Not set-able
[31] Fix | Delete
const O_AUTO_UPGRADE = 'auto_upgrade';
[32] Fix | Delete
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)
[33] Fix | Delete
const O_SERVER_IP = 'server_ip';
[34] Fix | Delete
const O_GUEST = 'guest';
[35] Fix | Delete
const O_GUEST_OPTM = 'guest_optm';
[36] Fix | Delete
const O_NEWS = 'news';
[37] Fix | Delete
const O_GUEST_UAS = 'guest_uas';
[38] Fix | Delete
const O_GUEST_IPS = 'guest_ips'; // Deprecated since v7.7. TODO: Will drop after v9
[39] Fix | Delete
[40] Fix | Delete
// -------------------------------------------------- ##
[41] Fix | Delete
// -------------- Cache ----------------- ##
[42] Fix | Delete
// -------------------------------------------------- ##
[43] Fix | Delete
const O_CACHE = 'cache';
[44] Fix | Delete
const O_CACHE_PRIV = 'cache-priv';
[45] Fix | Delete
const O_CACHE_COMMENTER = 'cache-commenter';
[46] Fix | Delete
const O_CACHE_REST = 'cache-rest';
[47] Fix | Delete
const O_CACHE_PAGE_LOGIN = 'cache-page_login';
[48] Fix | Delete
const O_CACHE_RES = 'cache-resources'; // Deprecated since v7.2. TODO: Drop after v7.5
[49] Fix | Delete
const O_CACHE_MOBILE = 'cache-mobile';
[50] Fix | Delete
const O_CACHE_MOBILE_RULES = 'cache-mobile_rules';
[51] Fix | Delete
const O_CACHE_BROWSER = 'cache-browser';
[52] Fix | Delete
const O_CACHE_EXC_USERAGENTS = 'cache-exc_useragents';
[53] Fix | Delete
const O_CACHE_EXC_COOKIES = 'cache-exc_cookies';
[54] Fix | Delete
const O_CACHE_EXC_QS = 'cache-exc_qs';
[55] Fix | Delete
const O_CACHE_EXC_CAT = 'cache-exc_cat';
[56] Fix | Delete
const O_CACHE_EXC_TAG = 'cache-exc_tag';
[57] Fix | Delete
const O_CACHE_FORCE_URI = 'cache-force_uri';
[58] Fix | Delete
const O_CACHE_FORCE_PUB_URI = 'cache-force_pub_uri';
[59] Fix | Delete
const O_CACHE_PRIV_URI = 'cache-priv_uri';
[60] Fix | Delete
const O_CACHE_EXC = 'cache-exc';
[61] Fix | Delete
const O_CACHE_EXC_ROLES = 'cache-exc_roles';
[62] Fix | Delete
const O_CACHE_DROP_QS = 'cache-drop_qs';
[63] Fix | Delete
const O_CACHE_TTL_PUB = 'cache-ttl_pub';
[64] Fix | Delete
const O_CACHE_TTL_PRIV = 'cache-ttl_priv';
[65] Fix | Delete
const O_CACHE_TTL_FRONTPAGE = 'cache-ttl_frontpage';
[66] Fix | Delete
const O_CACHE_TTL_FEED = 'cache-ttl_feed';
[67] Fix | Delete
const O_CACHE_TTL_REST = 'cache-ttl_rest';
[68] Fix | Delete
const O_CACHE_TTL_STATUS = 'cache-ttl_status';
[69] Fix | Delete
const O_CACHE_TTL_BROWSER = 'cache-ttl_browser';
[70] Fix | Delete
const O_CACHE_AJAX_TTL = 'cache-ajax_ttl';
[71] Fix | Delete
const O_CACHE_LOGIN_COOKIE = 'cache-login_cookie';
[72] Fix | Delete
const O_CACHE_VARY_COOKIES = 'cache-vary_cookies';
[73] Fix | Delete
const O_CACHE_VARY_GROUP = 'cache-vary_group';
[74] Fix | Delete
[75] Fix | Delete
// -------------------------------------------------- ##
[76] Fix | Delete
// -------------- Purge ----------------- ##
[77] Fix | Delete
// -------------------------------------------------- ##
[78] Fix | Delete
const O_PURGE_ON_UPGRADE = 'purge-upgrade';
[79] Fix | Delete
const O_PURGE_STALE = 'purge-stale';
[80] Fix | Delete
const O_PURGE_POST_ALL = 'purge-post_all';
[81] Fix | Delete
const O_PURGE_POST_FRONTPAGE = 'purge-post_f';
[82] Fix | Delete
const O_PURGE_POST_HOMEPAGE = 'purge-post_h';
[83] Fix | Delete
const O_PURGE_POST_PAGES = 'purge-post_p';
[84] Fix | Delete
const O_PURGE_POST_PAGES_WITH_RECENT_POSTS = 'purge-post_pwrp';
[85] Fix | Delete
const O_PURGE_POST_AUTHOR = 'purge-post_a';
[86] Fix | Delete
const O_PURGE_POST_YEAR = 'purge-post_y';
[87] Fix | Delete
const O_PURGE_POST_MONTH = 'purge-post_m';
[88] Fix | Delete
const O_PURGE_POST_DATE = 'purge-post_d';
[89] Fix | Delete
const O_PURGE_POST_TERM = 'purge-post_t'; // include category|tag|tax
[90] Fix | Delete
const O_PURGE_POST_POSTTYPE = 'purge-post_pt';
[91] Fix | Delete
const O_PURGE_TIMED_URLS = 'purge-timed_urls';
[92] Fix | Delete
const O_PURGE_TIMED_URLS_TIME = 'purge-timed_urls_time';
[93] Fix | Delete
const O_PURGE_HOOK_ALL = 'purge-hook_all';
[94] Fix | Delete
[95] Fix | Delete
// -------------------------------------------------- ##
[96] Fix | Delete
// -------------- ESI ----------------- ##
[97] Fix | Delete
// -------------------------------------------------- ##
[98] Fix | Delete
const O_ESI = 'esi';
[99] Fix | Delete
const O_ESI_CACHE_ADMBAR = 'esi-cache_admbar';
[100] Fix | Delete
const O_ESI_CACHE_COMMFORM = 'esi-cache_commform';
[101] Fix | Delete
const O_ESI_NONCE = 'esi-nonce';
[102] Fix | Delete
[103] Fix | Delete
// -------------------------------------------------- ##
[104] Fix | Delete
// -------------- Utilities ----------------- ##
[105] Fix | Delete
// -------------------------------------------------- ##
[106] Fix | Delete
const O_UTIL_INSTANT_CLICK = 'util-instant_click';
[107] Fix | Delete
const O_UTIL_NO_HTTPS_VARY = 'util-no_https_vary';
[108] Fix | Delete
[109] Fix | Delete
// -------------------------------------------------- ##
[110] Fix | Delete
// -------------- Debug ----------------- ##
[111] Fix | Delete
// -------------------------------------------------- ##
[112] Fix | Delete
const O_DEBUG_DISABLE_ALL = 'debug-disable_all';
[113] Fix | Delete
const O_DEBUG = 'debug';
[114] Fix | Delete
const O_DEBUG_IPS = 'debug-ips';
[115] Fix | Delete
const O_DEBUG_LEVEL = 'debug-level';
[116] Fix | Delete
const O_DEBUG_FILESIZE = 'debug-filesize';
[117] Fix | Delete
const O_DEBUG_COOKIE = 'debug-cookie'; // For backwards compatibility, will drop after v7.0
[118] Fix | Delete
const O_DEBUG_COLLAPSE_QS = 'debug-collapse_qs';
[119] Fix | Delete
const O_DEBUG_COLLAPS_QS = 'debug-collapse_qs'; // For backwards compatibility, will drop after v6.5
[120] Fix | Delete
const O_DEBUG_INC = 'debug-inc';
[121] Fix | Delete
const O_DEBUG_EXC = 'debug-exc';
[122] Fix | Delete
const O_DEBUG_EXC_STRINGS = 'debug-exc_strings';
[123] Fix | Delete
[124] Fix | Delete
// -------------------------------------------------- ##
[125] Fix | Delete
// -------------- DB Optm ----------------- ##
[126] Fix | Delete
// -------------------------------------------------- ##
[127] Fix | Delete
const O_DB_OPTM_REVISIONS_MAX = 'db_optm-revisions_max';
[128] Fix | Delete
const O_DB_OPTM_REVISIONS_AGE = 'db_optm-revisions_age';
[129] Fix | Delete
[130] Fix | Delete
// -------------------------------------------------- ##
[131] Fix | Delete
// -------------- HTML Optm ----------------- ##
[132] Fix | Delete
// -------------------------------------------------- ##
[133] Fix | Delete
const O_OPTM_CSS_MIN = 'optm-css_min';
[134] Fix | Delete
const O_OPTM_CSS_COMB = 'optm-css_comb';
[135] Fix | Delete
const O_OPTM_CSS_COMB_EXT_INL = 'optm-css_comb_ext_inl';
[136] Fix | Delete
const O_OPTM_UCSS = 'optm-ucss';
[137] Fix | Delete
const O_OPTM_UCSS_INLINE = 'optm-ucss_inline';
[138] Fix | Delete
const O_OPTM_UCSS_SELECTOR_WHITELIST = 'optm-ucss_whitelist';
[139] Fix | Delete
const O_OPTM_UCSS_FILE_EXC_INLINE = 'optm-ucss_file_exc_inline';
[140] Fix | Delete
const O_OPTM_UCSS_EXC = 'optm-ucss_exc';
[141] Fix | Delete
const O_OPTM_CSS_EXC = 'optm-css_exc';
[142] Fix | Delete
const O_OPTM_JS_MIN = 'optm-js_min';
[143] Fix | Delete
const O_OPTM_JS_COMB = 'optm-js_comb';
[144] Fix | Delete
const O_OPTM_JS_COMB_EXT_INL = 'optm-js_comb_ext_inl';
[145] Fix | Delete
const O_OPTM_JS_DELAY_INC = 'optm-js_delay_inc';
[146] Fix | Delete
const O_OPTM_JS_EXC = 'optm-js_exc';
[147] Fix | Delete
const O_OPTM_HTML_MIN = 'optm-html_min';
[148] Fix | Delete
const O_OPTM_HTML_LAZY = 'optm-html_lazy';
[149] Fix | Delete
const O_OPTM_HTML_SKIP_COMMENTS = 'optm-html_skip_comment';
[150] Fix | Delete
const O_OPTM_QS_RM = 'optm-qs_rm';
[151] Fix | Delete
const O_OPTM_GGFONTS_RM = 'optm-ggfonts_rm';
[152] Fix | Delete
const O_OPTM_CSS_ASYNC = 'optm-css_async';
[153] Fix | Delete
const O_OPTM_CCSS_PER_URL = 'optm-ccss_per_url';
[154] Fix | Delete
const O_OPTM_CCSS_SEP_POSTTYPE = 'optm-ccss_sep_posttype';
[155] Fix | Delete
const O_OPTM_CCSS_SEP_URI = 'optm-ccss_sep_uri';
[156] Fix | Delete
const O_OPTM_CCSS_SELECTOR_WHITELIST = 'optm-ccss_whitelist';
[157] Fix | Delete
const O_OPTM_CSS_ASYNC_INLINE = 'optm-css_async_inline';
[158] Fix | Delete
const O_OPTM_CSS_FONT_DISPLAY = 'optm-css_font_display';
[159] Fix | Delete
const O_OPTM_JS_DEFER = 'optm-js_defer';
[160] Fix | Delete
const O_OPTM_LOCALIZE = 'optm-localize';
[161] Fix | Delete
const O_OPTM_LOCALIZE_DOMAINS = 'optm-localize_domains';
[162] Fix | Delete
const O_OPTM_EMOJI_RM = 'optm-emoji_rm';
[163] Fix | Delete
const O_OPTM_NOSCRIPT_RM = 'optm-noscript_rm';
[164] Fix | Delete
const O_OPTM_GGFONTS_ASYNC = 'optm-ggfonts_async';
[165] Fix | Delete
const O_OPTM_EXC_ROLES = 'optm-exc_roles';
[166] Fix | Delete
const O_OPTM_CCSS_CON = 'optm-ccss_con';
[167] Fix | Delete
const O_OPTM_JS_DEFER_EXC = 'optm-js_defer_exc';
[168] Fix | Delete
const O_OPTM_GM_JS_EXC = 'optm-gm_js_exc';
[169] Fix | Delete
const O_OPTM_DNS_PREFETCH = 'optm-dns_prefetch';
[170] Fix | Delete
const O_OPTM_DNS_PREFETCH_CTRL = 'optm-dns_prefetch_ctrl';
[171] Fix | Delete
const O_OPTM_DNS_PRECONNECT = 'optm-dns_preconnect';
[172] Fix | Delete
const O_OPTM_EXC = 'optm-exc';
[173] Fix | Delete
const O_OPTM_GUEST_ONLY = 'optm-guest_only';
[174] Fix | Delete
[175] Fix | Delete
// -------------------------------------------------- ##
[176] Fix | Delete
// -------------- Object Cache ----------------- ##
[177] Fix | Delete
// -------------------------------------------------- ##
[178] Fix | Delete
const O_OBJECT = 'object';
[179] Fix | Delete
const O_OBJECT_KIND = 'object-kind';
[180] Fix | Delete
const O_OBJECT_HOST = 'object-host';
[181] Fix | Delete
const O_OBJECT_PORT = 'object-port';
[182] Fix | Delete
const O_OBJECT_LIFE = 'object-life';
[183] Fix | Delete
const O_OBJECT_PERSISTENT = 'object-persistent';
[184] Fix | Delete
const O_OBJECT_ADMIN = 'object-admin';
[185] Fix | Delete
const O_OBJECT_TRANSIENTS = 'object-transients';
[186] Fix | Delete
const O_OBJECT_DB_ID = 'object-db_id';
[187] Fix | Delete
const O_OBJECT_USER = 'object-user';
[188] Fix | Delete
const O_OBJECT_PSWD = 'object-pswd';
[189] Fix | Delete
const O_OBJECT_GLOBAL_GROUPS = 'object-global_groups';
[190] Fix | Delete
const O_OBJECT_NON_PERSISTENT_GROUPS = 'object-non_persistent_groups';
[191] Fix | Delete
[192] Fix | Delete
// -------------------------------------------------- ##
[193] Fix | Delete
// -------------- Discussion ----------------- ##
[194] Fix | Delete
// -------------------------------------------------- ##
[195] Fix | Delete
const O_DISCUSS_AVATAR_CACHE = 'discuss-avatar_cache';
[196] Fix | Delete
const O_DISCUSS_AVATAR_CRON = 'discuss-avatar_cron';
[197] Fix | Delete
const O_DISCUSS_AVATAR_CACHE_TTL = 'discuss-avatar_cache_ttl';
[198] Fix | Delete
[199] Fix | Delete
// -------------------------------------------------- ##
[200] Fix | Delete
// -------------- Media ----------------- ##
[201] Fix | Delete
// -------------------------------------------------- ##
[202] Fix | Delete
const O_MEDIA_LAZY = 'media-lazy';
[203] Fix | Delete
const O_MEDIA_LAZY_PLACEHOLDER = 'media-lazy_placeholder';
[204] Fix | Delete
const O_MEDIA_PLACEHOLDER_RESP = 'media-placeholder_resp';
[205] Fix | Delete
const O_MEDIA_PLACEHOLDER_RESP_COLOR = 'media-placeholder_resp_color';
[206] Fix | Delete
const O_MEDIA_PLACEHOLDER_RESP_SVG = 'media-placeholder_resp_svg';
[207] Fix | Delete
const O_MEDIA_LQIP = 'media-lqip';
[208] Fix | Delete
const O_MEDIA_LQIP_QUAL = 'media-lqip_qual';
[209] Fix | Delete
const O_MEDIA_LQIP_MIN_W = 'media-lqip_min_w';
[210] Fix | Delete
const O_MEDIA_LQIP_MIN_H = 'media-lqip_min_h';
[211] Fix | Delete
const O_MEDIA_PLACEHOLDER_RESP_ASYNC = 'media-placeholder_resp_async';
[212] Fix | Delete
const O_MEDIA_IFRAME_LAZY = 'media-iframe_lazy';
[213] Fix | Delete
const O_MEDIA_ADD_MISSING_SIZES = 'media-add_missing_sizes';
[214] Fix | Delete
const O_MEDIA_LAZY_EXC = 'media-lazy_exc';
[215] Fix | Delete
const O_MEDIA_LAZY_CLS_EXC = 'media-lazy_cls_exc';
[216] Fix | Delete
const O_MEDIA_LAZY_PARENT_CLS_EXC = 'media-lazy_parent_cls_exc';
[217] Fix | Delete
const O_MEDIA_IFRAME_LAZY_CLS_EXC = 'media-iframe_lazy_cls_exc';
[218] Fix | Delete
const O_MEDIA_IFRAME_LAZY_PARENT_CLS_EXC = 'media-iframe_lazy_parent_cls_exc';
[219] Fix | Delete
const O_MEDIA_LAZY_URI_EXC = 'media-lazy_uri_exc';
[220] Fix | Delete
const O_MEDIA_LQIP_EXC = 'media-lqip_exc';
[221] Fix | Delete
const O_MEDIA_VPI = 'media-vpi';
[222] Fix | Delete
const O_MEDIA_VPI_CRON = 'media-vpi_cron';
[223] Fix | Delete
const O_IMG_OPTM_JPG_QUALITY = 'img_optm-jpg_quality';
[224] Fix | Delete
const O_MEDIA_AUTO_RESCALE_ORI = 'media-auto_rescale_ori';
[225] Fix | Delete
[226] Fix | Delete
// -------------------------------------------------- ##
[227] Fix | Delete
// -------------- Image Optm ----------------- ##
[228] Fix | Delete
// -------------------------------------------------- ##
[229] Fix | Delete
const O_IMG_OPTM_AUTO = 'img_optm-auto';
[230] Fix | Delete
const O_IMG_OPTM_CRON = 'img_optm-cron'; // @Deprecated since v7.0 TODO: remove after v7.5
[231] Fix | Delete
const O_IMG_OPTM_ORI = 'img_optm-ori';
[232] Fix | Delete
const O_IMG_OPTM_RM_BKUP = 'img_optm-rm_bkup';
[233] Fix | Delete
const O_IMG_OPTM_WEBP = 'img_optm-webp';
[234] Fix | Delete
const O_IMG_OPTM_LOSSLESS = 'img_optm-lossless';
[235] Fix | Delete
const O_IMG_OPTM_SIZES_SKIPPED = 'img_optm-sizes_skipped';
[236] Fix | Delete
const O_IMG_OPTM_EXIF = 'img_optm-exif';
[237] Fix | Delete
const O_IMG_OPTM_WEBP_ATTR = 'img_optm-webp_attr';
[238] Fix | Delete
const O_IMG_OPTM_WEBP_REPLACE_SRCSET = 'img_optm-webp_replace_srcset';
[239] Fix | Delete
[240] Fix | Delete
// -------------------------------------------------- ##
[241] Fix | Delete
// -------------- Crawler ----------------- ##
[242] Fix | Delete
// -------------------------------------------------- ##
[243] Fix | Delete
const O_CRAWLER = 'crawler';
[244] Fix | Delete
const O_CRAWLER_USLEEP = 'crawler-usleep'; // @Deprecated since v7.0 TODO: remove after v7.5
[245] Fix | Delete
const O_CRAWLER_RUN_DURATION = 'crawler-run_duration'; // @Deprecated since v7.0 TODO: remove after v7.5
[246] Fix | Delete
const O_CRAWLER_RUN_INTERVAL = 'crawler-run_interval'; // @Deprecated since v7.0 TODO: remove after v7.5
[247] Fix | Delete
const O_CRAWLER_CRAWL_INTERVAL = 'crawler-crawl_interval';
[248] Fix | Delete
const O_CRAWLER_THREADS = 'crawler-threads'; // @Deprecated since v7.0 TODO: remove after v7.5
[249] Fix | Delete
const O_CRAWLER_TIMEOUT = 'crawler-timeout'; // @Deprecated since v7.0 TODO: remove after v7.5
[250] Fix | Delete
const O_CRAWLER_LOAD_LIMIT = 'crawler-load_limit';
[251] Fix | Delete
const O_CRAWLER_SITEMAP = 'crawler-sitemap';
[252] Fix | Delete
const O_CRAWLER_DROP_DOMAIN = 'crawler-drop_domain'; // @Deprecated since v7.0 TODO: remove after v7.5
[253] Fix | Delete
const O_CRAWLER_MAP_TIMEOUT = 'crawler-map_timeout'; // @Deprecated since v7.0 TODO: remove after v7.5
[254] Fix | Delete
const O_CRAWLER_ROLES = 'crawler-roles';
[255] Fix | Delete
const O_CRAWLER_COOKIES = 'crawler-cookies';
[256] Fix | Delete
[257] Fix | Delete
// -------------------------------------------------- ##
[258] Fix | Delete
// -------------- Misc ----------------- ##
[259] Fix | Delete
// -------------------------------------------------- ##
[260] Fix | Delete
const O_MISC_HEARTBEAT_FRONT = 'misc-heartbeat_front';
[261] Fix | Delete
const O_MISC_HEARTBEAT_FRONT_TTL = 'misc-heartbeat_front_ttl';
[262] Fix | Delete
const O_MISC_HEARTBEAT_BACK = 'misc-heartbeat_back';
[263] Fix | Delete
const O_MISC_HEARTBEAT_BACK_TTL = 'misc-heartbeat_back_ttl';
[264] Fix | Delete
const O_MISC_HEARTBEAT_EDITOR = 'misc-heartbeat_editor';
[265] Fix | Delete
const O_MISC_HEARTBEAT_EDITOR_TTL = 'misc-heartbeat_editor_ttl';
[266] Fix | Delete
[267] Fix | Delete
// -------------------------------------------------- ##
[268] Fix | Delete
// -------------- CDN ----------------- ##
[269] Fix | Delete
// -------------------------------------------------- ##
[270] Fix | Delete
const O_CDN = 'cdn';
[271] Fix | Delete
const O_CDN_ORI = 'cdn-ori';
[272] Fix | Delete
const O_CDN_ORI_DIR = 'cdn-ori_dir';
[273] Fix | Delete
const O_CDN_EXC = 'cdn-exc';
[274] Fix | Delete
const O_CDN_QUIC = 'cdn-quic'; // No more a visible setting since v7
[275] Fix | Delete
const O_CDN_CLOUDFLARE = 'cdn-cloudflare';
[276] Fix | Delete
const O_CDN_CLOUDFLARE_EMAIL = 'cdn-cloudflare_email';
[277] Fix | Delete
const O_CDN_CLOUDFLARE_KEY = 'cdn-cloudflare_key';
[278] Fix | Delete
const O_CDN_CLOUDFLARE_NAME = 'cdn-cloudflare_name';
[279] Fix | Delete
const O_CDN_CLOUDFLARE_ZONE = 'cdn-cloudflare_zone';
[280] Fix | Delete
const O_CDN_CLOUDFLARE_CLEAR = 'cdn-cloudflare_clear';
[281] Fix | Delete
const O_CDN_MAPPING = 'cdn-mapping';
[282] Fix | Delete
const O_CDN_ATTR = 'cdn-attr';
[283] Fix | Delete
const O_QC_NAMESERVERS = 'qc-nameservers';
[284] Fix | Delete
const O_QC_CNAME = 'qc-cname';
[285] Fix | Delete
[286] Fix | Delete
// -------------------------------------------------- ##
[287] Fix | Delete
// -------------- OptimaX ----------------- ##
[288] Fix | Delete
// -------------------------------------------------- ##
[289] Fix | Delete
const O_OPTIMAX = 'optimax';
[290] Fix | Delete
[291] Fix | Delete
const NETWORK_O_USE_PRIMARY = 'use_primary_settings';
[292] Fix | Delete
[293] Fix | Delete
const DEBUG_TMP_DISABLE = 'debug-disable_tmp';
[294] Fix | Delete
[295] Fix | Delete
/*** Other consts ***/
[296] Fix | Delete
const O_GUIDE = 'litespeed-guide'; // Array of each guidance tag as key, step as val //xx todo: may need to remove
[297] Fix | Delete
[298] Fix | Delete
// Server variables
[299] Fix | Delete
const ENV_CRAWLER_USLEEP = 'CRAWLER_USLEEP';
[300] Fix | Delete
const ENV_CRAWLER_LOAD_LIMIT = 'CRAWLER_LOAD_LIMIT';
[301] Fix | Delete
const ENV_CRAWLER_LOAD_LIMIT_ENFORCE = 'CRAWLER_LOAD_LIMIT_ENFORCE';
[302] Fix | Delete
[303] Fix | Delete
const CRWL_COOKIE_NAME = 'name';
[304] Fix | Delete
const CRWL_COOKIE_VALS = 'vals';
[305] Fix | Delete
[306] Fix | Delete
const CDN_MAPPING_URL = 'url';
[307] Fix | Delete
const CDN_MAPPING_INC_IMG = 'inc_img';
[308] Fix | Delete
const CDN_MAPPING_INC_CSS = 'inc_css';
[309] Fix | Delete
const CDN_MAPPING_INC_JS = 'inc_js';
[310] Fix | Delete
const CDN_MAPPING_FILETYPE = 'filetype';
[311] Fix | Delete
[312] Fix | Delete
const VAL_OFF = 0;
[313] Fix | Delete
const VAL_ON = 1;
[314] Fix | Delete
const VAL_ON2 = 2;
[315] Fix | Delete
[316] Fix | Delete
/* This is for API hook usage */
[317] Fix | Delete
const IMG_OPTM_BM_ORI = 1; // @Deprecated since v7.0
[318] Fix | Delete
const IMG_OPTM_BM_WEBP = 2; // @Deprecated since v7.0
[319] Fix | Delete
const IMG_OPTM_BM_LOSSLESS = 4; // @Deprecated since v7.0
[320] Fix | Delete
const IMG_OPTM_BM_EXIF = 8; // @Deprecated since v7.0
[321] Fix | Delete
const IMG_OPTM_BM_AVIF = 16; // @Deprecated since v7.0
[322] Fix | Delete
[323] Fix | Delete
/**
[324] Fix | Delete
* Site related options (Will not overwrite other sites' config).
[325] Fix | Delete
*
[326] Fix | Delete
* @var string[]
[327] Fix | Delete
*/
[328] Fix | Delete
protected static $single_site_options = [
[329] Fix | Delete
self::O_CRAWLER,
[330] Fix | Delete
self::O_CRAWLER_SITEMAP,
[331] Fix | Delete
self::O_CDN,
[332] Fix | Delete
self::O_CDN_ORI,
[333] Fix | Delete
self::O_CDN_ORI_DIR,
[334] Fix | Delete
self::O_CDN_EXC,
[335] Fix | Delete
self::O_CDN_CLOUDFLARE,
[336] Fix | Delete
self::O_CDN_CLOUDFLARE_EMAIL,
[337] Fix | Delete
self::O_CDN_CLOUDFLARE_KEY,
[338] Fix | Delete
self::O_CDN_CLOUDFLARE_NAME,
[339] Fix | Delete
self::O_CDN_CLOUDFLARE_ZONE,
[340] Fix | Delete
self::O_CDN_CLOUDFLARE_CLEAR,
[341] Fix | Delete
self::O_CDN_MAPPING,
[342] Fix | Delete
self::O_CDN_ATTR,
[343] Fix | Delete
self::O_QC_NAMESERVERS,
[344] Fix | Delete
self::O_QC_CNAME,
[345] Fix | Delete
];
[346] Fix | Delete
[347] Fix | Delete
/**
[348] Fix | Delete
* Default options for single-site installs.
[349] Fix | Delete
*
[350] Fix | Delete
* @var array<string,mixed>
[351] Fix | Delete
*/
[352] Fix | Delete
protected static $_default_options = [
[353] Fix | Delete
self::_VER => '',
[354] Fix | Delete
self::HASH => '',
[355] Fix | Delete
self::O_API_KEY => '',
[356] Fix | Delete
self::O_AUTO_UPGRADE => false,
[357] Fix | Delete
self::O_SERVER_IP => '',
[358] Fix | Delete
self::O_GUEST => false,
[359] Fix | Delete
self::O_GUEST_OPTM => false,
[360] Fix | Delete
self::O_NEWS => false,
[361] Fix | Delete
[362] Fix | Delete
// Cache
[363] Fix | Delete
self::O_CACHE => false,
[364] Fix | Delete
self::O_CACHE_PRIV => false,
[365] Fix | Delete
self::O_CACHE_COMMENTER => false,
[366] Fix | Delete
self::O_CACHE_REST => false,
[367] Fix | Delete
self::O_CACHE_PAGE_LOGIN => false,
[368] Fix | Delete
self::O_CACHE_MOBILE => false,
[369] Fix | Delete
self::O_CACHE_MOBILE_RULES => [],
[370] Fix | Delete
self::O_CACHE_BROWSER => false,
[371] Fix | Delete
self::O_CACHE_EXC_USERAGENTS => [],
[372] Fix | Delete
self::O_CACHE_EXC_COOKIES => [],
[373] Fix | Delete
self::O_CACHE_EXC_QS => [],
[374] Fix | Delete
self::O_CACHE_EXC_CAT => [],
[375] Fix | Delete
self::O_CACHE_EXC_TAG => [],
[376] Fix | Delete
self::O_CACHE_FORCE_URI => [],
[377] Fix | Delete
self::O_CACHE_FORCE_PUB_URI => [],
[378] Fix | Delete
self::O_CACHE_PRIV_URI => [],
[379] Fix | Delete
self::O_CACHE_EXC => [],
[380] Fix | Delete
self::O_CACHE_EXC_ROLES => [],
[381] Fix | Delete
self::O_CACHE_DROP_QS => [],
[382] Fix | Delete
self::O_CACHE_TTL_PUB => 0,
[383] Fix | Delete
self::O_CACHE_TTL_PRIV => 0,
[384] Fix | Delete
self::O_CACHE_TTL_FRONTPAGE => 0,
[385] Fix | Delete
self::O_CACHE_TTL_FEED => 0,
[386] Fix | Delete
self::O_CACHE_TTL_REST => 0,
[387] Fix | Delete
self::O_CACHE_TTL_BROWSER => 0,
[388] Fix | Delete
self::O_CACHE_TTL_STATUS => [],
[389] Fix | Delete
self::O_CACHE_LOGIN_COOKIE => '',
[390] Fix | Delete
self::O_CACHE_AJAX_TTL => [],
[391] Fix | Delete
self::O_CACHE_VARY_COOKIES => [],
[392] Fix | Delete
self::O_CACHE_VARY_GROUP => [],
[393] Fix | Delete
[394] Fix | Delete
// Purge
[395] Fix | Delete
self::O_PURGE_ON_UPGRADE => false,
[396] Fix | Delete
self::O_PURGE_STALE => false,
[397] Fix | Delete
self::O_PURGE_POST_ALL => false,
[398] Fix | Delete
self::O_PURGE_POST_FRONTPAGE => false,
[399] Fix | Delete
self::O_PURGE_POST_HOMEPAGE => false,
[400] Fix | Delete
self::O_PURGE_POST_PAGES => false,
[401] Fix | Delete
self::O_PURGE_POST_PAGES_WITH_RECENT_POSTS => false,
[402] Fix | Delete
self::O_PURGE_POST_AUTHOR => false,
[403] Fix | Delete
self::O_PURGE_POST_YEAR => false,
[404] Fix | Delete
self::O_PURGE_POST_MONTH => false,
[405] Fix | Delete
self::O_PURGE_POST_DATE => false,
[406] Fix | Delete
self::O_PURGE_POST_TERM => false,
[407] Fix | Delete
self::O_PURGE_POST_POSTTYPE => false,
[408] Fix | Delete
self::O_PURGE_TIMED_URLS => [],
[409] Fix | Delete
self::O_PURGE_TIMED_URLS_TIME => '',
[410] Fix | Delete
self::O_PURGE_HOOK_ALL => [],
[411] Fix | Delete
[412] Fix | Delete
// ESI
[413] Fix | Delete
self::O_ESI => false,
[414] Fix | Delete
self::O_ESI_CACHE_ADMBAR => false,
[415] Fix | Delete
self::O_ESI_CACHE_COMMFORM => false,
[416] Fix | Delete
self::O_ESI_NONCE => [],
[417] Fix | Delete
[418] Fix | Delete
// Util
[419] Fix | Delete
self::O_UTIL_INSTANT_CLICK => false,
[420] Fix | Delete
self::O_UTIL_NO_HTTPS_VARY => false,
[421] Fix | Delete
[422] Fix | Delete
// Debug
[423] Fix | Delete
self::O_DEBUG_DISABLE_ALL => false,
[424] Fix | Delete
self::O_DEBUG => false,
[425] Fix | Delete
self::O_DEBUG_IPS => [],
[426] Fix | Delete
self::O_DEBUG_LEVEL => false,
[427] Fix | Delete
self::O_DEBUG_FILESIZE => 0,
[428] Fix | Delete
self::O_DEBUG_COLLAPSE_QS => false,
[429] Fix | Delete
self::O_DEBUG_INC => [],
[430] Fix | Delete
self::O_DEBUG_EXC => [],
[431] Fix | Delete
self::O_DEBUG_EXC_STRINGS => [],
[432] Fix | Delete
[433] Fix | Delete
// DB Optm
[434] Fix | Delete
self::O_DB_OPTM_REVISIONS_MAX => 0,
[435] Fix | Delete
self::O_DB_OPTM_REVISIONS_AGE => 0,
[436] Fix | Delete
[437] Fix | Delete
// HTML Optm
[438] Fix | Delete
self::O_OPTM_CSS_MIN => false,
[439] Fix | Delete
self::O_OPTM_CSS_COMB => false,
[440] Fix | Delete
self::O_OPTM_CSS_COMB_EXT_INL => false,
[441] Fix | Delete
self::O_OPTM_UCSS => false,
[442] Fix | Delete
self::O_OPTM_UCSS_INLINE => false,
[443] Fix | Delete
self::O_OPTM_UCSS_SELECTOR_WHITELIST => [],
[444] Fix | Delete
self::O_OPTM_UCSS_FILE_EXC_INLINE => [],
[445] Fix | Delete
self::O_OPTM_UCSS_EXC => [],
[446] Fix | Delete
self::O_OPTM_CSS_EXC => [],
[447] Fix | Delete
self::O_OPTM_JS_MIN => false,
[448] Fix | Delete
self::O_OPTM_JS_COMB => false,
[449] Fix | Delete
self::O_OPTM_JS_COMB_EXT_INL => false,
[450] Fix | Delete
self::O_OPTM_JS_DELAY_INC => [],
[451] Fix | Delete
self::O_OPTM_JS_EXC => [],
[452] Fix | Delete
self::O_OPTM_HTML_MIN => false,
[453] Fix | Delete
self::O_OPTM_HTML_LAZY => [],
[454] Fix | Delete
self::O_OPTM_HTML_SKIP_COMMENTS => [],
[455] Fix | Delete
self::O_OPTM_QS_RM => false,
[456] Fix | Delete
self::O_OPTM_GGFONTS_RM => false,
[457] Fix | Delete
self::O_OPTM_CSS_ASYNC => false,
[458] Fix | Delete
self::O_OPTM_CCSS_PER_URL => false,
[459] Fix | Delete
self::O_OPTM_CCSS_SEP_POSTTYPE => [],
[460] Fix | Delete
self::O_OPTM_CCSS_SEP_URI => [],
[461] Fix | Delete
self::O_OPTM_CCSS_SELECTOR_WHITELIST => [],
[462] Fix | Delete
self::O_OPTM_CSS_ASYNC_INLINE => false,
[463] Fix | Delete
self::O_OPTM_CSS_FONT_DISPLAY => false,
[464] Fix | Delete
self::O_OPTM_JS_DEFER => false,
[465] Fix | Delete
self::O_OPTM_EMOJI_RM => false,
[466] Fix | Delete
self::O_OPTM_NOSCRIPT_RM => false,
[467] Fix | Delete
self::O_OPTM_GGFONTS_ASYNC => false,
[468] Fix | Delete
self::O_OPTM_EXC_ROLES => [],
[469] Fix | Delete
self::O_OPTM_CCSS_CON => '',
[470] Fix | Delete
self::O_OPTM_JS_DEFER_EXC => [],
[471] Fix | Delete
self::O_OPTM_GM_JS_EXC => [],
[472] Fix | Delete
self::O_OPTM_DNS_PREFETCH => [],
[473] Fix | Delete
self::O_OPTM_DNS_PREFETCH_CTRL => false,
[474] Fix | Delete
self::O_OPTM_DNS_PRECONNECT => [],
[475] Fix | Delete
self::O_OPTM_EXC => [],
[476] Fix | Delete
self::O_OPTM_GUEST_ONLY => false,
[477] Fix | Delete
[478] Fix | Delete
// Object
[479] Fix | Delete
self::O_OBJECT => false,
[480] Fix | Delete
self::O_OBJECT_KIND => false,
[481] Fix | Delete
self::O_OBJECT_HOST => '',
[482] Fix | Delete
self::O_OBJECT_PORT => 0,
[483] Fix | Delete
self::O_OBJECT_LIFE => 0,
[484] Fix | Delete
self::O_OBJECT_PERSISTENT => false,
[485] Fix | Delete
self::O_OBJECT_ADMIN => false,
[486] Fix | Delete
self::O_OBJECT_TRANSIENTS => false,
[487] Fix | Delete
self::O_OBJECT_DB_ID => 0,
[488] Fix | Delete
self::O_OBJECT_USER => '',
[489] Fix | Delete
self::O_OBJECT_PSWD => '',
[490] Fix | Delete
self::O_OBJECT_GLOBAL_GROUPS => [],
[491] Fix | Delete
self::O_OBJECT_NON_PERSISTENT_GROUPS => [],
[492] Fix | Delete
[493] Fix | Delete
// Discuss
[494] Fix | Delete
self::O_DISCUSS_AVATAR_CACHE => false,
[495] Fix | Delete
self::O_DISCUSS_AVATAR_CRON => false,
[496] Fix | Delete
self::O_DISCUSS_AVATAR_CACHE_TTL => 0,
[497] Fix | Delete
self::O_OPTM_LOCALIZE => false,
[498] Fix | Delete
self::O_OPTM_LOCALIZE_DOMAINS => [],
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function