W3 Total Cache - Version 0.9.4

Version Description

  • Fixed undefined w3tc_button_link
  • Fixed support and other form submissions
  • Fixed extension enabled key error
  • Fixed Test CDN errors
  • Fixed trailing slashes in custom wp content path and Minify
  • Fixed WP_PLUGIN_DIR not being available when object-cache.php is loaded and W3TC constant not set
  • Fixed Minify Auto and restructuring of JS code placement on page
  • Fixed remove / replace drop in file on plugins page
  • Fixed false positive check for legacy code
  • Fixed deprecated wpdb escape
  • Fixed Fragment Caching and APC anomalies
  • Fixed cached configs causing 500 error on interrupted file writes
  • Fixed readfile errors on servers with the functionality disabled
  • Fixed false positives for license key verification
  • Fixed debug information not printed on cached pages
  • Fixed backwards compatibility and flushing and added doing it wrong notification
  • Fixed "Prevent caching of objects after settings change"
  • Fixed "Use late init" being shown as enabled with Disc:Enhanced
  • Fixed missing param in APC cache method declaration
  • Fixed user roles property not begin an array
  • Fixed adding empty Vary header
  • Fixed notice on failed upgrade licencing check
  • Fixed Database Cache description text
  • Fixed duplicate bb10 agents
  • Fixed settings link in Minify Auto notification
  • Fixed notice with undefined constant
  • Fixed nginx configuration and Referrer, User Groups setting
  • Fixed Genesis settings and Suhosin field name limit error
  • Fixed Genesis and Fragment Caching (caching categories etc)
  • Fixed CDN being enabled when creating NetDNA/MaxCDN pullzone
  • Fixed NewRelic related notice in compatibility popup
  • Fixed trailing slash issue in filename to url conversion
  • Fixed issue with wp in subdirectory and relative Minimal Manual urls
  • Fixed issue with widget styling
  • Fixed issue with Purge All button action
  • Fixed issue with exporting of settings
  • Fixed issue with plugin interferring with preview theme
  • Fixed issue with malformed config files
  • Added caching of list of posts pages (tags, categories etc) to Genesis extension a long with flush it checkbox
  • Added typecasting on expiration time in object cache drop-in
  • Added capability check for save options
  • Added FeedBurner extension
  • Added woff support to Browser Cache
  • Added new CloudFlare IPs
  • Added support for WordPress defined charset and collate in CDN queue table creation
  • Added WordPress SEO by Yoast extension
  • Added *.less to CDN theme uploads and MIME
  • Added default settings for MaxCDN Pull Zone creation
  • Added call to change MaxCDN canonical header setting to match plugin setting
  • Added one button default pull zone creation to MaxCDN without refresh
  • Added MaxCDN authorization validation
  • Added whitelist IPs notification for MaxCDN
  • Added support for use of existing zones without refresh
  • Added new mime types
  • Added support for separate domains for frontend and admin backend
  • Added CloudFlare as an extension
  • Added nofollow to blogroll links
  • Added DEV mode support to PRO version
  • Added EDGE MODE functionality
  • Improved wrapper functions in plugins.php for plugin / theme authors
  • Improved reliability of NetDNA / MaxCDN API calls by using WP HTTP and not cURL
  • Improved Fragment Caching debug information
  • Improved preview mode, removed query string requirement
  • Improved FAQ structure
  • Improved empty minify/pgcache cache notification when using CDN
  • Improved default settings for MaxCDN zone creation
  • Improved CDN queue performance
  • Improved blogmap url sanitation
  • Improved MaxCDN automatic zone creation process
  • Improved license key saving and Pro mode activation on Pro license purchases
  • Updated EDGE MODE: Full site mirroring support for MaxCDN
  • Updated translations
Download this release

Release Info

Developer fredericktownes
Plugin Icon 128x128 W3 Total Cache
Version 0.9.4
Comparing to
See all releases

Code changes from version 0.9.3 to 0.9.4

Files changed (76) hide show
  1. changelog.txt +601 -0
  2. configs/0.9.2.10-ConfigKeys.php +1908 -0
  3. configs/0.9.2.11-ConfigKeys.php +1912 -0
  4. configs/0.9.2.6-ConfigKeys.php +1860 -0
  5. configs/0.9.2.7-ConfigKeys.php +1860 -0
  6. configs/0.9.2.8-ConfigKeys.php +1860 -0
  7. configs/0.9.2.9-ConfigKeys.php +1860 -0
  8. configs/0.9.3-ConfigKeys.php +1983 -0
  9. extensions/CloudFlare.php +114 -0
  10. lib/W3/CloudFlare.php → extensions/CloudFlare/CloudFlareAPI.php +387 -373
  11. extensions/CloudFlare/CloudFlareSettings.php +20 -0
  12. extensions/CloudFlare/general-settings-box.php +114 -0
  13. {inc/functions → extensions/CloudFlare}/ip_in_range.php +0 -0
  14. extensions/CloudFlareAdmin.php +329 -0
  15. extensions/FeedBurner.php +37 -0
  16. extensions/FeedBurnerAdmin.php +114 -0
  17. extensions/Genesis.php +155 -65
  18. extensions/GenesisAdmin.php +28 -10
  19. extensions/WordPressSEO.php +36 -0
  20. extensions/WordPressSEOAdmin.php +103 -0
  21. inc/define.php +1626 -1578
  22. inc/email/minify_error_notification.html +7 -7
  23. inc/email/minify_error_notification.php +7 -7
  24. inc/email/support_request.php +42 -42
  25. inc/error.php +13 -13
  26. inc/functions/admin.php +47 -9
  27. inc/functions/admin_ui.php +247 -10
  28. inc/functions/compat.php +111 -111
  29. inc/functions/extensions.php +90 -1
  30. inc/functions/extract.php +90 -103
  31. inc/functions/file.php +403 -333
  32. inc/functions/http.php +102 -102
  33. inc/functions/mime.php +77 -74
  34. inc/functions/multisite.php +1 -1
  35. inc/functions/other.php +22 -59
  36. inc/functions/plugin.php +661 -616
  37. inc/functions/rule.php +386 -388
  38. inc/functions/ui.php +42 -12
  39. inc/functions/url.php +102 -102
  40. inc/lightbox/cdn_s3_bucket_location.php +19 -19
  41. inc/lightbox/edge.php +17 -0
  42. inc/lightbox/minify_recommendations.php +126 -126
  43. inc/lightbox/self_test.php +321 -321
  44. inc/lightbox/support_us.php +83 -29
  45. inc/lightbox/upgrade.php +32 -0
  46. inc/mime/all.php +626 -625
  47. inc/mime/cssjs.php +15 -15
  48. inc/mime/html.php +14 -14
  49. inc/mime/other.php +51 -50
  50. inc/options/about.php +52 -52
  51. inc/options/browsercache.php +380 -379
  52. inc/options/cdn.php +322 -320
  53. inc/options/cdn/att.php +38 -38
  54. inc/options/cdn/azure.php +51 -51
  55. inc/options/cdn/cf.php +54 -54
  56. inc/options/cdn/cf2.php +54 -54
  57. inc/options/cdn/common/cnames.php +47 -47
  58. inc/options/cdn/cotendo.php +45 -45
  59. inc/options/cdn/edgecast.php +38 -38
  60. inc/options/cdn/ftp.php +60 -60
  61. inc/options/cdn/maxcdn.php +34 -26
  62. inc/options/cdn/mirror.php +24 -24
  63. inc/options/cdn/netdna.php +89 -82
  64. inc/options/cdn/rscf.php +57 -57
  65. inc/options/cdn/s3.php +56 -56
  66. inc/options/common/footer.php +1 -1
  67. inc/options/common/header.php +224 -221
  68. inc/options/common/help.php +24 -16
  69. inc/options/dashboard.php +7 -7
  70. inc/options/dbcache.php +9 -9
  71. inc/options/edd/buy.php +3 -3
  72. inc/options/enterprise/dbcluster-config.php +28 -28
  73. inc/options/extensions.php +4 -4
  74. inc/options/extensions/list.php +3 -3
  75. inc/options/extensions/settings.php +1 -1
  76. inc/options/faq.php +0 -24
changelog.txt ADDED
@@ -0,0 +1,601 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ = 0.9.3 =
2
+ * Added support for extensions
3
+ * Added support for WordPress SEO image filter and CDN
4
+ * Added file exclusions for media query string logic
5
+ * Added user agents to user agents groups
6
+ * Added CDN FTP path / host test
7
+ * Fixed object cache and database cache for localization plugins
8
+ * Fixed chinese filenames when using CDN
9
+ * Fixed removal of stale cached files
10
+ * Fixed missing slashes in inline HTML, JS and CSS files when using CDN
11
+ * Fixed auto mode of minify filename length test
12
+ * Fixed NetDNA / MaxCDN testing when domain does not match domain zone settings
13
+ * Fixed CurlException and NetDNA / MaxCDN
14
+ * Fixed pull zone dropdown not showing or showing wrong zone
15
+ * Fixed trailing slash and redirect with apache
16
+ * Fixed false notification for page cache rules verification
17
+ * Fixed duplicate notifications for FTP
18
+ * Fixed empty FTP form
19
+ * Fixed add-in file validation
20
+ * Fixed browser cache headers for proxy cases
21
+ * Fixed wrong slash in Minify filepaths on windows based sites
22
+ * Fixed settings link in minify test failure and multisite
23
+ * Fixed missing param in canonical link generation
24
+ * Fixed PHP 5.2 compatibility
25
+ * Fixed handling of minify in preview mode
26
+ * Fixed order of operation issue on install tab for nginx
27
+ * Fixed translatable strings handling
28
+ * Fixed page cache debug mode issues
29
+ * Fixed home URL handling in multisite
30
+ * Fixed manual minify mode and path based file source for sub-directory installations
31
+ * Fixed path not set in disk enhanced caching
32
+ * Fixed page cache rewrite rule detection
33
+ * Fixed FTP CDN canonical
34
+ * Improved security with esc_* usage
35
+ * Improved backend performance with extensive refactoring
36
+
37
+ = 0.9.2.11 =
38
+ * Fixed issue with MaxCDN and authorization key
39
+ * Fixed issue with WordPress in subfolder
40
+ * Fixed issue with moved/renamed wp-content and plugin folder
41
+ * Fixed issue with CDN and Minify Auto in Network with site wide CDN settings
42
+ * Fixed issue with late init
43
+ * Fixed minor UI issue
44
+ * Fixed issue with possible OAuth name conflict
45
+ * Fixed issue with CDN and cnames replacement of minify urls
46
+ * Fixed issue with HTML debug comments being added to unsupported content
47
+ * Improved minify auto filename for single install
48
+ * Added minor improvement to NFS optimization with Page Cache
49
+ * Added option to disable the Minify Auto filename length test and use a manual value
50
+ * Removed unused file
51
+
52
+ = 0.9.2.10 =
53
+ * Added NetDNA / MaxCDN dashboard widget
54
+ * Added zone dropdown for NetDNA and MaxCDN CDNs
55
+ * Added create pull zone for NetDNA and MaxCDN CDNs
56
+ * Added notification(s) if incompatible plugins are detected
57
+ * Added "Disable CDN on the following pages" setting
58
+ * Added "Disable CDN on SSL pages" setting
59
+ * Added late init support for page cache's fragment caching
60
+ * Added POT file
61
+ * Added translations NL, PL
62
+ * Fixed setenvif issue in htaccess rules
63
+ * Fixed failed rewrite (404) and not caching feeds in nginx
64
+ * Fixed NetDNA / MaxCDN CNAME purging issues and "Test CDN" functionality
65
+ * Fixed Azure container handling
66
+ * Fixed New Relic verification
67
+ * Fixed theme preview
68
+ * Fixed wrong path issue with w3tc-wp-loader.php
69
+ * Fixed auto mode of Minify and filename lengths
70
+ * Fixed purging monthly archives with Varnish
71
+ * Fixed insert, delete, update quries purging with database cache
72
+ * Fixed HTTP compression when dynamic page fragments are used
73
+ * Fixed PHP_STRING and other warnings
74
+ * Fixed case sensitive header detection
75
+ * Fixed HEAD request handling
76
+ * Fixed event scheduling propagation in Multi Site
77
+ * Improved CDN custom file paths
78
+ * Improved handling of legacy config files
79
+ * Improved NetDNA / MaxCDN alias, key, secret string handling (backwards compatible)
80
+ * Improved auto mode for minify file naming which was causing unncessary issues
81
+ * Improved handling of hardcoded WordPress paths
82
+ * Improved the file management functionality (FTP support, file permissions etc)
83
+ * Improved disk cache directory usage
84
+ * Improved garbage collection of expired cache files for disk enhanced method of page caching
85
+ * Improved drop-in verification, only adds required drop-ins
86
+ * Improved New Relic error notification handling
87
+ * Improved New Relic "app name" settings with Multi Site
88
+ * Improved cacheable mime type detection in Page Cache
89
+ * Improved ob_callback performance and reduced number of output buffer calls
90
+ * Improved minify handling with CDN and Multi Site
91
+ * Improved Object Cache purge policy performance
92
+ * Improved Database Cache purge policy performance
93
+ * Improved handling of request methods other than GET, POST for page caching
94
+ * Removed setting of New Relic app name in htaccess; set manually or use the dynamic setting on the "Monitoring" tab
95
+
96
+ = 0.9.2.9 =
97
+ * Fixed saving settings issue with CloudFlare on activation
98
+ * Fixed issue with DbCache and Object Cache flushing
99
+ * Improved security for CloudFlare API calls
100
+ * Improved security for mfunc, now disabled by default and requires security string in order to execute: CVE-2013-2010
101
+ * Improved behavior of GET string, used for detecting blogs in disk enhanced page caching mode for multi site to prevent redirect loops and other issues
102
+
103
+ = 0.9.2.8 =
104
+ * Fixed /tmp file creation issue when saving settings
105
+ * Fixed auto minify
106
+ * Fixed New Relic API key verification
107
+ * Fixed uncommon issue with require ObjectCache failing
108
+ * Fixed uncommon open_basedir verification issue
109
+ * Improved notification handling by modified WordPress FileSystem API implementation
110
+ * Added PHP file handling to support cases not covered by default WordPress FileSystem API
111
+
112
+ = 0.9.2.7 =
113
+ * Fixed config file write in more hosting environments
114
+ * Fixed legacy config file import on servers with hardened file permissions
115
+ * Fixed page cache write cache rules in some environments
116
+ * Fixed HiDPI images
117
+ * Fixed false positive notifications when permissions are not changed or same
118
+ * Fixed minify help
119
+ * Improved upgrade notifications
120
+ * Improved page cache and minify notifications
121
+
122
+ = 0.9.2.6 =
123
+ * Added support for grouping cache entries for easier flushing
124
+ * Added more options for placing minified files on pages. Custom placements using HTML comments.
125
+ * Added CSS inclusion for auto / manual minify. If present its used: <!-- W3TC-include-css -->
126
+ * Added JS inclusion for minify auto mode. If present its used: <!-- W3TC-include-js-head -->,
127
+ * Added JS inclusion for minify manual mode. If present they are used when selecting correspong location in placement dropdown: <!-- W3TC-include-js-head -->, <!-- W3TC-include-js-body-start -->, <!-- W3TC-include-js-body-end -->
128
+ * Added new minification inclusion options, async, defer, extsrc and asyncsrc
129
+ * Added flushing sitemaps
130
+ * Added flushing custom pages
131
+ * Added flush the current blog when flushing in MultiSite
132
+ * Added flushing home page and/or post page if static
133
+ * Added flushing older pages (page/2, page/3) on purge requests
134
+ * Added flushing a limited amount of pagenumbers
135
+ * Added purging caches for deleted blogs in WordPress MultiSite
136
+ * Added uninstall process to the plugin for easier cleanup
137
+ * Added upgrade support that cleans up and removes old cache folders
138
+ * Added message when disk enhanced page caching is not working properly
139
+ * Added custom wp-content name and locations
140
+ * Added CDN feature "Dont use CDN for specific roles"
141
+ * Added "Purge from cache" link on edit post/page pages
142
+ * Added permalink suffixes (.html, .htm etc)
143
+ * Added uploading blogs.dir files when using MultiSite and CDN
144
+ * Added notification about IAM when using Amazon services (SNS, CloudFront, S3 etc)
145
+ * Added 'Don't minify JS files' 'Don't minify CSS files' options for minify
146
+ * Added Access-Control-Allow-Origin support for CDNs
147
+ * Added hooks clean_post_cache and menu changes
148
+ * Added caching JSON mime-type. Other mime-types can be added using array filter 'w3tc_is_cacheable_content_type'
149
+ * Added automatic reloading of config files when APC apc.stat is disabled
150
+ * Added request reload of APC file over HTTP
151
+ * Added priming of post on publish
152
+ * Added single config file (by default) when using WordPress MultiSite
153
+ * Added switch_to_blog() support
154
+ * Added wp_cache_decr, wp_cache_incr support
155
+ * Added wp_cache_switch_to_blog support
156
+ * Added fragment caching functionality that extends the transient caching methods in WordPress core
157
+ * Added network activation and network policy management
158
+ * Added control for comment cookie lifetime
159
+ * Added Go Daddy SUBDOMAIN_DOCUMENT_ROOT directive support
160
+ * Added JSON to mod_deflate configuration
161
+ * Added JavaScript mime-type variations to mod_deflate configuration
162
+ * Added WP-CLI support for purging cache, purging pull CDNs, reloading APC files, clearing APC, deleting pgcache files, and updating browser query string
163
+ * Added .htc mime type
164
+ * Added Rackspace CloudFiles container location selection
165
+ * Added rejected terms in database cache, to allow for deeper database caching capability
166
+ * Added Akamai CDN origin pull support
167
+ * Added system cache purge when apc.stat is disabled
168
+ * Added origin rel canonical support for CDNs
169
+ * Added AT&T origin pull CDN
170
+ * Added full-page mirroring and purging for origin pull CDNs
171
+ * Added compatibility mode improve disk enhanced page caching performance ~20% for users that don't care about interoperability
172
+ * Added nginx example files
173
+ * Added varnish example files
174
+ * Added basic application monitoring support using New Relic
175
+ * Added application monitoring widget using New Relic
176
+ * Added plugin dashboard page to display widgets etc
177
+ * Added purge from cache link to admin bar dropdown while browser posts/pages on front-end
178
+ * Added purge CDN completely link to admin bar dropdown
179
+ * Added CDN SSL checkbox "Disable CDN on SSL page"
180
+ * Added pull CDN support to MultiSite
181
+ * Fixed caching of the "Front Page" and added an option for the same
182
+ * Fixed w3_url_format function was not included error
183
+ * Fixed security vulnerability with file cache: disk basic page caching, database or object caching to disk. CVEs: CVE-2012-6077, CVE-2012-6078, CVE-2012-6079
184
+ * Fixed issue with concurrent writes to single config file
185
+ * Fixed Preview mode and deploy button
186
+ * Fixed varnish purging (See varnish config example file in ini folder)
187
+ * Fixed false positive notification on Page Cache: Disc Enhanced
188
+ * Fixed broken images for feedburner in dashboard on HTTPS sites
189
+ * Fixed minify ID generation causing notices
190
+ * Fixed false positive on minification related to group configuration among other
191
+ * Fixed default wp-content path and CDN uploads when WordPress is installed in directory
192
+ * Fixed pages not flushing when making changes in WordPress Admin
193
+ * Fixed mod_filter being used on unsupported Apache versions
194
+ * Fixed WordPress upgrade issue caused by W3TC remaining active
195
+ * Fixed minify path when using WordPress MultiSite and blogs in sub-directories
196
+ * Fixed user interface for "Dont cache specific roles"
197
+ * Fixed CDN and minify to file for storage
198
+ * Fixed feed_link filters interferring with feed purging
199
+ * Fixed false positive with minify rewrite test and WordPress MultiSite sub-directory mode
200
+ * Fixed WordPress Multisite in sub-directory mode and minify paths
201
+ * Fixed caching posts page when using static home page
202
+ * Fixed object cache not being initialised before getting options
203
+ * Fixed locating document root for minify in certain environments
204
+ * Fixed saving settings if permalinks are turned off
205
+ * Fixed "Install" page displaying rules that is not required
206
+ * Fixed minify cache being empty while page is cached so no minified files are generated, minified files auto generation no longer depend on pages not being cached
207
+ * Fixed unnecessary flushing with SSL, user agents and referrer not being activated
208
+ * Fixed "Purge from Page Cache" not purging varnish or CDN when enabled
209
+ * Fixed CSS minification and relative paths in external files
210
+ * Fixed login / logout and compatibility with BuddyPress
211
+ * Fixed flushing same posts many times if status is trashed or restored
212
+ * Fixed handling of .html fancy permalinks with nginx
213
+ * Fixed handling of missing xcache opcode cache
214
+ * Fixed Amazon S3 allowing LIST permissions to everyone
215
+ * Fixed handling of .xml mime type
216
+ * Fixed numerous object cache compatibility issues
217
+ * Fixed memcached port support issue
218
+ * Fixed HTTP_HOST not defined warning issue
219
+ * Fixed xdebug not configured halt issue
220
+ * Fixed minified files not being mirrored by push CDNs
221
+ * Fixed uploading to CDNs multiple times even if force overwrite is disabled
222
+ * Improved CloudFlare support: purging, dev mode, minification options, automatic IP range updates, rocket loader feature, security levels
223
+ * Improved support for the Bad Behavior plugin
224
+ * Improved object cache and MultiSite compatibility
225
+ * Improved flushing behavior with better post and pages detection. To change behavior hook into filter 'w3tc_flushable_post'
226
+ * Improved XML user interface when using Page Cache Disc: Enhanced
227
+ * Improved minify filename path generation
228
+ * Improved minify custom placement usage
229
+ * Improved PHP 5 compatibility by removing deprecated functionality
230
+ * Improved WordPress 3.4 and 3.5 compatibility by removing deprecated functions usage
231
+ * Improved plugin by removing unnecessary ob_starts
232
+ * Improved minify usage by returning old minify files while generating new
233
+ * Improved update procedure by removing need to manually deactivate and reactivate plugin
234
+ * Improved CDN paths and URL generation using both single and multisite installs
235
+ * Improved Admin Bar menu with more flushing actions
236
+ * Improved minify auto by adding support for downloading and combining external files
237
+ * Improved descriptions for various "Do not cache ..." textareas
238
+ * Improved header settings so plugin header settings override WordPress default header where appropriate
239
+ * Improved debug logging by adding a debug folder constant: W3TC_DEBUG_DIR
240
+ * Improved support for WPTouch plugin
241
+ * Improved custom post type support and flushing
242
+ * Improved cache key format and handling
243
+ * Improved minify support on Windows
244
+ * Improved purging functionality for CDN providers
245
+ * Improved compatibility wp-fb-autoconnect plugin
246
+ * Improved support of WordPress installed when in a sub-directory
247
+ * Improved support of non-default WordPress folder setups
248
+ * Improved use of HTTP API and FileSystem API in WordPress. HTTP API usage improves minify and CDN functionality. FileSystem API integration improves activation, deactivation and configuration changes
249
+ * Improved execution time across all caching engines
250
+ * Improved cache miss performance for page caching
251
+ * Improved notification handling
252
+ * Improved cache priming algorithm
253
+ * Improved minify error reporting
254
+ * Improved varnish purging capability
255
+ * Improved memory caching logic and purging speed
256
+ * Improved support for auto minify in more hosting environments
257
+ * Improved support for use of sockets in memcached
258
+ * Improved handling of old settings upon update
259
+ * Improved detection of document root on additional hosting providers
260
+ * Improved handling of eTags
261
+ * Improved browser cache policy options
262
+ * Improved bug submission form implementation
263
+ * Improved NetDNA / MaxCDN support by using their new API
264
+ * Disabled minify if CloudFlare is active
265
+ * Removed PHP 4 support
266
+ * Removed cookie used for user agent groups unless the feature is used
267
+ * Removed cookie used for referrer unless the feature is used
268
+ * Removed duplicate inclusion of JSON library
269
+
270
+ = 0.9.2.5 =
271
+ * Fixed security issue that can occur if using database caching to disk. If using database caching to disk with a web server with directory listing or web accessible wp-content/w3tc/dbcache/* directories. This patch works for all hosting environments / types where PHP is properly configured, i.e. .htaccess modifications (or other web server configuration changes) are *not* necessary to ensure proper security. Empty the database cache after performing the update if you use database caching to disk.
272
+
273
+ = 0.9.2.4 =
274
+ * Added support for Microsoft SQL Server
275
+ * Added API support for MediaTemple ProCDN (EdgeCast)
276
+ * Added set_time_limit to self test
277
+ * Fixed LiteSpeed web server support issues
278
+ * Fixed native hostname 301 redirect
279
+ * Fixed redundant object origin push export
280
+ * Fixed WSOD (white screen of death) caused by minify in some hosting configurations
281
+ * Fixed text encoding in feeds
282
+ * Fixed incorrect mime-type in feeds (which caused feedburner anomalies)
283
+ * Fixed array to string notices
284
+ * Fixed expires header support for AWS
285
+ * Fixed minification of font-family
286
+ * Fixed object cache write issue in WP Admin
287
+ * Improved (reduced) memory utilization by up to 70%
288
+ * Improved disk enhanced page caching performance
289
+ * Improved object caching performance
290
+ * Improved activation reliability
291
+ * Improved reliability of minify auto mode
292
+ * Improved security (added nonces, no directory indexing, prevent direct file access)
293
+ * Improved compatibility with network based file systems
294
+
295
+ = 0.9.2.3 =
296
+ * Added additional CloudFlare IP ranges
297
+ * Fixed html tidy encoding
298
+ * Fixed NetDNA / MaxCDN purging
299
+ * Improved handling of markers in .htaccess files - easier upgrades
300
+ * Improved cache busting logic
301
+ * Improved numerous notifications and user interface behaviors
302
+ * Improved AWS S3 and Cloudfront reliability
303
+ * Improved reliability of minify auto mode
304
+
305
+ = 0.9.2.2 =
306
+ * Fixed minify directives, e.g.: "File param is missing," causing minify caching to fail
307
+ * Fixed document root detection for IIS server
308
+ * Fixed HTTP compression when using CloudFlare
309
+ * Fixed HTML validation with JavaScript embed tags
310
+ * Fixed fancy permalinks, sites with or without trailing slashes can now cache pages using disk enhanced
311
+ * Fixed appending WP_CACHE define into wp-config.php for some users
312
+ * Fixed path to JSON.php
313
+ * Fixed listing of buckets error with AWS S3
314
+ * Improved compatibility with WordPress SEO by Yoast, 404 error exception list sitemap value changed to: sitemap(_index|[0-9]+)?\.xml(\.gz)?
315
+
316
+ = 0.9.2.1 =
317
+ * Fixed existing installation upgrades: set minify to manual mode by default
318
+ * Fixed unsuccessful transfer queue button
319
+ * Fixed background in lightbox
320
+ * Fixed handling of local http requests being blocked on some hosts
321
+ * Disabled CDN for minify files when auto mode is selected and the CDN method is origin push
322
+
323
+ = 0.9.2 =
324
+ * Added support for nginx web server
325
+ * Added support for CloudFlare
326
+ * Added origin pull support for Amazon Cloudfront
327
+ * Added Microsoft Azure Storage support for CDN
328
+ * Added WinCache opcode cache support
329
+ * Added additional minifier engines for HTML, CSS and JS including: HTMLtidy, CSStidy, Closure Compiler, YUI Compressor
330
+ * Added Google Page Speed integration
331
+ * Added support for @import processing
332
+ * Added controls for page cache purging policy
333
+ * Added auto mode for minify (not compatible with CDN)
334
+ * Added support for set cookie domain setting
335
+ * Added reliability improvements for Amazon Web Services
336
+ * Added referrer group management for uniquely caching these cases
337
+ * Added Amazon S3 bucket location selection control
338
+ * Added support CNAMEs confguration support for Amazon Cloudfront
339
+ * Added purge tool
340
+ * Added support of custom wp-config.php location
341
+ * Added cache busting support
342
+ * Improved object caching performance when no plugins are active
343
+ * Improved non-blocking JS embedding implementation
344
+ * Improved reliability of CDN export operations
345
+ * Improved implementation of headers for all cache engines
346
+ * Improved minify help (recommendations) tool
347
+ * Improved handling of .htaccess directive changes
348
+ * Improved support of IIS web server
349
+ * Improved varnish support
350
+ * Fixed bugs with API changes with Rackspace Cloudfiles
351
+ * Fixed bugs with origin push content delivery network methods
352
+ * Fixed HTML encoding
353
+ * Fixed emptying cache for various cache keys
354
+ * Fixed rejected CDN file support
355
+ * Fixed HTTPS mode in WP Admin
356
+ * Fixed relative document root for disk enhanced page cache
357
+ * Fixed trailing slash for disk enhanced page cache
358
+ * Fixed minify template group settings being lost upon upgrade
359
+ * Fixed division by zero error
360
+ * Fixed object cache clones
361
+ * Moved browser cache rules to site root instead of document root
362
+
363
+ = 0.9.1.3 =
364
+ * Improved error messages with AWS S3 CDN
365
+ * Added SSL support for CDN
366
+ * Added control for CDN queue upload interval
367
+ * Added option for 404 file exceptions list in browser cache
368
+ * Added exception for NextGen Gallery flash image rotator to CDN settings
369
+ * Fixed external file imports
370
+ * Fixed document root detection for CDN
371
+ * Fixed minify file search
372
+ * Fixed bugs with AWS CloudFront distribution creation and saving
373
+ * Fixed Rackspace Cloud Files API
374
+
375
+ = 0.9.1.2 =
376
+ * Improved media library import compatibility
377
+ * Improved various notifications
378
+ * Changed expires implementation to last accessed instead of last modified
379
+ * Resolved Apache 1.3 compatibility issue
380
+ * Fixed issues with document root detection on some servers
381
+ * Fixed an issue with minification of script tags with HTML comments inside
382
+ * Fixed minify gzip compression
383
+ * Fixed cache-control headers
384
+ * Fixed empty fatal error notification on network activation
385
+ * Fixed minify when https is active
386
+ * Fixed fatal error upon activation when uploads path does not exist
387
+
388
+ = 0.9.1.1 =
389
+ * Added an additional notification to help users identify incomplete installations upon activation
390
+ * Reverted previous Cloud Files workaround
391
+ * Fixed preview mode buttons
392
+ * Fixed duplicate entries appearing when using minify help tool more than once
393
+ * Fixed browser cache rules generation for media files
394
+
395
+ = 0.9.1 =
396
+ * Improved Rackspace Cloud Files implementation
397
+ * Improved frequently asked questions implementation to support incomplete PHP distributions
398
+ * Fixed 500 Internal Server Error when upgrading with Disk enhanced mode enabled
399
+ * Fixed notification issues with preview mode
400
+ * Fixed an issue with fatal errors with minify and memcache(d) caching engine
401
+
402
+ = 0.9 =
403
+ * Added preview feature so all cache settings can be reviewed prior to deployment
404
+ * Added minify configuration wizard (help button on minify tab)
405
+ * Added "never cache the following pages" to database and object cache
406
+ * Added minify option to JavaScript embed after &lt;body&gt;
407
+ * Added minify error notifications
408
+ * Added drag and drop dependency resolution for minify CSS / JavaScript groups
409
+ * Added object caching
410
+ * Added option to automatically page cache prime (preload) with or without XML sitemap
411
+ * Added support for multiple CNAMEs to CDN
412
+ * Added support for minifcation of any respective theme installed a single site
413
+ * Added support for page caching of multiple themes for various user agent groups
414
+ * Added support for theme switching / redirection based on groups of user agents
415
+ * Added compatibility with WP Super Cache fragment caching method (disk basic mode only)
416
+ * Added HTTP compression and headers for AWS S3
417
+ * Added ignored comment stems field, with Google AdSense default value to HTML minify
418
+ * Added support for varnish purging
419
+ * Added Rackspace Cloud Files support
420
+ * Added native NetDNA / MaxCDN integration
421
+ * Added option to cache 404 pages
422
+ * Added changed files auto-upload to CDN
423
+ * Added option to handle 404 errors for static objects directly with the web server
424
+ * Added support for gravity forms to database cache default settings
425
+ * Added changed file auto-upload to CDN
426
+ * Database connection errors now return internal server (500) error response and are thus not cached
427
+ * Incomplete plugin installation / removal no longer generates public errors
428
+ * Unterminated string errors no longer display publicly
429
+ * Support tab improvements
430
+ * Install tab improvements
431
+ * Resolved conflicts with disk enhanced .htaccess directives insertion
432
+ * Improved compatibility with all mobile plugins
433
+ * Improved AWS reliability
434
+ * Improved browser caching support and management
435
+ * Improved directory management for disk caching methods for increased performance
436
+ * Improved handling of missing minify files
437
+ * Improved Media Library import
438
+ * Improved Multi Site support
439
+ * Improved SSL interoperability
440
+
441
+ = 0.8.5.2 =
442
+ * Added support for Bad Behavior plugin
443
+ * Added support for eAccelerator 0.9.5.3 and XCache opcode caches
444
+ * Added support for rewriting href attribute of anchors for images that use the CDN
445
+ * Added deflate http compression support to minify
446
+ * Added setting of file modification time after FTP upload
447
+ * Added check of file modification time and file size before FTP upload
448
+ * Added check of file hash before uploading to Amazon S3
449
+ * Added option to force replacement of uploaded attachments on CDN
450
+ * Added option to toggle feed minification
451
+ * Added combine only option for CSS minification to overcome invalid CSS files
452
+ * Added configuration file import / export
453
+ * Database caching now disabled by default to improve compatibility with some shared hosting environments
454
+ * Default page caching method now disk enhanced
455
+ * Improved HTTP Compression inter-operability
456
+ * Improved compatibility with Multi Site Manager
457
+ * Improved apache compatibility
458
+ * Improved .htaccess directives
459
+ * Improved header management for posts / pages
460
+ * Improved notifications
461
+ * Improved minify handling of external files
462
+ * Improved minify memory limit to avoid blank pages when document size is large
463
+ * Improved minify reliability by reducing comment removal options
464
+ * Improved Media Library Import versatility
465
+ * Improved reliability of plugin activation in WordPress MU
466
+ * Improved security handling for some operations
467
+ * Improved reliability of handling file names containing spaces in CDN functionality
468
+ * Improved non-blocking embedding reliability
469
+ * Improved memcached detection by supporting only PECL memcache
470
+ * Fixed disk enhanced method of page cache in WordPress MU
471
+ * Fixed false match of page cache files in disk enhanced method of page cache
472
+ * Fixed cron anomalies caused by caching of wp_options table
473
+ * Fixed missing trailing slash issue when using disk enhanced page caching
474
+ * Fixed auto-embed bug CSS and JS when already manually embedded
475
+
476
+ = 0.8.5.1 =
477
+ * Added option to CDN Settings to skip specified directories
478
+ * Added option to allow for full control of HTTP compression options for page cache (some WordPress installations have issues with deflate)
479
+ * Added sql_calc_found_rows to default auto reject SQL list
480
+ * Added more notification cases identified and configured
481
+ * Added new mobile user agents for Japanese market
482
+ * Page cache performance improvements for disk enhanced mode
483
+ * Improved FAQ and option descriptions
484
+ * Improved apache directives for minify headers
485
+ * Improved handling of redirects
486
+ * Improved name space to avoid issues with other plugins
487
+ * Improved handling of incomplete installations, caching runs with default options if custom settings file does not exist
488
+ * Fixed anomalies with memcached-client.php in some environments
489
+ * Fixed another interface bug with management of minify files
490
+ * Fixed minor bug with table column length for some MySQL versions
491
+ * Fixed minify bug with CRLF
492
+ * Fixed minify bug with handling of zlib compression enabled
493
+ * Fixed handling of pages with CDN Media Library import
494
+
495
+ = 0.8.5 =
496
+ * Added "enhanced" disk caching mode for page cache, a 160% performance improvement over basic mode
497
+ * Added disk caching as an option for Database Cache
498
+ * Added CDN support for Amazon S3 and CloudFront
499
+ * Added mobile user agent rejection and redirect fields to page cache for handling mobile user agents
500
+ * Added Submit Bug Report tab
501
+ * Added support for detection of custom templates for minify groups
502
+ * Added separate controls expiration time field for minify and page cache settings
503
+ * Added PHP4 Support Notification to handle fatal errors on activation
504
+ * Improved database caching by 45%
505
+ * Improved handling of cache-control HTML headers
506
+ * Improved handing of 3rd Party CSS file minification
507
+ * Improved media library import reliability
508
+ * Improved handling of `DOCUMENT_ROOT` on some servers
509
+ * Improved garbage collection routine
510
+ * Improved handling of `<pre>` and `<textarea>` minification
511
+ * Improved handling of regular expressions in custom file list in CDN settings
512
+ * Improved handling of media library attachments in RSS feeds
513
+ * Improved handing of subdomains for CDN settings
514
+ * Improved various notifications and error messages
515
+ * Improved optional .htaccess directives
516
+ * Fixed JS minifcation saving group settings
517
+ * Fixed false positives for duplicate CSS or JS in minify settings
518
+ * Fixed bug causing settings to be lost on upgrade
519
+ * Fixed attachment URI when CDN mode enabled
520
+ * Fixed small bug with FTP upload when CDN Method is Mirror (Origin Pull)
521
+ * Fixed the URI for wlwmanfiest.xml when CDN enabled
522
+ * Fixed handling of HTTPS objects according to options
523
+ * Fixed emptying disk cache under various obscure permutations
524
+ * Fixed handling of obscure open_basedir restrictions
525
+ * Fixed various bugs with emptying cache under various obscure permutations
526
+ * Fixed installations deeper than document root
527
+
528
+ = 0.8 =
529
+ * Added disk as method for page caching
530
+ * Added support for mirror (origin pull) content delivery networks
531
+ * Added options to specify minify group policies per template
532
+ * Added options for toggling inline CSS and JS minification to improve minify reliability
533
+ * Added option to update Media Library attachment hostnames (when migrating domains etc)
534
+ * Added "Empty Cache" buttons to respective tabs
535
+ * Added additional file download fallback methods for minify
536
+ * Improved cookie handling
537
+ * Improved header handling
538
+ * Improved reliability of Media Library import
539
+ * "Don't cache pages for logged in users" is now the default page cache setting
540
+ * Fixed minify bug with RSS feeds
541
+ * Fixed minify bug with rewriting of url() URI in CSS
542
+ * Addressed more page cache invalidity cases
543
+ * Addressed rare occurrence of PHP fatal errors when saving post or comments
544
+ * Addressed CSS bug on wp-login.php
545
+ * Addressed rare MySQL error when uploading attachments to Media Library
546
+ * Modified plugin file/directory structure
547
+ * Confirmed compatibility with varnish and squid
548
+
549
+ = 0.7.5.2 =
550
+ * Added warning dialog to minify tab about removal of query strings locally hosted object URIs
551
+ * Added empty (memcached) cache button to each tab
552
+ * Improved reliability of memcache flush
553
+ * Minified files now (optionally) upload automatically according to update interval (expiry time)
554
+ * Changed directory of minify working files to wp-content/w3tc-cache/
555
+ * Fixed parsing memcached server strings
556
+ * Fixed minify sometimes not creating files as it should
557
+ * Addressed WordPress network activation/deactivation issues
558
+ * Provided memcache.ini directives updated to improve network throughput
559
+
560
+ = 0.7.5.1 =
561
+ * Added memcached test button for convenience
562
+ * Added option to concatenate any script to header or footer with non-blocking options for scripts that cannot be minified (e.g. obfuscated scripts)
563
+ * Added options to concatenate JS files only in header or footer (for use with obfuscated scripts)
564
+ * Improved notification handling
565
+ * Improved compatibility with suPHP
566
+ * Improved reliability of Media Library Export
567
+ * Fixed database cache that caused comment counts to become out of date
568
+ * Fixed minor issue with URI with CDN functionality enabled
569
+ * Removed unnecessary minify options
570
+ * Minification error dialogs now disabled when JS or CSS minify settings disabled
571
+ * Normalized line endings with /n as per minify author's direction
572
+ * Resolved bug in the minify library preventing proper permission notification messages
573
+
574
+ = 0.7.5 =
575
+ * Added handling for magic_quotes set to on
576
+ * Fixed issue with auto-download/upgrade and additional error checking
577
+ * Fixed bug preventing minify working properly if either CSS or JS minification was disabled
578
+ * Improved handling of inline comments and JavaScript in HTML documents
579
+ * Improved handing of @import CSS embedding
580
+ * Addressed privilege control issue
581
+ * Resolved warnings thrown in various versions of WordPress
582
+ * Memcached engine logic modified to better support clustering and multiple memcached instances
583
+ * Eliminated false negatives in a number of gzip / deflate compression analysis tools
584
+ * Total plugin file size reduced
585
+
586
+ = 0.7 =
587
+ * Added minify support for URIs starting with /
588
+ * WordPress network mode support bug fixes
589
+ * Minor CDN uploader fixes
590
+ * Minor error message improvements
591
+
592
+ = 0.6 =
593
+ * Added "Debug Mode" listing all settings and queries with statistics
594
+ * Improved error message notifications
595
+ * Improved cache stability for large objects
596
+ * FAQ and installation instructions corrections/adjustments
597
+ * Support for multiple wordpress installations added
598
+ * Resolved bug in minification of feeds
599
+
600
+ = 0.5 =
601
+ * Initial release
configs/0.9.2.10-ConfigKeys.php ADDED
@@ -0,0 +1,1908 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Descriptors of configuration keys
5
+ * for config
6
+ */
7
+
8
+ $keys = array(
9
+ 'cluster.messagebus.debug' => array(
10
+ 'type' => 'boolean',
11
+ 'default' => false
12
+ ),
13
+ 'cluster.messagebus.enabled' => array(
14
+ 'type' => 'boolean',
15
+ 'default' => false
16
+ ),
17
+ 'cluster.messagebus.sns.region' => array(
18
+ 'type' => 'string',
19
+ 'default' => ''
20
+ ),
21
+ 'cluster.messagebus.sns.api_key' => array(
22
+ 'type' => 'string',
23
+ 'default' => ''
24
+ ),
25
+ 'cluster.messagebus.sns.api_secret' => array(
26
+ 'type' => 'string',
27
+ 'default' => ''
28
+ ),
29
+ 'cluster.messagebus.sns.topic_arn' => array(
30
+ 'type' => 'string',
31
+ 'default' => ''
32
+ ),
33
+
34
+ 'dbcache.debug' => array(
35
+ 'type' => 'boolean',
36
+ 'default' => false
37
+ ),
38
+ 'dbcache.enabled' => array(
39
+ 'type' => 'boolean',
40
+ 'default' => false
41
+ ),
42
+ 'dbcache.engine' => array(
43
+ 'type' => 'string',
44
+ 'default' => 'file'
45
+ ),
46
+ 'dbcache.file.gc' => array(
47
+ 'type' => 'integer',
48
+ 'default' => 3600
49
+ ),
50
+ 'dbcache.file.locking' => array(
51
+ 'type' => 'boolean',
52
+ 'default' => false
53
+ ),
54
+ 'dbcache.lifetime' => array(
55
+ 'type' => 'integer',
56
+ 'default' => 180
57
+ ),
58
+ 'dbcache.memcached.persistant' => array(
59
+ 'type' => 'boolean',
60
+ 'default' => true
61
+ ),
62
+ 'dbcache.memcached.servers' => array(
63
+ 'type' => 'array',
64
+ 'default' => array(
65
+ '127.0.0.1:11211'
66
+ )
67
+ ),
68
+ 'dbcache.reject.cookie' => array(
69
+ 'type' => 'array',
70
+ 'default' => array()
71
+ ),
72
+ 'dbcache.reject.logged' => array(
73
+ 'type' => 'boolean',
74
+ 'default' => true
75
+ ),
76
+ 'dbcache.reject.sql' => array(
77
+ 'type' => 'array',
78
+ 'default' => array(
79
+ 'gdsr_',
80
+ 'wp_rg_'
81
+ )
82
+ ),
83
+ 'dbcache.reject.uri' => array(
84
+ 'type' => 'array',
85
+ 'default' => array()
86
+ ),
87
+ 'dbcache.reject.words' => array(
88
+ 'type' => 'array',
89
+ 'default' => array(
90
+ '^\s*insert\b',
91
+ '^\s*delete\b',
92
+ '^\s*update\b',
93
+ '^\s*replace\b',
94
+ '^\s*create\b',
95
+ '^\s*alter\b',
96
+ '^\s*show\b',
97
+ '^\s*set\b',
98
+ '\bautoload\s+=\s+\'yes\'',
99
+ '\bsql_calc_found_rows\b',
100
+ '\bfound_rows\(\)',
101
+ '\bw3tc_request_data\b'
102
+ )
103
+ ),
104
+
105
+ 'objectcache.enabled' => array(
106
+ 'type' => 'boolean',
107
+ 'default' => false
108
+ ),
109
+ 'objectcache.debug' => array(
110
+ 'type' => 'boolean',
111
+ 'default' => false
112
+ ),
113
+ 'objectcache.engine' => array(
114
+ 'type' => 'string',
115
+ 'default' => 'file'
116
+ ),
117
+ 'objectcache.file.gc' => array(
118
+ 'type' => 'integer',
119
+ 'default' => 3600
120
+ ),
121
+ 'objectcache.file.locking' => array(
122
+ 'type' => 'boolean',
123
+ 'default' => false
124
+ ),
125
+ 'objectcache.memcached.servers' => array(
126
+ 'type' => 'array',
127
+ 'default' => array(
128
+ '127.0.0.1:11211'
129
+ )
130
+ ),
131
+ 'objectcache.memcached.persistant' => array(
132
+ 'type' => 'boolean',
133
+ 'default' => true
134
+ ),
135
+ 'objectcache.groups.global' => array(
136
+ 'type' => 'array',
137
+ 'default' => array(
138
+ 'users',
139
+ 'userlogins',
140
+ 'usermeta',
141
+ 'user_meta',
142
+ 'site-transient',
143
+ 'site-options',
144
+ 'site-lookup',
145
+ 'blog-lookup',
146
+ 'blog-details',
147
+ 'rss',
148
+ 'global-posts'
149
+ )
150
+ ),
151
+ 'objectcache.groups.nonpersistent' => array(
152
+ 'type' => 'array',
153
+ 'default' => array(
154
+ 'comment',
155
+ 'counts',
156
+ 'plugins'
157
+ )
158
+ ),
159
+ 'objectcache.lifetime' => array(
160
+ 'type' => 'integer',
161
+ 'default' => 180
162
+ ),
163
+ 'objectcache.purge.all' => array(
164
+ 'type' => 'boolean',
165
+ 'default' => false
166
+ ),
167
+
168
+ 'fragmentcache.enabled' => array(
169
+ 'type' => 'boolean',
170
+ 'default' => false
171
+ ),
172
+ 'fragmentcache.debug' => array(
173
+ 'type' => 'boolean',
174
+ 'default' => false
175
+ ),
176
+ 'fragmentcache.engine' => array(
177
+ 'type' => 'string',
178
+ 'default' => 'file'
179
+ ),
180
+ 'fragmentcache.file.gc' => array(
181
+ 'type' => 'integer',
182
+ 'default' => 3600
183
+ ),
184
+ 'fragmentcache.file.locking' => array(
185
+ 'type' => 'boolean',
186
+ 'default' => false
187
+ ),
188
+ 'fragmentcache.memcached.servers' => array(
189
+ 'type' => 'array',
190
+ 'default' => array(
191
+ '127.0.0.1:11211'
192
+ )
193
+ ),
194
+ 'fragmentcache.memcached.persistant' => array(
195
+ 'type' => 'boolean',
196
+ 'default' => true
197
+ ),
198
+ 'fragmentcache.lifetime' => array(
199
+ 'type' => 'integer',
200
+ 'default' => 180
201
+ ),
202
+ 'fragmentcache.groups' => array(
203
+ 'type' => 'array',
204
+ 'default' => array()
205
+ ),
206
+
207
+ 'pgcache.enabled' => array(
208
+ 'type' => 'boolean',
209
+ 'default' => false
210
+ ),
211
+ 'pgcache.comment_cookie_ttl' => array(
212
+ 'type' => 'integer',
213
+ 'default' => 1800
214
+ ),
215
+ 'pgcache.debug' => array(
216
+ 'type' => 'boolean',
217
+ 'default' => false
218
+ ),
219
+ 'pgcache.engine' => array(
220
+ 'type' => 'string',
221
+ 'default' => 'file_generic'
222
+ ),
223
+ 'pgcache.file.gc' => array(
224
+ 'type' => 'integer',
225
+ 'default' => 3600
226
+ ),
227
+ 'pgcache.file.nfs' => array(
228
+ 'type' => 'boolean',
229
+ 'default' => false
230
+ ),
231
+ 'pgcache.file.locking' => array(
232
+ 'type' => 'boolean',
233
+ 'default' => false
234
+ ),
235
+ 'pgcache.lifetime' => array(
236
+ 'type' => 'integer',
237
+ 'default' => 3600
238
+ ),
239
+ 'pgcache.memcached.servers' => array(
240
+ 'type' => 'array',
241
+ 'default' => array(
242
+ '127.0.0.1:11211'
243
+ )
244
+ ),
245
+ 'pgcache.memcached.persistant' => array(
246
+ 'type' => 'boolean',
247
+ 'default' => true
248
+ ),
249
+ 'pgcache.check.domain' => array(
250
+ 'type' => 'boolean',
251
+ 'default' => false
252
+ ),
253
+ 'pgcache.cache.query' => array(
254
+ 'type' => 'boolean',
255
+ 'default' => true
256
+ ),
257
+ 'pgcache.cache.home' => array(
258
+ 'type' => 'boolean',
259
+ 'default' => true
260
+ ),
261
+ 'pgcache.cache.feed' => array(
262
+ 'type' => 'boolean',
263
+ 'default' => false
264
+ ),
265
+ 'pgcache.cache.nginx_handle_xml' => array(
266
+ 'type' => 'boolean',
267
+ 'default' => false
268
+ ),
269
+ 'pgcache.cache.ssl' => array(
270
+ 'type' => 'boolean',
271
+ 'default' => false
272
+ ),
273
+ 'pgcache.cache.404' => array(
274
+ 'type' => 'boolean',
275
+ 'default' => false
276
+ ),
277
+ 'pgcache.cache.flush' => array(
278
+ 'type' => 'boolean',
279
+ 'default' => false
280
+ ),
281
+ 'pgcache.cache.headers' => array(
282
+ 'type' => 'array',
283
+ 'default' => array(
284
+ 'Last-Modified',
285
+ 'Content-Type',
286
+ 'X-Pingback',
287
+ 'P3P'
288
+ )
289
+ ),
290
+ 'pgcache.compatibility' => array(
291
+ 'type' => 'boolean',
292
+ 'default' => false
293
+ ),
294
+ 'pgcache.remove_charset' => array(
295
+ 'type' => 'boolean',
296
+ 'default' => false
297
+ ),
298
+ 'pgcache.accept.uri' => array(
299
+ 'type' => 'array',
300
+ 'default' => array(
301
+ 'sitemap(_index)?\.xml(\.gz)?',
302
+ '[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?'
303
+ )
304
+ ),
305
+ 'pgcache.accept.files' => array(
306
+ 'type' => 'array',
307
+ 'default' => array(
308
+ 'wp-comments-popup.php',
309
+ 'wp-links-opml.php',
310
+ 'wp-locations.php'
311
+ )
312
+ ),
313
+ 'pgcache.accept.qs' => array(
314
+ 'type' => 'array',
315
+ 'default' => array()
316
+ ),
317
+ 'pgcache.reject.front_page' => array(
318
+ 'type' => 'boolean',
319
+ 'default' => false
320
+ ),
321
+ 'pgcache.reject.logged' => array(
322
+ 'type' => 'boolean',
323
+ 'default' => true
324
+ ),
325
+ 'pgcache.reject.logged_roles' => array(
326
+ 'type' => 'boolean',
327
+ 'default' => false
328
+ ),
329
+ 'pgcache.reject.roles' => array(
330
+ 'type' => 'array',
331
+ 'default' => array()
332
+ ),
333
+ 'pgcache.reject.uri' => array(
334
+ 'type' => 'array',
335
+ 'default' => array(
336
+ 'wp-.*\.php',
337
+ 'index\.php'
338
+ )
339
+ ),
340
+ 'pgcache.reject.ua' => array(
341
+ 'type' => 'array',
342
+ 'default' => array()
343
+ ),
344
+ 'pgcache.reject.cookie' => array(
345
+ 'type' => 'array',
346
+ 'default' => array('wptouch_switch_toggle')
347
+ ),
348
+ 'pgcache.reject.request_head' => array(
349
+ 'type' => 'boolean',
350
+ 'default' => false
351
+ ),
352
+ 'pgcache.purge.front_page' => array(
353
+ 'type' => 'boolean',
354
+ 'default' => false
355
+ ),
356
+ 'pgcache.purge.home' => array(
357
+ 'type' => 'boolean',
358
+ 'default' => true
359
+ ),
360
+ 'pgcache.purge.post' => array(
361
+ 'type' => 'boolean',
362
+ 'default' => true
363
+ ),
364
+ 'pgcache.purge.comments' => array(
365
+ 'type' => 'boolean',
366
+ 'default' => false
367
+ ),
368
+ 'pgcache.purge.author' => array(
369
+ 'type' => 'boolean',
370
+ 'default' => false
371
+ ),
372
+ 'pgcache.purge.terms' => array(
373
+ 'type' => 'boolean',
374
+ 'default' => false
375
+ ),
376
+ 'pgcache.purge.archive.daily' => array(
377
+ 'type' => 'boolean',
378
+ 'default' => false
379
+ ),
380
+ 'pgcache.purge.archive.monthly' => array(
381
+ 'type' => 'boolean',
382
+ 'default' => false
383
+ ),
384
+ 'pgcache.purge.archive.yearly' => array(
385
+ 'type' => 'boolean',
386
+ 'default' => false
387
+ ),
388
+ 'pgcache.purge.feed.blog' => array(
389
+ 'type' => 'boolean',
390
+ 'default' => true
391
+ ),
392
+ 'pgcache.purge.feed.comments' => array(
393
+ 'type' => 'boolean',
394
+ 'default' => false
395
+ ),
396
+ 'pgcache.purge.feed.author' => array(
397
+ 'type' => 'boolean',
398
+ 'default' => false
399
+ ),
400
+ 'pgcache.purge.feed.terms' => array(
401
+ 'type' => 'boolean',
402
+ 'default' => false
403
+ ),
404
+ 'pgcache.purge.feed.types' => array(
405
+ 'type' => 'array',
406
+ 'default' => array(
407
+ 'rss2'
408
+ )
409
+ ),
410
+ 'pgcache.purge.postpages_limit' => array(
411
+ 'type' => 'integer',
412
+ 'default' => 10
413
+ ),
414
+ 'pgcache.purge.pages' => array(
415
+ 'type' => 'array',
416
+ 'default' => array()
417
+ ),
418
+ 'pgcache.purge.sitemap_regex' => array(
419
+ 'type' => 'string',
420
+ 'default' => '([a-z0-9_\-]*?)sitemap([a-z0-9_\-]*)?\.xml'
421
+ ),
422
+ 'pgcache.prime.enabled' => array(
423
+ 'type' => 'boolean',
424
+ 'default' => false
425
+ ),
426
+ 'pgcache.prime.interval' => array(
427
+ 'type' => 'integer',
428
+ 'default' => 900
429
+ ),
430
+ 'pgcache.prime.limit' => array(
431
+ 'type' => 'integer',
432
+ 'default' => 10
433
+ ),
434
+ 'pgcache.prime.sitemap' => array(
435
+ 'type' => 'string',
436
+ 'default' => ''
437
+ ),
438
+ 'pgcache.prime.post.enabled' => array(
439
+ 'type' => 'boolean',
440
+ 'default' => false
441
+ ),
442
+
443
+ 'minify.enabled' => array(
444
+ 'type' => 'boolean',
445
+ 'default' => false
446
+ ),
447
+ 'minify.auto' => array(
448
+ 'type' => 'boolean',
449
+ 'default' => true
450
+ ),
451
+ 'minify.debug' => array(
452
+ 'type' => 'boolean',
453
+ 'default' => false
454
+ ),
455
+ 'minify.engine' => array(
456
+ 'type' => 'string',
457
+ 'default' => 'file'
458
+ ),
459
+ 'minify.file.gc' => array(
460
+ 'type' => 'integer',
461
+ 'default' => 86400
462
+ ),
463
+ 'minify.file.nfs' => array(
464
+ 'type' => 'boolean',
465
+ 'default' => false
466
+ ),
467
+ 'minify.file.locking' => array(
468
+ 'type' => 'boolean',
469
+ 'default' => false
470
+ ),
471
+ 'minify.memcached.servers' => array(
472
+ 'type' => 'array',
473
+ 'default' => array(
474
+ '127.0.0.1:11211'
475
+ )
476
+ ),
477
+ 'minify.memcached.persistant' => array(
478
+ 'type' => 'boolean',
479
+ 'default' => true
480
+ ),
481
+ 'minify.rewrite' => array(
482
+ 'type' => 'boolean',
483
+ 'default' => true
484
+ ),
485
+ 'minify.options' => array(
486
+ 'type' => 'array',
487
+ 'default' => array()
488
+ ),
489
+ 'minify.symlinks' => array(
490
+ 'type' => 'array',
491
+ 'default' => array()
492
+ ),
493
+ 'minify.lifetime' => array(
494
+ 'type' => 'integer',
495
+ 'default' => 86400
496
+ ),
497
+ 'minify.upload' => array(
498
+ 'type' => 'boolean',
499
+ 'default' => true
500
+ ),
501
+ 'minify.html.enable' => array(
502
+ 'type' => 'boolean',
503
+ 'default' => false
504
+ ),
505
+ 'minify.html.engine' => array(
506
+ 'type' => 'string',
507
+ 'default' => 'html'
508
+ ),
509
+ 'minify.html.reject.feed' => array(
510
+ 'type' => 'boolean',
511
+ 'default' => false
512
+ ),
513
+ 'minify.html.inline.css' => array(
514
+ 'type' => 'boolean',
515
+ 'default' => false
516
+ ),
517
+ 'minify.html.inline.js' => array(
518
+ 'type' => 'boolean',
519
+ 'default' => false
520
+ ),
521
+ 'minify.html.strip.crlf' => array(
522
+ 'type' => 'boolean',
523
+ 'default' => false
524
+ ),
525
+ 'minify.html.comments.ignore' => array(
526
+ 'type' => 'array',
527
+ 'default' => array(
528
+ 'google_ad_',
529
+ 'RSPEAK_'
530
+ )
531
+ ),
532
+ 'minify.css.enable' => array(
533
+ 'type' => 'boolean',
534
+ 'default' => true
535
+ ),
536
+ 'minify.css.engine' => array(
537
+ 'type' => 'string',
538
+ 'default' => 'css'
539
+ ),
540
+ 'minify.css.combine' => array(
541
+ 'type' => 'boolean',
542
+ 'default' => false
543
+ ),
544
+ 'minify.css.strip.comments' => array(
545
+ 'type' => 'boolean',
546
+ 'default' => false
547
+ ),
548
+ 'minify.css.strip.crlf' => array(
549
+ 'type' => 'boolean',
550
+ 'default' => false
551
+ ),
552
+ 'minify.css.imports' => array(
553
+ 'type' => 'string',
554
+ 'default' => ''
555
+ ),
556
+ 'minify.css.groups' => array(
557
+ 'type' => 'array',
558
+ 'default' => array()
559
+ ),
560
+ 'minify.js.enable' => array(
561
+ 'type' => 'boolean',
562
+ 'default' => true
563
+ ),
564
+ 'minify.js.engine' => array(
565
+ 'type' => 'string',
566
+ 'default' => 'js'
567
+ ),
568
+ 'minify.js.combine.header' => array(
569
+ 'type' => 'boolean',
570
+ 'default' => false
571
+ ),
572
+ 'minify.js.header.embed_type' => array(
573
+ 'type' => 'string',
574
+ 'default' => 'blocking'
575
+ ),
576
+ 'minify.js.combine.body' => array(
577
+ 'type' => 'boolean',
578
+ 'default' => false
579
+ ),
580
+ 'minify.js.body.embed_type' => array(
581
+ 'type' => 'string',
582
+ 'default' => 'blocking'
583
+ ),
584
+ 'minify.js.combine.footer' => array(
585
+ 'type' => 'boolean',
586
+ 'default' => false
587
+ ),
588
+ 'minify.js.footer.embed_type' => array(
589
+ 'type' => 'string',
590
+ 'default' => 'blocking'
591
+ ),
592
+ 'minify.js.strip.comments' => array(
593
+ 'type' => 'boolean',
594
+ 'default' => false
595
+ ),
596
+ 'minify.js.strip.crlf' => array(
597
+ 'type' => 'boolean',
598
+ 'default' => false
599
+ ),
600
+ 'minify.js.groups' => array(
601
+ 'type' => 'array',
602
+ 'default' => array()
603
+ ),
604
+ 'minify.yuijs.path.java' => array(
605
+ 'type' => 'string',
606
+ 'default' => 'java'
607
+ ),
608
+ 'minify.yuijs.path.jar' => array(
609
+ 'type' => 'string',
610
+ 'default' => 'yuicompressor.jar'
611
+ ),
612
+ 'minify.yuijs.options.line-break' => array(
613
+ 'type' => 'integer',
614
+ 'default' => 5000
615
+ ),
616
+ 'minify.yuijs.options.nomunge' => array(
617
+ 'type' => 'boolean',
618
+ 'default' => false
619
+ ),
620
+ 'minify.yuijs.options.preserve-semi' => array(
621
+ 'type' => 'boolean',
622
+ 'default' => false
623
+ ),
624
+ 'minify.yuijs.options.disable-optimizations' => array(
625
+ 'type' => 'boolean',
626
+ 'default' => false
627
+ ),
628
+ 'minify.yuicss.path.java' => array(
629
+ 'type' => 'string',
630
+ 'default' => 'java'
631
+ ),
632
+ 'minify.yuicss.path.jar' => array(
633
+ 'type' => 'string',
634
+ 'default' => 'yuicompressor.jar'
635
+ ),
636
+ 'minify.yuicss.options.line-break' => array(
637
+ 'type' => 'integer',
638
+ 'default' => 5000
639
+ ),
640
+ 'minify.ccjs.path.java' => array(
641
+ 'type' => 'string',
642
+ 'default' => 'java'
643
+ ),
644
+ 'minify.ccjs.path.jar' => array(
645
+ 'type' => 'string',
646
+ 'default' => 'compiler.jar'
647
+ ),
648
+ 'minify.ccjs.options.compilation_level' => array(
649
+ 'type' => 'string',
650
+ 'default' => 'SIMPLE_OPTIMIZATIONS'
651
+ ),
652
+ 'minify.ccjs.options.formatting' => array(
653
+ 'type' => 'string',
654
+ 'default' => ''
655
+ ),
656
+ 'minify.csstidy.options.remove_bslash' => array(
657
+ 'type' => 'boolean',
658
+ 'default' => true
659
+ ),
660
+ 'minify.csstidy.options.compress_colors' => array(
661
+ 'type' => 'boolean',
662
+ 'default' => true
663
+ ),
664
+ 'minify.csstidy.options.compress_font-weight' => array(
665
+ 'type' => 'boolean',
666
+ 'default' => true
667
+ ),
668
+ 'minify.csstidy.options.lowercase_s' => array(
669
+ 'type' => 'boolean',
670
+ 'default' => false
671
+ ),
672
+ 'minify.csstidy.options.optimise_shorthands' => array(
673
+ 'type' => 'integer',
674
+ 'default' => 1
675
+ ),
676
+ 'minify.csstidy.options.remove_last_;' => array(
677
+ 'type' => 'boolean',
678
+ 'default' => false
679
+ ),
680
+ 'minify.csstidy.options.case_properties' => array(
681
+ 'type' => 'integer',
682
+ 'default' => 1
683
+ ),
684
+ 'minify.csstidy.options.sort_properties' => array(
685
+ 'type' => 'boolean',
686
+ 'default' => false
687
+ ),
688
+ 'minify.csstidy.options.sort_selectors' => array(
689
+ 'type' => 'boolean',
690
+ 'default' => false
691
+ ),
692
+ 'minify.csstidy.options.merge_selectors' => array(
693
+ 'type' => 'integer',
694
+ 'default' => 2
695
+ ),
696
+ 'minify.csstidy.options.discard_invalid_properties' => array(
697
+ 'type' => 'boolean',
698
+ 'default' => false
699
+ ),
700
+ 'minify.csstidy.options.css_level' => array(
701
+ 'type' => 'string',
702
+ 'default' => 'CSS2.1'
703
+ ),
704
+ 'minify.csstidy.options.preserve_css' => array(
705
+ 'type' => 'boolean',
706
+ 'default' => false
707
+ ),
708
+ 'minify.csstidy.options.timestamp' => array(
709
+ 'type' => 'boolean',
710
+ 'default' => false
711
+ ),
712
+ 'minify.csstidy.options.template' => array(
713
+ 'type' => 'string',
714
+ 'default' => 'default'
715
+ ),
716
+ 'minify.htmltidy.options.clean' => array(
717
+ 'type' => 'boolean',
718
+ 'default' => false
719
+ ),
720
+ 'minify.htmltidy.options.hide-comments' => array(
721
+ 'type' => 'boolean',
722
+ 'default' => true
723
+ ),
724
+ 'minify.htmltidy.options.wrap' => array(
725
+ 'type' => 'integer',
726
+ 'default' => 0
727
+ ),
728
+ 'minify.reject.logged' => array(
729
+ 'type' => 'boolean',
730
+ 'default' => false
731
+ ),
732
+ 'minify.reject.ua' => array(
733
+ 'type' => 'array',
734
+ 'default' => array()
735
+ ),
736
+ 'minify.reject.uri' => array(
737
+ 'type' => 'array',
738
+ 'default' => array()
739
+ ),
740
+ 'minify.reject.files.js' => array(
741
+ 'type' => 'array',
742
+ 'default' => array()
743
+ ),
744
+ 'minify.reject.files.css' => array(
745
+ 'type' => 'array',
746
+ 'default' => array()
747
+ ),
748
+ 'minify.cache.files' => array(
749
+ 'type' => 'array',
750
+ 'default' => array('https://ajax.googleapis.com')
751
+ ),
752
+
753
+ 'cdn.enabled' => array(
754
+ 'type' => 'boolean',
755
+ 'default' => false
756
+ ),
757
+ 'cdn.debug' => array(
758
+ 'type' => 'boolean',
759
+ 'default' => false
760
+ ),
761
+ 'cdn.engine' => array(
762
+ 'type' => 'string',
763
+ 'default' => 'ftp'
764
+ ),
765
+ 'cdn.uploads.enable' => array(
766
+ 'type' => 'boolean',
767
+ 'default' => true
768
+ ),
769
+ 'cdn.includes.enable' => array(
770
+ 'type' => 'boolean',
771
+ 'default' => true
772
+ ),
773
+ 'cdn.includes.files' => array(
774
+ 'type' => 'string',
775
+ 'default' => '*.css;*.js;*.gif;*.png;*.jpg;*.xml'
776
+ ),
777
+ 'cdn.theme.enable' => array(
778
+ 'type' => 'boolean',
779
+ 'default' => true
780
+ ),
781
+ 'cdn.theme.files' => array(
782
+ 'type' => 'string',
783
+ 'default' => '*.css;*.js;*.gif;*.png;*.jpg;*.ico;*.ttf;*.otf,*.woff'
784
+ ),
785
+ 'cdn.minify.enable' => array(
786
+ 'type' => 'boolean',
787
+ 'default' => true
788
+ ),
789
+ 'cdn.custom.enable' => array(
790
+ 'type' => 'boolean',
791
+ 'default' => true
792
+ ),
793
+ 'cdn.custom.files' => array(
794
+ 'type' => 'array',
795
+ 'default' => array(
796
+ 'favicon.ico',
797
+ '{wp_content_dir}/gallery/*',
798
+ '{wp_content_dir}/uploads/avatars/*',
799
+ '{plugins_dir}/wordpress-seo/css/xml-sitemap.xsl',
800
+ '{plugins_dir}/wp-minify/min*',
801
+ '{plugins_dir}/*.js',
802
+ '{plugins_dir}/*.css',
803
+ '{plugins_dir}/*.gif',
804
+ '{plugins_dir}/*.jpg',
805
+ '{plugins_dir}/*.png',
806
+ )
807
+ ),
808
+ 'cdn.import.external' => array(
809
+ 'type' => 'boolean',
810
+ 'default' => false
811
+ ),
812
+ 'cdn.import.files' => array(
813
+ 'type' => 'string',
814
+ 'default' => false
815
+ ),
816
+ 'cdn.queue.interval' => array(
817
+ 'type' => 'integer',
818
+ 'default' => 900
819
+ ),
820
+ 'cdn.queue.limit' => array(
821
+ 'type' => 'integer',
822
+ 'default' => 25
823
+ ),
824
+ 'cdn.force.rewrite' => array(
825
+ 'type' => 'boolean',
826
+ 'default' => false
827
+ ),
828
+ 'cdn.autoupload.enabled' => array(
829
+ 'type' => 'boolean',
830
+ 'default' => false
831
+ ),
832
+ 'cdn.autoupload.interval' => array(
833
+ 'type' => 'integer',
834
+ 'default' => 3600
835
+ ),
836
+ 'cdn.canonical_header' => array(
837
+ 'type' => 'boolean',
838
+ 'default' => false
839
+ ),
840
+ 'cdn.ftp.host' => array(
841
+ 'type' => 'string',
842
+ 'default' => ''
843
+ ),
844
+ 'cdn.ftp.user' => array(
845
+ 'type' => 'string',
846
+ 'default' => ''
847
+ ),
848
+ 'cdn.ftp.pass' => array(
849
+ 'type' => 'string',
850
+ 'default' => ''
851
+ ),
852
+ 'cdn.ftp.path' => array(
853
+ 'type' => 'string',
854
+ 'default' => ''
855
+ ),
856
+ 'cdn.ftp.pasv' => array(
857
+ 'type' => 'boolean',
858
+ 'default' => false
859
+ ),
860
+ 'cdn.ftp.domain' => array(
861
+ 'type' => 'array',
862
+ 'default' => array()
863
+ ),
864
+ 'cdn.ftp.ssl' => array(
865
+ 'type' => 'string',
866
+ 'default' => 'auto'
867
+ ),
868
+ 'cdn.s3.key' => array(
869
+ 'type' => 'string',
870
+ 'default' => ''
871
+ ),
872
+ 'cdn.s3.secret' => array(
873
+ 'type' => 'string',
874
+ 'default' => ''
875
+ ),
876
+ 'cdn.s3.bucket' => array(
877
+ 'type' => 'string',
878
+ 'default' => ''
879
+ ),
880
+ 'cdn.s3.cname' => array(
881
+ 'type' => 'array',
882
+ 'default' => array()
883
+ ),
884
+ 'cdn.s3.ssl' => array(
885
+ 'type' => 'string',
886
+ 'default' => 'auto'
887
+ ),
888
+ 'cdn.cf.key' => array(
889
+ 'type' => 'string',
890
+ 'default' => ''
891
+ ),
892
+ 'cdn.cf.secret' => array(
893
+ 'type' => 'string',
894
+ 'default' => ''
895
+ ),
896
+ 'cdn.cf.bucket' => array(
897
+ 'type' => 'string',
898
+ 'default' => ''
899
+ ),
900
+ 'cdn.cf.id' => array(
901
+ 'type' => 'string',
902
+ 'default' => ''
903
+ ),
904
+ 'cdn.cf.cname' => array(
905
+ 'type' => 'array',
906
+ 'default' => array()
907
+ ),
908
+ 'cdn.cf.ssl' => array(
909
+ 'type' => 'string',
910
+ 'default' => 'auto'
911
+ ),
912
+ 'cdn.cf2.key' => array(
913
+ 'type' => 'string',
914
+ 'default' => ''
915
+ ),
916
+ 'cdn.cf2.secret' => array(
917
+ 'type' => 'string',
918
+ 'default' => ''
919
+ ),
920
+ 'cdn.cf2.id' => array(
921
+ 'type' => 'string',
922
+ 'default' => ''
923
+ ),
924
+ 'cdn.cf2.cname' => array(
925
+ 'type' => 'array',
926
+ 'default' => array()
927
+ ),
928
+ 'cdn.cf2.ssl' => array(
929
+ 'type' => 'string',
930
+ 'default' => ''
931
+ ),
932
+ 'cdn.rscf.user' => array(
933
+ 'type' => 'string',
934
+ 'default' => ''
935
+ ),
936
+ 'cdn.rscf.key' => array(
937
+ 'type' => 'string',
938
+ 'default' => ''
939
+ ),
940
+ 'cdn.rscf.location' => array(
941
+ 'type' => 'string',
942
+ 'default' => 'us'
943
+ ),
944
+ 'cdn.rscf.container' => array(
945
+ 'type' => 'string',
946
+ 'default' => ''
947
+ ),
948
+ 'cdn.rscf.cname' => array(
949
+ 'type' => 'array',
950
+ 'default' => array()
951
+ ),
952
+ 'cdn.rscf.ssl' => array(
953
+ 'type' => 'string',
954
+ 'default' => 'auto'
955
+ ),
956
+ 'cdn.azure.user' => array(
957
+ 'type' => 'string',
958
+ 'default' => ''
959
+ ),
960
+ 'cdn.azure.key' => array(
961
+ 'type' => 'string',
962
+ 'default' => ''
963
+ ),
964
+ 'cdn.azure.container' => array(
965
+ 'type' => 'string',
966
+ 'default' => ''
967
+ ),
968
+ 'cdn.azure.cname' => array(
969
+ 'type' => 'array',
970
+ 'default' => array()
971
+ ),
972
+ 'cdn.azure.ssl' => array(
973
+ 'type' => 'string',
974
+ 'default' => 'auto'
975
+ ),
976
+ 'cdn.mirror.domain' => array(
977
+ 'type' => 'array',
978
+ 'default' => array()
979
+ ),
980
+ 'cdn.mirror.ssl' => array(
981
+ 'type' => 'string',
982
+ 'default' => 'auto'
983
+ ),
984
+ 'cdn.netdna.alias' => array(
985
+ 'type' => 'string',
986
+ 'default' => ''
987
+ ),
988
+ 'cdn.netdna.consumerkey' => array(
989
+ 'type' => 'string',
990
+ 'default' => ''
991
+ ),
992
+ 'cdn.netdna.consumersecret' => array(
993
+ 'type' => 'string',
994
+ 'default' => ''
995
+ ),
996
+ 'cdn.netdna.authorization_key' => array(
997
+ 'type' => 'string',
998
+ 'default' => ''
999
+ ),
1000
+ 'cdn.netdna.domain' => array(
1001
+ 'type' => 'array',
1002
+ 'default' => array()
1003
+ ),
1004
+ 'cdn.netdna.ssl' => array(
1005
+ 'type' => 'string',
1006
+ 'default' => 'auto'
1007
+ ),
1008
+ 'cdn.netdna.zone_id' => array(
1009
+ 'type' => 'integer',
1010
+ 'default' => 0
1011
+ ),
1012
+ 'cdn.maxcdn.authorization_key' => array(
1013
+ 'type' => 'string',
1014
+ 'default' => ''
1015
+ ),
1016
+ 'cdn.maxcdn.domain' => array(
1017
+ 'type' => 'array',
1018
+ 'default' => array()
1019
+ ),
1020
+ 'cdn.maxcdn.ssl' => array(
1021
+ 'type' => 'string',
1022
+ 'default' => 'auto'
1023
+ ),
1024
+ 'cdn.maxcdn.zone_id' => array(
1025
+ 'type' => 'integer',
1026
+ 'default' => 0
1027
+ ),
1028
+ 'cdn.cotendo.username' => array(
1029
+ 'type' => 'string',
1030
+ 'default' => ''
1031
+ ),
1032
+ 'cdn.cotendo.password' => array(
1033
+ 'type' => 'string',
1034
+ 'default' => ''
1035
+ ),
1036
+ 'cdn.cotendo.zones' => array(
1037
+ 'type' => 'array',
1038
+ 'default' => array()
1039
+ ),
1040
+ 'cdn.cotendo.domain' => array(
1041
+ 'type' => 'array',
1042
+ 'default' => array()
1043
+ ),
1044
+ 'cdn.cotendo.ssl' => array(
1045
+ 'type' => 'string',
1046
+ 'default' => 'auto'
1047
+ ),
1048
+ 'cdn.akamai.username' => array(
1049
+ 'type' => 'string',
1050
+ 'default' => ''
1051
+ ),
1052
+ 'cdn.akamai.password' => array(
1053
+ 'type' => 'string',
1054
+ 'default' => ''
1055
+ ),
1056
+ 'cdn.akamai.email_notification' => array(
1057
+ 'type' => 'array',
1058
+ 'default' => array()
1059
+ ),
1060
+ 'cdn.akamai.action' => array(
1061
+ 'type' => 'string',
1062
+ 'default' => 'invalidate'
1063
+ ),
1064
+ 'cdn.akamai.zone' => array(
1065
+ 'type' => 'string',
1066
+ 'default' => 'production'
1067
+ ),
1068
+ 'cdn.akamai.domain' => array(
1069
+ 'type' => 'array',
1070
+ 'default' => array()
1071
+ ),
1072
+ 'cdn.akamai.ssl' => array(
1073
+ 'type' => 'string',
1074
+ 'default' => 'auto'
1075
+ ),
1076
+ 'cdn.edgecast.account' => array(
1077
+ 'type' => 'string',
1078
+ 'default' => ''
1079
+ ),
1080
+ 'cdn.edgecast.token' => array(
1081
+ 'type' => 'string',
1082
+ 'default' => ''
1083
+ ),
1084
+ 'cdn.edgecast.domain' => array(
1085
+ 'type' => 'array',
1086
+ 'default' => array()
1087
+ ),
1088
+ 'cdn.edgecast.ssl' => array(
1089
+ 'type' => 'string',
1090
+ 'default' => 'auto'
1091
+ ),
1092
+ 'cdn.att.account' => array(
1093
+ 'type' => 'string',
1094
+ 'default' => ''
1095
+ ),
1096
+ 'cdn.att.token' => array(
1097
+ 'type' => 'string',
1098
+ 'default' => ''
1099
+ ),
1100
+ 'cdn.att.domain' => array(
1101
+ 'type' => 'array',
1102
+ 'default' => array()
1103
+ ),
1104
+ 'cdn.att.ssl' => array(
1105
+ 'type' => 'string',
1106
+ 'default' => 'auto'
1107
+ ),
1108
+ 'cdn.reject.admins' => array(
1109
+ 'type' => 'boolean',
1110
+ 'default' => false
1111
+ ),
1112
+ 'cdn.reject.logged_roles' => array(
1113
+ 'type' => 'boolean',
1114
+ 'default' => false
1115
+ ),
1116
+ 'cdn.reject.roles' => array(
1117
+ 'type' => 'array',
1118
+ 'default' => array()
1119
+ ),
1120
+ 'cdn.reject.ua' => array(
1121
+ 'type' => 'array',
1122
+ 'default' => array()
1123
+ ),
1124
+ 'cdn.reject.uri' => array(
1125
+ 'type' => 'array',
1126
+ 'default' => array()
1127
+ ),
1128
+ 'cdn.reject.files' => array(
1129
+ 'type' => 'array',
1130
+ 'default' => array(
1131
+ '{uploads_dir}/wpcf7_captcha/*',
1132
+ '{uploads_dir}/imagerotator.swf',
1133
+ '{plugins_dir}/wp-fb-autoconnect/facebook-platform/channel.html'
1134
+ )
1135
+ ),
1136
+ 'cdn.reject.ssl' => array(
1137
+ 'type' => 'boolean',
1138
+ 'default' => false
1139
+ ),
1140
+ 'cdncache.enabled' => array(
1141
+ 'type' => 'boolean',
1142
+ 'default' => false
1143
+ ),
1144
+
1145
+
1146
+ 'cloudflare.enabled' => array(
1147
+ 'type' => 'boolean',
1148
+ 'default' => false
1149
+ ),
1150
+ 'cloudflare.email' => array(
1151
+ 'type' => 'string',
1152
+ 'default' => ''
1153
+ ),
1154
+ 'cloudflare.key' => array(
1155
+ 'type' => 'string',
1156
+ 'default' => ''
1157
+ ),
1158
+ 'cloudflare.zone' => array(
1159
+ 'type' => 'string',
1160
+ 'default' => ''
1161
+ ),
1162
+ 'cloudflare.ips.ip4' => array(
1163
+ 'type' => 'array',
1164
+ 'default' => array("204.93.240.0/24", "204.93.177.0/24", "199.27.128.0/21", "173.245.48.0/20", "103.22.200.0/22", "141.101.64.0/18", "108.162.192.0/18","190.93.240.1/20","188.114.96.0/20", "198.41.128.0/17")
1165
+ ),
1166
+ 'cloudflare.ips.ip6' => array(
1167
+ 'type' => 'array',
1168
+ 'default' => array("2400:cb00::/32", "2606:4700::/32", "2803:f800::/32")
1169
+ ),
1170
+
1171
+ 'varnish.enabled' => array(
1172
+ 'type' => 'boolean',
1173
+ 'default' => false
1174
+ ),
1175
+ 'varnish.debug' => array(
1176
+ 'type' => 'boolean',
1177
+ 'default' => false
1178
+ ),
1179
+ 'varnish.servers' => array(
1180
+ 'type' => 'array',
1181
+ 'default' => array()
1182
+ ),
1183
+
1184
+ 'browsercache.enabled' => array(
1185
+ 'type' => 'boolean',
1186
+ 'default' => true
1187
+ ),
1188
+ 'browsercache.no404wp' => array(
1189
+ 'type' => 'boolean',
1190
+ 'default' => false
1191
+ ),
1192
+ 'browsercache.no404wp.exceptions' => array(
1193
+ 'type' => 'array',
1194
+ 'default' => array(
1195
+ 'robots\.txt',
1196
+ 'sitemap(_index)?\.xml(\.gz)?',
1197
+ '[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?'
1198
+ )
1199
+ ),
1200
+ 'browsercache.cssjs.last_modified' => array(
1201
+ 'type' => 'boolean',
1202
+ 'default' => true
1203
+ ),
1204
+ 'browsercache.cssjs.compression' => array(
1205
+ 'type' => 'boolean',
1206
+ 'default' => true
1207
+ ),
1208
+ 'browsercache.cssjs.expires' => array(
1209
+ 'type' => 'boolean',
1210
+ 'default' => false
1211
+ ),
1212
+ 'browsercache.cssjs.lifetime' => array(
1213
+ 'type' => 'integer',
1214
+ 'default' => 31536000
1215
+ ),
1216
+ 'browsercache.cssjs.nocookies' => array(
1217
+ 'type' => 'boolean',
1218
+ 'default' => false
1219
+ ),
1220
+ 'browsercache.cssjs.cache.control' => array(
1221
+ 'type' => 'boolean',
1222
+ 'default' => false
1223
+ ),
1224
+ 'browsercache.cssjs.cache.policy' => array(
1225
+ 'type' => 'string',
1226
+ 'default' => 'cache_public_maxage'
1227
+ ),
1228
+ 'browsercache.cssjs.etag' => array(
1229
+ 'type' => 'boolean',
1230
+ 'default' => false
1231
+ ),
1232
+ 'browsercache.cssjs.w3tc' => array(
1233
+ 'type' => 'boolean',
1234
+ 'default' => false
1235
+ ),
1236
+ 'browsercache.cssjs.replace' => array(
1237
+ 'type' => 'boolean',
1238
+ 'default' => false
1239
+ ),
1240
+ 'browsercache.html.compression' => array(
1241
+ 'type' => 'boolean',
1242
+ 'default' => true
1243
+ ),
1244
+ 'browsercache.html.last_modified' => array(
1245
+ 'type' => 'boolean',
1246
+ 'default' => true
1247
+ ),
1248
+ 'browsercache.html.expires' => array(
1249
+ 'type' => 'boolean',
1250
+ 'default' => false
1251
+ ),
1252
+ 'browsercache.html.lifetime' => array(
1253
+ 'type' => 'integer',
1254
+ 'default' => 3600
1255
+ ),
1256
+ 'browsercache.html.cache.control' => array(
1257
+ 'type' => 'boolean',
1258
+ 'default' => false
1259
+ ),
1260
+ 'browsercache.html.cache.policy' => array(
1261
+ 'type' => 'string',
1262
+ 'default' => 'cache_public_maxage'
1263
+ ),
1264
+ 'browsercache.html.etag' => array(
1265
+ 'type' => 'boolean',
1266
+ 'default' => false
1267
+ ),
1268
+ 'browsercache.html.w3tc' => array(
1269
+ 'type' => 'boolean',
1270
+ 'default' => false
1271
+ ),
1272
+ 'browsercache.html.replace' => array(
1273
+ 'type' => 'boolean',
1274
+ 'default' => false
1275
+ ),
1276
+ 'browsercache.other.last_modified' => array(
1277
+ 'type' => 'boolean',
1278
+ 'default' => true
1279
+ ),
1280
+ 'browsercache.other.compression' => array(
1281
+ 'type' => 'boolean',
1282
+ 'default' => true
1283
+ ),
1284
+ 'browsercache.other.expires' => array(
1285
+ 'type' => 'boolean',
1286
+ 'default' => false
1287
+ ),
1288
+ 'browsercache.other.lifetime' => array(
1289
+ 'type' => 'integer',
1290
+ 'default' => 31536000
1291
+ ),
1292
+ 'browsercache.other.nocookies' => array(
1293
+ 'type' => 'boolean',
1294
+ 'default' => false
1295
+ ),
1296
+ 'browsercache.other.cache.control' => array(
1297
+ 'type' => 'boolean',
1298
+ 'default' => false
1299
+ ),
1300
+ 'browsercache.other.cache.policy' => array(
1301
+ 'type' => 'string',
1302
+ 'default' => 'cache_public_maxage'
1303
+ ),
1304
+ 'browsercache.other.etag' => array(
1305
+ 'type' => 'boolean',
1306
+ 'default' => false
1307
+ ),
1308
+ 'browsercache.other.w3tc' => array(
1309
+ 'type' => 'boolean',
1310
+ 'default' => false
1311
+ ),
1312
+ 'browsercache.other.replace' => array(
1313
+ 'type' => 'boolean',
1314
+ 'default' => false
1315
+ ),
1316
+ 'browsercache.timestamp' => array(
1317
+ 'type' => 'string',
1318
+ 'default' => ''
1319
+ ),
1320
+
1321
+ 'mobile.enabled' => array(
1322
+ 'type' => 'boolean',
1323
+ 'default' => false
1324
+ ),
1325
+ 'mobile.rgroups' => array(
1326
+ 'type' => 'array',
1327
+ 'default' => array(
1328
+ 'high' => array(
1329
+ 'theme' => '',
1330
+ 'enabled' => false,
1331
+ 'redirect' => '',
1332
+ 'agents' => array(
1333
+ 'acer\ s100',
1334
+ 'android',
1335
+ 'archos5',
1336
+ 'bada',
1337
+ 'blackberry9500',
1338
+ 'blackberry9530',
1339
+ 'blackberry9550',
1340
+ 'blackberry\ 9800',
1341
+ 'cupcake',
1342
+ 'docomo\ ht\-03a',
1343
+ 'dream',
1344
+ 'froyo',
1345
+ 'googlebot-mobile',
1346
+ 'htc\ hero',
1347
+ 'htc\ magic',
1348
+ 'htc_dream',
1349
+ 'htc_magic',
1350
+ 'iemobile/7.0',
1351
+ 'incognito',
1352
+ 'ipad',
1353
+ 'iphone',
1354
+ 'ipod',
1355
+ 'kindle',
1356
+ 'lg\-gw620',
1357
+ 'liquid\ build',
1358
+ 'maemo',
1359
+ 'mot\-mb200',
1360
+ 'mot\-mb300',
1361
+ 'nexus\ one',
1362
+ 'opera\ mini',
1363
+ 's8000',
1364
+ 'samsung\-s8000',
1365
+ 'series60.*webkit',
1366
+ 'series60/5\.0',
1367
+ 'sonyericssone10',
1368
+ 'sonyericssonu20',
1369
+ 'sonyericssonx10',
1370
+ 't\-mobile\ mytouch\ 3g',
1371
+ 't\-mobile\ opal',
1372
+ 'tattoo',
1373
+ 'webmate',
1374
+ 'webos'
1375
+ )
1376
+ ),
1377
+ 'low' => array(
1378
+ 'theme' => '',
1379
+ 'enabled' => false,
1380
+ 'redirect' => '',
1381
+ 'agents' => array(
1382
+ '2\.0\ mmp',
1383
+ '240x320',
1384
+ 'alcatel',
1385
+ 'amoi',
1386
+ 'asus',
1387
+ 'au\-mic',
1388
+ 'audiovox',
1389
+ 'avantgo',
1390
+ 'benq',
1391
+ 'bird',
1392
+ 'blackberry',
1393
+ 'blazer',
1394
+ 'cdm',
1395
+ 'cellphone',
1396
+ 'danger',
1397
+ 'ddipocket',
1398
+ 'docomo',
1399
+ 'dopod',
1400
+ 'elaine/3\.0',
1401
+ 'ericsson',
1402
+ 'eudoraweb',
1403
+ 'fly',
1404
+ 'haier',
1405
+ 'hiptop',
1406
+ 'hp\.ipaq',
1407
+ 'htc',
1408
+ 'huawei',
1409
+ 'i\-mobile',
1410
+ 'iemobile',
1411
+ 'j\-phone',
1412
+ 'kddi',
1413
+ 'konka',
1414
+ 'kwc',
1415
+ 'kyocera/wx310k',
1416
+ 'lenovo',
1417
+ 'lg',
1418
+ 'lg/u990',
1419
+ 'lge\ vx',
1420
+ 'midp',
1421
+ 'midp\-2\.0',
1422
+ 'mmef20',
1423
+ 'mmp',
1424
+ 'mobilephone',
1425
+ 'mot\-v',
1426
+ 'motorola',
1427
+ 'netfront',
1428
+ 'newgen',
1429
+ 'newt',
1430
+ 'nintendo\ ds',
1431
+ 'nintendo\ wii',
1432
+ 'nitro',
1433
+ 'nokia',
1434
+ 'novarra',
1435
+ 'o2',
1436
+ 'openweb',
1437
+ 'opera\ mobi',
1438
+ 'opera\.mobi',
1439
+ 'palm',
1440
+ 'panasonic',
1441
+ 'pantech',
1442
+ 'pdxgw',
1443
+ 'pg',
1444
+ 'philips',
1445
+ 'phone',
1446
+ 'playstation\ portable',
1447
+ 'portalmmm',
1448
+ '\bppc\b',
1449
+ 'proxinet',
1450
+ 'psp',
1451
+ 'qtek',
1452
+ 'sagem',
1453
+ 'samsung',
1454
+ 'sanyo',
1455
+ 'sch',
1456
+ 'sec',
1457
+ 'sendo',
1458
+ 'sgh',
1459
+ 'sharp',
1460
+ 'sharp\-tq\-gx10',
1461
+ 'small',
1462
+ 'smartphone',
1463
+ 'softbank',
1464
+ 'sonyericsson',
1465
+ 'sph',
1466
+ 'symbian',
1467
+ 'symbian\ os',
1468
+ 'symbianos',
1469
+ 'toshiba',
1470
+ 'treo',
1471
+ 'ts21i\-10',
1472
+ 'up\.browser',
1473
+ 'up\.link',
1474
+ 'uts',
1475
+ 'vertu',
1476
+ 'vodafone',
1477
+ 'wap',
1478
+ 'willcome',
1479
+ 'windows\ ce',
1480
+ 'windows\.ce',
1481
+ 'winwap',
1482
+ 'xda',
1483
+ 'zte'
1484
+ )
1485
+ )
1486
+ )
1487
+ ),
1488
+
1489
+
1490
+ 'referrer.enabled' => array(
1491
+ 'type' => 'boolean',
1492
+ 'default' => false
1493
+ ),
1494
+ 'referrer.rgroups' => array(
1495
+ 'type' => 'array',
1496
+ 'default' => array(
1497
+ 'search_engines' => array(
1498
+ 'theme' => '',
1499
+ 'enabled' => false,
1500
+ 'redirect' => '',
1501
+ 'referrers' => array(
1502
+ 'google\.com',
1503
+ 'yahoo\.com',
1504
+ 'bing\.com',
1505
+ 'ask\.com',
1506
+ 'msn\.com'
1507
+ )
1508
+ )
1509
+ )
1510
+ ),
1511
+
1512
+
1513
+ 'common.support' => array(
1514
+ 'type' => 'string',
1515
+ 'default' => ''
1516
+ ),
1517
+ 'common.install' => array(
1518
+ 'type' => 'integer',
1519
+ 'default' => 0
1520
+ ),
1521
+ 'common.tweeted' => array(
1522
+ 'type' => 'boolean',
1523
+ 'default' => false
1524
+ ),
1525
+ 'config.check' => array(
1526
+ 'type' => 'boolean',
1527
+ 'default' => true
1528
+ ),
1529
+ 'config.path' => array(
1530
+ 'type' => 'string',
1531
+ 'default' => ''
1532
+ ),
1533
+ 'widget.latest.items' => array(
1534
+ 'type' => 'integer',
1535
+ 'default' => 3
1536
+ ),
1537
+ 'widget.latest_news.items' => array(
1538
+ 'type' => 'integer',
1539
+ 'default' => 5
1540
+ ),
1541
+ 'widget.pagespeed.enabled' => array(
1542
+ 'type' => 'boolean',
1543
+ 'default' => true
1544
+ ),
1545
+ 'widget.pagespeed.key' => array(
1546
+ 'type' => 'string',
1547
+ 'default' => ''
1548
+ ),
1549
+
1550
+ 'notes.wp_content_changed_perms' => array(
1551
+ 'type' => 'boolean',
1552
+ 'default' => true
1553
+ ),
1554
+ 'notes.wp_content_perms' => array(
1555
+ 'type' => 'boolean',
1556
+ 'default' => true
1557
+ ),
1558
+ 'notes.theme_changed' => array(
1559
+ 'type' => 'boolean',
1560
+ 'default' => false
1561
+ ),
1562
+ 'notes.wp_upgraded' => array(
1563
+ 'type' => 'boolean',
1564
+ 'default' => false
1565
+ ),
1566
+ 'notes.plugins_updated' => array(
1567
+ 'type' => 'boolean',
1568
+ 'default' => false
1569
+ ),
1570
+ 'notes.cdn_upload' => array(
1571
+ 'type' => 'boolean',
1572
+ 'default' => false
1573
+ ),
1574
+ 'notes.cdn_reupload' => array(
1575
+ 'type' => 'boolean',
1576
+ 'default' => false
1577
+ ),
1578
+ 'notes.need_empty_pgcache' => array(
1579
+ 'type' => 'boolean',
1580
+ 'default' => false
1581
+ ),
1582
+ 'notes.need_empty_minify' => array(
1583
+ 'type' => 'boolean',
1584
+ 'default' => false
1585
+ ),
1586
+ 'notes.need_empty_objectcache' => array(
1587
+ 'type' => 'boolean',
1588
+ 'default' => false
1589
+ ),
1590
+ 'notes.root_rules' => array(
1591
+ 'type' => 'boolean',
1592
+ 'default' => true
1593
+ ),
1594
+ 'notes.rules' => array(
1595
+ 'type' => 'boolean',
1596
+ 'default' => true
1597
+ ),
1598
+ 'notes.pgcache_rules_wpsc' => array(
1599
+ 'type' => 'boolean',
1600
+ 'default' => true
1601
+ ),
1602
+ 'notes.support_us' => array(
1603
+ 'type' => 'boolean',
1604
+ 'default' => true
1605
+ ),
1606
+ 'notes.no_curl' => array(
1607
+ 'type' => 'boolean',
1608
+ 'default' => true
1609
+ ),
1610
+ 'notes.no_zlib' => array(
1611
+ 'type' => 'boolean',
1612
+ 'default' => true
1613
+ ),
1614
+ 'notes.zlib_output_compression' => array(
1615
+ 'type' => 'boolean',
1616
+ 'default' => true
1617
+ ),
1618
+ 'notes.no_permalink_rules' => array(
1619
+ 'type' => 'boolean',
1620
+ 'default' => true
1621
+ ),
1622
+ 'notes.browsercache_rules_no404wp' => array(
1623
+ 'type' => 'boolean',
1624
+ 'default' => true
1625
+ ),
1626
+ 'notes.cloudflare_plugin' => array(
1627
+ 'type' => 'boolean',
1628
+ 'default' => true
1629
+ ),
1630
+
1631
+ 'timelimit.email_send' => array(
1632
+ 'type' => 'integer',
1633
+ 'default' => 180
1634
+ ),
1635
+ 'timelimit.varnish_purge' => array(
1636
+ 'type' => 'integer',
1637
+ 'default' => 300
1638
+ ),
1639
+ 'timelimit.cache_flush' => array(
1640
+ 'type' => 'integer',
1641
+ 'default' => 600
1642
+ ),
1643
+ 'timelimit.cache_gc' => array(
1644
+ 'type' => 'integer',
1645
+ 'default' => 600
1646
+ ),
1647
+ 'timelimit.cdn_upload' => array(
1648
+ 'type' => 'integer',
1649
+ 'default' => 600
1650
+ ),
1651
+ 'timelimit.cdn_delete' => array(
1652
+ 'type' => 'integer',
1653
+ 'default' => 300
1654
+ ),
1655
+ 'timelimit.cdn_purge' => array(
1656
+ 'type' => 'integer',
1657
+ 'default' => 300
1658
+ ),
1659
+ 'timelimit.cdn_import' => array(
1660
+ 'type' => 'integer',
1661
+ 'default' => 600
1662
+ ),
1663
+ 'timelimit.cdn_test' => array(
1664
+ 'type' => 'integer',
1665
+ 'default' => 300
1666
+ ),
1667
+ 'timelimit.cdn_container_create' => array(
1668
+ 'type' => 'integer',
1669
+ 'default' => 300
1670
+ ),
1671
+ 'timelimit.cloudflare_api_request' => array(
1672
+ 'type' => 'integer',
1673
+ 'default' => 180
1674
+ ),
1675
+ 'timelimit.domain_rename' => array(
1676
+ 'type' => 'integer',
1677
+ 'default' => 120
1678
+ ),
1679
+ 'timelimit.minify_recommendations' => array(
1680
+ 'type' => 'integer',
1681
+ 'default' => 600
1682
+ ),
1683
+
1684
+ 'minify.auto.filename_length' => array(
1685
+ 'type' => 'integer',
1686
+ 'default' => 150
1687
+ ),
1688
+ 'common.instance_id' => array(
1689
+ 'type' => 'integer',
1690
+ 'default' => 0
1691
+ ),
1692
+ 'common.force_master' => array(
1693
+ 'type' => 'boolean',
1694
+ 'default' => true,
1695
+ 'master_only' => 'true'
1696
+ ),
1697
+ 'newrelic.enabled' => array(
1698
+ 'type' => 'boolean',
1699
+ 'default' => false,
1700
+ ),
1701
+ 'newrelic.api_key' => array(
1702
+ 'type' => 'string',
1703
+ 'default' => '',
1704
+ 'master_only' => 'true'
1705
+ ),
1706
+ 'newrelic.account_id' => array(
1707
+ 'type' => 'string',
1708
+ 'default' => '',
1709
+ 'master_only' => 'true'
1710
+ ),
1711
+ 'newrelic.application_id' => array(
1712
+ 'type' => 'integer',
1713
+ 'default' => 0,
1714
+ ),
1715
+ 'newrelic.appname' => array(
1716
+ 'type' => 'string',
1717
+ 'default' => '',
1718
+ ),
1719
+ 'newrelic.accept.logged_roles' => array(
1720
+ 'type' => 'boolean',
1721
+ 'default' => true
1722
+ ),
1723
+ 'newrelic.accept.roles' => array(
1724
+ 'type' => 'array',
1725
+ 'default' => array('contributor')
1726
+ ),
1727
+ 'newrelic.use_php_function' => array (
1728
+ 'type' => 'boolean',
1729
+ 'default' => true,
1730
+ ),
1731
+ 'notes.new_relic_page_load_notification' => array(
1732
+ 'type' => 'boolean',
1733
+ 'default' => true
1734
+ ),
1735
+ 'newrelic.appname_prefix' => array (
1736
+ 'type' => 'string',
1737
+ 'default' => 'Child Site - '
1738
+ ),
1739
+ 'newrelic.merge_with_network' => array (
1740
+ 'type' => 'boolean',
1741
+ 'default' => true
1742
+ ),
1743
+ 'newrelic.cache_time' => array(
1744
+ 'type' => 'integer',
1745
+ 'default' => 5
1746
+ ),
1747
+ 'newrelic.enable_xmit' => array(
1748
+ 'type' => 'boolean',
1749
+ 'default' => false
1750
+ ),
1751
+ 'newrelic.use_network_wide_id' => array(
1752
+ 'type' => 'boolean',
1753
+ 'default' => false,
1754
+ 'master_only' => 'true'
1755
+ ),
1756
+ 'pgcache.late_init' => array (
1757
+ 'type' => 'boolean',
1758
+ 'default' => false
1759
+ ),
1760
+ 'newrelic.include_rum' => array(
1761
+ 'type' => 'boolean',
1762
+ 'default' => true,
1763
+ )
1764
+ );
1765
+
1766
+
1767
+ /*
1768
+ * Descriptors of configuration keys
1769
+ * for admin config
1770
+ */
1771
+ $keys_admin = array(
1772
+ 'browsercache.configuration_sealed' => array(
1773
+ 'type' => 'boolean',
1774
+ 'default' => false,
1775
+ 'master_only' => 'true'
1776
+ ),
1777
+ 'cdn.configuration_sealed' => array(
1778
+ 'type' => 'boolean',
1779
+ 'default' => false,
1780
+ 'master_only' => 'true'
1781
+ ),
1782
+ 'cloudflare.configuration_sealed' => array(
1783
+ 'type' => 'boolean',
1784
+ 'default' => false,
1785
+ 'master_only' => 'true'
1786
+ ),
1787
+ 'common.install' => array(
1788
+ 'type' => 'integer',
1789
+ 'default' => 0,
1790
+ 'master_only' => 'true'
1791
+ ),
1792
+ 'common.visible_by_master_only' => array(
1793
+ 'type' => 'boolean',
1794
+ 'default' => true,
1795
+ 'master_only' => 'true'
1796
+ ),
1797
+ 'dbcache.configuration_sealed' => array(
1798
+ 'type' => 'boolean',
1799
+ 'default' => false,
1800
+ 'master_only' => 'true'
1801
+ ),
1802
+ 'minify.configuration_sealed' => array(
1803
+ 'type' => 'boolean',
1804
+ 'default' => false,
1805
+ 'master_only' => 'true'
1806
+ ),
1807
+ 'objectcache.configuration_sealed' => array(
1808
+ 'type' => 'boolean',
1809
+ 'default' => false,
1810
+ 'master_only' => 'true'
1811
+ ),
1812
+ 'pgcache.configuration_sealed' => array(
1813
+ 'type' => 'boolean',
1814
+ 'default' => false,
1815
+ 'master_only' => 'true'
1816
+ ),
1817
+ 'previewmode.enabled' => array(
1818
+ 'type' => 'boolean',
1819
+ 'default' => false,
1820
+ 'master_only' => 'true'
1821
+ ),
1822
+ 'varnish.configuration_sealed' => array(
1823
+ 'type' => 'boolean',
1824
+ 'default' => false,
1825
+ 'master_only' => 'true'
1826
+ ),
1827
+ 'fragmentcache.configuration_sealed' => array(
1828
+ 'type' => 'boolean',
1829
+ 'default' => false,
1830
+ 'master_only' => 'true'
1831
+ )
1832
+ ,'newrelic.configuration_sealed' => array(
1833
+ 'type' => 'boolean',
1834
+ 'default' => false,
1835
+ 'master_only' => 'true'
1836
+ )
1837
+ ,'notes.minify_error' => array(
1838
+ 'type' => 'boolean',
1839
+ 'default' => false
1840
+ )
1841
+ ,'minify.error.last' => array(
1842
+ 'type' => 'string',
1843
+ 'default' => ''
1844
+ ),
1845
+ 'minify.error.notification' => array(
1846
+ 'type' => 'string',
1847
+ 'default' => ''
1848
+ ),
1849
+ 'minify.error.notification.last' => array(
1850
+ 'type' => 'integer',
1851
+ 'default' => 0
1852
+ ),
1853
+ 'minify.error.file' => array(
1854
+ 'type' => 'string',
1855
+ 'default' => ''
1856
+ ),
1857
+ 'notes.remove_w3tc' => array(
1858
+ 'type' => 'boolean',
1859
+ 'default' => false
1860
+ )
1861
+ );
1862
+
1863
+ $keys_admin['common.install']['default'] = time();
1864
+
1865
+
1866
+
1867
+ /*
1868
+ * Descriptors how sealed configuration keys affect overriding
1869
+ */
1870
+ $sealing_keys_scope = array(
1871
+ array(
1872
+ 'key' => 'browsercache.configuration_sealed',
1873
+ 'prefix' => 'browsercache.'
1874
+ ),
1875
+ array(
1876
+ 'key' => 'cdn.configuration_sealed',
1877
+ 'prefix' => 'cdn.'
1878
+ ),
1879
+ array(
1880
+ 'key' => 'cloudflare.configuration_sealed',
1881
+ 'prefix' => 'cloudflare.'
1882
+ ),
1883
+ array(
1884
+ 'key' => 'dbcache.configuration_sealed',
1885
+ 'prefix' => 'dbcache.'
1886
+ ),
1887
+ array(
1888
+ 'key' => 'minify.configuration_sealed',
1889
+ 'prefix' => 'minify.'
1890
+ ),
1891
+ array(
1892
+ 'key' => 'objectcache.configuration_sealed',
1893
+ 'prefix' => 'objectcache.'
1894
+ ),
1895
+ array(
1896
+ 'key' => 'fragmentcache.configuration_sealed',
1897
+ 'prefix' => 'fragmentcache.'
1898
+ ),
1899
+ array(
1900
+ 'key' => 'pgcache.configuration_sealed',
1901
+ 'prefix' => 'pgcache.'
1902
+ ),
1903
+ array(
1904
+ 'key' => 'varnish.configuration_sealed',
1905
+ 'prefix' => 'varnish.'
1906
+ )
1907
+ );
1908
+
configs/0.9.2.11-ConfigKeys.php ADDED
@@ -0,0 +1,1912 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Descriptors of configuration keys
5
+ * for config
6
+ */
7
+
8
+ $keys = array(
9
+ 'cluster.messagebus.debug' => array(
10
+ 'type' => 'boolean',
11
+ 'default' => false
12
+ ),
13
+ 'cluster.messagebus.enabled' => array(
14
+ 'type' => 'boolean',
15
+ 'default' => false
16
+ ),
17
+ 'cluster.messagebus.sns.region' => array(
18
+ 'type' => 'string',
19
+ 'default' => ''
20
+ ),
21
+ 'cluster.messagebus.sns.api_key' => array(
22
+ 'type' => 'string',
23
+ 'default' => ''
24
+ ),
25
+ 'cluster.messagebus.sns.api_secret' => array(
26
+ 'type' => 'string',
27
+ 'default' => ''
28
+ ),
29
+ 'cluster.messagebus.sns.topic_arn' => array(
30
+ 'type' => 'string',
31
+ 'default' => ''
32
+ ),
33
+
34
+ 'dbcache.debug' => array(
35
+ 'type' => 'boolean',
36
+ 'default' => false
37
+ ),
38
+ 'dbcache.enabled' => array(
39
+ 'type' => 'boolean',
40
+ 'default' => false
41
+ ),
42
+ 'dbcache.engine' => array(
43
+ 'type' => 'string',
44
+ 'default' => 'file'
45
+ ),
46
+ 'dbcache.file.gc' => array(
47
+ 'type' => 'integer',
48
+ 'default' => 3600
49
+ ),
50
+ 'dbcache.file.locking' => array(
51
+ 'type' => 'boolean',
52
+ 'default' => false
53
+ ),
54
+ 'dbcache.lifetime' => array(
55
+ 'type' => 'integer',
56
+ 'default' => 180
57
+ ),
58
+ 'dbcache.memcached.persistant' => array(
59
+ 'type' => 'boolean',
60
+ 'default' => true
61
+ ),
62
+ 'dbcache.memcached.servers' => array(
63
+ 'type' => 'array',
64
+ 'default' => array(
65
+ '127.0.0.1:11211'
66
+ )
67
+ ),
68
+ 'dbcache.reject.cookie' => array(
69
+ 'type' => 'array',
70
+ 'default' => array()
71
+ ),
72
+ 'dbcache.reject.logged' => array(
73
+ 'type' => 'boolean',
74
+ 'default' => true
75
+ ),
76
+ 'dbcache.reject.sql' => array(
77
+ 'type' => 'array',
78
+ 'default' => array(
79
+ 'gdsr_',
80
+ 'wp_rg_'
81
+ )
82
+ ),
83
+ 'dbcache.reject.uri' => array(
84
+ 'type' => 'array',
85
+ 'default' => array()
86
+ ),
87
+ 'dbcache.reject.words' => array(
88
+ 'type' => 'array',
89
+ 'default' => array(
90
+ '^\s*insert\b',
91
+ '^\s*delete\b',
92
+ '^\s*update\b',
93
+ '^\s*replace\b',
94
+ '^\s*create\b',
95
+ '^\s*alter\b',
96
+ '^\s*show\b',
97
+ '^\s*set\b',
98
+ '\bautoload\s+=\s+\'yes\'',
99
+ '\bsql_calc_found_rows\b',
100
+ '\bfound_rows\(\)',
101
+ '\bw3tc_request_data\b'
102
+ )
103
+ ),
104
+
105
+ 'objectcache.enabled' => array(
106
+ 'type' => 'boolean',
107
+ 'default' => false
108
+ ),
109
+ 'objectcache.debug' => array(
110
+ 'type' => 'boolean',
111
+ 'default' => false
112
+ ),
113
+ 'objectcache.engine' => array(
114
+ 'type' => 'string',
115
+ 'default' => 'file'
116
+ ),
117
+ 'objectcache.file.gc' => array(
118
+ 'type' => 'integer',
119
+ 'default' => 3600
120
+ ),
121
+ 'objectcache.file.locking' => array(
122
+ 'type' => 'boolean',
123
+ 'default' => false
124
+ ),
125
+ 'objectcache.memcached.servers' => array(
126
+ 'type' => 'array',
127
+ 'default' => array(
128
+ '127.0.0.1:11211'
129
+ )
130
+ ),
131
+ 'objectcache.memcached.persistant' => array(
132
+ 'type' => 'boolean',
133
+ 'default' => true
134
+ ),
135
+ 'objectcache.groups.global' => array(
136
+ 'type' => 'array',
137
+ 'default' => array(
138
+ 'users',
139
+ 'userlogins',
140
+ 'usermeta',
141
+ 'user_meta',
142
+ 'site-transient',
143
+ 'site-options',
144
+ 'site-lookup',
145
+ 'blog-lookup',
146
+ 'blog-details',
147
+ 'rss',
148
+ 'global-posts'
149
+ )
150
+ ),
151
+ 'objectcache.groups.nonpersistent' => array(
152
+ 'type' => 'array',
153
+ 'default' => array(
154
+ 'comment',
155
+ 'counts',
156
+ 'plugins'
157
+ )
158
+ ),
159
+ 'objectcache.lifetime' => array(
160
+ 'type' => 'integer',
161
+ 'default' => 180
162
+ ),
163
+ 'objectcache.purge.all' => array(
164
+ 'type' => 'boolean',
165
+ 'default' => false
166
+ ),
167
+
168
+ 'fragmentcache.enabled' => array(
169
+ 'type' => 'boolean',
170
+ 'default' => false
171
+ ),
172
+ 'fragmentcache.debug' => array(
173
+ 'type' => 'boolean',
174
+ 'default' => false
175
+ ),
176
+ 'fragmentcache.engine' => array(
177
+ 'type' => 'string',
178
+ 'default' => 'file'
179
+ ),
180
+ 'fragmentcache.file.gc' => array(
181
+ 'type' => 'integer',
182
+ 'default' => 3600
183
+ ),
184
+ 'fragmentcache.file.locking' => array(
185
+ 'type' => 'boolean',
186
+ 'default' => false
187
+ ),
188
+ 'fragmentcache.memcached.servers' => array(
189
+ 'type' => 'array',
190
+ 'default' => array(
191
+ '127.0.0.1:11211'
192
+ )
193
+ ),
194
+ 'fragmentcache.memcached.persistant' => array(
195
+ 'type' => 'boolean',
196
+ 'default' => true
197
+ ),
198
+ 'fragmentcache.lifetime' => array(
199
+ 'type' => 'integer',
200
+ 'default' => 180
201
+ ),
202
+ 'fragmentcache.groups' => array(
203
+ 'type' => 'array',
204
+ 'default' => array()
205
+ ),
206
+
207
+ 'pgcache.enabled' => array(
208
+ 'type' => 'boolean',
209
+ 'default' => false
210
+ ),
211
+ 'pgcache.comment_cookie_ttl' => array(
212
+ 'type' => 'integer',
213
+ 'default' => 1800
214
+ ),
215
+ 'pgcache.debug' => array(
216
+ 'type' => 'boolean',
217
+ 'default' => false
218
+ ),
219
+ 'pgcache.engine' => array(
220
+ 'type' => 'string',
221
+ 'default' => 'file_generic'
222
+ ),
223
+ 'pgcache.file.gc' => array(
224
+ 'type' => 'integer',
225
+ 'default' => 3600
226
+ ),
227
+ 'pgcache.file.nfs' => array(
228
+ 'type' => 'boolean',
229
+ 'default' => false
230
+ ),
231
+ 'pgcache.file.locking' => array(
232
+ 'type' => 'boolean',
233
+ 'default' => false
234
+ ),
235
+ 'pgcache.lifetime' => array(
236
+ 'type' => 'integer',
237
+ 'default' => 3600
238
+ ),
239
+ 'pgcache.memcached.servers' => array(
240
+ 'type' => 'array',
241
+ 'default' => array(
242
+ '127.0.0.1:11211'
243
+ )
244
+ ),
245
+ 'pgcache.memcached.persistant' => array(
246
+ 'type' => 'boolean',
247
+ 'default' => true
248
+ ),
249
+ 'pgcache.check.domain' => array(
250
+ 'type' => 'boolean',
251
+ 'default' => false
252
+ ),
253
+ 'pgcache.cache.query' => array(
254
+ 'type' => 'boolean',
255
+ 'default' => true
256
+ ),
257
+ 'pgcache.cache.home' => array(
258
+ 'type' => 'boolean',
259
+ 'default' => true
260
+ ),
261
+ 'pgcache.cache.feed' => array(
262
+ 'type' => 'boolean',
263
+ 'default' => false
264
+ ),
265
+ 'pgcache.cache.nginx_handle_xml' => array(
266
+ 'type' => 'boolean',
267
+ 'default' => false
268
+ ),
269
+ 'pgcache.cache.ssl' => array(
270
+ 'type' => 'boolean',
271
+ 'default' => false
272
+ ),
273
+ 'pgcache.cache.404' => array(
274
+ 'type' => 'boolean',
275
+ 'default' => false
276
+ ),
277
+ 'pgcache.cache.flush' => array(
278
+ 'type' => 'boolean',
279
+ 'default' => false
280
+ ),
281
+ 'pgcache.cache.headers' => array(
282
+ 'type' => 'array',
283
+ 'default' => array(
284
+ 'Last-Modified',
285
+ 'Content-Type',
286
+ 'X-Pingback',
287
+ 'P3P'
288
+ )
289
+ ),
290
+ 'pgcache.compatibility' => array(
291
+ 'type' => 'boolean',
292
+ 'default' => false
293
+ ),
294
+ 'pgcache.remove_charset' => array(
295
+ 'type' => 'boolean',
296
+ 'default' => false
297
+ ),
298
+ 'pgcache.accept.uri' => array(
299
+ 'type' => 'array',
300
+ 'default' => array(
301
+ 'sitemap(_index)?\.xml(\.gz)?',
302
+ '[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?'
303
+ )
304
+ ),
305
+ 'pgcache.accept.files' => array(
306
+ 'type' => 'array',
307
+ 'default' => array(
308
+ 'wp-comments-popup.php',
309
+ 'wp-links-opml.php',
310
+ 'wp-locations.php'
311
+ )
312
+ ),
313
+ 'pgcache.accept.qs' => array(
314
+ 'type' => 'array',
315
+ 'default' => array()
316
+ ),
317
+ 'pgcache.reject.front_page' => array(
318
+ 'type' => 'boolean',
319
+ 'default' => false
320
+ ),
321
+ 'pgcache.reject.logged' => array(
322
+ 'type' => 'boolean',
323
+ 'default' => true
324
+ ),
325
+ 'pgcache.reject.logged_roles' => array(
326
+ 'type' => 'boolean',
327
+ 'default' => false
328
+ ),
329
+ 'pgcache.reject.roles' => array(
330
+ 'type' => 'array',
331
+ 'default' => array()
332
+ ),
333
+ 'pgcache.reject.uri' => array(
334
+ 'type' => 'array',
335
+ 'default' => array(
336
+ 'wp-.*\.php',
337
+ 'index\.php'
338
+ )
339
+ ),
340
+ 'pgcache.reject.ua' => array(
341
+ 'type' => 'array',
342
+ 'default' => array()
343
+ ),
344
+ 'pgcache.reject.cookie' => array(
345
+ 'type' => 'array',
346
+ 'default' => array('wptouch_switch_toggle')
347
+ ),
348
+ 'pgcache.reject.request_head' => array(
349
+ 'type' => 'boolean',
350
+ 'default' => false
351
+ ),
352
+ 'pgcache.purge.front_page' => array(
353
+ 'type' => 'boolean',
354
+ 'default' => false
355
+ ),
356
+ 'pgcache.purge.home' => array(
357
+ 'type' => 'boolean',
358
+ 'default' => true
359
+ ),
360
+ 'pgcache.purge.post' => array(
361
+ 'type' => 'boolean',
362
+ 'default' => true
363
+ ),
364
+ 'pgcache.purge.comments' => array(
365
+ 'type' => 'boolean',
366
+ 'default' => false
367
+ ),
368
+ 'pgcache.purge.author' => array(
369
+ 'type' => 'boolean',
370
+ 'default' => false
371
+ ),
372
+ 'pgcache.purge.terms' => array(
373
+ 'type' => 'boolean',
374
+ 'default' => false
375
+ ),
376
+ 'pgcache.purge.archive.daily' => array(
377
+ 'type' => 'boolean',
378
+ 'default' => false
379
+ ),
380
+ 'pgcache.purge.archive.monthly' => array(
381
+ 'type' => 'boolean',
382
+ 'default' => false
383
+ ),
384
+ 'pgcache.purge.archive.yearly' => array(
385
+ 'type' => 'boolean',
386
+ 'default' => false
387
+ ),
388
+ 'pgcache.purge.feed.blog' => array(
389
+ 'type' => 'boolean',
390
+ 'default' => true
391
+ ),
392
+ 'pgcache.purge.feed.comments' => array(
393
+ 'type' => 'boolean',
394
+ 'default' => false
395
+ ),
396
+ 'pgcache.purge.feed.author' => array(
397
+ 'type' => 'boolean',
398
+ 'default' => false
399
+ ),
400
+ 'pgcache.purge.feed.terms' => array(
401
+ 'type' => 'boolean',
402
+ 'default' => false
403
+ ),
404
+ 'pgcache.purge.feed.types' => array(
405
+ 'type' => 'array',
406
+ 'default' => array(
407
+ 'rss2'
408
+ )
409
+ ),
410
+ 'pgcache.purge.postpages_limit' => array(
411
+ 'type' => 'integer',
412
+ 'default' => 10
413
+ ),
414
+ 'pgcache.purge.pages' => array(
415
+ 'type' => 'array',
416
+ 'default' => array()
417
+ ),
418
+ 'pgcache.purge.sitemap_regex' => array(
419
+ 'type' => 'string',
420
+ 'default' => '([a-z0-9_\-]*?)sitemap([a-z0-9_\-]*)?\.xml'
421
+ ),
422
+ 'pgcache.prime.enabled' => array(
423
+ 'type' => 'boolean',
424
+ 'default' => false
425
+ ),
426
+ 'pgcache.prime.interval' => array(
427
+ 'type' => 'integer',
428
+ 'default' => 900
429
+ ),
430
+ 'pgcache.prime.limit' => array(
431
+ 'type' => 'integer',
432
+ 'default' => 10
433
+ ),
434
+ 'pgcache.prime.sitemap' => array(
435
+ 'type' => 'string',
436
+ 'default' => ''
437
+ ),
438
+ 'pgcache.prime.post.enabled' => array(
439
+ 'type' => 'boolean',
440
+ 'default' => false
441
+ ),
442
+
443
+ 'minify.enabled' => array(
444
+ 'type' => 'boolean',
445
+ 'default' => false
446
+ ),
447
+ 'minify.auto' => array(
448
+ 'type' => 'boolean',
449
+ 'default' => true
450
+ ),
451
+ 'minify.debug' => array(
452
+ 'type' => 'boolean',
453
+ 'default' => false
454
+ ),
455
+ 'minify.engine' => array(
456
+ 'type' => 'string',
457
+ 'default' => 'file'
458
+ ),
459
+ 'minify.file.gc' => array(
460
+ 'type' => 'integer',
461
+ 'default' => 86400
462
+ ),
463
+ 'minify.file.nfs' => array(
464
+ 'type' => 'boolean',
465
+ 'default' => false
466
+ ),
467
+ 'minify.file.locking' => array(
468
+ 'type' => 'boolean',
469
+ 'default' => false
470
+ ),
471
+ 'minify.memcached.servers' => array(
472
+ 'type' => 'array',
473
+ 'default' => array(
474
+ '127.0.0.1:11211'
475
+ )
476
+ ),
477
+ 'minify.memcached.persistant' => array(
478
+ 'type' => 'boolean',
479
+ 'default' => true
480
+ ),
481
+ 'minify.rewrite' => array(
482
+ 'type' => 'boolean',
483
+ 'default' => true
484
+ ),
485
+ 'minify.options' => array(
486
+ 'type' => 'array',
487
+ 'default' => array()
488
+ ),
489
+ 'minify.symlinks' => array(
490
+ 'type' => 'array',
491
+ 'default' => array()
492
+ ),
493
+ 'minify.lifetime' => array(
494
+ 'type' => 'integer',
495
+ 'default' => 86400
496
+ ),
497
+ 'minify.upload' => array(
498
+ 'type' => 'boolean',
499
+ 'default' => true
500
+ ),
501
+ 'minify.html.enable' => array(
502
+ 'type' => 'boolean',
503
+ 'default' => false
504
+ ),
505
+ 'minify.html.engine' => array(
506
+ 'type' => 'string',
507
+ 'default' => 'html'
508
+ ),
509
+ 'minify.html.reject.feed' => array(
510
+ 'type' => 'boolean',
511
+ 'default' => false
512
+ ),
513
+ 'minify.html.inline.css' => array(
514
+ 'type' => 'boolean',
515
+ 'default' => false
516
+ ),
517
+ 'minify.html.inline.js' => array(
518
+ 'type' => 'boolean',
519
+ 'default' => false
520
+ ),
521
+ 'minify.html.strip.crlf' => array(
522
+ 'type' => 'boolean',
523
+ 'default' => false
524
+ ),
525
+ 'minify.html.comments.ignore' => array(
526
+ 'type' => 'array',
527
+ 'default' => array(
528
+ 'google_ad_',
529
+ 'RSPEAK_'
530
+ )
531
+ ),
532
+ 'minify.css.enable' => array(
533
+ 'type' => 'boolean',
534
+ 'default' => true
535
+ ),
536
+ 'minify.css.engine' => array(
537
+ 'type' => 'string',
538
+ 'default' => 'css'
539
+ ),
540
+ 'minify.css.combine' => array(
541
+ 'type' => 'boolean',
542
+ 'default' => false
543
+ ),
544
+ 'minify.css.strip.comments' => array(
545
+ 'type' => 'boolean',
546
+ 'default' => false
547
+ ),
548
+ 'minify.css.strip.crlf' => array(
549
+ 'type' => 'boolean',
550
+ 'default' => false
551
+ ),
552
+ 'minify.css.imports' => array(
553
+ 'type' => 'string',
554
+ 'default' => ''
555
+ ),
556
+ 'minify.css.groups' => array(
557
+ 'type' => 'array',
558
+ 'default' => array()
559
+ ),
560
+ 'minify.js.enable' => array(
561
+ 'type' => 'boolean',
562
+ 'default' => true
563
+ ),
564
+ 'minify.js.engine' => array(
565
+ 'type' => 'string',
566
+ 'default' => 'js'
567
+ ),
568
+ 'minify.js.combine.header' => array(
569
+ 'type' => 'boolean',
570
+ 'default' => false
571
+ ),
572
+ 'minify.js.header.embed_type' => array(
573
+ 'type' => 'string',
574
+ 'default' => 'blocking'
575
+ ),
576
+ 'minify.js.combine.body' => array(
577
+ 'type' => 'boolean',
578
+ 'default' => false
579
+ ),
580
+ 'minify.js.body.embed_type' => array(
581
+ 'type' => 'string',
582
+ 'default' => 'blocking'
583
+ ),
584
+ 'minify.js.combine.footer' => array(
585
+ 'type' => 'boolean',
586
+ 'default' => false
587
+ ),
588
+ 'minify.js.footer.embed_type' => array(
589
+ 'type' => 'string',
590
+ 'default' => 'blocking'
591
+ ),
592
+ 'minify.js.strip.comments' => array(
593
+ 'type' => 'boolean',
594
+ 'default' => false
595
+ ),
596
+ 'minify.js.strip.crlf' => array(
597
+ 'type' => 'boolean',
598
+ 'default' => false
599
+ ),
600
+ 'minify.js.groups' => array(
601
+ 'type' => 'array',
602
+ 'default' => array()
603
+ ),
604
+ 'minify.yuijs.path.java' => array(
605
+ 'type' => 'string',
606
+ 'default' => 'java'
607
+ ),
608
+ 'minify.yuijs.path.jar' => array(
609
+ 'type' => 'string',
610
+ 'default' => 'yuicompressor.jar'
611
+ ),
612
+ 'minify.yuijs.options.line-break' => array(
613
+ 'type' => 'integer',
614
+ 'default' => 5000
615
+ ),
616
+ 'minify.yuijs.options.nomunge' => array(
617
+ 'type' => 'boolean',
618
+ 'default' => false
619
+ ),
620
+ 'minify.yuijs.options.preserve-semi' => array(
621
+ 'type' => 'boolean',
622
+ 'default' => false
623
+ ),
624
+ 'minify.yuijs.options.disable-optimizations' => array(
625
+ 'type' => 'boolean',
626
+ 'default' => false
627
+ ),
628
+ 'minify.yuicss.path.java' => array(
629
+ 'type' => 'string',
630
+ 'default' => 'java'
631
+ ),
632
+ 'minify.yuicss.path.jar' => array(
633
+ 'type' => 'string',
634
+ 'default' => 'yuicompressor.jar'
635
+ ),
636
+ 'minify.yuicss.options.line-break' => array(
637
+ 'type' => 'integer',
638
+ 'default' => 5000
639
+ ),
640
+ 'minify.ccjs.path.java' => array(
641
+ 'type' => 'string',
642
+ 'default' => 'java'
643
+ ),
644
+ 'minify.ccjs.path.jar' => array(
645
+ 'type' => 'string',
646
+ 'default' => 'compiler.jar'
647
+ ),
648
+ 'minify.ccjs.options.compilation_level' => array(
649
+ 'type' => 'string',
650
+ 'default' => 'SIMPLE_OPTIMIZATIONS'
651
+ ),
652
+ 'minify.ccjs.options.formatting' => array(
653
+ 'type' => 'string',
654
+ 'default' => ''
655
+ ),
656
+ 'minify.csstidy.options.remove_bslash' => array(
657
+ 'type' => 'boolean',
658
+ 'default' => true
659
+ ),
660
+ 'minify.csstidy.options.compress_colors' => array(
661
+ 'type' => 'boolean',
662
+ 'default' => true
663
+ ),
664
+ 'minify.csstidy.options.compress_font-weight' => array(
665
+ 'type' => 'boolean',
666
+ 'default' => true
667
+ ),
668
+ 'minify.csstidy.options.lowercase_s' => array(
669
+ 'type' => 'boolean',
670
+ 'default' => false
671
+ ),
672
+ 'minify.csstidy.options.optimise_shorthands' => array(
673
+ 'type' => 'integer',
674
+ 'default' => 1
675
+ ),
676
+ 'minify.csstidy.options.remove_last_;' => array(
677
+ 'type' => 'boolean',
678
+ 'default' => false
679
+ ),
680
+ 'minify.csstidy.options.case_properties' => array(
681
+ 'type' => 'integer',
682
+ 'default' => 1
683
+ ),
684
+ 'minify.csstidy.options.sort_properties' => array(
685
+ 'type' => 'boolean',
686
+ 'default' => false
687
+ ),
688
+ 'minify.csstidy.options.sort_selectors' => array(
689
+ 'type' => 'boolean',
690
+ 'default' => false
691
+ ),
692
+ 'minify.csstidy.options.merge_selectors' => array(
693
+ 'type' => 'integer',
694
+ 'default' => 2
695
+ ),
696
+ 'minify.csstidy.options.discard_invalid_properties' => array(
697
+ 'type' => 'boolean',
698
+ 'default' => false
699
+ ),
700
+ 'minify.csstidy.options.css_level' => array(
701
+ 'type' => 'string',
702
+ 'default' => 'CSS2.1'
703
+ ),
704
+ 'minify.csstidy.options.preserve_css' => array(
705
+ 'type' => 'boolean',
706
+ 'default' => false
707
+ ),
708
+ 'minify.csstidy.options.timestamp' => array(
709
+ 'type' => 'boolean',
710
+ 'default' => false
711
+ ),
712
+ 'minify.csstidy.options.template' => array(
713
+ 'type' => 'string',
714
+ 'default' => 'default'
715
+ ),
716
+ 'minify.htmltidy.options.clean' => array(
717
+ 'type' => 'boolean',
718
+ 'default' => false
719
+ ),
720
+ 'minify.htmltidy.options.hide-comments' => array(
721
+ 'type' => 'boolean',
722
+ 'default' => true
723
+ ),
724
+ 'minify.htmltidy.options.wrap' => array(
725
+ 'type' => 'integer',
726
+ 'default' => 0
727
+ ),
728
+ 'minify.reject.logged' => array(
729
+ 'type' => 'boolean',
730
+ 'default' => false
731
+ ),
732
+ 'minify.reject.ua' => array(
733
+ 'type' => 'array',
734
+ 'default' => array()
735
+ ),
736
+ 'minify.reject.uri' => array(
737
+ 'type' => 'array',
738
+ 'default' => array()
739
+ ),
740
+ 'minify.reject.files.js' => array(
741
+ 'type' => 'array',
742
+ 'default' => array()
743
+ ),
744
+ 'minify.reject.files.css' => array(
745
+ 'type' => 'array',
746
+ 'default' => array()
747
+ ),
748
+ 'minify.cache.files' => array(
749
+ 'type' => 'array',
750
+ 'default' => array('https://ajax.googleapis.com')
751
+ ),
752
+
753
+ 'cdn.enabled' => array(
754
+ 'type' => 'boolean',
755
+ 'default' => false
756
+ ),
757
+ 'cdn.debug' => array(
758
+ 'type' => 'boolean',
759
+ 'default' => false
760
+ ),
761
+ 'cdn.engine' => array(
762
+ 'type' => 'string',
763
+ 'default' => 'ftp'
764
+ ),
765
+ 'cdn.uploads.enable' => array(
766
+ 'type' => 'boolean',
767
+ 'default' => true
768
+ ),
769
+ 'cdn.includes.enable' => array(
770
+ 'type' => 'boolean',
771
+ 'default' => true
772
+ ),
773
+ 'cdn.includes.files' => array(
774
+ 'type' => 'string',
775
+ 'default' => '*.css;*.js;*.gif;*.png;*.jpg;*.xml'
776
+ ),
777
+ 'cdn.theme.enable' => array(
778
+ 'type' => 'boolean',
779
+ 'default' => true
780
+ ),
781
+ 'cdn.theme.files' => array(
782
+ 'type' => 'string',
783
+ 'default' => '*.css;*.js;*.gif;*.png;*.jpg;*.ico;*.ttf;*.otf,*.woff'
784
+ ),
785
+ 'cdn.minify.enable' => array(
786
+ 'type' => 'boolean',
787
+ 'default' => true
788
+ ),
789
+ 'cdn.custom.enable' => array(
790
+ 'type' => 'boolean',
791
+ 'default' => true
792
+ ),
793
+ 'cdn.custom.files' => array(
794
+ 'type' => 'array',
795
+ 'default' => array(
796
+ 'favicon.ico',
797
+ '{wp_content_dir}/gallery/*',
798
+ '{wp_content_dir}/uploads/avatars/*',
799
+ '{plugins_dir}/wordpress-seo/css/xml-sitemap.xsl',
800
+ '{plugins_dir}/wp-minify/min*',
801
+ '{plugins_dir}/*.js',
802
+ '{plugins_dir}/*.css',
803
+ '{plugins_dir}/*.gif',
804
+ '{plugins_dir}/*.jpg',
805
+ '{plugins_dir}/*.png',
806
+ )
807
+ ),
808
+ 'cdn.import.external' => array(
809
+ 'type' => 'boolean',
810
+ 'default' => false
811
+ ),
812
+ 'cdn.import.files' => array(
813
+ 'type' => 'string',
814
+ 'default' => false
815
+ ),
816
+ 'cdn.queue.interval' => array(
817
+ 'type' => 'integer',
818
+ 'default' => 900
819
+ ),
820
+ 'cdn.queue.limit' => array(
821
+ 'type' => 'integer',
822
+ 'default' => 25
823
+ ),
824
+ 'cdn.force.rewrite' => array(
825
+ 'type' => 'boolean',
826
+ 'default' => false
827
+ ),
828
+ 'cdn.autoupload.enabled' => array(
829
+ 'type' => 'boolean',
830
+ 'default' => false
831
+ ),
832
+ 'cdn.autoupload.interval' => array(
833
+ 'type' => 'integer',
834
+ 'default' => 3600
835
+ ),
836
+ 'cdn.canonical_header' => array(
837
+ 'type' => 'boolean',
838
+ 'default' => false
839
+ ),
840
+ 'cdn.ftp.host' => array(
841
+ 'type' => 'string',
842
+ 'default' => ''
843
+ ),
844
+ 'cdn.ftp.user' => array(
845
+ 'type' => 'string',
846
+ 'default' => ''
847
+ ),
848
+ 'cdn.ftp.pass' => array(
849
+ 'type' => 'string',
850
+ 'default' => ''
851
+ ),
852
+ 'cdn.ftp.path' => array(
853
+ 'type' => 'string',
854
+ 'default' => ''
855
+ ),
856
+ 'cdn.ftp.pasv' => array(
857
+ 'type' => 'boolean',
858
+ 'default' => false
859
+ ),
860
+ 'cdn.ftp.domain' => array(
861
+ 'type' => 'array',
862
+ 'default' => array()
863
+ ),
864
+ 'cdn.ftp.ssl' => array(
865
+ 'type' => 'string',
866
+ 'default' => 'auto'
867
+ ),
868
+ 'cdn.s3.key' => array(
869
+ 'type' => 'string',
870
+ 'default' => ''
871
+ ),
872
+ 'cdn.s3.secret' => array(
873
+ 'type' => 'string',
874
+ 'default' => ''
875
+ ),
876
+ 'cdn.s3.bucket' => array(
877
+ 'type' => 'string',
878
+ 'default' => ''
879
+ ),
880
+ 'cdn.s3.cname' => array(
881
+ 'type' => 'array',
882
+ 'default' => array()
883
+ ),
884
+ 'cdn.s3.ssl' => array(
885
+ 'type' => 'string',
886
+ 'default' => 'auto'
887
+ ),
888
+ 'cdn.cf.key' => array(
889
+ 'type' => 'string',
890
+ 'default' => ''
891
+ ),
892
+ 'cdn.cf.secret' => array(
893
+ 'type' => 'string',
894
+ 'default' => ''
895
+ ),
896
+ 'cdn.cf.bucket' => array(
897
+ 'type' => 'string',
898
+ 'default' => ''
899
+ ),
900
+ 'cdn.cf.id' => array(
901
+ 'type' => 'string',
902
+ 'default' => ''
903
+ ),
904
+ 'cdn.cf.cname' => array(
905
+ 'type' => 'array',
906
+ 'default' => array()
907
+ ),
908
+ 'cdn.cf.ssl' => array(
909
+ 'type' => 'string',
910
+ 'default' => 'auto'
911
+ ),
912
+ 'cdn.cf2.key' => array(
913
+ 'type' => 'string',
914
+ 'default' => ''
915
+ ),
916
+ 'cdn.cf2.secret' => array(
917
+ 'type' => 'string',
918
+ 'default' => ''
919
+ ),
920
+ 'cdn.cf2.id' => array(
921
+ 'type' => 'string',
922
+ 'default' => ''
923
+ ),
924
+ 'cdn.cf2.cname' => array(
925
+ 'type' => 'array',
926
+ 'default' => array()
927
+ ),
928
+ 'cdn.cf2.ssl' => array(
929
+ 'type' => 'string',
930
+ 'default' => ''
931
+ ),
932
+ 'cdn.rscf.user' => array(
933
+ 'type' => 'string',
934
+ 'default' => ''
935
+ ),
936
+ 'cdn.rscf.key' => array(
937
+ 'type' => 'string',
938
+ 'default' => ''
939
+ ),
940
+ 'cdn.rscf.location' => array(
941
+ 'type' => 'string',
942
+ 'default' => 'us'
943
+ ),
944
+ 'cdn.rscf.container' => array(
945
+ 'type' => 'string',
946
+ 'default' => ''
947
+ ),
948
+ 'cdn.rscf.cname' => array(
949
+ 'type' => 'array',
950
+ 'default' => array()
951
+ ),
952
+ 'cdn.rscf.ssl' => array(
953
+ 'type' => 'string',
954
+ 'default' => 'auto'
955
+ ),
956
+ 'cdn.azure.user' => array(
957
+ 'type' => 'string',
958
+ 'default' => ''
959
+ ),
960
+ 'cdn.azure.key' => array(
961
+ 'type' => 'string',
962
+ 'default' => ''
963
+ ),
964
+ 'cdn.azure.container' => array(
965
+ 'type' => 'string',
966
+ 'default' => ''
967
+ ),
968
+ 'cdn.azure.cname' => array(
969
+ 'type' => 'array',
970
+ 'default' => array()
971
+ ),
972
+ 'cdn.azure.ssl' => array(
973
+ 'type' => 'string',
974
+ 'default' => 'auto'
975
+ ),
976
+ 'cdn.mirror.domain' => array(
977
+ 'type' => 'array',
978
+ 'default' => array()
979
+ ),
980
+ 'cdn.mirror.ssl' => array(
981
+ 'type' => 'string',
982
+ 'default' => 'auto'
983
+ ),
984
+ 'cdn.netdna.alias' => array(
985
+ 'type' => 'string',
986
+ 'default' => ''
987
+ ),
988
+ 'cdn.netdna.consumerkey' => array(
989
+ 'type' => 'string',
990
+ 'default' => ''
991
+ ),
992
+ 'cdn.netdna.consumersecret' => array(
993
+ 'type' => 'string',
994
+ 'default' => ''
995
+ ),
996
+ 'cdn.netdna.authorization_key' => array(
997
+ 'type' => 'string',
998
+ 'default' => ''
999
+ ),
1000
+ 'cdn.netdna.domain' => array(
1001
+ 'type' => 'array',
1002
+ 'default' => array()
1003
+ ),
1004
+ 'cdn.netdna.ssl' => array(
1005
+ 'type' => 'string',
1006
+ 'default' => 'auto'
1007
+ ),
1008
+ 'cdn.netdna.zone_id' => array(
1009
+ 'type' => 'integer',
1010
+ 'default' => 0
1011
+ ),
1012
+ 'cdn.maxcdn.authorization_key' => array(
1013
+ 'type' => 'string',
1014
+ 'default' => ''
1015
+ ),
1016
+ 'cdn.maxcdn.domain' => array(
1017
+ 'type' => 'array',
1018
+ 'default' => array()
1019
+ ),
1020
+ 'cdn.maxcdn.ssl' => array(
1021
+ 'type' => 'string',
1022
+ 'default' => 'auto'
1023
+ ),
1024
+ 'cdn.maxcdn.zone_id' => array(
1025
+ 'type' => 'integer',
1026
+ 'default' => 0
1027
+ ),
1028
+ 'cdn.cotendo.username' => array(
1029
+ 'type' => 'string',
1030
+ 'default' => ''
1031
+ ),
1032
+ 'cdn.cotendo.password' => array(
1033
+ 'type' => 'string',
1034
+ 'default' => ''
1035
+ ),
1036
+ 'cdn.cotendo.zones' => array(
1037
+ 'type' => 'array',
1038
+ 'default' => array()
1039
+ ),
1040
+ 'cdn.cotendo.domain' => array(
1041
+ 'type' => 'array',
1042
+ 'default' => array()
1043
+ ),
1044
+ 'cdn.cotendo.ssl' => array(
1045
+ 'type' => 'string',
1046
+ 'default' => 'auto'
1047
+ ),
1048
+ 'cdn.akamai.username' => array(
1049
+ 'type' => 'string',
1050
+ 'default' => ''
1051
+ ),
1052
+ 'cdn.akamai.password' => array(
1053
+ 'type' => 'string',
1054
+ 'default' => ''
1055
+ ),
1056
+ 'cdn.akamai.email_notification' => array(
1057
+ 'type' => 'array',
1058
+ 'default' => array()
1059
+ ),
1060
+ 'cdn.akamai.action' => array(
1061
+ 'type' => 'string',
1062
+ 'default' => 'invalidate'
1063
+ ),
1064
+ 'cdn.akamai.zone' => array(
1065
+ 'type' => 'string',
1066
+ 'default' => 'production'
1067
+ ),
1068
+ 'cdn.akamai.domain' => array(
1069
+ 'type' => 'array',
1070
+ 'default' => array()
1071
+ ),
1072
+ 'cdn.akamai.ssl' => array(
1073
+ 'type' => 'string',
1074
+ 'default' => 'auto'
1075
+ ),
1076
+ 'cdn.edgecast.account' => array(
1077
+ 'type' => 'string',
1078
+ 'default' => ''
1079
+ ),
1080
+ 'cdn.edgecast.token' => array(
1081
+ 'type' => 'string',
1082
+ 'default' => ''
1083
+ ),
1084
+ 'cdn.edgecast.domain' => array(
1085
+ 'type' => 'array',
1086
+ 'default' => array()
1087
+ ),
1088
+ 'cdn.edgecast.ssl' => array(
1089
+ 'type' => 'string',
1090
+ 'default' => 'auto'
1091
+ ),
1092
+ 'cdn.att.account' => array(
1093
+ 'type' => 'string',
1094
+ 'default' => ''
1095
+ ),
1096
+ 'cdn.att.token' => array(
1097
+ 'type' => 'string',
1098
+ 'default' => ''
1099
+ ),
1100
+ 'cdn.att.domain' => array(
1101
+ 'type' => 'array',
1102
+ 'default' => array()
1103
+ ),
1104
+ 'cdn.att.ssl' => array(
1105
+ 'type' => 'string',
1106
+ 'default' => 'auto'
1107
+ ),
1108
+ 'cdn.reject.admins' => array(
1109
+ 'type' => 'boolean',
1110
+ 'default' => false
1111
+ ),
1112
+ 'cdn.reject.logged_roles' => array(
1113
+ 'type' => 'boolean',
1114
+ 'default' => false
1115
+ ),
1116
+ 'cdn.reject.roles' => array(
1117
+ 'type' => 'array',
1118
+ 'default' => array()
1119
+ ),
1120
+ 'cdn.reject.ua' => array(
1121
+ 'type' => 'array',
1122
+ 'default' => array()
1123
+ ),
1124
+ 'cdn.reject.uri' => array(
1125
+ 'type' => 'array',
1126
+ 'default' => array()
1127
+ ),
1128
+ 'cdn.reject.files' => array(
1129
+ 'type' => 'array',
1130
+ 'default' => array(
1131
+ '{uploads_dir}/wpcf7_captcha/*',
1132
+ '{uploads_dir}/imagerotator.swf',
1133
+ '{plugins_dir}/wp-fb-autoconnect/facebook-platform/channel.html'
1134
+ )
1135
+ ),
1136
+ 'cdn.reject.ssl' => array(
1137
+ 'type' => 'boolean',
1138
+ 'default' => false
1139
+ ),
1140
+ 'cdncache.enabled' => array(
1141
+ 'type' => 'boolean',
1142
+ 'default' => false
1143
+ ),
1144
+
1145
+
1146
+ 'cloudflare.enabled' => array(
1147
+ 'type' => 'boolean',
1148
+ 'default' => false
1149
+ ),
1150
+ 'cloudflare.email' => array(
1151
+ 'type' => 'string',
1152
+ 'default' => ''
1153
+ ),
1154
+ 'cloudflare.key' => array(
1155
+ 'type' => 'string',
1156
+ 'default' => ''
1157
+ ),
1158
+ 'cloudflare.zone' => array(
1159
+ 'type' => 'string',
1160
+ 'default' => ''
1161
+ ),
1162
+ 'cloudflare.ips.ip4' => array(
1163
+ 'type' => 'array',
1164
+ 'default' => array("204.93.240.0/24", "204.93.177.0/24", "199.27.128.0/21", "173.245.48.0/20", "103.22.200.0/22", "141.101.64.0/18", "108.162.192.0/18","190.93.240.1/20","188.114.96.0/20", "198.41.128.0/17")
1165
+ ),
1166
+ 'cloudflare.ips.ip6' => array(
1167
+ 'type' => 'array',
1168
+ 'default' => array("2400:cb00::/32", "2606:4700::/32", "2803:f800::/32")
1169
+ ),
1170
+
1171
+ 'varnish.enabled' => array(
1172
+ 'type' => 'boolean',
1173
+ 'default' => false
1174
+ ),
1175
+ 'varnish.debug' => array(
1176
+ 'type' => 'boolean',
1177
+ 'default' => false
1178
+ ),
1179
+ 'varnish.servers' => array(
1180
+ 'type' => 'array',
1181
+ 'default' => array()
1182
+ ),
1183
+
1184
+ 'browsercache.enabled' => array(
1185
+ 'type' => 'boolean',
1186
+ 'default' => true
1187
+ ),
1188
+ 'browsercache.no404wp' => array(
1189
+ 'type' => 'boolean',
1190
+ 'default' => false
1191
+ ),
1192
+ 'browsercache.no404wp.exceptions' => array(
1193
+ 'type' => 'array',
1194
+ 'default' => array(
1195
+ 'robots\.txt',
1196
+ 'sitemap(_index)?\.xml(\.gz)?',
1197
+ '[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?'
1198
+ )
1199
+ ),
1200
+ 'browsercache.cssjs.last_modified' => array(
1201
+ 'type' => 'boolean',
1202
+ 'default' => true
1203
+ ),
1204
+ 'browsercache.cssjs.compression' => array(
1205
+ 'type' => 'boolean',
1206
+ 'default' => true
1207
+ ),
1208
+ 'browsercache.cssjs.expires' => array(
1209
+ 'type' => 'boolean',
1210
+ 'default' => false
1211
+ ),
1212
+ 'browsercache.cssjs.lifetime' => array(
1213
+ 'type' => 'integer',
1214
+ 'default' => 31536000
1215
+ ),
1216
+ 'browsercache.cssjs.nocookies' => array(
1217
+ 'type' => 'boolean',
1218
+ 'default' => false
1219
+ ),
1220
+ 'browsercache.cssjs.cache.control' => array(
1221
+ 'type' => 'boolean',
1222
+ 'default' => false
1223
+ ),
1224
+ 'browsercache.cssjs.cache.policy' => array(
1225
+ 'type' => 'string',
1226
+ 'default' => 'cache_public_maxage'
1227
+ ),
1228
+ 'browsercache.cssjs.etag' => array(
1229
+ 'type' => 'boolean',
1230
+ 'default' => false
1231
+ ),
1232
+ 'browsercache.cssjs.w3tc' => array(
1233
+ 'type' => 'boolean',
1234
+ 'default' => false
1235
+ ),
1236
+ 'browsercache.cssjs.replace' => array(
1237
+ 'type' => 'boolean',
1238
+ 'default' => false
1239
+ ),
1240
+ 'browsercache.html.compression' => array(
1241
+ 'type' => 'boolean',
1242
+ 'default' => true
1243
+ ),
1244
+ 'browsercache.html.last_modified' => array(
1245
+ 'type' => 'boolean',
1246
+ 'default' => true
1247
+ ),
1248
+ 'browsercache.html.expires' => array(
1249
+ 'type' => 'boolean',
1250
+ 'default' => false
1251
+ ),
1252
+ 'browsercache.html.lifetime' => array(
1253
+ 'type' => 'integer',
1254
+ 'default' => 3600
1255
+ ),
1256
+ 'browsercache.html.cache.control' => array(
1257
+ 'type' => 'boolean',
1258
+ 'default' => false
1259
+ ),
1260
+ 'browsercache.html.cache.policy' => array(
1261
+ 'type' => 'string',
1262
+ 'default' => 'cache_public_maxage'
1263
+ ),
1264
+ 'browsercache.html.etag' => array(
1265
+ 'type' => 'boolean',
1266
+ 'default' => false
1267
+ ),
1268
+ 'browsercache.html.w3tc' => array(
1269
+ 'type' => 'boolean',
1270
+ 'default' => false
1271
+ ),
1272
+ 'browsercache.html.replace' => array(
1273
+ 'type' => 'boolean',
1274
+ 'default' => false
1275
+ ),
1276
+ 'browsercache.other.last_modified' => array(
1277
+ 'type' => 'boolean',
1278
+ 'default' => true
1279
+ ),
1280
+ 'browsercache.other.compression' => array(
1281
+ 'type' => 'boolean',
1282
+ 'default' => true
1283
+ ),
1284
+ 'browsercache.other.expires' => array(
1285
+ 'type' => 'boolean',
1286
+ 'default' => false
1287
+ ),
1288
+ 'browsercache.other.lifetime' => array(
1289
+ 'type' => 'integer',
1290
+ 'default' => 31536000
1291
+ ),
1292
+ 'browsercache.other.nocookies' => array(
1293
+ 'type' => 'boolean',
1294
+ 'default' => false
1295
+ ),
1296
+ 'browsercache.other.cache.control' => array(
1297
+ 'type' => 'boolean',
1298
+ 'default' => false
1299
+ ),
1300
+ 'browsercache.other.cache.policy' => array(
1301
+ 'type' => 'string',
1302
+ 'default' => 'cache_public_maxage'
1303
+ ),
1304
+ 'browsercache.other.etag' => array(
1305
+ 'type' => 'boolean',
1306
+ 'default' => false
1307
+ ),
1308
+ 'browsercache.other.w3tc' => array(
1309
+ 'type' => 'boolean',
1310
+ 'default' => false
1311
+ ),
1312
+ 'browsercache.other.replace' => array(
1313
+ 'type' => 'boolean',
1314
+ 'default' => false
1315
+ ),
1316
+ 'browsercache.timestamp' => array(
1317
+ 'type' => 'string',
1318
+ 'default' => ''
1319
+ ),
1320
+
1321
+ 'mobile.enabled' => array(
1322
+ 'type' => 'boolean',
1323
+ 'default' => false
1324
+ ),
1325
+ 'mobile.rgroups' => array(
1326
+ 'type' => 'array',
1327
+ 'default' => array(
1328
+ 'high' => array(
1329
+ 'theme' => '',
1330
+ 'enabled' => false,
1331
+ 'redirect' => '',
1332
+ 'agents' => array(
1333
+ 'acer\ s100',
1334
+ 'android',
1335
+ 'archos5',
1336
+ 'bada',
1337
+ 'blackberry9500',
1338
+ 'blackberry9530',
1339
+ 'blackberry9550',
1340
+ 'blackberry\ 9800',
1341
+ 'cupcake',
1342
+ 'docomo\ ht\-03a',
1343
+ 'dream',
1344
+ 'froyo',
1345
+ 'googlebot-mobile',
1346
+ 'htc\ hero',
1347
+ 'htc\ magic',
1348
+ 'htc_dream',
1349
+ 'htc_magic',
1350
+ 'iemobile/7.0',
1351
+ 'incognito',
1352
+ 'ipad',
1353
+ 'iphone',
1354
+ 'ipod',
1355
+ 'kindle',
1356
+ 'lg\-gw620',
1357
+ 'liquid\ build',
1358
+ 'maemo',
1359
+ 'mot\-mb200',
1360
+ 'mot\-mb300',
1361
+ 'nexus\ one',
1362
+ 'opera\ mini',
1363
+ 's8000',
1364
+ 'samsung\-s8000',
1365
+ 'series60.*webkit',
1366
+ 'series60/5\.0',
1367
+ 'sonyericssone10',
1368
+ 'sonyericssonu20',
1369
+ 'sonyericssonx10',
1370
+ 't\-mobile\ mytouch\ 3g',
1371
+ 't\-mobile\ opal',
1372
+ 'tattoo',
1373
+ 'webmate',
1374
+ 'webos'
1375
+ )
1376
+ ),
1377
+ 'low' => array(
1378
+ 'theme' => '',
1379
+ 'enabled' => false,
1380
+ 'redirect' => '',
1381
+ 'agents' => array(
1382
+ '2\.0\ mmp',
1383
+ '240x320',
1384
+ 'alcatel',
1385
+ 'amoi',
1386
+ 'asus',
1387
+ 'au\-mic',
1388
+ 'audiovox',
1389
+ 'avantgo',
1390
+ 'benq',
1391
+ 'bird',
1392
+ 'blackberry',
1393
+ 'blazer',
1394
+ 'cdm',
1395
+ 'cellphone',
1396
+ 'danger',
1397
+ 'ddipocket',
1398
+ 'docomo',
1399
+ 'dopod',
1400
+ 'elaine/3\.0',
1401
+ 'ericsson',
1402
+ 'eudoraweb',
1403
+ 'fly',
1404
+ 'haier',
1405
+ 'hiptop',
1406
+ 'hp\.ipaq',
1407
+ 'htc',
1408
+ 'huawei',
1409
+ 'i\-mobile',
1410
+ 'iemobile',
1411
+ 'j\-phone',
1412
+ 'kddi',
1413
+ 'konka',
1414
+ 'kwc',
1415
+ 'kyocera/wx310k',
1416
+ 'lenovo',
1417
+ 'lg',
1418
+ 'lg/u990',
1419
+ 'lge\ vx',
1420
+ 'midp',
1421
+ 'midp\-2\.0',
1422
+ 'mmef20',
1423
+ 'mmp',
1424
+ 'mobilephone',
1425
+ 'mot\-v',
1426
+ 'motorola',
1427
+ 'netfront',
1428
+ 'newgen',
1429
+ 'newt',
1430
+ 'nintendo\ ds',
1431
+ 'nintendo\ wii',
1432
+ 'nitro',
1433
+ 'nokia',
1434
+ 'novarra',
1435
+ 'o2',
1436
+ 'openweb',
1437
+ 'opera\ mobi',
1438
+ 'opera\.mobi',
1439
+ 'palm',
1440
+ 'panasonic',
1441
+ 'pantech',
1442
+ 'pdxgw',
1443
+ 'pg',
1444
+ 'philips',
1445
+ 'phone',
1446
+ 'playstation\ portable',
1447
+ 'portalmmm',
1448
+ '\bppc\b',
1449
+ 'proxinet',
1450
+ 'psp',
1451
+ 'qtek',
1452
+ 'sagem',
1453
+ 'samsung',
1454
+ 'sanyo',
1455
+ 'sch',
1456
+ 'sec',
1457
+ 'sendo',
1458
+ 'sgh',
1459
+ 'sharp',
1460
+ 'sharp\-tq\-gx10',
1461
+ 'small',
1462
+ 'smartphone',
1463
+ 'softbank',
1464
+ 'sonyericsson',
1465
+ 'sph',
1466
+ 'symbian',
1467
+ 'symbian\ os',
1468
+ 'symbianos',
1469
+ 'toshiba',
1470
+ 'treo',
1471
+ 'ts21i\-10',
1472
+ 'up\.browser',
1473
+ 'up\.link',
1474
+ 'uts',
1475
+ 'vertu',
1476
+ 'vodafone',
1477
+ 'wap',
1478
+ 'willcome',
1479
+ 'windows\ ce',
1480
+ 'windows\.ce',
1481
+ 'winwap',
1482
+ 'xda',
1483
+ 'zte'
1484
+ )
1485
+ )
1486
+ )
1487
+ ),
1488
+
1489
+
1490
+ 'referrer.enabled' => array(
1491
+ 'type' => 'boolean',
1492
+ 'default' => false
1493
+ ),
1494
+ 'referrer.rgroups' => array(
1495
+ 'type' => 'array',
1496
+ 'default' => array(
1497
+ 'search_engines' => array(
1498
+ 'theme' => '',
1499
+ 'enabled' => false,
1500
+ 'redirect' => '',
1501
+ 'referrers' => array(
1502
+ 'google\.com',
1503
+ 'yahoo\.com',
1504
+ 'bing\.com',
1505
+ 'ask\.com',
1506
+ 'msn\.com'
1507
+ )
1508
+ )
1509
+ )
1510
+ ),
1511
+
1512
+
1513
+ 'common.support' => array(
1514
+ 'type' => 'string',
1515
+ 'default' => ''
1516
+ ),
1517
+ 'common.install' => array(
1518
+ 'type' => 'integer',
1519
+ 'default' => 0
1520
+ ),
1521
+ 'common.tweeted' => array(
1522
+ 'type' => 'boolean',
1523
+ 'default' => false
1524
+ ),
1525
+ 'config.check' => array(
1526
+ 'type' => 'boolean',
1527
+ 'default' => true
1528
+ ),
1529
+ 'config.path' => array(
1530
+ 'type' => 'string',
1531
+ 'default' => ''
1532
+ ),
1533
+ 'widget.latest.items' => array(
1534
+ 'type' => 'integer',
1535
+ 'default' => 3
1536
+ ),
1537
+ 'widget.latest_news.items' => array(
1538
+ 'type' => 'integer',
1539
+ 'default' => 5
1540
+ ),
1541
+ 'widget.pagespeed.enabled' => array(
1542
+ 'type' => 'boolean',
1543
+ 'default' => true
1544
+ ),
1545
+ 'widget.pagespeed.key' => array(
1546
+ 'type' => 'string',
1547
+ 'default' => ''
1548
+ ),
1549
+
1550
+ 'notes.wp_content_changed_perms' => array(
1551
+ 'type' => 'boolean',
1552
+ 'default' => true
1553
+ ),
1554
+ 'notes.wp_content_perms' => array(
1555
+ 'type' => 'boolean',
1556
+ 'default' => true
1557
+ ),
1558
+ 'notes.theme_changed' => array(
1559
+ 'type' => 'boolean',
1560
+ 'default' => false
1561
+ ),
1562
+ 'notes.wp_upgraded' => array(
1563
+ 'type' => 'boolean',
1564
+ 'default' => false
1565
+ ),
1566
+ 'notes.plugins_updated' => array(
1567
+ 'type' => 'boolean',
1568
+ 'default' => false
1569
+ ),
1570
+ 'notes.cdn_upload' => array(
1571
+ 'type' => 'boolean',
1572
+ 'default' => false
1573
+ ),
1574
+ 'notes.cdn_reupload' => array(
1575
+ 'type' => 'boolean',
1576
+ 'default' => false
1577
+ ),
1578
+ 'notes.need_empty_pgcache' => array(
1579
+ 'type' => 'boolean',
1580
+ 'default' => false
1581
+ ),
1582
+ 'notes.need_empty_minify' => array(
1583
+ 'type' => 'boolean',
1584
+ 'default' => false
1585
+ ),
1586
+ 'notes.need_empty_objectcache' => array(
1587
+ 'type' => 'boolean',
1588
+ 'default' => false
1589
+ ),
1590
+ 'notes.root_rules' => array(
1591
+ 'type' => 'boolean',
1592
+ 'default' => true
1593
+ ),
1594
+ 'notes.rules' => array(
1595
+ 'type' => 'boolean',
1596
+ 'default' => true
1597
+ ),
1598
+ 'notes.pgcache_rules_wpsc' => array(
1599
+ 'type' => 'boolean',
1600
+ 'default' => true
1601
+ ),
1602
+ 'notes.support_us' => array(
1603
+ 'type' => 'boolean',
1604
+ 'default' => true
1605
+ ),
1606
+ 'notes.no_curl' => array(
1607
+ 'type' => 'boolean',
1608
+ 'default' => true
1609
+ ),
1610
+ 'notes.no_zlib' => array(
1611
+ 'type' => 'boolean',
1612
+ 'default' => true
1613
+ ),
1614
+ 'notes.zlib_output_compression' => array(
1615
+ 'type' => 'boolean',
1616
+ 'default' => true
1617
+ ),
1618
+ 'notes.no_permalink_rules' => array(
1619
+ 'type' => 'boolean',
1620
+ 'default' => true
1621
+ ),
1622
+ 'notes.browsercache_rules_no404wp' => array(
1623
+ 'type' => 'boolean',
1624
+ 'default' => true
1625
+ ),
1626
+ 'notes.cloudflare_plugin' => array(
1627
+ 'type' => 'boolean',
1628
+ 'default' => true
1629
+ ),
1630
+
1631
+ 'timelimit.email_send' => array(
1632
+ 'type' => 'integer',
1633
+ 'default' => 180
1634
+ ),
1635
+ 'timelimit.varnish_purge' => array(
1636
+ 'type' => 'integer',
1637
+ 'default' => 300
1638
+ ),
1639
+ 'timelimit.cache_flush' => array(
1640
+ 'type' => 'integer',
1641
+ 'default' => 600
1642
+ ),
1643
+ 'timelimit.cache_gc' => array(
1644
+ 'type' => 'integer',
1645
+ 'default' => 600
1646
+ ),
1647
+ 'timelimit.cdn_upload' => array(
1648
+ 'type' => 'integer',
1649
+ 'default' => 600
1650
+ ),
1651
+ 'timelimit.cdn_delete' => array(
1652
+ 'type' => 'integer',
1653
+ 'default' => 300
1654
+ ),
1655
+ 'timelimit.cdn_purge' => array(
1656
+ 'type' => 'integer',
1657
+ 'default' => 300
1658
+ ),
1659
+ 'timelimit.cdn_import' => array(
1660
+ 'type' => 'integer',
1661
+ 'default' => 600
1662
+ ),
1663
+ 'timelimit.cdn_test' => array(
1664
+ 'type' => 'integer',
1665
+ 'default' => 300
1666
+ ),
1667
+ 'timelimit.cdn_container_create' => array(
1668
+ 'type' => 'integer',
1669
+ 'default' => 300
1670
+ ),
1671
+ 'timelimit.cloudflare_api_request' => array(
1672
+ 'type' => 'integer',
1673
+ 'default' => 180
1674
+ ),
1675
+ 'timelimit.domain_rename' => array(
1676
+ 'type' => 'integer',
1677
+ 'default' => 120
1678
+ ),
1679
+ 'timelimit.minify_recommendations' => array(
1680
+ 'type' => 'integer',
1681
+ 'default' => 600
1682
+ ),
1683
+
1684
+ 'minify.auto.filename_length' => array(
1685
+ 'type' => 'integer',
1686
+ 'default' => 150
1687
+ ),
1688
+ 'minify.auto.disable_filename_length_test' => array(
1689
+ 'type' => 'boolean',
1690
+ 'default' => false,
1691
+ ),
1692
+ 'common.instance_id' => array(
1693
+ 'type' => 'integer',
1694
+ 'default' => 0
1695
+ ),
1696
+ 'common.force_master' => array(
1697
+ 'type' => 'boolean',
1698
+ 'default' => true,
1699
+ 'master_only' => 'true'
1700
+ ),
1701
+ 'newrelic.enabled' => array(
1702
+ 'type' => 'boolean',
1703
+ 'default' => false,
1704
+ ),
1705
+ 'newrelic.api_key' => array(
1706
+ 'type' => 'string',
1707
+ 'default' => '',
1708
+ 'master_only' => 'true'
1709
+ ),
1710
+ 'newrelic.account_id' => array(
1711
+ 'type' => 'string',
1712
+ 'default' => '',
1713
+ 'master_only' => 'true'
1714
+ ),
1715
+ 'newrelic.application_id' => array(
1716
+ 'type' => 'integer',
1717
+ 'default' => 0,
1718
+ ),
1719
+ 'newrelic.appname' => array(
1720
+ 'type' => 'string',
1721
+ 'default' => '',
1722
+ ),
1723
+ 'newrelic.accept.logged_roles' => array(
1724
+ 'type' => 'boolean',
1725
+ 'default' => true
1726
+ ),
1727
+ 'newrelic.accept.roles' => array(
1728
+ 'type' => 'array',
1729
+ 'default' => array('contributor')
1730
+ ),
1731
+ 'newrelic.use_php_function' => array (
1732
+ 'type' => 'boolean',
1733
+ 'default' => true,
1734
+ ),
1735
+ 'notes.new_relic_page_load_notification' => array(
1736
+ 'type' => 'boolean',
1737
+ 'default' => true
1738
+ ),
1739
+ 'newrelic.appname_prefix' => array (
1740
+ 'type' => 'string',
1741
+ 'default' => 'Child Site - '
1742
+ ),
1743
+ 'newrelic.merge_with_network' => array (
1744
+ 'type' => 'boolean',
1745
+ 'default' => true
1746
+ ),
1747
+ 'newrelic.cache_time' => array(
1748
+ 'type' => 'integer',
1749
+ 'default' => 5
1750
+ ),
1751
+ 'newrelic.enable_xmit' => array(
1752
+ 'type' => 'boolean',
1753
+ 'default' => false
1754
+ ),
1755
+ 'newrelic.use_network_wide_id' => array(
1756
+ 'type' => 'boolean',
1757
+ 'default' => false,
1758
+ 'master_only' => 'true'
1759
+ ),
1760
+ 'pgcache.late_init' => array (
1761
+ 'type' => 'boolean',
1762
+ 'default' => false
1763
+ ),
1764
+ 'newrelic.include_rum' => array(
1765
+ 'type' => 'boolean',
1766
+ 'default' => true,
1767
+ )
1768
+ );
1769
+
1770
+
1771
+ /*
1772
+ * Descriptors of configuration keys
1773
+ * for admin config
1774
+ */
1775
+ $keys_admin = array(
1776
+ 'browsercache.configuration_sealed' => array(
1777
+ 'type' => 'boolean',
1778
+ 'default' => false,
1779
+ 'master_only' => 'true'
1780
+ ),
1781
+ 'cdn.configuration_sealed' => array(
1782
+ 'type' => 'boolean',
1783
+ 'default' => false,
1784
+ 'master_only' => 'true'
1785
+ ),
1786
+ 'cloudflare.configuration_sealed' => array(
1787
+ 'type' => 'boolean',
1788
+ 'default' => false,
1789
+ 'master_only' => 'true'
1790
+ ),
1791
+ 'common.install' => array(
1792
+ 'type' => 'integer',
1793
+ 'default' => 0,
1794
+ 'master_only' => 'true'
1795
+ ),
1796
+ 'common.visible_by_master_only' => array(
1797
+ 'type' => 'boolean',
1798
+ 'default' => true,
1799
+ 'master_only' => 'true'
1800
+ ),
1801
+ 'dbcache.configuration_sealed' => array(
1802
+ 'type' => 'boolean',
1803
+ 'default' => false,
1804
+ 'master_only' => 'true'
1805
+ ),
1806
+ 'minify.configuration_sealed' => array(
1807
+ 'type' => 'boolean',
1808
+ 'default' => false,
1809
+ 'master_only' => 'true'
1810
+ ),
1811
+ 'objectcache.configuration_sealed' => array(
1812
+ 'type' => 'boolean',
1813
+ 'default' => false,
1814
+ 'master_only' => 'true'
1815
+ ),
1816
+ 'pgcache.configuration_sealed' => array(
1817
+ 'type' => 'boolean',
1818
+ 'default' => false,
1819
+ 'master_only' => 'true'
1820
+ ),
1821
+ 'previewmode.enabled' => array(
1822
+ 'type' => 'boolean',
1823
+ 'default' => false,
1824
+ 'master_only' => 'true'
1825
+ ),
1826
+ 'varnish.configuration_sealed' => array(
1827
+ 'type' => 'boolean',
1828
+ 'default' => false,
1829
+ 'master_only' => 'true'
1830
+ ),
1831
+ 'fragmentcache.configuration_sealed' => array(
1832
+ 'type' => 'boolean',
1833
+ 'default' => false,
1834
+ 'master_only' => 'true'
1835
+ )
1836
+ ,'newrelic.configuration_sealed' => array(
1837
+ 'type' => 'boolean',
1838
+ 'default' => false,
1839
+ 'master_only' => 'true'
1840
+ )
1841
+ ,'notes.minify_error' => array(
1842
+ 'type' => 'boolean',
1843
+ 'default' => false
1844
+ )
1845
+ ,'minify.error.last' => array(
1846
+ 'type' => 'string',
1847
+ 'default' => ''
1848
+ ),
1849
+ 'minify.error.notification' => array(
1850
+ 'type' => 'string',
1851
+ 'default' => ''
1852
+ ),
1853
+ 'minify.error.notification.last' => array(
1854
+ 'type' => 'integer',
1855
+ 'default' => 0
1856
+ ),
1857
+ 'minify.error.file' => array(
1858
+ 'type' => 'string',
1859
+ 'default' => ''
1860
+ ),
1861
+ 'notes.remove_w3tc' => array(
1862
+ 'type' => 'boolean',
1863
+ 'default' => false
1864
+ )
1865
+ );
1866
+
1867
+ $keys_admin['common.install']['default'] = time();
1868
+
1869
+
1870
+
1871
+ /*
1872
+ * Descriptors how sealed configuration keys affect overriding
1873
+ */
1874
+ $sealing_keys_scope = array(
1875
+ array(
1876
+ 'key' => 'browsercache.configuration_sealed',
1877
+ 'prefix' => 'browsercache.'
1878
+ ),
1879
+ array(
1880
+ 'key' => 'cdn.configuration_sealed',
1881
+ 'prefix' => 'cdn.'
1882
+ ),
1883
+ array(
1884
+ 'key' => 'cloudflare.configuration_sealed',
1885
+ 'prefix' => 'cloudflare.'
1886
+ ),
1887
+ array(
1888
+ 'key' => 'dbcache.configuration_sealed',
1889
+ 'prefix' => 'dbcache.'
1890
+ ),
1891
+ array(
1892
+ 'key' => 'minify.configuration_sealed',
1893
+ 'prefix' => 'minify.'
1894
+ ),
1895
+ array(
1896
+ 'key' => 'objectcache.configuration_sealed',
1897
+ 'prefix' => 'objectcache.'
1898
+ ),
1899
+ array(
1900
+ 'key' => 'fragmentcache.configuration_sealed',
1901
+ 'prefix' => 'fragmentcache.'
1902
+ ),
1903
+ array(
1904
+ 'key' => 'pgcache.configuration_sealed',
1905
+ 'prefix' => 'pgcache.'
1906
+ ),
1907
+ array(
1908
+ 'key' => 'varnish.configuration_sealed',
1909
+ 'prefix' => 'varnish.'
1910
+ )
1911
+ );
1912
+
configs/0.9.2.6-ConfigKeys.php ADDED
@@ -0,0 +1,1860 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Descriptors of configuration keys
5
+ * for config
6
+ */
7
+
8
+ $keys = array(
9
+ 'cluster.messagebus.debug' => array(
10
+ 'type' => 'boolean',
11
+ 'default' => false
12
+ ),
13
+ 'cluster.messagebus.enabled' => array(
14
+ 'type' => 'boolean',
15
+ 'default' => false
16
+ ),
17
+ 'cluster.messagebus.sns.region' => array(
18
+ 'type' => 'string',
19
+ 'default' => ''
20
+ ),
21
+ 'cluster.messagebus.sns.api_key' => array(
22
+ 'type' => 'string',
23
+ 'default' => ''
24
+ ),
25
+ 'cluster.messagebus.sns.api_secret' => array(
26
+ 'type' => 'string',
27
+ 'default' => ''
28
+ ),
29
+ 'cluster.messagebus.sns.topic_arn' => array(
30
+ 'type' => 'string',
31
+ 'default' => ''
32
+ ),
33
+
34
+ 'dbcache.debug' => array(
35
+ 'type' => 'boolean',
36
+ 'default' => false
37
+ ),
38
+ 'dbcache.enabled' => array(
39
+ 'type' => 'boolean',
40
+ 'default' => false
41
+ ),
42
+ 'dbcache.engine' => array(
43
+ 'type' => 'string',
44
+ 'default' => 'file'
45
+ ),
46
+ 'dbcache.file.gc' => array(
47
+ 'type' => 'integer',
48
+ 'default' => 3600
49
+ ),
50
+ 'dbcache.file.locking' => array(
51
+ 'type' => 'boolean',
52
+ 'default' => false
53
+ ),
54
+ 'dbcache.lifetime' => array(
55
+ 'type' => 'integer',
56
+ 'default' => 180
57
+ ),
58
+ 'dbcache.memcached.persistant' => array(
59
+ 'type' => 'boolean',
60
+ 'default' => true
61
+ ),
62
+ 'dbcache.memcached.servers' => array(
63
+ 'type' => 'array',
64
+ 'default' => array(
65
+ '127.0.0.1:11211'
66
+ )
67
+ ),
68
+ 'dbcache.reject.cookie' => array(
69
+ 'type' => 'array',
70
+ 'default' => array()
71
+ ),
72
+ 'dbcache.reject.logged' => array(
73
+ 'type' => 'boolean',
74
+ 'default' => true
75
+ ),
76
+ 'dbcache.reject.sql' => array(
77
+ 'type' => 'array',
78
+ 'default' => array(
79
+ 'gdsr_',
80
+ 'wp_rg_'
81
+ )
82
+ ),
83
+ 'dbcache.reject.uri' => array(
84
+ 'type' => 'array',
85
+ 'default' => array()
86
+ ),
87
+ 'dbcache.reject.words' => array(
88
+ 'type' => 'array',
89
+ 'default' => array(
90
+ '^\s*insert\b',
91
+ '^\s*delete\b',
92
+ '^\s*update\b',
93
+ '^\s*replace\b',
94
+ '^\s*create\b',
95
+ '^\s*alter\b',
96
+ '^\s*show\b',
97
+ '^\s*set\b',
98
+ '\bautoload\s+=\s+\'yes\'',
99
+ '\bsql_calc_found_rows\b',
100
+ '\bfound_rows\(\)',
101
+ '\bw3tc_request_data\b'
102
+ )
103
+ ),
104
+
105
+ 'objectcache.enabled' => array(
106
+ 'type' => 'boolean',
107
+ 'default' => false
108
+ ),
109
+ 'objectcache.debug' => array(
110
+ 'type' => 'boolean',
111
+ 'default' => false
112
+ ),
113
+ 'objectcache.engine' => array(
114
+ 'type' => 'string',
115
+ 'default' => 'file'
116
+ ),
117
+ 'objectcache.file.gc' => array(
118
+ 'type' => 'integer',
119
+ 'default' => 3600
120
+ ),
121
+ 'objectcache.file.locking' => array(
122
+ 'type' => 'boolean',
123
+ 'default' => false
124
+ ),
125
+ 'objectcache.memcached.servers' => array(
126
+ 'type' => 'array',
127
+ 'default' => array(
128
+ '127.0.0.1:11211'
129
+ )
130
+ ),
131
+ 'objectcache.memcached.persistant' => array(
132
+ 'type' => 'boolean',
133
+ 'default' => true
134
+ ),
135
+ 'objectcache.groups.global' => array(
136
+ 'type' => 'array',
137
+ 'default' => array(
138
+ 'users',
139
+ 'userlogins',
140
+ 'usermeta',
141
+ 'user_meta',
142
+ 'site-transient',
143
+ 'site-options',
144
+ 'site-lookup',
145
+ 'blog-lookup',
146
+ 'blog-details',
147
+ 'rss',
148
+ 'global-posts'
149
+ )
150
+ ),
151
+ 'objectcache.groups.nonpersistent' => array(
152
+ 'type' => 'array',
153
+ 'default' => array(
154
+ 'comment',
155
+ 'counts',
156
+ 'plugins'
157
+ )
158
+ ),
159
+ 'objectcache.lifetime' => array(
160
+ 'type' => 'integer',
161
+ 'default' => 180
162
+ ),
163
+
164
+ 'fragmentcache.enabled' => array(
165
+ 'type' => 'boolean',
166
+ 'default' => false
167
+ ),
168
+ 'fragmentcache.debug' => array(
169
+ 'type' => 'boolean',
170
+ 'default' => false
171
+ ),
172
+ 'fragmentcache.engine' => array(
173
+ 'type' => 'string',
174
+ 'default' => 'file'
175
+ ),
176
+ 'fragmentcache.file.gc' => array(
177
+ 'type' => 'integer',
178
+ 'default' => 3600
179
+ ),
180
+ 'fragmentcache.file.locking' => array(
181
+ 'type' => 'boolean',
182
+ 'default' => false
183
+ ),
184
+ 'fragmentcache.memcached.servers' => array(
185
+ 'type' => 'array',
186
+ 'default' => array(
187
+ '127.0.0.1:11211'
188
+ )
189
+ ),
190
+ 'fragmentcache.memcached.persistant' => array(
191
+ 'type' => 'boolean',
192
+ 'default' => true
193
+ ),
194
+ 'fragmentcache.lifetime' => array(
195
+ 'type' => 'integer',
196
+ 'default' => 180
197
+ ),
198
+ 'fragmentcache.groups' => array(
199
+ 'type' => 'array',
200
+ 'default' => array()
201
+ ),
202
+
203
+ 'pgcache.enabled' => array(
204
+ 'type' => 'boolean',
205
+ 'default' => false
206
+ ),
207
+ 'pgcache.comment_cookie_ttl' => array(
208
+ 'type' => 'integer',
209
+ 'default' => 1800
210
+ ),
211
+ 'pgcache.debug' => array(
212
+ 'type' => 'boolean',
213
+ 'default' => false
214
+ ),
215
+ 'pgcache.engine' => array(
216
+ 'type' => 'string',
217
+ 'default' => 'file_generic'
218
+ ),
219
+ 'pgcache.file.gc' => array(
220
+ 'type' => 'integer',
221
+ 'default' => 3600
222
+ ),
223
+ 'pgcache.file.nfs' => array(
224
+ 'type' => 'boolean',
225
+ 'default' => false
226
+ ),
227
+ 'pgcache.file.locking' => array(
228
+ 'type' => 'boolean',
229
+ 'default' => false
230
+ ),
231
+ 'pgcache.lifetime' => array(
232
+ 'type' => 'integer',
233
+ 'default' => 3600
234
+ ),
235
+ 'pgcache.memcached.servers' => array(
236
+ 'type' => 'array',
237
+ 'default' => array(
238
+ '127.0.0.1:11211'
239
+ )
240
+ ),
241
+ 'pgcache.memcached.persistant' => array(
242
+ 'type' => 'boolean',
243
+ 'default' => true
244
+ ),
245
+ 'pgcache.check.domain' => array(
246
+ 'type' => 'boolean',
247
+ 'default' => false
248
+ ),
249
+ 'pgcache.cache.query' => array(
250
+ 'type' => 'boolean',
251
+ 'default' => true
252
+ ),
253
+ 'pgcache.cache.home' => array(
254
+ 'type' => 'boolean',
255
+ 'default' => true
256
+ ),
257
+ 'pgcache.cache.feed' => array(
258
+ 'type' => 'boolean',
259
+ 'default' => false
260
+ ),
261
+ 'pgcache.cache.nginx_handle_xml' => array(
262
+ 'type' => 'boolean',
263
+ 'default' => false
264
+ ),
265
+ 'pgcache.cache.ssl' => array(
266
+ 'type' => 'boolean',
267
+ 'default' => false
268
+ ),
269
+ 'pgcache.cache.404' => array(
270
+ 'type' => 'boolean',
271
+ 'default' => false
272
+ ),
273
+ 'pgcache.cache.flush' => array(
274
+ 'type' => 'boolean',
275
+ 'default' => false
276
+ ),
277
+ 'pgcache.cache.headers' => array(
278
+ 'type' => 'array',
279
+ 'default' => array(
280
+ 'Last-Modified',
281
+ 'Content-Type',
282
+ 'X-Pingback',
283
+ 'P3P'
284
+ )
285
+ ),
286
+ 'pgcache.compatibility' => array(
287
+ 'type' => 'boolean',
288
+ 'default' => false
289
+ ),
290
+ 'pgcache.accept.uri' => array(
291
+ 'type' => 'array',
292
+ 'default' => array(
293
+ 'sitemap(_index)?\.xml(\.gz)?',
294
+ '[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?'
295
+ )
296
+ ),
297
+ 'pgcache.accept.files' => array(
298
+ 'type' => 'array',
299
+ 'default' => array(
300
+ 'wp-comments-popup.php',
301
+ 'wp-links-opml.php',
302
+ 'wp-locations.php'
303
+ )
304
+ ),
305
+ 'pgcache.reject.front_page' => array(
306
+ 'type' => 'boolean',
307
+ 'default' => false
308
+ ),
309
+ 'pgcache.reject.logged' => array(
310
+ 'type' => 'boolean',
311
+ 'default' => true
312
+ ),
313
+ 'pgcache.reject.logged_roles' => array(
314
+ 'type' => 'boolean',
315
+ 'default' => false
316
+ ),
317
+ 'pgcache.reject.roles' => array(
318
+ 'type' => 'array',
319
+ 'default' => array()
320
+ ),
321
+ 'pgcache.reject.uri' => array(
322
+ 'type' => 'array',
323
+ 'default' => array(
324
+ 'wp-.*\.php',
325
+ 'index\.php'
326
+ )
327
+ ),
328
+ 'pgcache.reject.ua' => array(
329
+ 'type' => 'array',
330
+ 'default' => array()
331
+ ),
332
+ 'pgcache.reject.cookie' => array(
333
+ 'type' => 'array',
334
+ 'default' => array('wptouch_switch_toggle')
335
+ ),
336
+ 'pgcache.purge.front_page' => array(
337
+ 'type' => 'boolean',
338
+ 'default' => false
339
+ ),
340
+ 'pgcache.purge.home' => array(
341
+ 'type' => 'boolean',
342
+ 'default' => true
343
+ ),
344
+ 'pgcache.purge.post' => array(
345
+ 'type' => 'boolean',
346
+ 'default' => true
347
+ ),
348
+ 'pgcache.purge.comments' => array(
349
+ 'type' => 'boolean',
350
+ 'default' => false
351
+ ),
352
+ 'pgcache.purge.author' => array(
353
+ 'type' => 'boolean',
354
+ 'default' => false
355
+ ),
356
+ 'pgcache.purge.terms' => array(
357
+ 'type' => 'boolean',
358
+ 'default' => false
359
+ ),
360
+ 'pgcache.purge.archive.daily' => array(
361
+ 'type' => 'boolean',
362
+ 'default' => false
363
+ ),
364
+ 'pgcache.purge.archive.monthly' => array(
365
+ 'type' => 'boolean',
366
+ 'default' => false
367
+ ),
368
+ 'pgcache.purge.archive.yearly' => array(
369
+ 'type' => 'boolean',
370
+ 'default' => false
371
+ ),
372
+ 'pgcache.purge.feed.blog' => array(
373
+ 'type' => 'boolean',
374
+ 'default' => true
375
+ ),
376
+ 'pgcache.purge.feed.comments' => array(
377
+ 'type' => 'boolean',
378
+ 'default' => false
379
+ ),
380
+ 'pgcache.purge.feed.author' => array(
381
+ 'type' => 'boolean',
382
+ 'default' => false
383
+ ),
384
+ 'pgcache.purge.feed.terms' => array(
385
+ 'type' => 'boolean',
386
+ 'default' => false
387
+ ),
388
+ 'pgcache.purge.feed.types' => array(
389
+ 'type' => 'array',
390
+ 'default' => array(
391
+ 'rss2'
392
+ )
393
+ ),
394
+ 'pgcache.purge.postpages_limit' => array(
395
+ 'type' => 'integer',
396
+ 'default' => 10
397
+ ),
398
+ 'pgcache.purge.pages' => array(
399
+ 'type' => 'array',
400
+ 'default' => array()
401
+ ),
402
+ 'pgcache.purge.sitemap_regex' => array(
403
+ 'type' => 'string',
404
+ 'default' => '([a-z0-9_\-]*?)sitemap([a-z0-9_\-]*)?\.xml'
405
+ ),
406
+ 'pgcache.prime.enabled' => array(
407
+ 'type' => 'boolean',
408
+ 'default' => false
409
+ ),
410
+ 'pgcache.prime.interval' => array(
411
+ 'type' => 'integer',
412
+ 'default' => 900
413
+ ),
414
+ 'pgcache.prime.limit' => array(
415
+ 'type' => 'integer',
416
+ 'default' => 10
417
+ ),
418
+ 'pgcache.prime.sitemap' => array(
419
+ 'type' => 'string',
420
+ 'default' => ''
421
+ ),
422
+ 'pgcache.prime.post.enabled' => array(
423
+ 'type' => 'boolean',
424
+ 'default' => false
425
+ ),
426
+
427
+ 'minify.enabled' => array(
428
+ 'type' => 'boolean',
429
+ 'default' => false
430
+ ),
431
+ 'minify.auto' => array(
432
+ 'type' => 'boolean',
433
+ 'default' => true
434
+ ),
435
+ 'minify.debug' => array(
436
+ 'type' => 'boolean',
437
+ 'default' => false
438
+ ),
439
+ 'minify.engine' => array(
440
+ 'type' => 'string',
441
+ 'default' => 'file'
442
+ ),
443
+ 'minify.file.gc' => array(
444
+ 'type' => 'integer',
445
+ 'default' => 86400
446
+ ),
447
+ 'minify.file.nfs' => array(
448
+ 'type' => 'boolean',
449
+ 'default' => false
450
+ ),
451
+ 'minify.file.locking' => array(
452
+ 'type' => 'boolean',
453
+ 'default' => false
454
+ ),
455
+ 'minify.memcached.servers' => array(
456
+ 'type' => 'array',
457
+ 'default' => array(
458
+ '127.0.0.1:11211'
459
+ )
460
+ ),
461
+ 'minify.memcached.persistant' => array(
462
+ 'type' => 'boolean',
463
+ 'default' => true
464
+ ),
465
+ 'minify.rewrite' => array(
466
+ 'type' => 'boolean',
467
+ 'default' => true
468
+ ),
469
+ 'minify.options' => array(
470
+ 'type' => 'array',
471
+ 'default' => array()
472
+ ),
473
+ 'minify.symlinks' => array(
474
+ 'type' => 'array',
475
+ 'default' => array()
476
+ ),
477
+ 'minify.lifetime' => array(
478
+ 'type' => 'integer',
479
+ 'default' => 86400
480
+ ),
481
+ 'minify.upload' => array(
482
+ 'type' => 'boolean',
483
+ 'default' => true
484
+ ),
485
+ 'minify.html.enable' => array(
486
+ 'type' => 'boolean',
487
+ 'default' => false
488
+ ),
489
+ 'minify.html.engine' => array(
490
+ 'type' => 'string',
491
+ 'default' => 'html'
492
+ ),
493
+ 'minify.html.reject.feed' => array(
494
+ 'type' => 'boolean',
495
+ 'default' => false
496
+ ),
497
+ 'minify.html.inline.css' => array(
498
+ 'type' => 'boolean',
499
+ 'default' => false
500
+ ),
501
+ 'minify.html.inline.js' => array(
502
+ 'type' => 'boolean',
503
+ 'default' => false
504
+ ),
505
+ 'minify.html.strip.crlf' => array(
506
+ 'type' => 'boolean',
507
+ 'default' => false
508
+ ),
509
+ 'minify.html.comments.ignore' => array(
510
+ 'type' => 'array',
511
+ 'default' => array(
512
+ 'google_ad_',
513
+ 'RSPEAK_'
514
+ )
515
+ ),
516
+ 'minify.css.enable' => array(
517
+ 'type' => 'boolean',
518
+ 'default' => true
519
+ ),
520
+ 'minify.css.engine' => array(
521
+ 'type' => 'string',
522
+ 'default' => 'css'
523
+ ),
524
+ 'minify.css.combine' => array(
525
+ 'type' => 'boolean',
526
+ 'default' => false
527
+ ),
528
+ 'minify.css.strip.comments' => array(
529
+ 'type' => 'boolean',
530
+ 'default' => false
531
+ ),
532
+ 'minify.css.strip.crlf' => array(
533
+ 'type' => 'boolean',
534
+ 'default' => false
535
+ ),
536
+ 'minify.css.imports' => array(
537
+ 'type' => 'string',
538
+ 'default' => ''
539
+ ),
540
+ 'minify.css.groups' => array(
541
+ 'type' => 'array',
542
+ 'default' => array()
543
+ ),
544
+ 'minify.js.enable' => array(
545
+ 'type' => 'boolean',
546
+ 'default' => true
547
+ ),
548
+ 'minify.js.engine' => array(
549
+ 'type' => 'string',
550
+ 'default' => 'js'
551
+ ),
552
+ 'minify.js.combine.header' => array(
553
+ 'type' => 'boolean',
554
+ 'default' => false
555
+ ),
556
+ 'minify.js.header.embed_type' => array(
557
+ 'type' => 'string',
558
+ 'default' => 'blocking'
559
+ ),
560
+ 'minify.js.combine.body' => array(
561
+ 'type' => 'boolean',
562
+ 'default' => false
563
+ ),
564
+ 'minify.js.body.embed_type' => array(
565
+ 'type' => 'string',
566
+ 'default' => 'blocking'
567
+ ),
568
+ 'minify.js.combine.footer' => array(
569
+ 'type' => 'boolean',
570
+ 'default' => false
571
+ ),
572
+ 'minify.js.footer.embed_type' => array(
573
+ 'type' => 'string',
574
+ 'default' => 'blocking'
575
+ ),
576
+ 'minify.js.strip.comments' => array(
577
+ 'type' => 'boolean',
578
+ 'default' => false
579
+ ),
580
+ 'minify.js.strip.crlf' => array(
581
+ 'type' => 'boolean',
582
+ 'default' => false
583
+ ),
584
+ 'minify.js.groups' => array(
585
+ 'type' => 'array',
586
+ 'default' => array()
587
+ ),
588
+ 'minify.yuijs.path.java' => array(
589
+ 'type' => 'string',
590
+ 'default' => 'java'
591
+ ),
592
+ 'minify.yuijs.path.jar' => array(
593
+ 'type' => 'string',
594
+ 'default' => 'yuicompressor.jar'
595
+ ),
596
+ 'minify.yuijs.options.line-break' => array(
597
+ 'type' => 'integer',
598
+ 'default' => 5000
599
+ ),
600
+ 'minify.yuijs.options.nomunge' => array(
601
+ 'type' => 'boolean',
602
+ 'default' => false
603
+ ),
604
+ 'minify.yuijs.options.preserve-semi' => array(
605
+ 'type' => 'boolean',
606
+ 'default' => false
607
+ ),
608
+ 'minify.yuijs.options.disable-optimizations' => array(
609
+ 'type' => 'boolean',
610
+ 'default' => false
611
+ ),
612
+ 'minify.yuicss.path.java' => array(
613
+ 'type' => 'string',
614
+ 'default' => 'java'
615
+ ),
616
+ 'minify.yuicss.path.jar' => array(
617
+ 'type' => 'string',
618
+ 'default' => 'yuicompressor.jar'
619
+ ),
620
+ 'minify.yuicss.options.line-break' => array(
621
+ 'type' => 'integer',
622
+ 'default' => 5000
623
+ ),
624
+ 'minify.ccjs.path.java' => array(
625
+ 'type' => 'string',
626
+ 'default' => 'java'
627
+ ),
628
+ 'minify.ccjs.path.jar' => array(
629
+ 'type' => 'string',
630
+ 'default' => 'compiler.jar'
631
+ ),
632
+ 'minify.ccjs.options.compilation_level' => array(
633
+ 'type' => 'string',
634
+ 'default' => 'SIMPLE_OPTIMIZATIONS'
635
+ ),
636
+ 'minify.ccjs.options.formatting' => array(
637
+ 'type' => 'string',
638
+ 'default' => ''
639
+ ),
640
+ 'minify.csstidy.options.remove_bslash' => array(
641
+ 'type' => 'boolean',
642
+ 'default' => true
643
+ ),
644
+ 'minify.csstidy.options.compress_colors' => array(
645
+ 'type' => 'boolean',
646
+ 'default' => true
647
+ ),
648
+ 'minify.csstidy.options.compress_font-weight' => array(
649
+ 'type' => 'boolean',
650
+ 'default' => true
651
+ ),
652
+ 'minify.csstidy.options.lowercase_s' => array(
653
+ 'type' => 'boolean',
654
+ 'default' => false
655
+ ),
656
+ 'minify.csstidy.options.optimise_shorthands' => array(
657
+ 'type' => 'integer',
658
+ 'default' => 1
659
+ ),
660
+ 'minify.csstidy.options.remove_last_;' => array(
661
+ 'type' => 'boolean',
662
+ 'default' => false
663
+ ),
664
+ 'minify.csstidy.options.case_properties' => array(
665
+ 'type' => 'integer',
666
+ 'default' => 1
667
+ ),
668
+ 'minify.csstidy.options.sort_properties' => array(
669
+ 'type' => 'boolean',
670
+ 'default' => false
671
+ ),
672
+ 'minify.csstidy.options.sort_selectors' => array(
673
+ 'type' => 'boolean',
674
+ 'default' => false
675
+ ),
676
+ 'minify.csstidy.options.merge_selectors' => array(
677
+ 'type' => 'integer',
678
+ 'default' => 2
679
+ ),
680
+ 'minify.csstidy.options.discard_invalid_properties' => array(
681
+ 'type' => 'boolean',
682
+ 'default' => false
683
+ ),
684
+ 'minify.csstidy.options.css_level' => array(
685
+ 'type' => 'string',
686
+ 'default' => 'CSS2.1'
687
+ ),
688
+ 'minify.csstidy.options.preserve_css' => array(
689
+ 'type' => 'boolean',
690
+ 'default' => false
691
+ ),
692
+ 'minify.csstidy.options.timestamp' => array(
693
+ 'type' => 'boolean',
694
+ 'default' => false
695
+ ),
696
+ 'minify.csstidy.options.template' => array(
697
+ 'type' => 'string',
698
+ 'default' => 'default'
699
+ ),
700
+ 'minify.htmltidy.options.clean' => array(
701
+ 'type' => 'boolean',
702
+ 'default' => false
703
+ ),
704
+ 'minify.htmltidy.options.hide-comments' => array(
705
+ 'type' => 'boolean',
706
+ 'default' => true
707
+ ),
708
+ 'minify.htmltidy.options.wrap' => array(
709
+ 'type' => 'integer',
710
+ 'default' => 0
711
+ ),
712
+ 'minify.reject.logged' => array(
713
+ 'type' => 'boolean',
714
+ 'default' => false
715
+ ),
716
+ 'minify.reject.ua' => array(
717
+ 'type' => 'array',
718
+ 'default' => array()
719
+ ),
720
+ 'minify.reject.uri' => array(
721
+ 'type' => 'array',
722
+ 'default' => array()
723
+ ),
724
+ 'minify.reject.files.js' => array(
725
+ 'type' => 'array',
726
+ 'default' => array()
727
+ ),
728
+ 'minify.reject.files.css' => array(
729
+ 'type' => 'array',
730
+ 'default' => array()
731
+ ),
732
+ 'minify.cache.files' => array(
733
+ 'type' => 'array',
734
+ 'default' => array('https://ajax.googleapis.com')
735
+ ),
736
+
737
+ 'cdn.enabled' => array(
738
+ 'type' => 'boolean',
739
+ 'default' => false
740
+ ),
741
+ 'cdn.debug' => array(
742
+ 'type' => 'boolean',
743
+ 'default' => false
744
+ ),
745
+ 'cdn.engine' => array(
746
+ 'type' => 'string',
747
+ 'default' => 'ftp'
748
+ ),
749
+ 'cdn.uploads.enable' => array(
750
+ 'type' => 'boolean',
751
+ 'default' => true
752
+ ),
753
+ 'cdn.includes.enable' => array(
754
+ 'type' => 'boolean',
755
+ 'default' => true
756
+ ),
757
+ 'cdn.includes.files' => array(
758
+ 'type' => 'string',
759
+ 'default' => '*.css;*.js;*.gif;*.png;*.jpg;*.xml'
760
+ ),
761
+ 'cdn.theme.enable' => array(
762
+ 'type' => 'boolean',
763
+ 'default' => true
764
+ ),
765
+ 'cdn.theme.files' => array(
766
+ 'type' => 'string',
767
+ 'default' => '*.css;*.js;*.gif;*.png;*.jpg;*.ico;*.ttf;*.otf,*.woff'
768
+ ),
769
+ 'cdn.minify.enable' => array(
770
+ 'type' => 'boolean',
771
+ 'default' => true
772
+ ),
773
+ 'cdn.custom.enable' => array(
774
+ 'type' => 'boolean',
775
+ 'default' => true
776
+ ),
777
+ 'cdn.custom.files' => array(
778
+ 'type' => 'array',
779
+ 'default' => array(
780
+ 'favicon.ico',
781
+ 'wp-content/gallery/*',
782
+ 'wp-content/uploads/avatars/*',
783
+ 'wp-content/plugins/wordpress-seo/css/xml-sitemap.xsl',
784
+ 'wp-content/plugins/wp-minify/min*',
785
+ 'wp-content/plugins/*.js',
786
+ 'wp-content/plugins/*.css',
787
+ 'wp-content/plugins/*.gif',
788
+ 'wp-content/plugins/*.jpg',
789
+ 'wp-content/plugins/*.png',
790
+ )
791
+ ),
792
+ 'cdn.import.external' => array(
793
+ 'type' => 'boolean',
794
+ 'default' => false
795
+ ),
796
+ 'cdn.import.files' => array(
797
+ 'type' => 'string',
798
+ 'default' => false
799
+ ),
800
+ 'cdn.queue.interval' => array(
801
+ 'type' => 'integer',
802
+ 'default' => 900
803
+ ),
804
+ 'cdn.queue.limit' => array(
805
+ 'type' => 'integer',
806
+ 'default' => 25
807
+ ),
808
+ 'cdn.force.rewrite' => array(
809
+ 'type' => 'boolean',
810
+ 'default' => false
811
+ ),
812
+ 'cdn.autoupload.enabled' => array(
813
+ 'type' => 'boolean',
814
+ 'default' => false
815
+ ),
816
+ 'cdn.autoupload.interval' => array(
817
+ 'type' => 'integer',
818
+ 'default' => 3600
819
+ ),
820
+ 'cdn.canonical_header' => array(
821
+ 'type' => 'boolean',
822
+ 'default' => false
823
+ ),
824
+ 'cdn.ftp.host' => array(
825
+ 'type' => 'string',
826
+ 'default' => ''
827
+ ),
828
+ 'cdn.ftp.user' => array(
829
+ 'type' => 'string',
830
+ 'default' => ''
831
+ ),
832
+ 'cdn.ftp.pass' => array(
833
+ 'type' => 'string',
834
+ 'default' => ''
835
+ ),
836
+ 'cdn.ftp.path' => array(
837
+ 'type' => 'string',
838
+ 'default' => ''
839
+ ),
840
+ 'cdn.ftp.pasv' => array(
841
+ 'type' => 'boolean',
842
+ 'default' => false
843
+ ),
844
+ 'cdn.ftp.domain' => array(
845
+ 'type' => 'array',
846
+ 'default' => array()
847
+ ),
848
+ 'cdn.ftp.ssl' => array(
849
+ 'type' => 'string',
850
+ 'default' => 'auto'
851
+ ),
852
+ 'cdn.s3.key' => array(
853
+ 'type' => 'string',
854
+ 'default' => ''
855
+ ),
856
+ 'cdn.s3.secret' => array(
857
+ 'type' => 'string',
858
+ 'default' => ''
859
+ ),
860
+ 'cdn.s3.bucket' => array(
861
+ 'type' => 'string',
862
+ 'default' => ''
863
+ ),
864
+ 'cdn.s3.cname' => array(
865
+ 'type' => 'array',
866
+ 'default' => array()
867
+ ),
868
+ 'cdn.s3.ssl' => array(
869
+ 'type' => 'string',
870
+ 'default' => 'auto'
871
+ ),
872
+ 'cdn.cf.key' => array(
873
+ 'type' => 'string',
874
+ 'default' => ''
875
+ ),
876
+ 'cdn.cf.secret' => array(
877
+ 'type' => 'string',
878
+ 'default' => ''
879
+ ),
880
+ 'cdn.cf.bucket' => array(
881
+ 'type' => 'string',
882
+ 'default' => ''
883
+ ),
884
+ 'cdn.cf.id' => array(
885
+ 'type' => 'string',
886
+ 'default' => ''
887
+ ),
888
+ 'cdn.cf.cname' => array(
889
+ 'type' => 'array',
890
+ 'default' => array()
891
+ ),
892
+ 'cdn.cf.ssl' => array(
893
+ 'type' => 'string',
894
+ 'default' => 'auto'
895
+ ),
896
+ 'cdn.cf2.key' => array(
897
+ 'type' => 'string',
898
+ 'default' => ''
899
+ ),
900
+ 'cdn.cf2.secret' => array(
901
+ 'type' => 'string',
902
+ 'default' => ''
903
+ ),
904
+ 'cdn.cf2.id' => array(
905
+ 'type' => 'string',
906
+ 'default' => ''
907
+ ),
908
+ 'cdn.cf2.cname' => array(
909
+ 'type' => 'array',
910
+ 'default' => array()
911
+ ),
912
+ 'cdn.cf2.ssl' => array(
913
+ 'type' => 'string',
914
+ 'default' => ''
915
+ ),
916
+ 'cdn.rscf.user' => array(
917
+ 'type' => 'string',
918
+ 'default' => ''
919
+ ),
920
+ 'cdn.rscf.key' => array(
921
+ 'type' => 'string',
922
+ 'default' => ''
923
+ ),
924
+ 'cdn.rscf.location' => array(
925
+ 'type' => 'string',
926
+ 'default' => 'us'
927
+ ),
928
+ 'cdn.rscf.container' => array(
929
+ 'type' => 'string',
930
+ 'default' => ''
931
+ ),
932
+ 'cdn.rscf.cname' => array(
933
+ 'type' => 'array',
934
+ 'default' => array()
935
+ ),
936
+ 'cdn.rscf.ssl' => array(
937
+ 'type' => 'string',
938
+ 'default' => 'auto'
939
+ ),
940
+ 'cdn.azure.user' => array(
941
+ 'type' => 'string',
942
+ 'default' => ''
943
+ ),
944
+ 'cdn.azure.key' => array(
945
+ 'type' => 'string',
946
+ 'default' => ''
947
+ ),
948
+ 'cdn.azure.container' => array(
949
+ 'type' => 'string',
950
+ 'default' => ''
951
+ ),
952
+ 'cdn.azure.cname' => array(
953
+ 'type' => 'array',
954
+ 'default' => array()
955
+ ),
956
+ 'cdn.azure.ssl' => array(
957
+ 'type' => 'string',
958
+ 'default' => 'auto'
959
+ ),
960
+ 'cdn.mirror.domain' => array(
961
+ 'type' => 'array',
962
+ 'default' => array()
963
+ ),
964
+ 'cdn.mirror.ssl' => array(
965
+ 'type' => 'string',
966
+ 'default' => 'auto'
967
+ ),
968
+ 'cdn.netdna.alias' => array(
969
+ 'type' => 'string',
970
+ 'default' => ''
971
+ ),
972
+ 'cdn.netdna.consumerkey' => array(
973
+ 'type' => 'string',
974
+ 'default' => ''
975
+ ),
976
+ 'cdn.netdna.consumersecret' => array(
977
+ 'type' => 'string',
978
+ 'default' => ''
979
+ ),
980
+ 'cdn.netdna.domain' => array(
981
+ 'type' => 'array',
982
+ 'default' => array()
983
+ ),
984
+ 'cdn.netdna.ssl' => array(
985
+ 'type' => 'string',
986
+ 'default' => 'auto'
987
+ ),
988
+ 'cdn.cotendo.username' => array(
989
+ 'type' => 'string',
990
+ 'default' => ''
991
+ ),
992
+ 'cdn.cotendo.password' => array(
993
+ 'type' => 'string',
994
+ 'default' => ''
995
+ ),
996
+ 'cdn.cotendo.zones' => array(
997
+ 'type' => 'array',
998
+ 'default' => array()
999
+ ),
1000
+ 'cdn.cotendo.domain' => array(
1001
+ 'type' => 'array',
1002
+ 'default' => array()
1003
+ ),
1004
+ 'cdn.cotendo.ssl' => array(
1005
+ 'type' => 'string',
1006
+ 'default' => 'auto'
1007
+ ),
1008
+ 'cdn.akamai.username' => array(
1009
+ 'type' => 'string',
1010
+ 'default' => ''
1011
+ ),
1012
+ 'cdn.akamai.password' => array(
1013
+ 'type' => 'string',
1014
+ 'default' => ''
1015
+ ),
1016
+ 'cdn.akamai.email_notification' => array(
1017
+ 'type' => 'array',
1018
+ 'default' => array()
1019
+ ),
1020
+ 'cdn.akamai.action' => array(
1021
+ 'type' => 'string',
1022
+ 'default' => 'invalidate'
1023
+ ),
1024
+ 'cdn.akamai.zone' => array(
1025
+ 'type' => 'string',
1026
+ 'default' => 'production'
1027
+ ),
1028
+ 'cdn.akamai.domain' => array(
1029
+ 'type' => 'array',
1030
+ 'default' => array()
1031
+ ),
1032
+ 'cdn.akamai.ssl' => array(
1033
+ 'type' => 'string',
1034
+ 'default' => 'auto'
1035
+ ),
1036
+ 'cdn.edgecast.account' => array(
1037
+ 'type' => 'string',
1038
+ 'default' => ''
1039
+ ),
1040
+ 'cdn.edgecast.token' => array(
1041
+ 'type' => 'string',
1042
+ 'default' => ''
1043
+ ),
1044
+ 'cdn.edgecast.domain' => array(
1045
+ 'type' => 'array',
1046
+ 'default' => array()
1047
+ ),
1048
+ 'cdn.edgecast.ssl' => array(
1049
+ 'type' => 'string',
1050
+ 'default' => 'auto'
1051
+ ),
1052
+ 'cdn.att.account' => array(
1053
+ 'type' => 'string',
1054
+ 'default' => ''
1055
+ ),
1056
+ 'cdn.att.token' => array(
1057
+ 'type' => 'string',
1058
+ 'default' => ''
1059
+ ),
1060
+ 'cdn.att.domain' => array(
1061
+ 'type' => 'array',
1062
+ 'default' => array()
1063
+ ),
1064
+ 'cdn.att.ssl' => array(
1065
+ 'type' => 'string',
1066
+ 'default' => 'auto'
1067
+ ),
1068
+ 'cdn.reject.admins' => array(
1069
+ 'type' => 'boolean',
1070
+ 'default' => false
1071
+ ),
1072
+ 'cdn.reject.logged_roles' => array(
1073
+ 'type' => 'boolean',
1074
+ 'default' => false
1075
+ ),
1076
+ 'cdn.reject.roles' => array(
1077
+ 'type' => 'array',
1078
+ 'default' => array()
1079
+ ),
1080
+ 'cdn.reject.ua' => array(
1081
+ 'type' => 'array',
1082
+ 'default' => array()
1083
+ ),
1084
+ 'cdn.reject.uri' => array(
1085
+ 'type' => 'array',
1086
+ 'default' => array()
1087
+ ),
1088
+ 'cdn.reject.files' => array(
1089
+ 'type' => 'array',
1090
+ 'default' => array(
1091
+ 'wp-content/uploads/wpcf7_captcha/*',
1092
+ 'wp-content/uploads/imagerotator.swf',
1093
+ 'wp-content/plugins/wp-fb-autoconnect/facebook-platform/channel.html'
1094
+ )
1095
+ ),
1096
+ 'cdn.reject.ssl' => array(
1097
+ 'type' => 'boolean',
1098
+ 'default' => false
1099
+ ),
1100
+ 'cdncache.enabled' => array(
1101
+ 'type' => 'boolean',
1102
+ 'default' => false
1103
+ ),
1104
+
1105
+
1106
+ 'cloudflare.enabled' => array(
1107
+ 'type' => 'boolean',
1108
+ 'default' => false
1109
+ ),
1110
+ 'cloudflare.email' => array(
1111
+ 'type' => 'string',
1112
+ 'default' => ''
1113
+ ),
1114
+ 'cloudflare.key' => array(
1115
+ 'type' => 'string',
1116
+ 'default' => ''
1117
+ ),
1118
+ 'cloudflare.zone' => array(
1119
+ 'type' => 'string',
1120
+ 'default' => ''
1121
+ ),
1122
+ 'cloudflare.ips.ip4' => array(
1123
+ 'type' => 'array',
1124
+ 'default' => array()
1125
+ ),
1126
+ 'cloudflare.ips.ip6' => array(
1127
+ 'type' => 'array',
1128
+ 'default' => array()
1129
+ ),
1130
+
1131
+ 'varnish.enabled' => array(
1132
+ 'type' => 'boolean',
1133
+ 'default' => false
1134
+ ),
1135
+ 'varnish.debug' => array(
1136
+ 'type' => 'boolean',
1137
+ 'default' => false
1138
+ ),
1139
+ 'varnish.servers' => array(
1140
+ 'type' => 'array',
1141
+ 'default' => array()
1142
+ ),
1143
+
1144
+ 'browsercache.enabled' => array(
1145
+ 'type' => 'boolean',
1146
+ 'default' => true
1147
+ ),
1148
+ 'browsercache.no404wp' => array(
1149
+ 'type' => 'boolean',
1150
+ 'default' => false
1151
+ ),
1152
+ 'browsercache.no404wp.exceptions' => array(
1153
+ 'type' => 'array',
1154
+ 'default' => array(
1155
+ 'robots\.txt',
1156
+ 'sitemap(_index)?\.xml(\.gz)?',
1157
+ '[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?'
1158
+ )
1159
+ ),
1160
+ 'browsercache.cssjs.last_modified' => array(
1161
+ 'type' => 'boolean',
1162
+ 'default' => true
1163
+ ),
1164
+ 'browsercache.cssjs.compression' => array(
1165
+ 'type' => 'boolean',
1166
+ 'default' => true
1167
+ ),
1168
+ 'browsercache.cssjs.expires' => array(
1169
+ 'type' => 'boolean',
1170
+ 'default' => false
1171
+ ),
1172
+ 'browsercache.cssjs.lifetime' => array(
1173
+ 'type' => 'integer',
1174
+ 'default' => 31536000
1175
+ ),
1176
+ 'browsercache.cssjs.nocookies' => array(
1177
+ 'type' => 'boolean',
1178
+ 'default' => false
1179
+ ),
1180
+ 'browsercache.cssjs.cache.control' => array(
1181
+ 'type' => 'boolean',
1182
+ 'default' => false
1183
+ ),
1184
+ 'browsercache.cssjs.cache.policy' => array(
1185
+ 'type' => 'string',
1186
+ 'default' => 'cache_public_maxage'
1187
+ ),
1188
+ 'browsercache.cssjs.etag' => array(
1189
+ 'type' => 'boolean',
1190
+ 'default' => false
1191
+ ),
1192
+ 'browsercache.cssjs.w3tc' => array(
1193
+ 'type' => 'boolean',
1194
+ 'default' => false
1195
+ ),
1196
+ 'browsercache.cssjs.replace' => array(
1197
+ 'type' => 'boolean',
1198
+ 'default' => false
1199
+ ),
1200
+ 'browsercache.html.compression' => array(
1201
+ 'type' => 'boolean',
1202
+ 'default' => true
1203
+ ),
1204
+ 'browsercache.html.last_modified' => array(
1205
+ 'type' => 'boolean',
1206
+ 'default' => true
1207
+ ),
1208
+ 'browsercache.html.expires' => array(
1209
+ 'type' => 'boolean',
1210
+ 'default' => false
1211
+ ),
1212
+ 'browsercache.html.lifetime' => array(
1213
+ 'type' => 'integer',
1214
+ 'default' => 3600
1215
+ ),
1216
+ 'browsercache.html.cache.control' => array(
1217
+ 'type' => 'boolean',
1218
+ 'default' => false
1219
+ ),
1220
+ 'browsercache.html.cache.policy' => array(
1221
+ 'type' => 'string',
1222
+ 'default' => 'cache_public_maxage'
1223
+ ),
1224
+ 'browsercache.html.etag' => array(
1225
+ 'type' => 'boolean',
1226
+ 'default' => false
1227
+ ),
1228
+ 'browsercache.html.w3tc' => array(
1229
+ 'type' => 'boolean',
1230
+ 'default' => false
1231
+ ),
1232
+ 'browsercache.html.replace' => array(
1233
+ 'type' => 'boolean',
1234
+ 'default' => false
1235
+ ),
1236
+ 'browsercache.other.last_modified' => array(
1237
+ 'type' => 'boolean',
1238
+ 'default' => true
1239
+ ),
1240
+ 'browsercache.other.compression' => array(
1241
+ 'type' => 'boolean',
1242
+ 'default' => true
1243
+ ),
1244
+ 'browsercache.other.expires' => array(
1245
+ 'type' => 'boolean',
1246
+ 'default' => false
1247
+ ),
1248
+ 'browsercache.other.lifetime' => array(
1249
+ 'type' => 'integer',
1250
+ 'default' => 31536000
1251
+ ),
1252
+ 'browsercache.other.nocookies' => array(
1253
+ 'type' => 'boolean',
1254
+ 'default' => false
1255
+ ),
1256
+ 'browsercache.other.cache.control' => array(
1257
+ 'type' => 'boolean',
1258
+ 'default' => false
1259
+ ),
1260
+ 'browsercache.other.cache.policy' => array(
1261
+ 'type' => 'string',
1262
+ 'default' => 'cache_public_maxage'
1263
+ ),
1264
+ 'browsercache.other.etag' => array(
1265
+ 'type' => 'boolean',
1266
+ 'default' => false
1267
+ ),
1268
+ 'browsercache.other.w3tc' => array(
1269
+ 'type' => 'boolean',
1270
+ 'default' => false
1271
+ ),
1272
+ 'browsercache.other.replace' => array(
1273
+ 'type' => 'boolean',
1274
+ 'default' => false
1275
+ ),
1276
+ 'browsercache.timestamp' => array(
1277
+ 'type' => 'string',
1278
+ 'default' => ''
1279
+ ),
1280
+
1281
+ 'mobile.enabled' => array(
1282
+ 'type' => 'boolean',
1283
+ 'default' => false
1284
+ ),
1285
+ 'mobile.rgroups' => array(
1286
+ 'type' => 'array',
1287
+ 'default' => array(
1288
+ 'high' => array(
1289
+ 'theme' => '',
1290
+ 'enabled' => false,
1291
+ 'redirect' => '',
1292
+ 'agents' => array(
1293
+ 'acer\ s100',
1294
+ 'android',
1295
+ 'archos5',
1296
+ 'bada',
1297
+ 'blackberry9500',
1298
+ 'blackberry9530',
1299
+ 'blackberry9550',
1300
+ 'blackberry\ 9800',
1301
+ 'cupcake',
1302
+ 'docomo\ ht\-03a',
1303
+ 'dream',
1304
+ 'froyo',
1305
+ 'googlebot-mobile',
1306
+ 'htc\ hero',
1307
+ 'htc\ magic',
1308
+ 'htc_dream',
1309
+ 'htc_magic',
1310
+ 'iemobile/7.0',
1311
+ 'incognito',
1312
+ 'ipad',
1313
+ 'iphone',
1314
+ 'ipod',
1315
+ 'kindle',
1316
+ 'lg\-gw620',
1317
+ 'liquid\ build',
1318
+ 'maemo',
1319
+ 'mot\-mb200',
1320
+ 'mot\-mb300',
1321
+ 'nexus\ one',
1322
+ 'opera\ mini',
1323
+ 's8000',
1324
+ 'samsung\-s8000',
1325
+ 'series60.*webkit',
1326
+ 'series60/5\.0',
1327
+ 'sonyericssone10',
1328
+ 'sonyericssonu20',
1329
+ 'sonyericssonx10',
1330
+ 't\-mobile\ mytouch\ 3g',
1331
+ 't\-mobile\ opal',
1332
+ 'tattoo',
1333
+ 'webmate',
1334
+ 'webos'
1335
+ )
1336
+ ),
1337
+ 'low' => array(
1338
+ 'theme' => '',
1339
+ 'enabled' => false,
1340
+ 'redirect' => '',
1341
+ 'agents' => array(
1342
+ '2\.0\ mmp',
1343
+ '240x320',
1344
+ 'alcatel',
1345
+ 'amoi',
1346
+ 'asus',
1347
+ 'au\-mic',
1348
+ 'audiovox',
1349
+ 'avantgo',
1350
+ 'benq',
1351
+ 'bird',
1352
+ 'blackberry',
1353
+ 'blazer',
1354
+ 'cdm',
1355
+ 'cellphone',
1356
+ 'danger',
1357
+ 'ddipocket',
1358
+ 'docomo',
1359
+ 'dopod',
1360
+ 'elaine/3\.0',
1361
+ 'ericsson',
1362
+ 'eudoraweb',
1363
+ 'fly',
1364
+ 'haier',
1365
+ 'hiptop',
1366
+ 'hp\.ipaq',
1367
+ 'htc',
1368
+ 'huawei',
1369
+ 'i\-mobile',
1370
+ 'iemobile',
1371
+ 'j\-phone',
1372
+ 'kddi',
1373
+ 'konka',
1374
+ 'kwc',
1375
+ 'kyocera/wx310k',
1376
+ 'lenovo',
1377
+ 'lg',
1378
+ 'lg/u990',
1379
+ 'lge\ vx',
1380
+ 'midp',
1381
+ 'midp\-2\.0',
1382
+ 'mmef20',
1383
+ 'mmp',
1384
+ 'mobilephone',
1385
+ 'mot\-v',
1386
+ 'motorola',
1387
+ 'netfront',
1388
+ 'newgen',
1389
+ 'newt',
1390
+ 'nintendo\ ds',
1391
+ 'nintendo\ wii',
1392
+ 'nitro',
1393
+ 'nokia',
1394
+ 'novarra',
1395
+ 'o2',
1396
+ 'openweb',
1397
+ 'opera\ mobi',
1398
+ 'opera\.mobi',
1399
+ 'palm',
1400
+ 'panasonic',
1401
+ 'pantech',
1402
+ 'pdxgw',
1403
+ 'pg',
1404
+ 'philips',
1405
+ 'phone',
1406
+ 'playstation\ portable',
1407
+ 'portalmmm',
1408
+ '\bppc\b',
1409
+ 'proxinet',
1410
+ 'psp',
1411
+ 'qtek',
1412
+ 'sagem',
1413
+ 'samsung',
1414
+ 'sanyo',
1415
+ 'sch',
1416
+ 'sec',
1417
+ 'sendo',
1418
+ 'sgh',
1419
+ 'sharp',
1420
+ 'sharp\-tq\-gx10',
1421
+ 'small',
1422
+ 'smartphone',
1423
+ 'softbank',
1424
+ 'sonyericsson',
1425
+ 'sph',
1426
+ 'symbian',
1427
+ 'symbian\ os',
1428
+ 'symbianos',
1429
+ 'toshiba',
1430
+ 'treo',
1431
+ 'ts21i\-10',
1432
+ 'up\.browser',
1433
+ 'up\.link',
1434
+ 'uts',
1435
+ 'vertu',
1436
+ 'vodafone',
1437
+ 'wap',
1438
+ 'willcome',
1439
+ 'windows\ ce',
1440
+ 'windows\.ce',
1441
+ 'winwap',
1442
+ 'xda',
1443
+ 'zte'
1444
+ )
1445
+ )
1446
+ )
1447
+ ),
1448
+
1449
+
1450
+ 'referrer.enabled' => array(
1451
+ 'type' => 'boolean',
1452
+ 'default' => false
1453
+ ),
1454
+ 'referrer.rgroups' => array(
1455
+ 'type' => 'array',
1456
+ 'default' => array(
1457
+ 'search_engines' => array(
1458
+ 'theme' => '',
1459
+ 'enabled' => false,
1460
+ 'redirect' => '',
1461
+ 'referrers' => array(
1462
+ 'google\.com',
1463
+ 'yahoo\.com',
1464
+ 'bing\.com',
1465
+ 'ask\.com',
1466
+ 'msn\.com'
1467
+ )
1468
+ )
1469
+ )
1470
+ ),
1471
+
1472
+
1473
+ 'common.support' => array(
1474
+ 'type' => 'string',
1475
+ 'default' => ''
1476
+ ),
1477
+ 'common.install' => array(
1478
+ 'type' => 'integer',
1479
+ 'default' => 0
1480
+ ),
1481
+ 'common.tweeted' => array(
1482
+ 'type' => 'boolean',
1483
+ 'default' => false
1484
+ ),
1485
+ 'config.check' => array(
1486
+ 'type' => 'boolean',
1487
+ 'default' => true
1488
+ ),
1489
+ 'config.path' => array(
1490
+ 'type' => 'string',
1491
+ 'default' => ''
1492
+ ),
1493
+ 'widget.latest.items' => array(
1494
+ 'type' => 'integer',
1495
+ 'default' => 3
1496
+ ),
1497
+ 'widget.latest_news.items' => array(
1498
+ 'type' => 'integer',
1499
+ 'default' => 5
1500
+ ),
1501
+ 'widget.pagespeed.enabled' => array(
1502
+ 'type' => 'boolean',
1503
+ 'default' => true
1504
+ ),
1505
+ 'widget.pagespeed.key' => array(
1506
+ 'type' => 'string',
1507
+ 'default' => ''
1508
+ ),
1509
+
1510
+ 'notes.wp_content_changed_perms' => array(
1511
+ 'type' => 'boolean',
1512
+ 'default' => true
1513
+ ),
1514
+ 'notes.wp_content_perms' => array(
1515
+ 'type' => 'boolean',
1516
+ 'default' => true
1517
+ ),
1518
+ 'notes.php_is_old' => array(
1519
+ 'type' => 'boolean',
1520
+ 'default' => true
1521
+ ),
1522
+ 'notes.theme_changed' => array(
1523
+ 'type' => 'boolean',
1524
+ 'default' => false
1525
+ ),
1526
+ 'notes.wp_upgraded' => array(
1527
+ 'type' => 'boolean',
1528
+ 'default' => false
1529
+ ),
1530
+ 'notes.plugins_updated' => array(
1531
+ 'type' => 'boolean',
1532
+ 'default' => false
1533
+ ),
1534
+ 'notes.cdn_upload' => array(
1535
+ 'type' => 'boolean',
1536
+ 'default' => false
1537
+ ),
1538
+ 'notes.cdn_reupload' => array(
1539
+ 'type' => 'boolean',
1540
+ 'default' => false
1541
+ ),
1542
+ 'notes.need_empty_pgcache' => array(
1543
+ 'type' => 'boolean',
1544
+ 'default' => false
1545
+ ),
1546
+ 'notes.need_empty_minify' => array(
1547
+ 'type' => 'boolean',
1548
+ 'default' => false
1549
+ ),
1550
+ 'notes.need_empty_objectcache' => array(
1551
+ 'type' => 'boolean',
1552
+ 'default' => false
1553
+ ),
1554
+ 'notes.root_rules' => array(
1555
+ 'type' => 'boolean',
1556
+ 'default' => true
1557
+ ),
1558
+ 'notes.rules' => array(
1559
+ 'type' => 'boolean',
1560
+ 'default' => true
1561
+ ),
1562
+ 'notes.pgcache_rules_wpsc' => array(
1563
+ 'type' => 'boolean',
1564
+ 'default' => true
1565
+ ),
1566
+ 'notes.support_us' => array(
1567
+ 'type' => 'boolean',
1568
+ 'default' => true
1569
+ ),
1570
+ 'notes.no_curl' => array(
1571
+ 'type' => 'boolean',
1572
+ 'default' => true
1573
+ ),
1574
+ 'notes.no_zlib' => array(
1575
+ 'type' => 'boolean',
1576
+ 'default' => true
1577
+ ),
1578
+ 'notes.zlib_output_compression' => array(
1579
+ 'type' => 'boolean',
1580
+ 'default' => true
1581
+ ),
1582
+ 'notes.no_permalink_rules' => array(
1583
+ 'type' => 'boolean',
1584
+ 'default' => true
1585
+ ),
1586
+ 'notes.browsercache_rules_no404wp' => array(
1587
+ 'type' => 'boolean',
1588
+ 'default' => true
1589
+ ),
1590
+
1591
+ 'timelimit.email_send' => array(
1592
+ 'type' => 'integer',
1593
+ 'default' => 180
1594
+ ),
1595
+ 'timelimit.varnish_purge' => array(
1596
+ 'type' => 'integer',
1597
+ 'default' => 300
1598
+ ),
1599
+ 'timelimit.cache_flush' => array(
1600
+ 'type' => 'integer',
1601
+ 'default' => 600
1602
+ ),
1603
+ 'timelimit.cache_gc' => array(
1604
+ 'type' => 'integer',
1605
+ 'default' => 600
1606
+ ),
1607
+ 'timelimit.cdn_upload' => array(
1608
+ 'type' => 'integer',
1609
+ 'default' => 600
1610
+ ),
1611
+ 'timelimit.cdn_delete' => array(
1612
+ 'type' => 'integer',
1613
+ 'default' => 300
1614
+ ),
1615
+ 'timelimit.cdn_purge' => array(
1616
+ 'type' => 'integer',
1617
+ 'default' => 300
1618
+ ),
1619
+ 'timelimit.cdn_import' => array(
1620
+ 'type' => 'integer',
1621
+ 'default' => 600
1622
+ ),
1623
+ 'timelimit.cdn_test' => array(
1624
+ 'type' => 'integer',
1625
+ 'default' => 300
1626
+ ),
1627
+ 'timelimit.cdn_container_create' => array(
1628
+ 'type' => 'integer',
1629
+ 'default' => 300
1630
+ ),
1631
+ 'timelimit.cloudflare_api_request' => array(
1632
+ 'type' => 'integer',
1633
+ 'default' => 180
1634
+ ),
1635
+ 'timelimit.domain_rename' => array(
1636
+ 'type' => 'integer',
1637
+ 'default' => 120
1638
+ ),
1639
+ 'timelimit.minify_recommendations' => array(
1640
+ 'type' => 'integer',
1641
+ 'default' => 600
1642
+ ),
1643
+
1644
+ 'minify.auto.filename_length' => array(
1645
+ 'type' => 'integer',
1646
+ 'default' => 251
1647
+ ),
1648
+ 'common.instance_id' => array(
1649
+ 'type' => 'integer',
1650
+ 'default' => 0
1651
+ ),
1652
+ 'common.force_master' => array(
1653
+ 'type' => 'boolean',
1654
+ 'default' => true,
1655
+ 'master_only' => 'true'
1656
+ ),
1657
+ 'newrelic.enabled' => array(
1658
+ 'type' => 'boolean',
1659
+ 'default' => false,
1660
+ ),
1661
+ 'newrelic.api_key' => array(
1662
+ 'type' => 'string',
1663
+ 'default' => '',
1664
+ 'master_only' => 'true'
1665
+ ),
1666
+ 'newrelic.account_id' => array(
1667
+ 'type' => 'string',
1668
+ 'default' => '',
1669
+ 'master_only' => 'true'
1670
+ ),
1671
+ 'newrelic.application_id' => array(
1672
+ 'type' => 'integer',
1673
+ 'default' => 0,
1674
+ ),
1675
+ 'newrelic.appname' => array(
1676
+ 'type' => 'string',
1677
+ 'default' => '',
1678
+ ),
1679
+ 'newrelic.accept.logged_roles' => array(
1680
+ 'type' => 'boolean',
1681
+ 'default' => true
1682
+ ),
1683
+ 'newrelic.accept.roles' => array(
1684
+ 'type' => 'array',
1685
+ 'default' => array('contributor')
1686
+ ),
1687
+ 'newrelic.use_php_function' => array (
1688
+ 'type' => 'boolean',
1689
+ 'default' => false,
1690
+ ),
1691
+ 'notes.new_relic_page_load_notification' => array(
1692
+ 'type' => 'boolean',
1693
+ 'default' => true
1694
+ ),
1695
+ 'newrelic.appname_prefix' => array (
1696
+ 'type' => 'string',
1697
+ 'default' => 'Child Site - '
1698
+ ),
1699
+ 'newrelic.merge_with_network' => array (
1700
+ 'type' => 'boolean',
1701
+ 'default' => true
1702
+ ),
1703
+ 'newrelic.cache_time' => array(
1704
+ 'type' => 'integer',
1705
+ 'default' => 5
1706
+ ),
1707
+ 'newrelic.enable_xmit' => array(
1708
+ 'type' => 'boolean',
1709
+ 'default' => false
1710
+ ),
1711
+ 'newrelic.use_network_wide_id' => array(
1712
+ 'type' => 'boolean',
1713
+ 'default' => false,
1714
+ 'master_only' => 'true'
1715
+ )
1716
+ );
1717
+
1718
+
1719
+ /*
1720
+ * Descriptors of configuration keys
1721
+ * for admin config
1722
+ */
1723
+ $keys_admin = array(
1724
+ 'browsercache.configuration_sealed' => array(
1725
+ 'type' => 'boolean',
1726
+ 'default' => false,
1727
+ 'master_only' => 'true'
1728
+ ),
1729
+ 'cdn.configuration_sealed' => array(
1730
+ 'type' => 'boolean',
1731
+ 'default' => false,
1732
+ 'master_only' => 'true'
1733
+ ),
1734
+ 'cloudflare.configuration_sealed' => array(
1735
+ 'type' => 'boolean',
1736
+ 'default' => false,
1737
+ 'master_only' => 'true'
1738
+ ),
1739
+ 'common.install' => array(
1740
+ 'type' => 'integer',
1741
+ 'default' => 0,
1742
+ 'master_only' => 'true'
1743
+ ),
1744
+ 'common.visible_by_master_only' => array(
1745
+ 'type' => 'boolean',
1746
+ 'default' => true,
1747
+ 'master_only' => 'true'
1748
+ ),
1749
+ 'dbcache.configuration_sealed' => array(
1750
+ 'type' => 'boolean',
1751
+ 'default' => false,
1752
+ 'master_only' => 'true'
1753
+ ),
1754
+ 'minify.configuration_sealed' => array(
1755
+ 'type' => 'boolean',
1756
+ 'default' => false,
1757
+ 'master_only' => 'true'
1758
+ ),
1759
+ 'objectcache.configuration_sealed' => array(
1760
+ 'type' => 'boolean',
1761
+ 'default' => false,
1762
+ 'master_only' => 'true'
1763
+ ),
1764
+ 'pgcache.configuration_sealed' => array(
1765
+ 'type' => 'boolean',
1766
+ 'default' => false,
1767
+ 'master_only' => 'true'
1768
+ ),
1769
+ 'previewmode.enabled' => array(
1770
+ 'type' => 'boolean',
1771
+ 'default' => false,
1772
+ 'master_only' => 'true'
1773
+ ),
1774
+ 'varnish.configuration_sealed' => array(
1775
+ 'type' => 'boolean',
1776
+ 'default' => false,
1777
+ 'master_only' => 'true'
1778
+ ),
1779
+ 'fragmentcache.configuration_sealed' => array(
1780
+ 'type' => 'boolean',
1781
+ 'default' => false,
1782
+ 'master_only' => 'true'
1783
+ )
1784
+ ,'newrelic.configuration_sealed' => array(
1785
+ 'type' => 'boolean',
1786
+ 'default' => false,
1787
+ 'master_only' => 'true'
1788
+ )
1789
+ ,'notes.minify_error' => array(
1790
+ 'type' => 'boolean',
1791
+ 'default' => false
1792
+ )
1793
+ ,'minify.error.last' => array(
1794
+ 'type' => 'string',
1795
+ 'default' => ''
1796
+ ),
1797
+ 'minify.error.notification' => array(
1798
+ 'type' => 'string',
1799
+ 'default' => ''
1800
+ ),
1801
+ 'minify.error.notification.last' => array(
1802
+ 'type' => 'integer',
1803
+ 'default' => 0
1804
+ ),
1805
+ 'minify.error.file' => array(
1806
+ 'type' => 'string',
1807
+ 'default' => ''
1808
+ ),
1809
+ 'notes.remove_w3tc' => array(
1810
+ 'type' => 'boolean',
1811
+ 'default' => false
1812
+ )
1813
+ );
1814
+
1815
+ $keys_admin['common.install']['default'] = time();
1816
+
1817
+
1818
+
1819
+ /*
1820
+ * Descriptors how sealed configuration keys affect overriding
1821
+ */
1822
+ $sealing_keys_scope = array(
1823
+ array(
1824
+ 'key' => 'browsercache.configuration_sealed',
1825
+ 'prefix' => 'browsercache.'
1826
+ ),
1827
+ array(
1828
+ 'key' => 'cdn.configuration_sealed',
1829
+ 'prefix' => 'cdn.'
1830
+ ),
1831
+ array(
1832
+ 'key' => 'cloudflare.configuration_sealed',
1833
+ 'prefix' => 'cloudflare.'
1834
+ ),
1835
+ array(
1836
+ 'key' => 'dbcache.configuration_sealed',
1837
+ 'prefix' => 'dbcache.'
1838
+ ),
1839
+ array(
1840
+ 'key' => 'minify.configuration_sealed',
1841
+ 'prefix' => 'minify.'
1842
+ ),
1843
+ array(
1844
+ 'key' => 'objectcache.configuration_sealed',
1845
+ 'prefix' => 'objectcache.'
1846
+ ),
1847
+ array(
1848
+ 'key' => 'fragmentcache.configuration_sealed',
1849
+ 'prefix' => 'fragmentcache.'
1850
+ ),
1851
+ array(
1852
+ 'key' => 'pgcache.configuration_sealed',
1853
+ 'prefix' => 'pgcache.'
1854
+ ),
1855
+ array(
1856
+ 'key' => 'varnish.configuration_sealed',
1857
+ 'prefix' => 'varnish.'
1858
+ )
1859
+ );
1860
+
configs/0.9.2.7-ConfigKeys.php ADDED
@@ -0,0 +1,1860 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Descriptors of configuration keys
5
+ * for config
6
+ */
7
+
8
+ $keys = array(
9
+ 'cluster.messagebus.debug' => array(
10
+ 'type' => 'boolean',
11
+ 'default' => false
12
+ ),
13
+ 'cluster.messagebus.enabled' => array(
14
+ 'type' => 'boolean',
15
+ 'default' => false
16
+ ),
17
+ 'cluster.messagebus.sns.region' => array(
18
+ 'type' => 'string',
19
+ 'default' => ''
20
+ ),
21
+ 'cluster.messagebus.sns.api_key' => array(
22
+ 'type' => 'string',
23
+ 'default' => ''
24
+ ),
25
+ 'cluster.messagebus.sns.api_secret' => array(
26
+ 'type' => 'string',
27
+ 'default' => ''
28
+ ),
29
+ 'cluster.messagebus.sns.topic_arn' => array(
30
+ 'type' => 'string',
31
+ 'default' => ''
32
+ ),
33
+
34
+ 'dbcache.debug' => array(
35
+ 'type' => 'boolean',
36
+ 'default' => false
37
+ ),
38
+ 'dbcache.enabled' => array(
39
+ 'type' => 'boolean',
40
+ 'default' => false
41
+ ),
42
+ 'dbcache.engine' => array(
43
+ 'type' => 'string',
44
+ 'default' => 'file'
45
+ ),
46
+ 'dbcache.file.gc' => array(
47
+ 'type' => 'integer',
48
+ 'default' => 3600
49
+ ),
50
+ 'dbcache.file.locking' => array(
51
+ 'type' => 'boolean',
52
+ 'default' => false
53
+ ),
54
+ 'dbcache.lifetime' => array(
55
+ 'type' => 'integer',
56
+ 'default' => 180
57
+ ),
58
+ 'dbcache.memcached.persistant' => array(
59
+ 'type' => 'boolean',
60
+ 'default' => true
61
+ ),
62
+ 'dbcache.memcached.servers' => array(
63
+ 'type' => 'array',
64
+ 'default' => array(
65
+ '127.0.0.1:11211'
66
+ )
67
+ ),
68
+ 'dbcache.reject.cookie' => array(
69
+ 'type' => 'array',
70
+ 'default' => array()
71
+ ),
72
+ 'dbcache.reject.logged' => array(
73
+ 'type' => 'boolean',
74
+ 'default' => true
75
+ ),
76
+ 'dbcache.reject.sql' => array(
77
+ 'type' => 'array',
78
+ 'default' => array(
79
+ 'gdsr_',
80
+ 'wp_rg_'
81
+ )
82
+ ),
83
+ 'dbcache.reject.uri' => array(
84
+ 'type' => 'array',
85
+ 'default' => array()
86
+ ),
87
+ 'dbcache.reject.words' => array(
88
+ 'type' => 'array',
89
+ 'default' => array(
90
+ '^\s*insert\b',
91
+ '^\s*delete\b',
92
+ '^\s*update\b',
93
+ '^\s*replace\b',
94
+ '^\s*create\b',
95
+ '^\s*alter\b',
96
+ '^\s*show\b',
97
+ '^\s*set\b',
98
+ '\bautoload\s+=\s+\'yes\'',
99
+ '\bsql_calc_found_rows\b',
100
+ '\bfound_rows\(\)',
101
+ '\bw3tc_request_data\b'
102
+ )
103
+ ),
104
+
105
+ 'objectcache.enabled' => array(
106
+ 'type' => 'boolean',
107
+ 'default' => false
108
+ ),
109
+ 'objectcache.debug' => array(
110
+ 'type' => 'boolean',
111
+ 'default' => false
112
+ ),
113
+ 'objectcache.engine' => array(
114
+ 'type' => 'string',
115
+ 'default' => 'file'
116
+ ),
117
+ 'objectcache.file.gc' => array(
118
+ 'type' => 'integer',
119
+ 'default' => 3600
120
+ ),
121
+ 'objectcache.file.locking' => array(
122
+ 'type' => 'boolean',
123
+ 'default' => false
124
+ ),
125
+ 'objectcache.memcached.servers' => array(
126
+ 'type' => 'array',
127
+ 'default' => array(
128
+ '127.0.0.1:11211'
129
+ )
130
+ ),
131
+ 'objectcache.memcached.persistant' => array(
132
+ 'type' => 'boolean',
133
+ 'default' => true
134
+ ),
135
+ 'objectcache.groups.global' => array(
136
+ 'type' => 'array',
137
+ 'default' => array(
138
+ 'users',
139
+ 'userlogins',
140
+ 'usermeta',
141
+ 'user_meta',
142
+ 'site-transient',
143
+ 'site-options',
144
+ 'site-lookup',
145
+ 'blog-lookup',
146
+ 'blog-details',
147
+ 'rss',
148
+ 'global-posts'
149
+ )
150
+ ),
151
+ 'objectcache.groups.nonpersistent' => array(
152
+ 'type' => 'array',
153
+ 'default' => array(
154
+ 'comment',
155
+ 'counts',
156
+ 'plugins'
157
+ )
158
+ ),
159
+ 'objectcache.lifetime' => array(
160
+ 'type' => 'integer',
161
+ 'default' => 180
162
+ ),
163
+
164
+ 'fragmentcache.enabled' => array(
165
+ 'type' => 'boolean',
166
+ 'default' => false
167
+ ),
168
+ 'fragmentcache.debug' => array(
169
+ 'type' => 'boolean',
170
+ 'default' => false
171
+ ),
172
+ 'fragmentcache.engine' => array(
173
+ 'type' => 'string',
174
+ 'default' => 'file'
175
+ ),
176
+ 'fragmentcache.file.gc' => array(
177
+ 'type' => 'integer',
178
+ 'default' => 3600
179
+ ),
180
+ 'fragmentcache.file.locking' => array(
181
+ 'type' => 'boolean',
182
+ 'default' => false
183
+ ),
184
+ 'fragmentcache.memcached.servers' => array(
185
+ 'type' => 'array',
186
+ 'default' => array(
187
+ '127.0.0.1:11211'
188
+ )
189
+ ),
190
+ 'fragmentcache.memcached.persistant' => array(
191
+ 'type' => 'boolean',
192
+ 'default' => true
193
+ ),
194
+ 'fragmentcache.lifetime' => array(
195
+ 'type' => 'integer',
196
+ 'default' => 180
197
+ ),
198
+ 'fragmentcache.groups' => array(
199
+ 'type' => 'array',
200
+ 'default' => array()
201
+ ),
202
+
203
+ 'pgcache.enabled' => array(
204
+ 'type' => 'boolean',
205
+ 'default' => false
206
+ ),
207
+ 'pgcache.comment_cookie_ttl' => array(
208
+ 'type' => 'integer',
209
+ 'default' => 1800
210
+ ),
211
+ 'pgcache.debug' => array(
212
+ 'type' => 'boolean',
213
+ 'default' => false
214
+ ),
215
+ 'pgcache.engine' => array(
216
+ 'type' => 'string',
217
+ 'default' => 'file_generic'
218
+ ),
219
+ 'pgcache.file.gc' => array(
220
+ 'type' => 'integer',
221
+ 'default' => 3600
222
+ ),
223
+ 'pgcache.file.nfs' => array(
224
+ 'type' => 'boolean',
225
+ 'default' => false
226
+ ),
227
+ 'pgcache.file.locking' => array(
228
+ 'type' => 'boolean',
229
+ 'default' => false
230
+ ),
231
+ 'pgcache.lifetime' => array(
232
+ 'type' => 'integer',
233
+ 'default' => 3600
234
+ ),
235
+ 'pgcache.memcached.servers' => array(
236
+ 'type' => 'array',
237
+ 'default' => array(
238
+ '127.0.0.1:11211'
239
+ )
240
+ ),
241
+ 'pgcache.memcached.persistant' => array(
242
+ 'type' => 'boolean',
243
+ 'default' => true
244
+ ),
245
+ 'pgcache.check.domain' => array(
246
+ 'type' => 'boolean',
247
+ 'default' => false
248
+ ),
249
+ 'pgcache.cache.query' => array(
250
+ 'type' => 'boolean',
251
+ 'default' => true
252
+ ),
253
+ 'pgcache.cache.home' => array(
254
+ 'type' => 'boolean',
255
+ 'default' => true
256
+ ),
257
+ 'pgcache.cache.feed' => array(
258
+ 'type' => 'boolean',
259
+ 'default' => false
260
+ ),
261
+ 'pgcache.cache.nginx_handle_xml' => array(
262
+ 'type' => 'boolean',
263
+ 'default' => false
264
+ ),
265
+ 'pgcache.cache.ssl' => array(
266
+ 'type' => 'boolean',
267
+ 'default' => false
268
+ ),
269
+ 'pgcache.cache.404' => array(
270
+ 'type' => 'boolean',
271
+ 'default' => false
272
+ ),
273
+ 'pgcache.cache.flush' => array(
274
+ 'type' => 'boolean',
275
+ 'default' => false
276
+ ),
277
+ 'pgcache.cache.headers' => array(
278
+ 'type' => 'array',
279
+ 'default' => array(
280
+ 'Last-Modified',
281
+ 'Content-Type',
282
+ 'X-Pingback',
283
+ 'P3P'
284
+ )
285
+ ),
286
+ 'pgcache.compatibility' => array(
287
+ 'type' => 'boolean',
288
+ 'default' => false
289
+ ),
290
+ 'pgcache.accept.uri' => array(
291
+ 'type' => 'array',
292
+ 'default' => array(
293
+ 'sitemap(_index)?\.xml(\.gz)?',
294
+ '[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?'
295
+ )
296
+ ),
297
+ 'pgcache.accept.files' => array(
298
+ 'type' => 'array',
299
+ 'default' => array(
300
+ 'wp-comments-popup.php',
301
+ 'wp-links-opml.php',
302
+ 'wp-locations.php'
303
+ )
304
+ ),
305
+ 'pgcache.reject.front_page' => array(
306
+ 'type' => 'boolean',
307
+ 'default' => false
308
+ ),
309
+ 'pgcache.reject.logged' => array(
310
+ 'type' => 'boolean',
311
+ 'default' => true
312
+ ),
313
+ 'pgcache.reject.logged_roles' => array(
314
+ 'type' => 'boolean',
315
+ 'default' => false
316
+ ),
317
+ 'pgcache.reject.roles' => array(
318
+ 'type' => 'array',
319
+ 'default' => array()
320
+ ),
321
+ 'pgcache.reject.uri' => array(
322
+ 'type' => 'array',
323
+ 'default' => array(
324
+ 'wp-.*\.php',
325
+ 'index\.php'
326
+ )
327
+ ),
328
+ 'pgcache.reject.ua' => array(
329
+ 'type' => 'array',
330
+ 'default' => array()
331
+ ),
332
+ 'pgcache.reject.cookie' => array(
333
+ 'type' => 'array',
334
+ 'default' => array('wptouch_switch_toggle')
335
+ ),
336
+ 'pgcache.purge.front_page' => array(
337
+ 'type' => 'boolean',
338
+ 'default' => false
339
+ ),
340
+ 'pgcache.purge.home' => array(
341
+ 'type' => 'boolean',
342
+ 'default' => true
343
+ ),
344
+ 'pgcache.purge.post' => array(
345
+ 'type' => 'boolean',
346
+ 'default' => true
347
+ ),
348
+ 'pgcache.purge.comments' => array(
349
+ 'type' => 'boolean',
350
+ 'default' => false
351
+ ),
352
+ 'pgcache.purge.author' => array(
353
+ 'type' => 'boolean',
354
+ 'default' => false
355
+ ),
356
+ 'pgcache.purge.terms' => array(
357
+ 'type' => 'boolean',
358
+ 'default' => false
359
+ ),
360
+ 'pgcache.purge.archive.daily' => array(
361
+ 'type' => 'boolean',
362
+ 'default' => false
363
+ ),
364
+ 'pgcache.purge.archive.monthly' => array(
365
+ 'type' => 'boolean',
366
+ 'default' => false
367
+ ),
368
+ 'pgcache.purge.archive.yearly' => array(
369
+ 'type' => 'boolean',
370
+ 'default' => false
371
+ ),
372
+ 'pgcache.purge.feed.blog' => array(
373
+ 'type' => 'boolean',
374
+ 'default' => true
375
+ ),
376
+ 'pgcache.purge.feed.comments' => array(
377
+ 'type' => 'boolean',
378
+ 'default' => false
379
+ ),
380
+ 'pgcache.purge.feed.author' => array(
381
+ 'type' => 'boolean',
382
+ 'default' => false
383
+ ),
384
+ 'pgcache.purge.feed.terms' => array(
385
+ 'type' => 'boolean',
386
+ 'default' => false
387
+ ),
388
+ 'pgcache.purge.feed.types' => array(
389
+ 'type' => 'array',
390
+ 'default' => array(
391
+ 'rss2'
392
+ )
393
+ ),
394
+ 'pgcache.purge.postpages_limit' => array(
395
+ 'type' => 'integer',
396
+ 'default' => 10
397
+ ),
398
+ 'pgcache.purge.pages' => array(
399
+ 'type' => 'array',
400
+ 'default' => array()
401
+ ),
402
+ 'pgcache.purge.sitemap_regex' => array(
403
+ 'type' => 'string',
404
+ 'default' => '([a-z0-9_\-]*?)sitemap([a-z0-9_\-]*)?\.xml'
405
+ ),
406
+ 'pgcache.prime.enabled' => array(
407
+ 'type' => 'boolean',
408
+ 'default' => false
409
+ ),
410
+ 'pgcache.prime.interval' => array(
411
+ 'type' => 'integer',
412
+ 'default' => 900
413
+ ),
414
+ 'pgcache.prime.limit' => array(
415
+ 'type' => 'integer',
416
+ 'default' => 10
417
+ ),
418
+ 'pgcache.prime.sitemap' => array(
419
+ 'type' => 'string',
420
+ 'default' => ''
421
+ ),
422
+ 'pgcache.prime.post.enabled' => array(
423
+ 'type' => 'boolean',
424
+ 'default' => false
425
+ ),
426
+
427
+ 'minify.enabled' => array(
428
+ 'type' => 'boolean',
429
+ 'default' => false
430
+ ),
431
+ 'minify.auto' => array(
432
+ 'type' => 'boolean',
433
+ 'default' => true
434
+ ),
435
+ 'minify.debug' => array(
436
+ 'type' => 'boolean',
437
+ 'default' => false
438
+ ),
439
+ 'minify.engine' => array(
440
+ 'type' => 'string',
441
+ 'default' => 'file'
442
+ ),
443
+ 'minify.file.gc' => array(
444
+ 'type' => 'integer',
445
+ 'default' => 86400
446
+ ),
447
+ 'minify.file.nfs' => array(
448
+ 'type' => 'boolean',
449
+ 'default' => false
450
+ ),
451
+ 'minify.file.locking' => array(
452
+ 'type' => 'boolean',
453
+ 'default' => false
454
+ ),
455
+ 'minify.memcached.servers' => array(
456
+ 'type' => 'array',
457
+ 'default' => array(
458
+ '127.0.0.1:11211'
459
+ )
460
+ ),
461
+ 'minify.memcached.persistant' => array(
462
+ 'type' => 'boolean',
463
+ 'default' => true
464
+ ),
465
+ 'minify.rewrite' => array(
466
+ 'type' => 'boolean',
467
+ 'default' => true
468
+ ),
469
+ 'minify.options' => array(
470
+ 'type' => 'array',
471
+ 'default' => array()
472
+ ),
473
+ 'minify.symlinks' => array(
474
+ 'type' => 'array',
475
+ 'default' => array()
476
+ ),
477
+ 'minify.lifetime' => array(
478
+ 'type' => 'integer',
479
+ 'default' => 86400
480
+ ),
481
+ 'minify.upload' => array(
482
+ 'type' => 'boolean',
483
+ 'default' => true
484
+ ),
485
+ 'minify.html.enable' => array(
486
+ 'type' => 'boolean',
487
+ 'default' => false
488
+ ),
489
+ 'minify.html.engine' => array(
490
+ 'type' => 'string',
491
+ 'default' => 'html'
492
+ ),
493
+ 'minify.html.reject.feed' => array(
494
+ 'type' => 'boolean',
495
+ 'default' => false
496
+ ),
497
+ 'minify.html.inline.css' => array(
498
+ 'type' => 'boolean',
499
+ 'default' => false
500
+ ),
501
+ 'minify.html.inline.js' => array(
502
+ 'type' => 'boolean',
503
+ 'default' => false
504
+ ),
505
+ 'minify.html.strip.crlf' => array(
506
+ 'type' => 'boolean',
507
+ 'default' => false
508
+ ),
509
+ 'minify.html.comments.ignore' => array(
510
+ 'type' => 'array',
511
+ 'default' => array(
512
+ 'google_ad_',
513
+ 'RSPEAK_'
514
+ )
515
+ ),
516
+ 'minify.css.enable' => array(
517
+ 'type' => 'boolean',
518
+ 'default' => true
519
+ ),
520
+ 'minify.css.engine' => array(
521
+ 'type' => 'string',
522
+ 'default' => 'css'
523
+ ),
524
+ 'minify.css.combine' => array(
525
+ 'type' => 'boolean',
526
+ 'default' => false
527
+ ),
528
+ 'minify.css.strip.comments' => array(
529
+ 'type' => 'boolean',
530
+ 'default' => false
531
+ ),
532
+ 'minify.css.strip.crlf' => array(
533
+ 'type' => 'boolean',
534
+ 'default' => false
535
+ ),
536
+ 'minify.css.imports' => array(
537
+ 'type' => 'string',
538
+ 'default' => ''
539
+ ),
540
+ 'minify.css.groups' => array(
541
+ 'type' => 'array',
542
+ 'default' => array()
543
+ ),
544
+ 'minify.js.enable' => array(
545
+ 'type' => 'boolean',
546
+ 'default' => true
547
+ ),
548
+ 'minify.js.engine' => array(
549
+ 'type' => 'string',
550
+ 'default' => 'js'
551
+ ),
552
+ 'minify.js.combine.header' => array(
553
+ 'type' => 'boolean',
554
+ 'default' => false
555
+ ),
556
+ 'minify.js.header.embed_type' => array(
557
+ 'type' => 'string',
558
+ 'default' => 'blocking'
559
+ ),
560
+ 'minify.js.combine.body' => array(
561
+ 'type' => 'boolean',
562
+ 'default' => false
563
+ ),
564
+ 'minify.js.body.embed_type' => array(
565
+ 'type' => 'string',
566
+ 'default' => 'blocking'
567
+ ),
568
+ 'minify.js.combine.footer' => array(
569
+ 'type' => 'boolean',
570
+ 'default' => false
571
+ ),
572
+ 'minify.js.footer.embed_type' => array(
573
+ 'type' => 'string',
574
+ 'default' => 'blocking'
575
+ ),
576
+ 'minify.js.strip.comments' => array(
577
+ 'type' => 'boolean',
578
+ 'default' => false
579
+ ),
580
+ 'minify.js.strip.crlf' => array(
581
+ 'type' => 'boolean',
582
+ 'default' => false
583
+ ),
584
+ 'minify.js.groups' => array(
585
+ 'type' => 'array',
586
+ 'default' => array()
587
+ ),
588
+ 'minify.yuijs.path.java' => array(
589
+ 'type' => 'string',
590
+ 'default' => 'java'
591
+ ),
592
+ 'minify.yuijs.path.jar' => array(
593
+ 'type' => 'string',
594
+ 'default' => 'yuicompressor.jar'
595
+ ),
596
+ 'minify.yuijs.options.line-break' => array(
597
+ 'type' => 'integer',
598
+ 'default' => 5000
599
+ ),
600
+ 'minify.yuijs.options.nomunge' => array(
601
+ 'type' => 'boolean',
602
+ 'default' => false
603
+ ),
604
+ 'minify.yuijs.options.preserve-semi' => array(
605
+ 'type' => 'boolean',
606
+ 'default' => false
607
+ ),
608
+ 'minify.yuijs.options.disable-optimizations' => array(
609
+ 'type' => 'boolean',
610
+ 'default' => false
611
+ ),
612
+ 'minify.yuicss.path.java' => array(
613
+ 'type' => 'string',
614
+ 'default' => 'java'
615
+ ),
616
+ 'minify.yuicss.path.jar' => array(
617
+ 'type' => 'string',
618
+ 'default' => 'yuicompressor.jar'
619
+ ),
620
+ 'minify.yuicss.options.line-break' => array(
621
+ 'type' => 'integer',
622
+ 'default' => 5000
623
+ ),
624
+ 'minify.ccjs.path.java' => array(
625
+ 'type' => 'string',
626
+ 'default' => 'java'
627
+ ),
628
+ 'minify.ccjs.path.jar' => array(
629
+ 'type' => 'string',
630
+ 'default' => 'compiler.jar'
631
+ ),
632
+ 'minify.ccjs.options.compilation_level' => array(
633
+ 'type' => 'string',
634
+ 'default' => 'SIMPLE_OPTIMIZATIONS'
635
+ ),
636
+ 'minify.ccjs.options.formatting' => array(
637
+ 'type' => 'string',
638
+ 'default' => ''
639
+ ),
640
+ 'minify.csstidy.options.remove_bslash' => array(
641
+ 'type' => 'boolean',
642
+ 'default' => true
643
+ ),
644
+ 'minify.csstidy.options.compress_colors' => array(
645
+ 'type' => 'boolean',
646
+ 'default' => true
647
+ ),
648
+ 'minify.csstidy.options.compress_font-weight' => array(
649
+ 'type' => 'boolean',
650
+ 'default' => true
651
+ ),
652
+ 'minify.csstidy.options.lowercase_s' => array(
653
+ 'type' => 'boolean',
654
+ 'default' => false
655
+ ),
656
+ 'minify.csstidy.options.optimise_shorthands' => array(
657
+ 'type' => 'integer',
658
+ 'default' => 1
659
+ ),
660
+ 'minify.csstidy.options.remove_last_;' => array(
661
+ 'type' => 'boolean',
662
+ 'default' => false
663
+ ),
664
+ 'minify.csstidy.options.case_properties' => array(
665
+ 'type' => 'integer',
666
+ 'default' => 1
667
+ ),
668
+ 'minify.csstidy.options.sort_properties' => array(
669
+ 'type' => 'boolean',
670
+ 'default' => false
671
+ ),
672
+ 'minify.csstidy.options.sort_selectors' => array(
673
+ 'type' => 'boolean',
674
+ 'default' => false
675
+ ),
676
+ 'minify.csstidy.options.merge_selectors' => array(
677
+ 'type' => 'integer',
678
+ 'default' => 2
679
+ ),
680
+ 'minify.csstidy.options.discard_invalid_properties' => array(
681
+ 'type' => 'boolean',
682
+ 'default' => false
683
+ ),
684
+ 'minify.csstidy.options.css_level' => array(
685
+ 'type' => 'string',
686
+ 'default' => 'CSS2.1'
687
+ ),
688
+ 'minify.csstidy.options.preserve_css' => array(
689
+ 'type' => 'boolean',
690
+ 'default' => false
691
+ ),
692
+ 'minify.csstidy.options.timestamp' => array(
693
+ 'type' => 'boolean',
694
+ 'default' => false
695
+ ),
696
+ 'minify.csstidy.options.template' => array(
697
+ 'type' => 'string',
698
+ 'default' => 'default'
699
+ ),
700
+ 'minify.htmltidy.options.clean' => array(
701
+ 'type' => 'boolean',
702
+ 'default' => false
703
+ ),
704
+ 'minify.htmltidy.options.hide-comments' => array(
705
+ 'type' => 'boolean',
706
+ 'default' => true
707
+ ),
708
+ 'minify.htmltidy.options.wrap' => array(
709
+ 'type' => 'integer',
710
+ 'default' => 0
711
+ ),
712
+ 'minify.reject.logged' => array(
713
+ 'type' => 'boolean',
714
+ 'default' => false
715
+ ),
716
+ 'minify.reject.ua' => array(
717
+ 'type' => 'array',
718
+ 'default' => array()
719
+ ),
720
+ 'minify.reject.uri' => array(
721
+ 'type' => 'array',
722
+ 'default' => array()
723
+ ),
724
+ 'minify.reject.files.js' => array(
725
+ 'type' => 'array',
726
+ 'default' => array()
727
+ ),
728
+ 'minify.reject.files.css' => array(
729
+ 'type' => 'array',
730
+ 'default' => array()
731
+ ),
732
+ 'minify.cache.files' => array(
733
+ 'type' => 'array',
734
+ 'default' => array('https://ajax.googleapis.com')
735
+ ),
736
+
737
+ 'cdn.enabled' => array(
738
+ 'type' => 'boolean',
739
+ 'default' => false
740
+ ),
741
+ 'cdn.debug' => array(
742
+ 'type' => 'boolean',
743
+ 'default' => false
744
+ ),
745
+ 'cdn.engine' => array(
746
+ 'type' => 'string',
747
+ 'default' => 'ftp'
748
+ ),
749
+ 'cdn.uploads.enable' => array(
750
+ 'type' => 'boolean',
751
+ 'default' => true
752
+ ),
753
+ 'cdn.includes.enable' => array(
754
+ 'type' => 'boolean',
755
+ 'default' => true
756
+ ),
757
+ 'cdn.includes.files' => array(
758
+ 'type' => 'string',
759
+ 'default' => '*.css;*.js;*.gif;*.png;*.jpg;*.xml'
760
+ ),
761
+ 'cdn.theme.enable' => array(
762
+ 'type' => 'boolean',
763
+ 'default' => true
764
+ ),
765
+ 'cdn.theme.files' => array(
766
+ 'type' => 'string',
767
+ 'default' => '*.css;*.js;*.gif;*.png;*.jpg;*.ico;*.ttf;*.otf,*.woff'
768
+ ),
769
+ 'cdn.minify.enable' => array(
770
+ 'type' => 'boolean',
771
+ 'default' => true
772
+ ),
773
+ 'cdn.custom.enable' => array(
774
+ 'type' => 'boolean',
775
+ 'default' => true
776
+ ),
777
+ 'cdn.custom.files' => array(
778
+ 'type' => 'array',
779
+ 'default' => array(
780
+ 'favicon.ico',
781
+ 'wp-content/gallery/*',
782
+ 'wp-content/uploads/avatars/*',
783
+ 'wp-content/plugins/wordpress-seo/css/xml-sitemap.xsl',
784
+ 'wp-content/plugins/wp-minify/min*',
785
+ 'wp-content/plugins/*.js',
786
+ 'wp-content/plugins/*.css',
787
+ 'wp-content/plugins/*.gif',
788
+ 'wp-content/plugins/*.jpg',
789
+ 'wp-content/plugins/*.png',
790
+ )
791
+ ),
792
+ 'cdn.import.external' => array(
793
+ 'type' => 'boolean',
794
+ 'default' => false
795
+ ),
796
+ 'cdn.import.files' => array(
797
+ 'type' => 'string',
798
+ 'default' => false
799
+ ),
800
+ 'cdn.queue.interval' => array(
801
+ 'type' => 'integer',
802
+ 'default' => 900
803
+ ),
804
+ 'cdn.queue.limit' => array(
805
+ 'type' => 'integer',
806
+ 'default' => 25
807
+ ),
808
+ 'cdn.force.rewrite' => array(
809
+ 'type' => 'boolean',
810
+ 'default' => false
811
+ ),
812
+ 'cdn.autoupload.enabled' => array(
813
+ 'type' => 'boolean',
814
+ 'default' => false
815
+ ),
816
+ 'cdn.autoupload.interval' => array(
817
+ 'type' => 'integer',
818
+ 'default' => 3600
819
+ ),
820
+ 'cdn.canonical_header' => array(
821
+ 'type' => 'boolean',
822
+ 'default' => false
823
+ ),
824
+ 'cdn.ftp.host' => array(
825
+ 'type' => 'string',
826
+ 'default' => ''
827
+ ),
828
+ 'cdn.ftp.user' => array(
829
+ 'type' => 'string',
830
+ 'default' => ''
831
+ ),
832
+ 'cdn.ftp.pass' => array(
833
+ 'type' => 'string',
834
+ 'default' => ''
835
+ ),
836
+ 'cdn.ftp.path' => array(
837
+ 'type' => 'string',
838
+ 'default' => ''
839
+ ),
840
+ 'cdn.ftp.pasv' => array(
841
+ 'type' => 'boolean',
842
+ 'default' => false
843
+ ),
844
+ 'cdn.ftp.domain' => array(
845
+ 'type' => 'array',
846
+ 'default' => array()
847
+ ),
848
+ 'cdn.ftp.ssl' => array(
849
+ 'type' => 'string',
850
+ 'default' => 'auto'
851
+ ),
852
+ 'cdn.s3.key' => array(
853
+ 'type' => 'string',
854
+ 'default' => ''
855
+ ),
856
+ 'cdn.s3.secret' => array(
857
+ 'type' => 'string',
858
+ 'default' => ''
859
+ ),
860
+ 'cdn.s3.bucket' => array(
861
+ 'type' => 'string',
862
+ 'default' => ''
863
+ ),
864
+ 'cdn.s3.cname' => array(
865
+ 'type' => 'array',
866
+ 'default' => array()
867
+ ),
868
+ 'cdn.s3.ssl' => array(
869
+ 'type' => 'string',
870
+ 'default' => 'auto'
871
+ ),
872
+ 'cdn.cf.key' => array(
873
+ 'type' => 'string',
874
+ 'default' => ''
875
+ ),
876
+ 'cdn.cf.secret' => array(
877
+ 'type' => 'string',
878
+ 'default' => ''
879
+ ),
880
+ 'cdn.cf.bucket' => array(
881
+ 'type' => 'string',
882
+ 'default' => ''
883
+ ),
884
+ 'cdn.cf.id' => array(
885
+ 'type' => 'string',
886
+ 'default' => ''
887
+ ),
888
+ 'cdn.cf.cname' => array(
889
+ 'type' => 'array',
890
+ 'default' => array()
891
+ ),
892
+ 'cdn.cf.ssl' => array(
893
+ 'type' => 'string',
894
+ 'default' => 'auto'
895
+ ),
896
+ 'cdn.cf2.key' => array(
897
+ 'type' => 'string',
898
+ 'default' => ''
899
+ ),
900
+ 'cdn.cf2.secret' => array(
901
+ 'type' => 'string',
902
+ 'default' => ''
903
+ ),
904
+ 'cdn.cf2.id' => array(
905
+ 'type' => 'string',
906
+ 'default' => ''
907
+ ),
908
+ 'cdn.cf2.cname' => array(
909
+ 'type' => 'array',
910
+ 'default' => array()
911
+ ),
912
+ 'cdn.cf2.ssl' => array(
913
+ 'type' => 'string',
914
+ 'default' => ''
915
+ ),
916
+ 'cdn.rscf.user' => array(
917
+ 'type' => 'string',
918
+ 'default' => ''
919
+ ),
920
+ 'cdn.rscf.key' => array(
921
+ 'type' => 'string',
922
+ 'default' => ''
923
+ ),
924
+ 'cdn.rscf.location' => array(
925
+ 'type' => 'string',
926
+ 'default' => 'us'
927
+ ),
928
+ 'cdn.rscf.container' => array(
929
+ 'type' => 'string',
930
+ 'default' => ''
931
+ ),
932
+ 'cdn.rscf.cname' => array(
933
+ 'type' => 'array',
934
+ 'default' => array()
935
+ ),
936
+ 'cdn.rscf.ssl' => array(
937
+ 'type' => 'string',
938
+ 'default' => 'auto'
939
+ ),
940
+ 'cdn.azure.user' => array(
941
+ 'type' => 'string',
942
+ 'default' => ''
943
+ ),
944
+ 'cdn.azure.key' => array(
945
+ 'type' => 'string',
946
+ 'default' => ''
947
+ ),
948
+ 'cdn.azure.container' => array(
949
+ 'type' => 'string',
950
+ 'default' => ''
951
+ ),
952
+ 'cdn.azure.cname' => array(
953
+ 'type' => 'array',
954
+ 'default' => array()
955
+ ),
956
+ 'cdn.azure.ssl' => array(
957
+ 'type' => 'string',
958
+ 'default' => 'auto'
959
+ ),
960
+ 'cdn.mirror.domain' => array(
961
+ 'type' => 'array',
962
+ 'default' => array()
963
+ ),
964
+ 'cdn.mirror.ssl' => array(
965
+ 'type' => 'string',
966
+ 'default' => 'auto'
967
+ ),
968
+ 'cdn.netdna.alias' => array(
969
+ 'type' => 'string',
970
+ 'default' => ''
971
+ ),
972
+ 'cdn.netdna.consumerkey' => array(
973
+ 'type' => 'string',
974
+ 'default' => ''
975
+ ),
976
+ 'cdn.netdna.consumersecret' => array(
977
+ 'type' => 'string',
978
+ 'default' => ''
979
+ ),
980
+ 'cdn.netdna.domain' => array(
981
+ 'type' => 'array',
982
+ 'default' => array()
983
+ ),
984
+ 'cdn.netdna.ssl' => array(
985
+ 'type' => 'string',
986
+ 'default' => 'auto'
987
+ ),
988
+ 'cdn.cotendo.username' => array(
989
+ 'type' => 'string',
990
+ 'default' => ''
991
+ ),
992
+ 'cdn.cotendo.password' => array(
993
+ 'type' => 'string',
994
+ 'default' => ''
995
+ ),
996
+ 'cdn.cotendo.zones' => array(
997
+ 'type' => 'array',
998
+ 'default' => array()
999
+ ),
1000
+ 'cdn.cotendo.domain' => array(
1001
+ 'type' => 'array',
1002
+ 'default' => array()
1003
+ ),
1004
+ 'cdn.cotendo.ssl' => array(
1005
+ 'type' => 'string',
1006
+ 'default' => 'auto'
1007
+ ),
1008
+ 'cdn.akamai.username' => array(
1009
+ 'type' => 'string',
1010
+ 'default' => ''
1011
+ ),
1012
+ 'cdn.akamai.password' => array(
1013
+ 'type' => 'string',
1014
+ 'default' => ''
1015
+ ),
1016
+ 'cdn.akamai.email_notification' => array(
1017
+ 'type' => 'array',
1018
+ 'default' => array()
1019
+ ),
1020
+ 'cdn.akamai.action' => array(
1021
+ 'type' => 'string',
1022
+ 'default' => 'invalidate'
1023
+ ),
1024
+ 'cdn.akamai.zone' => array(
1025
+ 'type' => 'string',
1026
+ 'default' => 'production'
1027
+ ),
1028
+ 'cdn.akamai.domain' => array(
1029
+ 'type' => 'array',
1030
+ 'default' => array()
1031
+ ),
1032
+ 'cdn.akamai.ssl' => array(
1033
+ 'type' => 'string',
1034
+ 'default' => 'auto'
1035
+ ),
1036
+ 'cdn.edgecast.account' => array(
1037
+ 'type' => 'string',
1038
+ 'default' => ''
1039
+ ),
1040
+ 'cdn.edgecast.token' => array(
1041
+ 'type' => 'string',
1042
+ 'default' => ''
1043
+ ),
1044
+ 'cdn.edgecast.domain' => array(
1045
+ 'type' => 'array',
1046
+ 'default' => array()
1047
+ ),
1048
+ 'cdn.edgecast.ssl' => array(
1049
+ 'type' => 'string',
1050
+ 'default' => 'auto'
1051
+ ),
1052
+ 'cdn.att.account' => array(
1053
+ 'type' => 'string',
1054
+ 'default' => ''
1055
+ ),
1056
+ 'cdn.att.token' => array(
1057
+ 'type' => 'string',
1058
+ 'default' => ''
1059
+ ),
1060
+ 'cdn.att.domain' => array(
1061
+ 'type' => 'array',
1062
+ 'default' => array()
1063
+ ),
1064
+ 'cdn.att.ssl' => array(
1065
+ 'type' => 'string',
1066
+ 'default' => 'auto'
1067
+ ),
1068
+ 'cdn.reject.admins' => array(
1069
+ 'type' => 'boolean',
1070
+ 'default' => false
1071
+ ),
1072
+ 'cdn.reject.logged_roles' => array(
1073
+ 'type' => 'boolean',
1074
+ 'default' => false
1075
+ ),
1076
+ 'cdn.reject.roles' => array(
1077
+ 'type' => 'array',
1078
+ 'default' => array()
1079
+ ),
1080
+ 'cdn.reject.ua' => array(
1081
+ 'type' => 'array',
1082
+ 'default' => array()
1083
+ ),
1084
+ 'cdn.reject.uri' => array(
1085
+ 'type' => 'array',
1086
+ 'default' => array()
1087
+ ),
1088
+ 'cdn.reject.files' => array(
1089
+ 'type' => 'array',
1090
+ 'default' => array(
1091
+ 'wp-content/uploads/wpcf7_captcha/*',
1092
+ 'wp-content/uploads/imagerotator.swf',
1093
+ 'wp-content/plugins/wp-fb-autoconnect/facebook-platform/channel.html'
1094
+ )
1095
+ ),
1096
+ 'cdn.reject.ssl' => array(
1097
+ 'type' => 'boolean',
1098
+ 'default' => false
1099
+ ),
1100
+ 'cdncache.enabled' => array(
1101
+ 'type' => 'boolean',
1102
+ 'default' => false
1103
+ ),
1104
+
1105
+
1106
+ 'cloudflare.enabled' => array(
1107
+ 'type' => 'boolean',
1108
+ 'default' => false
1109
+ ),
1110
+ 'cloudflare.email' => array(
1111
+ 'type' => 'string',
1112
+ 'default' => ''
1113
+ ),
1114
+ 'cloudflare.key' => array(
1115
+ 'type' => 'string',
1116
+ 'default' => ''
1117
+ ),
1118
+ 'cloudflare.zone' => array(
1119
+ 'type' => 'string',
1120
+ 'default' => ''
1121
+ ),
1122
+ 'cloudflare.ips.ip4' => array(
1123
+ 'type' => 'array',
1124
+ 'default' => array()
1125
+ ),
1126
+ 'cloudflare.ips.ip6' => array(
1127
+ 'type' => 'array',
1128
+ 'default' => array()
1129
+ ),
1130
+
1131
+ 'varnish.enabled' => array(
1132
+ 'type' => 'boolean',
1133
+ 'default' => false
1134
+ ),
1135
+ 'varnish.debug' => array(
1136
+ 'type' => 'boolean',
1137
+ 'default' => false
1138
+ ),
1139
+ 'varnish.servers' => array(
1140
+ 'type' => 'array',
1141
+ 'default' => array()
1142
+ ),
1143
+
1144
+ 'browsercache.enabled' => array(
1145
+ 'type' => 'boolean',
1146
+ 'default' => true
1147
+ ),
1148
+ 'browsercache.no404wp' => array(
1149
+ 'type' => 'boolean',
1150
+ 'default' => false
1151
+ ),
1152
+ 'browsercache.no404wp.exceptions' => array(
1153
+ 'type' => 'array',
1154
+ 'default' => array(
1155
+ 'robots\.txt',
1156
+ 'sitemap(_index)?\.xml(\.gz)?',
1157
+ '[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?'
1158
+ )
1159
+ ),
1160
+ 'browsercache.cssjs.last_modified' => array(
1161
+ 'type' => 'boolean',
1162
+ 'default' => true
1163
+ ),
1164
+ 'browsercache.cssjs.compression' => array(
1165
+ 'type' => 'boolean',
1166
+ 'default' => true
1167
+ ),
1168
+ 'browsercache.cssjs.expires' => array(
1169
+ 'type' => 'boolean',
1170
+ 'default' => false
1171
+ ),
1172
+ 'browsercache.cssjs.lifetime' => array(
1173
+ 'type' => 'integer',
1174
+ 'default' => 31536000
1175
+ ),
1176
+ 'browsercache.cssjs.nocookies' => array(
1177
+ 'type' => 'boolean',
1178
+ 'default' => false
1179
+ ),
1180
+ 'browsercache.cssjs.cache.control' => array(
1181
+ 'type' => 'boolean',
1182
+ 'default' => false
1183
+ ),
1184
+ 'browsercache.cssjs.cache.policy' => array(
1185
+ 'type' => 'string',
1186
+ 'default' => 'cache_public_maxage'
1187
+ ),
1188
+ 'browsercache.cssjs.etag' => array(
1189
+ 'type' => 'boolean',
1190
+ 'default' => false
1191
+ ),
1192
+ 'browsercache.cssjs.w3tc' => array(
1193
+ 'type' => 'boolean',
1194
+ 'default' => false
1195
+ ),
1196
+ 'browsercache.cssjs.replace' => array(
1197
+ 'type' => 'boolean',
1198
+ 'default' => false
1199
+ ),
1200
+ 'browsercache.html.compression' => array(
1201
+ 'type' => 'boolean',
1202
+ 'default' => true
1203
+ ),
1204
+ 'browsercache.html.last_modified' => array(
1205
+ 'type' => 'boolean',
1206
+ 'default' => true
1207
+ ),
1208
+ 'browsercache.html.expires' => array(
1209
+ 'type' => 'boolean',
1210
+ 'default' => false
1211
+ ),
1212
+ 'browsercache.html.lifetime' => array(
1213
+ 'type' => 'integer',
1214
+ 'default' => 3600
1215
+ ),
1216
+ 'browsercache.html.cache.control' => array(
1217
+ 'type' => 'boolean',
1218
+ 'default' => false
1219
+ ),
1220
+ 'browsercache.html.cache.policy' => array(
1221
+ 'type' => 'string',
1222
+ 'default' => 'cache_public_maxage'
1223
+ ),
1224
+ 'browsercache.html.etag' => array(
1225
+ 'type' => 'boolean',
1226
+ 'default' => false
1227
+ ),
1228
+ 'browsercache.html.w3tc' => array(
1229
+ 'type' => 'boolean',
1230
+ 'default' => false
1231
+ ),
1232
+ 'browsercache.html.replace' => array(
1233
+ 'type' => 'boolean',
1234
+ 'default' => false
1235
+ ),
1236
+ 'browsercache.other.last_modified' => array(
1237
+ 'type' => 'boolean',
1238
+ 'default' => true
1239
+ ),
1240
+ 'browsercache.other.compression' => array(
1241
+ 'type' => 'boolean',
1242
+ 'default' => true
1243
+ ),
1244
+ 'browsercache.other.expires' => array(
1245
+ 'type' => 'boolean',
1246
+ 'default' => false
1247
+ ),
1248
+ 'browsercache.other.lifetime' => array(
1249
+ 'type' => 'integer',
1250
+ 'default' => 31536000
1251
+ ),
1252
+ 'browsercache.other.nocookies' => array(
1253
+ 'type' => 'boolean',
1254
+ 'default' => false
1255
+ ),
1256
+ 'browsercache.other.cache.control' => array(
1257
+ 'type' => 'boolean',
1258
+ 'default' => false
1259
+ ),
1260
+ 'browsercache.other.cache.policy' => array(
1261
+ 'type' => 'string',
1262
+ 'default' => 'cache_public_maxage'
1263
+ ),
1264
+ 'browsercache.other.etag' => array(
1265
+ 'type' => 'boolean',
1266
+ 'default' => false
1267
+ ),
1268
+ 'browsercache.other.w3tc' => array(
1269
+ 'type' => 'boolean',
1270
+ 'default' => false
1271
+ ),
1272
+ 'browsercache.other.replace' => array(
1273
+ 'type' => 'boolean',
1274
+ 'default' => false
1275
+ ),
1276
+ 'browsercache.timestamp' => array(
1277
+ 'type' => 'string',
1278
+ 'default' => ''
1279
+ ),
1280
+
1281
+ 'mobile.enabled' => array(
1282
+ 'type' => 'boolean',
1283
+ 'default' => false
1284
+ ),
1285
+ 'mobile.rgroups' => array(
1286
+ 'type' => 'array',
1287
+ 'default' => array(
1288
+ 'high' => array(
1289
+ 'theme' => '',
1290
+ 'enabled' => false,
1291
+ 'redirect' => '',
1292
+ 'agents' => array(
1293
+ 'acer\ s100',
1294
+ 'android',
1295
+ 'archos5',
1296
+ 'bada',
1297
+ 'blackberry9500',
1298
+ 'blackberry9530',
1299
+ 'blackberry9550',
1300
+ 'blackberry\ 9800',
1301
+ 'cupcake',
1302
+ 'docomo\ ht\-03a',
1303
+ 'dream',
1304
+ 'froyo',
1305
+ 'googlebot-mobile',
1306
+ 'htc\ hero',
1307
+ 'htc\ magic',
1308
+ 'htc_dream',
1309
+ 'htc_magic',
1310
+ 'iemobile/7.0',
1311
+ 'incognito',
1312
+ 'ipad',
1313
+ 'iphone',
1314
+ 'ipod',
1315
+ 'kindle',
1316
+ 'lg\-gw620',
1317
+ 'liquid\ build',
1318
+ 'maemo',
1319
+ 'mot\-mb200',
1320
+ 'mot\-mb300',
1321
+ 'nexus\ one',
1322
+ 'opera\ mini',
1323
+ 's8000',
1324
+ 'samsung\-s8000',
1325
+ 'series60.*webkit',
1326
+ 'series60/5\.0',
1327
+ 'sonyericssone10',
1328
+ 'sonyericssonu20',
1329
+ 'sonyericssonx10',
1330
+ 't\-mobile\ mytouch\ 3g',
1331
+ 't\-mobile\ opal',
1332
+ 'tattoo',
1333
+ 'webmate',
1334
+ 'webos'
1335
+ )
1336
+ ),
1337
+ 'low' => array(
1338
+ 'theme' => '',
1339
+ 'enabled' => false,
1340
+ 'redirect' => '',
1341
+ 'agents' => array(
1342
+ '2\.0\ mmp',
1343
+ '240x320',
1344
+ 'alcatel',
1345
+ 'amoi',
1346
+ 'asus',
1347
+ 'au\-mic',
1348
+ 'audiovox',
1349
+ 'avantgo',
1350
+ 'benq',
1351
+ 'bird',
1352
+ 'blackberry',
1353
+ 'blazer',
1354
+ 'cdm',
1355
+ 'cellphone',
1356
+ 'danger',
1357
+ 'ddipocket',
1358
+ 'docomo',
1359
+ 'dopod',
1360
+ 'elaine/3\.0',
1361
+ 'ericsson',
1362
+ 'eudoraweb',
1363
+ 'fly',
1364
+ 'haier',
1365
+ 'hiptop',
1366
+ 'hp\.ipaq',
1367
+ 'htc',
1368
+ 'huawei',
1369
+ 'i\-mobile',
1370
+ 'iemobile',
1371
+ 'j\-phone',
1372
+ 'kddi',
1373
+ 'konka',
1374
+ 'kwc',
1375
+ 'kyocera/wx310k',
1376
+ 'lenovo',
1377
+ 'lg',
1378
+ 'lg/u990',
1379
+ 'lge\ vx',
1380
+ 'midp',
1381
+ 'midp\-2\.0',
1382
+ 'mmef20',
1383
+ 'mmp',
1384
+ 'mobilephone',
1385
+ 'mot\-v',
1386
+ 'motorola',
1387
+ 'netfront',
1388
+ 'newgen',
1389
+ 'newt',
1390
+ 'nintendo\ ds',
1391
+ 'nintendo\ wii',
1392
+ 'nitro',
1393
+ 'nokia',
1394
+ 'novarra',
1395
+ 'o2',
1396
+ 'openweb',
1397
+ 'opera\ mobi',
1398
+ 'opera\.mobi',
1399
+ 'palm',
1400
+ 'panasonic',
1401
+ 'pantech',
1402
+ 'pdxgw',
1403
+ 'pg',
1404
+ 'philips',
1405
+ 'phone',
1406
+ 'playstation\ portable',
1407
+ 'portalmmm',
1408
+ '\bppc\b',
1409
+ 'proxinet',
1410
+ 'psp',
1411
+ 'qtek',
1412
+ 'sagem',
1413
+ 'samsung',
1414
+ 'sanyo',
1415
+ 'sch',
1416
+ 'sec',
1417
+ 'sendo',
1418
+ 'sgh',
1419
+ 'sharp',
1420
+ 'sharp\-tq\-gx10',
1421
+ 'small',
1422
+ 'smartphone',
1423
+ 'softbank',
1424
+ 'sonyericsson',
1425
+ 'sph',
1426
+ 'symbian',
1427
+ 'symbian\ os',
1428
+ 'symbianos',
1429
+ 'toshiba',
1430
+ 'treo',
1431
+ 'ts21i\-10',
1432
+ 'up\.browser',
1433
+ 'up\.link',
1434
+ 'uts',
1435
+ 'vertu',
1436
+ 'vodafone',
1437
+ 'wap',
1438
+ 'willcome',
1439
+ 'windows\ ce',
1440
+ 'windows\.ce',
1441
+ 'winwap',
1442
+ 'xda',
1443
+ 'zte'
1444
+ )
1445
+ )
1446
+ )
1447
+ ),
1448
+
1449
+
1450
+ 'referrer.enabled' => array(
1451
+ 'type' => 'boolean',
1452
+ 'default' => false
1453
+ ),
1454
+ 'referrer.rgroups' => array(
1455
+ 'type' => 'array',
1456
+ 'default' => array(
1457
+ 'search_engines' => array(
1458
+ 'theme' => '',
1459
+ 'enabled' => false,
1460
+ 'redirect' => '',
1461
+ 'referrers' => array(
1462
+ 'google\.com',
1463
+ 'yahoo\.com',
1464
+ 'bing\.com',
1465
+ 'ask\.com',
1466
+ 'msn\.com'
1467
+ )
1468
+ )
1469
+ )
1470
+ ),
1471
+
1472
+
1473
+ 'common.support' => array(
1474
+ 'type' => 'string',
1475
+ 'default' => ''
1476
+ ),
1477
+ 'common.install' => array(
1478
+ 'type' => 'integer',
1479
+ 'default' => 0
1480
+ ),
1481
+ 'common.tweeted' => array(
1482
+ 'type' => 'boolean',
1483
+ 'default' => false
1484
+ ),
1485
+ 'config.check' => array(
1486
+ 'type' => 'boolean',
1487
+ 'default' => true
1488
+ ),
1489
+ 'config.path' => array(
1490
+ 'type' => 'string',
1491
+ 'default' => ''
1492
+ ),
1493
+ 'widget.latest.items' => array(
1494
+ 'type' => 'integer',
1495
+ 'default' => 3
1496
+ ),
1497
+ 'widget.latest_news.items' => array(
1498
+ 'type' => 'integer',
1499
+ 'default' => 5
1500
+ ),
1501
+ 'widget.pagespeed.enabled' => array(
1502
+ 'type' => 'boolean',
1503
+ 'default' => true
1504
+ ),
1505
+ 'widget.pagespeed.key' => array(
1506
+ 'type' => 'string',
1507
+ 'default' => ''
1508
+ ),
1509
+
1510
+ 'notes.wp_content_changed_perms' => array(
1511
+ 'type' => 'boolean',
1512
+ 'default' => true
1513
+ ),
1514
+ 'notes.wp_content_perms' => array(
1515
+ 'type' => 'boolean',
1516
+ 'default' => true
1517
+ ),
1518
+ 'notes.php_is_old' => array(
1519
+ 'type' => 'boolean',
1520
+ 'default' => true
1521
+ ),
1522
+ 'notes.theme_changed' => array(
1523
+ 'type' => 'boolean',
1524
+ 'default' => false
1525
+ ),
1526
+ 'notes.wp_upgraded' => array(
1527
+ 'type' => 'boolean',
1528
+ 'default' => false
1529
+ ),
1530
+ 'notes.plugins_updated' => array(
1531
+ 'type' => 'boolean',
1532
+ 'default' => false
1533
+ ),
1534
+ 'notes.cdn_upload' => array(
1535
+ 'type' => 'boolean',
1536
+ 'default' => false
1537
+ ),
1538
+ 'notes.cdn_reupload' => array(
1539
+ 'type' => 'boolean',
1540
+ 'default' => false
1541
+ ),
1542
+ 'notes.need_empty_pgcache' => array(
1543
+ 'type' => 'boolean',
1544
+ 'default' => false
1545
+ ),
1546
+ 'notes.need_empty_minify' => array(
1547
+ 'type' => 'boolean',
1548
+ 'default' => false
1549
+ ),
1550
+ 'notes.need_empty_objectcache' => array(
1551
+ 'type' => 'boolean',
1552
+ 'default' => false
1553
+ ),
1554
+ 'notes.root_rules' => array(
1555
+ 'type' => 'boolean',
1556
+ 'default' => true
1557
+ ),
1558
+ 'notes.rules' => array(
1559
+ 'type' => 'boolean',
1560
+ 'default' => true
1561
+ ),
1562
+ 'notes.pgcache_rules_wpsc' => array(
1563
+ 'type' => 'boolean',
1564
+ 'default' => true
1565
+ ),
1566
+ 'notes.support_us' => array(
1567
+ 'type' => 'boolean',
1568
+ 'default' => true
1569
+ ),
1570
+ 'notes.no_curl' => array(
1571
+ 'type' => 'boolean',
1572
+ 'default' => true
1573
+ ),
1574
+ 'notes.no_zlib' => array(
1575
+ 'type' => 'boolean',
1576
+ 'default' => true
1577
+ ),
1578
+ 'notes.zlib_output_compression' => array(
1579
+ 'type' => 'boolean',
1580
+ 'default' => true
1581
+ ),
1582
+ 'notes.no_permalink_rules' => array(
1583
+ 'type' => 'boolean',
1584
+ 'default' => true
1585
+ ),
1586
+ 'notes.browsercache_rules_no404wp' => array(
1587
+ 'type' => 'boolean',
1588
+ 'default' => true
1589
+ ),
1590
+
1591
+ 'timelimit.email_send' => array(
1592
+ 'type' => 'integer',
1593
+ 'default' => 180
1594
+ ),
1595
+ 'timelimit.varnish_purge' => array(
1596
+ 'type' => 'integer',
1597
+ 'default' => 300
1598
+ ),
1599
+ 'timelimit.cache_flush' => array(
1600
+ 'type' => 'integer',
1601
+ 'default' => 600
1602
+ ),
1603
+ 'timelimit.cache_gc' => array(
1604
+ 'type' => 'integer',
1605
+ 'default' => 600
1606
+ ),
1607
+ 'timelimit.cdn_upload' => array(
1608
+ 'type' => 'integer',
1609
+ 'default' => 600
1610
+ ),
1611
+ 'timelimit.cdn_delete' => array(
1612
+ 'type' => 'integer',
1613
+ 'default' => 300
1614
+ ),
1615
+ 'timelimit.cdn_purge' => array(
1616
+ 'type' => 'integer',
1617
+ 'default' => 300
1618
+ ),
1619
+ 'timelimit.cdn_import' => array(
1620
+ 'type' => 'integer',
1621
+ 'default' => 600
1622
+ ),
1623
+ 'timelimit.cdn_test' => array(
1624
+ 'type' => 'integer',
1625
+ 'default' => 300
1626
+ ),
1627
+ 'timelimit.cdn_container_create' => array(
1628
+ 'type' => 'integer',
1629
+ 'default' => 300
1630
+ ),
1631
+ 'timelimit.cloudflare_api_request' => array(
1632
+ 'type' => 'integer',
1633
+ 'default' => 180
1634
+ ),
1635
+ 'timelimit.domain_rename' => array(
1636
+ 'type' => 'integer',
1637
+ 'default' => 120
1638
+ ),
1639
+ 'timelimit.minify_recommendations' => array(
1640
+ 'type' => 'integer',
1641
+ 'default' => 600
1642
+ ),
1643
+
1644
+ 'minify.auto.filename_length' => array(
1645
+ 'type' => 'integer',
1646
+ 'default' => 251
1647
+ ),
1648
+ 'common.instance_id' => array(
1649
+ 'type' => 'integer',
1650
+ 'default' => 0
1651
+ ),
1652
+ 'common.force_master' => array(
1653
+ 'type' => 'boolean',
1654
+ 'default' => true,
1655
+ 'master_only' => 'true'
1656
+ ),
1657
+ 'newrelic.enabled' => array(
1658
+ 'type' => 'boolean',
1659
+ 'default' => false,
1660
+ ),
1661
+ 'newrelic.api_key' => array(
1662
+ 'type' => 'string',
1663
+ 'default' => '',
1664
+ 'master_only' => 'true'
1665
+ ),
1666
+ 'newrelic.account_id' => array(
1667
+ 'type' => 'string',
1668
+ 'default' => '',
1669
+ 'master_only' => 'true'
1670
+ ),
1671
+ 'newrelic.application_id' => array(
1672
+ 'type' => 'integer',
1673
+ 'default' => 0,
1674
+ ),
1675
+ 'newrelic.appname' => array(
1676
+ 'type' => 'string',
1677
+ 'default' => '',
1678
+ ),
1679
+ 'newrelic.accept.logged_roles' => array(
1680
+ 'type' => 'boolean',
1681
+ 'default' => true
1682
+ ),
1683
+ 'newrelic.accept.roles' => array(
1684
+ 'type' => 'array',
1685
+ 'default' => array('contributor')
1686
+ ),
1687
+ 'newrelic.use_php_function' => array (
1688
+ 'type' => 'boolean',
1689
+ 'default' => false,
1690
+ ),
1691
+ 'notes.new_relic_page_load_notification' => array(
1692
+ 'type' => 'boolean',
1693
+ 'default' => true
1694
+ ),
1695
+ 'newrelic.appname_prefix' => array (
1696
+ 'type' => 'string',
1697
+ 'default' => 'Child Site - '
1698
+ ),
1699
+ 'newrelic.merge_with_network' => array (
1700
+ 'type' => 'boolean',
1701
+ 'default' => true
1702
+ ),
1703
+ 'newrelic.cache_time' => array(
1704
+ 'type' => 'integer',
1705
+ 'default' => 5
1706
+ ),
1707
+ 'newrelic.enable_xmit' => array(
1708
+ 'type' => 'boolean',
1709
+ 'default' => false
1710
+ ),
1711
+ 'newrelic.use_network_wide_id' => array(
1712
+ 'type' => 'boolean',
1713
+ 'default' => false,
1714
+ 'master_only' => 'true'
1715
+ )
1716
+ );
1717
+
1718
+
1719
+ /*
1720
+ * Descriptors of configuration keys
1721
+ * for admin config
1722
+ */
1723
+ $keys_admin = array(
1724
+ 'browsercache.configuration_sealed' => array(
1725
+ 'type' => 'boolean',
1726
+ 'default' => false,
1727
+ 'master_only' => 'true'
1728
+ ),
1729
+ 'cdn.configuration_sealed' => array(
1730
+ 'type' => 'boolean',
1731
+ 'default' => false,
1732
+ 'master_only' => 'true'
1733
+ ),
1734
+ 'cloudflare.configuration_sealed' => array(
1735
+ 'type' => 'boolean',
1736
+ 'default' => false,
1737
+ 'master_only' => 'true'
1738
+ ),
1739
+ 'common.install' => array(
1740
+ 'type' => 'integer',
1741
+ 'default' => 0,
1742
+ 'master_only' => 'true'
1743
+ ),
1744
+ 'common.visible_by_master_only' => array(
1745
+ 'type' => 'boolean',
1746
+ 'default' => true,
1747
+ 'master_only' => 'true'
1748
+ ),
1749
+ 'dbcache.configuration_sealed' => array(
1750
+ 'type' => 'boolean',
1751
+ 'default' => false,
1752
+ 'master_only' => 'true'
1753
+ ),
1754
+ 'minify.configuration_sealed' => array(
1755
+ 'type' => 'boolean',
1756
+ 'default' => false,
1757
+ 'master_only' => 'true'
1758
+ ),
1759
+ 'objectcache.configuration_sealed' => array(
1760
+ 'type' => 'boolean',
1761
+ 'default' => false,
1762
+ 'master_only' => 'true'
1763
+ ),
1764
+ 'pgcache.configuration_sealed' => array(
1765
+ 'type' => 'boolean',
1766
+ 'default' => false,
1767
+ 'master_only' => 'true'
1768
+ ),
1769
+ 'previewmode.enabled' => array(
1770
+ 'type' => 'boolean',
1771
+ 'default' => false,
1772
+ 'master_only' => 'true'
1773
+ ),
1774
+ 'varnish.configuration_sealed' => array(
1775
+ 'type' => 'boolean',
1776
+ 'default' => false,
1777
+ 'master_only' => 'true'
1778
+ ),
1779
+ 'fragmentcache.configuration_sealed' => array(
1780
+ 'type' => 'boolean',
1781
+ 'default' => false,
1782
+ 'master_only' => 'true'
1783
+ )
1784
+ ,'newrelic.configuration_sealed' => array(
1785
+ 'type' => 'boolean',
1786
+ 'default' => false,
1787
+ 'master_only' => 'true'
1788
+ )
1789
+ ,'notes.minify_error' => array(
1790
+ 'type' => 'boolean',
1791
+ 'default' => false
1792
+ )
1793
+ ,'minify.error.last' => array(
1794
+ 'type' => 'string',
1795
+ 'default' => ''
1796
+ ),
1797
+ 'minify.error.notification' => array(
1798
+ 'type' => 'string',
1799
+ 'default' => ''
1800
+ ),
1801
+ 'minify.error.notification.last' => array(
1802
+ 'type' => 'integer',
1803
+ 'default' => 0
1804
+ ),
1805
+ 'minify.error.file' => array(
1806
+ 'type' => 'string',
1807
+ 'default' => ''
1808
+ ),
1809
+ 'notes.remove_w3tc' => array(
1810
+ 'type' => 'boolean',
1811
+ 'default' => false
1812
+ )
1813
+ );
1814
+
1815
+ $keys_admin['common.install']['default'] = time();
1816
+
1817
+
1818
+
1819
+ /*
1820
+ * Descriptors how sealed configuration keys affect overriding
1821
+ */
1822
+ $sealing_keys_scope = array(
1823
+ array(
1824
+ 'key' => 'browsercache.configuration_sealed',
1825
+ 'prefix' => 'browsercache.'
1826
+ ),
1827
+ array(
1828
+ 'key' => 'cdn.configuration_sealed',
1829
+ 'prefix' => 'cdn.'
1830
+ ),
1831
+ array(
1832
+ 'key' => 'cloudflare.configuration_sealed',
1833
+ 'prefix' => 'cloudflare.'
1834
+ ),
1835
+ array(
1836
+ 'key' => 'dbcache.configuration_sealed',
1837
+ 'prefix' => 'dbcache.'
1838
+ ),
1839
+ array(
1840
+ 'key' => 'minify.configuration_sealed',
1841
+ 'prefix' => 'minify.'
1842
+ ),
1843
+ array(
1844
+ 'key' => 'objectcache.configuration_sealed',
1845
+ 'prefix' => 'objectcache.'
1846
+ ),
1847
+ array(
1848
+ 'key' => 'fragmentcache.configuration_sealed',
1849
+ 'prefix' => 'fragmentcache.'
1850
+ ),
1851
+ array(
1852
+ 'key' => 'pgcache.configuration_sealed',
1853
+ 'prefix' => 'pgcache.'
1854
+ ),
1855
+ array(
1856
+ 'key' => 'varnish.configuration_sealed',
1857
+ 'prefix' => 'varnish.'
1858
+ )
1859
+ );
1860
+
configs/0.9.2.8-ConfigKeys.php ADDED
@@ -0,0 +1,1860 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Descriptors of configuration keys
5
+ * for config
6
+ */
7
+
8
+ $keys = array(
9
+ 'cluster.messagebus.debug' => array(
10
+ 'type' => 'boolean',
11
+ 'default' => false
12
+ ),
13
+ 'cluster.messagebus.enabled' => array(
14
+ 'type' => 'boolean',
15
+ 'default' => false
16
+ ),
17
+ 'cluster.messagebus.sns.region' => array(
18
+ 'type' => 'string',
19
+ 'default' => ''
20
+ ),
21
+ 'cluster.messagebus.sns.api_key' => array(
22
+ 'type' => 'string',
23
+ 'default' => ''
24
+ ),
25
+ 'cluster.messagebus.sns.api_secret' => array(
26
+ 'type' => 'string',
27
+ 'default' => ''
28
+ ),
29
+ 'cluster.messagebus.sns.topic_arn' => array(
30
+ 'type' => 'string',
31
+ 'default' => ''
32
+ ),
33
+
34
+ 'dbcache.debug' => array(
35
+ 'type' => 'boolean',
36
+ 'default' => false
37
+ ),
38
+ 'dbcache.enabled' => array(
39
+ 'type' => 'boolean',
40
+ 'default' => false
41
+ ),
42
+ 'dbcache.engine' => array(
43
+ 'type' => 'string',
44
+ 'default' => 'file'
45
+ ),
46
+ 'dbcache.file.gc' => array(
47
+ 'type' => 'integer',
48
+ 'default' => 3600
49
+ ),
50
+ 'dbcache.file.locking' => array(
51
+ 'type' => 'boolean',
52
+ 'default' => false
53
+ ),
54
+ 'dbcache.lifetime' => array(
55
+ 'type' => 'integer',
56
+ 'default' => 180
57
+ ),
58
+ 'dbcache.memcached.persistant' => array(
59
+ 'type' => 'boolean',
60
+ 'default' => true
61
+ ),
62
+ 'dbcache.memcached.servers' => array(
63
+ 'type' => 'array',
64
+ 'default' => array(
65
+ '127.0.0.1:11211'
66
+ )
67
+ ),
68
+ 'dbcache.reject.cookie' => array(
69
+ 'type' => 'array',
70
+ 'default' => array()
71
+ ),
72
+ 'dbcache.reject.logged' => array(
73
+ 'type' => 'boolean',
74
+ 'default' => true
75
+ ),
76
+ 'dbcache.reject.sql' => array(
77
+ 'type' => 'array',
78
+ 'default' => array(
79
+ 'gdsr_',
80
+ 'wp_rg_'
81
+ )
82
+ ),
83
+ 'dbcache.reject.uri' => array(
84
+ 'type' => 'array',
85
+ 'default' => array()
86
+ ),
87
+ 'dbcache.reject.words' => array(
88
+ 'type' => 'array',
89
+ 'default' => array(
90
+ '^\s*insert\b',
91
+ '^\s*delete\b',
92
+ '^\s*update\b',
93
+ '^\s*replace\b',
94
+ '^\s*create\b',
95
+ '^\s*alter\b',
96
+ '^\s*show\b',
97
+ '^\s*set\b',
98
+ '\bautoload\s+=\s+\'yes\'',
99
+ '\bsql_calc_found_rows\b',
100
+ '\bfound_rows\(\)',
101
+ '\bw3tc_request_data\b'
102
+ )
103
+ ),
104
+
105
+ 'objectcache.enabled' => array(
106
+ 'type' => 'boolean',
107
+ 'default' => false
108
+ ),
109
+ 'objectcache.debug' => array(
110
+ 'type' => 'boolean',
111
+ 'default' => false
112
+ ),
113
+ 'objectcache.engine' => array(
114
+ 'type' => 'string',
115
+ 'default' => 'file'
116
+ ),
117
+ 'objectcache.file.gc' => array(
118
+ 'type' => 'integer',
119
+ 'default' => 3600
120
+ ),
121
+ 'objectcache.file.locking' => array(
122
+ 'type' => 'boolean',
123
+ 'default' => false
124
+ ),
125
+ 'objectcache.memcached.servers' => array(
126
+ 'type' => 'array',
127
+ 'default' => array(
128
+ '127.0.0.1:11211'
129
+ )
130
+ ),
131
+ 'objectcache.memcached.persistant' => array(
132
+ 'type' => 'boolean',
133
+ 'default' => true
134
+ ),
135
+ 'objectcache.groups.global' => array(
136
+ 'type' => 'array',
137
+ 'default' => array(
138
+ 'users',
139
+ 'userlogins',
140
+ 'usermeta',
141
+ 'user_meta',
142
+ 'site-transient',
143
+ 'site-options',
144
+ 'site-lookup',
145
+ 'blog-lookup',
146
+ 'blog-details',
147
+ 'rss',
148
+ 'global-posts'
149
+ )
150
+ ),
151
+ 'objectcache.groups.nonpersistent' => array(
152
+ 'type' => 'array',
153
+ 'default' => array(
154
+ 'comment',
155
+ 'counts',
156
+ 'plugins'
157
+ )
158
+ ),
159
+ 'objectcache.lifetime' => array(
160
+ 'type' => 'integer',
161
+ 'default' => 180
162
+ ),
163
+
164
+ 'fragmentcache.enabled' => array(
165
+ 'type' => 'boolean',
166
+ 'default' => false
167
+ ),
168
+ 'fragmentcache.debug' => array(
169
+ 'type' => 'boolean',
170
+ 'default' => false
171
+ ),
172
+ 'fragmentcache.engine' => array(
173
+ 'type' => 'string',
174
+ 'default' => 'file'
175
+ ),
176
+ 'fragmentcache.file.gc' => array(
177
+ 'type' => 'integer',
178
+ 'default' => 3600
179
+ ),
180
+ 'fragmentcache.file.locking' => array(
181
+ 'type' => 'boolean',
182
+ 'default' => false
183
+ ),
184
+ 'fragmentcache.memcached.servers' => array(
185
+ 'type' => 'array',
186
+ 'default' => array(
187
+ '127.0.0.1:11211'
188
+ )
189
+ ),
190
+ 'fragmentcache.memcached.persistant' => array(
191
+ 'type' => 'boolean',
192
+ 'default' => true
193
+ ),
194
+ 'fragmentcache.lifetime' => array(
195
+ 'type' => 'integer',
196
+ 'default' => 180
197
+ ),
198
+ 'fragmentcache.groups' => array(
199
+ 'type' => 'array',
200
+ 'default' => array()
201
+ ),
202
+
203
+ 'pgcache.enabled' => array(
204
+ 'type' => 'boolean',
205
+ 'default' => false
206
+ ),
207
+ 'pgcache.comment_cookie_ttl' => array(
208
+ 'type' => 'integer',
209
+ 'default' => 1800
210
+ ),
211
+ 'pgcache.debug' => array(
212
+ 'type' => 'boolean',
213
+ 'default' => false
214
+ ),
215
+ 'pgcache.engine' => array(
216
+ 'type' => 'string',
217
+ 'default' => 'file_generic'
218
+ ),
219
+ 'pgcache.file.gc' => array(
220
+ 'type' => 'integer',
221
+ 'default' => 3600
222
+ ),
223
+ 'pgcache.file.nfs' => array(
224
+ 'type' => 'boolean',
225
+ 'default' => false
226
+ ),
227
+ 'pgcache.file.locking' => array(
228
+ 'type' => 'boolean',
229
+ 'default' => false
230
+ ),
231
+ 'pgcache.lifetime' => array(
232
+ 'type' => 'integer',
233
+ 'default' => 3600
234
+ ),
235
+ 'pgcache.memcached.servers' => array(
236
+ 'type' => 'array',
237
+ 'default' => array(
238
+ '127.0.0.1:11211'
239
+ )
240
+ ),
241
+ 'pgcache.memcached.persistant' => array(
242
+ 'type' => 'boolean',
243
+ 'default' => true
244
+ ),
245
+ 'pgcache.check.domain' => array(
246
+ 'type' => 'boolean',
247
+ 'default' => false
248
+ ),
249
+ 'pgcache.cache.query' => array(
250
+ 'type' => 'boolean',
251
+ 'default' => true
252
+ ),
253
+ 'pgcache.cache.home' => array(
254
+ 'type' => 'boolean',
255
+ 'default' => true
256
+ ),
257
+ 'pgcache.cache.feed' => array(
258
+ 'type' => 'boolean',
259
+ 'default' => false
260
+ ),
261
+ 'pgcache.cache.nginx_handle_xml' => array(
262
+ 'type' => 'boolean',
263
+ 'default' => false
264
+ ),
265
+ 'pgcache.cache.ssl' => array(
266
+ 'type' => 'boolean',
267
+ 'default' => false
268
+ ),
269
+ 'pgcache.cache.404' => array(
270
+ 'type' => 'boolean',
271
+ 'default' => false
272
+ ),
273
+ 'pgcache.cache.flush' => array(
274
+ 'type' => 'boolean',
275
+ 'default' => false
276
+ ),
277
+ 'pgcache.cache.headers' => array(
278
+ 'type' => 'array',
279
+ 'default' => array(
280
+ 'Last-Modified',
281
+ 'Content-Type',
282
+ 'X-Pingback',
283
+ 'P3P'
284
+ )
285
+ ),
286
+ 'pgcache.compatibility' => array(
287
+ 'type' => 'boolean',
288
+ 'default' => false
289
+ ),
290
+ 'pgcache.accept.uri' => array(
291
+ 'type' => 'array',
292
+ 'default' => array(
293
+ 'sitemap(_index)?\.xml(\.gz)?',
294
+ '[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?'
295
+ )
296
+ ),
297
+ 'pgcache.accept.files' => array(
298
+ 'type' => 'array',
299
+ 'default' => array(
300
+ 'wp-comments-popup.php',
301
+ 'wp-links-opml.php',
302
+ 'wp-locations.php'
303
+ )
304
+ ),
305
+ 'pgcache.reject.front_page' => array(
306
+ 'type' => 'boolean',
307
+ 'default' => false
308
+ ),
309
+ 'pgcache.reject.logged' => array(
310
+ 'type' => 'boolean',
311
+ 'default' => true
312
+ ),
313
+ 'pgcache.reject.logged_roles' => array(
314
+ 'type' => 'boolean',
315
+ 'default' => false
316
+ ),
317
+ 'pgcache.reject.roles' => array(
318
+ 'type' => 'array',
319
+ 'default' => array()
320
+ ),
321
+ 'pgcache.reject.uri' => array(
322
+ 'type' => 'array',
323
+ 'default' => array(
324
+ 'wp-.*\.php',
325
+ 'index\.php'
326
+ )
327
+ ),
328
+ 'pgcache.reject.ua' => array(
329
+ 'type' => 'array',
330
+ 'default' => array()
331
+ ),
332
+ 'pgcache.reject.cookie' => array(
333
+ 'type' => 'array',
334
+ 'default' => array('wptouch_switch_toggle')
335
+ ),
336
+ 'pgcache.purge.front_page' => array(
337
+ 'type' => 'boolean',
338
+ 'default' => false
339
+ ),
340
+ 'pgcache.purge.home' => array(
341
+ 'type' => 'boolean',
342
+ 'default' => true
343
+ ),
344
+ 'pgcache.purge.post' => array(
345
+ 'type' => 'boolean',
346
+ 'default' => true
347
+ ),
348
+ 'pgcache.purge.comments' => array(
349
+ 'type' => 'boolean',
350
+ 'default' => false
351
+ ),
352
+ 'pgcache.purge.author' => array(
353
+ 'type' => 'boolean',
354
+ 'default' => false
355
+ ),
356
+ 'pgcache.purge.terms' => array(
357
+ 'type' => 'boolean',
358
+ 'default' => false
359
+ ),
360
+ 'pgcache.purge.archive.daily' => array(
361
+ 'type' => 'boolean',
362
+ 'default' => false
363
+ ),
364
+ 'pgcache.purge.archive.monthly' => array(
365
+ 'type' => 'boolean',
366
+ 'default' => false
367
+ ),
368
+ 'pgcache.purge.archive.yearly' => array(
369
+ 'type' => 'boolean',
370
+ 'default' => false
371
+ ),
372
+ 'pgcache.purge.feed.blog' => array(
373
+ 'type' => 'boolean',
374
+ 'default' => true
375
+ ),
376
+ 'pgcache.purge.feed.comments' => array(
377
+ 'type' => 'boolean',
378
+ 'default' => false
379
+ ),
380
+ 'pgcache.purge.feed.author' => array(
381
+ 'type' => 'boolean',
382
+ 'default' => false
383
+ ),
384
+ 'pgcache.purge.feed.terms' => array(
385
+ 'type' => 'boolean',
386
+ 'default' => false
387
+ ),
388
+ 'pgcache.purge.feed.types' => array(
389
+ 'type' => 'array',
390
+ 'default' => array(
391
+ 'rss2'
392
+ )
393
+ ),
394
+ 'pgcache.purge.postpages_limit' => array(
395
+ 'type' => 'integer',
396
+ 'default' => 10
397
+ ),
398
+ 'pgcache.purge.pages' => array(
399
+ 'type' => 'array',
400
+ 'default' => array()
401
+ ),
402
+ 'pgcache.purge.sitemap_regex' => array(
403
+ 'type' => 'string',
404
+ 'default' => '([a-z0-9_\-]*?)sitemap([a-z0-9_\-]*)?\.xml'
405
+ ),
406
+ 'pgcache.prime.enabled' => array(
407
+ 'type' => 'boolean',
408
+ 'default' => false
409
+ ),
410
+ 'pgcache.prime.interval' => array(
411
+ 'type' => 'integer',
412
+ 'default' => 900
413
+ ),
414
+ 'pgcache.prime.limit' => array(
415
+ 'type' => 'integer',
416
+ 'default' => 10
417
+ ),
418
+ 'pgcache.prime.sitemap' => array(
419
+ 'type' => 'string',
420
+ 'default' => ''
421
+ ),
422
+ 'pgcache.prime.post.enabled' => array(
423
+ 'type' => 'boolean',
424
+ 'default' => false
425
+ ),
426
+
427
+ 'minify.enabled' => array(
428
+ 'type' => 'boolean',
429
+ 'default' => false
430
+ ),
431
+ 'minify.auto' => array(
432
+ 'type' => 'boolean',
433
+ 'default' => true
434
+ ),
435
+ 'minify.debug' => array(
436
+ 'type' => 'boolean',
437
+ 'default' => false
438
+ ),
439
+ 'minify.engine' => array(
440
+ 'type' => 'string',
441
+ 'default' => 'file'
442
+ ),
443
+ 'minify.file.gc' => array(
444
+ 'type' => 'integer',
445
+ 'default' => 86400
446
+ ),
447
+ 'minify.file.nfs' => array(
448
+ 'type' => 'boolean',
449
+ 'default' => false
450
+ ),
451
+ 'minify.file.locking' => array(
452
+ 'type' => 'boolean',
453
+ 'default' => false
454
+ ),
455
+ 'minify.memcached.servers' => array(
456
+ 'type' => 'array',
457
+ 'default' => array(
458
+ '127.0.0.1:11211'
459
+ )
460
+ ),
461
+ 'minify.memcached.persistant' => array(
462
+ 'type' => 'boolean',
463
+ 'default' => true
464
+ ),
465
+ 'minify.rewrite' => array(
466
+ 'type' => 'boolean',
467
+ 'default' => true
468
+ ),
469
+ 'minify.options' => array(
470
+ 'type' => 'array',
471
+ 'default' => array()
472
+ ),
473
+ 'minify.symlinks' => array(
474
+ 'type' => 'array',
475
+ 'default' => array()
476
+ ),
477
+ 'minify.lifetime' => array(
478
+ 'type' => 'integer',
479
+ 'default' => 86400
480
+ ),
481
+ 'minify.upload' => array(
482
+ 'type' => 'boolean',
483
+ 'default' => true
484
+ ),
485
+ 'minify.html.enable' => array(
486
+ 'type' => 'boolean',
487
+ 'default' => false
488
+ ),
489
+ 'minify.html.engine' => array(
490
+ 'type' => 'string',
491
+ 'default' => 'html'
492
+ ),
493
+ 'minify.html.reject.feed' => array(
494
+ 'type' => 'boolean',
495
+ 'default' => false
496
+ ),
497
+ 'minify.html.inline.css' => array(
498
+ 'type' => 'boolean',
499
+ 'default' => false
500
+ ),
501
+ 'minify.html.inline.js' => array(
502
+ 'type' => 'boolean',
503
+ 'default' => false
504
+ ),
505
+ 'minify.html.strip.crlf' => array(
506
+ 'type' => 'boolean',
507
+ 'default' => false
508
+ ),
509
+ 'minify.html.comments.ignore' => array(
510
+ 'type' => 'array',
511
+ 'default' => array(
512
+ 'google_ad_',
513
+ 'RSPEAK_'
514
+ )
515
+ ),
516
+ 'minify.css.enable' => array(
517
+ 'type' => 'boolean',
518
+ 'default' => true
519
+ ),
520
+ 'minify.css.engine' => array(
521
+ 'type' => 'string',
522
+ 'default' => 'css'
523
+ ),
524
+ 'minify.css.combine' => array(
525
+ 'type' => 'boolean',
526
+ 'default' => false
527
+ ),
528
+ 'minify.css.strip.comments' => array(
529
+ 'type' => 'boolean',
530
+ 'default' => false
531
+ ),
532
+ 'minify.css.strip.crlf' => array(
533
+ 'type' => 'boolean',
534
+ 'default' => false
535
+ ),
536
+ 'minify.css.imports' => array(
537
+ 'type' => 'string',
538
+ 'default' => ''
539
+ ),
540
+ 'minify.css.groups' => array(
541
+ 'type' => 'array',
542
+ 'default' => array()
543
+ ),
544
+ 'minify.js.enable' => array(
545
+ 'type' => 'boolean',
546
+ 'default' => true
547
+ ),
548
+ 'minify.js.engine' => array(
549
+ 'type' => 'string',
550
+ 'default' => 'js'
551
+ ),
552
+ 'minify.js.combine.header' => array(
553
+ 'type' => 'boolean',
554
+ 'default' => false
555
+ ),
556
+ 'minify.js.header.embed_type' => array(
557
+ 'type' => 'string',
558
+ 'default' => 'blocking'
559
+ ),
560
+ 'minify.js.combine.body' => array(
561
+ 'type' => 'boolean',
562
+ 'default' => false
563
+ ),
564
+ 'minify.js.body.embed_type' => array(
565
+ 'type' => 'string',
566
+ 'default' => 'blocking'
567
+ ),
568
+ 'minify.js.combine.footer' => array(
569
+ 'type' => 'boolean',
570
+ 'default' => false
571
+ ),
572
+ 'minify.js.footer.embed_type' => array(
573
+ 'type' => 'string',
574
+ 'default' => 'blocking'
575
+ ),
576
+ 'minify.js.strip.comments' => array(
577
+ 'type' => 'boolean',
578
+ 'default' => false
579
+ ),
580
+ 'minify.js.strip.crlf' => array(
581
+ 'type' => 'boolean',
582
+ 'default' => false
583
+ ),
584
+ 'minify.js.groups' => array(
585
+ 'type' => 'array',
586
+ 'default' => array()
587
+ ),
588
+ 'minify.yuijs.path.java' => array(
589
+ 'type' => 'string',
590
+ 'default' => 'java'
591
+ ),
592
+ 'minify.yuijs.path.jar' => array(
593
+ 'type' => 'string',
594
+ 'default' => 'yuicompressor.jar'
595
+ ),
596
+ 'minify.yuijs.options.line-break' => array(
597
+ 'type' => 'integer',
598
+ 'default' => 5000
599
+ ),
600
+ 'minify.yuijs.options.nomunge' => array(
601
+ 'type' => 'boolean',
602
+ 'default' => false
603
+ ),
604
+ 'minify.yuijs.options.preserve-semi' => array(
605
+ 'type' => 'boolean',
606
+ 'default' => false
607
+ ),
608
+ 'minify.yuijs.options.disable-optimizations' => array(
609
+ 'type' => 'boolean',
610
+ 'default' => false
611
+ ),
612
+ 'minify.yuicss.path.java' => array(
613
+ 'type' => 'string',
614
+ 'default' => 'java'
615
+ ),
616
+ 'minify.yuicss.path.jar' => array(
617
+ 'type' => 'string',
618
+ 'default' => 'yuicompressor.jar'
619
+ ),
620
+ 'minify.yuicss.options.line-break' => array(
621
+ 'type' => 'integer',
622
+ 'default' => 5000
623
+ ),
624
+ 'minify.ccjs.path.java' => array(
625
+ 'type' => 'string',
626
+ 'default' => 'java'
627
+ ),
628
+ 'minify.ccjs.path.jar' => array(
629
+ 'type' => 'string',
630
+ 'default' => 'compiler.jar'
631
+ ),
632
+ 'minify.ccjs.options.compilation_level' => array(
633
+ 'type' => 'string',
634
+ 'default' => 'SIMPLE_OPTIMIZATIONS'
635
+ ),
636
+ 'minify.ccjs.options.formatting' => array(
637
+ 'type' => 'string',
638
+ 'default' => ''
639
+ ),
640
+ 'minify.csstidy.options.remove_bslash' => array(
641
+ 'type' => 'boolean',
642
+ 'default' => true
643
+ ),
644
+ 'minify.csstidy.options.compress_colors' => array(
645
+ 'type' => 'boolean',
646
+ 'default' => true
647
+ ),
648
+ 'minify.csstidy.options.compress_font-weight' => array(
649
+ 'type' => 'boolean',
650
+ 'default' => true
651
+ ),
652
+ 'minify.csstidy.options.lowercase_s' => array(
653
+ 'type' => 'boolean',
654
+ 'default' => false
655
+ ),
656
+ 'minify.csstidy.options.optimise_shorthands' => array(
657
+ 'type' => 'integer',
658
+ 'default' => 1
659
+ ),
660
+ 'minify.csstidy.options.remove_last_;' => array(
661
+ 'type' => 'boolean',
662
+ 'default' => false
663
+ ),
664
+ 'minify.csstidy.options.case_properties' => array(
665
+ 'type' => 'integer',
666
+ 'default' => 1
667
+ ),
668
+ 'minify.csstidy.options.sort_properties' => array(
669
+ 'type' => 'boolean',
670
+ 'default' => false
671
+ ),
672
+ 'minify.csstidy.options.sort_selectors' => array(
673
+ 'type' => 'boolean',
674
+ 'default' => false
675
+ ),
676
+ 'minify.csstidy.options.merge_selectors' => array(
677
+ 'type' => 'integer',
678
+ 'default' => 2
679
+ ),
680
+ 'minify.csstidy.options.discard_invalid_properties' => array(
681
+ 'type' => 'boolean',
682
+ 'default' => false
683
+ ),
684
+ 'minify.csstidy.options.css_level' => array(
685
+ 'type' => 'string',
686
+ 'default' => 'CSS2.1'
687
+ ),
688
+ 'minify.csstidy.options.preserve_css' => array(
689
+ 'type' => 'boolean',
690
+ 'default' => false
691
+ ),
692
+ 'minify.csstidy.options.timestamp' => array(
693
+ 'type' => 'boolean',
694
+ 'default' => false
695
+ ),
696
+ 'minify.csstidy.options.template' => array(
697
+ 'type' => 'string',
698
+ 'default' => 'default'
699
+ ),
700
+ 'minify.htmltidy.options.clean' => array(
701
+ 'type' => 'boolean',
702
+ 'default' => false
703
+ ),
704
+ 'minify.htmltidy.options.hide-comments' => array(
705
+ 'type' => 'boolean',
706
+ 'default' => true
707
+ ),
708
+ 'minify.htmltidy.options.wrap' => array(
709
+ 'type' => 'integer',
710
+ 'default' => 0
711
+ ),
712
+ 'minify.reject.logged' => array(
713
+ 'type' => 'boolean',
714
+ 'default' => false
715
+ ),
716
+ 'minify.reject.ua' => array(
717
+ 'type' => 'array',
718
+ 'default' => array()
719
+ ),
720
+ 'minify.reject.uri' => array(
721
+ 'type' => 'array',
722
+ 'default' => array()
723
+ ),
724
+ 'minify.reject.files.js' => array(
725
+ 'type' => 'array',
726
+ 'default' => array()
727
+ ),
728
+ 'minify.reject.files.css' => array(
729
+ 'type' => 'array',
730
+ 'default' => array()
731
+ ),
732
+ 'minify.cache.files' => array(
733
+ 'type' => 'array',
734
+ 'default' => array('https://ajax.googleapis.com')
735
+ ),
736
+
737
+ 'cdn.enabled' => array(
738
+ 'type' => 'boolean',
739
+ 'default' => false
740
+ ),
741
+ 'cdn.debug' => array(
742
+ 'type' => 'boolean',
743
+ 'default' => false
744
+ ),
745
+ 'cdn.engine' => array(
746
+ 'type' => 'string',
747
+ 'default' => 'ftp'
748
+ ),
749
+ 'cdn.uploads.enable' => array(
750
+ 'type' => 'boolean',
751
+ 'default' => true
752
+ ),
753
+ 'cdn.includes.enable' => array(
754
+ 'type' => 'boolean',
755
+ 'default' => true
756
+ ),
757
+ 'cdn.includes.files' => array(
758
+ 'type' => 'string',
759
+ 'default' => '*.css;*.js;*.gif;*.png;*.jpg;*.xml'
760
+ ),
761
+ 'cdn.theme.enable' => array(
762
+ 'type' => 'boolean',
763
+ 'default' => true
764
+ ),
765
+ 'cdn.theme.files' => array(
766
+ 'type' => 'string',
767
+ 'default' => '*.css;*.js;*.gif;*.png;*.jpg;*.ico;*.ttf;*.otf,*.woff'
768
+ ),
769
+ 'cdn.minify.enable' => array(
770
+ 'type' => 'boolean',
771
+ 'default' => true
772
+ ),
773
+ 'cdn.custom.enable' => array(
774
+ 'type' => 'boolean',
775
+ 'default' => true
776
+ ),
777
+ 'cdn.custom.files' => array(
778
+ 'type' => 'array',
779
+ 'default' => array(
780
+ 'favicon.ico',
781
+ 'wp-content/gallery/*',
782
+ 'wp-content/uploads/avatars/*',
783
+ 'wp-content/plugins/wordpress-seo/css/xml-sitemap.xsl',
784
+ 'wp-content/plugins/wp-minify/min*',
785
+ 'wp-content/plugins/*.js',
786
+ 'wp-content/plugins/*.css',
787
+ 'wp-content/plugins/*.gif',
788
+ 'wp-content/plugins/*.jpg',
789
+ 'wp-content/plugins/*.png',
790
+ )
791
+ ),
792
+ 'cdn.import.external' => array(
793
+ 'type' => 'boolean',
794
+ 'default' => false
795
+ ),
796
+ 'cdn.import.files' => array(
797
+ 'type' => 'string',
798
+ 'default' => false
799
+ ),
800
+ 'cdn.queue.interval' => array(
801
+ 'type' => 'integer',
802
+ 'default' => 900
803
+ ),
804
+ 'cdn.queue.limit' => array(
805
+ 'type' => 'integer',
806
+ 'default' => 25
807
+ ),
808
+ 'cdn.force.rewrite' => array(
809
+ 'type' => 'boolean',
810
+ 'default' => false
811
+ ),
812
+ 'cdn.autoupload.enabled' => array(
813
+ 'type' => 'boolean',
814
+ 'default' => false
815
+ ),
816
+ 'cdn.autoupload.interval' => array(
817
+ 'type' => 'integer',
818
+ 'default' => 3600
819
+ ),
820
+ 'cdn.canonical_header' => array(
821
+ 'type' => 'boolean',
822
+ 'default' => false
823
+ ),
824
+ 'cdn.ftp.host' => array(
825
+ 'type' => 'string',
826
+ 'default' => ''
827
+ ),
828
+ 'cdn.ftp.user' => array(
829
+ 'type' => 'string',
830
+ 'default' => ''
831
+ ),
832
+ 'cdn.ftp.pass' => array(
833
+ 'type' => 'string',
834
+ 'default' => ''
835
+ ),
836
+ 'cdn.ftp.path' => array(
837
+ 'type' => 'string',
838
+ 'default' => ''
839
+ ),
840
+ 'cdn.ftp.pasv' => array(
841
+ 'type' => 'boolean',
842
+ 'default' => false
843
+ ),
844
+ 'cdn.ftp.domain' => array(
845
+ 'type' => 'array',
846
+ 'default' => array()
847
+ ),
848
+ 'cdn.ftp.ssl' => array(
849
+ 'type' => 'string',
850
+ 'default' => 'auto'
851
+ ),
852
+ 'cdn.s3.key' => array(
853
+ 'type' => 'string',
854
+ 'default' => ''
855
+ ),
856
+ 'cdn.s3.secret' => array(
857
+ 'type' => 'string',
858
+ 'default' => ''
859
+ ),
860
+ 'cdn.s3.bucket' => array(
861
+ 'type' => 'string',
862
+ 'default' => ''
863
+ ),
864
+ 'cdn.s3.cname' => array(
865
+ 'type' => 'array',
866
+ 'default' => array()
867
+ ),
868
+ 'cdn.s3.ssl' => array(
869
+ 'type' => 'string',
870
+ 'default' => 'auto'
871
+ ),
872
+ 'cdn.cf.key' => array(
873
+ 'type' => 'string',
874
+ 'default' => ''
875
+ ),
876
+ 'cdn.cf.secret' => array(
877
+ 'type' => 'string',
878
+ 'default' => ''
879
+ ),
880
+ 'cdn.cf.bucket' => array(
881
+ 'type' => 'string',
882
+ 'default' => ''
883
+ ),
884
+ 'cdn.cf.id' => array(
885
+ 'type' => 'string',
886
+ 'default' => ''
887
+ ),
888
+ 'cdn.cf.cname' => array(
889
+ 'type' => 'array',
890
+ 'default' => array()
891
+ ),
892
+ 'cdn.cf.ssl' => array(
893
+ 'type' => 'string',
894
+ 'default' => 'auto'
895
+ ),
896
+ 'cdn.cf2.key' => array(
897
+ 'type' => 'string',
898
+ 'default' => ''
899
+ ),
900
+ 'cdn.cf2.secret' => array(
901
+ 'type' => 'string',
902
+ 'default' => ''
903
+ ),
904
+ 'cdn.cf2.id' => array(
905
+ 'type' => 'string',
906
+ 'default' => ''
907
+ ),
908
+ 'cdn.cf2.cname' => array(
909
+ 'type' => 'array',
910
+ 'default' => array()
911
+ ),
912
+ 'cdn.cf2.ssl' => array(
913
+ 'type' => 'string',
914
+ 'default' => ''
915
+ ),
916
+ 'cdn.rscf.user' => array(
917
+ 'type' => 'string',
918
+ 'default' => ''
919
+ ),
920
+ 'cdn.rscf.key' => array(
921
+ 'type' => 'string',
922
+ 'default' => ''
923
+ ),
924
+ 'cdn.rscf.location' => array(
925
+ 'type' => 'string',
926
+ 'default' => 'us'
927
+ ),
928
+ 'cdn.rscf.container' => array(
929
+ 'type' => 'string',
930
+ 'default' => ''
931
+ ),
932
+ 'cdn.rscf.cname' => array(
933
+ 'type' => 'array',
934
+ 'default' => array()
935
+ ),
936
+ 'cdn.rscf.ssl' => array(
937
+ 'type' => 'string',
938
+ 'default' => 'auto'
939
+ ),
940
+ 'cdn.azure.user' => array(
941
+ 'type' => 'string',
942
+ 'default' => ''
943
+ ),
944
+ 'cdn.azure.key' => array(
945
+ 'type' => 'string',
946
+ 'default' => ''
947
+ ),
948
+ 'cdn.azure.container' => array(
949
+ 'type' => 'string',
950
+ 'default' => ''
951
+ ),
952
+ 'cdn.azure.cname' => array(
953
+ 'type' => 'array',
954
+ 'default' => array()
955
+ ),
956
+ 'cdn.azure.ssl' => array(
957
+ 'type' => 'string',
958
+ 'default' => 'auto'
959
+ ),
960
+ 'cdn.mirror.domain' => array(
961
+ 'type' => 'array',
962
+ 'default' => array()
963
+ ),
964
+ 'cdn.mirror.ssl' => array(
965
+ 'type' => 'string',
966
+ 'default' => 'auto'
967
+ ),
968
+ 'cdn.netdna.alias' => array(
969
+ 'type' => 'string',
970
+ 'default' => ''
971
+ ),
972
+ 'cdn.netdna.consumerkey' => array(
973
+ 'type' => 'string',
974
+ 'default' => ''
975
+ ),
976
+ 'cdn.netdna.consumersecret' => array(
977
+ 'type' => 'string',
978
+ 'default' => ''
979
+ ),
980
+ 'cdn.netdna.domain' => array(
981
+ 'type' => 'array',
982
+ 'default' => array()
983
+ ),
984
+ 'cdn.netdna.ssl' => array(
985
+ 'type' => 'string',
986
+ 'default' => 'auto'
987
+ ),
988
+ 'cdn.cotendo.username' => array(
989
+ 'type' => 'string',
990
+ 'default' => ''
991
+ ),
992
+ 'cdn.cotendo.password' => array(
993
+ 'type' => 'string',
994
+ 'default' => ''
995
+ ),
996
+ 'cdn.cotendo.zones' => array(
997
+ 'type' => 'array',
998
+ 'default' => array()
999
+ ),
1000
+ 'cdn.cotendo.domain' => array(
1001
+ 'type' => 'array',
1002
+ 'default' => array()
1003
+ ),
1004
+ 'cdn.cotendo.ssl' => array(
1005
+ 'type' => 'string',
1006
+ 'default' => 'auto'
1007
+ ),
1008
+ 'cdn.akamai.username' => array(
1009
+ 'type' => 'string',
1010
+ 'default' => ''
1011
+ ),
1012
+ 'cdn.akamai.password' => array(
1013
+ 'type' => 'string',
1014
+ 'default' => ''
1015
+ ),
1016
+ 'cdn.akamai.email_notification' => array(
1017
+ 'type' => 'array',
1018
+ 'default' => array()
1019
+ ),
1020
+ 'cdn.akamai.action' => array(
1021
+ 'type' => 'string',
1022
+ 'default' => 'invalidate'
1023
+ ),
1024
+ 'cdn.akamai.zone' => array(
1025
+ 'type' => 'string',
1026
+ 'default' => 'production'
1027
+ ),
1028
+ 'cdn.akamai.domain' => array(
1029
+ 'type' => 'array',
1030
+ 'default' => array()
1031
+ ),
1032
+ 'cdn.akamai.ssl' => array(
1033
+ 'type' => 'string',
1034
+ 'default' => 'auto'
1035
+ ),
1036
+ 'cdn.edgecast.account' => array(
1037
+ 'type' => 'string',
1038
+ 'default' => ''
1039
+ ),
1040
+ 'cdn.edgecast.token' => array(
1041
+ 'type' => 'string',
1042
+ 'default' => ''
1043
+ ),
1044
+ 'cdn.edgecast.domain' => array(
1045
+ 'type' => 'array',
1046
+ 'default' => array()
1047
+ ),
1048
+ 'cdn.edgecast.ssl' => array(
1049
+ 'type' => 'string',
1050
+ 'default' => 'auto'
1051
+ ),
1052
+ 'cdn.att.account' => array(
1053
+ 'type' => 'string',
1054
+ 'default' => ''
1055
+ ),
1056
+ 'cdn.att.token' => array(
1057
+ 'type' => 'string',
1058
+ 'default' => ''
1059
+ ),
1060
+ 'cdn.att.domain' => array(
1061
+ 'type' => 'array',
1062
+ 'default' => array()
1063
+ ),
1064
+ 'cdn.att.ssl' => array(
1065
+ 'type' => 'string',
1066
+ 'default' => 'auto'
1067
+ ),
1068
+ 'cdn.reject.admins' => array(
1069
+ 'type' => 'boolean',
1070
+ 'default' => false
1071
+ ),
1072
+ 'cdn.reject.logged_roles' => array(
1073
+ 'type' => 'boolean',
1074
+ 'default' => false
1075
+ ),
1076
+ 'cdn.reject.roles' => array(
1077
+ 'type' => 'array',
1078
+ 'default' => array()
1079
+ ),
1080
+ 'cdn.reject.ua' => array(
1081
+ 'type' => 'array',
1082
+ 'default' => array()
1083
+ ),
1084
+ 'cdn.reject.uri' => array(
1085
+ 'type' => 'array',
1086
+ 'default' => array()
1087
+ ),
1088
+ 'cdn.reject.files' => array(
1089
+ 'type' => 'array',
1090
+ 'default' => array(
1091
+ 'wp-content/uploads/wpcf7_captcha/*',
1092
+ 'wp-content/uploads/imagerotator.swf',
1093
+ 'wp-content/plugins/wp-fb-autoconnect/facebook-platform/channel.html'
1094
+ )
1095
+ ),
1096
+ 'cdn.reject.ssl' => array(
1097
+ 'type' => 'boolean',
1098
+ 'default' => false
1099
+ ),
1100
+ 'cdncache.enabled' => array(
1101
+ 'type' => 'boolean',
1102
+ 'default' => false
1103
+ ),
1104
+
1105
+
1106
+ 'cloudflare.enabled' => array(
1107
+ 'type' => 'boolean',
1108
+ 'default' => false
1109
+ ),
1110
+ 'cloudflare.email' => array(
1111
+ 'type' => 'string',
1112
+ 'default' => ''
1113
+ ),
1114
+ 'cloudflare.key' => array(
1115
+ 'type' => 'string',
1116
+ 'default' => ''
1117
+ ),
1118
+ 'cloudflare.zone' => array(
1119
+ 'type' => 'string',
1120
+ 'default' => ''
1121
+ ),
1122
+ 'cloudflare.ips.ip4' => array(
1123
+ 'type' => 'array',
1124
+ 'default' => array("204.93.240.0/24", "204.93.177.0/24", "199.27.128.0/21", "173.245.48.0/20", "103.22.200.0/22", "141.101.64.0/18", "108.162.192.0/18","190.93.240.1/20","188.114.96.0/20", "198.41.128.0/17")
1125
+ ),
1126
+ 'cloudflare.ips.ip6' => array(
1127
+ 'type' => 'array',
1128
+ 'default' => array("2400:cb00::/32", "2606:4700::/32", "2803:f800::/32")
1129
+ ),
1130
+
1131
+ 'varnish.enabled' => array(
1132
+ 'type' => 'boolean',
1133
+ 'default' => false
1134
+ ),
1135
+ 'varnish.debug' => array(
1136
+ 'type' => 'boolean',
1137
+ 'default' => false
1138
+ ),
1139
+ 'varnish.servers' => array(
1140
+ 'type' => 'array',
1141
+ 'default' => array()
1142
+ ),
1143
+
1144
+ 'browsercache.enabled' => array(
1145
+ 'type' => 'boolean',
1146
+ 'default' => true
1147
+ ),
1148
+ 'browsercache.no404wp' => array(
1149
+ 'type' => 'boolean',
1150
+ 'default' => false
1151
+ ),
1152
+ 'browsercache.no404wp.exceptions' => array(
1153
+ 'type' => 'array',
1154
+ 'default' => array(
1155
+ 'robots\.txt',
1156
+ 'sitemap(_index)?\.xml(\.gz)?',
1157
+ '[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?'
1158
+ )
1159
+ ),
1160
+ 'browsercache.cssjs.last_modified' => array(
1161
+ 'type' => 'boolean',
1162
+ 'default' => true
1163
+ ),
1164
+ 'browsercache.cssjs.compression' => array(
1165
+ 'type' => 'boolean',
1166
+ 'default' => true
1167
+ ),
1168
+ 'browsercache.cssjs.expires' => array(
1169
+ 'type' => 'boolean',
1170
+ 'default' => false
1171
+ ),
1172
+ 'browsercache.cssjs.lifetime' => array(
1173
+ 'type' => 'integer',
1174
+ 'default' => 31536000
1175
+ ),
1176
+ 'browsercache.cssjs.nocookies' => array(
1177
+ 'type' => 'boolean',
1178
+ 'default' => false
1179
+ ),
1180
+ 'browsercache.cssjs.cache.control' => array(
1181
+ 'type' => 'boolean',
1182
+ 'default' => false
1183
+ ),
1184
+ 'browsercache.cssjs.cache.policy' => array(
1185
+ 'type' => 'string',
1186
+ 'default' => 'cache_public_maxage'
1187
+ ),
1188
+ 'browsercache.cssjs.etag' => array(
1189
+ 'type' => 'boolean',
1190
+ 'default' => false
1191
+ ),
1192
+ 'browsercache.cssjs.w3tc' => array(
1193
+ 'type' => 'boolean',
1194
+ 'default' => false
1195
+ ),
1196
+ 'browsercache.cssjs.replace' => array(
1197
+ 'type' => 'boolean',
1198
+ 'default' => false
1199
+ ),
1200
+ 'browsercache.html.compression' => array(
1201
+ 'type' => 'boolean',
1202
+ 'default' => true
1203
+ ),
1204
+ 'browsercache.html.last_modified' => array(
1205
+ 'type' => 'boolean',
1206
+ 'default' => true
1207
+ ),
1208
+ 'browsercache.html.expires' => array(
1209
+ 'type' => 'boolean',
1210
+ 'default' => false
1211
+ ),
1212
+ 'browsercache.html.lifetime' => array(
1213
+ 'type' => 'integer',
1214
+ 'default' => 3600
1215
+ ),
1216
+ 'browsercache.html.cache.control' => array(
1217
+ 'type' => 'boolean',
1218
+ 'default' => false
1219
+ ),
1220
+ 'browsercache.html.cache.policy' => array(
1221
+ 'type' => 'string',
1222
+ 'default' => 'cache_public_maxage'
1223
+ ),
1224
+ 'browsercache.html.etag' => array(
1225
+ 'type' => 'boolean',
1226
+ 'default' => false
1227
+ ),
1228
+ 'browsercache.html.w3tc' => array(
1229
+ 'type' => 'boolean',
1230
+ 'default' => false
1231
+ ),
1232
+ 'browsercache.html.replace' => array(
1233
+ 'type' => 'boolean',
1234
+ 'default' => false
1235
+ ),
1236
+ 'browsercache.other.last_modified' => array(
1237
+ 'type' => 'boolean',
1238
+ 'default' => true
1239
+ ),
1240
+ 'browsercache.other.compression' => array(
1241
+ 'type' => 'boolean',
1242
+ 'default' => true
1243
+ ),
1244
+ 'browsercache.other.expires' => array(
1245
+ 'type' => 'boolean',
1246
+ 'default' => false
1247
+ ),
1248
+ 'browsercache.other.lifetime' => array(
1249
+ 'type' => 'integer',
1250
+ 'default' => 31536000
1251
+ ),
1252
+ 'browsercache.other.nocookies' => array(
1253
+ 'type' => 'boolean',
1254
+ 'default' => false
1255
+ ),
1256
+ 'browsercache.other.cache.control' => array(
1257
+ 'type' => 'boolean',
1258
+ 'default' => false
1259
+ ),
1260
+ 'browsercache.other.cache.policy' => array(
1261
+ 'type' => 'string',
1262
+ 'default' => 'cache_public_maxage'
1263
+ ),
1264
+ 'browsercache.other.etag' => array(
1265
+ 'type' => 'boolean',
1266
+ 'default' => false
1267
+ ),
1268
+ 'browsercache.other.w3tc' => array(
1269
+ 'type' => 'boolean',
1270
+ 'default' => false
1271
+ ),
1272
+ 'browsercache.other.replace' => array(
1273
+ 'type' => 'boolean',
1274
+ 'default' => false
1275
+ ),
1276
+ 'browsercache.timestamp' => array(
1277
+ 'type' => 'string',
1278
+ 'default' => ''
1279
+ ),
1280
+
1281
+ 'mobile.enabled' => array(
1282
+ 'type' => 'boolean',
1283
+ 'default' => false
1284
+ ),
1285
+ 'mobile.rgroups' => array(
1286
+ 'type' => 'array',
1287
+ 'default' => array(
1288
+ 'high' => array(
1289
+ 'theme' => '',
1290
+ 'enabled' => false,
1291
+ 'redirect' => '',
1292
+ 'agents' => array(
1293
+ 'acer\ s100',
1294
+ 'android',
1295
+ 'archos5',
1296
+ 'bada',
1297
+ 'blackberry9500',
1298
+ 'blackberry9530',
1299
+ 'blackberry9550',
1300
+ 'blackberry\ 9800',
1301
+ 'cupcake',
1302
+ 'docomo\ ht\-03a',
1303
+ 'dream',
1304
+ 'froyo',
1305
+ 'googlebot-mobile',
1306
+ 'htc\ hero',
1307
+ 'htc\ magic',
1308
+ 'htc_dream',
1309
+ 'htc_magic',
1310
+ 'iemobile/7.0',
1311
+ 'incognito',
1312
+ 'ipad',
1313
+ 'iphone',
1314
+ 'ipod',
1315
+ 'kindle',
1316
+ 'lg\-gw620',
1317
+ 'liquid\ build',
1318
+ 'maemo',
1319
+ 'mot\-mb200',
1320
+ 'mot\-mb300',
1321
+ 'nexus\ one',
1322
+ 'opera\ mini',
1323
+ 's8000',
1324
+ 'samsung\-s8000',
1325
+ 'series60.*webkit',
1326
+ 'series60/5\.0',
1327
+ 'sonyericssone10',
1328
+ 'sonyericssonu20',
1329
+ 'sonyericssonx10',
1330
+ 't\-mobile\ mytouch\ 3g',
1331
+ 't\-mobile\ opal',
1332
+ 'tattoo',
1333
+ 'webmate',
1334
+ 'webos'
1335
+ )
1336
+ ),
1337
+ 'low' => array(
1338
+ 'theme' => '',
1339
+ 'enabled' => false,
1340
+ 'redirect' => '',
1341
+ 'agents' => array(
1342
+ '2\.0\ mmp',
1343
+ '240x320',
1344
+ 'alcatel',
1345
+ 'amoi',
1346
+ 'asus',
1347
+ 'au\-mic',
1348
+ 'audiovox',
1349
+ 'avantgo',
1350
+ 'benq',
1351
+ 'bird',
1352
+ 'blackberry',
1353
+ 'blazer',
1354
+ 'cdm',
1355
+ 'cellphone',
1356
+ 'danger',
1357
+ 'ddipocket',
1358
+ 'docomo',
1359
+ 'dopod',
1360
+ 'elaine/3\.0',
1361
+ 'ericsson',
1362
+ 'eudoraweb',
1363
+ 'fly',
1364
+ 'haier',
1365
+ 'hiptop',
1366
+ 'hp\.ipaq',
1367
+ 'htc',
1368
+ 'huawei',
1369
+ 'i\-mobile',
1370
+ 'iemobile',
1371
+ 'j\-phone',
1372
+ 'kddi',
1373
+ 'konka',
1374
+ 'kwc',
1375
+ 'kyocera/wx310k',
1376
+ 'lenovo',
1377
+ 'lg',
1378
+ 'lg/u990',
1379
+ 'lge\ vx',
1380
+ 'midp',
1381
+ 'midp\-2\.0',
1382
+ 'mmef20',
1383
+ 'mmp',
1384
+ 'mobilephone',
1385
+ 'mot\-v',
1386
+ 'motorola',
1387
+ 'netfront',
1388
+ 'newgen',
1389
+ 'newt',
1390
+ 'nintendo\ ds',
1391
+ 'nintendo\ wii',
1392
+ 'nitro',
1393
+ 'nokia',
1394
+ 'novarra',
1395
+ 'o2',
1396
+ 'openweb',
1397
+ 'opera\ mobi',
1398
+ 'opera\.mobi',
1399
+ 'palm',
1400
+ 'panasonic',
1401
+ 'pantech',
1402
+ 'pdxgw',
1403
+ 'pg',
1404
+ 'philips',
1405
+ 'phone',
1406
+ 'playstation\ portable',
1407
+ 'portalmmm',
1408
+ '\bppc\b',
1409
+ 'proxinet',
1410
+ 'psp',
1411
+ 'qtek',
1412
+ 'sagem',
1413
+ 'samsung',
1414
+ 'sanyo',
1415
+ 'sch',
1416
+ 'sec',
1417
+ 'sendo',
1418
+ 'sgh',
1419
+ 'sharp',
1420
+ 'sharp\-tq\-gx10',
1421
+ 'small',
1422
+ 'smartphone',
1423
+ 'softbank',
1424
+ 'sonyericsson',
1425
+ 'sph',
1426
+ 'symbian',
1427
+ 'symbian\ os',
1428
+ 'symbianos',
1429
+ 'toshiba',
1430
+ 'treo',
1431
+ 'ts21i\-10',
1432
+ 'up\.browser',
1433
+ 'up\.link',
1434
+ 'uts',
1435
+ 'vertu',
1436
+ 'vodafone',
1437
+ 'wap',
1438
+ 'willcome',
1439
+ 'windows\ ce',
1440
+ 'windows\.ce',
1441
+ 'winwap',
1442
+ 'xda',
1443
+ 'zte'
1444
+ )
1445
+ )
1446
+ )
1447
+ ),
1448
+
1449
+
1450
+ 'referrer.enabled' => array(
1451
+ 'type' => 'boolean',
1452
+ 'default' => false
1453
+ ),
1454
+ 'referrer.rgroups' => array(
1455
+ 'type' => 'array',
1456
+ 'default' => array(
1457
+ 'search_engines' => array(
1458
+ 'theme' => '',
1459
+ 'enabled' => false,
1460
+ 'redirect' => '',
1461
+ 'referrers' => array(
1462
+ 'google\.com',
1463
+ 'yahoo\.com',
1464
+ 'bing\.com',
1465
+ 'ask\.com',
1466
+ 'msn\.com'
1467
+ )
1468
+ )
1469
+ )
1470
+ ),
1471
+
1472
+
1473
+ 'common.support' => array(
1474
+ 'type' => 'string',
1475
+ 'default' => ''
1476
+ ),
1477
+ 'common.install' => array(
1478
+ 'type' => 'integer',
1479
+ 'default' => 0
1480
+ ),
1481
+ 'common.tweeted' => array(
1482
+ 'type' => 'boolean',
1483
+ 'default' => false
1484
+ ),
1485
+ 'config.check' => array(
1486
+ 'type' => 'boolean',
1487
+ 'default' => true
1488
+ ),
1489
+ 'config.path' => array(
1490
+ 'type' => 'string',
1491
+ 'default' => ''
1492
+ ),
1493
+ 'widget.latest.items' => array(
1494
+ 'type' => 'integer',
1495
+ 'default' => 3
1496
+ ),
1497
+ 'widget.latest_news.items' => array(
1498
+ 'type' => 'integer',
1499
+ 'default' => 5
1500
+ ),
1501
+ 'widget.pagespeed.enabled' => array(
1502
+ 'type' => 'boolean',
1503
+ 'default' => true
1504
+ ),
1505
+ 'widget.pagespeed.key' => array(
1506
+ 'type' => 'string',
1507
+ 'default' => ''
1508
+ ),
1509
+
1510
+ 'notes.wp_content_changed_perms' => array(
1511
+ 'type' => 'boolean',
1512
+ 'default' => true
1513
+ ),
1514
+ 'notes.wp_content_perms' => array(
1515
+ 'type' => 'boolean',
1516
+ 'default' => true
1517
+ ),
1518
+ 'notes.php_is_old' => array(
1519
+ 'type' => 'boolean',
1520
+ 'default' => true
1521
+ ),
1522
+ 'notes.theme_changed' => array(
1523
+ 'type' => 'boolean',
1524
+ 'default' => false
1525
+ ),
1526
+ 'notes.wp_upgraded' => array(
1527
+ 'type' => 'boolean',
1528
+ 'default' => false
1529
+ ),
1530
+ 'notes.plugins_updated' => array(
1531
+ 'type' => 'boolean',
1532
+ 'default' => false
1533
+ ),
1534
+ 'notes.cdn_upload' => array(
1535
+ 'type' => 'boolean',
1536
+ 'default' => false
1537
+ ),
1538
+ 'notes.cdn_reupload' => array(
1539
+ 'type' => 'boolean',
1540
+ 'default' => false
1541
+ ),
1542
+ 'notes.need_empty_pgcache' => array(
1543
+ 'type' => 'boolean',
1544
+ 'default' => false
1545
+ ),
1546
+ 'notes.need_empty_minify' => array(
1547
+ 'type' => 'boolean',
1548
+ 'default' => false
1549
+ ),
1550
+ 'notes.need_empty_objectcache' => array(
1551
+ 'type' => 'boolean',
1552
+ 'default' => false
1553
+ ),
1554
+ 'notes.root_rules' => array(
1555
+ 'type' => 'boolean',
1556
+ 'default' => true
1557
+ ),
1558
+ 'notes.rules' => array(
1559
+ 'type' => 'boolean',
1560
+ 'default' => true
1561
+ ),
1562
+ 'notes.pgcache_rules_wpsc' => array(
1563
+ 'type' => 'boolean',
1564
+ 'default' => true
1565
+ ),
1566
+ 'notes.support_us' => array(
1567
+ 'type' => 'boolean',
1568
+ 'default' => true
1569
+ ),
1570
+ 'notes.no_curl' => array(
1571
+ 'type' => 'boolean',
1572
+ 'default' => true
1573
+ ),
1574
+ 'notes.no_zlib' => array(
1575
+ 'type' => 'boolean',
1576
+ 'default' => true
1577
+ ),
1578
+ 'notes.zlib_output_compression' => array(
1579
+ 'type' => 'boolean',
1580
+ 'default' => true
1581
+ ),
1582
+ 'notes.no_permalink_rules' => array(
1583
+ 'type' => 'boolean',
1584
+ 'default' => true
1585
+ ),
1586
+ 'notes.browsercache_rules_no404wp' => array(
1587
+ 'type' => 'boolean',
1588
+ 'default' => true
1589
+ ),
1590
+
1591
+ 'timelimit.email_send' => array(
1592
+ 'type' => 'integer',
1593
+ 'default' => 180
1594
+ ),
1595
+ 'timelimit.varnish_purge' => array(
1596
+ 'type' => 'integer',
1597
+ 'default' => 300
1598
+ ),
1599
+ 'timelimit.cache_flush' => array(
1600
+ 'type' => 'integer',
1601
+ 'default' => 600
1602
+ ),
1603
+ 'timelimit.cache_gc' => array(
1604
+ 'type' => 'integer',
1605
+ 'default' => 600
1606
+ ),
1607
+ 'timelimit.cdn_upload' => array(
1608
+ 'type' => 'integer',
1609
+ 'default' => 600
1610
+ ),
1611
+ 'timelimit.cdn_delete' => array(
1612
+ 'type' => 'integer',
1613
+ 'default' => 300
1614
+ ),
1615
+ 'timelimit.cdn_purge' => array(
1616
+ 'type' => 'integer',
1617
+ 'default' => 300
1618
+ ),
1619
+ 'timelimit.cdn_import' => array(
1620
+ 'type' => 'integer',
1621
+ 'default' => 600
1622
+ ),
1623
+ 'timelimit.cdn_test' => array(
1624
+ 'type' => 'integer',
1625
+ 'default' => 300
1626
+ ),
1627
+ 'timelimit.cdn_container_create' => array(
1628
+ 'type' => 'integer',
1629
+ 'default' => 300
1630
+ ),
1631
+ 'timelimit.cloudflare_api_request' => array(
1632
+ 'type' => 'integer',
1633
+ 'default' => 180
1634
+ ),
1635
+ 'timelimit.domain_rename' => array(
1636
+ 'type' => 'integer',
1637
+ 'default' => 120
1638
+ ),
1639
+ 'timelimit.minify_recommendations' => array(
1640
+ 'type' => 'integer',
1641
+ 'default' => 600
1642
+ ),
1643
+
1644
+ 'minify.auto.filename_length' => array(
1645
+ 'type' => 'integer',
1646
+ 'default' => 150
1647
+ ),
1648
+ 'common.instance_id' => array(
1649
+ 'type' => 'integer',
1650
+ 'default' => 0
1651
+ ),
1652
+ 'common.force_master' => array(
1653
+ 'type' => 'boolean',
1654
+ 'default' => true,
1655
+ 'master_only' => 'true'
1656
+ ),
1657
+ 'newrelic.enabled' => array(
1658
+ 'type' => 'boolean',
1659
+ 'default' => false,
1660
+ ),
1661
+ 'newrelic.api_key' => array(
1662
+ 'type' => 'string',
1663
+ 'default' => '',
1664
+ 'master_only' => 'true'
1665
+ ),
1666
+ 'newrelic.account_id' => array(
1667
+ 'type' => 'string',
1668
+ 'default' => '',
1669
+ 'master_only' => 'true'
1670
+ ),
1671
+ 'newrelic.application_id' => array(
1672
+ 'type' => 'integer',
1673
+ 'default' => 0,
1674
+ ),
1675
+ 'newrelic.appname' => array(
1676
+ 'type' => 'string',
1677
+ 'default' => '',
1678
+ ),
1679
+ 'newrelic.accept.logged_roles' => array(
1680
+ 'type' => 'boolean',
1681
+ 'default' => true
1682
+ ),
1683
+ 'newrelic.accept.roles' => array(
1684
+ 'type' => 'array',
1685
+ 'default' => array('contributor')
1686
+ ),
1687
+ 'newrelic.use_php_function' => array (
1688
+ 'type' => 'boolean',
1689
+ 'default' => false,
1690
+ ),
1691
+ 'notes.new_relic_page_load_notification' => array(
1692
+ 'type' => 'boolean',
1693
+ 'default' => true
1694
+ ),
1695
+ 'newrelic.appname_prefix' => array (
1696
+ 'type' => 'string',
1697
+ 'default' => 'Child Site - '
1698
+ ),
1699
+ 'newrelic.merge_with_network' => array (
1700
+ 'type' => 'boolean',
1701
+ 'default' => true
1702
+ ),
1703
+ 'newrelic.cache_time' => array(
1704
+ 'type' => 'integer',
1705
+ 'default' => 5
1706
+ ),
1707
+ 'newrelic.enable_xmit' => array(
1708
+ 'type' => 'boolean',
1709
+ 'default' => false
1710
+ ),
1711
+ 'newrelic.use_network_wide_id' => array(
1712
+ 'type' => 'boolean',
1713
+ 'default' => false,
1714
+ 'master_only' => 'true'
1715
+ )
1716
+ );
1717
+
1718
+
1719
+ /*
1720
+ * Descriptors of configuration keys
1721
+ * for admin config
1722
+ */
1723
+ $keys_admin = array(
1724
+ 'browsercache.configuration_sealed' => array(
1725
+ 'type' => 'boolean',
1726
+ 'default' => false,
1727
+ 'master_only' => 'true'
1728
+ ),
1729
+ 'cdn.configuration_sealed' => array(
1730
+ 'type' => 'boolean',
1731
+ 'default' => false,
1732
+ 'master_only' => 'true'
1733
+ ),
1734
+ 'cloudflare.configuration_sealed' => array(
1735
+ 'type' => 'boolean',
1736
+ 'default' => false,
1737
+ 'master_only' => 'true'
1738
+ ),
1739
+ 'common.install' => array(
1740
+ 'type' => 'integer',
1741
+ 'default' => 0,
1742
+ 'master_only' => 'true'
1743
+ ),
1744
+ 'common.visible_by_master_only' => array(
1745
+ 'type' => 'boolean',
1746
+ 'default' => true,
1747
+ 'master_only' => 'true'
1748
+ ),
1749
+ 'dbcache.configuration_sealed' => array(
1750
+ 'type' => 'boolean',
1751
+ 'default' => false,
1752
+ 'master_only' => 'true'
1753
+ ),
1754
+ 'minify.configuration_sealed' => array(
1755
+ 'type' => 'boolean',
1756
+ 'default' => false,
1757
+ 'master_only' => 'true'
1758
+ ),
1759
+ 'objectcache.configuration_sealed' => array(
1760
+ 'type' => 'boolean',
1761
+ 'default' => false,
1762
+ 'master_only' => 'true'
1763
+ ),
1764
+ 'pgcache.configuration_sealed' => array(
1765
+ 'type' => 'boolean',
1766
+ 'default' => false,
1767
+ 'master_only' => 'true'
1768
+ ),
1769
+ 'previewmode.enabled' => array(
1770
+ 'type' => 'boolean',
1771
+ 'default' => false,
1772
+ 'master_only' => 'true'
1773
+ ),
1774
+ 'varnish.configuration_sealed' => array(
1775
+ 'type' => 'boolean',
1776
+ 'default' => false,
1777
+ 'master_only' => 'true'
1778
+ ),
1779
+ 'fragmentcache.configuration_sealed' => array(
1780
+ 'type' => 'boolean',
1781
+ 'default' => false,
1782
+ 'master_only' => 'true'
1783
+ )
1784
+ ,'newrelic.configuration_sealed' => array(
1785
+ 'type' => 'boolean',
1786
+ 'default' => false,
1787
+ 'master_only' => 'true'
1788
+ )
1789
+ ,'notes.minify_error' => array(
1790
+ 'type' => 'boolean',
1791
+ 'default' => false
1792
+ )
1793
+ ,'minify.error.last' => array(
1794
+ 'type' => 'string',
1795
+ 'default' => ''
1796
+ ),
1797
+ 'minify.error.notification' => array(
1798
+ 'type' => 'string',
1799
+ 'default' => ''
1800
+ ),
1801
+ 'minify.error.notification.last' => array(
1802
+ 'type' => 'integer',
1803
+ 'default' => 0
1804
+ ),
1805
+ 'minify.error.file' => array(
1806
+ 'type' => 'string',
1807
+ 'default' => ''
1808
+ ),
1809
+ 'notes.remove_w3tc' => array(
1810
+ 'type' => 'boolean',
1811
+ 'default' => false
1812
+ )
1813
+ );
1814
+
1815
+ $keys_admin['common.install']['default'] = time();
1816
+
1817
+
1818
+
1819
+ /*
1820
+ * Descriptors how sealed configuration keys affect overriding
1821
+ */
1822
+ $sealing_keys_scope = array(
1823
+ array(
1824
+ 'key' => 'browsercache.configuration_sealed',
1825
+ 'prefix' => 'browsercache.'
1826
+ ),
1827
+ array(
1828
+ 'key' => 'cdn.configuration_sealed',
1829
+ 'prefix' => 'cdn.'
1830
+ ),
1831
+ array(
1832
+ 'key' => 'cloudflare.configuration_sealed',
1833
+ 'prefix' => 'cloudflare.'
1834
+ ),
1835
+ array(
1836
+ 'key' => 'dbcache.configuration_sealed',
1837
+ 'prefix' => 'dbcache.'
1838
+ ),
1839
+ array(
1840
+ 'key' => 'minify.configuration_sealed',
1841
+ 'prefix' => 'minify.'
1842
+ ),
1843
+ array(
1844
+ 'key' => 'objectcache.configuration_sealed',
1845
+ 'prefix' => 'objectcache.'
1846
+ ),
1847
+ array(
1848
+ 'key' => 'fragmentcache.configuration_sealed',
1849
+ 'prefix' => 'fragmentcache.'
1850
+ ),
1851
+ array(
1852
+ 'key' => 'pgcache.configuration_sealed',
1853
+ 'prefix' => 'pgcache.'
1854
+ ),
1855
+ array(
1856
+ 'key' => 'varnish.configuration_sealed',
1857
+ 'prefix' => 'varnish.'
1858
+ )
1859
+ );
1860
+
configs/0.9.2.9-ConfigKeys.php ADDED
@@ -0,0 +1,1860 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Descriptors of configuration keys
5
+ * for config
6
+ */
7
+
8
+ $keys = array(
9
+ 'cluster.messagebus.debug' => array(
10
+ 'type' => 'boolean',
11
+ 'default' => false
12
+ ),
13
+ 'cluster.messagebus.enabled' => array(
14
+ 'type' => 'boolean',
15
+ 'default' => false
16
+ ),
17
+ 'cluster.messagebus.sns.region' => array(
18
+ 'type' => 'string',
19
+ 'default' => ''
20
+ ),
21
+ 'cluster.messagebus.sns.api_key' => array(
22
+ 'type' => 'string',
23
+ 'default' => ''
24
+ ),
25
+ 'cluster.messagebus.sns.api_secret' => array(
26
+ 'type' => 'string',
27
+ 'default' => ''
28
+ ),
29
+ 'cluster.messagebus.sns.topic_arn' => array(
30
+ 'type' => 'string',
31
+ 'default' => ''
32
+ ),
33
+
34
+ 'dbcache.debug' => array(
35
+ 'type' => 'boolean',
36
+ 'default' => false
37
+ ),
38
+ 'dbcache.enabled' => array(
39
+ 'type' => 'boolean',
40
+ 'default' => false
41
+ ),
42
+ 'dbcache.engine' => array(
43
+ 'type' => 'string',
44
+ 'default' => 'file'
45
+ ),
46
+ 'dbcache.file.gc' => array(
47
+ 'type' => 'integer',
48
+ 'default' => 3600
49
+ ),
50
+ 'dbcache.file.locking' => array(
51
+ 'type' => 'boolean',
52
+ 'default' => false
53
+ ),
54
+ 'dbcache.lifetime' => array(
55
+ 'type' => 'integer',
56
+ 'default' => 180
57
+ ),
58
+ 'dbcache.memcached.persistant' => array(
59
+ 'type' => 'boolean',
60
+ 'default' => true
61
+ ),
62
+ 'dbcache.memcached.servers' => array(
63
+ 'type' => 'array',
64
+ 'default' => array(
65
+ '127.0.0.1:11211'
66
+ )
67
+ ),
68
+ 'dbcache.reject.cookie' => array(
69
+ 'type' => 'array',
70
+ 'default' => array()
71
+ ),
72
+ 'dbcache.reject.logged' => array(
73
+ 'type' => 'boolean',
74
+ 'default' => true
75
+ ),
76
+ 'dbcache.reject.sql' => array(
77
+ 'type' => 'array',
78
+ 'default' => array(
79
+ 'gdsr_',
80
+ 'wp_rg_'
81
+ )
82
+ ),
83
+ 'dbcache.reject.uri' => array(
84
+ 'type' => 'array',
85
+ 'default' => array()
86
+ ),
87
+ 'dbcache.reject.words' => array(
88
+ 'type' => 'array',
89
+ 'default' => array(
90
+ '^\s*insert\b',
91
+ '^\s*delete\b',
92
+ '^\s*update\b',
93
+ '^\s*replace\b',
94
+ '^\s*create\b',
95
+ '^\s*alter\b',
96
+ '^\s*show\b',
97
+ '^\s*set\b',
98
+ '\bautoload\s+=\s+\'yes\'',
99
+ '\bsql_calc_found_rows\b',
100
+ '\bfound_rows\(\)',
101
+ '\bw3tc_request_data\b'
102
+ )
103
+ ),
104
+
105
+ 'objectcache.enabled' => array(
106
+ 'type' => 'boolean',
107
+ 'default' => false
108
+ ),
109
+ 'objectcache.debug' => array(
110
+ 'type' => 'boolean',
111
+ 'default' => false
112
+ ),
113
+ 'objectcache.engine' => array(
114
+ 'type' => 'string',
115
+ 'default' => 'file'
116
+ ),
117
+ 'objectcache.file.gc' => array(
118
+ 'type' => 'integer',
119
+ 'default' => 3600
120
+ ),
121
+ 'objectcache.file.locking' => array(
122
+ 'type' => 'boolean',
123
+ 'default' => false
124
+ ),
125
+ 'objectcache.memcached.servers' => array(
126
+ 'type' => 'array',
127
+ 'default' => array(
128
+ '127.0.0.1:11211'
129
+ )
130
+ ),
131
+ 'objectcache.memcached.persistant' => array(
132
+ 'type' => 'boolean',
133
+ 'default' => true
134
+ ),
135
+ 'objectcache.groups.global' => array(
136
+ 'type' => 'array',
137
+ 'default' => array(
138
+ 'users',
139
+ 'userlogins',
140
+ 'usermeta',
141
+ 'user_meta',
142
+ 'site-transient',
143
+ 'site-options',
144
+ 'site-lookup',
145
+ 'blog-lookup',
146
+ 'blog-details',
147
+ 'rss',
148
+ 'global-posts'
149
+ )
150
+ ),
151
+ 'objectcache.groups.nonpersistent' => array(
152
+ 'type' => 'array',
153
+ 'default' => array(
154
+ 'comment',
155
+ 'counts',
156
+ 'plugins'
157
+ )
158
+ ),
159
+ 'objectcache.lifetime' => array(
160
+ 'type' => 'integer',
161
+ 'default' => 180
162
+ ),
163
+
164
+ 'fragmentcache.enabled' => array(
165
+ 'type' => 'boolean',
166
+ 'default' => false
167
+ ),
168
+ 'fragmentcache.debug' => array(
169
+ 'type' => 'boolean',
170
+ 'default' => false
171
+ ),
172
+ 'fragmentcache.engine' => array(
173
+ 'type' => 'string',
174
+ 'default' => 'file'
175
+ ),
176
+ 'fragmentcache.file.gc' => array(
177
+ 'type' => 'integer',
178
+ 'default' => 3600
179
+ ),
180
+ 'fragmentcache.file.locking' => array(
181
+ 'type' => 'boolean',
182
+ 'default' => false
183
+ ),
184
+ 'fragmentcache.memcached.servers' => array(
185
+ 'type' => 'array',
186
+ 'default' => array(
187
+ '127.0.0.1:11211'
188
+ )
189
+ ),
190
+ 'fragmentcache.memcached.persistant' => array(
191
+ 'type' => 'boolean',
192
+ 'default' => true
193
+ ),
194
+ 'fragmentcache.lifetime' => array(
195
+ 'type' => 'integer',
196
+ 'default' => 180
197
+ ),
198
+ 'fragmentcache.groups' => array(
199
+ 'type' => 'array',
200
+ 'default' => array()
201
+ ),
202
+
203
+ 'pgcache.enabled' => array(
204
+ 'type' => 'boolean',
205
+ 'default' => false
206
+ ),
207
+ 'pgcache.comment_cookie_ttl' => array(
208
+ 'type' => 'integer',
209
+ 'default' => 1800
210
+ ),
211
+ 'pgcache.debug' => array(
212
+ 'type' => 'boolean',
213
+ 'default' => false
214
+ ),
215
+ 'pgcache.engine' => array(
216
+ 'type' => 'string',
217
+ 'default' => 'file_generic'
218
+ ),
219
+ 'pgcache.file.gc' => array(
220
+ 'type' => 'integer',
221
+ 'default' => 3600
222
+ ),
223
+ 'pgcache.file.nfs' => array(
224
+ 'type' => 'boolean',
225
+ 'default' => false
226
+ ),
227
+ 'pgcache.file.locking' => array(
228
+ 'type' => 'boolean',
229
+ 'default' => false
230
+ ),
231
+ 'pgcache.lifetime' => array(
232
+ 'type' => 'integer',
233
+ 'default' => 3600
234
+ ),
235
+ 'pgcache.memcached.servers' => array(
236
+ 'type' => 'array',
237
+ 'default' => array(
238
+ '127.0.0.1:11211'
239
+ )
240
+ ),
241
+ 'pgcache.memcached.persistant' => array(
242
+ 'type' => 'boolean',
243
+ 'default' => true
244
+ ),
245
+ 'pgcache.check.domain' => array(
246
+ 'type' => 'boolean',
247
+ 'default' => false
248
+ ),
249
+ 'pgcache.cache.query' => array(
250
+ 'type' => 'boolean',
251
+ 'default' => true
252
+ ),
253
+ 'pgcache.cache.home' => array(
254
+ 'type' => 'boolean',
255
+ 'default' => true
256
+ ),
257
+ 'pgcache.cache.feed' => array(
258
+ 'type' => 'boolean',
259
+ 'default' => false
260
+ ),
261
+ 'pgcache.cache.nginx_handle_xml' => array(
262
+ 'type' => 'boolean',
263
+ 'default' => false
264
+ ),
265
+ 'pgcache.cache.ssl' => array(
266
+ 'type' => 'boolean',
267
+ 'default' => false
268
+ ),
269
+ 'pgcache.cache.404' => array(
270
+ 'type' => 'boolean',
271
+ 'default' => false
272
+ ),
273
+ 'pgcache.cache.flush' => array(
274
+ 'type' => 'boolean',
275
+ 'default' => false
276
+ ),
277
+ 'pgcache.cache.headers' => array(
278
+ 'type' => 'array',
279
+ 'default' => array(
280
+ 'Last-Modified',
281
+ 'Content-Type',
282
+ 'X-Pingback',
283
+ 'P3P'
284
+ )
285
+ ),
286
+ 'pgcache.compatibility' => array(
287
+ 'type' => 'boolean',
288
+ 'default' => false
289
+ ),
290
+ 'pgcache.accept.uri' => array(
291
+ 'type' => 'array',
292
+ 'default' => array(
293
+ 'sitemap(_index)?\.xml(\.gz)?',
294
+ '[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?'
295
+ )
296
+ ),
297
+ 'pgcache.accept.files' => array(
298
+ 'type' => 'array',
299
+ 'default' => array(
300
+ 'wp-comments-popup.php',
301
+ 'wp-links-opml.php',
302
+ 'wp-locations.php'
303
+ )
304
+ ),
305
+ 'pgcache.reject.front_page' => array(
306
+ 'type' => 'boolean',
307
+ 'default' => false
308
+ ),
309
+ 'pgcache.reject.logged' => array(
310
+ 'type' => 'boolean',
311
+ 'default' => true
312
+ ),
313
+ 'pgcache.reject.logged_roles' => array(
314
+ 'type' => 'boolean',
315
+ 'default' => false
316
+ ),
317
+ 'pgcache.reject.roles' => array(
318
+ 'type' => 'array',
319
+ 'default' => array()
320
+ ),
321
+ 'pgcache.reject.uri' => array(
322
+ 'type' => 'array',
323
+ 'default' => array(
324
+ 'wp-.*\.php',
325
+ 'index\.php'
326
+ )
327
+ ),
328
+ 'pgcache.reject.ua' => array(
329
+ 'type' => 'array',
330
+ 'default' => array()
331
+ ),
332
+ 'pgcache.reject.cookie' => array(
333
+ 'type' => 'array',
334
+ 'default' => array('wptouch_switch_toggle')
335
+ ),
336
+ 'pgcache.purge.front_page' => array(
337
+ 'type' => 'boolean',
338
+ 'default' => false
339
+ ),
340
+ 'pgcache.purge.home' => array(
341
+ 'type' => 'boolean',
342
+ 'default' => true
343
+ ),
344
+ 'pgcache.purge.post' => array(
345
+ 'type' => 'boolean',
346
+ 'default' => true
347
+ ),
348
+ 'pgcache.purge.comments' => array(
349
+ 'type' => 'boolean',
350
+ 'default' => false
351
+ ),
352
+ 'pgcache.purge.author' => array(
353
+ 'type' => 'boolean',
354
+ 'default' => false
355
+ ),
356
+ 'pgcache.purge.terms' => array(
357
+ 'type' => 'boolean',
358
+ 'default' => false
359
+ ),
360
+ 'pgcache.purge.archive.daily' => array(
361
+ 'type' => 'boolean',
362
+ 'default' => false
363
+ ),
364
+ 'pgcache.purge.archive.monthly' => array(
365
+ 'type' => 'boolean',
366
+ 'default' => false
367
+ ),
368
+ 'pgcache.purge.archive.yearly' => array(
369
+ 'type' => 'boolean',
370
+ 'default' => false
371
+ ),
372
+ 'pgcache.purge.feed.blog' => array(
373
+ 'type' => 'boolean',
374
+ 'default' => true
375
+ ),
376
+ 'pgcache.purge.feed.comments' => array(
377
+ 'type' => 'boolean',
378
+ 'default' => false
379
+ ),
380
+ 'pgcache.purge.feed.author' => array(
381
+ 'type' => 'boolean',
382
+ 'default' => false
383
+ ),
384
+ 'pgcache.purge.feed.terms' => array(
385
+ 'type' => 'boolean',
386
+ 'default' => false
387
+ ),
388
+ 'pgcache.purge.feed.types' => array(
389
+ 'type' => 'array',
390
+ 'default' => array(
391
+ 'rss2'
392
+ )
393
+ ),
394
+ 'pgcache.purge.postpages_limit' => array(
395
+ 'type' => 'integer',
396
+ 'default' => 10
397
+ ),
398
+ 'pgcache.purge.pages' => array(
399
+ 'type' => 'array',
400
+ 'default' => array()
401
+ ),
402
+ 'pgcache.purge.sitemap_regex' => array(
403
+ 'type' => 'string',
404
+ 'default' => '([a-z0-9_\-]*?)sitemap([a-z0-9_\-]*)?\.xml'
405
+ ),
406
+ 'pgcache.prime.enabled' => array(
407
+ 'type' => 'boolean',
408
+ 'default' => false
409
+ ),
410
+ 'pgcache.prime.interval' => array(
411
+ 'type' => 'integer',
412
+ 'default' => 900
413
+ ),
414
+ 'pgcache.prime.limit' => array(
415
+ 'type' => 'integer',
416
+ 'default' => 10
417
+ ),
418
+ 'pgcache.prime.sitemap' => array(
419
+ 'type' => 'string',
420
+ 'default' => ''
421
+ ),
422
+ 'pgcache.prime.post.enabled' => array(
423
+ 'type' => 'boolean',
424
+ 'default' => false
425
+ ),
426
+
427
+ 'minify.enabled' => array(
428
+ 'type' => 'boolean',
429
+ 'default' => false
430
+ ),
431
+ 'minify.auto' => array(
432
+ 'type' => 'boolean',
433
+ 'default' => true
434
+ ),
435
+ 'minify.debug' => array(
436
+ 'type' => 'boolean',
437
+ 'default' => false
438
+ ),
439
+ 'minify.engine' => array(
440
+ 'type' => 'string',
441
+ 'default' => 'file'
442
+ ),
443
+ 'minify.file.gc' => array(
444
+ 'type' => 'integer',
445
+ 'default' => 86400
446
+ ),
447
+ 'minify.file.nfs' => array(
448
+ 'type' => 'boolean',
449
+ 'default' => false
450
+ ),
451
+ 'minify.file.locking' => array(
452
+ 'type' => 'boolean',
453
+ 'default' => false
454
+ ),
455
+ 'minify.memcached.servers' => array(
456
+ 'type' => 'array',
457
+ 'default' => array(
458
+ '127.0.0.1:11211'
459
+ )
460
+ ),
461
+ 'minify.memcached.persistant' => array(
462
+ 'type' => 'boolean',
463
+ 'default' => true
464
+ ),
465
+ 'minify.rewrite' => array(
466
+ 'type' => 'boolean',
467
+ 'default' => true
468
+ ),
469
+ 'minify.options' => array(
470
+ 'type' => 'array',
471
+ 'default' => array()
472
+ ),
473
+ 'minify.symlinks' => array(
474
+ 'type' => 'array',
475
+ 'default' => array()
476
+ ),
477
+ 'minify.lifetime' => array(
478
+ 'type' => 'integer',
479
+ 'default' => 86400
480
+ ),
481
+ 'minify.upload' => array(
482
+ 'type' => 'boolean',
483
+ 'default' => true
484
+ ),
485
+ 'minify.html.enable' => array(
486
+ 'type' => 'boolean',
487
+ 'default' => false
488
+ ),
489
+ 'minify.html.engine' => array(
490
+ 'type' => 'string',
491
+ 'default' => 'html'
492
+ ),
493
+ 'minify.html.reject.feed' => array(
494
+ 'type' => 'boolean',
495
+ 'default' => false
496
+ ),
497
+ 'minify.html.inline.css' => array(
498
+ 'type' => 'boolean',
499
+ 'default' => false
500
+ ),
501
+ 'minify.html.inline.js' => array(
502
+ 'type' => 'boolean',
503
+ 'default' => false
504
+ ),
505
+ 'minify.html.strip.crlf' => array(
506
+ 'type' => 'boolean',
507
+ 'default' => false
508
+ ),
509
+ 'minify.html.comments.ignore' => array(
510
+ 'type' => 'array',
511
+ 'default' => array(
512
+ 'google_ad_',
513
+ 'RSPEAK_'
514
+ )
515
+ ),
516
+ 'minify.css.enable' => array(
517
+ 'type' => 'boolean',
518
+ 'default' => true
519
+ ),
520
+ 'minify.css.engine' => array(
521
+ 'type' => 'string',
522
+ 'default' => 'css'
523
+ ),
524
+ 'minify.css.combine' => array(
525
+ 'type' => 'boolean',
526
+ 'default' => false
527
+ ),
528
+ 'minify.css.strip.comments' => array(
529
+ 'type' => 'boolean',
530
+ 'default' => false
531
+ ),
532
+ 'minify.css.strip.crlf' => array(
533
+ 'type' => 'boolean',
534
+ 'default' => false
535
+ ),
536
+ 'minify.css.imports' => array(
537
+ 'type' => 'string',
538
+ 'default' => ''
539
+ ),
540
+ 'minify.css.groups' => array(
541
+ 'type' => 'array',
542
+ 'default' => array()
543
+ ),
544
+ 'minify.js.enable' => array(
545
+ 'type' => 'boolean',
546
+ 'default' => true
547
+ ),
548
+ 'minify.js.engine' => array(
549
+ 'type' => 'string',
550
+ 'default' => 'js'
551
+ ),
552
+ 'minify.js.combine.header' => array(
553
+ 'type' => 'boolean',
554
+ 'default' => false
555
+ ),
556
+ 'minify.js.header.embed_type' => array(
557
+ 'type' => 'string',
558
+ 'default' => 'blocking'
559
+ ),
560
+ 'minify.js.combine.body' => array(
561
+ 'type' => 'boolean',
562
+ 'default' => false
563
+ ),
564
+ 'minify.js.body.embed_type' => array(
565
+ 'type' => 'string',
566
+ 'default' => 'blocking'
567
+ ),
568
+ 'minify.js.combine.footer' => array(
569
+ 'type' => 'boolean',
570
+ 'default' => false
571
+ ),
572
+ 'minify.js.footer.embed_type' => array(
573
+ 'type' => 'string',
574
+ 'default' => 'blocking'
575
+ ),
576
+ 'minify.js.strip.comments' => array(
577
+ 'type' => 'boolean',
578
+ 'default' => false
579
+ ),
580
+ 'minify.js.strip.crlf' => array(
581
+ 'type' => 'boolean',
582
+ 'default' => false
583
+ ),
584
+ 'minify.js.groups' => array(
585
+ 'type' => 'array',
586
+ 'default' => array()
587
+ ),
588
+ 'minify.yuijs.path.java' => array(
589
+ 'type' => 'string',
590
+ 'default' => 'java'
591
+ ),
592
+ 'minify.yuijs.path.jar' => array(
593
+ 'type' => 'string',
594
+ 'default' => 'yuicompressor.jar'
595
+ ),
596
+ 'minify.yuijs.options.line-break' => array(
597
+ 'type' => 'integer',
598
+ 'default' => 5000
599
+ ),
600
+ 'minify.yuijs.options.nomunge' => array(
601
+ 'type' => 'boolean',
602
+ 'default' => false
603
+ ),
604
+ 'minify.yuijs.options.preserve-semi' => array(
605
+ 'type' => 'boolean',
606
+ 'default' => false
607
+ ),
608
+ 'minify.yuijs.options.disable-optimizations' => array(
609
+ 'type' => 'boolean',
610
+ 'default' => false
611
+ ),
612
+ 'minify.yuicss.path.java' => array(
613
+ 'type' => 'string',
614
+ 'default' => 'java'
615
+ ),
616
+ 'minify.yuicss.path.jar' => array(
617
+ 'type' => 'string',
618
+ 'default' => 'yuicompressor.jar'
619
+ ),
620
+ 'minify.yuicss.options.line-break' => array(
621
+ 'type' => 'integer',
622
+ 'default' => 5000
623
+ ),
624
+ 'minify.ccjs.path.java' => array(
625
+ 'type' => 'string',
626
+ 'default' => 'java'
627
+ ),
628
+ 'minify.ccjs.path.jar' => array(
629
+ 'type' => 'string',
630
+ 'default' => 'compiler.jar'
631
+ ),
632
+ 'minify.ccjs.options.compilation_level' => array(
633
+ 'type' => 'string',
634
+ 'default' => 'SIMPLE_OPTIMIZATIONS'
635
+ ),
636
+ 'minify.ccjs.options.formatting' => array(
637
+ 'type' => 'string',
638
+ 'default' => ''
639
+ ),
640
+ 'minify.csstidy.options.remove_bslash' => array(
641
+ 'type' => 'boolean',
642
+ 'default' => true
643
+ ),
644
+ 'minify.csstidy.options.compress_colors' => array(
645
+ 'type' => 'boolean',
646
+ 'default' => true
647
+ ),
648
+ 'minify.csstidy.options.compress_font-weight' => array(
649
+ 'type' => 'boolean',
650
+ 'default' => true
651
+ ),
652
+ 'minify.csstidy.options.lowercase_s' => array(
653
+ 'type' => 'boolean',
654
+ 'default' => false
655
+ ),
656
+ 'minify.csstidy.options.optimise_shorthands' => array(
657
+ 'type' => 'integer',
658
+ 'default' => 1
659
+ ),
660
+ 'minify.csstidy.options.remove_last_;' => array(
661
+ 'type' => 'boolean',
662
+ 'default' => false
663
+ ),
664
+ 'minify.csstidy.options.case_properties' => array(
665
+ 'type' => 'integer',
666
+ 'default' => 1
667
+ ),
668
+ 'minify.csstidy.options.sort_properties' => array(
669
+ 'type' => 'boolean',
670
+ 'default' => false
671
+ ),
672
+ 'minify.csstidy.options.sort_selectors' => array(
673
+ 'type' => 'boolean',
674
+ 'default' => false
675
+ ),
676
+ 'minify.csstidy.options.merge_selectors' => array(
677
+ 'type' => 'integer',
678
+ 'default' => 2
679
+ ),
680
+ 'minify.csstidy.options.discard_invalid_properties' => array(
681
+ 'type' => 'boolean',
682
+ 'default' => false
683
+ ),
684
+ 'minify.csstidy.options.css_level' => array(
685
+ 'type' => 'string',
686
+ 'default' => 'CSS2.1'
687
+ ),
688
+ 'minify.csstidy.options.preserve_css' => array(
689
+ 'type' => 'boolean',
690
+ 'default' => false
691
+ ),
692
+ 'minify.csstidy.options.timestamp' => array(
693
+ 'type' => 'boolean',
694
+ 'default' => false
695
+ ),
696
+ 'minify.csstidy.options.template' => array(
697
+ 'type' => 'string',
698
+ 'default' => 'default'
699
+ ),
700
+ 'minify.htmltidy.options.clean' => array(
701
+ 'type' => 'boolean',
702
+ 'default' => false
703
+ ),
704
+ 'minify.htmltidy.options.hide-comments' => array(
705
+ 'type' => 'boolean',
706
+ 'default' => true
707
+ ),
708
+ 'minify.htmltidy.options.wrap' => array(
709
+ 'type' => 'integer',
710
+ 'default' => 0
711
+ ),
712
+ 'minify.reject.logged' => array(
713
+ 'type' => 'boolean',
714
+ 'default' => false
715
+ ),
716
+ 'minify.reject.ua' => array(
717
+ 'type' => 'array',
718
+ 'default' => array()
719
+ ),
720
+ 'minify.reject.uri' => array(
721
+ 'type' => 'array',
722
+ 'default' => array()
723
+ ),
724
+ 'minify.reject.files.js' => array(
725
+ 'type' => 'array',
726
+ 'default' => array()
727
+ ),
728
+ 'minify.reject.files.css' => array(
729
+ 'type' => 'array',
730
+ 'default' => array()
731
+ ),
732
+ 'minify.cache.files' => array(
733
+ 'type' => 'array',
734
+ 'default' => array('https://ajax.googleapis.com')
735
+ ),
736
+
737
+ 'cdn.enabled' => array(
738
+ 'type' => 'boolean',
739
+ 'default' => false
740
+ ),
741
+ 'cdn.debug' => array(
742
+ 'type' => 'boolean',
743
+ 'default' => false
744
+ ),
745
+ 'cdn.engine' => array(
746
+ 'type' => 'string',
747
+ 'default' => 'ftp'
748
+ ),
749
+ 'cdn.uploads.enable' => array(
750
+ 'type' => 'boolean',
751
+ 'default' => true
752
+ ),
753
+ 'cdn.includes.enable' => array(
754
+ 'type' => 'boolean',
755
+ 'default' => true
756
+ ),
757
+ 'cdn.includes.files' => array(
758
+ 'type' => 'string',
759
+ 'default' => '*.css;*.js;*.gif;*.png;*.jpg;*.xml'
760
+ ),
761
+ 'cdn.theme.enable' => array(
762
+ 'type' => 'boolean',
763
+ 'default' => true
764
+ ),
765
+ 'cdn.theme.files' => array(
766
+ 'type' => 'string',
767
+ 'default' => '*.css;*.js;*.gif;*.png;*.jpg;*.ico;*.ttf;*.otf,*.woff'
768
+ ),
769
+ 'cdn.minify.enable' => array(
770
+ 'type' => 'boolean',
771
+ 'default' => true
772
+ ),
773
+ 'cdn.custom.enable' => array(
774
+ 'type' => 'boolean',
775
+ 'default' => true
776
+ ),
777
+ 'cdn.custom.files' => array(
778
+ 'type' => 'array',
779
+ 'default' => array(
780
+ 'favicon.ico',
781
+ 'wp-content/gallery/*',
782
+ 'wp-content/uploads/avatars/*',
783
+ 'wp-content/plugins/wordpress-seo/css/xml-sitemap.xsl',
784
+ 'wp-content/plugins/wp-minify/min*',
785
+ 'wp-content/plugins/*.js',
786
+ 'wp-content/plugins/*.css',
787
+ 'wp-content/plugins/*.gif',
788
+ 'wp-content/plugins/*.jpg',
789
+ 'wp-content/plugins/*.png',
790
+ )
791
+ ),
792
+ 'cdn.import.external' => array(
793
+ 'type' => 'boolean',
794
+ 'default' => false
795
+ ),
796
+ 'cdn.import.files' => array(
797
+ 'type' => 'string',
798
+ 'default' => false
799
+ ),
800
+ 'cdn.queue.interval' => array(
801
+ 'type' => 'integer',
802
+ 'default' => 900
803
+ ),
804
+ 'cdn.queue.limit' => array(
805
+ 'type' => 'integer',
806
+ 'default' => 25
807
+ ),
808
+ 'cdn.force.rewrite' => array(
809
+ 'type' => 'boolean',
810
+ 'default' => false
811
+ ),
812
+ 'cdn.autoupload.enabled' => array(
813
+ 'type' => 'boolean',
814
+ 'default' => false
815
+ ),
816
+ 'cdn.autoupload.interval' => array(
817
+ 'type' => 'integer',
818
+ 'default' => 3600
819
+ ),
820
+ 'cdn.canonical_header' => array(
821
+ 'type' => 'boolean',
822
+ 'default' => false
823
+ ),
824
+ 'cdn.ftp.host' => array(
825
+ 'type' => 'string',
826
+ 'default' => ''
827
+ ),
828
+ 'cdn.ftp.user' => array(
829
+ 'type' => 'string',
830
+ 'default' => ''
831
+ ),
832
+ 'cdn.ftp.pass' => array(
833
+ 'type' => 'string',
834
+ 'default' => ''
835
+ ),
836
+ 'cdn.ftp.path' => array(
837
+ 'type' => 'string',
838
+ 'default' => ''
839
+ ),
840
+ 'cdn.ftp.pasv' => array(
841
+ 'type' => 'boolean',
842
+ 'default' => false
843
+ ),
844
+ 'cdn.ftp.domain' => array(
845
+ 'type' => 'array',
846
+ 'default' => array()
847
+ ),
848
+ 'cdn.ftp.ssl' => array(
849
+ 'type' => 'string',
850
+ 'default' => 'auto'
851
+ ),
852
+ 'cdn.s3.key' => array(
853
+ 'type' => 'string',
854
+ 'default' => ''
855
+ ),
856
+ 'cdn.s3.secret' => array(
857
+ 'type' => 'string',
858
+ 'default' => ''
859
+ ),
860
+ 'cdn.s3.bucket' => array(
861
+ 'type' => 'string',
862
+ 'default' => ''
863
+ ),
864
+ 'cdn.s3.cname' => array(
865
+ 'type' => 'array',
866
+ 'default' => array()
867
+ ),
868
+ 'cdn.s3.ssl' => array(
869
+ 'type' => 'string',
870
+ 'default' => 'auto'
871
+ ),
872
+ 'cdn.cf.key' => array(
873
+ 'type' => 'string',
874
+ 'default' => ''
875
+ ),
876
+ 'cdn.cf.secret' => array(
877
+ 'type' => 'string',
878
+ 'default' => ''
879
+ ),
880
+ 'cdn.cf.bucket' => array(
881
+ 'type' => 'string',
882
+ 'default' => ''
883
+ ),
884
+ 'cdn.cf.id' => array(
885
+ 'type' => 'string',
886
+ 'default' => ''
887
+ ),
888
+ 'cdn.cf.cname' => array(
889
+ 'type' => 'array',
890
+ 'default' => array()
891
+ ),
892
+ 'cdn.cf.ssl' => array(
893
+ 'type' => 'string',
894
+ 'default' => 'auto'
895
+ ),
896
+ 'cdn.cf2.key' => array(
897
+ 'type' => 'string',
898
+ 'default' => ''
899
+ ),
900
+ 'cdn.cf2.secret' => array(
901
+ 'type' => 'string',
902
+ 'default' => ''
903
+ ),
904
+ 'cdn.cf2.id' => array(
905
+ 'type' => 'string',
906
+ 'default' => ''
907
+ ),
908
+ 'cdn.cf2.cname' => array(
909
+ 'type' => 'array',
910
+ 'default' => array()
911
+ ),
912
+ 'cdn.cf2.ssl' => array(
913
+ 'type' => 'string',
914
+ 'default' => ''
915
+ ),
916
+ 'cdn.rscf.user' => array(
917
+ 'type' => 'string',
918
+ 'default' => ''
919
+ ),
920
+ 'cdn.rscf.key' => array(
921
+ 'type' => 'string',
922
+ 'default' => ''
923
+ ),
924
+ 'cdn.rscf.location' => array(
925
+ 'type' => 'string',
926
+ 'default' => 'us'
927
+ ),
928
+ 'cdn.rscf.container' => array(
929
+ 'type' => 'string',
930
+ 'default' => ''
931
+ ),
932
+ 'cdn.rscf.cname' => array(
933
+ 'type' => 'array',
934
+ 'default' => array()
935
+ ),
936
+ 'cdn.rscf.ssl' => array(
937
+ 'type' => 'string',
938
+ 'default' => 'auto'
939
+ ),
940
+ 'cdn.azure.user' => array(
941
+ 'type' => 'string',
942
+ 'default' => ''
943
+ ),
944
+ 'cdn.azure.key' => array(
945
+ 'type' => 'string',
946
+ 'default' => ''
947
+ ),
948
+ 'cdn.azure.container' => array(
949
+ 'type' => 'string',
950
+ 'default' => ''
951
+ ),
952
+ 'cdn.azure.cname' => array(
953
+ 'type' => 'array',
954
+ 'default' => array()
955
+ ),
956
+ 'cdn.azure.ssl' => array(
957
+ 'type' => 'string',
958
+ 'default' => 'auto'
959
+ ),
960
+ 'cdn.mirror.domain' => array(
961
+ 'type' => 'array',
962
+ 'default' => array()
963
+ ),
964
+ 'cdn.mirror.ssl' => array(
965
+ 'type' => 'string',
966
+ 'default' => 'auto'
967
+ ),
968
+ 'cdn.netdna.alias' => array(
969
+ 'type' => 'string',
970
+ 'default' => ''
971
+ ),
972
+ 'cdn.netdna.consumerkey' => array(
973
+ 'type' => 'string',
974
+ 'default' => ''
975
+ ),
976
+ 'cdn.netdna.consumersecret' => array(
977
+ 'type' => 'string',
978
+ 'default' => ''
979
+ ),
980
+ 'cdn.netdna.domain' => array(
981
+ 'type' => 'array',
982
+ 'default' => array()
983
+ ),
984
+ 'cdn.netdna.ssl' => array(
985
+ 'type' => 'string',
986
+ 'default' => 'auto'
987
+ ),
988
+ 'cdn.cotendo.username' => array(
989
+ 'type' => 'string',
990
+ 'default' => ''
991
+ ),
992
+ 'cdn.cotendo.password' => array(
993
+ 'type' => 'string',
994
+ 'default' => ''
995
+ ),
996
+ 'cdn.cotendo.zones' => array(
997
+ 'type' => 'array',
998
+ 'default' => array()
999
+ ),
1000
+ 'cdn.cotendo.domain' => array(
1001
+ 'type' => 'array',
1002
+ 'default' => array()
1003
+ ),
1004
+ 'cdn.cotendo.ssl' => array(
1005
+ 'type' => 'string',
1006
+ 'default' => 'auto'
1007
+ ),
1008
+ 'cdn.akamai.username' => array(
1009
+ 'type' => 'string',
1010
+ 'default' => ''
1011
+ ),
1012
+ 'cdn.akamai.password' => array(
1013
+ 'type' => 'string',
1014
+ 'default' => ''
1015
+ ),
1016
+ 'cdn.akamai.email_notification' => array(
1017
+ 'type' => 'array',
1018
+ 'default' => array()
1019
+ ),
1020
+ 'cdn.akamai.action' => array(
1021
+ 'type' => 'string',
1022
+ 'default' => 'invalidate'
1023
+ ),
1024
+ 'cdn.akamai.zone' => array(
1025
+ 'type' => 'string',
1026
+ 'default' => 'production'
1027
+ ),
1028
+ 'cdn.akamai.domain' => array(
1029
+ 'type' => 'array',
1030
+ 'default' => array()
1031
+ ),
1032
+ 'cdn.akamai.ssl' => array(
1033
+ 'type' => 'string',
1034
+ 'default' => 'auto'
1035
+ ),
1036
+ 'cdn.edgecast.account' => array(
1037
+ 'type' => 'string',
1038
+ 'default' => ''
1039
+ ),
1040
+ 'cdn.edgecast.token' => array(
1041
+ 'type' => 'string',
1042
+ 'default' => ''
1043
+ ),
1044
+ 'cdn.edgecast.domain' => array(
1045
+ 'type' => 'array',
1046
+ 'default' => array()
1047
+ ),
1048
+ 'cdn.edgecast.ssl' => array(
1049
+ 'type' => 'string',
1050
+ 'default' => 'auto'
1051
+ ),
1052
+ 'cdn.att.account' => array(
1053
+ 'type' => 'string',
1054
+ 'default' => ''
1055
+ ),
1056
+ 'cdn.att.token' => array(
1057
+ 'type' => 'string',
1058
+ 'default' => ''
1059
+ ),
1060
+ 'cdn.att.domain' => array(
1061
+ 'type' => 'array',
1062
+ 'default' => array()
1063
+ ),
1064
+ 'cdn.att.ssl' => array(
1065
+ 'type' => 'string',
1066
+ 'default' => 'auto'
1067
+ ),
1068
+ 'cdn.reject.admins' => array(
1069
+ 'type' => 'boolean',
1070
+ 'default' => false
1071
+ ),
1072
+ 'cdn.reject.logged_roles' => array(
1073
+ 'type' => 'boolean',
1074
+ 'default' => false
1075
+ ),
1076
+ 'cdn.reject.roles' => array(
1077
+ 'type' => 'array',
1078
+ 'default' => array()
1079
+ ),
1080
+ 'cdn.reject.ua' => array(
1081
+ 'type' => 'array',
1082
+ 'default' => array()
1083
+ ),
1084
+ 'cdn.reject.uri' => array(
1085
+ 'type' => 'array',
1086
+ 'default' => array()
1087
+ ),
1088
+ 'cdn.reject.files' => array(
1089
+ 'type' => 'array',
1090
+ 'default' => array(
1091
+ 'wp-content/uploads/wpcf7_captcha/*',
1092
+ 'wp-content/uploads/imagerotator.swf',
1093
+ 'wp-content/plugins/wp-fb-autoconnect/facebook-platform/channel.html'
1094
+ )
1095
+ ),
1096
+ 'cdn.reject.ssl' => array(
1097
+ 'type' => 'boolean',
1098
+ 'default' => false
1099
+ ),
1100
+ 'cdncache.enabled' => array(
1101
+ 'type' => 'boolean',
1102
+ 'default' => false
1103
+ ),
1104
+
1105
+
1106
+ 'cloudflare.enabled' => array(
1107
+ 'type' => 'boolean',
1108
+ 'default' => false
1109
+ ),
1110
+ 'cloudflare.email' => array(
1111
+ 'type' => 'string',
1112
+ 'default' => ''
1113
+ ),
1114
+ 'cloudflare.key' => array(
1115
+ 'type' => 'string',
1116
+ 'default' => ''
1117
+ ),
1118
+ 'cloudflare.zone' => array(
1119
+ 'type' => 'string',
1120
+ 'default' => ''
1121
+ ),
1122
+ 'cloudflare.ips.ip4' => array(
1123
+ 'type' => 'array',
1124
+ 'default' => array("204.93.240.0/24", "204.93.177.0/24", "199.27.128.0/21", "173.245.48.0/20", "103.22.200.0/22", "141.101.64.0/18", "108.162.192.0/18","190.93.240.1/20","188.114.96.0/20", "198.41.128.0/17")
1125
+ ),
1126
+ 'cloudflare.ips.ip6' => array(
1127
+ 'type' => 'array',
1128
+ 'default' => array("2400:cb00::/32", "2606:4700::/32", "2803:f800::/32")
1129
+ ),
1130
+
1131
+ 'varnish.enabled' => array(
1132
+ 'type' => 'boolean',
1133
+ 'default' => false
1134
+ ),
1135
+ 'varnish.debug' => array(
1136
+ 'type' => 'boolean',
1137
+ 'default' => false
1138
+ ),
1139
+ 'varnish.servers' => array(
1140
+ 'type' => 'array',
1141
+ 'default' => array()
1142
+ ),
1143
+
1144
+ 'browsercache.enabled' => array(
1145
+ 'type' => 'boolean',
1146
+ 'default' => true
1147
+ ),
1148
+ 'browsercache.no404wp' => array(
1149
+ 'type' => 'boolean',
1150
+ 'default' => false
1151
+ ),
1152
+ 'browsercache.no404wp.exceptions' => array(
1153
+ 'type' => 'array',
1154
+ 'default' => array(
1155
+ 'robots\.txt',
1156
+ 'sitemap(_index)?\.xml(\.gz)?',
1157
+ '[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?'
1158
+ )
1159
+ ),
1160
+ 'browsercache.cssjs.last_modified' => array(
1161
+ 'type' => 'boolean',
1162
+ 'default' => true
1163
+ ),
1164
+ 'browsercache.cssjs.compression' => array(
1165
+ 'type' => 'boolean',
1166
+ 'default' => true
1167
+ ),
1168
+ 'browsercache.cssjs.expires' => array(
1169
+ 'type' => 'boolean',
1170
+ 'default' => false
1171
+ ),
1172
+ 'browsercache.cssjs.lifetime' => array(
1173
+ 'type' => 'integer',
1174
+ 'default' => 31536000
1175
+ ),
1176
+ 'browsercache.cssjs.nocookies' => array(
1177
+ 'type' => 'boolean',
1178
+ 'default' => false
1179
+ ),
1180
+ 'browsercache.cssjs.cache.control' => array(
1181
+ 'type' => 'boolean',
1182
+ 'default' => false
1183
+ ),
1184
+ 'browsercache.cssjs.cache.policy' => array(
1185
+ 'type' => 'string',
1186
+ 'default' => 'cache_public_maxage'
1187
+ ),
1188
+ 'browsercache.cssjs.etag' => array(
1189
+ 'type' => 'boolean',
1190
+ 'default' => false
1191
+ ),
1192
+ 'browsercache.cssjs.w3tc' => array(
1193
+ 'type' => 'boolean',
1194
+ 'default' => false
1195
+ ),
1196
+ 'browsercache.cssjs.replace' => array(
1197
+ 'type' => 'boolean',
1198
+ 'default' => false
1199
+ ),
1200
+ 'browsercache.html.compression' => array(
1201
+ 'type' => 'boolean',
1202
+ 'default' => true
1203
+ ),
1204
+ 'browsercache.html.last_modified' => array(
1205
+ 'type' => 'boolean',
1206
+ 'default' => true
1207
+ ),
1208
+ 'browsercache.html.expires' => array(
1209
+ 'type' => 'boolean',
1210
+ 'default' => false
1211
+ ),
1212
+ 'browsercache.html.lifetime' => array(
1213
+ 'type' => 'integer',
1214
+ 'default' => 3600
1215
+ ),
1216
+ 'browsercache.html.cache.control' => array(
1217
+ 'type' => 'boolean',
1218
+ 'default' => false
1219
+ ),
1220
+ 'browsercache.html.cache.policy' => array(
1221
+ 'type' => 'string',
1222
+ 'default' => 'cache_public_maxage'
1223
+ ),
1224
+ 'browsercache.html.etag' => array(
1225
+ 'type' => 'boolean',
1226
+ 'default' => false
1227
+ ),
1228
+ 'browsercache.html.w3tc' => array(
1229
+ 'type' => 'boolean',
1230
+ 'default' => false
1231
+ ),
1232
+ 'browsercache.html.replace' => array(
1233
+ 'type' => 'boolean',
1234
+ 'default' => false
1235
+ ),
1236
+ 'browsercache.other.last_modified' => array(
1237
+ 'type' => 'boolean',
1238
+ 'default' => true
1239
+ ),
1240
+ 'browsercache.other.compression' => array(
1241
+ 'type' => 'boolean',
1242
+ 'default' => true
1243
+ ),
1244
+ 'browsercache.other.expires' => array(
1245
+ 'type' => 'boolean',
1246
+ 'default' => false
1247
+ ),
1248
+ 'browsercache.other.lifetime' => array(
1249
+ 'type' => 'integer',
1250
+ 'default' => 31536000
1251
+ ),
1252
+ 'browsercache.other.nocookies' => array(
1253
+ 'type' => 'boolean',
1254
+ 'default' => false
1255
+ ),
1256
+ 'browsercache.other.cache.control' => array(
1257
+ 'type' => 'boolean',
1258
+ 'default' => false
1259
+ ),
1260
+ 'browsercache.other.cache.policy' => array(
1261
+ 'type' => 'string',
1262
+ 'default' => 'cache_public_maxage'
1263
+ ),
1264
+ 'browsercache.other.etag' => array(
1265
+ 'type' => 'boolean',
1266
+ 'default' => false
1267
+ ),
1268
+ 'browsercache.other.w3tc' => array(
1269
+ 'type' => 'boolean',
1270
+ 'default' => false
1271
+ ),
1272
+ 'browsercache.other.replace' => array(
1273
+ 'type' => 'boolean',
1274
+ 'default' => false
1275
+ ),
1276
+ 'browsercache.timestamp' => array(
1277
+ 'type' => 'string',
1278
+ 'default' => ''
1279
+ ),
1280
+
1281
+ 'mobile.enabled' => array(
1282
+ 'type' => 'boolean',
1283
+ 'default' => false
1284
+ ),
1285
+ 'mobile.rgroups' => array(
1286
+ 'type' => 'array',
1287
+ 'default' => array(
1288
+ 'high' => array(
1289
+ 'theme' => '',
1290
+ 'enabled' => false,
1291
+ 'redirect' => '',
1292
+ 'agents' => array(
1293
+ 'acer\ s100',
1294
+ 'android',
1295
+ 'archos5',
1296
+ 'bada',
1297
+ 'blackberry9500',
1298
+ 'blackberry9530',
1299
+ 'blackberry9550',
1300
+ 'blackberry\ 9800',
1301
+ 'cupcake',
1302
+ 'docomo\ ht\-03a',
1303
+ 'dream',
1304
+ 'froyo',
1305
+ 'googlebot-mobile',
1306
+ 'htc\ hero',
1307
+ 'htc\ magic',
1308
+ 'htc_dream',
1309
+ 'htc_magic',
1310
+ 'iemobile/7.0',
1311
+ 'incognito',
1312
+ 'ipad',
1313
+ 'iphone',
1314
+ 'ipod',
1315
+ 'kindle',
1316
+ 'lg\-gw620',
1317
+ 'liquid\ build',
1318
+ 'maemo',
1319
+ 'mot\-mb200',
1320
+ 'mot\-mb300',
1321
+ 'nexus\ one',
1322
+ 'opera\ mini',
1323
+ 's8000',
1324
+ 'samsung\-s8000',
1325
+ 'series60.*webkit',
1326
+ 'series60/5\.0',
1327
+ 'sonyericssone10',
1328
+ 'sonyericssonu20',
1329
+ 'sonyericssonx10',
1330
+ 't\-mobile\ mytouch\ 3g',
1331
+ 't\-mobile\ opal',
1332
+ 'tattoo',
1333
+ 'webmate',
1334
+ 'webos'
1335
+ )
1336
+ ),
1337
+ 'low' => array(
1338
+ 'theme' => '',
1339
+ 'enabled' => false,
1340
+ 'redirect' => '',
1341
+ 'agents' => array(
1342
+ '2\.0\ mmp',
1343
+ '240x320',
1344
+ 'alcatel',
1345
+ 'amoi',
1346
+ 'asus',
1347
+ 'au\-mic',
1348
+ 'audiovox',
1349
+ 'avantgo',
1350
+ 'benq',
1351
+ 'bird',
1352
+ 'blackberry',
1353
+ 'blazer',
1354
+ 'cdm',
1355
+ 'cellphone',
1356
+ 'danger',
1357
+ 'ddipocket',
1358
+ 'docomo',
1359
+ 'dopod',
1360
+ 'elaine/3\.0',
1361
+ 'ericsson',
1362
+ 'eudoraweb',
1363
+ 'fly',
1364
+ 'haier',
1365
+ 'hiptop',
1366
+ 'hp\.ipaq',
1367
+ 'htc',
1368
+ 'huawei',
1369
+ 'i\-mobile',
1370
+ 'iemobile',
1371
+ 'j\-phone',
1372
+ 'kddi',
1373
+ 'konka',
1374
+ 'kwc',
1375
+ 'kyocera/wx310k',
1376
+ 'lenovo',
1377
+ 'lg',
1378
+ 'lg/u990',
1379
+ 'lge\ vx',
1380
+ 'midp',
1381
+ 'midp\-2\.0',
1382
+ 'mmef20',
1383
+ 'mmp',
1384
+ 'mobilephone',
1385
+ 'mot\-v',
1386
+ 'motorola',
1387
+ 'netfront',
1388
+ 'newgen',
1389
+ 'newt',
1390
+ 'nintendo\ ds',
1391
+ 'nintendo\ wii',
1392
+ 'nitro',
1393
+ 'nokia',
1394
+ 'novarra',
1395
+ 'o2',
1396
+ 'openweb',
1397
+ 'opera\ mobi',
1398
+ 'opera\.mobi',
1399
+ 'palm',
1400
+ 'panasonic',
1401
+ 'pantech',
1402
+ 'pdxgw',
1403
+ 'pg',
1404
+ 'philips',
1405
+ 'phone',
1406
+ 'playstation\ portable',
1407
+ 'portalmmm',
1408
+ '\bppc\b',
1409
+ 'proxinet',
1410
+ 'psp',
1411
+ 'qtek',
1412
+ 'sagem',
1413
+ 'samsung',
1414
+ 'sanyo',
1415
+ 'sch',
1416
+ 'sec',
1417
+ 'sendo',
1418
+ 'sgh',
1419
+ 'sharp',
1420
+ 'sharp\-tq\-gx10',
1421
+ 'small',
1422
+ 'smartphone',
1423
+ 'softbank',
1424
+ 'sonyericsson',
1425
+ 'sph',
1426
+ 'symbian',
1427
+ 'symbian\ os',
1428
+ 'symbianos',
1429
+ 'toshiba',
1430
+ 'treo',
1431
+ 'ts21i\-10',
1432
+ 'up\.browser',
1433
+ 'up\.link',
1434
+ 'uts',
1435
+ 'vertu',
1436
+ 'vodafone',
1437
+ 'wap',
1438
+ 'willcome',
1439
+ 'windows\ ce',
1440
+ 'windows\.ce',
1441
+ 'winwap',
1442
+ 'xda',
1443
+ 'zte'
1444
+ )
1445
+ )
1446
+ )
1447
+ ),
1448
+
1449
+
1450
+ 'referrer.enabled' => array(
1451
+ 'type' => 'boolean',
1452
+ 'default' => false
1453
+ ),
1454
+ 'referrer.rgroups' => array(
1455
+ 'type' => 'array',
1456
+ 'default' => array(
1457
+ 'search_engines' => array(
1458
+ 'theme' => '',
1459
+ 'enabled' => false,
1460
+ 'redirect' => '',
1461
+ 'referrers' => array(
1462
+ 'google\.com',
1463
+ 'yahoo\.com',
1464
+ 'bing\.com',
1465
+ 'ask\.com',
1466
+ 'msn\.com'
1467
+ )
1468
+ )
1469
+ )
1470
+ ),
1471
+
1472
+
1473
+ 'common.support' => array(
1474
+ 'type' => 'string',
1475
+ 'default' => ''
1476
+ ),
1477
+ 'common.install' => array(
1478
+ 'type' => 'integer',
1479
+ 'default' => 0
1480
+ ),
1481
+ 'common.tweeted' => array(
1482
+ 'type' => 'boolean',
1483
+ 'default' => false
1484
+ ),
1485
+ 'config.check' => array(
1486
+ 'type' => 'boolean',
1487
+ 'default' => true
1488
+ ),
1489
+ 'config.path' => array(
1490
+ 'type' => 'string',
1491
+ 'default' => ''
1492
+ ),
1493
+ 'widget.latest.items' => array(
1494
+ 'type' => 'integer',
1495
+ 'default' => 3
1496
+ ),
1497
+ 'widget.latest_news.items' => array(
1498
+ 'type' => 'integer',
1499
+ 'default' => 5
1500
+ ),
1501
+ 'widget.pagespeed.enabled' => array(
1502
+ 'type' => 'boolean',
1503
+ 'default' => true
1504
+ ),
1505
+ 'widget.pagespeed.key' => array(
1506
+ 'type' => 'string',
1507
+ 'default' => ''
1508
+ ),
1509
+
1510
+ 'notes.wp_content_changed_perms' => array(
1511
+ 'type' => 'boolean',
1512
+ 'default' => true
1513
+ ),
1514
+ 'notes.wp_content_perms' => array(
1515
+ 'type' => 'boolean',
1516
+ 'default' => true
1517
+ ),
1518
+ 'notes.php_is_old' => array(
1519
+ 'type' => 'boolean',
1520
+ 'default' => true
1521
+ ),
1522
+ 'notes.theme_changed' => array(
1523
+ 'type' => 'boolean',
1524
+ 'default' => false
1525
+ ),
1526
+ 'notes.wp_upgraded' => array(
1527
+ 'type' => 'boolean',
1528
+ 'default' => false
1529
+ ),
1530
+ 'notes.plugins_updated' => array(
1531
+ 'type' => 'boolean',
1532
+ 'default' => false
1533
+ ),
1534
+ 'notes.cdn_upload' => array(
1535
+ 'type' => 'boolean',
1536
+ 'default' => false
1537
+ ),
1538
+ 'notes.cdn_reupload' => array(
1539
+ 'type' => 'boolean',
1540
+ 'default' => false
1541
+ ),
1542
+ 'notes.need_empty_pgcache' => array(
1543
+ 'type' => 'boolean',
1544
+ 'default' => false
1545
+ ),
1546
+ 'notes.need_empty_minify' => array(
1547
+ 'type' => 'boolean',
1548
+ 'default' => false
1549
+ ),
1550
+ 'notes.need_empty_objectcache' => array(
1551
+ 'type' => 'boolean',
1552
+ 'default' => false
1553
+ ),
1554
+ 'notes.root_rules' => array(
1555
+ 'type' => 'boolean',
1556
+ 'default' => true
1557
+ ),
1558
+ 'notes.rules' => array(
1559
+ 'type' => 'boolean',
1560
+ 'default' => true
1561
+ ),
1562
+ 'notes.pgcache_rules_wpsc' => array(
1563
+ 'type' => 'boolean',
1564
+ 'default' => true
1565
+ ),
1566
+ 'notes.support_us' => array(
1567
+ 'type' => 'boolean',
1568
+ 'default' => true
1569
+ ),
1570
+ 'notes.no_curl' => array(
1571
+ 'type' => 'boolean',
1572
+ 'default' => true
1573
+ ),
1574
+ 'notes.no_zlib' => array(
1575
+ 'type' => 'boolean',
1576
+ 'default' => true
1577
+ ),
1578
+ 'notes.zlib_output_compression' => array(
1579
+ 'type' => 'boolean',
1580
+ 'default' => true
1581
+ ),
1582
+ 'notes.no_permalink_rules' => array(
1583
+ 'type' => 'boolean',
1584
+ 'default' => true
1585
+ ),
1586
+ 'notes.browsercache_rules_no404wp' => array(
1587
+ 'type' => 'boolean',
1588
+ 'default' => true
1589
+ ),
1590
+
1591
+ 'timelimit.email_send' => array(
1592
+ 'type' => 'integer',
1593
+ 'default' => 180
1594
+ ),
1595
+ 'timelimit.varnish_purge' => array(
1596
+ 'type' => 'integer',
1597
+ 'default' => 300
1598
+ ),
1599
+ 'timelimit.cache_flush' => array(
1600
+ 'type' => 'integer',
1601
+ 'default' => 600
1602
+ ),
1603
+ 'timelimit.cache_gc' => array(
1604
+ 'type' => 'integer',
1605
+ 'default' => 600
1606
+ ),
1607
+ 'timelimit.cdn_upload' => array(
1608
+ 'type' => 'integer',
1609
+ 'default' => 600
1610
+ ),
1611
+ 'timelimit.cdn_delete' => array(
1612
+ 'type' => 'integer',
1613
+ 'default' => 300
1614
+ ),
1615
+ 'timelimit.cdn_purge' => array(
1616
+ 'type' => 'integer',
1617
+ 'default' => 300
1618
+ ),
1619
+ 'timelimit.cdn_import' => array(
1620
+ 'type' => 'integer',
1621
+ 'default' => 600
1622
+ ),
1623
+ 'timelimit.cdn_test' => array(
1624
+ 'type' => 'integer',
1625
+ 'default' => 300
1626
+ ),
1627
+ 'timelimit.cdn_container_create' => array(
1628
+ 'type' => 'integer',
1629
+ 'default' => 300
1630
+ ),
1631
+ 'timelimit.cloudflare_api_request' => array(
1632
+ 'type' => 'integer',
1633
+ 'default' => 180
1634
+ ),
1635
+ 'timelimit.domain_rename' => array(
1636
+ 'type' => 'integer',
1637
+ 'default' => 120
1638
+ ),
1639
+ 'timelimit.minify_recommendations' => array(
1640
+ 'type' => 'integer',
1641
+ 'default' => 600
1642
+ ),
1643
+
1644
+ 'minify.auto.filename_length' => array(
1645
+ 'type' => 'integer',
1646
+ 'default' => 150
1647
+ ),
1648
+ 'common.instance_id' => array(
1649
+ 'type' => 'integer',
1650
+ 'default' => 0
1651
+ ),
1652
+ 'common.force_master' => array(
1653
+ 'type' => 'boolean',
1654
+ 'default' => true,
1655
+ 'master_only' => 'true'
1656
+ ),
1657
+ 'newrelic.enabled' => array(
1658
+ 'type' => 'boolean',
1659
+ 'default' => false,
1660
+ ),
1661
+ 'newrelic.api_key' => array(
1662
+ 'type' => 'string',
1663
+ 'default' => '',
1664
+ 'master_only' => 'true'
1665
+ ),
1666
+ 'newrelic.account_id' => array(
1667
+ 'type' => 'string',
1668
+ 'default' => '',
1669
+ 'master_only' => 'true'
1670
+ ),
1671
+ 'newrelic.application_id' => array(
1672
+ 'type' => 'integer',
1673
+ 'default' => 0,
1674
+ ),
1675
+ 'newrelic.appname' => array(
1676
+ 'type' => 'string',
1677
+ 'default' => '',
1678
+ ),
1679
+ 'newrelic.accept.logged_roles' => array(
1680
+ 'type' => 'boolean',
1681
+ 'default' => true
1682
+ ),
1683
+ 'newrelic.accept.roles' => array(
1684
+ 'type' => 'array',
1685
+ 'default' => array('contributor')
1686
+ ),
1687
+ 'newrelic.use_php_function' => array (
1688
+ 'type' => 'boolean',
1689
+ 'default' => false,
1690
+ ),
1691
+ 'notes.new_relic_page_load_notification' => array(
1692
+ 'type' => 'boolean',
1693
+ 'default' => true
1694
+ ),
1695
+ 'newrelic.appname_prefix' => array (
1696
+ 'type' => 'string',
1697
+ 'default' => 'Child Site - '
1698
+ ),
1699
+ 'newrelic.merge_with_network' => array (
1700
+ 'type' => 'boolean',
1701
+ 'default' => true
1702
+ ),
1703
+ 'newrelic.cache_time' => array(
1704
+ 'type' => 'integer',
1705
+ 'default' => 5
1706
+ ),
1707
+ 'newrelic.enable_xmit' => array(
1708
+ 'type' => 'boolean',
1709
+ 'default' => false
1710
+ ),
1711
+ 'newrelic.use_network_wide_id' => array(
1712
+ 'type' => 'boolean',
1713
+ 'default' => false,
1714
+ 'master_only' => 'true'
1715
+ )
1716
+ );
1717
+
1718
+
1719
+ /*
1720
+ * Descriptors of configuration keys
1721
+ * for admin config
1722
+ */
1723
+ $keys_admin = array(
1724
+ 'browsercache.configuration_sealed' => array(
1725
+ 'type' => 'boolean',
1726
+ 'default' => false,
1727
+ 'master_only' => 'true'
1728
+ ),
1729
+ 'cdn.configuration_sealed' => array(
1730
+ 'type' => 'boolean',
1731
+ 'default' => false,
1732
+ 'master_only' => 'true'
1733
+ ),
1734
+ 'cloudflare.configuration_sealed' => array(
1735
+ 'type' => 'boolean',
1736
+ 'default' => false,
1737
+ 'master_only' => 'true'
1738
+ ),
1739
+ 'common.install' => array(
1740
+ 'type' => 'integer',
1741
+ 'default' => 0,
1742
+ 'master_only' => 'true'
1743
+ ),
1744
+ 'common.visible_by_master_only' => array(
1745
+ 'type' => 'boolean',
1746
+ 'default' => true,
1747
+ 'master_only' => 'true'
1748
+ ),
1749
+ 'dbcache.configuration_sealed' => array(
1750
+ 'type' => 'boolean',
1751
+ 'default' => false,
1752
+ 'master_only' => 'true'
1753
+ ),
1754
+ 'minify.configuration_sealed' => array(
1755
+ 'type' => 'boolean',
1756
+ 'default' => false,
1757
+ 'master_only' => 'true'
1758
+ ),
1759
+ 'objectcache.configuration_sealed' => array(
1760
+ 'type' => 'boolean',
1761
+ 'default' => false,
1762
+ 'master_only' => 'true'
1763
+ ),
1764
+ 'pgcache.configuration_sealed' => array(
1765
+ 'type' => 'boolean',
1766
+ 'default' => false,
1767
+ 'master_only' => 'true'
1768
+ ),
1769
+ 'previewmode.enabled' => array(
1770
+ 'type' => 'boolean',
1771
+ 'default' => false,
1772
+ 'master_only' => 'true'
1773
+ ),
1774
+ 'varnish.configuration_sealed' => array(
1775
+ 'type' => 'boolean',
1776
+ 'default' => false,
1777
+ 'master_only' => 'true'
1778
+ ),
1779
+ 'fragmentcache.configuration_sealed' => array(
1780
+ 'type' => 'boolean',
1781
+ 'default' => false,
1782
+ 'master_only' => 'true'
1783
+ )
1784
+ ,'newrelic.configuration_sealed' => array(
1785
+ 'type' => 'boolean',
1786
+ 'default' => false,
1787
+ 'master_only' => 'true'
1788
+ )
1789
+ ,'notes.minify_error' => array(
1790
+ 'type' => 'boolean',
1791
+ 'default' => false
1792
+ )
1793
+ ,'minify.error.last' => array(
1794
+ 'type' => 'string',
1795
+ 'default' => ''
1796
+ ),
1797
+ 'minify.error.notification' => array(
1798
+ 'type' => 'string',
1799
+ 'default' => ''
1800
+ ),
1801
+ 'minify.error.notification.last' => array(
1802
+ 'type' => 'integer',
1803
+ 'default' => 0
1804
+ ),
1805
+ 'minify.error.file' => array(
1806
+ 'type' => 'string',
1807
+ 'default' => ''
1808
+ ),
1809
+ 'notes.remove_w3tc' => array(
1810
+ 'type' => 'boolean',
1811
+ 'default' => false
1812
+ )
1813
+ );
1814
+
1815
+ $keys_admin['common.install']['default'] = time();
1816
+
1817
+
1818
+
1819
+ /*
1820
+ * Descriptors how sealed configuration keys affect overriding
1821
+ */
1822
+ $sealing_keys_scope = array(
1823
+ array(
1824
+ 'key' => 'browsercache.configuration_sealed',
1825
+ 'prefix' => 'browsercache.'
1826
+ ),
1827
+ array(
1828
+ 'key' => 'cdn.configuration_sealed',
1829
+ 'prefix' => 'cdn.'
1830
+ ),
1831
+ array(
1832
+ 'key' => 'cloudflare.configuration_sealed',
1833
+ 'prefix' => 'cloudflare.'
1834
+ ),
1835
+ array(
1836
+ 'key' => 'dbcache.configuration_sealed',
1837
+ 'prefix' => 'dbcache.'
1838
+ ),
1839
+ array(
1840
+ 'key' => 'minify.configuration_sealed',
1841
+ 'prefix' => 'minify.'
1842
+ ),
1843
+ array(
1844
+ 'key' => 'objectcache.configuration_sealed',
1845
+ 'prefix' => 'objectcache.'
1846
+ ),
1847
+ array(
1848
+ 'key' => 'fragmentcache.configuration_sealed',
1849
+ 'prefix' => 'fragmentcache.'
1850
+ ),
1851
+ array(
1852
+ 'key' => 'pgcache.configuration_sealed',
1853
+ 'prefix' => 'pgcache.'
1854
+ ),
1855
+ array(
1856
+ 'key' => 'varnish.configuration_sealed',
1857
+ 'prefix' => 'varnish.'
1858
+ )
1859
+ );
1860
+
configs/0.9.3-ConfigKeys.php ADDED
@@ -0,0 +1,1983 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Descriptors of configuration keys
5
+ * for config
6
+ */
7
+
8
+ $keys = array(
9
+ 'cluster.messagebus.debug' => array(
10
+ 'type' => 'boolean',
11
+ 'default' => false
12
+ ),
13
+ 'cluster.messagebus.enabled' => array(
14
+ 'type' => 'boolean',
15
+ 'default' => false
16
+ ),
17
+ 'cluster.messagebus.sns.region' => array(
18
+ 'type' => 'string',
19
+ 'default' => ''
20
+ ),
21
+ 'cluster.messagebus.sns.api_key' => array(
22
+ 'type' => 'string',
23
+ 'default' => ''
24
+ ),
25
+ 'cluster.messagebus.sns.api_secret' => array(
26
+ 'type' => 'string',
27
+ 'default' => ''
28
+ ),
29
+ 'cluster.messagebus.sns.topic_arn' => array(
30
+ 'type' => 'string',
31
+ 'default' => ''
32
+ ),
33
+
34
+ 'dbcache.debug' => array(
35
+ 'type' => 'boolean',
36
+ 'default' => false
37
+ ),
38
+ 'dbcache.enabled' => array(
39
+ 'type' => 'boolean',
40
+ 'default' => false
41
+ ),
42
+ 'dbcache.engine' => array(
43
+ 'type' => 'string',
44
+ 'default' => 'file'
45
+ ),
46
+ 'dbcache.file.gc' => array(
47
+ 'type' => 'integer',
48
+ 'default' => 3600
49
+ ),
50
+ 'dbcache.file.locking' => array(
51
+ 'type' => 'boolean',
52
+ 'default' => false
53
+ ),
54
+ 'dbcache.lifetime' => array(
55
+ 'type' => 'integer',
56
+ 'default' => 180
57
+ ),
58
+ 'dbcache.memcached.persistant' => array(
59
+ 'type' => 'boolean',
60
+ 'default' => true
61
+ ),
62
+ 'dbcache.memcached.servers' => array(
63
+ 'type' => 'array',
64
+ 'default' => array(
65
+ '127.0.0.1:11211'
66
+ )
67
+ ),
68
+ 'dbcache.reject.cookie' => array(
69
+ 'type' => 'array',
70
+ 'default' => array()
71
+ ),
72
+ 'dbcache.reject.logged' => array(
73
+ 'type' => 'boolean',
74
+ 'default' => true
75
+ ),
76
+ 'dbcache.reject.sql' => array(
77
+ 'type' => 'array',
78
+ 'default' => array(
79
+ 'gdsr_',
80
+ 'wp_rg_'
81
+ )
82
+ ),
83
+ 'dbcache.reject.uri' => array(
84
+ 'type' => 'array',
85
+ 'default' => array()
86
+ ),
87
+ 'dbcache.reject.words' => array(
88
+ 'type' => 'array',
89
+ 'default' => array(
90
+ '^\s*insert\b',
91
+ '^\s*delete\b',
92
+ '^\s*update\b',
93
+ '^\s*replace\b',
94
+ '^\s*create\b',
95
+ '^\s*alter\b',
96
+ '^\s*show\b',
97
+ '^\s*set\b',
98
+ '\bautoload\s+=\s+\'yes\'',
99
+ '\bsql_calc_found_rows\b',
100
+ '\bfound_rows\(\)',
101
+ '\bw3tc_request_data\b'
102
+ )
103
+ ),
104
+
105
+ 'objectcache.enabled' => array(
106
+ 'type' => 'boolean',
107
+ 'default' => false
108
+ ),
109
+ 'objectcache.debug' => array(
110
+ 'type' => 'boolean',
111
+ 'default' => false
112
+ ),
113
+ 'objectcache.engine' => array(
114
+ 'type' => 'string',
115
+ 'default' => 'file'
116
+ ),
117
+ 'objectcache.file.gc' => array(
118
+ 'type' => 'integer',
119
+ 'default' => 3600
120
+ ),
121
+ 'objectcache.file.locking' => array(
122
+ 'type' => 'boolean',
123
+ 'default' => false
124
+ ),
125
+ 'objectcache.memcached.servers' => array(
126
+ 'type' => 'array',
127
+ 'default' => array(
128
+ '127.0.0.1:11211'
129
+ )
130
+ ),
131
+ 'objectcache.memcached.persistant' => array(
132
+ 'type' => 'boolean',
133
+ 'default' => true
134
+ ),
135
+ 'objectcache.groups.global' => array(
136
+ 'type' => 'array',
137
+ 'default' => array(
138
+ 'users',
139
+ 'userlogins',
140
+ 'usermeta',
141
+ 'user_meta',
142
+ 'site-transient',
143
+ 'site-options',
144
+ 'site-lookup',
145
+ 'blog-lookup',
146
+ 'blog-details',
147
+ 'rss',
148
+ 'global-posts'
149
+ )
150
+ ),
151
+ 'objectcache.groups.nonpersistent' => array(
152
+ 'type' => 'array',
153
+ 'default' => array(
154
+ 'comment',
155
+ 'counts',
156
+ 'plugins'
157
+ )
158
+ ),
159
+ 'objectcache.lifetime' => array(
160
+ 'type' => 'integer',
161
+ 'default' => 180
162
+ ),
163
+ 'objectcache.purge.all' => array(
164
+ 'type' => 'boolean',
165
+ 'default' => false
166
+ ),
167
+
168
+ 'fragmentcache.enabled' => array(
169
+ 'type' => 'boolean',
170
+ 'default' => false
171
+ ),
172
+ 'fragmentcache.debug' => array(
173
+ 'type' => 'boolean',
174
+ 'default' => false
175
+ ),
176
+ 'fragmentcache.engine' => array(
177
+ 'type' => 'string',
178
+ 'default' => 'file'
179
+ ),
180
+ 'fragmentcache.file.gc' => array(
181
+ 'type' => 'integer',
182
+ 'default' => 3600
183
+ ),
184
+ 'fragmentcache.file.locking' => array(
185
+ 'type' => 'boolean',
186
+ 'default' => false
187
+ ),
188
+ 'fragmentcache.memcached.servers' => array(
189
+ 'type' => 'array',
190
+ 'default' => array(
191
+ '127.0.0.1:11211'
192
+ )
193
+ ),
194
+ 'fragmentcache.memcached.persistant' => array(
195
+ 'type' => 'boolean',
196
+ 'default' => true
197
+ ),
198
+ 'fragmentcache.lifetime' => array(
199
+ 'type' => 'integer',
200
+ 'default' => 180
201
+ ),
202
+ 'fragmentcache.groups' => array(
203
+ 'type' => 'array',
204
+ 'default' => array()
205
+ ),
206
+
207
+ 'pgcache.enabled' => array(
208
+ 'type' => 'boolean',
209
+ 'default' => false
210
+ ),
211
+ 'pgcache.comment_cookie_ttl' => array(
212
+ 'type' => 'integer',
213
+ 'default' => 1800
214
+ ),
215
+ 'pgcache.debug' => array(
216
+ 'type' => 'boolean',
217
+ 'default' => false
218
+ ),
219
+ 'pgcache.engine' => array(
220
+ 'type' => 'string',
221
+ 'default' => 'file_generic'
222
+ ),
223
+ 'pgcache.file.gc' => array(
224
+ 'type' => 'integer',
225
+ 'default' => 3600
226
+ ),
227
+ 'pgcache.file.nfs' => array(
228
+ 'type' => 'boolean',
229
+ 'default' => false
230
+ ),
231
+ 'pgcache.file.locking' => array(
232
+ 'type' => 'boolean',
233
+ 'default' => false
234
+ ),
235
+ 'pgcache.lifetime' => array(
236
+ 'type' => 'integer',
237
+ 'default' => 3600
238
+ ),
239
+ 'pgcache.memcached.servers' => array(
240
+ 'type' => 'array',
241
+ 'default' => array(
242
+ '127.0.0.1:11211'
243
+ )
244
+ ),
245
+ 'pgcache.memcached.persistant' => array(
246
+ 'type' => 'boolean',
247
+ 'default' => true
248
+ ),
249
+ 'pgcache.check.domain' => array(
250
+ 'type' => 'boolean',
251
+ 'default' => false
252
+ ),
253
+ 'pgcache.cache.query' => array(
254
+ 'type' => 'boolean',
255
+ 'default' => true
256
+ ),
257
+ 'pgcache.cache.home' => array(
258
+ 'type' => 'boolean',
259
+ 'default' => true
260
+ ),
261
+ 'pgcache.cache.feed' => array(
262
+ 'type' => 'boolean',
263
+ 'default' => false
264
+ ),
265
+ 'pgcache.cache.nginx_handle_xml' => array(
266
+ 'type' => 'boolean',
267
+ 'default' => false
268
+ ),
269
+ 'pgcache.cache.ssl' => array(
270
+ 'type' => 'boolean',
271
+ 'default' => false
272
+ ),
273
+ 'pgcache.cache.404' => array(
274
+ 'type' => 'boolean',
275
+ 'default' => false
276
+ ),
277
+ 'pgcache.cache.flush' => array(
278
+ 'type' => 'boolean',
279
+ 'default' => false
280
+ ),
281
+ 'pgcache.cache.headers' => array(
282
+ 'type' => 'array',
283
+ 'default' => array(
284
+ 'Last-Modified',
285
+ 'Content-Type',
286
+ 'X-Pingback',
287
+ 'P3P'
288
+ )
289
+ ),
290
+ 'pgcache.compatibility' => array(
291
+ 'type' => 'boolean',
292
+ 'default' => false
293
+ ),
294
+ 'pgcache.remove_charset' => array(
295
+ 'type' => 'boolean',
296
+ 'default' => false
297
+ ),
298
+ 'pgcache.accept.uri' => array(
299
+ 'type' => 'array',
300
+ 'default' => array(
301
+ 'sitemap(_index)?\.xml(\.gz)?',
302
+ '[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?'
303
+ )
304
+ ),
305
+ 'pgcache.accept.files' => array(
306
+ 'type' => 'array',
307
+ 'default' => array(
308
+ 'wp-comments-popup.php',
309
+ 'wp-links-opml.php',
310
+ 'wp-locations.php'
311
+ )
312
+ ),
313
+ 'pgcache.accept.qs' => array(
314
+ 'type' => 'array',
315
+ 'default' => array()
316
+ ),
317
+ 'pgcache.reject.front_page' => array(
318
+ 'type' => 'boolean',
319
+ 'default' => false
320
+ ),
321
+ 'pgcache.reject.logged' => array(
322
+ 'type' => 'boolean',
323
+ 'default' => true
324
+ ),
325
+ 'pgcache.reject.logged_roles' => array(
326
+ 'type' => 'boolean',
327
+ 'default' => false
328
+ ),
329
+ 'pgcache.reject.roles' => array(
330
+ 'type' => 'array',
331
+ 'default' => array()
332
+ ),
333
+ 'pgcache.reject.uri' => array(
334
+ 'type' => 'array',
335
+ 'default' => array(
336
+ 'wp-.*\.php',
337
+ 'index\.php'
338
+ )
339
+ ),
340
+ 'pgcache.reject.ua' => array(
341
+ 'type' => 'array',
342
+ 'default' => array()
343
+ ),
344
+ 'pgcache.reject.cookie' => array(
345
+ 'type' => 'array',
346
+ 'default' => array('wptouch_switch_toggle')
347
+ ),
348
+ 'pgcache.reject.request_head' => array(
349
+ 'type' => 'boolean',
350
+ 'default' => false
351
+ ),
352
+ 'pgcache.purge.front_page' => array(
353
+ 'type' => 'boolean',
354
+ 'default' => false
355
+ ),
356
+ 'pgcache.purge.home' => array(
357
+ 'type' => 'boolean',
358
+ 'default' => true
359
+ ),
360
+ 'pgcache.purge.post' => array(
361
+ 'type' => 'boolean',
362
+ 'default' => true
363
+ ),
364
+ 'pgcache.purge.comments' => array(
365
+ 'type' => 'boolean',
366
+ 'default' => false
367
+ ),
368
+ 'pgcache.purge.author' => array(
369
+ 'type' => 'boolean',
370
+ 'default' => false
371
+ ),
372
+ 'pgcache.purge.terms' => array(
373
+ 'type' => 'boolean',
374
+ 'default' => false
375
+ ),
376
+ 'pgcache.purge.archive.daily' => array(
377
+ 'type' => 'boolean',
378
+ 'default' => false
379
+ ),
380
+ 'pgcache.purge.archive.monthly' => array(
381
+ 'type' => 'boolean',
382
+ 'default' => false
383
+ ),
384
+ 'pgcache.purge.archive.yearly' => array(
385
+ 'type' => 'boolean',
386
+ 'default' => false
387
+ ),
388
+ 'pgcache.purge.feed.blog' => array(
389
+ 'type' => 'boolean',
390
+ 'default' => true
391
+ ),
392
+ 'pgcache.purge.feed.comments' => array(
393
+ 'type' => 'boolean',
394
+ 'default' => false
395
+ ),
396
+ 'pgcache.purge.feed.author' => array(
397
+ 'type' => 'boolean',
398
+ 'default' => false
399
+ ),
400
+ 'pgcache.purge.feed.terms' => array(
401
+ 'type' => 'boolean',
402
+ 'default' => false
403
+ ),
404
+ 'pgcache.purge.feed.types' => array(
405
+ 'type' => 'array',
406
+ 'default' => array(
407
+ 'rss2'
408
+ )
409
+ ),
410
+ 'pgcache.purge.postpages_limit' => array(
411
+ 'type' => 'integer',
412
+ 'default' => 10
413
+ ),
414
+ 'pgcache.purge.pages' => array(
415
+ 'type' => 'array',
416
+ 'default' => array()
417
+ ),
418
+ 'pgcache.purge.sitemap_regex' => array(
419
+ 'type' => 'string',
420
+ 'default' => '([a-z0-9_\-]*?)sitemap([a-z0-9_\-]*)?\.xml'
421
+ ),
422
+ 'pgcache.prime.enabled' => array(
423
+ 'type' => 'boolean',
424
+ 'default' => false
425
+ ),
426
+ 'pgcache.prime.interval' => array(
427
+ 'type' => 'integer',
428
+ 'default' => 900
429
+ ),
430
+ 'pgcache.prime.limit' => array(
431
+ 'type' => 'integer',
432
+ 'default' => 10
433
+ ),
434
+ 'pgcache.prime.sitemap' => array(
435
+ 'type' => 'string',
436
+ 'default' => ''
437
+ ),
438
+ 'pgcache.prime.post.enabled' => array(
439
+ 'type' => 'boolean',
440
+ 'default' => false
441
+ ),
442
+
443
+ 'minify.enabled' => array(
444
+ 'type' => 'boolean',
445
+ 'default' => false
446
+ ),
447
+ 'minify.auto' => array(
448
+ 'type' => 'boolean',
449
+ 'default' => true
450
+ ),
451
+ 'minify.debug' => array(
452
+ 'type' => 'boolean',
453
+ 'default' => false
454
+ ),
455
+ 'minify.engine' => array(
456
+ 'type' => 'string',
457
+ 'default' => 'file'
458
+ ),
459
+ 'minify.file.gc' => array(
460
+ 'type' => 'integer',
461
+ 'default' => 86400
462
+ ),
463
+ 'minify.file.nfs' => array(
464
+ 'type' => 'boolean',
465
+ 'default' => false
466
+ ),
467
+ 'minify.file.locking' => array(
468
+ 'type' => 'boolean',
469
+ 'default' => false
470
+ ),
471
+ 'minify.memcached.servers' => array(
472
+ 'type' => 'array',
473
+ 'default' => array(
474
+ '127.0.0.1:11211'
475
+ )
476
+ ),
477
+ 'minify.memcached.persistant' => array(
478
+ 'type' => 'boolean',
479
+ 'default' => true
480
+ ),
481
+ 'minify.rewrite' => array(
482
+ 'type' => 'boolean',
483
+ 'default' => true
484
+ ),
485
+ 'minify.options' => array(
486
+ 'type' => 'array',
487
+ 'default' => array()
488
+ ),
489
+ 'minify.symlinks' => array(
490
+ 'type' => 'array',
491
+ 'default' => array()
492
+ ),
493
+ 'minify.lifetime' => array(
494
+ 'type' => 'integer',
495
+ 'default' => 86400
496
+ ),
497
+ 'minify.upload' => array(
498
+ 'type' => 'boolean',
499
+ 'default' => true
500
+ ),
501
+ 'minify.html.enable' => array(
502
+ 'type' => 'boolean',
503
+ 'default' => false
504
+ ),
505
+ 'minify.html.engine' => array(
506
+ 'type' => 'string',
507
+ 'default' => 'html'
508
+ ),
509
+ 'minify.html.reject.feed' => array(
510
+ 'type' => 'boolean',
511
+ 'default' => false
512
+ ),
513
+ 'minify.html.inline.css' => array(
514
+ 'type' => 'boolean',
515
+ 'default' => false
516
+ ),
517
+ 'minify.html.inline.js' => array(
518
+ 'type' => 'boolean',
519
+ 'default' => false
520
+ ),
521
+ 'minify.html.strip.crlf' => array(
522
+ 'type' => 'boolean',
523
+ 'default' => false
524
+ ),
525
+ 'minify.html.comments.ignore' => array(
526
+ 'type' => 'array',
527
+ 'default' => array(
528
+ 'google_ad_',
529
+ 'RSPEAK_'
530
+ )
531
+ ),
532
+ 'minify.css.enable' => array(
533
+ 'type' => 'boolean',
534
+ 'default' => true
535
+ ),
536
+ 'minify.css.engine' => array(
537
+ 'type' => 'string',
538
+ 'default' => 'css'
539
+ ),
540
+ 'minify.css.combine' => array(
541
+ 'type' => 'boolean',
542
+ 'default' => false
543
+ ),
544
+ 'minify.css.strip.comments' => array(
545
+ 'type' => 'boolean',
546
+ 'default' => false
547
+ ),
548
+ 'minify.css.strip.crlf' => array(
549
+ 'type' => 'boolean',
550
+ 'default' => false
551
+ ),
552
+ 'minify.css.imports' => array(
553
+ 'type' => 'string',
554
+ 'default' => ''
555
+ ),
556
+ 'minify.css.groups' => array(
557
+ 'type' => 'array',
558
+ 'default' => array()
559
+ ),
560
+ 'minify.js.enable' => array(
561
+ 'type' => 'boolean',
562
+ 'default' => true
563
+ ),
564
+ 'minify.js.engine' => array(
565
+ 'type' => 'string',
566
+ 'default' => 'js'
567
+ ),
568
+ 'minify.js.combine.header' => array(
569
+ 'type' => 'boolean',
570
+ 'default' => false
571
+ ),
572
+ 'minify.js.header.embed_type' => array(
573
+ 'type' => 'string',
574
+ 'default' => 'blocking'
575
+ ),
576
+ 'minify.js.combine.body' => array(
577
+ 'type' => 'boolean',
578
+ 'default' => false
579
+ ),
580
+ 'minify.js.body.embed_type' => array(
581
+ 'type' => 'string',
582
+ 'default' => 'blocking'
583
+ ),
584
+ 'minify.js.combine.footer' => array(
585
+ 'type' => 'boolean',
586
+ 'default' => false
587
+ ),
588
+ 'minify.js.footer.embed_type' => array(
589
+ 'type' => 'string',
590
+ 'default' => 'blocking'
591
+ ),
592
+ 'minify.js.strip.comments' => array(
593
+ 'type' => 'boolean',
594
+ 'default' => false
595
+ ),
596
+ 'minify.js.strip.crlf' => array(
597
+ 'type' => 'boolean',
598
+ 'default' => false
599
+ ),
600
+ 'minify.js.groups' => array(
601
+ 'type' => 'array',
602
+ 'default' => array()
603
+ ),
604
+ 'minify.yuijs.path.java' => array(
605
+ 'type' => 'string',
606
+ 'default' => 'java'
607
+ ),
608
+ 'minify.yuijs.path.jar' => array(
609
+ 'type' => 'string',
610
+ 'default' => 'yuicompressor.jar'
611
+ ),
612
+ 'minify.yuijs.options.line-break' => array(
613
+ 'type' => 'integer',
614
+ 'default' => 5000
615
+ ),
616
+ 'minify.yuijs.options.nomunge' => array(
617
+ 'type' => 'boolean',
618
+ 'default' => false
619
+ ),
620
+ 'minify.yuijs.options.preserve-semi' => array(
621
+ 'type' => 'boolean',
622
+ 'default' => false
623
+ ),
624
+ 'minify.yuijs.options.disable-optimizations' => array(
625
+ 'type' => 'boolean',
626
+ 'default' => false
627
+ ),
628
+ 'minify.yuicss.path.java' => array(
629
+ 'type' => 'string',
630
+ 'default' => 'java'
631
+ ),
632
+ 'minify.yuicss.path.jar' => array(
633
+ 'type' => 'string',
634
+ 'default' => 'yuicompressor.jar'
635
+ ),
636
+ 'minify.yuicss.options.line-break' => array(
637
+ 'type' => 'integer',
638
+ 'default' => 5000
639
+ ),
640
+ 'minify.ccjs.path.java' => array(
641
+ 'type' => 'string',
642
+ 'default' => 'java'
643
+ ),
644
+ 'minify.ccjs.path.jar' => array(
645
+ 'type' => 'string',
646
+ 'default' => 'compiler.jar'
647
+ ),
648
+ 'minify.ccjs.options.compilation_level' => array(
649
+ 'type' => 'string',
650
+ 'default' => 'SIMPLE_OPTIMIZATIONS'
651
+ ),
652
+ 'minify.ccjs.options.formatting' => array(
653
+ 'type' => 'string',
654
+ 'default' => ''
655
+ ),
656
+ 'minify.csstidy.options.remove_bslash' => array(
657
+ 'type' => 'boolean',
658
+ 'default' => true
659
+ ),
660
+ 'minify.csstidy.options.compress_colors' => array(
661
+ 'type' => 'boolean',
662
+ 'default' => true
663
+ ),
664
+ 'minify.csstidy.options.compress_font-weight' => array(
665
+ 'type' => 'boolean',
666
+ 'default' => true
667
+ ),
668
+ 'minify.csstidy.options.lowercase_s' => array(
669
+ 'type' => 'boolean',
670
+ 'default' => false
671
+ ),
672
+ 'minify.csstidy.options.optimise_shorthands' => array(
673
+ 'type' => 'integer',
674
+ 'default' => 1
675
+ ),
676
+ 'minify.csstidy.options.remove_last_;' => array(
677
+ 'type' => 'boolean',
678
+ 'default' => false
679
+ ),
680
+ 'minify.csstidy.options.case_properties' => array(
681
+ 'type' => 'integer',
682
+ 'default' => 1
683
+ ),
684
+ 'minify.csstidy.options.sort_properties' => array(
685
+ 'type' => 'boolean',
686
+ 'default' => false
687
+ ),
688
+ 'minify.csstidy.options.sort_selectors' => array(
689
+ 'type' => 'boolean',
690
+ 'default' => false
691
+ ),
692
+ 'minify.csstidy.options.merge_selectors' => array(
693
+ 'type' => 'integer',
694
+ 'default' => 2
695
+ ),
696
+ 'minify.csstidy.options.discard_invalid_properties' => array(
697
+ 'type' => 'boolean',
698
+ 'default' => false
699
+ ),
700
+ 'minify.csstidy.options.css_level' => array(
701
+ 'type' => 'string',
702
+ 'default' => 'CSS2.1'
703
+ ),
704
+ 'minify.csstidy.options.preserve_css' => array(
705
+ 'type' => 'boolean',
706
+ 'default' => false
707
+ ),
708
+ 'minify.csstidy.options.timestamp' => array(
709
+ 'type' => 'boolean',
710
+ 'default' => false
711
+ ),
712
+ 'minify.csstidy.options.template' => array(
713
+ 'type' => 'string',
714
+ 'default' => 'default'
715
+ ),
716
+ 'minify.htmltidy.options.clean' => array(
717
+ 'type' => 'boolean',
718
+ 'default' => false
719
+ ),
720
+ 'minify.htmltidy.options.hide-comments' => array(
721
+ 'type' => 'boolean',
722
+ 'default' => true
723
+ ),
724
+ 'minify.htmltidy.options.wrap' => array(
725
+ 'type' => 'integer',
726
+ 'default' => 0
727
+ ),
728
+ 'minify.reject.logged' => array(
729
+ 'type' => 'boolean',
730
+ 'default' => false
731
+ ),
732
+ 'minify.reject.ua' => array(
733
+ 'type' => 'array',
734
+ 'default' => array()
735
+ ),
736
+ 'minify.reject.uri' => array(
737
+ 'type' => 'array',
738
+ 'default' => array()
739
+ ),
740
+ 'minify.reject.files.js' => array(
741
+ 'type' => 'array',
742
+ 'default' => array()
743
+ ),
744
+ 'minify.reject.files.css' => array(
745
+ 'type' => 'array',
746
+ 'default' => array()
747
+ ),
748
+ 'minify.cache.files' => array(
749
+ 'type' => 'array',
750
+ 'default' => array('https://ajax.googleapis.com')
751
+ ),
752
+
753
+ 'cdn.enabled' => array(
754
+ 'type' => 'boolean',
755
+ 'default' => false
756
+ ),
757
+ 'cdn.debug' => array(
758
+ 'type' => 'boolean',
759
+ 'default' => false
760
+ ),
761
+ 'cdn.engine' => array(
762
+ 'type' => 'string',
763
+ 'default' => 'maxcdn'
764
+ ),
765
+ 'cdn.uploads.enable' => array(
766
+ 'type' => 'boolean',
767
+ 'default' => true
768
+ ),
769
+ 'cdn.includes.enable' => array(
770
+ 'type' => 'boolean',
771
+ 'default' => true
772
+ ),
773
+ 'cdn.includes.files' => array(
774
+ 'type' => 'string',
775
+ 'default' => '*.css;*.js;*.gif;*.png;*.jpg;*.xml'
776
+ ),
777
+ 'cdn.theme.enable' => array(
778
+ 'type' => 'boolean',
779
+ 'default' => true
780
+ ),
781
+ 'cdn.theme.files' => array(
782
+ 'type' => 'string',
783
+ 'default' => '*.css;*.js;*.gif;*.png;*.jpg;*.ico;*.ttf;*.otf,*.woff'
784
+ ),
785
+ 'cdn.minify.enable' => array(
786
+ 'type' => 'boolean',
787
+ 'default' => true
788
+ ),
789
+ 'cdn.custom.enable' => array(
790
+ 'type' => 'boolean',
791
+ 'default' => true
792
+ ),
793
+ 'cdn.custom.files' => array(
794
+ 'type' => 'array',
795
+ 'default' => array(
796
+ 'favicon.ico',
797
+ '{wp_content_dir}/gallery/*',
798
+ '{wp_content_dir}/uploads/avatars/*',
799
+ '{plugins_dir}/wordpress-seo/css/xml-sitemap.xsl',
800
+ '{plugins_dir}/wp-minify/min*',
801
+ '{plugins_dir}/*.js',
802
+ '{plugins_dir}/*.css',
803
+ '{plugins_dir}/*.gif',
804
+ '{plugins_dir}/*.jpg',
805
+ '{plugins_dir}/*.png',
806
+ )
807
+ ),
808
+ 'cdn.import.external' => array(
809
+ 'type' => 'boolean',
810
+ 'default' => false
811
+ ),
812
+ 'cdn.import.files' => array(
813
+ 'type' => 'string',
814
+ 'default' => false
815
+ ),
816
+ 'cdn.queue.interval' => array(
817
+ 'type' => 'integer',
818
+ 'default' => 900
819
+ ),
820
+ 'cdn.queue.limit' => array(
821
+ 'type' => 'integer',
822
+ 'default' => 25
823
+ ),
824
+ 'cdn.force.rewrite' => array(
825
+ 'type' => 'boolean',
826
+ 'default' => false
827
+ ),
828
+ 'cdn.autoupload.enabled' => array(
829
+ 'type' => 'boolean',
830
+ 'default' => false
831
+ ),
832
+ 'cdn.autoupload.interval' => array(
833
+ 'type' => 'integer',
834
+ 'default' => 3600
835
+ ),
836
+ 'cdn.canonical_header' => array(
837
+ 'type' => 'boolean',
838
+ 'default' => false
839
+ ),
840
+ 'cdn.ftp.host' => array(
841
+ 'type' => 'string',
842
+ 'default' => ''
843
+ ),
844
+ 'cdn.ftp.user' => array(
845
+ 'type' => 'string',
846
+ 'default' => ''
847
+ ),
848
+ 'cdn.ftp.pass' => array(
849
+ 'type' => 'string',
850
+ 'default' => ''
851
+ ),
852
+ 'cdn.ftp.path' => array(
853
+ 'type' => 'string',
854
+ 'default' => ''
855
+ ),
856
+ 'cdn.ftp.pasv' => array(
857
+ 'type' => 'boolean',
858
+ 'default' => false
859
+ ),
860
+ 'cdn.ftp.domain' => array(
861
+ 'type' => 'array',
862
+ 'default' => array()
863
+ ),
864
+ 'cdn.ftp.ssl' => array(
865
+ 'type' => 'string',
866
+ 'default' => 'auto'
867
+ ),
868
+ 'cdn.s3.key' => array(
869
+ 'type' => 'string',
870
+ 'default' => ''
871
+ ),
872
+ 'cdn.s3.secret' => array(
873
+ 'type' => 'string',
874
+ 'default' => ''
875
+ ),
876
+ 'cdn.s3.bucket' => array(
877
+ 'type' => 'string',
878
+ 'default' => ''
879
+ ),
880
+ 'cdn.s3.cname' => array(
881
+ 'type' => 'array',
882
+ 'default' => array()
883
+ ),
884
+ 'cdn.s3.ssl' => array(
885
+ 'type' => 'string',
886
+ 'default' => 'auto'
887
+ ),
888
+ 'cdn.cf.key' => array(
889
+ 'type' => 'string',
890
+ 'default' => ''
891
+ ),
892
+ 'cdn.cf.secret' => array(
893
+ 'type' => 'string',
894
+ 'default' => ''
895
+ ),
896
+ 'cdn.cf.bucket' => array(
897
+ 'type' => 'string',
898
+ 'default' => ''
899
+ ),
900
+ 'cdn.cf.id' => array(
901
+ 'type' => 'string',
902
+ 'default' => ''
903
+ ),
904
+ 'cdn.cf.cname' => array(
905
+ 'type' => 'array',
906
+ 'default' => array()
907
+ ),
908
+ 'cdn.cf.ssl' => array(
909
+ 'type' => 'string',
910
+ 'default' => 'auto'
911
+ ),
912
+ 'cdn.cf2.key' => array(
913
+ 'type' => 'string',
914
+ 'default' => ''
915
+ ),
916
+ 'cdn.cf2.secret' => array(
917
+ 'type' => 'string',
918
+ 'default' => ''
919
+ ),
920
+ 'cdn.cf2.id' => array(
921
+ 'type' => 'string',
922
+ 'default' => ''
923
+ ),
924
+ 'cdn.cf2.cname' => array(
925
+ 'type' => 'array',
926
+ 'default' => array()
927
+ ),
928
+ 'cdn.cf2.ssl' => array(
929
+ 'type' => 'string',
930
+ 'default' => ''
931
+ ),
932
+ 'cdn.rscf.user' => array(
933
+ 'type' => 'string',
934
+ 'default' => ''
935
+ ),
936
+ 'cdn.rscf.key' => array(
937
+ 'type' => 'string',
938
+ 'default' => ''
939
+ ),
940
+ 'cdn.rscf.location' => array(
941
+ 'type' => 'string',
942
+ 'default' => 'us'
943
+ ),
944
+ 'cdn.rscf.container' => array(
945
+ 'type' => 'string',
946
+ 'default' => ''
947
+ ),
948
+ 'cdn.rscf.cname' => array(
949
+ 'type' => 'array',
950
+ 'default' => array()
951
+ ),
952
+ 'cdn.rscf.ssl' => array(
953
+ 'type' => 'string',
954
+ 'default' => 'auto'
955
+ ),
956
+ 'cdn.azure.user' => array(
957
+ 'type' => 'string',
958
+ 'default' => ''
959
+ ),
960
+ 'cdn.azure.key' => array(
961
+ 'type' => 'string',
962
+ 'default' => ''
963
+ ),
964
+ 'cdn.azure.container' => array(
965
+ 'type' => 'string',
966
+ 'default' => ''
967
+ ),
968
+ 'cdn.azure.cname' => array(
969
+ 'type' => 'array',
970
+ 'default' => array()
971
+ ),
972
+ 'cdn.azure.ssl' => array(
973
+ 'type' => 'string',
974
+ 'default' => 'auto'
975
+ ),
976
+ 'cdn.mirror.domain' => array(
977
+ 'type' => 'array',
978
+ 'default' => array()
979
+ ),
980
+ 'cdn.mirror.ssl' => array(
981
+ 'type' => 'string',
982
+ 'default' => 'auto'
983
+ ),
984
+ 'cdn.netdna.alias' => array(
985
+ 'type' => 'string',
986
+ 'default' => ''
987
+ ),
988
+ 'cdn.netdna.consumerkey' => array(
989
+ 'type' => 'string',
990
+ 'default' => ''
991
+ ),
992
+ 'cdn.netdna.consumersecret' => array(
993
+ 'type' => 'string',
994
+ 'default' => ''
995
+ ),
996
+ 'cdn.netdna.authorization_key' => array(
997
+ 'type' => 'string',
998
+ 'default' => ''
999
+ ),
1000
+ 'cdn.netdna.domain' => array(
1001
+ 'type' => 'array',
1002
+ 'default' => array()
1003
+ ),
1004
+ 'cdn.netdna.ssl' => array(
1005
+ 'type' => 'string',
1006
+ 'default' => 'auto'
1007
+ ),
1008
+ 'cdn.netdna.zone_id' => array(
1009
+ 'type' => 'integer',
1010
+ 'default' => 0
1011
+ ),
1012
+ 'cdn.maxcdn.authorization_key' => array(
1013
+ 'type' => 'string',
1014
+ 'default' => ''
1015
+ ),
1016
+ 'cdn.maxcdn.domain' => array(
1017
+ 'type' => 'array',
1018
+ 'default' => array()
1019
+ ),
1020
+ 'cdn.maxcdn.ssl' => array(
1021
+ 'type' => 'string',
1022
+ 'default' => 'auto'
1023
+ ),
1024
+ 'cdn.maxcdn.zone_id' => array(
1025
+ 'type' => 'integer',
1026
+ 'default' => 0
1027
+ ),
1028
+ 'cdn.cotendo.username' => array(
1029
+ 'type' => 'string',
1030
+ 'default' => ''
1031
+ ),
1032
+ 'cdn.cotendo.password' => array(
1033
+ 'type' => 'string',
1034
+ 'default' => ''
1035
+ ),
1036
+ 'cdn.cotendo.zones' => array(
1037
+ 'type' => 'array',
1038
+ 'default' => array()
1039
+ ),
1040
+ 'cdn.cotendo.domain' => array(
1041
+ 'type' => 'array',
1042
+ 'default' => array()
1043
+ ),
1044
+ 'cdn.cotendo.ssl' => array(
1045
+ 'type' => 'string',
1046
+ 'default' => 'auto'
1047
+ ),
1048
+ 'cdn.akamai.username' => array(
1049
+ 'type' => 'string',
1050
+ 'default' => ''
1051
+ ),
1052
+ 'cdn.akamai.password' => array(
1053
+ 'type' => 'string',
1054
+ 'default' => ''
1055
+ ),
1056
+ 'cdn.akamai.email_notification' => array(
1057
+ 'type' => 'array',
1058
+ 'default' => array()
1059
+ ),
1060
+ 'cdn.akamai.action' => array(
1061
+ 'type' => 'string',
1062
+ 'default' => 'invalidate'
1063
+ ),
1064
+ 'cdn.akamai.zone' => array(
1065
+ 'type' => 'string',
1066
+ 'default' => 'production'
1067
+ ),
1068
+ 'cdn.akamai.domain' => array(
1069
+ 'type' => 'array',
1070
+ 'default' => array()
1071
+ ),
1072
+ 'cdn.akamai.ssl' => array(
1073
+ 'type' => 'string',
1074
+ 'default' => 'auto'
1075
+ ),
1076
+ 'cdn.edgecast.account' => array(
1077
+ 'type' => 'string',
1078
+ 'default' => ''
1079
+ ),
1080
+ 'cdn.edgecast.token' => array(
1081
+ 'type' => 'string',
1082
+ 'default' => ''
1083
+ ),
1084
+ 'cdn.edgecast.domain' => array(
1085
+ 'type' => 'array',
1086
+ 'default' => array()
1087
+ ),
1088
+ 'cdn.edgecast.ssl' => array(
1089
+ 'type' => 'string',
1090
+ 'default' => 'auto'
1091
+ ),
1092
+ 'cdn.att.account' => array(
1093
+ 'type' => 'string',
1094
+ 'default' => ''
1095
+ ),
1096
+ 'cdn.att.token' => array(
1097
+ 'type' => 'string',
1098
+ 'default' => ''
1099
+ ),
1100
+ 'cdn.att.domain' => array(
1101
+ 'type' => 'array',
1102
+ 'default' => array()
1103
+ ),
1104
+ 'cdn.att.ssl' => array(
1105
+ 'type' => 'string',
1106
+ 'default' => 'auto'
1107
+ ),
1108
+ 'cdn.reject.admins' => array(
1109
+ 'type' => 'boolean',
1110
+ 'default' => false
1111
+ ),
1112
+ 'cdn.reject.logged_roles' => array(
1113
+ 'type' => 'boolean',
1114
+ 'default' => false
1115
+ ),
1116
+ 'cdn.reject.roles' => array(
1117
+ 'type' => 'array',
1118
+ 'default' => array()
1119
+ ),
1120
+ 'cdn.reject.ua' => array(
1121
+ 'type' => 'array',
1122
+ 'default' => array()
1123
+ ),
1124
+ 'cdn.reject.uri' => array(
1125
+ 'type' => 'array',
1126
+ 'default' => array()
1127
+ ),
1128
+ 'cdn.reject.files' => array(
1129
+ 'type' => 'array',
1130
+ 'default' => array(
1131
+ '{uploads_dir}/wpcf7_captcha/*',
1132
+ '{uploads_dir}/imagerotator.swf',
1133
+ '{plugins_dir}/wp-fb-autoconnect/facebook-platform/channel.html'
1134
+ )
1135
+ ),
1136
+ 'cdn.reject.ssl' => array(
1137
+ 'type' => 'boolean',
1138
+ 'default' => false
1139
+ ),
1140
+ 'cdncache.enabled' => array(
1141
+ 'type' => 'boolean',
1142
+ 'default' => false
1143
+ ),
1144
+
1145
+
1146
+ 'cloudflare.enabled' => array(
1147
+ 'type' => 'boolean',
1148
+ 'default' => false
1149
+ ),
1150
+ 'cloudflare.email' => array(
1151
+ 'type' => 'string',
1152
+ 'default' => ''
1153
+ ),
1154
+ 'cloudflare.key' => array(
1155
+ 'type' => 'string',
1156
+ 'default' => ''
1157
+ ),
1158
+ 'cloudflare.zone' => array(
1159
+ 'type' => 'string',
1160
+ 'default' => ''
1161
+ ),
1162
+ 'cloudflare.ips.ip4' => array(
1163
+ 'type' => 'array',
1164
+ 'default' => array("204.93.240.0/24", "204.93.177.0/24", "199.27.128.0/21", "173.245.48.0/20", "103.22.200.0/22", "141.101.64.0/18", "108.162.192.0/18","190.93.240.1/20","188.114.96.0/20", "198.41.128.0/17")
1165
+ ),
1166
+ 'cloudflare.ips.ip6' => array(
1167
+ 'type' => 'array',
1168
+ 'default' => array("2400:cb00::/32", "2606:4700::/32", "2803:f800::/32")
1169
+ ),
1170
+
1171
+ 'varnish.enabled' => array(
1172
+ 'type' => 'boolean',
1173
+ 'default' => false
1174
+ ),
1175
+ 'varnish.debug' => array(
1176
+ 'type' => 'boolean',
1177
+ 'default' => false
1178
+ ),
1179
+ 'varnish.servers' => array(
1180
+ 'type' => 'array',
1181
+ 'default' => array()
1182
+ ),
1183
+
1184
+ 'browsercache.enabled' => array(
1185
+ 'type' => 'boolean',
1186
+ 'default' => true
1187
+ ),
1188
+ 'browsercache.no404wp' => array(
1189
+ 'type' => 'boolean',
1190
+ 'default' => false
1191
+ ),
1192
+ 'browsercache.no404wp.exceptions' => array(
1193
+ 'type' => 'array',
1194
+ 'default' => array(
1195
+ 'robots\.txt',
1196
+ 'sitemap(_index)?\.xml(\.gz)?',
1197
+ '[a-z0-9_\-]+-sitemap([0-9]+)?\.xml(\.gz)?'
1198
+ )
1199
+ ),
1200
+ 'browsercache.cssjs.last_modified' => array(
1201
+ 'type' => 'boolean',
1202
+ 'default' => true
1203
+ ),
1204
+ 'browsercache.cssjs.compression' => array(
1205
+ 'type' => 'boolean',
1206
+ 'default' => true
1207
+ ),
1208
+ 'browsercache.cssjs.expires' => array(
1209
+ 'type' => 'boolean',
1210
+ 'default' => false
1211
+ ),
1212
+ 'browsercache.cssjs.lifetime' => array(
1213
+ 'type' => 'integer',
1214
+ 'default' => 31536000
1215
+ ),
1216
+ 'browsercache.cssjs.nocookies' => array(
1217
+ 'type' => 'boolean',
1218
+ 'default' => false
1219
+ ),
1220
+ 'browsercache.cssjs.cache.control' => array(
1221
+ 'type' => 'boolean',
1222
+ 'default' => false
1223
+ ),
1224
+ 'browsercache.cssjs.cache.policy' => array(
1225
+ 'type' => 'string',
1226
+ 'default' => 'cache_public_maxage'
1227
+ ),
1228
+ 'browsercache.cssjs.etag' => array(
1229
+ 'type' => 'boolean',
1230
+ 'default' => false
1231
+ ),
1232
+ 'browsercache.cssjs.w3tc' => array(
1233
+ 'type' => 'boolean',
1234
+ 'default' => false
1235
+ ),
1236
+ 'browsercache.cssjs.replace' => array(
1237
+ 'type' => 'boolean',
1238
+ 'default' => false
1239
+ ),
1240
+ 'browsercache.html.compression' => array(
1241
+ 'type' => 'boolean',
1242
+ 'default' => true
1243
+ ),
1244
+ 'browsercache.html.last_modified' => array(
1245
+ 'type' => 'boolean',
1246
+ 'default' => true
1247
+ ),
1248
+ 'browsercache.html.expires' => array(
1249
+ 'type' => 'boolean',
1250
+ 'default' => false
1251
+ ),
1252
+ 'browsercache.html.lifetime' => array(
1253
+ 'type' => 'integer',
1254
+ 'default' => 3600
1255
+ ),
1256
+ 'browsercache.html.cache.control' => array(
1257
+ 'type' => 'boolean',
1258
+ 'default' => false
1259
+ ),
1260
+ 'browsercache.html.cache.policy' => array(
1261
+ 'type' => 'string',
1262
+ 'default' => 'cache_public_maxage'
1263
+ ),
1264
+ 'browsercache.html.etag' => array(
1265
+ 'type' => 'boolean',
1266
+ 'default' => false
1267
+ ),
1268
+ 'browsercache.html.w3tc' => array(
1269
+ 'type' => 'boolean',
1270
+ 'default' => false
1271
+ ),
1272
+ 'browsercache.html.replace' => array(
1273
+ 'type' => 'boolean',
1274
+ 'default' => false
1275
+ ),
1276
+ 'browsercache.other.last_modified' => array(
1277
+ 'type' => 'boolean',
1278
+ 'default' => true
1279
+ ),
1280
+ 'browsercache.other.compression' => array(
1281
+ 'type' => 'boolean',
1282
+ 'default' => true
1283
+ ),
1284
+ 'browsercache.other.expires' => array(
1285
+ 'type' => 'boolean',
1286
+ 'default' => false
1287
+ ),
1288
+ 'browsercache.other.lifetime' => array(
1289
+ 'type' => 'integer',
1290
+ 'default' => 31536000
1291
+ ),
1292
+ 'browsercache.other.nocookies' => array(
1293
+ 'type' => 'boolean',
1294
+ 'default' => false
1295
+ ),
1296
+ 'browsercache.other.cache.control' => array(
1297
+ 'type' => 'boolean',
1298
+ 'default' => false
1299
+ ),
1300
+ 'browsercache.other.cache.policy' => array(
1301
+ 'type' => 'string',
1302
+ 'default' => 'cache_public_maxage'
1303
+ ),
1304
+ 'browsercache.other.etag' => array(
1305
+ 'type' => 'boolean',
1306
+ 'default' => false
1307
+ ),
1308
+ 'browsercache.other.w3tc' => array(
1309
+ 'type' => 'boolean',
1310
+ 'default' => false
1311
+ ),
1312
+ 'browsercache.other.replace' => array(
1313
+ 'type' => 'boolean',
1314
+ 'default' => false
1315
+ ),
1316
+ 'browsercache.timestamp' => array(
1317
+ 'type' => 'string',
1318
+ 'default' => ''
1319
+ ),
1320
+ 'browsercache.replace.exceptions' => array (
1321
+ 'type' => 'array',
1322
+ 'default' => array()
1323
+ ),
1324
+
1325
+ 'mobile.enabled' => array(
1326
+ 'type' => 'boolean',
1327
+ 'default' => false
1328
+ ),
1329
+ 'mobile.rgroups' => array(
1330
+ 'type' => 'array',
1331
+ 'default' => array(
1332
+ 'high' => array(
1333
+ 'theme' => '',
1334
+ 'enabled' => false,
1335
+ 'redirect' => '',
1336
+ 'agents' => array(
1337
+ 'acer\ s100',
1338
+ 'android',
1339
+ 'archos5',
1340
+ 'bada',
1341
+ 'bb10',
1342
+ 'blackberry9500',
1343
+ 'blackberry9530',
1344
+ 'blackberry9550',
1345
+ 'blackberry\ 9800',
1346
+ 'cupcake',
1347
+ 'docomo\ ht\-03a',
1348
+ 'dream',
1349
+ 'froyo',
1350
+ 'googlebot-mobile',
1351
+ 'htc\ hero',
1352
+ 'htc\ magic',
1353
+ 'htc_dream',
1354
+ 'htc_magic',
1355
+ 'iemobile/7.0',
1356
+ 'incognito',
1357
+ 'ipad',
1358
+ 'iphone',
1359
+ 'ipod',
1360
+ 'kindle',
1361
+ 'lg\-gw620',
1362
+ 'liquid\ build',
1363
+ 'maemo',
1364
+ 'mot\-mb200',
1365
+ 'mot\-mb300',
1366
+ 'nexus\ one',
1367
+ 'nexus\ 7',
1368
+ 'opera\ mini',
1369
+ 's8000',
1370
+ 'samsung\-s8000',
1371
+ 'series60.*webkit',
1372
+ 'series60/5\.0',
1373
+ 'sonyericssone10',
1374
+ 'sonyericssonu20',
1375
+ 'sonyericssonx10',
1376
+ 't\-mobile\ mytouch\ 3g',
1377
+ 't\-mobile\ opal',
1378
+ 'tattoo',
1379
+ 'touch',
1380
+ 'webmate',
1381
+ 'webos'
1382
+ )
1383
+ ),
1384
+ 'low' => array(
1385
+ 'theme' => '',
1386
+ 'enabled' => false,
1387
+ 'redirect' => '',
1388
+ 'agents' => array(
1389
+ '2\.0\ mmp',
1390
+ '240x320',
1391
+ 'alcatel',
1392
+ 'amoi',
1393
+ 'asus',
1394
+ 'au\-mic',
1395
+ 'audiovox',
1396
+ 'avantgo',
1397
+ 'bb10',
1398
+ 'benq',
1399
+ 'bird',
1400
+ 'blackberry',
1401
+ 'blazer',
1402
+ 'cdm',
1403
+ 'cellphone',
1404
+ 'danger',
1405
+ 'ddipocket',
1406
+ 'docomo',
1407
+ 'dopod',
1408
+ 'elaine/3\.0',
1409
+ 'ericsson',
1410
+ 'eudoraweb',
1411
+ 'fly',
1412
+ 'haier',
1413
+ 'hiptop',
1414
+ 'hp\.ipaq',
1415
+ 'htc',
1416
+ 'huawei',
1417
+ 'i\-mobile',
1418
+ 'iemobile',
1419
+ 'iemobile/7',
1420
+ 'iemobile/9',
1421
+ 'j\-phone',
1422
+ 'kddi',
1423
+ 'konka',
1424
+ 'kwc',
1425
+ 'kyocera/wx310k',
1426
+ 'lenovo',
1427
+ 'lg',
1428
+ 'lg/u990',
1429
+ 'lge\ vx',
1430
+ 'midp',
1431
+ 'midp\-2\.0',
1432
+ 'mmef20',
1433
+ 'mmp',
1434
+ 'mobilephone',
1435
+ 'mot\-v',
1436
+ 'motorola',
1437
+ 'msie\ 10\.0',
1438
+ 'netfront',
1439
+ 'newgen',
1440
+ 'newt',
1441
+ 'nintendo\ ds',
1442
+ 'nintendo\ wii',
1443
+ 'nitro',
1444
+ 'nokia',
1445
+ 'novarra',
1446
+ 'o2',
1447
+ 'openweb',
1448
+ 'opera\ mobi',
1449
+ 'opera\.mobi',
1450
+ 'p160u',
1451
+ 'palm',
1452
+ 'panasonic',
1453
+ 'pantech',
1454
+ 'pdxgw',
1455
+ 'pg',
1456
+ 'philips',
1457
+ 'phone',
1458
+ 'playbook',
1459
+ 'playstation\ portable',
1460
+ 'portalmmm',
1461
+ '\bppc\b',
1462
+ 'proxinet',
1463
+ 'psp',
1464
+ 'qtek',
1465
+ 'sagem',
1466
+ 'samsung',
1467
+ 'sanyo',
1468
+ 'sch',
1469
+ 'sch\-i800',
1470
+ 'sec',
1471
+ 'sendo',
1472
+ 'sgh',
1473
+ 'sharp',
1474
+ 'sharp\-tq\-gx10',
1475
+ 'small',
1476
+ 'smartphone',
1477
+ 'softbank',
1478
+ 'sonyericsson',
1479
+ 'sph',
1480
+ 'symbian',
1481
+ 'symbian\ os',
1482
+ 'symbianos',
1483
+ 'toshiba',
1484
+ 'treo',
1485
+ 'ts21i\-10',
1486
+ 'up\.browser',
1487
+ 'up\.link',
1488
+ 'uts',
1489
+ 'vertu',
1490
+ 'vodafone',
1491
+ 'wap',
1492
+ 'willcome',
1493
+ 'windows\ ce',
1494
+ 'windows\.ce',
1495
+ 'winwap',
1496
+ 'xda',
1497
+ 'xoom',
1498
+ 'zte'
1499
+ )
1500
+ )
1501
+ )
1502
+ ),
1503
+
1504
+
1505
+ 'referrer.enabled' => array(
1506
+ 'type' => 'boolean',
1507
+ 'default' => false
1508
+ ),
1509
+ 'referrer.rgroups' => array(
1510
+ 'type' => 'array',
1511
+ 'default' => array(
1512
+ 'search_engines' => array(
1513
+ 'theme' => '',
1514
+ 'enabled' => false,
1515
+ 'redirect' => '',
1516
+ 'referrers' => array(
1517
+ 'google\.com',
1518
+ 'yahoo\.com',
1519
+ 'bing\.com',
1520
+ 'ask\.com',
1521
+ 'msn\.com'
1522
+ )
1523
+ )
1524
+ )
1525
+ ),
1526
+
1527
+
1528
+ 'common.support' => array(
1529
+ 'type' => 'string',
1530
+ 'default' => ''
1531
+ ),
1532
+ 'common.install' => array(
1533
+ 'type' => 'integer',
1534
+ 'default' => 0
1535
+ ),
1536
+ 'common.tweeted' => array(
1537
+ 'type' => 'boolean',
1538
+ 'default' => false
1539
+ ),
1540
+ 'config.check' => array(
1541
+ 'type' => 'boolean',
1542
+ 'default' => true
1543
+ ),
1544
+ 'config.path' => array(
1545
+ 'type' => 'string',
1546
+ 'default' => ''
1547
+ ),
1548
+ 'widget.latest.items' => array(
1549
+ 'type' => 'integer',
1550
+ 'default' => 3
1551
+ ),
1552
+ 'widget.latest_news.items' => array(
1553
+ 'type' => 'integer',
1554
+ 'default' => 5
1555
+ ),
1556
+ 'widget.pagespeed.enabled' => array(
1557
+ 'type' => 'boolean',
1558
+ 'default' => true
1559
+ ),
1560
+ 'widget.pagespeed.key' => array(
1561
+ 'type' => 'string',
1562
+ 'default' => ''
1563
+ ),
1564
+
1565
+ 'notes.wp_content_changed_perms' => array(
1566
+ 'type' => 'boolean',
1567
+ 'default' => true
1568
+ ),
1569
+ 'notes.wp_content_perms' => array(
1570
+ 'type' => 'boolean',
1571
+ 'default' => true
1572
+ ),
1573
+ 'notes.theme_changed' => array(
1574
+ 'type' => 'boolean',
1575
+ 'default' => false
1576
+ ),
1577
+ 'notes.wp_upgraded' => array(
1578
+ 'type' => 'boolean',
1579
+ 'default' => false
1580
+ ),
1581
+ 'notes.plugins_updated' => array(
1582
+ 'type' => 'boolean',
1583
+ 'default' => false
1584
+ ),
1585
+ 'notes.cdn_upload' => array(
1586
+ 'type' => 'boolean',
1587
+ 'default' => false
1588
+ ),
1589
+ 'notes.cdn_reupload' => array(
1590
+ 'type' => 'boolean',
1591
+ 'default' => false
1592
+ ),
1593
+ 'notes.need_empty_pgcache' => array(
1594
+ 'type' => 'boolean',
1595
+ 'default' => false
1596
+ ),
1597
+ 'notes.need_empty_minify' => array(
1598
+ 'type' => 'boolean',
1599
+ 'default' => false
1600
+ ),
1601
+ 'notes.need_empty_objectcache' => array(
1602
+ 'type' => 'boolean',
1603
+ 'default' => false
1604
+ ),
1605
+ 'notes.root_rules' => array(
1606
+ 'type' => 'boolean',
1607
+ 'default' => true
1608
+ ),
1609
+ 'notes.rules' => array(
1610
+ 'type' => 'boolean',
1611
+ 'default' => true
1612
+ ),
1613
+ 'notes.pgcache_rules_wpsc' => array(
1614
+ 'type' => 'boolean',
1615
+ 'default' => true
1616
+ ),
1617
+ 'notes.support_us' => array(
1618
+ 'type' => 'boolean',
1619
+ 'default' => true
1620
+ ),
1621
+ 'notes.no_curl' => array(
1622
+ 'type' => 'boolean',
1623
+ 'default' => true
1624
+ ),
1625
+ 'notes.no_zlib' => array(
1626
+ 'type' => 'boolean',
1627
+ 'default' => true
1628
+ ),
1629
+ 'notes.zlib_output_compression' => array(
1630
+ 'type' => 'boolean',
1631
+ 'default' => true
1632
+ ),
1633
+ 'notes.no_permalink_rules' => array(
1634
+ 'type' => 'boolean',
1635
+ 'default' => true
1636
+ ),
1637
+ 'notes.browsercache_rules_no404wp' => array(
1638
+ 'type' => 'boolean',
1639
+ 'default' => true
1640
+ ),
1641
+ 'notes.cloudflare_plugin' => array(
1642
+ 'type' => 'boolean',
1643
+ 'default' => true
1644
+ ),
1645
+
1646
+ 'timelimit.email_send' => array(
1647
+ 'type' => 'integer',
1648
+ 'default' => 180
1649
+ ),
1650
+ 'timelimit.varnish_purge' => array(
1651
+ 'type' => 'integer',
1652
+ 'default' => 300
1653
+ ),
1654
+ 'timelimit.cache_flush' => array(
1655
+ 'type' => 'integer',
1656
+ 'default' => 600
1657
+ ),
1658
+ 'timelimit.cache_gc' => array(
1659
+ 'type' => 'integer',
1660
+ 'default' => 600
1661
+ ),
1662
+ 'timelimit.cdn_upload' => array(
1663
+ 'type' => 'integer',
1664
+ 'default' => 600
1665
+ ),
1666
+ 'timelimit.cdn_delete' => array(
1667
+ 'type' => 'integer',
1668
+ 'default' => 300
1669
+ ),
1670
+ 'timelimit.cdn_purge' => array(
1671
+ 'type' => 'integer',
1672
+ 'default' => 300
1673
+ ),
1674
+ 'timelimit.cdn_import' => array(
1675
+ 'type' => 'integer',
1676
+ 'default' => 600
1677
+ ),
1678
+ 'timelimit.cdn_test' => array(
1679
+ 'type' => 'integer',
1680
+ 'default' => 300
1681
+ ),
1682
+ 'timelimit.cdn_container_create' => array(
1683
+ 'type' => 'integer',
1684
+ 'default' => 300
1685
+ ),
1686
+ 'timelimit.cloudflare_api_request' => array(
1687
+ 'type' => 'integer',
1688
+ 'default' => 180
1689
+ ),
1690
+ 'timelimit.domain_rename' => array(
1691
+ 'type' => 'integer',
1692
+ 'default' => 120
1693
+ ),
1694
+ 'timelimit.minify_recommendations' => array(
1695
+ 'type' => 'integer',
1696
+ 'default' => 600
1697
+ ),
1698
+
1699
+ 'minify.auto.filename_length' => array(
1700
+ 'type' => 'integer',
1701
+ 'default' => 150
1702
+ ),
1703
+ 'minify.auto.disable_filename_length_test' => array(
1704
+ 'type' => 'boolean',
1705
+ 'default' => false,
1706
+ ),
1707
+ 'common.instance_id' => array(
1708
+ 'type' => 'integer',
1709
+ 'default' => 0
1710
+ ),
1711
+ 'common.force_master' => array(
1712
+ 'type' => 'boolean',
1713
+ 'default' => true,
1714
+ 'master_only' => 'true'
1715
+ ),
1716
+ 'newrelic.enabled' => array(
1717
+ 'type' => 'boolean',
1718
+ 'default' => false,
1719
+ ),
1720
+ 'newrelic.api_key' => array(
1721
+ 'type' => 'string',
1722
+ 'default' => '',
1723
+ 'master_only' => 'true'
1724
+ ),
1725
+ 'newrelic.account_id' => array(
1726
+ 'type' => 'string',
1727
+ 'default' => '',
1728
+ 'master_only' => 'true'
1729
+ ),
1730
+ 'newrelic.application_id' => array(
1731
+ 'type' => 'integer',
1732
+ 'default' => 0,
1733
+ ),
1734
+ 'newrelic.appname' => array(
1735
+ 'type' => 'string',
1736
+ 'default' => '',
1737
+ ),
1738
+ 'newrelic.accept.logged_roles' => array(
1739
+ 'type' => 'boolean',
1740
+ 'default' => true
1741
+ ),
1742
+ 'newrelic.accept.roles' => array(
1743
+ 'type' => 'array',
1744
+ 'default' => array('contributor')
1745
+ ),
1746
+ 'newrelic.use_php_function' => array (
1747
+ 'type' => 'boolean',
1748
+ 'default' => true,
1749
+ ),
1750
+ 'notes.new_relic_page_load_notification' => array(
1751
+ 'type' => 'boolean',
1752
+ 'default' => true
1753
+ ),
1754
+ 'newrelic.appname_prefix' => array (
1755
+ 'type' => 'string',
1756
+ 'default' => 'Child Site - '
1757
+ ),
1758
+ 'newrelic.merge_with_network' => array (
1759
+ 'type' => 'boolean',
1760
+ 'default' => true
1761
+ ),
1762
+ 'newrelic.cache_time' => array(
1763
+ 'type' => 'integer',
1764
+ 'default' => 5
1765
+ ),
1766
+ 'newrelic.enable_xmit' => array(
1767
+ 'type' => 'boolean',
1768
+ 'default' => false
1769
+ ),
1770
+ 'newrelic.use_network_wide_id' => array(
1771
+ 'type' => 'boolean',
1772
+ 'default' => false,
1773
+ 'master_only' => 'true'
1774
+ ),
1775
+ 'pgcache.late_init' => array (
1776
+ 'type' => 'boolean',
1777
+ 'default' => false
1778
+ ),
1779
+ 'newrelic.include_rum' => array(
1780
+ 'type' => 'boolean',
1781
+ 'default' => true,
1782
+ ),
1783
+ 'extensions.settings' => array(
1784
+ 'type' => 'array',
1785
+ 'default' => array(
1786
+ 'genesis.theme' => array(
1787
+ 'wp_head' => '0',
1788
+ 'genesis_header' => '1',
1789
+ 'genesis_do_nav' => '1',
1790
+ 'genesis_do_subnav' => '1',
1791
+ 'loop_front_page' => '1',
1792
+ 'loop_single' => '1',
1793
+ 'loop_single_excluded' => '',
1794
+ 'loop_single_genesis_comments' => '0',
1795
+ 'loop_single_genesis_pings' => '0',
1796
+ 'sidebar' => '0',
1797
+ 'sidebar_excluded' => '',
1798
+ 'genesis_footer' => '1',
1799
+ 'wp_footer' => '0',
1800
+ 'fragment_reject_logged_roles' => '1',
1801
+ 'fragment_reject_logged_roles_on_actions' => array(
1802
+ 0 => 'genesis_loop',
1803
+ 1 => 'wp_head',
1804
+ 2 => 'wp_footer',
1805
+ ),
1806
+ 'fragment_reject_roles' => array(
1807
+ 0 => 'administrator',
1808
+ ),
1809
+ ),
1810
+ )
1811
+ ),
1812
+ 'extensions.active' => array(
1813
+ 'type' => 'array',
1814
+ 'default' => array()
1815
+ ),
1816
+ 'plugin.license_key' => array(
1817
+ 'type' => 'string',
1818
+ 'default' => '',
1819
+ 'master_only' => true
1820
+ ),
1821
+ 'plugin.type' => array(
1822
+ 'type' => 'string',
1823
+ 'default' => '',
1824
+ 'master_only' => true
1825
+ )
1826
+ );
1827
+
1828
+
1829
+ /*
1830
+ * Descriptors of configuration keys
1831
+ * for admin config
1832
+ */
1833
+ $keys_admin = array(
1834
+ 'browsercache.configuration_sealed' => array(
1835
+ 'type' => 'boolean',
1836
+ 'default' => false,
1837
+ 'master_only' => 'true'
1838
+ ),
1839
+ 'cdn.configuration_sealed' => array(
1840
+ 'type' => 'boolean',
1841
+ 'default' => false,
1842
+ 'master_only' => 'true'
1843
+ ),
1844
+ 'cloudflare.configuration_sealed' => array(
1845
+ 'type' => 'boolean',
1846
+ 'default' => false,
1847
+ 'master_only' => 'true'
1848
+ ),
1849
+ 'common.install' => array(
1850
+ 'type' => 'integer',
1851
+ 'default' => 0,
1852
+ 'master_only' => 'true'
1853
+ ),
1854
+ 'common.visible_by_master_only' => array(
1855
+ 'type' => 'boolean',
1856
+ 'default' => true,
1857
+ 'master_only' => 'true'
1858
+ ),
1859
+ 'dbcache.configuration_sealed' => array(
1860
+ 'type' => 'boolean',
1861
+ 'default' => false,
1862
+ 'master_only' => 'true'
1863
+ ),
1864
+ 'minify.configuration_sealed' => array(
1865
+ 'type' => 'boolean',
1866
+ 'default' => false,
1867
+ 'master_only' => 'true'
1868
+ ),
1869
+ 'objectcache.configuration_sealed' => array(
1870
+ 'type' => 'boolean',
1871
+ 'default' => false,
1872
+ 'master_only' => 'true'
1873
+ ),
1874
+ 'pgcache.configuration_sealed' => array(
1875
+ 'type' => 'boolean',
1876
+ 'default' => false,
1877
+ 'master_only' => 'true'
1878
+ ),
1879
+ 'previewmode.enabled' => array(
1880
+ 'type' => 'boolean',
1881
+ 'default' => false,
1882
+ 'master_only' => 'true'
1883
+ ),
1884
+ 'varnish.configuration_sealed' => array(
1885
+ 'type' => 'boolean',
1886
+ 'default' => false,
1887
+ 'master_only' => 'true'
1888
+ ),
1889
+ 'fragmentcache.configuration_sealed' => array(
1890
+ 'type' => 'boolean',
1891
+ 'default' => false,
1892
+ 'master_only' => 'true'
1893
+ )
1894
+ ,'newrelic.configuration_sealed' => array(
1895
+ 'type' => 'boolean',
1896
+ 'default' => false,
1897
+ 'master_only' => 'true'
1898
+ )
1899
+ ,'extensions.configuration_sealed' => array(
1900
+ 'type' => 'array',
1901
+ 'default' => array(),
1902
+ 'master_only' => 'true'
1903
+ )
1904
+ ,'notes.minify_error' => array(
1905
+ 'type' => 'boolean',
1906
+ 'default' => false
1907
+ )
1908
+ ,'minify.error.last' => array(
1909
+ 'type' => 'string',
1910
+ 'default' => ''
1911
+ ),
1912
+ 'minify.error.notification' => array(
1913
+ 'type' => 'string',
1914
+ 'default' => ''
1915
+ ),
1916
+ 'minify.error.notification.last' => array(
1917
+ 'type' => 'integer',
1918
+ 'default' => 0
1919
+ ),
1920
+ 'minify.error.file' => array(
1921
+ 'type' => 'string',
1922
+ 'default' => ''
1923
+ ),
1924
+ 'notes.remove_w3tc' => array(
1925
+ 'type' => 'boolean',
1926
+ 'default' => false
1927
+ )
1928
+ );
1929
+
1930
+ $keys_admin['common.install']['default'] = time();
1931
+
1932
+
1933
+
1934
+ /*
1935
+ * Descriptors how sealed configuration keys affect overriding
1936
+ */
1937
+ $sealing_keys_scope = array(
1938
+ array(
1939
+ 'key' => 'browsercache.configuration_sealed',
1940
+ 'prefix' => 'browsercache.'
1941
+ ),
1942
+ array(
1943
+ 'key' => 'cdn.configuration_sealed',
1944
+ 'prefix' => 'cdn.'
1945
+ ),
1946
+ array(
1947
+ 'key' => 'cloudflare.configuration_sealed',
1948
+ 'prefix' => 'cloudflare.'
1949
+ ),
1950
+ array(
1951
+ 'key' => 'dbcache.configuration_sealed',
1952
+ 'prefix' => 'dbcache.'
1953
+ ),
1954
+ array(
1955
+ 'key' => 'minify.configuration_sealed',
1956
+ 'prefix' => 'minify.'
1957
+ ),
1958
+ array(
1959
+ 'key' => 'objectcache.configuration_sealed',
1960
+ 'prefix' => 'objectcache.'
1961
+ ),
1962
+ array(
1963
+ 'key' => 'fragmentcache.configuration_sealed',
1964
+ 'prefix' => 'fragmentcache.'
1965
+ ),
1966
+ array(
1967
+ 'key' => 'pgcache.configuration_sealed',
1968
+ 'prefix' => 'pgcache.'
1969
+ ),
1970
+ array(
1971
+ 'key' => 'varnish.configuration_sealed',
1972
+ 'prefix' => 'varnish.'
1973
+ ),
1974
+ array(
1975
+ 'key' => 'extensions.active.configuration_sealed',
1976
+ 'prefix' => 'extensions.active'
1977
+ ),
1978
+ array(
1979
+ 'key' => 'extensions.configuration_sealed',
1980
+ 'prefix' => 'extensions.'
1981
+ )
1982
+ );
1983
+
extensions/CloudFlare.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * W3 ObjectCache plugin
5
+ */
6
+ if (!defined('W3TC')) {
7
+ die();
8
+ }
9
+ define('W3TC_MARKER_BEGIN_CLOUDFLARE', '# BEGIN W3TC CloudFlare');
10
+ define('W3TC_MARKER_END_CLOUDFLARE', '# END W3TC CloudFlare');
11
+
12
+ w3_require_once(W3TC_LIB_W3_DIR . '/Plugin.php');
13
+
14
+ /**
15
+ * Class W3_Plugin_CloudFlare
16
+ */
17
+ class W3_Plugin_CloudFlare extends W3_Plugin{
18
+ /**
19
+ * @var CloudFlareAPI $cf
20
+ */
21
+ private $cf;
22
+
23
+ /**
24
+ * Runs plugin
25
+ */
26
+ function run() {
27
+ w3_require_once(W3TC_CORE_EXTENSION_DIR. '/CloudFlare/CloudFlareAPI.php');
28
+ $this->cf = new CloudFlareAPI();
29
+ add_action('wp_set_comment_status', array($this, 'set_comment_status'), 1, 2);
30
+ add_action('w3tc_flush_all', array($this, 'flush_all'));
31
+ $this->cf->fix_remote_addr();
32
+ }
33
+
34
+ public function flush_all() {
35
+ $this->flush_cloudflare();
36
+ }
37
+
38
+ /**
39
+ * @param $id
40
+ * @param $status
41
+ */
42
+ function set_comment_status($id, $status) {
43
+ $this->cf->report_if_spam($id, $status);
44
+ }
45
+
46
+ /**
47
+ * @param $state
48
+ * @return bool
49
+ */
50
+ public function send_minify_headers($state) {
51
+ /**
52
+ * @var W3_Config $config
53
+ */
54
+ $config = w3_instance('W3_Config');
55
+ return ($config->get_boolean('cloudflare.enabled') && !$this->cf->minify_enabled());
56
+ }
57
+
58
+
59
+ /**
60
+ * Purge the CloudFlare cache
61
+ * @return void
62
+ */
63
+ function flush_cloudflare() {
64
+ $response = null;
65
+
66
+ w3_require_once(W3TC_LIB_W3_DIR . '/Request.php');
67
+
68
+ $email = $this->_config->get_string('email');
69
+ $key = $this->_config->get_string('key');
70
+ $zone = $this->_config->get_string('zone');
71
+
72
+
73
+ if ($email && $key && $zone) {
74
+ $config = array(
75
+ 'email' => $email,
76
+ 'key' => $key,
77
+ 'zone' => $zone
78
+ );
79
+
80
+ w3_require_once(W3TC_CORE_EXTENSION_DIR . '/CloudFlare/CloudFlareAPI.php');
81
+ @$cloudflareAPI = new CloudFlareAPI($config);
82
+ $cloudflareAPI->purge();
83
+ }
84
+ }
85
+
86
+ public function menu_bar($menu_items) {
87
+ $menu_items = array_merge($menu_items, array(
88
+ array(
89
+ 'id' => 'cloudflare',
90
+ 'title' => __('CloudFlare', 'w3-total-cache'),
91
+ 'href' => 'https://www.cloudflare.com'
92
+ ),
93
+ array(
94
+ 'id' => 'cloudflare-my-websites',
95
+ 'parent' => 'cloudflare',
96
+ 'title' => __('My Websites', 'w3-total-cache'),
97
+ 'href' => 'https://www.cloudflare.com/my-websites.html'
98
+ ),
99
+ array(
100
+ 'id' => 'cloudflare-analytics',
101
+ 'parent' => 'cloudflare',
102
+ 'title' => __('Analytics', 'w3-total-cache'),
103
+ 'href' => 'https://www.cloudflare.com/analytics.html'
104
+ ),
105
+ array(
106
+ 'id' => 'cloudflare-account',
107
+ 'parent' => 'cloudflare',
108
+ 'title' => __('Account', 'w3-total-cache'),
109
+ 'href' => 'https://www.cloudflare.com/my-account.html'
110
+ )
111
+ ));
112
+ return $menu_items;
113
+ }
114
+ }
lib/W3/CloudFlare.php → extensions/CloudFlare/CloudFlareAPI.php RENAMED
@@ -1,373 +1,387 @@
1
- <?php
2
-
3
- /**
4
- * W3 CloudFlare Class
5
- */
6
- define('W3TC_CLOUDFLARE_API_URL', 'https://www.cloudflare.com/api_json.html');
7
- define('W3TC_CLOUDFLARE_EXTERNAL_EVENT_URL', 'https://www.cloudflare.com/ajax/external-event.html');
8
- define('W3TC_CLOUDFLARE_IP4_URL', 'https://www.cloudflare.com/ips-v4');
9
- define('W3TC_CLOUDFLARE_IP6_URL', "https://www.cloudflare.com/ips-v6");
10
-
11
- /**
12
- * Class W3_CloudFlare
13
- */
14
- class W3_CloudFlare {
15
- /**
16
- * Config array
17
- *
18
- * @var array
19
- */
20
- var $_cf_config = array();
21
-
22
- /**
23
- * @var W3_Config
24
- */
25
- var $_config;
26
-
27
- /**
28
- * Checks if cloudflare error pushed to output
29
- *
30
- * @var boolean
31
- */
32
- var $_fault_signaled = false;
33
-
34
- /**
35
- * PHP5-style constructor
36
- *
37
- * @param array $config
38
- */
39
- function __construct($config = array()) {
40
- $this->_config = w3_instance('W3_Config');
41
- if (empty($config)) {
42
- $this->_cf_config = array(
43
- 'email' => $this->_config->get_string('cloudflare.email'),
44
- 'key' => $this->_config->get_string('cloudflare.key'),
45
- 'zone' => $this->_config->get_string('cloudflare.zone'));
46
- } else {
47
- $this->_cf_config = array_merge(array(
48
- 'email' => '',
49
- 'key' => '',
50
- 'zone' => ''
51
- ), $config);
52
- }
53
-
54
- }
55
-
56
- /**
57
- * Makes API request
58
- *
59
- * @param string $action
60
- * @param string $value
61
- * @return object
62
- */
63
- function api_request($action, $value = null) {
64
- w3_require_once(W3TC_INC_DIR . '/functions/http.php');
65
- if (empty($this->_cf_config['email']) || !filter_var($this->_cf_config['email'], FILTER_VALIDATE_EMAIL))
66
- return false;
67
-
68
- if (empty($this->_cf_config['key']) || !is_string($this->_cf_config['key']))
69
- return false;
70
-
71
- if (empty($this->_cf_config['zone']) || !is_string($this->_cf_config['zone']) || strpos($this->_cf_config['zone'], '.') === false)
72
- return false;
73
-
74
- $url = sprintf('%s?email=%s&tkn=%s&z=%s&a=%s', W3TC_CLOUDFLARE_API_URL, urlencode($this->_cf_config['email']), urlencode($this->_cf_config['key']), urlencode($this->_cf_config['zone']), urlencode($action));
75
-
76
- if ($value !== null) {
77
- $url .= sprintf('&v=%s', urlencode($value));
78
- }
79
-
80
- $response = w3_http_get($url);
81
-
82
- if (!is_wp_error($response)) {
83
- $response = json_decode($response['body']);
84
- if (isset($response->result) && $response->result == 'error') {
85
- $this->_set_last_error('Setting: ' . $action . ' ' . (isset($response->msg) ? $response->msg : 'Unknown error'));
86
- } else {
87
- $this->clear_last_error();
88
- }
89
-
90
- return $response;
91
- } else {
92
- $this->_set_last_error('Setting: ' . $action. ' ' . $response->get_error_message());
93
- }
94
-
95
- return false;
96
- }
97
-
98
- /**
99
- * Makes external event request
100
- *
101
- * @param string $type
102
- * @param string $value
103
- * @return array
104
- */
105
- function external_event($type, $value) {
106
- w3_require_once(W3TC_INC_DIR . '/functions/http.php');
107
- if (empty($this->_cf_config['email']) || !filter_var($this->_cf_config['email'], FILTER_VALIDATE_EMAIL))
108
- return false;
109
-
110
- if (empty($this->_cf_config['key']) || !is_string($this->_cf_config['key']))
111
- return false;
112
-
113
- if ($this->get_last_error())
114
- return false;
115
-
116
- $url = sprintf('%s?u=%s&tkn=%s&evnt_t=%s&evnt_v=%s', W3TC_CLOUDFLARE_EXTERNAL_EVENT_URL, urlencode($this->_cf_config['email']), urlencode($this->_cf_config['key']), urlencode($type), urlencode($value));
117
- $response = w3_http_get($url);
118
-
119
- if (!is_wp_error($response)) {
120
- return json_decode($response['body']);
121
- }
122
-
123
- return false;
124
- }
125
-
126
- /**
127
- * Fix client's IP-address
128
- *
129
- * @return void
130
- */
131
- function fix_remote_addr() {
132
- if (isset($_SERVER['HTTP_CF_CONNECTING_IP']) && !empty($_SERVER['HTTP_CF_CONNECTING_IP'])) {
133
- w3_require_once(W3TC_INC_DIR . '/functions/ip_in_range.php');
134
- if (strpos($_SERVER["REMOTE_ADDR"], ":") === FALSE) {
135
- $ip4_ranges = $this->_config->get_array('cloudflare.ips.ip4');
136
- foreach ($ip4_ranges as $range) {
137
- if (w3_ipv4_in_range($_SERVER['REMOTE_ADDR'], $range)) {
138
- $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
139
- break;
140
- }
141
- }
142
- } else {
143
- $ip6_ranges = $this->_config->get_array('cloudflare.ips.ip6');
144
- $ip6 = w3_get_ipv6_full($_SERVER["REMOTE_ADDR"]);
145
- foreach ($ip6_ranges as $range) {
146
- if (w3_ipv6_in_range($ip6, $range)) {
147
- $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
148
- break;
149
- }
150
- }
151
- }
152
- }
153
- }
154
-
155
- static function get_last_error() {
156
- return get_option('w3tc_clourflare_last_error');
157
- }
158
-
159
- static function clear_last_error() {
160
- update_option('w3tc_clourflare_last_error', false);
161
- }
162
-
163
- private function _set_last_error($message) {
164
- update_option('w3tc_clourflare_last_error', $message);
165
- }
166
-
167
- /**
168
- * Check
169
- * @throws FilesystemOperationException
170
- * @throws FileOperationException
171
- */
172
- public function update_ip_ranges() {
173
- w3_require_once(W3TC_INC_DIR . '/functions/http.php');
174
- $ip4_diff = $ip6_diff = false;
175
- $config_master = new W3_Config(true);
176
- $response =w3_http_get(W3TC_CLOUDFLARE_IP4_URL);
177
- if (!is_wp_error($response)) {
178
- $ip4_data = $response['body'];
179
- $ip4_data = explode("\n", $ip4_data);
180
- $ip4_data_old = $this->_config->get_array('cloudflare.ips.ip4');
181
- if ($ip4_diff = array_diff($ip4_data, $ip4_data_old))
182
- $config_master->set('cloudflare.ips.ip4', $ip4_data);
183
- }
184
- $response =w3_http_get(W3TC_CLOUDFLARE_IP6_URL);
185
- if (!is_wp_error($response)) {
186
- $ip6_data = $response['body'];
187
- $ip6_data = explode("\n", $ip6_data);
188
- $ip6_data_old = $this->_config->get_array('cloudflare.ips.ip6');
189
- if ($ip6_diff = array_diff($ip6_data, $ip6_data_old))
190
- $config_master->set('cloudflare.ips.ip6', $ip6_data);
191
- }
192
- if ($ip4_diff || $ip6_diff)
193
- $config_master->save();
194
- }
195
-
196
- // Report spam.
197
- function report_if_spam($id, $status) {
198
- // If spam, send this info over to CloudFlare.
199
- if ($status == "spam") {
200
- $comment = get_comment($id);
201
- $value = array("a" => $comment->comment_author,
202
- "am" => $comment->comment_author_email,
203
- "ip" => $comment->comment_author_IP,
204
- "con" => substr($comment->comment_content, 0, 100));
205
- $this->external_event('WP_SPAM', json_encode($value));
206
- }
207
- }
208
-
209
- /**
210
- * @return array
211
- */
212
- function get_settings() {
213
- $settings = get_transient('w3tc_cloudflare_settings');
214
-
215
- if (false === $settings) {
216
- $settings = array('sec_lvl' => 'eoff', 'devmode' => 0, 'async' => 0, 'minify' => 0);
217
- $response = $this->api_request('zone_settings');
218
-
219
- if ($response && $response->result == 'success' && isset($response->response->result->objs[0])) {
220
- switch ($response->response->result->objs[0]->sec_lvl) {
221
- case 'I\'m under attack!':
222
- $seclvl = 'help';
223
- break;
224
-
225
- case 'Essentially Off':
226
- $seclvl = 'eoff';
227
- break;
228
-
229
- case 'High';
230
- $seclvl = 'high';
231
- break;
232
-
233
- case 'Medium';
234
- $seclvl = 'med';
235
- break;
236
-
237
- case 'Low';
238
- $seclvl = 'low';
239
- break;
240
- default:
241
- $seclvl = $response->response->result->objs[0]->sec_lvl;
242
- }
243
- $settings['sec_lvl'] = $seclvl;
244
- $devmode = ($response->response->result->objs[0]->dev_mode >= time() ? $response->response->result->objs[0]->dev_mode : 0);
245
- $settings['devmode'] = $devmode;
246
- $settings['async'] = $response->response->result->objs[0]->async;
247
- $settings['minify'] = $response->response->result->objs[0]->minify;
248
- set_transient('w3tc_cloudflare_settings', $settings, 3600);
249
- }
250
- }
251
- return $settings;
252
- }
253
-
254
-
255
- function check_lasterror() {
256
- if ($this->_config->get_boolean('cloudflare.enabled') && self::get_last_error()) {
257
- if (!$this->_fault_signaled) {
258
- $this->_fault_signaled = true;
259
- return sprintf('Unable to communicate with CloudFlare API: %s.', self::get_last_error());
260
- }
261
- }
262
- return false;
263
- }
264
-
265
- /**
266
- * If error has been reported
267
- * @return bool
268
- */
269
- function get_fault_signaled() {
270
- return $this->_fault_signaled;
271
- }
272
-
273
- public function get_options() {
274
- return array(
275
- 'sec_lvl' => array(
276
- 'help' => 'I\'m under attack!',
277
- 'high' => 'High',
278
- 'med' => 'Medium',
279
- 'low' => 'Low',
280
- 'eoff' => 'Essentially Off'
281
- ),
282
- 'devmode' => array(
283
- 1 => 'On',
284
- 0 => 'Off'
285
- ),
286
- 'dev_mode' => array(
287
- 1 => 'On',
288
- 0 => 'Off'
289
- ),
290
- 'async'=> array(
291
- 0 => 'Off',
292
- 'a' => 'Automatic',
293
- 'm' => 'Manual'
294
- ),
295
- 'minify' => array(
296
- 0 => 'Off',
297
- 1 => 'JavaScript only',
298
- 2 => 'CSS only',
299
- 3 => 'JavaScript and CSS',
300
- 4 => 'HTML only',
301
- 5 => 'JavaScript and HTML',
302
- 6 => 'CSS and HTML',
303
- 7 => 'CSS, JavaScript, and HTML'
304
- )
305
- );
306
- }
307
-
308
- /**
309
- * @return mixed
310
- */
311
- public function purge() {
312
- @set_time_limit($this->_config->get_integer('timelimit.cloudflare_api_request'));
313
- delete_transient('w3tc_cloudflare_settings');
314
- return $this->api_request('fpurge_ts', 1);
315
- }
316
-
317
- /**
318
- * If minify is enabled at all
319
- * @return bool
320
- */
321
- public function minify_enabled() {
322
- $settings = $this->get_settings();
323
- return $settings['minify'] > 0;
324
- }
325
-
326
- /**
327
- * @param $cf_values
328
- * @return bool
329
- */
330
- public function save_settings($cf_values) {
331
- @set_time_limit($this->_config->get_integer('timelimit.cloudflare_api_request'));
332
- ksort($cf_values);
333
- $cf_values = $this->_cleanup_settings($cf_values);
334
- foreach ($cf_values as $key => $settings) {
335
- if ($settings['old'] != $settings['new']) {
336
- $response = $this->api_request($key, $settings['new']);
337
- if (!$response || ($response && $response->result != 'success')) {
338
- return false;
339
- }
340
- }
341
- }
342
- delete_transient('w3tc_cloudflare_settings');
343
- return true;
344
- }
345
-
346
- /**
347
- * Takes an array with posted CF settings and reformat it.
348
- * @param $settings
349
- * @return array
350
- */
351
- private function _cleanup_settings($settings) {
352
- $keys = array_keys($this->get_options());
353
- $clean_settings = array();
354
- foreach ($settings as $key => $value) {
355
- $setting = substr($key, 0, strlen($key)-4);
356
- if (in_array($setting, $keys)) {
357
- if (strpos($key, '_old') !== false) {
358
- $clean_settings[$setting]['old'] = $value;
359
- } elseif (strpos($key, '_new') !== false) {
360
- $clean_settings[$setting]['new'] = $value;
361
- }
362
- }
363
- }
364
- return $clean_settings;
365
- }
366
-
367
- /*
368
- * Resets settings cache
369
- */
370
- public function reset_settings_cache() {
371
- return delete_transient('w3tc_cloudflare_settings');
372
- }
373
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * W3 CloudFlare Class
5
+ */
6
+ define('W3TC_CLOUDFLARE_API_URL', 'https://www.cloudflare.com/api_json.html');
7
+ define('W3TC_CLOUDFLARE_EXTERNAL_EVENT_URL', 'https://www.cloudflare.com/ajax/external-event.html');
8
+ define('W3TC_CLOUDFLARE_IP4_URL', 'https://www.cloudflare.com/ips-v4');
9
+ define('W3TC_CLOUDFLARE_IP6_URL', "https://www.cloudflare.com/ips-v6");
10
+
11
+ /**
12
+ * Class CloudFlareAPI
13
+ */
14
+ class CloudFlareAPI {
15
+ /**
16
+ * Config array
17
+ *
18
+ * @var array
19
+ */
20
+ var $_cf_config = array();
21
+
22
+ /**
23
+ * @var W3_Config
24
+ */
25
+ var $_config;
26
+
27
+ /**
28
+ * Checks if cloudflare error pushed to output
29
+ *
30
+ * @var boolean
31
+ */
32
+ var $_fault_signaled = false;
33
+
34
+ /**
35
+ * PHP5-style constructor
36
+ *
37
+ * @param array $config
38
+ */
39
+ function __construct($config = array()) {
40
+ $this->_config = w3_instance('W3_Config');
41
+ if (empty($config)) {
42
+ $this->_cf_config = array(
43
+ 'email' => w3tc_get_extension_config('cloudflare','email'),
44
+ 'key' => w3tc_get_extension_config('cloudflare','key'),
45
+ 'zone' => w3tc_get_extension_config('cloudflare','zone'));
46
+ } else {
47
+ $this->_cf_config = array_merge(array(
48
+ 'email' => '',
49
+ 'key' => '',
50
+ 'zone' => ''
51
+ ), $config);
52
+ }
53
+
54
+ }
55
+
56
+ /**
57
+ * Makes API request
58
+ *
59
+ * @param string $action
60
+ * @param string $value
61
+ * @return object
62
+ */
63
+ function api_request($action, $value = null) {
64
+ w3_require_once(W3TC_INC_DIR . '/functions/http.php');
65
+ if (empty($this->_cf_config['email']) || !filter_var($this->_cf_config['email'], FILTER_VALIDATE_EMAIL)) {
66
+ $this->_set_last_error(__('CloudFlare requires "email" to be set.','w3-total-cache'));
67
+ return false;
68
+ }
69
+
70
+ if (empty($this->_cf_config['key']) || !is_string($this->_cf_config['key'])) {
71
+ $this->_set_last_error(__('CloudFlare requires "API key" to be set.','w3-total-cache'));
72
+ return false;
73
+ }
74
+
75
+
76
+ if (empty($this->_cf_config['zone']) || !is_string($this->_cf_config['zone']) || strpos($this->_cf_config['zone'], '.') === false){
77
+ $this->_set_last_error(__('CloudFlare requires "domain" to be set.','w3-total-cache'));
78
+ return false;
79
+ }
80
+
81
+ $url = sprintf('%s?email=%s&tkn=%s&z=%s&a=%s', W3TC_CLOUDFLARE_API_URL, urlencode($this->_cf_config['email']), urlencode($this->_cf_config['key']), urlencode($this->_cf_config['zone']), urlencode($action));
82
+
83
+ if ($value !== null) {
84
+ $url .= sprintf('&v=%s', urlencode($value));
85
+ }
86
+
87
+ $response = w3_http_get($url);
88
+
89
+ if (!is_wp_error($response)) {
90
+ $response = json_decode($response['body']);
91
+ if (isset($response->result) && $response->result == 'error') {
92
+ $this->_set_last_error('Setting: ' . $action . ' ' . (isset($response->msg) ? $response->msg : 'Unknown error'));
93
+ } else {
94
+ $this->clear_last_error();
95
+ }
96
+
97
+ return $response;
98
+ } else {
99
+ $this->_set_last_error('Setting: ' . $action. ' ' . $response->get_error_message());
100
+ }
101
+
102
+ return false;
103
+ }
104
+
105
+ /**
106
+ * Makes external event request
107
+ *
108
+ * @param string $type
109
+ * @param string $value
110
+ * @return array
111
+ */
112
+ function external_event($type, $value) {
113
+ w3_require_once(W3TC_INC_DIR . '/functions/http.php');
114
+ if (empty($this->_cf_config['email']) || !filter_var($this->_cf_config['email'], FILTER_VALIDATE_EMAIL))
115
+ return false;
116
+
117
+ if (empty($this->_cf_config['key']) || !is_string($this->_cf_config['key']))
118
+ return false;
119
+
120
+ if ($this->get_last_error())
121
+ return false;
122
+
123
+ $url = sprintf('%s?u=%s&tkn=%s&evnt_t=%s&evnt_v=%s', W3TC_CLOUDFLARE_EXTERNAL_EVENT_URL, urlencode($this->_cf_config['email']), urlencode($this->_cf_config['key']), urlencode($type), urlencode($value));
124
+ $response = w3_http_get($url);
125
+
126
+ if (!is_wp_error($response)) {
127
+ return json_decode($response['body']);
128
+ }
129
+
130
+ return false;
131
+ }
132
+
133
+ /**
134
+ * Fix client's IP-address
135
+ *
136
+ * @return void
137
+ */
138
+ function fix_remote_addr() {
139
+ if (isset($_SERVER['HTTP_CF_CONNECTING_IP']) && !empty($_SERVER['HTTP_CF_CONNECTING_IP'])) {
140
+ w3_require_once(W3TC_INC_DIR . '/functions/ip_in_range.php');
141
+ if (strpos($_SERVER["REMOTE_ADDR"], ":") === FALSE) {
142
+ $ip4_ranges = w3tc_get_extension_config('cloudflare','ips.ip4', $this->_config, array());
143
+ foreach ($ip4_ranges as $range) {
144
+ if (w3_ipv4_in_range($_SERVER['REMOTE_ADDR'], $range)) {
145
+ $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
146
+ break;
147
+ }
148
+ }
149
+ } else {
150
+ $ip6_ranges = w3tc_get_extension_config('cloudflare','ips.ip6', $this->_config, array());
151
+ $ip6 = w3_get_ipv6_full($_SERVER["REMOTE_ADDR"]);
152
+ foreach ($ip6_ranges as $range) {
153
+ if (w3_ipv6_in_range($ip6, $range)) {
154
+ $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
155
+ break;
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }
161
+
162
+ static function get_last_error() {
163
+ return get_option('w3tc_clourflare_last_error');
164
+ }
165
+
166
+ static function clear_last_error() {
167
+ update_option('w3tc_clourflare_last_error', false);
168
+ }
169
+
170
+ private function _set_last_error($message) {
171
+ update_option('w3tc_clourflare_last_error', $message);
172
+ }
173
+
174
+ /**
175
+ * Check
176
+ * @throws FilesystemOperationException
177
+ * @throws FileOperationException
178
+ */
179
+ public function update_ip_ranges() {
180
+ w3_require_once(W3TC_INC_DIR . '/functions/http.php');
181
+ $ip4_diff = $ip6_diff = false;
182
+ $response =w3_http_get(W3TC_CLOUDFLARE_IP4_URL);
183
+ $extensions_settings = $this->_config->get_array('extensions.settings', array());
184
+ if (!is_wp_error($response)) {
185
+ $ip4_data = $response['body'];
186
+ $ip4_data = explode("\n", $ip4_data);
187
+ $ip4_data_old = w3tc_get_extension_config('cloudflare','ips.ip4', $this->_config, array());
188
+ if ($ip4_diff = array_diff($ip4_data, $ip4_data_old)) {
189
+ $extensions_settings['cloudflare']['ips.ip4'] = $ip4_data;
190
+ $this->_config->set('extensions.settings', $extensions_settings);
191
+ }
192
+ }
193
+ $response =w3_http_get(W3TC_CLOUDFLARE_IP6_URL);
194
+ if (!is_wp_error($response)) {
195
+ $ip6_data = $response['body'];
196
+ $ip6_data = explode("\n", $ip6_data);
197
+ $ip6_data_old = w3tc_get_extension_config('cloudflare','ips.ip6', $this->_config, array());
198
+ if ($ip6_diff = array_diff($ip6_data, $ip6_data_old)) {
199
+ $extensions_settings['cloudflare']['ips.ip6'] = $ip6_data;
200
+ $this->_config->set('extensions.settings', $extensions_settings);
201
+ }
202
+ }
203
+ if ($ip4_diff || $ip6_diff)
204
+ try {
205
+ $this->_config->save();
206
+ $this->_config->refresh_cache();
207
+ } catch(Exception $ex){}
208
+ }
209
+
210
+ // Report spam.
211
+ function report_if_spam($id, $status) {
212
+ // If spam, send this info over to CloudFlare.
213
+ if ($status == "spam") {
214
+ $comment = get_comment($id);
215
+ $value = array("a" => $comment->comment_author,
216
+ "am" => $comment->comment_author_email,
217
+ "ip" => $comment->comment_author_IP,
218
+ "con" => substr($comment->comment_content, 0, 100));
219
+ $this->external_event('WP_SPAM', json_encode($value));
220
+ }
221
+ }
222
+
223
+ /**
224
+ * @return array
225
+ */
226
+ function get_settings() {
227
+ $settings = get_transient('w3tc_cloudflare_settings');
228
+
229
+ if (false === $settings) {
230
+ $settings = array('sec_lvl' => 'eoff', 'devmode' => 0, 'async' => 0, 'minify' => 0);
231
+ $response = $this->api_request('zone_settings');
232
+
233
+ if ($response && $response->result == 'success' && isset($response->response->result->objs[0])) {
234
+ switch ($response->response->result->objs[0]->sec_lvl) {
235
+ case 'I\'m under attack!':
236
+ $seclvl = 'help';
237
+ break;
238
+
239
+ case 'Essentially Off':
240
+ $seclvl = 'eoff';
241
+ break;
242
+
243
+ case 'High';
244
+ $seclvl = 'high';
245
+ break;
246
+
247
+ case 'Medium';
248
+ $seclvl = 'med';
249
+ break;
250
+
251
+ case 'Low';
252
+ $seclvl = 'low';
253
+ break;
254
+ default:
255
+ $seclvl = $response->response->result->objs[0]->sec_lvl;
256
+ }
257
+ $settings['sec_lvl'] = $seclvl;
258
+ $devmode = ($response->response->result->objs[0]->dev_mode >= time() ? $response->response->result->objs[0]->dev_mode : 0);
259
+ $settings['devmode'] = $devmode;
260
+ $settings['async'] = $response->response->result->objs[0]->async;
261
+ $settings['minify'] = $response->response->result->objs[0]->minify;
262
+ set_transient('w3tc_cloudflare_settings', $settings, 3600);
263
+ }
264
+ }
265
+ return $settings;
266
+ }
267
+
268
+
269
+ function check_lasterror() {
270
+ if (w3tc_get_extension_config('cloudflare','enabled') && self::get_last_error()) {
271
+ if (!$this->_fault_signaled) {
272
+ $this->_fault_signaled = true;
273
+ return sprintf('Unable to communicate with CloudFlare API: %s.', self::get_last_error());
274
+ }
275
+ }
276
+ return false;
277
+ }
278
+
279
+ /**
280
+ * If error has been reported
281
+ * @return bool
282
+ */
283
+ function get_fault_signaled() {
284
+ return $this->_fault_signaled;
285
+ }
286
+
287
+ public function get_options() {
288
+ return array(
289
+ 'sec_lvl' => array(
290
+ 'help' => 'I\'m under attack!',
291
+ 'high' => 'High',
292
+ 'med' => 'Medium',
293
+ 'low' => 'Low',
294
+ 'eoff' => 'Essentially Off'
295
+ ),
296
+ 'devmode' => array(
297
+ 1 => 'On',
298
+ 0 => 'Off'
299
+ ),
300
+ 'dev_mode' => array(
301
+ 1 => 'On',
302
+ 0 => 'Off'
303
+ ),
304
+ 'async'=> array(
305
+ 0 => 'Off',
306
+ 'a' => 'Automatic',
307
+ 'm' => 'Manual'
308
+ ),
309
+ 'minify' => array(
310
+ 0 => 'Off',
311
+ 1 => 'JavaScript only',
312
+ 2 => 'CSS only',
313
+ 3 => 'JavaScript and CSS',
314
+ 4 => 'HTML only',
315
+ 5 => 'JavaScript and HTML',
316
+ 6 => 'CSS and HTML',
317
+ 7 => 'CSS, JavaScript, and HTML'
318
+ )
319
+ );
320
+ }
321
+
322
+ /**
323
+ * @return mixed
324
+ */
325
+ public function purge() {
326
+ @set_time_limit(w3tc_get_extension_config('cloudflare','timelimit.api_request', null, 180));
327
+ delete_transient('w3tc_cloudflare_settings');
328
+ return $this->api_request('fpurge_ts', 1);
329
+ }
330
+
331
+ /**
332
+ * If minify is enabled at all
333
+ * @return bool
334
+ */
335
+ public function minify_enabled() {
336
+ $settings = $this->get_settings();
337
+ return $settings['minify'] > 0;
338
+ }
339
+
340
+ /**
341
+ * @param $cf_values
342
+ * @return bool
343
+ */
344
+ public function save_settings($cf_values) {
345
+ @set_time_limit(w3tc_get_extension_config('cloudflare','timelimit.api_request', null, 180));
346
+ ksort($cf_values);
347
+ $cf_values = $this->_cleanup_settings($cf_values);
348
+ foreach ($cf_values as $key => $settings) {
349
+ if ($settings['old'] != $settings['new']) {
350
+ $response = $this->api_request($key, $settings['new']);
351
+ if (!$response || ($response && $response->result != 'success')) {
352
+ return false;
353
+ }
354
+ }
355
+ }
356
+ delete_transient('w3tc_cloudflare_settings');
357
+ return true;
358
+ }
359
+
360
+ /**
361
+ * Takes an array with posted CF settings and reformat it.
362
+ * @param $settings
363
+ * @return array
364
+ */
365
+ private function _cleanup_settings($settings) {
366
+ $keys = array_keys($this->get_options());
367
+ $clean_settings = array();
368
+ foreach ($settings as $key => $value) {
369
+ $setting = substr($key, 0, strlen($key)-4);
370
+ if (in_array($setting, $keys)) {
371
+ if (strpos($key, '_old') !== false) {
372
+ $clean_settings[$setting]['old'] = $value;
373
+ } elseif (strpos($key, '_new') !== false) {
374
+ $clean_settings[$setting]['new'] = $value;
375
+ }
376
+ }
377
+ }
378
+ return $clean_settings;
379
+ }
380
+
381
+ /*
382
+ * Resets settings cache
383
+ */
384
+ public function reset_settings_cache() {
385
+ return delete_transient('w3tc_cloudflare_settings');
386
+ }
387
+ }
extensions/CloudFlare/CloudFlareSettings.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('W3TC')) { die(); }
3
+
4
+ class CloudFlareSettings extends W3_UI_Settings_SettingsBase{
5
+ protected function strings() {
6
+ return array(
7
+ 'general' => array(
8
+ 'cloudflare.enabled' => __('CloudFlare:', 'w3-total-cache'),
9
+ 'cloudflare.email' => __('CloudFlare account email:', 'w3-total-cache'),
10
+ 'cloudflare.key' => __('<abbr title="Application Programming Interface">API</abbr> key:', 'w3-total-cache'),
11
+ 'cloudflare.zone' => __('Domain:', 'w3-total-cache'),
12
+
13
+ ),
14
+ 'settings' => array(
15
+ 'cloudflare.ips.ip4' => __('Cloudflare <abbr title="Internet Protocol">IPs</abbr> <abbr title="Internet Protocol version 4">IP4</abbr> addresses', 'w3-total-cache'),
16
+ 'cloudflare.ips.ip6' => __('Cloudflare <abbr title="Internet Protocol">IPs</abbr> <abbr title="Internet Protocol version 6">IP6</abbr> addresses', 'w3-total-cache')
17
+ )
18
+ );
19
+ }
20
+ }
extensions/CloudFlare/general-settings-box.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php echo w3tc_postbox_header(__('Network Performance &amp; Security powered by CloudFlare', 'w3-total-cache'), '', 'cloudflare'); ?>
2
+ <p>
3
+ <?php _e('CloudFlare protects and accelerates websites.', 'w3-total-cache') ?>
4
+ </p>
5
+
6
+ <table class="form-table">
7
+ <tr>
8
+ <th><?php w3_e_config_label('cloudflare.enabled', 'general') ?></th>
9
+ <td>
10
+ <label>
11
+ <?php
12
+ list($name, $id) = w3tc_get_name_and_id('cloudflare', 'enabled');
13
+ w3_ui_element('checkbox', 'cloudflare.enabled', $name, w3tc_get_extension_config('cloudflare', 'enabled'), w3_extension_is_sealed('cloudflare')); ?>
14
+ &nbsp;<strong><?php _e('Enable', 'w3-total-cache'); ?></strong></label>
15
+ </td>
16
+ </tr>
17
+ <tr>
18
+ <?php
19
+ list($name, $id) = w3tc_get_name_and_id('cloudflare', 'email'); ?>
20
+
21
+ <th><label for="cloudflare_email"><?php w3_e_config_label('cloudflare.email', 'general') ?></label></th>
22
+ <td>
23
+ <?php w3_ui_element('textbox', 'cloudflare.email', $name, w3tc_get_extension_config('cloudflare', 'email'), w3_extension_is_sealed('cloudflare')); ?>
24
+ </td>
25
+ </tr>
26
+ <tr>
27
+ <?php
28
+ list($name, $id) = w3tc_get_name_and_id('cloudflare', 'key'); ?>
29
+
30
+ <th><label for="cloudflare_key"><?php w3_e_config_label('cloudflare.key', 'general') ?></label></th>
31
+ <td>
32
+ <?php w3_ui_element('password', 'cloudflare.key', $name, w3tc_get_extension_config('cloudflare', 'key'), w3_extension_is_sealed('cloudflare')); ?>
33
+ (<a href="https://www.cloudflare.com/my-account.html"><?php _e('find it here', 'w3-total-cache'); ?></a>)
34
+ </td>
35
+ </tr>
36
+ <tr>
37
+ <?php
38
+ list($name, $id) = w3tc_get_name_and_id('cloudflare', 'zone'); ?>
39
+ <th><?php w3_e_config_label('cloudflare.zone', 'general') ?></th>
40
+ <td>
41
+ <?php w3_ui_element('textbox', 'cloudflare.zone', $name, w3tc_get_extension_config('cloudflare', 'zone'), w3_extension_is_sealed('cloudflare')); ?>
42
+ </td>
43
+ </tr>
44
+ <tr>
45
+ <th><?php _e('Security level:', 'w3-total-cache'); ?></th>
46
+ <td>
47
+ <input type="hidden" name="cloudflare_sec_lvl_old" value="<?php echo $cloudflare_seclvl; ?>" />
48
+ <select name="cloudflare_sec_lvl_new"
49
+ class="w3tc-ignore-change"
50
+ <?php w3tc_sealing_disabled('cloudflare'); ?>>
51
+ <?php foreach ($cloudflare_seclvls as $cloudflare_seclvl_key => $cloudflare_seclvl_label): ?>
52
+ <option value="<?php echo esc_attr($cloudflare_seclvl_key); ?>"<?php selected($cloudflare_seclvl, $cloudflare_seclvl_key); ?>><?php echo $cloudflare_seclvl_label; ?></option>
53
+ <?php endforeach; ?>
54
+ </select>
55
+ </td>
56
+ </tr>
57
+ <tr>
58
+ <th><?php _e('Rocket Loader:', 'w3-total-cache'); ?></th>
59
+ <td>
60
+ <input type="hidden" name="cloudflare_async_old" value="<?php echo $cloudflare_rocket_loader; ?>" />
61
+ <select name="cloudflare_async_new"
62
+ class="w3tc-ignore-change"
63
+ <?php w3tc_sealing_disabled('cloudflare'); ?>>
64
+ <?php foreach ($cloudflare_rocket_loaders as $cloudflare_rocket_loader_key => $cloudflare_rocket_loader_label): ?>
65
+ <option value="<?php echo $cloudflare_rocket_loader_key; ?>"<?php selected($cloudflare_rocket_loader, $cloudflare_rocket_loader_key); ?>><?php echo $cloudflare_rocket_loader_label; ?></option>
66
+ <?php endforeach; ?>
67
+ </select>
68
+ </td>
69
+ </tr>
70
+ <tr>
71
+ <th><?php _e('Minification:', 'w3-total-cache'); ?></th>
72
+ <td>
73
+ <input type="hidden" name="cloudflare_minify_old" value="<?php echo $cloudflare_minify; ?>" />
74
+ <select name="cloudflare_minify_new"
75
+ class="w3tc-ignore-change"
76
+ <?php w3tc_sealing_disabled('cloudflare'); ?>>
77
+ <?php foreach ($cloudflare_minifications as $cloudflare_minify_key => $cloudflare_minify_label): ?>
78
+ <option value="<?php echo esc_attr($cloudflare_minify_key); ?>"<?php selected($cloudflare_minify, $cloudflare_minify_key); ?>><?php echo $cloudflare_minify_label; ?></option>
79
+ <?php endforeach; ?>
80
+ </select>
81
+ </td>
82
+ </tr>
83
+ <tr>
84
+ <th><?php _e('Development mode:', 'w3-total-cache'); ?></th>
85
+ <td>
86
+ <input type="hidden" name="cloudflare_devmode_old" value="<?php echo $cloudflare_devmode; ?>" />
87
+ <select name="cloudflare_devmode_new"
88
+ class="w3tc-ignore-change"
89
+ <?php w3tc_sealing_disabled('cloudflare'); ?>>
90
+ <?php foreach ($cloudflare_devmodes as $cloudflare_devmode_key => $cloudflare_devmode_label): ?>
91
+ <option value="<?php echo esc_attr($cloudflare_devmode_key); ?>"<?php selected($cloudflare_devmode, $cloudflare_devmode_key); ?>><?php echo $cloudflare_devmode_label; ?></option>
92
+ <?php endforeach; ?>
93
+ </select>
94
+ <?php if ($cloudflare_devmode_expire): ?>
95
+ <?php echo sprintf( __('Will automatically turn off at %s', 'w3-total-cache'), date('m/d/Y H:i:s', $cloudflare_devmode_expire) ); ?>>
96
+ <?php endif; ?>
97
+ </td>
98
+ </tr>
99
+ <?php if (is_network_admin() && !w3_force_master()): ?>
100
+ <tr>
101
+ <th><?php _e('Network policy:', 'w3-total-cache'); ?></th>
102
+ <td>
103
+ <?php w3tc_checkbox_admin('cloudflare.configuration_sealed'); ?> <?php _e('Apply the settings above to the entire network.', 'w3-total-cache'); ?></label>
104
+ </td>
105
+ </tr>
106
+ <?php endif; ?>
107
+ </table>
108
+
109
+ <p class="submit">
110
+ <?php echo w3tc_nonce_field('w3tc'); ?>
111
+ <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save all settings', 'w3-total-cache'); ?>" />
112
+ <input id="cloudflare_purge_cache" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Purge cache', 'w3-total-cache'); ?>"<?php if (! $cloudflare_enabled): ?> disabled="disabled"<?php endif; ?> />
113
+ </p>
114
+ <?php echo w3tc_postbox_footer(); ?>
{inc/functions → extensions/CloudFlare}/ip_in_range.php RENAMED
File without changes
extensions/CloudFlareAdmin.php ADDED
@@ -0,0 +1,329 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Created by PhpStorm.
4
+ * User: Andreas
5
+ * Date: 2014-02-21
6
+ * Time: 09:47
7
+ */
8
+
9
+ class CloudFlareAdmin {
10
+ /**
11
+ * @var W3_Config
12
+ */
13
+ private $_config;
14
+ /**
15
+ * @var CloudFlareAPI
16
+ */
17
+ private $cloudflareAPI;
18
+
19
+ function run() {
20
+ if (w3_is_extension_active('cloudflare'))
21
+ $this->init();
22
+ add_filter('w3tc_extensions', array($this, 'extension'), 10, 2);
23
+ }
24
+
25
+ private function init() {
26
+ $this->_config = w3_instance('W3_Config');
27
+ add_filter('w3tc_save_options', array($this, 'save_settings'),10,3);
28
+ add_filter('w3tc_general_anchors', array($this, 'general_settings_anchors'));
29
+ add_filter('w3tc_errors', array($this, 'register_error'));
30
+ add_filter('w3tc_dashboard_actions', array($this, 'dashboard_actions'));
31
+ add_action('w3tc_general_boxarea_cloudflare',array($this, 'general_settings_box'));
32
+
33
+ w3_require_once(W3TC_LIB_W3_DIR . '/Request.php');
34
+ $page = W3_Request::get_string('page');
35
+ if ($page && strpos($page, 'w3tc_') !== false) {
36
+ /**
37
+ * Only admin can see W3TC notices and errors
38
+ */
39
+ add_action('admin_notices', array(
40
+ $this,
41
+ 'admin_notices'
42
+ ));
43
+ add_action('network_admin_notices', array(
44
+ $this,
45
+ 'admin_notices'
46
+ ));
47
+ }
48
+ add_action('wp_ajax_w3tc_cloudflare_api_request', array($this, 'action_cloudflare_api_request'));
49
+
50
+
51
+ w3_require_once(W3TC_CORE_EXTENSION_DIR . '/CloudFlare/CloudFlareAPI.php');
52
+ $this->cloudflareAPI = new CloudFlareAPI();
53
+
54
+ if (w3tc_get_extension_config('cloudflare', 'enabled', $this->_config, false)) {
55
+ $this->check_ip_versions();
56
+ }
57
+
58
+ add_filter('w3tc_setting_label', array($this, 'setting_label'));
59
+ add_filter('w3tc_custom_module_settings', array($this, 'set_settings_class'));
60
+ add_filter("w3tc_extension_plugin_links-cloudflare", array($this, 'extension_settings_link'));
61
+ }
62
+ function extension_settings_link($links) {
63
+ $links = array();
64
+ $links[] = '<a class="edit" href="' . esc_attr(w3_admin_url('admin.php?page=w3tc_general#cloudflare')).'">'. __('Settings').'</a>';
65
+
66
+ return $links;
67
+ }
68
+ function set_settings_class($modules) {
69
+ $modules['cloudflare'] = array($this, 'load_settings_class');
70
+ return $modules;
71
+ }
72
+
73
+ function load_settings_class() {
74
+ w3_require_once(W3TC_CORE_EXTENSION_DIR . '/CloudFlare/CloudFlareSettings.php');
75
+ return new CloudFlareSettings();
76
+ }
77
+
78
+ /**
79
+ * @param $extensions
80
+ * @param W3_Config $config
81
+ * @return mixed
82
+ */
83
+ function extension($extensions, $config) {
84
+ global $current_user;
85
+ $message = array();
86
+ $message[] = 'CloudFlare';
87
+ $cloudflare_signup_email = '';
88
+ $cloudflare_signup_user = '';
89
+
90
+ if (is_a($current_user, 'WP_User')) {
91
+ if ($current_user->user_email) {
92
+ $cloudflare_signup_email = $current_user->user_email;
93
+ }
94
+
95
+ if ($current_user->user_login && $current_user->user_login != 'admin') {
96
+ $cloudflare_signup_user = $current_user->user_login;
97
+ }
98
+ }
99
+ $extensions['cloudflare'] = array (
100
+ 'name' => 'CloudFlare',
101
+ 'author' => 'W3 EDGE',
102
+ 'description' => sprintf( __('CloudFlare protects and accelerates websites. <a href="%s" target="_blank">Sign up now for free</a> to get started,
103
+ or if you have an account simply log in to obtain your <abbr title="Application Programming Interface">API</abbr> key from the <a target="_blank" href="https://www.cloudflare.com/my-account">account page</a> to enter it on the General Settings box that appears after plugin activation.
104
+ Contact the CloudFlare <a href="http://www.cloudflare.com/help.html" target="_blank">support team</a> with any questions.', 'w3-total-cache'), 'https://www.cloudflare.com/sign-up.html?affiliate=w3edge&amp;seed_domain=' . w3_get_host() . '&amp;email=' . htmlspecialchars($cloudflare_signup_email) . '&amp;username=' . htmlspecialchars($cloudflare_signup_user) ),
105
+ 'author uri' => 'http://www.w3-edge.com/',
106
+ 'extension uri' => 'http://www.w3-edge.com/',
107
+ 'extension id' => 'cloudflare',
108
+ 'version' => '1.0',
109
+ 'enabled' => true,
110
+ 'requirements' => implode(', ', $message),
111
+ 'path' => 'w3-total-cache/extensions/CloudFlare.php'
112
+ );
113
+
114
+ return $extensions;
115
+ }
116
+
117
+ public function register_error($errors) {
118
+ if ($error = $this->cloudflareAPI->check_lasterror()) {
119
+ $errors[] = $error;
120
+ }elseif(W3_Request::get_string('w3tc_error')) {
121
+ $errors[] = __('Unable to make CloudFlare API request.', 'w3-total-cache');
122
+ }
123
+ return $errors;
124
+ }
125
+
126
+ public function register_notifications($notes) {
127
+ $notes['flush_all_except_cf'] = __('All caches except CloudFlare successfully emptied.', 'w3-total-cache');
128
+ $notes['cloudflare_api_request'] = __('Unable to make CloudFlare API request.', 'w3-total-cache');
129
+ return $notes;
130
+ }
131
+ public function dashboard_actions($actions) {
132
+ $cloudflare_enabled = true;
133
+
134
+ if ($cloudflare_enabled && w3tc_get_extension_config('cloudflare','email') && w3tc_get_extension_config('cloudflare','key')) {
135
+ $can_empty_cloudflare = true;
136
+ } else {
137
+ $can_empty_cloudflare = false;
138
+ }
139
+ $modules = w3_instance('W3_ModuleStatus');
140
+ $can_empty_memcache = $modules->can_empty_memcache();
141
+ $can_empty_opcode = $modules->can_empty_opcode();
142
+ $can_empty_file = $modules->can_empty_file();
143
+ $can_empty_varnish = $modules->can_empty_varnish();
144
+
145
+ $actions[] = ' or <input id="flush_all_except_cf" class="button" type="submit" name="w3tc_flush_all_except_cf" value="'.
146
+ __('empty all caches except CloudFlare', 'w3-total-cache').'"'.
147
+ ((! $can_empty_memcache && ! $can_empty_opcode && ! $can_empty_file && ! $can_empty_varnish) ?
148
+ 'disabled="disabled"':'') . '> ' . __('at once', 'w3-total-cache');
149
+ return $actions;
150
+ }
151
+ /**
152
+ * Check if last check has expired. If so update CloudFlare ips
153
+ */
154
+ function check_ip_versions() {
155
+ $checked = get_transient('w3tc_cloudflare_ip_check');
156
+
157
+ if (false === $checked) {
158
+ try {
159
+ $this->cloudflareAPI->update_ip_ranges();
160
+ } catch (Exception $ex) {}
161
+ set_transient('w3tc_cloudflare_ip_check', time(), 3600*24);
162
+ }
163
+ }
164
+
165
+ function admin_notices() {
166
+ $plugins = get_plugins();
167
+ if (array_key_exists('cloudflare/cloudflare.php', $plugins) && $this->_config->get_boolean('notes.cloudflare_plugin')) {
168
+ w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/other.php');
169
+ echo sprintf('<div class="error"><p>%s %s</p></div>', __('CloudFlare plugin detected. We recommend removing the
170
+ plugin as it offers no additional capabilities when W3 Total Cache is installed. This message will disappear
171
+ when CloudFlare is removed.', 'w3-total-cache'),
172
+ w3tc_button_hide_note('Hide this message', 'cloudflare_plugin')
173
+ );
174
+ }
175
+ }
176
+
177
+
178
+ /**
179
+ * Send CloudFlare API request
180
+ *
181
+ * @return void
182
+ */
183
+ function action_cloudflare_api_request() {
184
+ $result = false;
185
+ $response = null;
186
+
187
+ $actions = array(
188
+ 'devmode',
189
+ 'sec_lvl',
190
+ 'fpurge_ts'
191
+ );
192
+
193
+ w3_require_once(W3TC_LIB_W3_DIR . '/Request.php');
194
+
195
+ $email = W3_Request::get_string('email');
196
+ $key = W3_Request::get_string('key');
197
+ $zone = W3_Request::get_string('zone');
198
+ $action = W3_Request::get_string('command');
199
+ $value = W3_Request::get_string('value');
200
+ $nonce = W3_Request::get_string('_wpnonce');
201
+
202
+ if (!wp_verify_nonce($nonce, 'w3tc')) {
203
+ $error ='Access denied.';
204
+ } elseif (!$email) {
205
+ $error = 'Empty email.';
206
+ } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
207
+ $error = 'Invalid email.';
208
+ } elseif (!$key) {
209
+ $error = 'Empty key.';
210
+ } elseif (!$zone) {
211
+ $error = 'Empty zone.';
212
+ } elseif (strpos($zone, '.') === false) {
213
+ $error = 'Invalid domain.';
214
+ } elseif (!in_array($action, $actions)) {
215
+ $error = 'Invalid action.';
216
+ } else {
217
+ $config = array(
218
+ 'email' => $email,
219
+ 'key' => $key,
220
+ 'zone' => $zone
221
+ );
222
+
223
+ w3_require_once(W3TC_CORE_EXTENSION_DIR. '/CloudFlare/CloudFlareAPI.php');
224
+ @$this->cloudflareAPI = new CloudFlareAPI($config);
225
+
226
+ @set_time_limit(w3tc_get_extension_config('cloudflare','timelimit.api_request', $this->_config, 180));
227
+ $response = $this->cloudflareAPI->api_request($action, $value);
228
+
229
+ if ($response) {
230
+ if ($response->result == 'success') {
231
+ $result = true;
232
+ $error = 'OK';
233
+ } else {
234
+ $error = $response->msg;
235
+ }
236
+ } else {
237
+ $error = 'Unable to make CloudFlare API request.';
238
+ }
239
+ }
240
+
241
+ $return = array(
242
+ 'result' => $result,
243
+ 'error' => $error,
244
+ 'response' => $response
245
+ );
246
+
247
+ echo json_encode($return);
248
+ exit;
249
+ }
250
+
251
+ public function general_settings_anchors($anchors) {
252
+ $anchors[] = array('id'=>'cloudflare', 'text' => 'CloudFlare');
253
+ return $anchors;
254
+ }
255
+ public function general_settings_box() {
256
+ global $current_user;
257
+ $cloudflare_enabled = true;
258
+
259
+ $cf_options = $this->cloudflareAPI->get_options();
260
+ $cloudflare_seclvls = $cf_options['sec_lvl'];
261
+ $cloudflare_devmodes = $cf_options['dev_mode'];
262
+
263
+ $cloudflare_rocket_loaders = $cf_options['async'];
264
+ $cloudflare_minifications = $cf_options['minify'];
265
+
266
+ $cloudflare_seclvl = 'med';
267
+ $cloudflare_devmode_expire = 0;
268
+ $cloudflare_devmode = 0;
269
+ $cloudflare_rocket_loader = 0;
270
+ $cloudflare_minify = 0;
271
+
272
+ if ($cloudflare_enabled && w3tc_get_extension_config('cloudflare', 'email') && w3tc_get_extension_config('cloudflare', 'key')) {
273
+ $settings = $this->cloudflareAPI->get_settings();
274
+ $cloudflare_seclvl = $settings['sec_lvl'];
275
+ $cloudflare_devmode_expire = $settings['devmode'];
276
+ $cloudflare_rocket_loader = $settings['async'];
277
+ $cloudflare_devmode = ($cloudflare_devmode_expire ? 1 : 0);
278
+ $cloudflare_minify = $settings['minify'];
279
+ $can_empty_cloudflare = true;
280
+ } else {
281
+ $can_empty_cloudflare = false;
282
+ }
283
+
284
+ include W3TC_CORE_EXTENSION_DIR . '/CloudFlare/general-settings-box.php';
285
+ }
286
+
287
+ /**
288
+ * Flsuh all caches except CloudFlare
289
+ */
290
+ function action_flush_all_except_cf() {
291
+ //$this->flush_all(false);
292
+
293
+ w3_admin_redirect(array(
294
+ 'w3tc_note' => 'flush_all_except_cf'
295
+ ), true);
296
+ }
297
+
298
+ /**
299
+ * @param W3_Config $config
300
+ * @param $old
301
+ * @param $config_admin
302
+ * @return \W3_Config
303
+ */
304
+ public function save_settings($config, $old, $config_admin) {
305
+ w3_require_once(W3TC_CORE_EXTENSION_DIR . '/CloudFlare/CloudFlareAPI.php');
306
+ $this->cloudflareAPI = new CloudFlareAPI();
307
+ $this->cloudflareAPI->reset_settings_cache();
308
+ if ((boolean)w3tc_get_extension_config('cloudflare', 'enabled') && $this->cloudflareAPI->minify_enabled() && $config->get_boolean('minify.enabled')) {
309
+ $config->set('minify.enabled',false);
310
+ }
311
+
312
+ /**
313
+ * Handle CloudFlare changes
314
+ */
315
+ if (((w3_get_blog_id() == 0) ||
316
+ (w3_get_blog_id() != 0 && !w3_extension_is_sealed('cloudflare'))
317
+ )) {
318
+ /**
319
+ * @var $this->cloudflareAPI W3_CloudFlare
320
+ */
321
+ $cf_values = W3_Request::get_as_array('cloudflare_');
322
+ $this->cloudflareAPI->save_settings($cf_values);
323
+ }
324
+ return $config;
325
+ }
326
+ }
327
+
328
+ $cf = new CloudFlareAdmin();
329
+ $cf->run();
extensions/FeedBurner.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class W3_FeedBurner {
4
+ /**
5
+ * @var W3_Config $_config
6
+ */
7
+ private $_config;
8
+
9
+ function run() {
10
+ $this->_config = w3_instance('W3_Config');
11
+ add_action('publish_post', array(
12
+ &$this,
13
+ 'flush_feedburner'
14
+ ), 100, 1);
15
+ }
16
+
17
+ /**
18
+ * If FeedBurner is enabled flush the registered FB feeds
19
+ */
20
+ function flush_feedburner($post_id) {
21
+ if (!w3_is_flushable_post($post_id, 'pgcache', $this->_config)) {
22
+ return;
23
+ }
24
+ $fb_urls = w3tc_get_extension_config('feedburner','urls');
25
+ if ($fb_urls)
26
+ $fb_urls = explode("\n", $fb_urls);
27
+
28
+ $fb_urls[] = home_url();
29
+ foreach($fb_urls as $url) {
30
+ wp_remote_get('http://feedburner.google.com/fb/a/pingSubmit?bloglink=' . urlencode($url));
31
+ }
32
+ }
33
+ }
34
+
35
+
36
+ $ext = new W3_FeedBurner();
37
+ $ext->run();
extensions/FeedBurnerAdmin.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * W3 FeedBurner module
4
+ */
5
+ if (!defined('W3TC')) {
6
+ die();
7
+ }
8
+
9
+ class W3_FeedBurnerAdmin {
10
+ function run() {
11
+ add_action('admin_init', array($this, 'admin_init'));
12
+ add_filter('w3tc_extensions', array($this, 'extension'), 10, 2);
13
+ add_action('w3tc_extensions_page-feedburner', array($this, 'extension_header'));
14
+ }
15
+
16
+
17
+ /**
18
+ * Setups sections
19
+ */
20
+ function admin_init() {
21
+ w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/extensions.php');
22
+ // Register our settings field group
23
+ w3tc_add_settings_section(
24
+ 'ping', // Unique identifier for the settings section
25
+ 'Ping FeedBurner', // Section title
26
+ '__return_false', // Section callback (we don't want anything)
27
+ 'feedburner' // extension id, used to uniquely identify the extension;
28
+ );
29
+
30
+ $settings = $this->settings();
31
+ foreach($settings as $setting => $meta) {
32
+ /**
33
+ * @var $label
34
+ * @var $description
35
+ * @var $section
36
+ * @var $type
37
+ */
38
+ extract($meta);
39
+ w3tc_add_settings_field($setting, $label,
40
+ array($this, 'print_setting'), 'feedburner', $section,
41
+ array('label_for'=>$setting, 'type'=>$type,
42
+ 'description' => $description));
43
+ }
44
+ }
45
+
46
+ /**
47
+ * Display if caching or not.
48
+ */
49
+ function extension_header() {
50
+ $config = w3_instance('W3_Config');
51
+ echo '<p>';
52
+ printf(__('The FeedBurner extension is currently %s ', 'w3-total-cache'),
53
+ '<span class="w3tc-enabled">' . __('enabled', 'w3-total-cache') . '</span>');
54
+ echo '.</p>';
55
+ }
56
+
57
+
58
+ /**
59
+ *
60
+ * @param $setting
61
+ * @param $args
62
+ */
63
+ function print_setting($setting, $args) {
64
+ w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/extensions.php');
65
+ list($name, $id) = w3tc_get_name_and_id('feedburner', $setting);
66
+ w3_ui_element($args['type'], $setting, $name, w3tc_get_extension_config('feedburner', $setting), w3_extension_is_sealed('feedburner'));
67
+ }
68
+
69
+
70
+ /**
71
+ * @param $extensions
72
+ * @param W3_Config $config
73
+ * @return mixed
74
+ */
75
+ function extension($extensions, $config) {
76
+ $message = array();
77
+ $message[] = 'FeedBurner';
78
+
79
+ $extensions['feedburner'] = array (
80
+ 'name' => 'FeedBurner',
81
+ 'author' => 'W3 EDGE',
82
+ 'description' => sprintf(__('Automatically ping (purge) FeedBurner feeds when pages / posts are modified. Default URL: %s', 'w3-total-cache'),
83
+ !is_network_admin() ? home_url() : __('Network Admin has no main URL.', 'w3-total-cache')),
84
+
85
+ 'author uri' => 'http://www.w3-edge.com/',
86
+ 'extension uri' => 'http://www.w3-edge.com/',
87
+ 'extension id' => 'feedburner',
88
+ 'version' => '0.1',
89
+ 'enabled' => true,
90
+ 'requirements' => implode(', ', $message),
91
+ 'path' => 'w3-total-cache/extensions/FeedBurner.php'
92
+ );
93
+
94
+ return $extensions;
95
+ }
96
+ /**
97
+ * @return array
98
+ */
99
+ function settings() {
100
+ return
101
+ array(
102
+ 'urls' =>
103
+ array(
104
+ 'type' => 'textarea',
105
+ 'section' => 'ping',
106
+ 'label' => __('Additional URLs:', 'w3-total-cache'),
107
+ 'description' => __('Specify any additional feed URLs to ping on FeedBurner.', 'w3-total-cache')
108
+ ),
109
+ );
110
+ }
111
+ }
112
+
113
+ $ext = new W3_FeedBurnerAdmin();
114
+ $ext->run();
extensions/Genesis.php CHANGED
@@ -14,7 +14,8 @@ class W3_Genesis {
14
  function run() {
15
  add_action('w3tc_register_fragment_groups', array($this, 'register_groups'));
16
  $this->_config = w3_instance('W3_Config');
17
- if ($this->_config->get_boolean('fragmentcache.enabled')) {
 
18
  if (!is_admin()) {
19
  /**
20
  * Register the caching of content to specific hooks
@@ -32,7 +33,8 @@ class W3_Genesis {
32
  /**
33
  * Since posts pages etc are cached individually need to be able to flush just those and not all fragment
34
  */
35
- add_action('clean_post_cache', array($this, 'flush_post_fragment'), 1);
 
36
 
37
  $this->_request_uri = $_SERVER['REQUEST_URI'];
38
  }
@@ -104,68 +106,34 @@ class W3_Genesis {
104
  * @return array|null
105
  */
106
  private function _get_id_group($hook, $current_menu = false) {
107
- if (is_user_logged_in() && w3tc_get_extension_config('genesis.theme', 'fragment_reject_logged_roles')) {
108
-
109
- $current_user = wp_get_current_user();
110
- $roles = w3tc_get_extension_config('genesis.theme', 'fragment_reject_roles');
111
- if (empty($roles))
112
- return true;
113
-
114
- $hooks = w3tc_get_extension_config('genesis.theme', 'fragment_reject_logged_roles_on_actions');
115
-
116
- foreach($roles as $role) {
117
- if ($hooks && current_user_can($role) && in_array($hook, $hooks)) {
118
- return null ;
119
- }
120
- }
 
 
 
 
 
 
 
 
121
  }
122
-
123
- $group = $hook;
124
- if (strpos($hook, 'sidebar')) {
125
- $genesis_id = $hook;
126
- $group = 'sidebar';
127
- } elseif ($hook == 'genesis_loop') {
128
- if (is_front_page()) {
129
- $group = 'loop_front_page';
130
- if (is_paged()) {
131
- global $wp_query;
132
- $page = $wp_query->query_vars['paged'];
133
- $genesis_id = "{$page}_$hook";
134
- } else
135
- $genesis_id = $hook;
136
- } else {
137
- $group = 'loop_single';
138
-
139
- if (is_paged()) {
140
- global $wp_query;
141
- $page = $wp_query->query_vars['paged'];
142
- $genesis_id = get_the_ID(). "_{$page}_$hook";
143
- } else
144
- $genesis_id = get_the_ID(). "_$hook";
145
- }
146
- } elseif ($hook == 'genesis_comments' || $hook == 'genesis_pings'){
147
- if ($hook == 'genesis_comments' && is_user_logged_in())
148
- return null;
149
-
150
- $group = 'loop_single_' . $hook;
151
- if (is_paged()) {
152
- global $wp_query;
153
- $page = $wp_query->query_vars['paged'];
154
- $genesis_id = get_the_ID(). "_{$page}_$hook";
155
- } else
156
- $genesis_id = get_the_ID()."_$hook";
157
- } elseif (strpos($hook, '_nav') && $current_menu) {
158
- if (is_front_page()) {
159
- $genesis_id = 0;
160
- } else {
161
- $genesis_id = get_the_ID();
162
- }
163
- } else
164
- $genesis_id = $hook;
165
 
166
  if ($this->_cache_group($group) && !$this->_exclude_page($group)) {
167
  return array($genesis_id, $this->_genesis_group($group, true));
168
  }
 
169
  return null;
170
  }
171
 
@@ -176,7 +144,7 @@ class W3_Genesis {
176
  * @return array|bool|int|null|string
177
  */
178
  private function _cache_group($group) {
179
- return w3tc_get_extension_config('genesis.theme', $group);
180
  }
181
 
182
  /**
@@ -231,7 +199,9 @@ class W3_Genesis {
231
  $this->_genesis_group('loop_single') => array(
232
  'no_action'),
233
  $this->_genesis_group('loop_front_page') => array(
234
- 'clean_post_cache')
 
 
235
  );
236
  foreach($groups as $group => $actions)
237
  w3tc_register_fragment_group($group, $actions, 3600);
@@ -246,16 +216,136 @@ class W3_Genesis {
246
  * @var W3_SharedPageUrls $W3_SharedPageUrls
247
  */
248
  $W3_SharedPageUrls = w3_instance('W3_SharedPageUrls');
 
249
  $urls = $W3_SharedPageUrls->get_post_urls($post_ID);
250
  $hooks = array('genesis_loop', 'genesis_comments', 'genesis_pings');
251
  foreach($hooks as $hook) {
252
- w3tc_fragmentcache_flush_fragment("{$post_ID}_$hook", $this->_genesis_group('loop_single_logged_in'));
253
- w3tc_fragmentcache_flush_fragment("{$post_ID}_$hook", $this->_genesis_group('loop_single'));
 
 
 
254
  for($page = 0; $page<=sizeof($urls); $page++) {
255
- w3tc_fragmentcache_flush_fragment("{$post_ID}_$hook", $this->_genesis_group('loop_single_logged_in'));
256
- w3tc_fragmentcache_flush_fragment("{$post_ID}_$hook", $this->_genesis_group('loop_single'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  }
258
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
259
  }
260
  }
261
 
14
  function run() {
15
  add_action('w3tc_register_fragment_groups', array($this, 'register_groups'));
16
  $this->_config = w3_instance('W3_Config');
17
+ if ((w3_is_pro($this->_config) || w3_is_enterprise($this->_config)) &&
18
+ $this->_config->get_boolean('fragmentcache.enabled')) {
19
  if (!is_admin()) {
20
  /**
21
  * Register the caching of content to specific hooks
33
  /**
34
  * Since posts pages etc are cached individually need to be able to flush just those and not all fragment
35
  */
36
+ add_action('clean_post_cache', array($this, 'flush_post_fragment'));
37
+ add_action('clean_post_cache', array($this, 'flush_terms_fragment'), 0, 0);
38
 
39
  $this->_request_uri = $_SERVER['REQUEST_URI'];
40
  }
106
  * @return array|null
107
  */
108
  private function _get_id_group($hook, $current_menu = false) {
109
+ if ($this->cannot_cache_current_hook()) {
110
+ return null;
111
+ }
112
+ switch (true) {
113
+ case $keys = $this->generate_sidebar_keys():
114
+ list($group, $genesis_id) = $keys;
115
+ break;
116
+ case $keys = $this->generate_genesis_loop_keys():
117
+ list($group, $genesis_id) = $keys;
118
+ break;
119
+ case $keys = $this->generate_genesis_comments_pings_keys():
120
+ list($group, $genesis_id) = $keys;
121
+ break;
122
+ case $keys = $this->generate_genesis_navigation_keys($current_menu):
123
+ list($group, $genesis_id) = $keys;
124
+ break;
125
+ default:
126
+ $group = $hook;
127
+ $genesis_id = $this->get_page_slug();
128
+ if (is_paged())
129
+ $genesis_id .= $this->get_paged_page_key();
130
+ break;
131
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
 
133
  if ($this->_cache_group($group) && !$this->_exclude_page($group)) {
134
  return array($genesis_id, $this->_genesis_group($group, true));
135
  }
136
+
137
  return null;
138
  }
139
 
144
  * @return array|bool|int|null|string
145
  */
146
  private function _cache_group($group) {
147
+ return w3tc_get_extension_config('genesis.theme', $group);
148
  }
149
 
150
  /**
199
  $this->_genesis_group('loop_single') => array(
200
  'no_action'),
201
  $this->_genesis_group('loop_front_page') => array(
202
+ 'clean_post_cache'),
203
+ $this->_genesis_group('loop_terms') => array(
204
+ 'no_action')
205
  );
206
  foreach($groups as $group => $actions)
207
  w3tc_register_fragment_group($group, $actions, 3600);
216
  * @var W3_SharedPageUrls $W3_SharedPageUrls
217
  */
218
  $W3_SharedPageUrls = w3_instance('W3_SharedPageUrls');
219
+ $page_slug = $this->get_page_slug($post_ID);
220
  $urls = $W3_SharedPageUrls->get_post_urls($post_ID);
221
  $hooks = array('genesis_loop', 'genesis_comments', 'genesis_pings');
222
  foreach($hooks as $hook) {
223
+ $genesis_id = $page_slug;
224
+ $genesis_id = "{$hook}_{$genesis_id}";
225
+
226
+ w3tc_fragmentcache_flush_fragment($genesis_id, $this->_genesis_group('loop_single_logged_in'));
227
+ w3tc_fragmentcache_flush_fragment($genesis_id, $this->_genesis_group('loop_single'));
228
  for($page = 0; $page<=sizeof($urls); $page++) {
229
+ $genesis_id = $page_slug;
230
+ $genesis_id .= $this->get_paged_page_key($page);
231
+ $genesis_id = "{$hook}_{$genesis_id}";
232
+
233
+ w3tc_fragmentcache_flush_fragment($genesis_id, $this->_genesis_group('loop_single_logged_in'));
234
+ w3tc_fragmentcache_flush_fragment($genesis_id, $this->_genesis_group('loop_single'));
235
+ }
236
+ }
237
+ }
238
+
239
+ public function flush_terms_fragment() {
240
+ if (w3tc_get_extension_config('genesis.theme', 'flush_terms')) {
241
+ w3tc_fragmentcache_flush_group('loop_terms');
242
+ }
243
+ }
244
+
245
+ /**
246
+ * @return bool
247
+ */
248
+ private function cannot_cache_current_hook() {
249
+ if (is_user_logged_in() && w3tc_get_extension_config('genesis.theme', 'reject_logged_roles')) {
250
+ $roles = w3tc_get_extension_config('genesis.theme', 'reject_roles');
251
+ if ($roles) {
252
+ $hooks = w3tc_get_extension_config('genesis.theme', 'reject_logged_roles_on_actions');
253
+ $hook = current_filter();
254
+ foreach ($roles as $role) {
255
+ if ($hooks && current_user_can($role) && in_array($hook, $hooks)) {
256
+ return true;
257
+ }
258
+ }
259
  }
260
  }
261
+ return false;
262
+ }
263
+
264
+ /**
265
+ * @return array
266
+ */
267
+ private function generate_genesis_loop_keys() {
268
+ if (($hook = current_filter()) != 'genesis_loop')
269
+ return null;
270
+
271
+ if (is_front_page()) {
272
+ $group = 'loop_front_page';
273
+ } elseif (is_single()) {
274
+ $group = 'loop_single';
275
+ } else {
276
+ $group = 'loop_terms';
277
+ }
278
+ $genesis_id = $this->get_page_slug();
279
+ if (is_paged())
280
+ $genesis_id .= $this->get_paged_page_key();
281
+ $genesis_id = "{$hook}_{$genesis_id}";
282
+
283
+ return array($group, $genesis_id);
284
+ }
285
+
286
+ /**
287
+ * @return array
288
+ */
289
+ private function generate_sidebar_keys() {
290
+ if (strpos($hook = current_filter(), 'sidebar') !== true)
291
+ return null;
292
+
293
+ $genesis_id = $hook;
294
+ $group = 'sidebar';
295
+ return array($group, $genesis_id);
296
+ }
297
+
298
+ /**
299
+ * @return array|null
300
+ */
301
+ private function generate_genesis_comments_pings_keys() {
302
+ if (($hook = current_filter()) != 'genesis_comments')
303
+ return null;
304
+ $group = 'loop_single';
305
+
306
+ $genesis_id = $this->get_page_slug();
307
+ if (is_paged())
308
+ $genesis_id .= $this->get_paged_page_key();
309
+ $genesis_id = "{$hook}_{$genesis_id}";
310
+
311
+ return array($group, $genesis_id);
312
+ }
313
+
314
+ /**
315
+ * @param string $current_menu
316
+ * @return array|null
317
+ */
318
+ private function generate_genesis_navigation_keys($current_menu) {
319
+ if (!(strpos(($hook = current_filter()), '_nav') && $current_menu))
320
+ return null;
321
+
322
+ $genesis_id = $this->get_page_slug();
323
+ if (is_paged())
324
+ $genesis_id .= $this->get_paged_page_key();
325
+ return array($hook, $genesis_id);
326
+ }
327
+
328
+ private function get_page_slug($post_ID = null) {
329
+ if ($post_ID) {
330
+ $purl = get_permalink($post_ID);
331
+ return str_replace('/','-', trim(str_replace(home_url(), '', $purl),"/"));
332
+ }
333
+ if (is_front_page())
334
+ return 'front_page';
335
+ return str_replace('/','-', trim($_SERVER['REQUEST_URI'],"/"));
336
+ }
337
+
338
+ /**
339
+ * @param int|null $page
340
+ * @return string _pagenumber_
341
+ */
342
+ private function get_paged_page_key($page=null) {
343
+ if (is_null($page)) {
344
+ global $wp_query;
345
+ return '_' . $wp_query->query_vars['paged'] . '_';
346
+ }
347
+
348
+ return '_' . $page . '_';
349
  }
350
  }
351
 
extensions/GenesisAdmin.php CHANGED
@@ -104,7 +104,7 @@ class W3_GenesisAdmin {
104
  if ($args['type'] != 'custom')
105
  w3_ui_element($args['type'], $setting, $name, w3tc_get_extension_config('genesis.theme', $setting), w3_extension_is_sealed('genesis.theme'));
106
  else {
107
- if ($setting == 'fragment_reject_roles'):
108
  $saved_roles = w3tc_get_extension_config('genesis.theme', $setting);
109
  if (!is_array($saved_roles))
110
  $saved_roles = array();
@@ -136,11 +136,14 @@ class W3_GenesisAdmin {
136
 
137
  /**
138
  * @param $extensions
 
139
  * @return mixed
140
  */
141
  function extension($extensions, $config) {
142
- $activation_enabled = $config->get_boolean('fragmentcache.enabled');
143
- $activation_enabled = $activation_enabled && defined('PARENT_THEME_NAME') && PARENT_THEME_NAME == 'Genesis' &&
 
 
144
  defined('PARENT_THEME_VERSION') && version_compare(PARENT_THEME_VERSION, '1.9.0') >= 0;
145
  $message = array();
146
 
@@ -154,9 +157,10 @@ class W3_GenesisAdmin {
154
  }
155
  if (!$exists)
156
  $message[] = 'Genesis Framework';
157
- }elseif (!(defined('PARENT_THEME_NAME') && PARENT_THEME_NAME == 'Genesis'))
158
  $message[] = 'Genesis Framework version >= 1.9.0';
159
- if (!$config->get_boolean('fragmentcache.enabled'))
 
160
  $message[] = 'Fragment Cache (W3 Total Cache Pro)';
161
 
162
  $extensions['genesis.theme'] = array (
@@ -216,6 +220,20 @@ class W3_GenesisAdmin {
216
  'label' => __('Cache front page post loop:', 'w3-total-cache'),
217
  'description' => __('Caches the front page post loop, pagination is supported.', 'w3-total-cache')
218
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
  'loop_single' =>
220
  array(
221
  'type' => 'checkbox',
@@ -228,7 +246,7 @@ class W3_GenesisAdmin {
228
  'type' => 'textarea',
229
  'section' => 'content',
230
  'label' => __('Excluded single pages / posts:', 'w3-total-cache'),
231
- 'description' => __('List of pages / posts that should not have the single post / post loop cached. Specify one page / post per line.', 'w3-total-cache')
232
  ),
233
  'loop_single_genesis_comments' =>
234
  array(
@@ -256,7 +274,7 @@ class W3_GenesisAdmin {
256
  'type' => 'textarea',
257
  'section' => 'sidebar',
258
  'label' => __('Exclude pages:', 'w3-total-cache'),
259
- 'description' => __('List of pages that should not have sidebar cached. Specify one page / post per line.', 'w3-total-cache')
260
  ),
261
  'genesis_footer' =>
262
  array(
@@ -272,19 +290,19 @@ class W3_GenesisAdmin {
272
  'label' => __('Cache footer:', 'w3-total-cache'),
273
  'description' => __('Caches wp_footer loop.', 'w3-total-cache')
274
  ),
275
- 'fragment_reject_logged_roles' =>
276
  array('type' => 'checkbox',
277
  'section' => 'exclusions',
278
  'label' => __('Disable fragment cache:', 'w3-total-cache'),
279
  'description' => 'Don\'t use fragment cache with the following hooks and for the specified user roles.'
280
  ),
281
- 'fragment_reject_logged_roles_on_actions' =>
282
  array('type' => 'custom',
283
  'section' => 'exclusions',
284
  'label' => __('Select hooks:', 'w3-total-cache'),
285
  'description' => __('Select hooks from the list that should not be cached if user belongs to any of the roles selected below.', 'w3-total-cache')
286
  ),
287
- 'fragment_reject_roles' =>
288
  array('type' => 'custom',
289
  'section' => 'exclusions',
290
  'label' => __('Select roles:', 'w3-total-cache'),
104
  if ($args['type'] != 'custom')
105
  w3_ui_element($args['type'], $setting, $name, w3tc_get_extension_config('genesis.theme', $setting), w3_extension_is_sealed('genesis.theme'));
106
  else {
107
+ if ($setting == 'reject_roles'):
108
  $saved_roles = w3tc_get_extension_config('genesis.theme', $setting);
109
  if (!is_array($saved_roles))
110
  $saved_roles = array();
136
 
137
  /**
138
  * @param $extensions
139
+ * @param W3_Config $config
140
  * @return mixed
141
  */
142
  function extension($extensions, $config) {
143
+ $fc_enabled = ((w3_is_pro($config) || w3_is_enterprise($config)) &&
144
+ $config->get_boolean('fragmentcache.enabled'));
145
+
146
+ $activation_enabled = $fc_enabled && defined('PARENT_THEME_NAME') && PARENT_THEME_NAME == 'Genesis' &&
147
  defined('PARENT_THEME_VERSION') && version_compare(PARENT_THEME_VERSION, '1.9.0') >= 0;
148
  $message = array();
149
 
157
  }
158
  if (!$exists)
159
  $message[] = 'Genesis Framework';
160
+ } elseif (!(defined('PARENT_THEME_NAME') && PARENT_THEME_NAME == 'Genesis'))
161
  $message[] = 'Genesis Framework version >= 1.9.0';
162
+
163
+ if (!$fc_enabled)
164
  $message[] = 'Fragment Cache (W3 Total Cache Pro)';
165
 
166
  $extensions['genesis.theme'] = array (
220
  'label' => __('Cache front page post loop:', 'w3-total-cache'),
221
  'description' => __('Caches the front page post loop, pagination is supported.', 'w3-total-cache')
222
  ),
223
+ 'loop_terms' =>
224
+ array(
225
+ 'type' => 'checkbox',
226
+ 'section' => 'content',
227
+ 'label' => __('Cache author/tag/categories/term post loop:', 'w3-total-cache'),
228
+ 'description' => __('Caches the posts listed on tag, categories, author and other term pages, pagination is supported.', 'w3-total-cache')
229
+ ),
230
+ 'flush_terms' =>
231
+ array(
232
+ 'type' => 'checkbox',
233
+ 'section' => 'content',
234
+ 'label' => __('Flush posts loop:', 'w3-total-cache'),
235
+ 'description' => __('Flushes the posts loop cache on post updates. See setting above for affected loops.', 'w3-total-cache')
236
+ ),
237
  'loop_single' =>
238
  array(
239
  'type' => 'checkbox',
246
  'type' => 'textarea',
247
  'section' => 'content',
248
  'label' => __('Excluded single pages / posts:', 'w3-total-cache'),
249
+ 'description' => __('List of pages / posts that should not have the single post / post loop cached. Specify one page / post per line. This area supports regular expressions.', 'w3-total-cache')
250
  ),
251
  'loop_single_genesis_comments' =>
252
  array(
274
  'type' => 'textarea',
275
  'section' => 'sidebar',
276
  'label' => __('Exclude pages:', 'w3-total-cache'),
277
+ 'description' => __('List of pages that should not have sidebar cached. Specify one page / post per line. This area supports regular expressions.', 'w3-total-cache')
278
  ),
279
  'genesis_footer' =>
280
  array(
290
  'label' => __('Cache footer:', 'w3-total-cache'),
291
  'description' => __('Caches wp_footer loop.', 'w3-total-cache')
292
  ),
293
+ 'reject_logged_roles' =>
294
  array('type' => 'checkbox',
295
  'section' => 'exclusions',
296
  'label' => __('Disable fragment cache:', 'w3-total-cache'),
297
  'description' => 'Don\'t use fragment cache with the following hooks and for the specified user roles.'
298
  ),
299
+ 'reject_logged_roles_on_actions' =>
300
  array('type' => 'custom',
301
  'section' => 'exclusions',
302
  'label' => __('Select hooks:', 'w3-total-cache'),
303
  'description' => __('Select hooks from the list that should not be cached if user belongs to any of the roles selected below.', 'w3-total-cache')
304
  ),
305
+ 'reject_roles' =>
306
  array('type' => 'custom',
307
  'section' => 'exclusions',
308
  'label' => __('Select roles:', 'w3-total-cache'),
extensions/WordPressSEO.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class W3_WordPressSEO {
3
+ /**
4
+ * @var W3_Config
5
+ */
6
+ private $_config;
7
+
8
+ public function run() {
9
+ $this->_config = w3_instance('W3_Config');
10
+ if ($this->_config->get_boolean('cdn.enabled')) {
11
+ add_filter( 'wpseo_xml_sitemap_img_src', array($this, 'wpseo_cdn_filter' ));
12
+ }
13
+ }
14
+
15
+ /**
16
+ * Hook into WordPress SEO sitemap image filter.
17
+ * @param $uri
18
+ * @return string
19
+ */
20
+ public function wpseo_cdn_filter($uri) {
21
+ /**
22
+ * @var W3_Plugin_CdnCommon $w3_plugin_cdncommon
23
+ */
24
+ $w3_plugin_cdncommon = w3_instance('W3_Plugin_CdnCommon');
25
+ $cdn = $w3_plugin_cdncommon->get_cdn();
26
+ $parsed = parse_url($uri);
27
+ $path = $parsed['path'];
28
+ $remote_path = $w3_plugin_cdncommon->uri_to_cdn_uri($path);
29
+ $new_url = $cdn->format_url($remote_path);
30
+
31
+ return $new_url;
32
+ }
33
+ }
34
+
35
+ $ext = new W3_WordPressSEO();
36
+ $ext->run();
extensions/WordPressSEOAdmin.php ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * W3 WordPressSEOAdmin module
4
+ */
5
+ if (!defined('W3TC')) {
6
+ die();
7
+ }
8
+ class W3_WordPressSEOAdmin {
9
+ function run() {
10
+ add_action('admin_init', array($this, 'admin_init'));
11
+ add_filter('w3tc_extensions', array($this, 'extension'), 10, 2);
12
+ add_filter('w3tc_extension_plugin_links-wordpress-seo', array($this, 'remove_settings'));
13
+ add_action('w3tc_extensions_page-wordpress-seo', array($this, 'extension_header'));
14
+ add_action('w3tc_activate_extension-wordpress-seo', array($this, 'activate'));
15
+ add_action('w3tc_deactivate_extension-wordpress-seo', array($this, 'deactivate'));
16
+ }
17
+
18
+ public function admin_init() {
19
+ if (w3tc_show_extension_notification('wordpress-seo', $this->criteria_match()))
20
+ add_action('admin_notices', array($this, 'admin_notices'));
21
+ $config = w3_instance('W3_Config');
22
+ $groups = $config->get_array('mobile.rgroups');
23
+ if (w3tc_edge_mode() && isset($groups['google']) && sizeof($groups['google']['agents']) == 1 && $groups['google']['agents'][0] == 'googlebot') {
24
+ w3tc_delete_user_agent_group('google');
25
+ }
26
+ }
27
+
28
+ /**
29
+ *
30
+ */
31
+ public function admin_notices() {
32
+ w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/extensions.php');
33
+ w3_e_extension_activation_notification('WordPress SEO', 'wordpress-seo');
34
+ }
35
+
36
+ /**
37
+ * @param $links
38
+ * @return mixed
39
+ */
40
+ public function remove_settings($links) {
41
+ array_pop($links);
42
+ return $links;
43
+ }
44
+ /**
45
+ * Display if caching or not.
46
+ */
47
+ function extension_header() {
48
+ echo '<p>';
49
+ printf(__('The WordPress SEO extension is currently %s ', 'w3-total-cache'),
50
+ '<span class="w3tc-enabled">' . __('enabled', 'w3-total-cache') . '</span>');
51
+ echo '.</p>';
52
+ }
53
+
54
+ /**
55
+ * @param $extensions
56
+ * @param W3_Config $config
57
+ * @return mixed
58
+ */
59
+ function extension($extensions, $config) {
60
+ $message = array();
61
+ $message[] = 'WordPress SEO by Yoast';
62
+
63
+ $extensions['wordpress-seo'] = array (
64
+ 'name' => 'WordPress SEO by Yoast',
65
+ 'author' => 'W3 EDGE',
66
+ 'description' => __('Configures W3 Total Cache to comply with WordPress SEO requirements automatically.', 'w3-total-cache'),
67
+
68
+ 'author uri' => 'http://www.w3-edge.com/',
69
+ 'extension uri' => 'http://www.w3-edge.com/',
70
+ 'extension id' => 'wordpress-seo',
71
+ 'version' => '1.0',
72
+ 'enabled' => $this->criteria_match(),
73
+ 'requirements' => implode(', ', $message),
74
+ 'path' => 'w3-total-cache/extensions/WordPressSEO.php'
75
+ );
76
+
77
+ return $extensions;
78
+ }
79
+
80
+ private function criteria_match() {
81
+ return defined('WPSEO_VERSION');
82
+ }
83
+
84
+ public function activate() {
85
+ try {
86
+ $config = w3_instance('W3_Config');
87
+ $config->set('pgcache.prime.enabled', true);
88
+ $config->set('pgcache.prime.sitemap', '/sitemap_index.xml');
89
+ $config->save();
90
+ } catch (Exception $ex) {}
91
+ }
92
+
93
+ public function deactivate() {
94
+ try {
95
+ $config = w3_instance('W3_Config');
96
+ $config->set('pgcache.prime.enabled', false);
97
+ $config->save();
98
+ } catch (Exception $ex) {}
99
+ }
100
+ }
101
+
102
+ $ext = new W3_WordPressSEOAdmin();
103
+ $ext->run();
inc/define.php CHANGED
@@ -1,1578 +1,1626 @@
1
- <?php
2
-
3
- if (!defined('ABSPATH')) {
4
- die();
5
- }
6
-
7
- define('W3TC', true);
8
- define('W3TC_VERSION', '0.9.3');
9
- define('W3TC_POWERED_BY', 'W3 Total Cache/' . W3TC_VERSION);
10
- define('W3TC_EMAIL', 'w3tc@w3-edge.com');
11
- define('W3TC_TEXT_DOMAIN', 'w3-total-cache');
12
- define('W3TC_PAYPAL_URL', 'https://www.paypal.com/cgi-bin/webscr');
13
- define('W3TC_PAYPAL_BUSINESS', 'w3tc-team@w3-edge.com');
14
- define('W3TC_LINK_URL', 'http://www.w3-edge.com/wordpress-plugins/');
15
- define('W3TC_LINK_NAME', 'WordPress Plugins');
16
- define('W3TC_FEED_URL', 'http://feeds.feedburner.com/W3TOTALCACHE');
17
- define('W3TC_NEWS_FEED_URL', 'http://feeds.feedburner.com/W3EDGE');
18
- define('W3TC_README_URL', 'http://plugins.svn.wordpress.org/w3-total-cache/trunk/readme.txt');
19
- define('W3TC_SUPPORT_US_TIMEOUT', 2592000);
20
- define('W3TC_SUPPORT_REQUEST_URL', 'http://www.w3-edge.com/?w3tc_support_request=1');
21
- define('NEWRELIC_SIGNUP_URL', 'http://newrelic.com/w3edge');
22
- define('MAXCDN_SIGNUP_URL', 'http://tracking.maxcdn.com/c/15753/3982/378?u=https%3A%2F%2Fsecure.maxcdn.com%2F%3Fpackage%3Dstarter%26coupon%3Dw3tc');
23
- // this is the URL our updater / license checker pings. This should be the URL of the site with EDD installed
24
- if (!defined('EDD_W3EDGE_STORE_URL')) define('EDD_W3EDGE_STORE_URL', 'http://www.w3-edge.com/' );
25
- if (!defined('EDD_W3EDGE_STORE_URL_PLUGIN')) define('EDD_W3EDGE_STORE_URL_PLUGIN', 'http://www.w3-edge.com/?w3tc_buy_pro_plugin' );
26
-
27
- // the name of your product. This should match the download name in EDD exactly
28
- define('EDD_W3EDGE_W3TC_NAME', 'W3 Total Cache Pro: Annual Subscription');
29
-
30
- define('W3TC_WIN', (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'));
31
-
32
- defined('W3TC_DIR') || define('W3TC_DIR', realpath(dirname(__FILE__) . '/..'));
33
- define('W3TC_FILE', 'w3-total-cache/w3-total-cache.php');
34
- define('W3TC_INC_DIR', W3TC_DIR . '/inc');
35
- define('W3TC_INC_WIDGET_DIR', W3TC_INC_DIR. '/widget');
36
- define('W3TC_INC_FUNCTIONS_DIR', W3TC_INC_DIR . '/functions');
37
- define('W3TC_INC_OPTIONS_DIR', W3TC_INC_DIR . '/options');
38
- define('W3TC_INC_LIGHTBOX_DIR', W3TC_INC_DIR . '/lightbox');
39
- define('W3TC_INC_POPUP_DIR', W3TC_INC_DIR . '/popup');
40
- define('W3TC_LIB_DIR', W3TC_DIR . '/lib');
41
- define('W3TC_LIB_W3_DIR', W3TC_LIB_DIR . '/W3');
42
- define('W3TC_LIB_MINIFY_DIR', W3TC_LIB_DIR . '/Minify');
43
- define('W3TC_LIB_CF_DIR', W3TC_LIB_DIR . '/CF');
44
- define('W3TC_LIB_CSSTIDY_DIR', W3TC_LIB_DIR . '/CSSTidy');
45
- define('W3TC_LIB_MICROSOFT_DIR', W3TC_LIB_DIR . '/Microsoft');
46
- define('W3TC_LIB_NUSOAP_DIR', W3TC_LIB_DIR . '/Nusoap');
47
- define('W3TC_LIB_NETDNA_DIR', W3TC_LIB_DIR . '/NetDNA');
48
- define('W3TC_LIB_OAUTH_DIR', W3TC_LIB_DIR . '/OAuth');
49
- define('W3TC_LIB_NEWRELIC_DIR', W3TC_LIB_DIR . '/NewRelic');
50
- define('W3TC_PLUGINS_DIR', W3TC_DIR . '/plugins');
51
- define('W3TC_INSTALL_DIR', W3TC_DIR . '/wp-content');
52
- define('W3TC_INSTALL_MINIFY_DIR', W3TC_INSTALL_DIR . '/w3tc/min');
53
- define('W3TC_LANGUAGES_DIR', W3TC_DIR . '/languages');
54
-
55
- define('W3TC_CACHE_DIR', WP_CONTENT_DIR . '/cache');
56
- define('W3TC_CONFIG_DIR', WP_CONTENT_DIR . '/w3tc-config');
57
- define('W3TC_CACHE_CONFIG_DIR', W3TC_CACHE_DIR . '/config');
58
- define('W3TC_CACHE_MINIFY_DIR', W3TC_CACHE_DIR . '/minify');
59
- define('W3TC_CACHE_PAGE_ENHANCED_DIR', W3TC_CACHE_DIR . '/page_enhanced');
60
- define('W3TC_CACHE_TMP_DIR', W3TC_CACHE_DIR . '/tmp');
61
- define('W3TC_CACHE_BLOGMAP_FILENAME', W3TC_CACHE_DIR . '/blogs.php');
62
-
63
- defined('WP_CONTENT_DIR') || define('WP_CONTENT_DIR', realpath(W3TC_DIR . '/../..'));
64
-
65
- define('W3TC_CDN_COMMAND_UPLOAD', 1);
66
- define('W3TC_CDN_COMMAND_DELETE', 2);
67
- define('W3TC_CDN_COMMAND_PURGE', 3);
68
- define('W3TC_CDN_TABLE_QUEUE', 'w3tc_cdn_queue');
69
-
70
- define('W3TC_INSTALL_FILE_ADVANCED_CACHE', W3TC_INSTALL_DIR . '/advanced-cache.php');
71
- define('W3TC_INSTALL_FILE_DB', W3TC_INSTALL_DIR . '/db.php');
72
- define('W3TC_INSTALL_FILE_OBJECT_CACHE', W3TC_INSTALL_DIR . '/object-cache.php');
73
-
74
- define('W3TC_ADDIN_FILE_ADVANCED_CACHE', WP_CONTENT_DIR . '/advanced-cache.php');
75
- define('W3TC_ADDIN_FILE_DB', WP_CONTENT_DIR . '/db.php');
76
- define('W3TC_FILE_DB_CLUSTER_CONFIG', WP_CONTENT_DIR . '/db-cluster-config.php');
77
- define('W3TC_ADDIN_FILE_OBJECT_CACHE', WP_CONTENT_DIR . '/object-cache.php');
78
-
79
-
80
- define('W3TC_WP_LOADER', (defined('WP_PLUGIN_DIR') ? WP_PLUGIN_DIR : WP_CONTENT_DIR . '/plugins') . '/w3tc-wp-loader.php');
81
- if (!defined('W3TC_EXTENSION_DIR'))
82
- define('W3TC_EXTENSION_DIR', (defined('WP_PLUGIN_DIR') ? WP_PLUGIN_DIR : WP_CONTENT_DIR . '/plugins'));
83
-
84
- w3_require_once(W3TC_INC_DIR . '/functions/compat.php');
85
- w3_require_once(W3TC_INC_DIR . '/functions/plugin.php');
86
-
87
- @ini_set('pcre.backtrack_limit', 4194304);
88
- @ini_set('pcre.recursion_limit', 4194304);
89
-
90
- global $w3_late_init;
91
- $w3_late_init = false;
92
- /**
93
- * Returns current microtime
94
- *
95
- * @return double
96
- */
97
- function w3_microtime() {
98
- list ($usec, $sec) = explode(' ', microtime());
99
-
100
- return ((double) $usec + (double) $sec);
101
- }
102
-
103
- /**
104
- * Check if content is HTML or XML
105
- *
106
- * @param string $content
107
- * @return boolean
108
- */
109
- function w3_is_xml($content) {
110
- if (strlen($content) > 1000) {
111
- $content = substr($content, 0, 1000);
112
- }
113
-
114
- if (strstr($content, '<!--') !== false) {
115
- $content = preg_replace('~<!--.*?-->~s', '', $content);
116
- }
117
-
118
- $content = ltrim($content, "\x00\x09\x0A\x0D\x20\xBB\xBF\xEF");
119
-
120
- return (stripos($content, '<?xml') === 0 || stripos($content, '<html') === 0 || stripos($content, '<!DOCTYPE') === 0);
121
- }
122
-
123
- /**
124
- * If content can handle HTML comments, can disable printout per request using filter 'w3tc_can_print_comment'
125
- * @param $buffer
126
- * @return bool
127
- */
128
- function w3_can_print_comment(&$buffer) {
129
- if (function_exists('apply_filters'))
130
- return apply_filters('w3tc_can_print_comment', w3_is_xml($buffer) && !defined('DOING_AJAX'));
131
- return w3_is_xml($buffer) && !defined('DOING_AJAX');
132
- }
133
-
134
- /*
135
- * Returns URI from filename/dirname
136
- *
137
- * @return string
138
- */
139
- function w3_filename_to_url($filename) {
140
- // using wp-content instead of document_root as known dir since dirbased
141
- // multisite wp adds blogname to the path inside site_url
142
- if (substr($filename, 0, strlen(WP_CONTENT_DIR)) != WP_CONTENT_DIR)
143
- return '';
144
- $uri_from_wp_content = substr($filename, strlen(WP_CONTENT_DIR));
145
-
146
- $site_url_ssl = w3_get_url_ssl(w3_get_home_url());
147
-
148
- $dir = '';
149
- if (substr(WP_CONTENT_DIR, 0, strlen(w3_get_site_root())) == w3_get_site_root()) {
150
- $dir = str_replace($site_url_ssl, '', w3_get_url_ssl(w3_get_site_url()));
151
- $dir = trim($dir, '/\\');
152
- if ($dir)
153
- $dir = '/' . $dir;
154
- $content_path = trim(substr(WP_CONTENT_DIR, strlen(w3_get_site_root())), '/\\');
155
- }
156
- else
157
- $content_path = trim(substr(WP_CONTENT_DIR, strlen(w3_get_document_root())), '/\\');
158
-
159
- $url = $site_url_ssl . $dir . '/' . $content_path . $uri_from_wp_content;
160
-
161
- return $url;
162
- }
163
-
164
- /**
165
- * Returns true if database cluster is used
166
- *
167
- * @return boolean
168
- */
169
- function w3_is_dbcluster() {
170
- return defined('W3TC_FILE_DB_CLUSTER_CONFIG') && @file_exists(W3TC_FILE_DB_CLUSTER_CONFIG)
171
- && defined('W3TC_ENTERPRISE') && W3TC_ENTERPRISE;
172
- }
173
-
174
- /**
175
- * Returns true if it's WPMU
176
- *
177
- * @return boolean
178
- */
179
- function w3_is_wpmu() {
180
- static $wpmu = null;
181
-
182
- if ($wpmu === null) {
183
- $wpmu = file_exists(ABSPATH . 'wpmu-settings.php');
184
- }
185
-
186
- return $wpmu;
187
- }
188
-
189
- /**
190
- * Returns true if WPMU uses vhosts
191
- *
192
- * @return boolean
193
- */
194
- function w3_is_subdomain_install() {
195
- return ((defined('SUBDOMAIN_INSTALL') && SUBDOMAIN_INSTALL) || (defined('VHOST') && VHOST == 'yes'));
196
- }
197
-
198
- /**
199
- * Returns true if it's WP with enabled Network mode
200
- *
201
- * @return boolean
202
- */
203
- function w3_is_multisite() {
204
- static $multisite = null;
205
-
206
- if ($multisite === null) {
207
- $multisite = ((defined('MULTISITE') && MULTISITE) || defined('SUNRISE') || w3_is_subdomain_install());
208
- }
209
-
210
- return $multisite;
211
- }
212
-
213
- /**
214
- * Returns if there is multisite mode
215
- *
216
- * @return boolean
217
- */
218
- function w3_is_network() {
219
- return (w3_is_wpmu() || w3_is_multisite());
220
- }
221
-
222
- /**
223
- * Check if URL is valid
224
- *
225
- * @param string $url
226
- * @return boolean
227
- */
228
- function w3_is_url($url) {
229
- return preg_match('~^(https?:)?//~', $url);
230
- }
231
-
232
- /**
233
- * Returns true if current connection is secure
234
- *
235
- * @return boolean
236
- */
237
- function w3_is_https() {
238
- switch (true) {
239
- case (isset($_SERVER['HTTPS']) && w3_to_boolean($_SERVER['HTTPS'])):
240
- case (isset($_SERVER['SERVER_PORT']) && (int) $_SERVER['SERVER_PORT'] == 443):
241
- return true;
242
- }
243
-
244
- return false;
245
- }
246
-
247
- /**
248
- * Check if there was database error
249
- *
250
- * @param string $content
251
- * @return boolean
252
- */
253
- function w3_is_database_error(&$content) {
254
- return (stristr($content, '<title>Database Error</title>') !== false);
255
- }
256
-
257
- /**
258
- * Retuns true if preview settings active
259
- *
260
- * @return boolean
261
- */
262
- function w3_is_preview_mode() {
263
- return (isset($_REQUEST['w3tc_preview']) ||
264
- (isset($_SERVER['HTTP_REFERER']) &&
265
- strstr($_SERVER['HTTP_REFERER'], 'w3tc_preview') !== false));
266
- }
267
-
268
- /**
269
- * Returns true if server is Apache
270
- *
271
- * @return boolean
272
- */
273
- function w3_is_apache() {
274
- return (isset($_SERVER['SERVER_SOFTWARE']) && stristr($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false);
275
- }
276
-
277
- /**
278
- * Check whether server is LiteSpeed
279
- *
280
- * @return bool
281
- */
282
- function w3_is_litespeed() {
283
- return (isset($_SERVER['SERVER_SOFTWARE']) && stristr($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false);
284
- }
285
-
286
- /**
287
- * Returns true if server is nginx
288
- *
289
- * @return boolean
290
- */
291
- function w3_is_nginx() {
292
- return (isset($_SERVER['SERVER_SOFTWARE']) && stristr($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false);
293
- }
294
-
295
- /**
296
- * Check whether $engine is correct CDN engine
297
- *
298
- * @param string $engine
299
- * @return boolean
300
- */
301
- function w3_is_cdn_engine($engine) {
302
- return in_array($engine, array('ftp', 's3', 'cf', 'cf2', 'rscf', 'azure', 'mirror', 'netdna', 'maxcdn',
303
- 'cotendo', 'akamai', 'edgecast', 'att'));
304
- }
305
-
306
- /**
307
- * Returns true if CDN engine is mirror
308
- *
309
- * @param string $engine
310
- * @return bool
311
- */
312
- function w3_is_cdn_mirror($engine) {
313
- return in_array($engine, array('mirror', 'netdna', 'maxcdn', 'cotendo', 'cf2', 'akamai', 'edgecast', 'att'));
314
- }
315
-
316
- /**
317
- * Returns true if CDN has purge all support
318
- * @param $engine
319
- * @return bool
320
- */
321
- function w3_cdn_can_purge_all($engine) {
322
- return in_array($engine, array('cotendo', 'edgecast', 'att', 'netdna', 'maxcdn'));
323
- }
324
-
325
- /**
326
- * Returns domain from host
327
- *
328
- * @param string $host
329
- * @return string
330
- */
331
- function w3_get_domain($host) {
332
- $host = strtolower($host);
333
-
334
- if (($pos = strpos($host, ':')) !== false) {
335
- $host = substr($host, 0, $pos);
336
- }
337
-
338
- $host = rtrim($host, '.');
339
-
340
- return $host;
341
- }
342
-
343
- /**
344
- * Returns array of all available blognames
345
- *
346
- * @return array
347
- */
348
- function w3_get_blognames() {
349
- global $wpdb;
350
-
351
- $blognames = array();
352
-
353
- $sql = sprintf('SELECT domain, path FROM %s', $wpdb->blogs);
354
- $blogs = $wpdb->get_results($sql);
355
-
356
- if ($blogs) {
357
- $base_path = w3_get_base_path();
358
-
359
- foreach ($blogs as $blog) {
360
- $blogname = trim(str_replace($base_path, '', $blog->path), '/');
361
-
362
- if ($blogname) {
363
- $blognames[] = $blogname;
364
- }
365
- }
366
- }
367
-
368
- return $blognames;
369
- }
370
-
371
- /**
372
- * Returns current blog ID
373
- *
374
- * @return integer
375
- */
376
- function w3_get_blog_id() {
377
- global $w3_current_blog_id;
378
-
379
- if (!is_null($w3_current_blog_id))
380
- return $w3_current_blog_id;
381
-
382
- if (!w3_is_network() || is_network_admin()) {
383
- $w3_current_blog_id = 0;
384
- return $w3_current_blog_id;
385
- }
386
-
387
-
388
- $blog_data = w3_blogmap_get_blog_data();
389
- if (!is_null($blog_data))
390
- $w3_current_blog_id = substr($blog_data, 1);
391
- else
392
- $w3_current_blog_id = 0;
393
-
394
- return $w3_current_blog_id;
395
- }
396
-
397
- /**
398
- * Returns blogmap filename by home url
399
- *
400
- * @param string $blog_home_url
401
- * @return string
402
- */
403
- function w3_blogmap_filename($blog_home_url) {
404
- if (!defined('W3TC_BLOG_LEVELS'))
405
- return W3TC_CACHE_BLOGMAP_FILENAME;
406
- else {
407
- $filename = dirname(W3TC_CACHE_BLOGMAP_FILENAME) . '/' .
408
- basename(W3TC_CACHE_BLOGMAP_FILENAME, '.php') . '/';
409
-
410
- $s = md5($blog_home_url);
411
- for ($n = 0; $n < W3TC_BLOG_LEVELS; $n++)
412
- $filename .= substr($s, $n, 1) . '/';
413
-
414
- return $filename . basename(W3TC_CACHE_BLOGMAP_FILENAME);
415
- }
416
- }
417
-
418
- /**
419
- * Returns blog_id by home url
420
- * If database not initialized yet - returns 0
421
- *
422
- * @return integer
423
- */
424
- function w3_blogmap_get_blog_data() {
425
- $host = w3_get_host();
426
-
427
- // subdomain
428
- if (w3_is_subdomain_install()) {
429
- $blog_data = w3_blogmap_try_get_blog_data($host);
430
- if (is_null($blog_data))
431
- $GLOBALS['w3tc_blogmap_register_new_item'] = $host;
432
-
433
- return $blog_data;
434
- } else {
435
- // try subdir blog
436
- $url = $host . $_SERVER['REQUEST_URI'];
437
- $pos = strpos($url, '?');
438
- if ($pos !== false)
439
- $url = substr($url, 0, $pos);
440
-
441
- $url = rtrim($url, '/');
442
- $start_url = $url;
443
-
444
- for (;;) {
445
- $blog_data = w3_blogmap_try_get_blog_data($url);
446
- if (!is_null($blog_data))
447
- return $blog_data;
448
- $pos = strrpos($url, '/');
449
- if ($pos === false)
450
- break;
451
-
452
- $url = rtrim(substr($url, 0, $pos), '/');
453
- }
454
-
455
- $GLOBALS['w3tc_blogmap_register_new_item'] = $start_url;
456
- return null;
457
- }
458
- }
459
-
460
-
461
-
462
- function w3_blogmap_try_get_blog_data($url) {
463
- $filename = w3_blogmap_filename($url);
464
-
465
- if (file_exists($filename)) {
466
- $data = file_get_contents($filename);
467
- $blog_data = @eval($data);
468
-
469
- if (is_array($blog_data) && isset($blog_data[$url]))
470
- return $blog_data[$url];
471
- }
472
- return null;
473
- }
474
-
475
- /**
476
- * @return bool
477
- */
478
- function w3_force_master() {
479
- global $w3_force_master;
480
- if (!is_null($w3_force_master))
481
- return $w3_force_master;
482
-
483
- if (!w3_is_multisite())
484
- $w3_force_master = false;
485
- else {
486
- $blog_data = w3_blogmap_get_blog_data();
487
- if (is_null($blog_data) ||
488
- ($blog_data[0] != 'm' && $blog_data[0] != 'c'))
489
- $w3_force_master = true;
490
- else
491
- $w3_force_master = ($blog_data[0] == 'm');
492
- }
493
-
494
- return $w3_force_master;
495
- }
496
-
497
- /**
498
- * Returns path to section's cache dir
499
- *
500
- * @param string $section
501
- * @return string
502
- */
503
- function w3_cache_dir($section) {
504
- return W3TC_CACHE_DIR . '/' . $section;
505
- }
506
-
507
- /**
508
- * Returns path to blog's cache dir
509
- *
510
- * @param string $section
511
- * @param null|int $blog_id
512
- * @return string
513
- */
514
- function w3_cache_blog_dir($section, $blog_id = null) {
515
- if (is_null($blog_id))
516
- $blog_id = w3_get_blog_id();
517
-
518
- $postfix = sprintf('%06d', $blog_id);
519
-
520
- if (defined('W3TC_BLOG_LEVELS')) {
521
- for ($n = 0; $n < W3TC_BLOG_LEVELS; $n++)
522
- $postfix = substr($postfix, strlen($postfix) - 1 - $n, 1) . '/' .
523
- $postfix;
524
- }
525
-
526
- return w3_cache_dir($section) . '/' . $postfix;
527
- }
528
-
529
- /**
530
- * Return full path to log file for module
531
- * Path used in priority
532
- * 1) W3TC_DEBUG_DIR
533
- * 2) WP_DEBUG_LOG
534
- * 3) W3TC_CACHE_DIR
535
- *
536
- * @param $module
537
- * @param null $blog_id
538
- * @return string
539
- */
540
- function w3_debug_log($module, $blog_id = null) {
541
- if (is_null($blog_id))
542
- $blog_id = w3_get_blog_id();
543
-
544
- $postfix = sprintf('%06d', $blog_id);
545
-
546
- if (defined('W3TC_BLOG_LEVELS')) {
547
- for ($n = 0; $n < W3TC_BLOG_LEVELS; $n++)
548
- $postfix = substr($postfix, strlen($postfix) - 1 - $n, 1) . '/' .
549
- $postfix;
550
- }
551
- $from_dir = W3TC_CACHE_DIR;
552
- if (defined('W3TC_DEBUG_DIR') && W3TC_DEBUG_DIR) {
553
- $dir_path = W3TC_DEBUG_DIR;
554
- if (!is_dir(W3TC_DEBUG_DIR))
555
- $from_dir = dirname(W3TC_DEBUG_DIR);
556
- } else
557
- $dir_path = w3_cache_dir('log');
558
- $filename = $dir_path . '/' . $postfix . '/' . $module . '.log';
559
- if (!is_dir(dirname($filename))) {
560
- w3_require_once( W3TC_INC_DIR . '/functions/file.php');
561
- w3_mkdir_from(dirname($filename), $from_dir);
562
- }
563
-
564
- return $filename;
565
- }
566
-
567
- /**
568
- * Returns URL regexp from URL
569
- *
570
- * @param string $url
571
- * @return string
572
- */
573
- function w3_get_url_regexp($url) {
574
- $url = preg_replace('~(https?:)?//~i', '', $url);
575
- $url = preg_replace('~^www\.~i', '', $url);
576
-
577
- $regexp = '(https?:)?//(www\.)?' . w3_preg_quote($url);
578
-
579
- return $regexp;
580
- }
581
-
582
- /**
583
- * Returns SSL URL if current connection is https
584
- * @param string $url
585
- * @return string
586
- */
587
- function w3_get_url_ssl($url) {
588
- if (w3_is_https()) {
589
- $url = str_replace('http://', 'https://', $url);
590
- }
591
-
592
- return $url;
593
- }
594
-
595
- /**
596
- * Get domain URL
597
- *
598
- * @return string
599
- */
600
-
601
- function w3_get_domain_url() {
602
- $home_url = w3_get_home_url();
603
- $parse_url = @parse_url($home_url);
604
-
605
- if ($parse_url && isset($parse_url['scheme']) && isset($parse_url['host'])) {
606
- $scheme = $parse_url['scheme'];
607
- $host = $parse_url['host'];
608
- $port = (isset($parse_url['port']) && $parse_url['port'] != 80 ? ':' . (int) $parse_url['port'] : '');
609
- $domain_url = sprintf('%s://%s%s', $scheme, $host, $port);
610
-
611
- return $domain_url;
612
- }
613
-
614
- return false;
615
- }
616
-
617
- /**
618
- * Returns domain url regexp
619
- *
620
- * @return string
621
- */
622
- function w3_get_domain_url_regexp() {
623
- $domain_url = w3_get_domain_url();
624
- $regexp = w3_get_url_regexp($domain_url);
625
-
626
- return $regexp;
627
- }
628
-
629
- /**
630
- * Returns home URL
631
- *
632
- * No trailing slash!
633
- *
634
- * @return string
635
- */
636
- function w3_get_home_url() {
637
- static $home_url = null;
638
-
639
- if ($home_url === null) {
640
- $config = w3_instance('W3_Config');
641
- if (w3_is_multisite() && $config->get_boolean('common.force_master')) {
642
- $home_url = get_home_url();
643
- } else {
644
- // get_option is unusable here, it can cause problem when objCache isn't yet initialized
645
- // Which is why we save the 'home' option in our ConfigCache
646
- // We don't just use $config->get_string, because we want the cache to rebuild
647
- // when 'wordpress.home' is not (yet) present
648
- $home_url = $config->get_cache_option('wordpress.home');
649
- $home_url = rtrim($home_url, '/');
650
- }
651
- }
652
-
653
- return $home_url;
654
- }
655
-
656
- /**
657
- * Returns SSL home url
658
- *
659
- * @return string
660
- */
661
- function w3_get_home_url_ssl() {
662
- $home_url = w3_get_home_url();
663
- $ssl = w3_get_url_ssl($home_url);
664
-
665
- return $ssl;
666
- }
667
-
668
- /**
669
- * Returns home url regexp
670
- *
671
- * @return string
672
- */
673
- function w3_get_home_url_regexp() {
674
- $home_url = w3_get_home_url();
675
- $regexp = w3_get_url_regexp($home_url);
676
-
677
- return $regexp;
678
- }
679
-
680
- /**
681
- * Network installs returns wrong wp site path
682
- * @return string
683
- */
684
- function w3_get_wp_sitepath() {
685
- if (w3_is_network()) {
686
- global $current_site;
687
- return $current_site->path;
688
- } else {
689
- return w3_get_site_path();
690
- }
691
- }
692
-
693
- /**
694
- * Returns site URL
695
- *
696
- * No trailing slash!
697
- *
698
- * @return string
699
- */
700
- function w3_get_site_url() {
701
- static $site_url = null;
702
-
703
- if ($site_url === null) {
704
- $site_url = get_option('siteurl');
705
- $site_url = rtrim($site_url, '/');
706
- }
707
-
708
- return $site_url;
709
- }
710
-
711
- /**
712
- * Returns SSL site URL
713
- *
714
- * @return string
715
- */
716
- function w3_get_site_url_ssl() {
717
- $site_url = w3_get_site_url();
718
- $ssl = w3_get_url_ssl($site_url);
719
-
720
- return $ssl;
721
-
722
- }
723
-
724
- /**
725
- * Returns absolute path to document root
726
- *
727
- * No trailing slash!
728
- *
729
- * @return string
730
- */
731
- function w3_get_document_root() {
732
- static $document_root = null;
733
- $len = strlen($_SERVER['PHP_SELF']);
734
- $split = $len/2;
735
-
736
- if ($document_root === null) {
737
- if (!empty($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == $_SERVER['PHP_SELF']) {
738
- $document_root = w3_get_site_root();
739
- } elseif (!empty($_SERVER['SCRIPT_FILENAME'])) {
740
- $document_root = substr(w3_path($_SERVER['SCRIPT_FILENAME']), 0, -strlen(w3_path($_SERVER['PHP_SELF'])));
741
- } elseif (!empty($_SERVER['PATH_TRANSLATED'])) {
742
- $document_root = substr(w3_path($_SERVER['PATH_TRANSLATED']), 0, -strlen(w3_path($_SERVER['PHP_SELF'])));
743
- } elseif (!empty($_SERVER['DOCUMENT_ROOT'])) {
744
- $document_root = w3_path($_SERVER['DOCUMENT_ROOT']);
745
- } else {
746
- $document_root = w3_get_site_root();
747
- }
748
-
749
- $document_root = realpath($document_root);
750
- $document_root = w3_path($document_root);
751
- }
752
-
753
- return $document_root;
754
- }
755
-
756
- /**
757
- * Returns absolute path to home directory
758
- *
759
- * Example:
760
- *
761
- * DOCUMENT_ROOT=/var/www/vhosts/domain.com
762
- * Install dir=/var/www/vhosts/domain.com/site/blog
763
- * home=http://domain.com/site
764
- * siteurl=http://domain.com/site/blog
765
- * return /var/www/vhosts/domain.com/site
766
- *
767
- * No trailing slash!
768
- *
769
- * @return string
770
- */
771
- function w3_get_home_root() {
772
- if (w3_is_network()) {
773
- $path = w3_get_base_path();
774
- } else {
775
- $path = w3_get_home_path();
776
- }
777
-
778
- $home_root = w3_get_document_root() . $path;
779
- $home_root = realpath($home_root);
780
- $home_root = w3_path($home_root);
781
-
782
- return $home_root;
783
- }
784
-
785
- /**
786
- * Returns absolute path to blog install dir
787
- *
788
- * Example:
789
- *
790
- * DOCUMENT_ROOT=/var/www/vhosts/domain.com
791
- * install dir=/var/www/vhosts/domain.com/site/blog
792
- * return /var/www/vhosts/domain.com/site/blog
793
- *
794
- * No trailing slash!
795
- *
796
- * @return string
797
- */
798
- function w3_get_site_root() {
799
- $site_root = ABSPATH;
800
- $site_root = realpath($site_root);
801
- $site_root = w3_path($site_root);
802
-
803
- return $site_root;
804
- }
805
-
806
- /**
807
- * Returns blog path
808
- *
809
- * Example:
810
- *
811
- * siteurl=http://domain.com/site/blog
812
- * return /site/blog/
813
- *
814
- * With trailing slash!
815
- *
816
- * @return string
817
- */
818
- function w3_get_site_path() {
819
- $site_url = w3_get_site_url();
820
- $parse_url = @parse_url($site_url);
821
-
822
- if ($parse_url && isset($parse_url['path'])) {
823
- $site_path = '/' . ltrim($parse_url['path'], '/');
824
- } else {
825
- $site_path = '/';
826
- }
827
-
828
- if (substr($site_path, -1) != '/') {
829
- $site_path .= '/';
830
- }
831
-
832
- return $site_path;
833
- }
834
-
835
- /**
836
- * Returns home domain
837
- *
838
- * @return string
839
- */
840
- function w3_get_home_domain() {
841
- $home_url = w3_get_home_url();
842
- $parse_url = @parse_url($home_url);
843
-
844
- if ($parse_url && isset($parse_url['host'])) {
845
- return $parse_url['host'];
846
- }
847
-
848
- return w3_get_host();
849
- }
850
-
851
- /**
852
- * Returns home path
853
- *
854
- * Example:
855
- *
856
- * home=http://domain.com/site/
857
- * siteurl=http://domain.com/site/blog
858
- * return /site/
859
- *
860
- * With trailing slash!
861
- *
862
- * @return string
863
- */
864
- function w3_get_home_path() {
865
- $home_url = w3_get_home_url();
866
- $parse_url = @parse_url($home_url);
867
-
868
- if ($parse_url && isset($parse_url['path'])) {
869
- $home_path = '/' . ltrim($parse_url['path'], '/');
870
- } else {
871
- $home_path = '/';
872
- }
873
-
874
- if (substr($home_path, -1) != '/') {
875
- $home_path .= '/';
876
- }
877
-
878
- return $home_path;
879
- }
880
-
881
- /**
882
- * Returns path to WP directory relative to document root
883
- *
884
- * Example:
885
- *
886
- * DOCUMENT_ROOT=/var/www/vhosts/domain.com/
887
- * Install dir=/var/www/vhosts/domain.com/site/blog/
888
- * return /site/blog/
889
- *
890
- * With trailing slash!
891
- *
892
- * @return string
893
- */
894
- function w3_get_base_path() {
895
- $document_root = w3_get_document_root();
896
- $site_root = w3_get_site_root();
897
-
898
- $base_path = str_replace($document_root, '', $site_root);
899
- $base_path = '/' . ltrim($base_path, '/');
900
-
901
- if (substr($base_path, -1) != '/') {
902
- $base_path .= '/';
903
- }
904
-
905
- return $base_path;
906
- }
907
-
908
- /**
909
- * Returns server hostname
910
- *
911
- * @return string
912
- */
913
- function w3_get_host() {
914
- static $host = null;
915
-
916
- if ($host === null) {
917
- if (!empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
918
- $host = $_SERVER['HTTP_X_FORWARDED_HOST'];
919
- } elseif (!empty($_SERVER['HTTP_HOST'])) {
920
- // HTTP_HOST sometimes is not set causing warning
921
- $host = $_SERVER['HTTP_HOST'];
922
- } else {
923
- $host = '';
924
- }
925
- }
926
-
927
- return $host;
928
- }
929
-
930
- /**
931
- * Returns host ID
932
- *
933
- * @return string
934
- */
935
- function w3_get_host_id() {
936
- static $host_id = null;
937
-
938
- if ($host_id === null) {
939
- $host = w3_get_host();
940
- $blog_id = w3_get_blog_id();
941
-
942
- $host_id = sprintf('%s_%d', $host, $blog_id);
943
- }
944
-
945
- return $host_id;
946
- }
947
-
948
- /**
949
- * Returns WP config file path
950
- *
951
- * @return string
952
- */
953
- function w3_get_wp_config_path() {
954
- $search = array(
955
- ABSPATH . 'wp-config.php',
956
- dirname(ABSPATH) . '/wp-config.php'
957
- );
958
-
959
- foreach ($search as $path) {
960
- if (file_exists($path)) {
961
- return $path;
962
- }
963
- }
964
-
965
- return false;
966
- }
967
-
968
- /**
969
- * Returns theme key
970
- *
971
- * @param string $theme_root
972
- * @param string $template
973
- * @param string $stylesheet
974
- * @return string
975
- */
976
- function w3_get_theme_key($theme_root, $template, $stylesheet) {
977
- $site_root = w3_get_site_root();
978
- $theme_path = ltrim(str_replace($site_root, '', w3_path($theme_root)), '/');
979
-
980
- return substr(md5($theme_path . $template . $stylesheet), 0, 5);
981
- }
982
-
983
- /**
984
- * Returns theme key (legacy support)
985
- *
986
- * @param string $theme_root
987
- * @param string $template
988
- * @param string $stylesheet
989
- * @return string
990
- */
991
- function w3_get_theme_key_legacy($theme_root, $template, $stylesheet) {
992
- return substr(md5($theme_root . $template . $stylesheet), 0, 6);
993
- }
994
-
995
- /**
996
- * Returns true if we can check rules
997
- *
998
- * @return bool
999
- */
1000
- function w3_can_check_rules() {
1001
- return (w3_is_apache() || w3_is_litespeed() || w3_is_nginx());
1002
- }
1003
-
1004
- /**
1005
- * Returns true if CDN engine is supporting purge
1006
- *
1007
- * @param string $engine
1008
- * @return bool
1009
- */
1010
- function w3_can_cdn_purge($engine) {
1011
- return in_array($engine, array('ftp', 's3', 'cf', 'cf2', 'rscf', 'azure', 'netdna', 'maxcdn', 'cotendo',
1012
- 'edgecast', 'akamai', 'att'));
1013
- }
1014
-
1015
- /**
1016
- * Parses path
1017
- *
1018
- * @param string $path
1019
- * @return mixed
1020
- */
1021
- function w3_parse_path($path) {
1022
- $path = str_replace(array(
1023
- '%BLOG_ID%',
1024
- '%POST_ID%',
1025
- '%BLOG_ID%',
1026
- '%HOST%',
1027
- '%DOMAIN%',
1028
- '%BASE_PATH%'
1029
- ), array(
1030
- (isset($GLOBALS['blog_id']) ? (int) $GLOBALS['blog_id'] : 0),
1031
- (isset($GLOBALS['post_id']) ? (int) $GLOBALS['post_id'] : 0),
1032
- w3_get_blog_id(),
1033
- w3_get_host(),
1034
- w3_get_domain(w3_get_host()),
1035
- trim(w3_get_base_path(), '/')
1036
- ), $path);
1037
-
1038
- return $path;
1039
- }
1040
-
1041
- /**
1042
- * Normalizes file name
1043
- *
1044
- * Relative to site root!
1045
- *
1046
- * @param string $file
1047
- * @return string
1048
- */
1049
- function w3_normalize_file($file) {
1050
- if (w3_is_url($file)) {
1051
- if (strstr($file, '?') === false) {
1052
- $home_url_regexp = '~' . w3_get_home_url_regexp() . '~i';
1053
- $file = preg_replace($home_url_regexp, '', $file);
1054
- }
1055
- }
1056
-
1057
- if (!w3_is_url($file)) {
1058
- $file = w3_path($file);
1059
- $file = str_replace(w3_get_site_root(), '', $file);
1060
- $file = ltrim($file, '/');
1061
- }
1062
-
1063
- return $file;
1064
- }
1065
-
1066
- /**
1067
- * Normalizes file name for minify
1068
- *
1069
- * Relative to document root!
1070
- *
1071
- * @param string $file
1072
- * @return string
1073
- */
1074
- function w3_normalize_file_minify($file) {
1075
- if (w3_is_url($file)) {
1076
- if (strstr($file, '?') === false) {
1077
- $domain_url_regexp = '~' . w3_get_domain_url_regexp() . '~i';
1078
- $file = preg_replace($domain_url_regexp, '', $file);
1079
- }
1080
- }
1081
-
1082
- if (!w3_is_url($file)) {
1083
- $file = w3_path($file);
1084
- $file = str_replace(w3_get_document_root(), '', $file);
1085
- $file = ltrim($file, '/');
1086
- }
1087
-
1088
- return $file;
1089
- }
1090
-
1091
- /**
1092
- * Normalizes file name for minify
1093
- *
1094
- * Relative to document root!
1095
- *
1096
- * @param string $file
1097
- * @return string
1098
- */
1099
- function w3_normalize_file_minify2($file) {
1100
- $file = w3_remove_query($file);
1101
- $file = w3_normalize_file_minify($file);
1102
- $file = w3_translate_file($file);
1103
-
1104
- return $file;
1105
- }
1106
-
1107
- /**
1108
- * Translates remote file to local file
1109
- *
1110
- * @param string $file
1111
- * @return string
1112
- */
1113
- function w3_translate_file($file) {
1114
- if (!w3_is_url($file)) {
1115
- $file = '/' . ltrim($file, '/');
1116
- $regexp = '~^' . w3_preg_quote(w3_get_site_path()) . '~';
1117
- $file = preg_replace($regexp, w3_get_base_path(), $file);
1118
- $file = ltrim($file, '/');
1119
- }
1120
-
1121
- return $file;
1122
- }
1123
-
1124
- /**
1125
- * Remove WP query string from URL
1126
- *
1127
- * @param string $url
1128
- * @return string
1129
- */
1130
- function w3_remove_query($url) {
1131
- $url = preg_replace('~[&\?]+(ver=([a-z0-9-_\.]+|[0-9-]+))~i', '', $url);
1132
-
1133
- return $url;
1134
- }
1135
-
1136
- /**
1137
- * Converts win path to unix
1138
- *
1139
- * @param string $path
1140
- * @return string
1141
- */
1142
- function w3_path($path) {
1143
- $path = preg_replace('~[/\\\]+~', '/', $path);
1144
- $path = rtrim($path, '/');
1145
-
1146
- return $path;
1147
- }
1148
-
1149
- /**
1150
- * Returns real path of given path
1151
- *
1152
- * @param string $path
1153
- * @return string
1154
- */
1155
- function w3_realpath($path) {
1156
- $path = w3_path($path);
1157
- $parts = explode('/', $path);
1158
- $absolutes = array();
1159
-
1160
- foreach ($parts as $part) {
1161
- if ('.' == $part) {
1162
- continue;
1163
- }
1164
- if ('..' == $part) {
1165
- array_pop($absolutes);
1166
- } else {
1167
- $absolutes[] = $part;
1168
- }
1169
- }
1170
-
1171
- return implode('/', $absolutes);
1172
- }
1173
-
1174
- /**
1175
- * Returns GMT date
1176
- * @param integer $time
1177
- * @return string
1178
- */
1179
- function w3_http_date($time) {
1180
- return gmdate('D, d M Y H:i:s \G\M\T', $time);
1181
- }
1182
-
1183
- /**
1184
- * Redirects to URL
1185
- *
1186
- * @param string $url
1187
- * @param array $params
1188
- * @return string
1189
- */
1190
- function w3_redirect($url = '', $params = array()) {
1191
- w3_require_once(W3TC_INC_DIR . '/functions/url.php');
1192
-
1193
- $url = w3_url_format($url, $params);
1194
- if (function_exists('do_action'))
1195
- do_action('w3_redirect');
1196
-
1197
- @header('Location: ' . $url);
1198
- exit();
1199
- }
1200
-
1201
- /**
1202
- * Redirects to URL
1203
- *
1204
- * @param string $url
1205
- * @param array $params
1206
- *
1207
- * @return string
1208
- */
1209
- function w3_redirect_temp( $url = '', $params = array() ) {
1210
- w3_require_once( W3TC_INC_DIR . '/functions/url.php' );
1211
-
1212
- $url = w3_url_format( $url, $params );
1213
- if (function_exists('do_action'))
1214
- do_action( 'w3_redirect' );
1215
-
1216
- $status_code = 301;
1217
-
1218
- $protocol = $_SERVER["SERVER_PROTOCOL"];
1219
- if ( 'HTTP/1.1' === $protocol ) {
1220
- $status_code = 307;
1221
- }
1222
-
1223
- $text = get_status_header_desc( $status_code );
1224
- if ( !empty( $text ) ) {
1225
- $status_header = "$protocol $status_code $text";
1226
- @header( $status_header, true, $status_code );
1227
- }
1228
- @header( 'Location: ' . $url, true, $status_code );
1229
- exit();
1230
- }
1231
-
1232
- /**
1233
- * Returns caching engine name
1234
- *
1235
- * @param $engine
1236
- * @param $module
1237
- *
1238
- * @return string
1239
- */
1240
- function w3_get_engine_name($engine, $module = '') {
1241
- switch ($engine) {
1242
- case 'memcached':
1243
- $engine_name = 'memcached';
1244
- break;
1245
-
1246
- case 'apc':
1247
- $engine_name = 'apc';
1248
- break;
1249
-
1250
- case 'eaccelerator':
1251
- $engine_name = 'eaccelerator';
1252
- break;
1253
-
1254
- case 'xcache':
1255
- $engine_name = 'xcache';
1256
- break;
1257
-
1258
- case 'wincache':
1259
- $engine_name = 'wincache';
1260
- break;
1261
-
1262
- case 'file':
1263
- if ($module == 'pgcache')
1264
- $engine_name = 'disk: basic';
1265
- else
1266
- $engine_name = 'disk';
1267
- break;
1268
-
1269
- case 'file_generic':
1270
- $engine_name = 'disk: enhanced';
1271
- break;
1272
-
1273
- case 'ftp':
1274
- $engine_name = 'self-hosted / file transfer protocol upload';
1275
- break;
1276
-
1277
- case 's3':
1278
- $engine_name = 'amazon simple storage service (s3)';
1279
- break;
1280
-
1281
- case 'cf':
1282
- $engine_name = 'amazon cloudfront';
1283
- break;
1284
-
1285
- case 'cf2':
1286
- $engine_name = 'amazon cloudfront';
1287
- break;
1288
-
1289
- case 'rscf':
1290
- $engine_name = 'rackspace cloud files';
1291
- break;
1292
-
1293
- case 'azure':
1294
- $engine_name = 'microsoft azure storage';
1295
- break;
1296
-
1297
- case 'mirror':
1298
- $engine_name = 'mirror';
1299
- break;
1300
-
1301
- case 'netdna':
1302
- $engine_name = 'netdna';
1303
- break;
1304
-
1305
- case 'maxcdn':
1306
- $engine_name = 'maxcdn';
1307
- break;
1308
-
1309
- case 'cotendo':
1310
- $engine_name = 'cotendo';
1311
- break;
1312
-
1313
- case 'akamai':
1314
- $engine_name = 'akamai';
1315
- break;
1316
-
1317
- case 'edgecast':
1318
- $engine_name = 'media template procdn / edgecast';
1319
- break;
1320
-
1321
- case 'att':
1322
- $engine_name = 'at&amp;t';
1323
- break;
1324
-
1325
- default:
1326
- $engine_name = 'n/a';
1327
- break;
1328
- }
1329
-
1330
- return $engine_name;
1331
- }
1332
-
1333
- /**
1334
- * Converts value to boolean
1335
- *
1336
- * @param mixed $value
1337
- * @return boolean
1338
- */
1339
- function w3_to_boolean($value) {
1340
- if (is_string($value)) {
1341
- switch (strtolower($value)) {
1342
- case '+':
1343
- case '1':
1344
- case 'y':
1345
- case 'on':
1346
- case 'yes':
1347
- case 'true':
1348
- case 'enabled':
1349
- return true;
1350
-
1351
- case '-':
1352
- case '0':
1353
- case 'n':
1354
- case 'no':
1355
- case 'off':
1356
- case 'false':
1357
- case 'disabled':
1358
- return false;
1359
- }
1360
- }
1361
-
1362
- return (boolean) $value;
1363
- }
1364
-
1365
- /**
1366
- * Quotes regular expression string
1367
- *
1368
- * @param string $string
1369
- * @param string $delimiter
1370
- * @return string
1371
- */
1372
- function w3_preg_quote($string, $delimiter = null) {
1373
- $string = preg_quote($string, $delimiter);
1374
- $string = strtr($string, array(
1375
- ' ' => '\ '
1376
- ));
1377
-
1378
- return $string;
1379
- }
1380
-
1381
- /**
1382
- * Returns true if zlib output compression is enabled otherwise false
1383
- *
1384
- * @return boolean
1385
- */
1386
- function w3_zlib_output_compression() {
1387
- return w3_to_boolean(ini_get('zlib.output_compression'));
1388
- }
1389
-
1390
- /**
1391
- * Recursive strips slahes from the var
1392
- *
1393
- * @param mixed $var
1394
- * @return mixed
1395
- */
1396
- function w3_stripslashes($var) {
1397
- if (is_string($var)) {
1398
- return stripslashes($var);
1399
- } elseif (is_array($var)) {
1400
- $var = array_map('w3_stripslashes', $var);
1401
- }
1402
-
1403
- return $var;
1404
- }
1405
-
1406
- /**
1407
- * Escapes HTML comment
1408
- *
1409
- * @param string $comment
1410
- * @return mixed
1411
- */
1412
- function w3_escape_comment($comment) {
1413
- while (strstr($comment, '--') !== false) {
1414
- $comment = str_replace('--', '- -', $comment);
1415
- }
1416
-
1417
- return $comment;
1418
- }
1419
-
1420
- /**
1421
- * Returns instance of singleton class
1422
- *
1423
- * @param string $class
1424
- * @return object
1425
- */
1426
- function w3_instance($class) {
1427
- static $instances = array();
1428
-
1429
- if (!isset($instances[$class])) {
1430
- w3_require_once( W3TC_LIB_W3_DIR . '/' .
1431
- str_replace('_', '/', substr($class, 3)) . '.php');
1432
- $instances[$class] = new $class();
1433
- }
1434
-
1435
- $v = $instances[$class]; // Don't return reference
1436
- return $v;
1437
- }
1438
-
1439
- /**
1440
- * Requires and keeps track of which files has already been loaded.
1441
- *
1442
- * @param string $path Absolute path to the file
1443
- */
1444
- function w3_require_once($path) {
1445
- static $files = array();
1446
-
1447
- if (!isset($files[$path])) {
1448
- $files[$path] = 1;
1449
- require_once $path;
1450
- }
1451
- }
1452
-
1453
- /**
1454
- * Detects post ID
1455
- *
1456
- * @return integer
1457
- */
1458
- function w3_detect_post_id() {
1459
- global $posts, $comment_post_ID, $post_ID;
1460
-
1461
- if ($post_ID) {
1462
- return $post_ID;
1463
- } elseif ($comment_post_ID) {
1464
- return $comment_post_ID;
1465
- } elseif (is_single() || is_page() && count($posts)) {
1466
- return $posts[0]->ID;
1467
- } elseif (isset($_REQUEST['p'])) {
1468
- return (integer) $_REQUEST['p'];
1469
- }
1470
-
1471
- return 0;
1472
- }
1473
-
1474
- function w3_get_instance_id() {
1475
- static $instance_id;
1476
-
1477
- if(!isset($instance_id)) {
1478
- $config = w3_instance('W3_Config');
1479
- $instance_id = $config->get_integer('common.instance_id', 0);
1480
- }
1481
- return $instance_id;
1482
- }
1483
-
1484
-
1485
- /**
1486
- * Checks if post should be flushed or not. Returns true if it should not be flushed
1487
- * @param $post
1488
- * @param string $module which cache module to check against (pgcache, varnish, cdncache, dbcache or objectcache)
1489
- * @param W3_Config $config
1490
- * @return bool
1491
- */
1492
- function w3_is_flushable_post($post, $module, $config) {
1493
- if (is_numeric($post))
1494
- $post = get_post($post);
1495
- $post_status = array('publish');
1496
- // dont flush when we have post "attachment"
1497
- // its child of the post and is flushed always when post is published, while not changed in fact
1498
- $post_type = array('revision', 'attachment');
1499
- switch($module) {
1500
- case 'pgcache':
1501
- case 'varnish':
1502
- case 'cdncache':
1503
- if (!$config->get_boolean('pgcache.reject.logged'))
1504
- $post_status[] = 'private';
1505
- break;
1506
- case 'dbcache':
1507
- if (!$config->get_boolean('dbcache.reject.logged'))
1508
- $post_status[] = 'private';
1509
- break;
1510
- }
1511
- $flushable = !in_array($post->post_type, $post_type) && in_array($post->post_status, $post_status);
1512
- return apply_filters('w3tc_flushable_post', $flushable, $post, $module);
1513
- }
1514
-
1515
- /**
1516
- * Takes seconds and converts to array('Nh ','Nm ', 'Ns ', 'Nms ') or "Nh Nm Ns Nms"
1517
- * @param $input
1518
- * @param bool $string
1519
- * @return array|string
1520
- */
1521
- function w3_convert_secs_to_time($input, $string = true) {
1522
- $input = (double)$input;
1523
- $time = array();
1524
- $msecs = floor($input*1000 % 1000);
1525
- $seconds = $input % 60;
1526
- $input = floor($input / 60);
1527
- $minutes = $input % 60;
1528
- $input = floor($input / 60);
1529
- $hours = $input % 60;
1530
- $input = floor($input / 60);
1531
- if ($hours)
1532
- $time[] = sprintf(__('%dh', 'w3-total-cache'), $hours);
1533
- if ($minutes)
1534
- $time[] = sprintf(__('%dm', 'w3-total-cache'), $minutes);
1535
- if ($seconds)
1536
- $time[] = sprintf(__('%ds', 'w3-total-cache'), $seconds);
1537
- if ($msecs)
1538
- $time[] = sprintf(__('%dms', 'w3-total-cache'), $msecs);
1539
-
1540
- if(empty($time))
1541
- $time[] = sprintf(__('%dms', 'w3-total-cache'), 0);
1542
- if ($string)
1543
- return implode(' ', $time);
1544
- return $time;
1545
- }
1546
-
1547
- /**
1548
- * @return string
1549
- */
1550
- function w3_w3tc_release_version($config = null) {
1551
- if (w3_is_enterprise($config))
1552
- return 'enterprise';
1553
- if (w3_is_pro($config))
1554
- return 'pro';
1555
- return 'community';
1556
- }
1557
-
1558
- /**
1559
- * @param W3_Config $config
1560
- * @return bool
1561
- */
1562
- function w3_is_pro($config = null) {
1563
- $result = false;
1564
- if ($config)
1565
- $result = $config->get_string('plugin.type') == 'pro';
1566
- return $result || defined('W3TC_PRO') && W3TC_PRO;
1567
- }
1568
-
1569
- /**
1570
- * @param W3_Config $config
1571
- * @return bool
1572
- */
1573
- function w3_is_enterprise($config = null) {
1574
- $result = false;
1575
- if ($config)
1576
- $result = $config->get_string('plugin.type') == 'enterprise';
1577
- return $result || defined('W3TC_ENTERPRISE') && W3TC_ENTERPRISE;
1578
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) {
4
+ die();
5
+ }
6
+
7
+ define('W3TC', true);
8
+ define('W3TC_VERSION', '0.9.4');
9
+ define('W3TC_POWERED_BY', 'W3 Total Cache/' . W3TC_VERSION);
10
+ define('W3TC_EMAIL', 'w3tc@w3-edge.com');
11
+ define('W3TC_TEXT_DOMAIN', 'w3-total-cache');
12
+ define('W3TC_PAYPAL_URL', 'https://www.paypal.com/cgi-bin/webscr');
13
+ define('W3TC_PAYPAL_BUSINESS', 'w3tc-team@w3-edge.com');
14
+ define('W3TC_LINK_URL', 'http://www.w3-edge.com/wordpress-plugins/');
15
+ define('W3TC_LINK_NAME', 'W3 EDGE, Optimization Products for WordPress');
16
+ define('W3TC_FEED_URL', 'http://feeds.feedburner.com/W3TOTALCACHE');
17
+ define('W3TC_NEWS_FEED_URL', 'http://feeds.feedburner.com/W3EDGE');
18
+ define('W3TC_README_URL', 'http://plugins.svn.wordpress.org/w3-total-cache/trunk/readme.txt');
19
+ define('W3TC_SUPPORT_US_TIMEOUT', 2592000);
20
+ define('W3TC_SUPPORT_REQUEST_URL', 'https://www.w3-edge.com/w3tc/support/');
21
+ define('W3TC_TRACK_URL', 'https://www.w3-edge.com/w3tc/track/');
22
+ define('W3TC_MAILLINGLIST_SIGNUP_URL', 'https://www.w3-edge.com/w3tc/emailsignup/');
23
+ define('NEWRELIC_SIGNUP_URL', 'http://bit.ly/w3tc-partner-newrelic-signup');
24
+ define('MAXCDN_SIGNUP_URL', 'http://bit.ly/w3tc-cdn-maxcdn-create-account');
25
+ define('MAXCDN_AUTHORIZE_URL', 'http://bit.ly/w3tc-cdn-maxcdn-authorize');
26
+ define('NETDNA_AUTHORIZE_URL', 'https://cp.netdna.com/i/w3tc');
27
+ // this is the URL our updater / license checker pings. This should be the URL of the site with EDD installed
28
+ if (!defined('EDD_W3EDGE_STORE_URL')) define('EDD_W3EDGE_STORE_URL', 'https://www.w3-edge.com/' );
29
+ if (!defined('EDD_W3EDGE_STORE_URL_PLUGIN')) define('EDD_W3EDGE_STORE_URL_PLUGIN', 'https://www.w3-edge.com/?w3tc_buy_pro_plugin' );
30
+
31
+ // the name of your product. This should match the download name in EDD exactly
32
+ define('EDD_W3EDGE_W3TC_NAME', 'W3 Total Cache Pro: Annual Subscription');
33
+
34
+ define('W3TC_WIN', (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'));
35
+
36
+ defined('W3TC_DIR') || define('W3TC_DIR', realpath(dirname(__FILE__) . '/..'));
37
+ define('W3TC_FILE', 'w3-total-cache/w3-total-cache.php');
38
+ define('W3TC_INC_DIR', W3TC_DIR . '/inc');
39
+ define('W3TC_INC_WIDGET_DIR', W3TC_INC_DIR. '/widget');
40
+ define('W3TC_INC_FUNCTIONS_DIR', W3TC_INC_DIR . '/functions');
41
+ define('W3TC_INC_OPTIONS_DIR', W3TC_INC_DIR . '/options');
42
+ define('W3TC_INC_LIGHTBOX_DIR', W3TC_INC_DIR . '/lightbox');
43
+ define('W3TC_INC_POPUP_DIR', W3TC_INC_DIR . '/popup');
44
+ define('W3TC_LIB_DIR', W3TC_DIR . '/lib');
45
+ define('W3TC_LIB_W3_DIR', W3TC_LIB_DIR . '/W3');
46
+ define('W3TC_LIB_MINIFY_DIR', W3TC_LIB_DIR . '/Minify');
47
+ define('W3TC_LIB_CF_DIR', W3TC_LIB_DIR . '/CF');
48
+ define('W3TC_LIB_CSSTIDY_DIR', W3TC_LIB_DIR . '/CSSTidy');
49
+ define('W3TC_LIB_MICROSOFT_DIR', W3TC_LIB_DIR . '/Microsoft');
50
+ define('W3TC_LIB_NUSOAP_DIR', W3TC_LIB_DIR . '/Nusoap');
51
+ define('W3TC_LIB_NETDNA_DIR', W3TC_LIB_DIR . '/NetDNA');
52
+ define('W3TC_LIB_OAUTH_DIR', W3TC_LIB_DIR . '/OAuth');
53
+ define('W3TC_LIB_NEWRELIC_DIR', W3TC_LIB_DIR . '/NewRelic');
54
+ define('W3TC_PLUGINS_DIR', W3TC_DIR . '/plugins');
55
+ define('W3TC_INSTALL_DIR', W3TC_DIR . '/wp-content');
56
+ define('W3TC_INSTALL_MINIFY_DIR', W3TC_INSTALL_DIR . '/w3tc/min');
57
+ define('W3TC_LANGUAGES_DIR', W3TC_DIR . '/languages');
58
+
59
+ define('W3TC_CACHE_DIR', WP_CONTENT_DIR . '/cache');
60
+ define('W3TC_CONFIG_DIR', WP_CONTENT_DIR . '/w3tc-config');
61
+ define('W3TC_CACHE_CONFIG_DIR', W3TC_CACHE_DIR . '/config');
62
+ define('W3TC_CACHE_MINIFY_DIR', W3TC_CACHE_DIR . '/minify');
63
+ define('W3TC_CACHE_PAGE_ENHANCED_DIR', W3TC_CACHE_DIR . '/page_enhanced');
64
+ define('W3TC_CACHE_TMP_DIR', W3TC_CACHE_DIR . '/tmp');
65
+ define('W3TC_CACHE_BLOGMAP_FILENAME', W3TC_CACHE_DIR . '/blogs.php');
66
+
67
+ defined('WP_CONTENT_DIR') || define('WP_CONTENT_DIR', realpath(W3TC_DIR . '/../..'));
68
+
69
+ define('W3TC_CDN_COMMAND_UPLOAD', 1);
70
+ define('W3TC_CDN_COMMAND_DELETE', 2);
71
+ define('W3TC_CDN_COMMAND_PURGE', 3);
72
+ define('W3TC_CDN_TABLE_QUEUE', 'w3tc_cdn_queue');
73
+
74
+ define('W3TC_INSTALL_FILE_ADVANCED_CACHE', W3TC_INSTALL_DIR . '/advanced-cache.php');
75
+ define('W3TC_INSTALL_FILE_DB', W3TC_INSTALL_DIR . '/db.php');
76
+ define('W3TC_INSTALL_FILE_OBJECT_CACHE', W3TC_INSTALL_DIR . '/object-cache.php');
77
+
78
+ define('W3TC_ADDIN_FILE_ADVANCED_CACHE', WP_CONTENT_DIR . '/advanced-cache.php');
79
+ define('W3TC_ADDIN_FILE_DB', WP_CONTENT_DIR . '/db.php');
80
+ define('W3TC_FILE_DB_CLUSTER_CONFIG', WP_CONTENT_DIR . '/db-cluster-config.php');
81
+ define('W3TC_ADDIN_FILE_OBJECT_CACHE', WP_CONTENT_DIR . '/object-cache.php');
82
+
83
+
84
+ define('W3TC_WP_LOADER', (defined('WP_PLUGIN_DIR') ? WP_PLUGIN_DIR : WP_CONTENT_DIR . '/plugins') . '/w3tc-wp-loader.php');
85
+ if (!defined('W3TC_EXTENSION_DIR'))
86
+ define('W3TC_EXTENSION_DIR', (defined('WP_PLUGIN_DIR') ? WP_PLUGIN_DIR : WP_CONTENT_DIR . '/plugins'));
87
+ define('W3TC_CORE_EXTENSION_DIR', W3TC_DIR . '/extensions');
88
+ w3_require_once(W3TC_INC_DIR . '/functions/compat.php');
89
+ w3_require_once(W3TC_INC_DIR . '/functions/plugin.php');
90
+
91
+ @ini_set('pcre.backtrack_limit', 4194304);
92
+ @ini_set('pcre.recursion_limit', 4194304);
93
+
94
+ global $w3_late_init;
95
+ $w3_late_init = false;
96
+ /**
97
+ * Returns current microtime
98
+ *
99
+ * @return double
100
+ */
101
+ function w3_microtime() {
102
+ list ($usec, $sec) = explode(' ', microtime());
103
+
104
+ return ((double) $usec + (double) $sec);
105
+ }
106
+
107
+ /**
108
+ * Check if content is HTML or XML
109
+ *
110
+ * @param string $content
111
+ * @return boolean
112
+ */
113
+ function w3_is_xml($content) {
114
+ if (strlen($content) > 1000) {
115
+ $content = substr($content, 0, 1000);
116
+ }
117
+
118
+ if (strstr($content, '<!--') !== false) {
119
+ $content = preg_replace('~<!--.*?-->~s', '', $content);
120
+ }
121
+
122
+ $content = ltrim($content, "\x00\x09\x0A\x0D\x20\xBB\xBF\xEF");
123
+
124
+ return (stripos($content, '<?xml') === 0 || stripos($content, '<html') === 0 || stripos($content, '<!DOCTYPE') === 0);
125
+ }
126
+
127
+ /**
128
+ * If content can handle HTML comments, can disable printout per request using filter 'w3tc_can_print_comment'
129
+ * @param $buffer
130
+ * @return bool
131
+ */
132
+ function w3_can_print_comment(&$buffer) {
133
+ if (function_exists('apply_filters'))
134
+ return apply_filters('w3tc_can_print_comment', w3_is_xml($buffer) && !defined('DOING_AJAX'));
135
+ return w3_is_xml($buffer) && !defined('DOING_AJAX');
136
+ }
137
+
138
+ /*
139
+ * Returns URI from filename/dirname
140
+ *
141
+ * @return string
142
+ */
143
+ function w3_filename_to_url($filename, $use_site_url = false) {
144
+ // using wp-content instead of document_root as known dir since dirbased
145
+ // multisite wp adds blogname to the path inside site_url
146
+ if (substr($filename, 0, strlen(WP_CONTENT_DIR)) != WP_CONTENT_DIR)
147
+ return '';
148
+ $uri_from_wp_content = substr($filename, strlen(WP_CONTENT_DIR));
149
+
150
+ if ($use_site_url)
151
+ $site_url_ssl = w3_get_url_ssl(w3_get_site_url());
152
+ else
153
+ $site_url_ssl = w3_get_url_ssl(w3_get_home_url());
154
+
155
+ $dir = '';
156
+ if (substr(trailingslashit(WP_CONTENT_DIR), 0, strlen(trailingslashit(w3_get_site_root()))) == trailingslashit(w3_get_site_root())) {
157
+ if ($use_site_url || w3_get_domain(w3_get_home_url()) == w3_get_domain(w3_get_site_url()))
158
+ $dir = str_replace($site_url_ssl, '', w3_get_url_ssl(w3_get_site_url()));
159
+ else
160
+ $dir = str_replace($site_url_ssl, '', w3_get_url_ssl(w3_get_home_url()));
161
+ $dir = trim($dir, '/\\');
162
+ if ($dir)
163
+ $dir = '/' . $dir;
164
+ $content_path = trim(substr(trailingslashit(WP_CONTENT_DIR), strlen(trailingslashit(w3_get_site_root()))), '/\\');
165
+ }
166
+ else
167
+ $content_path = trim(substr(trailingslashit(WP_CONTENT_DIR), strlen(trailingslashit(w3_get_document_root()))), '/\\');
168
+
169
+ $url = $site_url_ssl . $dir . '/' . $content_path . $uri_from_wp_content;
170
+
171
+ return $url;
172
+ }
173
+
174
+ /**
175
+ * Returns true if database cluster is used
176
+ *
177
+ * @return boolean
178
+ */
179
+ function w3_is_dbcluster() {
180
+ return defined('W3TC_FILE_DB_CLUSTER_CONFIG') && @file_exists(W3TC_FILE_DB_CLUSTER_CONFIG)
181
+ && defined('W3TC_ENTERPRISE') && W3TC_ENTERPRISE;
182
+ }
183
+
184
+ /**
185
+ * Returns true if it's WPMU
186
+ *
187
+ * @return boolean
188
+ */
189
+ function w3_is_wpmu() {
190
+ static $wpmu = null;
191
+
192
+ if ($wpmu === null) {
193
+ $wpmu = file_exists(ABSPATH . 'wpmu-settings.php');
194
+ }
195
+
196
+ return $wpmu;
197
+ }
198
+
199
+ /**
200
+ * Returns true if WPMU uses vhosts
201
+ *
202
+ * @return boolean
203
+ */
204
+ function w3_is_subdomain_install() {
205
+ return ((defined('SUBDOMAIN_INSTALL') && SUBDOMAIN_INSTALL) || (defined('VHOST') && VHOST == 'yes'));
206
+ }
207
+
208
+ /**
209
+ * Returns true if it's WP with enabled Network mode
210
+ *
211
+ * @return boolean
212
+ */
213
+ function w3_is_multisite() {
214
+ static $multisite = null;
215
+
216
+ if ($multisite === null) {
217
+ $multisite = ((defined('MULTISITE') && MULTISITE) || defined('SUNRISE') || w3_is_subdomain_install());
218
+ }
219
+
220
+ return $multisite;
221
+ }
222
+
223
+ /**
224
+ * Returns if there is multisite mode
225
+ *
226
+ * @return boolean
227
+ */
228
+ function w3_is_network() {
229
+ return (w3_is_wpmu() || w3_is_multisite());
230
+ }
231
+
232
+ /**
233
+ * Check if URL is valid
234
+ *
235
+ * @param string $url
236
+ * @return boolean
237
+ */
238
+ function w3_is_url($url) {
239
+ return preg_match('~^(https?:)?//~', $url);
240
+ }
241
+
242
+ /**
243
+ * Returns true if current connection is secure
244
+ *
245
+ * @return boolean
246
+ */
247
+ function w3_is_https() {
248
+ switch (true) {
249
+ case (isset($_SERVER['HTTPS']) && w3_to_boolean($_SERVER['HTTPS'])):
250
+ case (isset($_SERVER['SERVER_PORT']) && (int) $_SERVER['SERVER_PORT'] == 443):
251
+ return true;
252
+ }
253
+
254
+ return false;
255
+ }
256
+
257
+ /**
258
+ * Check if there was database error
259
+ *
260
+ * @param string $content
261
+ * @return boolean
262
+ */
263
+ function w3_is_database_error(&$content) {
264
+ return (stristr($content, '<title>Database Error</title>') !== false);
265
+ }
266
+
267
+ /**
268
+ * Retuns true if preview settings active
269
+ *
270
+ * @return boolean
271
+ */
272
+ function w3_is_preview_mode() {
273
+ return (isset($_COOKIE['w3tc_preview']) && $_COOKIE['w3tc_preview'] == true) || (isset($_REQUEST['w3tc_preview']) ||
274
+ (isset($_SERVER['HTTP_REFERER']) &&
275
+ strstr($_SERVER['HTTP_REFERER'], 'w3tc_preview') !== false));
276
+ }
277
+
278
+ /**
279
+ * Returns a preview link with current state
280
+ * @return string
281
+ */
282
+ function w3tc_get_preview_link() {
283
+ w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/ui.php');
284
+ return w3_is_preview_mode() ? w3_button_link(__('Stop Previewing', 'w3-total-cache'), wp_nonce_url(w3_admin_url('admin.php?page=w3tc_dashboard&w3tc_default_stop_previewing'), 'w3tc'), false) : w3_button_link(__('Preview', 'w3-total-cache'), wp_nonce_url(w3_admin_url('admin.php?page=w3tc_dashboard&w3tc_default_previewing'), 'w3tc'), true);
285
+ }
286
+
287
+ /**
288
+ * Returns true if server is Apache
289
+ *
290
+ * @return boolean
291
+ */
292
+ function w3_is_apache() {
293
+ return (isset($_SERVER['SERVER_SOFTWARE']) && stristr($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false);
294
+ }
295
+
296
+ /**
297
+ * Check whether server is LiteSpeed
298
+ *
299
+ * @return bool
300
+ */
301
+ function w3_is_litespeed() {
302
+ return (isset($_SERVER['SERVER_SOFTWARE']) && stristr($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false);
303
+ }
304
+
305
+ /**
306
+ * Returns true if server is nginx
307
+ *
308
+ * @return boolean
309
+ */
310
+ function w3_is_nginx() {
311
+ return (isset($_SERVER['SERVER_SOFTWARE']) && stristr($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false);
312
+ }
313
+
314
+ /**
315
+ * Check whether $engine is correct CDN engine
316
+ *
317
+ * @param string $engine
318
+ * @return boolean
319
+ */
320
+ function w3_is_cdn_engine($engine) {
321
+ return in_array($engine, array('ftp', 's3', 'cf', 'cf2', 'rscf', 'azure', 'mirror', 'netdna', 'maxcdn',
322
+ 'cotendo', 'akamai', 'edgecast', 'att'));
323
+ }
324
+
325
+ /**
326
+ * Returns true if CDN engine is mirror
327
+ *
328
+ * @param string $engine
329
+ * @return bool
330
+ */
331
+ function w3_is_cdn_mirror($engine) {
332
+ return in_array($engine, array('mirror', 'netdna', 'maxcdn', 'cotendo', 'cf2', 'akamai', 'edgecast', 'att'));
333
+ }
334
+
335
+ /**
336
+ * Returns true if CDN has purge all support
337
+ * @param $engine
338
+ * @return bool
339
+ */
340
+ function w3_cdn_can_purge_all($engine) {
341
+ return in_array($engine, array('cotendo', 'edgecast', 'att', 'netdna', 'maxcdn'));
342
+ }
343
+
344
+ /**
345
+ * Returns domain from host
346
+ *
347
+ * @param string $host
348
+ * @return string
349
+ */
350
+ function w3_get_domain($host) {
351
+ $host = strtolower($host);
352
+
353
+ if (($pos = strpos($host, ':')) !== false) {
354
+ $host = substr($host, $pos+3);
355
+ }
356
+ if (($pos = strpos($host, '/')) !== false) {
357
+ $host = substr($host, 0, $pos);
358
+ }
359
+
360
+ $host = rtrim($host, '.');
361
+
362
+ return $host;
363
+ }
364
+
365
+ /**
366
+ * Returns array of all available blognames
367
+ *
368
+ * @return array
369
+ */
370
+ function w3_get_blognames() {
371
+ global $wpdb;
372
+
373
+ $blognames = array();
374
+
375
+ $sql = sprintf('SELECT domain, path FROM %s', $wpdb->blogs);
376
+ $blogs = $wpdb->get_results($sql);
377
+
378
+ if ($blogs) {
379
+ $base_path = w3_get_base_path();
380
+
381
+ foreach ($blogs as $blog) {
382
+ $blogname = trim(str_replace($base_path, '', $blog->path), '/');
383
+
384
+ if ($blogname) {
385
+ $blognames[] = $blogname;
386
+ }
387
+ }
388
+ }
389
+
390
+ return $blognames;
391
+ }
392
+
393
+ /**
394
+ * Returns current blog ID
395
+ *
396
+ * @return integer
397
+ */
398
+ function w3_get_blog_id() {
399
+ global $w3_current_blog_id;
400
+
401
+ if (!is_null($w3_current_blog_id))
402
+ return $w3_current_blog_id;
403
+
404
+ if (!w3_is_network() || is_network_admin()) {
405
+ $w3_current_blog_id = 0;
406
+ return $w3_current_blog_id;
407
+ }
408
+
409
+
410
+ $blog_data = w3_blogmap_get_blog_data();
411
+ if (!is_null($blog_data))
412
+ $w3_current_blog_id = substr($blog_data, 1);
413
+ else
414
+ $w3_current_blog_id = 0;
415
+
416
+ return $w3_current_blog_id;
417
+ }
418
+
419
+ /**
420
+ * Returns blogmap filename by home url
421
+ *
422
+ * @param string $blog_home_url
423
+ * @return string
424
+ */
425
+ function w3_blogmap_filename($blog_home_url) {
426
+ if (!defined('W3TC_BLOG_LEVELS'))
427
+ return W3TC_CACHE_BLOGMAP_FILENAME;
428
+ else {
429
+ $filename = dirname(W3TC_CACHE_BLOGMAP_FILENAME) . '/' .
430
+ basename(W3TC_CACHE_BLOGMAP_FILENAME, '.php') . '/';
431
+
432
+ $s = md5($blog_home_url);
433
+ for ($n = 0; $n < W3TC_BLOG_LEVELS; $n++)
434
+ $filename .= substr($s, $n, 1) . '/';
435
+
436
+ return $filename . basename(W3TC_CACHE_BLOGMAP_FILENAME);
437
+ }
438
+ }
439
+
440
+ /**
441
+ * Returns blog_id by home url
442
+ * If database not initialized yet - returns 0
443
+ *
444
+ * @return integer
445
+ */
446
+ function w3_blogmap_get_blog_data() {
447
+ $host = w3_get_host();
448
+
449
+ // subdomain
450
+ if (w3_is_subdomain_install()) {
451
+ $blog_data = w3_blogmap_try_get_blog_data($host);
452
+ if (is_null($blog_data))
453
+ $GLOBALS['w3tc_blogmap_register_new_item'] = $host;
454
+
455
+ return $blog_data;
456
+ } else {
457
+ // try subdir blog
458
+ $url = $host . $_SERVER['REQUEST_URI'];
459
+ $pos = strpos($url, '?');
460
+ if ($pos !== false)
461
+ $url = substr($url, 0, $pos);
462
+
463
+ $url = rtrim($url, '/');
464
+ $start_url = $url;
465
+
466
+ for (;;) {
467
+ $blog_data = w3_blogmap_try_get_blog_data($url);
468
+ if (!is_null($blog_data))
469
+ return $blog_data;
470
+ $pos = strrpos($url, '/');
471
+ if ($pos === false)
472
+ break;
473
+
474
+ $url = rtrim(substr($url, 0, $pos), '/');
475
+ }
476
+
477
+ $GLOBALS['w3tc_blogmap_register_new_item'] = $start_url;
478
+ return null;
479
+ }
480
+ }
481
+
482
+
483
+
484
+ function w3_blogmap_try_get_blog_data($url) {
485
+ $filename = w3_blogmap_filename($url);
486
+
487
+ if (file_exists($filename)) {
488
+ $data = file_get_contents($filename);
489
+ $blog_data = @eval($data);
490
+
491
+ if (is_array($blog_data) && isset($blog_data[$url]))
492
+ return $blog_data[$url];
493
+ }
494
+ return null;
495
+ }
496
+
497
+ /**
498
+ * @return bool
499
+ */
500
+ function w3_force_master() {
501
+ global $w3_force_master;
502
+ if (!is_null($w3_force_master))
503
+ return $w3_force_master;
504
+
505
+ if (!w3_is_multisite())
506
+ $w3_force_master = false;
507
+ else {
508
+ $blog_data = w3_blogmap_get_blog_data();
509
+ if (is_null($blog_data) ||
510
+ ($blog_data[0] != 'm' && $blog_data[0] != 'c'))
511
+ $w3_force_master = true;
512
+ else
513
+ $w3_force_master = ($blog_data[0] == 'm');
514
+ }
515
+
516
+ return $w3_force_master;
517
+ }
518
+
519
+ /**
520
+ * Returns path to section's cache dir
521
+ *
522
+ * @param string $section
523
+ * @return string
524
+ */
525
+ function w3_cache_dir($section) {
526
+ return W3TC_CACHE_DIR . '/' . $section;
527
+ }
528
+
529
+ /**
530
+ * Returns path to blog's cache dir
531
+ *
532
+ * @param string $section
533
+ * @param null|int $blog_id
534
+ * @return string
535
+ */
536
+ function w3_cache_blog_dir($section, $blog_id = null) {
537
+ if (is_null($blog_id))
538
+ $blog_id = w3_get_blog_id();
539
+
540
+ $postfix = sprintf('%06d', $blog_id);
541
+
542
+ if (defined('W3TC_BLOG_LEVELS')) {
543
+ for ($n = 0; $n < W3TC_BLOG_LEVELS; $n++)
544
+ $postfix = substr($postfix, strlen($postfix) - 1 - $n, 1) . '/' .
545
+ $postfix;
546
+ }
547
+
548
+ return w3_cache_dir($section) . '/' . $postfix;
549
+ }
550
+
551
+ /**
552
+ * Return full path to log file for module
553
+ * Path used in priority
554
+ * 1) W3TC_DEBUG_DIR
555
+ * 2) WP_DEBUG_LOG
556
+ * 3) W3TC_CACHE_DIR
557
+ *
558
+ * @param $module
559
+ * @param null $blog_id
560
+ * @return string
561
+ */
562
+ function w3_debug_log($module, $blog_id = null) {
563
+ if (is_null($blog_id))
564
+ $blog_id = w3_get_blog_id();
565
+
566
+ $postfix = sprintf('%06d', $blog_id);
567
+
568
+ if (defined('W3TC_BLOG_LEVELS')) {
569
+ for ($n = 0; $n < W3TC_BLOG_LEVELS; $n++)
570
+ $postfix = substr($postfix, strlen($postfix) - 1 - $n, 1) . '/' .
571
+ $postfix;
572
+ }
573
+ $from_dir = W3TC_CACHE_DIR;
574
+ if (defined('W3TC_DEBUG_DIR') && W3TC_DEBUG_DIR) {
575
+ $dir_path = W3TC_DEBUG_DIR;
576
+ if (!is_dir(W3TC_DEBUG_DIR))
577
+ $from_dir = dirname(W3TC_DEBUG_DIR);
578
+ } else
579
+ $dir_path = w3_cache_dir('log');
580
+ $filename = $dir_path . '/' . $postfix . '/' . $module . '.log';
581
+ if (!is_dir(dirname($filename))) {
582
+ w3_require_once( W3TC_INC_DIR . '/functions/file.php');
583
+ w3_mkdir_from(dirname($filename), $from_dir);
584
+ }
585
+
586
+ return $filename;
587
+ }
588
+
589
+ /**
590
+ * Returns URL regexp from URL
591
+ *
592
+ * @param string $url
593
+ * @return string
594
+ */
595
+ function w3_get_url_regexp($url) {
596
+ $url = preg_replace('~(https?:)?//~i', '', $url);
597
+ $url = preg_replace('~^www\.~i', '', $url);
598
+
599
+ $regexp = '(https?:)?//(www\.)?' . w3_preg_quote($url);
600
+
601
+ return $regexp;
602
+ }
603
+
604
+ /**
605
+ * Returns SSL URL if current connection is https
606
+ * @param string $url
607
+ * @return string
608
+ */
609
+ function w3_get_url_ssl($url) {
610
+ if (w3_is_https()) {
611
+ $url = str_replace('http://', 'https://', $url);
612
+ }
613
+
614
+ return $url;
615
+ }
616
+
617
+ /**
618
+ * Get domain URL
619
+ *
620
+ * @return string
621
+ */
622
+
623
+ function w3_get_domain_url() {
624
+ $home_url = w3_get_home_url();
625
+ $parse_url = @parse_url($home_url);
626
+
627
+ if ($parse_url && isset($parse_url['scheme']) && isset($parse_url['host'])) {
628
+ $scheme = $parse_url['scheme'];
629
+ $host = $parse_url['host'];
630
+ $port = (isset($parse_url['port']) && $parse_url['port'] != 80 ? ':' . (int) $parse_url['port'] : '');
631
+ $domain_url = sprintf('%s://%s%s', $scheme, $host, $port);
632
+
633
+ return $domain_url;
634
+ }
635
+
636
+ return false;
637
+ }
638
+
639
+ /**
640
+ * Returns domain url regexp
641
+ *
642
+ * @return string
643
+ */
644
+ function w3_get_domain_url_regexp() {
645
+ $domain_url = w3_get_domain_url();
646
+ $regexp = w3_get_url_regexp($domain_url);
647
+
648
+ return $regexp;
649
+ }
650
+
651
+ /**
652
+ * Returns home URL
653
+ *
654
+ * No trailing slash!
655
+ *
656
+ * @return string
657
+ */
658
+ function w3_get_home_url() {
659
+ static $home_url = null;
660
+
661
+ if ($home_url === null) {
662
+ $config = w3_instance('W3_Config');
663
+ if (w3_is_multisite() && $config->get_boolean('common.force_master')) {
664
+ $home_url = get_home_url();
665
+ } else {
666
+ // get_option is unusable here, it can cause problem when objCache isn't yet initialized
667
+ // Which is why we save the 'home' option in our ConfigCache
668
+ // We don't just use $config->get_string, because we want the cache to rebuild
669
+ // when 'wordpress.home' is not (yet) present
670
+ $home_url = $config->get_cache_option('wordpress.home');
671
+ $home_url = rtrim($home_url, '/');
672
+ }
673
+ }
674
+
675
+ return $home_url;
676
+ }
677
+
678
+ /**
679
+ * Returns SSL home url
680
+ *
681
+ * @return string
682
+ */
683
+ function w3_get_home_url_ssl() {
684
+ $home_url = w3_get_home_url();
685
+ $ssl = w3_get_url_ssl($home_url);
686
+
687
+ return $ssl;
688
+ }
689
+
690
+ /**
691
+ * Returns home url regexp
692
+ *
693
+ * @return string
694
+ */
695
+ function w3_get_home_url_regexp() {
696
+ $home_url = w3_get_home_url();
697
+ $regexp = w3_get_url_regexp($home_url);
698
+
699
+ return $regexp;
700
+ }
701
+
702
+ /**
703
+ * Network installs returns wrong wp site path
704
+ * @return string
705
+ */
706
+ function w3_get_wp_sitepath() {
707
+ if (w3_is_network()) {
708
+ global $current_site;
709
+ return $current_site->path;
710
+ } else {
711
+ return w3_get_site_path();
712
+ }
713
+ }
714
+
715
+ /**
716
+ * Returns site URL
717
+ *
718
+ * No trailing slash!
719
+ *
720
+ * @return string
721
+ */
722
+ function w3_get_site_url() {
723
+ static $site_url = null;
724
+
725
+ if ($site_url === null) {
726
+ $site_url = get_option('siteurl');
727
+ $site_url = rtrim($site_url, '/');
728
+ }
729
+
730
+ return $site_url;
731
+ }
732
+
733
+ /**
734
+ * Returns SSL site URL
735
+ *
736
+ * @return string
737
+ */
738
+ function w3_get_site_url_ssl() {
739
+ $site_url = w3_get_site_url();
740
+ $ssl = w3_get_url_ssl($site_url);
741
+
742
+ return $ssl;
743
+
744
+ }
745
+
746
+ /**
747
+ * Returns absolute path to document root
748
+ *
749
+ * No trailing slash!
750
+ *
751
+ * @return string
752
+ */
753
+ function w3_get_document_root() {
754
+ static $document_root = null;
755
+
756
+ if ($document_root === null) {
757
+ if (!empty($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == $_SERVER['PHP_SELF']) {
758
+ $document_root = w3_get_site_root();
759
+ } elseif (!empty($_SERVER['SCRIPT_FILENAME'])) {
760
+ $document_root = substr(w3_path($_SERVER['SCRIPT_FILENAME']), 0, -strlen(w3_path($_SERVER['PHP_SELF'])));
761
+ } elseif (!empty($_SERVER['PATH_TRANSLATED'])) {
762
+ $document_root = substr(w3_path($_SERVER['PATH_TRANSLATED']), 0, -strlen(w3_path($_SERVER['PHP_SELF'])));
763
+ } elseif (!empty($_SERVER['DOCUMENT_ROOT'])) {
764
+ $document_root = w3_path($_SERVER['DOCUMENT_ROOT']);
765
+ } else {
766
+ $document_root = w3_get_site_root();
767
+ }
768
+
769
+ $document_root = realpath($document_root);
770
+ $document_root = w3_path($document_root);
771
+ }
772
+
773
+ return $document_root;
774
+ }
775
+
776
+ /**
777
+ * Returns absolute path to home directory
778
+ *
779
+ * Example:
780
+ *
781
+ * DOCUMENT_ROOT=/var/www/vhosts/domain.com
782
+ * Install dir=/var/www/vhosts/domain.com/site/blog
783
+ * home=http://domain.com/site
784
+ * siteurl=http://domain.com/site/blog
785
+ * return /var/www/vhosts/domain.com/site
786
+ *
787
+ * No trailing slash!
788
+ *
789
+ * @return string
790
+ */
791
+ function w3_get_home_root() {
792
+ if (w3_is_network()) {
793
+ $path = w3_get_base_path();
794
+ } else {
795
+ $path = w3_get_home_path();
796
+ }
797
+
798
+ $home_root = w3_get_document_root() . $path;
799
+ $home_root = realpath($home_root);
800
+ $home_root = w3_path($home_root);
801
+
802
+ return $home_root;
803
+ }
804
+
805
+ /**
806
+ * Returns absolute path to blog install dir
807
+ *
808
+ * Example:
809
+ *
810
+ * DOCUMENT_ROOT=/var/www/vhosts/domain.com
811
+ * install dir=/var/www/vhosts/domain.com/site/blog
812
+ * return /var/www/vhosts/domain.com/site/blog
813
+ *
814
+ * No trailing slash!
815
+ *
816
+ * @return string
817
+ */
818
+ function w3_get_site_root() {
819
+ $site_root = ABSPATH;
820
+ $site_root = realpath($site_root);
821
+ $site_root = w3_path($site_root);
822
+
823
+ return $site_root;
824
+ }
825
+
826
+ /**
827
+ * Returns blog path
828
+ *
829
+ * Example:
830
+ *
831
+ * siteurl=http://domain.com/site/blog
832
+ * return /site/blog/
833
+ *
834
+ * With trailing slash!
835
+ *
836
+ * @return string
837
+ */
838
+ function w3_get_site_path() {
839
+ $site_url = w3_get_site_url();
840
+ $parse_url = @parse_url($site_url);
841
+
842
+ if ($parse_url && isset($parse_url['path'])) {
843
+ $site_path = '/' . ltrim($parse_url['path'], '/');
844
+ } else {
845
+ $site_path = '/';
846
+ }
847
+
848
+ if (substr($site_path, -1) != '/') {
849
+ $site_path .= '/';
850
+ }
851
+
852
+ return $site_path;
853
+ }
854
+
855
+ /**
856
+ * Returns home domain
857
+ *
858
+ * @return string
859
+ */
860
+ function w3_get_home_domain() {
861
+ $home_url = w3_get_home_url();
862
+ $parse_url = @parse_url($home_url);
863
+
864
+ if ($parse_url && isset($parse_url['host'])) {
865
+ return $parse_url['host'];
866
+ }
867
+
868
+ return w3_get_host();
869
+ }
870
+
871
+ /**
872
+ * Returns home path
873
+ *
874
+ * Example:
875
+ *
876
+ * home=http://domain.com/site/
877
+ * siteurl=http://domain.com/site/blog
878
+ * return /site/
879
+ *
880
+ * With trailing slash!
881
+ *
882
+ * @return string
883
+ */
884
+ function w3_get_home_path() {
885
+ $home_url = w3_get_home_url();
886
+ $parse_url = @parse_url($home_url);
887
+
888
+ if ($parse_url && isset($parse_url['path'])) {
889
+ $home_path = '/' . ltrim($parse_url['path'], '/');
890
+ } else {
891
+ $home_path = '/';
892
+ }
893
+
894
+ if (substr($home_path, -1) != '/') {
895
+ $home_path .= '/';
896
+ }
897
+
898
+ return $home_path;
899
+ }
900
+
901
+ /**
902
+ * Returns path to WP directory relative to document root
903
+ *
904
+ * Example:
905
+ *
906
+ * DOCUMENT_ROOT=/var/www/vhosts/domain.com/
907
+ * Install dir=/var/www/vhosts/domain.com/site/blog/
908
+ * return /site/blog/
909
+ *
910
+ * With trailing slash!
911
+ *
912
+ * @return string
913
+ */
914
+ function w3_get_base_path() {
915
+ $document_root = w3_get_document_root();
916
+ $site_root = w3_get_site_root();
917
+
918
+ $base_path = str_replace($document_root, '', $site_root);
919
+ $base_path = '/' . ltrim($base_path, '/');
920
+
921
+ if (substr($base_path, -1) != '/') {
922
+ $base_path .= '/';
923
+ }
924
+
925
+ return $base_path;
926
+ }
927
+
928
+ /**
929
+ * Returns server hostname
930
+ *
931
+ * @return string
932
+ */
933
+ function w3_get_host() {
934
+ static $host = null;
935
+
936
+ if ($host === null) {
937
+ if (!empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
938
+ $host = $_SERVER['HTTP_X_FORWARDED_HOST'];
939
+ } elseif (!empty($_SERVER['HTTP_HOST'])) {
940
+ // HTTP_HOST sometimes is not set causing warning
941
+ $host = $_SERVER['HTTP_HOST'];
942
+ } else {
943
+ $host = '';
944
+ }
945
+ }
946
+
947
+ return $host;
948
+ }
949
+
950
+ /**
951
+ * Returns host ID
952
+ *
953
+ * @return string
954
+ */
955
+ function w3_get_host_id() {
956
+ static $host_id = null;
957
+
958
+ if ($host_id === null) {
959
+ $host = w3_get_host();
960
+ $blog_id = w3_get_blog_id();
961
+
962
+ $host_id = sprintf('%s_%d', $host, $blog_id);
963
+ }
964
+
965
+ return $host_id;
966
+ }
967
+
968
+ /**
969
+ * Returns WP config file path
970
+ *
971
+ * @return string
972
+ */
973
+ function w3_get_wp_config_path() {
974
+ $search = array(
975
+ ABSPATH . 'wp-config.php',
976
+ dirname(ABSPATH) . '/wp-config.php'
977
+ );
978
+
979
+ foreach ($search as $path) {
980
+ if (file_exists($path)) {
981
+ return $path;
982
+ }
983
+ }
984
+
985
+ return false;
986
+ }
987
+
988
+ /**
989
+ * Returns theme key
990
+ *
991
+ * @param string $theme_root
992
+ * @param string $template
993
+ * @param string $stylesheet
994
+ * @return string
995
+ */
996
+ function w3_get_theme_key($theme_root, $template, $stylesheet) {
997
+ $site_root = w3_get_site_root();
998
+ $theme_path = ltrim(str_replace($site_root, '', w3_path($theme_root)), '/');
999
+
1000
+ return substr(md5($theme_path . $template . $stylesheet), 0, 5);
1001
+ }
1002
+
1003
+ /**
1004
+ * Returns theme key (legacy support)
1005
+ *
1006
+ * @param string $theme_root
1007
+ * @param string $template
1008
+ * @param string $stylesheet
1009
+ * @return string
1010
+ */
1011
+ function w3_get_theme_key_legacy($theme_root, $template, $stylesheet) {
1012
+ return substr(md5($theme_root . $template . $stylesheet), 0, 6);
1013
+ }
1014
+
1015
+ /**
1016
+ * Returns true if we can check rules
1017
+ *
1018
+ * @return bool
1019
+ */
1020
+ function w3_can_check_rules() {
1021
+ return (w3_is_apache() || w3_is_litespeed() || w3_is_nginx());
1022
+ }
1023
+
1024
+ /**
1025
+ * Returns true if CDN engine is supporting purge
1026
+ *
1027
+ * @param string $engine
1028
+ * @return bool
1029
+ */
1030
+ function w3_can_cdn_purge($engine) {
1031
+ return in_array($engine, array('ftp', 's3', 'cf', 'cf2', 'rscf', 'azure', 'netdna', 'maxcdn', 'cotendo',
1032
+ 'edgecast', 'akamai', 'att'));
1033
+ }
1034
+
1035
+ /**
1036
+ * Returns true if CDN supports realtime purge. That is purging on post changes, comments etc.
1037
+ * @param $engine
1038
+ * @return bool
1039
+ */
1040
+ function w3tc_cdn_supports_realtime_purge($engine) {
1041
+ return !in_array($engine, array('cf2'));
1042
+ }
1043
+
1044
+ /**
1045
+ * Parses path
1046
+ *
1047
+ * @param string $path
1048
+ * @return mixed
1049
+ */
1050
+ function w3_parse_path($path) {
1051
+ $path = str_replace(array(
1052
+ '%BLOG_ID%',
1053
+ '%POST_ID%',
1054
+ '%BLOG_ID%',
1055
+ '%HOST%',
1056
+ '%DOMAIN%',
1057
+ '%BASE_PATH%'
1058
+ ), array(
1059
+ (isset($GLOBALS['blog_id']) ? (int) $GLOBALS['blog_id'] : 0),
1060
+ (isset($GLOBALS['post_id']) ? (int) $GLOBALS['post_id'] : 0),
1061
+ w3_get_blog_id(),
1062
+ w3_get_host(),
1063
+ w3_get_domain(w3_get_host()),
1064
+ trim(w3_get_base_path(), '/')
1065
+ ), $path);
1066
+
1067
+ return $path;
1068
+ }
1069
+
1070
+ /**
1071
+ * Normalizes file name
1072
+ *
1073
+ * Relative to site root!
1074
+ *
1075
+ * @param string $file
1076
+ * @return string
1077
+ */
1078
+ function w3_normalize_file($file) {
1079
+ if (w3_is_url($file)) {
1080
+ if (strstr($file, '?') === false) {
1081
+ $home_url_regexp = '~' . w3_get_home_url_regexp() . '~i';
1082
+ $file = preg_replace($home_url_regexp, '', $file);
1083
+ }
1084
+ }
1085
+
1086
+ if (!w3_is_url($file)) {
1087
+ $file = w3_path($file);
1088
+ $file = str_replace(w3_get_site_root(), '', $file);
1089
+ $file = ltrim($file, '/');
1090
+ }
1091
+
1092
+ return $file;
1093
+ }
1094
+
1095
+ /**
1096
+ * Normalizes file name for minify
1097
+ *
1098
+ * Relative to document root!
1099
+ *
1100
+ * @param string $file
1101
+ * @return string
1102
+ */
1103
+ function w3_normalize_file_minify($file) {
1104
+ if (w3_is_url($file)) {
1105
+ if (strstr($file, '?') === false) {
1106
+ $domain_url_regexp = '~' . w3_get_domain_url_regexp() . '~i';
1107
+ $file = preg_replace($domain_url_regexp, '', $file);
1108
+ }
1109
+ }
1110
+
1111
+ if (!w3_is_url($file)) {
1112
+ $file = w3_path($file);
1113
+ $file = str_replace(w3_get_document_root(), '', $file);
1114
+ $file = ltrim($file, '/');
1115
+ }
1116
+
1117
+ return $file;
1118
+ }
1119
+
1120
+ /**
1121
+ * Normalizes file name for minify
1122
+ *
1123
+ * Relative to document root!
1124
+ *
1125
+ * @param string $file
1126
+ * @return string
1127
+ */
1128
+ function w3_normalize_file_minify2($file) {
1129
+ $file = w3_remove_query($file);
1130
+ $file = w3_normalize_file_minify($file);
1131
+ $file = w3_translate_file($file);
1132
+
1133
+ return $file;
1134
+ }
1135
+
1136
+ /**
1137
+ * Translates remote file to local file
1138
+ *
1139
+ * @param string $file
1140
+ * @return string
1141
+ */
1142
+ function w3_translate_file($file) {
1143
+ if (!w3_is_url($file)) {
1144
+ $file = '/' . ltrim($file, '/');
1145
+ $regexp = '~^' . w3_preg_quote(w3_get_site_path()) . '~';
1146
+ $file = preg_replace($regexp, w3_get_base_path(), $file);
1147
+ $file = ltrim($file, '/');
1148
+ }
1149
+
1150
+ return $file;
1151
+ }
1152
+
1153
+ /**
1154
+ * Remove WP query string from URL
1155
+ *
1156
+ * @param string $url
1157
+ * @return string
1158
+ */
1159
+ function w3_remove_query($url) {
1160
+ $url = preg_replace('~[&\?]+(ver=([a-z0-9-_\.]+|[0-9-]+))~i', '', $url);
1161
+
1162
+ return $url;
1163
+ }
1164
+
1165
+ /**
1166
+ * Converts win path to unix
1167
+ *
1168
+ * @param string $path
1169
+ * @return string
1170
+ */
1171
+ function w3_path($path) {
1172
+ $path = preg_replace('~[/\\\]+~', '/', $path);
1173
+ $path = rtrim($path, '/');
1174
+
1175
+ return $path;
1176
+ }
1177
+
1178
+ /**
1179
+ * Returns real path of given path
1180
+ *
1181
+ * @param string $path
1182
+ * @return string
1183
+ */
1184
+ function w3_realpath($path) {
1185
+ $path = w3_path($path);
1186
+ $parts = explode('/', $path);
1187
+ $absolutes = array();
1188
+
1189
+ foreach ($parts as $part) {
1190
+ if ('.' == $part) {
1191
+ continue;
1192
+ }
1193
+ if ('..' == $part) {
1194
+ array_pop($absolutes);
1195
+ } else {
1196
+ $absolutes[] = $part;
1197
+ }
1198
+ }
1199
+
1200
+ return implode('/', $absolutes);
1201
+ }
1202
+
1203
+ /**
1204
+ * Returns GMT date
1205
+ * @param integer $time
1206
+ * @return string
1207
+ */
1208
+ function w3_http_date($time) {
1209
+ return gmdate('D, d M Y H:i:s \G\M\T', $time);
1210
+ }
1211
+
1212
+ /**
1213
+ * Redirects to URL
1214
+ *
1215
+ * @param string $url
1216
+ * @param array $params
1217
+ * @return string
1218
+ */
1219
+ function w3_redirect($url = '', $params = array()) {
1220
+ w3_require_once(W3TC_INC_DIR . '/functions/url.php');
1221
+
1222
+ $url = w3_url_format($url, $params);
1223
+ if (function_exists('do_action'))
1224
+ do_action('w3_redirect');
1225
+
1226
+ @header('Location: ' . $url);
1227
+ exit();
1228
+ }
1229
+
1230
+ /**
1231
+ * Redirects to URL
1232
+ *
1233
+ * @param string $url
1234
+ * @param array $params
1235
+ *
1236
+ * @return string
1237
+ */
1238
+ function w3_redirect_temp( $url = '', $params = array() ) {
1239
+ w3_require_once( W3TC_INC_DIR . '/functions/url.php' );
1240
+
1241
+ $url = w3_url_format( $url, $params );
1242
+ if (function_exists('do_action'))
1243
+ do_action( 'w3_redirect' );
1244
+
1245
+ $status_code = 301;
1246
+
1247
+ $protocol = $_SERVER["SERVER_PROTOCOL"];
1248
+ if ( 'HTTP/1.1' === $protocol ) {
1249
+ $status_code = 307;
1250
+ }
1251
+
1252
+ $text = get_status_header_desc( $status_code );
1253
+ if ( !empty( $text ) ) {
1254
+ $status_header = "$protocol $status_code $text";
1255
+ @header( $status_header, true, $status_code );
1256
+ }
1257
+ @header( 'Location: ' . $url, true, $status_code );
1258
+ exit();
1259
+ }
1260
+
1261
+ /**
1262
+ * Returns caching engine name
1263
+ *
1264
+ * @param $engine
1265
+ * @param $module
1266
+ *
1267
+ * @return string
1268
+ */
1269
+ function w3_get_engine_name($engine, $module = '') {
1270
+ switch ($engine) {
1271
+ case 'memcached':
1272
+ $engine_name = 'memcached';
1273
+ break;
1274
+
1275
+ case 'apc':
1276
+ $engine_name = 'apc';
1277
+ break;
1278
+
1279
+ case 'eaccelerator':
1280
+ $engine_name = 'eaccelerator';
1281
+ break;
1282
+
1283
+ case 'xcache':
1284
+ $engine_name = 'xcache';
1285
+ break;
1286
+
1287
+ case 'wincache':
1288
+ $engine_name = 'wincache';
1289
+ break;
1290
+
1291
+ case 'file':
1292
+ if ($module == 'pgcache')
1293
+ $engine_name = 'disk: basic';
1294
+ else
1295
+ $engine_name = 'disk';
1296
+ break;
1297
+
1298
+ case 'file_generic':
1299
+ $engine_name = 'disk: enhanced';
1300
+ break;
1301
+
1302
+ case 'ftp':
1303
+ $engine_name = 'self-hosted / file transfer protocol upload';
1304
+ break;
1305
+
1306
+ case 's3':
1307
+ $engine_name = 'amazon simple storage service (s3)';
1308
+ break;
1309
+
1310
+ case 'cf':
1311
+ $engine_name = 'amazon cloudfront';
1312
+ break;
1313
+
1314
+ case 'cf2':
1315
+ $engine_name = 'amazon cloudfront';
1316
+ break;
1317
+
1318
+ case 'rscf':
1319
+ $engine_name = 'rackspace cloud files';
1320
+ break;
1321
+
1322
+ case 'azure':
1323
+ $engine_name = 'microsoft azure storage';
1324
+ break;
1325
+
1326
+ case 'mirror':
1327
+ $engine_name = 'mirror';
1328
+ break;
1329
+
1330
+ case 'netdna':
1331
+ $engine_name = 'netdna';
1332
+ break;
1333
+
1334
+ case 'maxcdn':
1335
+ $engine_name = 'maxcdn';
1336
+ break;
1337
+
1338
+ case 'cotendo':
1339
+ $engine_name = 'cotendo';
1340
+ break;
1341
+
1342
+ case 'akamai':
1343
+ $engine_name = 'akamai';
1344
+ break;
1345
+
1346
+ case 'edgecast':
1347
+ $engine_name = 'media template procdn / edgecast';
1348
+ break;
1349
+
1350
+ case 'att':
1351
+ $engine_name = 'at&amp;t';
1352
+ break;
1353
+
1354
+ default:
1355
+ $engine_name = 'n/a';
1356
+ break;
1357
+ }
1358
+
1359
+ return $engine_name;
1360
+ }
1361
+
1362
+ /**
1363
+ * Converts value to boolean
1364
+ *
1365
+ * @param mixed $value
1366
+ * @return boolean
1367
+ */
1368
+ function w3_to_boolean($value) {
1369
+ if (is_string($value)) {
1370
+ switch (strtolower($value)) {
1371
+ case '+':
1372
+ case '1':
1373
+ case 'y':
1374
+ case 'on':
1375
+ case 'yes':
1376
+ case 'true':
1377
+ case 'enabled':
1378
+ return true;
1379
+
1380
+ case '-':
1381
+ case '0':
1382
+ case 'n':
1383
+ case 'no':
1384
+ case 'off':
1385
+ case 'false':
1386
+ case 'disabled':
1387
+ return false;
1388
+ }
1389
+ }
1390
+
1391
+ return (boolean) $value;
1392
+ }
1393
+
1394
+ /**
1395
+ * Quotes regular expression string
1396
+ *
1397
+ * @param string $string
1398
+ * @param string $delimiter
1399
+ * @return string
1400
+ */
1401
+ function w3_preg_quote($string, $delimiter = null) {
1402
+ $string = preg_quote($string, $delimiter);
1403
+ $string = strtr($string, array(
1404
+ ' ' => '\ '
1405
+ ));
1406
+
1407
+ return $string;
1408
+ }
1409
+
1410
+ /**
1411
+ * Returns true if zlib output compression is enabled otherwise false
1412
+ *
1413
+ * @return boolean
1414
+ */
1415
+ function w3_zlib_output_compression() {
1416
+ return w3_to_boolean(ini_get('zlib.output_compression'));
1417
+ }
1418
+
1419
+ /**
1420
+ * Recursive strips slahes from the var
1421
+ *
1422
+ * @param mixed $var
1423
+ * @return mixed
1424
+ */
1425
+ function w3_stripslashes($var) {
1426
+ if (is_string($var)) {
1427
+ return stripslashes($var);
1428
+ } elseif (is_array($var)) {
1429
+ $var = array_map('w3_stripslashes', $var);
1430
+ }
1431
+
1432
+ return $var;
1433
+ }
1434
+
1435
+ /**
1436
+ * Escapes HTML comment
1437
+ *
1438
+ * @param string $comment
1439
+ * @return mixed
1440
+ */
1441
+ function w3_escape_comment($comment) {
1442
+ while (strstr($comment, '--') !== false) {
1443
+ $comment = str_replace('--', '- -', $comment);
1444
+ }
1445
+
1446
+ return $comment;
1447
+ }
1448
+
1449
+ /**
1450
+ * Returns instance of singleton class
1451
+ *
1452
+ * @param string $class
1453
+ * @return object
1454
+ */
1455
+ function w3_instance($class) {
1456
+ static $instances = array();
1457
+
1458
+ if (!isset($instances[$class])) {
1459
+ w3_require_once( W3TC_LIB_W3_DIR . '/' .
1460
+ str_replace('_', '/', substr($class, 3)) . '.php');
1461
+ $instances[$class] = new $class();
1462
+ }
1463
+
1464
+ $v = $instances[$class]; // Don't return reference
1465
+ return $v;
1466
+ }
1467
+
1468
+ /**
1469
+ * Requires and keeps track of which files has already been loaded.
1470
+ *
1471
+ * @param string $path Absolute path to the file
1472
+ */
1473
+ function w3_require_once($path) {
1474
+ static $files = array();
1475
+
1476
+ if (!isset($files[$path])) {
1477
+ $files[$path] = 1;
1478
+ require_once $path;
1479
+ }
1480
+ }
1481
+
1482
+ /**
1483
+ * Detects post ID
1484
+ *
1485
+ * @return integer
1486
+ */
1487
+ function w3_detect_post_id() {
1488
+ global $posts, $comment_post_ID, $post_ID;
1489
+
1490
+ if ($post_ID) {
1491
+ return $post_ID;
1492
+ } elseif ($comment_post_ID) {
1493
+ return $comment_post_ID;
1494
+ } elseif (is_single() || is_page() && count($posts)) {
1495
+ return $posts[0]->ID;
1496
+ } elseif (isset($_REQUEST['p'])) {
1497
+ return (integer) $_REQUEST['p'];
1498
+ }
1499
+
1500
+ return 0;
1501
+ }
1502
+
1503
+ function w3_get_instance_id() {
1504
+ static $instance_id;
1505
+
1506
+ if(!isset($instance_id)) {
1507
+ $config = w3_instance('W3_Config');
1508
+ $instance_id = $config->get_integer('common.instance_id', 0);
1509
+ }
1510
+ return $instance_id;
1511
+ }
1512
+
1513
+
1514
+ /**
1515
+ * Checks if post should be flushed or not. Returns true if it should not be flushed
1516
+ * @param $post
1517
+ * @param string $module which cache module to check against (pgcache, varnish, cdncache, dbcache or objectcache)
1518
+ * @param W3_Config $config
1519
+ * @return bool
1520
+ */
1521
+ function w3_is_flushable_post($post, $module, $config) {
1522
+ if (is_numeric($post))
1523
+ $post = get_post($post);
1524
+ $post_status = array('publish');
1525
+ // dont flush when we have post "attachment"
1526
+ // its child of the post and is flushed always when post is published, while not changed in fact
1527
+ $post_type = array('revision', 'attachment');
1528
+ switch($module) {
1529
+ case 'pgcache':
1530
+ case 'varnish':
1531
+ case 'cdncache':
1532
+ if (!$config->get_boolean('pgcache.reject.logged'))
1533
+ $post_status[] = 'private';
1534
+ break;
1535
+ case 'dbcache':
1536
+ if (!$config->get_boolean('dbcache.reject.logged'))
1537
+ $post_status[] = 'private';
1538
+ break;
1539
+ }
1540
+ $flushable = !in_array($post->post_type, $post_type) && in_array($post->post_status, $post_status);
1541
+ return apply_filters('w3tc_flushable_post', $flushable, $post, $module);
1542
+ }
1543
+
1544
+ /**
1545
+ * Takes seconds and converts to array('Nh ','Nm ', 'Ns ', 'Nms ') or "Nh Nm Ns Nms"
1546
+ * @param $input
1547
+ * @param bool $string
1548
+ * @return array|string
1549
+ */
1550
+ function w3_convert_secs_to_time($input, $string = true) {
1551
+ $input = (double)$input;
1552
+ $time = array();
1553
+ $msecs = floor($input*1000 % 1000);
1554
+ $seconds = $input % 60;
1555
+ $input = floor($input / 60);
1556
+ $minutes = $input % 60;
1557
+ $input = floor($input / 60);
1558
+ $hours = $input % 60;
1559
+ if ($hours)
1560
+ $time[] = sprintf(__('%dh', 'w3-total-cache'), $hours);
1561
+ if ($minutes)
1562
+ $time[] = sprintf(__('%dm', 'w3-total-cache'), $minutes);
1563
+ if ($seconds)
1564
+ $time[] = sprintf(__('%ds', 'w3-total-cache'), $seconds);
1565
+ if ($msecs)
1566
+ $time[] = sprintf(__('%dms', 'w3-total-cache'), $msecs);
1567
+
1568
+ if(empty($time))
1569
+ $time[] = sprintf(__('%dms', 'w3-total-cache'), 0);
1570
+ if ($string)
1571
+ return implode(' ', $time);
1572
+ return $time;
1573
+ }
1574
+
1575
+ /**
1576
+ * @var W3_Config $config
1577
+ * @return string
1578
+ */
1579
+ function w3_w3tc_release_version($config = null) {
1580
+ if (w3_is_enterprise($config))
1581
+ return 'enterprise';
1582
+ if (w3_is_pro($config) && w3tc_is_pro_dev_mode())
1583
+ return 'pro development';
1584
+ if (w3_is_pro($config))
1585
+ return 'pro';
1586
+ return 'community';
1587
+ }
1588
+
1589
+ /**
1590
+ * @param W3_Config $config
1591
+ * @return bool
1592
+ */
1593
+ function w3_is_pro($config = null) {
1594
+ $result = false;
1595
+ if ($config)
1596
+ $result = $config->get_string('plugin.type') == 'pro' ||
1597
+ ($config->get_string('plugin.type') == 'pro_dev' );
1598
+ return $result || (defined('W3TC_PRO') && W3TC_PRO);
1599
+ }
1600
+
1601
+ /**
1602
+ * Enable Pro Dev mode support
1603
+ * @return bool
1604
+ */
1605
+ function w3tc_is_pro_dev_mode() {
1606
+ return defined('W3TC_PRO_DEV_MODE') && W3TC_PRO_DEV_MODE;
1607
+ }
1608
+
1609
+ /**
1610
+ * @param W3_Config $config
1611
+ * @return bool
1612
+ */
1613
+ function w3_is_enterprise($config = null) {
1614
+ $result = false;
1615
+ if ($config)
1616
+ $result = $config->get_string('plugin.type') == 'enterprise';
1617
+ return $result || (defined('W3TC_ENTERPRISE') && W3TC_ENTERPRISE);
1618
+ }
1619
+
1620
+ /**
1621
+ * Checks if site is using edge mode.
1622
+ * @return bool
1623
+ */
1624
+ function w3tc_edge_mode() {
1625
+ return defined('W3TC_EDGE_MODE') && W3TC_EDGE_MODE;
1626
+ }
inc/email/minify_error_notification.html CHANGED
@@ -1,7 +1,7 @@
1
- <html>
2
- <head></head>
3
- <body>
4
- <p>Unfortunately, an error occurred while creating the minify cache. Please check your settings to ensure your site is working as intended.</p>
5
- <p>Thanks for using W3 Total Cache.</p>
6
- </body>
7
- </html>
1
+ <html>
2
+ <head></head>
3
+ <body>
4
+ <p>Unfortunately, an error occurred while creating the minify cache. Please check your settings to ensure your site is working as intended.</p>
5
+ <p>Thanks for using W3 Total Cache.</p>
6
+ </body>
7
+ </html>
inc/email/minify_error_notification.php CHANGED
@@ -1,7 +1,7 @@
1
- <html>
2
- <head></head>
3
- <body>
4
- <p>Unfortunately, an error occurred while creating the minify cache. Please check your settings to ensure your site is working as intended.</p>
5
- <p>Thanks for using W3 Total Cache.</p>
6
- </body>
7
- </html>
1
+ <html>
2
+ <head></head>
3
+ <body>
4
+ <p>Unfortunately, an error occurred while creating the minify cache. Please check your settings to ensure your site is working as intended.</p>
5
+ <p>Thanks for using W3 Total Cache.</p>
6
+ </body>
7
+ </html>
inc/email/support_request.php CHANGED
@@ -1,42 +1,42 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <html>
3
- <head></head>
4
- <body>
5
- <p>
6
- Date: <?php echo date('m/d/Y H:i:s'); ?><br />
7
- Version: <?php echo W3TC_VERSION; ?><br />
8
- URL: <a href="<?php echo esc_attr($url); ?>"><?php echo htmlspecialchars($url); ?></a><br />
9
- Name: <?php echo htmlspecialchars($name); ?><br />
10
- E-Mail: <a href="mailto:<?php echo esc_attr($email); ?>"><?php echo htmlspecialchars($email); ?></a><br />
11
-
12
- <?php if ($twitter): ?>
13
- Twitter: <a href="http://twitter.com/<?php echo esc_attr($twitter); ?>"><?php echo htmlspecialchars($twitter); ?></a><br />
14
- <?php endif; ?>
15
-
16
- <?php if ($phone): ?>
17
- Phone: <?php echo htmlspecialchars($phone); ?><br />
18
- <?php endif; ?>
19
-
20
- <?php if ($forum_url): ?>
21
- Forum Topic URL: <a href="<?php echo esc_attr($forum_url); ?>"><?php echo htmlspecialchars($forum_url); ?></a><br />
22
- <?php endif; ?>
23
-
24
- <?php if ($request_data_url): ?>
25
- Request data: <a href="<?php echo esc_attr($request_data_url); ?>"><?php echo htmlspecialchars($request_data_url); ?></a><br />
26
- <?php endif; ?>
27
-
28
- Subject: <?php echo htmlspecialchars($subject); ?>
29
- </p>
30
-
31
- <p>
32
- <?php echo nl2br(htmlspecialchars($description)); ?>
33
- </p>
34
-
35
- <hr />
36
-
37
- <font size="-1" color="#ccc">
38
- E-mail sent from IP: <?php echo htmlspecialchars($_SERVER['REMOTE_ADDR']); ?><br />
39
- User Agent: <?php echo htmlspecialchars($_SERVER['HTTP_USER_AGENT']); ?>
40
- </font>
41
- </body>
42
- </html>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <html>
3
+ <head></head>
4
+ <body>
5
+ <p>
6
+ Date: <?php echo date('m/d/Y H:i:s'); ?><br />
7
+ Version: <?php echo W3TC_VERSION; ?><br />
8
+ URL: <a href="<?php echo esc_attr($url); ?>"><?php echo htmlspecialchars($url); ?></a><br />
9
+ Name: <?php echo htmlspecialchars($name); ?><br />
10
+ E-Mail: <a href="mailto:<?php echo esc_attr($email); ?>"><?php echo htmlspecialchars($email); ?></a><br />
11
+
12
+ <?php if ($twitter): ?>
13
+ Twitter: <a href="http://twitter.com/<?php echo esc_attr($twitter); ?>"><?php echo htmlspecialchars($twitter); ?></a><br />
14
+ <?php endif; ?>
15
+
16
+ <?php if ($phone): ?>
17
+ Phone: <?php echo htmlspecialchars($phone); ?><br />
18
+ <?php endif; ?>
19
+
20
+ <?php if ($forum_url): ?>
21
+ Forum Topic URL: <a href="<?php echo esc_attr($forum_url); ?>"><?php echo htmlspecialchars($forum_url); ?></a><br />
22
+ <?php endif; ?>
23
+
24
+ <?php if ($request_data_url): ?>
25
+ Request data: <a href="<?php echo esc_attr($request_data_url); ?>"><?php echo htmlspecialchars($request_data_url); ?></a><br />
26
+ <?php endif; ?>
27
+
28
+ Subject: <?php echo htmlspecialchars($subject); ?>
29
+ </p>
30
+
31
+ <p>
32
+ <?php echo nl2br(htmlspecialchars($description)); ?>
33
+ </p>
34
+
35
+ <hr />
36
+
37
+ <font size="-1" color="#ccc">
38
+ E-mail sent from IP: <?php echo htmlspecialchars($_SERVER['REMOTE_ADDR']); ?><br />
39
+ User Agent: <?php echo htmlspecialchars($_SERVER['HTTP_USER_AGENT']); ?>
40
+ </font>
41
+ </body>
42
+ </html>
inc/error.php CHANGED
@@ -1,14 +1,14 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
4
- <head>
5
- <link rel="stylesheet" type="text/css" href="<?php echo plugins_url('pub/css/error.css?ver=' . W3TC_VERSION, W3TC_FILE); ?>" />
6
- <title>Error</title>
7
- <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
8
- </head>
9
- <body>
10
- <p>
11
- <?php echo $error; ?>
12
- </p>
13
- </body>
14
  </html>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
4
+ <head>
5
+ <link rel="stylesheet" type="text/css" href="<?php echo plugins_url('pub/css/error.css?ver=' . W3TC_VERSION, W3TC_FILE); ?>" />
6
+ <title>Error</title>
7
+ <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
8
+ </head>
9
+ <body>
10
+ <p>
11
+ <?php echo $error; ?>
12
+ </p>
13
+ </body>
14
  </html>
inc/functions/admin.php CHANGED
@@ -155,7 +155,6 @@ function w3_config_save($current_config, $new_config, $new_config_admin) {
155
  'dbcache.enabled',
156
  'objectcache.enabled',
157
  'minify.enabled',
158
- 'cdn.enabled',
159
  'mobile.enabled',
160
  'referrer.enabled'
161
  ));
@@ -197,9 +196,13 @@ function w3_config_save($current_config, $new_config, $new_config_admin) {
197
  'minify.reject.uri'
198
  ));
199
  }
200
-
201
- if ($new_config->get_boolean('cdn.enabled')) {
 
 
 
202
  $pgcache_dependencies = array_merge($pgcache_dependencies, array(
 
203
  'cdn.debug',
204
  'cdn.engine',
205
  'cdn.uploads.enable',
@@ -238,6 +241,8 @@ function w3_config_save($current_config, $new_config, $new_config_admin) {
238
  'cdn.reject.uri',
239
  'cdn.reject.files'
240
  ));
 
 
241
  }
242
 
243
  if ($new_config->get_boolean('mobile.enabled')) {
@@ -277,15 +282,14 @@ function w3_config_save($current_config, $new_config, $new_config_admin) {
277
  /**
278
  * Show need empty minify notification
279
  */
280
- if ($new_config->get_boolean('minify.enabled') && (($new_config->get_boolean('minify.css.enable') && ($new_config->get_boolean('minify.auto') || count($new_config->get_array('minify.css.groups')))) || ($new_config->get_boolean('minify.js.enable') && ($new_config->get_boolean('minify.auto') || count($new_config->get_array('minify.js.groups')))))) {
281
  $minify_dependencies = array_merge($browsercache_dependencies, array(
282
  'minify.auto',
283
  'minify.debug',
284
  'minify.options',
285
  'minify.symlinks',
286
  'minify.css.enable',
287
- 'minify.js.enable',
288
- 'cdn.enabled'
289
  ));
290
 
291
  if ($new_config->get_boolean('minify.css.enable') && ($new_config->get_boolean('minify.auto') || count($new_config->get_array('minify.css.groups')))) {
@@ -339,10 +343,16 @@ function w3_config_save($current_config, $new_config, $new_config_admin) {
339
  ));
340
  }
341
 
342
- if ($new_config->get_boolean('cdn.enabled')) {
 
 
 
 
343
  $minify_dependencies = array_merge($minify_dependencies, array(
344
- 'cdn.engine'
345
  ));
 
 
346
  }
347
 
348
  $old_minify_dependencies_values = array();
@@ -675,4 +685,32 @@ function w3tc_get_current_page() {
675
  }
676
 
677
  return $page;
678
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  'dbcache.enabled',
156
  'objectcache.enabled',
157
  'minify.enabled',
 
158
  'mobile.enabled',
159
  'referrer.enabled'
160
  ));
196
  'minify.reject.uri'
197
  ));
198
  }
199
+ /**
200
+ * @var W3_ModuleStatus $modules
201
+ */
202
+ $modules = w3_instance('W3_ModuleStatus');
203
+ if ($modules->is_running('cdn')) {
204
  $pgcache_dependencies = array_merge($pgcache_dependencies, array(
205
+ 'cdn.enabled',
206
  'cdn.debug',
207
  'cdn.engine',
208
  'cdn.uploads.enable',
241
  'cdn.reject.uri',
242
  'cdn.reject.files'
243
  ));
244
+ } elseif ($old_config->get_boolean('cdn.enabled') && !$new_config->get_boolean('cdn.enabled')) {
245
+ $pgcache_dependencies = array_merge($pgcache_dependencies, array('cdn.enabled'));
246
  }
247
 
248
  if ($new_config->get_boolean('mobile.enabled')) {
282
  /**
283
  * Show need empty minify notification
284
  */
285
+ if ($current_config->get_boolean('minify.enabled') && $new_config->get_boolean('minify.enabled') && (($new_config->get_boolean('minify.css.enable') && ($new_config->get_boolean('minify.auto') || count($new_config->get_array('minify.css.groups')))) || ($new_config->get_boolean('minify.js.enable') && ($new_config->get_boolean('minify.auto') || count($new_config->get_array('minify.js.groups')))))) {
286
  $minify_dependencies = array_merge($browsercache_dependencies, array(
287
  'minify.auto',
288
  'minify.debug',
289
  'minify.options',
290
  'minify.symlinks',
291
  'minify.css.enable',
292
+ 'minify.js.enable'
 
293
  ));
294
 
295
  if ($new_config->get_boolean('minify.css.enable') && ($new_config->get_boolean('minify.auto') || count($new_config->get_array('minify.css.groups')))) {
343
  ));
344
  }
345
 
346
+ /**
347
+ * @var W3_ModuleStatus $modules
348
+ */
349
+ $modules = w3_instance('W3_ModuleStatus');
350
+ if ($modules->is_running('cdn')) {
351
  $minify_dependencies = array_merge($minify_dependencies, array(
352
+ 'cdn.engine','cdn.enabled'
353
  ));
354
+ } elseif ($old_config->get_boolean('cdn.enabled') && !$new_config->get_boolean('cdn.enabled')) {
355
+ $minify_dependencies = array_merge($minify_dependencies, array('cdn.enabled'));
356
  }
357
 
358
  $old_minify_dependencies_values = array();
685
  }
686
 
687
  return $page;
688
+ }
689
+
690
+ /**
691
+ * Check if current page is a W3TC admin page
692
+ * @return bool
693
+ */
694
+ function is_w3tc_admin_page() {
695
+ return isset($_GET['page']) && substr($_GET['page'], 0, 5) == 'w3tc_';
696
+ }
697
+
698
+
699
+ function w3tc_make_track_call($params) {
700
+ wp_remote_post(W3TC_TRACK_URL, array(
701
+ 'timeout' => 45,
702
+ 'redirection' => 5,
703
+ 'blocking' => false,
704
+ 'headers' => array(),
705
+ 'body' => array_merge($params, array('id' => md5(home_url())))
706
+ ));
707
+ }
708
+
709
+ /**
710
+ * Returns current WordPress page
711
+ * @return string
712
+ */
713
+ function w3tc_get_current_wp_page() {
714
+ w3_require_once(W3TC_LIB_W3_DIR . '/Request.php');
715
+ return W3_Request::get_string('page');
716
+ }
inc/functions/admin_ui.php CHANGED
@@ -7,8 +7,8 @@
7
  * @param string $class
8
  * @return string
9
  */
10
- function w3_button($text, $onclick = '', $class = '') {
11
- return sprintf('<input type="button" class="button %s" value="%s" onclick="%s" />', htmlspecialchars($class), htmlspecialchars($text), htmlspecialchars($onclick));
12
  }
13
 
14
  /**
@@ -19,7 +19,7 @@ function w3_button($text, $onclick = '', $class = '') {
19
  * @param boolean $new_window
20
  * @return string
21
  */
22
- function w3_button_link($text, $url, $new_window = false) {
23
  $url = str_replace('&amp;', '&', $url);
24
 
25
  if ($new_window) {
@@ -28,7 +28,7 @@ function w3_button_link($text, $url, $new_window = false) {
28
  $onclick = sprintf('document.location.href=\'%s\';', addslashes($url));
29
  }
30
 
31
- return w3_button($text, $onclick);
32
  }
33
 
34
  /**
@@ -39,15 +39,16 @@ function w3_button_link($text, $url, $new_window = false) {
39
  * @param string $redirect
40
  * @param boolean $admin if to use config admin
41
  * @param string $page
 
42
  * @return string
43
  */
44
- function w3_button_hide_note($text, $note, $redirect = '', $admin = false, $page = '') {
45
  if ($page == '') {
46
  w3_require_once(W3TC_LIB_W3_DIR . '/Request.php');
47
  $page = W3_Request::get_string('page', 'w3tc_dashboard');
48
  }
49
 
50
- $url = sprintf('admin.php?page=%s&w3tc_default_hide_note&note=%s', $page, $note);
51
 
52
  if ($admin)
53
  $url .= '&admin=1';
@@ -61,6 +62,20 @@ function w3_button_hide_note($text, $note, $redirect = '', $admin = false, $page
61
  return w3_button_link($text, $url);
62
  }
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  /**
65
  * Returns popup button html
66
  *
@@ -110,13 +125,13 @@ function w3_in_plugin_update_message($body) {
110
  if (preg_match($regexp, $body, $matches)) {
111
  $changelog = (array) preg_split('~[\r\n]+~', trim($matches[1]));
112
 
113
- echo '<div style="color: #f00;">' . __('Take a minute to update, here\'s why:', 'w3-total-cache') . '</div><div style="font-weight: normal;">';
114
  $ul = false;
115
 
116
  foreach ($changelog as $index => $line) {
117
  if (preg_match('~^\s*\*\s*~', $line)) {
118
  if (!$ul) {
119
- echo '<ul style="list-style: disc; margin-left: 20px;">';
120
  $ul = true;
121
  }
122
  $line = preg_replace('~^\s*\*\s*~', '', htmlspecialchars($line));
@@ -126,7 +141,6 @@ function w3_in_plugin_update_message($body) {
126
  echo '</ul><div style="clear: left;"></div>';
127
  $ul = false;
128
  }
129
- echo '<p style="margin: 5px 0;">' . htmlspecialchars($line) . '</p>';
130
  }
131
  }
132
 
@@ -136,4 +150,227 @@ function w3_in_plugin_update_message($body) {
136
 
137
  echo '</div>';
138
  }
139
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  * @param string $class
8
  * @return string
9
  */
10
+ function w3_button($text, $onclick = '', $class = 'button') {
11
+ return sprintf('<input type="button" class="%s" value="%s" onclick="%s" />', htmlspecialchars($class), htmlspecialchars($text), htmlspecialchars($onclick));
12
  }
13
 
14
  /**
19
  * @param boolean $new_window
20
  * @return string
21
  */
22
+ function w3_button_link($text, $url, $new_window = false, $class = 'button') {
23
  $url = str_replace('&amp;', '&', $url);
24
 
25
  if ($new_window) {
28
  $onclick = sprintf('document.location.href=\'%s\';', addslashes($url));
29
  }
30
 
31
+ return w3_button($text, $onclick, $class);
32
  }
33
 
34
  /**
39
  * @param string $redirect
40
  * @param boolean $admin if to use config admin
41
  * @param string $page
42
+ * @param string $custom_method
43
  * @return string
44
  */
45
+ function w3_button_hide_note($text, $note, $redirect = '', $admin = false, $page = '', $custom_method = 'w3tc_default_hide_note') {
46
  if ($page == '') {
47
  w3_require_once(W3TC_LIB_W3_DIR . '/Request.php');
48
  $page = W3_Request::get_string('page', 'w3tc_dashboard');
49
  }
50
 
51
+ $url = sprintf('admin.php?page=%s&%s&note=%s', $page, $custom_method, $note);
52
 
53
  if ($admin)
54
  $url .= '&admin=1';
62
  return w3_button_link($text, $url);
63
  }
64
 
65
+ function w3tc_cancel_button($note, $classes = '', $custom_method = 'w3tc_default_hide_note' ) {
66
+ w3_require_once(W3TC_LIB_W3_DIR . '/Request.php');
67
+ $page = W3_Request::get_string('page', 'w3tc_dashboard');
68
+
69
+ $url = sprintf('admin.php?page=%s&%s&note=%s', $page, $custom_method, $note);
70
+
71
+ $url = wp_nonce_url($url, 'w3tc');
72
+
73
+ return w3_button_link(__('Cancel'), $url, false, $classes);
74
+ }
75
+
76
+ function w3tc_action_button($action, $url, $class = '') {
77
+ return w3_button_link($action, $url, false, $class);
78
+ }
79
  /**
80
  * Returns popup button html
81
  *
125
  if (preg_match($regexp, $body, $matches)) {
126
  $changelog = (array) preg_split('~[\r\n]+~', trim($matches[1]));
127
 
128
+ echo '<div style="color: #f00;">' . __('Take a minute to update, here\'s why:', 'w3-total-cache') . '</div><div style="font-weight: normal;height:300px;overflow:auto">';
129
  $ul = false;
130
 
131
  foreach ($changelog as $index => $line) {
132
  if (preg_match('~^\s*\*\s*~', $line)) {
133
  if (!$ul) {
134
+ echo '<ul style="list-style: disc; margin-left: 20px;margin-top:0px;">';
135
  $ul = true;
136
  }
137
  $line = preg_replace('~^\s*\*\s*~', '', htmlspecialchars($line));
141
  echo '</ul><div style="clear: left;"></div>';
142
  $ul = false;
143
  }
 
144
  }
145
  }
146
 
150
 
151
  echo '</div>';
152
  }
153
+ }
154
+
155
+ /**
156
+ * Prints the label string for a config key.
157
+ * @param string $config_key
158
+ * @param string $area
159
+ */
160
+ function w3_e_config_label($config_key, $area = 'settings') {
161
+ echo w3_config_label($config_key, $area);
162
+ }
163
+
164
+ /**
165
+ * Returns the label string for config key.
166
+ * @param string $config_key
167
+ * @param string $area
168
+ * @return string
169
+ */
170
+ function w3_config_label($config_key, $area) {
171
+ /**
172
+ * @var W3_UI_Settings_SettingsHandler $module
173
+ */
174
+ $module = w3_instance("W3_UI_Settings_SettingsHandler");
175
+ return $module->get_label($config_key, $area);
176
+ }
177
+
178
+ /**
179
+ * Returns the meta data for a config key.
180
+ * @param $config_key
181
+ * @return mixed
182
+ */
183
+ function w3_config_meta($config_key) {
184
+ /**
185
+ * @var W3_UI_Settings_SettingsHandler $module
186
+ */
187
+ $module = w3_instance("W3_UI_Settings_SettingsHandler");
188
+ return $module->get_meta($config_key);
189
+ }
190
+
191
+ /**
192
+ * @param $config_key
193
+ * @param $meta
194
+ * @return mixed
195
+ */
196
+ function w3_config_can_change($config_key, $meta) {
197
+ /**
198
+ * @var W3_UI_Settings_SettingsHandler $module
199
+ */
200
+ $module = w3_instance("W3_UI_Settings_SettingsHandler");
201
+ return $module->can_change($config_key, $meta);
202
+ }
203
+
204
+ function w3tc_show_notification($id) {
205
+ return isset($_GET['w3tc_show_note']) && $_GET['w3tc_show_note'] == $id;
206
+ }
207
+
208
+
209
+
210
+
211
+
212
+ /**
213
+ * Returns postbox header
214
+ *
215
+ * @param string $title
216
+ * @param string $class
217
+ * @param string $id
218
+ * @return string
219
+ */
220
+ function w3tc_postbox_header($title, $class = '', $id = '') {
221
+ if ( !empty( $id ) ) {
222
+ $id = ' id="' . esc_attr( $id ) . '"';
223
+ }
224
+ return '<div' . $id . ' class="postbox ' . $class . '"><div class="handlediv" title="' . __('Click to toggle', 'w3-total-cache') . '"><br /></div><h3 class="hndle"><span>' . $title . '</span></h3><div class="inside">';
225
+ }
226
+
227
+ /**
228
+ * Returns postbox footer
229
+ *
230
+ * @return string
231
+ */
232
+ function w3tc_postbox_footer() {
233
+ return '</div></div>';
234
+ }
235
+
236
+
237
+ /**
238
+ * Prints checkbox with config option value
239
+ *
240
+ * @param string $option_id
241
+ * @param bool $disabled
242
+ * @param string $class_prefix
243
+ * @param bool $label
244
+ */
245
+ function w3tc_checkbox($option_id, $disabled = false, $class_prefix = '', $label = true) {
246
+ $config = w3_instance('W3_Config');
247
+ $section = substr($option_id, 0, strpos($option_id, '.'));
248
+
249
+ $disabled = $disabled || w3tc_is_sealed($section);
250
+
251
+ if (!$disabled)
252
+ echo '<input type="hidden" name="' . $option_id . '" value="0" />';
253
+
254
+ $name = str_replace('.', '_', $option_id);
255
+
256
+ if ($label)
257
+ echo '<label>';
258
+ echo '<input class="'.$class_prefix.'enabled" type="checkbox" id="' . $name .
259
+ '" name="' . $option_id . '" value="1" ';
260
+ checked($config->get_boolean($option_id), true);
261
+
262
+ if ($disabled)
263
+ echo 'disabled="disabled" ';
264
+
265
+ echo ' />';
266
+ }
267
+
268
+ /**
269
+ * Prints a radio button and if config value matches value
270
+ * @param string $option_id config id
271
+ * @param $value
272
+ * @param bool $disabled
273
+ * @param string $class_prefix
274
+ */
275
+ function w3tc_radio($option_id, $value, $disabled = false, $class_prefix = ''){
276
+ $config = w3_instance('W3_Config');
277
+ $section = substr($option_id, 0, strpos($option_id, '.'));
278
+
279
+ if(is_bool($value))
280
+ $rValue = $value?'1':'0';
281
+ else
282
+ $rValue = $value;
283
+ $disabled = $disabled || w3tc_is_sealed($section);
284
+
285
+ $name = str_replace('.', '_', $option_id);
286
+
287
+ echo '<label>';
288
+ echo '<input class="'.$class_prefix.'enabled" type="radio" id="' . $name .
289
+ '" name="' . $option_id . '" value="',$rValue,'" ';
290
+ checked($config->get_boolean($option_id), $value);
291
+
292
+ if ($disabled)
293
+ echo 'disabled="disabled" ';
294
+
295
+ echo ' />';
296
+ }
297
+
298
+
299
+ /**
300
+ * Returns true if config section is sealed
301
+ * @param string $section
302
+ * @return boolean
303
+ */
304
+ function w3tc_is_sealed($section) {
305
+ $config = w3_instance('W3_Config');
306
+ $config_master = new W3_Config(true);
307
+ $config_admin = w3_instance('W3_ConfigAdmin');
308
+
309
+ if ($config->is_master())
310
+ return false;
311
+
312
+ if (w3_is_network() && !$config->is_master() && w3_force_master())
313
+ return true;
314
+
315
+ // browsercache settings change rules, so not available in child settings
316
+ if ($section == 'browsercache')
317
+ return true;
318
+
319
+ if ($section == 'minify' && !$config_master->get_boolean('minify.enabled'))
320
+ return true;
321
+
322
+ return $config_admin->get_boolean($section . '.configuration_sealed');
323
+ }
324
+
325
+ function w3tc_sealing_disabled($section) {
326
+ if (w3tc_is_sealed($section))
327
+ echo 'disabled="disabled" ';
328
+ }
329
+
330
+ /**
331
+ * Prints checkbox with admin config option value
332
+ *
333
+ * @param string $option_id
334
+ * @param boolean $disabled
335
+ */
336
+ function w3tc_checkbox_admin($option_id, $disabled = false) {
337
+ $config = w3_instance('W3_Config');
338
+ $config_admin = w3_instance('W3_ConfigAdmin');
339
+ if (!$disabled)
340
+ $disabled = $config->get_boolean('common.force_master');
341
+ $checked = $config_admin->get_boolean($option_id) || $disabled;
342
+ if (!$disabled)
343
+ echo '<input type="hidden" name="' . $option_id . '" value="0" />';
344
+
345
+ echo '<label>';
346
+ $id = str_replace('.', '_', $option_id);
347
+ $class = $disabled ? 'disabled' : 'enabled';
348
+ echo '<input id="' . $id . '" class="' . $class . '" type="checkbox" name="' . $option_id .
349
+ '" value="1"';
350
+ checked($checked, true);
351
+ if ($disabled)
352
+ echo ' disabled="disabled"';
353
+
354
+ echo ' />';
355
+ }
356
+
357
+
358
+ /**
359
+ * Returns nonce field HTML
360
+ *
361
+ * @param string $action
362
+ * @param string $name
363
+ * @param bool $referer
364
+ * @internal param bool $echo
365
+ * @return string
366
+ */
367
+ function w3tc_nonce_field($action = -1, $name = '_wpnonce', $referer = true) {
368
+ $name = esc_attr($name);
369
+ $return = '<input type="hidden" name="' . $name . '" value="' . wp_create_nonce($action) . '" />';
370
+
371
+ if ($referer) {
372
+ $return .= wp_referer_field(false);
373
+ }
374
+
375
+ return $return;
376
+ }
inc/functions/compat.php CHANGED
@@ -1,112 +1,112 @@
1
- <?php
2
-
3
- if (!function_exists('file_put_contents')) {
4
- if (!defined('FILE_APPEND')) {
5
- define('FILE_APPEND', 8);
6
- }
7
-
8
- function file_put_contents($filename, $data, $flags = 0) {
9
- $fp = fopen($filename, ($flags & FILE_APPEND ? 'a' : 'w'));
10
-
11
- if ($fp) {
12
- fputs($fp, $data);
13
- fclose($fp);
14
-
15
- return true;
16
- }
17
-
18
- return false;
19
- }
20
- }
21
-
22
- if (!function_exists('fnmatch')) {
23
- define('FNM_PATHNAME', 1);
24
- define('FNM_NOESCAPE', 2);
25
- define('FNM_PERIOD', 4);
26
- define('FNM_CASEFOLD', 16);
27
-
28
- function fnmatch($pattern, $string, $flags = 0) {
29
- $modifiers = null;
30
- $transforms = array(
31
- '\*' => '.*',
32
- '\?' => '.',
33
- '\[\!' => '[^',
34
- '\[' => '[',
35
- '\]' => ']',
36
- '\.' => '\.',
37
- '\\' => '\\\\'
38
- );
39
-
40
- // Forward slash in string must be in pattern:
41
- if ($flags & FNM_PATHNAME) {
42
- $transforms['\*'] = '[^/]*';
43
- }
44
-
45
- // Back slash should not be escaped:
46
- if ($flags & FNM_NOESCAPE) {
47
- unset($transforms['\\']);
48
- }
49
-
50
- // Perform case insensitive match:
51
- if ($flags & FNM_CASEFOLD) {
52
- $modifiers .= 'i';
53
- }
54
-
55
- // Period at start must be the same as pattern:
56
- if ($flags & FNM_PERIOD) {
57
- if (strpos($string, '.') === 0 && strpos($pattern, '.') !== 0) return false;
58
- }
59
-
60
- $pattern = '~^' . strtr(preg_quote($pattern, '~'), $transforms) . '$~' . $modifiers;
61
-
62
- return (boolean) preg_match($pattern, $string);
63
- }
64
- }
65
- function w3tc_get_theme($themename) {
66
- global $wp_version;
67
- if (version_compare($wp_version,'3.4', '<'))
68
- return get_theme($themename);
69
-
70
- $wp_themes = w3tc_get_themes();
71
-
72
-
73
- if ( is_array( $wp_themes ) && array_key_exists( $themename, $wp_themes ) )
74
- return $wp_themes[ $themename ];
75
- return array();
76
- }
77
- function w3tc_get_current_theme_name() {
78
- global $wp_version;
79
- if (version_compare($wp_version,'3.4', '>='))
80
- return wp_get_theme()->get('Name');
81
- return get_current_theme();
82
- }
83
-
84
- function w3tc_get_current_theme() {
85
- global $wp_version;
86
- if (version_compare($wp_version,'3.4', '>='))
87
- return wp_get_theme();
88
- return get_theme(get_current_theme());
89
- }
90
-
91
- function w3tc_get_themes() {
92
- global $wp_version;
93
- if (version_compare($wp_version,'3.4', '<'))
94
- return get_themes();
95
-
96
- global $wp_themes;
97
- if ( isset( $wp_themes ) )
98
- return $wp_themes;
99
-
100
- $themes = wp_get_themes();
101
- $wp_themes = array();
102
-
103
- foreach ( $themes as $theme ) {
104
- $name = $theme->get('Name');
105
- if ( isset( $wp_themes[ $name ] ) )
106
- $wp_themes[ $name . '/' . $theme->get_stylesheet() ] = $theme;
107
- else
108
- $wp_themes[ $name ] = $theme;
109
- }
110
-
111
- return $wp_themes;
112
  }
1
+ <?php
2
+
3
+ if (!function_exists('file_put_contents')) {
4
+ if (!defined('FILE_APPEND')) {
5
+ define('FILE_APPEND', 8);
6
+ }
7
+
8
+ function file_put_contents($filename, $data, $flags = 0) {
9
+ $fp = fopen($filename, ($flags & FILE_APPEND ? 'a' : 'w'));
10
+
11
+ if ($fp) {
12
+ fputs($fp, $data);
13
+ fclose($fp);
14
+
15
+ return true;
16
+ }
17
+
18
+ return false;
19
+ }
20
+ }
21
+
22
+ if (!function_exists('fnmatch')) {
23
+ define('FNM_PATHNAME', 1);
24
+ define('FNM_NOESCAPE', 2);
25
+ define('FNM_PERIOD', 4);
26
+ define('FNM_CASEFOLD', 16);
27
+
28
+ function fnmatch($pattern, $string, $flags = 0) {
29
+ $modifiers = null;
30
+ $transforms = array(
31
+ '\*' => '.*',
32
+ '\?' => '.',
33
+ '\[\!' => '[^',
34
+ '\[' => '[',
35
+ '\]' => ']',
36
+ '\.' => '\.',
37
+ '\\' => '\\\\'
38
+ );
39
+
40
+ // Forward slash in string must be in pattern:
41
+ if ($flags & FNM_PATHNAME) {
42
+ $transforms['\*'] = '[^/]*';
43
+ }
44
+
45
+ // Back slash should not be escaped:
46
+ if ($flags & FNM_NOESCAPE) {
47
+ unset($transforms['\\']);
48
+ }
49
+
50
+ // Perform case insensitive match:
51
+ if ($flags & FNM_CASEFOLD) {
52
+ $modifiers .= 'i';
53
+ }
54
+
55
+ // Period at start must be the same as pattern:
56
+ if ($flags & FNM_PERIOD) {
57
+ if (strpos($string, '.') === 0 && strpos($pattern, '.') !== 0) return false;
58
+ }
59
+
60
+ $pattern = '~^' . strtr(preg_quote($pattern, '~'), $transforms) . '$~' . $modifiers;
61
+
62
+ return (boolean) preg_match($pattern, $string);
63
+ }
64
+ }
65
+ function w3tc_get_theme($themename) {
66
+ global $wp_version;
67
+ if (version_compare($wp_version,'3.4', '<'))
68
+ return get_theme($themename);
69
+
70
+ $wp_themes = w3tc_get_themes();
71
+
72
+
73
+ if ( is_array( $wp_themes ) && array_key_exists( $themename, $wp_themes ) )
74
+ return $wp_themes[ $themename ];
75
+ return array();
76
+ }
77
+ function w3tc_get_current_theme_name() {
78
+ global $wp_version;
79
+ if (version_compare($wp_version,'3.4', '>='))
80
+ return wp_get_theme()->get('Name');
81
+ return get_current_theme();
82
+ }
83
+
84
+ function w3tc_get_current_theme() {
85
+ global $wp_version;
86
+ if (version_compare($wp_version,'3.4', '>='))
87
+ return wp_get_theme();
88
+ return get_theme(get_current_theme());
89
+ }
90
+
91
+ function w3tc_get_themes() {
92
+ global $wp_version;
93
+ if (version_compare($wp_version,'3.4', '<'))
94
+ return get_themes();
95
+
96
+ global $wp_themes;
97
+ if ( isset( $wp_themes ) )
98
+ return $wp_themes;
99
+
100
+ $themes = wp_get_themes();
101
+ $wp_themes = array();
102
+
103
+ foreach ( $themes as $theme ) {
104
+ $name = $theme->get('Name');
105
+ if ( isset( $wp_themes[ $name ] ) )
106
+ $wp_themes[ $name . '/' . $theme->get_stylesheet() ] = $theme;
107
+ else
108
+ $wp_themes[ $name ] = $theme;
109
+ }
110
+
111
+ return $wp_themes;
112
  }
inc/functions/extensions.php CHANGED
@@ -199,6 +199,7 @@ function w3_is_extension_active($extension) {
199
 
200
  /**
201
  * Get registered extensions
 
202
  * @return array
203
  */
204
  function w3_get_extensions($config) {
@@ -207,6 +208,7 @@ function w3_get_extensions($config) {
207
 
208
  /**
209
  * Returns the inactive extensions
 
210
  * @return array
211
  */
212
  function w3_get_inactive_extensions($config) {
@@ -218,6 +220,7 @@ function w3_get_inactive_extensions($config) {
218
 
219
  /**
220
  * Returns the active extensions
 
221
  * @return array
222
  */
223
  function w3_get_active_extensions($config) {
@@ -239,4 +242,90 @@ function w3_extension_is_sealed($extension) {
239
  $config_admin = w3_instance('W3_ConfigAdmin');
240
  $all_checked = $config_admin->get_array('extensions.configuration_sealed');
241
  return isset($all_checked[$extension]) && $all_checked[$extension];
242
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
 
200
  /**
201
  * Get registered extensions
202
+ * @param $config
203
  * @return array
204
  */
205
  function w3_get_extensions($config) {
208
 
209
  /**
210
  * Returns the inactive extensions
211
+ * @param $config
212
  * @return array
213
  */
214
  function w3_get_inactive_extensions($config) {
220
 
221
  /**
222
  * Returns the active extensions
223
+ * @param $config
224
  * @return array
225
  */
226
  function w3_get_active_extensions($config) {
242
  $config_admin = w3_instance('W3_ConfigAdmin');
243
  $all_checked = $config_admin->get_array('extensions.configuration_sealed');
244
  return isset($all_checked[$extension]) && $all_checked[$extension];
245
+ }
246
+
247
+ /**
248
+ * @param $extension_name
249
+ * @param $extension_id
250
+ */
251
+ function w3_e_extension_activation_notification($extension_name, $extension_id) {
252
+ w3_require_once(W3TC_INC_FUNCTIONS_DIR . '/ui.php');
253
+ $page = w3tc_get_current_page();
254
+ printf(
255
+ w3_get_notification_box('<p>' .
256
+ __('It appears that activating the <a href="%s">%s</a> extension for W3 Total Cache will be helpful for your site. <a class="button" href="%s">Click here</a> to try it. %s', 'w3-total-cache') . '</p>', $extension_id)
257
+ , sprintf(w3_admin_url('admin.php?page=w3tc_extensions#%s'), $extension_id)
258
+ , $extension_name
259
+ , sprintf(w3_admin_url('admin.php?page='. $page .'&w3tc_extensions_activate=%s'), $extension_id)
260
+ , w3_button_hide_note(__('Hide this message', 'w3-total-cache'), 'hide-extension-notification', '', true,'','w3tc_default_hide_note_custom='.$extension_id)
261
+ );
262
+ }
263
+
264
+ /**
265
+ * Checks if an extension notification is hidden
266
+ *
267
+ * @param $extension_id
268
+ * @return bool
269
+ */
270
+ function w3tc_extension_hidden($extension_id) {
271
+ $w3_config = w3_instance('W3_ConfigAdmin');
272
+ $extensions = $w3_config->get_array('notes.hide_extensions');
273
+ return in_array($extension_id, $extensions);
274
+ }
275
+
276
+
277
+ /**
278
+ * @param $extension
279
+ * @param W3_Config $w3_config
280
+ * @return bool
281
+ */
282
+ function w3tc_activate_extension($extension, $w3_config) {
283
+ $all_extensions = w3_get_extensions($w3_config);
284
+ $extensions = $w3_config->get_array('extensions.active');
285
+ if (!w3_is_extension_active($extension)) {
286
+ $meta = $all_extensions[$extension];
287
+ $extensions[$extension] = $meta['path'];
288
+
289
+ ksort($extensions, SORT_STRING);
290
+ $w3_config->set('extensions.active', $extensions);
291
+ try {
292
+ $w3_config->save();
293
+ do_action("w3tc_activate_extension-{$extension}");
294
+ return true;
295
+ } catch (Exception $ex) {
296
+ }
297
+ }
298
+ return false;
299
+ }
300
+
301
+
302
+ /**
303
+ * @param $extension
304
+ * @param W3_Config $config
305
+ * @param bool $dont_save_config
306
+ * @return bool
307
+ */
308
+ function w3tc_deactivate_extension($extension, $config, $dont_save_config = false) {
309
+ $extensions = $config->get_array('extensions.active');
310
+ if (array_key_exists($extension, $extensions)) {
311
+ unset($extensions[$extension]);
312
+ ksort($extensions, SORT_STRING);
313
+ $config->set('extensions.active', $extensions);
314
+ try {
315
+ if (!$dont_save_config)
316
+ $config->save();
317
+ do_action("w3tc_deactivate_extension-{$extension}");
318
+ return true;
319
+ } catch (Exception $ex) {}
320
+ }
321
+ return false;
322
+ }
323
+
324
+ /**
325
+ * @param string $extension_id
326
+ * @param bool $valid if site can handle extension
327
+ * @return bool
328
+ */
329
+ function w3tc_show_extension_notification($extension_id, $valid) {
330
+ return !w3_is_extension_active($extension_id) && $valid && !w3tc_extension_hidden($extension_id);
331
+ }
inc/functions/extract.php CHANGED
@@ -1,104 +1,91 @@
1
- <?php
2
-
3
- /**
4
- * Extracts JS files from content
5
- *
6
- * @param string $content
7
- * @return array
8
- */
9
- function w3_extract_js($content) {
10
- $matches = null;
11
- $files = array();
12
-
13
- $content = preg_replace('~<!--.*?-->~s', '', $content);
14
-
15
- if (preg_match_all('~<script\s+[^<>]*src=["\']?([^"\']+)["\']?[^<>]*>\s*</script>~is', $content, $matches)) {
16
- $files = $matches[1];
17
- }
18
-
19
- $files = array_values(array_unique($files));
20
-
21
- return $files;
22
- }
23
- function w3_extract_js2($content) {
24
- $matches = null;
25
- $files = array();
26
-
27
- $content = preg_replace('~<!--.*?-->~s', '', $content);
28
-
29
- if (preg_match_all('~(<script\s+[^<>]*src=["\']?([^"\']+)["\']?[^<>]*>\s*</script>)~is', $content, $matches)) {
30
- $files = $matches[1];
31
- }
32
-
33
- $files = array_values(array_unique($files));
34
-
35
- return $files;
36
- }
37
- /**
38
- * Extract CSS files from content
39
- *
40
- * @param string $content
41
- * @return array
42
- */
43
- function w3_extract_css($content) {
44
- $matches = null;
45
- $files = array();
46
-
47
- $content = preg_replace('~<!--.*?-->~s', '', $content);
48
-
49
- if (preg_match_all('~<link\s+([^>]+)/?>(.*</link>)?~Uis', $content, $matches, PREG_SET_ORDER)) {
50
- foreach ($matches as $match) {
51
- $attrs = array();
52
- $attr_matches = null;
53
-
54
- if (preg_match_all('~(\w+)=["\']([^"\']*)["\']~', $match[1], $attr_matches, PREG_SET_ORDER)) {
55
- foreach ($attr_matches as $attr_match) {
56
- $attrs[$attr_match[1]] = trim($attr_match[2]);
57
- }
58
- }
59
-
60
- if (isset($attrs['href']) && isset($attrs['rel']) && stristr($attrs['rel'], 'stylesheet') !== false && (!isset($attrs['media']) || stristr($attrs['media'], 'print') === false)) {
61
- $files[] = $attrs['href'];
62
- }
63
- }
64
- }
65
-
66
- if (preg_match_all('~@import\s+(url\s*)?\(?["\']?\s*([^"\'\)\s]+)\s*["\']?\)?[^;]*;?~is', $content, $matches)) {
67
- $files = array_merge($files, $matches[2]);
68
- }
69
-
70
- $files = array_values(array_unique($files));
71
-
72
- return $files;
73
- }
74
-
75
- function w3_extract_css2($content) {
76
- $matches = null;
77
- $files = array();
78
-
79
- $content = preg_replace('~<!--.*?-->~s', '', $content);
80
-
81
- if (preg_match_all('~<link\s+([^>]+)/?>(.*</link>)?~Uis', $content, $matches, PREG_SET_ORDER)) {
82
- foreach ($matches as $match) {
83
- $attrs = array();
84
- $attr_matches = null;
85
- if (preg_match_all('~(\w+)=["\']([^"\']*)["\']~', $match[1], $attr_matches, PREG_SET_ORDER)) {
86
- foreach ($attr_matches as $attr_match) {
87
- $attrs[$attr_match[1]] = trim($attr_match[2]);
88
- }
89
- }
90
-
91
- if (isset($attrs['href']) && isset($attrs['rel']) && stristr($attrs['rel'], 'stylesheet') !== false && (!isset($attrs['media']) || stristr($attrs['media'], 'print') === false)) {
92
- $files[] = array($match[0], $attrs['href']);
93
- }
94
- }
95
-
96
- }
97
-
98
- if (preg_match_all('~@import\s+(url\s*)?\(?["\']?\s*([^"\'\)\s]+)\s*["\']?\)?[^;]*;?~is', $content, $matches, PREG_SET_ORDER)) {
99
- foreach($matches as $match)
100
- $files[] = array($match[0],$match[2]);
101
- }
102
-
103
- return $files;
104
  }
1
+ <?php
2
+
3
+ /**
4
+ * Extracts JS files from content
5
+ *
6
+ * @param string $content
7
+ * @return array
8
+ */
9
+ function w3_extract_js($content) {
10
+ $matches = null;
11
+ $files = array();
12
+
13
+ $content = preg_replace('~<!--.*?-->~s', '', $content);
14
+
15
+ if (preg_match_all('~<script\s+[^<>]*src=["\']?([^"\']+)["\']?[^<>]*>\s*</script>~is', $content, $matches)) {
16
+ $files = $matches[1];
17
+ }
18
+
19
+ $files = array_values(array_unique($files));
20
+
21
+ return $files;
22
+ }
23
+
24
+ /**
25
+ * Extract CSS files from content
26
+ *
27
+ * @param string $content
28
+ * @return array
29
+ */
30
+ function w3_extract_css($content) {
31
+ $matches = null;
32
+ $files = array();
33
+
34
+ $content = preg_replace('~<!--.*?-->~s', '', $content);
35
+
36
+ if (preg_match_all('~<link\s+([^>]+)/?>(.*</link>)?~Uis', $content, $matches, PREG_SET_ORDER)) {
37
+ foreach ($matches as $match) {
38
+ $attrs = array();
39
+ $attr_matches = null;
40
+
41
+ if (preg_match_all('~(\w+)=["\']([^"\']*)["\']~', $match[1], $attr_matches, PREG_SET_ORDER)) {
42
+ foreach ($attr_matches as $attr_match) {
43
+ $attrs[$attr_match[1]] = trim($attr_match[2]);
44
+ }
45
+ }
46
+
47
+ if (isset($attrs['href']) && isset($attrs['rel']) && stristr($attrs['rel'], 'stylesheet') !== false && (!isset($attrs['media']) || stristr($attrs['media'], 'print') === false)) {
48
+ $files[] = $attrs['href'];
49
+ }
50
+ }
51
+ }
52
+
53
+ if (preg_match_all('~@import\s+(url\s*)?\(?["\']?\s*([^"\'\)\s]+)\s*["\']?\)?[^;]*;?~is', $content, $matches)) {
54
+ $files = array_merge($files, $matches[2]);
55
+ }
56
+
57
+ $files = array_values(array_unique($files));
58
+
59
+ return $files;
60
+ }
61
+
62
+ function w3_extract_css2($content) {
63
+ $matches = null;
64
+ $files = array();
65
+
66
+ $content = preg_replace('~<!--.*?-->~s', '', $content);
67
+
68
+ if (preg_match_all('~<link\s+([^>]+)/?>(.*</link>)?~Uis', $content, $matches, PREG_SET_ORDER)) {
69
+ foreach ($matches as $match) {
70
+ $attrs = array();
71
+ $attr_matches = null;
72
+ if (preg_match_all('~(\w+)=["\']([^"\']*)["\']~', $match[1], $attr_matches, PREG_SET_ORDER)) {
73
+ foreach ($attr_matches as $attr_match) {
74
+ $attrs[$attr_match[1]] = trim($attr_match[2]);
75
+ }
76
+ }
77
+
78
+ if (isset($attrs['href']) && isset($attrs['rel']) && stristr($attrs['rel'], 'stylesheet') !== false && (!isset($attrs['media']) || stristr($attrs['media'], 'print') === false)) {
79
+ $files[] = array($match[0], $attrs['href']);
80
+ }
81
+ }
82
+
83
+ }
84
+
85
+ if (preg_match_all('~@import\s+(url\s*)?\(?["\']?\s*([^"\'\)\s]+)\s*["\']?\)?[^;]*;?~is', $content, $matches, PREG_SET_ORDER)) {
86
+ foreach($matches as $match)
87
+ $files[] = array($match[0],$match[2]);
88
+ }
89
+
90
+ return $files;
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  }
inc/functions/file.php CHANGED
@@ -1,333 +1,403 @@
1
- <?php
2
-
3
- /**
4
- * Recursive creates directory
5
- *
6
- * @param string $path
7
- * @param integer $mask
8
- * @param string $curr_path
9
- * @return boolean
10
- */
11
- function w3_mkdir($path, $mask = 0777, $curr_path = '') {
12
- $path = w3_realpath($path);
13
- $path = trim($path, '/');
14
- $dirs = explode('/', $path);
15
-
16
- foreach ($dirs as $dir) {
17
- if ($dir == '') {
18
- return false;
19
- }
20
-
21
- $curr_path .= ($curr_path == '' ? '' : '/') . $dir;
22
-
23
- if (!@is_dir($curr_path)) {
24
- if (!@mkdir($curr_path, $mask)) {
25
- return false;
26
- }
27
- }
28
- }
29
-
30
- return true;
31
- }
32
-
33
- /**
34
- * Recursive creates directory from some directory
35
- * Does not try to create directory before from
36
- *
37
- * @param string $path
38
- * @param string $from_path
39
- * @param integer $mask
40
- * @return boolean
41
- */
42
- function w3_mkdir_from($path, $from_path = '', $mask = 0777) {
43
- $path = w3_realpath($path);
44
-
45
- $from_path = w3_realpath($from_path);
46
- if (substr($path, 0, strlen($from_path)) != $from_path)
47
- return false;
48
-
49
- $path = substr($path, strlen($from_path));
50
-
51
- $path = trim($path, '/');
52
- $dirs = explode('/', $path);
53
-
54
- $curr_path = $from_path;
55
-
56
- foreach ($dirs as $dir) {
57
- if ($dir == '') {
58
- return false;
59
- }
60
-
61
- $curr_path .= ($curr_path == '' ? '' : '/') . $dir;
62
-
63
- if (!@is_dir($curr_path)) {
64
- if (!@mkdir($curr_path, $mask)) {
65
- return false;
66
- }
67
- }
68
- }
69
-
70
- return true;
71
- }
72
-
73
- /**
74
- * Recursive remove dir
75
- *
76
- * @param string $path
77
- * @param array $exclude
78
- * @param bool $remove
79
- * @return void
80
- */
81
- function w3_rmdir($path, $exclude = array(), $remove = true) {
82
- $dir = @opendir($path);
83
-
84
- if ($dir) {
85
- while (($entry = @readdir($dir)) !== false) {
86
- if ($entry == '.' || $entry == '..') {
87
- continue;
88
- }
89
-
90
- foreach ($exclude as $mask) {
91
- if (fnmatch($mask, basename($entry))) {
92
- continue 2;
93
- }
94
- }
95
-
96
- $full_path = $path . DIRECTORY_SEPARATOR . $entry;
97
-
98
- if (@is_dir($full_path)) {
99
- w3_rmdir($full_path, $exclude);
100
- } else {
101
- @unlink($full_path);
102
- }
103
- }
104
-
105
- @closedir($dir);
106
-
107
- if ($remove) {
108
- @rmdir($path);
109
- }
110
- }
111
- }
112
-
113
- /**
114
- * Recursive empty dir
115
- *
116
- * @param string $path
117
- * @param array $exclude
118
- * @return void
119
- */
120
- function w3_emptydir($path, $exclude = array()) {
121
- w3_rmdir($path, $exclude, false);
122
- }
123
-
124
- /**
125
- * Check if file is write-able
126
- *
127
- * @param string $file
128
- * @return boolean
129
- */
130
- function w3_is_writable($file) {
131
- $exists = file_exists($file);
132
-
133
- $fp = @fopen($file, 'a');
134
-
135
- if ($fp) {
136
- fclose($fp);
137
-
138
- if (!$exists) {
139
- @unlink($file);
140
- }
141
-
142
- return true;
143
- }
144
-
145
- return false;
146
- }
147
-
148
- /**
149
- * Cehck if dir is write-able
150
- *
151
- * @param string $dir
152
- * @return boolean
153
- */
154
- function w3_is_writable_dir($dir) {
155
- $file = $dir . '/' . uniqid(mt_rand()) . '.tmp';
156
-
157
- return w3_is_writable($file);
158
- }
159
-
160
- /**
161
- * Returns dirname of path
162
- *
163
- * @param string $path
164
- * @return string
165
- */
166
- function w3_dirname($path) {
167
- $dirname = dirname($path);
168
-
169
- if ($dirname == '.' || $dirname == '/' || $dirname == '\\') {
170
- $dirname = '';
171
- }
172
-
173
- return $dirname;
174
- }
175
-
176
- function w3_make_relative_path($filename, $base_dir) {
177
- $filename = w3_realpath($filename);
178
- $base_dir = w3_realpath($base_dir);
179
-
180
- $filename_parts = explode('/', trim($filename, '/'));
181
- $base_dir_parts = explode('/', trim($base_dir, '/'));
182
-
183
- // count number of equal path parts
184
- for ($equal_number = 0;;$equal_number++) {
185
- if ($equal_number >= count($filename_parts) ||
186
- $equal_number >= count($base_dir_parts))
187
- break;
188
- if ($filename_parts[$equal_number] != $base_dir_parts[$equal_number])
189
- break;
190
- }
191
-
192
- $relative_dir = str_repeat('../', count($base_dir_parts) - $equal_number);
193
- $relative_dir .= implode('/', array_slice($filename_parts, $equal_number));
194
-
195
- return $relative_dir;
196
- }
197
-
198
- /**
199
- * Returns open basedirs
200
- *
201
- * @return array
202
- */
203
- function w3_get_open_basedirs() {
204
- $open_basedir_ini = ini_get('open_basedir');
205
- $open_basedirs = (W3TC_WIN ? preg_split('~[;,]~', $open_basedir_ini) : explode(':', $open_basedir_ini));
206
- $result = array();
207
-
208
- foreach ($open_basedirs as $open_basedir) {
209
- $open_basedir = trim($open_basedir);
210
- if (!empty($open_basedir) && $open_basedir != '') {
211
- $result[] = w3_realpath($open_basedir);
212
- }
213
- }
214
-
215
- return $result;
216
- }
217
-
218
- /**
219
- * Checks if path is restricted by open_basedir
220
- *
221
- * @param string $path
222
- * @return boolean
223
- */
224
- function w3_check_open_basedir($path) {
225
- $path = w3_realpath($path);
226
- $open_basedirs = w3_get_open_basedirs();
227
-
228
- if (!count($open_basedirs)) {
229
- return true;
230
- }
231
-
232
- foreach ($open_basedirs as $open_basedir) {
233
- if (strstr($path, $open_basedir) !== false) {
234
- return true;
235
- }
236
- }
237
-
238
- return false;
239
- }
240
-
241
- function w3_get_file_permissions($file) {
242
- if (function_exists('fileperms') && $fileperms = @fileperms($file)) {
243
- $fileperms = 0777 & $fileperms;
244
- } else {
245
- clearstatcache();
246
- $stat=@stat($file);
247
- if ($stat)
248
- $fileperms = 0777 & $stat['mode'];
249
- else
250
- $fileperms = 0;
251
- }
252
- return $fileperms;
253
- }
254
-
255
- function w3_get_file_owner($file = '') {
256
- $fileowner = $filegroup = 'unknown';
257
- if ($file) {
258
- if (function_exists('fileowner') && function_exists('fileowner')) {
259
- $fileowner = @fileowner($file);
260
- $filegroup = @filegroup($file);
261
- if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) {
262
- $fileowner = @posix_getpwuid($fileowner);
263
- $fileowner = $fileowner['name'];
264
- $filegroup = @posix_getgrgid($filegroup);
265
- $filegroup = $filegroup['name'];
266
- }
267
- }
268
- } else {
269
- if (function_exists('getmyuid') && function_exists('getmygid')) {
270
- $fileowner = @getmyuid();
271
- $filegroup = @getmygid();
272
- if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) {
273
- $fileowner = @posix_getpwuid($fileowner);
274
- $fileowner = $fileowner['name'];
275
- $filegroup = @posix_getgrgid($filegroup);
276
- $filegroup = $filegroup['name'];
277
- }
278
- }
279
- }
280
- return $fileowner . ':' . $filegroup;
281
- }
282
-
283
- /**
284
- * Atomically writes file inside W3TC_CACHE_DIR dir
285
- * @param $filename
286
- * @param $content
287
- * @throws Exception
288
- * @return void
289
- **/
290
- function w3_file_put_contents_atomic($filename, $content) {
291
- if (!is_dir(W3TC_CACHE_TMP_DIR) || !is_writable(W3TC_CACHE_TMP_DIR)) {
292
- w3_mkdir_from(W3TC_CACHE_TMP_DIR, W3TC_CACHE_DIR);
293
-
294
- if (!is_dir(W3TC_CACHE_TMP_DIR) || !is_writable(W3TC_CACHE_TMP_DIR)) {
295
- throw new Exception('Can\'t create folder <strong>' .
296
- W3TC_CACHE_TMP_DIR . '</strong>');
297
- }
298
- }
299
-
300
- $temp = tempnam(W3TC_CACHE_TMP_DIR, 'temp');
301
-
302
- try {
303
- if (!($f = @fopen($temp, 'wb'))) {
304
- if (file_exists($temp))
305
- @unlink($temp);
306
- throw new Exception('Can\'t write to temporary file <strong>' .
307
- $temp . '</strong>');
308
- }
309
-
310
- fwrite($f, $content);
311
- fclose($f);
312
-
313
- if (!@rename($temp, $filename)) {
314
- @unlink($filename);
315
- if (!@rename($temp, $filename)) {
316
- w3_mkdir_from(dirname($filename), W3TC_CACHE_DIR);
317
- if (!@rename($temp, $filename)) {
318
- throw new Exception('Can\'t write to file <strong>' .
319
- $filename . '</strong>');
320
- }
321
- }
322
- }
323
-
324
- $chmod = 0644;
325
- if (defined('FS_CHMOD_FILE'))
326
- $chmod = FS_CHMOD_FILE;
327
- @chmod($filename, $chmod);
328
- } catch (Exception $ex) {
329
- if (file_exists($temp))
330
- @unlink($temp);
331
- throw $ex;
332
- }
333
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Recursive creates directory
5
+ *
6
+ * @param string $path
7
+ * @param integer $mask
8
+ * @param string $curr_path
9
+ * @return boolean
10
+ */
11
+ function w3_mkdir($path, $mask = 0777, $curr_path = '') {
12
+ $path = w3_realpath($path);
13
+ $path = trim($path, '/');
14
+ $dirs = explode('/', $path);
15
+
16
+ foreach ($dirs as $dir) {
17
+ if ($dir == '') {
18
+ return false;
19
+ }
20
+
21
+ $curr_path .= ($curr_path == '' ? '' : '/') . $dir;
22
+
23
+ if (!@is_dir($curr_path)) {
24
+ if (!@mkdir($curr_path, $mask)) {
25
+ return false;
26
+ }
27
+ }
28
+ }
29
+
30
+ return true;
31
+ }
32
+
33
+ /**
34
+ * Recursive creates directory from some directory
35
+ * Does not try to create directory before from
36
+ *
37
+ * @param string $path
38
+ * @param string $from_path
39
+ * @param integer $mask
40
+ * @return boolean
41
+ */
42
+ function w3_mkdir_from($path, $from_path = '', $mask = 0777) {
43
+ $path = w3_realpath($path);
44
+
45
+ $from_path = w3_realpath($from_path);
46
+ if (substr($path, 0, strlen($from_path)) != $from_path)
47
+ return false;
48
+
49
+ $path = substr($path, strlen($from_path));
50
+
51
+ $path = trim($path, '/');
52
+ $dirs = explode('/', $path);
53
+
54
+ $curr_path = $from_path;
55
+
56
+ foreach ($dirs as $dir) {
57
+ if ($dir == '') {
58
+ return false;
59
+ }
60
+
61
+ $curr_path .= ($curr_path == '' ? '' : '/') . $dir;
62
+
63
+ if (!@is_dir($curr_path)) {
64
+ if (!@mkdir($curr_path, $mask)) {
65
+ return false;
66
+ }
67
+ }
68
+ }
69
+
70
+ return true;
71
+ }
72
+
73
+ /**
74
+ * Recursive remove dir
75
+ *
76
+ * @param string $path
77
+ * @param array $exclude
78
+ * @param bool $remove
79
+ * @return void
80
+ */
81
+ function w3_rmdir($path, $exclude = array(), $remove = true) {
82
+ $dir = @opendir($path);
83
+
84
+ if ($dir) {
85
+ while (($entry = @readdir($dir)) !== false) {
86
+ if ($entry == '.' || $entry == '..') {
87
+ continue;
88
+ }
89
+
90
+ foreach ($exclude as $mask) {
91
+ if (fnmatch($mask, basename($entry))) {
92
+ continue 2;
93
+ }
94
+ }
95
+
96
+ $full_path = $path . DIRECTORY_SEPARATOR . $entry;
97
+
98
+ if (@is_dir($full_path)) {
99
+ w3_rmdir($full_path, $exclude);
100
+ } else {
101
+ @unlink($full_path);
102
+ }
103
+ }
104
+
105
+ @closedir($dir);
106
+
107
+ if ($remove) {
108
+ @rmdir($path);
109
+ }
110
+ }
111
+ }
112
+
113
+ /**
114
+ * Recursive empty dir
115
+ *
116
+ * @param string $path
117
+ * @param array $exclude
118
+ * @return void
119
+ */
120
+ function w3_emptydir($path, $exclude = array()) {
121
+ w3_rmdir($path, $exclude, false);
122
+ }
123
+
124
+ /**
125
+ * Check if file is write-able
126
+ *
127
+ * @param string $file
128
+ * @return boolean
129
+ */
130
+ function w3_is_writable($file) {
131
+ $exists = file_exists($file);
132
+
133
+ $fp = @fopen($file, 'a');
134
+
135
+ if ($fp) {
136
+ fclose($fp);
137
+
138
+ if (!$exists) {
139
+ @unlink($file);
140
+ }
141
+
142
+ return true;
143
+ }
144
+
145
+ return false;
146
+ }
147
+
148
+ /**
149
+ * Cehck if dir is write-able
150
+ *
151
+ * @param string $dir
152
+ * @return boolean
153
+ */
154
+ function w3_is_writable_dir($dir) {
155
+ $file = $dir . '/' . uniqid(mt_rand()) . '.tmp';
156
+
157
+ return w3_is_writable($file);
158
+ }
159
+
160
+ /**
161
+ * Returns dirname of path
162
+ *
163
+ * @param string $path
164
+ * @return string
165
+ */
166
+ function w3_dirname($path) {
167
+ $dirname = dirname($path);
168
+
169
+ if ($dirname == '.' || $dirname == '/' || $dirname == '\\') {
170
+ $dirname = '';
171
+ }
172
+
173
+ return $dirname;
174
+ }
175
+
176
+ function w3_make_relative_path($filename, $base_dir) {
177
+ $filename = w3_realpath($filename);
178
+ $base_dir = w3_realpath($base_dir);
179
+
180
+ $filename_parts = explode('/', trim($filename, '/'));
181
+ $base_dir_parts = explode('/', trim($base_dir, '/'));
182
+
183
+ // count number of equal path parts
184
+ for ($equal_number = 0;;$equal_number++) {
185
+ if ($equal_number >= count($filename_parts) ||
186
+ $equal_number >= count($base_dir_parts))
187
+ break;
188
+ if ($filename_parts[$equal_number] != $base_dir_parts[$equal_number])
189
+ break;
190
+ }
191
+
192
+ $relative_dir = str_repeat('../', count($base_dir_parts) - $equal_number);
193
+ $relative_dir .= implode('/', array_slice($filename_parts, $equal_number));
194
+
195
+ return $relative_dir;
196
+ }
197
+
198
+ /**
199
+ * Returns open basedirs
200
+ *
201
+ * @return array
202
+ */
203
+ function w3_get_open_basedirs() {
204
+ $open_basedir_ini = ini_get('open_basedir');
205
+ $open_basedirs = (W3TC_WIN ? preg_split('~[;,]~', $open_basedir_ini) : explode(':', $open_basedir_ini));
206
+ $result = array();
207
+
208
+ foreach ($open_basedirs as $open_basedir) {
209
+ $open_basedir = trim($open_basedir);
210
+ if (!empty($open_basedir) && $open_basedir != '') {
211
+ $result[] = w3_realpath($open_basedir);
212
+ }
213
+ }
214
+
215
+ return $result;
216
+ }
217
+
218
+ /**
219
+ * Checks if path is restricted by open_basedir
220
+ *
221
+ * @param string $path
222
+ * @return boolean
223
+ */
224
+ function w3_check_open_basedir($path) {
225
+ $path = w3_realpath($path);
226
+ $open_basedirs = w3_get_open_basedirs();
227
+
228
+ if (!count($open_basedirs)) {
229
+ return true;
230
+ }
231
+
232
+ foreach ($open_basedirs as $open_basedir) {
233
+ if (strstr($path, $open_basedir) !== false) {
234
+ return true;
235
+ }
236
+ }
237
+
238
+ return false;
239
+ }
240
+
241
+ function w3_get_file_permissions($file) {
242
+ if (function_exists('fileperms') && $fileperms = @fileperms($file)) {
243
+ $fileperms = 0777 & $fileperms;
244
+ } else {
245
+ clearstatcache();
246
+ $stat=@stat($file);
247
+ if ($stat)
248
+ $fileperms = 0777 & $stat['mode'];
249
+ else
250
+ $fileperms = 0;
251
+ }
252
+ return $fileperms;
253
+ }
254
+
255
+ function w3_get_file_owner($file = '') {
256
+ $fileowner = $filegroup = 'unknown';
257
+ if ($file) {
258
+ if (function_exists('fileowner') && function_exists('fileowner')) {
259
+ $fileowner = @fileowner($file);
260
+ $filegroup = @filegroup($file);
261
+ if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) {
262
+ $fileowner = @posix_getpwuid($fileowner);
263
+ $fileowner = $fileowner['name'];
264
+ $filegroup = @posix_getgrgid($filegroup);
265
+ $filegroup = $filegroup['name'];
266
+ }
267
+ }
268
+ } else {
269
+ if (function_exists('getmyuid') && function_exists('getmygid')) {
270
+ $fileowner = @getmyuid();
271
+ $filegroup = @getmygid();
272
+ if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) {
273
+ $fileowner = @posix_getpwuid($fileowner);
274
+ $fileowner = $fileowner['name'];
275
+ $filegroup = @posix_getgrgid($filegroup);
276
+ $filegroup = $filegroup['name'];
277
+ }
278
+ }
279
+ }
280
+ return $fileowner . ':' . $filegroup;
281
+ }
282
+
283
+ /**
284
+ * Atomically writes file inside W3TC_CACHE_DIR dir
285
+ * @param $filename
286
+ * @param $content
287
+ * @throws Exception
288
+ * @return void
289
+ **/
290
+ function w3_file_put_contents_atomic($filename, $content) {
291
+ if (!is_dir(W3TC_CACHE_TMP_DIR) || !is_writable(W3TC_CACHE_TMP_DIR)) {
292
+ w3_mkdir_from(W3TC_CACHE_TMP_DIR, W3TC_CACHE_DIR);
293
+
294
+ if (!is_dir(W3TC_CACHE_TMP_DIR) || !is_writable(W3TC_CACHE_TMP_DIR)) {
295
+ throw new Exception('Can\'t create folder <strong>' .
296
+ W3TC_CACHE_TMP_DIR . '</strong>');
297
+ }
298
+ }
299
+
300
+ $temp = tempnam(W3TC_CACHE_TMP_DIR, 'temp');
301
+
302
+ try {
303
+ if (!($f = @fopen($temp, 'wb'))) {
304
+ if (file_exists($temp))
305
+ @unlink($temp);
306
+ throw new Exception('Can\'t write to temporary file <strong>' .
307
+ $temp . '</strong>');
308
+ }
309
+
310
+ fwrite($f, $content);
311
+ fclose($f);
312
+
313
+ if (!@rename($temp, $filename)) {
314
+ @unlink($filename);
315
+ if (!@rename($temp, $filename)) {
316
+ w3_mkdir_from(dirname($filename), W3TC_CACHE_DIR);
317
+ if (!@rename($temp, $filename)) {
318
+ throw new Exception('Can\'t write to file <strong>' .
319
+ $filename . '</strong>');
320
+ }
321
+ }
322
+ }
323
+
324
+ $chmod = 0644;
325
+ if (defined('FS_CHMOD_FILE'))
326
+ $chmod = FS_CHMOD_FILE;
327
+ @chmod($filename, $chmod);
328
+ } catch (Exception $ex) {
329
+ if (file_exists($temp))
330
+ @unlink($temp);
331
+ throw $ex;
332
+ }
333
+ }
334
+
335
+
336
+ /**
337
+ * Takes a W3TC settings array and formats it to a PHP String
338
+ * @param $data
339
+ * @return string
340
+ */
341
+ function w3tc_format_data_as_settings_file($data) {
342
+ $config = "<?php\r\n\r\nreturn array(\r\n";
343
+ foreach ($data as $key => $value)
344
+ $config .= w3tc_format_array_entry_as_settings_file_entry(1, $key, $value);
345
+ $config .= ");";
346
+ return $config;
347
+ }
348
+
349
+
350
+ /**
351
+ * Writes array item to file
352
+ *
353
+ * @param int $tabs
354
+ * @param string $key
355
+ * @param mixed $value
356
+ * @return string
357
+ */
358
+ function w3tc_format_array_entry_as_settings_file_entry($tabs, $key, $value) {
359
+ $item = str_repeat("\t", $tabs);
360
+
361
+ if (is_numeric($key) && (string)(int)$key === (string)$key) {
362
+ $item .= sprintf("%d => ", $key);
363
+ } else {
364
+ $item .= sprintf("'%s' => ", addcslashes($key, "'\\"));
365
+ }
366
+
367
+ switch (gettype($value)) {
368
+ case 'object':
369
+ case 'array':
370
+ $item .= "array(\r\n";
371
+ foreach ((array)$value as $k => $v) {
372
+ $item .= w3tc_format_array_entry_as_settings_file_entry($tabs + 1, $k, $v);
373
+ }
374
+ $item .= sprintf("%s),\r\n", str_repeat("\t", $tabs));
375
+ return $item;
376
+
377
+ case 'integer':
378
+ $data = (string)$value;
379
+ break;
380
+
381
+ case 'double':
382
+ $data = (string)$value;
383
+ break;
384
+
385
+ case 'boolean':
386
+ $data = ($value ? 'true' : 'false');
387
+ break;
388
+
389
+ case 'NULL':
390
+ $data = 'null';
391
+ break;
392
+
393
+ default:
394
+ case 'string':
395
+ $data = "'" . addcslashes($value, "'\\") . "'";
396
+ break;
397
+ }
398
+
399
+ $item .= $data . ",\r\n";
400
+
401
+ return $item;
402
+ }
403
+
inc/functions/http.php CHANGED
@@ -1,102 +1,102 @@
1
- <?php
2
-
3
- /**
4
- * Filter handler for use_curl_transport.
5
- * Workaround to not use curl for extra http methods
6
- *
7
- * @param $result boolean
8
- * @param $args array
9
- * @return boolean
10
- */
11
- function w3_use_curl_transport($result, $args) {
12
- if (isset($args['method']) && $args['method'] != 'GET' && $args['method'] != 'POST')
13
- return false;
14
-
15
- return $result;
16
- }
17
-
18
- /**
19
- * Sends HTTP request
20
- *
21
- * @param $url string
22
- * @param $args array
23
- * @return WP_Error|array
24
- */
25
- function w3_http_request($url, $args = array()) {
26
- static $filter_set = false;
27
- if (!$filter_set) {
28
- add_filter('use_curl_transport', 'w3_use_curl_transport', 10, 2);
29
- $filter_set = true;
30
- }
31
-
32
- $args = array_merge(array(
33
- 'user-agent' => W3TC_POWERED_BY
34
- ), $args);
35
-
36
- return wp_remote_request($url, $args);
37
- }
38
-
39
- /**
40
- * Sends HTTP GET request
41
- *
42
- * @param string $url
43
- * @param array $args
44
- * @return array|WP_Error
45
- */
46
- function w3_http_get($url, $args = array()) {
47
- $args = array_merge($args, array(
48
- 'method' => 'GET'
49
- ));
50
-
51
- return w3_http_request($url, $args);
52
- }
53
-
54
- /**
55
- * Downloads URL into a file
56
- *
57
- * @param string $url
58
- * @param string $file
59
- * @return boolean
60
- */
61
- function w3_download($url, $file) {
62
- if (strpos($url, '//') === 0) {
63
- $url = (w3_is_https() ? 'https:' : 'http:') . $url;
64
- }
65
-
66
- $response = w3_http_get($url);
67
-
68
- if (!is_wp_error($response) && $response['response']['code'] == 200) {
69
- return @file_put_contents($file, $response['body']);
70
- }
71
-
72
- return false;
73
- }
74
-
75
- /**
76
- * Returns upload info
77
- *
78
- * @return array
79
- */
80
- function w3_upload_info() {
81
- static $upload_info = null;
82
-
83
- if ($upload_info === null) {
84
- $upload_info = @wp_upload_dir();
85
-
86
- if (empty($upload_info['error'])) {
87
- $parse_url = @parse_url($upload_info['baseurl']);
88
-
89
- if ($parse_url) {
90
- $baseurlpath = (!empty($parse_url['path']) ? trim($parse_url['path'], '/') : '');
91
- } else {
92
- $baseurlpath = 'wp-content/uploads';
93
- }
94
-
95
- $upload_info['baseurlpath'] = '/' . $baseurlpath . '/';
96
- } else {
97
- $upload_info = false;
98
- }
99
- }
100
-
101
- return $upload_info;
102
- }
1
+ <?php
2
+
3
+ /**
4
+ * Filter handler for use_curl_transport.
5
+ * Workaround to not use curl for extra http methods
6
+ *
7
+ * @param $result boolean
8
+ * @param $args array
9
+ * @return boolean
10
+ */
11
+ function w3_use_curl_transport($result, $args) {
12
+ if (isset($args['method']) && $args['method'] != 'GET' && $args['method'] != 'POST')
13
+ return false;
14
+
15
+ return $result;
16
+ }
17
+
18
+ /**
19
+ * Sends HTTP request
20
+ *
21
+ * @param $url string
22
+ * @param $args array
23
+ * @return WP_Error|array
24
+ */
25
+ function w3_http_request($url, $args = array()) {
26
+ static $filter_set = false;
27
+ if (!$filter_set) {
28
+ add_filter('use_curl_transport', 'w3_use_curl_transport', 10, 2);
29
+ $filter_set = true;
30
+ }
31
+
32
+ $args = array_merge(array(
33
+ 'user-agent' => W3TC_POWERED_BY
34
+ ), $args);
35
+
36
+ return wp_remote_request($url, $args);
37
+ }
38
+
39
+ /**
40
+ * Sends HTTP GET request
41
+ *
42
+ * @param string $url
43
+ * @param array $args
44
+ * @return array|WP_Error
45
+ */
46
+ function w3_http_get($url, $args = array()) {
47
+ $args = array_merge($args, array(
48
+ 'method' => 'GET'
49
+ ));
50
+
51
+ return w3_http_request($url, $args);
52
+ }
53
+
54
+ /**
55
+ * Downloads URL into a file
56
+ *
57
+ * @param string $url
58
+ * @param string $file
59
+ * @return boolean
60
+ */
61
+ function w3_download($url, $file) {
62
+ if (strpos($url, '//') === 0) {
63
+ $url = (w3_is_https() ? 'https:' : 'http:') . $url;
64
+ }
65
+
66
+ $response = w3_http_get($url);
67
+
68
+ if (!is_wp_error($response) && $response['response']['code'] == 200) {
69
+ return @file_put_contents($file, $response['body']);
70
+ }
71
+
72
+ return false;
73
+ }
74
+
75
+ /**
76
+ * Returns upload info
77
+ *
78
+ * @return array
79
+ */
80
+ function w3_upload_info() {
81
+ static $upload_info = null;
82
+
83
+ if ($upload_info === null) {
84
+ $upload_info = @wp_upload_dir();
85
+
86
+ if (empty($upload_info['error'])) {
87
+ $parse_url = @parse_url($upload_info['baseurl']);
88
+
89
+ if ($parse_url) {
90
+ $baseurlpath = (!empty($parse_url['path']) ? trim($parse_url['path'], '/') : '');
91
+ } else {
92
+ $baseurlpath = 'wp-content/uploads';
93
+ }
94
+
95
+ $upload_info['baseurlpath'] = '/' . $baseurlpath . '/';
96
+ } else {
97
+ $upload_info = false;
98
+ }
99
+ }
100
+
101
+ return $upload_info;
102
+ }
inc/functions/mime.php CHANGED
@@ -1,74 +1,77 @@
1
- <?php
2
-
3
- /**
4
- * Returns file mime type
5
- *
6
- * @param string $file
7
- * @return string
8
- */
9
- function w3_get_mime_type($file) {
10
- static $cache = array();
11
-
12
- if (!isset($cache[$file])) {
13
- $mime_type = false;
14
-
15
- /**
16
- * Try to detect by extension (fast)
17
- */
18
- $mime_types = include W3TC_INC_DIR . '/mime/all.php';
19
-
20
- foreach ($mime_types as $extension => $type) {
21
- if (preg_match('~\.(' . $extension . ')$~i', $file)) {
22
- $mime_type = $type;
23
- break;
24
- }
25
- }
26
-
27
- /**
28
- * Try to detect using file info function
29
- */
30
- if (!$mime_type && function_exists('finfo_open')) {
31
- $finfo = @finfo_open(FILEINFO_MIME);
32
-
33
- if (!$finfo) {
34
- $finfo = @finfo_open(FILEINFO_MIME);
35
- }
36
-
37
- if ($finfo) {
38
- $mime_type = @finfo_file($finfo, $file);
39
-
40
- if ($mime_type) {
41
- $extra_mime_type_info = strpos($mime_type, "; ");
42
-
43
- if ($extra_mime_type_info) {
44
- $mime_type = substr($mime_type, 0, $extra_mime_type_info);
45
- }
46
-
47
- if ($mime_type == 'application/octet-stream') {
48
- $mime_type = false;
49
- }
50
- }
51
-
52
- @finfo_close($finfo);
53
- }
54
- }
55
-
56
- /**
57
- * Try to detect using mime type function
58
- */
59
- if (!$mime_type && function_exists('mime_content_type')) {
60
- $mime_type = @mime_content_type($file);
61
- }
62
-
63
- /**
64
- * If detection failed use default mime type
65
- */
66
- if (!$mime_type) {
67
- $mime_type = 'application/octet-stream';
68
- }
69
-
70
- $cache[$file] = $mime_type;
71
- }
72
-
73
- return $cache[$file];
74
- }
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Returns file mime type
5
+ *
6
+ * @param string $file
7
+ * @return string
8
+ */
9
+ function w3_get_mime_type($file) {
10
+ static $cache = array();
11
+
12
+ if (!isset($cache[$file])) {
13
+ $mime_type = false;
14
+
15
+ /**
16
+ * Try to detect by extension (fast)
17
+ */
18
+ $mime_types = include W3TC_INC_DIR . '/mime/all.php';
19
+
20
+ foreach ($mime_types as $extension => $type) {
21
+ if (preg_match('~\.(' . $extension . ')$~i', $file)) {
22
+ if (is_array($type))
23
+ $mime_type = array_pop($type);
24
+ else
25
+ $mime_type = $type;
26
+ break;
27
+ }
28
+ }
29
+
30
+ /**
31
+ * Try to detect using file info function
32
+ */
33
+ if (!$mime_type && function_exists('finfo_open')) {
34
+ $finfo = @finfo_open(FILEINFO_MIME);
35
+
36
+ if (!$finfo) {
37
+ $finfo = @finfo_open(FILEINFO_MIME);
38
+ }
39
+
40
+ if ($finfo) {
41
+ $mime_type = @finfo_file($finfo, $file);
42
+
43
+ if ($mime_type) {
44
+ $extra_mime_type_info = strpos($mime_type, "; ");
45
+
46
+ if ($extra_mime_type_info) {
47
+ $mime_type = substr($mime_type, 0, $extra_mime_type_info);
48
+ }
49
+
50
+ if ($mime_type == 'application/octet-stream') {
51
+ $mime_type = false;
52
+ }
53
+ }
54
+
55
+ @finfo_close($finfo);
56
+ }
57
+ }
58
+
59
+ /**
60
+ * Try to detect using mime type function
61
+ */
62
+ if (!$mime_type && function_exists('mime_content_type')) {
63
+ $mime_type = @mime_content_type($file);
64
+ }
65
+
66
+ /**
67
+ * If detection failed use default mime type
68
+ */
69
+ if (!$mime_type) {
70
+ $mime_type = 'application/octet-stream';
71
+ }
72
+
73
+ $cache[$file] = $mime_type;
74
+ }
75
+
76
+ return $cache[$file];
77
+ }
inc/functions/multisite.php CHANGED
@@ -24,7 +24,7 @@ function w3_blogmap_register_new_item($blog_home_url, $config) {
24
  return false;
25
  $data = $config->get_boolean('common.force_master') ? 'm' : 'c';
26
  $blog_id = $GLOBALS['current_blog']->blog_id;
27
-
28
  $blog_ids_strings[] = "'" . $blog_home_url . "' => '" . $data.$blog_id . "'";
29
  foreach ($blog_ids as $key => $value)
30
  $blog_ids_strings[] = "'" . $key . "' => '" . $value . "'";
24
  return false;
25
  $data = $config->get_boolean('common.force_master') ? 'm' : 'c';
26
  $blog_id = $GLOBALS['current_blog']->blog_id;
27
+ $blog_home_url = preg_replace('/[^a-zA-Z0-9\+\.%~!()\/\-\_]/', '', $blog_home_url);
28
  $blog_ids_strings[] = "'" . $blog_home_url . "' => '" . $data.$blog_id . "'";
29
  foreach ($blog_ids as $key => $value)
30
  $blog_ids_strings[] = "'" . $key . "' => '" . $value . "'";
inc/functions/other.php CHANGED
@@ -10,15 +10,15 @@ function w3_parse_faq() {
10
  if (!file_exists($file)) {
11
  $file = W3TC_LANGUAGES_DIR . '/faq-en_US.xml';
12
  }
13
- $xml_premium = null;
14
- if ((defined('W3TC_ENTERPRISE') && W3TC_ENTERPRISE) || (defined('W3TC_PRO') && W3TC_PRO)) {
15
- $file_premium = W3TC_LANGUAGES_DIR . '/faq-premium-en_US.xml';
16
- $xml_premium = @file_get_contents($file_premium);
17
- }
18
 
19
  $xml = @file_get_contents($file);
20
-
21
- if ($xml) {
 
 
 
 
 
22
  if (function_exists('xml_parser_create')) {
23
  $parser = @xml_parser_create('UTF-8');
24
 
@@ -32,21 +32,25 @@ function w3_parse_faq() {
32
 
33
  if ($result) {
34
  $index = 0;
35
- $current_section = '';
36
  $current_entry = array();
37
-
38
  foreach ($values as $value) {
39
  switch ($value['type']) {
40
  case 'open':
41
  if ($value['tag'] === 'section') {
42
  $current_section = $value['attributes']['name'];
 
 
 
 
43
  }
44
  break;
45
 
46
  case 'complete':
47
  switch ($value['tag']) {
48
  case 'question':
49
- $current_entry['question'] = $value['value'];
50
  break;
51
 
52
  case 'answer':
@@ -58,61 +62,19 @@ function w3_parse_faq() {
58
  case 'close':
59
  if ($value['tag'] == 'entry') {
60
  $current_entry['index'] = ++$index;
61
- $faq[$current_section][] = $current_entry;
 
 
 
 
 
62
  }
63
  break;
64
  }
65
  }
66
-
67
- if ($xml_premium) {
68
- $parser = @xml_parser_create('UTF-8');
69
-
70
- xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, 'UTF-8');
71
- xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
72
- xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
73
- $values = null;
74
-
75
- $result = xml_parse_into_struct($parser, $xml_premium, $values);
76
- xml_parser_free($parser);
77
-
78
- if ($result) {
79
- $current_section = '';
80
- $current_entry = array();
81
-
82
- foreach ($values as $value) {
83
- switch ($value['type']) {
84
- case 'open':
85
- if ($value['tag'] === 'section') {
86
- $current_section = $value['attributes']['name'];
87
- }
88
- break;
89
-
90
- case 'complete':
91
- switch ($value['tag']) {
92
- case 'question':
93
- $current_entry['question'] = $value['value'];
94
- break;
95
-
96
- case 'answer':
97
- $current_entry['answer'] = $value['value'];
98
- break;
99
- }
100
- break;
101
-
102
- case 'close':
103
- if ($value['tag'] == 'entry') {
104
- $current_entry['index'] = ++$index;
105
- $faq[$current_section][] = $current_entry;
106
- }
107
- break;
108
- }
109
- }
110
- }
111
- }
112
  }
113
  }
114
  }
115
-
116
  return $faq;
117
  }
118
 
@@ -143,6 +105,7 @@ function w3tc_button_link($text, $url, $new_window = false) {
143
  * @param string $note
144
  * @param string $redirect
145
  * @param boolean $admin if to use config admin
 
146
  * @return string
147
  */
148
  function w3tc_button_hide_note($text, $note, $redirect = '', $admin = false, $page ='') {
@@ -175,4 +138,4 @@ function w3tc_button_hide_note($text, $note, $redirect = '', $admin = false, $pa
175
  */
176
  function w3tc_button($text, $onclick = '', $class = '') {
177
  return sprintf('<input type="button" class="button %s" value="%s" onclick="%s" />', htmlspecialchars($class), htmlspecialchars($text), htmlspecialchars($onclick));
178
- }
10
  if (!file_exists($file)) {
11
  $file = W3TC_LANGUAGES_DIR . '/faq-en_US.xml';
12
  }
 
 
 
 
 
13
 
14
  $xml = @file_get_contents($file);
15
+ $file2 = W3TC_LANGUAGES_DIR . '/faq-pro-' . get_locale() . '.xml';
16
+ if (!file_exists($file)) {
17
+ $file2 = W3TC_LANGUAGES_DIR . '/faq-pro-en_US.xml';
18
+ }
19
+ $xml2 = @file_get_contents($file2);
20
+ $xmls = array('standard' => $xml, 'pro' => $xml2);
21
+ foreach ($xmls as $state => $xml) {
22
  if (function_exists('xml_parser_create')) {
23
  $parser = @xml_parser_create('UTF-8');
24
 
32
 
33
  if ($result) {
34
  $index = 0;
35
+ $root_section = $current_section = '';
36
  $current_entry = array();
37
+ $lvl = 0;
38
  foreach ($values as $value) {
39
  switch ($value['type']) {
40
  case 'open':
41
  if ($value['tag'] === 'section') {
42
  $current_section = $value['attributes']['name'];
43
+ if ($root_section == '' || $lvl == 0)
44
+ $root_section = $current_section;
45
+ $lvl++;
46
+
47
  }
48
  break;
49
 
50
  case 'complete':
51
  switch ($value['tag']) {
52
  case 'question':
53
+ $current_entry['question'] = ($state == 'pro' ? '<strong style="color:#000">PRO version: </strong>': '' ) . $value['value'];
54
  break;
55
 
56
  case 'answer':
62
  case 'close':
63
  if ($value['tag'] == 'entry') {
64
  $current_entry['index'] = ++$index;
65
+ if ($root_section != $current_section)
66
+ $faq[$root_section][$current_section][] = $current_entry;
67
+ else
68
+ $faq[$root_section][] = $current_entry;
69
+ }else if ($value['tag'] == 'section') {
70
+ $lvl--;
71
  }
72
  break;
73
  }
74
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  }
76
  }
77
  }
 
78
  return $faq;
79
  }
80
 
105
  * @param string $note
106
  * @param string $redirect
107
  * @param boolean $admin if to use config admin
108
+ * @param string $page
109
  * @return string
110
  */
111
  function w3tc_button_hide_note($text, $note, $redirect = '', $admin = false, $page ='') {
138
  */
139
  function w3tc_button($text, $onclick = '', $class = '') {
140
  return sprintf('<input type="button" class="button %s" value="%s" onclick="%s" />', htmlspecialchars($class), htmlspecialchars($text), htmlspecialchars($onclick));
141
+ }
inc/functions/plugin.php CHANGED
@@ -1,616 +1,661 @@
1
- <?php
2
-
3
- /**
4
- * W3 Total Cache plugins API
5
- */
6
-
7
- /**
8
- * Add W3TC action callback
9
- *
10
- * @param string $key
11
- * @param mixed $callback
12
- * @return void
13
- */
14
- function w3tc_add_ob_callback($key, $callback) {
15
- $GLOBALS['_w3tc_ob_callbacks'][$key] = $callback;
16
- }
17
-
18
- function w3tc_do_ob_callbacks($order, &$value) {
19
- foreach ($order as $key) {
20
- if (isset($GLOBALS['_w3tc_ob_callbacks'][$key])) {
21
- $callback = $GLOBALS['_w3tc_ob_callbacks'][$key];
22
- if (is_callable($callback)) {
23
- $value = call_user_func($callback, $value);
24
- }
25
- }
26
- }
27
- return $value;
28
- }
29
-
30
- /**
31
- * Add W3TC action callback
32
- *
33
- * @param string $action
34
- * @param mixed $callback
35
- * @param int $priority
36
- * @return void
37
- */
38
- function w3tc_add_action($action, $callback, $priority = 10) {
39
- $GLOBALS['_w3tc_actions'][$action][$priority][] = $callback;
40
- ksort($GLOBALS['_w3tc_actions'][$action]);
41
- }
42
-
43
- /**
44
- * Do W3TC action
45
- *
46
- * @param string $action
47
- * @param mixed $value
48
- * @return mixed
49
- */
50
- function w3tc_do_action($action, $value = null) {
51
- if (isset($GLOBALS['_w3tc_actions'][$action])) {
52
- foreach ((array) $GLOBALS['_w3tc_actions'][$action] as $callbacks) {
53
- foreach ($callbacks as $callback) {
54
- if (is_callable($callback)) {
55
- $value = call_user_func($callback, $value);
56
- }
57
- }
58
- }
59
- }
60
-
61
- return $value;
62
- }
63
-
64
- /**
65
- * Do W3TC action
66
- *
67
- * @param string $action
68
- * @param mixed $value
69
- * @return mixed
70
- */
71
- function w3tc_do_action_by_ref($action, &$value = null) {
72
- if (isset($GLOBALS['_w3tc_actions'][$action])) {
73
- foreach ((array) $GLOBALS['_w3tc_actions'][$action] as $callbacks) {
74
- foreach ($callbacks as $callback) {
75
- if (is_callable($callback)) {
76
- $value = call_user_func($callback, $value);
77
- }
78
- }
79
- }
80
- }
81
-
82
- return $value;
83
- }
84
-
85
- /**
86
- * Shortcut for page cache flush
87
- *
88
- * @return boolean
89
- */
90
- function w3tc_pgcache_flush() {
91
- $w3_pgcache = w3_instance('W3_PgCacheFlush');
92
- return $w3_pgcache->flush();
93
- }
94
-
95
- /**
96
- * Shortcut for page post cache flush
97
- *
98
- * @param integer $post_id
99
- * @return boolean
100
- */
101
- function w3tc_pgcache_flush_post($post_id) {
102
- $w3_cacheflush = w3_instance('W3_CacheFlush');
103
-
104
- return $w3_cacheflush->pgcache_flush_post($post_id);
105
- }
106
-
107
- /**
108
- * Shortcut for url page cache flush
109
- *
110
- * @param string $url
111
- * @return boolean
112
- */
113
- function w3tc_pgcache_flush_url($url) {
114
- $w3_cacheflush = w3_instance('W3_CacheFlush');
115
-
116
- return $w3_cacheflush->pgcache_flush_url($url);
117
- }
118
-
119
- /**
120
- * Shortcut for database cache flush
121
- *
122
- * @return boolean
123
- */
124
- function w3tc_dbcache_flush() {
125
- $w3_db = w3_instance('W3_DbCache');
126
- return $w3_db->flush_cache();
127
- }
128
-
129
- /**
130
- * Shortcut for minify cache flush
131
- *
132
- * @return boolean
133
- */
134
- function w3tc_minify_flush() {
135
- $w3_minify = w3_instance('W3_Minify');
136
-
137
- return $w3_minify->flush();
138
- }
139
-
140
- /**
141
- * Shortcut for objectcache cache flush
142
- *
143
- * @return boolean
144
- */
145
- function w3tc_objectcache_flush() {
146
- $w3_objectcache = w3_instance('W3_ObjectCache');
147
- return $w3_objectcache->flush();
148
- }
149
-
150
- /**
151
- * Shortcut for CDN cache post purge
152
- * @param $post_id
153
- * @return mixed
154
- */
155
- function w3tc_cdncache_purge_post($post_id) {
156
- $w3_cacheflush = w3_instance('W3_CacheFlush');
157
- return $w3_cacheflush->cdncache_purge_post($post_id);
158
- }
159
-
160
- /**
161
- * Shortcut for CDN cache url purge
162
- * @param string $url
163
- * @return mixed
164
- */
165
- function w3tc_cdncache_purge_url($url) {
166
- $w3_cacheflush = w3_instance('W3_CacheFlush');
167
- return $w3_cacheflush->cdncache_purge_url($url);
168
- }
169
-
170
- /**
171
- * Shortcut for CDN cache purge
172
- * @return mixed
173
- */
174
- function w3tc_cdncache_purge() {
175
- $w3_cacheflush = w3_instance('W3_CacheFlush');
176
- return $w3_cacheflush->cdncache_purge();
177
- }
178
-
179
- /**
180
- * Shortcut for CDN purge files
181
- * @param array $files Array consisting of uri paths (i.e wp-content/uploads/image.pnp)
182
- * @return mixed
183
- */
184
- function w3tc_cdn_purge_files($files) {
185
- $w3_cacheflush = w3_instance('W3_CacheFlush');
186
- return $w3_cacheflush->cdn_purge_files($files);
187
- }
188
-
189
- /**
190
- * Prints script tag for scripts group
191
- *
192
- * @param string $location
193
- * @retun void
194
- */
195
- function w3tc_minify_script_group($location) {
196
- $w3_plugin_minify = w3_instance('W3_Plugin_Minify');
197
- $w3_plugin_minify->printed_scripts[] = $location;
198
-
199
- echo $w3_plugin_minify->get_script_group($location);
200
- }
201
-
202
- /**
203
- * Prints style tag for styles group
204
- *
205
- * @param string $location
206
- * @retun void
207
- */
208
- function w3tc_minify_style_group($location) {
209
- $w3_plugin_minify = w3_instance('W3_Plugin_Minify');
210
- $w3_plugin_minify->printed_styles[] = $location;
211
-
212
- echo $w3_plugin_minify->get_style_group($location);
213
- }
214
-
215
- /**
216
- * Prints script tag for custom scripts
217
- *
218
- * @param string|array $files
219
- * @param boolean $blocking
220
- * @return void
221
- */
222
- function w3tc_minify_script_custom($files, $blocking = true) {
223
- $w3_plugin_minify = w3_instance('W3_Plugin_Minify');
224
- echo $w3_plugin_minify->get_script_custom($files, $blocking);
225
- }
226
-
227
- /**
228
- * Prints style tag for custom styles
229
- *
230
- * @param string|array $files
231
- * @param boolean $import
232
- * @return void
233
- */
234
- function w3tc_minify_style_custom($files, $import = false) {
235
- $w3_plugin_minify = w3_instance('W3_Plugin_Minify');
236
- echo $w3_plugin_minify->get_style_custom($files, $import);
237
- }
238
-
239
- /**
240
- * @param string $fragment_group
241
- * @param boolean $global If group is for whole network in MS install
242
- * @return mixed
243
- */
244
- function w3tc_fragmentcache_flush_group($fragment_group, $global = false) {
245
- $w3_fragmentcache = w3_instance('W3_CacheFlush');
246
- return $w3_fragmentcache->fragmentcache_flush_group($fragment_group, $global);
247
- }
248
-
249
- /**
250
- * Flush all fragment groups
251
- * @return mixed
252
- */
253
- function w3tc_fragmentcache_flush() {
254
- $w3_fragmentcache = w3_instance('W3_CacheFlush');
255
- return $w3_fragmentcache->fragmentcache_flush();
256
- }
257
-
258
- /**
259
- * Register a fragment group and connected actions for current blog
260
- * @param string $group
261
- * @param array $actions on which actions group should be flushed
262
- * @param integer $expiration in seconds
263
- * @return mixed
264
- */
265
- function w3tc_register_fragment_group($group, $actions, $expiration) {
266
- $w3_fragmentcache = w3_instance('W3_Pro_Plugin_FragmentCache');
267
- return $w3_fragmentcache->register_group($group, $actions, $expiration);
268
- }
269
-
270
- /**
271
- * Register a fragment group for whole network in MS install
272
- * @param $group
273
- * @param $actions
274
- * @param integer $expiration in seconds
275
- * @return mixed
276
- */
277
- function w3tc_register_fragment_global_group($group, $actions, $expiration) {
278
- $w3_fragmentcache = w3_instance('W3_Pro_Plugin_FragmentCache');
279
- return $w3_fragmentcache->register_global_group($group, $actions,
280
- $expiration);
281
- }
282
-
283
- /**
284
- * Starts caching output
285
- *
286
- * @param string $id the fragment id
287
- * @param string $group the fragment group name.
288
- * @param string $hook name of the action/filter hook to disable on fragment found
289
- * @return bool returns true if cached fragment is echoed
290
- */
291
- function w3tc_fragmentcache_start($id, $group = '', $hook = '') {
292
- $fragment = w3tc_fragmentcache_get($id, $group);
293
- if (false === $fragment) {
294
- _w3tc_caching_fragment($id, $group);
295
- ob_start();
296
- } else {
297
- echo $fragment;
298
- if ($hook) {
299
- global $wp_filter;
300
- $wp_filter[$hook] = array();
301
- }
302
- return true;
303
- }
304
- return false;
305
- }
306
-
307
- /**
308
- * Starts caching filter, returns if filter already cached.
309
- *
310
- * @param string $id the fragment id
311
- * @param string $group the fragment group name.
312
- * @param string $hook name of the action/filter hook to disable on fragment found
313
- * @param mixed $data the data returned by the filter
314
- * @return mixed
315
- */
316
- function w3tc_fragmentcache_filter_start($id, $group = '', $hook = '', $data) {
317
- _w3tc_caching_fragment($id, $group);
318
- $fragment = w3tc_fragmentcache_get($id, $group);
319
- if (false !== $fragment) {
320
- if ($hook) {
321
- global $wp_filter;
322
- $wp_filter[$hook] = array();
323
- }
324
- return $fragment;
325
- }
326
- return $data;
327
- }
328
-
329
- /**
330
- * Ends the caching of output. Stores it and outputs the content
331
- *
332
- * @param string $id the fragment id
333
- * @param string $group the fragment group
334
- * @param int $expiration how long item is cached
335
- */
336
- function w3tc_fragmentcache_end($id, $group = '', $debug = false) {
337
- if (w3tc_is_caching_fragment($id, $group)) {
338
- $content = ob_get_contents();
339
- if ($debug)
340
- $content .= sprintf("\r\n<!-- fragment (%s%s) cached at %s by W3 Total Cache expires in %d seconds -->", $group, $id, date_i18n('Y-m-d H:i:s'), $expiration);
341
- w3tc_fragmentcache_store($id, $group, $content);
342
- ob_end_flush();
343
- }
344
- }
345
-
346
-
347
- /**
348
- * Ends the caching of filter. Stores it and returns the content
349
- *
350
- * @param string $id the fragment id
351
- * @param string $group the fragment group
352
- * @param mixed $data
353
- * @param int $expiration how long item is cached
354
- * @return mixed
355
- */
356
- function w3tc_fragmentcache_filter_end($id, $group = '', $data) {
357
- if (w3tc_is_caching_fragment($id, $group)) {
358
- w3tc_fragmentcache_store($id, $group, $data);
359
- }
360
- return $data;
361
- }
362
-
363
- /**
364
- * Stores an fragment
365
- *
366
- * @param $id
367
- * @param string $group
368
- * @param string $content
369
- * @param int $expiration
370
- */
371
- function w3tc_fragmentcache_store($id, $group = '', $content) {
372
- set_transient("{$group}{$id}", $content,
373
- 1000 /* default expiration in a case its not catched by fc plugin */);
374
- }
375
-
376
- /**
377
- * @param $id
378
- * @param string $group
379
- * @return object
380
- */
381
- function w3tc_fragmentcache_get($id, $group = '') {
382
- return get_transient("{$group}{$id}");
383
- }
384
-
385
- /**
386
- * Flushes a fragment from the cache
387
- * @param $id
388
- * @param string $group
389
- */
390
- function w3tc_fragmentcache_flush_fragment($id, $group = '') {
391
- delete_transient("{$group}{$id}");
392
- }
393
-
394
- /**
395
- * Checks wether page fragment caching is being done for the item
396
- * @param string $id fragment id
397
- * @param string $group which group fragment belongs too
398
- * @return bool
399
- */
400
- function w3tc_is_caching_fragment($id, $group = '') {
401
- global $w3tc_caching_fragment;
402
- return isset($w3tc_caching_fragment["{$group}{$id}"]) && $w3tc_caching_fragment["{$group}{$id}"];
403
- }
404
-
405
- /**
406
- * Internal function, sets if page fragment by $id and $group is being cached
407
- * @param string $id fragment id
408
- * @param string $group which group fragment belongs too
409
- */
410
- function _w3tc_caching_fragment($id, $group = '') {
411
- global $w3tc_caching_fragment;
412
- $w3tc_caching_fragment["{$group}{$id}"] = true;
413
- }
414
-
415
- /**
416
- * @param string $extension
417
- * @param string $setting
418
- * @return null|array|bool|string|int returns null if key not set
419
- */
420
- function w3tc_get_extension_config($extension, $setting = '') {
421
- /**
422
- * @var W3_Config $config
423
- */
424
- $config = w3_instance('W3_Config');
425
- $val = null;
426
- $extensions = $config->get_array('extensions.settings');
427
- if ($setting && isset($extensions[$extension][$setting])) {
428
- $val = $extensions[$extension][$setting];
429
- } elseif(empty($setting)) {
430
- return $extensions[$extension];
431
- }
432
- return $val;
433
- }
434
-
435
- /**
436
- * Shortcut for varnish flush
437
- *
438
- * @return boolean
439
- */
440
- function w3tc_varnish_flush() {
441
- $w3_pgcache = w3_instance('W3_CacheFlush');
442
- return $w3_pgcache->varnish_flush();
443
- }
444
-
445
- /**
446
- * Shortcut for post varnish flush
447
- *
448
- * @param integer $post_id
449
- * @return boolean
450
- */
451
- function w3tc_varnish_flush_post($post_id) {
452
- $w3_cacheflush = w3_instance('W3_CacheFlush');
453
-
454
- return $w3_cacheflush->varnish_flush_post($post_id);
455
- }
456
-
457
- /**
458
- * Shortcut for url varnish flush
459
- *
460
- * @param string $url
461
- * @return boolean
462
- */
463
- function w3tc_varnish_flush_url($url) {
464
- $w3_cacheflush = w3_instance('W3_CacheFlush');
465
-
466
- return $w3_cacheflush->varnish_flush_url($url);
467
- }
468
-
469
-
470
- /**
471
- * Deletes files.
472
- *
473
- * @param string $mask regular expression matching files to be deleted
474
- * @param bool $http if delete request should be made over http to current site. Default false.
475
- * @return mixed
476
- */
477
- function w3tc_apc_delete_files_based_on_regex($mask, $http = false) {
478
- if (!$http) {
479
- $w3_cacheflush = w3_instance('W3_CacheFlush');
480
-
481
- return $w3_cacheflush->apc_delete_files_based_on_regex($mask);
482
- } else {
483
- $url = WP_PLUGIN_URL . '/' . dirname(W3TC_FILE) . '/pub/apc.php';
484
- $path = parse_url($url, PHP_URL_PATH);
485
- $post = array(
486
- 'method' => 'POST',
487
- 'timeout' => 45,
488
- 'redirection' => 5,
489
- 'httpversion' => '1.0',
490
- 'blocking' => true,
491
- 'body' => array( 'nonce' => wp_hash($path), 'command' => 'delete_files', 'regex' => $mask),
492
- );
493
- $result = wp_remote_post($url, $post);
494
- if (is_wp_error($result)) {
495
- return $result;
496
- } elseif ($result['response']['code'] != '200') {
497
- return $result['response']['code'];
498
- }
499
-
500
- return true;
501
- }
502
- }
503
-
504
- /**
505
- * Reloads files.
506
- * @param string[] $files list of files supports, fullpath, from root, wp-content
507
- * @param bool $http if delete request should be made over http to current site. Default false.
508
- * @return mixed
509
- */
510
- function w3tc_apc_reload_files($files, $http = false) {
511
-
512
- if (!$http) {
513
- $w3_cacheflush = w3_instance('W3_CacheFlush');
514
-
515
- return $w3_cacheflush->apc_reload_files($files);
516
- } else {
517
- $url = WP_PLUGIN_URL . '/' . dirname(W3TC_FILE) . '/pub/apc.php';
518
- $path = parse_url($url, PHP_URL_PATH);
519
-
520
- $post = array(
521
- 'method' => 'POST',
522
- 'timeout' => 45,
523
- 'redirection' => 5,
524
- 'httpversion' => '1.0',
525
- 'blocking' => true,
526
- 'body' => array( 'nonce' => wp_hash($path), 'command' => 'reload_files', 'files' => $files),
527
- );
528
- $result = wp_remote_post($url, $post);
529
- if (is_wp_error($result)) {
530
- return $result;
531
- } elseif ($result['response']['code'] != '200') {
532
- return $result['response']['code'];
533
- }
534
-
535
- return true;
536
- }
537
- }
538
-
539
- /**
540
- * Use w3tc_get_themes() to get a list themenames to use with user agent groups
541
- * @param $group_name
542
- * @param string $theme the themename default is default theme. For childtheme it should be parentthemename/childthemename
543
- * @param string $redirect
544
- * @param array $agents Remember to escape special characters like spaces, dots or dashes with a backslash. Regular expressions are also supported.
545
- * @param bool $enabled
546
- */
547
- function w3tc_save_user_agent_group($group_name, $theme = 'default', $redirect = '', $agents = array(), $enabled = false) {
548
- /**
549
- * @var $w3_mobile W3_Mobile
550
- */
551
- $w3_mobile = w3_instance('W3_Mobile');
552
- $w3_mobile->save_group($group_name, $theme, $redirect, $agents, $enabled);
553
- }
554
-
555
- /**
556
- * @param $group
557
- */
558
- function w3tc_delete_user_agent_group($group) {
559
- /**
560
- * @var $w3_mobile W3_Mobile
561
- */
562
- $w3_mobile = w3_instance('W3_Mobile');
563
- $w3_mobile->delete_group($group);
564
-
565
- }
566
-
567
- /**
568
- * @param $group
569
- * @return mixed
570
- */
571
- function w3tc_get_user_agent_group($group) {
572
- /**
573
- * @var $w3_mobile W3_Mobile
574
- */
575
- $w3_mobile = w3_instance('W3_Mobile');
576
- return $w3_mobile->get_group_values($group);
577
- }
578
-
579
- /**
580
- * Use w3tc_get_themes() to get a list themenames to use with referrer groups
581
- * @param $group_name
582
- * @param string $theme the themename default is default theme. For childtheme it should be parentthemename/childthemename
583
- * @param string $redirect
584
- * @param array $referrers Remember to escape special characters like spaces, dots or dashes with a backslash. Regular expressions are also supported.
585
- * @param bool $enabled
586
- */
587
- function w3tc_save_referrer_group($group_name, $theme = 'default', $redirect = '', $referrers = array(), $enabled = false) {
588
- /**
589
- * @var $w3_referrer W3_Referrer
590
- */
591
- $w3_referrer = w3_instance('W3_Referrer');
592
- $w3_referrer->save_group($group_name, $theme, $redirect, $referrers, $enabled);
593
- }
594
-
595
- /**
596
- * @param $group
597
- */
598
- function w3tc_delete_referrer_group($group) {
599
- /**
600
- * @var $w3_referrer W3_Referrer
601
- */
602
- $w3_referrer = w3_instance('W3_Referrer');
603
- $w3_referrer->delete_group($group);
604
- }
605
-
606
- /**
607
- * @param $group
608
- * @return mixed
609
- */
610
- function w3tc_get_referrer_group($group) {
611
- /**
612
- * @var $w3_mobile W3_Referrer
613
- */
614
- $w3_referrer = w3_instance('W3_Referrer');
615
- return $w3_referrer->get_group_values($group);
616
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * W3 Total Cache plugins API
5
+ */
6
+
7
+ /**
8
+ * Add W3TC action callback
9
+ *
10
+ * @param string $key
11
+ * @param mixed $callback
12
+ * @return void
13
+ */
14
+ function w3tc_add_ob_callback($key, $callback) {
15
+ $GLOBALS['_w3tc_ob_callbacks'][$key] = $callback;
16
+ }
17
+
18
+ function w3tc_do_ob_callbacks($order, &$value) {
19
+ foreach ($order as $key) {
20
+ if (isset($GLOBALS['_w3tc_ob_callbacks'][$key])) {
21
+ $callback = $GLOBALS['_w3tc_ob_callbacks'][$key];
22
+ if (is_callable($callback)) {
23
+ $value = call_user_func($callback, $value);
24
+ }
25
+ }
26
+ }
27
+ return $value;
28
+ }
29
+
30
+ /**
31
+ * Add W3TC action callback
32
+ *
33
+ * @param string $action
34
+ * @param mixed $callback
35
+ * @param int $priority
36
+ * @return void
37
+ */
38
+ function w3tc_add_action($action, $callback, $priority = 10) {
39
+ $GLOBALS['_w3tc_actions'][$action][$priority][] = $callback;
40
+ ksort($GLOBALS['_w3tc_actions'][$action]);
41
+ }
42
+
43
+ /**
44
+ * Do W3TC action
45
+ *
46
+ * @param string $action
47
+ * @param mixed $value
48
+ * @return mixed
49
+ */
50
+ function w3tc_do_action($action, $value = null) {
51
+ if (isset($GLOBALS['_w3tc_actions'][$action])) {
52
+ foreach ((array) $GLOBALS['_w3tc_actions'][$action] as $callbacks) {
53
+ foreach ($callbacks as $callback) {
54
+ if (is_callable($callback)) {
55
+ $value = call_user_func($callback, $value);
56
+ }
57
+ }
58
+ }
59
+ }
60
+
61
+ return $value;
62
+ }
63
+
64
+ /**
65
+ * Do W3TC action
66
+ *
67
+ * @param string $action
68
+ * @param mixed $value
69
+ * @return mixed
70
+ */
71
+ function w3tc_do_action_by_ref($action, &$value = null) {
72
+ if (isset($GLOBALS['_w3tc_actions'][$action])) {
73
+ foreach ((array) $GLOBALS['_w3tc_actions'][$action] as $callbacks) {
74
+ foreach ($callbacks as $callback) {
75
+ if (is_callable($callback)) {
76
+ $value = call_user_func($callback, $value);
77
+ }
78
+ }
79
+ }
80
+ }
81
+
82
+ return $value;
83
+ }
84
+
85
+ /**
86
+ * Shortcut for page cache flush
87
+ *
88
+ * @return boolean
89
+ */
90
+ function w3tc_pgcache_flush() {
91
+ /**
92
+ * @var $w3_cacheflush W3_CacheFlush
93
+ */
94
+ $w3_cacheflush = w3_instance('W3_CacheFlush');
95
+ return $w3_cacheflush->pgcache_flush();
96
+ }
97
+
98
+ /**
99
+ * Shortcut for page post cache flush
100
+ *
101
+ * @param integer $post_id
102
+ * @return boolean
103
+ */
104
+ function w3tc_pgcache_flush_post($post_id) {
105
+ $w3_cacheflush = w3_instance('W3_CacheFlush');
106
+
107
+ return $w3_cacheflush->pgcache_flush_post($post_id);
108
+ }
109
+
110
+ /**
111
+ * Shortcut for url page cache flush
112
+ *
113
+ * @param string $url
114
+ * @return boolean
115
+ */
116
+ function w3tc_pgcache_flush_url($url) {
117
+ $w3_cacheflush = w3_instance('W3_CacheFlush');
118
+
119
+ return $w3_cacheflush->pgcache_flush_url($url);
120
+ }
121
+
122
+
123
+ /**
124
+ * Shortcut for refreshing the media query string.
125
+ */
126
+ function w3tc_browsercache_flush() {
127
+ $config = w3_instance('W3_Config');
128
+ if ($config->get_boolean('browsercache.enabled')) {
129
+ $config->set('browsercache.timestamp', time());
130
+ try {
131
+ $config->save();
132
+ } catch (Exception $ex) {}
133
+ }
134
+
135
+ }
136
+ /**
137
+ * Shortcut for database cache flush
138
+ *
139
+ */
140
+ function w3tc_dbcache_flush() {
141
+ /**
142
+ * @var $w3_cacheflush W3_CacheFlush
143
+ */
144
+ $w3_cacheflush = w3_instance('W3_CacheFlush');
145
+ $w3_cacheflush->dbcache_flush();
146
+ }
147
+
148
+ /**
149
+ * Shortcut for minify cache flush
150
+ *
151
+ */
152
+ function w3tc_minify_flush() {
153
+ /**
154
+ * @var $w3_cacheflush W3_CacheFlush
155
+ */
156
+ $w3_cacheflush = w3_instance('W3_CacheFlush');
157
+ $w3_cacheflush->minifycache_flush();
158
+
159
+ }
160
+
161
+ /**
162
+ * Shortcut for objectcache cache flush
163
+ *
164
+ */
165
+ function w3tc_objectcache_flush() {
166
+ /**
167
+ * @var $w3_cacheflush W3_CacheFlush
168
+ */
169
+ $w3_cacheflush = w3_instance('W3_CacheFlush');
170
+ $w3_cacheflush->objectcache_flush();
171
+ }
172
+
173
+ /**
174
+ * Shortcut for CDN cache post purge
175
+ * @param $post_id
176
+ * @return mixed
177
+ */
178
+ function w3tc_cdncache_purge_post($post_id) {
179
+ $w3_cacheflush = w3_instance('W3_CacheFlush');
180
+ return $w3_cacheflush->cdncache_purge_post($post_id);
181
+ }
182
+
183
+ /**
184
+ * Shortcut for CDN cache url purge
185
+ * @param string $url
186
+ * @return mixed
187
+ */
188
+ function w3tc_cdncache_purge_url($url) {
189
+ $w3_cacheflush = w3_instance('W3_CacheFlush');
190
+ return $w3_cacheflush->cdncache_purge_url($url);
191
+ }
192
+
193
+ /**
194
+ * Shortcut for CDN cache purge
195
+ * @return mixed
196
+ */
197
+ function w3tc_cdncache_purge() {
198
+ $w3_cacheflush = w3_instance('W3_CacheFlush');
199
+ return $w3_cacheflush->cdncache_purge();
200
+ }
201
+
202
+ /**
203
+ * Shortcut for CDN purge files
204
+ * @param array $files Array consisting of uri paths (i.e wp-content/uploads/image.pnp)
205
+ * @return mixed
206
+ */
207
+ function w3tc_cdn_purge_files($files) {
208
+ $w3_cacheflush = w3_instance('W3_CacheFlush');
209
+ return $w3_cacheflush->cdn_purge_files($files);
210
+ }
211
+
212
+ /**
213
+ * Prints script tag for scripts group
214
+ *
215
+ * @param string $location
216
+ * @retun void
217
+ */
218
+ function w3tc_minify_script_group($location) {
219
+ $w3_plugin_minify = w3_instance('W3_Plugin_Minify');
220
+ $w3_plugin_minify->printed_scripts[] = $location;
221
+
222
+ echo $w3_plugin_minify->get_script_group($location);
223
+ }
224
+
225
+ /**
226
+ * Prints style tag for styles group
227
+ *
228
+ * @param string $location
229
+ * @retun void
230
+ */
231
+ function w3tc_minify_style_group($location) {
232
+ $w3_plugin_minify = w3_instance('W3_Plugin_Minify');
233
+ $w3_plugin_minify->printed_styles[] = $location;
234
+
235
+ echo $w3_plugin_minify->get_style_group($location);
236
+ }
237
+
238
+ /**
239
+ * Prints script tag for custom scripts
240
+ *
241
+ * @param string|array $files
242
+ * @param boolean $blocking
243
+ * @return void
244
+ */
245
+ function w3tc_minify_script_custom($files, $blocking = true) {
246
+ $w3_plugin_minify = w3_instance('W3_Plugin_Minify');
247
+ echo $w3_plugin_minify->get_script_custom($files, $blocking);
248
+ }
249
+
250
+ /**
251
+ * Prints style tag for custom styles
252
+ *
253
+ * @param string|array $files
254
+ * @param boolean $import
255
+ * @return void
256
+ */
257
+ function w3tc_minify_style_custom($files, $import = false) {
258
+ $w3_plugin_minify = w3_instance('W3_Plugin_Minify');
259
+ echo $w3_plugin_minify->get_style_custom($files, $import);
260
+ }
261
+
262
+ /**
263
+ * @param string $fragment_group
264
+ * @param boolean $global If group is for whole network in MS install
265
+ * @return mixed
266
+ */
267
+ function w3tc_fragmentcache_flush_group($fragment_group, $global = false) {
268
+ $w3_fragmentcache = w3_instance('W3_CacheFlush');
269
+ return $w3_fragmentcache->fragmentcache_flush_group($fragment_group, $global);
270
+ }
271
+
272
+ /**
273
+ * Flush all fragment groups
274
+ * @return mixed
275
+ */
276
+ function w3tc_fragmentcache_flush() {
277
+ $w3_fragmentcache = w3_instance('W3_CacheFlush');
278
+ return $w3_fragmentcache->fragmentcache_flush();
279
+ }
280
+
281
+ /**
282
+ * Register a fragment group and connected actions for current blog
283
+ * @param string $group
284
+ * @param array $actions on which actions group should be flushed
285
+ * @param integer $expiration in seconds
286
+ * @return mixed
287
+ */
288
+ function w3tc_register_fragment_group($group, $actions, $expiration) {
289
+ if (!is_int($expiration)) {
290
+ $expiration = (int) $expiration;
291
+ trigger_error(__FUNCTION__ . ' needs expiration parameter to be an int.', E_USER_WARNING);
292
+ }
293
+ $w3_fragmentcache = w3_instance('W3_Pro_Plugin_FragmentCache');
294
+ return $w3_fragmentcache->register_group($group, $actions, $expiration);
295
+ }
296
+
297
+ /**
298
+ * Register a fragment group for whole network in MS install
299
+ * @param $group
300
+ * @param $actions
301
+ * @param integer $expiration in seconds
302
+ * @return mixed
303
+ */
304
+ function w3tc_register_fragment_global_group($group, $actions, $expiration) {
305
+ if (!is_int($expiration)) {
306
+ $expiration = (int) $expiration;
307
+ trigger_error(__FUNCTION__ . ' needs expiration parameter to be an int.', E_USER_WARNING);
308
+ }
309
+ $w3_fragmentcache = w3_instance('W3_Pro_Plugin_FragmentCache');
310
+ return $w3_fragmentcache->register_global_group($group, $actions,
311
+ $expiration);
312
+ }
313
+
314
+ /**
315
+ * Starts caching output
316
+ *
317
+ * @param string $id the fragment id
318
+ * @param string $group the fragment group name.
319
+ * @param string $hook name of the action/filter hook to disable on fragment found
320
+ * @return bool returns true if cached fragment is echoed
321
+ */
322
+ function w3tc_fragmentcache_start($id, $group = '', $hook = '') {
323
+ $fragment = w3tc_fragmentcache_get($id, $group);
324
+ if (false === $fragment) {
325
+ _w3tc_caching_fragment($id, $group);
326
+ ob_start();
327
+ } else {
328
+ echo $fragment;
329
+ if ($hook) {
330
+ global $wp_filter;
331
+ $wp_filter[$hook] = array();
332
+ }
333
+ return true;
334
+ }
335
+ return false;
336
+ }
337
+
338
+ /**
339
+ * Starts caching filter, returns if filter already cached.
340
+ *
341
+ * @param string $id the fragment id
342
+ * @param string $group the fragment group name.
343
+ * @param string $hook name of the action/filter hook to disable on fragment found
344
+ * @param mixed $data the data returned by the filter
345
+ * @return mixed
346
+ */
347
+ function w3tc_fragmentcache_filter_start($id, $group = '', $hook = '', $data) {
348
+ _w3tc_caching_fragment($id, $group);
349
+ $fragment = w3tc_fragmentcache_get($id, $group);
350
+ if (false !== $fragment) {
351
+ if ($hook) {
352
+ global $wp_filter;
353
+ $wp_filter[$hook] = array();
354
+ }
355
+ return $fragment;
356
+ }
357
+ return $data;
358
+ }
359
+
360
+ /**
361
+ * Ends the caching of output. Stores it and outputs the content
362
+ *
363
+ * @param string $id the fragment id
364
+ * @param string $group the fragment group
365
+ * @param bool $debug
366
+ */
367
+ function w3tc_fragmentcache_end($id, $group = '', $debug = false) {
368
+ if (w3tc_is_caching_fragment($id, $group)) {
369
+ $content = ob_get_contents();
370
+ if ($debug)
371
+ $content = sprintf("\r\n".'<!-- fragment start (%s%s)-->'."\r\n".'%s'."\r\n".'<!-- fragment end (%1$s%2$s) cached at %s by W3 Total Cache expires in %d seconds -->'."\r\n", $group, $id,$content, date_i18n('Y-m-d H:i:s'), 1000);
372
+ w3tc_fragmentcache_store($id, $group, $content);
373
+ ob_end_flush();
374
+ }
375
+ }
376
+
377
+
378
+ /**
379
+ * Ends the caching of filter. Stores it and returns the content
380
+ *
381
+ * @param string $id the fragment id
382
+ * @param string $group the fragment group
383
+ * @param mixed $data
384
+ * @return mixed
385
+ */
386
+ function w3tc_fragmentcache_filter_end($id, $group = '', $data) {
387
+ if (w3tc_is_caching_fragment($id, $group)) {
388
+ w3tc_fragmentcache_store($id, $group, $data);
389
+ }
390
+ return $data;
391
+ }
392
+
393
+ /**
394
+ * Stores an fragment
395
+ *
396
+ * @param $id
397
+ * @param string $group
398
+ * @param string $content
399
+ */
400
+ function w3tc_fragmentcache_store($id, $group = '', $content) {
401
+ set_transient("{$group}{$id}", $content,
402
+ 1000 /* default expiration in a case its not catched by fc plugin */);
403
+ }
404
+
405
+ /**
406
+ * @param $id
407
+ * @param string $group
408
+ * @return object
409
+ */
410
+ function w3tc_fragmentcache_get($id, $group = '') {
411
+ return get_transient("{$group}{$id}");
412
+ }
413
+
414
+ /**
415
+ * Flushes a fragment from the cache
416
+ * @param $id
417
+ * @param string $group
418
+ */
419
+ function w3tc_fragmentcache_flush_fragment($id, $group = '') {
420
+ delete_transient("{$group}{$id}");
421
+ }
422
+
423
+ /**
424
+ * Checks wether page fragment caching is being done for the item
425
+ * @param string $id fragment id
426
+ * @param string $group which group fragment belongs too
427
+ * @return bool
428
+ */
429
+ function w3tc_is_caching_fragment($id, $group = '') {
430
+ global $w3tc_caching_fragment;
431
+ return isset($w3tc_caching_fragment["{$group}{$id}"]) && $w3tc_caching_fragment["{$group}{$id}"];
432
+ }
433
+
434
+ /**
435
+ * Internal function, sets if page fragment by $id and $group is being cached
436
+ * @param string $id fragment id
437
+ * @param string $group which group fragment belongs too
438
+ */
439
+ function _w3tc_caching_fragment($id, $group = '') {
440
+ global $w3tc_caching_fragment;
441
+ $w3tc_caching_fragment["{$group}{$id}"] = true;
442
+ }
443
+
444
+ /**
445
+ * @param string $extension
446
+ * @param string $setting
447
+ * @param null $config
448
+ * @param string $default
449
+ * @return null|array|bool|string|int returns null if key not set or provided default value
450
+ */
451
+ function w3tc_get_extension_config($extension, $setting = '', $config = null, $default = '') {
452
+ /**
453
+ * @var W3_Config $config
454
+ */
455
+ if (is_null($config))
456
+ $config = w3_instance('W3_Config');
457
+ $val = null;
458
+ $extensions = $config->get_array('extensions.settings');
459
+ if ($setting && isset($extensions[$extension][$setting])) {
460
+ $val = $extensions[$extension][$setting];
461
+ } elseif(empty($setting)) {
462
+ return $extensions[$extension];
463
+ } elseif (!empty($setting)) {
464
+ return $default;
465
+ }
466
+ return $val;
467
+ }
468
+
469
+ /**
470
+ * Shortcut for varnish flush
471
+ *
472
+ * @return boolean
473
+ */
474
+ function w3tc_varnish_flush() {
475
+ $w3_pgcache = w3_instance('W3_CacheFlush');
476
+ return $w3_pgcache->varnish_flush();
477
+ }
478
+
479
+ /**
480
+ * Shortcut for post varnish flush
481
+ *
482
+ * @param integer $post_id
483
+ * @return boolean
484
+ */
485
+ function w3tc_varnish_flush_post($post_id) {
486
+ $w3_cacheflush = w3_instance('W3_CacheFlush');
487
+
488
+ return $w3_cacheflush->varnish_flush_post($post_id);
489
+ }
490
+
491
+ /**
492
+ * Shortcut for url varnish flush
493
+ *
494
+ * @param string $url
495
+ * @return boolean
496
+ */
497
+ function w3tc_varnish_flush_url($url) {
498
+ $w3_cacheflush = w3_instance('W3_CacheFlush');
499
+
500
+ return $w3_cacheflush->varnish_flush_url($url);
501
+ }
502
+
503
+ /**
504
+ * Shortcut for url varnish flush
505
+ */
506
+ function w3tc_flush_all() {
507
+ /**
508
+ * @var $w3_cacheflush W3_CacheFlush
509
+ */
510
+ $w3_cacheflush = w3_instance('W3_CacheFlush');
511
+
512
+ $w3_cacheflush->flush_all();
513
+ }
514
+
515
+ /**
516
+ * Deletes files.
517
+ *
518
+ * @param string $mask regular expression matching files to be deleted
519
+ * @param bool $http if delete request should be made over http to current site. Default false.
520
+ * @return mixed
521
+ */
522
+ function w3tc_apc_delete_files_based_on_regex($mask, $http = false) {
523
+ if (!$http) {
524
+ $w3_cacheflush = w3_instance('W3_CacheFlush');
525
+
526
+ return $w3_cacheflush->apc_delete_files_based_on_regex($mask);
527
+ } else {
528
+ $url = WP_PLUGIN_URL . '/' . dirname(W3TC_FILE) . '/pub/apc.php';
529
+ $path = parse_url($url, PHP_URL_PATH);
530
+ $post = array(
531
+ 'method' => 'POST',
532
+ 'timeout' => 45,
533
+ 'redirection' => 5,
534
+ 'httpversion' => '1.0',
535
+ 'blocking' => true,
536
+ 'body' => array( 'nonce' => wp_hash($path), 'command' => 'delete_files', 'regex' => $mask),
537
+ );
538
+ $result = wp_remote_post($url, $post);
539
+ if (is_wp_error($result)) {
540
+ return $result;
541
+ } elseif ($result['response']['code'] != '200') {
542
+ return $result['response']['code'];
543
+ }
544
+
545
+ return true;
546
+ }
547
+ }
548
+
549
+ /**
550
+ * Reloads files.
551
+ * @param string[] $files list of files supports, fullpath, from root, wp-content
552
+ * @param bool $http if delete request should be made over http to current site. Default false.
553
+ * @return mixed
554
+ */
555
+ function w3tc_apc_reload_files($files, $http = false) {
556
+
557
+ if (!$http) {
558
+ $w3_cacheflush = w3_instance('W3_CacheFlush');
559
+
560
+ return $w3_cacheflush->apc_reload_files($files);
561
+ } else {
562
+ $url = WP_PLUGIN_URL . '/' . dirname(W3TC_FILE) . '/pub/apc.php';
563
+ $path = parse_url($url, PHP_URL_PATH);
564
+
565
+ $post = array(
566
+ 'method' => 'POST',
567
+ 'timeout' => 45,
568
+ 'redirection' => 5,
569
+ 'httpversion' => '1.0',
570
+ 'blocking' => true,
571
+ 'body' => array( 'nonce' => wp_hash($path), 'command' => 'reload_files', 'files' => $files),
572
+ );
573
+ $result = wp_remote_post($url, $post);
574
+ if (is_wp_error($result)) {
575
+ return $result;
576
+ } elseif ($result['response']['code'] != '200') {
577
+ return $result['response']['code'];
578
+ }
579
+
580
+ return true;
581
+ }
582
+ }
583
+
584
+ /**
585
+ * Use w3tc_get_themes() to get a list themenames to use with user agent groups
586
+ * @param $group_name
587
+ * @param string $theme the themename default is default theme. For childtheme it should be parentthemename/childthemename
588
+ * @param string $redirect
589
+ * @param array $agents Remember to escape special characters like spaces, dots or dashes with a backslash. Regular expressions are also supported.
590
+ * @param bool $enabled
591
+ */
592
+ function w3tc_save_user_agent_group($group_name, $theme = 'default', $redirect = '', $agents = array(), $enabled = false) {
593
+ /**
594
+ * @var $w3_mobile W3_Mobile
595
+ */
596
+ $w3_mobile = w3_instance('W3_Mobile');
597
+ $w3_mobile->save_group($group_name, $theme, $redirect, $agents, $enabled);
598
+ }
599
+
600
+ /**
601
+ * @param $group
602
+ */
603
+ function w3tc_delete_user_agent_group($group) {
604
+ /**
605
+ * @var $w3_mobile W3_Mobile
606
+ */
607
+ $w3_mobile = w3_instance('W3_Mobile');
608
+ $w3_mobile->delete_group($group);
609
+
610
+ }
611
+
612
+ /**
613
+ * @param $group
614
+ * @return mixed
615
+ */
616
+ function w3tc_get_user_agent_group($group) {
617
+ /**
618
+ * @var $w3_mobile W3_Mobile
619
+ */
620
+ $w3_mobile = w3_instance('W3_Mobile');
621
+ return $w3_mobile->get_group_values($group);
622
+ }
623
+
624
+ /**
625
+ * Use w3tc_get_themes() to get a list themenames to use with referrer groups
626
+ * @param $group_name
627
+ * @param string $theme the themename default is default theme. For childtheme it should be parentthemename/childthemename
628
+ * @param string $redirect
629
+ * @param array $referrers Remember to escape special characters like spaces, dots or dashes with a backslash. Regular expressions are also supported.
630
+ * @param bool $enabled
631
+ */
632
+ function w3tc_save_referrer_group($group_name, $theme = 'default', $redirect = '', $referrers = array(), $enabled = false) {
633
+ /**
634
+ * @var $w3_referrer W3_Referrer
635
+ */
636
+ $w3_referrer = w3_instance('W3_Referrer');
637
+ $w3_referrer->save_group($group_name, $theme, $redirect, $referrers, $enabled);
638
+ }
639
+
640
+ /**
641
+ * @param $group
642
+ */
643
+ function w3tc_delete_referrer_group($group) {
644
+ /**
645
+ * @var $w3_referrer W3_Referrer
646
+ */
647
+ $w3_referrer = w3_instance('W3_Referrer');
648
+ $w3_referrer->delete_group($group);
649
+ }
650
+
651
+ /**
652
+ * @param $group
653
+ * @return mixed
654
+ */
655
+ function w3tc_get_referrer_group($group) {
656
+ /**
657
+ * @var $w3_mobile W3_Referrer
658
+ */
659
+ $w3_referrer = w3_instance('W3_Referrer');
660
+ return $w3_referrer->get_group_values($group);
661
+ }
inc/functions/rule.php CHANGED
@@ -1,388 +1,386 @@
1
- <?php
2
-
3
- w3_require_once(W3TC_INC_DIR . '/functions/rule_cut.php');
4
-
5
- define('W3TC_MARKER_BEGIN_WORDPRESS', '# BEGIN WordPress');
6
- define('W3TC_MARKER_BEGIN_PGCACHE_CORE', '# BEGIN W3TC Page Cache core');
7
- define('W3TC_MARKER_BEGIN_PGCACHE_CACHE', '# BEGIN W3TC Page Cache cache');
8
- define('W3TC_MARKER_BEGIN_PGCACHE_LEGACY', '# BEGIN W3TC Page Cache');
9
- define('W3TC_MARKER_BEGIN_PGCACHE_WPSC', '# BEGIN WPSuperCache');
10
- define('W3TC_MARKER_BEGIN_BROWSERCACHE_CACHE', '# BEGIN W3TC Browser Cache');
11
- define('W3TC_MARKER_BEGIN_BROWSERCACHE_NO404WP', '# BEGIN W3TC Skip 404 error handling by WordPress for static files');
12
- define('W3TC_MARKER_BEGIN_MINIFY_CORE', '# BEGIN W3TC Minify core');
13
- define('W3TC_MARKER_BEGIN_MINIFY_CACHE', '# BEGIN W3TC Minify cache');
14
- define('W3TC_MARKER_BEGIN_MINIFY_LEGACY', '# BEGIN W3TC Minify');
15
- define('W3TC_MARKER_BEGIN_CDN', '# BEGIN W3TC CDN');
16
- define('W3TC_MARKER_BEGIN_CLOUDFLARE', '# BEGIN W3TC CloudFlare');
17
- define('W3TC_MARKER_BEGIN_NEW_RELIC_CORE', '# BEGIN W3TC New Relic core');
18
-
19
-
20
- define('W3TC_MARKER_END_WORDPRESS', '# END WordPress');
21
- define('W3TC_MARKER_END_PGCACHE_CORE', '# END W3TC Page Cache core');
22
- define('W3TC_MARKER_END_PGCACHE_CACHE', '# END W3TC Page Cache cache');
23
- define('W3TC_MARKER_END_PGCACHE_LEGACY', '# END W3TC Page Cache');
24
- define('W3TC_MARKER_END_PGCACHE_WPSC', '# END WPSuperCache');
25
- define('W3TC_MARKER_END_BROWSERCACHE_CACHE', '# END W3TC Browser Cache');
26
- define('W3TC_MARKER_END_BROWSERCACHE_NO404WP', '# END W3TC Skip 404 error handling by WordPress for static files');
27
- define('W3TC_MARKER_END_MINIFY_CORE', '# END W3TC Minify core');
28
- define('W3TC_MARKER_END_MINIFY_CACHE', '# END W3TC Minify cache');
29
- define('W3TC_MARKER_END_MINIFY_LEGACY', '# END W3TC Minify');
30
- define('W3TC_MARKER_END_CDN', '# END W3TC CDN');
31
- define('W3TC_MARKER_END_CLOUDFLARE', '# END W3TC CloudFlare');
32
- define('W3TC_MARKER_END_NEW_RELIC_CORE', '# END W3TC New Relic core');
33
-
34
-
35
- /*
36
- * Returns URI from filename/dirname
37
- * Used for rules mainly since is not usable for regular URI,
38
- * because wordpress adds blogname to uri making it uncompatible with
39
- * directory structure
40
- *
41
- * @return string
42
- */
43
- function w3_filename_to_uri($filename) {
44
- $document_root = w3_get_document_root();
45
-
46
- return substr($filename, strlen($document_root));
47
- }
48
-
49
- /**
50
- * Check if WP permalink directives exists
51
- *
52
- * @return boolean
53
- */
54
- function w3_is_permalink_rules() {
55
- if ((w3_is_apache() || w3_is_litespeed()) && !w3_is_network()) {
56
- $path = w3_get_home_root() . '/.htaccess';
57
-
58
- return (($data = @file_get_contents($path)) && strstr($data, W3TC_MARKER_BEGIN_WORDPRESS) !== false);
59
- }
60
-
61
- return true;
62
- }
63
-
64
- /**
65
- * Removes empty elements
66
- */
67
- function w3_array_trim(&$a) {
68
- for ($n = count($a) - 1; $n >= 0; $n--) {
69
- if (empty($a[$n]))
70
- array_splice($a, $n, 1);
71
- }
72
- }
73
-
74
- /**
75
- * Returns nginx rules path
76
- *
77
- * @return string
78
- */
79
- function w3_get_nginx_rules_path() {
80
- $config = w3_instance('W3_Config');
81
-
82
- $path = $config->get_string('config.path');
83
-
84
- if (!$path) {
85
- $path = w3_get_document_root() . '/nginx.conf';
86
- }
87
-
88
- return $path;
89
- }
90
-
91
- /**
92
- * Returns path of pagecache core rules file
93
- *
94
- * @return string
95
- */
96
- function w3_get_pgcache_rules_core_path() {
97
- switch (true) {
98
- case w3_is_apache():
99
- case w3_is_litespeed():
100
- return w3_get_home_root() . '/.htaccess';
101
-
102
- case w3_is_nginx():
103
- return w3_get_nginx_rules_path();
104
- }
105
-
106
- return false;
107
- }
108
-
109
- /**
110
- * Returns path of browsercache cache rules file
111
- *
112
- * @return string
113
- */
114
- function w3_get_browsercache_rules_cache_path() {
115
- switch (true) {
116
- case w3_is_apache():
117
- case w3_is_litespeed():
118
- return w3_get_home_root() . '/.htaccess';
119
-
120
- case w3_is_nginx():
121
- return w3_get_nginx_rules_path();
122
- }
123
-
124
- return false;
125
- }
126
-
127
- /**
128
- * Returns path of browsercache no404wp rules file
129
- *
130
- * @return string
131
- */
132
- function w3_get_browsercache_rules_no404wp_path() {
133
- switch (true) {
134
- case w3_is_apache():
135
- case w3_is_litespeed():
136
- return w3_get_home_root() . '/.htaccess';
137
-
138
- case w3_is_nginx():
139
- return w3_get_nginx_rules_path();
140
- }
141
-
142
- return false;
143
- }
144
-
145
- /**
146
- * Returns path of minify rules file
147
- *
148
- * @return string
149
- */
150
- function w3_get_minify_rules_core_path() {
151
- switch (true) {
152
- case w3_is_apache():
153
- case w3_is_litespeed():
154
- return W3TC_CACHE_MINIFY_DIR . '/.htaccess';
155
-
156
- case w3_is_nginx():
157
- return w3_get_nginx_rules_path();
158
- }
159
-
160
- return false;
161
- }
162
-
163
- /**
164
- * Returns path of minify rules file
165
- *
166
- * @return string
167
- */
168
- function w3_get_minify_rules_cache_path() {
169
- switch (true) {
170
- case w3_is_apache():
171
- case w3_is_litespeed():
172
- return W3TC_CACHE_MINIFY_DIR . '/.htaccess';
173
-
174
- case w3_is_nginx():
175
- return w3_get_nginx_rules_path();
176
- }
177
-
178
- return false;
179
- }
180
-
181
- /**
182
- * Returns path of CDN rules file
183
- *
184
- * @return string
185
- */
186
- function w3_get_cdn_rules_path() {
187
- switch (true) {
188
- case w3_is_apache():
189
- case w3_is_litespeed():
190
- return '.htaccess';
191
-
192
- case w3_is_nginx():
193
- return 'nginx.conf';
194
- }
195
-
196
- return false;
197
- }
198
-
199
- function w3_get_new_relic_rules_core_path() {
200
- return w3_get_pgcache_rules_core_path();
201
- }
202
-
203
- /**
204
- * Returns true if we can modify rules
205
- *
206
- * @param string $path
207
- * @return boolean
208
- */
209
- function w3_can_modify_rules($path) {
210
- if (w3_is_network()) {
211
- if (w3_is_apache() || w3_is_litespeed() || w3_is_nginx()) {
212
- switch ($path) {
213
- case w3_get_pgcache_rules_cache_path():
214
- case w3_get_minify_rules_core_path():
215
- case w3_get_minify_rules_cache_path():
216
- return true;
217
- }
218
- }
219
-
220
- return false;
221
- }
222
-
223
- return true;
224
- }
225
-
226
- /**
227
- * Trim rules
228
- *
229
- * @param string $rules
230
- * @return string
231
- */
232
- function w3_trim_rules($rules) {
233
- $rules = trim($rules);
234
-
235
- if ($rules != '') {
236
- $rules .= "\n";
237
- }
238
-
239
- return $rules;
240
- }
241
-
242
- /**
243
- * Cleanup rewrite rules
244
- *
245
- * @param string $rules
246
- * @return string
247
- */
248
- function w3_clean_rules($rules) {
249
- $rules = preg_replace('~[\r\n]+~', "\n", $rules);
250
- $rules = preg_replace('~^\s+~m', '', $rules);
251
- $rules = w3_trim_rules($rules);
252
-
253
- return $rules;
254
- }
255
-
256
- /**
257
- * Erases text from start to end
258
- *
259
- * @param string $rules
260
- * @param string $start
261
- * @param string $end
262
- * @return string
263
- */
264
- function w3_erase_rules($rules, $start, $end) {
265
- $rules = preg_replace('~' . w3_preg_quote($start) . "\n.*?" . w3_preg_quote($end) . "\n*~s", '', $rules);
266
- $rules = w3_trim_rules($rules);
267
-
268
- return $rules;
269
- }
270
-
271
- /**
272
- * Check if rules exist
273
- *
274
- * @param string $rules
275
- * @param string $start
276
- * @param string $end
277
- * @return int
278
- */
279
- function w3_has_rules($rules, $start, $end) {
280
- return preg_match('~' . w3_preg_quote($start) . "\n.*?" . w3_preg_quote($end) . "\n*~s", $rules);
281
- }
282
-
283
- /**
284
- * @param SelfTestExceptions $exs
285
- * @param string $path
286
- * @param string $rules
287
- * @param string $start
288
- * @param string $end
289
- * @param array $order
290
- */
291
- function w3_add_rules($exs, $path, $rules, $start, $end, $order) {
292
- $data = @file_get_contents($path);
293
-
294
- if($data === false)
295
- $data = '';
296
-
297
- $rules_missing = !empty($rules) && (strstr(w3_clean_rules($data), w3_clean_rules($rules)) === false);
298
- if (!$rules_missing)
299
- return;
300
-
301
- $replace_start = strpos($data, $start);
302
- $replace_end = strpos($data, $end);
303
-
304
- if ($replace_start !== false && $replace_end !== false && $replace_start < $replace_end) {
305
- $replace_length = $replace_end - $replace_start + strlen($end) + 1;
306
- } else {
307
- $replace_start = false;
308
- $replace_length = 0;
309
-
310
- $search = $order;
311
-
312
- foreach ($search as $string => $length) {
313
- $replace_start = strpos($data, $string);
314
-
315
- if ($replace_start !== false) {
316
- $replace_start += $length;
317
- break;
318
- }
319
- }
320
- }
321
-
322
- if ($replace_start !== false) {
323
- $data = w3_trim_rules(substr_replace($data, $rules, $replace_start, $replace_length));
324
- } else {
325
- $data = w3_trim_rules($data . $rules);
326
- }
327
-
328
- if (strpos($path, W3TC_CACHE_DIR) === false || w3_is_nginx()) {
329
- try {
330
- w3_wp_write_to_file($path, $data);
331
- } catch (FilesystemOperationException $ex) {
332
- if ($replace_start !== false)
333
- $exs->push(new FilesystemModifyException(
334
- $ex->getMessage(), $ex->credentials_form(),
335
- sprintf(__('Edit file <strong>%s
336
- </strong> and replace all lines between and including <strong>%s</strong> and
337
- <strong>%s</strong> markers with:', 'w3-total-caceh'),$path, $start,$end), $path, $rules));
338
- else
339
- $exs->push(new FilesystemModifyException(
340
- $ex->getMessage(), $ex->credentials_form(),
341
- sprintf(__('Edit file <strong>%s</strong> and add the following rules
342
- above the WordPress directives:', 'w3-total-cache'),
343
- $path), $path, $rules));
344
- }
345
- } else {
346
- if (!@file_exists(dirname($path))) {
347
- w3_mkdir_from(dirname($path), W3TC_CACHE_DIR);
348
- }
349
-
350
- if (!@file_put_contents($path, $data)) {
351
- try {
352
- w3_wp_delete_folder(dirname($path), '',
353
- $_SERVER['REQUEST_URI']);
354
- } catch (FilesystemOperationException $ex) {
355
- $exs->push($ex);
356
- }
357
- }
358
- }
359
- }
360
-
361
- /**
362
- * @param SelfTestExceptions $exs
363
- * @param string $path
364
- * @param string $start
365
- * @param string $end
366
- */
367
- function w3_remove_rules($exs, $path, $start, $end) {
368
- if (!file_exists($path))
369
- return;
370
-
371
- $data = @file_get_contents($path);
372
- if ($data === false)
373
- return;
374
- if (strstr($data, $start) === false)
375
- return;
376
-
377
- $data = w3_erase_rules($data, $start,
378
- $end);
379
-
380
- try {
381
- w3_wp_write_to_file($path, $data);
382
- } catch (FilesystemOperationException $ex) {
383
- $exs->push(new FilesystemModifyException(
384
- $ex->getMessage(), $ex->credentials_form(),
385
- sprintf(__('Edit file <strong>%s</strong> and remove all lines between and including <strong>%s</strong>
386
- and <strong>%s</strong> markers.', 'w3-total-cache'), $path, $start, $end), $path));
387
- }
388
- }
1
+ <?php
2
+
3
+ w3_require_once(W3TC_INC_DIR . '/functions/rule_cut.php');
4
+
5
+ define('W3TC_MARKER_BEGIN_WORDPRESS', '# BEGIN WordPress');
6
+ define('W3TC_MARKER_BEGIN_PGCACHE_CORE', '# BEGIN W3TC Page Cache core');
7
+ define('W3TC_MARKER_BEGIN_PGCACHE_CACHE', '# BEGIN W3TC Page Cache cache');
8
+ define('W3TC_MARKER_BEGIN_PGCACHE_LEGACY', '# BEGIN W3TC Page Cache');
9
+ define('W3TC_MARKER_BEGIN_PGCACHE_WPSC', '# BEGIN WPSuperCache');
10
+ define('W3TC_MARKER_BEGIN_BROWSERCACHE_CACHE', '# BEGIN W3TC Browser Cache');
11
+ define('W3TC_MARKER_BEGIN_BROWSERCACHE_NO404WP', '# BEGIN W3TC Skip 404 error handling by WordPress for static files');
12
+ define('W3TC_MARKER_BEGIN_MINIFY_CORE', '# BEGIN W3TC Minify core');
13
+ define('W3TC_MARKER_BEGIN_MINIFY_CACHE', '# BEGIN W3TC Minify cache');
14
+ define('W3TC_MARKER_BEGIN_MINIFY_LEGACY', '# BEGIN W3TC Minify');
15
+ define('W3TC_MARKER_BEGIN_CDN', '# BEGIN W3TC CDN');
16
+ define('W3TC_MARKER_BEGIN_NEW_RELIC_CORE', '# BEGIN W3TC New Relic core');
17
+
18
+
19
+ define('W3TC_MARKER_END_WORDPRESS', '# END WordPress');
20
+ define('W3TC_MARKER_END_PGCACHE_CORE', '# END W3TC Page Cache core');
21
+ define('W3TC_MARKER_END_PGCACHE_CACHE', '# END W3TC Page Cache cache');
22
+ define('W3TC_MARKER_END_PGCACHE_LEGACY', '# END W3TC Page Cache');
23
+ define('W3TC_MARKER_END_PGCACHE_WPSC', '# END WPSuperCache');
24
+ define('W3TC_MARKER_END_BROWSERCACHE_CACHE', '# END W3TC Browser Cache');
25
+ define('W3TC_MARKER_END_BROWSERCACHE_NO404WP', '# END W3TC Skip 404 error handling by WordPress for static files');
26
+ define('W3TC_MARKER_END_MINIFY_CORE', '# END W3TC Minify core');
27
+ define('W3TC_MARKER_END_MINIFY_CACHE', '# END W3TC Minify cache');
28
+ define('W3TC_MARKER_END_MINIFY_LEGACY', '# END W3TC Minify');
29
+ define('W3TC_MARKER_END_CDN', '# END W3TC CDN');
30
+ define('W3TC_MARKER_END_NEW_RELIC_CORE', '# END W3TC New Relic core');
31
+
32
+
33
+ /*
34
+ * Returns URI from filename/dirname
35
+ * Used for rules mainly since is not usable for regular URI,
36
+ * because wordpress adds blogname to uri making it uncompatible with
37
+ * directory structure
38
+ *
39
+ * @return string
40
+ */
41
+ function w3_filename_to_uri($filename) {
42
+ $document_root = w3_get_document_root();
43
+
44
+ return substr($filename, strlen($document_root));
45
+ }
46
+
47
+ /**
48
+ * Check if WP permalink directives exists
49
+ *
50
+ * @return boolean
51
+ */
52
+ function w3_is_permalink_rules() {
53
+ if ((w3_is_apache() || w3_is_litespeed()) && !w3_is_network()) {
54
+ $path = w3_get_home_root() . '/.htaccess';
55
+
56
+ return (($data = @file_get_contents($path)) && strstr($data, W3TC_MARKER_BEGIN_WORDPRESS) !== false);
57
+ }
58
+
59
+ return true;
60
+ }
61
+
62
+ /**
63
+ * Removes empty elements
64
+ */
65
+ function w3_array_trim(&$a) {
66
+ for ($n = count($a) - 1; $n >= 0; $n--) {
67
+ if (empty($a[$n]))
68
+ array_splice($a, $n, 1);
69
+ }
70
+ }
71
+
72
+ /**
73
+ * Returns nginx rules path
74
+ *
75
+ * @return string
76
+ */
77
+ function w3_get_nginx_rules_path() {
78
+ $config = w3_instance('W3_Config');
79
+
80
+ $path = $config->get_string('config.path');
81
+
82
+ if (!$path) {
83
+ $path = w3_get_document_root() . '/nginx.conf';
84
+ }
85
+
86
+ return $path;
87
+ }
88
+
89
+ /**
90
+ * Returns path of pagecache core rules file
91
+ *
92
+ * @return string
93
+ */
94
+ function w3_get_pgcache_rules_core_path() {
95
+ switch (true) {
96
+ case w3_is_apache():
97
+ case w3_is_litespeed():
98
+ return w3_get_home_root() . '/.htaccess';
99
+
100
+ case w3_is_nginx():
101
+ return w3_get_nginx_rules_path();
102
+ }
103
+
104
+ return false;
105
+ }
106
+
107
+ /**
108
+ * Returns path of browsercache cache rules file
109
+ *
110
+ * @return string
111
+ */
112
+ function w3_get_browsercache_rules_cache_path() {
113
+ switch (true) {
114
+ case w3_is_apache():
115
+ case w3_is_litespeed():
116
+ return w3_get_home_root() . '/.htaccess';
117
+
118
+ case w3_is_nginx():
119
+ return w3_get_nginx_rules_path();
120
+ }
121
+
122
+ return false;
123
+ }
124
+
125
+ /**
126
+ * Returns path of browsercache no404wp rules file
127
+ *
128
+ * @return string
129
+ */
130
+ function w3_get_browsercache_rules_no404wp_path() {
131
+ switch (true) {
132
+ case w3_is_apache():
133
+ case w3_is_litespeed():
134
+ return w3_get_home_root() . '/.htaccess';
135
+
136
+ case w3_is_nginx():
137
+ return w3_get_nginx_rules_path();
138
+ }
139
+
140
+ return false;
141
+ }
142
+
143
+ /**
144
+ * Returns path of minify rules file
145
+ *
146
+ * @return string
147
+ */
148
+ function w3_get_minify_rules_core_path() {
149
+ switch (true) {
150
+ case w3_is_apache():
151
+ case w3_is_litespeed():
152
+ return W3TC_CACHE_MINIFY_DIR . '/.htaccess';
153
+
154
+ case w3_is_nginx():
155
+ return w3_get_nginx_rules_path();
156
+ }
157
+
158
+ return false;
159
+ }
160
+
161
+ /**
162
+ * Returns path of minify rules file
163
+ *
164
+ * @return string
165
+ */
166
+ function w3_get_minify_rules_cache_path() {
167
+ switch (true) {
168
+ case w3_is_apache():
169
+ case w3_is_litespeed():
170
+ return W3TC_CACHE_MINIFY_DIR . '/.htaccess';
171
+
172
+ case w3_is_nginx():
173
+ return w3_get_nginx_rules_path();
174
+ }
175
+
176
+ return false;
177
+ }
178
+
179
+ /**
180
+ * Returns path of CDN rules file
181
+ *
182
+ * @return string
183
+ */
184
+ function w3_get_cdn_rules_path() {
185
+ switch (true) {
186
+ case w3_is_apache():
187
+ case w3_is_litespeed():
188
+ return '.htaccess';
189
+
190
+ case w3_is_nginx():
191
+ return 'nginx.conf';
192
+ }
193
+
194
+ return false;
195
+ }
196
+
197
+ function w3_get_new_relic_rules_core_path() {
198
+ return w3_get_pgcache_rules_core_path();
199
+ }
200
+
201
+ /**
202
+ * Returns true if we can modify rules
203
+ *
204
+ * @param string $path
205
+ * @return boolean
206
+ */
207
+ function w3_can_modify_rules($path) {
208
+ if (w3_is_network()) {
209
+ if (w3_is_apache() || w3_is_litespeed() || w3_is_nginx()) {
210
+ switch ($path) {
211
+ case w3_get_pgcache_rules_cache_path():
212
+ case w3_get_minify_rules_core_path():
213
+ case w3_get_minify_rules_cache_path():
214
+ return true;
215
+ }
216
+ }
217
+
218
+ return false;
219
+ }
220
+
221
+ return true;
222
+ }
223
+
224
+ /**
225
+ * Trim rules
226
+ *
227
+ * @param string $rules
228
+ * @return string
229
+ */
230
+ function w3_trim_rules($rules) {
231
+ $rules = trim($rules);
232
+
233
+ if ($rules != '') {
234
+ $rules .= "\n";
235
+ }
236
+
237
+ return $rules;
238
+ }
239
+
240
+ /**
241
+ * Cleanup rewrite rules
242
+ *
243
+ * @param string $rules
244
+ * @return string
245
+ */
246
+ function w3_clean_rules($rules) {
247
+ $rules = preg_replace('~[\r\n]+~', "\n", $rules);
248
+ $rules = preg_replace('~^\s+~m', '', $rules);
249
+ $rules = w3_trim_rules($rules);
250
+
251
+ return $rules;
252
+ }
253
+
254
+ /**
255
+ * Erases text from start to end
256
+ *
257
+ * @param string $rules
258
+ * @param string $start
259
+ * @param string $end
260
+ * @return string
261
+ */
262
+ function w3_erase_rules($rules, $start, $end) {
263
+ $rules = preg_replace('~' . w3_preg_quote($start) . "\n.*?" . w3_preg_quote($end) . "\n*~s", '', $rules);
264
+ $rules = w3_trim_rules($rules);
265
+
266
+ return $rules;
267
+ }
268
+
269
+ /**
270
+ * Check if rules exist
271
+ *
272
+ * @param string $rules
273
+ * @param string $start
274
+ * @param string $end
275
+ * @return int
276
+ */
277
+ function w3_has_rules($rules, $start, $end) {
278
+ return preg_match('~' . w3_preg_quote($start) . "\n.*?" . w3_preg_quote($end) . "\n*~s", $rules);
279
+ }
280
+
281
+ /**
282
+ * @param SelfTestExceptions $exs
283
+ * @param string $path
284
+ * @param string $rules
285
+ * @param string $start
286
+ * @param string $end
287
+ * @param array $order
288
+ */
289
+ function w3_add_rules($exs, $path, $rules, $start, $end, $order) {
290
+ $data = @file_get_contents($path);
291
+
292
+ if($data === false)
293
+ $data = '';
294
+
295
+ $rules_missing = !empty($rules) && (strstr(w3_clean_rules($data), w3_clean_rules($rules)) === false);
296
+ if (!$rules_missing)
297
+ return;
298
+
299
+ $replace_start = strpos($data, $start);
300
+ $replace_end = strpos($data, $end);
301
+
302
+ if ($replace_start !== false && $replace_end !== false && $replace_start < $replace_end) {
303
+ $replace_length = $replace_end - $replace_start + strlen($end) + 1;
304
+ } else {
305
+ $replace_start = false;
306
+ $replace_length = 0;
307
+
308
+ $search = $order;
309
+
310
+ foreach ($search as $string => $length) {
311
+ $replace_start = strpos($data, $string);
312
+
313
+ if ($replace_start !== false) {
314
+ $replace_start += $length;
315
+ break;
316
+ }
317
+ }
318
+ }
319
+
320
+ if ($replace_start !== false) {
321
+ $data = w3_trim_rules(substr_replace($data, $rules, $replace_start, $replace_length));
322
+ } else {
323
+ $data = w3_trim_rules($data . $rules);
324
+ }
325
+
326
+ if (strpos($path, W3TC_CACHE_DIR) === false || w3_is_nginx()) {
327
+ try {
328
+ w3_wp_write_to_file($path, $data);
329
+ } catch (FilesystemOperationException $ex) {
330
+ if ($replace_start !== false)
331
+ $exs->push(new FilesystemModifyException(
332
+ $ex->getMessage(), $ex->credentials_form(),
333
+ sprintf(__('Edit file <strong>%s
334
+ </strong> and replace all lines between and including <strong>%s</strong> and
335
+ <strong>%s</strong> markers with:', 'w3-total-caceh'),$path, $start,$end), $path, $rules));
336
+ else
337
+ $exs->push(new FilesystemModifyException(
338
+ $ex->getMessage(), $ex->credentials_form(),
339
+ sprintf(__('Edit file <strong>%s</strong> and add the following rules
340
+ above the WordPress directives:', 'w3-total-cache'),
341
+ $path), $path, $rules));
342
+ }
343
+ } else {
344
+ if (!@file_exists(dirname($path))) {
345
+ w3_mkdir_from(dirname($path), W3TC_CACHE_DIR);
346
+ }
347
+
348
+ if (!@file_put_contents($path, $data)) {
349
+ try {
350
+ w3_wp_delete_folder(dirname($path), '',
351
+ $_SERVER['REQUEST_URI']);
352
+ } catch (FilesystemOperationException $ex) {
353
+ $exs->push($ex);
354
+ }
355
+ }
356
+ }
357
+ }
358
+
359
+ /**
360
+ * @param SelfTestExceptions $exs
361
+ * @param string $path
362
+ * @param string $start
363
+ * @param string $end
364
+ */
365
+ function w3_remove_rules($exs, $path, $start, $end) {
366
+ if (!file_exists($path))
367
+ return;
368
+
369
+ $data = @file_get_contents($path);
370
+ if ($data === false)
371
+ return;
372
+ if (strstr($data, $start) === false)
373
+ return;
374
+
375
+ $data = w3_erase_rules($data, $start,
376
+ $end);
377
+
378
+ try {
379
+ w3_wp_write_to_file($path, $data);
380
+ } catch (FilesystemOperationException $ex) {
381
+ $exs->push(new FilesystemModifyException(
382
+ $ex->getMessage(), $ex->credentials_form(),
383
+ sprintf(__('Edit file <strong>%s</strong> and remove all lines between and including <strong>%s</strong>
384
+ and <strong>%s</strong> markers.', 'w3-total-cache'), $path, $start, $end), $path));
385
+ }
386
+ }
 
 
inc/functions/ui.php CHANGED
@@ -1,35 +1,47 @@
1
  <?php
2
  /**
3
  * Returns an notification box
4
- * @param $message
 
5
  * @return string
6
  */
7
- function w3_get_notification_box($message) {
8
- return sprintf('<div class="updated fade">%s</div>', $message);
 
 
 
 
9
  }
10
 
11
  /**
12
  * Echos an notification box
13
- * @param $message
 
14
  */
15
- function w3_e_notification_box($message) {
16
- echo w3_get_notification_box($message);
17
  }
18
 
19
  /**
20
  * Returns an error box
21
  * @param $message
 
22
  * @return string
23
  */
24
- function w3_get_error_box($message) {
25
- return sprintf('<div class="error">%s</div>', $message);
 
 
 
 
26
  }
27
 
28
  /**
29
  * Echos an error box
30
  * @param $message
 
31
  */
32
- function w3_e_error_box($message) {
33
  echo w3_get_error_box($message);
34
  }
35
 
@@ -60,9 +72,24 @@ function w3_format_bytes($bytes, $precision = 2) {
60
  * @param string $name
61
  * @param string $value
62
  * @param bool $disabled
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  */
64
- function w3_ui_textbox($id, $name, $value, $disabled = false) {?>
65
- <input class="enabled" type="text" id="<?php echo esc_attr($id)?>" name="<?php echo esc_attr($name)?>" value="<?php echo esc_attr($value)?>" <?php disabled($disabled) ?>>
66
  <?php
67
  }
68
 
@@ -104,6 +131,9 @@ function w3_ui_element($type, $id, $name, $value, $disabled = false) {
104
  case 'textbox':
105
  w3_ui_textbox($id, $name, $value, $disabled);
106
  break;
 
 
 
107
  case 'textarea':
108
  w3_ui_textarea($id, $name, $value, $disabled);
109
  break;
@@ -124,4 +154,4 @@ function w3_admin_url($path) {
124
  return network_admin_url($path);
125
  }
126
  return admin_url($path);
127
- }
1
  <?php
2
  /**
3
  * Returns an notification box
4
+ * @param string $message
5
+ * @param string $id adds an id to the notification box
6
  * @return string
7
  */
8
+ function w3_get_notification_box($message, $id = '') {
9
+ if (!isset($_GET['page']) || (isset($_GET['page']) && substr($_GET['page'], 0, 5) != 'w3tc_'))
10
+ $logo = sprintf('<img src="%s" alt="W3 Total Cache" style="height:30px" />"', plugins_url('/pub/img/W3TC_dashboard_logo_title.png', W3TC_FILE) . '');
11
+ else
12
+ $logo = '';
13
+ return sprintf('<div %s class="updated fade">%s</div>', $id? "id=\"$id\"" : '' ,$logo . $message);
14
  }
15
 
16
  /**
17
  * Echos an notification box
18
+ * @param string $message
19
+ * @param string $id adds an id to the notification box
20
  */
21
+ function w3_e_notification_box($message, $id = '') {
22
+ echo w3_get_notification_box($message, $id);
23
  }
24
 
25
  /**
26
  * Returns an error box
27
  * @param $message
28
+ * @param string $id
29
  * @return string
30
  */
31
+ function w3_get_error_box($message, $id = '') {
32
+ if (!isset($_GET['page']) || (isset($_GET['page']) && substr($_GET['page'], 0, 5) != 'w3tc_'))
33
+ $logo = sprintf('<img src="%s" alt="W3 Total Cache" style="height:30px" />', plugins_url('/pub/img/W3TC_dashboard_logo_title.png', W3TC_FILE) . '');
34
+ else
35
+ $logo = '';
36
+ return sprintf('<div %s class="error">%s</div>', $id? "id=\"$id\"" : '' ,$logo . $message);
37
  }
38
 
39
  /**
40
  * Echos an error box
41
  * @param $message
42
+ * @param string $id
43
  */
44
+ function w3_e_error_box($message, $id = '') {
45
  echo w3_get_error_box($message);
46
  }
47
 
72
  * @param string $name
73
  * @param string $value
74
  * @param bool $disabled
75
+ * @param int $size
76
+ */
77
+ function w3_ui_textbox($id, $name, $value, $disabled = false, $size = 40) {?>
78
+ <input class="enabled" type="text" id="<?php echo esc_attr($id)?>" name="<?php echo esc_attr($name)?>" value="<?php echo esc_attr($value)?>" <?php disabled($disabled) ?> size="<?php esc_attr_e($size)?>">
79
+ <?php
80
+ }
81
+
82
+ /**
83
+ * Echos an input password element
84
+ *
85
+ * @param string $id
86
+ * @param string $name
87
+ * @param string $value
88
+ * @param bool $disabled
89
+ * @param int $size
90
  */
91
+ function w3_ui_passwordbox($id, $name, $value, $disabled = false, $size = 40) {?>
92
+ <input class="enabled" type="password" id="<?php echo esc_attr($id)?>" name="<?php echo esc_attr($name)?>" value="<?php echo esc_attr($value)?>" <?php disabled($disabled) ?> size="<?php esc_attr_e($size)?>">
93
  <?php
94
  }
95
 
131
  case 'textbox':
132
  w3_ui_textbox($id, $name, $value, $disabled);
133
  break;
134
+ case 'password':
135
+ w3_ui_passwordbox($id, $name, $value, $disabled);
136
+ break;
137
  case 'textarea':
138
  w3_ui_textarea($id, $name, $value, $disabled);
139
  break;
154
  return network_admin_url($path);
155
  }
156
  return admin_url($path);
157
+ }
inc/functions/url.php CHANGED
@@ -1,103 +1,103 @@
1
- <?php
2
-
3
- /**
4
- * Formats URL
5
- *
6
- * @param string $url
7
- * @param array $params
8
- * @param boolean $skip_empty
9
- * @param string $separator
10
- * @return string
11
- */
12
- function w3_url_format($url = '', $params = array(), $skip_empty = false, $separator = '&') {
13
- if ($url != '') {
14
- $parse_url = @parse_url($url);
15
- $url = '';
16
-
17
- if (!empty($parse_url['scheme'])) {
18
- $url .= $parse_url['scheme'] . '://';
19
-
20
- if (!empty($parse_url['user'])) {
21
- $url .= $parse_url['user'];
22
-
23
- if (!empty($parse_url['pass'])) {
24
- $url .= ':' . $parse_url['pass'];
25
- }
26
- }
27
-
28
- if (!empty($parse_url['host'])) {
29
- $url .= $parse_url['host'];
30
- }
31
-
32
- if (!empty($parse_url['port']) && $parse_url['port'] != 80) {
33
- $url .= ':' . (int) $parse_url['port'];
34
- }
35
- }
36
-
37
- if (!empty($parse_url['path'])) {
38
- $url .= $parse_url['path'];
39
- }
40
-
41
- if (!empty($parse_url['query'])) {
42
- $old_params = array();
43
- parse_str($parse_url['query'], $old_params);
44
-
45
- $params = array_merge($old_params, $params);
46
- }
47
-
48
- $query = w3_url_query($params);
49
-
50
- if ($query != '') {
51
- $url .= '?' . $query;
52
- }
53
-
54
- if (!empty($parse_url['fragment'])) {
55
- $url .= '#' . $parse_url['fragment'];
56
- }
57
- } else {
58
- $query = w3_url_query($params, $skip_empty, $separator);
59
-
60
- if ($query != '') {
61
- $url = '?' . $query;
62
- }
63
- }
64
-
65
- return $url;
66
- }
67
-
68
- /**
69
- * Formats query string
70
- *
71
- * @param array $params
72
- * @param boolean $skip_empty
73
- * @param string $separator
74
- * @return string
75
- */
76
- function w3_url_query($params = array(), $skip_empty = false, $separator = '&') {
77
- $str = '';
78
- static $stack = array();
79
-
80
- foreach ((array) $params as $key => $value) {
81
- if ($skip_empty === true && empty($value)) {
82
- continue;
83
- }
84
-
85
- array_push($stack, $key);
86
-
87
- if (is_array($value)) {
88
- if (count($value)) {
89
- $str .= ($str != '' ? '&' : '') . w3_url_query($value, $skip_empty, $key);
90
- }
91
- } else {
92
- $name = '';
93
- foreach ($stack as $key) {
94
- $name .= ($name != '' ? '[' . $key . ']' : $key);
95
- }
96
- $str .= ($str != '' ? $separator : '') . $name . '=' . rawurlencode($value);
97
- }
98
-
99
- array_pop($stack);
100
- }
101
-
102
- return $str;
103
  }
1
+ <?php
2
+
3
+ /**
4
+ * Formats URL
5
+ *
6
+ * @param string $url
7
+ * @param array $params
8
+ * @param boolean $skip_empty
9
+ * @param string $separator
10
+ * @return string
11
+ */
12
+ function w3_url_format($url = '', $params = array(), $skip_empty = false, $separator = '&') {
13
+ if ($url != '') {
14
+ $parse_url = @parse_url($url);
15
+ $url = '';
16
+
17
+ if (!empty($parse_url['scheme'])) {
18
+ $url .= $parse_url['scheme'] . '://';
19
+
20
+ if (!empty($parse_url['user'])) {
21
+ $url .= $parse_url['user'];
22
+
23
+ if (!empty($parse_url['pass'])) {
24
+ $url .= ':' . $parse_url['pass'];
25
+ }
26
+ }
27
+
28
+ if (!empty($parse_url['host'])) {
29
+ $url .= $parse_url['host'];
30
+ }
31
+
32
+ if (!empty($parse_url['port']) && $parse_url['port'] != 80) {
33
+ $url .= ':' . (int) $parse_url['port'];
34
+ }
35
+ }
36
+
37
+ if (!empty($parse_url['path'])) {
38
+ $url .= $parse_url['path'];
39
+ }
40
+
41
+ if (!empty($parse_url['query'])) {
42
+ $old_params = array();
43
+ parse_str($parse_url['query'], $old_params);
44
+
45
+ $params = array_merge($old_params, $params);
46
+ }
47
+
48
+ $query = w3_url_query($params);
49
+
50
+ if ($query != '') {
51
+ $url .= '?' . $query;
52
+ }
53
+
54
+ if (!empty($parse_url['fragment'])) {
55
+ $url .= '#' . $parse_url['fragment'];
56
+ }
57
+ } else {
58
+ $query = w3_url_query($params, $skip_empty, $separator);
59
+
60
+ if ($query != '') {
61
+ $url = '?' . $query;
62
+ }
63
+ }
64
+
65
+ return $url;
66
+ }
67
+
68
+ /**
69
+ * Formats query string
70
+ *
71
+ * @param array $params
72
+ * @param boolean $skip_empty
73
+ * @param string $separator
74
+ * @return string
75
+ */
76
+ function w3_url_query($params = array(), $skip_empty = false, $separator = '&') {
77
+ $str = '';
78
+ static $stack = array();
79
+
80
+ foreach ((array) $params as $key => $value) {
81
+ if ($skip_empty === true && empty($value)) {
82
+ continue;
83
+ }
84
+
85
+ array_push($stack, $key);
86
+
87
+ if (is_array($value)) {
88
+ if (count($value)) {
89
+ $str .= ($str != '' ? '&' : '') . w3_url_query($value, $skip_empty, $key);
90
+ }
91
+ } else {
92
+ $name = '';
93
+ foreach ($stack as $key) {
94
+ $name .= ($name != '' ? '[' . $key . ']' : $key);
95
+ }
96
+ $str .= ($str != '' ? $separator : '') . $name . '=' . rawurlencode($value);
97
+ }
98
+
99
+ array_pop($stack);
100
+ }
101
+
102
+ return $str;
103
  }
inc/lightbox/cdn_s3_bucket_location.php CHANGED
@@ -1,19 +1,19 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <h3>Select bucket location:</h3>
3
-
4
- <p>
5
- <label>Location:
6
- <select id="cdn_<?php echo $type; ?>_bucket_location">
7
- <?php foreach ($locations as $location => $name): ?>
8
- <option value="<?php echo esc_attr($location); ?>"><?php echo $name; ?></option>
9
- <?php endforeach; ?>
10
- </select>
11
- </label>
12
- </p>
13
- <p>
14
- <input id="cdn_create_container" class="button-primary {type: '<?php echo $type; ?>', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Create bucket', 'w3-total-cache'); ?>" />
15
- <span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
16
- </p>
17
- <p style="text-align: center;">
18
- <input class="button" type="button" value="<?php _e('Close', 'w3-total-cache'); ?>" />
19
- </p>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <h3>Select bucket location:</h3>
3
+
4
+ <p>
5
+ <label>Location:
6
+ <select id="cdn_<?php echo $type; ?>_bucket_location">
7
+ <?php foreach ($locations as $location => $name): ?>
8
+ <option value="<?php echo esc_attr($location); ?>"><?php echo $name; ?></option>
9
+ <?php endforeach; ?>
10
+ </select>
11
+ </label>
12
+ </p>
13
+ <p>
14
+ <input id="cdn_create_container" class="button-primary {type: '<?php echo $type; ?>', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Create bucket', 'w3-total-cache'); ?>" />
15
+ <span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
16
+ </p>
17
+ <p style="text-align: center;">
18
+ <input class="button" type="button" value="<?php _e('Close', 'w3-total-cache'); ?>" />
19
+ </p>
inc/lightbox/edge.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <div id="w3tc-edge-mode">
3
+ <div class="w3tc-overlay-logo"></div>
4
+ <header>
5
+ </header>
6
+ <div class="content">
7
+ <p><strong><?php _e('You can now keep up-to-date on all of the web performance optimization (WPO) techniques that will make your website as fast as possible without having to worry about new features breaking your website when you update!', 'w3-total-cache') ?></strong></p>
8
+ <p><?php _e('Enable "edge mode" to opt-in to pre-release features or simply close this window to opt-in to bug fixes, security fixes and settings updates only.', 'w3-total-cache') ?></p>
9
+ </div>
10
+ <div class="footer">
11
+ <?php
12
+ $wp_url = w3_admin_url('admin.php?page='. $page .'&w3tc_edge_mode_enable');
13
+ echo w3tc_action_button(__('Enable Edge Mode', 'w3-total-cache'), $wp_url, "btn w3tc-size image btn-default palette-turquoise") ?>
14
+ <?php wp_nonce_field('w3tc') ?>
15
+ <input type="button" class="button-cancel btn w3tc-size btn-default outset palette-light-grey" value="<?php _e('Cancel', 'w3-total-cache') ?>">
16
+ </div>
17
+ </div>
inc/lightbox/minify_recommendations.php CHANGED
@@ -1,127 +1,127 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <h3>Minify: Help Wizard</h3>
3
-
4
- <p>
5
- <?php _e('To get started with minify, we\'ve identified the following external CSS and JS objects in the', 'w3-total-cache'); ?>
6
- <select id="recom_theme">
7
- <?php foreach ($themes as $_theme_key => $_theme_name): ?>
8
- <option value="<?php echo htmlspecialchars($_theme_key); ?>"<?php selected($_theme_key, $theme_key); ?>><?php echo htmlspecialchars($_theme_name); ?><?php if ($_theme_key == $theme_key): ?> (active)<?php endif; ?></option>
9
- <?php endforeach; ?>
10
- </select>
11
- <?php _e('theme. Select "add" the files you wish to minify, then click "apply &amp; close" to save the settings.', 'w3-total-cache'); ?>
12
- </p>
13
-
14
- <div id="recom_container">
15
- <h4 style="margin-top: 0;">JavaScript:</h4>
16
- <?php if (count($js_groups)) :?>
17
- <ul id="recom_js_files" class="minify-files">
18
- <?php $index = 0; foreach ($js_groups as $js_group => $js_files): ?>
19
- <?php foreach ($js_files as $js_file): $index++; ?>
20
- <li>
21
- <table>
22
- <tr>
23
- <th class="minify-files-add"><?php _e('Add:', 'w3-total-cache'); ?></th>
24
- <th>&nbsp;</th>
25
- <th><?php _e('File URI:', 'w3-total-cache'); ?></th>
26
- <th><?php _e('Template:', 'w3-total-cache'); ?></th>
27
- <th colspan="2"><?php _e('Embed Location:', 'w3-total-cache'); ?></th>
28
- </tr>
29
- <tr>
30
- <td class="minify-files-add">
31
- <input type="checkbox" name="recom_js_useit" value="1"<?php checked(isset($checked_js[$js_group][$js_file]), true); ?> />
32
- </td>
33
- <td><?php echo $index; ?>.</td>
34
- <td>
35
- <input type="text" name="recom_js_file" value="<?php echo esc_attr($js_file); ?>" size="70" />
36
- </td>
37
- <td>
38
- <select name="recom_js_template">
39
- <?php foreach ($templates as $template_key => $template_name): ?>
40
- <option value="<?php echo esc_attr($template_key); ?>"<?php selected($template_key, $js_group); ?>><?php echo htmlspecialchars($template_name); ?></option>
41
- <?php endforeach; ?>
42
- </select>
43
- </td>
44
- <td>
45
- <?php $selected = (isset($locations_js[$js_group][$js_file]) ? $locations_js[$js_group][$js_file] : ''); ?>
46
- <select name="recom_js_location">
47
- <option value="include"<?php selected($selected, 'include'); ?>><?php _e('Embed in &lt;head&gt;', 'w3-total-cache'); ?></option>
48
- <option value="include-body"<?php selected($selected, 'include-body'); ?>><?php _e('Embed after &lt;body&gt;', 'w3-total-cache'); ?></option>
49
- <option value="include-footer"<?php selected($selected, 'include-footer'); ?>><?php _e('Embed before &lt;/body&gt;', 'w3-total-cache'); ?></option>
50
- </select>
51
- </td>
52
- <td>
53
- <input class="js_file_verify button" type="button" value="<?php _e('Verify URI', 'w3-total-cache'); ?>" />
54
- </td>
55
- </tr>
56
- </table>
57
- </li>
58
- <?php endforeach; ?>
59
- <?php endforeach; ?>
60
- </ul>
61
- <p>
62
- <a href="#" id="recom_js_check"><?php _e('Check / Uncheck All', 'w3-total-cache'); ?></a>
63
- </p>
64
- <?php else:?>
65
- <p><?php _e('No files found.', 'w3-total-cache'); ?></p>
66
- <?php endif;?>
67
-
68
- <h4><?php _e('Cascading Style Sheets:', 'w3-total-cache'); ?></h4>
69
-
70
- <?php if (count($css_groups)) :?>
71
- <ul id="recom_css_files" class="minify-files">
72
- <?php $index = 0; foreach ($css_groups as $css_group => $css_files): ?>
73
- <?php foreach ($css_files as $css_file): $index++; ?>
74
- <li>
75
- <table>
76
- <tr>
77
- <th class="minify-files-add"><?php _e('Add:', 'w3-total-cache'); ?></th>
78
- <th>&nbsp;</th>
79
- <th><?php _e('File URI:', 'w3-total-cache'); ?></th>
80
- <th colspan="2"><?php _e('Template:', 'w3-total-cache'); ?></th>
81
- </tr>
82
- <tr>
83
- <td class="minify-files-add">
84
- <input type="checkbox" name="recom_css_useit" value="1"<?php checked(isset($checked_css[$css_group][$css_file]), true); ?> />
85
- </td>
86
- <td><?php echo $index; ?>.</td>
87
- <td>
88
- <input type="text" name="recom_css_file" value="<?php echo esc_attr($css_file); ?>" size="70" />
89
- </td>
90
- <td>
91
- <select name="recom_css_template">
92
- <?php foreach ($templates as $template_key => $template_name): ?>
93
- <option value="<?php echo esc_attr($template_key); ?>"<?php selected($template_key, $css_group); ?>><?php echo htmlspecialchars($template_name); ?></option>
94
- <?php endforeach; ?>
95
- </select>
96
- </td>
97
- <td>
98
- <input class="css_file_verify button" type="button" value="<?php _e('Verify URI', 'w3-total-cache'); ?>" />
99
- </td>
100
- </tr>
101
- </table>
102
- </li>
103
- <?php endforeach; ?>
104
- <?php endforeach; ?>
105
- </ul>
106
- <p>
107
- <a href="#" id="recom_css_check"><?php _e('Check / Uncheck All', 'w3-total-cache'); ?></a>
108
- </p>
109
- <?php else:?>
110
- <p>No files found.</p>
111
- <?php endif;?>
112
- </div>
113
-
114
- <div id="recom_container_bottom">
115
- <p>
116
- <input class="recom_apply button-primary" type="button" value="<?php _e('Apply &amp; close', 'w3-total-cache'); ?>" />
117
- </p>
118
-
119
- <fieldset>
120
- <legend><?php _e('Notes', 'w3-total-cache'); ?></legend>
121
-
122
- <ul>
123
- <li><?php _e('Typically minification of advertiser code, analytics/statistics or any other types of tracking code is not recommended.', 'w3-total-cache'); ?></li>
124
- <li><?php _e('Scripts that were not already detected above may require <a href="admin.php?page=w3tc_support&amp;request_type=plugin_config">professional consultation</a> to implement.', 'w3-total-cache'); ?></li>
125
- </ul>
126
- </fieldset>
127
  </div>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <h3>Minify: Help Wizard</h3>
3
+
4
+ <p>
5
+ <?php _e('To get started with minify, we\'ve identified the following external CSS and JS objects in the', 'w3-total-cache'); ?>
6
+ <select id="recom_theme">
7
+ <?php foreach ($themes as $_theme_key => $_theme_name): ?>
8
+ <option value="<?php echo htmlspecialchars($_theme_key); ?>"<?php selected($_theme_key, $theme_key); ?>><?php echo htmlspecialchars($_theme_name); ?><?php if ($_theme_key == $theme_key): ?> (active)<?php endif; ?></option>
9
+ <?php endforeach; ?>
10
+ </select>
11
+ <?php _e('theme. Select "add" the files you wish to minify, then click "apply &amp; close" to save the settings.', 'w3-total-cache'); ?>
12
+ </p>
13
+
14
+ <div id="recom_container">
15
+ <h4 style="margin-top: 0;">JavaScript:</h4>
16
+ <?php if (count($js_groups)) :?>
17
+ <ul id="recom_js_files" class="minify-files">
18
+ <?php $index = 0; foreach ($js_groups as $js_group => $js_files): ?>
19
+ <?php foreach ($js_files as $js_file): $index++; ?>
20
+ <li>
21
+ <table>
22
+ <tr>
23
+ <th class="minify-files-add"><?php _e('Add:', 'w3-total-cache'); ?></th>
24
+ <th>&nbsp;</th>
25
+ <th><?php _e('File URI:', 'w3-total-cache'); ?></th>
26
+ <th><?php _e('Template:', 'w3-total-cache'); ?></th>
27
+ <th colspan="2"><?php _e('Embed Location:', 'w3-total-cache'); ?></th>
28
+ </tr>
29
+ <tr>
30
+ <td class="minify-files-add">
31
+ <input type="checkbox" name="recom_js_useit" value="1"<?php checked(isset($checked_js[$js_group][$js_file]), true); ?> />
32
+ </td>
33
+ <td><?php echo $index; ?>.</td>
34
+ <td>
35
+ <input type="text" name="recom_js_file" value="<?php echo esc_attr($js_file); ?>" size="70" />
36
+ </td>
37
+ <td>
38
+ <select name="recom_js_template">
39
+ <?php foreach ($templates as $template_key => $template_name): ?>
40
+ <option value="<?php echo esc_attr($template_key); ?>"<?php selected($template_key, $js_group); ?>><?php echo htmlspecialchars($template_name); ?></option>
41
+ <?php endforeach; ?>
42
+ </select>
43
+ </td>
44
+ <td>
45
+ <?php $selected = (isset($locations_js[$js_group][$js_file]) ? $locations_js[$js_group][$js_file] : ''); ?>
46
+ <select name="recom_js_location">
47
+ <option value="include"<?php selected($selected, 'include'); ?>><?php _e('Embed in &lt;head&gt;', 'w3-total-cache'); ?></option>
48
+ <option value="include-body"<?php selected($selected, 'include-body'); ?>><?php _e('Embed after &lt;body&gt;', 'w3-total-cache'); ?></option>
49
+ <option value="include-footer"<?php selected($selected, 'include-footer'); ?>><?php _e('Embed before &lt;/body&gt;', 'w3-total-cache'); ?></option>
50
+ </select>
51
+ </td>
52
+ <td>
53
+ <input class="js_file_verify button" type="button" value="<?php _e('Verify URI', 'w3-total-cache'); ?>" />
54
+ </td>
55
+ </tr>
56
+ </table>
57
+ </li>
58
+ <?php endforeach; ?>
59
+ <?php endforeach; ?>
60
+ </ul>
61
+ <p>
62
+ <a href="#" id="recom_js_check"><?php _e('Check / Uncheck All', 'w3-total-cache'); ?></a>
63
+ </p>
64
+ <?php else:?>
65
+ <p><?php _e('No files found.', 'w3-total-cache'); ?></p>
66
+ <?php endif;?>
67
+
68
+ <h4><?php _e('Cascading Style Sheets:', 'w3-total-cache'); ?></h4>
69
+
70
+ <?php if (count($css_groups)) :?>
71
+ <ul id="recom_css_files" class="minify-files">
72
+ <?php $index = 0; foreach ($css_groups as $css_group => $css_files): ?>
73
+ <?php foreach ($css_files as $css_file): $index++; ?>
74
+ <li>
75
+ <table>
76
+ <tr>
77
+ <th class="minify-files-add"><?php _e('Add:', 'w3-total-cache'); ?></th>
78
+ <th>&nbsp;</th>
79
+ <th><?php _e('File URI:', 'w3-total-cache'); ?></th>
80
+ <th colspan="2"><?php _e('Template:', 'w3-total-cache'); ?></th>
81
+ </tr>
82
+ <tr>
83
+ <td class="minify-files-add">
84
+ <input type="checkbox" name="recom_css_useit" value="1"<?php checked(isset($checked_css[$css_group][$css_file]), true); ?> />
85
+ </td>
86
+ <td><?php echo $index; ?>.</td>
87
+ <td>
88
+ <input type="text" name="recom_css_file" value="<?php echo esc_attr($css_file); ?>" size="70" />
89
+ </td>
90
+ <td>
91
+ <select name="recom_css_template">
92
+ <?php foreach ($templates as $template_key => $template_name): ?>
93
+ <option value="<?php echo esc_attr($template_key); ?>"<?php selected($template_key, $css_group); ?>><?php echo htmlspecialchars($template_name); ?></option>
94
+ <?php endforeach; ?>
95
+ </select>
96
+ </td>
97
+ <td>
98
+ <input class="css_file_verify button" type="button" value="<?php _e('Verify URI', 'w3-total-cache'); ?>" />
99
+ </td>
100
+ </tr>
101
+ </table>
102
+ </li>
103
+ <?php endforeach; ?>
104
+ <?php endforeach; ?>
105
+ </ul>
106
+ <p>
107
+ <a href="#" id="recom_css_check"><?php _e('Check / Uncheck All', 'w3-total-cache'); ?></a>
108
+ </p>
109
+ <?php else:?>
110
+ <p>No files found.</p>
111
+ <?php endif;?>
112
+ </div>
113
+
114
+ <div id="recom_container_bottom">
115
+ <p>
116
+ <input class="recom_apply button-primary" type="button" value="<?php _e('Apply &amp; close', 'w3-total-cache'); ?>" />
117
+ </p>
118
+
119
+ <fieldset>
120
+ <legend><?php _e('Notes', 'w3-total-cache'); ?></legend>
121
+
122
+ <ul>
123
+ <li><?php _e('Typically minification of advertiser code, analytics/statistics or any other types of tracking code is not recommended.', 'w3-total-cache'); ?></li>
124
+ <li><?php _e('Scripts that were not already detected above may require <a href="admin.php?page=w3tc_support&amp;request_type=plugin_config">professional consultation</a> to implement.', 'w3-total-cache'); ?></li>
125
+ </ul>
126
+ </fieldset>
127
  </div>
inc/lightbox/self_test.php CHANGED
@@ -1,321 +1,321 @@
1
- <?php
2
-
3
- if (!defined('W3TC'))
4
- die();
5
-
6
- w3_require_once(W3TC_INC_DIR . '/functions/file.php');
7
- w3_require_once(W3TC_INC_DIR . '/functions/rule.php');
8
-
9
- ?>
10
- <h3><?php _e('Compatibility Test', 'w3-total-cache'); ?></h3>
11
-
12
- <fieldset>
13
- <legend><?php _e('Legend', 'w3-total-cache'); ?></legend>
14
-
15
- <p>
16
- <?php _e('<code>Installed</code>: Functionality will work properly.', 'w3-total-cache'); ?><br />
17
- <?php _e('<code>Not detected</code>: May be installed, but cannot be automatically confirmed.', 'w3-total-cache'); ?><br />
18
- <?php _e('<code>Ok</code>: Current value is acceptable.', 'w3-total-cache'); ?><br />
19
- <?php _e('<code>Yes / No</code>: The value was successful detected.', 'w3-total-cache'); ?>
20
- </p>
21
- </fieldset>
22
-
23
- <div id="w3tc-self-test">
24
- <h4 style="margin-top: 0;"><?php _e('Server Modules &amp; Resources:', 'w3-total-cache'); ?></h4>
25
-
26
- <ul>
27
- <li>
28
- <?php _e('Plugin Version:', 'w3-total-cache'); ?> <code><?php echo W3TC_VERSION; ?></code>
29
- </li>
30
-
31
- <li>
32
- <?php _e('PHP Version:', 'w3-total-cache'); ?>
33
- <code><?php echo PHP_VERSION; ?></code>;
34
- </li>
35
-
36
- <li>
37
- Web Server:
38
- <?php if (stristr($_SERVER['SERVER_SOFTWARE'], 'apache') !== false): ?>
39
- <code>Apache</code>
40
- <?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false): ?>
41
- <code>Lite Speed</code>
42
- <?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false): ?>
43
- <code>nginx</code>
44
- <?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'lighttpd') !== false): ?>
45
- <code>lighttpd</code>
46
- <?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'iis') !== false): ?>
47
- <code>Microsoft IIS</code>
48
- <?php else: ?>
49
- <code>Not detected</code>
50
- <?php endif; ?>
51
- </li>
52
-
53
- <li>
54
- FTP functions:
55
- <?php if (function_exists('ftp_connect')): ?>
56
- <code>Installed</code>
57
- <?php else: ?>
58
- <code>Not installed</code>
59
- <?php endif; ?>
60
- <span class="w3tc-self-test-hint"><?php _e('(required for Self-hosted (<acronym title="File Transfer Protocol">FTP</acronym>) <acronym title="Content Delivery Network">CDN</acronym> support)', 'w3-total-cache'); ?></span>
61
- </li>
62
-
63
- <li>
64
- <?php _e('Multibyte String support:', 'w3-total-cache'); ?>
65
- <?php if (function_exists('mb_substr')): ?>
66
- <code><?php _e('Installed', 'w3-total-cache'); ?></code>
67
- <?php else: ?>
68
- <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
69
- <?php endif; ?>
70
- <span class="w3tc-self-test-hint"><?php _e('(required for Rackspace Cloud Files support)', 'w3-total-cache'); ?></span>
71
- </li>
72
-
73
- <li>
74
- <?php _e('cURL extension:', 'w3-total-cache'); ?>
75
- <?php if (function_exists('curl_init')): ?>
76
- <code><?php _e('Installed', 'w3-total-cache'); ?></code>
77
- <?php else: ?>
78
- <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
79
- <?php endif; ?>
80
- <span class="w3tc-self-test-hint"><?php _e('(required for Amazon S3, Amazon CloudFront, Rackspace CloudFiles support)', 'w3-total-cache'); ?></span>
81
- </li>
82
-
83
- <li>
84
- zlib extension:
85
- <?php if (function_exists('gzencode')): ?>
86
- <code><?php _e('Installed', 'w3-total-cache'); ?></code>
87
- <?php else: ?>
88
- <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
89
- <?php endif; ?>
90
- <span class="w3tc-self-test-hint"><?php _e('(required for compression support)', 'w3-total-cache'); ?></span>
91
- </li>
92
-
93
- <li>
94
- Opcode cache:
95
- <?php if (function_exists('apc_store')): ?>
96
- <code><?php _e('Installed (APC)', 'w3-total-cache'); ?></code>
97
- <?php elseif (function_exists('eaccelerator_put')): ?>
98
- <code><?php _e('Installed (eAccelerator)', 'w3-total-cache'); ?></code>
99
- <?php elseif (function_exists('xcache_set')): ?>
100
- <code><?php _e('Installed (XCache)', 'w3-total-cache'); ?></code>
101
- <?php elseif (PHP_VERSION >= 6): ?>
102
- <code><?php _e('PHP6', 'w3-total-cache'); ?></code>
103
- <?php else: ?>
104
- <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
105
- <?php endif; ?>
106
- </li>
107
-
108
- <li>
109
- <?php _e('Memcache extension:', 'w3-total-cache'); ?>
110
- <?php if (class_exists('Memcache')): ?>
111
- <code><?php _e('Installed', 'w3-total-cache'); ?></code>
112
- <?php else: ?>
113
- <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
114
- <?php endif; ?>
115
- </li>
116
-
117
- <li>
118
- <?php _e('HTML Tidy extension:', 'w3-total-cache'); ?>
119
- <?php if (class_exists('tidy')): ?>
120
- <code><?php _e('Installed', 'w3-total-cache'); ?></code>
121
- <?php else: ?>
122
- <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
123
- <?php endif; ?>
124
- <span class="w3tc-self-test-hint"><?php _e('(required for HTML Tidy minifier suppport)', 'w3-total-cache'); ?></span>
125
- </li>
126
-
127
- <li>
128
- <?php _e('Mime type detection:', 'w3-total-cache'); ?>
129
- <?php if (function_exists('finfo_open')): ?>
130
- <code><?php _e('Installed (Fileinfo)', 'w3-total-cache'); ?></code>
131
- <?php elseif (function_exists('mime_content_type')): ?>
132
- <code><?php _e('Installed (mime_content_type)', 'w3-total-cache'); ?></code>
133
- <?php else: ?>
134
- <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
135
- <?php endif; ?>
136
- <span class="w3tc-self-test-hint"><?php _e('(required for <acronym title="Content Delivery Network">CDN</acronym> support)', 'w3-total-cache'); ?></span>
137
- </li>
138
-
139
- <li>
140
- <?php _e('Hash function:', 'w3-total-cache'); ?>
141
- <?php if (function_exists('hash')): ?>
142
- <code><?php _e('Installed (hash)', 'w3-total-cache'); ?></code>
143
- <?php elseif (function_exists('mhash')): ?>
144
- <code><?php _e('Installed (mhash)', 'w3-total-cache'); ?></code>
145
- <?php else: ?>
146
- <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
147
- <?php endif; ?>
148
- <span class="w3tc-self-test-hint"><?php _e('(required for NetDNA / MaxCDN <acronym title="Content Delivery Network">CDN</acronym> purge support)', 'w3-total-cache'); ?></span>
149
- </li>
150
-
151
- <li>
152
- <?php _e('Safe mode:', 'w3-total-cache'); ?>
153
- <?php if (w3_to_boolean(ini_get('safe_mode'))): ?>
154
- <code><?php _e('On', 'w3-total-cache'); ?></code>
155
- <?php else: ?>
156
- <code><?php _e('Off', 'w3-total-cache'); ?></code>
157
- <?php endif; ?>
158
- </li>
159
-
160
- <li>
161
- <?php _e('Open basedir:', 'w3-total-cache'); ?>
162
- <?php $open_basedir = ini_get('open_basedir'); if ($open_basedir): ?>
163
- <code><?php _e('On:', 'w3-total-cache'); ?> <?php echo htmlspecialchars($open_basedir); ?></code>
164
- <?php else: ?>
165
- <code><?php _e('Off', 'w3-total-cache'); ?></code>
166
- <?php endif; ?>
167
- </li>
168
-
169
- <li>
170
- <?php _e('zlib output compression:', 'w3-total-cache'); ?>
171
- <?php if (w3_to_boolean(ini_get('zlib.output_compression'))): ?>
172
- <code><?php _e('On', 'w3-total-cache'); ?></code>
173
- <?php else: ?>
174
- <code><?php _e('Off', 'w3-total-cache'); ?></code>
175
- <?php endif; ?>
176
- </li>
177
-
178
- <li>
179
- <?php _e('set_time_limit:', 'w3-total-cache'); ?>
180
- <?php if (function_exists('set_time_limit')): ?>
181
- <code><?php _e('Available', 'w3-total-cache'); ?></code>
182
- <?php else: ?>
183
- <code><?php _e('Not available', 'w3-total-cache'); ?></code>
184
- <?php endif; ?>
185
- </li>
186
-
187
- <?php
188
- if (w3_is_apache()):
189
- $apache_modules = (function_exists('apache_get_modules') ? apache_get_modules() : false);
190
-
191
- $modules = array(
192
- 'mod_deflate',
193
- 'mod_env',
194
- 'mod_expires',
195
- 'mod_headers',
196
- 'mod_mime',
197
- 'mod_rewrite',
198
- 'mod_setenvif'
199
- );
200
- ?>
201
- <?php foreach ($modules as $module): ?>
202
- <li>
203
- <?php echo $module; ?>:
204
- <?php if ($apache_modules): ?>
205
- <?php if (in_array($module, $apache_modules)): ?>
206
- <code><?php _e('Installed', 'w3-total-cache'); ?></code>
207
- <?php else: ?>
208
- <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
209
- <?php endif; ?>
210
- <?php else: ?>
211
- <code><?php _e('Not detected', 'w3-total-cache'); ?></code>
212
- <?php endif; ?>
213
- <span class="w3tc-self-test-hint"><?php _e('(required for disk enhanced Page Cache and Browser Cache)', 'w3-total-cache'); ?></span>
214
- </li>
215
- <?php endforeach; ?>
216
- <?php endif; ?>
217
- </ul>
218
- <?php $additional_checks = apply_filters('w3tc_compatibility_test', __return_empty_array());
219
- if ($additional_checks):?>
220
- <h4><?php _e('Additional modules','w3-total-cache')?></h4>
221
- <ul>
222
- <?php
223
- foreach($additional_checks as $check)
224
- echo '<li>', $check, '</li>';
225
- ?>
226
- </ul>
227
- <?php
228
- endif;
229
- ?>
230
-
231
- <h4><?php _e('WordPress Resources', 'w3-total-cache'); ?></h4>
232
-
233
- <ul>
234
- <?php
235
- $paths = array_unique(array(
236
- w3_get_pgcache_rules_core_path(),
237
- w3_get_browsercache_rules_cache_path(),
238
- w3_get_browsercache_rules_no404wp_path()
239
- ));
240
- ?>
241
- <?php foreach ($paths as $path): if ($path): ?>
242
- <li>
243
- <?php echo htmlspecialchars($path); ?>:
244
- <?php if (file_exists($path)): ?>
245
- <?php if (w3_is_writable($path)): ?>
246
- <code><?php _e('OK', 'w3-total-cache'); ?></code>
247
- <?php else: ?>
248
- <code><?php _e('Not write-able', 'w3-total-cache'); ?></code>
249
- <?php endif; ?>
250
- <?php else: ?>
251
- <?php if (w3_is_writable_dir(dirname($path))): ?>
252
- <code><?php _e('Write-able', 'w3-total-cache'); ?></code>
253
- <?php else: ?>
254
- <code><?php _e('Not write-able', 'w3-total-cache'); ?></code>
255
- <?php endif; ?>
256
- <?php endif; ?>
257
- </li>
258
- <?php endif; endforeach; ?>
259
-
260
- <li>
261
- <?php echo w3_path(WP_CONTENT_DIR); ?>:
262
- <?php if (w3_is_writable_dir(WP_CONTENT_DIR)): ?>
263
- <code><?php _e('OK', 'w3-total-cache'); ?></code>
264
- <?php else: ?>
265
- <code><?php _e('Not write-able', 'w3-total-cache'); ?></code>
266
- <?php endif; ?>
267
- </li>
268
-
269
- <li>
270
- <?php $uploads_dir = @wp_upload_dir(); ?>
271
- <?php echo htmlspecialchars($uploads_dir['path']); ?>:
272
- <?php if (!empty($uploads_dir['error'])): ?>
273
- <code><?php _e('Error:', 'w3-total-cache'); ?> <?php echo htmlspecialchars($uploads_dir['error']); ?></code>
274
- <?php elseif (!w3_is_writable_dir($uploads_dir['path'])): ?>
275
- <code><?php _e('Not write-able', 'w3-total-cache'); ?></code>
276
- <?php else: ?>
277
- <code><?php _e('OK', 'w3-total-cache'); ?></code>
278
- <?php endif; ?>
279
- </li>
280
-
281
- <li>
282
- <?php _e('Fancy permalinks:', 'w3-total-cache'); ?>
283
- <?php $permalink_structure = get_option('permalink_structure'); if ($permalink_structure): ?>
284
- <code><?php echo htmlspecialchars($permalink_structure); ?></code>
285
- <?php else: ?>
286
- <code><?php _e('Disabled', 'w3-total-cache'); ?></code>
287
- <?php endif; ?>
288
- </li>
289
-
290
- <li>
291
- <?php _e('WP_CACHE define:', 'w3-total-cache'); ?>
292
- <?php if (defined('WP_CACHE')): ?>
293
- <code><?php _e('Defined', 'w3-total-cache'); ?> (<?php echo (WP_CACHE ? 'true' : 'false'); ?>)</code>
294
- <?php else: ?>
295
- <code><?php _e('Not defined', 'w3-total-cache'); ?></code>
296
- <?php endif; ?>
297
- </li>
298
-
299
- <li>
300
- <?php _e('URL rewrite:', 'w3-total-cache'); ?>
301
- <?php if (w3_can_check_rules()): ?>
302
- <code><?php _e('Enabled', 'w3-total-cache'); ?></code>
303
- <?php else: ?>
304
- <code><?php _e('Disabled', 'w3-total-cache'); ?></code>
305
- <?php endif; ?>
306
- </li>
307
-
308
- <li>
309
- <?php _e('Network mode:', 'w3-total-cache'); ?>
310
- <?php if (w3_is_network()): ?>
311
- <code><?php _e('Yes', 'w3-total-cache'); ?> (<?php echo (w3_is_subdomain_install() ? 'subdomain' : 'subdir'); ?>)</code>
312
- <?php else: ?>
313
- <code><?php _e('No', 'w3-total-cache'); ?></code>
314
- <?php endif; ?>
315
- </li>
316
- </ul>
317
- </div>
318
-
319
- <div id="w3tc-self-test-bottom">
320
- <input class="button-primary" type="button" value="<?php _e('Close', 'w3-total-cache'); ?>" />
321
- </div>
1
+ <?php
2
+
3
+ if (!defined('W3TC'))
4
+ die();
5
+
6
+ w3_require_once(W3TC_INC_DIR . '/functions/file.php');
7
+ w3_require_once(W3TC_INC_DIR . '/functions/rule.php');
8
+
9
+ ?>
10
+ <h3><?php _e('Compatibility Test', 'w3-total-cache'); ?></h3>
11
+
12
+ <fieldset>
13
+ <legend><?php _e('Legend', 'w3-total-cache'); ?></legend>
14
+
15
+ <p>
16
+ <?php _e('<code>Installed</code>: Functionality will work properly.', 'w3-total-cache'); ?><br />
17
+ <?php _e('<code>Not detected</code>: May be installed, but cannot be automatically confirmed.', 'w3-total-cache'); ?><br />
18
+ <?php _e('<code>Ok</code>: Current value is acceptable.', 'w3-total-cache'); ?><br />
19
+ <?php _e('<code>Yes / No</code>: The value was successful detected.', 'w3-total-cache'); ?>
20
+ </p>
21
+ </fieldset>
22
+
23
+ <div id="w3tc-self-test">
24
+ <h4 style="margin-top: 0;"><?php _e('Server Modules &amp; Resources:', 'w3-total-cache'); ?></h4>
25
+
26
+ <ul>
27
+ <li>
28
+ <?php _e('Plugin Version:', 'w3-total-cache'); ?> <code><?php echo W3TC_VERSION; ?></code>
29
+ </li>
30
+
31
+ <li>
32
+ <?php _e('PHP Version:', 'w3-total-cache'); ?>
33
+ <code><?php echo PHP_VERSION; ?></code>;
34
+ </li>
35
+
36
+ <li>
37
+ Web Server:
38
+ <?php if (stristr($_SERVER['SERVER_SOFTWARE'], 'apache') !== false): ?>
39
+ <code>Apache</code>
40
+ <?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false): ?>
41
+ <code>Lite Speed</code>
42
+ <?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false): ?>
43
+ <code>nginx</code>
44
+ <?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'lighttpd') !== false): ?>
45
+ <code>lighttpd</code>
46
+ <?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'iis') !== false): ?>
47
+ <code>Microsoft IIS</code>
48
+ <?php else: ?>
49
+ <code>Not detected</code>
50
+ <?php endif; ?>
51
+ </li>
52
+
53
+ <li>
54
+ FTP functions:
55
+ <?php if (function_exists('ftp_connect')): ?>
56
+ <code>Installed</code>
57
+ <?php else: ?>
58
+ <code>Not installed</code>
59
+ <?php endif; ?>
60
+ <span class="w3tc-self-test-hint"><?php _e('(required for Self-hosted (<acronym title="File Transfer Protocol">FTP</acronym>) <acronym title="Content Delivery Network">CDN</acronym> support)', 'w3-total-cache'); ?></span>
61
+ </li>
62
+
63
+ <li>
64
+ <?php _e('Multibyte String support:', 'w3-total-cache'); ?>
65
+ <?php if (function_exists('mb_substr')): ?>
66
+ <code><?php _e('Installed', 'w3-total-cache'); ?></code>
67
+ <?php else: ?>
68
+ <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
69
+ <?php endif; ?>
70
+ <span class="w3tc-self-test-hint"><?php _e('(required for Rackspace Cloud Files support)', 'w3-total-cache'); ?></span>
71
+ </li>
72
+
73
+ <li>
74
+ <?php _e('cURL extension:', 'w3-total-cache'); ?>
75
+ <?php if (function_exists('curl_init')): ?>
76
+ <code><?php _e('Installed', 'w3-total-cache'); ?></code>
77
+ <?php else: ?>
78
+ <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
79
+ <?php endif; ?>
80
+ <span class="w3tc-self-test-hint"><?php _e('(required for Amazon S3, Amazon CloudFront, Rackspace CloudFiles support)', 'w3-total-cache'); ?></span>
81
+ </li>
82
+
83
+ <li>
84
+ zlib extension:
85
+ <?php if (function_exists('gzencode')): ?>
86
+ <code><?php _e('Installed', 'w3-total-cache'); ?></code>
87
+ <?php else: ?>
88
+ <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
89
+ <?php endif; ?>
90
+ <span class="w3tc-self-test-hint"><?php _e('(required for compression support)', 'w3-total-cache'); ?></span>
91
+ </li>
92
+
93
+ <li>
94
+ Opcode cache:
95
+ <?php if (function_exists('apc_store')): ?>
96
+ <code><?php _e('Installed (APC)', 'w3-total-cache'); ?></code>
97
+ <?php elseif (function_exists('eaccelerator_put')): ?>
98
+ <code><?php _e('Installed (eAccelerator)', 'w3-total-cache'); ?></code>
99
+ <?php elseif (function_exists('xcache_set')): ?>
100
+ <code><?php _e('Installed (XCache)', 'w3-total-cache'); ?></code>
101
+ <?php elseif (PHP_VERSION >= 6): ?>
102
+ <code><?php _e('PHP6', 'w3-total-cache'); ?></code>
103
+ <?php else: ?>
104
+ <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
105
+ <?php endif; ?>
106
+ </li>
107
+
108
+ <li>
109
+ <?php _e('Memcache extension:', 'w3-total-cache'); ?>
110
+ <?php if (class_exists('Memcache')): ?>
111
+ <code><?php _e('Installed', 'w3-total-cache'); ?></code>
112
+ <?php else: ?>
113
+ <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
114
+ <?php endif; ?>
115
+ </li>
116
+
117
+ <li>
118
+ <?php _e('HTML Tidy extension:', 'w3-total-cache'); ?>
119
+ <?php if (class_exists('tidy')): ?>
120
+ <code><?php _e('Installed', 'w3-total-cache'); ?></code>
121
+ <?php else: ?>
122
+ <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
123
+ <?php endif; ?>
124
+ <span class="w3tc-self-test-hint"><?php _e('(required for HTML Tidy minifier suppport)', 'w3-total-cache'); ?></span>
125
+ </li>
126
+
127
+ <li>
128
+ <?php _e('Mime type detection:', 'w3-total-cache'); ?>
129
+ <?php if (function_exists('finfo_open')): ?>
130
+ <code><?php _e('Installed (Fileinfo)', 'w3-total-cache'); ?></code>
131
+ <?php elseif (function_exists('mime_content_type')): ?>
132
+ <code><?php _e('Installed (mime_content_type)', 'w3-total-cache'); ?></code>
133
+ <?php else: ?>
134
+ <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
135
+ <?php endif; ?>
136
+ <span class="w3tc-self-test-hint"><?php _e('(required for <acronym title="Content Delivery Network">CDN</acronym> support)', 'w3-total-cache'); ?></span>
137
+ </li>
138
+
139
+ <li>
140
+ <?php _e('Hash function:', 'w3-total-cache'); ?>
141
+ <?php if (function_exists('hash')): ?>
142
+ <code><?php _e('Installed (hash)', 'w3-total-cache'); ?></code>
143
+ <?php elseif (function_exists('mhash')): ?>
144
+ <code><?php _e('Installed (mhash)', 'w3-total-cache'); ?></code>
145
+ <?php else: ?>
146
+ <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
147
+ <?php endif; ?>
148
+ <span class="w3tc-self-test-hint"><?php _e('(required for NetDNA / MaxCDN <acronym title="Content Delivery Network">CDN</acronym> purge support)', 'w3-total-cache'); ?></span>
149
+ </li>
150
+
151
+ <li>
152
+ <?php _e('Safe mode:', 'w3-total-cache'); ?>
153
+ <?php if (w3_to_boolean(ini_get('safe_mode'))): ?>
154
+ <code><?php _e('On', 'w3-total-cache'); ?></code>
155
+ <?php else: ?>
156
+ <code><?php _e('Off', 'w3-total-cache'); ?></code>
157
+ <?php endif; ?>
158
+ </li>
159
+
160
+ <li>
161
+ <?php _e('Open basedir:', 'w3-total-cache'); ?>
162
+ <?php $open_basedir = ini_get('open_basedir'); if ($open_basedir): ?>
163
+ <code><?php _e('On:', 'w3-total-cache'); ?> <?php echo htmlspecialchars($open_basedir); ?></code>
164
+ <?php else: ?>
165
+ <code><?php _e('Off', 'w3-total-cache'); ?></code>
166
+ <?php endif; ?>
167
+ </li>
168
+
169
+ <li>
170
+ <?php _e('zlib output compression:', 'w3-total-cache'); ?>
171
+ <?php if (w3_to_boolean(ini_get('zlib.output_compression'))): ?>
172
+ <code><?php _e('On', 'w3-total-cache'); ?></code>
173
+ <?php else: ?>
174
+ <code><?php _e('Off', 'w3-total-cache'); ?></code>
175
+ <?php endif; ?>
176
+ </li>
177
+
178
+ <li>
179
+ <?php _e('set_time_limit:', 'w3-total-cache'); ?>
180
+ <?php if (function_exists('set_time_limit')): ?>
181
+ <code><?php _e('Available', 'w3-total-cache'); ?></code>
182
+ <?php else: ?>
183
+ <code><?php _e('Not available', 'w3-total-cache'); ?></code>
184
+ <?php endif; ?>
185
+ </li>
186
+
187
+ <?php
188
+ if (w3_is_apache()):
189
+ $apache_modules = (function_exists('apache_get_modules') ? apache_get_modules() : false);
190
+
191
+ $modules = array(
192
+ 'mod_deflate',
193
+ 'mod_env',
194
+ 'mod_expires',
195
+ 'mod_headers',
196
+ 'mod_mime',
197
+ 'mod_rewrite',
198
+ 'mod_setenvif'
199
+ );
200
+ ?>
201
+ <?php foreach ($modules as $module): ?>
202
+ <li>
203
+ <?php echo $module; ?>:
204
+ <?php if ($apache_modules): ?>
205
+ <?php if (in_array($module, $apache_modules)): ?>
206
+ <code><?php _e('Installed', 'w3-total-cache'); ?></code>
207
+ <?php else: ?>
208
+ <code><?php _e('Not installed', 'w3-total-cache'); ?></code>
209
+ <?php endif; ?>
210
+ <?php else: ?>
211
+ <code><?php _e('Not detected', 'w3-total-cache'); ?></code>
212
+ <?php endif; ?>
213
+ <span class="w3tc-self-test-hint"><?php _e('(required for disk enhanced Page Cache and Browser Cache)', 'w3-total-cache'); ?></span>
214
+ </li>
215
+ <?php endforeach; ?>
216
+ <?php endif; ?>
217
+ </ul>
218
+ <?php $additional_checks = apply_filters('w3tc_compatibility_test', __return_empty_array());
219
+ if ($additional_checks):?>
220
+ <h4><?php _e('Additional Server Modules','w3-total-cache')?></h4>
221
+ <ul>
222
+ <?php
223
+ foreach($additional_checks as $check)
224
+ echo '<li>', $check, '</li>';
225
+ ?>
226
+ </ul>
227
+ <?php
228
+ endif;
229
+ ?>
230
+
231
+ <h4><?php _e('WordPress Resources', 'w3-total-cache'); ?></h4>
232
+
233
+ <ul>
234
+ <?php
235
+ $paths = array_unique(array(
236
+ w3_get_pgcache_rules_core_path(),
237
+ w3_get_browsercache_rules_cache_path(),
238
+ w3_get_browsercache_rules_no404wp_path()
239
+ ));
240
+ ?>
241
+ <?php foreach ($paths as $path): if ($path): ?>
242
+ <li>
243
+ <?php echo htmlspecialchars($path); ?>:
244
+ <?php if (file_exists($path)): ?>
245
+ <?php if (w3_is_writable($path)): ?>
246
+ <code><?php _e('OK', 'w3-total-cache'); ?></code>
247
+ <?php else: ?>
248
+ <code><?php _e('Not write-able', 'w3-total-cache'); ?></code>
249
+ <?php endif; ?>
250
+ <?php else: ?>
251
+ <?php if (w3_is_writable_dir(dirname($path))): ?>
252
+ <code><?php _e('Write-able', 'w3-total-cache'); ?></code>
253
+ <?php else: ?>
254
+ <code><?php _e('Not write-able', 'w3-total-cache'); ?></code>
255
+ <?php endif; ?>
256
+ <?php endif; ?>
257
+ </li>
258
+ <?php endif; endforeach; ?>
259
+
260
+ <li>
261
+ <?php echo w3_path(WP_CONTENT_DIR); ?>:
262
+ <?php if (w3_is_writable_dir(WP_CONTENT_DIR)): ?>
263
+ <code><?php _e('OK', 'w3-total-cache'); ?></code>
264
+ <?php else: ?>
265
+ <code><?php _e('Not write-able', 'w3-total-cache'); ?></code>
266
+ <?php endif; ?>
267
+ </li>
268
+
269
+ <li>
270
+ <?php $uploads_dir = @wp_upload_dir(); ?>
271
+ <?php echo htmlspecialchars($uploads_dir['path']); ?>:
272
+ <?php if (!empty($uploads_dir['error'])): ?>
273
+ <code><?php _e('Error:', 'w3-total-cache'); ?> <?php echo htmlspecialchars($uploads_dir['error']); ?></code>
274
+ <?php elseif (!w3_is_writable_dir($uploads_dir['path'])): ?>
275
+ <code><?php _e('Not write-able', 'w3-total-cache'); ?></code>
276
+ <?php else: ?>
277
+ <code><?php _e('OK', 'w3-total-cache'); ?></code>
278
+ <?php endif; ?>
279
+ </li>
280
+
281
+ <li>
282
+ <?php _e('Fancy permalinks:', 'w3-total-cache'); ?>
283
+ <?php $permalink_structure = get_option('permalink_structure'); if ($permalink_structure): ?>
284
+ <code><?php echo htmlspecialchars($permalink_structure); ?></code>
285
+ <?php else: ?>
286
+ <code><?php _e('Disabled', 'w3-total-cache'); ?></code>
287
+ <?php endif; ?>
288
+ </li>
289
+
290
+ <li>
291
+ <?php _e('WP_CACHE define:', 'w3-total-cache'); ?>
292
+ <?php if (defined('WP_CACHE')): ?>
293
+ <code><?php _e('Defined', 'w3-total-cache'); ?> (<?php echo (WP_CACHE ? 'true' : 'false'); ?>)</code>
294
+ <?php else: ?>
295
+ <code><?php _e('Not defined', 'w3-total-cache'); ?></code>
296
+ <?php endif; ?>
297
+ </li>
298
+
299
+ <li>
300
+ <?php _e('URL rewrite:', 'w3-total-cache'); ?>
301
+ <?php if (w3_can_check_rules()): ?>
302
+ <code><?php _e('Enabled', 'w3-total-cache'); ?></code>
303
+ <?php else: ?>
304
+ <code><?php _e('Disabled', 'w3-total-cache'); ?></code>
305
+ <?php endif; ?>
306
+ </li>
307
+
308
+ <li>
309
+ <?php _e('Network mode:', 'w3-total-cache'); ?>
310
+ <?php if (w3_is_network()): ?>
311
+ <code><?php _e('Yes', 'w3-total-cache'); ?> (<?php echo (w3_is_subdomain_install() ? 'subdomain' : 'subdir'); ?>)</code>
312
+ <?php else: ?>
313
+ <code><?php _e('No', 'w3-total-cache'); ?></code>
314
+ <?php endif; ?>
315
+ </li>
316
+ </ul>
317
+ </div>
318
+
319
+ <div id="w3tc-self-test-bottom">
320
+ <input class="button-primary" type="button" value="<?php _e('Close', 'w3-total-cache'); ?>" />
321
+ </div>
inc/lightbox/support_us.php CHANGED
@@ -1,29 +1,83 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <h3><?php _e('Support Us, It\'s Free!', 'w3-total-cache'); ?></h3>
3
-
4
- <p><?php _e('We noticed you\'ve been using W3 Total cache for at least 30 days, please help us improe WordPress:', 'w3-total-cache'); ?></p>
5
-
6
- <form action="admin.php?page=<?php echo $this->_page; ?>&amp;w3tc_config_save_support_us" method="post">
7
- <p>
8
- <label>
9
- <?php _e('Link to us:', 'w3-total-cache'); ?>
10
- <select name="support" class="select-support-type">
11
- <option value=""><?php esc_attr_e('select location', 'w3-total-cache'); ?></option>
12
- <?php foreach ($supports as $support_id => $support_name): ?>
13
- <option value="<?php echo esc_attr($support_id); ?>"<?php echo selected($this->_config->get_string('common.support'), $support_id); ?>><?php echo htmlspecialchars($support_name); ?></option>
14
- <?php endforeach; ?>
15
- </select>
16
- </label>, <input type="button" class="button button-tweet" value="<?php echo sprintf(__('tell your friends%s with a tweet', 'w3-total-cache'), '" />'); ?>
17
- (<input type="hidden" name="tweeted" value="0" /><label><input type="checkbox" name="tweeted" value="1"<?php checked($this->_config->get_boolean('common.tweeted', true)); ?> /> <?php _e('I\'ve tweeted', 'w3-total-cache'); ?></label>)
18
- <?php echo sprintf(__('and login to wordpress.org to give us a great %srating%s', 'w3-total-cache'),'<input type="button" class="button button-rating" value="', '" />.') ?>
19
- </p>
20
-
21
- <div style="text-align: center;">
22
- <h3><?php _e('Thanks in advance!', 'w3-total-cache'); ?></h3>
23
- <p>
24
- <?php echo $this->nonce_field('w3tc'); ?>
25
- <input type="submit" class="button-primary" value="<?php _e('Save &amp; close', 'w3-total-cache'); ?>"> or
26
- <?php echo w3_button_hide_note(__('Don\'t show this prompt again', 'w3-total-cache'), 'support_us'); ?>
27
- </p>
28
- </div>
29
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <div id="w3tc-support-us">
3
+ <div class="w3tc-overlay-logo"></div>
4
+ <header>
5
+ <div class="left" style="float:left">
6
+ <h2>Frederick Townes</h2>
7
+ <h3>CEO, W3 EDGE</h3>
8
+ </div>
9
+ <div class="right" style="float:right">
10
+ <div style="display: inline-block">
11
+ <iframe height="21" width="100" src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2FW3EDGE&amp;width=100&amp;height=21&amp;colorscheme=light&amp;layout=button_count&amp;action=like&amp;show_faces=true&amp;send=false&amp;appId=53494339074" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
12
+ </div>
13
+ <div style="display: inline-block; margin-left: 10px;">
14
+ <a href="https://twitter.com/w3edge" class="twitter-follow-button" data-show-count="true" data-show-screen-name="false">Follow @w3edge</a>
15
+ <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
16
+ </div>
17
+ <div style="display: inline-block; margin-left: 10px;">
18
+ <!-- Place this tag where you want the widget to render. -->
19
+ <div class="g-follow" data-annotation="bubble" data-height="20" data-href="https://plus.google.com/106009620651385224281" data-rel="author"></div>
20
+ <!-- Place this tag after the last widget tag. -->
21
+ <script type="text/javascript">
22
+ (function() {
23
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
24
+ po.src = 'https://apis.google.com/js/plusone.js';
25
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
26
+ })();
27
+ </script>
28
+ </div>
29
+ </div>
30
+ </header>
31
+ <form action="<?php echo w3_admin_url('admin.php?page=' . $this->_page); ?>&amp;w3tc_config_save_support_us" method="post">
32
+
33
+ <div class="content">
34
+ <h3 class="font-palette-dark-skies"><?php _e('Support Us, It\'s Free!', 'w3-total-cache'); ?></h3>
35
+
36
+ <p><?php _e('We noticed you\'ve been using W3 Total cache for at least 30 days, please help us improve WordPress:', 'w3-total-cache'); ?></p>
37
+ <ul>
38
+ <li>
39
+ <label>
40
+ Link to us: <br />
41
+ <div class="styled-select">
42
+ <select name="support" class="w3tc-size select">
43
+ <option value=""><?php esc_attr_e('select location', 'w3-total-cache'); ?></option>
44
+ <?php foreach ($supports as $support_id => $support_name): ?>
45
+ <option value="<?php echo esc_attr($support_id); ?>"<?php echo selected($this->_config->get_string('common.support'), $support_id); ?>><?php echo htmlspecialchars($support_name); ?></option>
46
+ <?php endforeach; ?>
47
+ </select>
48
+ </div>
49
+ </label>
50
+ </li>
51
+ <li>
52
+ <label>Send a tweet:<br />
53
+ <?php
54
+ $tweet_url = 'http://twitter.com/home/?status=I use W3 Total Cache you should too, via @w3edge';
55
+ echo w3tc_action_button(__('Tell Your Friends', 'w3-total-cache'), $tweet_url, "btn w3tc-size image btn-default palette-twitter") ?>
56
+ </label>
57
+ </li>
58
+ <li>
59
+ <label>
60
+ Login to wordpress.org to give us a great rating:<br>
61
+ <?php
62
+ $wp_url = 'http://wordpress.org/support/view/plugin-reviews/w3-total-cache';
63
+ echo w3tc_action_button(__('Login & Rate Us', 'w3-total-cache'), $wp_url, "btn w3tc-size image btn-default palette-wordpress") ?>
64
+ </label>
65
+ </li>
66
+ </ul>
67
+ <p>
68
+ <label class="w3tc_signup_email" for="email">You can also sign up for our newsletter:<br />
69
+ <input id="email" name="email" type="text" class="form-control w3tc-size" value="<?php esc_attr_e($email) ?>"></label><br />
70
+ <input type="checkbox" name="signmeup" id="signmeup" class="css-checkbox" value="1" checked="checked" /><label for="signmeup" class="css-label"> <?php _e('Yes, sign me up.', 'w3-total-cache') ?> </label>
71
+ </p>
72
+ </div>
73
+ <div class="footer">
74
+ <p>
75
+ <?php wp_nonce_field('w3tc') ?>
76
+ <input type="submit" class="btn w3tc-size image btn-primary outset save palette-turquoise " value="Save &amp; close">
77
+ <?php
78
+ echo w3tc_cancel_button('support_us', 'btn w3tc-size btn-default outset palette-light-grey')
79
+ ?>
80
+ </p>
81
+ </div>
82
+ </form>
83
+ </div>
inc/lightbox/upgrade.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <div id="w3tc-upgrade">
3
+ <div class="w3tc-overlay-logo"></div>
4
+ <header>
5
+ <div>
6
+ <div class="left" style="float:left">
7
+ <h2>W3 Total Cache Pro unlocks more performance options for any website:</h2>
8
+ </div>
9
+ <div class="right" style="float:right">
10
+ <h2>only $99 <span>/year</span></h2>
11
+ </div>
12
+ </div>
13
+ <div class="description">
14
+ <img src="<?php echo plugins_url('pub/img/overlay/w3-meteor.png', W3TC_FILE) ?>" />
15
+ <ul>
16
+ <li><strong>Fragment Caching Module</strong><br>
17
+ Unlocking the fragment caching module delivered enhanced performance for plugins and themes that use the WordPress Transient API. It also provides a framework for increasing for developers that specifically use it like StudioPress' Genesis Framework.</li>
18
+ <li>
19
+ <strong>Exclusive Extensions</strong><br>
20
+ Unlock up to 60% performance improvement in the Genesis Theme Framework by StudioPress using the extension for W3TC's Fragment Caching Module. </li>
21
+ <li>
22
+ <strong>Full Site Content Delivery Network (CDN) Mirroring</strong><br>
23
+ Upcoming: Provide the best user experience possible by enhancing by hosting HTML pages and RSS feeds with (supported CDNs) high performance global networks. </li>
24
+ </ul>
25
+ </div>
26
+ </header>
27
+ <div class="content">
28
+ </div>
29
+ <div class="footer">
30
+ <input id="w3tc-purchase" type="button" class="btn w3tc-size image btn-default palette-turquoise secure" value="<?php _e('Subscribe to Go Faster Now', 'w3-total-cache') ?> " />
31
+ </div>
32
+ </div>
inc/mime/all.php CHANGED
@@ -1,625 +1,626 @@
1
- <?php
2
-
3
- /**
4
- * All possible mime types
5
- */
6
- return array(
7
- '3dml' => 'text/vnd.in3d.3dml',
8
- '3g2' => 'video/3gpp2',
9
- '3gp' => 'video/3gpp',
10
- 'aab|x32|u32|vox' => 'application/x-authorware-bin',
11
- 'aac' => 'audio/x-aac',
12
- 'aam' => 'application/x-authorware-map',
13
- 'aas' => 'application/x-authorware-seg',
14
- 'abw' => 'application/x-abiword',
15
- 'acc' => 'application/vnd.americandynamics.acc',
16
- 'ace' => 'application/x-ace-compressed',
17
- 'acu' => 'application/vnd.acucobol',
18
- 'adp' => 'audio/adpcm',
19
- 'aep' => 'application/vnd.audiograph',
20
- 'afp|listafp|list3820' => 'application/vnd.ibm.modcap',
21
- 'aif|aiff|aifc' => 'audio/x-aiff',
22
- 'air' => 'application/vnd.adobe.air-application-installer-package+zip',
23
- 'ai|eps|ps' => 'application/postscript',
24
- 'ami' => 'application/vnd.amiga.ami',
25
- 'apk' => 'application/vnd.android.package-archive',
26
- 'application' => 'application/x-ms-application',
27
- 'apr' => 'application/vnd.lotus-approach',
28
- 'asc|sig' => 'application/pgp-signature',
29
- 'asf|asx' => 'video/x-ms-asf',
30
- 'aso' => 'application/vnd.accpac.simply.aso',
31
- 'atc|acutc' => 'application/vnd.acucorp',
32
- 'atom' => 'application/atom+xml',
33
- 'atomcat' => 'application/atomcat+xml',
34
- 'atomsvc' => 'application/atomsvc+xml',
35
- 'atx' => 'application/vnd.antix.game-component',
36
- 'au|snd' => 'audio/basic',
37
- 'avi' => 'video/x-msvideo',
38
- 'aw' => 'application/applixware',
39
- 'azf' => 'application/vnd.airzip.filesecure.azf',
40
- 'azs' => 'application/vnd.airzip.filesecure.azs',
41
- 'azw' => 'application/vnd.amazon.ebook',
42
- 'bcpio' => 'application/x-bcpio',
43
- 'bdf' => 'application/x-font-bdf',
44
- 'bdm' => 'application/vnd.syncml.dm+wbxml',
45
- 'bh2' => 'application/vnd.fujitsu.oasysprs',
46
- 'bin|dms|lha|lrf|lzh|so|iso|dmg|dist|distz|pkg|bpk|dump|elc|deploy' => 'application/octet-stream',
47
- 'bmi' => 'application/vnd.bmi',
48
- 'bmp' => 'image/bmp',
49
- 'box' => 'application/vnd.previewsystems.box',
50
- 'btif' => 'image/prs.btif',
51
- 'bz' => 'application/x-bzip',
52
- 'bz2|boz' => 'application/x-bzip2',
53
- 'c4g|c4d|c4f|c4p|c4u' => 'application/vnd.clonk.c4group',
54
- 'cab' => 'application/vnd.ms-cab-compressed',
55
- 'car' => 'application/vnd.curl.car',
56
- 'cat' => 'application/vnd.ms-pki.seccat',
57
- 'ccxml' => 'application/ccxml+xml',
58
- 'cdbcmsg' => 'application/vnd.contact.cmsg',
59
- 'cdkey' => 'application/vnd.mediastation.cdkey',
60
- 'cdx' => 'chemical/x-cdx',
61
- 'cdxml' => 'application/vnd.chemdraw+xml',
62
- 'cdy' => 'application/vnd.cinderella',
63
- 'cer' => 'application/pkix-cert',
64
- 'cgm' => 'image/cgm',
65
- 'chat' => 'application/x-chat',
66
- 'chm' => 'application/vnd.ms-htmlhelp',
67
- 'chrt' => 'application/vnd.kde.kchart',
68
- 'cif' => 'chemical/x-cif',
69
- 'cii' => 'application/vnd.anser-web-certificate-issue-initiation',
70
- 'cil' => 'application/vnd.ms-artgalry',
71
- 'cla' => 'application/vnd.claymore',
72
- 'class' => 'application/java-vm',
73
- 'clkk' => 'application/vnd.crick.clicker.keyboard',
74
- 'clkp' => 'application/vnd.crick.clicker.palette',
75
- 'clkt' => 'application/vnd.crick.clicker.template',
76
- 'clkw' => 'application/vnd.crick.clicker.wordbank',
77
- 'clkx' => 'application/vnd.crick.clicker',
78
- 'clp' => 'application/x-msclip',
79
- 'cmc' => 'application/vnd.cosmocaller',
80
- 'cmdf' => 'chemical/x-cmdf',
81
- 'cml' => 'chemical/x-cml',
82
- 'cmp' => 'application/vnd.yellowriver-custom-menu',
83
- 'cmx' => 'image/x-cmx',
84
- 'cod' => 'application/vnd.rim.cod',
85
- 'cpio' => 'application/x-cpio',
86
- 'cpt' => 'application/mac-compactpro',
87
- 'crd' => 'application/x-mscardfile',
88
- 'crl' => 'application/pkix-crl',
89
- 'csh' => 'application/x-csh',
90
- 'csml' => 'chemical/x-csml',
91
- 'csp' => 'application/vnd.commonspace',
92
- 'css' => 'text/css',
93
- 'csv' => 'text/csv',
94
- 'cu' => 'application/cu-seeme',
95
- 'curl' => 'text/vnd.curl',
96
- 'cww' => 'application/prs.cww',
97
- 'c|cc|cxx|cpp|h|hh|dic' => 'text/x-c',
98
- 'daf' => 'application/vnd.mobius.daf',
99
- 'davmount' => 'application/davmount+xml',
100
- 'dcurl' => 'text/vnd.curl.dcurl',
101
- 'dd2' => 'application/vnd.oma.dd2+xml',
102
- 'ddd' => 'application/vnd.fujixerox.ddd',
103
- 'deb|udeb' => 'application/x-debian-package',
104
- 'der|crt' => 'application/x-x509-ca-cert',
105
- 'df' => 'application/x-deflate',
106
- 'dfac' => 'application/vnd.dreamfactory',
107
- 'dir|dcr|dxr|cst|cct|cxt|w3d|fgd|swa' => 'application/x-director',
108
- 'dis' => 'application/vnd.mobius.dis',
109
- 'djvu|djv' => 'image/vnd.djvu',
110
- 'dna' => 'application/vnd.dna',
111
- 'docm' => 'application/vnd.ms-word.document.macroenabled.12',
112
- 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
113
- 'doc|dot' => 'application/msword',
114
- 'dotm' => 'application/vnd.ms-word.template.macroenabled.12',
115
- 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
116
- 'dp' => 'application/vnd.osgi.dp',
117
- 'dpg' => 'application/vnd.dpgraph',
118
- 'dsc' => 'text/prs.lines.tag',
119
- 'dtb' => 'application/x-dtbook+xml',
120
- 'dtd' => 'application/xml-dtd',
121
- 'dts' => 'audio/vnd.dts',
122
- 'dtshd' => 'audio/vnd.dts.hd',
123
- 'dvi' => 'application/x-dvi',
124
- 'dwf' => 'model/vnd.dwf',
125
- 'dwg' => 'image/vnd.dwg',
126
- 'dxf' => 'image/vnd.dxf',
127
- 'dxp' => 'application/vnd.spotfire.dxp',
128
- 'ecelp4800' => 'audio/vnd.nuera.ecelp4800',
129
- 'ecelp7470' => 'audio/vnd.nuera.ecelp7470',
130
- 'ecelp9600' => 'audio/vnd.nuera.ecelp9600',
131
- 'ecma' => 'application/ecmascript',
132
- 'edm' => 'application/vnd.novadigm.edm',
133
- 'edx' => 'application/vnd.novadigm.edx',
134
- 'efif' => 'application/vnd.picsel',
135
- 'ei6' => 'application/vnd.pg.osasli',
136
- 'eml|all' => 'message/rfc822',
137
- 'emma' => 'application/emma+xml',
138
- 'eol' => 'audio/vnd.digital-winds',
139
- 'eot' => 'application/vnd.ms-fontobject',
140
- 'epub' => 'application/epub+zip',
141
- 'es3|et3' => 'application/vnd.eszigno3+xml',
142
- 'esf' => 'application/vnd.epson.esf',
143
- 'etx' => 'text/x-setext',
144
- 'exe|dll|com|bat|msi' => 'application/x-msdownload',
145
- 'ext' => 'application/vnd.novadigm.ext',
146
- 'ez' => 'application/andrew-inset',
147
- 'ez2' => 'application/vnd.ezpix-album',
148
- 'ez3' => 'application/vnd.ezpix-package',
149
- 'f4v' => 'video/x-f4v',
150
- 'fbs' => 'image/vnd.fastbidsheet',
151
- 'fdf' => 'application/vnd.fdf',
152
- 'fe_launch' => 'application/vnd.denovo.fcselayout-link',
153
- 'fg5' => 'application/vnd.fujitsu.oasysgp',
154
- 'fh|fhc|fh4|fh5|fh7' => 'image/x-freehand',
155
- 'fig' => 'application/x-xfig',
156
- 'fli' => 'video/x-fli',
157
- 'flo' => 'application/vnd.micrografx.flo',
158
- 'flv' => 'video/x-flv',
159
- 'flw' => 'application/vnd.kde.kivio',
160
- 'flx' => 'text/vnd.fmi.flexstor',
161
- 'fly' => 'text/vnd.fly',
162
- 'fm|frame|maker|book' => 'application/vnd.framemaker',
163
- 'fnc' => 'application/vnd.frogans.fnc',
164
- 'fpx' => 'image/vnd.fpx',
165
- 'fsc' => 'application/vnd.fsc.weblaunch',
166
- 'fst' => 'image/vnd.fst',
167
- 'ftc' => 'application/vnd.fluxtime.clip',
168
- 'fti' => 'application/vnd.anser-web-funds-transfer-initiation',
169
- 'fvt' => 'video/vnd.fvt',
170
- 'fzs' => 'application/vnd.fuzzysheet',
171
- 'f|for|f77|f90' => 'text/x-fortran',
172
- 'g3' => 'image/g3fax',
173
- 'gac' => 'application/vnd.groove-account',
174
- 'gdl' => 'model/vnd.gdl',
175
- 'geo' => 'application/vnd.dynageo',
176
- 'gex|gre' => 'application/vnd.geometry-explorer',
177
- 'ggb' => 'application/vnd.geogebra.file',
178
- 'ggt' => 'application/vnd.geogebra.tool',
179
- 'ghf' => 'application/vnd.groove-help',
180
- 'gif' => 'image/gif',
181
- 'gim' => 'application/vnd.groove-identity-message',
182
- 'gmx' => 'application/vnd.gmx',
183
- 'gnumeric' => 'application/x-gnumeric',
184
- 'gph' => 'application/vnd.flographit',
185
- 'gqf|gqs' => 'application/vnd.grafeq',
186
- 'gram' => 'application/srgs',
187
- 'grv' => 'application/vnd.groove-injector',
188
- 'grxml' => 'application/srgs+xml',
189
- 'gsf' => 'application/x-font-ghostscript',
190
- 'gtar' => 'application/x-gtar',
191
- 'gtm' => 'application/vnd.groove-tool-message',
192
- 'gtw' => 'model/vnd.gtw',
193
- 'gv' => 'text/vnd.graphviz',
194
- 'gz' => 'application/x-gzip',
195
- 'h261' => 'video/h261',
196
- 'h263' => 'video/h263',
197
- 'h264' => 'video/h264',
198
- 'hbci' => 'application/vnd.hbci',
199
- 'hdf' => 'application/x-hdf',
200
- 'hlp' => 'application/winhlp',
201
- 'hpgl' => 'application/vnd.hp-hpgl',
202
- 'hpid' => 'application/vnd.hp-hpid',
203
- 'hps' => 'application/vnd.hp-hps',
204
- 'hqx' => 'application/mac-binhex40',
205
- 'htc' => 'text/x-component',
206
- 'htke' => 'application/vnd.kenameaapp',
207
- 'html|htm' => 'text/html',
208
- 'hvd' => 'application/vnd.yamaha.hv-dic',
209
- 'hvp' => 'application/vnd.yamaha.hv-voice',
210
- 'hvs' => 'application/vnd.yamaha.hv-script',
211
- 'icc|icm' => 'application/vnd.iccprofile',
212
- 'ice' => 'x-conference/x-cooltalk',
213
- 'ico' => 'image/x-icon',
214
- 'ics|ifb' => 'text/calendar',
215
- 'ief' => 'image/ief',
216
- 'ifm' => 'application/vnd.shana.informed.formdata',
217
- 'igl' => 'application/vnd.igloader',
218
- 'igs|iges' => 'model/iges',
219
- 'igx' => 'application/vnd.micrografx.igx',
220
- 'iif' => 'application/vnd.shana.informed.interchange',
221
- 'imp' => 'application/vnd.accpac.simply.imp',
222
- 'ims' => 'application/vnd.ms-ims',
223
- 'ipk' => 'application/vnd.shana.informed.package',
224
- 'irm' => 'application/vnd.ibm.rights-management',
225
- 'irp' => 'application/vnd.irepository.package+xml',
226
- 'itp' => 'application/vnd.shana.informed.formtemplate',
227
- 'ivp' => 'application/vnd.immervision-ivp',
228
- 'ivu' => 'application/vnd.immervision-ivu',
229
- 'jad' => 'text/vnd.sun.j2me.app-descriptor',
230
- 'jam' => 'application/vnd.jam',
231
- 'jar' => 'application/java-archive',
232
- 'java' => 'text/x-java-source',
233
- 'jisp' => 'application/vnd.jisp',
234
- 'jlt' => 'application/vnd.hp-jlyt',
235
- 'jnlp' => 'application/x-java-jnlp-file',
236
- 'joda' => 'application/vnd.joost.joda-archive',
237
- 'jpeg|jpg|jpe' => 'image/jpeg',
238
- 'jpgv' => 'video/jpeg',
239
- 'jpm|jpgm' => 'video/jpm',
240
- 'js' => 'application/x-javascript',
241
- 'json' => 'application/json',
242
- 'karbon' => 'application/vnd.kde.karbon',
243
- 'kfo' => 'application/vnd.kde.kformula',
244
- 'kia' => 'application/vnd.kidspiration',
245
- 'kml' => 'application/vnd.google-earth.kml+xml',
246
- 'kmz' => 'application/vnd.google-earth.kmz',
247
- 'kne|knp' => 'application/vnd.kinar',
248
- 'kon' => 'application/vnd.kde.kontour',
249
- 'kpr|kpt' => 'application/vnd.kde.kpresenter',
250
- 'ksp' => 'application/vnd.kde.kspread',
251
- 'ktz|ktr' => 'application/vnd.kahootz',
252
- 'kwd|kwt' => 'application/vnd.kde.kword',
253
- 'latex' => 'application/x-latex',
254
- 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop',
255
- 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml',
256
- 'les' => 'application/vnd.hhe.lesson-player',
257
- 'link66' => 'application/vnd.route66.link66+xml',
258
- 'lostxml' => 'application/lost+xml',
259
- 'lrm' => 'application/vnd.ms-lrm',
260
- 'ltf' => 'application/vnd.frogans.ltf',
261
- 'lvp' => 'audio/vnd.lucent.voice',
262
- 'lwp' => 'application/vnd.lotus-wordpro',
263
- 'm3u' => 'audio/x-mpegurl',
264
- 'm4v' => 'video/x-m4v',
265
- 'mag' => 'application/vnd.ecowin.chart',
266
- 'mathml' => 'application/mathml+xml',
267
- 'ma|nb|mb' => 'application/mathematica',
268
- 'mbk' => 'application/vnd.mobius.mbk',
269
- 'mbox' => 'application/mbox',
270
- 'mc1' => 'application/vnd.medcalcdata',
271
- 'mcd' => 'application/vnd.mcd',
272
- 'mcurl' => 'text/vnd.curl.mcurl',
273
- 'mdb' => 'application/x-msaccess',
274
- 'mdi' => 'image/vnd.ms-modi',
275
- 'mfm' => 'application/vnd.mfmp',
276
- 'mgz' => 'application/vnd.proteus.magazine',
277
- 'mid|midi|kar|rmi' => 'audio/midi',
278
- 'mif' => 'application/vnd.mif',
279
- 'mj2|mjp2' => 'video/mj2',
280
- 'mlp' => 'application/vnd.dolby.mlp',
281
- 'mmd' => 'application/vnd.chipnuts.karaoke-mmd',
282
- 'mmf' => 'application/vnd.smaf',
283
- 'mmr' => 'image/vnd.fujixerox.edmics-mmr',
284
- 'mny' => 'application/x-msmoney',
285
- 'movie' => 'video/x-sgi-movie',
286
- 'mp4a' => 'audio/mp4',
287
- 'mp4s' => 'application/mp4',
288
- 'mp4|mp4v|mpg4' => 'video/mp4',
289
- 'mpc' => 'application/vnd.mophun.certificate',
290
- 'mpeg|mpg|mpe|m1v|m2v' => 'video/mpeg',
291
- 'mpga|mp2|mp2a|mp3|m2a|m3a' => 'audio/mpeg',
292
- 'mpkg' => 'application/vnd.apple.installer+xml',
293
- 'mpm' => 'application/vnd.blueice.multipass',
294
- 'mpn' => 'application/vnd.mophun.application',
295
- 'mpp|mpt' => 'application/vnd.ms-project',
296
- 'mpy' => 'application/vnd.ibm.minipay',
297
- 'mqy' => 'application/vnd.mobius.mqy',
298
- 'mrc' => 'application/marc',
299
- 'mscml' => 'application/mediaservercontrol+xml',
300
- 'mseed' => 'application/vnd.fdsn.mseed',
301
- 'mseq' => 'application/vnd.mseq',
302
- 'msf' => 'application/vnd.epson.msf',
303
- 'msh|mesh|silo' => 'model/mesh',
304
- 'msl' => 'application/vnd.mobius.msl',
305
- 'msty' => 'application/vnd.muvee.style',
306
- 'mts' => 'model/vnd.mts',
307
- 'mus' => 'application/vnd.musician',
308
- 'musicxml' => 'application/vnd.recordare.musicxml+xml',
309
- 'mvb|m13|m14' => 'application/x-msmediaview',
310
- 'mwf' => 'application/vnd.mfer',
311
- 'mxf' => 'application/mxf',
312
- 'mxl' => 'application/vnd.recordare.musicxml',
313
- 'mxml|xhvml|xvml|xvm' => 'application/xv+xml',
314
- 'mxs' => 'application/vnd.triscape.mxs',
315
- 'mxu|m4u' => 'video/vnd.mpegurl',
316
- 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install',
317
- 'ncx' => 'application/x-dtbncx+xml',
318
- 'nc|cdf' => 'application/x-netcdf',
319
- 'ngdat' => 'application/vnd.nokia.n-gage.data',
320
- 'nlu' => 'application/vnd.neurolanguage.nlu',
321
- 'nml' => 'application/vnd.enliven',
322
- 'nnd' => 'application/vnd.noblenet-directory',
323
- 'nns' => 'application/vnd.noblenet-sealer',
324
- 'nnw' => 'application/vnd.noblenet-web',
325
- 'npx' => 'image/vnd.net-fpx',
326
- 'nsf' => 'application/vnd.lotus-notes',
327
- 'oa2' => 'application/vnd.fujitsu.oasys2',
328
- 'oa3' => 'application/vnd.fujitsu.oasys3',
329
- 'oas' => 'application/vnd.fujitsu.oasys',
330
- 'obd' => 'application/x-msbinder',
331
- 'oda' => 'application/oda',
332
- 'odb' => 'application/vnd.oasis.opendocument.database',
333
- 'odc' => 'application/vnd.oasis.opendocument.chart',
334
- 'odf' => 'application/vnd.oasis.opendocument.formula',
335
- 'odft' => 'application/vnd.oasis.opendocument.formula-template',
336
- 'odg' => 'application/vnd.oasis.opendocument.graphics',
337
- 'odi' => 'application/vnd.oasis.opendocument.image',
338
- 'odp' => 'application/vnd.oasis.opendocument.presentation',
339
- 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
340
- 'odt' => 'application/vnd.oasis.opendocument.text',
341
- 'oga|ogg|spx' => 'audio/ogg',
342
- 'ogv' => 'video/ogg',
343
- 'ogx' => 'application/ogg',
344
- 'onetoc|onetoc2|onetmp|onepkg' => 'application/onenote',
345
- 'opf' => 'application/oebps-package+xml',
346
- 'org' => 'application/vnd.lotus-organizer',
347
- 'osf' => 'application/vnd.yamaha.openscoreformat',
348
- 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml',
349
- 'otc' => 'application/vnd.oasis.opendocument.chart-template',
350
- 'otf' => 'application/x-font-otf',
351
- 'otg' => 'application/vnd.oasis.opendocument.graphics-template',
352
- 'oth' => 'application/vnd.oasis.opendocument.text-web',
353
- 'oti' => 'application/vnd.oasis.opendocument.image-template',
354
- 'otm' => 'application/vnd.oasis.opendocument.text-master',
355
- 'otp' => 'application/vnd.oasis.opendocument.presentation-template',
356
- 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
357
- 'ott' => 'application/vnd.oasis.opendocument.text-template',
358
- 'oxt' => 'application/vnd.openofficeorg.extension',
359
- 'p10' => 'application/pkcs10',
360
- 'p12|pfx' => 'application/x-pkcs12',
361
- 'p7b|spc' => 'application/x-pkcs7-certificates',
362
- 'p7m|p7c' => 'application/pkcs7-all',
363
- 'p7r' => 'application/x-pkcs7-certreqresp',
364
- 'p7s' => 'application/pkcs7-signature',
365
- 'pbd' => 'application/vnd.powerbuilder6',
366
- 'pbm' => 'image/x-portable-bitmap',
367
- 'pcf' => 'application/x-font-pcf',
368
- 'pcl' => 'application/vnd.hp-pcl',
369
- 'pclxl' => 'application/vnd.hp-pclxl',
370
- 'pcurl' => 'application/vnd.curl.pcurl',
371
- 'pcx' => 'image/x-pcx',
372
- 'pdb|pqa|oprc' => 'application/vnd.palm',
373
- 'pdf' => 'application/pdf',
374
- 'pfa|pfb|pfm|afm' => 'application/x-font-type1',
375
- 'pfr' => 'application/font-tdpfr',
376
- 'pgm' => 'image/x-portable-graymap',
377
- 'pgn' => 'application/x-chess-pgn',
378
- 'pgp' => 'application/pgp-encrypted',
379
- 'pic|pct' => 'image/x-pict',
380
- 'pki' => 'application/pkixcmp',
381
- 'pkipath' => 'application/pkix-pkipath',
382
- 'plb' => 'application/vnd.3gpp.pic-bw-large',
383
- 'plc' => 'application/vnd.mobius.plc',
384
- 'plf' => 'application/vnd.pocketlearn',
385
- 'pls' => 'application/pls+xml',
386
- 'pml' => 'application/vnd.ctc-posml',
387
- 'png' => 'image/png',
388
- 'pnm' => 'image/x-portable-anymap',
389
- 'portpkg' => 'application/vnd.macports.portpkg',
390
- 'potm' => 'application/vnd.ms-powerpoint.template.macroenabled.12',
391
- 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
392
- 'ppam' => 'application/vnd.ms-powerpoint.addin.macroenabled.12',
393
- 'ppd' => 'application/vnd.cups-ppd',
394
- 'ppm' => 'image/x-portable-pixmap',
395
- 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroenabled.12',
396
- 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
397
- 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroenabled.12',
398
- 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
399
- 'ppt|pps|pot' => 'application/vnd.ms-powerpoint',
400
- 'prc|mobi' => 'application/x-mobipocket-ebook',
401
- 'pre' => 'application/vnd.lotus-freelance',
402
- 'prf' => 'application/pics-rules',
403
- 'psb' => 'application/vnd.3gpp.pic-bw-small',
404
- 'psd' => 'image/vnd.adobe.photoshop',
405
- 'psf' => 'application/x-font-linux-psf',
406
- 'ptid' => 'application/vnd.pvi.ptid1',
407
- 'pub' => 'application/x-mspublisher',
408
- 'pvb' => 'application/vnd.3gpp.pic-bw-var',
409
- 'pwn' => 'application/vnd.3m.post-it-notes',
410
- 'pya' => 'audio/vnd.ms-playready.media.pya',
411
- 'pyv' => 'video/vnd.ms-playready.media.pyv',
412
- 'p|pas' => 'text/x-pascal',
413
- 'qam' => 'application/vnd.epson.quickanime',
414
- 'qbo' => 'application/vnd.intu.qbo',
415
- 'qfx' => 'application/vnd.intu.qfx',
416
- 'qps' => 'application/vnd.publishare-delta-tree',
417
- 'qt|mov' => 'video/quicktime',
418
- 'qxd|qxt|qwd|qwt|qxl|qxb' => 'application/vnd.quark.quarkxpress',
419
- 'ram|ra' => 'audio/x-pn-realaudio',
420
- 'rar' => 'application/x-rar-compressed',
421
- 'ras' => 'image/x-cmu-raster',
422
- 'rcprofile' => 'application/vnd.ipunplugged.rcprofile',
423
- 'rdf' => 'application/rdf+xml',
424
- 'rdz' => 'application/vnd.data-vision.rdz',
425
- 'rep' => 'application/vnd.businessobjects',
426
- 'res' => 'application/x-dtbresource+xml',
427
- 'rgb' => 'image/x-rgb',
428
- 'rif' => 'application/reginfo+xml',
429
- 'rl' => 'application/resource-lists+xml',
430
- 'rlc' => 'image/vnd.fujixerox.edmics-rlc',
431
- 'rld' => 'application/resource-lists-diff+xml',
432
- 'rm' => 'application/vnd.rn-realmedia',
433
- 'rmp' => 'audio/x-pn-realaudio-plugin',
434
- 'rms' => 'application/vnd.jcp.javame.midlet-rms',
435
- 'rnc' => 'application/relax-ng-compact-syntax',
436
- 'rpss' => 'application/vnd.nokia.radio-presets',
437
- 'rpst' => 'application/vnd.nokia.radio-preset',
438
- 'rq' => 'application/sparql-query',
439
- 'rs' => 'application/rls-services+xml',
440
- 'rsd' => 'application/rsd+xml',
441
- 'rss' => 'application/rss+xml',
442
- 'rtf' => 'application/rtf',
443
- 'rtx' => 'text/richtext',
444
- 'saf' => 'application/vnd.yamaha.smaf-audio',
445
- 'sbml' => 'application/sbml+xml',
446
- 'sc' => 'application/vnd.ibm.secure-container',
447
- 'scd' => 'application/x-msschedule',
448
- 'scm' => 'application/vnd.lotus-screencam',
449
- 'scq' => 'application/scvp-cv-request',
450
- 'scs' => 'application/scvp-cv-response',
451
- 'scurl' => 'text/vnd.curl.scurl',
452
- 'sda' => 'application/vnd.stardivision.draw',
453
- 'sdc' => 'application/vnd.stardivision.calc',
454
- 'sdd' => 'application/vnd.stardivision.impress',
455
- 'sdkm|sdkd' => 'application/vnd.solent.sdkm+xml',
456
- 'sdp' => 'application/sdp',
457
- 'sdw' => 'application/vnd.stardivision.writer',
458
- 'see' => 'application/vnd.seemail',
459
- 'seed|dataless' => 'application/vnd.fdsn.seed',
460
- 'sema' => 'application/vnd.sema',
461
- 'semd' => 'application/vnd.semd',
462
- 'semf' => 'application/vnd.semf',
463
- 'ser' => 'application/java-serialized-object',
464
- 'setpay' => 'application/set-payment-initiation',
465
- 'setreg' => 'application/set-registration-initiation',
466
- 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data',
467
- 'sfs' => 'application/vnd.spotfire.sfs',
468
- 'sgl' => 'application/vnd.stardivision.writer-global',
469
- 'sgml|sgm' => 'text/sgml',
470
- 'sh' => 'application/x-sh',
471
- 'shar' => 'application/x-shar',
472
- 'shf' => 'application/shf+xml',
473
- 'sis|sisx' => 'application/vnd.symbian.install',
474
- 'sit' => 'application/x-stuffit',
475
- 'sitx' => 'application/x-stuffitx',
476
- 'skp|skd|skt|skm' => 'application/vnd.koan',
477
- 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12',
478
- 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
479
- 'slt' => 'application/vnd.epson.salt',
480
- 'smf' => 'application/vnd.stardivision.math',
481
- 'smi|smil' => 'application/smil+xml',
482
- 'snf' => 'application/x-font-snf',
483
- 'spf' => 'application/vnd.yamaha.smaf-phrase',
484
- 'spl' => 'application/x-futuresplash',
485
- 'spot' => 'text/vnd.in3d.spot',
486
- 'spp' => 'application/scvp-vp-response',
487
- 'spq' => 'application/scvp-vp-request',
488
- 'src' => 'application/x-wais-source',
489
- 'srx' => 'application/sparql-results+xml',
490
- 'sse' => 'application/vnd.kodak-descriptor',
491
- 'ssf' => 'application/vnd.epson.ssf',
492
- 'ssml' => 'application/ssml+xml',
493
- 'stc' => 'application/vnd.sun.xml.calc.template',
494
- 'std' => 'application/vnd.sun.xml.draw.template',
495
- 'stf' => 'application/vnd.wt.stf',
496
- 'sti' => 'application/vnd.sun.xml.impress.template',
497
- 'stk' => 'application/hyperstudio',
498
- 'stl' => 'application/vnd.ms-pki.stl',
499
- 'str' => 'application/vnd.pg.format',
500
- 'stw' => 'application/vnd.sun.xml.writer.template',
501
- 'sus|susp' => 'application/vnd.sus-calendar',
502
- 'sv4cpio' => 'application/x-sv4cpio',
503
- 'sv4crc' => 'application/x-sv4crc',
504
- 'svd' => 'application/vnd.svd',
505
- 'svg|svgz' => 'image/svg+xml',
506
- 'swf' => 'application/x-shockwave-flash',
507
- 'swi' => 'application/vnd.arastra.swi',
508
- 'sxc' => 'application/vnd.sun.xml.calc',
509
- 'sxd' => 'application/vnd.sun.xml.draw',
510
- 'sxg' => 'application/vnd.sun.xml.writer.global',
511
- 'sxi' => 'application/vnd.sun.xml.impress',
512
- 'sxm' => 'application/vnd.sun.xml.math',
513
- 'sxw' => 'application/vnd.sun.xml.writer',
514
- 's|asm' => 'text/x-asm',
515
- 'tao' => 'application/vnd.tao.intent-module-archive',
516
- 'tar' => 'application/x-tar',
517
- 'tcap' => 'application/vnd.3gpp2.tcap',
518
- 'tcl' => 'application/x-tcl',
519
- 'teacher' => 'application/vnd.smart.teacher',
520
- 'tex' => 'application/x-tex',
521
- 'texinfo|texi' => 'application/x-texinfo',
522
- 'tfm' => 'application/x-tex-tfm',
523
- 'tiff|tif' => 'image/tiff',
524
- 'tmo' => 'application/vnd.tmobile-livetv',
525
- 'torrent' => 'application/x-bittorrent',
526
- 'tpl' => 'application/vnd.groove-tool-template',
527
- 'tpt' => 'application/vnd.trid.tpt',
528
- 'tra' => 'application/vnd.trueapp',
529
- 'trm' => 'application/x-msterminal',
530
- 'tsv' => 'text/tab-separated-values',
531
- 'ttf|ttc' => 'application/x-font-ttf',
532
- 'twd|twds' => 'application/vnd.simtech-mindmapper',
533
- 'txd' => 'application/vnd.genomatix.tuxedo',
534
- 'txf' => 'application/vnd.mobius.txf',
535
- 'txt|text|conf|def|list|log|in' => 'text/plain',
536
- 't|tr|roff|man|me|ms' => 'text/troff',
537
- 'ufd|ufdl' => 'application/vnd.ufdl',
538
- 'umj' => 'application/vnd.umajin',
539
- 'unityweb' => 'application/vnd.unity',
540
- 'uoml' => 'application/vnd.uoml+xml',
541
- 'uri|uris|urls' => 'text/uri-list',
542
- 'ustar' => 'application/x-ustar',
543
- 'utz' => 'application/vnd.uiq.theme',
544
- 'uu' => 'text/x-uuencode',
545
- 'vcd' => 'application/x-cdlink',
546
- 'vcf' => 'text/x-vcard',
547
- 'vcg' => 'application/vnd.groove-vcard',
548
- 'vcs' => 'text/x-vcalendar',
549
- 'vcx' => 'application/vnd.vcx',
550
- 'vis' => 'application/vnd.visionary',
551
- 'viv' => 'video/vnd.vivo',
552
- 'vor' => 'application/vnd.stardivision.writer',
553
- 'vsd|vst|vss|vsw' => 'application/vnd.visio',
554
- 'vsf' => 'application/vnd.vsf',
555
- 'vtu' => 'model/vnd.vtu',
556
- 'vxml' => 'application/voicexml+xml',
557
- 'wad' => 'application/x-doom',
558
- 'wav' => 'audio/x-wav',
559
- 'wax' => 'audio/x-ms-wax',
560
- 'wbmp' => 'image/vnd.wap.wbmp',
561
- 'wbs' => 'application/vnd.criticaltools.wbs+xml',
562
- 'wbxml' => 'application/vnd.wap.wbxml',
563
- 'wm' => 'video/x-ms-wm',
564
- 'wma' => 'audio/x-ms-wma',
565
- 'wmd' => 'application/x-ms-wmd',
566
- 'wmf' => 'application/x-msmetafile',
567
- 'wml' => 'text/vnd.wap.wml',
568
- 'wmlc' => 'application/vnd.wap.wmlc',
569
- 'wmls' => 'text/vnd.wap.wmlscript',
570
- 'wmlsc' => 'application/vnd.wap.wmlscriptc',
571
- 'wmv' => 'video/x-ms-wmv',
572
- 'wmx' => 'video/x-ms-wmx',
573
- 'wmz' => 'application/x-ms-wmz',
574
- 'wpd' => 'application/vnd.wordperfect',
575
- 'wpl' => 'application/vnd.ms-wpl',
576
- 'wps|wks|wcm|wdb' => 'application/vnd.ms-works',
577
- 'wqd' => 'application/vnd.wqd',
578
- 'wri' => 'application/x-mswrite',
579
- 'wrl|vrml' => 'model/vrml',
580
- 'wsdl' => 'application/wsdl+xml',
581
- 'wspolicy' => 'application/wspolicy+xml',
582
- 'wtb' => 'application/vnd.webturbo',
583
- 'wvx' => 'video/x-ms-wvx',
584
- 'x3d' => 'application/vnd.hzn-3d-crossword',
585
- 'xap' => 'application/x-silverlight-app',
586
- 'xar' => 'application/vnd.xara',
587
- 'xbap' => 'application/x-ms-xbap',
588
- 'xbd' => 'application/vnd.fujixerox.docuworks.binder',
589
- 'xbm' => 'image/x-xbitmap',
590
- 'xdm' => 'application/vnd.syncml.dm+xml',
591
- 'xdp' => 'application/vnd.adobe.xdp+xml',
592
- 'xdw' => 'application/vnd.fujixerox.docuworks',
593
- 'xenc' => 'application/xenc+xml',
594
- 'xer' => 'application/patch-ops-error+xml',
595
- 'xfdf' => 'application/vnd.adobe.xfdf',
596
- 'xfdl' => 'application/vnd.xfdl',
597
- 'xhtml|xht' => 'application/xhtml+xml',
598
- 'xif' => 'image/vnd.xiff',
599
- 'xlam' => 'application/vnd.ms-excel.addin.macroenabled.12',
600
- 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroenabled.12',
601
- 'xlsm' => 'application/vnd.ms-excel.sheet.macroenabled.12',
602
- 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
603
- 'xls|xlm|xla|xlc|xlt|xlw' => 'application/vnd.ms-excel',
604
- 'xltm' => 'application/vnd.ms-excel.template.macroenabled.12',
605
- 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
606
- 'xml|xsl' => 'application/xml',
607
- 'xo' => 'application/vnd.olpc-sugar',
608
- 'xop' => 'application/xop+xml',
609
- 'xpi' => 'application/x-xpinstall',
610
- 'xpm' => 'image/x-xpixmap',
611
- 'xpr' => 'application/vnd.is-xpr',
612
- 'xps' => 'application/vnd.ms-xpsdocument',
613
- 'xpw|xpx' => 'application/vnd.intercon.formnet',
614
- 'xslt' => 'application/xslt+xml',
615
- 'xsm' => 'application/vnd.syncml+xml',
616
- 'xspf' => 'application/xspf+xml',
617
- 'xul' => 'application/vnd.mozilla.xul+xml',
618
- 'xwd' => 'image/x-xwindowdump',
619
- 'xyz' => 'chemical/x-xyz',
620
- 'zaz' => 'application/vnd.zzazz.deck+xml',
621
- 'zip' => 'application/zip',
622
- 'zir|zirz' => 'application/vnd.zul',
623
- 'zmm' => 'application/vnd.handheld-entertainment+xml',
624
- '123' => 'application/vnd.lotus-1-2-3'
625
- );
 
1
+ <?php
2
+
3
+ /**
4
+ * All possible mime types
5
+ */
6
+ return array(
7
+ '3dml' => 'text/vnd.in3d.3dml',
8
+ '3g2' => 'video/3gpp2',
9
+ '3gp' => 'video/3gpp',
10
+ 'aab|x32|u32|vox' => 'application/x-authorware-bin',
11
+ 'aac' => 'audio/x-aac',
12
+ 'aam' => 'application/x-authorware-map',
13
+ 'aas' => 'application/x-authorware-seg',
14
+ 'abw' => 'application/x-abiword',
15
+ 'acc' => 'application/vnd.americandynamics.acc',
16
+ 'ace' => 'application/x-ace-compressed',
17
+ 'acu' => 'application/vnd.acucobol',
18
+ 'adp' => 'audio/adpcm',
19
+ 'aep' => 'application/vnd.audiograph',
20
+ 'afp|listafp|list3820' => 'application/vnd.ibm.modcap',
21
+ 'aif|aiff|aifc' => 'audio/x-aiff',
22
+ 'air' => 'application/vnd.adobe.air-application-installer-package+zip',
23
+ 'ai|eps|ps' => 'application/postscript',
24
+ 'ami' => 'application/vnd.amiga.ami',
25
+ 'apk' => 'application/vnd.android.package-archive',
26
+ 'application' => 'application/x-ms-application',
27
+ 'apr' => 'application/vnd.lotus-approach',
28
+ 'asc|sig' => 'application/pgp-signature',
29
+ 'asf|asx' => 'video/x-ms-asf',
30
+ 'aso' => 'application/vnd.accpac.simply.aso',
31
+ 'atc|acutc' => 'application/vnd.acucorp',
32
+ 'atom' => 'application/atom+xml',
33
+ 'atomcat' => 'application/atomcat+xml',
34
+ 'atomsvc' => 'application/atomsvc+xml',
35
+ 'atx' => 'application/vnd.antix.game-component',
36
+ 'au|snd' => 'audio/basic',
37
+ 'avi' => 'video/x-msvideo',
38
+ 'aw' => 'application/applixware',
39
+ 'azf' => 'application/vnd.airzip.filesecure.azf',
40
+ 'azs' => 'application/vnd.airzip.filesecure.azs',
41
+ 'azw' => 'application/vnd.amazon.ebook',
42
+ 'bcpio' => 'application/x-bcpio',
43
+ 'bdf' => 'application/x-font-bdf',
44
+ 'bdm' => 'application/vnd.syncml.dm+wbxml',
45
+ 'bh2' => 'application/vnd.fujitsu.oasysprs',
46
+ 'bin|dms|lha|lrf|lzh|so|iso|dmg|dist|distz|pkg|bpk|dump|elc|deploy' => 'application/octet-stream',
47
+ 'bmi' => 'application/vnd.bmi',
48
+ 'bmp' => 'image/bmp',
49
+ 'box' => 'application/vnd.previewsystems.box',
50
+ 'btif' => 'image/prs.btif',
51
+ 'bz' => 'application/x-bzip',
52
+ 'bz2|boz' => 'application/x-bzip2',
53
+ 'c4g|c4d|c4f|c4p|c4u' => 'application/vnd.clonk.c4group',
54
+ 'cab' => 'application/vnd.ms-cab-compressed',
55
+ 'car' => 'application/vnd.curl.car',
56
+ 'cat' => 'application/vnd.ms-pki.seccat',
57
+ 'ccxml' => 'application/ccxml+xml',
58
+ 'cdbcmsg' => 'application/vnd.contact.cmsg',
59
+ 'cdkey' => 'application/vnd.mediastation.cdkey',
60
+ 'cdx' => 'chemical/x-cdx',
61
+ 'cdxml' => 'application/vnd.chemdraw+xml',
62
+ 'cdy' => 'application/vnd.cinderella',
63
+ 'cer' => 'application/pkix-cert',
64
+ 'cgm' => 'image/cgm',
65
+ 'chat' => 'application/x-chat',
66
+ 'chm' => 'application/vnd.ms-htmlhelp',
67
+ 'chrt' => 'application/vnd.kde.kchart',
68
+ 'cif' => 'chemical/x-cif',
69
+ 'cii' => 'application/vnd.anser-web-certificate-issue-initiation',
70
+ 'cil' => 'application/vnd.ms-artgalry',
71
+ 'cla' => 'application/vnd.claymore',
72
+ 'class' => 'application/java-vm',
73
+ 'clkk' => 'application/vnd.crick.clicker.keyboard',
74
+ 'clkp' => 'application/vnd.crick.clicker.palette',
75
+ 'clkt' => 'application/vnd.crick.clicker.template',
76
+ 'clkw' => 'application/vnd.crick.clicker.wordbank',
77
+ 'clkx' => 'application/vnd.crick.clicker',
78
+ 'clp' => 'application/x-msclip',
79
+ 'cmc' => 'application/vnd.cosmocaller',
80
+ 'cmdf' => 'chemical/x-cmdf',
81
+ 'cml' => 'chemical/x-cml',
82
+ 'cmp' => 'application/vnd.yellowriver-custom-menu',
83
+ 'cmx' => 'image/x-cmx',
84
+ 'cod' => 'application/vnd.rim.cod',
85
+ 'cpio' => 'application/x-cpio',
86
+ 'cpt' => 'application/mac-compactpro',
87
+ 'crd' => 'application/x-mscardfile',
88
+ 'crl' => 'application/pkix-crl',
89
+ 'csh' => 'application/x-csh',
90
+ 'csml' => 'chemical/x-csml',
91
+ 'csp' => 'application/vnd.commonspace',
92
+ 'css' => 'text/css',
93
+ 'csv' => 'text/csv',
94
+ 'cu' => 'application/cu-seeme',
95
+ 'curl' => 'text/vnd.curl',
96
+ 'cww' => 'application/prs.cww',
97
+ 'c|cc|cxx|cpp|h|hh|dic' => 'text/x-c',
98
+ 'daf' => 'application/vnd.mobius.daf',
99
+ 'davmount' => 'application/davmount+xml',
100
+ 'dcurl' => 'text/vnd.curl.dcurl',
101
+ 'dd2' => 'application/vnd.oma.dd2+xml',
102
+ 'ddd' => 'application/vnd.fujixerox.ddd',
103
+ 'deb|udeb' => 'application/x-debian-package',
104
+ 'der|crt' => 'application/x-x509-ca-cert',
105
+ 'df' => 'application/x-deflate',
106
+ 'dfac' => 'application/vnd.dreamfactory',
107
+ 'dir|dcr|dxr|cst|cct|cxt|w3d|fgd|swa' => 'application/x-director',
108
+ 'dis' => 'application/vnd.mobius.dis',
109
+ 'djvu|djv' => 'image/vnd.djvu',
110
+ 'dna' => 'application/vnd.dna',
111
+ 'docm' => 'application/vnd.ms-word.document.macroenabled.12',
112
+ 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
113
+ 'doc|dot' => 'application/msword',
114
+ 'dotm' => 'application/vnd.ms-word.template.macroenabled.12',
115
+ 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
116
+ 'dp' => 'application/vnd.osgi.dp',
117
+ 'dpg' => 'application/vnd.dpgraph',
118
+ 'dsc' => 'text/prs.lines.tag',
119
+ 'dtb' => 'application/x-dtbook+xml',
120
+ 'dtd' => 'application/xml-dtd',
121
+ 'dts' => 'audio/vnd.dts',
122
+ 'dtshd' => 'audio/vnd.dts.hd',
123
+ 'dvi' => 'application/x-dvi',
124
+ 'dwf' => 'model/vnd.dwf',
125
+ 'dwg' => 'image/vnd.dwg',
126
+ 'dxf' => 'image/vnd.dxf',
127
+ 'dxp' => 'application/vnd.spotfire.dxp',
128
+ 'ecelp4800' => 'audio/vnd.nuera.ecelp4800',
129
+ 'ecelp7470' => 'audio/vnd.nuera.ecelp7470',
130
+ 'ecelp9600' => 'audio/vnd.nuera.ecelp9600',
131
+ 'ecma' => 'application/ecmascript',
132
+ 'edm' => 'application/vnd.novadigm.edm',
133
+ 'edx' => 'application/vnd.novadigm.edx',
134
+ 'efif' => 'application/vnd.picsel',
135
+ 'ei6' => 'application/vnd.pg.osasli',
136
+ 'eml|all' => 'message/rfc822',
137
+ 'emma' => 'application/emma+xml',
138
+ 'eol' => 'audio/vnd.digital-winds',
139
+ 'eot' => 'application/vnd.ms-fontobject',
140
+ 'epub' => 'application/epub+zip',
141
+ 'es3|et3' => 'application/vnd.eszigno3+xml',
142
+ 'esf' => 'application/vnd.epson.esf',
143
+ 'etx' => 'text/x-setext',
144
+ 'exe|dll|com|bat|msi' => 'application/x-msdownload',
145
+ 'ext' => 'application/vnd.novadigm.ext',
146
+ 'ez' => 'application/andrew-inset',
147
+ 'ez2' => 'application/vnd.ezpix-album',
148
+ 'ez3' => 'application/vnd.ezpix-package',
149
+ 'f4v' => 'video/x-f4v',
150
+ 'fbs' => 'image/vnd.fastbidsheet',
151
+ 'fdf' => 'application/vnd.fdf',
152
+ 'fe_launch' => 'application/vnd.denovo.fcselayout-link',
153
+ 'fg5' => 'application/vnd.fujitsu.oasysgp',
154
+ 'fh|fhc|fh4|fh5|fh7' => 'image/x-freehand',
155
+ 'fig' => 'application/x-xfig',
156
+ 'fli' => 'video/x-fli',
157
+ 'flo' => 'application/vnd.micrografx.flo',
158
+ 'flv' => 'video/x-flv',
159
+ 'flw' => 'application/vnd.kde.kivio',
160
+ 'flx' => 'text/vnd.fmi.flexstor',
161
+ 'fly' => 'text/vnd.fly',
162
+ 'fm|frame|maker|book' => 'application/vnd.framemaker',
163
+ 'fnc' => 'application/vnd.frogans.fnc',
164
+ 'fpx' => 'image/vnd.fpx',
165
+ 'fsc' => 'application/vnd.fsc.weblaunch',
166
+ 'fst' => 'image/vnd.fst',
167
+ 'ftc' => 'application/vnd.fluxtime.clip',
168
+ 'fti' => 'application/vnd.anser-web-funds-transfer-initiation',
169
+ 'fvt' => 'video/vnd.fvt',
170
+ 'fzs' => 'application/vnd.fuzzysheet',
171
+ 'f|for|f77|f90' => 'text/x-fortran',
172
+ 'g3' => 'image/g3fax',
173
+ 'gac' => 'application/vnd.groove-account',
174
+ 'gdl' => 'model/vnd.gdl',
175
+ 'geo' => 'application/vnd.dynageo',
176
+ 'gex|gre' => 'application/vnd.geometry-explorer',
177
+ 'ggb' => 'application/vnd.geogebra.file',
178
+ 'ggt' => 'application/vnd.geogebra.tool',
179
+ 'ghf' => 'application/vnd.groove-help',
180
+ 'gif' => 'image/gif',
181
+ 'gim' => 'application/vnd.groove-identity-message',
182
+ 'gmx' => 'application/vnd.gmx',
183
+ 'gnumeric' => 'application/x-gnumeric',
184
+ 'gph' => 'application/vnd.flographit',
185
+ 'gqf|gqs' => 'application/vnd.grafeq',
186
+ 'gram' => 'application/srgs',
187
+ 'grv' => 'application/vnd.groove-injector',
188
+ 'grxml' => 'application/srgs+xml',
189
+ 'gsf' => 'application/x-font-ghostscript',
190
+ 'gtar' => 'application/x-gtar',
191
+ 'gtm' => 'application/vnd.groove-tool-message',
192
+ 'gtw' => 'model/vnd.gtw',
193
+ 'gv' => 'text/vnd.graphviz',
194
+ 'gz' => 'application/x-gzip',
195
+ 'h261' => 'video/h261',
196
+ 'h263' => 'video/h263',
197
+ 'h264' => 'video/h264',
198
+ 'hbci' => 'application/vnd.hbci',
199
+ 'hdf' => 'application/x-hdf',
200
+ 'hlp' => 'application/winhlp',
201
+ 'hpgl' => 'application/vnd.hp-hpgl',
202
+ 'hpid' => 'application/vnd.hp-hpid',
203
+ 'hps' => 'application/vnd.hp-hps',
204
+ 'hqx' => 'application/mac-binhex40',
205
+ 'htc' => 'text/x-component',
206
+ 'htke' => 'application/vnd.kenameaapp',
207
+ 'html|htm' => 'text/html',
208
+ 'hvd' => 'application/vnd.yamaha.hv-dic',
209
+ 'hvp' => 'application/vnd.yamaha.hv-voice',
210
+ 'hvs' => 'application/vnd.yamaha.hv-script',
211
+ 'icc|icm' => 'application/vnd.iccprofile',
212
+ 'ice' => 'x-conference/x-cooltalk',
213
+ 'ico' => 'image/x-icon',
214
+ 'ics|ifb' => 'text/calendar',
215
+ 'ief' => 'image/ief',
216
+ 'ifm' => 'application/vnd.shana.informed.formdata',
217
+ 'igl' => 'application/vnd.igloader',
218
+ 'igs|iges' => 'model/iges',
219
+ 'igx' => 'application/vnd.micrografx.igx',
220
+ 'iif' => 'application/vnd.shana.informed.interchange',
221
+ 'imp' => 'application/vnd.accpac.simply.imp',
222
+ 'ims' => 'application/vnd.ms-ims',
223
+ 'ipk' => 'application/vnd.shana.informed.package',
224
+ 'irm' => 'application/vnd.ibm.rights-management',
225
+ 'irp' => 'application/vnd.irepository.package+xml',
226
+ 'itp' => 'application/vnd.shana.informed.formtemplate',
227
+ 'ivp' => 'application/vnd.immervision-ivp',
228
+ 'ivu' => 'application/vnd.immervision-ivu',
229
+ 'jad' => 'text/vnd.sun.j2me.app-descriptor',
230
+ 'jam' => 'application/vnd.jam',
231
+ 'jar' => 'application/java-archive',
232
+ 'java' => 'text/x-java-source',
233
+ 'jisp' => 'application/vnd.jisp',
234
+ 'jlt' => 'application/vnd.hp-jlyt',
235
+ 'jnlp' => 'application/x-java-jnlp-file',
236
+ 'joda' => 'application/vnd.joost.joda-archive',
237
+ 'jpeg|jpg|jpe' => 'image/jpeg',
238
+ 'jpgv' => 'video/jpeg',
239
+ 'jpm|jpgm' => 'video/jpm',
240
+ 'js' => 'application/x-javascript',
241
+ 'json' => 'application/json',
242
+ 'karbon' => 'application/vnd.kde.karbon',
243
+ 'kfo' => 'application/vnd.kde.kformula',
244
+ 'kia' => 'application/vnd.kidspiration',
245
+ 'kml' => 'application/vnd.google-earth.kml+xml',
246
+ 'kmz' => 'application/vnd.google-earth.kmz',
247
+ 'kne|knp' => 'application/vnd.kinar',
248
+ 'kon' => 'application/vnd.kde.kontour',
249
+ 'kpr|kpt' => 'application/vnd.kde.kpresenter',
250
+ 'ksp' => 'application/vnd.kde.kspread',
251
+ 'ktz|ktr' => 'application/vnd.kahootz',
252
+ 'kwd|kwt' => 'application/vnd.kde.kword',
253
+ 'latex' => 'application/x-latex',
254
+ 'lbd' => 'application/vnd.llamagraphics.life-balance.desktop',
255
+ 'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml',
256
+ 'les' => 'application/vnd.hhe.lesson-player',
257
+ 'less' => 'text/less',
258
+ 'link66' => 'application/vnd.route66.link66+xml',
259
+ 'lostxml' => 'application/lost+xml',
260
+ 'lrm' => 'application/vnd.ms-lrm',
261
+ 'ltf' => 'application/vnd.frogans.ltf',
262
+ 'lvp' => 'audio/vnd.lucent.voice',
263
+ 'lwp' => 'application/vnd.lotus-wordpro',
264
+ 'm3u' => 'audio/x-mpegurl',
265
+ 'm4v' => 'video/x-m4v',
266
+ 'mag' => 'application/vnd.ecowin.chart',
267
+ 'mathml' => 'application/mathml+xml',
268
+ 'ma|nb|mb' => 'application/mathematica',
269
+ 'mbk' => 'application/vnd.mobius.mbk',
270
+ 'mbox' => 'application/mbox',
271
+ 'mc1' => 'application/vnd.medcalcdata',
272
+ 'mcd' => 'application/vnd.mcd',
273
+ 'mcurl' => 'text/vnd.curl.mcurl',
274
+ 'mdb' => 'application/x-msaccess',
275
+ 'mdi' => 'image/vnd.ms-modi',
276
+ 'mfm' => 'application/vnd.mfmp',
277
+ 'mgz' => 'application/vnd.proteus.magazine',
278
+ 'mid|midi|kar|rmi' => 'audio/midi',
279
+ 'mif' => 'application/vnd.mif',
280
+ 'mj2|mjp2' => 'video/mj2',
281
+ 'mlp' => 'application/vnd.dolby.mlp',
282
+ 'mmd' => 'application/vnd.chipnuts.karaoke-mmd',
283
+ 'mmf' => 'application/vnd.smaf',
284
+ 'mmr' => 'image/vnd.fujixerox.edmics-mmr',
285
+ 'mny' => 'application/x-msmoney',
286
+ 'movie' => 'video/x-sgi-movie',
287
+ 'mp4a' => 'audio/mp4',
288
+ 'mp4s' => 'application/mp4',
289
+ 'mp4|mp4v|mpg4' => 'video/mp4',
290
+ 'mpc' => 'application/vnd.mophun.certificate',
291
+ 'mpeg|mpg|mpe|m1v|m2v' => 'video/mpeg',
292
+ 'mpga|mp2|mp2a|mp3|m2a|m3a' => 'audio/mpeg',
293
+ 'mpkg' => 'application/vnd.apple.installer+xml',
294
+ 'mpm' => 'application/vnd.blueice.multipass',
295
+ 'mpn' => 'application/vnd.mophun.application',
296
+ 'mpp|mpt' => 'application/vnd.ms-project',
297
+ 'mpy' => 'application/vnd.ibm.minipay',
298
+ 'mqy' => 'application/vnd.mobius.mqy',
299
+ 'mrc' => 'application/marc',
300
+ 'mscml' => 'application/mediaservercontrol+xml',
301
+ 'mseed' => 'application/vnd.fdsn.mseed',
302
+ 'mseq' => 'application/vnd.mseq',
303
+ 'msf' => 'application/vnd.epson.msf',
304
+ 'msh|mesh|silo' => 'model/mesh',
305
+ 'msl' => 'application/vnd.mobius.msl',
306
+ 'msty' => 'application/vnd.muvee.style',
307
+ 'mts' => 'model/vnd.mts',
308
+ 'mus' => 'application/vnd.musician',
309
+ 'musicxml' => 'application/vnd.recordare.musicxml+xml',
310
+ 'mvb|m13|m14' => 'application/x-msmediaview',
311
+ 'mwf' => 'application/vnd.mfer',
312
+ 'mxf' => 'application/mxf',
313
+ 'mxl' => 'application/vnd.recordare.musicxml',
314
+ 'mxml|xhvml|xvml|xvm' => 'application/xv+xml',
315
+ 'mxs' => 'application/vnd.triscape.mxs',
316
+ 'mxu|m4u' => 'video/vnd.mpegurl',
317
+ 'n-gage' => 'application/vnd.nokia.n-gage.symbian.install',
318
+ 'ncx' => 'application/x-dtbncx+xml',
319
+ 'nc|cdf' => 'application/x-netcdf',
320
+ 'ngdat' => 'application/vnd.nokia.n-gage.data',
321
+ 'nlu' => 'application/vnd.neurolanguage.nlu',
322
+ 'nml' => 'application/vnd.enliven',
323
+ 'nnd' => 'application/vnd.noblenet-directory',
324
+ 'nns' => 'application/vnd.noblenet-sealer',
325
+ 'nnw' => 'application/vnd.noblenet-web',
326
+ 'npx' => 'image/vnd.net-fpx',
327
+ 'nsf' => 'application/vnd.lotus-notes',
328
+ 'oa2' => 'application/vnd.fujitsu.oasys2',
329
+ 'oa3' => 'application/vnd.fujitsu.oasys3',
330
+ 'oas' => 'application/vnd.fujitsu.oasys',
331
+ 'obd' => 'application/x-msbinder',
332
+ 'oda' => 'application/oda',
333
+ 'odb' => 'application/vnd.oasis.opendocument.database',
334
+ 'odc' => 'application/vnd.oasis.opendocument.chart',
335
+ 'odf' => 'application/vnd.oasis.opendocument.formula',
336
+ 'odft' => 'application/vnd.oasis.opendocument.formula-template',
337
+ 'odg' => 'application/vnd.oasis.opendocument.graphics',
338
+ 'odi' => 'application/vnd.oasis.opendocument.image',
339
+ 'odp' => 'application/vnd.oasis.opendocument.presentation',
340
+ 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
341
+ 'odt' => 'application/vnd.oasis.opendocument.text',
342
+ 'oga|ogg|spx' => 'audio/ogg',
343
+ 'ogv' => 'video/ogg',
344
+ 'ogx' => 'application/ogg',
345
+ 'onetoc|onetoc2|onetmp|onepkg' => 'application/onenote',
346
+ 'opf' => 'application/oebps-package+xml',
347
+ 'org' => 'application/vnd.lotus-organizer',
348
+ 'osf' => 'application/vnd.yamaha.openscoreformat',
349
+ 'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml',
350
+ 'otc' => 'application/vnd.oasis.opendocument.chart-template',
351
+ 'otf' => array('application/x-font-otf', 'application/vnd.ms-opentype'),
352
+ 'otg' => 'application/vnd.oasis.opendocument.graphics-template',
353
+ 'oth' => 'application/vnd.oasis.opendocument.text-web',
354
+ 'oti' => 'application/vnd.oasis.opendocument.image-template',
355
+ 'otm' => 'application/vnd.oasis.opendocument.text-master',
356
+ 'otp' => 'application/vnd.oasis.opendocument.presentation-template',
357
+ 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
358
+ 'ott' => 'application/vnd.oasis.opendocument.text-template',
359
+ 'oxt' => 'application/vnd.openofficeorg.extension',
360
+ 'p10' => 'application/pkcs10',
361
+ 'p12|pfx' => 'application/x-pkcs12',
362
+ 'p7b|spc' => 'application/x-pkcs7-certificates',
363
+ 'p7m|p7c' => 'application/pkcs7-all',
364
+ 'p7r' => 'application/x-pkcs7-certreqresp',
365
+ 'p7s' => 'application/pkcs7-signature',
366
+ 'pbd' => 'application/vnd.powerbuilder6',
367
+ 'pbm' => 'image/x-portable-bitmap',
368
+ 'pcf' => 'application/x-font-pcf',
369
+ 'pcl' => 'application/vnd.hp-pcl',
370
+ 'pclxl' => 'application/vnd.hp-pclxl',
371
+ 'pcurl' => 'application/vnd.curl.pcurl',
372
+ 'pcx' => 'image/x-pcx',
373
+ 'pdb|pqa|oprc' => 'application/vnd.palm',
374
+ 'pdf' => 'application/pdf',
375
+ 'pfa|pfb|pfm|afm' => 'application/x-font-type1',
376
+ 'pfr' => 'application/font-tdpfr',
377
+ 'pgm' => 'image/x-portable-graymap',
378
+ 'pgn' => 'application/x-chess-pgn',
379
+ 'pgp' => 'application/pgp-encrypted',
380
+ 'pic|pct' => 'image/x-pict',
381
+ 'pki' => 'application/pkixcmp',
382
+ 'pkipath' => 'application/pkix-pkipath',
383
+ 'plb' => 'application/vnd.3gpp.pic-bw-large',
384
+ 'plc' => 'application/vnd.mobius.plc',
385
+ 'plf' => 'application/vnd.pocketlearn',
386
+ 'pls' => 'application/pls+xml',
387
+ 'pml' => 'application/vnd.ctc-posml',
388
+ 'png' => 'image/png',
389
+ 'pnm' => 'image/x-portable-anymap',
390
+ 'portpkg' => 'application/vnd.macports.portpkg',
391
+ 'potm' => 'application/vnd.ms-powerpoint.template.macroenabled.12',
392
+ 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
393
+ 'ppam' => 'application/vnd.ms-powerpoint.addin.macroenabled.12',
394
+ 'ppd' => 'application/vnd.cups-ppd',
395
+ 'ppm' => 'image/x-portable-pixmap',
396
+ 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroenabled.12',
397
+ 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
398
+ 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroenabled.12',
399
+ 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
400
+ 'ppt|pps|pot' => 'application/vnd.ms-powerpoint',
401
+ 'prc|mobi' => 'application/x-mobipocket-ebook',
402
+ 'pre' => 'application/vnd.lotus-freelance',
403
+ 'prf' => 'application/pics-rules',
404
+ 'psb' => 'application/vnd.3gpp.pic-bw-small',
405
+ 'psd' => 'image/vnd.adobe.photoshop',
406
+ 'psf' => 'application/x-font-linux-psf',
407
+ 'ptid' => 'application/vnd.pvi.ptid1',
408
+ 'pub' => 'application/x-mspublisher',
409
+ 'pvb' => 'application/vnd.3gpp.pic-bw-var',
410
+ 'pwn' => 'application/vnd.3m.post-it-notes',
411
+ 'pya' => 'audio/vnd.ms-playready.media.pya',
412
+ 'pyv' => 'video/vnd.ms-playready.media.pyv',
413
+ 'p|pas' => 'text/x-pascal',
414
+ 'qam' => 'application/vnd.epson.quickanime',
415
+ 'qbo' => 'application/vnd.intu.qbo',
416
+ 'qfx' => 'application/vnd.intu.qfx',
417
+ 'qps' => 'application/vnd.publishare-delta-tree',
418
+ 'qt|mov' => 'video/quicktime',
419
+ 'qxd|qxt|qwd|qwt|qxl|qxb' => 'application/vnd.quark.quarkxpress',
420
+ 'ram|ra' => 'audio/x-pn-realaudio',
421
+ 'rar' => 'application/x-rar-compressed',
422
+ 'ras' => 'image/x-cmu-raster',
423
+ 'rcprofile' => 'application/vnd.ipunplugged.rcprofile',
424
+ 'rdf' => 'application/rdf+xml',
425
+ 'rdz' => 'application/vnd.data-vision.rdz',
426
+ 'rep' => 'application/vnd.businessobjects',
427
+ 'res' => 'application/x-dtbresource+xml',
428
+ 'rgb' => 'image/x-rgb',
429
+ 'rif' => 'application/reginfo+xml',
430
+ 'rl' => 'application/resource-lists+xml',
431
+ 'rlc' => 'image/vnd.fujixerox.edmics-rlc',
432
+ 'rld' => 'application/resource-lists-diff+xml',
433
+ 'rm' => 'application/vnd.rn-realmedia',
434
+ 'rmp' => 'audio/x-pn-realaudio-plugin',
435
+ 'rms' => 'application/vnd.jcp.javame.midlet-rms',
436
+ 'rnc' => 'application/relax-ng-compact-syntax',
437
+ 'rpss' => 'application/vnd.nokia.radio-presets',
438
+ 'rpst' => 'application/vnd.nokia.radio-preset',
439
+ 'rq' => 'application/sparql-query',
440
+ 'rs' => 'application/rls-services+xml',
441
+ 'rsd' => 'application/rsd+xml',
442
+ 'rss' => 'application/rss+xml',
443
+ 'rtf' => 'application/rtf',
444
+ 'rtx' => 'text/richtext',
445
+ 'saf' => 'application/vnd.yamaha.smaf-audio',
446
+ 'sbml' => 'application/sbml+xml',
447
+ 'sc' => 'application/vnd.ibm.secure-container',
448
+ 'scd' => 'application/x-msschedule',
449
+ 'scm' => 'application/vnd.lotus-screencam',
450
+ 'scq' => 'application/scvp-cv-request',
451
+ 'scs' => 'application/scvp-cv-response',
452
+ 'scurl' => 'text/vnd.curl.scurl',
453
+ 'sda' => 'application/vnd.stardivision.draw',
454
+ 'sdc' => 'application/vnd.stardivision.calc',
455
+ 'sdd' => 'application/vnd.stardivision.impress',
456
+ 'sdkm|sdkd' => 'application/vnd.solent.sdkm+xml',
457
+ 'sdp' => 'application/sdp',
458
+ 'sdw' => 'application/vnd.stardivision.writer',
459
+ 'see' => 'application/vnd.seemail',
460
+ 'seed|dataless' => 'application/vnd.fdsn.seed',
461
+ 'sema' => 'application/vnd.sema',
462
+ 'semd' => 'application/vnd.semd',
463
+ 'semf' => 'application/vnd.semf',
464
+ 'ser' => 'application/java-serialized-object',
465
+ 'setpay' => 'application/set-payment-initiation',
466
+ 'setreg' => 'application/set-registration-initiation',
467
+ 'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data',
468
+ 'sfs' => 'application/vnd.spotfire.sfs',
469
+ 'sgl' => 'application/vnd.stardivision.writer-global',
470
+ 'sgml|sgm' => 'text/sgml',
471
+ 'sh' => 'application/x-sh',
472
+ 'shar' => 'application/x-shar',
473
+ 'shf' => 'application/shf+xml',
474
+ 'sis|sisx' => 'application/vnd.symbian.install',
475
+ 'sit' => 'application/x-stuffit',
476
+ 'sitx' => 'application/x-stuffitx',
477
+ 'skp|skd|skt|skm' => 'application/vnd.koan',
478
+ 'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12',
479
+ 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
480
+ 'slt' => 'application/vnd.epson.salt',
481
+ 'smf' => 'application/vnd.stardivision.math',
482
+ 'smi|smil' => 'application/smil+xml',
483
+ 'snf' => 'application/x-font-snf',
484
+ 'spf' => 'application/vnd.yamaha.smaf-phrase',
485
+ 'spl' => 'application/x-futuresplash',
486
+ 'spot' => 'text/vnd.in3d.spot',
487
+ 'spp' => 'application/scvp-vp-response',
488
+ 'spq' => 'application/scvp-vp-request',
489
+ 'src' => 'application/x-wais-source',
490
+ 'srx' => 'application/sparql-results+xml',
491
+ 'sse' => 'application/vnd.kodak-descriptor',
492
+ 'ssf' => 'application/vnd.epson.ssf',
493
+ 'ssml' => 'application/ssml+xml',
494
+ 'stc' => 'application/vnd.sun.xml.calc.template',
495
+ 'std' => 'application/vnd.sun.xml.draw.template',
496
+ 'stf' => 'application/vnd.wt.stf',
497
+ 'sti' => 'application/vnd.sun.xml.impress.template',
498
+ 'stk' => 'application/hyperstudio',
499
+ 'stl' => 'application/vnd.ms-pki.stl',
500
+ 'str' => 'application/vnd.pg.format',
501
+ 'stw' => 'application/vnd.sun.xml.writer.template',
502
+ 'sus|susp' => 'application/vnd.sus-calendar',
503
+ 'sv4cpio' => 'application/x-sv4cpio',
504
+ 'sv4crc' => 'application/x-sv4crc',
505
+ 'svd' => 'application/vnd.svd',
506
+ 'svg|svgz' => 'image/svg+xml',
507
+ 'swf' => 'application/x-shockwave-flash',
508
+ 'swi' => 'application/vnd.arastra.swi',
509
+ 'sxc' => 'application/vnd.sun.xml.calc',
510
+ 'sxd' => 'application/vnd.sun.xml.draw',
511
+ 'sxg' => 'application/vnd.sun.xml.writer.global',
512
+ 'sxi' => 'application/vnd.sun.xml.impress',
513
+ 'sxm' => 'application/vnd.sun.xml.math',
514
+ 'sxw' => 'application/vnd.sun.xml.writer',
515
+ 's|asm' => 'text/x-asm',
516
+ 'tao' => 'application/vnd.tao.intent-module-archive',
517
+ 'tar' => 'application/x-tar',
518
+ 'tcap' => 'application/vnd.3gpp2.tcap',
519
+ 'tcl' => 'application/x-tcl',
520
+ 'teacher' => 'application/vnd.smart.teacher',
521
+ 'tex' => 'application/x-tex',
522
+ 'texinfo|texi' => 'application/x-texinfo',
523
+ 'tfm' => 'application/x-tex-tfm',
524
+ 'tiff|tif' => 'image/tiff',
525
+ 'tmo' => 'application/vnd.tmobile-livetv',
526
+ 'torrent' => 'application/x-bittorrent',
527
+ 'tpl' => 'application/vnd.groove-tool-template',
528
+ 'tpt' => 'application/vnd.trid.tpt',
529
+ 'tra' => 'application/vnd.trueapp',
530
+ 'trm' => 'application/x-msterminal',
531
+ 'tsv' => 'text/tab-separated-values',
532
+ 'ttf|ttc' => array('application/x-font-ttf', 'application/vnd.ms-opentype'),
533
+ 'twd|twds' => 'application/vnd.simtech-mindmapper',
534
+ 'txd' => 'application/vnd.genomatix.tuxedo',
535
+ 'txf' => 'application/vnd.mobius.txf',
536
+ 'txt|text|conf|def|list|log|in' => 'text/plain',
537
+ 't|tr|roff|man|me|ms' => 'text/troff',
538
+ 'ufd|ufdl' => 'application/vnd.ufdl',
539
+ 'umj' => 'application/vnd.umajin',
540
+ 'unityweb' => 'application/vnd.unity',
541
+ 'uoml' => 'application/vnd.uoml+xml',
542
+ 'uri|uris|urls' => 'text/uri-list',
543
+ 'ustar' => 'application/x-ustar',
544
+ 'utz' => 'application/vnd.uiq.theme',
545
+ 'uu' => 'text/x-uuencode',
546
+ 'vcd' => 'application/x-cdlink',
547
+ 'vcf' => 'text/x-vcard',
548
+ 'vcg' => 'application/vnd.groove-vcard',
549
+ 'vcs' => 'text/x-vcalendar',
550
+ 'vcx' => 'application/vnd.vcx',
551
+ 'vis' => 'application/vnd.visionary',
552
+ 'viv' => 'video/vnd.vivo',
553
+ 'vor' => 'application/vnd.stardivision.writer',
554
+ 'vsd|vst|vss|vsw' => 'application/vnd.visio',
555
+ 'vsf' => 'application/vnd.vsf',
556
+ 'vtu' => 'model/vnd.vtu',
557
+ 'vxml' => 'application/voicexml+xml',
558
+ 'wad' => 'application/x-doom',
559
+ 'wav' => 'audio/x-wav',
560
+ 'wax' => 'audio/x-ms-wax',
561
+ 'wbmp' => 'image/vnd.wap.wbmp',
562
+ 'wbs' => 'application/vnd.criticaltools.wbs+xml',
563
+ 'wbxml' => 'application/vnd.wap.wbxml',
564
+ 'wm' => 'video/x-ms-wm',
565
+ 'wma' => 'audio/x-ms-wma',
566
+ 'wmd' => 'application/x-ms-wmd',
567
+ 'wmf' => 'application/x-msmetafile',
568
+ 'wml' => 'text/vnd.wap.wml',
569
+ 'wmlc' => 'application/vnd.wap.wmlc',
570
+ 'wmls' => 'text/vnd.wap.wmlscript',
571
+ 'wmlsc' => 'application/vnd.wap.wmlscriptc',
572
+ 'wmv' => 'video/x-ms-wmv',
573
+ 'wmx' => 'video/x-ms-wmx',
574
+ 'wmz' => 'application/x-ms-wmz',
575
+ 'wpd' => 'application/vnd.wordperfect',
576
+ 'wpl' => 'application/vnd.ms-wpl',
577
+ 'wps|wks|wcm|wdb' => 'application/vnd.ms-works',
578
+ 'wqd' => 'application/vnd.wqd',
579
+ 'wri' => 'application/x-mswrite',
580
+ 'wrl|vrml' => 'model/vrml',
581
+ 'wsdl' => 'application/wsdl+xml',
582
+ 'wspolicy' => 'application/wspolicy+xml',
583
+ 'wtb' => 'application/vnd.webturbo',
584
+ 'wvx' => 'video/x-ms-wvx',
585
+ 'x3d' => 'application/vnd.hzn-3d-crossword',
586
+ 'xap' => 'application/x-silverlight-app',
587
+ 'xar' => 'application/vnd.xara',
588
+ 'xbap' => 'application/x-ms-xbap',
589
+ 'xbd' => 'application/vnd.fujixerox.docuworks.binder',
590
+ 'xbm' => 'image/x-xbitmap',
591
+ 'xdm' => 'application/vnd.syncml.dm+xml',
592
+ 'xdp' => 'application/vnd.adobe.xdp+xml',
593
+ 'xdw' => 'application/vnd.fujixerox.docuworks',
594
+ 'xenc' => 'application/xenc+xml',
595
+ 'xer' => 'application/patch-ops-error+xml',
596
+ 'xfdf' => 'application/vnd.adobe.xfdf',
597
+ 'xfdl' => 'application/vnd.xfdl',
598
+ 'xhtml|xht' => 'application/xhtml+xml',
599
+ 'xif' => 'image/vnd.xiff',
600
+ 'xlam' => 'application/vnd.ms-excel.addin.macroenabled.12',
601
+ 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroenabled.12',
602
+ 'xlsm' => 'application/vnd.ms-excel.sheet.macroenabled.12',
603
+ 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
604
+ 'xls|xlm|xla|xlc|xlt|xlw' => 'application/vnd.ms-excel',
605
+ 'xltm' => 'application/vnd.ms-excel.template.macroenabled.12',
606
+ 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
607
+ 'xml|xsl' => 'application/xml',
608
+ 'xo' => 'application/vnd.olpc-sugar',
609
+ 'xop' => 'application/xop+xml',
610
+ 'xpi' => 'application/x-xpinstall',
611
+ 'xpm' => 'image/x-xpixmap',
612
+ 'xpr' => 'application/vnd.is-xpr',
613
+ 'xps' => 'application/vnd.ms-xpsdocument',
614
+ 'xpw|xpx' => 'application/vnd.intercon.formnet',
615
+ 'xslt' => 'application/xslt+xml',
616
+ 'xsm' => 'application/vnd.syncml+xml',
617
+ 'xspf' => 'application/xspf+xml',
618
+ 'xul' => 'application/vnd.mozilla.xul+xml',
619
+ 'xwd' => 'image/x-xwindowdump',
620
+ 'xyz' => 'chemical/x-xyz',
621
+ 'zaz' => 'application/vnd.zzazz.deck+xml',
622
+ 'zip' => 'application/zip',
623
+ 'zir|zirz' => 'application/vnd.zul',
624
+ 'zmm' => 'application/vnd.handheld-entertainment+xml',
625
+ '123' => 'application/vnd.lotus-1-2-3'
626
+ );
inc/mime/cssjs.php CHANGED
@@ -1,15 +1,15 @@
1
- <?php
2
-
3
- /**
4
- * CSS and JS mime types
5
- */
6
- return array(
7
- 'css' => 'text/css',
8
- 'htc' => 'text/x-component',
9
-
10
- //JS - varieties
11
- 'js' => 'application/x-javascript',
12
- 'js2' => 'application/javascript',
13
- 'js3' => 'text/javascript',
14
- 'js4' => 'text/x-js',
15
- );
1
+ <?php
2
+
3
+ /**
4
+ * CSS and JS mime types
5
+ */
6
+ return array(
7
+ 'css' => 'text/css',
8
+ 'htc' => 'text/x-component',
9
+ 'less' => 'text/css',
10
+ //JS - varieties
11
+ 'js' => 'application/x-javascript',
12
+ 'js2' => 'application/javascript',
13
+ 'js3' => 'text/javascript',
14
+ 'js4' => 'text/x-js',
15
+ );
inc/mime/html.php CHANGED
@@ -1,14 +1,14 @@
1
- <?php
2
-
3
- /**
4
- * HTML mime types
5
- */
6
- return array(
7
- 'html|htm' => 'text/html',
8
- 'rtf|rtx' => 'text/richtext',
9
- 'svg|svgz' => 'image/svg+xml',
10
- 'txt' => 'text/plain',
11
- 'xsd' => 'text/xsd',
12
- 'xsl' => 'text/xsl',
13
- 'xml' => 'text/xml'
14
- );
1
+ <?php
2
+
3
+ /**
4
+ * HTML mime types
5
+ */
6
+ return array(
7
+ 'html|htm' => 'text/html',
8
+ 'rtf|rtx' => 'text/richtext',
9
+ 'svg|svgz' => 'image/svg+xml',
10
+ 'txt' => 'text/plain',
11
+ 'xsd' => 'text/xsd',
12
+ 'xsl' => 'text/xsl',
13
+ 'xml' => 'text/xml'
14
+ );
inc/mime/other.php CHANGED
@@ -1,50 +1,51 @@
1
- <?php
2
-
3
- /**
4
- * Other mime types
5
- */
6
- return array(
7
- 'asf|asx|wax|wmv|wmx' => 'video/asf',
8
- 'avi' => 'video/avi',
9
- 'bmp' => 'image/bmp',
10
- 'class' => 'application/java',
11
- 'divx' => 'video/divx',
12
- 'doc|docx' => 'application/msword',
13
- 'eot' => 'application/vnd.ms-fontobject',
14
- 'exe' => 'application/x-msdownload',
15
- 'gif' => 'image/gif',
16
- 'gz|gzip' => 'application/x-gzip',
17
- 'ico' => 'image/x-icon',
18
- 'jpg|jpeg|jpe' => 'image/jpeg',
19
- 'json' => 'application/json',
20
- 'mdb' => 'application/vnd.ms-access',
21
- 'mid|midi' => 'audio/midi',
22
- 'mov|qt' => 'video/quicktime',
23
- 'mp3|m4a' => 'audio/mpeg',
24
- 'mp4|m4v' => 'video/mp4',
25
- 'mpeg|mpg|mpe' => 'video/mpeg',
26
- 'mpp' => 'application/vnd.ms-project',
27
- 'otf' => 'application/x-font-otf',
28
- 'odb' => 'application/vnd.oasis.opendocument.database',
29
- 'odc' => 'application/vnd.oasis.opendocument.chart',
30
- 'odf' => 'application/vnd.oasis.opendocument.formula',
31
- 'odg' => 'application/vnd.oasis.opendocument.graphics',
32
- 'odp' => 'application/vnd.oasis.opendocument.presentation',
33
- 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
34
- 'odt' => 'application/vnd.oasis.opendocument.text',
35
- 'ogg' => 'audio/ogg',
36
- 'pdf' => 'application/pdf',
37
- 'png' => 'image/png',
38
- 'pot|pps|ppt|pptx' => 'application/vnd.ms-powerpoint',
39
- 'ra|ram' => 'audio/x-realaudio',
40
- 'svg|svgz' => 'image/svg+xml',
41
- 'swf' => 'application/x-shockwave-flash',
42
- 'tar' => 'application/x-tar',
43
- 'tif|tiff' => 'image/tiff',
44
- 'ttf|ttc' => 'application/x-font-ttf',
45
- 'wav' => 'audio/wav',
46
- 'wma' => 'audio/wma',
47
- 'wri' => 'application/vnd.ms-write',
48
- 'xla|xls|xlsx|xlt|xlw' => 'application/vnd.ms-excel',
49
- 'zip' => 'application/zip'
50
- );
 
1
+ <?php
2
+
3
+ /**
4
+ * Other mime types
5
+ */
6
+ return array(
7
+ 'asf|asx|wax|wmv|wmx' => 'video/asf',
8
+ 'avi' => 'video/avi',
9
+ 'bmp' => 'image/bmp',
10
+ 'class' => 'application/java',
11
+ 'divx' => 'video/divx',
12
+ 'doc|docx' => 'application/msword',
13
+ 'eot' => 'application/vnd.ms-fontobject',
14
+ 'exe' => 'application/x-msdownload',
15
+ 'gif' => 'image/gif',
16
+ 'gz|gzip' => 'application/x-gzip',
17
+ 'ico' => 'image/x-icon',
18
+ 'jpg|jpeg|jpe' => 'image/jpeg',
19
+ 'json' => 'application/json',
20
+ 'mdb' => 'application/vnd.ms-access',
21
+ 'mid|midi' => 'audio/midi',
22
+ 'mov|qt' => 'video/quicktime',
23
+ 'mp3|m4a' => 'audio/mpeg',
24
+ 'mp4|m4v' => 'video/mp4',
25
+ 'mpeg|mpg|mpe' => 'video/mpeg',
26
+ 'mpp' => 'application/vnd.ms-project',
27
+ 'otf' => array('application/x-font-otf', 'application/vnd.ms-opentype'),
28
+ 'odb' => 'application/vnd.oasis.opendocument.database',
29
+ 'odc' => 'application/vnd.oasis.opendocument.chart',
30
+ 'odf' => 'application/vnd.oasis.opendocument.formula',
31
+ 'odg' => 'application/vnd.oasis.opendocument.graphics',
32
+ 'odp' => 'application/vnd.oasis.opendocument.presentation',
33
+ 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
34
+ 'odt' => 'application/vnd.oasis.opendocument.text',
35
+ 'ogg' => 'audio/ogg',
36
+ 'pdf' => 'application/pdf',
37
+ 'png' => 'image/png',
38
+ 'pot|pps|ppt|pptx' => 'application/vnd.ms-powerpoint',
39
+ 'ra|ram' => 'audio/x-realaudio',
40
+ 'svg|svgz' => 'image/svg+xml',
41
+ 'swf' => 'application/x-shockwave-flash',
42
+ 'tar' => 'application/x-tar',
43
+ 'tif|tiff' => 'image/tiff',
44
+ 'ttf|ttc' => array('application/x-font-ttf', 'application/vnd.ms-opentype'),
45
+ 'wav' => 'audio/wav',
46
+ 'wma' => 'audio/wma',
47
+ 'wri' => 'application/vnd.ms-write',
48
+ 'woff' => 'application/font-woff',
49
+ 'xla|xls|xlsx|xlt|xlw' => 'application/vnd.ms-excel',
50
+ 'zip' => 'application/zip'
51
+ );
inc/options/about.php CHANGED
@@ -1,52 +1,52 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
3
-
4
- <div id="about">
5
- <p><?php _e('User experience is an important aspect of every web site and all web sites can benefit from effective caching and file size reduction. We have applied web site optimization methods typically used with high traffic sites and simplified their implementation. Coupling these methods either <a href="http://memcached.org/" target="_blank">memcached</a> and/or opcode caching and the <acronym title="Content Delivery Network">CDN</acronym> of your choosing to provide the following features and benefits:') ?></p>
6
-
7
- <ul>
8
- <li><?php _e('Improved Google search engine ranking', 'w3-total-cache'); ?></li>
9
- <li><?php _e('Increased visitor time on site', 'w3-total-cache'); ?></li>
10
- <li><?php _e('Optimized progressive render (pages start rendering immediately)', 'w3-total-cache'); ?></li>
11
- <li><?php _e('Reduced <acronym title="Hypertext Transfer Protocol">HTTP</acronym> Transactions, <acronym title="Domain Name System">DNS</acronym> lookups and reduced document load time', 'w3-total-cache'); ?></li>
12
- <li><?php _e('Bandwidth savings via Minify and <acronym title="Hypertext Transfer Protocol">HTTP</acronym> compression of <acronym title="Hypertext Markup Language">HTML</acronym>, <acronym title="Cascading Style Sheet">CSS</acronym>, JavaScript and feeds', 'w3-total-cache'); ?></li>
13
- <li><?php _e('Increased web server concurrency and increased scale (easily sustain high traffic spikes)', 'w3-total-cache'); ?></li>
14
- <li><?php _e('Transparent content delivery network (<acronym title="Content Delivery Network">CDN</acronym>) integration with Media Library, theme files and WordPress core', 'w3-total-cache'); ?></li>
15
- <li><?php _e('Caching of pages / posts in memory or on disk or on CDN (mirror only)', 'w3-total-cache'); ?></li>
16
- <li><?php _e('Caching of (minified) <acronym title="Cascading Style Sheet">CSS</acronym> and JavaScript in memory, on disk or on <acronym title="Content Delivery Network">CDN</acronym>', 'w3-total-cache'); ?></li>
17
- <li><?php _e('Caching of database objects in memory or on disk', 'w3-total-cache'); ?></li>
18
- <li><?php _e('Caching of objects in memory or on disk', 'w3-total-cache'); ?></li>
19
- <li><?php _e('Caching of feeds (site, categories, tags, comments, search results) in memory or on disk', 'w3-total-cache'); ?></li>
20
- <li><?php _e('Caching of search results pages (i.e. <acronym title="Uniform Resource Identifier">URI</acronym>s with query string variables) in memory or on disk', 'w3-total-cache'); ?></li>
21
- <li><?php _e('Minification of posts / pages and feeds', 'w3-total-cache'); ?></li>
22
- <li><?php _e('Minification (concatenation and white space removal) of inline, external or 3rd party JavaScript / <acronym title="Cascading Style Sheet">CSS</acronym> with automated updates', 'w3-total-cache'); ?></li>
23
- <li><?php _e('Complete header management including <a href="http://en.wikipedia.org/wiki/HTTP_ETag">Etags</a>', 'w3-total-cache'); ?></li>
24
- <li><?php _e('JavaScript embedding group and location management', 'w3-total-cache'); ?></li>
25
- <li><?php _e('Import post attachments directly into the Media Library (and <acronym title="Content Delivery Network">CDN</acronym>)', 'w3-total-cache'); ?></li>
26
- </ul>
27
-
28
- <p><?php _e('Your users have less data to download, you can now serve more visitors at once without upgrading your hardware and you don\'t have to change how you do anything; just set it and forget it.', 'w3-total-cache'); ?></p>
29
-
30
- <h4><?php _e('Who do I thank for all of this?', 'w3-total-cache'); ?></h4>
31
-
32
- <p><?php _e('It\'s quite difficult to recall all of the innovators that have shared their thoughts, code and experiences in the blogosphere over the years, but here are some names to get you started:', 'w3-total-cache'); ?></p>
33
-
34
- <ul>
35
- <li><a href="http://stevesouders.com/" target="_blank">Steve Souders</a></li>
36
- <li><a href="http://mrclay.org/" target="_blank">Steve Clay</a></li>
37
- <li><a href="http://wonko.com/" target="_blank">Ryan Grove</a></li>
38
- <li><a href="http://www.nczonline.net/blog/2009/06/23/loading-javascript-without-blocking/" target="_blank">Nicholas Zakas</a> </li>
39
- <li><a href="http://rtdean.livejournal.com/" target="_blank">Ryan Dean</a></li>
40
- <li><a href="http://gravitonic.com/" target="_blank">Andrei Zmievski</a></li>
41
- <li>George Schlossnagle</li>
42
- <li>Daniel Cowgill</li>
43
- <li><a href="http://toys.lerdorf.com/" target="_blank">Rasmus Lerdorf</a></li>
44
- <li><a href="http://t3.dotgnu.info/" target="_blank">Gopal Vijayaraghavan</a></li>
45
- <li><a href="http://eaccelerator.net/" target="_blank">Bart Vanbraban</a></li>
46
- <li><a href="http://xcache.lighttpd.net/" target="_blank">mOo</a></li>
47
- </ul>
48
-
49
- <p><?php _e('Please reach out to all of these people and support their projects if you\'re so inclined.', 'w3-total-cache'); ?></p>
50
- </div>
51
-
52
- <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
3
+
4
+ <div id="about">
5
+ <p><?php _e('User experience is an important aspect of every web site and all web sites can benefit from effective caching and file size reduction. We have applied web site optimization methods typically used with high traffic sites and simplified their implementation. Coupling these methods either <a href="http://memcached.org/" target="_blank">memcached</a> and/or opcode caching and the <acronym title="Content Delivery Network">CDN</acronym> of your choosing to provide the following features and benefits:') ?></p>
6
+
7
+ <ul>
8
+ <li><?php _e('Improved Google search engine ranking', 'w3-total-cache'); ?></li>
9
+ <li><?php _e('Increased visitor time on site', 'w3-total-cache'); ?></li>
10
+ <li><?php _e('Optimized progressive render (pages start rendering immediately)', 'w3-total-cache'); ?></li>
11
+ <li><?php _e('Reduced <acronym title="Hypertext Transfer Protocol">HTTP</acronym> Transactions, <acronym title="Domain Name System">DNS</acronym> lookups and reduced document load time', 'w3-total-cache'); ?></li>
12
+ <li><?php _e('Bandwidth savings via Minify and <acronym title="Hypertext Transfer Protocol">HTTP</acronym> compression of <acronym title="Hypertext Markup Language">HTML</acronym>, <acronym title="Cascading Style Sheet">CSS</acronym>, JavaScript and feeds', 'w3-total-cache'); ?></li>
13
+ <li><?php _e('Increased web server concurrency and increased scale (easily sustain high traffic spikes)', 'w3-total-cache'); ?></li>
14
+ <li><?php _e('Transparent content delivery network (<acronym title="Content Delivery Network">CDN</acronym>) integration with Media Library, theme files and WordPress core', 'w3-total-cache'); ?></li>
15
+ <li><?php _e('Caching of pages / posts in memory or on disk or on CDN (mirror only)', 'w3-total-cache'); ?></li>
16
+ <li><?php _e('Caching of (minified) <acronym title="Cascading Style Sheet">CSS</acronym> and JavaScript in memory, on disk or on <acronym title="Content Delivery Network">CDN</acronym>', 'w3-total-cache'); ?></li>
17
+ <li><?php _e('Caching of database objects in memory or on disk', 'w3-total-cache'); ?></li>
18
+ <li><?php _e('Caching of objects in memory or on disk', 'w3-total-cache'); ?></li>
19
+ <li><?php _e('Caching of feeds (site, categories, tags, comments, search results) in memory or on disk', 'w3-total-cache'); ?></li>
20
+ <li><?php _e('Caching of search results pages (i.e. <acronym title="Uniform Resource Identifier">URI</acronym>s with query string variables) in memory or on disk', 'w3-total-cache'); ?></li>
21
+ <li><?php _e('Minification of posts / pages and feeds', 'w3-total-cache'); ?></li>
22
+ <li><?php _e('Minification (concatenation and white space removal) of inline, external or 3rd party JavaScript / <acronym title="Cascading Style Sheet">CSS</acronym> with automated updates', 'w3-total-cache'); ?></li>
23
+ <li><?php _e('Complete header management including <a href="http://en.wikipedia.org/wiki/HTTP_ETag">Etags</a>', 'w3-total-cache'); ?></li>
24
+ <li><?php _e('JavaScript embedding group and location management', 'w3-total-cache'); ?></li>
25
+ <li><?php _e('Import post attachments directly into the Media Library (and <acronym title="Content Delivery Network">CDN</acronym>)', 'w3-total-cache'); ?></li>
26
+ </ul>
27
+
28
+ <p><?php _e('Your users have less data to download, you can now serve more visitors at once without upgrading your hardware and you don\'t have to change how you do anything; just set it and forget it.', 'w3-total-cache'); ?></p>
29
+
30
+ <h4><?php _e('Who do I thank for all of this?', 'w3-total-cache'); ?></h4>
31
+
32
+ <p><?php _e('It\'s quite difficult to recall all of the innovators that have shared their thoughts, code and experiences in the blogosphere over the years, but here are some names to get you started:', 'w3-total-cache'); ?></p>
33
+
34
+ <ul>
35
+ <li><a href="http://stevesouders.com/" target="_blank">Steve Souders</a></li>
36
+ <li><a href="http://mrclay.org/" target="_blank">Steve Clay</a></li>
37
+ <li><a href="http://wonko.com/" target="_blank">Ryan Grove</a></li>
38
+ <li><a href="http://www.nczonline.net/blog/2009/06/23/loading-javascript-without-blocking/" target="_blank">Nicholas Zakas</a> </li>
39
+ <li><a href="http://rtdean.livejournal.com/" target="_blank">Ryan Dean</a></li>
40
+ <li><a href="http://gravitonic.com/" target="_blank">Andrei Zmievski</a></li>
41
+ <li>George Schlossnagle</li>
42
+ <li>Daniel Cowgill</li>
43
+ <li><a href="http://toys.lerdorf.com/" target="_blank">Rasmus Lerdorf</a></li>
44
+ <li><a href="http://notmysock.org/" target="_blank">Gopal Vijayaraghavan</a></li>
45
+ <li><a href="http://eaccelerator.net/" target="_blank">Bart Vanbraban</a></li>
46
+ <li><a href="http://xcache.lighttpd.net/" target="_blank">mOo</a></li>
47
+ </ul>
48
+
49
+ <p><?php _e('Please reach out to all of these people and support their projects if you\'re so inclined.', 'w3-total-cache'); ?></p>
50
+ </div>
51
+
52
+ <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
inc/options/browsercache.php CHANGED
@@ -1,379 +1,380 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
3
-
4
- <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
5
- <p>
6
- <?php echo sprintf(__('Browser caching is currently %s.', 'w3-total-cache'), '<span class="w3tc-' . ($browsercache_enabled ? 'enabled">' . __('enabled', 'w3-total-cache') : 'disabled">' . __('disabled', 'w3-total-cache')) . '</span>'); ?>
7
- </p>
8
- <p>
9
- <?php echo $this->nonce_field('w3tc'); ?>
10
-
11
- <?php echo sprintf(
12
- __('%sUpdate media query string%s to make existing file modifications visible to visitors with a primed cache', 'w3-total-cache'),
13
- '<input type="submit" name="w3tc_flush_browser_cache" value="',
14
- '" ' . disabled(!($browsercache_enabled && $browsercache_update_media_qs), true, false) . ' class="button" />');
15
- ?>
16
- </p>
17
- </form>
18
- <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
19
- <div class="metabox-holder">
20
- <?php echo $this->postbox_header(__('General', 'w3-total-cache'), '', 'general'); ?>
21
- <p><?php _e('Specify global browser cache policy.', 'w3-total-cache') ?></p>
22
- <table class="form-table">
23
- <?php if (!w3_is_nginx()): ?>
24
- <tr>
25
- <th colspan="2">
26
- <label>
27
- <input id="browsercache_last_modified" type="checkbox" name="expires"
28
- <?php $this->sealing_disabled('browsercache') ?>
29
- value="1"<?php checked($browsercache_last_modified, true); ?> /> <?php _e('Set Last-Modified header', 'w3-total-cache'); ?></label>
30
- <br /><span class="description"><?php _e('Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache'); ?></span>
31
- </th>
32
- </tr>
33
- <?php endif; ?>
34
- <tr>
35
- <th colspan="2">
36
- <label>
37
- <input id="browsercache_expires" type="checkbox" name="expires"
38
- <?php $this->sealing_disabled('browsercache') ?>
39
- value="1"<?php checked($browsercache_expires, true); ?> /> <?php _e('Set expires header', 'w3-total-cache'); ?></label>
40
- <br /><span class="description"><?php _e('Set the expires header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
41
- </th>
42
- </tr>
43
- <tr>
44
- <th colspan="2">
45
- <label><input id="browsercache_cache_control" type="checkbox"
46
- <?php $this->sealing_disabled('browsercache') ?> name="cache_control" value="1"<?php checked($browsercache_cache_control, true); ?> /> <?php _e('Set cache control header', 'w3-total-cache'); ?></label>
47
- <br /><span class="description"><?php _e('Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache'); ?></span>
48
- </th>
49
- </tr>
50
- <tr>
51
- <th colspan="2">
52
- <label><input id="browsercache_etag" type="checkbox"
53
- <?php $this->sealing_disabled('browsercache') ?>
54
- name="etag" value="1"<?php checked($browsercache_etag, true); ?> /> <?php _e('Set entity tag (eTag)', 'w3-total-cache'); ?></label>
55
- <br /><span class="description"><?php _e('Set the Etag header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
56
- </th>
57
- </tr>
58
- <tr>
59
- <th colspan="2">
60
- <label><input id="browsercache_w3tc" type="checkbox" name="w3tc"
61
- <?php $this->sealing_disabled('browsercache') ?> value="1" <?php checked($browsercache_w3tc, true); ?> /> <?php _e('Set W3 Total Cache header', 'w3-total-cache'); ?></label>
62
- <br /><span class="description"><?php _e('Set this header to assist in identifying optimized files.', 'w3-total-cache'); ?></span>
63
- </th>
64
- </tr>
65
- <tr>
66
- <th colspan="2">
67
- <label><input id="browsercache_compression" type="checkbox"
68
- <?php $this->sealing_disabled('browsercache') ?>
69
- name="compression"<?php checked($browsercache_compression, true); ?> value="1" /> <?php _e('Enable <acronym title="Hypertext Transfer Protocol">HTTP</acronym> (gzip) compression', 'w3-total-cache'); ?></label>
70
- <br /><span class="description"><?php _e('Reduce the download time for text-based files.', 'w3-total-cache'); ?></span>
71
- </th>
72
- </tr>
73
- <tr>
74
- <th colspan="2">
75
- <label><input id="browsercache_replace" type="checkbox"
76
- <?php $this->sealing_disabled('browsercache') ?>
77
- name="replace" value="1"<?php checked($browsercache_replace, true); ?> /> <?php _e('Prevent caching of objects after settings change', 'w3-total-cache'); ?></label>
78
- <br /><span class="description"><?php _e('Whenever settings are changed, a new query string will be generated and appended to objects allowing the new policy to be applied.', 'w3-total-cache'); ?></span>
79
- </th>
80
- </tr>
81
- <tr>
82
- <th><label for="browsercache_replace_exceptions"><?php _e('Prevent caching exception list:', 'w3-total-cache'); ?></label></th>
83
- <td>
84
- <textarea id="browsercache_replace_exceptions"
85
- <?php $this->sealing_disabled('browsercache') ?>
86
- name="browsercache.replace.exceptions" cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('browsercache.replace.exceptions'))); ?></textarea><br />
87
- <span class="description"><?php _e('Do not add the prevent caching query string to the specified files. Supports regular expression.', 'w3-total-cache'); ?></span>
88
- </td>
89
- </tr>
90
- <tr>
91
- <th colspan="2">
92
- <label><input id="browsercache_nocookies" type="checkbox"
93
- <?php $this->sealing_disabled('browsercache') ?>
94
- name="nocookies" value="1"<?php checked($browsercache_nocookies, true); ?> /> <?php _e('Disable cookies for static files', 'w3-total-cache'); ?></label>
95
- <br /><span class="description"><?php _e('Removes Set-Cookie header for responses.'); ?></span>
96
- </th>
97
- </tr>
98
- <tr>
99
- <th colspan="2">
100
- <?php $this->checkbox('browsercache.no404wp', !w3_can_check_rules()) ?> <?php _e('Do not process 404 errors for static objects with WordPress', 'w3-total-cache'); ?></label>
101
- <br /><span class="description"><?php _e('Reduce server load by allowing the web server to handle 404 (not found) errors for static files (images etc).', 'w3-total-cache'); ?></span>
102
- </th>
103
- </tr>
104
- <tr>
105
- <th><label for="browsercache_no404wp_exceptions"><?php _e('404 error exception list:', 'w3-total-cache'); ?></label></th>
106
- <td>
107
- <textarea id="browsercache_no404wp_exceptions"
108
- <?php $this->sealing_disabled('browsercache') ?>
109
- name="browsercache.no404wp.exceptions" cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('browsercache.no404wp.exceptions'))); ?></textarea><br />
110
- <span class="description"><?php _e('Never process 404 (not found) events for the specified files.', 'w3-total-cache'); ?></span>
111
- </td>
112
- </tr>
113
- </table>
114
-
115
- <p class="submit">
116
- <?php echo $this->nonce_field('w3tc'); ?>
117
- <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save all settings', 'w3-total-cache'); ?>" />
118
- </p>
119
- <?php echo $this->postbox_footer(); ?>
120
-
121
- <?php echo $this->postbox_header(__('<acronym title="Cascading Style Sheet">CSS</acronym> &amp; <acronym title="JavaScript">JS</acronym>', 'w3-total-cache'), '', 'css_js'); ?>
122
- <p><?php _e('Specify browser cache policy for Cascading Style Sheets and JavaScript files.', 'w3-total-cache'); ?></p>
123
-
124
- <table class="form-table">
125
- <?php if (!w3_is_nginx()): ?>
126
- <tr>
127
- <th colspan="2">
128
- <?php $this->checkbox('browsercache.cssjs.last_modified') ?> <?php _e('Set Last-Modified header', 'w3-total-cache'); ?></label>
129
- <br /><span class="description"><?php _e('Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache'); ?></span>
130
- </th>
131
- </tr>
132
- <?php endif; ?>
133
- <tr>
134
- <th colspan="2">
135
- <?php $this->checkbox('browsercache.cssjs.expires') ?> <?php _e('Set expires header', 'w3-total-cache'); ?></label>
136
- <br /><span class="description"><?php _e('Set the expires header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
137
- </th>
138
- </tr>
139
- <tr>
140
- <th>
141
- <label for="browsercache_cssjs_lifetime"><?php _e('Expires header lifetime:', 'w3-total-cache'); ?></label>
142
- </th>
143
- <td>
144
- <input id="browsercache_cssjs_lifetime" type="text"
145
- <?php $this->sealing_disabled('browsercache') ?>
146
- name="browsercache.cssjs.lifetime" value="<?php echo esc_attr($this->_config->get_integer('browsercache.cssjs.lifetime')); ?>" size="8" /> <?php _e('seconds', 'w3-total-cache'); ?>
147
- </td>
148
- </tr>
149
- <tr>
150
- <th colspan="2">
151
- <?php $this->checkbox('browsercache.cssjs.cache.control') ?> <?php _e('Set cache control header', 'w3-total-cache'); ?></label>
152
- <br /><span class="description"><?php _e('Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache'); ?></span>
153
- </th>
154
- </tr>
155
- <tr>
156
- <th>
157
- <label for="browsercache_cssjs_cache_policy"><?php _e('Cache Control policy:', 'w3-total-cache'); ?></label>
158
- </th>
159
- <td>
160
- <select id="browsercache_cssjs_cache_policy"
161
- <?php $this->sealing_disabled('browsercache') ?>
162
- name="browsercache.cssjs.cache.policy">
163
- <?php $value = $this->_config->get_string('browsercache.cssjs.cache.policy'); ?>
164
- <option value="cache"<?php selected($value, 'cache'); ?>>cache ("public")</option>
165
- <option value="cache_public_maxage"<?php selected($value, 'cache_public_maxage'); ?>><?php _e('cache with max-age ("public, max-age=EXPIRES_SECONDS")', 'w3-total-cache'); ?></option>
166
- <option value="cache_validation"<?php selected($value, 'cache_validation'); ?>><?php _e('cache with validation ("public, must-revalidate, proxy-revalidate"', 'w3-total-cache'); ?></option>
167
- <option value="cache_maxage"<?php selected($value, 'cache_maxage'); ?>><?php _e('cache with max-age and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate")', 'w3-total-cache'); ?></option>
168
- <option value="cache_noproxy"<?php selected($value, 'cache_noproxy'); ?>><?php _e('cache without proxy ("private, must-revalidate")', 'w3-total-cache'); ?></option>
169
- <option value="no_cache"<?php selected($value, 'no_cache'); ?>><?php _e('no-cache ("max-age=0, private, no-store, no-cache, must-revalidate"', 'w3-total-cache'); ?></option>
170
- </select>
171
- </td>
172
- </tr>
173
- <tr>
174
- <th colspan="2">
175
- <?php $this->checkbox('browsercache.cssjs.etag') ?> <?php _e('Set entity tag (eTag)', 'w3-total-cache'); ?></label>
176
- <br /><span class="description"><?php _e('Set the Etag header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
177
- </th>
178
- </tr>
179
- <tr>
180
- <th colspan="2">
181
- <?php $this->checkbox('browsercache.cssjs.w3tc') ?> <?php _e('Set W3 Total Cache header', 'w3-total-cache'); ?></label>
182
- <br /><span class="description"><?php _e('Set this header to assist in identifying optimized files.', 'w3-total-cache'); ?></span>
183
- </th>
184
- </tr>
185
- <tr>
186
- <th colspan="2">
187
- <?php $this->checkbox('browsercache.cssjs.compression') ?> <?php _e('Enable <acronym title="Hypertext Transfer Protocol">HTTP</acronym> (gzip) compression', 'w3-total-cache'); ?> </label>
188
- <br /><span class="description"><?php _e('Reduce the download time for text-based files.', 'w3-total-cache'); ?></span>
189
- </th>
190
- </tr>
191
- <tr>
192
- <th colspan="2">
193
- <?php $this->checkbox('browsercache.cssjs.replace') ?> <?php _e('Prevent caching of objects after settings change', 'w3-total-cache'); ?></label>
194
- <br /><span class="description"><?php _e('Whenever settings are changed, a new query string will be generated and appended to objects allowing the new policy to be applied.', 'w3-total-cache'); ?></span>
195
- </th>
196
- </tr>
197
- <tr>
198
- <th colspan="2">
199
- <?php $this->checkbox('browsercache.cssjs.nocookies') ?> <?php _e('Disable cookies for static files', 'w3-total-cache'); ?></label>
200
- <br /><span class="description"><?php _e('Removes Set-Cookie header for responses.', 'w3-total-cache'); ?></span>
201
- </th>
202
- </tr>
203
- </table>
204
-
205
- <p class="submit">
206
- <?php echo $this->nonce_field('w3tc'); ?>
207
- <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save all settings', 'w3-total-cache'); ?>" />
208
- </p>
209
- <?php echo $this->postbox_footer(); ?>
210
-
211
- <?php echo $this->postbox_header(__('<acronym title="Hypertext Markup Language">HTML</acronym> &amp; <acronym title="Extensible Markup Language">XML</acronym>', 'w3-total-cache'), '', 'html_xml'); ?>
212
- <p><?php _e('Specify browser cache policy for posts, pages, feeds and text-based files.', 'w3-total-cache'); ?></p>
213
-
214
- <table class="form-table">
215
- <?php if (!w3_is_nginx()): ?>
216
- <tr>
217
- <th colspan="2">
218
- <?php $this->checkbox('browsercache.html.last_modified') ?> <?php _e('Set Last-Modified header', 'w3-total-cache'); ?></label>
219
- <br /><span class="description"><?php _e('Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache'); ?></span>
220
- </th>
221
- </tr>
222
- <?php endif; ?>
223
- <tr>
224
- <th colspan="2">
225
- <?php $this->checkbox('browsercache.html.expires') ?> <?php _e('Set expires header', 'w3-total-cache'); ?></label>
226
- <br /><span class="description"><?php _e('Set the expires header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
227
- </th>
228
- </tr>
229
- <tr>
230
- <th style="width: 250px;">
231
- <label for="browsercache_html_lifetime"><?php _e('Expires header lifetime:', 'w3-total-cache'); ?></label>
232
- </th>
233
- <td>
234
- <input id="browsercache_html_lifetime" type="text"
235
- name="browsercache.html.lifetime"
236
- <?php $this->sealing_disabled('browsercache') ?>
237
- value="<?php echo esc_attr($this->_config->get_integer('browsercache.html.lifetime')); ?>" size="8" /> <?php _e('seconds', 'w3-total-cache'); ?>
238
- </td>
239
- </tr>
240
- <tr>
241
- <th colspan="2">
242
- <?php $this->checkbox('browsercache.html.cache.control') ?> <?php _e('Set cache control header', 'w3-total-cache'); ?></label>
243
- <br /><span class="description"><?php _e('Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache'); ?></span>
244
- </th>
245
- </tr>
246
- <tr>
247
- <th>
248
- <label for="browsercache_html_cache_policy"><?php _e('Cache Control policy:', 'w3-total-cache'); ?></label>
249
- </th>
250
- <td>
251
- <select id="browsercache_html_cache_policy" name="browsercache.html.cache.policy"
252
- <?php $this->sealing_disabled('browsercache') ?>>
253
- <?php $value = $this->_config->get_string('browsercache.html.cache.policy'); ?>
254
- <option value="cache"<?php selected($value, 'cache'); ?>>cache ("public")</option>
255
- <option value="cache_public_maxage"<?php selected($value, 'cache_public_maxage'); ?>><?php _e('cache with max-age ("public, max-age=EXPIRES_SECONDS")', 'w3-total-cache'); ?></option>
256
- <option value="cache_validation"<?php selected($value, 'cache_validation'); ?>><?php _e('cache with validation ("public, must-revalidate, proxy-revalidate")', 'w3-total-cache'); ?></option>
257
- <option value="cache_maxage"<?php selected($value, 'cache_maxage'); ?>><?php _e('cache with max-age and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate")', 'w3-total-cache'); ?></option>
258
- <option value="cache_noproxy"<?php selected($value, 'cache_noproxy'); ?>><?php _e('cache without proxy ("private, must-revalidate")', 'w3-total-cache'); ?></option>
259
- <option value="no_cache"<?php selected($value, 'no_cache'); ?>><?php _e('no-cache ("max-age=0, private, no-store, no-cache, must-revalidate")', 'w3-total-cache'); ?></option>
260
- </select>
261
- </td>
262
- </tr>
263
- <tr>
264
- <th colspan="2">
265
- <?php $this->checkbox('browsercache.html.etag') ?> <?php _e('Set entity tag (eTag)', 'w3-total-cache'); ?></label>
266
- <br /><span class="description"><?php _e('Set the Etag header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
267
- </th>
268
- </tr>
269
- <tr>
270
- <th colspan="2">
271
- <?php $this->checkbox('browsercache.html.w3tc') ?> <?php _e('Set W3 Total Cache header', 'w3-total-cache'); ?></label>
272
- <br /><span class="description"><?php _e('Set this header to assist in identifying optimized files.', 'w3-total-cache'); ?></span>
273
- </th>
274
- </tr>
275
- <tr>
276
- <th colspan="2">
277
- <?php $this->checkbox('browsercache.html.compression') ?> <?php _e('Enable <acronym title="Hypertext Transfer Protocol">HTTP</acronym> (gzip) compression', 'w3-total-cache'); ?></label>
278
- <br /><span class="description"><?php _e('Reduce the download time for text-based files.', 'w3-total-cache'); ?></span>
279
- </th>
280
- </tr>
281
- </table>
282
-
283
- <p class="submit">
284
- <?php echo $this->nonce_field('w3tc'); ?>
285
- <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save all settings', 'w3-total-cache'); ?>" />
286
- </p>
287
- <?php echo $this->postbox_footer(); ?>
288
-
289
- <?php echo $this->postbox_header(__('Media &amp; Other Files', 'w3-total-cache'), '', 'media'); ?>
290
- <table class="form-table">
291
- <?php if (!w3_is_nginx()): ?>
292
- <tr>
293
- <th colspan="2">
294
- <?php $this->checkbox('browsercache.other.last_modified') ?> <?php _e('Set Last-Modified header', 'w3-total-cache'); ?></label>
295
- <br /><span class="description"><?php _e('Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache'); ?></span>
296
- </th>
297
- </tr>
298
- <?php endif; ?>
299
- <tr>
300
- <th colspan="2">
301
- <?php $this->checkbox('browsercache.other.expires') ?> <?php _e('Set expires header', 'w3-total-cache'); ?></label>
302
- <br /><span class="description"><?php _e('Set the expires header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
303
- </th>
304
- </tr>
305
- <tr>
306
- <th style="width: 250px;">
307
- <label for="browsercache_other_lifetime"><?php _e('Expires header lifetime:', 'w3-total-cache'); ?></label>
308
- </th>
309
- <td>
310
- <input id="browsercache_other_lifetime" type="text"
311
- <?php $this->sealing_disabled('browsercache') ?>
312
- name="browsercache.other.lifetime" value="<?php echo esc_attr($this->_config->get_integer('browsercache.other.lifetime')); ?>" size="8" /> <?php _e('seconds', 'w3-total-cache'); ?>
313
- </td>
314
- </tr>
315
- <tr>
316
- <th colspan="2">
317
- <?php $this->checkbox('browsercache.other.cache.control') ?> <?php _e('Set cache control header', 'w3-total-cache'); ?></label>
318
- <br /><span class="description"><?php _e('Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache'); ?></span>
319
- </th>
320
- </tr>
321
- <tr>
322
- <th>
323
- <label for="browsercache_other_cache_policy"><?php _e('Cache Control policy:', 'w3-total-cache'); ?></label>
324
- </th>
325
- <td>
326
- <select id="browsercache_other_cache_policy"
327
- <?php $this->sealing_disabled('browsercache') ?>
328
- name="browsercache.other.cache.policy">
329
- <?php $value = $this->_config->get_string('browsercache.other.cache.policy'); ?>
330
- <option value="cache"<?php selected($value, 'cache'); ?>><?php _e('cache ("public")'); ?></option>
331
- <option value="cache_public_maxage"<?php selected($value, 'cache_public_maxage'); ?>><?php _e('cache with max-age ("public, max-age=EXPIRES_SECONDS")', 'w3-total-cache'); ?></option>
332
- <option value="cache_validation"<?php selected($value, 'cache_validation'); ?>><?php _e('cache with validation ("public, must-revalidate, proxy-revalidate")', 'w3-total-cache'); ?></option>
333
- <option value="cache_maxage"<?php selected($value, 'cache_maxage'); ?>><?php _e('cache with max-age and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate")', 'w3-total-cache'); ?></option>
334
- <option value="cache_noproxy"<?php selected($value, 'cache_noproxy'); ?>><?php _e('cache without proxy ("private, must-revalidate")', 'w3-total-cache'); ?></option>
335
- <option value="no_cache"<?php selected($value, 'no_cache'); ?>><?php _e('no-cache ("max-age=0, private, no-store, no-cache, must-revalidate")', 'w3-total-cache'); ?></option>
336
- </select>
337
- </td>
338
- </tr>
339
- <tr>
340
- <th colspan="2">
341
- <?php $this->checkbox('browsercache.other.etag') ?> <?php _e('Set entity tag (eTag)', 'w3-total-cache'); ?></label>
342
- <br /><span class="description"><?php _e('Set the Etag header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
343
- </th>
344
- </tr>
345
- <tr>
346
- <th colspan="2">
347
- <?php $this->checkbox('browsercache.other.w3tc') ?> <?php _e('Set W3 Total Cache header', 'w3-total-cache'); ?></label>
348
- <br /><span class="description"><?php _e('Set this header to assist in identifying optimized files.', 'w3-total-cache'); ?></span>
349
- </th>
350
- </tr>
351
- <tr>
352
- <th colspan="2">
353
- <?php $this->checkbox('browsercache.other.compression') ?> <?php _e('Enable <acronym title="Hypertext Transfer Protocol">HTTP</acronym> (gzip) compression</label>', 'w3-total-cache'); ?>
354
- <br /><span class="description"><?php _e('Reduce the download time for text-based files.', 'w3-total-cache'); ?></span>
355
- </th>
356
- </tr>
357
- <tr>
358
- <th colspan="2">
359
- <?php $this->checkbox('browsercache.other.replace') ?> <?php _e('Prevent caching of objects after settings change', 'w3-total-cache'); ?></label>
360
- <br /><span class="description"><?php _e('Whenever settings are changed, a new query string will be generated and appended to objects allowing the new policy to be applied.', 'w3-total-cache'); ?></span>
361
- </th>
362
- </tr>
363
- <tr>
364
- <th colspan="2">
365
- <?php $this->checkbox('browsercache.other.nocookies') ?> <?php _e('Disable cookies for static files', 'w3-total-cache'); ?></label>
366
- <br /><span class="description"><?php _e('Removes Set-Cookie header for responses.', 'w3-total-cache'); ?></span>
367
- </th>
368
- </tr>
369
- </table>
370
-
371
- <p class="submit">
372
- <?php echo $this->nonce_field('w3tc'); ?>
373
- <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save all settings', 'w3-total-cache'); ?>" />
374
- </p>
375
- <?php echo $this->postbox_footer(); ?>
376
- </div>
377
- </form>
378
-
379
- <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
 
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
3
+
4
+ <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
5
+ <p>
6
+ <?php echo sprintf(__('Browser caching is currently %s.', 'w3-total-cache'), '<span class="w3tc-' . ($browsercache_enabled ? 'enabled">' . __('enabled', 'w3-total-cache') : 'disabled">' . __('disabled', 'w3-total-cache')) . '</span>'); ?>
7
+ </p>
8
+ <p>
9
+ <?php echo $this->nonce_field('w3tc'); ?>
10
+
11
+ <?php echo sprintf(
12
+ __('%sUpdate media query string%s to make existing file modifications visible to visitors with a primed cache', 'w3-total-cache'),
13
+ '<input type="submit" name="w3tc_flush_browser_cache" value="',
14
+ '" ' . disabled(!($browsercache_enabled && $browsercache_update_media_qs), true, false) . ' class="button" />');
15
+ ?>
16
+ </p>
17
+ </form>
18
+ <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
19
+ <div class="metabox-holder">
20
+ <?php echo $this->postbox_header(__('General', 'w3-total-cache'), '', 'general'); ?>
21
+ <p><?php _e('Specify global browser cache policy.', 'w3-total-cache') ?></p>
22
+ <table class="form-table">
23
+ <?php if (!w3_is_nginx()): ?>
24
+ <tr>
25
+ <th colspan="2">
26
+ <label>
27
+ <input id="browsercache_last_modified" type="checkbox" name="expires"
28
+ <?php $this->sealing_disabled('browsercache') ?>
29
+ value="1"<?php checked($browsercache_last_modified, true); ?> /> <?php _e('Set Last-Modified header', 'w3-total-cache'); ?></label>
30
+ <br /><span class="description"><?php _e('Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache'); ?></span>
31
+ </th>
32
+ </tr>
33
+ <?php endif; ?>
34
+ <tr>
35
+ <th colspan="2">
36
+ <label>
37
+ <input id="browsercache_expires" type="checkbox" name="expires"
38
+ <?php $this->sealing_disabled('browsercache') ?>
39
+ value="1"<?php checked($browsercache_expires && $this->_config->get_string('cdn.engine') != 'cf2', true); ?> <?php disabled($this->_config->get_string('cdn.engine') == 'cf2' ) ?> /> <?php _e('Set expires header', 'w3-total-cache'); ?></label>
40
+ <br /><span class="description"><?php _e('Set the expires header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
41
+ </th>
42
+ </tr>
43
+ <tr>
44
+ <th colspan="2">
45
+ <label><input id="browsercache_cache_control" type="checkbox"
46
+ <?php $this->sealing_disabled('browsercache') ?> name="cache_control" value="1"<?php checked($browsercache_cache_control, true); ?> /> <?php _e('Set cache control header', 'w3-total-cache'); ?></label>
47
+ <br /><span class="description"><?php _e('Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache'); ?></span>
48
+ </th>
49
+ </tr>
50
+ <tr>
51
+ <th colspan="2">
52
+ <label><input id="browsercache_etag" type="checkbox"
53
+ <?php $this->sealing_disabled('browsercache') ?>
54
+ name="etag" value="1"<?php checked($browsercache_etag, true); ?> /> <?php _e('Set entity tag (eTag)', 'w3-total-cache'); ?></label>
55
+ <br /><span class="description"><?php _e('Set the Etag header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
56
+ </th>
57
+ </tr>
58
+ <tr>
59
+ <th colspan="2">
60
+ <label><input id="browsercache_w3tc" type="checkbox" name="w3tc"
61
+ <?php $this->sealing_disabled('browsercache') ?> value="1" <?php checked($browsercache_w3tc, true); ?> /> <?php _e('Set W3 Total Cache header', 'w3-total-cache'); ?></label>
62
+ <br /><span class="description"><?php _e('Set this header to assist in identifying optimized files.', 'w3-total-cache'); ?></span>
63
+ </th>
64
+ </tr>
65
+ <tr>
66
+ <th colspan="2">
67
+ <label><input id="browsercache_compression" type="checkbox"
68
+ <?php $this->sealing_disabled('browsercache') ?>
69
+ name="compression"<?php checked($browsercache_compression, true); ?> value="1" /> <?php _e('Enable <acronym title="Hypertext Transfer Protocol">HTTP</acronym> (gzip) compression', 'w3-total-cache'); ?></label>
70
+ <br /><span class="description"><?php _e('Reduce the download time for text-based files.', 'w3-total-cache'); ?></span>
71
+ </th>
72
+ </tr>
73
+ <tr>
74
+ <th colspan="2">
75
+ <label><input id="browsercache_replace" type="checkbox"
76
+ <?php $this->sealing_disabled('browsercache') ?>
77
+ name="replace" value="1"<?php checked($browsercache_replace, true); ?> /> <?php _e('Prevent caching of objects after settings change', 'w3-total-cache'); ?></label>
78
+ <br /><span class="description"><?php _e('Whenever settings are changed, a new query string will be generated and appended to objects allowing the new policy to be applied.', 'w3-total-cache'); ?></span>
79
+ </th>
80
+ </tr>
81
+ <tr>
82
+ <th><label for="browsercache_replace_exceptions"><?php w3_e_config_label('browsercache.replace.exceptions') ?></label></th>
83
+ <td>
84
+ <textarea id="browsercache_replace_exceptions"
85
+ <?php $this->sealing_disabled('browsercache') ?>
86
+ name="browsercache.replace.exceptions" cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('browsercache.replace.exceptions'))); ?></textarea><br />
87
+ <span class="description"><?php _e('Do not add the prevent caching query string to the specified files. Supports regular expressions.', 'w3-total-cache'); ?></span>
88
+ </td>
89
+ </tr>
90
+ <tr>
91
+ <th colspan="2">
92
+ <label><input id="browsercache_nocookies" type="checkbox"
93
+ <?php $this->sealing_disabled('browsercache') ?>
94
+ name="nocookies" value="1"<?php checked($browsercache_nocookies, true); ?> /> <?php _e("Don't set cookies for static files", 'w3-total-cache'); ?></label>
95
+ <br /><span class="description"><?php _e('Removes Set-Cookie header for responses.'); ?></span>
96
+ </th>
97
+ </tr>
98
+ <tr>
99
+ <th colspan="2">
100
+ <?php $this->checkbox('browsercache.no404wp', !w3_can_check_rules()) ?> <?php w3_e_config_label('browsercache.no404wp') ?></label>
101
+ <br /><span class="description"><?php _e('Reduce server load by allowing the web server to handle 404 (not found) errors for static files (images etc).', 'w3-total-cache'); ?></span>
102
+ <br /><span class="description"><?php _e('If enabled - tou may get 404 File Not Found response for some files generated on-the-fly by WordPress plugins. You may add those file URIs to 404 error exception list below to avoid that.', 'w3-total-cache'); ?></span>
103
+ </th>
104
+ </tr>
105
+ <tr>
106
+ <th><label for="browsercache_no404wp_exceptions"><?php w3_e_config_label('browsercache.no404wp.exceptions') ?></label></th>
107
+ <td>
108
+ <textarea id="browsercache_no404wp_exceptions"
109
+ <?php $this->sealing_disabled('browsercache') ?>
110
+ name="browsercache.no404wp.exceptions" cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('browsercache.no404wp.exceptions'))); ?></textarea><br />
111
+ <span class="description"><?php _e('Never process 404 (not found) events for the specified files.', 'w3-total-cache'); ?></span>
112
+ </td>
113
+ </tr>
114
+ </table>
115
+
116
+ <p class="submit">
117
+ <?php echo $this->nonce_field('w3tc'); ?>
118
+ <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save all settings', 'w3-total-cache'); ?>" />
119
+ </p>
120
+ <?php echo $this->postbox_footer(); ?>
121
+
122
+ <?php echo $this->postbox_header(__('<acronym title="Cascading Style Sheet">CSS</acronym> &amp; <acronym title="JavaScript">JS</acronym>', 'w3-total-cache'), '', 'css_js'); ?>
123
+ <p><?php _e('Specify browser cache policy for Cascading Style Sheets and JavaScript files.', 'w3-total-cache'); ?></p>
124
+
125
+ <table class="form-table">
126
+ <?php if (!w3_is_nginx()): ?>
127
+ <tr>
128
+ <th colspan="2">
129
+ <?php $this->checkbox('browsercache.cssjs.last_modified') ?> <?php w3_e_config_label('browsercache.cssjs.last_modified') ?></label>
130
+ <br /><span class="description"><?php _e('Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache'); ?></span>
131
+ </th>
132
+ </tr>
133
+ <?php endif; ?>
134
+ <tr>
135
+ <th colspan="2">
136
+ <?php $this->checkbox('browsercache.cssjs.expires', $this->_config->get_string('cdn.engine') == 'cf2') ?> <?php w3_e_config_label('browsercache.cssjs.expires') ?></label>
137
+ <br /><span class="description"><?php _e('Set the expires header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
138
+ </th>
139
+ </tr>
140
+ <tr>
141
+ <th>
142
+ <label for="browsercache_cssjs_lifetime"><?php w3_e_config_label('browsercache.cssjs.lifetime') ?></label>
143
+ </th>
144
+ <td>
145
+ <input id="browsercache_cssjs_lifetime" type="text"
146
+ <?php $this->sealing_disabled('browsercache') ?>
147
+ name="browsercache.cssjs.lifetime" value="<?php echo esc_attr($this->_config->get_integer('browsercache.cssjs.lifetime')); ?>" size="8" /> <?php _e('seconds', 'w3-total-cache'); ?>
148
+ </td>
149
+ </tr>
150
+ <tr>
151
+ <th colspan="2">
152
+ <?php $this->checkbox('browsercache.cssjs.cache.control') ?> <?php w3_e_config_label('browsercache.cssjs.cache.control') ?></label>
153
+ <br /><span class="description"><?php _e('Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache'); ?></span>
154
+ </th>
155
+ </tr>
156
+ <tr>
157
+ <th>
158
+ <label for="browsercache_cssjs_cache_policy"><?php w3_e_config_label('browsercache.cssjs.cache.policy') ?></label>
159
+ </th>
160
+ <td>
161
+ <select id="browsercache_cssjs_cache_policy"
162
+ <?php $this->sealing_disabled('browsercache') ?>
163
+ name="browsercache.cssjs.cache.policy">
164
+ <?php $value = $this->_config->get_string('browsercache.cssjs.cache.policy'); ?>
165
+ <option value="cache"<?php selected($value, 'cache'); ?>>cache ("public")</option>
166
+ <option value="cache_public_maxage"<?php selected($value, 'cache_public_maxage'); ?>><?php _e('cache with max-age ("public, max-age=EXPIRES_SECONDS")', 'w3-total-cache'); ?></option>
167
+ <option value="cache_validation"<?php selected($value, 'cache_validation'); ?>><?php _e('cache with validation ("public, must-revalidate, proxy-revalidate"', 'w3-total-cache'); ?></option>
168
+ <option value="cache_maxage"<?php selected($value, 'cache_maxage'); ?>><?php _e('cache with max-age and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate")', 'w3-total-cache'); ?></option>
169
+ <option value="cache_noproxy"<?php selected($value, 'cache_noproxy'); ?>><?php _e('cache without proxy ("private, must-revalidate")', 'w3-total-cache'); ?></option>
170
+ <option value="no_cache"<?php selected($value, 'no_cache'); ?>><?php _e('no-cache ("max-age=0, private, no-store, no-cache, must-revalidate"', 'w3-total-cache'); ?></option>
171
+ </select>
172
+ </td>
173
+ </tr>
174
+ <tr>
175
+ <th colspan="2">
176
+ <?php $this->checkbox('browsercache.cssjs.etag') ?> <?php w3_e_config_label('browsercache.cssjs.etag') ?></label>
177
+ <br /><span class="description"><?php _e('Set the Etag header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
178
+ </th>
179
+ </tr>
180
+ <tr>
181
+ <th colspan="2">
182
+ <?php $this->checkbox('browsercache.cssjs.w3tc') ?> <?php w3_e_config_label('browsercache.cssjs.w3tc') ?></label>
183
+ <br /><span class="description"><?php _e('Set this header to assist in identifying optimized files.', 'w3-total-cache'); ?></span>
184
+ </th>
185
+ </tr>
186
+ <tr>
187
+ <th colspan="2">
188
+ <?php $this->checkbox('browsercache.cssjs.compression') ?> <?php w3_e_config_label('browsercache.cssjs.compression') ?> </label>
189
+ <br /><span class="description"><?php _e('Reduce the download time for text-based files.', 'w3-total-cache'); ?></span>
190
+ </th>
191
+ </tr>
192
+ <tr>
193
+ <th colspan="2">
194
+ <?php $this->checkbox('browsercache.cssjs.replace') ?> <?php w3_e_config_label('browsercache.cssjs.replace') ?></label>
195
+ <br /><span class="description"><?php _e('Whenever settings are changed, a new query string will be generated and appended to objects allowing the new policy to be applied.', 'w3-total-cache'); ?></span>
196
+ </th>
197
+ </tr>
198
+ <tr>
199
+ <th colspan="2">
200
+ <?php $this->checkbox('browsercache.cssjs.nocookies') ?> <?php w3_e_config_label('browsercache.cssjs.nocookies') ?></label>
201
+ <br /><span class="description"><?php _e('Removes Set-Cookie header for responses.', 'w3-total-cache'); ?></span>
202
+ </th>
203
+ </tr>
204
+ </table>
205
+
206
+ <p class="submit">
207
+ <?php echo $this->nonce_field('w3tc'); ?>
208
+ <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save all settings', 'w3-total-cache'); ?>" />
209
+ </p>
210
+ <?php echo $this->postbox_footer(); ?>
211
+
212
+ <?php echo $this->postbox_header(__('<acronym title="Hypertext Markup Language">HTML</acronym> &amp; <acronym title="Extensible Markup Language">XML</acronym>', 'w3-total-cache'), '', 'html_xml'); ?>
213
+ <p><?php _e('Specify browser cache policy for posts, pages, feeds and text-based files.', 'w3-total-cache'); ?></p>
214
+
215
+ <table class="form-table">
216
+ <?php if (!w3_is_nginx()): ?>
217
+ <tr>
218
+ <th colspan="2">
219
+ <?php $this->checkbox('browsercache.html.last_modified') ?> <?php w3_e_config_label('browsercache.html.last_modified') ?></label>
220
+ <br /><span class="description"><?php _e('Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache'); ?></span>
221
+ </th>
222
+ </tr>
223
+ <?php endif; ?>
224
+ <tr>
225
+ <th colspan="2">
226
+ <?php $this->checkbox('browsercache.html.expires', $this->_config->get_string('cdn.engine') == 'cf2') ?> <?php w3_e_config_label('browsercache.html.expires') ?></label>
227
+ <br /><span class="description"><?php _e('Set the expires header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
228
+ </th>
229
+ </tr>
230
+ <tr>
231
+ <th style="width: 250px;">
232
+ <label for="browsercache_html_lifetime"><?php w3_e_config_label('browsercache.html.lifetime') ?></label>
233
+ </th>
234
+ <td>
235
+ <input id="browsercache_html_lifetime" type="text"
236
+ name="browsercache.html.lifetime"
237
+ <?php $this->sealing_disabled('browsercache') ?>
238
+ value="<?php echo esc_attr($this->_config->get_integer('browsercache.html.lifetime')); ?>" size="8" /> <?php _e('seconds', 'w3-total-cache'); ?>
239
+ </td>
240
+ </tr>
241
+ <tr>
242
+ <th colspan="2">
243
+ <?php $this->checkbox('browsercache.html.cache.control') ?> <?php w3_e_config_label('browsercache.html.cache.control') ?></label>
244
+ <br /><span class="description"><?php _e('Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache'); ?></span>
245
+ </th>
246
+ </tr>
247
+ <tr>
248
+ <th>
249
+ <label for="browsercache_html_cache_policy"><?php w3_e_config_label('browsercache.html.cache.policy') ?></label>
250
+ </th>
251
+ <td>
252
+ <select id="browsercache_html_cache_policy" name="browsercache.html.cache.policy"
253
+ <?php $this->sealing_disabled('browsercache') ?>>
254
+ <?php $value = $this->_config->get_string('browsercache.html.cache.policy'); ?>
255
+ <option value="cache"<?php selected($value, 'cache'); ?>>cache ("public")</option>
256
+ <option value="cache_public_maxage"<?php selected($value, 'cache_public_maxage'); ?>><?php _e('cache with max-age ("public, max-age=EXPIRES_SECONDS")', 'w3-total-cache'); ?></option>
257
+ <option value="cache_validation"<?php selected($value, 'cache_validation'); ?>><?php _e('cache with validation ("public, must-revalidate, proxy-revalidate")', 'w3-total-cache'); ?></option>
258
+ <option value="cache_maxage"<?php selected($value, 'cache_maxage'); ?>><?php _e('cache with max-age and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate")', 'w3-total-cache'); ?></option>
259
+ <option value="cache_noproxy"<?php selected($value, 'cache_noproxy'); ?>><?php _e('cache without proxy ("private, must-revalidate")', 'w3-total-cache'); ?></option>
260
+ <option value="no_cache"<?php selected($value, 'no_cache'); ?>><?php _e('no-cache ("max-age=0, private, no-store, no-cache, must-revalidate")', 'w3-total-cache'); ?></option>
261
+ </select>
262
+ </td>
263
+ </tr>
264
+ <tr>
265
+ <th colspan="2">
266
+ <?php $this->checkbox('browsercache.html.etag') ?> <?php w3_e_config_label('browsercache.html.etag') ?></label>
267
+ <br /><span class="description"><?php _e('Set the Etag header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
268
+ </th>
269
+ </tr>
270
+ <tr>
271
+ <th colspan="2">
272
+ <?php $this->checkbox('browsercache.html.w3tc') ?> <?php w3_e_config_label('browsercache.html.w3tc') ?></label>
273
+ <br /><span class="description"><?php _e('Set this header to assist in identifying optimized files.', 'w3-total-cache'); ?></span>
274
+ </th>
275
+ </tr>
276
+ <tr>
277
+ <th colspan="2">
278
+ <?php $this->checkbox('browsercache.html.compression') ?> <?php w3_e_config_label('browsercache.html.compression') ?></label>
279
+ <br /><span class="description"><?php _e('Reduce the download time for text-based files.', 'w3-total-cache'); ?></span>
280
+ </th>
281
+ </tr>
282
+ </table>
283
+
284
+ <p class="submit">
285
+ <?php echo $this->nonce_field('w3tc'); ?>
286
+ <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save all settings', 'w3-total-cache'); ?>" />
287
+ </p>
288
+ <?php echo $this->postbox_footer(); ?>
289
+
290
+ <?php echo $this->postbox_header(__('Media &amp; Other Files', 'w3-total-cache'), '', 'media'); ?>
291
+ <table class="form-table">
292
+ <?php if (!w3_is_nginx()): ?>
293
+ <tr>
294
+ <th colspan="2">
295
+ <?php $this->checkbox('browsercache.other.last_modified') ?> <?php w3_e_config_label('browsercache.other.last_modified') ?></label>
296
+ <br /><span class="description"><?php _e('Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache'); ?></span>
297
+ </th>
298
+ </tr>
299
+ <?php endif; ?>
300
+ <tr>
301
+ <th colspan="2">
302
+ <?php $this->checkbox('browsercache.other.expires', $this->_config->get_string('cdn.engine') == 'cf2') ?> <?php w3_e_config_label('browsercache.other.expires') ?></label>
303
+ <br /><span class="description"><?php _e('Set the expires header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
304
+ </th>
305
+ </tr>
306
+ <tr>
307
+ <th style="width: 250px;">
308
+ <label for="browsercache_other_lifetime"><?php w3_e_config_label('browsercache.other.lifetime') ?></label>
309
+ </th>
310
+ <td>
311
+ <input id="browsercache_other_lifetime" type="text"
312
+ <?php $this->sealing_disabled('browsercache') ?>
313
+ name="browsercache.other.lifetime" value="<?php echo esc_attr($this->_config->get_integer('browsercache.other.lifetime')); ?>" size="8" /> <?php _e('seconds', 'w3-total-cache'); ?>
314
+ </td>
315
+ </tr>
316
+ <tr>
317
+ <th colspan="2">
318
+ <?php $this->checkbox('browsercache.other.cache.control') ?> <?php w3_e_config_label('browsercache.other.cache.control') ?></label>
319
+ <br /><span class="description"><?php _e('Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache'); ?></span>
320
+ </th>
321
+ </tr>
322
+ <tr>
323
+ <th>
324
+ <label for="browsercache_other_cache_policy"><?php w3_e_config_label('browsercache.other.cache.policy') ?></label>
325
+ </th>
326
+ <td>
327
+ <select id="browsercache_other_cache_policy"
328
+ <?php $this->sealing_disabled('browsercache') ?>
329
+ name="browsercache.other.cache.policy">
330
+ <?php $value = $this->_config->get_string('browsercache.other.cache.policy'); ?>
331
+ <option value="cache"<?php selected($value, 'cache'); ?>><?php _e('cache ("public")'); ?></option>
332
+ <option value="cache_public_maxage"<?php selected($value, 'cache_public_maxage'); ?>><?php _e('cache with max-age ("public, max-age=EXPIRES_SECONDS")', 'w3-total-cache'); ?></option>
333
+ <option value="cache_validation"<?php selected($value, 'cache_validation'); ?>><?php _e('cache with validation ("public, must-revalidate, proxy-revalidate")', 'w3-total-cache'); ?></option>
334
+ <option value="cache_maxage"<?php selected($value, 'cache_maxage'); ?>><?php _e('cache with max-age and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate")', 'w3-total-cache'); ?></option>
335
+ <option value="cache_noproxy"<?php selected($value, 'cache_noproxy'); ?>><?php _e('cache without proxy ("private, must-revalidate")', 'w3-total-cache'); ?></option>
336
+ <option value="no_cache"<?php selected($value, 'no_cache'); ?>><?php _e('no-cache ("max-age=0, private, no-store, no-cache, must-revalidate")', 'w3-total-cache'); ?></option>
337
+ </select>
338
+ </td>
339
+ </tr>
340
+ <tr>
341
+ <th colspan="2">
342
+ <?php $this->checkbox('browsercache.other.etag') ?> <?php w3_e_config_label('browsercache.other.etag') ?></label>
343
+ <br /><span class="description"><?php _e('Set the Etag header to encourage browser caching of files.', 'w3-total-cache'); ?></span>
344
+ </th>
345
+ </tr>
346
+ <tr>
347
+ <th colspan="2">
348
+ <?php $this->checkbox('browsercache.other.w3tc') ?> <?php w3_e_config_label('browsercache.other.w3tc') ?></label>
349
+ <br /><span class="description"><?php _e('Set this header to assist in identifying optimized files.', 'w3-total-cache'); ?></span>
350
+ </th>
351
+ </tr>
352
+ <tr>
353
+ <th colspan="2">
354
+ <?php $this->checkbox('browsercache.other.compression') ?> <?php w3_e_config_label('browsercache.other.compression') ?>
355
+ <br /><span class="description"><?php _e('Reduce the download time for text-based files.', 'w3-total-cache'); ?></span>
356
+ </th>
357
+ </tr>
358
+ <tr>
359
+ <th colspan="2">
360
+ <?php $this->checkbox('browsercache.other.replace') ?> <?php w3_e_config_label('browsercache.other.replace') ?></label>
361
+ <br /><span class="description"><?php _e('Whenever settings are changed, a new query string will be generated and appended to objects allowing the new policy to be applied.', 'w3-total-cache'); ?></span>
362
+ </th>
363
+ </tr>
364
+ <tr>
365
+ <th colspan="2">
366
+ <?php $this->checkbox('browsercache.other.nocookies') ?> <?php w3_e_config_label('browsercache.other.nocookies') ?></label>
367
+ <br /><span class="description"><?php _e('Removes Set-Cookie header for responses.', 'w3-total-cache'); ?></span>
368
+ </th>
369
+ </tr>
370
+ </table>
371
+
372
+ <p class="submit">
373
+ <?php echo $this->nonce_field('w3tc'); ?>
374
+ <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save all settings', 'w3-total-cache'); ?>" />
375
+ </p>
376
+ <?php echo $this->postbox_footer(); ?>
377
+ </div>
378
+ </form>
379
+
380
+ <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
inc/options/cdn.php CHANGED
@@ -1,320 +1,322 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
3
-
4
- <p>
5
- <?php echo sprintf(
6
- __('Content Delivery Network support via %1$s is currently %2$s.', 'w3-total-cache'),
7
- '<strong>'.w3_get_engine_name($this->_config->get_string('cdn.engine')).'</strong>',
8
- '<span class="w3tc-' . ($cdn_enabled ? 'enabled">' . __('enabled', 'w3-total-cache') : 'disabled">' . __('disabled', 'w3-total-cache')) . '</span>'
9
- ); ?>
10
- </p>
11
- <form id="w3tc_cdn" action="admin.php?page=<?php echo $this->_page; ?>" method="post">
12
- <p>
13
- <?php if ($cdn_mirror): ?>
14
- Maximize <acronym title="Content Delivery Network">CDN</acronym> usage by <input id="cdn_rename_domain" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="modify attachment URLs" /> or
15
- <input id="cdn_import_library" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="importing attachments into the Media Library" />.
16
- <?php if (w3_can_cdn_purge($cdn_engine)): ?>
17
- <input id="cdn_purge" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="Purge" /> objects from the <acronym title="Content Delivery Network">CDN</acronym> using this tool
18
- <?php endif; ?>
19
- <?php if ($cdn_mirror_purge_all): ?>
20
- or <input class="button" type="submit" name="w3tc_flush_cdn" value="purge CDN completely" />
21
- <?php endif; ?>
22
- <?php if (w3_can_cdn_purge($cdn_engine)): ?>
23
- .
24
- <?php endif; ?>
25
- <?php else: ?>
26
- <?php _e('Prepare the <acronym title="Content Delivery Network">CDN</acronym> by:', 'w3-total-cache') ?>
27
- <input id="cdn_import_library" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('importing attachments into the Media Library', 'w3-total-cache') ?>" />.
28
- Check <input id="cdn_queue" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('unsuccessful file transfers', 'w3-total-cache') ?>" /> <?php _e('if some objects appear to be missing.', 'w3-total-cache') ?>
29
- <?php if (w3_can_cdn_purge($cdn_engine)): ?>
30
- <input id="cdn_purge" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Purge', 'w3-total-cache') ?>" /> <?php _e('objects from the <acronym title="Content Delivery Network">CDN</acronym> if needed.', 'w3-total-cache') ?>
31
- <?php endif; ?>
32
- <input id="cdn_rename_domain" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="Modify attachment URLs" /> <?php _e('if the domain name of your site has ever changed.', 'w3-total-cache') ?>
33
- <?php endif; ?>
34
- <?php echo $this->nonce_field('w3tc'); ?>
35
- <?php if ((!$this->_config_admin->get_boolean('common.visible_by_master_only') || (is_super_admin() && (!w3_force_master() || is_network_admin())))): ?>
36
- <input type="submit" name="w3tc_flush_browser_cache" value="<?php _e('Update media query string', 'w3-total-cache') ?>" <?php disabled(! ($browsercache_enabled && $browsercache_update_media_qs)) ?> class="button" /> <?php _e('to make existing file modifications visible to visitors with a primed cache.', 'w3-total-cache') ?>
37
- <?php endif ?>
38
- </p>
39
- </form>
40
- <form id="cdn_form" action="admin.php?page=<?php echo $this->_page; ?>" method="post">
41
- <div class="metabox-holder">
42
- <?php echo $this->postbox_header(__('General', 'w3-total-cache'), '', 'general'); ?>
43
- <table class="form-table">
44
- <tr>
45
- <th<?php if ($cdn_mirror): ?> colspan="2"<?php else: ?> style="width: 300px;"<?php endif; ?>>
46
- <?php $this->checkbox('cdn.uploads.enable') ?> <?php _e('Host attachments', 'w3-total-cache') ?></label><br />
47
- <span class="description"><?php _e('If checked, all attachments will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
48
- </th>
49
- <?php if (! $cdn_mirror): ?>
50
- <td>
51
- <input id="cdn_export_library" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Upload attachments', 'w3-total-cache') ?>" />
52
- </td>
53
- <?php endif; ?>
54
- </tr>
55
- <tr>
56
- <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
57
- <?php $this->checkbox('cdn.includes.enable') ?> <?php _e('Host wp-includes/ files', 'w3-total-cache') ?></label><br />
58
- <span class="description"><?php _e('If checked, WordPress static core file types specified in the "wp-includes file types to upload" field below will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
59
- </th>
60
- <?php if (! $cdn_mirror): ?>
61
- <td>
62
- <input class="button cdn_export {type: 'includes', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Upload includes files', 'w3-total-cache') ?>" />
63
- </td>
64
- <?php endif; ?>
65
- </tr>
66
- <tr>
67
- <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
68
- <?php $this->checkbox('cdn.theme.enable') ?> <?php _e('Host theme files', 'w3-total-cache') ?></label><br />
69
- <span class="description"><?php _e('If checked, all theme file types specified in the "theme file types to upload" field below will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
70
- </th>
71
- <?php if (! $cdn_mirror): ?>
72
- <td>
73
- <input class="button cdn_export {type: 'theme', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Upload theme files', 'w3-total-cache') ?>" />
74
- </td>
75
- <?php endif; ?>
76
- </tr>
77
- <tr>
78
- <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
79
- <?php $this->checkbox('cdn.minify.enable', !$minify_enabled) ?> <?php _e('Host minified <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym> files', 'w3-total-cache') ?></label><br />
80
- <span class="description"><?php _e('If checked, minified <acronym>CSS</acronym> and <acronym>JS</acronym> files will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
81
- </th>
82
- <?php if (! $cdn_mirror): ?>
83
- <td>
84
- <input class="button cdn_export {type: 'minify', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Upload minify files', 'w3-total-cache') ?>"<?php if (!$minify_enabled): ?> disabled="disabled"<?php endif; ?> />
85
- </td>
86
- <?php endif; ?>
87
- </tr>
88
- <tr>
89
- <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
90
- <?php $this->checkbox('cdn.custom.enable') ?> <?php _e('Host custom files', 'w3-total-cache') ?></label><br />
91
- <span class="description">
92
- <?php echo sprintf( __('If checked, any file names or paths specified in the "custom file list" field below will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>. Supports regular expression (See <a href="%s">FAQ</a>)', 'w3-total-cache'), network_admin_url('admin.php?page=w3tc_faq#q82') ); ?>
93
- </span>
94
- </th>
95
- <?php if (! $cdn_mirror): ?>
96
- <td>
97
- <input class="button cdn_export {type: 'custom', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Upload custom files', 'w3-total-cache') ?>" />
98
- </td>
99
- <?php endif; ?>
100
- </tr>
101
- <?php if (! $cdn_mirror): ?>
102
- <tr>
103
- <th colspan="2">
104
- <?php $this->checkbox('cdn.force.rewrite') ?> <?php _e('Force over-writing of existing files', 'w3-total-cache') ?></label><br />
105
- <span class="description"><?php _e('If modified files are not always detected and replaced, use this option to over-write them.', 'w3-total-cache') ?></span>
106
- </th>
107
- </tr>
108
- <?php endif; ?>
109
- <tr>
110
- <th colspan="2">
111
- <?php $this->checkbox('cdn.import.external') ?> <?php _e('Import external media library attachments', 'w3-total-cache') ?></label><br />
112
- <span class="description"><?php _e('Download attachments hosted elsewhere into your media library and deliver them via <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
113
- </th>
114
- </tr>
115
- <tr>
116
- <th colspan="2">
117
- <?php $this->checkbox('cdncache.enabled', !$cdn_supports_full_page_mirroring) ?> <?php _e('Enable mirroring of pages', 'w3-total-cache') ?></label><br/>
118
- <span class="description">
119
- <?php echo sprintf(
120
- __('Enabling this option allows the <acronym title="Content Delivery Network">CDN</acronym> to handle requests for unauthenticated pages thereby reducing the traffic load on the origin server(s). Purge policies are set on the <a href="%s">Page Cache settings</a> tab.', 'w3-total-cache'), network_admin_url('admin.php?page=w3tc_pgcache#purge_policy')
121
- ); ?>
122
- </span>
123
- </th>
124
- </tr>
125
- <?php if ($cdn_supports_header): ?>
126
- <tr>
127
- <th colspan="2">
128
- <?php $this->checkbox('cdn.canonical_header') ?> <?php _e('Add canonical header', 'w3-total-cache') ?></label><br />
129
- <span class="description"><?php _e('Adds canonical <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header to assets files.', 'w3-total-cache') ?></span>
130
- </th>
131
- </tr>
132
- <?php endif; ?>
133
- </table>
134
- <?php if ((!$this->_config_admin->get_boolean('common.visible_by_master_only') || (is_super_admin() && (!w3_force_master() || is_network_admin())))): ?>
135
-
136
- <p class="submit">
137
- <?php echo $this->nonce_field('w3tc'); ?>
138
- <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save all settings', 'w3-total-cache') ?>" />
139
- </p>
140
- <?php echo $this->postbox_footer(); ?>
141
-
142
- <?php echo $this->postbox_header(__('Configuration', 'w3-total-cache'), '', 'configuration'); ?>
143
- <table class="form-table">
144
- <?php
145
- if (w3_is_cdn_engine($cdn_engine)) {
146
- include W3TC_INC_DIR . '/options/cdn/' . $cdn_engine . '.php';
147
- }
148
- ?>
149
- </table>
150
-
151
- <p class="submit">
152
- <?php echo $this->nonce_field('w3tc'); ?>
153
- <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save all settings', 'w3-total-cache') ?>" />
154
- </p>
155
- <?php echo $this->postbox_footer(); ?>
156
-
157
- <?php echo $this->postbox_header(__('Advanced', 'w3-total-cache'), '', 'advanced'); ?>
158
- <table class="form-table">
159
- <tr>
160
- <th colspan="2">
161
- <?php $this->checkbox('cdn.reject.ssl') ?> <?php _e('Disable <acronym title="Content Delivery Network">CDN</acronym> on <acronym title="Secure Sockets Layer">SSL</acronym> pages', 'w3-total-cache') ?></label><br />
162
- <span class="description">When <acronym title="Secure Sockets Layer">SSL</acronym> pages are returned no <acronym title="Content Delivery Network">CDN</acronym> <acronym title="Uniform Resource Indicator">URL</acronym>s will appear in HTML pages.</span>
163
- </th>
164
- </tr>
165
- <tr>
166
- <th colspan="2">
167
- <?php $this->checkbox('cdn.reject.logged_roles') ?> <?php _e('Don\'t replace <acronym title="Uniform Resource Indicator">URL</acronym>s for following user roles', 'w3-total-cache') ?></label><br />
168
- <span class="description"><?php _e('Select user roles that will use the origin server exclusively:', 'w3-total-cache') ?></span>
169
-
170
- <div id="cdn_reject_roles">
171
- <?php $saved_roles = $this->_config->get_array('cdn.reject.roles'); ?>
172
- <input type="hidden" name="cdn.reject.roles" value="" /><br />
173
- <?php foreach( get_editable_roles() as $role_name => $role_data ) : ?>
174
- <input type="checkbox" name="cdn.reject.roles[]" value="<?php echo $role_name ?>" <?php checked( in_array( $role_name, $saved_roles ) ) ?> id="role_<?php echo $role_name ?>" />
175
- <label for="role_<?php echo $role_name ?>"><?php echo $role_data['name'] ?></label>
176
- <?php endforeach; ?>
177
- </div>
178
- </th>
179
- </tr>
180
- <?php if (! $cdn_mirror): ?>
181
- <tr>
182
- <th><label for="cdn_reject_uri">Disable <acronym title="Content Delivery Network">CDN</acronym> on the following pages:</label></th>
183
- <td>
184
- <textarea id="cdn_reject_uri" name="cdn.reject.uri"
185
- <?php $this->sealing_disabled('cdn') ?>
186
- cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('cdn.reject.uri'))); ?></textarea><br />
187
- <span class="description">Always ignore the specified pages / directories. Supports regular expression (See <a href="<?php echo network_admin_url('admin.php?page=w3tc_faq#q82')?>">FAQ</a>)</span>
188
- </td>
189
- </tr>
190
- <tr>
191
- <th colspan="2">
192
- <?php $this->checkbox('minify.upload', $this->_config->get_boolean('minify.auto')) ?> <?php _e('Automatically upload minify files', 'w3-total-cache') ?></label><br />
193
- <span class="description"><?php _e('If <acronym title="Content Delivery Network">CDN</acronym> is enabled (and not using the origin pull method), your minified files will be automatically uploaded.', 'w3-total-cache') ?></span>
194
- </th>
195
- </tr>
196
- <tr>
197
- <th colspan="2">
198
- <?php $this->checkbox('cdn.autoupload.enabled') ?> <?php _e('Export changed files automatically', 'w3-total-cache') ?></label><br />
199
- <span class="description"><?php _e('Automatically attempt to find and upload changed files.', 'w3-total-cache') ?></span>
200
- </th>
201
- </tr>
202
- <tr>
203
- <th><label for="cdn_autoupload_interval"><?php _e('Auto upload interval:', 'w3-total-cache') ?></label></th>
204
- <td>
205
- <input id="cdn_autoupload_interval" type="text"
206
- name="cdn.autoupload.interval"
207
- <?php $this->sealing_disabled('cdn') ?>
208
- value="<?php esc_attr_e($this->_config->get_integer('cdn.autoupload.interval')); ?>" size="8" /> <?php _e('seconds', 'w3-total-cache') ?><br />
209
- <span class="description"><?php _e('Specify the interval between upload of changed files.', 'w3-total-cache') ?></span>
210
- </td>
211
- </tr>
212
- <tr>
213
- <th><label for="cdn_limit_interval"><?php _e('Re-transfer cycle interval:', 'w3-total-cache') ?></label></th>
214
- <td>
215
- <input id="cdn_limit_interval" type="text"
216
- <?php $this->sealing_disabled('cdn') ?>
217
- name="cdn.queue.interval" value="<?php esc_attr_e($this->_config->get_integer('cdn.queue.interval')); ?>" size="10" /> <?php _e('seconds', 'w3-total-cache') ?><br />
218
- <span class="description"><?php _e('The number of seconds to wait before upload attempt.', 'w3-total-cache') ?></span>
219
- </td>
220
- </tr>
221
- <tr>
222
- <th><label for="cdn_limit_queue"><?php _e('Re-transfer cycle limit:', 'w3-total-cache') ?></label></th>
223
- <td>
224
- <input id="cdn_limit_queue" type="text"
225
- <?php $this->sealing_disabled('cdn') ?>
226
- name="cdn.queue.limit" value="<?php esc_attr_e($this->_config->get_integer('cdn.queue.limit')); ?>" size="10" /><br />
227
- <span class="description"><?php _e('Number of files processed per upload attempt.', 'w3-total-cache') ?></span>
228
- </td>
229
- </tr>
230
- <?php endif; ?>
231
- <tr>
232
- <th style="width: 300px;"><label for="cdn_includes_files"><?php _e('wp-includes file types to upload:', 'w3-total-cache') ?></label></th>
233
- <td>
234
- <input id="cdn_includes_files" type="text"
235
- <?php $this->sealing_disabled('cdn') ?>
236
- name="cdn.includes.files" value="<?php esc_attr_e($this->_config->get_string('cdn.includes.files')); ?>" size="100" /><br />
237
- <span class="description"><?php _e('Specify the file types within the WordPress core to host with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
238
- </td>
239
- </tr>
240
- <tr>
241
- <th><label for="cdn_theme_files"><?php _e('Theme file types to upload:', 'w3-total-cache') ?></label></th>
242
- <td>
243
- <input id="cdn_theme_files" type="text" name="cdn.theme.files"
244
- <?php $this->sealing_disabled('cdn') ?>
245
- value="<?php esc_attr_e($this->_config->get_string('cdn.theme.files')); ?>" size="100" /><br />
246
- <span class="description"><?php _e('Specify the file types in the active theme to host with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
247
- </td>
248
- </tr>
249
- <tr>
250
- <th><label for="cdn_import_files"><?php _e('File types to import:', 'w3-total-cache') ?></label></th>
251
- <td>
252
- <input id="cdn_import_files" type="text" name="cdn.import.files"
253
- <?php $this->sealing_disabled('cdn') ?>
254
- value="<?php esc_attr_e($this->_config->get_string('cdn.import.files')); ?>" size="100" /><br />
255
- <span class="description"><?php _e('Automatically import files hosted with 3rd parties of these types (if used in your posts / pages) to your media library.', 'w3-total-cache') ?></span>
256
- </td>
257
- </tr>
258
- <tr>
259
- <th><label for="cdn_custom_files">Custom file list:</label></th>
260
- <td>
261
- <textarea id="cdn_custom_files" name="cdn.custom.files"
262
- <?php $this->sealing_disabled('cdn') ?> cols="40"
263
- rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('cdn.custom.files'))); ?></textarea><br />
264
- <span class="description"><?php _e('Specify any files outside of theme or other common directories to host with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?>
265
- <?php if (w3_is_network()): ?>
266
- <br />
267
- <?php _e('To upload files in blogs.dir for current blog write wp-content/&lt;currentblog&gt;/.', 'w3-total-cache') ?>
268
- <?php endif ?>
269
- </span>
270
- </td>
271
- </tr>
272
- <tr>
273
- <th><label for="cdn_reject_ua"><?php _e('Rejected user agents:', 'w3-total-cache') ?></label></th>
274
- <td>
275
- <textarea id="cdn_reject_ua" name="cdn.reject.ua" cols="40"
276
- <?php $this->sealing_disabled('cdn') ?> rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('cdn.reject.ua'))); ?></textarea><br />
277
- <span class="description"><?php _e('Specify user agents that should not access files hosted with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
278
- </td>
279
- </tr>
280
- <tr>
281
- <th><label for="cdn_reject_files"><?php _e('Rejected files:', 'w3-total-cache') ?></label></th>
282
- <td>
283
- <textarea id="cdn_reject_files" name="cdn.reject.files"
284
- <?php $this->sealing_disabled('cdn') ?> cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('cdn.reject.files'))); ?></textarea><br />
285
- <span class="description"><?php _e('Specify the path of files that should not use the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
286
- </td>
287
- </tr>
288
- <tr>
289
- <th colspan="2">
290
- <input type="hidden" name="set_cookie_domain_old" value="<?php echo (int) $set_cookie_domain; ?>" />
291
- <input type="hidden" name="set_cookie_domain_new" value="0" />
292
- <label><input type="checkbox" name="set_cookie_domain_new"
293
- <?php $this->sealing_disabled('cdn') ?> value="1"<?php checked($set_cookie_domain, true); ?> /> Set cookie domain to &quot;<?php echo htmlspecialchars($cookie_domain); ?>&quot;</label>
294
- <br /><span class="description"><?php _e('If using subdomain for <acronym title="Content Delivery Network">CDN</acronym> functionality, this setting helps prevent new users from sending cookies in requests to the <acronym title="Content Delivery Network">CDN</acronym> subdomain.', 'w3-total-cache') ?></span>
295
- </th>
296
- </tr>
297
- </table>
298
-
299
- <p class="submit">
300
- <?php echo $this->nonce_field('w3tc'); ?>
301
- <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save all settings', 'w3-total-cache') ?>" />
302
- </p>
303
- <?php echo $this->postbox_footer(); ?>
304
-
305
- <?php echo $this->postbox_header(__('Note(s):', 'w3-total-cache'), '', 'notes'); ?>
306
- <table class="form-table">
307
- <tr>
308
- <th colspan="2">
309
- <ul>
310
- <li><?php _e('You can use placeholders {wp_content_dir}, {plugins_dir}, {uploads_dir} instead of writing folder paths (wp-content, wp-content/plugins, wp-content/uploads).', 'w3-total-cache') ?></li>
311
- <li><?php _e('If using Amazon Web Services or Self-Hosted <acronym title="Content Delivery Network">CDN</acronym> types, enable <acronym title="Hypertext Transfer Protocol">HTTP</acronym> compression in the "Media &amp; Other Files" section on <a href="admin.php?page=w3tc_browsercache">Browser Cache</a> Settings tab.', 'w3-total-cache') ?></li>
312
- </ul>
313
- </th>
314
- </tr>
315
- </table>
316
- <?php endif ?>
317
- <?php echo $this->postbox_footer(); ?>
318
- </div>
319
- </form>
320
- <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
 
 
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
3
+
4
+ <p>
5
+ <?php echo sprintf(
6
+ __('Content Delivery Network support via %1$s is currently %2$s.', 'w3-total-cache'),
7
+ '<strong>'.w3_get_engine_name($this->_config->get_string('cdn.engine')).'</strong>',
8
+ '<span class="w3tc-' . ($cdn_enabled ? 'enabled">' . __('enabled', 'w3-total-cache') : 'disabled">' . __('disabled', 'w3-total-cache')) . '</span>'
9
+ ); ?>
10
+ </p>
11
+ <form id="w3tc_cdn" action="admin.php?page=<?php echo $this->_page; ?>" method="post">
12
+ <p>
13
+ <?php if ($cdn_mirror): ?>
14
+ Maximize <acronym title="Content Delivery Network">CDN</acronym> usage by <input id="cdn_rename_domain" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="modify attachment URLs" /> or
15
+ <input id="cdn_import_library" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="importing attachments into the Media Library" />.
16
+ <?php if (w3_can_cdn_purge($cdn_engine)): ?>
17
+ <input id="cdn_purge" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="Purge" /> objects from the <acronym title="Content Delivery Network">CDN</acronym> using this tool
18
+ <?php endif; ?>
19
+ <?php if ($cdn_mirror_purge_all): ?>
20
+ or <input class="button" type="submit" name="w3tc_flush_cdn" value="purge CDN completely" />
21
+ <?php endif; ?>
22
+ <?php if (w3_can_cdn_purge($cdn_engine)): ?>
23
+ .
24
+ <?php endif; ?>
25
+ <?php else: ?>
26
+ <?php _e('Prepare the <acronym title="Content Delivery Network">CDN</acronym> by:', 'w3-total-cache') ?>
27
+ <input id="cdn_import_library" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('importing attachments into the Media Library', 'w3-total-cache') ?>" />.
28
+ Check <input id="cdn_queue" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('unsuccessful file transfers', 'w3-total-cache') ?>" /> <?php _e('if some objects appear to be missing.', 'w3-total-cache') ?>
29
+ <?php if (w3_can_cdn_purge($cdn_engine)): ?>
30
+ <input id="cdn_purge" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Purge', 'w3-total-cache') ?>" /> <?php _e('objects from the <acronym title="Content Delivery Network">CDN</acronym> if needed.', 'w3-total-cache') ?>
31
+ <?php endif; ?>
32
+ <input id="cdn_rename_domain" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="Modify attachment URLs" /> <?php _e('if the domain name of your site has ever changed.', 'w3-total-cache') ?>
33
+ <?php endif; ?>
34
+ <?php echo $this->nonce_field('w3tc'); ?>
35
+ <?php if ((!$this->_config_admin->get_boolean('common.visible_by_master_only') || (is_super_admin() && (!w3_force_master() || is_network_admin())))): ?>
36
+ <input type="submit" name="w3tc_flush_browser_cache" value="<?php _e('Update media query string', 'w3-total-cache') ?>" <?php disabled(! ($browsercache_enabled && $browsercache_update_media_qs)) ?> class="button" /> <?php _e('to make existing file modifications visible to visitors with a primed cache.', 'w3-total-cache') ?>
37
+ <?php endif ?>
38
+ </p>
39
+ </form>
40
+ <form id="cdn_form" action="admin.php?page=<?php echo $this->_page; ?>" method="post">
41
+ <div class="metabox-holder">
42
+ <?php echo $this->postbox_header(__('General', 'w3-total-cache'), '', 'general'); ?>
43
+ <table class="form-table">
44
+ <tr>
45
+ <th<?php if ($cdn_mirror): ?> colspan="2"<?php else: ?> style="width: 300px;"<?php endif; ?>>
46
+ <?php $this->checkbox('cdn.uploads.enable') ?> <?php w3_e_config_label('cdn.uploads.enable') ?></label><br />
47
+ <span class="description"><?php _e('If checked, all attachments will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
48
+ </th>
49
+ <?php if (! $cdn_mirror): ?>
50
+ <td>
51
+ <input id="cdn_export_library" class="button {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Upload attachments', 'w3-total-cache') ?>" />
52
+ </td>
53
+ <?php endif; ?>
54
+ </tr>
55
+ <tr>
56
+ <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
57
+ <?php $this->checkbox('cdn.includes.enable') ?> <?php w3_e_config_label('cdn.includes.enable') ?></label><br />
58
+ <span class="description"><?php _e('If checked, WordPress static core file types specified in the "wp-includes file types to upload" field below will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
59
+ </th>
60
+ <?php if (! $cdn_mirror): ?>
61
+ <td>
62
+ <input class="button cdn_export {type: 'includes', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Upload includes files', 'w3-total-cache') ?>" />
63
+ </td>
64
+ <?php endif; ?>
65
+ </tr>
66
+ <tr>
67
+ <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
68
+ <?php $this->checkbox('cdn.theme.enable') ?> <?php w3_e_config_label('cdn.theme.enable') ?></label><br />
69
+ <span class="description"><?php _e('If checked, all theme file types specified in the "theme file types to upload" field below will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
70
+ </th>
71
+ <?php if (! $cdn_mirror): ?>
72
+ <td>
73
+ <input class="button cdn_export {type: 'theme', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Upload theme files', 'w3-total-cache') ?>" />
74
+ </td>
75
+ <?php endif; ?>
76
+ </tr>
77
+ <tr>
78
+ <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
79
+ <?php $this->checkbox('cdn.minify.enable', !$minify_enabled) ?> <?php w3_e_config_label('cdn.minify.enable') ?></label><br />
80
+ <span class="description"><?php _e('If checked, minified <acronym>CSS</acronym> and <acronym>JS</acronym> files will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
81
+ </th>
82
+ <?php if (! $cdn_mirror): ?>
83
+ <td>
84
+ <input class="button cdn_export {type: 'minify', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Upload minify files', 'w3-total-cache') ?>"<?php if (!$minify_enabled): ?> disabled="disabled"<?php endif; ?> />
85
+ </td>
86
+ <?php endif; ?>
87
+ </tr>
88
+ <tr>
89
+ <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
90
+ <?php $this->checkbox('cdn.custom.enable') ?> <?php w3_e_config_label('cdn.custom.enable') ?></label><br />
91
+ <span class="description">
92
+ <?php echo sprintf( __('If checked, any file names or paths specified in the "custom file list" field below will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>. Supports regular expressions (See <a href="%s">FAQ</a>)', 'w3-total-cache'), network_admin_url('admin.php?page=w3tc_faq#q82') ); ?>
93
+ </span>
94
+ </th>
95
+ <?php if (! $cdn_mirror): ?>
96
+ <td>
97
+ <input class="button cdn_export {type: 'custom', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Upload custom files', 'w3-total-cache') ?>" />
98
+ </td>
99
+ <?php endif; ?>
100
+ </tr>
101
+ <?php if (! $cdn_mirror): ?>
102
+ <tr>
103
+ <th colspan="2">
104
+ <?php $this->checkbox('cdn.force.rewrite') ?> <?php w3_e_config_label('cdn.force.rewrite') ?></label><br />
105
+ <span class="description"><?php _e('If modified files are not always detected and replaced, use this option to over-write them.', 'w3-total-cache') ?></span>
106
+ </th>
107
+ </tr>
108
+ <?php endif; ?>
109
+ <tr>
110
+ <th colspan="2">
111
+ <?php $this->checkbox('cdn.import.external') ?> <?php w3_e_config_label('cdn.import.external') ?></label><br />
112
+ <span class="description"><?php _e('Download attachments hosted elsewhere into your media library and deliver them via <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
113
+ </th>
114
+ </tr>
115
+ <?php if(w3tc_edge_mode() && (w3_is_pro($this->_config)) || w3_is_enterprise()): ?>
116
+ <tr>
117
+ <th colspan="2">
118
+ <?php $this->checkbox('cdncache.enabled', !$cdn_supports_full_page_mirroring) ?> <?php w3_e_config_label('cdncache.enabled') ?></label><br/>
119
+ <span class="description">
120
+ <?php echo sprintf(
121
+ __('Enabling this option allows the <acronym title="Content Delivery Network">CDN</acronym> to handle requests for unauthenticated pages thereby reducing the traffic load on the origin server(s). Purge policies are set on the <a href="%s">Page Cache settings</a> tab.', 'w3-total-cache'), network_admin_url('admin.php?page=w3tc_pgcache#purge_policy')
122
+ ); ?>
123
+ </span>
124
+ </th>
125
+ </tr>
126
+ <?php endif ?>
127
+ <?php if ($cdn_supports_header): ?>
128
+ <tr>
129
+ <th colspan="2">
130
+ <?php $this->checkbox('cdn.canonical_header') ?> <?php w3_e_config_label('cdn.canonical_header') ?></label><br />
131
+ <span class="description"><?php _e('Adds canonical <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header to assets files.', 'w3-total-cache') ?></span>
132
+ </th>
133
+ </tr>
134
+ <?php endif; ?>
135
+ </table>
136
+ <?php if ((!$this->_config_admin->get_boolean('common.visible_by_master_only') || (is_super_admin() && (!w3_force_master() || is_network_admin())))): ?>
137
+
138
+ <p class="submit">
139
+ <?php echo $this->nonce_field('w3tc'); ?>
140
+ <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save all settings', 'w3-total-cache') ?>" />
141
+ </p>
142
+ <?php echo $this->postbox_footer(); ?>
143
+
144
+ <?php echo $this->postbox_header(__('Configuration', 'w3-total-cache'), '', 'configuration'); ?>
145
+ <table class="form-table">
146
+ <?php
147
+ if (w3_is_cdn_engine($cdn_engine)) {
148
+ include W3TC_INC_DIR . '/options/cdn/' . $cdn_engine . '.php';
149
+ }
150
+ ?>
151
+ </table>
152
+
153
+ <p class="submit">
154
+ <?php echo $this->nonce_field('w3tc'); ?>
155
+ <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save all settings', 'w3-total-cache') ?>" />
156
+ </p>
157
+ <?php echo $this->postbox_footer(); ?>
158
+
159
+ <?php echo $this->postbox_header(__('Advanced', 'w3-total-cache'), '', 'advanced'); ?>
160
+ <table class="form-table">
161
+ <tr>
162
+ <th colspan="2">
163
+ <?php $this->checkbox('cdn.reject.ssl') ?> <?php w3_e_config_label('cdn.reject.ssl') ?></label><br />
164
+ <span class="description">When <acronym title="Secure Sockets Layer">SSL</acronym> pages are returned no <acronym title="Content Delivery Network">CDN</acronym> <acronym title="Uniform Resource Indicator">URL</acronym>s will appear in HTML pages.</span>
165
+ </th>
166
+ </tr>
167
+ <tr>
168
+ <th colspan="2">
169
+ <?php $this->checkbox('cdn.reject.logged_roles') ?> <?php w3_e_config_label('cdn.reject.logged_roles') ?></label><br />
170
+ <span class="description"><?php _e('Select user roles that will use the origin server exclusively:', 'w3-total-cache') ?></span>
171
+
172
+ <div id="cdn_reject_roles">
173
+ <?php $saved_roles = $this->_config->get_array('cdn.reject.roles'); ?>
174
+ <input type="hidden" name="cdn.reject.roles" value="" /><br />
175
+ <?php foreach( get_editable_roles() as $role_name => $role_data ) : ?>
176
+ <input type="checkbox" name="cdn.reject.roles[]" value="<?php echo $role_name ?>" <?php checked( in_array( $role_name, $saved_roles ) ) ?> id="role_<?php echo $role_name ?>" />
177
+ <label for="role_<?php echo $role_name ?>"><?php echo $role_data['name'] ?></label>
178
+ <?php endforeach; ?>
179
+ </div>
180
+ </th>
181
+ </tr>
182
+ <?php if (! $cdn_mirror): ?>
183
+ <tr>
184
+ <th><label for="cdn_reject_uri"><?php w3_e_config_label('cdn.reject.uri') ?></label></th>
185
+ <td>
186
+ <textarea id="cdn_reject_uri" name="cdn.reject.uri"
187
+ <?php $this->sealing_disabled('cdn') ?>
188
+ cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('cdn.reject.uri'))); ?></textarea><br />
189
+ <span class="description"><?php echo sprintf(__('Always ignore the specified pages / directories. Supports regular expression (See <a href="%s">FAQ</a>'), network_admin_url('admin.php?page=w3tc_faq#q82')) ?></span>
190
+ </td>
191
+ </tr>
192
+ <tr>
193
+ <th colspan="2">
194
+ <?php $this->checkbox('minify.upload', $this->_config->get_boolean('minify.auto')) ?> <?php _e('Automatically upload minify files', 'w3-total-cache') ?></label><br />
195
+ <span class="description"><?php _e('If <acronym title="Content Delivery Network">CDN</acronym> is enabled (and not using the origin pull method), your minified files will be automatically uploaded.', 'w3-total-cache') ?></span>
196
+ </th>
197
+ </tr>
198
+ <tr>
199
+ <th colspan="2">
200
+ <?php $this->checkbox('cdn.autoupload.enabled') ?> <?php w3_e_config_label('cdn.autoupload.enabled') ?></label><br />
201
+ <span class="description"><?php _e('Automatically attempt to find and upload changed files.', 'w3-total-cache') ?></span>
202
+ </th>
203
+ </tr>
204
+ <tr>
205
+ <th><label for="cdn_autoupload_interval"><?php w3_e_config_label('cdn.autoupload.interval') ?></label></th>
206
+ <td>
207
+ <input id="cdn_autoupload_interval" type="text"
208
+ name="cdn.autoupload.interval"
209
+ <?php $this->sealing_disabled('cdn') ?>
210
+ value="<?php esc_attr_e($this->_config->get_integer('cdn.autoupload.interval')); ?>" size="8" /> <?php _e('seconds', 'w3-total-cache') ?><br />
211
+ <span class="description"><?php _e('Specify the interval between upload of changed files.', 'w3-total-cache') ?></span>
212
+ </td>
213
+ </tr>
214
+ <tr>
215
+ <th><label for="cdn_limit_interval"><?php w3_e_config_label('cdn.queue.interval') ?></label></th>
216
+ <td>
217
+ <input id="cdn_limit_interval" type="text"
218
+ <?php $this->sealing_disabled('cdn') ?>
219
+ name="cdn.queue.interval" value="<?php esc_attr_e($this->_config->get_integer('cdn.queue.interval')); ?>" size="10" /> <?php _e('seconds', 'w3-total-cache') ?><br />
220
+ <span class="description"><?php _e('The number of seconds to wait before upload attempt.', 'w3-total-cache') ?></span>
221
+ </td>
222
+ </tr>
223
+ <tr>
224
+ <th><label for="cdn_limit_queue"><?php w3_e_config_label('cdn.queue.limit') ?></label></th>
225
+ <td>
226
+ <input id="cdn_limit_queue" type="text"
227
+ <?php $this->sealing_disabled('cdn') ?>
228
+ name="cdn.queue.limit" value="<?php esc_attr_e($this->_config->get_integer('cdn.queue.limit')); ?>" size="10" /><br />
229
+ <span class="description"><?php _e('Number of files processed per upload attempt.', 'w3-total-cache') ?></span>
230
+ </td>
231
+ </tr>
232
+ <?php endif; ?>
233
+ <tr>
234
+ <th style="width: 300px;"><label for="cdn_includes_files"><?php w3_e_config_label('cdn.includes.files') ?></label></th>
235
+ <td>
236
+ <input id="cdn_includes_files" type="text"
237
+ <?php $this->sealing_disabled('cdn') ?>
238
+ name="cdn.includes.files" value="<?php esc_attr_e($this->_config->get_string('cdn.includes.files')); ?>" size="100" /><br />
239
+ <span class="description"><?php _e('Specify the file types within the WordPress core to host with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
240
+ </td>
241
+ </tr>
242
+ <tr>
243
+ <th><label for="cdn_theme_files"><?php w3_e_config_label('cdn.theme.files') ?></label></th>
244
+ <td>
245
+ <input id="cdn_theme_files" type="text" name="cdn.theme.files"
246
+ <?php $this->sealing_disabled('cdn') ?>
247
+ value="<?php esc_attr_e($this->_config->get_string('cdn.theme.files')); ?>" size="100" /><br />
248
+ <span class="description"><?php _e('Specify the file types in the active theme to host with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
249
+ </td>
250
+ </tr>
251
+ <tr>
252
+ <th><label for="cdn_import_files"><?php w3_e_config_label('cdn.import.files') ?></label></th>
253
+ <td>
254
+ <input id="cdn_import_files" type="text" name="cdn.import.files"
255
+ <?php $this->sealing_disabled('cdn') ?>
256
+ value="<?php esc_attr_e($this->_config->get_string('cdn.import.files')); ?>" size="100" /><br />
257
+ <span class="description"><?php _e('Automatically import files hosted with 3rd parties of these types (if used in your posts / pages) to your media library.', 'w3-total-cache') ?></span>
258
+ </td>
259
+ </tr>
260
+ <tr>
261
+ <th><label for="cdn_custom_files"><?php w3_e_config_label('cdn.custom.files') ?></label></th>
262
+ <td>
263
+ <textarea id="cdn_custom_files" name="cdn.custom.files"
264
+ <?php $this->sealing_disabled('cdn') ?> cols="40"
265
+ rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('cdn.custom.files'))); ?></textarea><br />
266
+ <span class="description"><?php _e('Specify any files outside of theme or other common directories to host with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?>
267
+ <?php if (w3_is_network()): ?>
268
+ <br />
269
+ <?php _e('To upload files in blogs.dir for current blog write wp-content/&lt;currentblog&gt;/.', 'w3-total-cache') ?>
270
+ <?php endif ?>
271
+ </span>
272
+ </td>
273
+ </tr>
274
+ <tr>
275
+ <th><label for="cdn_reject_ua"><?php w3_e_config_label('cdn.reject.ua') ?></label></th>
276
+ <td>
277
+ <textarea id="cdn_reject_ua" name="cdn.reject.ua" cols="40"
278
+ <?php $this->sealing_disabled('cdn') ?> rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('cdn.reject.ua'))); ?></textarea><br />
279
+ <span class="description"><?php _e('Specify user agents that should not access files hosted with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
280
+ </td>
281
+ </tr>
282
+ <tr>
283
+ <th><label for="cdn_reject_files"><?php w3_e_config_label('cdn.reject.files') ?></label></th>
284
+ <td>
285
+ <textarea id="cdn_reject_files" name="cdn.reject.files"
286
+ <?php $this->sealing_disabled('cdn') ?> cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('cdn.reject.files'))); ?></textarea><br />
287
+ <span class="description"><?php _e('Specify the path of files that should not use the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache') ?></span>
288
+ </td>
289
+ </tr>
290
+ <tr>
291
+ <th colspan="2">
292
+ <input type="hidden" name="set_cookie_domain_old" value="<?php echo (int) $set_cookie_domain; ?>" />
293
+ <input type="hidden" name="set_cookie_domain_new" value="0" />
294
+ <label><input type="checkbox" name="set_cookie_domain_new"
295
+ <?php $this->sealing_disabled('cdn') ?> value="1"<?php checked($set_cookie_domain, true); ?> /> <?php printf(__('Set cookie domain to &quot;%s&quot', 'w3-tota-cachel'), htmlspecialchars($cookie_domain)) ?></label>
296
+ <br /><span class="description"><?php _e('If using subdomain for <acronym title="Content Delivery Network">CDN</acronym> functionality, this setting helps prevent new users from sending cookies in requests to the <acronym title="Content Delivery Network">CDN</acronym> subdomain.', 'w3-total-cache') ?></span>
297
+ </th>
298
+ </tr>
299
+ </table>
300
+
301
+ <p class="submit">
302
+ <?php echo $this->nonce_field('w3tc'); ?>
303
+ <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save all settings', 'w3-total-cache') ?>" />
304
+ </p>
305
+ <?php echo $this->postbox_footer(); ?>
306
+
307
+ <?php echo $this->postbox_header(__('Note(s):', 'w3-total-cache'), '', 'notes'); ?>
308
+ <table class="form-table">
309
+ <tr>
310
+ <th colspan="2">
311
+ <ul>
312
+ <li><?php _e('You can use placeholders {wp_content_dir}, {plugins_dir}, {uploads_dir} instead of writing folder paths (wp-content, wp-content/plugins, wp-content/uploads).', 'w3-total-cache') ?></li>
313
+ <li><?php _e('If using Amazon Web Services or Self-Hosted <acronym title="Content Delivery Network">CDN</acronym> types, enable <acronym title="Hypertext Transfer Protocol">HTTP</acronym> compression in the "Media &amp; Other Files" section on <a href="admin.php?page=w3tc_browsercache">Browser Cache</a> Settings tab.', 'w3-total-cache') ?></li>
314
+ </ul>
315
+ </th>
316
+ </tr>
317
+ </table>
318
+ <?php endif ?>
319
+ <?php echo $this->postbox_footer(); ?>
320
+ </div>
321
+ </form>
322
+ <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
inc/options/cdn/att.php CHANGED
@@ -1,38 +1,38 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <tr>
3
- <th style="width: 300px;"><label for="cdn_att_account"><?php _e('Account #:', 'w3-total-cache'); ?></label></th>
4
- <td>
5
- <input id="cdn_att_account" class="w3tc-ignore-change" type="text"
6
- <?php $this->sealing_disabled('cdn') ?> name="cdn.att.account" value="<?php echo esc_attr($this->_config->get_string('cdn.att.account')); ?>" size="60" />
7
- </td>
8
- </tr>
9
- <tr>
10
- <th><label for="cdn_att_token"><?php _e('Token:', 'w3-total-cache'); ?></th>
11
- <td>
12
- <input id="cdn_att_token" class="w3tc-ignore-change" type="password"
13
- <?php $this->sealing_disabled('cdn') ?> name="cdn.att.token" value="<?php echo esc_attr($this->_config->get_string('cdn.att.token')); ?>" size="60" />
14
- </td>
15
- </tr>
16
- <tr>
17
- <th><label for="cdn_att_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
18
- <td>
19
- <select id="cdn_att_ssl" name="cdn.att.ssl" <?php $this->sealing_disabled('cdn') ?>>
20
- <option value="auto"<?php selected($this->_config->get_string('cdn.att.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
21
- <option value="enabled"<?php selected($this->_config->get_string('cdn.att.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
22
- <option value="disabled"<?php selected($this->_config->get_string('cdn.att.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
23
- </select>
24
- <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
25
- </td>
26
- </tr>
27
- <tr>
28
- <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
29
- <td>
30
- <?php $cnames = $this->_config->get_array('cdn.att.domain'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
31
- <br /><span class="description"><?php _e('Enter the hostname provided by your <acronym>CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache'); ?></span>
32
- </td>
33
- </tr>
34
- <tr>
35
- <th colspan="2">
36
- <input id="cdn_test" class="button {type: 'att', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="Test AT&T" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
37
- </th>
38
- </tr>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <tr>
3
+ <th style="width: 300px;"><label for="cdn_att_account"><?php _e('Account #:', 'w3-total-cache'); ?></label></th>
4
+ <td>
5
+ <input id="cdn_att_account" class="w3tc-ignore-change" type="text"
6
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.att.account" value="<?php echo esc_attr($this->_config->get_string('cdn.att.account')); ?>" size="60" />
7
+ </td>
8
+ </tr>
9
+ <tr>
10
+ <th><label for="cdn_att_token"><?php _e('Token:', 'w3-total-cache'); ?></th>
11
+ <td>
12
+ <input id="cdn_att_token" class="w3tc-ignore-change" type="password"
13
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.att.token" value="<?php echo esc_attr($this->_config->get_string('cdn.att.token')); ?>" size="60" />
14
+ </td>
15
+ </tr>
16
+ <tr>
17
+ <th><label for="cdn_att_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
18
+ <td>
19
+ <select id="cdn_att_ssl" name="cdn.att.ssl" <?php $this->sealing_disabled('cdn') ?>>
20
+ <option value="auto"<?php selected($this->_config->get_string('cdn.att.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
21
+ <option value="enabled"<?php selected($this->_config->get_string('cdn.att.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
22
+ <option value="disabled"<?php selected($this->_config->get_string('cdn.att.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
23
+ </select>
24
+ <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
25
+ </td>
26
+ </tr>
27
+ <tr>
28
+ <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
29
+ <td>
30
+ <?php $cnames = $this->_config->get_array('cdn.att.domain'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
31
+ <br /><span class="description"><?php _e('Enter the hostname provided by your <acronym>CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache'); ?></span>
32
+ </td>
33
+ </tr>
34
+ <tr>
35
+ <th colspan="2">
36
+ <input id="cdn_test" class="button {type: 'att', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="Test AT&T" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
37
+ </th>
38
+ </tr>
inc/options/cdn/azure.php CHANGED
@@ -1,51 +1,51 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <tr>
3
- <th style="width: 300px;"><label for="cdn_azure_user"><?php _e('Account name:', 'w3-total-cache'); ?></label></th>
4
- <td>
5
- <input id="cdn_azure_user" class="w3tc-ignore-change" type="text"
6
- <?php $this->sealing_disabled('cdn') ?> name="cdn.azure.user" value="<?php echo esc_attr($this->_config->get_string('cdn.azure.user')); ?>" size="30" />
7
- </td>
8
- </tr>
9
- <tr>
10
- <th><label for="cdn_azure_key"><?php _e('Account key:', 'w3-total-cache'); ?></label></th>
11
- <td>
12
- <input id="cdn_azure_key" class="w3tc-ignore-change"
13
- <?php $this->sealing_disabled('cdn') ?> type="password" name="cdn.azure.key" value="<?php echo esc_attr($this->_config->get_string('cdn.azure.key')); ?>" size="60" />
14
- </td>
15
- </tr>
16
- <tr>
17
- <th><label for="cdn_azure_container"><?php _e('Container:', 'w3-total-cache'); ?></label></th>
18
- <td>
19
- <input id="cdn_azure_container" type="text"
20
- <?php $this->sealing_disabled('cdn') ?> name="cdn.azure.container" value="<?php echo esc_attr($this->_config->get_string('cdn.azure.container')); ?>" size="30" />
21
- <input id="cdn_create_container" <?php $this->sealing_disabled('cdn') ?> class="button {type: 'azure', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Create container', 'w3-total-cache'); ?>" />
22
- <span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
23
- </td>
24
- </tr>
25
- <tr>
26
- <th><label for="cdn_s3_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
27
- <td>
28
- <select id="cdn_s3_ssl" name="cdn.s3.ssl" <?php $this->sealing_disabled('cdn') ?>>
29
- <option value="auto"<?php selected($this->_config->get_string('cdn.azure.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
30
- <option value="enabled"<?php selected($this->_config->get_string('cdn.azure.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
31
- <option value="disabled"<?php selected($this->_config->get_string('cdn.azure.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
32
- </select>
33
- <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
34
- </td>
35
- </tr>
36
- <tr>
37
- <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
38
- <td>
39
- <?php if (($cdn_azure_user = $this->_config->get_string('cdn.azure.user')) != ''): ?>
40
- <?php echo esc_attr($cdn_azure_user); ?>.blob.core.windows.net
41
- <?php else: ?>
42
- &lt;account name&gt;.blob.core.windows.net
43
- <?php endif; ?> <?php _e('or CNAME:', 'w3-total-cache'); ?>
44
- <?php $cnames = $this->_config->get_array('cdn.azure.cname'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
45
- </td>
46
- </tr>
47
- <tr>
48
- <th colspan="2">
49
- <input id="cdn_test" class="button {type: 'azure', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test Microsoft Azure Storage upload', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
50
- </th>
51
- </tr>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <tr>
3
+ <th style="width: 300px;"><label for="cdn_azure_user"><?php _e('Account name:', 'w3-total-cache'); ?></label></th>
4
+ <td>
5
+ <input id="cdn_azure_user" class="w3tc-ignore-change" type="text"
6
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.azure.user" value="<?php echo esc_attr($this->_config->get_string('cdn.azure.user')); ?>" size="30" />
7
+ </td>
8
+ </tr>
9
+ <tr>
10
+ <th><label for="cdn_azure_key"><?php _e('Account key:', 'w3-total-cache'); ?></label></th>
11
+ <td>
12
+ <input id="cdn_azure_key" class="w3tc-ignore-change"
13
+ <?php $this->sealing_disabled('cdn') ?> type="password" name="cdn.azure.key" value="<?php echo esc_attr($this->_config->get_string('cdn.azure.key')); ?>" size="60" />
14
+ </td>
15
+ </tr>
16
+ <tr>
17
+ <th><label for="cdn_azure_container"><?php _e('Container:', 'w3-total-cache'); ?></label></th>
18
+ <td>
19
+ <input id="cdn_azure_container" type="text"
20
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.azure.container" value="<?php echo esc_attr($this->_config->get_string('cdn.azure.container')); ?>" size="30" />
21
+ <input id="cdn_create_container" <?php $this->sealing_disabled('cdn') ?> class="button {type: 'azure', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Create container', 'w3-total-cache'); ?>" />
22
+ <span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
23
+ </td>
24
+ </tr>
25
+ <tr>
26
+ <th><label for="cdn_s3_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
27
+ <td>
28
+ <select id="cdn_s3_ssl" name="cdn.s3.ssl" <?php $this->sealing_disabled('cdn') ?>>
29
+ <option value="auto"<?php selected($this->_config->get_string('cdn.azure.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
30
+ <option value="enabled"<?php selected($this->_config->get_string('cdn.azure.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
31
+ <option value="disabled"<?php selected($this->_config->get_string('cdn.azure.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
32
+ </select>
33
+ <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
34
+ </td>
35
+ </tr>
36
+ <tr>
37
+ <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
38
+ <td>
39
+ <?php if (($cdn_azure_user = $this->_config->get_string('cdn.azure.user')) != ''): ?>
40
+ <?php echo esc_attr($cdn_azure_user); ?>.blob.core.windows.net
41
+ <?php else: ?>
42
+ &lt;account name&gt;.blob.core.windows.net
43
+ <?php endif; ?> <?php _e('or CNAME:', 'w3-total-cache'); ?>
44
+ <?php $cnames = $this->_config->get_array('cdn.azure.cname'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
45
+ </td>
46
+ </tr>
47
+ <tr>
48
+ <th colspan="2">
49
+ <input id="cdn_test" class="button {type: 'azure', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test Microsoft Azure Storage upload', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
50
+ </th>
51
+ </tr>
inc/options/cdn/cf.php CHANGED
@@ -1,54 +1,54 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <tr>
3
- <th colspan="2">
4
- <span class="description"><?php _e('We recommend that you use <a href="http://docs.amazonwebservices.com/IAM/latest/UserGuide/AccessPolicyLanguage_KeyConcepts.html" target="_blank"><acronym title="AWS Identity and Access Management">IAM</acronym></a> to create a new policy for <acronym title="Amazon Web Services">AWS</acronym> services that have limited permissions. A helpful tool: <a href="http://awspolicygen.s3.amazonaws.com/policygen.html" target="_blank"><acronym title="Amazon Web Services">AWS</acronym> Policy Generator</a>', 'w3-total-cache'); ?></span>
5
- </th>
6
- </tr>
7
- <tr>
8
- <th style="width: 300px;"><label for="cdn_cf_key"><?php _e('Access key ID:', 'w3-total-cache'); ?></label></th>
9
- <td>
10
- <input id="cdn_cf_key" class="w3tc-ignore-change" type="text"
11
- <?php $this->sealing_disabled('cdn') ?> name="cdn.cf.key" value="<?php echo esc_attr($this->_config->get_string('cdn.cf.key')); ?>" size="30" />
12
- </td>
13
- </tr>
14
- <tr>
15
- <th><label for="cdn_cf_secret"><?php _e('Secret key:', 'w3-total-cache'); ?></label></th>
16
- <td>
17
- <input id="cdn_cf_secret" class="w3tc-ignore-change" type="password"
18
- <?php $this->sealing_disabled('cdn') ?> name="cdn.cf.secret" value="<?php echo esc_attr($this->_config->get_string('cdn.cf.secret')); ?>" size="60" />
19
- </td>
20
- </tr>
21
- <tr>
22
- <th><label for="cdn_cf_bucket"><?php _e('Bucket:', 'w3-total-cache'); ?></label></th>
23
- <td>
24
- <input id="cdn_cf_bucket" type="text" name="cdn.cf.bucket"
25
- <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($this->_config->get_string('cdn.cf.bucket')); ?>" size="30" />
26
- <input class="button button-cdn-cf-bucket-location cdn_cf {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}"
27
- <?php $this->sealing_disabled('cdn') ?> type="button" value="<?php _e('Create bucket &amp; distribution', 'w3-total-cache'); ?>" />
28
- </td>
29
- </tr>
30
- <tr>
31
- <th><label for="cdn_cf_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
32
- <td>
33
- <select id="cdn_cf_ssl" name="cdn.cf.ssl" <?php $this->sealing_disabled('cdn') ?>>
34
- <option value="auto"<?php selected($this->_config->get_string('cdn.cf.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
35
- <option value="enabled"<?php selected($this->_config->get_string('cdn.cf.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
36
- <option value="disabled"<?php selected($this->_config->get_string('cdn.cf.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
37
- </select>
38
- <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
39
- </td>
40
- </tr>
41
- <tr>
42
- <th><label for="cdn_cf_id"><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></label></th>
43
- <td>
44
- <input id="cdn_cf_id" type="text" name="cdn.cf.id"
45
- <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($this->_config->get_string('cdn.cf.id')); ?>" size="18" style="text-align: right;" />.cloudfront.net or CNAME:
46
- <?php $cnames = $this->_config->get_array('cdn.cf.cname'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
47
- <br /><span class="description"><?php _e('If you have already added a <a href="http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/index.html?CNAMEs.html" target="_blank">CNAME</a> to your <acronym title="Domain Name System">DNS</acronym> Zone, enter it here.', 'w3-total-cache'); ?></span>
48
- </td>
49
- </tr>
50
- <tr>
51
- <th colspan="2">
52
- <input id="cdn_test" class="button {type: 'cf', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test S3 upload &amp; CloudFront distribution', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
53
- </th>
54
- </tr>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <tr>
3
+ <th colspan="2">
4
+ <span class="description"><?php _e('We recommend that you use <a href="http://docs.amazonwebservices.com/IAM/latest/UserGuide/AccessPolicyLanguage_KeyConcepts.html" target="_blank"><acronym title="AWS Identity and Access Management">IAM</acronym></a> to create a new policy for <acronym title="Amazon Web Services">AWS</acronym> services that have limited permissions. A helpful tool: <a href="http://awspolicygen.s3.amazonaws.com/policygen.html" target="_blank"><acronym title="Amazon Web Services">AWS</acronym> Policy Generator</a>', 'w3-total-cache'); ?></span>
5
+ </th>
6
+ </tr>
7
+ <tr>
8
+ <th style="width: 300px;"><label for="cdn_cf_key"><?php _e('Access key ID:', 'w3-total-cache'); ?></label></th>
9
+ <td>
10
+ <input id="cdn_cf_key" class="w3tc-ignore-change" type="text"
11
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.cf.key" value="<?php echo esc_attr($this->_config->get_string('cdn.cf.key')); ?>" size="30" />
12
+ </td>
13
+ </tr>
14
+ <tr>
15
+ <th><label for="cdn_cf_secret"><?php _e('Secret key:', 'w3-total-cache'); ?></label></th>
16
+ <td>
17
+ <input id="cdn_cf_secret" class="w3tc-ignore-change" type="password"
18
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.cf.secret" value="<?php echo esc_attr($this->_config->get_string('cdn.cf.secret')); ?>" size="60" />
19
+ </td>
20
+ </tr>
21
+ <tr>
22
+ <th><label for="cdn_cf_bucket"><?php _e('Bucket:', 'w3-total-cache'); ?></label></th>
23
+ <td>
24
+ <input id="cdn_cf_bucket" type="text" name="cdn.cf.bucket"
25
+ <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($this->_config->get_string('cdn.cf.bucket')); ?>" size="30" />
26
+ <input class="button button-cdn-cf-bucket-location cdn_cf {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}"
27
+ <?php $this->sealing_disabled('cdn') ?> type="button" value="<?php _e('Create bucket &amp; distribution', 'w3-total-cache'); ?>" />
28
+ </td>
29
+ </tr>
30
+ <tr>
31
+ <th><label for="cdn_cf_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
32
+ <td>
33
+ <select id="cdn_cf_ssl" name="cdn.cf.ssl" <?php $this->sealing_disabled('cdn') ?>>
34
+ <option value="auto"<?php selected($this->_config->get_string('cdn.cf.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
35
+ <option value="enabled"<?php selected($this->_config->get_string('cdn.cf.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
36
+ <option value="disabled"<?php selected($this->_config->get_string('cdn.cf.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
37
+ </select>
38
+ <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
39
+ </td>
40
+ </tr>
41
+ <tr>
42
+ <th><label for="cdn_cf_id"><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></label></th>
43
+ <td>
44
+ <input id="cdn_cf_id" type="text" name="cdn.cf.id"
45
+ <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($this->_config->get_string('cdn.cf.id')); ?>" size="18" style="text-align: right;" />.cloudfront.net or CNAME:
46
+ <?php $cnames = $this->_config->get_array('cdn.cf.cname'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
47
+ <br /><span class="description"><?php _e('If you have already added a <a href="http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/index.html?CNAMEs.html" target="_blank">CNAME</a> to your <acronym title="Domain Name System">DNS</acronym> Zone, enter it here.', 'w3-total-cache'); ?></span>
48
+ </td>
49
+ </tr>
50
+ <tr>
51
+ <th colspan="2">
52
+ <input id="cdn_test" class="button {type: 'cf', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test S3 upload &amp; CloudFront distribution', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
53
+ </th>
54
+ </tr>
inc/options/cdn/cf2.php CHANGED
@@ -1,54 +1,54 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <tr>
3
- <th colspan="2">
4
- <span class="description"><?php _e('We recommend that you use <a href="http://docs.amazonwebservices.com/IAM/latest/UserGuide/AccessPolicyLanguage_KeyConcepts.html" target="_blank"><acronym title="AWS Identity and Access Management">IAM</acronym></a> to create a new policy for <acronym title="Amazon Web Services">AWS</acronym> services that have limited permissions. A helpful tool: <a href="http://awspolicygen.s3.amazonaws.com/policygen.html" target="_blank"><acronym title="Amazon Web Services">AWS</acronym> Policy Generator</a>', 'w3-total-cache'); ?></span>
5
- </th>
6
- </tr>
7
- <tr>
8
- <th style="width: 300px;"><label for="cdn_cf2_key"><?php _e('Access key ID:', 'w3-total-cache'); ?></label></th>
9
- <td>
10
- <input id="cdn_cf2_key" class="w3tc-ignore-change" type="text"
11
- <?php $this->sealing_disabled('cdn') ?> name="cdn.cf2.key" value="<?php echo esc_attr($this->_config->get_string('cdn.cf2.key')); ?>" size="30" />
12
- </td>
13
- </tr>
14
- <tr>
15
- <th><label for="cdn_cf2_secret"><?php _e('Secret key:', 'w3-total-cache'); ?></label></th>
16
- <td>
17
- <input id="cdn_cf2_secret" class="w3tc-ignore-change"
18
- <?php $this->sealing_disabled('cdn') ?> type="password" name="cdn.cf2.secret" value="<?php echo esc_attr($this->_config->get_string('cdn.cf2.secret')); ?>" size="60" />
19
- </td>
20
- </tr>
21
- <tr>
22
- <th><?php _e('Origin:', 'w3-total-cache'); ?></th>
23
- <td>
24
- <?php echo w3_get_host(); ?>
25
- <input id="cdn_create_container"
26
- <?php $this->sealing_disabled('cdn') ?> class="button {type: 'cf2', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Create distribution', 'w3-total-cache'); ?>" />
27
- <span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
28
- </td>
29
- </tr>
30
- <tr>
31
- <th><label for="cdn_cf2_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
32
- <td>
33
- <select id="cdn_cf2_ssl" name="cdn.cf2.ssl" <?php $this->sealing_disabled('cdn') ?>>
34
- <option value="auto"<?php selected($this->_config->get_string('cdn.cf2.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
35
- <option value="enabled"<?php selected($this->_config->get_string('cdn.cf2.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
36
- <option value="disabled"<?php selected($this->_config->get_string('cdn.cf2.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
37
- </select>
38
- <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
39
- </td>
40
- </tr>
41
- <tr>
42
- <th><label for="cdn_cf2_id"><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></label></th>
43
- <td>
44
- <input id="cdn_cf2_id" type="text" name="cdn.cf2.id"
45
- <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($this->_config->get_string('cdn.cf2.id')); ?>" size="18" style="text-align: right;" />.cloudfront.net or CNAME:
46
- <?php $cnames = $this->_config->get_array('cdn.cf2.cname'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
47
- <br /><span class="description"><?php _e('If you have already added a <a href="http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/index.html?CNAMEs.html" target="_blank">CNAME</a> to your <acronym title="Domain Name System">DNS</acronym> Zone, enter it here.', 'w3-total-cache'); ?></span>
48
- </td>
49
- </tr>
50
- <tr>
51
- <th colspan="2">
52
- <input id="cdn_test" class="button {type: 'cf2', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test CloudFront distribution', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
53
- </th>
54
- </tr>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <tr>
3
+ <th colspan="2">
4
+ <span class="description"><?php _e('We recommend that you use <a href="http://docs.amazonwebservices.com/IAM/latest/UserGuide/AccessPolicyLanguage_KeyConcepts.html" target="_blank"><acronym title="AWS Identity and Access Management">IAM</acronym></a> to create a new policy for <acronym title="Amazon Web Services">AWS</acronym> services that have limited permissions. A helpful tool: <a href="http://awspolicygen.s3.amazonaws.com/policygen.html" target="_blank"><acronym title="Amazon Web Services">AWS</acronym> Policy Generator</a>', 'w3-total-cache'); ?></span>
5
+ </th>
6
+ </tr>
7
+ <tr>
8
+ <th style="width: 300px;"><label for="cdn_cf2_key"><?php _e('Access key ID:', 'w3-total-cache'); ?></label></th>
9
+ <td>
10
+ <input id="cdn_cf2_key" class="w3tc-ignore-change" type="text"
11
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.cf2.key" value="<?php echo esc_attr($this->_config->get_string('cdn.cf2.key')); ?>" size="30" />
12
+ </td>
13
+ </tr>
14
+ <tr>
15
+ <th><label for="cdn_cf2_secret"><?php _e('Secret key:', 'w3-total-cache'); ?></label></th>
16
+ <td>
17
+ <input id="cdn_cf2_secret" class="w3tc-ignore-change"
18
+ <?php $this->sealing_disabled('cdn') ?> type="password" name="cdn.cf2.secret" value="<?php echo esc_attr($this->_config->get_string('cdn.cf2.secret')); ?>" size="60" />
19
+ </td>
20
+ </tr>
21
+ <tr>
22
+ <th><?php _e('Origin:', 'w3-total-cache'); ?></th>
23
+ <td>
24
+ <?php echo w3_get_host(); ?>
25
+ <input id="cdn_create_container"
26
+ <?php $this->sealing_disabled('cdn') ?> class="button {type: 'cf2', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Create distribution', 'w3-total-cache'); ?>" />
27
+ <span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
28
+ </td>
29
+ </tr>
30
+ <tr>
31
+ <th><label for="cdn_cf2_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
32
+ <td>
33
+ <select id="cdn_cf2_ssl" name="cdn.cf2.ssl" <?php $this->sealing_disabled('cdn') ?>>
34
+ <option value="auto"<?php selected($this->_config->get_string('cdn.cf2.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
35
+ <option value="enabled"<?php selected($this->_config->get_string('cdn.cf2.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
36
+ <option value="disabled"<?php selected($this->_config->get_string('cdn.cf2.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
37
+ </select>
38
+ <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
39
+ </td>
40
+ </tr>
41
+ <tr>
42
+ <th><label for="cdn_cf2_id"><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></label></th>
43
+ <td>
44
+ <input id="cdn_cf2_id" type="text" name="cdn.cf2.id"
45
+ <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($this->_config->get_string('cdn.cf2.id')); ?>" size="18" style="text-align: right;" />.cloudfront.net or CNAME:
46
+ <?php $cnames = $this->_config->get_array('cdn.cf2.cname'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
47
+ <br /><span class="description"><?php _e('If you have already added a <a href="http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/index.html?CNAMEs.html" target="_blank">CNAME</a> to your <acronym title="Domain Name System">DNS</acronym> Zone, enter it here.', 'w3-total-cache'); ?></span>
48
+ </td>
49
+ </tr>
50
+ <tr>
51
+ <th colspan="2">
52
+ <input id="cdn_test" class="button {type: 'cf2', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test CloudFront distribution', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
53
+ </th>
54
+ </tr>
inc/options/cdn/common/cnames.php CHANGED
@@ -1,47 +1,47 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <ol id="cdn_cnames">
3
- <?php
4
- if (! count($cnames)) {
5
- $cnames = array('');
6
- }
7
-
8
- $count = count($cnames);
9
-
10
- foreach ($cnames as $index => $cname):
11
- $label = '';
12
-
13
- if ($count > 1):
14
- switch ($index):
15
- case 0:
16
- $label = __('(reserved for CSS)', 'w3-total-cache');
17
- break;
18
-
19
- case 1:
20
- $label = __('(reserved for JS in <head>)', 'w3-total-cache');
21
- break;
22
-
23
- case 2:
24
- $label = __('(reserved for JS after <body>)', 'w3-total-cache');
25
- break;
26
-
27
- case 3:
28
- $label = __('(reserved for JS before </body>)', 'w3-total-cache');
29
- break;
30
-
31
- default:
32
- $label = '';
33
- break;
34
- endswitch;
35
- endif;
36
- ?>
37
- <li>
38
- <input type="text" name="cdn_cnames[]"
39
- <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($cname); ?>" size="60" />
40
- <input class="button cdn_cname_delete" type="button"
41
- <?php $this->sealing_disabled('cdn') ?> value="<?php _e('Delete', 'w3-total-cache'); ?>"<?php if (!$index): ?> style="display: none;"<?php endif; ?> />
42
- <span><?php echo htmlspecialchars($label); ?></span>
43
- </li>
44
- <?php endforeach; ?>
45
- </ol>
46
- <input id="cdn_cname_add" class="button" type="button" value="<?php _e('Add CNAME', 'w3-total-cache'); ?>"
47
- <?php $this->sealing_disabled('cdn') ?> />
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <ol id="cdn_cnames">
3
+ <?php
4
+ if (! count($cnames)) {
5
+ $cnames = array('');
6
+ }
7
+
8
+ $count = count($cnames);
9
+
10
+ foreach ($cnames as $index => $cname):
11
+ $label = '';
12
+
13
+ if ($count > 1):
14
+ switch ($index):
15
+ case 0:
16
+ $label = __('(reserved for CSS)', 'w3-total-cache');
17
+ break;
18
+
19
+ case 1:
20
+ $label = __('(reserved for JS in <head>)', 'w3-total-cache');
21
+ break;
22
+
23
+ case 2:
24
+ $label = __('(reserved for JS after <body>)', 'w3-total-cache');
25
+ break;
26
+
27
+ case 3:
28
+ $label = __('(reserved for JS before </body>)', 'w3-total-cache');
29
+ break;
30
+
31
+ default:
32
+ $label = '';
33
+ break;
34
+ endswitch;
35
+ endif;
36
+ ?>
37
+ <li>
38
+ <input type="text" name="cdn_cnames[]"
39
+ <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($cname); ?>" size="60" />
40
+ <input class="button cdn_cname_delete" type="button"
41
+ <?php $this->sealing_disabled('cdn') ?> value="<?php _e('Delete', 'w3-total-cache'); ?>"<?php if (!$index): ?> style="display: none;"<?php endif; ?> />
42
+ <span><?php echo htmlspecialchars($label); ?></span>
43
+ </li>
44
+ <?php endforeach; ?>
45
+ </ol>
46
+ <input id="cdn_cname_add" class="button" type="button" value="<?php _e('Add CNAME', 'w3-total-cache'); ?>"
47
+ <?php $this->sealing_disabled('cdn') ?> />
inc/options/cdn/cotendo.php CHANGED
@@ -1,45 +1,45 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <tr>
3
- <th style="width: 300px;"><label for="cdn_cotendo_username"><?php _e('Username:', 'w3-total-cache'); ?></label></th>
4
- <td>
5
- <input id="cdn_cotendo_username" class="w3tc-ignore-change" type="text"
6
- <?php $this->sealing_disabled('cdn') ?> name="cdn.cotendo.username" value="<?php echo esc_attr($this->_config->get_string('cdn.cotendo.username')); ?>" size="60" />
7
- </td>
8
- </tr>
9
- <tr>
10
- <th><label for="cdn_cotendo_password"><?php _e('Password:', 'w3-total-cache'); ?></label></th>
11
- <td>
12
- <input id="cdn_cotendo_password" class="w3tc-ignore-change"
13
- <?php $this->sealing_disabled('cdn') ?> type="password" name="cdn.cotendo.password" value="<?php echo esc_attr($this->_config->get_string('cdn.cotendo.password')); ?>" size="60" />
14
- </td>
15
- </tr>
16
- <tr>
17
- <th><label for="cdn_cotendo_zones"><?php _e('Zones to purge:', 'w3-total-cache'); ?></label></th>
18
- <td>
19
- <textarea id="cdn_cotendo_zones" name="cdn.cotendo.zones"
20
- <?php $this->sealing_disabled('cdn') ?> cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('cdn.cotendo.zones'))); ?></textarea>
21
- </td>
22
- </tr>
23
- <tr>
24
- <th><label for="cdn_cotendo_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
25
- <td>
26
- <select id="cdn_cotendo_ssl" name="cdn.cotendo.ssl" <?php $this->sealing_disabled('cdn') ?>>
27
- <option value="auto"<?php selected($this->_config->get_string('cdn.cotendo.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
28
- <option value="enabled"<?php selected($this->_config->get_string('cdn.cotendo.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
29
- <option value="disabled"<?php selected($this->_config->get_string('cdn.cotendo.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
30
- </select>
31
- <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
32
- </td>
33
- </tr>
34
- <tr>
35
- <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
36
- <td>
37
- <?php $cnames = $this->_config->get_array('cdn.cotendo.domain'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
38
- <br /><span class="description"><?php _e('Enter the hostname provided by your <acronym>CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache'); ?></span>
39
- </td>
40
- </tr>
41
- <tr>
42
- <th colspan="2">
43
- <input id="cdn_test" class="button {type: 'cotendo', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test Cotendo', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
44
- </th>
45
- </tr>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <tr>
3
+ <th style="width: 300px;"><label for="cdn_cotendo_username"><?php _e('Username:', 'w3-total-cache'); ?></label></th>
4
+ <td>
5
+ <input id="cdn_cotendo_username" class="w3tc-ignore-change" type="text"
6
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.cotendo.username" value="<?php echo esc_attr($this->_config->get_string('cdn.cotendo.username')); ?>" size="60" />
7
+ </td>
8
+ </tr>
9
+ <tr>
10
+ <th><label for="cdn_cotendo_password"><?php _e('Password:', 'w3-total-cache'); ?></label></th>
11
+ <td>
12
+ <input id="cdn_cotendo_password" class="w3tc-ignore-change"
13
+ <?php $this->sealing_disabled('cdn') ?> type="password" name="cdn.cotendo.password" value="<?php echo esc_attr($this->_config->get_string('cdn.cotendo.password')); ?>" size="60" />
14
+ </td>
15
+ </tr>
16
+ <tr>
17
+ <th><label for="cdn_cotendo_zones"><?php _e('Zones to purge:', 'w3-total-cache'); ?></label></th>
18
+ <td>
19
+ <textarea id="cdn_cotendo_zones" name="cdn.cotendo.zones"
20
+ <?php $this->sealing_disabled('cdn') ?> cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('cdn.cotendo.zones'))); ?></textarea>
21
+ </td>
22
+ </tr>
23
+ <tr>
24
+ <th><label for="cdn_cotendo_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
25
+ <td>
26
+ <select id="cdn_cotendo_ssl" name="cdn.cotendo.ssl" <?php $this->sealing_disabled('cdn') ?>>
27
+ <option value="auto"<?php selected($this->_config->get_string('cdn.cotendo.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
28
+ <option value="enabled"<?php selected($this->_config->get_string('cdn.cotendo.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
29
+ <option value="disabled"<?php selected($this->_config->get_string('cdn.cotendo.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
30
+ </select>
31
+ <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
32
+ </td>
33
+ </tr>
34
+ <tr>
35
+ <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
36
+ <td>
37
+ <?php $cnames = $this->_config->get_array('cdn.cotendo.domain'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
38
+ <br /><span class="description"><?php _e('Enter the hostname provided by your <acronym>CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache'); ?></span>
39
+ </td>
40
+ </tr>
41
+ <tr>
42
+ <th colspan="2">
43
+ <input id="cdn_test" class="button {type: 'cotendo', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test Cotendo', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
44
+ </th>
45
+ </tr>
inc/options/cdn/edgecast.php CHANGED
@@ -1,38 +1,38 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <tr>
3
- <th style="width: 300px;"><label for="cdn_edgecast_account"><?php _e('Account #:', 'w3-total-cache'); ?></label></th>
4
- <td>
5
- <input id="cdn_edgecast_account" class="w3tc-ignore-change" type="text"
6
- <?php $this->sealing_disabled('cdn') ?> name="cdn.edgecast.account" value="<?php echo esc_attr($this->_config->get_string('cdn.edgecast.account')); ?>" size="60" />
7
- </td>
8
- </tr>
9
- <tr>
10
- <th><label for="cdn_edgecast_token"><?php _e('Token:', 'w3-total-cache'); ?></th>
11
- <td>
12
- <input id="cdn_edgecast_token" class="w3tc-ignore-change" type="password"
13
- <?php $this->sealing_disabled('cdn') ?> name="cdn.edgecast.token" value="<?php echo esc_attr($this->_config->get_string('cdn.edgecast.token')); ?>" size="60" />
14
- </td>
15
- </tr>
16
- <tr>
17
- <th><label for="cdn_edgecast_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
18
- <td>
19
- <select id="cdn_edgecast_ssl" name="cdn.edgecast.ssl" <?php $this->sealing_disabled('cdn') ?>>
20
- <option value="auto"<?php selected($this->_config->get_string('cdn.edgecast.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
21
- <option value="enabled"<?php selected($this->_config->get_string('cdn.edgecast.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
22
- <option value="disabled"<?php selected($this->_config->get_string('cdn.edgecast.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
23
- </select>
24
- <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
25
- </td>
26
- </tr>
27
- <tr>
28
- <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
29
- <td>
30
- <?php $cnames = $this->_config->get_array('cdn.edgecast.domain'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
31
- <br /><span class="description"><?php _e('Enter the hostname provided by your <acronym>CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache'); ?></span>
32
- </td>
33
- </tr>
34
- <tr>
35
- <th colspan="2">
36
- <input id="cdn_test" class="button {type: 'edgecast', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test EdgeCast', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
37
- </th>
38
- </tr>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <tr>
3
+ <th style="width: 300px;"><label for="cdn_edgecast_account"><?php _e('Account #:', 'w3-total-cache'); ?></label></th>
4
+ <td>
5
+ <input id="cdn_edgecast_account" class="w3tc-ignore-change" type="text"
6
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.edgecast.account" value="<?php echo esc_attr($this->_config->get_string('cdn.edgecast.account')); ?>" size="60" />
7
+ </td>
8
+ </tr>
9
+ <tr>
10
+ <th><label for="cdn_edgecast_token"><?php _e('Token:', 'w3-total-cache'); ?></th>
11
+ <td>
12
+ <input id="cdn_edgecast_token" class="w3tc-ignore-change" type="password"
13
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.edgecast.token" value="<?php echo esc_attr($this->_config->get_string('cdn.edgecast.token')); ?>" size="60" />
14
+ </td>
15
+ </tr>
16
+ <tr>
17
+ <th><label for="cdn_edgecast_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
18
+ <td>
19
+ <select id="cdn_edgecast_ssl" name="cdn.edgecast.ssl" <?php $this->sealing_disabled('cdn') ?>>
20
+ <option value="auto"<?php selected($this->_config->get_string('cdn.edgecast.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
21
+ <option value="enabled"<?php selected($this->_config->get_string('cdn.edgecast.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
22
+ <option value="disabled"<?php selected($this->_config->get_string('cdn.edgecast.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
23
+ </select>
24
+ <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
25
+ </td>
26
+ </tr>
27
+ <tr>
28
+ <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
29
+ <td>
30
+ <?php $cnames = $this->_config->get_array('cdn.edgecast.domain'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
31
+ <br /><span class="description"><?php _e('Enter the hostname provided by your <acronym>CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache'); ?></span>
32
+ </td>
33
+ </tr>
34
+ <tr>
35
+ <th colspan="2">
36
+ <input id="cdn_test" class="button {type: 'edgecast', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test EdgeCast', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
37
+ </th>
38
+ </tr>
inc/options/cdn/ftp.php CHANGED
@@ -1,60 +1,60 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <tr>
3
- <th colspan="2">
4
- <?php $this->checkbox('cdn.ftp.pasv') ?> <?php _e('Use passive <acronym title="File Transfer Protocol">FTP</acronym> mode', 'w3-total-cache'); ?></label><br />
5
- <span class="description"><?php _e('Enable this option only if there are connectivity issues, otherwise it\'s not recommended.', 'w3-total-cache'); ?></span>
6
- </th>
7
- </tr>
8
- <tr>
9
- <th style="width: 300px;"><label for="cdn_ftp_host"><?php _e('<acronym title="File Transfer Protocol">FTP</acronym> hostname:', 'w3-total-cache'); ?></label></th>
10
- <td>
11
- <input id="cdn_ftp_host" type="text" name="cdn.ftp.host"
12
- <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($this->_config->get_string('cdn.ftp.host')); ?>" size="30" /><br />
13
- <span class="description"><?php _e('Specify the server\'s address, e.g.: "ftp.domain.com". Try "127.0.0.1" if using a sub-domain on the same server as your site.', 'w3-total-cache'); ?></span>
14
- </td>
15
- </tr>
16
- <tr>
17
- <th><label for="cdn_ftp_user"><?php _e('<acronym title="File Transfer Protocol">FTP</acronym> username:', 'w3-total-cache'); ?></label></th>
18
- <td>
19
- <input id="cdn_ftp_user" class="w3tc-ignore-change" type="text"
20
- <?php $this->sealing_disabled('cdn') ?> name="cdn.ftp.user" value="<?php echo esc_attr($this->_config->get_string('cdn.ftp.user')); ?>" size="30" />
21
- </td>
22
- </tr>
23
- <tr>
24
- <th><label for="cdn_ftp_pass"><?php _e('<acronym title="File Transfer Protocol">FTP</acronym> password:', 'w3-total-cache'); ?></label></th>
25
- <td>
26
- <input id="cdn_ftp_pass" class="w3tc-ignore-change"
27
- <?php $this->sealing_disabled('cdn') ?> type="password" name="cdn.ftp.pass" value="<?php echo esc_attr($this->_config->get_string('cdn.ftp.pass')); ?>" size="30" />
28
- </td>
29
- </tr>
30
- <tr>
31
- <th><label for="cdn_ftp_path"><?php _e('<acronym title="File Transfer Protocol">FTP</acronym> path:', 'w3-total-cache'); ?></label></th>
32
- <td>
33
- <input id="cdn_ftp_path" type="text" name="cdn.ftp.path"
34
- <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($this->_config->get_string('cdn.ftp.path')); ?>" size="30" /><br />
35
- <span class="description"><?php _e('Specify the directory where files must be uploaded to be accessible in a web browser (the document root).', 'w3-total-cache'); ?></span>
36
- </td>
37
- </tr>
38
- <tr>
39
- <th><label for="cdn_ftp_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
40
- <td>
41
- <select id="cdn_ftp_ssl" name="cdn.ftp.ssl" <?php $this->sealing_disabled('cdn') ?>>
42
- <option value="auto"<?php selected($this->_config->get_string('cdn.ftp.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
43
- <option value="enabled"<?php selected($this->_config->get_string('cdn.ftp.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
44
- <option value="disabled"<?php selected($this->_config->get_string('cdn.ftp.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
45
- </select>
46
- <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
47
- </td>
48
- </tr>
49
- <tr>
50
- <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
51
- <td>
52
- <?php $cnames = $this->_config->get_array('cdn.ftp.domain'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
53
- <br /><span class="description"><?php _e('Enter the hostname or CNAME(s) of your <acronym title="File Transfer Protocol">FTP</acronym> server configured above, these values will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache'); ?></span>
54
- </td>
55
- </tr>
56
- <tr>
57
- <th colspan="2">
58
- <input id="cdn_test" class="button {type: 'ftp', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test FTP server', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
59
- </th>
60
- </tr>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <tr>
3
+ <th colspan="2">
4
+ <?php $this->checkbox('cdn.ftp.pasv') ?> <?php _e('Use passive <acronym title="File Transfer Protocol">FTP</acronym> mode', 'w3-total-cache'); ?></label><br />
5
+ <span class="description"><?php _e('Enable this option only if there are connectivity issues, otherwise it\'s not recommended.', 'w3-total-cache'); ?></span>
6
+ </th>
7
+ </tr>
8
+ <tr>
9
+ <th style="width: 300px;"><label for="cdn_ftp_host"><?php _e('<acronym title="File Transfer Protocol">FTP</acronym> hostname:', 'w3-total-cache'); ?></label></th>
10
+ <td>
11
+ <input id="cdn_ftp_host" type="text" name="cdn.ftp.host"
12
+ <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($this->_config->get_string('cdn.ftp.host')); ?>" size="30" /><br />
13
+ <span class="description"><?php _e('Specify the server\'s address, e.g.: "ftp.domain.com". Try "127.0.0.1" if using a sub-domain on the same server as your site.', 'w3-total-cache'); ?></span>
14
+ </td>
15
+ </tr>
16
+ <tr>
17
+ <th><label for="cdn_ftp_user"><?php _e('<acronym title="File Transfer Protocol">FTP</acronym> username:', 'w3-total-cache'); ?></label></th>
18
+ <td>
19
+ <input id="cdn_ftp_user" class="w3tc-ignore-change" type="text"
20
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.ftp.user" value="<?php echo esc_attr($this->_config->get_string('cdn.ftp.user')); ?>" size="30" />
21
+ </td>
22
+ </tr>
23
+ <tr>
24
+ <th><label for="cdn_ftp_pass"><?php _e('<acronym title="File Transfer Protocol">FTP</acronym> password:', 'w3-total-cache'); ?></label></th>
25
+ <td>
26
+ <input id="cdn_ftp_pass" class="w3tc-ignore-change"
27
+ <?php $this->sealing_disabled('cdn') ?> type="password" name="cdn.ftp.pass" value="<?php echo esc_attr($this->_config->get_string('cdn.ftp.pass')); ?>" size="30" />
28
+ </td>
29
+ </tr>
30
+ <tr>
31
+ <th><label for="cdn_ftp_path"><?php _e('<acronym title="File Transfer Protocol">FTP</acronym> path:', 'w3-total-cache'); ?></label></th>
32
+ <td>
33
+ <input id="cdn_ftp_path" type="text" name="cdn.ftp.path"
34
+ <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($this->_config->get_string('cdn.ftp.path')); ?>" size="30" /><br />
35
+ <span class="description"><?php _e('Specify the directory where files must be uploaded to be accessible in a web browser (the document root).', 'w3-total-cache'); ?></span>
36
+ </td>
37
+ </tr>
38
+ <tr>
39
+ <th><label for="cdn_ftp_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
40
+ <td>
41
+ <select id="cdn_ftp_ssl" name="cdn.ftp.ssl" <?php $this->sealing_disabled('cdn') ?>>
42
+ <option value="auto"<?php selected($this->_config->get_string('cdn.ftp.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
43
+ <option value="enabled"<?php selected($this->_config->get_string('cdn.ftp.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
44
+ <option value="disabled"<?php selected($this->_config->get_string('cdn.ftp.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
45
+ </select>
46
+ <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
47
+ </td>
48
+ </tr>
49
+ <tr>
50
+ <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
51
+ <td>
52
+ <?php $cnames = $this->_config->get_array('cdn.ftp.domain'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
53
+ <br /><span class="description"><?php _e('Enter the hostname or CNAME(s) of your <acronym title="File Transfer Protocol">FTP</acronym> server configured above, these values will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache'); ?></span>
54
+ </td>
55
+ </tr>
56
+ <tr>
57
+ <th colspan="2">
58
+ <input id="cdn_test" class="button {type: 'ftp', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test FTP server', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
59
+ </th>
60
+ </tr>
inc/options/cdn/maxcdn.php CHANGED
@@ -5,44 +5,31 @@
5
  */
6
  ?>
7
  <?php if (!defined('W3TC')) die(); ?>
8
- <?php if ($authorized && $pull_zones): ?>
9
- <tr>
10
- <th><label for="cdn_maxcdn_zone_id"><?php _e('Select pull zone:', 'w3-total-cache')?></label></th>
11
- <td>
12
- <select id="cdn_maxcdn_zone_id" name="cdn.maxcdn.zone_id" <?php $this->sealing_disabled('cdn') ?>>
13
- <?php foreach($pull_zones as $zone):?>
14
- <option value="<?php echo $zone['id'] ?>" <?php selected($zone['id'], $this->_config->get_integer('cdn.maxcdn.zone_id'))?>><?php echo $zone['name']?></option>
15
- <?php endforeach; ?>
16
- </select>
17
- <br />
18
- <span class="description"><?php _e('Select the pull zone to use with this site.', 'w3-total-cache')?></span>
19
- </td>
20
- </tr>
21
- <?php endif ?>
22
  <?php if (!$authorized): ?>
23
- <tr>
24
- <th style="width: 300px;"><label><?php _e('Create account:', 'w3-total-cache')?></label></th>
25
- <td>
26
- <a href="<?php esc_attr_e(MAXCDN_SIGNUP_URL)?>" target="_blank" id="netdna-maxcdn-create-account" class="button-primary"><?php _e('Sign Up Now &amp; Save $10', 'w3-total-cache') ?></a>
27
- <br />
28
- <span class="description"><?php _e('MaxCDN is a service that lets you speed up your site even more with W3 Total Cache. 100% Money Back Guarantee (30 Days)!', 'w3-total-cache')?></span>
29
- </td>
30
- </tr>
31
  <?php endif ?>
 
32
  <?php if ($authorized): ?>
33
  <tr>
34
  <th style="width: 300px;"><label><?php !$pull_zones ? _e('Create pull zone:', 'w3-total-cache') : _e('Create new pull zone:', 'w3-total-cache')?></label></th>
35
  <td>
36
  <button id="netdna-maxcdn-create-pull-zone" <?php $this->sealing_disabled('cdn') ?> class="button-primary {type: 'maxcdn', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}"><?php !$pull_zones ? _e('Create pull zone', 'w3-total-cache') : _e('Create new pull zone', 'w3-total-cache')?></button>
37
  <br />
38
- <span class="description"><?php _e('Click the Create Pull Zone button above and create a pull zone for this site.', 'w3-total-cache')?></span>
39
  </td>
40
  </tr>
41
  <?php elseif(!$authorized): ?>
42
  <tr>
43
  <th style="width: 300px;"><label><?php _e('Specify account credentials:', 'w3-total-cache')?></label></th>
44
  <td>
45
- <a id="cdn_maxcdn_oauth" class="button-primary" href="https://cp.maxcdn.com/i/w3tc" target="_blank"><?php _e('Authorize', 'w3-total-cache')?></a>
46
  <br />
47
  <span class="description"><?php _e('Click the Authorize button above, log in, paste the key below and save settings.', 'w3-total-cache')?></span>
48
  </td>
@@ -50,12 +37,33 @@
50
  <?php endif ?>
51
  <tr>
52
  <th style="width: 300px;"><label for="cdn_maxcdn_authorization_key"><?php _e('Authorization key', 'w3-total-cache')?>:</label></th>
53
- <td>
54
  <input id="cdn_maxcdn_authorization_key" class="w3tc-ignore-change" type="text"
55
- <?php $this->sealing_disabled('cdn') ?> name="cdn.maxcdn.authorization_key" value="<?php echo esc_attr($this->_config->get_string('cdn.maxcdn.authorization_key')); ?>" size="60" />
 
56
  <br /><span class="description"><?php _e('Consists of alias+key+secret . Example: bluewidgets+asd897asd98a7sd+798a7sd9 . If you use "Authorize" its already formatted correctly.', 'w3-total-cache')?></span>
57
  </td>
58
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  <tr>
60
  <th><label for="cdn_maxcdn_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support', 'w3-total-cache')?>:</label></th>
61
  <td>
5
  */
6
  ?>
7
  <?php if (!defined('W3TC')) die(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  <?php if (!$authorized): ?>
9
+ <tr>
10
+ <th style="width: 300px;"><label><?php _e('Create account:', 'w3-total-cache')?></label></th>
11
+ <td>
12
+ <a href="<?php esc_attr_e(wp_nonce_url(w3_admin_url('admin.php?page=w3tc_dashboard&w3tc_cdn_maxcdn_signup'), 'w3tc'))?>" target="_blank" id="netdna-maxcdn-create-account" class="button-primary"><?php _e('Sign Up Now and Save 25%', 'w3-total-cache') ?></a>
13
+ <br />
14
+ <span class="description"><?php _e('MaxCDN is a service that lets you speed up your site even more with W3 Total Cache. 100% Money Back Guarantee (30 Days)!', 'w3-total-cache')?></span>
15
+ </td>
16
+ </tr>
17
  <?php endif ?>
18
+
19
  <?php if ($authorized): ?>
20
  <tr>
21
  <th style="width: 300px;"><label><?php !$pull_zones ? _e('Create pull zone:', 'w3-total-cache') : _e('Create new pull zone:', 'w3-total-cache')?></label></th>
22
  <td>
23
  <button id="netdna-maxcdn-create-pull-zone" <?php $this->sealing_disabled('cdn') ?> class="button-primary {type: 'maxcdn', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}"><?php !$pull_zones ? _e('Create pull zone', 'w3-total-cache') : _e('Create new pull zone', 'w3-total-cache')?></button>
24
  <br />
25
+ <span class="description"><?php _e('Click the Create Pull Zone button above and create a pull zone manually for this site.', 'w3-total-cache')?></span>
26
  </td>
27
  </tr>
28
  <?php elseif(!$authorized): ?>
29
  <tr>
30
  <th style="width: 300px;"><label><?php _e('Specify account credentials:', 'w3-total-cache')?></label></th>
31
  <td>
32
+ <a id="cdn_maxcdn_oauth" class="button-primary" href="<?php echo wp_nonce_url(w3_admin_url('admin.php?page=w3tc_dashboard&w3tc_cdn_maxcdn_authorize'), 'w3tc')?>" target="_blank"><?php _e('Authorize', 'w3-total-cache')?></a>
33
  <br />
34
  <span class="description"><?php _e('Click the Authorize button above, log in, paste the key below and save settings.', 'w3-total-cache')?></span>
35
  </td>
37
  <?php endif ?>
38
  <tr>
39
  <th style="width: 300px;"><label for="cdn_maxcdn_authorization_key"><?php _e('Authorization key', 'w3-total-cache')?>:</label></th>
40
+ <td id="authorization_area">
41
  <input id="cdn_maxcdn_authorization_key" class="w3tc-ignore-change" type="text"
42
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.maxcdn.authorization_key" value="<?php echo esc_attr($this->_config->get_string('cdn.maxcdn.authorization_key')); ?>" size="60" onblur="w3tc_validate_cdn_key_result('maxcdn','<?php echo wp_create_nonce('w3tc'); ?>')" />
43
+ <input id="validate_cdn_key" type="button" class="button {type: 'maxcdn', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" value="<?php _e('Validate', 'w3-total-cache') ?>" /><span id="validate_cdn_key_result" style="margin-left:5px;padding:3px 8px 3px 20px;"></span>
44
  <br /><span class="description"><?php _e('Consists of alias+key+secret . Example: bluewidgets+asd897asd98a7sd+798a7sd9 . If you use "Authorize" its already formatted correctly.', 'w3-total-cache')?></span>
45
  </td>
46
  </tr>
47
+ <tr id="create_zone_area" style="<?php echo $authorized && (!$have_zone || is_null($zone_info)) ? '' : 'display: none' ?>">
48
+ <th><?php _e('Create zone:', 'w3-total-cache') ?></th>
49
+ <td><input type="button" class="button" onclick="w3tc_create_zone('maxcdn','<?php echo wp_create_nonce('w3tc'); ?>')" value="<?php _e('Create Default Zone', 'w3-total-cache') ?>" id="create_default_zone" />
50
+ <span id="create_pull_zone_result" style="padding:3px 0 3px 20px;"></span>
51
+ <br /><span class="description"><?php _e('You have no zone connected with this site. Click button to create a default zone automatically.', 'w3-total-cache') ?></span>
52
+ </td>
53
+ </tr>
54
+ <tr id="select_pull_zone" style="<?php echo !($authorized && $pull_zones) ? 'display:none' : '' ?>">
55
+ <th><label for="cdn_maxcdn_zone_id"><?php _e('Select pull zone:', 'w3-total-cache')?></label></th>
56
+ <td>
57
+ <select id="cdn_maxcdn_zone_id" name="cdn.maxcdn.zone_id" <?php $this->sealing_disabled('cdn') ?>>
58
+ <?php foreach($pull_zones as $zone):?>
59
+ <option value="<?php echo $zone['id'] ?>" <?php selected($zone['id'], $this->_config->get_integer('cdn.maxcdn.zone_id'))?>><?php echo $zone['name']?></option>
60
+ <?php endforeach; ?>
61
+ </select> <input id="use_poll_zone" type="button" class="button {type: 'maxcdn', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" value="<?php _e('Use Zone', 'w3-total-cache') ?>" /><span id="use_pull_zone_result" style="margin-left:15px;padding:3px 8px 3px 8px;"></span>
62
+ <br />
63
+ <span class="description"><?php _e('Select the pull zone to use with this site.', 'w3-total-cache')?></span>
64
+ </td>
65
+ </tr>
66
+
67
  <tr>
68
  <th><label for="cdn_maxcdn_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support', 'w3-total-cache')?>:</label></th>
69
  <td>
inc/options/cdn/mirror.php CHANGED
@@ -1,24 +1,24 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <tr>
3
- <th><label for="cdn_mirror_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
4
- <td>
5
- <select id="cdn_mirror_ssl" name="cdn.mirror.ssl" <?php $this->sealing_disabled('cdn') ?>>
6
- <option value="auto"<?php selected($this->_config->get_string('cdn.mirror.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
7
- <option value="enabled"<?php selected($this->_config->get_string('cdn.mirror.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
8
- <option value="disabled"<?php selected($this->_config->get_string('cdn.mirror.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
9
- </select>
10
- <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
11
- </td>
12
- </tr>
13
- <tr>
14
- <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
15
- <td>
16
- <?php $cnames = $this->_config->get_array('cdn.mirror.domain'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
17
- <br /><span class="description"><?php _e('Enter the hostname provided by your <acronym>CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache'); ?></span>
18
- </td>
19
- </tr>
20
- <tr>
21
- <th colspan="2">
22
- <input id="cdn_test" class="button {type: 'mirror', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test Mirror', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
23
- </th>
24
- </tr>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <tr>
3
+ <th><label for="cdn_mirror_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
4
+ <td>
5
+ <select id="cdn_mirror_ssl" name="cdn.mirror.ssl" <?php $this->sealing_disabled('cdn') ?>>
6
+ <option value="auto"<?php selected($this->_config->get_string('cdn.mirror.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
7
+ <option value="enabled"<?php selected($this->_config->get_string('cdn.mirror.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
8
+ <option value="disabled"<?php selected($this->_config->get_string('cdn.mirror.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
9
+ </select>
10
+ <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
11
+ </td>
12
+ </tr>
13
+ <tr>
14
+ <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
15
+ <td>
16
+ <?php $cnames = $this->_config->get_array('cdn.mirror.domain'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
17
+ <br /><span class="description"><?php _e('Enter the hostname provided by your <acronym>CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache'); ?></span>
18
+ </td>
19
+ </tr>
20
+ <tr>
21
+ <th colspan="2">
22
+ <input id="cdn_test" class="button {type: 'mirror', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test Mirror', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
23
+ </th>
24
+ </tr>
inc/options/cdn/netdna.php CHANGED
@@ -1,82 +1,89 @@
1
- <?php
2
- /**
3
- * @var bool $authorized
4
- * @var array $pull_zones
5
- */
6
- ?>
7
- <?php if (!defined('W3TC')) die(); ?>
8
- <?php if ($authorized && $pull_zones): ?>
9
- <tr>
10
- <th><label for="cdn_netdna_zone_id"><?php _e('Select pull zone:', 'w3-total-cache')?></label></th>
11
- <td>
12
- <select id="cdn_netdna_zone_id" name="cdn.netdna.zone_id" <?php $this->sealing_disabled('cdn') ?>>
13
- <?php foreach($pull_zones as $zone):?>
14
- <option value="<?php echo $zone['id'] ?>" <?php selected($zone['id'], $this->_config->get_integer('cdn.netdna.zone_id'))?>><?php echo $zone['name']?></option>
15
- <?php endforeach; ?>
16
- </select>
17
- <br />
18
- <span class="description"><?php _e('Select the pull zone to use with this site.', 'w3-total-cache')?></span>
19
- </td>
20
- </tr>
21
- <?php endif ?>
22
- <?php if (!$authorized): ?>
23
- <tr>
24
- <th style="width: 300px;"><label><?php _e('Create account:', 'w3-total-cache')?></label></th>
25
- <td>
26
- <a href="<?php esc_attr_e(MAXCDN_SIGNUP_URL)?>" target="_blank" id="netdna-maxcdn-create-account" class="button-primary"><?php _e('Create Account', 'w3-total-cache') ?></a>
27
- <br />
28
- <span class="description"><?php _e('Are you a new customer? Click the Create Account button to receive a discount on a new MaxCDN account.', 'w3-total-cache')?></span>
29
- </td>
30
- </tr>
31
- <?php endif ?>
32
-
33
- <?php if ($authorized): ?>
34
- <tr>
35
- <th style="width: 300px;"><label><?php !$pull_zones ? _e('Create pull zone:', 'w3-total-cache') : _e('Create new pull zone:', 'w3-total-cache')?></label></th>
36
- <td>
37
- <button id="netdna-maxcdn-create-pull-zone" <?php $this->sealing_disabled('cdn') ?> class="button-primary {type: 'netdna', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}"><?php !$pull_zones ? _e('Create pull zone', 'w3-total-cache') : _e('Create new pull zone', 'w3-total-cache')?></button>
38
- <br />
39
- <span class="description"><?php _e('Click the Create Pull Zone button above and create a pull zone for this site.', 'w3-total-cache')?></span>
40
- </td>
41
- </tr>
42
- <?php elseif(!$authorized): ?>
43
- <tr>
44
- <th style="width: 300px;"><label><?php _e('Specify account credentials:', 'w3-total-cache')?></label></th>
45
- <td>
46
- <a id="cdn_netdna_oauth" class="button-primary" href="https://cp.netdna.com/i/w3tc" target="_blank"><?php _e('Authorize', 'w3-total-cache')?></a>
47
- <br />
48
- <span class="description"><?php _e('Click the Authorize button above, log in, paste the key below and save settings.', 'w3-total-cache')?></span>
49
- </td>
50
- </tr>
51
- <?php endif ?>
52
- <tr>
53
- <th style="width: 300px;"><label for="cdn_netdna_authorization_key"><?php _e('Authorization key', 'w3-total-cache')?>:</label></th>
54
- <td>
55
- <input id="cdn_netdna_authorization_key" class="w3tc-ignore-change" type="text"
56
- <?php $this->sealing_disabled('cdn') ?> name="cdn.netdna.authorization_key" value="<?php echo esc_attr($this->_config->get_string('cdn.netdna.authorization_key')); ?>" size="60" />
57
- <br /><span class="description"><?php _e('Consists of alias+key+secret . Example: bluewidgets+asd897asd98a7sd+798a7sd9 . If you use "Authorize" its already formatted correctly.', 'w3-total-cache')?></span>
58
- </td>
59
- </tr>
60
- <tr>
61
- <th><label for="cdn_netdna_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support', 'w3-total-cache')?>:</label></th>
62
- <td>
63
- <select id="cdn_netdna_ssl" name="cdn.netdna.ssl" <?php $this->sealing_disabled('cdn') ?>>
64
- <option value="auto"<?php selected($this->_config->get_string('cdn.netdna.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache')?></option>
65
- <option value="enabled"<?php selected($this->_config->get_string('cdn.netdna.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache')?></option>
66
- <option value="disabled"<?php selected($this->_config->get_string('cdn.netdna.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache')?></option>
67
- </select>
68
- <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache')?></span>
69
- </td>
70
- </tr>
71
- <tr>
72
- <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache')?></th>
73
- <td>
74
- <?php $cnames = $this->_config->get_array('cdn.netdna.domain'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
75
- <br /><span class="description"><?php _e('Enter the hostname provided by your <acronym>CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache')?></span>
76
- </td>
77
- </tr>
78
- <tr>
79
- <th colspan="2">
80
- <input id="cdn_test" class="button {type: 'netdna', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test NetDNA', 'w3-total-cache')?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
81
- </th>
82
- </tr>
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @var bool $authorized
4
+ * @var array $pull_zones
5
+ */
6
+ ?>
7
+ <?php if (!defined('W3TC')) die(); ?>
8
+ <?php if (!$authorized): ?>
9
+ <tr>
10
+ <th style="width: 300px;"><label><?php _e('Create account:', 'w3-total-cache')?></label></th>
11
+ <td>
12
+ <a href="<?php esc_attr_e(wp_nonce_url(w3_admin_url('admin.php?page=w3tc_dashboard&w3tc_cdn_maxcdn_signup'), 'w3tc'))?>" target="_blank" id="netdna-maxcdn-create-account" class="button-primary"><?php _e('Create Account', 'w3-total-cache') ?></a>
13
+ <br />
14
+ <span class="description"><?php _e('Are you a new customer? Click the Create Account button to receive a discount on a new MaxCDN account.', 'w3-total-cache')?></span>
15
+ </td>
16
+ </tr>
17
+ <?php endif ?>
18
+
19
+ <?php if ($authorized): ?>
20
+ <tr>
21
+ <th style="width: 300px;"><label><?php !$pull_zones ? _e('Create pull zone:', 'w3-total-cache') : _e('Create new pull zone:', 'w3-total-cache')?></label></th>
22
+ <td>
23
+ <button id="netdna-maxcdn-create-pull-zone" <?php $this->sealing_disabled('cdn') ?> class="button-primary {type: 'netdna', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}"><?php !$pull_zones ? _e('Create pull zone', 'w3-total-cache') : _e('Create new pull zone', 'w3-total-cache')?></button>
24
+ <br />
25
+ <span class="description"><?php _e('Click the Create Pull Zone button above and create a pull zone manually for this site.', 'w3-total-cache')?></span>
26
+ </td>
27
+ </tr>
28
+ <?php elseif(!$authorized): ?>
29
+ <tr>
30
+ <th style="width: 300px;"><label><?php _e('Specify account credentials:', 'w3-total-cache')?></label></th>
31
+ <td>
32
+ <a id="cdn_netdna_oauth" class="button-primary" href="<?php echo wp_nonce_url(w3_admin_url('admin.php?page=w3tc_dashboard&w3tc_cdn_netdna_authorize'), 'w3tc')?>" target="_blank"><?php _e('Authorize', 'w3-total-cache')?></a>
33
+ <br />
34
+ <span class="description"><?php _e('Click the Authorize button above, log in, paste the key below and save settings.', 'w3-total-cache')?></span>
35
+ </td>
36
+ </tr>
37
+ <?php endif ?>
38
+ <tr>
39
+ <th style="width: 300px;"><label for="cdn_netdna_authorization_key"><?php _e('Authorization key', 'w3-total-cache')?>:</label></th>
40
+ <td id="authorization_area">
41
+ <input id="cdn_netdna_authorization_key" class="w3tc-ignore-change" type="text"
42
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.netdna.authorization_key" value="<?php echo esc_attr($this->_config->get_string('cdn.netdna.authorization_key')); ?>" size="60" onblur="w3tc_validate_cdn_key_result('netdna','<?php echo wp_create_nonce('w3tc'); ?>')" />
43
+ <input id="validate_cdn_key" type="button" class="button {type: 'netdna', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" value="<?php _e('Validate', 'w3-total-cache') ?>" /><span id="validate_cdn_key_result" style="margin-left:15px;padding:3px 8px 3px 8px;"></span>
44
+ <br /><span class="description"><?php _e('Consists of alias+key+secret . Example: bluewidgets+asd897asd98a7sd+798a7sd9 . If you use "Authorize" its already formatted correctly.', 'w3-total-cache')?></span>
45
+ </td>
46
+ </tr>
47
+ <tr id="create_zone_area" style="<?php echo $authorized && (!$have_zone || is_null($zone_info)) ? '' : 'display: none' ?>">
48
+ <th><?php _e('Create zone:', 'w3-total-cache') ?></th>
49
+ <td><input type="button" class="button" onclick="w3tc_create_zone('netdna','<?php echo wp_create_nonce('w3tc'); ?>')" value="<?php _e('Create Default Zone', 'w3-total-cache') ?>" id="create_default_zone" />
50
+ <span id="create_pull_zone_result" style="padding:3px 0 3px 20px;"></span>
51
+ <br /><span class="description"><?php _e('You have no zone connected with this site. Click button to create a default zone automatically.', 'w3-total-cache') ?></span>
52
+ </td>
53
+ </tr>
54
+ <tr id="select_pull_zone" style="<?php echo !($authorized && $pull_zones) ? 'display:none' : '' ?>">
55
+ <th><label for="cdn_netdna_zone_id"><?php _e('Select pull zone:', 'w3-total-cache')?></label></th>
56
+ <td>
57
+ <select id="cdn_netdna_zone_id" name="cdn.netdna.zone_id" <?php $this->sealing_disabled('cdn') ?>>
58
+ <?php foreach($pull_zones as $zone):?>
59
+ <option value="<?php echo $zone['id'] ?>" <?php selected($zone['id'], $this->_config->get_integer('cdn.netdna.zone_id'))?>><?php echo $zone['name']?></option>
60
+ <?php endforeach; ?>
61
+ </select> <input id="use_poll_zone" type="button" class="button {type: 'netdna', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" value="<?php _e('Use Zone', 'w3-total-cache') ?>" /><span id="use_pull_zone_result" style="margin-left:15px;padding:3px 8px 3px 8px;"></span>
62
+ <br />
63
+ <span class="description"><?php _e('Select the pull zone to use with this site.', 'w3-total-cache')?></span>
64
+ </td>
65
+ </tr>
66
+
67
+ <tr>
68
+ <th><label for="cdn_netdna_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support', 'w3-total-cache')?>:</label></th>
69
+ <td>
70
+ <select id="cdn_netdna_ssl" name="cdn.netdna.ssl" <?php $this->sealing_disabled('cdn') ?>>
71
+ <option value="auto"<?php selected($this->_config->get_string('cdn.netdna.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache')?></option>
72
+ <option value="enabled"<?php selected($this->_config->get_string('cdn.netdna.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache')?></option>
73
+ <option value="disabled"<?php selected($this->_config->get_string('cdn.netdna.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache')?></option>
74
+ </select>
75
+ <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache')?></span>
76
+ </td>
77
+ </tr>
78
+ <tr>
79
+ <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache')?></th>
80
+ <td>
81
+ <?php $cnames = $this->_config->get_array('cdn.netdna.domain'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
82
+ <br /><span class="description"><?php _e('Enter the hostname provided by your <acronym>CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache')?></span>
83
+ </td>
84
+ </tr>
85
+ <tr>
86
+ <th colspan="2">
87
+ <input id="cdn_test" class="button {type: 'netdna', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test NetDNA', 'w3-total-cache')?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
88
+ </th>
89
+ </tr>
inc/options/cdn/rscf.php CHANGED
@@ -1,57 +1,57 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <tr>
3
- <th style="width: 300px;"><label for="cdn_rscf_user"><?php _e('Username:', 'w3-total-cache'); ?></label></th>
4
- <td>
5
- <input id="cdn_rscf_user" class="w3tc-ignore-change" type="text"
6
- <?php $this->sealing_disabled('cdn') ?> name="cdn.rscf.user" value="<?php echo esc_attr($this->_config->get_string('cdn.rscf.user')); ?>" size="30" />
7
- </td>
8
- </tr>
9
- <tr>
10
- <th><label for="cdn_rscf_key"><?php _e('<acronym title="Application Programming Interface">API</acronym> key:', 'w3-total-cache'); ?></label></th>
11
- <td>
12
- <input id="cdn_rscf_key" class="w3tc-ignore-change" type="password"
13
- <?php $this->sealing_disabled('cdn') ?> name="cdn.rscf.key" value="<?php echo esc_attr($this->_config->get_string('cdn.rscf.key')); ?>" size="60" />
14
- </td>
15
- </tr>
16
- <tr>
17
- <th><label for="cdn_rscf_location"><?php _e('Location:', 'w3-total-cache'); ?></label></th>
18
- <td>
19
- <select id="cdn_rscf_location" name="cdn.rscf.location" <?php $this->sealing_disabled('cdn') ?>>
20
- <option value="us"<?php echo selected($this->_config->get_string('cdn.rscf.location'), 'us'); ?>>US</option>
21
- <option value="uk"<?php echo selected($this->_config->get_string('cdn.rscf.location'), 'uk'); ?>>UK</option>
22
- </select>
23
- </td>
24
- </tr>
25
- <tr>
26
- <th><label for="cdn_rscf_container"><?php _e('Container:', 'w3-total-cache'); ?></label></th>
27
- <td>
28
- <input id="cdn_rscf_container" type="text" name="cdn.rscf.container"
29
- <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($this->_config->get_string('cdn.rscf.container')); ?>" size="30" />
30
- <input id="cdn_create_container"
31
- <?php $this->sealing_disabled('cdn') ?> class="button {type: 'rscf', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Create container', 'w3-total-cache'); ?>" />
32
- <span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
33
- </td>
34
- </tr>
35
- <tr>
36
- <th><label for="cdn_rscf_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
37
- <td>
38
- <select id="cdn_rscf_ssl" name="cdn.rscf.ssl" <?php $this->sealing_disabled('cdn') ?>>
39
- <option value="auto"<?php selected($this->_config->get_string('cdn.rscf.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
40
- <option value="enabled"<?php selected($this->_config->get_string('cdn.rscf.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
41
- <option value="disabled"<?php selected($this->_config->get_string('cdn.rscf.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
42
- </select>
43
- <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
44
- </td>
45
- </tr>
46
- <tr>
47
- <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
48
- <td>
49
- <?php $cnames = $this->_config->get_array('cdn.rscf.cname'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
50
- <br /><span class="description"><?php _e('Enter the hostname provided by Rackspace Cloud Files, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache'); ?></span>
51
- </td>
52
- </tr>
53
- <tr>
54
- <th colspan="2">
55
- <input id="cdn_test" class="button {type: 'rscf', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test Cloud Files upload', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
56
- </th>
57
- </tr>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <tr>
3
+ <th style="width: 300px;"><label for="cdn_rscf_user"><?php _e('Username:', 'w3-total-cache'); ?></label></th>
4
+ <td>
5
+ <input id="cdn_rscf_user" class="w3tc-ignore-change" type="text"
6
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.rscf.user" value="<?php echo esc_attr($this->_config->get_string('cdn.rscf.user')); ?>" size="30" />
7
+ </td>
8
+ </tr>
9
+ <tr>
10
+ <th><label for="cdn_rscf_key"><?php _e('<acronym title="Application Programming Interface">API</acronym> key:', 'w3-total-cache'); ?></label></th>
11
+ <td>
12
+ <input id="cdn_rscf_key" class="w3tc-ignore-change" type="password"
13
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.rscf.key" value="<?php echo esc_attr($this->_config->get_string('cdn.rscf.key')); ?>" size="60" />
14
+ </td>
15
+ </tr>
16
+ <tr>
17
+ <th><label for="cdn_rscf_location"><?php _e('Location:', 'w3-total-cache'); ?></label></th>
18
+ <td>
19
+ <select id="cdn_rscf_location" name="cdn.rscf.location" <?php $this->sealing_disabled('cdn') ?>>
20
+ <option value="us"<?php echo selected($this->_config->get_string('cdn.rscf.location'), 'us'); ?>>US</option>
21
+ <option value="uk"<?php echo selected($this->_config->get_string('cdn.rscf.location'), 'uk'); ?>>UK</option>
22
+ </select>
23
+ </td>
24
+ </tr>
25
+ <tr>
26
+ <th><label for="cdn_rscf_container"><?php _e('Container:', 'w3-total-cache'); ?></label></th>
27
+ <td>
28
+ <input id="cdn_rscf_container" type="text" name="cdn.rscf.container"
29
+ <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($this->_config->get_string('cdn.rscf.container')); ?>" size="30" />
30
+ <input id="cdn_create_container"
31
+ <?php $this->sealing_disabled('cdn') ?> class="button {type: 'rscf', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Create container', 'w3-total-cache'); ?>" />
32
+ <span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
33
+ </td>
34
+ </tr>
35
+ <tr>
36
+ <th><label for="cdn_rscf_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
37
+ <td>
38
+ <select id="cdn_rscf_ssl" name="cdn.rscf.ssl" <?php $this->sealing_disabled('cdn') ?>>
39
+ <option value="auto"<?php selected($this->_config->get_string('cdn.rscf.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
40
+ <option value="enabled"<?php selected($this->_config->get_string('cdn.rscf.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
41
+ <option value="disabled"<?php selected($this->_config->get_string('cdn.rscf.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
42
+ </select>
43
+ <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
44
+ </td>
45
+ </tr>
46
+ <tr>
47
+ <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
48
+ <td>
49
+ <?php $cnames = $this->_config->get_array('cdn.rscf.cname'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
50
+ <br /><span class="description"><?php _e('Enter the hostname provided by Rackspace Cloud Files, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache'); ?></span>
51
+ </td>
52
+ </tr>
53
+ <tr>
54
+ <th colspan="2">
55
+ <input id="cdn_test" class="button {type: 'rscf', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test Cloud Files upload', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
56
+ </th>
57
+ </tr>
inc/options/cdn/s3.php CHANGED
@@ -1,56 +1,56 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <tr>
3
- <th colspan="2">
4
- <span class="description"><?php _e('We recommend that you use <a href="http://docs.amazonwebservices.com/IAM/latest/UserGuide/AccessPolicyLanguage_KeyConcepts.html" target="_blank"><acronym title="AWS Identity and Access Management">IAM</acronym></a> to create a new policy for <acronym title="Amazon Web Services">AWS</acronym> services that have limited permissions. A helpful tool: <a href="http://awspolicygen.s3.amazonaws.com/policygen.html" target="_blank"><acronym title="Amazon Web Services">AWS</acronym> Policy Generator</a>', 'w3-total-cache'); ?></span>
5
- </th>
6
- </tr>
7
- <tr>
8
- <th style="width: 300px;"><label for="cdn_s3_key"><?php _e('Access key ID:', 'w3-total-cache'); ?></label></th>
9
- <td>
10
- <input id="cdn_s3_key" class="w3tc-ignore-change" type="text"
11
- <?php $this->sealing_disabled('cdn') ?> name="cdn.s3.key" value="<?php echo esc_attr($this->_config->get_string('cdn.s3.key')); ?>" size="30" />
12
- </td>
13
- </tr>
14
- <tr>
15
- <th><label for="cdn_s3_secret"><?php _e('Secret key:', 'w3-total-cache'); ?></label></th>
16
- <td>
17
- <input id="cdn_s3_secret" class="w3tc-ignore-change"
18
- <?php $this->sealing_disabled('cdn') ?> type="password" name="cdn.s3.secret" value="<?php echo esc_attr($this->_config->get_string('cdn.s3.secret')); ?>" size="60" />
19
- </td>
20
- </tr>
21
- <tr>
22
- <th><label for="cdn_s3_bucket"><?php _e('Bucket:', 'w3-total-cache'); ?></label></th>
23
- <td>
24
- <input id="cdn_s3_bucket" type="text" name="cdn.s3.bucket"
25
- <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($this->_config->get_string('cdn.s3.bucket')); ?>" size="30" />
26
- <input class="button button-cdn-s3-bucket-location cdn_s3 {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Create bucket', 'w3-total-cache'); ?>" />
27
- </td>
28
- </tr>
29
- <tr>
30
- <th><label for="cdn_s3_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
31
- <td>
32
- <select id="cdn_s3_ssl" name="cdn.s3.ssl" <?php $this->sealing_disabled('cdn') ?>>
33
- <option value="auto"<?php selected($this->_config->get_string('cdn.s3.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
34
- <option value="enabled"<?php selected($this->_config->get_string('cdn.s3.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
35
- <option value="disabled"<?php selected($this->_config->get_string('cdn.s3.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
36
- </select>
37
- <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
38
- </td>
39
- </tr>
40
- <tr>
41
- <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
42
- <td>
43
- <?php if (($cdn_s3_bucket = $this->_config->get_string('cdn.s3.bucket')) != ''): ?>
44
- <?php echo htmlspecialchars($cdn_s3_bucket); ?>.s3.amazonaws.com
45
- <?php else: ?>
46
- &lt;bucket&gt;.s3.amazonaws.com
47
- <?php endif; ?> <?php _e('or CNAME:', 'w3-total-cache'); ?>
48
- <?php $cnames = $this->_config->get_array('cdn.s3.cname'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
49
- <br /><span class="description"><?php _e('If you have already added a <a href="http://docs.amazonwebservices.com/AmazonS3/latest/DeveloperGuide/VirtualHosting.html#VirtualHostingCustomURLs" target="_blank">CNAME</a> to your <acronym title="Domain Name System">DNS</acronym> Zone, enter it here.', 'w3-total-cache'); ?></span>
50
- </td>
51
- </tr>
52
- <tr>
53
- <th colspan="2">
54
- <input id="cdn_test" class="button {type: 's3', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test S3 upload', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
55
- </th>
56
- </tr>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <tr>
3
+ <th colspan="2">
4
+ <span class="description"><?php _e('We recommend that you use <a href="http://docs.amazonwebservices.com/IAM/latest/UserGuide/AccessPolicyLanguage_KeyConcepts.html" target="_blank"><acronym title="AWS Identity and Access Management">IAM</acronym></a> to create a new policy for <acronym title="Amazon Web Services">AWS</acronym> services that have limited permissions. A helpful tool: <a href="http://awspolicygen.s3.amazonaws.com/policygen.html" target="_blank"><acronym title="Amazon Web Services">AWS</acronym> Policy Generator</a>', 'w3-total-cache'); ?></span>
5
+ </th>
6
+ </tr>
7
+ <tr>
8
+ <th style="width: 300px;"><label for="cdn_s3_key"><?php _e('Access key ID:', 'w3-total-cache'); ?></label></th>
9
+ <td>
10
+ <input id="cdn_s3_key" class="w3tc-ignore-change" type="text"
11
+ <?php $this->sealing_disabled('cdn') ?> name="cdn.s3.key" value="<?php echo esc_attr($this->_config->get_string('cdn.s3.key')); ?>" size="30" />
12
+ </td>
13
+ </tr>
14
+ <tr>
15
+ <th><label for="cdn_s3_secret"><?php _e('Secret key:', 'w3-total-cache'); ?></label></th>
16
+ <td>
17
+ <input id="cdn_s3_secret" class="w3tc-ignore-change"
18
+ <?php $this->sealing_disabled('cdn') ?> type="password" name="cdn.s3.secret" value="<?php echo esc_attr($this->_config->get_string('cdn.s3.secret')); ?>" size="60" />
19
+ </td>
20
+ </tr>
21
+ <tr>
22
+ <th><label for="cdn_s3_bucket"><?php _e('Bucket:', 'w3-total-cache'); ?></label></th>
23
+ <td>
24
+ <input id="cdn_s3_bucket" type="text" name="cdn.s3.bucket"
25
+ <?php $this->sealing_disabled('cdn') ?> value="<?php echo esc_attr($this->_config->get_string('cdn.s3.bucket')); ?>" size="30" />
26
+ <input class="button button-cdn-s3-bucket-location cdn_s3 {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Create bucket', 'w3-total-cache'); ?>" />
27
+ </td>
28
+ </tr>
29
+ <tr>
30
+ <th><label for="cdn_s3_ssl"><?php _e('<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache'); ?></label></th>
31
+ <td>
32
+ <select id="cdn_s3_ssl" name="cdn.s3.ssl" <?php $this->sealing_disabled('cdn') ?>>
33
+ <option value="auto"<?php selected($this->_config->get_string('cdn.s3.ssl'), 'auto'); ?>><?php _e('Auto (determine connection type automatically)', 'w3-total-cache'); ?></option>
34
+ <option value="enabled"<?php selected($this->_config->get_string('cdn.s3.ssl'), 'enabled'); ?>><?php _e('Enabled (always use SSL)', 'w3-total-cache'); ?></option>
35
+ <option value="disabled"<?php selected($this->_config->get_string('cdn.s3.ssl'), 'disabled'); ?>><?php _e('Disabled (always use HTTP)', 'w3-total-cache'); ?></option>
36
+ </select>
37
+ <br /><span class="description"><?php _e('Some <acronym>CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache'); ?></span>
38
+ </td>
39
+ </tr>
40
+ <tr>
41
+ <th><?php _e('Replace site\'s hostname with:', 'w3-total-cache'); ?></th>
42
+ <td>
43
+ <?php if (($cdn_s3_bucket = $this->_config->get_string('cdn.s3.bucket')) != ''): ?>
44
+ <?php echo htmlspecialchars($cdn_s3_bucket); ?>.s3.amazonaws.com
45
+ <?php else: ?>
46
+ &lt;bucket&gt;.s3.amazonaws.com
47
+ <?php endif; ?> <?php _e('or CNAME:', 'w3-total-cache'); ?>
48
+ <?php $cnames = $this->_config->get_array('cdn.s3.cname'); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
49
+ <br /><span class="description"><?php _e('If you have already added a <a href="http://docs.amazonwebservices.com/AmazonS3/latest/DeveloperGuide/VirtualHosting.html#VirtualHostingCustomURLs" target="_blank">CNAME</a> to your <acronym title="Domain Name System">DNS</acronym> Zone, enter it here.', 'w3-total-cache'); ?></span>
50
+ </td>
51
+ </tr>
52
+ <tr>
53
+ <th colspan="2">
54
+ <input id="cdn_test" class="button {type: 's3', nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" type="button" value="<?php _e('Test S3 upload', 'w3-total-cache'); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
55
+ </th>
56
+ </tr>
inc/options/common/footer.php CHANGED
@@ -1 +1 @@
1
- </div>
1
+ </div>
inc/options/common/header.php CHANGED
@@ -1,221 +1,224 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
-
3
- <?php
4
- $licensing_visible = ((!w3_is_multisite() || is_network_admin()) &&
5
- !ini_get('w3tc.license_key') &&
6
- get_transient('w3tc_license_status') != 'host_valid');
7
- ?>
8
-
9
- <?php if ($this->_support_reminder): ?>
10
- <script type="text/javascript">/*<![CDATA[*/
11
- jQuery(function() {
12
- w3tc_lightbox_support_us('<?php echo wp_create_nonce('w3tc'); ?>');
13
- });
14
- /*]]>*/</script>
15
- <?php endif; ?>
16
- <div class="wrap" id="w3tc">
17
- <h2 class="logo"><?php _e('W3 Total Cache <span>by W3 EDGE <sup>&reg;</sup></span>', 'w3-total-cache'); ?></h2>
18
- <?php if (!(w3_is_pro($this->_config) || w3_is_enterprise($this->_config))): ?>
19
- <?php include W3TC_INC_OPTIONS_DIR . '/edd/buy.php' ?>
20
- <?php endif ?>
21
- <?php foreach ($this->_errors as $error): ?>
22
- <div class="error">
23
- <p><?php echo $error; ?></p>
24
- </div>
25
- <?php endforeach; ?>
26
-
27
- <?php if (!$this->_disable_cache_write_notification && $this->_rule_errors_autoinstall != ''): ?>
28
- <div class="error">
29
- <p>
30
- <?php _e('The following configuration changes are needed to ensure optimal performance:', 'w3-total-cache'); ?><br />
31
- </p>
32
- <ul style="padding-left: 20px">
33
- <?php foreach ($this->_rule_errors as $error): ?>
34
- <li><?php echo $error[0]; ?></li>
35
- <?php endforeach; ?>
36
- </ul>
37
-
38
- <p>
39
- <?php _e('If permission allow this can be done automatically, by clicking here:', 'w3-total-cache'); ?>
40
- <?php echo $this->_rule_errors_autoinstall ?>.
41
- <?php echo $this->_rule_errors_hide ?>
42
- </p>
43
- </div>
44
- <?php endif; ?>
45
-
46
- <?php if (!$this->_disable_file_operation_notification && $this->_rule_errors_root): ?>
47
- <div class="error">
48
- <p>
49
- <?php _e('The following configuration changes are needed to ensure optimal performance:', 'w3-total-cache'); ?><br />
50
- </p>
51
- <ul style="padding-left: 20px">
52
- <?php foreach ($this->_rule_errors_root as $error): ?>
53
- <li><?php echo $error; ?></li>
54
- <?php endforeach; ?>
55
- </ul>
56
-
57
- <?php if (isset($this->_ftp_form) && ($this->_use_ftp_form || $this->_rule_errors_root)): ?>
58
- <p>
59
- <?php _e('If permission allow this can be done using the <a href="#ftp_upload_form">FTP form</a> below.', 'w3-total-cache'); ?> <?php echo $this->_rule_errors_root_hide; ?>
60
- </p>
61
- <?php endif ?>
62
- </div>
63
- <?php endif ?>
64
-
65
- <?php if (isset($this->_ftp_form) && ($this->_use_ftp_form || $this->_rule_errors_root)): ?>
66
- <div id="ftp_upload_form">
67
- <?php echo $this->_ftp_form ?>
68
- </div>
69
- <?php endif; ?>
70
-
71
- <?php foreach ($this->_notes as $note): ?>
72
- <div class="updated fade">
73
- <p><?php echo $note; ?></p>
74
- </div>
75
- <?php endforeach; ?>
76
-
77
- <?php if (!$this->_config_admin->get_boolean('common.visible_by_master_only') || (is_super_admin() &&
78
- (!w3_force_master() || is_network_admin()))): ?>
79
-
80
- <?php
81
- switch ($this->_page){
82
- case 'w3tc_general':
83
- ?>
84
- <p id="w3tc-options-menu">
85
- <?php _e('Jump to: ', 'w3-total-cache'); ?>
86
- <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
87
- <a href="#general"><?php _e('General', 'w3-total-cache'); ?></a> |
88
- <a href="#page_cache"><?php _e('Page Cache', 'w3-total-cache'); ?></a> |
89
- <a href="#minify">Minify</a> |
90
- <a href="#database_cache"><?php _e('Database Cache', 'w3-total-cache'); ?></a> |
91
- <a href="#object_cache"><?php _e('Object Cache', 'w3-total-cache'); ?></a> |
92
- <?php if (w3_is_pro($this->_config) || w3_is_enterprise($this->_config)): ?>
93
- <a href="#fragment_cache"><?php _e('Fragment Cache', 'w3-total-cache'); ?></a> |
94
- <?php endif; ?>
95
- <a href="#browser_cache"><?php _e('Browser Cache', 'w3-total-cache'); ?></a> |
96
- <a href="#cdn"><?php _e('<acronym title="Content Delivery Network">CDN</acronym>', 'w3-total-cache'); ?></a> |
97
- <a href="#varnish"><?php _e('Varnish', 'w3-total-cache'); ?></a> |
98
- <?php if (w3_is_enterprise()): ?>
99
- <a href="#amazon_sns"><?php _e('Amazon <acronym title="Simple Notification Service">SNS</acronym>', 'w3-total-cache'); ?></a> |
100
- <?php endif; ?>
101
- <a href="#cloudflare"><?php _e('Cloudflare', 'w3-total-cache'); ?></a> |
102
- <a href="#monitoring"><?php _e('Monitoring', 'w3-total-cache'); ?></a> |
103
- <?php if ($licensing_visible): ?>
104
- <a href="#licensing"><?php _e('Licensing', 'w3-total-cache'); ?></a> |
105
- <?php endif; ?>
106
- <a href="#miscellaneous"><?php _e('Miscellaneous', 'w3-total-cache'); ?></a> |
107
- <a href="#debug"><?php _e('Debug', 'w3-total-cache'); ?></a> |
108
- <a href="#settings"><?php _e('Import / Export Settings', 'w3-total-cache'); ?></a>
109
- </p>
110
- <?php
111
- break;
112
- ?>
113
- <?php
114
- case 'w3tc_pgcache':
115
- ?>
116
- <p id="w3tc-options-menu">
117
- Jump to:
118
- <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
119
- <a href="#general"><?php _e('General', 'w3-total-cache'); ?></a> |
120
- <a href="#advanced"><?php _e('Advanced', 'w3-total-cache'); ?></a> |
121
- <a href="#cache_preload"><?php _e('Cache Preload', 'w3-total-cache'); ?></a> |
122
- <a href="#purge_policy"><?php _e('Purge Policy', 'w3-total-cache'); ?></a> |
123
- <a href="#notes"><?php _e('Note(s)', 'w3-total-cache'); ?></a>
124
- </p>
125
- <?php
126
- break;
127
- ?>
128
- <?php
129
- case 'w3tc_minify':
130
- ?>
131
- <p id="w3tc-options-menu">
132
- <?php _e('Jump to: ', 'w3-total-cache'); ?>
133
- <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
134
- <a href="#general"><?php _e('General', 'w3-total-cache'); ?></a> |
135
- <a href="#html_xml"><?php _e('<acronym title="Hypertext Markup Language">HTML</acronym> &amp; <acronym title="eXtensible Markup Language">XML</acronym>', 'w3-total-cache'); ?></a> |
136
- <a href="#js"><?php _e('<acronym title="JavaScript">JS</acronym>', 'w3-total-cache'); ?></a> |
137
- <a href="#css"><?php _e('<acronym title="Cascading Style Sheet">CSS</acronym>', 'w3-total-cache'); ?></a> |
138
- <a href="#advanced"><?php _e('Advanced', 'w3-total-cache'); ?></a> |
139
- <a href="#notes"><?php _e('Note(s)', 'w3-total-cache'); ?></a>
140
- </p>
141
- <?php
142
- break;
143
- ?>
144
- <?php
145
- case 'w3tc_dbcache':
146
- ?>
147
- <p id="w3tc-options-menu">
148
- <?php _e('Jump to: ', 'w3-total-cache'); ?>
149
- <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
150
- <a href="#general"><?php _e('General', 'w3-total-cache'); ?></a> |
151
- <a href="#advanced"><?php _e('Advanced', 'w3-total-cache'); ?></a>
152
- </p>
153
- <?php
154
- break;
155
- ?>
156
- <?php
157
- case 'w3tc_objectcache':
158
- ?>
159
- <p id="w3tc-options-menu">
160
- <?php _e('Jump to: ', 'w3-total-cache'); ?>
161
- <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
162
- <a href="#advanced"><?php _e('Advanced', 'w3-total-cache'); ?></a>
163
- </p>
164
- <?php
165
- break;
166
- ?>
167
- <?php
168
- case 'w3tc_browsercache':
169
- ?>
170
- <p id="w3tc-options-menu">
171
- <?php _e('Jump to: ', 'w3-total-cache'); ?>
172
- <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
173
- <a href="#general"><?php _e('General', 'w3-total-cache'); ?></a> |
174
- <a href="#css_js"><?php _e('<acronym title="Cascading Style Sheet">CSS</acronym> &amp; <acronym title="JavaScript">JS</acronym>', 'w3-total-cache'); ?></a> |
175
- <a href="#html_xml"><?php _e('<acronym title="Hypertext Markup Language">HTML</acronym> &amp; <acronym title="eXtensible Markup Language">XML</acronym>', 'w3-total-cache'); ?></a> |
176
- <a href="#media"><?php _e('Media', 'w3-total-cache'); ?></a>
177
- </p>
178
- <?php
179
- break;
180
- ?>
181
- <?php
182
- case 'w3tc_mobile':
183
- ?>
184
- <p id="w3tc-options-menu">
185
- <?php _e('Jump to: ', 'w3-total-cache'); ?>
186
- <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
187
- <a href="#manage"><?php _e('Manage User Agent Groups', 'w3-total-cache'); ?></a>
188
- </p>
189
- <?php
190
- break;
191
- ?>
192
- <?php
193
- case 'w3tc_referrer':
194
- ?>
195
- <p id="w3tc-options-menu">
196
- <?php _e('Jump to: ', 'w3-total-cache'); ?>
197
- <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
198
- <a href="#manage"><?php _e('Manage Referrer Groups', 'w3-total-cache'); ?></a>
199
- </p>
200
- <?php
201
- break;
202
- ?>
203
- <?php
204
- case 'w3tc_cdn':
205
- ?>
206
- <p id="w3tc-options-menu">
207
- <?php _e('Jump to:', 'w3-total-cache'); ?>
208
- <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
209
- <a href="#general"><?php _e('General', 'w3-total-cache'); ?></a> |
210
- <a href="#configuration"><?php _e('Configuration', 'w3-total-cache'); ?></a> |
211
- <a href="#advanced"><?php _e('Advanced', 'w3-total-cache'); ?></a> |
212
- <a href="#notes"><?php _e('Note(s)', 'w3-total-cache'); ?></a>
213
- </p>
214
- <?php
215
- break;
216
- ?>
217
-
218
- <?php
219
- }
220
- ?>
221
- <?php endif ?>
 
 
 
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+
3
+ <?php
4
+ /**
5
+ * @var array $custom_areas Filter that sets it is located in GeneralAdminVIew
6
+ */
7
+ $licensing_visible = ((!w3_is_multisite() || is_network_admin()) &&
8
+ !ini_get('w3tc.license_key') &&
9
+ get_transient('w3tc_license_status') != 'host_valid');
10
+ ?>
11
+
12
+ <?php do_action('w3tc-dashboard-head') ?>
13
+ <div class="wrap" id="w3tc">
14
+ <h2 class="logo"><?php _e('W3 Total Cache <span>by W3 EDGE <sup>&reg;</sup></span>', 'w3-total-cache'); ?></h2>
15
+ <?php if (!(w3_is_pro($this->_config) || w3_is_enterprise($this->_config))): ?>
16
+ <?php include W3TC_INC_OPTIONS_DIR . '/edd/buy.php' ?>
17
+ <?php endif ?>
18
+ <?php foreach ($this->_errors as $error): ?>
19
+ <div class="error">
20
+ <p><?php echo $error; ?></p>
21
+ </div>
22
+ <?php endforeach; ?>
23
+
24
+ <?php if (!$this->_disable_cache_write_notification && $this->_rule_errors_autoinstall != ''): ?>
25
+ <div class="error">
26
+ <p>
27
+ <?php _e('The following configuration changes are needed to ensure optimal performance:', 'w3-total-cache'); ?><br />
28
+ </p>
29
+ <ul style="padding-left: 20px">
30
+ <?php foreach ($this->_rule_errors as $error): ?>
31
+ <li><?php echo $error[0]; ?></li>
32
+ <?php endforeach; ?>
33
+ </ul>
34
+
35
+ <p>
36
+ <?php _e('If permission allow this can be done automatically, by clicking here:', 'w3-total-cache'); ?>
37
+ <?php echo $this->_rule_errors_autoinstall ?>.
38
+ <?php echo $this->_rule_errors_hide ?>
39
+ </p>
40
+ </div>
41
+ <?php endif; ?>
42
+
43
+ <?php if (!$this->_disable_file_operation_notification && $this->_rule_errors_root): ?>
44
+ <div class="error">
45
+ <p>
46
+ <?php _e('The following configuration changes are needed to ensure optimal performance:', 'w3-total-cache'); ?><br />
47
+ </p>
48
+ <ul style="padding-left: 20px">
49
+ <?php foreach ($this->_rule_errors_root as $error): ?>
50
+ <li><?php echo $error; ?></li>
51
+ <?php endforeach; ?>
52
+ </ul>
53
+
54
+ <?php if (isset($this->_ftp_form) && ($this->_use_ftp_form || $this->_rule_errors_root)): ?>
55
+ <p>
56
+ <?php _e('If permission allow this can be done using the <a href="#ftp_upload_form">FTP form</a> below.', 'w3-total-cache'); ?> <?php echo $this->_rule_errors_root_hide; ?>
57
+ </p>
58
+ <?php endif ?>
59
+ </div>
60
+ <?php endif ?>
61
+
62
+ <?php if (isset($this->_ftp_form) && ($this->_use_ftp_form || $this->_rule_errors_root)): ?>
63
+ <div id="ftp_upload_form">
64
+ <?php echo $this->_ftp_form ?>
65
+ </div>
66
+ <?php endif; ?>
67
+
68
+ <?php foreach ($this->_notes as $note): ?>
69
+ <div class="updated fade">
70
+ <p><?php echo $note; ?></p>
71
+ </div>
72
+ <?php endforeach; ?>
73
+
74
+ <?php if (!$this->_config_admin->get_boolean('common.visible_by_master_only') || (is_super_admin() &&
75
+ (!w3_force_master() || is_network_admin()))): ?>
76
+
77
+ <?php
78
+ switch ($this->_page){
79
+ case 'w3tc_general':
80
+ $anchors = array(
81
+ array('id' => 'general', 'text' => __('General', 'w3-total-cache')),
82
+ array('id' => 'page_cache', 'text' => __('Page Cache', 'w3-total-cache')),
83
+ array('id' => 'minify', 'text' => 'Minify'),
84
+ array('id' => 'database_cache', 'text' => __('Database Cache', 'w3-total-cache')),
85
+ array('id' => 'object_cache', 'text' => __('Object Cache', 'w3-total-cache')));
86
+ if (w3_is_pro($this->_config) || w3_is_enterprise($this->_config))
87
+ $anchors[] = array('id' => 'fragment_cache', 'text' => __('Fragment Cache', 'w3-total-cache'));
88
+
89
+ $anchors = array_merge($anchors, array(
90
+ array('id' => 'browser_cache', 'text' => __('Browser Cache', 'w3-total-cache')),
91
+ array('id' => 'cdn', 'text' => __('<abbr title="Content Delivery Network">CDN</abbr>', 'w3-total-cache')),
92
+ array('id' => 'varnish', 'text' => __('Varnish', 'w3-total-cache'))));
93
+ if (w3_is_enterprise())
94
+ $anchors[] = array('id' => 'amazon_sns', 'text' => __('Amazon <abbr title="Simple Notification Service">SNS</abbr>', 'w3-total-cache'));
95
+ $anchors[] = array('id' => 'monitoring', 'text' => __('Monitoring', 'w3-total-cache'));
96
+ if ($licensing_visible)
97
+ array('id' => 'licensing', 'text' => __('Licensing', 'w3-total-cache'));
98
+ $link_attrs = array_merge($anchors, $custom_areas, array(
99
+ array('id' => 'miscellaneous', 'text' => __('Miscellaneous', 'w3-total-cache')),
100
+ array('id' => 'debug', 'text' => __('Debug', 'w3-total-cache')),
101
+ array('id' => 'settings', 'text' => __('Import / Export Settings', 'w3-total-cache'))
102
+ ));
103
+
104
+ $links = array();
105
+ foreach($link_attrs as $link) {
106
+ $links[] = "<a href=\"#{$link['id']}\">{$link['text']}</a>";
107
+ }
108
+
109
+ ?>
110
+ <p id="w3tc-options-menu">
111
+ <?php echo implode(' | ', $links); ?>
112
+ </p>
113
+ <?php
114
+ break;
115
+ ?>
116
+ <?php
117
+ case 'w3tc_pgcache':
118
+ ?>
119
+ <p id="w3tc-options-menu">
120
+ Jump to:
121
+ <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
122
+ <a href="#general"><?php _e('General', 'w3-total-cache'); ?></a> |
123
+ <a href="#advanced"><?php _e('Advanced', 'w3-total-cache'); ?></a> |
124
+ <a href="#cache_preload"><?php _e('Cache Preload', 'w3-total-cache'); ?></a> |
125
+ <a href="#purge_policy"><?php _e('Purge Policy', 'w3-total-cache'); ?></a> |
126
+ <a href="#notes"><?php _e('Note(s)', 'w3-total-cache'); ?></a>
127
+ </p>
128
+ <?php
129
+ break;
130
+ ?>
131
+ <?php
132
+ case 'w3tc_minify':
133
+ ?>
134
+ <p id="w3tc-options-menu">
135
+ <?php _e('Jump to: ', 'w3-total-cache'); ?>
136
+ <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
137
+ <a href="#general"><?php _e('General', 'w3-total-cache'); ?></a> |
138
+ <a href="#html_xml"><?php _e('<acronym title="Hypertext Markup Language">HTML</acronym> &amp; <acronym title="eXtensible Markup Language">XML</acronym>', 'w3-total-cache'); ?></a> |
139
+ <a href="#js"><?php _e('<acronym title="JavaScript">JS</acronym>', 'w3-total-cache'); ?></a> |
140
+ <a href="#css"><?php _e('<acronym title="Cascading Style Sheet">CSS</acronym>', 'w3-total-cache'); ?></a> |
141
+ <a href="#advanced"><?php _e('Advanced', 'w3-total-cache'); ?></a> |
142
+ <a href="#notes"><?php _e('Note(s)', 'w3-total-cache'); ?></a>
143
+ </p>
144
+ <?php
145
+ break;
146
+ ?>
147
+ <?php
148
+ case 'w3tc_dbcache':
149
+ ?>
150
+ <p id="w3tc-options-menu">
151
+ <?php _e('Jump to: ', 'w3-total-cache'); ?>
152
+ <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
153
+ <a href="#general"><?php _e('General', 'w3-total-cache'); ?></a> |
154
+ <a href="#advanced"><?php _e('Advanced', 'w3-total-cache'); ?></a>
155
+ </p>
156
+ <?php
157
+ break;
158
+ ?>
159
+ <?php
160
+ case 'w3tc_objectcache':
161
+ ?>
162
+ <p id="w3tc-options-menu">
163
+ <?php _e('Jump to: ', 'w3-total-cache'); ?>
164
+ <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
165
+ <a href="#advanced"><?php _e('Advanced', 'w3-total-cache'); ?></a>
166
+ </p>
167
+ <?php
168
+ break;
169
+ ?>
170
+ <?php
171
+ case 'w3tc_browsercache':
172
+ ?>
173
+ <p id="w3tc-options-menu">
174
+ <?php _e('Jump to: ', 'w3-total-cache'); ?>
175
+ <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
176
+ <a href="#general"><?php _e('General', 'w3-total-cache'); ?></a> |
177
+ <a href="#css_js"><?php _e('<acronym title="Cascading Style Sheet">CSS</acronym> &amp; <acronym title="JavaScript">JS</acronym>', 'w3-total-cache'); ?></a> |
178
+ <a href="#html_xml"><?php _e('<acronym title="Hypertext Markup Language">HTML</acronym> &amp; <acronym title="eXtensible Markup Language">XML</acronym>', 'w3-total-cache'); ?></a> |
179
+ <a href="#media"><?php _e('Media', 'w3-total-cache'); ?></a>
180
+ </p>
181
+ <?php
182
+ break;
183
+ ?>
184
+ <?php
185
+ case 'w3tc_mobile':
186
+ ?>
187
+ <p id="w3tc-options-menu">
188
+ <?php _e('Jump to: ', 'w3-total-cache'); ?>
189
+ <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
190
+ <a href="#manage"><?php _e('Manage User Agent Groups', 'w3-total-cache'); ?></a>
191
+ </p>
192
+ <?php
193
+ break;
194
+ ?>
195
+ <?php
196
+ case 'w3tc_referrer':
197
+ ?>
198
+ <p id="w3tc-options-menu">
199
+ <?php _e('Jump to: ', 'w3-total-cache'); ?>
200
+ <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
201
+ <a href="#manage"><?php _e('Manage Referrer Groups', 'w3-total-cache'); ?></a>
202
+ </p>
203
+ <?php
204
+ break;
205
+ ?>
206
+ <?php
207
+ case 'w3tc_cdn':
208
+ ?>
209
+ <p id="w3tc-options-menu">
210
+ <?php _e('Jump to:', 'w3-total-cache'); ?>
211
+ <a href="#toplevel_page_w3tc_general"><?php _e('Main Menu', 'w3-total-cache'); ?></a> |
212
+ <a href="#general"><?php _e('General', 'w3-total-cache'); ?></a> |
213
+ <a href="#configuration"><?php _e('Configuration', 'w3-total-cache'); ?></a> |
214
+ <a href="#advanced"><?php _e('Advanced', 'w3-total-cache'); ?></a> |
215
+ <a href="#notes"><?php _e('Note(s)', 'w3-total-cache'); ?></a>
216
+ </p>
217
+ <?php
218
+ break;
219
+ ?>
220
+
221
+ <?php
222
+ }
223
+ ?>
224
+ <?php endif ?>
inc/options/common/help.php CHANGED
@@ -1,16 +1,24 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <div id="w3tc-help">
3
- <p><?php _e('Request professional <a href="admin.php?page=w3tc_support" style="color: red;"><strong>support</strong></a> or troubleshoot issues using the common questions below:', 'w3-total-cache'); ?></p>
4
-
5
- <?php foreach ($columns as $entries): ?>
6
- <ul>
7
- <?php foreach ($entries as $entry): ?>
8
- <li>
9
- <a href="admin.php?page=w3tc_faq#q<?php echo $entry['index']; ?>"><?php echo $entry['question']; ?></a>
10
- </li>
11
- <?php endforeach; ?>
12
- </ul>
13
- <?php endforeach; ?>
14
-
15
- <div style="clear: left;"></div>
16
- </div>
 
 
 
 
 
 
 
 
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <div id="w3tc-help">
3
+ <p><?php _e('Request professional <a href="admin.php?page=w3tc_support" style="color: red;"><strong>support</strong></a> or troubleshoot issues using the common questions below:', 'w3-total-cache'); ?></p>
4
+
5
+ <?php foreach ($columns as $entries): ?>
6
+ <ul>
7
+ <?php foreach ($entries as $entry): ?>
8
+ <?php if(is_array($entry)): ?>
9
+ <?php foreach ($entry as $entry2): ?>
10
+ <li>
11
+ <a href="admin.php?page=w3tc_faq#q<?php echo $entry2['index']; ?>"><?php echo $entry2['question']; ?></a>
12
+ </li>
13
+ <?php endforeach; ?>
14
+ <?php else: ?>
15
+ <li>
16
+ <a href="admin.php?page=w3tc_faq#q<?php echo $entry['index']; ?>"><?php echo $entry['question']; ?></a>
17
+ </li>
18
+ <?php endif ?>
19
+ <?php endforeach; ?>
20
+ </ul>
21
+ <?php endforeach; ?>
22
+
23
+ <div style="clear: left;"></div>
24
+ </div>
inc/options/dashboard.php CHANGED
@@ -2,10 +2,10 @@
2
  <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
3
 
4
  <p>
5
- <?php echo sprintf(__('The plugin is currently <span class="w3tc-%s">%s</span> in <strong>%s</strong> mode.', 'w3-total-cache')
6
  , $enabled ? "enabled" : "disabled"
7
  , $enabled ? __('enabled', 'w3-total-cache') : __('disabled', 'w3-total-cache')
8
- , w3_w3tc_release_version($this->_config));
9
  ?>
10
  </p>
11
  <form id="w3tc_dashboard" action="admin.php?page=<?php echo $this->_page; ?>" method="post">
@@ -13,10 +13,7 @@
13
  Perform a
14
  <input type="button" class="button button-self-test {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" value="<?php _e('compatibility check', 'w3-total-cache') ?>" />,
15
  <?php echo $this->nonce_field('w3tc'); ?>
16
- <input id="flush_all" class="button" type="submit" name="w3tc_flush_all" value="<?php _e('empty all caches', 'w3-total-cache') ?>"<?php if (! $can_empty_memcache && ! $can_empty_opcode && ! $can_empty_file && ! $can_empty_cloudflare && ! $can_empty_varnish): ?> disabled="disabled"<?php endif; ?> /> <?php _e('at once or', 'w3-total-cache') ?>
17
- <?php if ($can_empty_cloudflare): ?>
18
- <input id="flush_all_except_cf" class="button" type="submit" name="w3tc_flush_all_except_cf" value="<?php _e('empty all caches except CloudFlare', 'w3-total-cache') ?>"<?php if (! $can_empty_memcache && ! $can_empty_opcode && ! $can_empty_file && ! $can_empty_cloudflare && ! $can_empty_varnish): ?> disabled="disabled"<?php endif; ?> /> <?php _e('at once or', 'w3-total-cache') ?>
19
- <?php endif; ?>
20
  <input class="button" type="submit" name="w3tc_flush_memcached" value="<?php _e('empty only the memcached cache(s)', 'w3-total-cache') ?>"<?php if (! $can_empty_memcache): ?> disabled="disabled"<?php endif; ?> /> <?php _e('or', 'w3-total-cache') ?>
21
  <input class="button" type="submit" name="w3tc_flush_opcode" value="<?php _e('empty only the opcode cache', 'w3-total-cache') ?>"<?php if (! $can_empty_opcode): ?> disabled="disabled"<?php endif; ?> /> <?php _e('or', 'w3-total-cache') ?>
22
  <?php if ($can_empty_apc_system): ?>
@@ -26,7 +23,10 @@
26
  <?php if ($cdn_mirror_purge && $cdn_enabled): ?>
27
  <input class="button" type="submit" name="w3tc_flush_cdn" value="<?php _e('purge CDN completely', 'w3-total-cache') ?>" /> <?php _e('or', 'w3-total-cache') ?>
28
  <?php endif; ?>
29
- <input type="submit" name="w3tc_flush_browser_cache" value="<?php _e('update Media Query String', 'w3-total-cache') ?>" <?php disabled(! ($browsercache_enabled && $browsercache_update_media_qs)) ?> class="button" />.
 
 
 
30
  </p>
31
  </form>
32
 
2
  <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
3
 
4
  <p>
5
+ <?php echo sprintf(__('The plugin is currently <span class="w3tc-%s">%s</span> in <strong>%s%s</strong> mode.', 'w3-total-cache')
6
  , $enabled ? "enabled" : "disabled"
7
  , $enabled ? __('enabled', 'w3-total-cache') : __('disabled', 'w3-total-cache')
8
+ , w3_w3tc_release_version($this->_config), (w3tc_edge_mode() ? __(' edge', 'w3-total-cache') : ''));
9
  ?>
10
  </p>
11
  <form id="w3tc_dashboard" action="admin.php?page=<?php echo $this->_page; ?>" method="post">
13
  Perform a
14
  <input type="button" class="button button-self-test {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" value="<?php _e('compatibility check', 'w3-total-cache') ?>" />,
15
  <?php echo $this->nonce_field('w3tc'); ?>
16
+ <input id="flush_all" class="button" type="submit" name="w3tc_flush_all" value="<?php _e('empty all caches', 'w3-total-cache') ?>"<?php if (! $can_empty_memcache && ! $can_empty_opcode && ! $can_empty_file && ! $can_empty_varnish): ?> disabled="disabled"<?php endif; ?> /> <?php _e('at once or', 'w3-total-cache') ?>
 
 
 
17
  <input class="button" type="submit" name="w3tc_flush_memcached" value="<?php _e('empty only the memcached cache(s)', 'w3-total-cache') ?>"<?php if (! $can_empty_memcache): ?> disabled="disabled"<?php endif; ?> /> <?php _e('or', 'w3-total-cache') ?>
18
  <input class="button" type="submit" name="w3tc_flush_opcode" value="<?php _e('empty only the opcode cache', 'w3-total-cache') ?>"<?php if (! $can_empty_opcode): ?> disabled="disabled"<?php endif; ?> /> <?php _e('or', 'w3-total-cache') ?>
19
  <?php if ($can_empty_apc_system): ?>
23
  <?php if ($cdn_mirror_purge && $cdn_enabled): ?>
24
  <input class="button" type="submit" name="w3tc_flush_cdn" value="<?php _e('purge CDN completely', 'w3-total-cache') ?>" /> <?php _e('or', 'w3-total-cache') ?>
25
  <?php endif; ?>
26
+ <input type="submit" name="w3tc_flush_browser_cache" value="<?php _e('update Media Query String', 'w3-total-cache') ?>" <?php disabled(! ($browsercache_enabled && $browsercache_update_media_qs)) ?> class="button" />
27
+ <?php
28
+ $string = __('or', 'w3-total-cache');
29
+ echo implode(" $string ", apply_filters('w3tc_dashboard_actions', array())) ?>.
30
  </p>
31
  </form>
32
 
inc/options/dbcache.php CHANGED
@@ -19,7 +19,7 @@
19
  <table class="form-table">
20
  <tr>
21
  <th>
22
- <?php $this->checkbox('dbcache.reject.logged') ?> <?php _e('Don\'t cache queries for logged in users', 'w3-total-cache'); ?></label>
23
  <br /><span class="description"><?php _e('Enabling this option is recommended to maintain default WordPress behavior.', 'w3-total-cache'); ?></span>
24
  </th>
25
  </tr>
@@ -35,7 +35,7 @@
35
  <table class="form-table">
36
  <?php if ($this->_config->get_string('dbcache.engine') == 'memcached'): ?>
37
  <tr>
38
- <th><label for="memcached_servers"><?php _e('Memcached hostname:port / <acronym title="Internet Protocol">IP</acronym>:port:', 'w3-total-cache'); ?></label></th>
39
  <td>
40
  <input id="memcached_servers" type="text"
41
  <?php $this->sealing_disabled('dbcache') ?> name="dbcache.memcached.servers" value="<?php echo esc_attr(implode(',', $this->_config->get_array('dbcache.memcached.servers'))); ?>" size="100" />
@@ -46,7 +46,7 @@
46
  </tr>
47
  <?php endif; ?>
48
  <tr>
49
- <th style="width: 250px;"><label for="dbcache_lifetime"><?php _e('Maximum lifetime of cache objects:', 'w3-total-cache'); ?></label></th>
50
  <td>
51
  <input id="dbcache_lifetime" type="text" name="dbcache.lifetime"
52
  <?php $this->sealing_disabled('dbcache') ?>
@@ -55,7 +55,7 @@
55
  </td>
56
  </tr>
57
  <tr>
58
- <th><label for="dbcache_file_gc"><?php _e('Garbage collection interval:', 'w3-total-cache'); ?></label></th>
59
  <td>
60
  <input id="dbcache_file_gc" type="text" name="dbcache.file.gc"
61
  <?php $this->sealing_disabled('dbcache') ?> value="<?php echo esc_attr($this->_config->get_integer('dbcache.file.gc')); ?>" size="8" /> <?php _e('seconds', 'w3-total-cache'); ?>
@@ -63,17 +63,17 @@
63
  </td>
64
  </tr>
65
  <tr>
66
- <th><label for="dbcache_reject_uri"><?php _e('Never cache the following pages:', 'w3-total-cache'); ?></label></th>
67
  <td>
68
  <textarea id="dbcache_reject_uri" name="dbcache.reject.uri"
69
  <?php $this->sealing_disabled('dbcache') ?> cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('dbcache.reject.uri'))); ?></textarea><br />
70
  <span class="description">
71
- <?php echo sprintf( __('Always ignore the specified pages / directories. Supports regular expression (See <a href="%s">FAQ</a>).', 'w3-total-cache'), network_admin_url('admin.php?page=w3tc_faq#q82') ); ?>
72
  </span>
73
  </td>
74
  </tr>
75
  <tr>
76
- <th><label for="dbcache_reject_sql"><?php _e('Ignored query stems:', 'w3-total-cache'); ?></label></th>
77
  <td>
78
  <textarea id="dbcache_reject_sql" name="dbcache.reject.sql"
79
  <?php $this->sealing_disabled('dbcache') ?> cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('dbcache.reject.sql'))); ?></textarea><br />
@@ -81,7 +81,7 @@
81
  </td>
82
  </tr>
83
  <tr>
84
- <th><label for="dbcache_reject_words"><?php _e('Reject query words:', 'w3-total-cache'); ?></label></th>
85
  <td>
86
  <textarea id="dbcache_reject_words" name="dbcache.reject.words"
87
  <?php $this->sealing_disabled('dbcache') ?> cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('dbcache.reject.words'))); ?></textarea><br />
@@ -98,4 +98,4 @@
98
  </div>
99
  </form>
100
 
101
- <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
19
  <table class="form-table">
20
  <tr>
21
  <th>
22
+ <?php $this->checkbox('dbcache.reject.logged') ?> <?php w3_e_config_label('dbcache.reject.logged') ?></label>
23
  <br /><span class="description"><?php _e('Enabling this option is recommended to maintain default WordPress behavior.', 'w3-total-cache'); ?></span>
24
  </th>
25
  </tr>
35
  <table class="form-table">
36
  <?php if ($this->_config->get_string('dbcache.engine') == 'memcached'): ?>
37
  <tr>
38
+ <th><label for="memcached_servers"><?php w3_e_config_label('dbcache.memcached.servers') ?></label></th>
39
  <td>
40
  <input id="memcached_servers" type="text"
41
  <?php $this->sealing_disabled('dbcache') ?> name="dbcache.memcached.servers" value="<?php echo esc_attr(implode(',', $this->_config->get_array('dbcache.memcached.servers'))); ?>" size="100" />
46
  </tr>
47
  <?php endif; ?>
48
  <tr>
49
+ <th style="width: 250px;"><label for="dbcache_lifetime"><?php w3_e_config_label('dbcache.lifetime') ?></label></th>
50
  <td>
51
  <input id="dbcache_lifetime" type="text" name="dbcache.lifetime"
52
  <?php $this->sealing_disabled('dbcache') ?>
55
  </td>
56
  </tr>
57
  <tr>
58
+ <th><label for="dbcache_file_gc"><?php w3_e_config_label('dbcache.file.gc') ?></label></th>
59
  <td>
60
  <input id="dbcache_file_gc" type="text" name="dbcache.file.gc"
61
  <?php $this->sealing_disabled('dbcache') ?> value="<?php echo esc_attr($this->_config->get_integer('dbcache.file.gc')); ?>" size="8" /> <?php _e('seconds', 'w3-total-cache'); ?>
63
  </td>
64
  </tr>
65
  <tr>
66
+ <th><label for="dbcache_reject_uri"><?php w3_e_config_label('dbcache.reject.uri') ?></label></th>
67
  <td>
68
  <textarea id="dbcache_reject_uri" name="dbcache.reject.uri"
69
  <?php $this->sealing_disabled('dbcache') ?> cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('dbcache.reject.uri'))); ?></textarea><br />
70
  <span class="description">
71
+ <?php echo sprintf( __('Always ignore the specified pages / directories. Supports regular expressions (See <a href="%s">FAQ</a>).', 'w3-total-cache'), network_admin_url('admin.php?page=w3tc_faq#q82') ); ?>
72
  </span>
73
  </td>
74
  </tr>
75
  <tr>
76
+ <th><label for="dbcache_reject_sql"><?php w3_e_config_label('dbcache.reject.sql') ?></label></th>
77
  <td>
78
  <textarea id="dbcache_reject_sql" name="dbcache.reject.sql"
79
  <?php $this->sealing_disabled('dbcache') ?> cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('dbcache.reject.sql'))); ?></textarea><br />
81
  </td>
82
  </tr>
83
  <tr>
84
+ <th><label for="dbcache_reject_words"><?php w3_e_config_label('dbcache.reject.words') ?></label></th>
85
  <td>
86
  <textarea id="dbcache_reject_words" name="dbcache.reject.words"
87
  <?php $this->sealing_disabled('dbcache') ?> cols="40" rows="5"><?php echo esc_textarea(implode("\r\n", $this->_config->get_array('dbcache.reject.words'))); ?></textarea><br />
98
  </div>
99
  </form>
100
 
101
+ <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
inc/options/edd/buy.php CHANGED
@@ -1,10 +1,10 @@
1
  <div>
2
- To enable more features you should <input type="button" class="button-primary button-buy-plugin {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" value="<?php _e('Upgrade', 'w3-total-cache') ?>" />
3
  <div id="w3tc-license-instruction" style="display: none;">
4
- <span class="description"><?php printf(__('Please enter the license key you receive after purchase %s.', 'w3-total-cache'),
5
  '<a href="' . (is_network_admin() ?
6
  network_admin_url('admin.php?page=w3tc_general#licensing') :
7
  admin_url('admin.php?page=w3tc_general#licensing')) .'">' . __('here', 'w3-total-cache') . '</a>')
8
  ?></span>
9
  </div>
10
- </div>
1
  <div>
2
+ Unlock more speed, <input type="button" class="button-primary button-buy-plugin {nonce: '<?php echo wp_create_nonce('w3tc'); ?>'}" value="<?php _e('upgrade', 'w3-total-cache') ?>" /> now!
3
  <div id="w3tc-license-instruction" style="display: none;">
4
+ <span class="description"><?php printf(__('Please enter the license key you received after successful checkout %s.', 'w3-total-cache'),
5
  '<a href="' . (is_network_admin() ?
6
  network_admin_url('admin.php?page=w3tc_general#licensing') :
7
  admin_url('admin.php?page=w3tc_general#licensing')) .'">' . __('here', 'w3-total-cache') . '</a>')
8
  ?></span>
9
  </div>
10
+ </div>
inc/options/enterprise/dbcluster-config.php CHANGED
@@ -1,29 +1,29 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
3
-
4
- <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
5
- <div class="metabox-holder">
6
- <?php echo $this->postbox_header(__('Database Cluster Configuration File', 'w3-total-cache')); ?>
7
- <table class="form-table">
8
- <tr>
9
- <th>
10
- <textarea cols="70" rows="25" style="width: 100%"
11
- name="newcontent" id="newcontent"
12
- tabindex="1"><?php echo esc_textarea($content); ?></textarea><br />
13
- <br />
14
- <span class="description">
15
- <?php _e('Note: Changes will have immediate effect on your database configuration. If the application stops working creating the settings file, edit or remove this configuration file manually at <strong>/wp-content/db-cluster-config.php</strong>.', 'w3-total-cache'); ?>
16
- </span>
17
- </th>
18
- </tr>
19
- </table>
20
-
21
- <p class="submit">
22
- <?php echo $this->nonce_field('w3tc'); ?>
23
- <input type="submit" name="w3tc_config_dbcluster_config_save" class="w3tc-button-save button-primary" value="<?php _e('Save configuration file', 'w3-total-cache'); ?>" />
24
- </p>
25
- <?php echo $this->postbox_footer(); ?>
26
- </div>
27
- </form>
28
-
29
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
1
+ <?php if (!defined('W3TC')) die(); ?>
2
+ <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
3
+
4
+ <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
5
+ <div class="metabox-holder">
6
+ <?php echo $this->postbox_header(__('Database Cluster Configuration File', 'w3-total-cache')); ?>
7
+ <table class="form-table">
8
+ <tr>
9
+ <th>
10
+ <textarea cols="70" rows="25" style="width: 100%"
11
+ name="newcontent" id="newcontent"
12
+ tabindex="1"><?php echo esc_textarea($content); ?></textarea><br />
13
+ <br />
14
+ <span class="description">
15
+ <?php _e('Note: Changes will have immediate effect on your database configuration. If the application stops working creating the settings file, edit or remove this configuration file manually at <strong>/wp-content/db-cluster-config.php</strong>.', 'w3-total-cache'); ?>
16
+ </span>
17
+ </th>
18
+ </tr>
19
+ </table>
20
+
21
+ <p class="submit">
22
+ <?php echo $this->nonce_field('w3tc'); ?>
23
+ <input type="submit" name="w3tc_config_dbcluster_config_save" class="w3tc-button-save button-primary" value="<?php _e('Save configuration file', 'w3-total-cache'); ?>" />
24
+ </p>
25
+ <?php echo $this->postbox_footer(); ?>
26
+ </div>
27
+ </form>
28
+
29
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
inc/options/extensions.php CHANGED
@@ -8,12 +8,12 @@
8
  <div id="w3tc_extensions">
9
  <?php
10
  if ($sub_view == 'list')
11
- printf(__('Extension support is always %s','w3-total-cache'), '<span class="w3tc-enabled">' . __('enabled', 'w3-total-cache') . '</span>.' )
12
  ?>
13
- <form action="admin.php?page=<?php echo $this->_page; ?><?php echo $extension ? "&extension={$extension}" : ''?>" method="post">
14
- <div class="metabox-holder">
15
  <?php include W3TC_INC_OPTIONS_DIR . "/extensions/$sub_view.php"?>
16
  </div>
17
  </form>
18
  </div>
19
- <?php include W3TC_INC_OPTIONS_DIR . '/common/footer.php'; ?>
8
  <div id="w3tc_extensions">
9
  <?php
10
  if ($sub_view == 'list')
11
+ printf('<p>'.__('Extension support is always %s','w3-total-cache'), '<span class="w3tc-enabled">' . __('enabled', 'w3-total-cache') . '</span>.' .'</p>')
12
  ?>
13
+ <form action="admin.php?page=<?php echo $this->_page; ?><?php echo $extension ? "&extension={$extension}&action=view" : ''?>" method="post">
14
+ <div class="metabox-holder <?php echo $extension?'extension-settings':''?>">
15
  <?php include W3TC_INC_OPTIONS_DIR . "/extensions/$sub_view.php"?>
16
  </div>
17
  </form>
18
  </div>
19
+ <?php include W3TC_INC_OPTIONS_DIR . '/common/footer.php'; ?>
inc/options/extensions/list.php CHANGED
@@ -50,7 +50,7 @@
50
  $cb_id++;
51
  ?>
52
  <?php do_action("w3tc_extension_before_row-{$extension}") ?>
53
- <tr id="<?php esc_attr($extension)?>" class="<?php echo w3_is_extension_active($extension) ? 'active' : 'inactive'?>">
54
  <th scope="row" class="check-column">
55
  <label class="screen-reader-text" for="checkbox_<?php echo $cb_id?>"><?php printf(__('Select %s'), $meta['name']) ?></label>
56
  <input type="checkbox" name="checked[]" value="<?php echo esc_attr($extension) ?>" id="checkbox_<?php echo $cb_id?>" <?php disabled(!$meta['enabled'])?>>
@@ -59,7 +59,7 @@
59
  <strong><?php esc_html_e($meta['name']) ?></strong>
60
  <div class="row-actions-visible">
61
  <?php if (w3_is_extension_active($extension)):
62
- $activate = '<a class="edit" href="' . esc_attr(w3_admin_url(sprintf('admin.php?page=w3tc_extensions&extension=%s', $extension))).'">'. __('Settings').'</a>';
63
  $extra_links = apply_filters("w3tc_extension_plugin_links-{$extension}", array($activate));
64
  $links = implode(' | ', $extra_links);
65
  if ($links) {
@@ -136,4 +136,4 @@
136
  <?php echo $this->nonce_field('w3tc'); ?>
137
  <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save network settings', 'w3-total-cache'); ?>" />
138
  </p>
139
- <?php endif ?>
50
  $cb_id++;
51
  ?>
52
  <?php do_action("w3tc_extension_before_row-{$extension}") ?>
53
+ <tr id="<?php echo esc_attr($extension)?>" class="<?php echo w3_is_extension_active($extension) ? 'active' : 'inactive'?>">
54
  <th scope="row" class="check-column">
55
  <label class="screen-reader-text" for="checkbox_<?php echo $cb_id?>"><?php printf(__('Select %s'), $meta['name']) ?></label>
56
  <input type="checkbox" name="checked[]" value="<?php echo esc_attr($extension) ?>" id="checkbox_<?php echo $cb_id?>" <?php disabled(!$meta['enabled'])?>>
59
  <strong><?php esc_html_e($meta['name']) ?></strong>
60
  <div class="row-actions-visible">
61
  <?php if (w3_is_extension_active($extension)):
62
+ $activate = '<a class="edit" href="' . esc_attr(w3_admin_url(sprintf('admin.php?page=w3tc_extensions&extension=%s', $extension))).'&action=view">'. __('Settings').'</a>';
63
  $extra_links = apply_filters("w3tc_extension_plugin_links-{$extension}", array($activate));
64
  $links = implode(' | ', $extra_links);
65
  if ($links) {
136
  <?php echo $this->nonce_field('w3tc'); ?>
137
  <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save network settings', 'w3-total-cache'); ?>" />
138
  </p>
139
+ <?php endif ?>
inc/options/extensions/settings.php CHANGED
@@ -13,7 +13,7 @@
13
  <?php w3tc_do_settings_sections("{$extension}")?>
14
  <?php do_action("w3tc_after_do_settings_sections_{$extension}") ?>
15
  <p class="submit">
16
- <input type="hidden" name="redirect" value="<?php echo w3_admin_url('admin.php?page=w3tc_extensions&extension=' . $extension) ?>" />
17
  <?php echo $this->nonce_field('w3tc'); ?>
18
  <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save settings', 'w3-total-cache'); ?>" />
19
  </p>
13
  <?php w3tc_do_settings_sections("{$extension}")?>
14
  <?php do_action("w3tc_after_do_settings_sections_{$extension}") ?>
15
  <p class="submit">
16
+ <input type="hidden" name="redirect" value="<?php echo w3_admin_url('admin.php?page=w3tc_extensions&extension=' . $extension . '&action=view') ?>" />
17
  <?php echo $this->nonce_field('w3tc'); ?>
18
  <input type="submit" name="w3tc_save_options" class="w3tc-button-save button-primary" value="<?php _e('Save settings', 'w3-total-cache'); ?>" />
19
  </p>
inc/options/faq.php CHANGED
@@ -1,31 +1,50 @@
1
- <?php if (!defined('W3TC')) die(); ?>
2
- <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
3
-
4
- <h4><?php _e('Table of Contents', 'w3-total-cache'); ?></h4>
5
-
6
- <div id="toc">
7
- <ul>
8
- <?php foreach ($faq as $section => $entries): ?>
9
- <li class="col">
10
- <h5><?php echo strtoupper($section); ?>:</h5>
11
- <ul>
12
- <?php foreach ($entries as $entry): ?>
13
- <li><a href="#q<?php echo $entry['index']; ?>"><?php echo $entry['question']; ?></a></li>
14
- <?php endforeach; ?>
15
- </ul>
16
- </li>
17
- <?php endforeach; ?>
18
- </ul>
19
- </div>
20
- <div id="qa">
21
- <hr />
22
- <?php foreach ($faq as $section => $entries): ?>
23
- <?php foreach ($entries as $entry): ?>
24
- <p id="q<?php echo $entry['index']; ?>"><strong><?php echo