X7ROOT File Manager
Current Path:
/home/gfecatvj/sites/radon/wp-content/plugins/w3-total-cache
home
/
gfecatvj
/
sites
/
radon
/
wp-content
/
plugins
/
w3-total-cache
/
📁
..
📄
AGENTS.md
(3.19 KB)
📄
Base_Page_Settings.php
(6.82 KB)
📄
BrowserCache_ConfigLabels.php
(14.29 KB)
📄
BrowserCache_Core.php
(3.19 KB)
📄
BrowserCache_Environment.php
(31.64 KB)
📄
BrowserCache_Environment_Apache.php
(3.38 KB)
📄
BrowserCache_Environment_LiteSpeed.php
(8.41 KB)
📄
BrowserCache_Environment_Nginx.php
(26.05 KB)
📄
BrowserCache_Page.php
(3.28 KB)
📄
BrowserCache_Page_View_QuickReference.php
(2.58 KB)
📄
BrowserCache_Page_View_SectionSecurity.php
(61.6 KB)
📄
BrowserCache_Plugin.php
(15.38 KB)
📄
BrowserCache_Plugin_Admin.php
(1.33 KB)
📄
Cache.php
(4.52 KB)
📄
CacheFlush.php
(8.16 KB)
📄
CacheFlush_Locally.php
(12.6 KB)
📄
CacheGroups_Plugin_Admin.php
(7.98 KB)
📄
CacheGroups_Plugin_Admin_View.js
(17.23 KB)
📄
CacheGroups_Plugin_Admin_View.php
(15.17 KB)
📄
Cache_Apc.php
(7.75 KB)
📄
Cache_Apcu.php
(7.77 KB)
📄
Cache_Base.php
(6.49 KB)
📄
Cache_Eaccelerator.php
(7.58 KB)
📄
Cache_File.php
(21.3 KB)
📄
Cache_File_Cleaner.php
(2.8 KB)
📄
Cache_File_Cleaner_Generic.php
(4.05 KB)
📄
Cache_File_Cleaner_Generic_HardDelete.php
(1.05 KB)
📄
Cache_File_Generic.php
(13.22 KB)
📄
Cache_Memcache.php
(14.69 KB)
📄
Cache_Memcached.php
(20.52 KB)
📄
Cache_Memcached_Stats.php
(3.52 KB)
📄
Cache_Nginx_Memcached.php
(13.55 KB)
📄
Cache_Redis.php
(16.6 KB)
📄
Cache_Wincache.php
(12.72 KB)
📄
Cache_Xcache.php
(11.55 KB)
📄
CdnEngine.php
(2.54 KB)
📄
CdnEngine_Azure.php
(12.65 KB)
📄
CdnEngine_Azure_MI.php
(12.28 KB)
📄
CdnEngine_Azure_MI_Utility.php
(18.19 KB)
📄
CdnEngine_Base.php
(16.37 KB)
📄
CdnEngine_CloudFront.php
(12.38 KB)
📄
CdnEngine_Ftp.php
(21.08 KB)
📄
CdnEngine_GoogleDrive.php
(24.14 KB)
📄
CdnEngine_Mirror.php
(2.46 KB)
📄
CdnEngine_Mirror_Akamai.php
(3.52 KB)
📄
CdnEngine_Mirror_Att.php
(293 B)
📄
CdnEngine_Mirror_BunnyCdn.php
(4.3 KB)
📄
CdnEngine_Mirror_CloudFront.php
(10.48 KB)
📄
CdnEngine_Mirror_Cotendo.php
(3.72 KB)
📄
CdnEngine_Mirror_Edgecast.php
(4.46 KB)
📄
CdnEngine_Mirror_RackSpaceCdn.php
(6.57 KB)
📄
CdnEngine_RackSpaceCloudFiles.php
(12.01 KB)
📄
CdnEngine_S3.php
(17.55 KB)
📄
CdnEngine_S3_Compatible.php
(10.36 KB)
📄
Cdn_AdminActions.php
(16.93 KB)
📄
Cdn_AdminNotes.php
(13.71 KB)
📄
Cdn_BunnyCdn_Api.php
(15.67 KB)
📄
Cdn_BunnyCdn_Page.php
(7.54 KB)
📄
Cdn_BunnyCdn_Page_View.js
(7.36 KB)
📄
Cdn_BunnyCdn_Page_View.php
(3.6 KB)
📄
Cdn_BunnyCdn_Page_View_Purge_Urls.php
(2.19 KB)
📄
Cdn_BunnyCdn_Popup.php
(10.83 KB)
📄
Cdn_BunnyCdn_Popup_View_Configured.php
(864 B)
📄
Cdn_BunnyCdn_Popup_View_Deauthorize.php
(2.15 KB)
📄
Cdn_BunnyCdn_Popup_View_Deauthorized.php
(1.54 KB)
📄
Cdn_BunnyCdn_Popup_View_Intro.php
(1.83 KB)
📄
Cdn_BunnyCdn_Popup_View_Pull_Zones.php
(5.16 KB)
📄
Cdn_BunnyCdn_Widget.php
(2.25 KB)
📄
Cdn_BunnyCdn_Widget_View.css
(1.26 KB)
📄
Cdn_BunnyCdn_Widget_View_Authorized.php
(1.9 KB)
📄
Cdn_BunnyCdn_Widget_View_Unauthorized.php
(6.1 KB)
📄
Cdn_CacheFlush.php
(2.64 KB)
📄
Cdn_ConfigLabels.php
(6.89 KB)
📄
Cdn_Core.php
(33.06 KB)
📄
Cdn_Core_Admin.php
(27.2 KB)
📄
Cdn_Environment.php
(19.29 KB)
📄
Cdn_Environment_LiteSpeed.php
(5.19 KB)
📄
Cdn_Environment_Nginx.php
(3.92 KB)
📄
Cdn_GeneralPage_View.php
(4.05 KB)
📄
Cdn_GoogleDrive_AdminActions.php
(3.53 KB)
📄
Cdn_GoogleDrive_Page.php
(2.03 KB)
📄
Cdn_GoogleDrive_Page_View.js
(488 B)
📄
Cdn_GoogleDrive_Page_View.php
(1.36 KB)
📄
Cdn_GoogleDrive_Popup_AuthReturn.php
(1.61 KB)
📄
Cdn_GoogleDrive_Popup_AuthReturn_View.php
(1.66 KB)
📄
Cdn_Page.php
(3.5 KB)
📄
Cdn_Page_View_Fsd_HeaderActions.php
(760 B)
📄
Cdn_Plugin.php
(43.91 KB)
📄
Cdn_Plugin_Admin.php
(7.72 KB)
📄
Cdn_RackSpaceCdn_AdminActions.php
(1.28 KB)
📄
Cdn_RackSpaceCdn_Page.php
(2.05 KB)
📄
Cdn_RackSpaceCdn_Page_View.js
(4.28 KB)
📄
Cdn_RackSpaceCdn_Page_View.php
(5.22 KB)
📄
Cdn_RackSpaceCdn_Popup.php
(21.49 KB)
📄
Cdn_RackSpaceCdn_Popup_View_ConfigureDomains.php
(1.87 KB)
📄
Cdn_RackSpaceCdn_Popup_View_Intro.php
(1.71 KB)
📄
Cdn_RackSpaceCdn_Popup_View_Regions.php
(1.76 KB)
📄
Cdn_RackSpaceCdn_Popup_View_Service_Actualize.php
(2.04 KB)
📄
Cdn_RackSpaceCdn_Popup_View_Service_Create.php
(4.41 KB)
📄
Cdn_RackSpaceCdn_Popup_View_Service_Created.php
(2.48 KB)
📄
Cdn_RackSpaceCdn_Popup_View_Services.php
(1.99 KB)
📄
Cdn_RackSpaceCloudFiles_Page.php
(1.67 KB)
📄
Cdn_RackSpaceCloudFiles_Page_View.js
(681 B)
📄
Cdn_RackSpaceCloudFiles_Page_View.php
(4.91 KB)
📄
Cdn_RackSpaceCloudFiles_Popup.php
(7.62 KB)
📄
Cdn_RackSpaceCloudFiles_Popup_View_Containers.php
(2.06 KB)
📄
Cdn_RackSpaceCloudFiles_Popup_View_Intro.php
(1.71 KB)
📄
Cdn_RackSpaceCloudFiles_Popup_View_Regions.php
(1.78 KB)
📄
Cdn_RackSpace_Api_CaCert-example.pem
(195.74 KB)
📄
Cdn_RackSpace_Api_Cdn.php
(10.72 KB)
📄
Cdn_RackSpace_Api_CloudFiles.php
(8.38 KB)
📄
Cdn_RackSpace_Api_CloudFilesCdn.php
(8.48 KB)
📄
Cdn_RackSpace_Api_Tokens.php
(6.78 KB)
📄
Cdn_Util.php
(6.73 KB)
📄
Cdnfsd_BunnyCdn_Engine.php
(2.03 KB)
📄
Cdnfsd_BunnyCdn_Page.php
(683 B)
📄
Cdnfsd_BunnyCdn_Page_View.js
(3.92 KB)
📄
Cdnfsd_BunnyCdn_Page_View.php
(3.72 KB)
📄
Cdnfsd_BunnyCdn_Popup.php
(10.39 KB)
📄
Cdnfsd_BunnyCdn_Popup_View_Configured.php
(1.3 KB)
📄
Cdnfsd_BunnyCdn_Popup_View_Deauthorize.php
(2.17 KB)
📄
Cdnfsd_BunnyCdn_Popup_View_Deauthorized.php
(1.56 KB)
📄
Cdnfsd_BunnyCdn_Popup_View_Intro.php
(1.85 KB)
📄
Cdnfsd_BunnyCdn_Popup_View_Pull_Zones.php
(5.57 KB)
📄
Cdnfsd_CacheFlush.php
(8.25 KB)
📄
Cdnfsd_CloudFront_Engine.php
(3.38 KB)
📄
Cdnfsd_CloudFront_Page.php
(741 B)
📄
Cdnfsd_CloudFront_Page_View.js
(2.73 KB)
📄
Cdnfsd_CloudFront_Page_View.php
(2.04 KB)
📄
Cdnfsd_CloudFront_Popup.php
(15.46 KB)
📄
Cdnfsd_CloudFront_Popup_View_Distribution.php
(3.34 KB)
📄
Cdnfsd_CloudFront_Popup_View_Distributions.php
(1.72 KB)
📄
Cdnfsd_CloudFront_Popup_View_Intro.php
(1.65 KB)
📄
Cdnfsd_CloudFront_Popup_View_Success.php
(976 B)
📄
Cdnfsd_Core.php
(1.96 KB)
📄
Cdnfsd_GeneralPage_View.php
(4.02 KB)
📄
Cdnfsd_Plugin.php
(1.98 KB)
📄
Cdnfsd_Plugin_Admin.php
(2.63 KB)
📄
Cdnfsd_TransparentCDN_Engine.php
(7.97 KB)
📄
Cdnfsd_TransparentCDN_Page.php
(1.55 KB)
📄
Cdnfsd_TransparentCDN_Page_View.js
(1.36 KB)
📄
Cdnfsd_TransparentCDN_Page_View.php
(2.33 KB)
📄
Cdnfsd_Util.php
(834 B)
📄
Cli.php
(17.33 KB)
📄
Config.php
(16.8 KB)
📄
ConfigCache.php
(4.67 KB)
📄
ConfigCompiler.php
(17.87 KB)
📄
ConfigDbStorage.php
(15.87 KB)
📄
ConfigKeys.php
(69.97 KB)
📄
ConfigSettingsTabs.php
(1.18 KB)
📄
ConfigSettingsTabsKeys.php
(23.62 KB)
📄
ConfigState.php
(6.16 KB)
📄
ConfigStateNote.php
(1.94 KB)
📄
ConfigUtil.php
(3.45 KB)
📄
DbCache_ConfigLabels.php
(1.62 KB)
📄
DbCache_Core.php
(2.05 KB)
📄
DbCache_Environment.php
(6.41 KB)
📄
DbCache_Page.php
(1.1 KB)
📄
DbCache_Plugin.php
(9.93 KB)
📄
DbCache_Plugin_Admin.php
(5.08 KB)
📄
DbCache_Wpdb.php
(1.63 KB)
📄
DbCache_WpdbBase.php
(346 B)
📄
DbCache_WpdbInjection.php
(7.15 KB)
📄
DbCache_WpdbInjection_QueryCaching.php
(26.39 KB)
📄
DbCache_WpdbLegacy.php
(22.61 KB)
📄
DbCache_WpdbNew.php
(22.42 KB)
📄
Dispatcher.php
(8.21 KB)
📄
Enterprise_CacheFlush_MakeSnsEvent.php
(7.47 KB)
📄
Enterprise_Dbcache_WpdbInjection_Cluster.php
(30.34 KB)
📄
Enterprise_SnsBase.php
(3.07 KB)
📄
Enterprise_SnsServer.php
(5.17 KB)
📄
Extension_AlwaysCached_AdminActions.php
(2.36 KB)
📄
Extension_AlwaysCached_Environment.php
(2.87 KB)
📄
Extension_AlwaysCached_Page.php
(4 KB)
📄
Extension_AlwaysCached_Page_Queue_View.php
(3.14 KB)
📄
Extension_AlwaysCached_Page_View.js
(7.26 KB)
📄
Extension_AlwaysCached_Page_View.php
(2.51 KB)
📄
Extension_AlwaysCached_Page_View_BoxCron.php
(2.92 KB)
📄
Extension_AlwaysCached_Page_View_BoxFlushAll.php
(3.28 KB)
📄
Extension_AlwaysCached_Page_View_BoxQueue.php
(4.35 KB)
📄
Extension_AlwaysCached_Page_View_Exclusions.php
(1.11 KB)
📄
Extension_AlwaysCached_Plugin.php
(12.2 KB)
📄
Extension_AlwaysCached_Plugin_Admin.php
(3.06 KB)
📄
Extension_AlwaysCached_Queue.php
(10.22 KB)
📄
Extension_AlwaysCached_Worker.php
(2.93 KB)
📄
Extension_Amp_Page_View.php
(1.26 KB)
📄
Extension_Amp_Plugin.php
(11.1 KB)
📄
Extension_Amp_Plugin_Admin.php
(2.19 KB)
📄
Extension_CloudFlare_AdminActions.php
(1.57 KB)
📄
Extension_CloudFlare_Api.php
(12.19 KB)
📄
Extension_CloudFlare_Cdn_Page_View.php
(625 B)
📄
Extension_CloudFlare_GeneralPage_View.php
(3.05 KB)
📄
Extension_CloudFlare_Page.php
(4.32 KB)
📄
Extension_CloudFlare_Page_View.js
(1.15 KB)
📄
Extension_CloudFlare_Page_View.php
(27.38 KB)
📄
Extension_CloudFlare_Plugin.php
(15.22 KB)
📄
Extension_CloudFlare_Plugin_Admin.php
(14.6 KB)
📄
Extension_CloudFlare_Popup.php
(4.21 KB)
📄
Extension_CloudFlare_Popup_View_Intro.php
(1.75 KB)
📄
Extension_CloudFlare_Popup_View_Zones.php
(2.09 KB)
📄
Extension_CloudFlare_SettingsForUi.php
(4.84 KB)
📄
Extension_CloudFlare_View_Dashboard.js
(730 B)
📄
Extension_CloudFlare_Widget.php
(4.63 KB)
📄
Extension_CloudFlare_Widget_Logo.png
(6.96 KB)
📄
Extension_CloudFlare_Widget_View.css
(683 B)
📄
Extension_CloudFlare_Widget_View.php
(1.65 KB)
📄
Extension_FragmentCache_Api.php
(7.01 KB)
📄
Extension_FragmentCache_Core.php
(3.38 KB)
📄
Extension_FragmentCache_Environment.php
(1.41 KB)
📄
Extension_FragmentCache_GeneralPage.php
(1.27 KB)
📄
Extension_FragmentCache_GeneralPage_View.php
(2.53 KB)
📄
Extension_FragmentCache_Page.php
(697 B)
📄
Extension_FragmentCache_Page_View.php
(5.25 KB)
📄
Extension_FragmentCache_Plugin.php
(8.21 KB)
📄
Extension_FragmentCache_Plugin_Admin.php
(9.21 KB)
📄
Extension_FragmentCache_WpObjectCache.php
(16.91 KB)
📄
Extension_Genesis_Page.php
(409 B)
📄
Extension_Genesis_Page_View.php
(11.12 KB)
📄
Extension_Genesis_Plugin.php
(14.46 KB)
📄
Extension_Genesis_Plugin_Admin.php
(5.45 KB)
📄
Extension_ImageService_Api.php
(14.89 KB)
📄
Extension_ImageService_Cron.php
(13.7 KB)
📄
Extension_ImageService_Environment.php
(8.52 KB)
📄
Extension_ImageService_Page_View.php
(10.03 KB)
📄
Extension_ImageService_Plugin.php
(1.44 KB)
📄
Extension_ImageService_Plugin_Admin.css
(2.34 KB)
📄
Extension_ImageService_Plugin_Admin.js
(25.71 KB)
📄
Extension_ImageService_Plugin_Admin.php
(71.88 KB)
📄
Extension_ImageService_Widget.js
(6.17 KB)
📄
Extension_ImageService_Widget.php
(3.34 KB)
📄
Extension_ImageService_Widget_View.php
(1.59 KB)
📄
Extension_NewRelic_AdminActions.php
(1.11 KB)
📄
Extension_NewRelic_AdminNotes.php
(2.11 KB)
📄
Extension_NewRelic_Api.php
(4.34 KB)
📄
Extension_NewRelic_Core.php
(1.33 KB)
📄
Extension_NewRelic_GeneralPage.php
(1.53 KB)
📄
Extension_NewRelic_GeneralPage_View.php
(2.84 KB)
📄
Extension_NewRelic_Page.php
(1.35 KB)
📄
Extension_NewRelic_Page_View_Apm.php
(12.97 KB)
📄
Extension_NewRelic_Plugin.php
(7.07 KB)
📄
Extension_NewRelic_Plugin_Admin.php
(8.1 KB)
📄
Extension_NewRelic_Popup.php
(6.05 KB)
📄
Extension_NewRelic_Popup_View.js
(2.84 KB)
📄
Extension_NewRelic_Popup_View_Intro.php
(1.37 KB)
📄
Extension_NewRelic_Popup_View_ListApplications.php
(4.2 KB)
📄
Extension_NewRelic_Service.php
(23.65 KB)
📄
Extension_NewRelic_Widget.php
(10.85 KB)
📄
Extension_NewRelic_Widget_View.css
(1.37 KB)
📄
Extension_NewRelic_Widget_View.js
(2.24 KB)
📄
Extension_NewRelic_Widget_View_Apm.php
(2.91 KB)
📄
Extension_NewRelic_Widget_View_Browser.php
(436 B)
📄
Extension_NewRelic_Widget_View_NotConfigured.php
(233 B)
📄
Extension_Swarmify_AdminActions.php
(793 B)
📄
Extension_Swarmify_Core.php
(748 B)
📄
Extension_Swarmify_Page.php
(708 B)
📄
Extension_Swarmify_Page_View.php
(2.78 KB)
📄
Extension_Swarmify_Plugin.php
(4.63 KB)
📄
Extension_Swarmify_Plugin_Admin.php
(2.63 KB)
📄
Extension_WordPressSeo_Plugin.php
(1.39 KB)
📄
Extension_WordPressSeo_Plugin_Admin.php
(5.25 KB)
📄
Extension_Wpml_Plugin.php
(1.34 KB)
📄
Extension_Wpml_Plugin_Admin.php
(7.45 KB)
📄
Extensions_AdminActions.php
(943 B)
📄
Extensions_Page.php
(4.06 KB)
📄
Extensions_Plugin_Admin.php
(9.67 KB)
📄
Extensions_Util.php
(4.43 KB)
📄
FeatureShowcase_Plugin_Admin.php
(29.12 KB)
📄
FeatureShowcase_Plugin_Admin_View.php
(2.82 KB)
📄
Generic_AdminActions_Config.php
(6.61 KB)
📄
Generic_AdminActions_Default.php
(21.84 KB)
📄
Generic_AdminActions_Flush.php
(11.19 KB)
📄
Generic_AdminActions_Test.php
(6.19 KB)
📄
Generic_AdminNotes.php
(13.88 KB)
📄
Generic_ConfigLabels.php
(4.08 KB)
📄
Generic_Environment.php
(6.67 KB)
📄
Generic_Faq.php
(2.27 KB)
📄
Generic_GeneralPage_View_ShowEdge.js
(314 B)
📄
Generic_Page_About.php
(503 B)
📄
Generic_Page_Dashboard.php
(1.66 KB)
📄
Generic_Page_Dashboard_View.css
(6.33 KB)
📄
Generic_Page_General.php
(2.88 KB)
📄
Generic_Page_Install.php
(913 B)
📄
Generic_Page_PurgeLog.php
(2.81 KB)
📄
Generic_Page_PurgeLog_View.php
(2.97 KB)
📄
Generic_Plugin.php
(34.74 KB)
📄
Generic_Plugin_Admin.php
(50.76 KB)
📄
Generic_Plugin_AdminCompatibility.php
(4.02 KB)
📄
Generic_Plugin_AdminNotices.css
(188 B)
📄
Generic_Plugin_AdminNotices.js
(1.66 KB)
📄
Generic_Plugin_AdminNotices.php
(12.19 KB)
📄
Generic_Plugin_AdminRowActions.php
(2.43 KB)
📄
Generic_Plugin_Admin_View_Faq.php
(1007 B)
📄
Generic_Plugin_Survey.php
(4.8 KB)
📄
Generic_WidgetAccount.php
(1.05 KB)
📄
Generic_WidgetAccount_View.php
(2.1 KB)
📄
Generic_WidgetBoldGrid.php
(1.97 KB)
📄
Generic_WidgetBoldGrid_AdminActions.php
(912 B)
📄
Generic_WidgetBoldGrid_Logo.svg
(4.28 KB)
📄
Generic_WidgetBoldGrid_View.js
(625 B)
📄
Generic_WidgetBoldGrid_View.php
(872 B)
📄
Generic_WidgetPartners.php
(1.08 KB)
📄
Generic_WidgetPartners_View.php
(1.73 KB)
📄
Generic_WidgetServices.php
(1.66 KB)
📄
Generic_WidgetServices_View.php
(501 B)
📄
Generic_WidgetSettings.php
(1.05 KB)
📄
Generic_WidgetSettings_View.php
(3.37 KB)
📄
Generic_WidgetSpreadTheWord.js
(879 B)
📄
Generic_WidgetSpreadTheWord_Plugin.php
(2.03 KB)
📄
Generic_WidgetSpreadTheWord_View.php
(579 B)
📄
Generic_WidgetStats.js
(3.3 KB)
📄
Generic_WidgetStats.php
(4.84 KB)
📄
LICENSE
(17.67 KB)
📄
Licensing_AdminActions.php
(4.22 KB)
📄
Licensing_Core.php
(6.24 KB)
📄
Licensing_Plugin_Admin.php
(36.41 KB)
📄
Minify_AutoCss.php
(8.83 KB)
📄
Minify_AutoJs.php
(13.36 KB)
📄
Minify_ConfigLabels.php
(12.84 KB)
📄
Minify_ContentMinifier.php
(10.24 KB)
📄
Minify_Core.php
(7.42 KB)
📄
Minify_Environment.php
(26.91 KB)
📄
Minify_Environment_LiteSpeed.php
(977 B)
📄
Minify_Extract.php
(2.8 KB)
📄
Minify_GeneralPage_View_ShowHelp.js
(1.12 KB)
📄
Minify_GeneralPage_View_ShowHelpForce.js
(51 B)
📄
Minify_HelpPopup_View.php
(5.01 KB)
📄
Minify_MinifiedFileRequestHandler.php
(33.92 KB)
📄
Minify_Page.php
(18.5 KB)
📄
Minify_Plugin.php
(43.49 KB)
📄
Minify_Plugin_Admin.php
(12.92 KB)
📄
Mobile_Base.php
(6.85 KB)
📄
Mobile_Redirect.php
(1.85 KB)
📄
Mobile_Referrer.php
(2.4 KB)
📄
Mobile_UserAgent.php
(971 B)
📄
ModuleStatus.php
(4.37 KB)
📄
ObjectCache_ConfigLabels.php
(1.58 KB)
📄
ObjectCache_DiskPopup.js
(2.41 KB)
📄
ObjectCache_DiskPopup_View.php
(1.85 KB)
📄
ObjectCache_Environment.php
(6.79 KB)
📄
ObjectCache_Page.php
(560 B)
📄
ObjectCache_Page_View_PurgeLog.php
(1.01 KB)
📄
ObjectCache_Plugin.php
(6.63 KB)
📄
ObjectCache_Plugin_Admin.php
(6.97 KB)
📄
ObjectCache_WpObjectCache.php
(10.17 KB)
📄
ObjectCache_WpObjectCache_Regular.php
(39.6 KB)
📄
PageSpeed_Api.php
(12.12 KB)
📄
PageSpeed_Data.php
(15.23 KB)
📄
PageSpeed_Instructions.php
(41.99 KB)
📄
PageSpeed_Page.php
(8.76 KB)
📄
PageSpeed_Page_View.css
(7.34 KB)
📄
PageSpeed_Page_View.js
(9.48 KB)
📄
PageSpeed_Page_View.php
(2.08 KB)
📄
PageSpeed_Page_View_FromAPI.php
(7.65 KB)
📄
PageSpeed_Widget.php
(7.03 KB)
📄
PageSpeed_Widget_View.css
(2.62 KB)
📄
PageSpeed_Widget_View.js
(2.08 KB)
📄
PageSpeed_Widget_View.php
(1.09 KB)
📄
PageSpeed_Widget_View_FromApi.php
(3.71 KB)
📄
PgCache_ConfigLabels.php
(7.8 KB)
📄
PgCache_ContentGrabber.php
(71.49 KB)
📄
PgCache_Environment.php
(52.36 KB)
📄
PgCache_Flush.php
(16.32 KB)
📄
PgCache_Page.php
(1.6 KB)
📄
PgCache_Page_View.js
(553 B)
📄
PgCache_Plugin.php
(14.33 KB)
📄
PgCache_Plugin_Admin.php
(14.93 KB)
📄
PgCache_QsExempts.php
(1.88 KB)
📄
Root_AdminActions.php
(3.05 KB)
📄
Root_AdminActivation.php
(6.52 KB)
📄
Root_AdminMenu.php
(8.37 KB)
📄
Root_Environment.php
(7.81 KB)
📄
Root_Loader.php
(6.94 KB)
📄
SetupGuide_Plugin_Admin.php
(57.96 KB)
📄
Support_AdminActions.php
(6.14 KB)
📄
Support_Page.php
(3.08 KB)
📄
Support_Page_View_DoneContent.php
(353 B)
📄
Support_Page_View_PageContent.php
(1.39 KB)
📄
SystemOpCache_AdminActions.php
(1.18 KB)
📄
SystemOpCache_Core.php
(2.48 KB)
📄
SystemOpCache_GeneralPage_View.php
(2.27 KB)
📄
SystemOpCache_Plugin_Admin.php
(3.37 KB)
📄
UsageStatistics_AdminActions.php
(1.14 KB)
📄
UsageStatistics_Core.php
(3.39 KB)
📄
UsageStatistics_GeneralPage.php
(1.6 KB)
📄
UsageStatistics_GeneralPage_View.php
(6.18 KB)
📄
UsageStatistics_Page.php
(8.4 KB)
📄
UsageStatistics_Page_DbRequests_View.php
(1.79 KB)
📄
UsageStatistics_Page_ObjectCacheLog_View.php
(1.97 KB)
📄
UsageStatistics_Page_PageCacheRequests_View.php
(1.86 KB)
📄
UsageStatistics_Page_View.css
(2.73 KB)
📄
UsageStatistics_Page_View.js
(21.37 KB)
📄
UsageStatistics_Page_View.php
(17.13 KB)
📄
UsageStatistics_Page_View_Ad.php
(688 B)
📄
UsageStatistics_Page_View_Disabled.php
(610 B)
📄
UsageStatistics_Page_View_Free.php
(635 B)
📄
UsageStatistics_Page_View_NoDebugMode.php
(615 B)
📄
UsageStatistics_Plugin.php
(2.89 KB)
📄
UsageStatistics_Plugin_Admin.php
(5.65 KB)
📄
UsageStatistics_Source_AccessLog.php
(17.47 KB)
📄
UsageStatistics_Source_DbQueriesLog.php
(6.04 KB)
📄
UsageStatistics_Source_ObjectCacheLog.php
(5.57 KB)
📄
UsageStatistics_Source_PageCacheLog.php
(6.11 KB)
📄
UsageStatistics_Source_Wpdb.php
(3.49 KB)
📄
UsageStatistics_Sources.php
(5.41 KB)
📄
UsageStatistics_Sources_Apc.php
(3.39 KB)
📄
UsageStatistics_Sources_Memcached.php
(4.58 KB)
📄
UsageStatistics_Sources_Redis.php
(4.69 KB)
📄
UsageStatistics_StorageReader.php
(2.81 KB)
📄
UsageStatistics_StorageWriter.php
(14.38 KB)
📄
UserExperience_DeferScripts_Extension.php
(7.04 KB)
📄
UserExperience_DeferScripts_Mutator.php
(2.78 KB)
📄
UserExperience_DeferScripts_Page_View.php
(3.91 KB)
📄
UserExperience_DeferScripts_Script.js
(373 B)
📄
UserExperience_Emoji_Extension.php
(3.04 KB)
📄
UserExperience_GeneralPage.php
(1.72 KB)
📄
UserExperience_GeneralPage_View.php
(8.21 KB)
📄
UserExperience_LazyLoad_GoogleMaps_GoogleMapsEasy.php
(3.89 KB)
📄
UserExperience_LazyLoad_GoogleMaps_WPGoogleMapPlugin.php
(2.14 KB)
📄
UserExperience_LazyLoad_GoogleMaps_WPGoogleMaps.php
(3.94 KB)
📄
UserExperience_LazyLoad_Mutator.php
(9.36 KB)
📄
UserExperience_LazyLoad_Mutator_Picture.php
(2.52 KB)
📄
UserExperience_LazyLoad_Mutator_Unmutable.php
(2.88 KB)
📄
UserExperience_LazyLoad_Page_View.php
(6.46 KB)
📄
UserExperience_LazyLoad_Plugin.php
(9.17 KB)
📄
UserExperience_OEmbed_Extension.php
(795 B)
📄
UserExperience_Page.php
(527 B)
📄
UserExperience_Page_View.php
(695 B)
📄
UserExperience_Plugin_Admin.php
(3.49 KB)
📄
UserExperience_Plugin_Jquery.php
(1.4 KB)
📄
UserExperience_Preload_Requests_Extension.php
(6.15 KB)
📄
UserExperience_Preload_Requests_Page_View.php
(8.79 KB)
📄
UserExperience_Remove_CssJs_Extension.php
(6.79 KB)
📄
UserExperience_Remove_CssJs_Mutator.php
(4.45 KB)
📄
UserExperience_Remove_CssJs_Page_View.js
(10.2 KB)
📄
UserExperience_Remove_CssJs_Page_View.php
(14.59 KB)
📄
Util_Activation.php
(10.38 KB)
📄
Util_Admin.php
(25.03 KB)
📄
Util_AttachToActions.php
(7.65 KB)
📄
Util_Bus.php
(832 B)
📄
Util_ConfigLabel.php
(1.57 KB)
📄
Util_Content.php
(3.03 KB)
📄
Util_Debug.php
(6.38 KB)
📄
Util_DebugPurgeLog_Reader.php
(3.36 KB)
📄
Util_Environment.php
(43.16 KB)
📄
Util_Environment_Exception.php
(719 B)
📄
Util_Environment_Exceptions.php
(1.42 KB)
📄
Util_File.php
(13.43 KB)
📄
Util_Http.php
(6.63 KB)
📄
Util_Installed.php
(4.24 KB)
📄
Util_Mime.php
(2.9 KB)
📄
Util_PageSpeed.php
(44.06 KB)
📄
Util_PageUrls.php
(32.57 KB)
📄
Util_Request.php
(3.52 KB)
📄
Util_Rule.php
(13.83 KB)
📄
Util_Theme.php
(3.87 KB)
📄
Util_Ui.php
(83.76 KB)
📄
Util_UsageStatistics.php
(13.6 KB)
📄
Util_Widget.php
(7.94 KB)
📄
Util_WpFile.php
(16.48 KB)
📄
Util_WpFile_FilesystemChmodException.php
(1.66 KB)
📄
Util_WpFile_FilesystemCopyException.php
(1.79 KB)
📄
Util_WpFile_FilesystemMkdirException.php
(1.14 KB)
📄
Util_WpFile_FilesystemModifyException.php
(2.35 KB)
📄
Util_WpFile_FilesystemOperationException.php
(1.29 KB)
📄
Util_WpFile_FilesystemRmException.php
(1.14 KB)
📄
Util_WpFile_FilesystemRmdirException.php
(1.19 KB)
📄
Util_WpFile_FilesystemWriteException.php
(1.57 KB)
📄
Util_WpmuBlogmap.php
(8.06 KB)
📄
Varnish_Flush.php
(18.63 KB)
📄
Varnish_Plugin.php
(3.3 KB)
📄
changelog.txt
(42.56 KB)
📁
extension-example
📁
inc
📄
index.html
(0 B)
📁
ini
📁
languages
📁
lib
📄
press.txt
(45.78 KB)
📁
pub
📄
readme.txt
(40.82 KB)
📄
security.md
(416 B)
📁
vendor
📄
w3-total-cache-api.php
(22.51 KB)
📄
w3-total-cache-old-php.php
(1.25 KB)
📄
w3-total-cache.php
(2.83 KB)
📁
wp-content
Editing: Licensing_Plugin_Admin.php
<?php /** * File: Licensing_Plugin_Admin.php * * @package W3TC */ namespace W3TC; /** * Class Licensing_Plugin_Admin * * phpcs:disable PSR2.Classes.PropertyDeclaration.Underscore * phpcs:disable PSR2.Methods.MethodDeclaration.Underscore * phpcs:disable Generic.CodeAnalysis.EmptyStatement */ class Licensing_Plugin_Admin { /** * Config * * @var Config */ private $_config = null; /** * Constructor for the Licensing Plugin Admin class. * * Initializes the configuration. * * @return void */ public function __construct() { $this->_config = Dispatcher::config(); } /** * Usermeta key for storing dismissed license notices. * * @since 2.9.1 * * @var string */ const NOTICE_DISMISSED_META_KEY = 'w3tc_license_notice_dismissed'; /** * Time in seconds after which a dismissed notice can reappear if conditions persist. * Set to 6 days (automatic license check interval is 5 days). * * @since 2.9.1 * * @var int */ const NOTICE_DISMISSAL_RESET_TIME = 518400; /** * Cache duration for the billing URL transient (19 minutes). * * The HLT (Hosted Login Token) in the billing URL is only valid for 19 minutes, * so we cache for 19 minutes to ensure users always get a valid token with some buffer. * * @since 2.9.1 * * @var int */ const BILLING_URL_CACHE_DURATION = 1140; /** * Registers hooks for the plugin's admin functionality. * * Adds actions and filters for admin initialization, AJAX, UI updates, and admin bar menu. * * @return void */ public function run() { add_action( 'admin_init', array( $this, 'admin_init' ) ); add_action( 'w3tc_config_ui_save-w3tc_general', array( $this, 'possible_state_change' ), 2, 10 ); add_action( 'w3tc_message_action_licensing_upgrade', array( $this, 'w3tc_message_action_licensing_upgrade' ) ); add_filter( 'w3tc_admin_bar_menu', array( $this, 'w3tc_admin_bar_menu' ) ); // AJAX handler for dismissing license notices. add_action( 'wp_ajax_w3tc_dismiss_license_notice', array( $this, 'ajax_dismiss_license_notice' ) ); // AJAX handler for rechecking license status. add_action( 'wp_ajax_w3tc_recheck_license', array( $this, 'ajax_recheck_license' ) ); // Register scripts for license notice dismissal. add_action( 'admin_enqueue_scripts', array( $this, 'register_notice_scripts' ) ); } /** * Adds licensing menu items to the admin bar. * * @param array $menu_items Existing admin bar menu items. * * @return array Modified admin bar menu items. */ public function w3tc_admin_bar_menu( $menu_items ) { if ( ! Util_Environment::is_w3tc_pro( $this->_config ) ) { $menu_items['00020.licensing'] = array( 'id' => 'w3tc_overlay_upgrade', 'parent' => 'w3tc', 'title' => wp_kses( sprintf( // translators: 1 opening HTML span tag, 2 closing HTML span tag. __( '%1$sUpgrade Performance%2$s', 'w3-total-cache' ), '<span style="color: red; background: none;">', '</span>' ), array( 'span' => array( 'style' => array(), ), ) ), 'href' => wp_nonce_url( network_admin_url( 'admin.php?page=w3tc_dashboard&w3tc_message_action=licensing_upgrade' ), 'w3tc' ), ); } if ( defined( 'W3TC_DEBUG' ) && W3TC_DEBUG ) { $menu_items['90040.licensing'] = array( 'id' => 'w3tc_debug_overlay_upgrade', 'parent' => 'w3tc_debug_overlays', 'title' => esc_html__( 'Upgrade', 'w3-total-cache' ), 'href' => wp_nonce_url( network_admin_url( 'admin.php?page=w3tc_dashboard&w3tc_message_action=licensing_upgrade' ), 'w3tc' ), ); } return $menu_items; } /** * Handles the licensing upgrade action. * * Adds a hook to modify the admin head for licensing upgrades. * * @return void */ public function w3tc_message_action_licensing_upgrade() { add_action( 'admin_head', array( $this, 'admin_head_licensing_upgrade' ) ); } /** * Outputs JavaScript for the licensing upgrade page. * * @return void */ public function admin_head_licensing_upgrade() { ?> <script type="text/javascript"> jQuery(function() { w3tc_lightbox_upgrade(w3tc_nonce, 'topbar_performance'); jQuery('#w3tc-license-instruction').show(); }); </script> <?php } /** * Handles possible state changes for plugin licensing. * * @param object $config Current configuration object. * @param object $old_config Previous configuration object. * * @return void */ public function possible_state_change( $config, $old_config ) { $changed = false; $new_key = $config->get_string( 'plugin.license_key' ); $new_key_set = ! empty( $new_key ); $old_key = $old_config->get_string( 'plugin.license_key' ); $old_key_set = ! empty( $old_key ); // Clear billing URL transient if license key is changing. if ( $old_key_set && $old_key !== $new_key ) { $old_transient_key = 'w3tc_billing_url_' . md5( $old_key ); delete_transient( $old_transient_key ); } switch ( true ) { // No new key or old key. Do nothing. case ( ! $new_key_set && ! $old_key_set ): return; // Current key set but new is blank, deactivating old. case ( ! $new_key_set && $old_key_set ): $deactivate_result = Licensing_Core::deactivate_license( $old_key ); $changed = true; break; // Current key is blank but new is not, activating new. case ( $new_key_set && ! $old_key_set ): $activate_result = Licensing_Core::activate_license( $new_key, W3TC_VERSION ); $changed = true; if ( $activate_result ) { $config->set( 'common.track_usage', true ); } break; // Current key is set and new different key provided. Deactivating old and activating new. case ( $new_key_set && $old_key_set && $new_key !== $old_key ): $deactivate_result = Licensing_Core::deactivate_license( $old_key ); $activate_result = Licensing_Core::activate_license( $new_key, W3TC_VERSION ); $changed = true; break; } if ( $changed ) { $state = Dispatcher::config_state(); $state->set( 'license.next_check', 0 ); // If license key was removed, immediately clear the status. if ( ! $new_key_set && $old_key_set ) { $state->set( 'license.status', 'no_key' ); $state->set( 'license.paypal_billing_update_required', false ); // Clear dismissed notices for billing update since license is removed. $this->clear_dismissed_notice_for_all_users( 'paypal-billing-update-required' ); try { $config->set( 'plugin.type', '' ); $config->save(); } catch ( \Exception $ex ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch // missing exception handle? } } // Clear billing URL transient for the new key to force fresh fetch. if ( $new_key_set ) { $new_transient_key = 'w3tc_billing_url_' . md5( $new_key ); delete_transient( $new_transient_key ); } // Process activation result to update paypal_billing_update_required immediately. if ( isset( $activate_result ) && $activate_result ) { // Update license status from activation result. if ( isset( $activate_result->license_status ) ) { $state->set( 'license.status', $activate_result->license_status ); } // Update paypal_billing_update_required if present in activation result. if ( isset( $activate_result->paypal_billing_update_required ) ) { $paypal_billing_update_required = filter_var( $activate_result->paypal_billing_update_required, FILTER_VALIDATE_BOOLEAN ); $state->set( 'license.paypal_billing_update_required', $paypal_billing_update_required ); } } $state->save(); delete_transient( 'w3tc_imageservice_limited' ); $messages = array(); // If the old key was deactivated, add a message. if ( isset( $deactivate_result ) && ! empty( $deactivate_result->license_status ) ) { $status = $deactivate_result->license_status; switch ( true ) { case ( strpos( $status, 'inactive.expired.' ) === 0 ): $messages[] = array( 'message' => sprintf( // Translators: 1 Product name. __( 'Your previous %1$s Pro license key is expired and will remain registered to this domain.', 'w3-total-cache' ), W3TC_POWERED_BY ), 'type' => 'error', ); break; case ( strpos( $status, 'inactive.not_present' ) === 0 ): $messages[] = array( 'message' => sprintf( // Translators: 1 Product name. __( 'Your previous %1$s Pro license key was not found and cannot be deactivated.', 'w3-total-cache' ), W3TC_POWERED_BY ), 'type' => 'info', ); break; case ( strpos( $status, 'inactive' ) === 0 ): $messages[] = array( 'message' => sprintf( // Translators: 1 Product name. __( 'Your previous %1$s Pro license key has been deactivated.', 'w3-total-cache' ), W3TC_POWERED_BY ), 'type' => 'info', ); break; case ( strpos( $status, 'invalid' ) === 0 ): $messages[] = array( 'message' => sprintf( // translators: 1 Product name, 2 HTML anchor open tag, 3 HTML anchor close tag. __( 'Your previous %1$s Pro license key is invalid and cannot be deactivated. Please %2$scontact support%3$s for assistance.', 'w3-total-cache' ), W3TC_POWERED_BY, '<a href="' . esc_url( Util_Ui::admin_url( 'admin.php?page=w3tc_support' ) ) . '">', '</a>' ), 'type' => 'error', ); break; } } // Handle new activation status. if ( isset( $activate_result ) ) { $status = $activate_result->license_status; switch ( true ) { case ( strpos( $status, 'active' ) === 0 ): $messages[] = array( 'message' => sprintf( // Translators: 1 Product name. __( 'The %1$s Pro license key you provided is valid and has been applied.', 'w3-total-cache' ), W3TC_POWERED_BY ), 'type' => 'info', ); break; } } // Store messages for processing. update_option( 'license_update_messages', $messages ); // Only force license check if we didn't just activate a license. // If we activated, we already have the status from the activation result. if ( $new_key_set && ( ! isset( $activate_result ) || ! $activate_result ) ) { // Force immediate license check to get latest status including billing requirements. $this->maybe_update_license_status(); } } } /** * Initializes admin-specific features and hooks. * * Adds admin notices, UI filters, and license status checks. * * @return void */ public function admin_init() { $capability = apply_filters( 'w3tc_capability_admin_notices', 'manage_options' ); $this->maybe_update_license_status(); if ( current_user_can( $capability ) ) { if ( is_admin() ) { /** * Only admin can see W3TC notices and errors */ if ( ! Util_Environment::is_wpmu() ) { add_action( 'admin_notices', array( $this, 'admin_notices' ), 1, 1 ); } add_action( 'network_admin_notices', array( $this, 'admin_notices' ), 1, 1 ); if ( Util_Admin::is_w3tc_admin_page() ) { add_filter( 'w3tc_notes', array( $this, 'w3tc_notes' ) ); } else { // Enqueue lightbox assets on non-W3TC pages if license notices may be shown. $this->maybe_enqueue_lightbox_assets(); } } } } /** * Enqueues lightbox assets if license-related notices may need them. * * This is called on non-W3TC admin pages where the lightbox isn't already loaded. * Only enqueues if there's a license status that would display a notice. * * @since 2.9.1 * * @return void */ private function maybe_enqueue_lightbox_assets() { $state = Dispatcher::config_state(); $license_status = $state->get_string( 'license.status' ); $license_key = $this->get_license_key(); // Check if we have a license notice to display. $license_message = $this->get_license_notice( $license_status, $license_key ); if ( $license_message ) { $sanitized_status = $this->sanitize_status_for_id( $license_status ); // Only enqueue if the notice isn't dismissed. if ( ! $this->is_notice_dismissed( 'license-status-' . $sanitized_status ) ) { add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_lightbox_assets' ) ); } } } /** * Enqueues lightbox JavaScript and CSS assets. * * @since 2.9.1 * * @return void */ public function enqueue_lightbox_assets() { wp_enqueue_script( 'w3tc-lightbox', plugins_url( 'pub/js/lightbox.js', W3TC_FILE ), array( 'jquery' ), W3TC_VERSION, false ); wp_enqueue_style( 'w3tc-lightbox', plugins_url( 'pub/css/lightbox.css', W3TC_FILE ), array(), W3TC_VERSION ); } /** * Checks if a status starts with a specific prefix. * * @param string $s The status string. * @param string $starts_with The prefix to check against. * * @return bool True if the status starts with the prefix, false otherwise. */ private function _status_is( $s, $starts_with ) { $s .= '.'; $starts_with .= '.'; return substr( $s, 0, strlen( $starts_with ) ) === $starts_with; } /** * Sanitizes a license status string for use in HTML IDs. * * Ensures the status only contains valid characters for HTML IDs * (lowercase letters, numbers, hyphens, underscores) and replaces * dots with hyphens for readability. * * @since 2.9.1 * * @param string $status The license status to sanitize. * * @return string The sanitized status safe for use in HTML IDs. */ private function sanitize_status_for_id( $status ) { // Replace dots with hyphens for readability (e.g., "active.dunning" -> "active-dunning"). $status = str_replace( '.', '-', $status ); // Use WordPress sanitize_html_class which only allows a-z, A-Z, 0-9, _, -. return sanitize_html_class( $status, 'unknown' ); } /** * Displays admin notices related to licensing. * * @return void */ public function admin_notices() { $state = Dispatcher::config_state(); $license_status = $state->get_string( 'license.status' ); $license_key = $this->get_license_key(); $has_notices = false; $paypal_billing_update_required = $state->get_boolean( 'license.paypal_billing_update_required' ); $is_dismissed = $this->is_notice_dismissed( 'paypal-billing-update-required' ); // Check for PayPal billing update requirement (shows on all admin pages). // Only show if there's a license key and the status is not 'no_key'. if ( $paypal_billing_update_required && ! $is_dismissed && ! empty( $license_key ) && 'no_key' !== $license_status ) { $billing_url = $this->get_billing_url( $license_key ); if ( $billing_url ) { $billing_message = sprintf( // Translators: 1 Product name, 2 opening HTML a tag to billing portal, 3 closing HTML a tag, 4 opening HTML a tag for recheck, 5 closing HTML a tag. __( 'Your %1$s Pro subscription requires a PayPal billing agreement update. Please %2$sUpdate your billing agreement%3$s to ensure uninterrupted service. Already updated? %4$sRecheck your license status%5$s or dismiss this notice.', 'w3-total-cache' ), W3TC_POWERED_BY, '<a class="button" href="' . esc_url( $billing_url ) . '" target="_blank" rel="noopener noreferrer">', '</a>', '<a class="button w3tc-recheck-license" href="#">', '</a>' ); } else { $billing_message = sprintf( // Translators: 1 Product name, 2 opening HTML a tag for recheck, 3 closing HTML a tag. __( 'Your %1$s Pro subscription requires a PayPal billing agreement update. Please contact support to ensure uninterrupted service. Already updated? %2$sRecheck your license status%3$s or dismiss this notice.', 'w3-total-cache' ), W3TC_POWERED_BY, '<a class="button w3tc-recheck-license" href="#">', '</a>' ); } Util_Ui::error_box( '<p>' . $billing_message . '</p>', 'w3tc-paypal-billing-update-required', true ); $has_notices = true; } $license_message = $this->get_license_notice( $license_status, $license_key ); if ( $license_message ) { // Sanitize status for use in HTML ID (only allows a-z, 0-9, -, _). $sanitized_status = $this->sanitize_status_for_id( $license_status ); if ( ! $this->is_notice_dismissed( 'license-status-' . $sanitized_status ) ) { Util_Ui::error_box( '<p>' . $license_message . '</p>', 'w3tc-license-status-' . $sanitized_status, true ); $has_notices = true; } } $license_update_messages = get_option( 'license_update_messages' ); if ( $license_update_messages ) { foreach ( $license_update_messages as $message_data ) { if ( 'error' === $message_data['type'] ) { Util_Ui::error_box( '<p>' . $message_data['message'] . '</p>', 'w3tc-license-update-message', true ); } elseif ( 'info' === $message_data['type'] ) { Util_Ui::e_notification_box( '<p>' . $message_data['message'] . '</p>', 'w3tc-license-update-message', true ); } } delete_option( 'license_update_messages' ); $has_notices = true; } // Enqueue dismissal script if there are notices. if ( $has_notices ) { wp_enqueue_script( 'w3tc-license-notice-dismiss' ); } } /** * Registers the license notice dismissal script. * * Called on admin_enqueue_scripts to register the script early, * which can then be enqueued later when notices are displayed. * * @since 2.9.1 * * @return void */ public function register_notice_scripts() { wp_register_script( 'w3tc-license-notice-dismiss', false, // No external file, inline script only. array( 'jquery' ), W3TC_VERSION, true // Load in footer. ); // Add the inline script. $nonce = wp_create_nonce( 'w3tc' ); $rechecking_text = __( 'Rechecking...', 'w3-total-cache' ); $script = " jQuery(function($) { // Use event delegation with a namespace to prevent duplicate handlers. $(document).off('click.w3tcLicenseNotice').on('click.w3tcLicenseNotice', '.notice.is-dismissible[id^=\"w3tc-\"] .notice-dismiss', function() { var \$notice = $(this).closest('.notice'); var noticeId = \$notice.attr('id'); if (noticeId && noticeId.indexOf('w3tc-') === 0) { // Remove the 'w3tc-' prefix for storage. var cleanId = noticeId.replace('w3tc-', ''); $.post(ajaxurl, { action: 'w3tc_dismiss_license_notice', notice_id: cleanId, _wpnonce: '" . esc_js( $nonce ) . "' }); } }); // Handle recheck license link. $(document).off('click.w3tcRecheckLicense').on('click.w3tcRecheckLicense', '.w3tc-recheck-license', function(e) { e.preventDefault(); var \$link = $(this); \$link.text('" . esc_js( $rechecking_text ) . "').css('pointer-events', 'none'); $.post(ajaxurl, { action: 'w3tc_recheck_license', _wpnonce: '" . esc_js( $nonce ) . "' }).always(function() { location.reload(); }); }); }); "; wp_add_inline_script( 'w3tc-license-notice-dismiss', $script ); } /** * Generates a license notice based on the provided license status and key. * * @since 2.9.1 * * @param string $status The current status of the license (e.g., 'active', 'expired'). * @param string $license_key The license key associated with the plugin. * * @return string The formatted license notice message. */ private function get_license_notice( $status, $license_key ) { switch ( true ) { case $this->_status_is( $status, 'active.dunning' ): $billing_url = $this->get_billing_url( $license_key ); if ( $billing_url ) { return sprintf( // Translators: 1 Product name, 2 opening HTML a tag to billing portal, 3 closing HTML a tag, 4 opening HTML a tag for recheck, 5 closing HTML a tag. __( 'Your %1$s Pro subscription payment is past due. Please update your %2$sBilling Information%3$s to prevent service interruption. Already updated? %4$sRecheck your license status%5$s.', 'w3-total-cache' ), W3TC_POWERED_BY, '<a class="button" href="' . esc_url( $billing_url ) . '" target="_blank" rel="noopener noreferrer">', '</a>', '<a class="button w3tc-recheck-license" href="#">', '</a>' ); } return sprintf( // Translators: 1 Product name, 2 opening HTML a tag for recheck, 3 closing HTML a tag. __( 'Your %1$s Pro subscription payment is past due. Please update your billing information or contact us to prevent service interruption. Already updated? %2$sRecheck your license status%3$s.', 'w3-total-cache' ), W3TC_POWERED_BY, '<a class="button w3tc-recheck-license" href="#">', '</a>' ); case $this->_status_is( $status, 'inactive.expired' ): return sprintf( // Translators: 1 Product name, 2 HTML input to renew subscription. __( 'Your %1$s Pro license key has expired. %2$s to continue using the Pro features', 'w3-total-cache' ), W3TC_POWERED_BY, '<input type="button" class="button button-renew-plugin" data-nonce="' . wp_create_nonce( 'w3tc' ) . '" data-renew-key="' . esc_attr( $license_key ) . '" data-src="licensing_expired" value="' . esc_attr__( 'Renew Now', 'w3-total-cache' ) . '" />' ); case $this->_status_is( $status, 'inactive.by_rooturi' ) || $this->_status_is( $status, 'inactive.by_rooturi.activations_limit_not_reached' ): // Only show this notice if there's actually a license key. if ( empty( $license_key ) ) { return ''; } $reset_url = Util_Ui::url( array( 'page' => 'w3tc_general', 'w3tc_licensing_reset_rooturi' => 'y', ) ); return sprintf( // Translators: 1 Product name, 2 opening HTML a tag to reset license URIs, 3 closing HTML a tag. __( 'Your %1$s license key is not active for this site. You can switch your license to this website following %2$sthis link%3$s', 'w3-total-cache' ), W3TC_POWERED_BY, '<a class="w3tc_licensing_reset_rooturi" href="' . esc_url( $reset_url ) . '">', '</a>' ); case $this->_status_is( $status, 'inactive.by_rooturi.activations_limit_reached' ): return sprintf( // Translators: 1 Product name. __( 'Your %1$s license key is not active and cannot be activated due to the license activation limit being reached.', 'w3-total-cache' ), W3TC_POWERED_BY ); case $this->_status_is( $status, 'inactive' ): return sprintf( // Translators: 1 Product name. __( 'The %1$s license key is not active.', 'w3-total-cache' ), W3TC_POWERED_BY ); case $this->_status_is( $status, 'invalid' ): $url = is_network_admin() ? network_admin_url( 'admin.php?page=w3tc_general#licensing' ) : admin_url( 'admin.php?page=w3tc_general#licensing' ); return sprintf( // Translators: 1 Product name, 2 opening HTML a tag to license setting, 3 closing HTML a tag. __( 'Your current %1$s Pro license key is not valid. %2$sPlease confirm it%3$s.', 'w3-total-cache' ), W3TC_POWERED_BY, '<a href="' . esc_url( $url ) . '">', '</a>' ); case ( 'no_key' === $status || $this->_status_is( $status, 'active' ) || $this->_status_is( $status, 'free' ) ): return ''; default: return sprintf( // translators: 1: Product name, 2: HTML anchor open tag, 3: HTML anchor close tag. __( 'The %1$s license key cannot be verified. Please %2$scontact support%3$s for assistance.', 'w3-total-cache' ), W3TC_POWERED_BY, '<a href="' . esc_url( Util_Ui::admin_url( 'admin.php?page=w3tc_support' ) ) . '">', '</a>' ); } } /** * Generates the billing URL for a given license key. * * Uses transient caching to avoid making HTTP requests on every page load. * The URL is cached for 1 hour to balance freshness with performance. * * @since 2.9.1 * * @param string $license_key The license key used to generate the billing URL. * * @return string The billing URL associated with the provided license key, or * an empty string if the request fails or the response is invalid. */ private function get_billing_url( $license_key ) { if ( empty( $license_key ) ) { return ''; } // Generate a unique transient key based on the license key. $transient_key = 'w3tc_billing_url_' . md5( $license_key ); // Check for cached URL. $cached_url = get_transient( $transient_key ); if ( false !== $cached_url ) { // Return cached value (empty string is a valid cached "no URL" result). return $cached_url; } $billing_url = $this->fetch_billing_url_from_api( $license_key ); // Cache the result (including empty string for failed requests to avoid repeated failures). set_transient( $transient_key, $billing_url, self::BILLING_URL_CACHE_DURATION ); return $billing_url; } /** * Fetches the billing URL from the API. * * @since 2.9.1 * * @param string $license_key The license key used to generate the billing URL. * * @return string The billing URL or empty string on failure. */ private function fetch_billing_url_from_api( $license_key ) { $api_params = array( 'edd_action' => 'get_recurly_hlt_link', 'license' => $license_key, 'license_key' => $license_key, ); $response = wp_remote_get( add_query_arg( $api_params, W3TC_LICENSE_API_URL ), array( 'timeout' => 15, 'sslverify' => true, ) ); if ( is_wp_error( $response ) ) { return ''; } $response_code = wp_remote_retrieve_response_code( $response ); if ( 200 !== $response_code ) { return ''; } $body = wp_remote_retrieve_body( $response ); return filter_var( $body, FILTER_VALIDATE_URL ) ? esc_url_raw( $body ) : ''; } /** * Modifies the notes displayed in the W3TC UI. * * @param array $notes Existing notes to display. * * @return array Modified notes with licensing terms. */ public function w3tc_notes( $notes ) { $terms = ''; $state_master = Dispatcher::config_state_master(); if ( Util_Environment::is_pro_constant( $this->_config ) ) { $terms = 'accept'; } elseif ( ! Util_Environment::is_w3tc_pro( $this->_config ) ) { $terms = $state_master->get_string( 'license.community_terms' ); $buttons = sprintf( '<br /><br />%s %s', Util_Ui::button_link( __( 'Accept', 'w3-total-cache' ), Util_Ui::url( array( 'w3tc_licensing_terms_accept' => 'y' ) ) ), Util_Ui::button_link( __( 'Decline', 'w3-total-cache' ), Util_Ui::url( array( 'w3tc_licensing_terms_decline' => 'y' ) ) ) ); } else { $state = Dispatcher::config_state(); $terms = $state->get_string( 'license.terms' ); $return_url = self_admin_url( Util_Ui::url( array( 'w3tc_licensing_terms_refresh' => 'y' ) ) ); $buttons = sprintf( '<form method="post" action="%s">', W3TC_TERMS_ACCEPT_URL ) . Util_Ui::r_hidden( 'return_url', 'return_url', $return_url ) . Util_Ui::r_hidden( 'license_key', 'license_key', $this->get_license_key() ) . Util_Ui::r_hidden( 'home_url', 'home_url', home_url() ) . '<input type="submit" class="button" name="answer" value="Accept" /> ' . '<input type="submit" class="button" name="answer" value="Decline" />' . '</form>'; } if ( 'accept' !== $terms && 'decline' !== $terms && 'postpone' !== $terms ) { if ( $state_master->get_integer( 'common.install' ) < 1542029724 ) { /* installed before 2018-11-12 */ $notes['licensing_terms'] = sprintf( // translators: 1 opening HTML a tag to W3TC Terms page, 2 closing HTML a tag. esc_html__( 'Our terms of use and privacy policies have been updated. Please %1$sreview%2$s and accept them.', 'w3-total-cache' ), '<a target="_blank" href="' . esc_url( W3TC_TERMS_URL ) . '">', '</a>' ) . $buttons; } else { $notes['licensing_terms'] = sprintf( // translators: 1: Product name, 2: HTML break tag, 3: Anchor/link open tag, 4: Anchor/link close tag. esc_html__( 'By allowing us to collect data about how %1$s is used, we can improve our features and experience for everyone. This data will not include any personally identifiable information.%2$sFeel free to review our %3$sterms of use and privacy policy%4$s.', 'w3-total-cache' ), W3TC_POWERED_BY, '<br />', '<a target="_blank" href="' . esc_url( W3TC_TERMS_URL ) . '">', '</a>' ) . $buttons; } } return $notes; } /** * Updates the license status if needed. * * Performs a license check and updates the configuration state accordingly. * * @return string The updated license status. */ private function maybe_update_license_status() { $state = Dispatcher::config_state(); if ( time() < $state->get_integer( 'license.next_check' ) ) { return; } $check_timeout = 3600 * 24 * 5; $status = ''; $terms = ''; $paypal_billing_update_required = false; $license_key = $this->get_license_key(); $old_plugin_type = $this->_config->get_string( 'plugin.type' ); $old_status = $state->get_string( 'license.status' ); $old_paypal_billing_update_required = $state->get_boolean( 'license.paypal_billing_update_required' ); $plugin_type = ''; if ( ! empty( $license_key ) || defined( 'W3TC_LICENSE_CHECK' ) ) { $license = Licensing_Core::check_license( $license_key, W3TC_VERSION ); if ( $license ) { $status = $license->license_status; $terms = $license->license_terms; if ( $this->_status_is( $status, 'active' ) ) { $plugin_type = 'pro'; } elseif ( $this->_status_is( $status, 'inactive.by_rooturi' ) && Util_Environment::is_w3tc_pro_dev() ) { $status = 'valid'; $plugin_type = 'pro_dev'; } // Check for PayPal billing update requirement. if ( isset( $license->paypal_billing_update_required ) ) { $paypal_billing_update_required = filter_var( $license->paypal_billing_update_required, FILTER_VALIDATE_BOOLEAN ); } } $this->_config->set( 'plugin.type', $plugin_type ); } else { $status = 'no_key'; } if ( 'no_key' === $status ) { // Do nothing. } elseif ( $this->_status_is( $status, 'invalid' ) ) { // Do nothing. } elseif ( $this->_status_is( $status, 'inactive' ) ) { // Do nothing. } elseif ( $this->_status_is( $status, 'active' ) ) { // Do nothing. } else { $check_timeout = 60; } // Clear dismissed notices when conditions change. if ( $old_paypal_billing_update_required && ! $paypal_billing_update_required ) { // PayPal billing update is no longer required, clear the dismissal for all users. $this->clear_dismissed_notice_for_all_users( 'paypal-billing-update-required' ); } if ( $old_status !== $status && ! empty( $old_status ) && ! empty( $status ) ) { // License status changed, clear the old status dismissal for all users. $this->clear_dismissed_notice_for_all_users( 'license-status-' . $this->sanitize_status_for_id( $old_status ) ); } $state->set( 'license.status', $status ); $state->set( 'license.next_check', time() + $check_timeout ); $state->set( 'license.terms', $terms ); $state->set( 'license.paypal_billing_update_required', $paypal_billing_update_required ); $state->save(); if ( $old_plugin_type !== $plugin_type ) { try { $this->_config->set( 'plugin.type', $plugin_type ); $this->_config->save(); } catch ( \Exception $ex ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch // missing exception handle? } } return $status; } /** * Retrieves the license key for the plugin. * * @return string The license key. */ public function get_license_key() { $license_key = $this->_config->get_string( 'plugin.license_key', '' ); if ( '' === $license_key ) { $license_key = ini_get( 'w3tc.license_key' ); } return $license_key; } /** * AJAX handler for dismissing license notices. * * Saves the dismissal timestamp in usermeta for persistent per-user dismissal. * * @since 2.9.1 * * @return void */ public function ajax_dismiss_license_notice() { check_ajax_referer( 'w3tc', '_wpnonce' ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( array( 'message' => 'Unauthorized' ) ); } $notice_id = isset( $_POST['notice_id'] ) ? sanitize_key( $_POST['notice_id'] ) : ''; if ( empty( $notice_id ) ) { wp_send_json_error( array( 'message' => 'Invalid notice ID' ) ); } $user_id = get_current_user_id(); $dismissed_notices = get_user_meta( $user_id, self::NOTICE_DISMISSED_META_KEY, true ); if ( ! is_array( $dismissed_notices ) ) { $dismissed_notices = array(); } $dismissed_notices[ $notice_id ] = time(); update_user_meta( $user_id, self::NOTICE_DISMISSED_META_KEY, $dismissed_notices ); wp_send_json_success( array( 'message' => 'Notice dismissed' ) ); } /** * AJAX handler for rechecking license status. * * Forces an immediate license check and clears cached billing URL. * * @since 2.9.1 * * @return void */ public function ajax_recheck_license() { check_ajax_referer( 'w3tc', '_wpnonce' ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( array( 'message' => 'Unauthorized' ) ); } // Force next check to happen immediately. $state = Dispatcher::config_state(); $state->set( 'license.next_check', 0 ); $state->save(); // Clear cached billing URL so a fresh one is fetched. $license_key = $this->get_license_key(); $transient_key = 'w3tc_billing_url_' . md5( $license_key ); delete_transient( $transient_key ); // Perform the license check now. $this->maybe_update_license_status(); wp_send_json_success( array( 'message' => 'License status rechecked' ) ); } /** * Checks if a specific license notice has been dismissed by the current user. * * Returns true if the notice was dismissed and the reset time has not elapsed. * If the reset time has elapsed and the condition still persists, the dismissal * is cleared and the notice will show again. * * @since 2.9.1 * * @param string $notice_id The unique identifier for the notice. * * @return bool True if the notice is dismissed and should not be shown. */ private function is_notice_dismissed( $notice_id ) { $user_id = get_current_user_id(); $dismissed_notices = get_user_meta( $user_id, self::NOTICE_DISMISSED_META_KEY, true ); if ( ! is_array( $dismissed_notices ) || ! isset( $dismissed_notices[ $notice_id ] ) ) { return false; } $dismissed_time = (int) $dismissed_notices[ $notice_id ]; $time_elapsed = time() - $dismissed_time; // If enough time has passed, clear the dismissal so the notice can show again. if ( $time_elapsed > self::NOTICE_DISMISSAL_RESET_TIME ) { unset( $dismissed_notices[ $notice_id ] ); update_user_meta( $user_id, self::NOTICE_DISMISSED_META_KEY, $dismissed_notices ); return false; } return true; } /** * Clears a specific dismissed notice for all users. * * This should be called when the condition that triggered the notice is resolved. * Uses a targeted query to only retrieve users who have the specific notice dismissed, * rather than all users with any dismissed notices. * * @since 2.9.1 * * @param string $notice_id The unique identifier for the notice to clear. * * @return void */ private function clear_dismissed_notice_for_all_users( $notice_id ) { global $wpdb; /* * Two-step approach for performance: * 1. Use LIKE query to narrow down candidate users (faster than loading all users). * Search for '"notice_id"' (with quotes) to match serialized array key format * and reduce false positives from partial matches. * 2. Validate with isset() to confirm exact key match, handling any edge cases. */ // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $user_ids = $wpdb->get_col( $wpdb->prepare( "SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key = %s AND meta_value LIKE %s", self::NOTICE_DISMISSED_META_KEY, '%"' . $wpdb->esc_like( $notice_id ) . '"%' ) ); foreach ( $user_ids as $user_id ) { $dismissed_notices = get_user_meta( $user_id, self::NOTICE_DISMISSED_META_KEY, true ); // Verify exact key match to handle any edge cases from LIKE query. if ( is_array( $dismissed_notices ) && isset( $dismissed_notices[ $notice_id ] ) ) { unset( $dismissed_notices[ $notice_id ] ); if ( empty( $dismissed_notices ) ) { delete_user_meta( $user_id, self::NOTICE_DISMISSED_META_KEY ); } else { update_user_meta( $user_id, self::NOTICE_DISMISSED_META_KEY, $dismissed_notices ); } } } } }
Upload File
Create Folder