X7ROOT File Manager
Current Path:
/home/mysptejz/public_html/web-hosting/wp-content/plugins/w3-total-cache
home
/
mysptejz
/
public_html
/
web-hosting
/
wp-content
/
plugins
/
w3-total-cache
/
ðŸ“
..
📄
Base_Page_Settings.php
(6.82 KB)
📄
BrowserCache_ConfigLabels.php
(10.36 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
(22.25 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.11 KB)
📄
BrowserCache_Plugin_Admin.php
(1.33 KB)
📄
Cache.php
(4.52 KB)
📄
CacheFlush.php
(7.88 KB)
📄
CacheFlush_Locally.php
(12.6 KB)
📄
CacheGroups_Plugin_Admin.php
(7.98 KB)
📄
CacheGroups_Plugin_Admin_View.js
(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.25 KB)
📄
Cache_File_Cleaner.php
(2.69 KB)
📄
Cache_File_Cleaner_Generic.php
(4.05 KB)
📄
Cache_File_Cleaner_Generic_HardDelete.php
(1.05 KB)
📄
Cache_File_Generic.php
(12.54 KB)
📄
Cache_Memcache.php
(14.32 KB)
📄
Cache_Memcached.php
(18.13 KB)
📄
Cache_Memcached_Stats.php
(3.52 KB)
📄
Cache_Nginx_Memcached.php
(13.55 KB)
📄
Cache_Redis.php
(13.31 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.81 KB)
📄
Cdn_AdminNotes.php
(13.71 KB)
📄
Cdn_BunnyCdn_Api.php
(15.67 KB)
📄
Cdn_BunnyCdn_Page.php
(7.4 KB)
📄
Cdn_BunnyCdn_Page_View.js
(13.14 KB)
📄
Cdn_BunnyCdn_Page_View.php
(3.6 KB)
📄
Cdn_BunnyCdn_Page_View_Purge_Urls.php
(2.06 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
(5.43 KB)
📄
Cdn_Core.php
(32.83 KB)
📄
Cdn_Core_Admin.php
(27.08 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
(6.25 KB)
📄
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.77 KB)
📄
Cdn_Plugin_Admin.php
(7.3 KB)
📄
Cdn_RackSpaceCdn_AdminActions.php
(1.28 KB)
📄
Cdn_RackSpaceCdn_Page.php
(2.05 KB)
📄
Cdn_RackSpaceCdn_Page_View.js
(10.06 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
(6.44 KB)
📄
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.37 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
(9.7 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
(8.51 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.36 KB)
📄
Cdnfsd_TransparentCDN_Page_View.js
(7.13 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.92 KB)
📄
ConfigSettingsTabs.php
(1.18 KB)
📄
ConfigSettingsTabsKeys.php
(19.62 KB)
📄
ConfigState.php
(6.08 KB)
📄
ConfigStateNote.php
(1.94 KB)
📄
ConfigUtil.php
(3.45 KB)
📄
DbCache_ConfigLabels.php
(1.22 KB)
📄
DbCache_Core.php
(2.05 KB)
📄
DbCache_Environment.php
(6.41 KB)
📄
DbCache_Page.php
(1.1 KB)
📄
DbCache_Plugin.php
(9.62 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.05 KB)
📄
DbCache_WpdbLegacy.php
(22.42 KB)
📄
DbCache_WpdbNew.php
(22.24 KB)
📄
Dispatcher.php
(8.21 KB)
📄
Enterprise_CacheFlush_MakeSnsEvent.php
(7.47 KB)
📄
Enterprise_Dbcache_WpdbInjection_Cluster.php
(30.32 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
(13.04 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.1 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
(6.93 KB)
📄
Extension_CloudFlare_Page_View.php
(27.38 KB)
📄
Extension_CloudFlare_Plugin.php
(15.19 KB)
📄
Extension_CloudFlare_Plugin_Admin.php
(14.13 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
(6.49 KB)
📄
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.47 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
(8.91 KB)
📄
Extension_FragmentCache_WpObjectCache.php
(16.92 KB)
📄
Extension_Genesis_Page.php
(409 B)
📄
Extension_Genesis_Page_View.php
(11.11 KB)
📄
Extension_Genesis_Plugin.php
(14.46 KB)
📄
Extension_Genesis_Plugin_Admin.php
(5.45 KB)
📄
Extension_ImageService_Api.php
(11.99 KB)
📄
Extension_ImageService_Cron.php
(6.49 KB)
📄
Extension_ImageService_Environment.php
(4.6 KB)
📄
Extension_ImageService_Page_View.php
(8.41 KB)
📄
Extension_ImageService_Plugin.php
(1.44 KB)
📄
Extension_ImageService_Plugin_Admin.css
(2.34 KB)
📄
Extension_ImageService_Plugin_Admin.js
(23.15 KB)
📄
Extension_ImageService_Plugin_Admin.php
(42.7 KB)
📄
Extension_ImageService_Widget.js
(11.95 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.03 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.87 KB)
📄
Extension_NewRelic_Plugin.php
(7.09 KB)
📄
Extension_NewRelic_Plugin_Admin.php
(8.08 KB)
📄
Extension_NewRelic_Popup.php
(3.96 KB)
📄
Extension_NewRelic_Popup_View.js
(7.5 KB)
📄
Extension_NewRelic_Popup_View_Intro.php
(1.37 KB)
📄
Extension_NewRelic_Popup_View_ListApplications.php
(1.93 KB)
📄
Extension_NewRelic_Service.php
(21.65 KB)
📄
Extension_NewRelic_Widget.php
(10.48 KB)
📄
Extension_NewRelic_Widget_View.css
(1.37 KB)
📄
Extension_NewRelic_Widget_View.js
(8.2 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.66 KB)
📄
Extensions_Util.php
(4.43 KB)
📄
FeatureShowcase_Plugin_Admin.php
(29.1 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
(10.57 KB)
📄
Generic_AdminActions_Test.php
(6.15 KB)
📄
Generic_AdminNotes.php
(13.88 KB)
📄
Generic_ConfigLabels.php
(2.33 KB)
📄
Generic_Environment.php
(6.67 KB)
📄
Generic_Faq.php
(2.27 KB)
📄
Generic_GeneralPage_View_ShowEdge.js
(6.08 KB)
📄
Generic_Page_About.php
(503 B)
📄
Generic_Page_Dashboard.php
(1.66 KB)
📄
Generic_Page_Dashboard_View.css
(6.34 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
(23.04 KB)
📄
Generic_Plugin_Admin.php
(48.87 KB)
📄
Generic_Plugin_AdminCompatibility.php
(3.98 KB)
📄
Generic_Plugin_AdminNotices.css
(188 B)
📄
Generic_Plugin_AdminNotices.js
(7.43 KB)
📄
Generic_Plugin_AdminNotices.php
(12.12 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
(6.39 KB)
📄
Generic_WidgetBoldGrid_View.php
(872 B)
📄
Generic_WidgetPartners.php
(1.08 KB)
📄
Generic_WidgetPartners_View.php
(1.66 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
(6.64 KB)
📄
Generic_WidgetSpreadTheWord_Plugin.php
(2.03 KB)
📄
Generic_WidgetSpreadTheWord_View.php
(579 B)
📄
Generic_WidgetStats.js
(9.08 KB)
📄
Generic_WidgetStats.php
(4.84 KB)
📄
LICENSE
(17.67 KB)
📄
Licensing_AdminActions.php
(4.22 KB)
📄
Licensing_Core.php
(6.28 KB)
📄
Licensing_Plugin_Admin.php
(16.65 KB)
📄
Minify_AutoCss.php
(8.83 KB)
📄
Minify_AutoJs.php
(9.68 KB)
📄
Minify_ConfigLabels.php
(8.66 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
(6.9 KB)
📄
Minify_GeneralPage_View_ShowHelpForce.js
(5.83 KB)
📄
Minify_HelpPopup_View.php
(5.01 KB)
📄
Minify_MinifiedFileRequestHandler.php
(32.87 KB)
📄
Minify_Page.php
(18.45 KB)
📄
Minify_Plugin.php
(41.75 KB)
📄
Minify_Plugin_Admin.php
(11.97 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.25 KB)
📄
ObjectCache_DiskPopup.js
(8.18 KB)
📄
ObjectCache_DiskPopup_View.php
(1.77 KB)
📄
ObjectCache_Environment.php
(6.79 KB)
📄
ObjectCache_Page.php
(560 B)
📄
ObjectCache_Page_View_PurgeLog.php
(1.01 KB)
📄
ObjectCache_Plugin.php
(6.54 KB)
📄
ObjectCache_Plugin_Admin.php
(6.97 KB)
📄
ObjectCache_WpObjectCache.php
(10.17 KB)
📄
ObjectCache_WpObjectCache_Regular.php
(34.11 KB)
📄
PageSpeed_Api.php
(12.16 KB)
📄
PageSpeed_Data.php
(37.19 KB)
📄
PageSpeed_Instructions.php
(43.29 KB)
📄
PageSpeed_Page.php
(8.76 KB)
📄
PageSpeed_Page_View.css
(6.21 KB)
📄
PageSpeed_Page_View.js
(15.26 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
(7.86 KB)
📄
PageSpeed_Widget_View.php
(1.09 KB)
📄
PageSpeed_Widget_View_FromApi.php
(3.71 KB)
📄
PgCache_ConfigLabels.php
(5.82 KB)
📄
PgCache_ContentGrabber.php
(70.95 KB)
📄
PgCache_Environment.php
(51.72 KB)
📄
PgCache_Flush.php
(16.32 KB)
📄
PgCache_Page.php
(1.6 KB)
📄
PgCache_Page_View.js
(6.32 KB)
📄
PgCache_Plugin.php
(14.22 KB)
📄
PgCache_Plugin_Admin.php
(14.49 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
(48.8 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.3 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
(1.68 KB)
📄
UsageStatistics_Page_View.js
(23.2 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
(6.14 KB)
📄
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.18 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.18 KB)
📄
UserExperience_Remove_CssJs_Extension.php
(6.79 KB)
📄
UserExperience_Remove_CssJs_Mutator.php
(4.45 KB)
📄
UserExperience_Remove_CssJs_Page_View.js
(15.98 KB)
📄
UserExperience_Remove_CssJs_Page_View.php
(14.59 KB)
📄
Util_Activation.php
(9.89 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
(42.46 KB)
📄
Util_Environment_Exception.php
(719 B)
📄
Util_Environment_Exceptions.php
(1.42 KB)
📄
Util_File.php
(13.11 KB)
📄
Util_Http.php
(5.87 KB)
📄
Util_Installed.php
(4.24 KB)
📄
Util_Mime.php
(2.9 KB)
📄
Util_PageSpeed.php
(33.92 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.11 KB)
📄
Util_UsageStatistics.php
(13.6 KB)
📄
Util_Widget.php
(7.88 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.57 KB)
📄
Varnish_Plugin.php
(3.2 KB)
ðŸ“
extension-example
ðŸ“
inc
📄
index.html
(0 B)
ðŸ“
ini
ðŸ“
languages
ðŸ“
lib
📄
press.txt
(45.78 KB)
ðŸ“
pub
📄
readme.txt
(76.49 KB)
ðŸ“
vendor
📄
w3-total-cache-api.php
(22.29 KB)
📄
w3-total-cache-old-php.php
(1.25 KB)
📄
w3-total-cache.php
(2.83 KB)
ðŸ“
wp-content
Editing: Minify_Plugin.php
<?php /** * File: Minify_Plugin.php * * @package W3TC */ namespace W3TC; /** * Class Minify_Plugin * * phpcs:disable PSR2.Classes.PropertyDeclaration.Underscore * phpcs:disable PSR2.Methods.MethodDeclaration.Underscore * phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter */ class Minify_Plugin { /** * Minify reject reason * * @var string */ public $minify_reject_reason = ''; /** * Error * * @var string */ public $error = ''; /** * Array of replaced styles * * @var array */ public $replaced_styles = array(); /** * Array of replaced scripts * * @var array */ public $replaced_scripts = array(); /** * Array of printed scripts. * * @var array */ public $printed_scripts = array(); /** * Array of printed styles. * * @var array */ public $printed_styles = array(); /** * Helper object to use * * @var _W3_MinifyHelpers */ private $minify_helpers; /** * Config. * * @var Config Configuration. */ private $_config = null; /** * Constructor for the Minify_Plugin class. * * @return void */ public function __construct() { $this->_config = Dispatcher::config(); } /** * Initializes the plugin by registering filters and actions. * * @return void */ public function run() { add_action( 'init', array( $this, 'init' ) ); add_filter( 'cron_schedules', array( $this, 'cron_schedules' ) ); // phpcs:ignore WordPress.WP.CronInterval.ChangeDetected add_action( 'w3tc_minifycache_purge_wpcron', array( $this, 'w3tc_minifycache_purge_wpcron' ) ); add_filter( 'w3tc_admin_bar_menu', array( $this, 'w3tc_admin_bar_menu' ) ); add_filter( 'w3tc_footer_comment', array( $this, 'w3tc_footer_comment' ) ); if ( 'file' === $this->_config->get_string( 'minify.engine' ) ) { add_action( 'w3_minify_cleanup', array( $this, 'cleanup' ) ); } add_filter( 'w3tc_pagecache_set_header', array( $this, 'w3tc_pagecache_set_header' ), 20, 2 ); // usage statistics handling. add_action( 'w3tc_usage_statistics_of_request', array( $this, 'w3tc_usage_statistics_of_request' ), 10, 1 ); add_filter( 'w3tc_usage_statistics_metrics', array( $this, 'w3tc_usage_statistics_metrics' ) ); // Start minify. if ( $this->can_minify() ) { Util_Bus::add_ob_callback( 'minify', array( $this, 'ob_callback' ) ); } } /** * Initializes the Minify Plugin during the `init` action. * * @return void */ public function init() { $url = Util_Environment::filename_to_url( W3TC_CACHE_MINIFY_DIR ); $parsed = wp_parse_url( $url ); $prefix = '/' . trim( $parsed['path'], '/' ) . '/'; $request_uri = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : ''; if ( substr( $request_uri, 0, strlen( $prefix ) ) === $prefix ) { $w3_minify = Dispatcher::component( 'Minify_MinifiedFileRequestHandler' ); $filename = Util_Environment::remove_query_all( substr( $request_uri, strlen( $prefix ) ) ); $w3_minify->process( $filename ); exit(); } if ( ! empty( Util_Request::get_string( 'w3tc_minify' ) ) ) { $w3_minify = Dispatcher::component( 'Minify_MinifiedFileRequestHandler' ); $w3_minify->process( Util_Request::get_string( 'w3tc_minify' ) ); exit(); } } /** * Cleans up the minify cache. * * @return void */ public function cleanup() { $a = Dispatcher::component( 'Minify_Plugin_Admin' ); $a->cleanup(); } /** * Adds custom schedules for cron jobs related to minify cache cleanup. * * @param array $schedules The existing cron schedules. * * @return array The updated cron schedules. */ public function cron_schedules( $schedules ) { $c = $this->_config; $minify_enabled = $c->get_boolean( 'minify.enabled' ); $engine = $c->get_string( 'minify.engine' ); if ( $minify_enabled && ( 'file' === $engine || 'file_generic' === $engine ) ) { $interval = $c->get_integer( 'minify.file.gc' ); $schedules['w3_minify_cleanup'] = array( 'interval' => $interval, 'display' => sprintf( // translators: 1 interval in seconds. __( '[W3TC] Minify Cache file GC (every %d seconds)', 'w3-total-cache' ), $interval ), ); } return $schedules; } /** * Purges the minify cache via WP-Cron. * * @since 2.8.0 * * @return void */ public function w3tc_minifycache_purge_wpcron() { $flusher = Dispatcher::component( 'CacheFlush' ); $flusher->minifycache_flush(); } /** * Handles output buffering for minification and optimization. * * @param string $buffer The output buffer content. * * @return string The processed buffer after minification. * * @throws \Exception If an error occurs during the minification process. */ public function ob_callback( $buffer ) { $enable = Util_Content::is_html( $buffer ) && $this->can_minify2( $buffer ); $enable = apply_filters( 'w3tc_minify_enable', $enable ); if ( ! $enable ) { return $buffer; } $this->minify_helpers = new _W3_MinifyHelpers( $this->_config ); // Replace script and style tags. $js_enable = $this->_config->get_boolean( 'minify.js.enable' ); $css_enable = $this->_config->get_boolean( 'minify.css.enable' ); $html_enable = $this->_config->get_boolean( 'minify.html.enable' ); if ( function_exists( 'is_feed' ) && is_feed() ) { $js_enable = false; $css_enable = false; } $js_enable = apply_filters( 'w3tc_minify_js_enable', $js_enable ); $css_enable = apply_filters( 'w3tc_minify_css_enable', $css_enable ); $html_enable = apply_filters( 'w3tc_minify_html_enable', $html_enable ); $head_prepend = ''; $body_prepend = ''; $body_append = ''; $embed_extsrcjs = false; $buffer = apply_filters( 'w3tc_minify_before', $buffer ); // If the minify cache folder is missing minify fails. This will generate the minify folder path if missing. $minify_environment = Dispatcher::component( 'Minify_Environment' ); try { $minify_environment->fix_on_wpadmin_request( $this->_config, true ); } catch ( \Exception $e ) { // phpcs:ignore Generic.CodeAnalysis.EmptyStatement.DetectedCatch // Exception. } if ( $this->_config->get_boolean( 'minify.auto' ) ) { if ( $js_enable ) { $minifier = new Minify_AutoJs( $this->_config, $buffer, $this->minify_helpers ); $buffer = $minifier->execute(); $this->replaced_scripts = $minifier->get_debug_minified_urls(); } if ( $css_enable ) { $minifier = new Minify_AutoCss( $this->_config, $buffer, $this->minify_helpers ); $buffer = $minifier->execute(); } $buffer = apply_filters( 'w3tc_minify_processed', $buffer ); } else { if ( $css_enable ) { $style = $this->get_style_group( 'include' ); if ( $style['body'] ) { if ( $this->_custom_location_does_not_exist( '/<!-- W3TC-include-css -->/', $buffer, $style['body'] ) ) { $head_prepend .= $style['body']; } $this->remove_styles_group( $buffer, 'include' ); } if ( $this->_config->getf_boolean( 'minify.css.http2push' ) ) { $this->minify_helpers->http2_header_add( $style['url'], 'style' ); } } if ( $js_enable ) { $embed_type = $this->_config->get_string( 'minify.js.header.embed_type' ); $http2push = $this->_config->getf_boolean( 'minify.js.http2push' ); $script = $this->get_script_group( 'include', $embed_type ); if ( $script['body'] ) { $embed_extsrcjs = 'extsrc' === $embed_type || 'asyncsrc' === $embed_type ? true : $embed_extsrcjs; if ( $this->_custom_location_does_not_exist( '/<!-- W3TC-include-js-head -->/', $buffer, $script['body'] ) ) { $head_prepend .= $script['body']; } $this->remove_scripts_group( $buffer, 'include' ); } if ( $http2push ) { $this->minify_helpers->http2_header_add( $script['url'], 'script' ); } $embed_type = $this->_config->get_string( 'minify.js.body.embed_type' ); $script = $this->get_script_group( 'include-body', $embed_type ); if ( $script['body'] ) { $embed_extsrcjs = 'extsrc' === $embed_type || 'asyncsrc' === $embed_type ? true : $embed_extsrcjs; if ( $this->_custom_location_does_not_exist( '/<!-- W3TC-include-js-body-start -->/', $buffer, $script['body'] ) ) { $body_prepend .= $script['body']; } $this->remove_scripts_group( $buffer, 'include-body' ); } if ( $http2push ) { $this->minify_helpers->http2_header_add( $script['url'], 'script' ); } $embed_type = $this->_config->get_string( 'minify.js.footer.embed_type' ); $script = $this->get_script_group( 'include-footer', $embed_type ); if ( $script['body'] ) { $embed_extsrcjs = 'extsrc' === $embed_type || 'asyncsrc' === $embed_type ? true : $embed_extsrcjs; if ( $this->_custom_location_does_not_exist( '/<!-- W3TC-include-js-body-end -->/', $buffer, $script['body'] ) ) { $body_append .= $script['body']; } $this->remove_scripts_group( $buffer, 'include-footer' ); } if ( $http2push ) { $this->minify_helpers->http2_header_add( $script['url'], 'script' ); } } } if ( '' !== $head_prepend ) { $buffer = preg_replace( '~<head(\s+[^>]*)*>~Ui', '\\0' . $head_prepend, $buffer, 1 ); } if ( '' !== $body_prepend ) { $buffer = preg_replace( '~<body(\s+[^>]*)*>~Ui', '\\0' . $body_prepend, $buffer, 1 ); } if ( '' !== $body_append ) { $buffer = preg_replace( '~<\\/body>~', $body_append . '\\0', $buffer, 1 ); } if ( $embed_extsrcjs ) { $script = ' <script> var extsrc=null; (function(){function j(){if(b&&g){document.write=k;document.writeln=l;var f=document.createElement("span");f.innerHTML=b;g.appendChild(f);b=""}}function d(){j();for(var f=document.getElementsByTagName("script"),c=0;c<f.length;c++){var e=f[c],h=e.getAttribute("asyncsrc");if(h){e.setAttribute("asyncsrc","");var a=document.createElement("script");a.async=!0;a.src=h;document.getElementsByTagName("head")[0].appendChild(a)}if(h=e.getAttribute("extsrc")){e.setAttribute("extsrc","");g=document.createElement("span");e.parentNode.insertBefore(g,e);document.write=function(a){b+=a};document.writeln=function(a){b+=a;b+="\n"};a=document.createElement("script");a.async=!0;a.src=h;/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent)?a.onreadystatechange=function(){("loaded"==this.readyState||"complete"==this.readyState)&&d()}:-1!=navigator.userAgent.indexOf("Firefox")||"onerror"in a?(a.onload=d,a.onerror=d):(a.onload=d,a.onreadystatechange=d);document.getElementsByTagName("head")[0].appendChild(a);return}}j();document.write=k;document.writeln=l;for(c=0;c<extsrc.complete.funcs.length;c++)extsrc.complete.funcs[c]()}function i(){arguments.callee.done||(arguments.callee.done=!0,d())}extsrc={complete:function(b){this.complete.funcs.push(b)}};extsrc.complete.funcs=[];var k=document.write,l=document.writeln,b="",g="";document.addEventListener&&document.addEventListener("DOMContentLoaded",i,!1);if(/WebKit/i.test(navigator.userAgent))var m=setInterval(function(){/loaded|complete/.test(document.readyState)&&(clearInterval(m),i())},10);window.onload=i})(); </script> '; $buffer = preg_replace( '~<head(\s+[^>]*)*>~Ui', '\\0' . $script, $buffer, 1 ); } // Minify HTML/Feed. if ( $html_enable ) { try { $buffer = $this->minify_html( $buffer ); } catch ( \Exception $exception ) { $this->error = $exception->getMessage(); } } return $buffer; } /** * Adds the minify flush item to the WordPress admin bar menu. * * @param array $menu_items Array of existing admin bar menu items. * * @return array Modified menu items with the minify cache option included. */ public function w3tc_admin_bar_menu( $menu_items ) { $menu_items['20210.minify'] = array( 'id' => 'w3tc_flush_minify', 'parent' => 'w3tc_flush', 'title' => __( 'Minify Cache', 'w3-total-cache' ), 'href' => wp_nonce_url( admin_url( 'admin.php?page=w3tc_dashboard&w3tc_flush_minify' ), 'w3tc' ), ); return $menu_items; } /** * Appends a footer comment regarding minification to the HTML strings. * * @param array $strings Array of footer comments to append. * * @return array Modified array of footer comments. */ public function w3tc_footer_comment( $strings ) { $strings[] = sprintf( // Translators: 1 engine name, 2 reject reason. __( 'Minified using %1$s%2$s', 'w3-total-cache' ), Cache::engine_name( $this->_config->get_string( 'minify.engine' ) ), ( '' !== $this->minify_reject_reason ? sprintf( ' (%s)', $this->minify_reject_reason ) : '' ) ); if ( $this->_config->get_boolean( 'minify.debug' ) ) { $strings[] = ''; $strings[] = 'Minify debug info:'; $strings[] = sprintf( '%s%s', str_pad( 'Theme: ', 20 ), $this->get_theme() ); $strings[] = sprintf( '%s%s', str_pad( 'Template: ', 20 ), $this->get_template() ); if ( $this->error ) { $strings[] = sprintf( '%s%s', str_pad( 'Errors: ', 20 ), $this->error ); } if ( count( $this->replaced_styles ) ) { $strings[] = 'Replaced CSS files:'; foreach ( $this->replaced_styles as $index => $file ) { $strings[] = sprintf( '%d. %s', $index + 1, Util_Content::escape_comment( $file ) ); } } if ( count( $this->replaced_scripts ) ) { $strings[] = 'Replaced JavaScript files:'; foreach ( $this->replaced_scripts as $index => $file ) { $strings[] = sprintf( "%d. %s\r\n", $index + 1, Util_Content::escape_comment( $file ) ); } } $strings[] = ''; } return $strings; } /** * Checks if a custom minification location does not exist. * * @param string $pattern Regular expression pattern to search. * @param string $source Source string to check. * @param string $script Replacement script for the match. * * @return bool True if the location does not exist, false otherwise. */ public function _custom_location_does_not_exist( $pattern, &$source, $script ) { $count = 0; $source = preg_replace( $pattern, $script, $source, 1, $count ); return 0 === $count; } /** * Removes specified CSS files from the provided content. * * @param string $content HTML content to search for CSS references. * @param array $files List of CSS files to remove. * * @return void */ public function remove_styles( &$content, $files ) { $regexps = array(); $home_url_regexp = Util_Environment::home_url_regexp(); $path = ''; if ( Util_Environment::is_wpmu() && ! Util_Environment::is_wpmu_subdomain() ) { $path = ltrim( Util_Environment::home_url_uri(), '/' ); } foreach ( $files as $file ) { if ( $path && strpos( $file, $path ) === 0 ) { $file = substr( $file, strlen( $path ) ); } $this->replaced_styles[] = $file; if ( Util_Environment::is_url( $file ) && ! preg_match( '~' . $home_url_regexp . '~i', $file ) ) { // external CSS files. $regexps[] = Util_Environment::preg_quote( $file ); } else { // local CSS files. $file = ltrim( $file, '/' ); if ( home_url() === site_url() && ltrim( Util_Environment::site_url_uri(), '/' ) && strpos( $file, ltrim( Util_Environment::site_url_uri(), '/' ) ) === 0 ) { $file = str_replace( ltrim( Util_Environment::site_url_uri(), '/' ), '', $file ); } $file = ltrim( preg_replace( '~' . $home_url_regexp . '~i', '', $file ), '/\\' ); $regexps[] = '(' . $home_url_regexp . ')?/?' . Util_Environment::preg_quote( $file ); } } foreach ( $regexps as $regexp ) { $content = preg_replace( '~<link\s+[^<>]*href=["\']?' . $regexp . '["\']?[^<>]*/?>(.*</link>)?~Uis', '', $content ); $content = preg_replace( '~@import\s+(url\s*)?\(?["\']?\s*' . $regexp . '\s*["\']?\)?[^;]*;?~is', '', $content ); } $content = preg_replace( '~<style[^<>]*>\s*</style>~', '', $content ); } /** * Removes specified JavaScript files from the provided content. * * @param string $content HTML content to search for script references. * @param array $files List of JavaScript files to remove. * * @return void */ public function remove_scripts( &$content, $files ) { $regexps = array(); $home_url_regexp = Util_Environment::home_url_regexp(); $path = ''; if ( Util_Environment::is_wpmu() && ! Util_Environment::is_wpmu_subdomain() ) { $path = ltrim( Util_Environment::network_home_url_uri(), '/' ); } foreach ( $files as $file ) { if ( $path && strpos( $file, $path ) === 0 ) { $file = substr( $file, strlen( $path ) ); } $this->replaced_scripts[] = $file; if ( Util_Environment::is_url( $file ) && ! preg_match( '~' . $home_url_regexp . '~i', $file ) ) { // external JS files. $regexps[] = Util_Environment::preg_quote( $file ); } else { // local JS files. $file = ltrim( $file, '/' ); if ( home_url() === site_url() && ltrim( Util_Environment::site_url_uri(), '/' ) && strpos( $file, ltrim( Util_Environment::site_url_uri(), '/' ) ) === 0 ) { $file = str_replace( ltrim( Util_Environment::site_url_uri(), '/' ), '', $file ); } $file = ltrim( preg_replace( '~' . $home_url_regexp . '~i', '', $file ), '/\\' ); $regexps[] = '(' . $home_url_regexp . ')?/?' . Util_Environment::preg_quote( $file ); } } foreach ( $regexps as $regexp ) { $content = preg_replace( '~<script\s+[^<>]*src=["\']?' . $regexp . '["\']?[^<>]*>\s*</script>~Uis', '', $content ); } } /** * Removes a group of CSS files for a specified location. * * @param string $content HTML content to search for CSS references. * @param string $location Location identifier for the CSS group. * * @return void */ public function remove_styles_group( &$content, $location ) { $theme = $this->get_theme(); $template = $this->get_template(); $files = array(); $groups = $this->_config->get_array( 'minify.css.groups' ); if ( isset( $groups[ $theme ]['default'][ $location ]['files'] ) ) { $files = (array) $groups[ $theme ]['default'][ $location ]['files']; } if ( 'default' !== $template && isset( $groups[ $theme ][ $template ][ $location ]['files'] ) ) { $files = array_merge( $files, (array) $groups[ $theme ][ $template ][ $location ]['files'] ); } $this->remove_styles( $content, $files ); } /** * Removes a group of JavaScript files for a specified location. * * @param string $content HTML content to search for script references. * @param string $location Location identifier for the script group. * * @return void */ public function remove_scripts_group( &$content, $location ) { $theme = $this->get_theme(); $template = $this->get_template(); $files = array(); $groups = $this->_config->get_array( 'minify.js.groups' ); if ( isset( $groups[ $theme ]['default'][ $location ]['files'] ) ) { $files = (array) $groups[ $theme ]['default'][ $location ]['files']; } if ( 'default' !== $template && isset( $groups[ $theme ][ $template ][ $location ]['files'] ) ) { $files = array_merge( $files, (array) $groups[ $theme ][ $template ][ $location ]['files'] ); } $this->remove_scripts( $content, $files ); } /** * Minifies the provided HTML content. * * @param string $html HTML content to minify. * * @return string Minified HTML content. */ public function minify_html( $html ) { $w3_minifier = Dispatcher::component( 'Minify_ContentMinifier' ); $ignored_comments = $this->_config->get_array( 'minify.html.comments.ignore' ); if ( count( $ignored_comments ) ) { $ignored_comments_preserver = new \W3TCL\Minify\Minify_IgnoredCommentPreserver(); $ignored_comments_preserver->setIgnoredComments( $ignored_comments ); $html = $ignored_comments_preserver->search( $html ); } if ( $this->_config->get_boolean( 'minify.html.inline.js' ) ) { $js_engine = $this->_config->get_string( 'minify.js.engine' ); if ( ! $w3_minifier->exists( $js_engine ) || ! $w3_minifier->available( $js_engine ) ) { $js_engine = 'js'; } $js_minifier = $w3_minifier->get_minifier( $js_engine ); $js_options = $w3_minifier->get_options( $js_engine ); $w3_minifier->init( $js_engine ); $html = \W3TCL\Minify\Minify_Inline_JavaScript::minify( $html, $js_minifier, $js_options ); } if ( $this->_config->get_boolean( 'minify.html.inline.css' ) ) { $css_engine = $this->_config->get_string( 'minify.css.engine' ); if ( ! $w3_minifier->exists( $css_engine ) || ! $w3_minifier->available( $css_engine ) ) { $css_engine = 'css'; } $css_minifier = $w3_minifier->get_minifier( $css_engine ); $css_options = $w3_minifier->get_options( $css_engine ); $w3_minifier->init( $css_engine ); $html = \W3TCL\Minify\Minify_Inline_CSS::minify( $html, $css_minifier, $css_options ); } $engine = $this->_config->get_string( 'minify.html.engine' ); if ( ! $w3_minifier->exists( $engine ) || ! $w3_minifier->available( $engine ) ) { $engine = 'html'; } if ( function_exists( 'is_feed' ) && is_feed() ) { $engine .= 'xml'; } $minifier = $w3_minifier->get_minifier( $engine ); $options = $w3_minifier->get_options( $engine ); $w3_minifier->init( $engine ); $html = call_user_func( $minifier, $html, $options ); if ( isset( $ignored_comments_preserver ) ) { $html = $ignored_comments_preserver->replace( $html ); } return $html; } /** * Retrieves the current theme identifier. * * @return string Theme identifier. */ public function get_theme() { static $theme = null; if ( null === $theme ) { $theme = Util_Theme::get_theme_key( get_theme_root(), get_template(), get_stylesheet() ); } return $theme; } /** * Retrieves the current template identifier. * * phpcs:disable WordPress.CodeAnalysis.AssignmentInCondition.Found * phpcs:disable Squiz.PHP.DisallowMultipleAssignments.Found * phpcs:disable Generic.CodeAnalysis.AssignmentInCondition.Found * * @return string Template identifier. */ public function get_template() { static $template = null; if ( null === $template ) { $template_file = 'index.php'; switch ( true ) { case ( is_404() && ( $template_file = get_404_template() ) ): case ( is_search() && ( $template_file = get_search_template() ) ): case ( is_tax() && ( $template_file = get_taxonomy_template() ) ): case ( is_front_page() && function_exists( 'get_front_page_template' ) && $template_file = get_front_page_template() ): case ( is_home() && ( $template_file = get_home_template() ) ): case ( is_attachment() && ( $template_file = get_attachment_template() ) ): case ( is_single() && ( $template_file = get_single_template() ) ): case ( is_page() && ( $template_file = get_page_template() ) ): case ( is_category() && ( $template_file = get_category_template() ) ): case ( is_tag() && ( $template_file = get_tag_template() ) ): case ( is_author() && ( $template_file = get_author_template() ) ): case ( is_date() && ( $template_file = get_date_template() ) ): case ( is_archive() && ( $template_file = get_archive_template() ) ): case ( is_paged() && ( $template_file = get_query_template( 'paged' ) ) ): break; default: if ( function_exists( 'get_index_template' ) ) { $template_file = get_index_template(); } else { $template_file = 'index.php'; } break; } $template = basename( $template_file, '.php' ); } return $template; } /** * Generates the HTML markup for including a stylesheet. * * phpcs:disable WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet * * @param string $url URL of the stylesheet. * @param bool $import Whether to use @import syntax. * @param bool $use_style Whether to wrap @import in <style> tags. * * @return string Generated HTML markup. */ public function get_style( $url, $import = false, $use_style = true ) { if ( $import && $use_style ) { return '<style media="all">@import url("' . $url . "\");</style>\r\n"; } elseif ( $import && ! $use_style ) { return '@import url("' . $url . "\");\r\n"; } else { return '<link rel="stylesheet" href="' . str_replace( '&', '&', $url ) . "\" media=\"all\" />\r\n"; } } /** * Retrieves the details of a grouped CSS style by location. * * @param string $location Location identifier for the style group. * * @return array Associative array containing 'url' and 'body' keys. */ public function get_style_group( $location ) { $style = false; $type = 'css'; $groups = $this->_config->get_array( 'minify.css.groups' ); $theme = $this->get_theme(); $template = $this->get_template(); if ( 'default' !== $template && empty( $groups[ $theme ][ $template ][ $location ]['files'] ) ) { $template = 'default'; } $return = array( 'url' => null, 'body' => '', ); if ( ! empty( $groups[ $theme ][ $template ][ $location ]['files'] ) ) { if ( $this->_config->get_boolean( 'minify.css.embed' ) ) { $minify = Dispatcher::component( 'Minify_MinifiedFileRequestHandler' ); $minify_filename = $this->get_minify_manual_filename( $theme, $template, $location, $type ); $m = $minify->process( $minify_filename, true ); if ( isset( $m['content'] ) ) { $style = $m['content']; } else { $style = 'not set'; } $return['body'] = "<style media=\"all\">$style</style>\r\n"; } else { $return['url'] = $this->get_minify_manual_url( $theme, $template, $location, $type ); if ( $return['url'] ) { $import = ( isset( $groups[ $theme ][ $template ][ $location ]['import'] ) ? (bool) $groups[ $theme ][ $template ][ $location ]['import'] : false ); $return['body'] = $this->get_style( $return['url'], $import ); } } } return $return; } /** * Retrieves the script group for the specified location and embed type. * * @param string $location The location of the scripts (e.g., 'header', 'footer'). * @param string $embed_type The embed type, defaults to 'blocking'. * * @return array Associative array containing 'url' and 'body'. */ public function get_script_group( $location, $embed_type = 'blocking' ) { $script = false; $file_type = 'js'; $theme = $this->get_theme(); $template = $this->get_template(); $groups = $this->_config->get_array( 'minify.js.groups' ); if ( 'default' !== $template && empty( $groups[ $theme ][ $template ][ $location ]['files'] ) ) { $template = 'default'; } $return = array( 'url' => null, 'body' => '', ); if ( ! empty( $groups[ $theme ][ $template ][ $location ]['files'] ) ) { $return['url'] = $this->get_minify_manual_url( $theme, $template, $location, $file_type ); if ( $return['url'] ) { $return['body'] = $this->minify_helpers->generate_script_tag( $return['url'], $embed_type ); } } return $return; } /** * Generates a style tag or URL for custom styles. * * @param array $files Array of file paths for the styles. * @param bool $embed_to_html Whether to embed styles directly in HTML. * * @return array Associative array containing 'url' and 'body'. */ public function get_style_custom( $files, $embed_to_html = false ) { return $this->minify_helpers->generate_css_style_tag( $files, $embed_to_html ); } /** * Retrieves the manual filename for minified resources. * * @param string $theme The theme name. * @param string $template The template name. * @param string $location The location identifier. * @param string $type The resource type ('js' or 'css'). * * @return string|false The generated filename or false if not available. */ public function get_minify_manual_filename( $theme, $template, $location, $type ) { $minify = Dispatcher::component( 'Minify_MinifiedFileRequestHandler' ); $id = $minify->get_id_group( $theme, $template, $location, $type ); if ( ! $id ) { return false; } return $theme . '.' . $template . '.' . $location . '.' . $id . '.' . $type; } /** * Retrieves the manual URL for minified resources. * * @param string $theme The theme name. * @param string $template The template name. * @param string $location The location identifier. * @param string $type The resource type ('js' or 'css'). * * @return string The generated URL. */ public function get_minify_manual_url( $theme, $template, $location, $type ) { return Minify_Core::minified_url( $this->get_minify_manual_filename( $theme, $template, $location, $type ) ); } /** * Retrieves an array of all URLs for minified resources. * * @return array Array of URLs. */ public function get_urls() { $files = array(); $js_groups = $this->_config->get_array( 'minify.js.groups' ); $css_groups = $this->_config->get_array( 'minify.css.groups' ); foreach ( $js_groups as $js_theme => $js_templates ) { foreach ( $js_templates as $js_template => $js_locations ) { foreach ( (array) $js_locations as $js_location => $js_config ) { if ( ! empty( $js_config['files'] ) ) { $files[] = $this->get_minify_manual_url( $js_theme, $js_template, $js_location, 'js' ); } } } } foreach ( $css_groups as $css_theme => $css_templates ) { foreach ( $css_templates as $css_template => $css_locations ) { foreach ( (array) $css_locations as $css_location => $css_config ) { if ( ! empty( $css_config['files'] ) ) { $files[] = $this->get_minify_manual_url( $css_theme, $css_template, $css_location, 'css' ); } } } } return $files; } /** * Checks whether minification can be applied based on the current environment. * * @return bool True if minification can proceed, false otherwise. */ public function can_minify() { // Skip if doint AJAX. if ( defined( 'DOING_AJAX' ) ) { $this->minify_reject_reason = 'Doing AJAX'; return false; } // Skip if doing cron. if ( defined( 'DOING_CRON' ) ) { $this->minify_reject_reason = 'Doing cron'; return false; } // Skip if APP request. if ( defined( 'APP_REQUEST' ) ) { $this->minify_reject_reason = 'Application request'; return false; } // Skip if XMLRPC request. if ( defined( 'XMLRPC_REQUEST' ) ) { $this->minify_reject_reason = 'XMLRPC request'; return false; } // Skip if Admin. if ( defined( 'WP_ADMIN' ) ) { $this->minify_reject_reason = 'wp-admin'; return false; } // Check for WPMU's and WP's 3.0 short init. if ( defined( 'SHORTINIT' ) && SHORTINIT ) { $this->minify_reject_reason = 'Short init'; return false; } // Check User agent. if ( ! $this->check_ua() ) { $this->minify_reject_reason = 'User agent is rejected'; return false; } // Check request URI. if ( ! $this->check_request_uri() ) { $this->minify_reject_reason = 'Request URI is rejected'; return false; } // Skip if user is logged in. if ( $this->_config->get_boolean( 'minify.reject.logged' ) && ! $this->check_logged_in() ) { $this->minify_reject_reason = 'User is logged in'; return false; } return true; } /** * Checks whether minification can be applied to the provided buffer. * * @param string $buffer The buffer to check. * * @return bool True if the buffer can be minified, false otherwise. */ public function can_minify2( $buffer ) { // Check for DONOTMINIFY constant. if ( defined( 'DONOTMINIFY' ) && DONOTMINIFY ) { $this->minify_reject_reason = 'DONOTMINIFY constant is defined'; return false; } // Check feed minify. if ( $this->_config->get_boolean( 'minify.html.reject.feed' ) && function_exists( 'is_feed' ) && is_feed() ) { $this->minify_reject_reason = 'Feed is rejected'; return false; } return true; } /** * Validates the user agent for minification. * * @return bool True if the user agent is allowed, false otherwise. */ public function check_ua() { $uas = array_merge( $this->_config->get_array( 'minify.reject.ua' ), array( W3TC_POWERED_BY, ) ); foreach ( $uas as $ua ) { if ( ! empty( $ua ) ) { if ( stristr( isset( $_SERVER['HTTP_USER_AGENT'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : '', $ua ) !== false ) { return false; } } } return true; } /** * Checks whether the current user is logged in. * * @return bool True if the user is not logged in, false otherwise. */ public function check_logged_in() { foreach ( array_keys( $_COOKIE ) as $cookie_name ) { if ( strpos( $cookie_name, 'wordpress_logged_in' ) === 0 ) { return false; } } return true; } /** * Validates the request URI for minification. * * @return bool True if the URI is valid, false otherwise. */ public function check_request_uri() { $auto_reject_uri = array( 'wp-login', 'wp-register', ); foreach ( $auto_reject_uri as $uri ) { if ( strstr( isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '', $uri ) !== false ) { return false; } } $reject_uri = $this->_config->get_array( 'minify.reject.uri' ); $reject_uri = array_map( array( '\W3TC\Util_Environment', 'parse_path' ), $reject_uri ); foreach ( $reject_uri as $expr ) { $expr = trim( $expr ); $expr = str_replace( '~', '\~', $expr ); if ( '' !== $expr && preg_match( '~' . $expr . '~i', isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '' ) ) { return false; } } if ( Util_Request::get_string( 'wp_customize' ) ) { return false; } return true; } /** * Collects usage statistics for the current request. * * @param mixed $storage The storage object or array for the statistics. * * @return void */ public function w3tc_usage_statistics_of_request( $storage ) { $o = Dispatcher::component( 'Minify_MinifiedFileRequestHandler' ); $o->w3tc_usage_statistics_of_request( $storage ); } /** * Adds minification-related metrics to the usage statistics. * * @param array $metrics Existing metrics array. * * @return array Modified metrics array. */ public function w3tc_usage_statistics_metrics( $metrics ) { return array_merge( $metrics, array( 'minify_requests_total', 'minify_original_length_css', 'minify_output_length_css', 'minify_original_length_js', 'minify_output_length_js', ) ); } /** * Modifies or stores preload Link headers for page caching. * * @param array $header The current header being processed. * @param array $header_original The original header details. * * @return array The modified header. */ public function w3tc_pagecache_set_header( $header, $header_original ) { if ( 'Link' === $header_original['n'] && false !== strpos( $header_original['v'], 'rel=preload' ) ) { // store preload Link headers in cache. $new = $header_original; $new['files_match'] = '\\.html[_a-z]*$'; return $new; } return $header; } } /** * Class _W3_MinifyHelpers * * phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound * phpcs:disable PEAR.NamingConventions.ValidClassName.StartWithCapital */ class _W3_MinifyHelpers { /** * Config * * @var Config */ private $config; /** * Debug flag * * @var bool */ private $debug = false; /** * Initializes the _W3_MinifyHelpers class. * * @param Config $config Configuration instance used for the class. * * @return void */ public function __construct( $config ) { $this->config = $config; $this->debug = $config->get_boolean( 'minify.debug' ); } /** * Retrieves the minified URL for a given set of files and type. * * @param array $files Array of file paths to be minified. * @param string $type Type of files (e.g., 'css', 'js'). * * @return string|null The minified URL or null if no URL is generated. */ public function get_minify_url_for_files( $files, $type ) { $minify_filename = Minify_Core::urls_for_minification_to_minify_filename( $files, $type ); if ( is_null( $minify_filename ) ) { return null; } $url = Minify_Core::minified_url( $minify_filename ); $url = Util_Environment::url_to_maybe_https( $url ); $url = apply_filters( 'w3tc_minify_url_for_files', $url, $files, $type ); return $url; } /** * Retrieves the minified content for a given set of files and type. * * @param array $files Array of file paths to be minified. * @param string $type Type of files (e.g., 'css', 'js'). * * @return string|null The minified content wrapped in HTML or null if no content is available. */ public function get_minified_content_for_files( $files, $type ) { $minify_filename = Minify_Core::urls_for_minification_to_minify_filename( $files, $type ); if ( is_null( $minify_filename ) ) { return null; } $minify = Dispatcher::component( 'Minify_MinifiedFileRequestHandler' ); $m = $minify->process( $minify_filename, true ); if ( ! isset( $m['content'] ) ) { return null; } if ( empty( $m['content'] ) ) { return null; } $style = $m['content']; return "<style media=\"all\">$style</style>\r\n"; } /** * Generates a script tag for a given URL and embed type. * * @param string $url URL of the script. * @param string $embed_type Type of embed (e.g., 'blocking', 'nb-js', 'nb-async'). * * @return string The generated script tag. */ public function generate_script_tag( $url, $embed_type = 'blocking' ) { static $non_blocking_function = false; $rocket_loader_ignore = ''; if ( $this->config->get_boolean( array( 'cloudflare', 'minify_js_rl_exclude' ) ) ) { $rocket_loader_ignore = 'data-cfasync="false"'; } if ( 'blocking' === $embed_type ) { $script = '<script ' . $rocket_loader_ignore . ' src="' . str_replace( '&', '&', $url ) . '"></script>'; } else { $script = ''; if ( 'nb-js' === $embed_type ) { if ( ! $non_blocking_function ) { $non_blocking_function = true; $script = "<script>function w3tc_load_js(u){var d=document,p=d.getElementsByTagName('HEAD')[0],c=d.createElement('script');c.src=u;p.appendChild(c);}</script>"; } $script .= "<script>w3tc_load_js('" . $url . "');</script>"; } elseif ( 'nb-async' === $embed_type ) { $script = '<script ' . $rocket_loader_ignore . ' async src="' . str_replace( '&', '&', $url ) . '"></script>'; } elseif ( 'nb-defer' === $embed_type ) { $script = '<script ' . $rocket_loader_ignore . ' defer src="' . str_replace( '&', '&', $url ) . '"></script>'; } elseif ( 'extsrc' === $embed_type ) { $script = '<script ' . $rocket_loader_ignore . ' extsrc="' . str_replace( '&', '&', $url ) . '"></script>'; } elseif ( 'asyncsrc' === $embed_type ) { $script = '<script ' . $rocket_loader_ignore . ' asyncsrc="' . str_replace( '&', '&', $url ) . '"></script>'; } else { $script = '<script ' . $rocket_loader_ignore . ' src="' . str_replace( '&', '&', $url ) . '"></script>'; } } return $script . "\r\n"; } /** * Determines whether a given file or URL should be minified. * * @param string $url URL of the file to check. * @param string $file File path to check (optional). * * @return string Indicates the type of minification ('url', 'file', or empty string). */ public function is_file_for_minification( $url, $file ) { static $external; static $external_regexp; if ( ! isset( $external ) ) { $external = $this->config->get_array( 'minify.cache.files' ); $external_regexp = $this->config->get_boolean( 'minify.cache.files_regexp' ); } foreach ( $external as $item ) { if ( empty( $item ) ) { continue; } if ( $external_regexp ) { $item = str_replace( '~', '\~', $item ); if ( ! preg_match( '~' . $item . '~', $url ) ) { continue; } } elseif ( ! preg_match( '~^' . Util_Environment::get_url_regexp( $item ) . '~', $url ) ) { continue; } if ( $this->debug ) { Minify_Core::log( 'is_file_for_minification: whilelisted ' . $url . ' by ' . $item ); } return 'url'; } if ( is_null( $file ) ) { if ( $this->debug ) { Minify_Core::log( 'is_file_for_minification: external not whitelisted url ' . $url ); } return ''; } $file_normalized = Util_Environment::remove_query_all( $file ); $ext = strrchr( $file_normalized, '.' ); if ( '.js' !== $ext && '.css' !== $ext ) { if ( $this->debug ) { Minify_Core::log( 'is_file_for_minification: unknown extension ' . $ext . ' for ' . $file ); } return ''; } $path = Util_Environment::docroot_to_full_filename( $file ); if ( ! file_exists( $path ) ) { if ( $this->debug ) { Minify_Core::log( 'is_file_for_minification: file doesnt exists ' . $path ); } return ''; } if ( $this->debug ) { Minify_Core::log( 'is_file_for_minification: true for file ' . $file . ' path ' . $path ); } return 'file'; } /** * Adds an HTTP/2 header for preloading a given URL. * * @param string $url URL to be preloaded. * @param string $type Resource type (e.g., 'script', 'style'). * * @return void */ public function http2_header_add( $url, $type ) { if ( empty( $url ) ) { return; } // Cloudflare needs URI without host. $uri = Util_Environment::url_to_uri( $url ); // priorities attached: // 3000 - cdn // 4000 - browsercache. $data = apply_filters( 'w3tc_minify_http2_preload_url', array( 'result_link' => $uri, 'original_url' => $url, ) ); header( 'Link: <' . $data['result_link'] . '>; rel=preload; as=' . $type, false ); } /** * Generates a CSS style tag or URL for embedding styles. * * @param array $files Array of CSS file paths. * @param bool $embed_to_html Whether to embed the CSS content directly into the HTML. * * @return array Contains 'url' (string|null) and 'body' (string) keys. */ public function generate_css_style_tag( $files, $embed_to_html ) { $return = array( 'url' => null, 'body' => '', ); if ( count( $files ) ) { if ( $embed_to_html ) { $body = $this->get_minified_content_for_files( $files, 'css' ); if ( ! is_null( $body ) ) { $return['body'] = $body; } } if ( empty( $return['body'] ) ) { $return['url'] = $this->get_minify_url_for_files( $files, 'css' ); if ( ! is_null( $return['url'] ) ) { $return['body'] = '<link rel="stylesheet" href="' . // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet str_replace( '&', '&', $return['url'] ) . "\" media=\"all\" />\r\n"; } } } return $return; } }
Upload File
Create Folder