W3 Total Cache - Version 0.13.0

Version Description

  • Added new Pro feature, Debug - Purge Stack Trace
  • Added "Feature Policy" security header
  • Removed deprecated get_magic_quotes_gpc()
  • Improved AMP Extension by ignoring value of amp querystring marker in request if passed without value in config
  • Improved lazyload by not processing elements with skip-lazy class or data-skip-lazy attribute
  • Fixed caching of query-string normalization redirects, no longer cached when cache key is normalized by accept querystring arguments, caused redirect loop
Download this release

Release Info

Developer boldgrid
Plugin Icon 128x128 W3 Total Cache
Version 0.13.0
Comparing to
See all releases

Code changes from version 0.12.0 to 0.13.0

Files changed (99) hide show
  1. Base_Page_Settings.php +34 -1
  2. BrowserCache_Environment.php +23 -5
  3. BrowserCache_Environment_Nginx.php +24 -6
  4. BrowserCache_Page_View_SectionSecurity.php +471 -0
  5. BrowserCache_Plugin_Admin.php +25 -0
  6. Cdn_Highwinds_Page_View.php +11 -12
  7. Cdn_Highwinds_Popup_View_ConfigureCnamesForm.php +12 -13
  8. Cdn_LimeLight_Page_View.php +11 -12
  9. Cdn_MaxCdn_Page_View.php +20 -21
  10. Cdn_MaxCdn_Popup_View_Intro.php +25 -26
  11. Cdn_RackSpaceCdn_Page_View.php +19 -21
  12. Cdn_RackSpaceCdn_Popup_View_ConfigureDomains.php +12 -13
  13. Cdn_RackSpaceCdn_Popup_View_Service_Create.php +74 -76
  14. Cdn_RackSpaceCloudFiles_Page_View.php +13 -14
  15. Cdn_StackPath2_Page_View.php +40 -22
  16. Cdn_StackPath2_Popup_View_Intro.php +2 -3
  17. Cdn_StackPath2_Widget_View_Unauthorized.php +21 -5
  18. Cdn_StackPath_Page_View.php +9 -10
  19. Cdn_StackPath_Popup_View_Intro.php +25 -26
  20. Cdnfsd_CloudFront_Page_View.php +10 -10
  21. Cdnfsd_CloudFront_Popup.php +2 -2
  22. Cdnfsd_CloudFront_Popup_View_Distribution.php +3 -3
  23. Cdnfsd_GeneralPage_View.php +26 -21
  24. Cdnfsd_MaxCdn_Page_View.php +10 -12
  25. Cdnfsd_MaxCdn_Popup.php +2 -2
  26. Cdnfsd_MaxCdn_Popup_View_Intro.php +25 -26
  27. Cdnfsd_MaxCdn_Popup_View_Zone.php +44 -44
  28. Cdnfsd_StackPath2_Page_View.php +3 -5
  29. Cdnfsd_StackPath2_Popup_View_Intro.php +2 -3
  30. Cdnfsd_StackPath_Page_View.php +10 -10
  31. Cdnfsd_StackPath_Popup.php +2 -2
  32. Cdnfsd_StackPath_Popup_View_Intro.php +2 -3
  33. Cdnfsd_StackPath_Popup_View_Zone.php +44 -44
  34. ConfigCompiler.php +13 -0
  35. ConfigKeys.php +21 -1
  36. DbCache_WpdbInjection_QueryCaching.php +4 -0
  37. Extension_Amp_Plugin.php +9 -2
  38. Extension_FragmentCache_Page_View.php +8 -8
  39. Extension_FragmentCache_Plugin_Admin.php +6 -0
  40. Extension_Genesis_Page_View.php +74 -76
  41. Extension_Genesis_Plugin_Admin.php +2 -0
  42. Extension_NewRelic_Page_View_Apm.php +172 -173
  43. Extension_Wpml_Plugin_Admin.php +4 -0
  44. Generic_AdminActions_Default.php +14 -0
  45. Generic_AdminNotes.php +2 -2
  46. Generic_Page_General.php +11 -0
  47. Generic_Page_PurgeLog.php +91 -0
  48. Generic_Page_PurgeLog_View.php +110 -0
  49. ObjectCache_Page_View_PurgeLog.php +32 -0
  50. ObjectCache_WpObjectCache_Regular.php +3 -0
  51. PgCache_ContentGrabber.php +33 -18
  52. PgCache_Flush.php +39 -2
  53. PgCache_Page_CookieGroups_View.js +2 -2
  54. PgCache_Page_CookieGroups_View.php +2 -3
  55. UsageStatistics_GeneralPage_View.php +10 -3
  56. UsageStatistics_Source_ObjectCacheLog.php +2 -2
  57. Util_Debug.php +99 -3
  58. Util_DebugPurgeLog_Reader.php +129 -0
  59. Util_Request.php +6 -1
  60. Util_Ui.php +196 -99
  61. inc/lightbox/create_netdna_maxcdn_pull_zone.php +29 -29
  62. inc/options/browsercache.php +417 -767
  63. inc/options/cdn.php +53 -53
  64. inc/options/cdn/akamai.php +37 -38
  65. inc/options/cdn/att.php +17 -17
  66. inc/options/cdn/azure.php +9 -9
  67. inc/options/cdn/cf.php +3 -3
  68. inc/options/cdn/cf2.php +3 -3
  69. inc/options/cdn/cotendo.php +21 -21
  70. inc/options/cdn/edgecast.php +17 -17
  71. inc/options/cdn/ftp.php +14 -14
  72. inc/options/cdn/mirror.php +3 -3
  73. inc/options/cdn/rscf.php +11 -11
  74. inc/options/cdn/s3.php +3 -3
  75. inc/options/cdn/s3_compatible.php +6 -6
  76. inc/options/common/header.php +3 -0
  77. inc/options/dbcache.php +75 -75
  78. inc/options/edd/buy.php +2 -2
  79. inc/options/enterprise/dbcluster-config.php +20 -21
  80. inc/options/enterprise/dbcluster_general_section.php +6 -6
  81. inc/options/extensions/list.php +4 -7
  82. inc/options/general.php +71 -33
  83. inc/options/minify.php +407 -407
  84. inc/options/minify/css.php +16 -3
  85. inc/options/mobile.php +98 -100
  86. inc/options/objectcache.php +71 -71
  87. inc/options/parts/memcached.php +13 -13
  88. inc/options/parts/memcached_extension.php +1 -1
  89. inc/options/parts/redis.php +34 -34
  90. inc/options/parts/redis_extension.php +13 -13
  91. inc/options/pgcache.php +79 -72
  92. inc/options/referrer.php +71 -71
  93. lib/Db/mssql.php +0 -4
  94. lib/Minify/HTTP/ConditionalGet.php +1 -3
  95. pub/css/options.css +39 -3
  96. pub/js/options.js +16 -2
  97. readme.txt +27 -15
  98. w3-total-cache-api.php +1 -1
  99. w3-total-cache.php +1 -1
Base_Page_Settings.php CHANGED
@@ -157,7 +157,7 @@ class Base_Page_Settings {
157
  echo '<label>';
158
  echo '<input class="enabled" type="checkbox" id="' . $name .
159
  '" name="' . $name . '" value="1" ';
160
- checked( $this->_config->get_boolean( $option_id ), true );
161
 
162
  if ( $disabled )
163
  echo 'disabled="disabled" ';
@@ -165,6 +165,39 @@ class Base_Page_Settings {
165
  echo ' />';
166
  }
167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  protected function value_with_disabled( $option_id, $disabled,
169
  $value_when_disabled ) {
170
  if ( $disabled ) {
157
  echo '<label>';
158
  echo '<input class="enabled" type="checkbox" id="' . $name .
159
  '" name="' . $name . '" value="1" ';
160
+ checked( $this->_config->get_boolean( $option_id ) && $section_enabled, true );
161
 
162
  if ( $disabled )
163
  echo 'disabled="disabled" ';
165
  echo ' />';
166
  }
167
 
168
+ protected function checkbox_debug_pro( $option_id, $label, $label_pro ) {
169
+ if ( is_array( $option_id ) ) {
170
+ $section = $option_id[0];
171
+ $section_enabled = $this->_config->is_extension_active_frontend( $section );
172
+ } else {
173
+ $section = substr( $option_id, 0, strrpos( $option_id, '.' ) );
174
+ $section_enabled = $this->_config->get_boolean( $section . '.enabled' );
175
+ }
176
+
177
+ $is_pro = Util_Environment::is_w3tc_pro( $this->_config );
178
+ $disabled = $this->_config->is_sealed( $option_id ) || !$section_enabled ||
179
+ !$is_pro;
180
+ $name = Util_Ui::config_key_to_http_name( $option_id );
181
+
182
+ if ( !$disabled )
183
+ echo '<input type="hidden" name="' . $name . '" value="0" />';
184
+
185
+ echo '<label>';
186
+ echo '<input class="enabled" type="checkbox" id="' . $name .
187
+ '" name="' . $name . '" value="1" ';
188
+ checked( $this->_config->get_boolean( $option_id ) && $is_pro, true );
189
+
190
+ if ( $disabled )
191
+ echo 'disabled="disabled" ';
192
+
193
+ echo ' />';
194
+ echo esc_html( $label );
195
+ if ( $is_pro ) {
196
+ echo $label_pro;
197
+ }
198
+ echo '</label>';
199
+ }
200
+
201
  protected function value_with_disabled( $option_id, $disabled,
202
  $value_when_disabled ) {
203
  if ( $disabled ) {
BrowserCache_Environment.php CHANGED
@@ -362,12 +362,13 @@ class BrowserCache_Environment {
362
  $extensions, $type );
363
 
364
  if ( $config->get_boolean( 'browsercache.hsts' ) ||
365
- $config->get_boolean( 'browsercache.security.xfo' ) ||
366
- $config->get_boolean( 'browsercache.security.xss' ) ||
367
  $config->get_boolean( 'browsercache.security.xcto' ) ||
368
- $config->get_boolean( 'browsercache.security.pkp' ) ||
369
- $config->get_boolean( 'browsercache.security.referrer.policy' ) ||
370
- $config->get_boolean( 'browsercache.security.csp' )
 
371
  ) {
372
  $lifetime = $config->get_integer( 'browsercache.other.lifetime' );
373
 
@@ -447,6 +448,23 @@ class BrowserCache_Environment {
447
  }
448
  }
449
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
  $rules .= "</IfModule>\n";
451
  }
452
 
362
  $extensions, $type );
363
 
364
  if ( $config->get_boolean( 'browsercache.hsts' ) ||
365
+ $config->get_boolean( 'browsercache.security.xfo' ) ||
366
+ $config->get_boolean( 'browsercache.security.xss' ) ||
367
  $config->get_boolean( 'browsercache.security.xcto' ) ||
368
+ $config->get_boolean( 'browsercache.security.pkp' ) ||
369
+ $config->get_boolean( 'browsercache.security.referrer.policy' ) ||
370
+ $config->get_boolean( 'browsercache.security.csp' ) ||
371
+ $config->get_boolean( 'browsercache.security.fp' )
372
  ) {
373
  $lifetime = $config->get_integer( 'browsercache.other.lifetime' );
374
 
448
  }
449
  }
450
 
451
+ if ( $config->get_boolean( 'browsercache.security.fp' ) ) {
452
+ $fp_values = $config->get_array( 'browsercache.security.fp.values' );
453
+
454
+ $v = array();
455
+ foreach ( $fp_values as $key => $value ) {
456
+ $value = str_replace( '"', "'", $value );
457
+ if ( !empty( $value ) ) {
458
+ $v[] = "$key $value";
459
+ }
460
+ }
461
+
462
+ if ( !empty( $v ) ) {
463
+ $rules .= ' Header set Feature-Policy "' .
464
+ implode( ';', $v ) . "\"\n";
465
+ }
466
+ }
467
+
468
  $rules .= "</IfModule>\n";
469
  }
470
 
BrowserCache_Environment_Nginx.php CHANGED
@@ -162,12 +162,13 @@ class BrowserCache_Environment_Nginx {
162
  $rules = [];
163
 
164
  if ( $this->c->get_boolean( 'browsercache.hsts' ) ||
165
- $this->c->get_boolean( 'browsercache.security.xfo' ) ||
166
- $this->c->get_boolean( 'browsercache.security.xss' ) ||
167
  $this->c->get_boolean( 'browsercache.security.xcto' ) ||
168
- $this->c->get_boolean( 'browsercache.security.pkp' ) ||
169
- $this->c->get_boolean( 'browsercache.security.referrer.policy' ) ||
170
- $this->c->get_boolean( 'browsercache.security.csp' )
 
171
  ) {
172
  $lifetime = $this->c->get_integer( 'browsercache.other.lifetime' );
173
 
@@ -243,6 +244,23 @@ class BrowserCache_Environment_Nginx {
243
  $rules[] = "add_header Content-Security-Policy \"$dir\";";
244
  }
245
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
  }
247
 
248
  return $rules;
@@ -374,7 +392,7 @@ class BrowserCache_Environment_Nginx {
374
  }
375
 
376
  if ( $this->c->get_boolean( "browsercache.$section.w3tc" ) ) {
377
- $add_header_rules[] = 'add_header X-Powered-y "' .
378
  Util_Environment::w3tc_header() . '";';
379
  }
380
 
162
  $rules = [];
163
 
164
  if ( $this->c->get_boolean( 'browsercache.hsts' ) ||
165
+ $this->c->get_boolean( 'browsercache.security.xfo' ) ||
166
+ $this->c->get_boolean( 'browsercache.security.xss' ) ||
167
  $this->c->get_boolean( 'browsercache.security.xcto' ) ||
168
+ $this->c->get_boolean( 'browsercache.security.pkp' ) ||
169
+ $this->c->get_boolean( 'browsercache.security.referrer.policy' ) ||
170
+ $this->c->get_boolean( 'browsercache.security.csp' ) ||
171
+ $this->c->get_boolean( 'browsercache.security.fp' )
172
  ) {
173
  $lifetime = $this->c->get_integer( 'browsercache.other.lifetime' );
174
 
244
  $rules[] = "add_header Content-Security-Policy \"$dir\";";
245
  }
246
  }
247
+
248
+ if ( $this->c->get_boolean( 'browsercache.security.fp' ) ) {
249
+ $fp_values = $this->c->get_array( 'browsercache.security.fp.values' );
250
+
251
+ $v = array();
252
+ foreach ( $fp_values as $key => $value ) {
253
+ $value = str_replace( '"', "'", $value );
254
+ if ( !empty( $value ) ) {
255
+ $v[] = "$key $value";
256
+ }
257
+ }
258
+
259
+ if ( !empty( $v ) ) {
260
+ $rules[] = 'add_header Feature-Policy "' .
261
+ implode( ';', $v ) . "\";\n";
262
+ }
263
+ }
264
  }
265
 
266
  return $rules;
392
  }
393
 
394
  if ( $this->c->get_boolean( "browsercache.$section.w3tc" ) ) {
395
+ $add_header_rules[] = 'add_header X-Powered-By "' .
396
  Util_Environment::w3tc_header() . '";';
397
  }
398
 
BrowserCache_Page_View_SectionSecurity.php ADDED
@@ -0,0 +1,471 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace W3TC;
3
+
4
+ if ( !defined( 'W3TC' ) )
5
+ die();
6
+
7
+ $c = Dispatcher::config();
8
+ $fp_values = $c->get_array( 'browsercache.security.fp.values' );
9
+
10
+ $feature_policies = array(
11
+ array(
12
+ 'label' => 'accelerometer',
13
+ 'description' => __( 'controls whether the current document is allowed to gather information about the acceleration of the device through the Accelerometer interface', 'w3-total-cache' )
14
+ ), array(
15
+ 'label' => 'ambient-light-sensor',
16
+ 'description' => __( 'controls whether the current document is allowed to gather information about the amount of light in the environment around the device through the AmbientLightSensor interface', 'w3-total-cache')
17
+ ), array(
18
+ 'label' => 'autoplay',
19
+ 'description' => __( 'controls whether the current document is allowed to autoplay media requested through the HTMLMediaElement interface', 'w3-total-cache')
20
+ ), array(
21
+ 'label' => 'camera',
22
+ 'description' => __( 'controls whether the current document is allowed to use video input devices', 'w3-total-cache')
23
+ ), array(
24
+ 'label' => 'display-capture',
25
+ 'description' => __( 'controls whether or not the document is permitted to use Screen Capture API', 'w3-total-cache')
26
+ ), array(
27
+ 'label' => 'document-domain',
28
+ 'description' => __( 'controls whether the current document is allowed to set document.domain', 'w3-total-cache')
29
+ ), array(
30
+ 'label' => 'encrypted-media',
31
+ 'description' => __( 'controls whether the current document is allowed to use the Encrypted Media Extensions API (EME)', 'w3-total-cache')
32
+ ), array(
33
+ 'label' => 'fullscreen',
34
+ 'description' => __( 'controls whether the current document is allowed to use Element.requestFullScreen()', 'w3-total-cache')
35
+ ), array(
36
+ 'label' => 'geolocation',
37
+ 'description' => __( 'controls whether the current document is allowed to use the Geolocation Interface', 'w3-total-cache')
38
+ ), array(
39
+ 'label' => 'gyroscope',
40
+ 'description' => __( 'controls whether the current document is allowed to gather information about the orientation of the device through the Gyroscope interface', 'w3-total-cache')
41
+ ), array(
42
+ 'label' => 'layout-animations',
43
+ 'description' => __( 'controls whether the current document is allowed to show layout animations', 'w3-total-cache')
44
+ ), array(
45
+ 'label' => 'legacy-image-formats',
46
+ 'description' => __( 'controls whether the current document is allowed to display images in legacy formats', 'w3-total-cache')
47
+ ), array(
48
+ 'label' => 'magnetometer',
49
+ 'description' => __( 'controls whether the current document is allowed to gather information about the orientation of the device through the Magnetometer interface', 'w3-total-cache')
50
+ ), array(
51
+ 'label' => 'microphone',
52
+ 'description' => __( 'controls whether the current document is allowed to use audio input devices', 'w3-total-cache')
53
+ ), array(
54
+ 'label' => 'midi',
55
+ 'description' => __( 'controls whether the current document is allowed to use the Web MIDI API', 'w3-total-cache')
56
+ ), array(
57
+ 'label' => 'oversized-images',
58
+ 'description' => __( 'controls whether the current document is allowed to download and display large images', 'w3-total-cache')
59
+ ), array(
60
+ 'label' => 'payment',
61
+ 'description' => __( 'controls whether the current document is allowed to use the Payment Request API', 'w3-total-cache')
62
+ ), array(
63
+ 'label' => 'picture-in-picture',
64
+ 'description' => __( 'controls whether the current document is allowed to play a video in a Picture-in-Picture mode via the corresponding API', 'w3-total-cache')
65
+ ), array(
66
+ 'label' => 'publickey-credentials',
67
+ 'description' => __( 'controls whether the current document is allowed to access Web Authentcation API', 'w3-total-cache')
68
+ ), array(
69
+ 'label' => 'speaker',
70
+ 'description' => __( 'controls whether the current document is allowed to play audio via any methods', 'w3-total-cache')
71
+ ), array(
72
+ 'label' => 'sync-xhr',
73
+ 'description' => __( 'controls whether the current document is allowed to make synchronous XMLHttpRequest requests', 'w3-total-cache')
74
+ ), array(
75
+ 'label' => 'unoptimized-images',
76
+ 'description' => __( 'controls whether the current document is allowed to download and display unoptimized images', 'w3-total-cache')
77
+ ), array(
78
+ 'label' => 'unsized-media',
79
+ 'description' => __( 'controls whether the current document is allowed to change the size of media elements after the initial layout is complete', 'w3-total-cache')
80
+ ), array(
81
+ 'label' => 'usb',
82
+ 'description' => __( 'controls whether the current document is allowed to use the WebUSB API', 'w3-total-cache')
83
+ ), array(
84
+ 'label' => 'vibrate',
85
+ 'description' => __( 'directive controls whether the current document is allowed to trigger device vibrations via Vibration API', 'w3-total-cache')
86
+ ), array(
87
+ 'label' => 'wake-lock',
88
+ 'description' => __( 'controls whether the current document is allowed to use Wake Lock API to indicate that device should not enter power-saving mode', 'w3-total-cache')
89
+ ), array(
90
+ 'label' => 'xr-spatial-tracking',
91
+ 'description' => __( 'controls whether the current document is allowed to use the WebXR Device API.', 'w3-total-cache')
92
+ )
93
+ );
94
+
95
+ ?>
96
+ <?php Util_Ui::postbox_header( __( 'Security Headers', 'w3-total-cache' ), '', 'security' ) ?>
97
+ <p><?php _e( '<acronym title="Hypertext Transfer Protocol">HTTP</acronym> security headers provide another layer of protection for your website by helping to mitigate attacks and security vulnerabilities.', 'w3-total-cache' ) ?></p>
98
+ <p><a onclick="w3tc_csp_reference()" href="javascript:void(0);">Quick Reference Chart</a></p>
99
+
100
+ <table class="form-table">
101
+ <?php
102
+ Util_Ui::config_item( array(
103
+ 'key' => 'browsercache.security.session.use_only_cookies',
104
+ 'control' => 'selectbox',
105
+ 'selectbox_values' => $security_session_values,
106
+ 'description' => __( 'This setting prevents attacks that are caused by passing session IDs in <acronym title="Uniform Resource Locator">URL</acronym>s.',
107
+ 'w3-total-cache' )
108
+ ) );
109
+ ?>
110
+ <?php
111
+ Util_Ui::config_item( array(
112
+ 'key' => 'browsercache.security.session.cookie_httponly',
113
+ 'control' => 'selectbox',
114
+ 'selectbox_values' => $security_session_values,
115
+ 'description' => __( 'This tells the user\'s browser not to make the session cookie accessible to client side scripting such as JavaScript. This makes it harder for an attacker to hijack the session ID and masquerade as the effected user.',
116
+ 'w3-total-cache' )
117
+ ) );
118
+ ?>
119
+ <?php
120
+ Util_Ui::config_item( array(
121
+ 'key' => 'browsercache.security.session.cookie_secure',
122
+ 'control' => 'selectbox',
123
+ 'selectbox_values' => $security_session_values,
124
+ 'description' => __( 'This will prevent the user\'s session ID from being transmitted in plain text, making it much harder to hijack the user\'s session.',
125
+ 'w3-total-cache' )
126
+ ) );
127
+ ?>
128
+ <tr>
129
+ <th colspan="2">
130
+ <?php $this->checkbox( 'browsercache.hsts' ) ?> <?php Util_Ui::e_config_label( 'browsercache.hsts' ) ?></label>
131
+ <p class="description"><?php _e( '<acronym title="Hypertext Transfer Protocol">HTTP</acronym> Strict-Transport-Security (<acronym title="HTTP Strict Transport Security">HSTS</acronym>) enforces secure (<acronym title="Hypertext Transfer Protocol">HTTP</acronym> over <acronym title="Secure Sockets Layer">SSL</acronym>/<acronym title="Transport Layer Security">TLS</acronym>) connections to the server. This can help mitigate adverse effects caused by bugs and session leaks through cookies and links. It also helps defend against man-in-the-middle attacks. If there are <acronym title="Secure Sockets Layer">SSL</acronym> negotiation warnings then users will not be permitted to ignore them.', 'w3-total-cache' ) ?></p>
132
+ </th>
133
+ </tr>
134
+ <tr>
135
+ <th>
136
+ <label for="browsercache_security_hsts_directive"><?php Util_Ui::e_config_label( 'browsercache.security.hsts.directive' ) ?></label>
137
+ </th>
138
+ <td>
139
+ <select id="browsercache_security_hsts_directive"
140
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
141
+ name="browsercache__security__hsts__directive">
142
+ <?php $value = $this->_config->get_string( 'browsercache.security.hsts.directive' ) ?>
143
+ <option value="maxage"<?php selected( $value, 'maxage' ) ?>><?php _e( 'max-age=EXPIRES_SECONDS', 'w3-total-cache' ) ?></option>
144
+ <option value="maxagepre"<?php selected( $value, 'maxagepre' ) ?>><?php _e( 'max-age=EXPIRES_SECONDS; preload', 'w3-total-cache' ) ?></option>
145
+ <option value="maxageinc"<?php selected( $value, 'maxageinc' ) ?>><?php _e( 'max-age=EXPIRES_SECONDS; includeSubDomains', 'w3-total-cache' ) ?></option>
146
+ <option value="maxageincpre"<?php selected( $value, 'maxageincpre' ) ?>><?php _e( 'max-age=EXPIRES_SECONDS; includeSubDomains; preload', 'w3-total-cache' ) ?></option>
147
+ </select>
148
+ <div id="browsercache_security_hsts_directive_description"></div>
149
+ </td>
150
+ </tr>
151
+ <tr>
152
+ <th colspan="2">
153
+ <?php $this->checkbox( 'browsercache.security.xfo' ) ?> <?php Util_Ui::e_config_label( 'browsercache.security.xfo' ) ?></label>
154
+ <p class="description"><?php _e( 'This tells the browser if it is permitted to render a page within a frame-like tag (i.e., &lt;frame&gt;, &lt;iframe&gt; or &lt;object&gt;). This is useful for preventing clickjacking attacks.', 'w3-total-cache' ) ?></p>
155
+ </th>
156
+ </tr>
157
+ <tr>
158
+ <th>
159
+ <label for="browsercache_security_xfo_directive"><?php Util_Ui::e_config_label( 'browsercache.security.xfo.directive' ) ?></label>
160
+ </th>
161
+ <td>
162
+ <select id="browsercache_security_xfo_directive"
163
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
164
+ name="browsercache__security__xfo__directive">
165
+ <?php $value = $this->_config->get_string( 'browsercache.security.xfo.directive' ) ?>
166
+ <option value="same"<?php selected( $value, 'same' ) ?>><?php _e( 'SameOrigin', 'w3-total-cache' ) ?></option>
167
+ <option value="deny"<?php selected( $value, 'deny' ) ?>><?php _e( 'Deny', 'w3-total-cache' ) ?></option>
168
+ <option value="allow"<?php selected( $value, 'allow' ) ?>><?php _e( 'Allow-From', 'w3-total-cache' ) ?></option>
169
+ </select>
170
+ <input id="browsercache_security_xfo_allow" type="text" name="browsercache__security__xfo__allow"
171
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.xfo.allow' ) ) ?>" size="50" placeholder="Enter URL" />
172
+ <div id="browsercache_security_xfo_directive_description"></div>
173
+ </td>
174
+ </tr>
175
+ <tr>
176
+ <th colspan="2">
177
+ <?php $this->checkbox( 'browsercache.security.xss' ) ?> <?php Util_Ui::e_config_label( 'browsercache.security.xss' ) ?></label>
178
+ <p class="description"><?php _e( 'This header enables the <acronym title="Cross-Site Scripting">XSS</acronym> filter. It helps to stop malicious scripts from being injected into your website. Although this is already built into and enabled by default in most browsers today it is made available here to enforce its reactivation if it was disabled within the user\'s browser.', 'w3-total-cache' ) ?></p>
179
+ </th>
180
+ </tr>
181
+ <tr>
182
+ <th>
183
+ <label for="browsercache_security_xss_directive"><?php Util_Ui::e_config_label( 'browsercache.security.xss.directive' ) ?></label>
184
+ </th>
185
+ <td>
186
+ <select id="browsercache_security_xss_directive"
187
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
188
+ name="browsercache__security__xss__directive">
189
+ <?php $value = $this->_config->get_string( 'browsercache.security.xss.directive' ) ?>
190
+ <option value="0"<?php selected( $value, '0' ) ?>><?php _e( '0', 'w3-total-cache' ) ?></option>
191
+ <option value="1"<?php selected( $value, '1' ) ?>><?php _e( '1', 'w3-total-cache' ) ?></option>
192
+ <option value="block"<?php selected( $value, 'block' ) ?>><?php _e( '1; mode=block', 'w3-total-cache' ) ?></option>
193
+ </select>
194
+ <div id="browsercache_security_xss_directive_description"></div>
195
+ </td>
196
+ </tr>
197
+ <tr>
198
+ <th colspan="2">
199
+ <?php $this->checkbox( 'browsercache.security.xcto' ) ?> <?php Util_Ui::e_config_label( 'browsercache.security.xcto' ) ?></label>
200
+ <p class="description"><?php _e( 'This instructs the browser to not MIME-sniff a response outside its declared content-type. It helps to reduce drive-by download attacks and stops sites from serving malevolent content that could masquerade as an executable or dynamic HTML file.', 'w3-total-cache' ) ?></p>
201
+ </th>
202
+ </tr>
203
+ <tr>
204
+ <th colspan="2">
205
+ <?php $this->checkbox( 'browsercache.security.pkp' ) ?> <?php Util_Ui::e_config_label( 'browsercache.security.pkp' ) ?></label>
206
+ <p class="description"><?php _e( '<acronym title="Hypertext Transfer Protocol">HTTP</acronym> Public Key Pinning (<acronym title="HTTP Public Key Pinning">HPKP</acronym>) is a security feature for <acronym title="Hypertext Transfer Protocol">HTTP</acronym>S websites that can prevent fraudulently issued certificates from being used to impersonate existing secure websites.' ) ?></p>
207
+ </th>
208
+ </tr>
209
+ <tr>
210
+ <th>
211
+ <label for="browsercache_security_pkp_pin"><?php Util_Ui::e_config_label( 'browsercache.security.pkp.pin' ) ?></label>
212
+ </th>
213
+ <td>
214
+ <input id="browsercache_security_pkp_pin" type="text" name="browsercache__security__pkp__pin"
215
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.pkp.pin' ) ) ?>" size="50" placeholder="Enter the Base64-Encode of the SHA256 Hash" />
216
+ <div><i><?php _e( 'This field is <b>required</b> and represents a <acronym title="Subject Public Key Information">SPKI</acronym> fingerprint. This pin is any public key within your current certificate chain.' ) ?></i></div>
217
+ </td>
218
+ </tr>
219
+ <tr>
220
+ <th>
221
+ <label for="browsercache_security_pkp_pin_backup"><?php Util_Ui::e_config_label( 'browsercache.security.pkp.pin.backup' ) ?></label>
222
+ </th>
223
+ <td>
224
+ <input id="browsercache_security_pkp_pin_backup" type="text" name="browsercache__security__pkp__pin__backup"
225
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.pkp.pin.backup' ) ) ?>" size="50" placeholder="Enter the Base64-Encode of the SHA256 Hash" />
226
+ <div><i><?php _e( 'This field is <b>also required</b> and represents your backup <acronym title="Subject Public Key Information">SPKI</acronym> fingerprint. This pin is any public key not in your current certificate chain and serves as a backup in case your certificate expires or has to be revoked.' ) ?></i></div>
227
+ </td>
228
+ </tr>
229
+ <tr>
230
+ <th>
231
+ <label for="browsercache_security_pkp_extra"><?php Util_Ui::e_config_label( 'browsercache.security.pkp.extra' ) ?></label>
232
+ </th>
233
+ <td>
234
+ <select id="browsercache_security_pkp_extra"
235
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
236
+ name="browsercache__security__pkp__extra">
237
+ <?php $value = $this->_config->get_string( 'browsercache.security.pkp.extra' ) ?>
238
+ <option value="maxage"<?php selected( $value, 'maxage' ) ?>><?php _e( 'max-age=EXPIRES_SECONDS', 'w3-total-cache' ) ?></option>
239
+ <option value="maxageinc"<?php selected( $value, 'maxageinc' ) ?>><?php _e( 'max-age=EXPIRES_SECONDS; includeSubDomains', 'w3-total-cache' ) ?></option>
240
+ </select>
241
+ <div id="browsercache_security_pkp_extra_description"></div>
242
+ </td>
243
+ </tr>
244
+ <tr>
245
+ <th>
246
+ <label for="browsercache_security_pkp_report_url"><?php Util_Ui::e_config_label( 'browsercache.security.pkp.report.url' ) ?></label>
247
+ </th>
248
+ <td>
249
+ <input id="browsercache_security_pkp_report_url" type="text" name="browsercache__security__pkp__report__url"
250
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.pkp.report.url' ) ) ?>" size="50" placeholder="Enter URL" />
251
+ <div><i><?php _e( 'This optional field can be used to specify a <acronym title="Uniform Resource Locator">URL</acronym> that clients will send reports to if pin validation failures occur. The report is sent as a POST request with a JSON body.' ) ?></i></div>
252
+ </td>
253
+ </tr>
254
+ <tr>
255
+ <th>
256
+ <label for="browsercache_security_pkp_report_only"><?php Util_Ui::e_config_label( 'browsercache.security.pkp.report.only' ) ?></label>
257
+ </th>
258
+ <td>
259
+ <select id="browsercache_security_pkp_report_only"
260
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
261
+ name="browsercache__security__pkp__report__only">
262
+ <?php $value = $this->_config->get_string( 'browsercache.security.pkp.report.only' ) ?>
263
+ <option value="0"<?php selected( $value, '0' ) ?>><?php _e( 'No = Enforce HPKP', 'w3-total-cache' ) ?></option>
264
+ <option value="1"<?php selected( $value, '1' ) ?>><?php _e( 'Yes = Don\'t Enforce HPKP', 'w3-total-cache' ) ?></option>
265
+ </select>
266
+ <div id="browsercache_security_pkp_report_only_description"></div>
267
+ </td>
268
+ </tr>
269
+ <tr>
270
+ <th colspan="2">
271
+ <?php $this->checkbox( 'browsercache.security.referrer.policy' ) ?> <?php Util_Ui::e_config_label( 'browsercache.security.referrer.policy' ) ?></label>
272
+ <p class="description"><?php _e( 'This header restricts the values of the referer header in outbound links.' ) ?></p>
273
+ </th>
274
+ </tr>
275
+ <tr>
276
+ <th>
277
+ <label for="browsercache_security_referrer_policy_directive"><?php Util_Ui::e_config_label( 'browsercache.security.referrer.policy.directive' ) ?></label>
278
+ </th>
279
+ <td>
280
+ <select id="browsercache_security_referrer_policy_directive"
281
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
282
+ name="browsercache__security__referrer__policy__directive">
283
+ <?php $value = $this->_config->get_string( 'browsercache.security.referrer.policy.directive' ) ?>
284
+ <option value="0"<?php selected( $value, '0' ) ?>><?php _e( 'Not Set', 'w3-total-cache' ) ?></option>
285
+ <option value="no-referrer"<?php selected( $value, 'no-referrer' ) ?>><?php _e( 'no-referrer', 'w3-total-cache' ) ?></option>
286
+ <option value="no-referrer-when-downgrade"<?php selected( $value, 'no-referrer-when-downgrade' ) ?>><?php _e( 'no-referrer-when-downgrade', 'w3-total-cache' ) ?></option>
287
+ <option value="same-origin"<?php selected( $value, 'same-origin' ) ?>><?php _e( 'same-origin', 'w3-total-cache' ) ?></option>
288
+ <option value="origin"<?php selected( $value, 'origin' ) ?>><?php _e( 'origin', 'w3-total-cache' ) ?></option>
289
+ <option value="strict-origin"<?php selected( $value, 'strict-origin' ) ?>><?php _e( 'strict-origin', 'w3-total-cache' ) ?></option>
290
+ <option value="origin-when-cross-origin"<?php selected( $value, 'origin-when-cross-origin' ) ?>><?php _e( 'origin-when-cross-origin', 'w3-total-cache' ) ?></option>
291
+ <option value="strict-origin-when-cross-origin"<?php selected( $value, 'strict-origin-when-cross-origin' ) ?>><?php _e( 'strict-origin-when-cross-origin', 'w3-total-cache' ) ?></option>
292
+ <option value="unsafe-url"<?php selected( $value, 'unsafe-url' ) ?>><?php _e( 'unsafe-url', 'w3-total-cache' ) ?></option>
293
+ </select>
294
+ <div id="browsercache_security_referrer_policy_directive_description"></div>
295
+ </td>
296
+ </tr>
297
+ <tr>
298
+ <th colspan="2">
299
+ <?php $this->checkbox( 'browsercache.security.csp' ) ?> <?php Util_Ui::e_config_label( 'browsercache.security.csp' ) ?></label>
300
+ <p class="description"><?php _e( 'The Content Security Policy (<acronym title="Content Security Policy">CSP</acronym>) header reduces the risk of <acronym title="Cross-Site Scripting">XSS</acronym> attacks by allowing you to define where resources can be retrieved from, preventing browsers from loading data from any other locations. This makes it harder for an attacker to inject malicious code into your site.' ) ?></p>
301
+ </th>
302
+ </tr>
303
+ <tr>
304
+ <th>
305
+ <label for="browsercache_security_csp_base"><?php Util_Ui::e_config_label( 'browsercache.security.csp.base' ) ?></label>
306
+ </th>
307
+ <td>
308
+ <input id="browsercache_security_csp_base" type="text" name="browsercache__security__csp__base"
309
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.base' ) ) ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
310
+ <div><i><?php _e( 'Restricts the <acronym title="Uniform Resource Locator">URL</acronym>s which can be used in a document\'s &lt;base&gt; element.' ) ?></i></div>
311
+ </td>
312
+ </tr>
313
+ <tr>
314
+ <th>
315
+ <label for="browsercache_security_csp_connect"><?php Util_Ui::e_config_label( 'browsercache.security.csp.connect' ) ?></label>
316
+ </th>
317
+ <td>
318
+ <input id="browsercache_security_csp_connect" type="text" name="browsercache__security__csp__connect"
319
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.connect' ) ) ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
320
+ <div><i><?php _e( 'Limits the origins to which you can connect via XMLHttpRequest, WebSockets, and EventSource.' ) ?></i></div>
321
+ </td>
322
+ </tr>
323
+ <tr>
324
+ <th>
325
+ <label for="browsercache_security_csp_font"><?php Util_Ui::e_config_label( 'browsercache.security.csp.font' ) ?></label>
326
+ </th>
327
+ <td>
328
+ <input id="browsercache_security_csp_font" type="text" name="browsercache__security__csp__font"
329
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.font' ) ) ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
330
+ <div><i><?php _e( 'Specifies the origins that can serve web fonts.' ) ?></i></div>
331
+ </td>
332
+ </tr>
333
+ <tr>
334
+ <th>
335
+ <label for="browsercache_security_csp_frame"><?php Util_Ui::e_config_label( 'browsercache.security.csp.frame' ) ?></label>
336
+ </th>
337
+ <td>
338
+ <input id="browsercache_security_csp_frame" type="text" name="browsercache__security__csp__frame"
339
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.frame' ) ) ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
340
+ <div><i><?php _e( 'Restricts from where the protected resource can embed frames.' ) ?></i></div>
341
+ </td>
342
+ </tr>
343
+ <tr>
344
+ <th>
345
+ <label for="browsercache_security_csp_img"><?php Util_Ui::e_config_label( 'browsercache.security.csp.img' ) ?></label>
346
+ </th>
347
+ <td>
348
+ <input id="browsercache_security_csp_img" type="text" name="browsercache__security__csp__img"
349
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.img' ) ) ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
350
+ <div><i><?php _e( 'Specifies valid sources for images and favicons.' ) ?></i></div>
351
+ </td>
352
+ </tr>
353
+ <tr>
354
+ <th>
355
+ <label for="browsercache_security_csp_media"><?php Util_Ui::e_config_label( 'browsercache.security.csp.media' ) ?></label>
356
+ </th>
357
+ <td>
358
+ <input id="browsercache_security_csp_media" type="text" name="browsercache__security__csp__media"
359
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.media' ) ) ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
360
+ <div><i><?php _e( 'Specifies valid sources for loading media using the &lt;audio&gt; and &lt;video&gt; elements.' ) ?></i></div>
361
+ </td>
362
+ </tr>
363
+ <tr>
364
+ <th>
365
+ <label for="browsercache_security_csp_object"><?php Util_Ui::e_config_label( 'browsercache.security.csp.object' ) ?></label>
366
+ </th>
367
+ <td>
368
+ <input id="browsercache_security_csp_object" type="text" name="browsercache__security__csp__object"
369
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.object' ) ) ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
370
+ <div><i><?php _e( 'Allows control over the &lt;object&gt;, &lt;embed&gt;, and &lt;applet&gt; elements used by Flash and other plugins.' ) ?></i></div>
371
+ </td>
372
+ </tr>
373
+ <tr>
374
+ <th>
375
+ <label for="browsercache_security_csp_script"><?php Util_Ui::e_config_label( 'browsercache.security.csp.script' ) ?></label>
376
+ </th>
377
+ <td>
378
+ <input id="browsercache_security_csp_script" type="text" name="browsercache__security__csp__script"
379
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.script' ) ) ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
380
+ <div><i><?php _e( 'Specifies valid sources for JavaScript.' ) ?></i></div>
381
+ </td>
382
+ </tr>
383
+ <tr>
384
+ <th>
385
+ <label for="browsercache_security_csp_style"><?php Util_Ui::e_config_label( 'browsercache.security.csp.style' ) ?></label>
386
+ </th>
387
+ <td>
388
+ <input id="browsercache_security_csp_style" type="text" name="browsercache__security__csp__style"
389
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.style' ) ) ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
390
+ <div><i><?php _e( 'Specifies valid sources for <acronym title="Cascading Style Sheet">CSS</acronym> stylesheets.' ) ?></i></div>
391
+ </td>
392
+ </tr>
393
+ <tr>
394
+ <th>
395
+ <label for="browsercache_security_csp_form"><?php Util_Ui::e_config_label( 'browsercache.security.csp.form' ) ?></label>
396
+ </th>
397
+ <td>
398
+ <input id="browsercache_security_csp_form" type="text" name="browsercache__security__csp__form"
399
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.form' ) ) ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
400
+ <div><i><?php _e( 'Restricts the <acronym title="Uniform Resource Locator">URL</acronym>s which can be used as the target of form submissions from a given context.' ) ?></i></div>
401
+ </td>
402
+ </tr>
403
+ <tr>
404
+ <th>
405
+ <label for="browsercache_security_csp_frame_ancestors"><?php Util_Ui::e_config_label( 'browsercache.security.csp.frame.ancestors' ) ?></label>
406
+ </th>
407
+ <td>
408
+ <input id="browsercache_security_csp_frame_ancestors" type="text" name="browsercache__security__csp__frame__ancestors"
409
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.frame.ancestors' ) ) ?>" size="50" placeholder="Example: 'none'" />
410
+ <div><i><?php _e( 'Specifies valid parents that may embed a page using &lt;frame&gt;, &lt;iframe&gt;, &lt;object&gt;, &lt;embed&gt;, or &lt;applet&gt;.' ) ?></i></div>
411
+ </td>
412
+ </tr>
413
+ <tr>
414
+ <th>
415
+ <label for="browsercache_security_csp_plugin"><?php Util_Ui::e_config_label( 'browsercache.security.csp.plugin' ) ?></label>
416
+ </th>
417
+ <td>
418
+ <input id="browsercache_security_csp_plugin" type="text" name="browsercache__security__csp__plugin"
419
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.plugin' ) ) ?>" size="50" placeholder="Example: application/x-shockwave-flash" />
420
+ <div><i><?php _e( 'Restricts the set of plugins that can be embedded into a document by limiting the types of resources which can be loaded.' ) ?></i></div>
421
+ </td>
422
+ </tr>
423
+ <tr>
424
+ <th>
425
+ <label for="browsercache_security_csp_sandbox"><?php Util_Ui::e_config_label( 'browsercache.security.csp.sandbox' ) ?></label>
426
+ </th>
427
+ <td>
428
+ <input id="browsercache_security_csp_sandbox" type="text" name="browsercache__security__csp__sandbox"
429
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.sandbox' ) ) ?>" size="50" placeholder="Example: allow-popups" />
430
+ <div><i><?php _e( 'This directive operates similarly to the &lt;iframe&gt; sandbox attribute by applying restrictions to a page\'s actions, including preventing popups, preventing the execution of plugins and scripts, and enforcing a same-origin policy.' ) ?></i></div>
431
+ </td>
432
+ </tr>
433
+ <tr>
434
+ <th>
435
+ <label for="browsercache_security_csp_default"><?php Util_Ui::e_config_label( 'browsercache.security.csp.default' ) ?></label>
436
+ </th>
437
+ <td>
438
+ <input id="browsercache_security_csp_default" type="text" name="browsercache__security__csp__default"
439
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.default' ) ) ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
440
+ <div><i><?php _e( 'Defines the defaults for directives you leave unspecified. Generally, this applies to any directive that ends with -src.' ) ?></i></div>
441
+ </td>
442
+ </tr>
443
+ <?php
444
+ Util_Ui::config_item( array(
445
+ 'key' => 'browsercache.security.fp',
446
+ 'disabled' => Util_Ui::sealing_disabled( 'browsercache.' ),
447
+ 'control' => 'checkbox',
448
+ 'checkbox_label' => __( 'Feature-Policy', 'w3-total-cache' ),
449
+ 'description' => __( 'Allows you to control which origins can use which features.', 'w3-total-cache' ),
450
+ 'label_class' => 'w3tc_single_column'
451
+ ) )
452
+ ?>
453
+
454
+ <?php foreach ( $feature_policies as $i ): ?>
455
+ <?php
456
+ Util_Ui::config_item( array(
457
+ 'key' => 'browsercache.security.fp.values.keyvalues.' . $i['label'],
458
+ 'value' => !empty( $fp_values[$i['label']] ) ? $fp_values[$i['label']] : '',
459
+ 'disabled' => Util_Ui::sealing_disabled( 'browsercache.' ),
460
+ 'control' => 'textbox',
461
+ 'label' => $i['label'],
462
+ 'textbox_size' => '50',
463
+ 'textbox_placeholder' => "One of: 'self' 'src' 'none' *.domain.com",
464
+ 'description' => $i['description']
465
+ ) )
466
+ ?>
467
+ <?php endforeach ?>
468
+ </table>
469
+
470
+ <?php Util_Ui::button_config_save( 'browsercache_security' ) ?>
471
+ <?php Util_Ui::postbox_footer() ?>
BrowserCache_Plugin_Admin.php CHANGED
@@ -9,5 +9,30 @@ class BrowserCache_Plugin_Admin {
9
 
10
  add_action( 'w3tc_ajax',
11
  array( '\W3TC\BrowserCache_Page', 'w3tc_ajax' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  }
13
  }
9
 
10
  add_action( 'w3tc_ajax',
11
  array( '\W3TC\BrowserCache_Page', 'w3tc_ajax' ) );
12
+
13
+ add_action( 'w3tc_config_ui_save-w3tc_browsercache',
14
+ array( $this, 'w3tc_config_ui_save_w3tc_browsercache' ),
15
+ 10, 2 );
16
+ }
17
+
18
+
19
+
20
+ public function w3tc_config_ui_save_w3tc_browsercache( $config, $old_config ) {
21
+ $prefix = 'browsercache__security__fp__values__keyvalues__';
22
+ $prefixl = strlen( $prefix );
23
+
24
+ $fp_values = array();
25
+
26
+ foreach ( $_REQUEST as $key => $value ) {
27
+ $value = stripslashes( $value ); // wp core add slashes
28
+ if ( substr( $key, 0, $prefixl ) == $prefix ) {
29
+ $k = substr( $key, $prefixl );
30
+ if ( !empty( $value ) ) {
31
+ $fp_values[$k] = $value;
32
+ }
33
+ }
34
+ }
35
+
36
+ $config->set( 'browsercache.security.fp.values', $fp_values );
37
  }
38
  }
Cdn_Highwinds_Page_View.php CHANGED
@@ -34,26 +34,25 @@ $hash_code = $config->get_string( 'cdn.highwinds.host.hash_code' );
34
  <option value="enabled"<?php selected( $config->get_string( 'cdn.highwinds.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
35
  <option value="disabled"<?php selected( $config->get_string( 'cdn.highwinds.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
36
  </select>
37
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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 $cnames = $config->get_array( 'cdn.highwinds.host.domains' ); include W3TC_INC_DIR . '/options/cdn/common/cnames-readonly.php'; ?>
44
  <input class="w3tc_cdn_highwinds_configure_cnames_form button" type="button"
45
  value="<?php _e( 'Configure <acronym title="Canonical Name">CNAME</acronym>s', 'w3-total-cache' ); ?>" />
46
- <br />
47
- <span class="description"><?php _e( 'Hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></span>
48
- </td>
49
  </tr>
50
  <tr>
51
  <th colspan="2">
52
- <input id="cdn_test"
53
- class="button {type: 'highwinds', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}"
54
- type="button"
55
- value="<?php _e( 'Test', 'w3-total-cache' ); ?>" />
56
- <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
57
- </th>
58
  </tr>
59
  <?php endif ?>
34
  <option value="enabled"<?php selected( $config->get_string( 'cdn.highwinds.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
35
  <option value="disabled"<?php selected( $config->get_string( 'cdn.highwinds.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
36
  </select>
37
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' ); ?></p>
38
  </td>
39
  </tr>
40
  <tr>
41
+ <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
42
+ <td>
43
  <?php $cnames = $config->get_array( 'cdn.highwinds.host.domains' ); include W3TC_INC_DIR . '/options/cdn/common/cnames-readonly.php'; ?>
44
  <input class="w3tc_cdn_highwinds_configure_cnames_form button" type="button"
45
  value="<?php _e( 'Configure <acronym title="Canonical Name">CNAME</acronym>s', 'w3-total-cache' ); ?>" />
46
+ <p class="description"><?php _e( 'Hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></p>
47
+ </td>
 
48
  </tr>
49
  <tr>
50
  <th colspan="2">
51
+ <input id="cdn_test"
52
+ class="button {type: 'highwinds', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}"
53
+ type="button"
54
+ value="<?php _e( 'Test', 'w3-total-cache' ); ?>" />
55
+ <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
56
+ </th>
57
  </tr>
58
  <?php endif ?>
Cdn_Highwinds_Popup_View_ConfigureCnamesForm.php CHANGED
@@ -5,21 +5,20 @@ if ( !defined( 'W3TC' ) )
5
  die();
6
  ?>
7
  <form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px" class="w3tc_cdn_highwinds_form">
8
- <?php
9
  if ( !empty( $details['error_message'] ) )
10
  echo '<div class="error">' . $details['error_message'] . '</div>';
11
  ?>
12
- <div class="metabox-holder">
13
- <?php Util_Ui::postbox_header( __( '<acronym title="Canonical Name">CNAME</acronym>s to use', 'w3-total-cache' ) ); ?>
14
- <?php $cname_class = 'w3tc-ignore-change'; include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
15
- <br />
16
- <span class="description"><?php _e( 'Enter hostname mapped to <acronym title="Content Delivery Network">CDN</acronym> host, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></span>
17
 
18
- <p class="submit">
19
- <input type="button"
20
- class="w3tc_cdn_highwinds_configure_cnames w3tc-button-save button-primary"
21
- value="<?php _e( 'Apply', 'w3-total-cache' ); ?>" />
22
- </p>
23
- <?php Util_Ui::postbox_footer(); ?>
24
- </div>
25
  </form>
5
  die();
6
  ?>
7
  <form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px" class="w3tc_cdn_highwinds_form">
8
+ <?php
9
  if ( !empty( $details['error_message'] ) )
10
  echo '<div class="error">' . $details['error_message'] . '</div>';
11
  ?>
12
+ <div class="metabox-holder">
13
+ <?php Util_Ui::postbox_header( __( '<acronym title="Canonical Name">CNAME</acronym>s to use', 'w3-total-cache' ) ); ?>
14
+ <?php $cname_class = 'w3tc-ignore-change'; include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
15
+ <p class="description"><?php _e( 'Enter hostname mapped to <acronym title="Content Delivery Network">CDN</acronym> host, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></p>
 
16
 
17
+ <p class="submit">
18
+ <input type="button"
19
+ class="w3tc_cdn_highwinds_configure_cnames w3tc-button-save button-primary"
20
+ value="<?php _e( 'Apply', 'w3-total-cache' ); ?>" />
21
+ </p>
22
+ <?php Util_Ui::postbox_footer(); ?>
23
+ </div>
24
  </form>
Cdn_LimeLight_Page_View.php CHANGED
@@ -28,24 +28,23 @@ $api_key = $config->get_string( 'cdn.limelight.api_key' );
28
  <option value="enabled"<?php selected( $config->get_string( 'cdn.limelight.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
29
  <option value="disabled"<?php selected( $config->get_string( 'cdn.limelight.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
30
  </select>
31
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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 = $config->get_array( 'cdn.limelight.host.domains' ); include W3TC_INC_DIR . '/options/cdn/common/cnames-readonly.php'; ?>
38
- <br />
39
- <span class="description"><?php _e( 'Hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></span>
40
- </td>
41
  </tr>
42
  <tr>
43
  <th colspan="2">
44
- <input id="cdn_test"
45
- class="button {type: 'limelight', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}"
46
- type="button"
47
- value="<?php _e( 'Test', 'w3-total-cache' ); ?>" />
48
- <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
49
- </th>
50
  </tr>
51
  <?php endif ?>
28
  <option value="enabled"<?php selected( $config->get_string( 'cdn.limelight.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
29
  <option value="disabled"<?php selected( $config->get_string( 'cdn.limelight.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
30
  </select>
31
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' ); ?></p>
32
  </td>
33
  </tr>
34
  <tr>
35
+ <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
36
+ <td>
37
  <?php $cnames = $config->get_array( 'cdn.limelight.host.domains' ); include W3TC_INC_DIR . '/options/cdn/common/cnames-readonly.php'; ?>
38
+ <p class="description"><?php _e( 'Hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></p>
39
+ </td>
 
40
  </tr>
41
  <tr>
42
  <th colspan="2">
43
+ <input id="cdn_test"
44
+ class="button {type: 'limelight', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}"
45
+ type="button"
46
+ value="<?php _e( 'Test', 'w3-total-cache' ); ?>" />
47
+ <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
48
+ </th>
49
  </tr>
50
  <?php endif ?>
Cdn_MaxCdn_Page_View.php CHANGED
@@ -6,14 +6,13 @@ if ( !defined( 'W3TC' ) )
6
 
7
  ?>
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( Util_Ui::admin_url( 'admin.php?page=w3tc_dashboard&w3tc_cdn_maxcdn_signup' ), 'w3tc' ) )?>" target="_blank" id="netdna-maxcdn-create-account" class="button-primary"><?php w3tc_e( 'cdn.maxcdn.signUpAndSave', 'Sign Up Now and save!' ) ?></a>
13
- <br />
14
- <span class="description"><?php w3tc_e( 'cdn.maxcdn.signUpAndSave.description', 'MaxCDN is a service that lets you speed up your site even more with W3 Total Cache. Sign up now to recieve a special offer!' ) ?></span>
15
- </td>
16
- </tr>
17
  <?php endif ?>
18
 
19
 
@@ -46,11 +45,11 @@ if ( !defined( 'W3TC' ) )
46
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="Hypertext Transfer Protocol">HTTP</acronym> <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
47
  </th>
48
  <td class="w3tc_config_value_text">
49
- <?php echo htmlspecialchars( $http_domain ) ?><br />
50
- <span class="description">
51
  This website domain has to be CNAME pointing to this
52
  <acronym title="Content Delivery Network">CDN</acronym> domain for <acronym title="Hypertext Transfer Protocol">HTTP</acronym> requests
53
- </span>
54
  </td>
55
  </tr>
56
  <?php endif ?>
@@ -60,11 +59,11 @@ if ( !defined( 'W3TC' ) )
60
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="Hypertext Transfer Protocol">HTTP</acronym>S <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
61
  </th>
62
  <td class="w3tc_config_value_text">
63
- <?php echo htmlspecialchars( $https_domain ) ?><br />
64
- <span class="description">
65
  This website domain has to be <acronym title="Canonical Name">CNAME</acronym> pointing to this
66
  <acronym title="Content Delivery Network">CDN</acronym> domain for <acronym title="HyperText Transfer Protocol over SSL">HTTPS</acronym> requests
67
- </span>
68
  </td>
69
  </tr>
70
  <?php endif ?>
@@ -77,20 +76,20 @@ if ( !defined( 'W3TC' ) )
77
  <option value="enabled"<?php selected( $config->get_string( 'cdn.maxcdn.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use <acronym title="Secure Sockets Layer">SSL</acronym>)', 'w3-total-cache' )?></option>
78
  <option value="disabled"<?php selected( $config->get_string( 'cdn.maxcdn.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use <acronym title="Hypertext Transfer Protocol">HTTP</acronym>)', 'w3-total-cache' )?></option>
79
  </select>
80
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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>
81
  </td>
82
  </tr>
83
  <tr>
84
- <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' )?></th>
85
- <td>
86
  <?php $cnames = $config->get_array( 'cdn.maxcdn.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
87
- <br /><span class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' )?></span>
88
- </td>
89
  </tr>
90
  <tr>
91
  <th colspan="2">
92
- <input id="cdn_test" class="button {type: 'maxcdn', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}" type="button" value="<?php _e( 'Test MaxCDN', 'w3-total-cache' )?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
93
- </th>
94
  </tr>
95
 
96
  <?php endif ?>
6
 
7
  ?>
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( Util_Ui::admin_url( 'admin.php?page=w3tc_dashboard&w3tc_cdn_maxcdn_signup' ), 'w3tc' ) )?>" target="_blank" id="netdna-maxcdn-create-account" class="button-primary"><?php w3tc_e( 'cdn.maxcdn.signUpAndSave', 'Sign Up Now and save!' ) ?></a>
13
+ <p class="description"><?php w3tc_e( 'cdn.maxcdn.signUpAndSave.description', 'MaxCDN is a service that lets you speed up your site even more with W3 Total Cache. Sign up now to recieve a special offer!' ) ?></p>
14
+ </td>
15
+ </tr>
 
16
  <?php endif ?>
17
 
18
 
45
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="Hypertext Transfer Protocol">HTTP</acronym> <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
46
  </th>
47
  <td class="w3tc_config_value_text">
48
+ <?php echo htmlspecialchars( $http_domain ) ?>
49
+ <p class="description">
50
  This website domain has to be CNAME pointing to this
51
  <acronym title="Content Delivery Network">CDN</acronym> domain for <acronym title="Hypertext Transfer Protocol">HTTP</acronym> requests
52
+ </p>
53
  </td>
54
  </tr>
55
  <?php endif ?>
59
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="Hypertext Transfer Protocol">HTTP</acronym>S <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
60
  </th>
61
  <td class="w3tc_config_value_text">
62
+ <?php echo htmlspecialchars( $https_domain ) ?>
63
+ <p class="description">
64
  This website domain has to be <acronym title="Canonical Name">CNAME</acronym> pointing to this
65
  <acronym title="Content Delivery Network">CDN</acronym> domain for <acronym title="HyperText Transfer Protocol over SSL">HTTPS</acronym> requests
66
+ </p>
67
  </td>
68
  </tr>
69
  <?php endif ?>
76
  <option value="enabled"<?php selected( $config->get_string( 'cdn.maxcdn.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use <acronym title="Secure Sockets Layer">SSL</acronym>)', 'w3-total-cache' )?></option>
77
  <option value="disabled"<?php selected( $config->get_string( 'cdn.maxcdn.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use <acronym title="Hypertext Transfer Protocol">HTTP</acronym>)', 'w3-total-cache' )?></option>
78
  </select>
79
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' )?></p>
80
  </td>
81
  </tr>
82
  <tr>
83
+ <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' )?></th>
84
+ <td>
85
  <?php $cnames = $config->get_array( 'cdn.maxcdn.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
86
+ <p class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' )?></p>
87
+ </td>
88
  </tr>
89
  <tr>
90
  <th colspan="2">
91
+ <input id="cdn_test" class="button {type: 'maxcdn', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}" type="button" value="<?php _e( 'Test MaxCDN', 'w3-total-cache' )?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
92
+ </th>
93
  </tr>
94
 
95
  <?php endif ?>
Cdn_MaxCdn_Popup_View_Intro.php CHANGED
@@ -5,35 +5,34 @@ if ( !defined( 'W3TC' ) )
5
  die();
6
  ?>
7
  <form class="w3tc_cdn_maxcdn_form">
8
- <?php
9
  if ( isset( $details['error_message'] ) )
10
  echo '<div class="error">' . $details['error_message'] . '</div>';
11
  ?>
12
- <div class="metabox-holder">
13
- <?php Util_Ui::postbox_header(
14
  __( 'Your MaxCDN Account credentials', 'w3-total-cache' ) ); ?>
15
- <table class="form-table">
16
- <tr>
17
- <td>API Key:</td>
18
- <td>
19
- <input name="api_key" type="text" class="w3tc-ignore-change"
20
- style="width: 550px"
21
- value="<?php echo esc_attr( $details['api_key'] ) ?>" />
22
- <br />
23
- <span class="description">
24
- To obtain API key you can
25
- <a target="_blank" href="<?php echo esc_attr( $url_obtain_key ) ?>">click here</a>,
26
- log in, and paste the key in above field.
27
- </span>
28
- </td>
29
- </tr>
30
- </table>
31
 
32
- <p class="submit">
33
- <input type="button"
34
- class="w3tc_cdn_maxcdn_list_zones w3tc-button-save button-primary"
35
- value="<?php _e( 'Next', 'w3-total-cache' ); ?>" />
36
- </p>
37
- <?php Util_Ui::postbox_footer(); ?>
38
- </div>
39
  </form>
5
  die();
6
  ?>
7
  <form class="w3tc_cdn_maxcdn_form">
8
+ <?php
9
  if ( isset( $details['error_message'] ) )
10
  echo '<div class="error">' . $details['error_message'] . '</div>';
11
  ?>
12
+ <div class="metabox-holder">
13
+ <?php Util_Ui::postbox_header(
14
  __( 'Your MaxCDN Account credentials', 'w3-total-cache' ) ); ?>
15
+ <table class="form-table">
16
+ <tr>
17
+ <td>API Key:</td>
18
+ <td>
19
+ <input name="api_key" type="text" class="w3tc-ignore-change"
20
+ style="width: 550px"
21
+ value="<?php echo esc_attr( $details['api_key'] ) ?>" />
22
+ <p class="description">
23
+ To obtain API key you can
24
+ <a target="_blank" href="<?php echo esc_attr( $url_obtain_key ) ?>">click here</a>,
25
+ log in, and paste the key in above field.
26
+ </p>
27
+ </td>
28
+ </tr>
29
+ </table>
 
30
 
31
+ <p class="submit">
32
+ <input type="button"
33
+ class="w3tc_cdn_maxcdn_list_zones w3tc-button-save button-primary"
34
+ value="<?php _e( 'Next', 'w3-total-cache' ); ?>" />
35
+ </p>
36
+ <?php Util_Ui::postbox_footer(); ?>
37
+ </div>
38
  </form>
Cdn_RackSpaceCdn_Page_View.php CHANGED
@@ -45,39 +45,37 @@ if ( !defined( 'W3TC' ) )
45
  </tr>
46
  <?php if ( $config->get_string( 'cdn.rackspace_cdn.service.protocol' ) == 'http' ): ?>
47
  <tr>
48
- <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
49
- <td>
50
  <?php $cnames = $config->get_array( 'cdn.rackspace_cdn.domains' ); include W3TC_INC_DIR . '/options/cdn/common/cnames-readonly.php'; ?>
51
  <input class="w3tc_cdn_rackspace_configure_domains button" type="button"
52
  value="<?php _e( 'Configure CNAMEs', 'w3-total-cache' ); ?>" />
53
- <br />
54
- <span class="description">
55
- <?php _e( 'Enter hostname mapped to <acronym title="Content Delivery Network">CDN</acronym> host, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?>
56
- </span>
57
- </td>
58
  </tr>
59
  <?php else: ?>
60
  <tr>
61
- <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
62
- <td>
63
  <?php $cnames = $config->get_array( 'cdn.rackspace_cdn.domains' ); include W3TC_INC_DIR . '/options/cdn/common/cnames-readonly.php'; ?>
64
  <input name="w3tc_cdn_rackspace_cdn_domains_reload"
65
- class="w3tc-button-save button" type="submit"
66
  value="<?php _e( 'Reload C<acronym title="Canonical Name">CNAME</acronym>s from RackSpace', 'w3-total-cache' ); ?>" />
67
- <br />
68
- <span class="description">
69
- <?php _e( 'Hostname(s) mapped to <acronym title="Content Delivery Network">CDN</acronym> host, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>. You can manage them from RackSpace management console and load here afterwards.', 'w3-total-cache' ); ?>
70
- </span>
71
- </td>
72
  </tr>
73
  <?php endif ?>
74
  <tr>
75
  <th colspan="2">
76
- <input id="cdn_test"
77
- class="button {type: 'rackspace_cdn', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}"
78
- type="button"
79
- value="<?php _e( 'Test', 'w3-total-cache' ); ?>" />
80
- <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
81
- </th>
82
  </tr>
83
  <?php endif ?>
45
  </tr>
46
  <?php if ( $config->get_string( 'cdn.rackspace_cdn.service.protocol' ) == 'http' ): ?>
47
  <tr>
48
+ <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
49
+ <td>
50
  <?php $cnames = $config->get_array( 'cdn.rackspace_cdn.domains' ); include W3TC_INC_DIR . '/options/cdn/common/cnames-readonly.php'; ?>
51
  <input class="w3tc_cdn_rackspace_configure_domains button" type="button"
52
  value="<?php _e( 'Configure CNAMEs', 'w3-total-cache' ); ?>" />
53
+ <p class="description">
54
+ <?php _e( 'Enter hostname mapped to <acronym title="Content Delivery Network">CDN</acronym> host, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?>
55
+ </p>
56
+ </td>
 
57
  </tr>
58
  <?php else: ?>
59
  <tr>
60
+ <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
61
+ <td>
62
  <?php $cnames = $config->get_array( 'cdn.rackspace_cdn.domains' ); include W3TC_INC_DIR . '/options/cdn/common/cnames-readonly.php'; ?>
63
  <input name="w3tc_cdn_rackspace_cdn_domains_reload"
64
+ class="w3tc-button-save button" type="submit"
65
  value="<?php _e( 'Reload C<acronym title="Canonical Name">CNAME</acronym>s from RackSpace', 'w3-total-cache' ); ?>" />
66
+ <p class="description">
67
+ <?php _e( 'Hostname(s) mapped to <acronym title="Content Delivery Network">CDN</acronym> host, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>. You can manage them from RackSpace management console and load here afterwards.', 'w3-total-cache' ); ?>
68
+ </p>
69
+ </td>
 
70
  </tr>
71
  <?php endif ?>
72
  <tr>
73
  <th colspan="2">
74
+ <input id="cdn_test"
75
+ class="button {type: 'rackspace_cdn', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}"
76
+ type="button"
77
+ value="<?php _e( 'Test', 'w3-total-cache' ); ?>" />
78
+ <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
79
+ </th>
80
  </tr>
81
  <?php endif ?>
Cdn_RackSpaceCdn_Popup_View_ConfigureDomains.php CHANGED
@@ -5,21 +5,20 @@ if ( !defined( 'W3TC' ) )
5
  die();
6
  ?>
7
  <form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px" class="w3tc_cdn_rackspace_form">
8
- <?php
9
  if ( !empty( $details['error_message'] ) )
10
  echo '<div class="error">' . $details['error_message'] . '</div>';
11
  ?>
12
- <div class="metabox-holder">
13
- <?php Util_Ui::postbox_header( __( '<acronym title="Canonical Name">CNAME</acronym>s to use', 'w3-total-cache' ) ); ?>
14
- <?php $cname_class = 'w3tc-ignore-change'; include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
15
- <br />
16
- <span class="description"><?php _e( 'Enter hostname mapped to <acronym title="Content Delivery Network">CDN</acronym> host, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></span>
17
 
18
- <p class="submit">
19
- <input type="button"
20
- class="w3tc_cdn_rackspace_configure_domains_done w3tc-button-save button-primary"
21
- value="<?php _e( 'Apply', 'w3-total-cache' ); ?>" />
22
- </p>
23
- <?php Util_Ui::postbox_footer(); ?>
24
- </div>
25
  </form>
5
  die();
6
  ?>
7
  <form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px" class="w3tc_cdn_rackspace_form">
8
+ <?php
9
  if ( !empty( $details['error_message'] ) )
10
  echo '<div class="error">' . $details['error_message'] . '</div>';
11
  ?>
12
+ <div class="metabox-holder">
13
+ <?php Util_Ui::postbox_header( __( '<acronym title="Canonical Name">CNAME</acronym>s to use', 'w3-total-cache' ) ); ?>
14
+ <?php $cname_class = 'w3tc-ignore-change'; include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
15
+ <p class="description"><?php _e( 'Enter hostname mapped to <acronym title="Content Delivery Network">CDN</acronym> host, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></p>
 
16
 
17
+ <p class="submit">
18
+ <input type="button"
19
+ class="w3tc_cdn_rackspace_configure_domains_done w3tc-button-save button-primary"
20
+ value="<?php _e( 'Apply', 'w3-total-cache' ); ?>" />
21
+ </p>
22
+ <?php Util_Ui::postbox_footer(); ?>
23
+ </div>
24
  </form>
Cdn_RackSpaceCdn_Popup_View_Service_Create.php CHANGED
@@ -5,8 +5,8 @@ if ( !defined( 'W3TC' ) )
5
  die();
6
  ?>
7
  <form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px"
8
- class="w3tc_cdn_rackspace_form">
9
- <?php
10
  Util_Ui::hidden( '', 'user_name', $details['user_name'] );
11
  Util_Ui::hidden( '', 'api_key', $details['api_key'] );
12
  Util_Ui::hidden( '', 'access_token', $details['access_token'] );
@@ -15,82 +15,80 @@ Util_Ui::hidden( '', 'region', $details['region'] );
15
  echo Util_Ui::nonce_field( 'w3tc' );
16
 
17
  ?>
18
- <?php
19
  if ( isset( $details['error_message'] ) )
20
  echo '<div class="error">' . $details['error_message'] . '</div>';
21
  ?>
22
- <div class="metabox-holder">
23
- <?php Util_Ui::postbox_header( __( 'Create new service', 'w3-total-cache' ) ); ?>
24
- <table class="form-table" style="width: 100%">
25
- <tr>
26
- <th style="width: 150px">Name:</td>
27
- <td>
28
- <input name="name" type="text" class="w3tc-ignore-change"
29
- style="width: 100px"
30
- value="<?php echo esc_attr( $details['name'] ) ?>" />
31
- </td>
32
- </tr>
33
- <tr>
34
- <th style="white-space: nowrap">Traffic Type:</td>
35
- <td>
36
- <label>
37
- <input name="protocol" type="radio"
38
- class="w3tc-ignore-change w3tc_cdn_rackspace_protocol"
39
- value="http"
40
- <?php checked( $details['protocol'], 'http' ) ?> />
41
- http://
42
- </label>
43
- <br />
44
- <label>
45
- <input name="protocol" type="radio"
46
- class="w3tc-ignore-change w3tc_cdn_rackspace_protocol"
47
- value="https"
48
- <?php checked( $details['protocol'], 'https' ) ?> />
49
- https://
50
- </label>
51
- </td>
52
- </tr>
53
- <tr>
54
- <th>Origin:</td>
55
- <td>
56
- <?php echo $details['origin'] ?>
57
- </td>
58
- </tr>
59
- <tr class="w3tc_cdn_rackspace_cname_http"
60
- style="<?php echo $details['cname_http_style'] ?>">
61
- <th style="white-space: nowrap">Primary <acronym title="Canonical Name">CNAME</acronym>:</td>
62
- <td>
63
- <input name="cname_http" type="text" class="w3tc-ignore-change"
64
- style="width: 200px"
65
- value="<?php echo esc_attr( $details['cname_http'] ) ?>" />
66
- <br />
67
- <span class="description">
68
- <?php _e( 'The domain name through which visitors retrieve content. You will be provided with a target domain to use as an alias for this CNAME', 'w3-total-cache' ); ?>
69
- </span>
70
- </td>
71
- </tr>
72
- <tr class="w3tc_cdn_rackspace_cname_https"
73
- style="<?php echo $details['cname_https_style'] ?>">
74
- <th style="white-space: nowrap">Primary <acronym title="Canonical Name">CNAME</acronym>:</td>
75
- <td>
76
- <input name="cname_https_prefix" type="text" class="w3tc-ignore-change"
77
- style="width: 100px"
78
- value="<?php echo esc_attr( $details['cname_https_prefix'] ) ?>" />
79
- <input name="" type="text" readonly="readonly"
80
- value=".xxxx.secure.raxcdn.com" />
81
- <br />
82
- <span class="description">
83
- <?php _e( 'The name should be a single word, and cannot contain any dots (.).', 'w3-total-cache' ) ?>
84
- </span>
85
- </td>
86
- </tr>
87
- </table>
88
 
89
- <p class="submit">
90
- <input type="button"
91
- class="w3tc_cdn_rackspace_service_create_done w3tc-button-save button-primary"
92
- value="<?php _e( 'Next', 'w3-total-cache' ); ?>" />
93
- </p>
94
- <?php Util_Ui::postbox_footer(); ?>
95
- </div>
96
  </form>
5
  die();
6
  ?>
7
  <form action="admin.php?page=w3tc_cdn" method="post" style="padding: 20px"
8
+ class="w3tc_cdn_rackspace_form">
9
+ <?php
10
  Util_Ui::hidden( '', 'user_name', $details['user_name'] );
11
  Util_Ui::hidden( '', 'api_key', $details['api_key'] );
12
  Util_Ui::hidden( '', 'access_token', $details['access_token'] );
15
  echo Util_Ui::nonce_field( 'w3tc' );
16
 
17
  ?>
18
+ <?php
19
  if ( isset( $details['error_message'] ) )
20
  echo '<div class="error">' . $details['error_message'] . '</div>';
21
  ?>
22
+ <div class="metabox-holder">
23
+ <?php Util_Ui::postbox_header( __( 'Create new service', 'w3-total-cache' ) ); ?>
24
+ <table class="form-table" style="width: 100%">
25
+ <tr>
26
+ <th style="width: 150px">Name:</td>
27
+ <td>
28
+ <input name="name" type="text" class="w3tc-ignore-change"
29
+ style="width: 100px"
30
+ value="<?php echo esc_attr( $details['name'] ) ?>" />
31
+ </td>
32
+ </tr>
33
+ <tr>
34
+ <th style="white-space: nowrap">Traffic Type:</td>
35
+ <td>
36
+ <label>
37
+ <input name="protocol" type="radio"
38
+ class="w3tc-ignore-change w3tc_cdn_rackspace_protocol"
39
+ value="http"
40
+ <?php checked( $details['protocol'], 'http' ) ?> />
41
+ http://
42
+ </label>
43
+ <br />
44
+ <label>
45
+ <input name="protocol" type="radio"
46
+ class="w3tc-ignore-change w3tc_cdn_rackspace_protocol"
47
+ value="https"
48
+ <?php checked( $details['protocol'], 'https' ) ?> />
49
+ https://
50
+ </label>
51
+ </td>
52
+ </tr>
53
+ <tr>
54
+ <th>Origin:</td>
55
+ <td>
56
+ <?php echo $details['origin'] ?>
57
+ </td>
58
+ </tr>
59
+ <tr class="w3tc_cdn_rackspace_cname_http"
60
+ style="<?php echo $details['cname_http_style'] ?>">
61
+ <th style="white-space: nowrap">Primary <acronym title="Canonical Name">CNAME</acronym>:</td>
62
+ <td>
63
+ <input name="cname_http" type="text" class="w3tc-ignore-change"
64
+ style="width: 200px"
65
+ value="<?php echo esc_attr( $details['cname_http'] ) ?>" />
66
+ <p class="description">
67
+ <?php _e( 'The domain name through which visitors retrieve content. You will be provided with a target domain to use as an alias for this CNAME', 'w3-total-cache' ); ?>
68
+ </p>
69
+ </td>
70
+ </tr>
71
+ <tr class="w3tc_cdn_rackspace_cname_https"
72
+ style="<?php echo $details['cname_https_style'] ?>">
73
+ <th style="white-space: nowrap">Primary <acronym title="Canonical Name">CNAME</acronym>:</td>
74
+ <td>
75
+ <input name="cname_https_prefix" type="text" class="w3tc-ignore-change"
76
+ style="width: 100px"
77
+ value="<?php echo esc_attr( $details['cname_https_prefix'] ) ?>" />
78
+ <input name="" type="text" readonly="readonly"
79
+ value=".xxxx.secure.raxcdn.com" />
80
+ <p class="description">
81
+ <?php _e( 'The name should be a single word, and cannot contain any dots (.).', 'w3-total-cache' ) ?>
82
+ </p>
83
+ </td>
84
+ </tr>
85
+ </table>
 
 
86
 
87
+ <p class="submit">
88
+ <input type="button"
89
+ class="w3tc_cdn_rackspace_service_create_done w3tc-button-save button-primary"
90
+ value="<?php _e( 'Next', 'w3-total-cache' ); ?>" />
91
+ </p>
92
+ <?php Util_Ui::postbox_footer(); ?>
93
+ </div>
94
  </form>
Cdn_RackSpaceCloudFiles_Page_View.php CHANGED
@@ -52,26 +52,25 @@ if ( !defined( 'W3TC' ) )
52
  <option value="enabled"<?php selected( $config->get_string( 'cdn.rscf.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
53
  <option value="disabled"<?php selected( $config->get_string( 'cdn.rscf.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
54
  </select>
55
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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>
56
  </td>
57
  </tr>
58
  <tr>
59
- <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
60
- <td>
61
  <?php $cnames = $config->get_array( 'cdn.rscf.cname' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
62
- <br />
63
- <span class="description">
64
- <?php _e( 'Enter hostname mapped to <acronym title="Content Delivery Network">CDN</acronym> host, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?>
65
- </span>
66
- </td>
67
  </tr>
68
  <tr>
69
  <th colspan="2">
70
- <input id="cdn_test"
71
- class="button {type: 'highwinds', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}"
72
- type="button"
73
- value="<?php _e( 'Test', 'w3-total-cache' ); ?>" />
74
- <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
75
- </th>
76
  </tr>
77
  <?php endif ?>
52
  <option value="enabled"<?php selected( $config->get_string( 'cdn.rscf.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
53
  <option value="disabled"<?php selected( $config->get_string( 'cdn.rscf.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
54
  </select>
55
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' ); ?></p>
56
  </td>
57
  </tr>
58
  <tr>
59
+ <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
60
+ <td>
61
  <?php $cnames = $config->get_array( 'cdn.rscf.cname' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
62
+ <p class="description">
63
+ <?php _e( 'Enter hostname mapped to <acronym title="Content Delivery Network">CDN</acronym> host, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?>
64
+ </p>
65
+ </td>
 
66
  </tr>
67
  <tr>
68
  <th colspan="2">
69
+ <input id="cdn_test"
70
+ class="button {type: 'highwinds', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}"
71
+ type="button"
72
+ value="<?php _e( 'Test', 'w3-total-cache' ); ?>" />
73
+ <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
74
+ </th>
75
  </tr>
76
  <?php endif ?>
Cdn_StackPath2_Page_View.php CHANGED
@@ -9,9 +9,19 @@ if ( !defined( 'W3TC' ) )
9
  <tr>
10
  <th style="width: 300px;"><label><?php _e( 'Create account:', 'w3-total-cache' )?></label></th>
11
  <td>
12
- <a href="<?php echo esc_url( W3TC_STACKPATH_SIGNUP_URL )?>" target="_blank" id="netdna-stackpath-create-account" class="button-primary"><?php w3tc_e( 'cdn.stackpath2.signUpAndSave', 'Sign Up Now and save!' ) ?></a>
13
- <br />
14
- <span class="description"><?php w3tc_e( 'cdn.stackpath2.signUpAndSave.description', 'StackPath is a service that lets you speed up your site even more with W3 Total Cache. Sign up now to recieve a special offer!' ) ?></span>
 
 
 
 
 
 
 
 
 
 
15
  </td>
16
  </tr>
17
  <?php endif ?>
@@ -25,17 +35,25 @@ if ( !defined( 'W3TC' ) )
25
  </label>
26
  </th>
27
  <td>
28
- <?php if ( $authorized ): ?>
29
- <input class="w3tc_cdn_stackpath2_authorize button-primary"
30
- type="button"
31
- value="<?php _e( 'Reauthorize', 'w3-total-cache' ); ?>"
32
- />
33
- <?php else: ?>
34
- <input class="w3tc_cdn_stackpath2_authorize button-primary"
35
- type="button"
36
- value="<?php _e( 'Authorize', 'w3-total-cache' ); ?>"
37
- />
38
- <?php endif ?>
 
 
 
 
 
 
 
 
39
  </td>
40
  </tr>
41
 
@@ -46,11 +64,11 @@ if ( !defined( 'W3TC' ) )
46
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="HyperText Transfer Protocol">HTTP</acronym> <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
47
  </th>
48
  <td class="w3tc_config_value_text">
49
- <?php echo htmlspecialchars( $http_domain ) ?><br />
50
- <span class="description">
51
  This website domain has to be <acronym title="Canonical Name">CNAME</acronym> pointing to this
52
  <acronym title="Content Delivery Network">CDN</acronym> domain for <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests
53
- </span>
54
  </td>
55
  </tr>
56
  <?php endif ?>
@@ -60,11 +78,11 @@ if ( !defined( 'W3TC' ) )
60
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="HyperText Transfer Protocol over SSL">HTTPS</acronym> <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
61
  </th>
62
  <td class="w3tc_config_value_text">
63
- <?php echo htmlspecialchars( $https_domain ) ?><br />
64
- <span class="description">
65
  This website domain has to be <acronym title="Canonical Name">CNAME</acronym> pointing to this
66
  <acronym title="Content Delivery Network">CDN</acronym> domain for <acronym title="HyperText Transfer Protocol over SSL">HTTPS</acronym> requests
67
- </span>
68
  </td>
69
  </tr>
70
  <?php endif ?>
@@ -77,14 +95,14 @@ if ( !defined( 'W3TC' ) )
77
  <option value="enabled"<?php selected( $config->get_string( 'cdn.stackpath.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use <acronym title="Secure Sockets Layer">SSL</acronym>)', 'w3-total-cache' )?></option>
78
  <option value="disabled"<?php selected( $config->get_string( 'cdn.stackpath.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use <acronym title="HyperText Transfer Protocol">HTTP</acronym>)', 'w3-total-cache' )?></option>
79
  </select>
80
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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>
81
  </td>
82
  </tr>
83
  <tr>
84
  <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' )?></th>
85
  <td>
86
  <?php $cnames = $config->get_array( 'cdn.stackpath2.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
87
- <br /><span class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' )?></span>
88
  </td>
89
  </tr>
90
  <tr>
9
  <tr>
10
  <th style="width: 300px;"><label><?php _e( 'Create account:', 'w3-total-cache' )?></label></th>
11
  <td>
12
+ <p class="notice notice-error">
13
+ <?php w3tc_e( 'cdn.stackpath.widget.v2.no_cdn',
14
+ 'W3 Total Cache has detected that you do not have a <acronym title="Content Delivery Network">CDN</acronym> configured' ) ?>
15
+ </p>
16
+
17
+ <p>
18
+ Enhance your website Performance with StackPath's CDN services. StackPath works magically with W3 Total Cache to speed up your site around the world for as little as $10 a month.
19
+ </p>
20
+ <p>New customers are eligible for a free trial.</p>
21
+ <p>
22
+ <a href="<?php echo esc_url( W3TC_STACKPATH_SIGNUP_URL )?>" target="_blank" id="netdna-stackpath-create-account" class="button-primary"><?php w3tc_e( 'cdn.stackpath2.signUpAndSave', 'Sign Up Now and save!' ) ?></a>
23
+ </p>
24
+ <p class="description"><?php w3tc_e( 'cdn.stackpath2.signUpAndSave.description', 'StackPath is a service that lets you speed up your site even more with W3 Total Cache. Sign up now to recieve a special offer!' ) ?></p>
25
  </td>
26
  </tr>
27
  <?php endif ?>
35
  </label>
36
  </th>
37
  <td>
38
+ <p>
39
+ If you're an existing StackPath customer, enable CDN and Authorize.
40
+ If you need help configuring your CDN, we also offer Premium Services to assist you.
41
+ </p>
42
+
43
+ <p>
44
+ <?php if ( $authorized ): ?>
45
+ <input class="w3tc_cdn_stackpath2_authorize button-primary"
46
+ type="button"
47
+ value="<?php _e( 'Reauthorize', 'w3-total-cache' ); ?>"
48
+ />
49
+ <?php else: ?>
50
+ <input class="w3tc_cdn_stackpath2_authorize button-primary"
51
+ type="button"
52
+ value="<?php _e( 'Authorize', 'w3-total-cache' ); ?>"
53
+ />
54
+ <?php endif ?>
55
+ <a class="button" href="<?php echo wp_nonce_url( Util_Ui::admin_url( 'admin.php?page=w3tc_support' ), 'w3tc' )?>"><?php _e( 'Premium Services', 'w3-total-cache' )?></a>
56
+ </p>
57
  </td>
58
  </tr>
59
 
64
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="HyperText Transfer Protocol">HTTP</acronym> <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
65
  </th>
66
  <td class="w3tc_config_value_text">
67
+ <?php echo htmlspecialchars( $http_domain ) ?>
68
+ <p class="description">
69
  This website domain has to be <acronym title="Canonical Name">CNAME</acronym> pointing to this
70
  <acronym title="Content Delivery Network">CDN</acronym> domain for <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests
71
+ </p>
72
  </td>
73
  </tr>
74
  <?php endif ?>
78
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="HyperText Transfer Protocol over SSL">HTTPS</acronym> <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
79
  </th>
80
  <td class="w3tc_config_value_text">
81
+ <?php echo htmlspecialchars( $https_domain ) ?>
82
+ <p class="description">
83
  This website domain has to be <acronym title="Canonical Name">CNAME</acronym> pointing to this
84
  <acronym title="Content Delivery Network">CDN</acronym> domain for <acronym title="HyperText Transfer Protocol over SSL">HTTPS</acronym> requests
85
+ </p>
86
  </td>
87
  </tr>
88
  <?php endif ?>
95
  <option value="enabled"<?php selected( $config->get_string( 'cdn.stackpath.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use <acronym title="Secure Sockets Layer">SSL</acronym>)', 'w3-total-cache' )?></option>
96
  <option value="disabled"<?php selected( $config->get_string( 'cdn.stackpath.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use <acronym title="HyperText Transfer Protocol">HTTP</acronym>)', 'w3-total-cache' )?></option>
97
  </select>
98
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' )?></p>
99
  </td>
100
  </tr>
101
  <tr>
102
  <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' )?></th>
103
  <td>
104
  <?php $cnames = $config->get_array( 'cdn.stackpath2.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
105
+ <p class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' )?></p>
106
  </td>
107
  </tr>
108
  <tr>
Cdn_StackPath2_Popup_View_Intro.php CHANGED
@@ -27,12 +27,11 @@ if ( isset( $details['error_message'] ) )
27
  <input name="client_secret" type="text" class="w3tc-ignore-change"
28
  style="width: 550px"
29
  value="<?php echo esc_attr( $details['client_secret'] ) ?>" />
30
- <br />
31
- <span class="description">
32
  To obtain API key you can
33
  <a target="_blank" href="<?php echo esc_attr( $url_obtain_key ) ?>">click here</a>,
34
  log in, and paste the key in above field.
35
- </span>
36
  </td>
37
  </tr>
38
  </table>
27
  <input name="client_secret" type="text" class="w3tc-ignore-change"
28
  style="width: 550px"
29
  value="<?php echo esc_attr( $details['client_secret'] ) ?>" />
30
+ <p class="description">
 
31
  To obtain API key you can
32
  <a target="_blank" href="<?php echo esc_attr( $url_obtain_key ) ?>">click here</a>,
33
  log in, and paste the key in above field.
34
+ </p>
35
  </td>
36
  </tr>
37
  </table>
Cdn_StackPath2_Widget_View_Unauthorized.php CHANGED
@@ -6,12 +6,28 @@ if ( !defined( 'W3TC' ) )
6
 
7
  ?>
8
  <div id="stackpath-widget" class="w3tcstackpath_signup">
9
- <p><?php w3tc_e( 'cdn.stackpath2.widget.header', 'Dramatically increase website speeds in just a few clicks! Add the StackPath content delivery network (<acronym title="Content Delivery Network">CDN</acronym>) service to your site.' )?></p>
10
- <h4 class="w3tcstackpath_signup_h4"><?php _e( 'New customers', 'w3-total-cache' )?></h4>
11
- <p><?php w3tc_e( 'cdn.stackpath2.widget.works_magically', 'StackPath works magically with W3 Total Cache.' )?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  <a class="button-primary" href="<?php echo esc_url( W3TC_STACKPATH_SIGNUP_URL )?>" target="_blank"><?php _e( 'Sign Up Now ', 'w3-total-cache' )?></a>
13
- <p><!--span class="desc"><?php _e( 'Exclusive offers availabel for W3TC users!', 'w3-total-cache' )?></span></p>-->
14
  <h4 class="w3tcstackpath_signup_h4"><?php _e( 'Current customers', 'w3-total-cache' )?></h4>
15
- <p><?php w3tc_e( 'cdn.stackpath2.widget.existing', "If you're an existing StackPath customer, enable <acronym title='Content Delivery Network'>CDN</acronym> and:" )?></p>
 
16
  <a class="button-primary" href="<?php echo wp_nonce_url( Util_Ui::admin_url( 'admin.php?page=w3tc_cdn' ), 'w3tc' )?>" target="_blank"><?php _e( 'Authorize', 'w3-total-cache' )?></a>
 
17
  </div>
6
 
7
  ?>
8
  <div id="stackpath-widget" class="w3tcstackpath_signup">
9
+ <?php if ( !$c->get_boolean( 'cdn.enabled' ) ): ?>
10
+ <p class="notice notice-error">
11
+ <?php w3tc_e( 'cdn.stackpath.widget.v2.no_cdn',
12
+ 'W3 Total Cache has detected that you do not have a <acronym title="Content Delivery Network">CDN</acronym> configured' ) ?>
13
+ </p>
14
+ <?php endif ?>
15
+
16
+ <p>
17
+ <?php w3tc_e( 'cdn.stackpath.widget.v2.header',
18
+ "Enhance your website performance by adding StackPath's (<acronym title='Content Delivery Network'>CDN</acronym>) service to your site." ) ?>
19
+ </p>
20
+ <h4 class="w3tcstackpath_signup_h4"><?php _e( 'New customer? Sign up now for a free trial!', 'w3-total-cache' )?></h4>
21
+
22
+ <p>
23
+ <?php w3tc_e( 'cdn.stackpath2.widget.v2.works_magically',
24
+ 'StackPath works magically with W3 Total Cache to speed up your site around the world for as little as $10 per month.' )?>
25
+ </p>
26
  <a class="button-primary" href="<?php echo esc_url( W3TC_STACKPATH_SIGNUP_URL )?>" target="_blank"><?php _e( 'Sign Up Now ', 'w3-total-cache' )?></a>
27
+ <p>
28
  <h4 class="w3tcstackpath_signup_h4"><?php _e( 'Current customers', 'w3-total-cache' )?></h4>
29
+ <p>
30
+ <?php w3tc_e( 'cdn.stackpath2.widget.v2.existing', "If you're an existing StackPath customer, enable <acronym title='Content Delivery Network'>CDN</acronym> and Authorize. If you need help configuring your <acronym title='Content Delivery Network'>CDN</acronym>, we also offer Premium Services to assist you." )?></p>
31
  <a class="button-primary" href="<?php echo wp_nonce_url( Util_Ui::admin_url( 'admin.php?page=w3tc_cdn' ), 'w3tc' )?>" target="_blank"><?php _e( 'Authorize', 'w3-total-cache' )?></a>
32
+ <a class="button" href="<?php echo wp_nonce_url( Util_Ui::admin_url( 'admin.php?page=w3tc_support' ), 'w3tc' )?>"><?php _e( 'Premium Services', 'w3-total-cache' )?></a>
33
  </div>
Cdn_StackPath_Page_View.php CHANGED
@@ -10,8 +10,7 @@ if ( !defined( 'W3TC' ) )
10
  <th style="width: 300px;"><label><?php _e( 'Create account:', 'w3-total-cache' )?></label></th>
11
  <td>
12
  <a href="<?php echo esc_url( W3TC_STACKPATH_SIGNUP_URL ) ?>" target="_blank" id="netdna-stackpath-create-account" class="button-primary"><?php w3tc_e( 'cdn.stackpath.signUpAndSave', 'Sign Up Now and save!' ) ?></a>
13
- <br />
14
- <span class="description"><?php w3tc_e( 'cdn.stackpath.signUpAndSave.description', 'StackPath is a service that lets you speed up your site even more with W3 Total Cache. Sign up now and save!' )?></span>
15
  </td>
16
  </tr>
17
  <?php endif ?>
@@ -46,11 +45,11 @@ if ( !defined( 'W3TC' ) )
46
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="HyperText Transfer Protocol">HTTP</acronym> <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
47
  </th>
48
  <td class="w3tc_config_value_text">
49
- <?php echo htmlspecialchars( $http_domain ) ?><br />
50
- <span class="description">
51
  This website domain has to be <acronym title="Canonical Name">CNAME</acronym> pointing to this
52
  <acronym title="Content Delivery Network">CDN</acronym> domain for <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests
53
- </span>
54
  </td>
55
  </tr>
56
  <?php endif ?>
@@ -60,11 +59,11 @@ if ( !defined( 'W3TC' ) )
60
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="HyperText Transfer Protocol over SSL">HTTPS</acronym> <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
61
  </th>
62
  <td class="w3tc_config_value_text">
63
- <?php echo htmlspecialchars( $https_domain ) ?><br />
64
- <span class="description">
65
  This website domain has to be <acronym title="Canonical Name">CNAME</acronym> pointing to this
66
  <acronym title="Content Delivery Network">CDN</acronym> domain for <acronym title="HyperText Transfer Protocol over SSL">HTTPS</acronym> requests
67
- </span>
68
  </td>
69
  </tr>
70
  <?php endif ?>
@@ -77,14 +76,14 @@ if ( !defined( 'W3TC' ) )
77
  <option value="enabled"<?php selected( $config->get_string( 'cdn.stackpath.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use <acronym title="Secure Sockets Layer">SSL</acronym>)', 'w3-total-cache' )?></option>
78
  <option value="disabled"<?php selected( $config->get_string( 'cdn.stackpath.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use <acronym title="HyperText Transfer Protocol">HTTP</acronym>)', 'w3-total-cache' )?></option>
79
  </select>
80
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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>
81
  </td>
82
  </tr>
83
  <tr>
84
  <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' )?></th>
85
  <td>
86
  <?php $cnames = $config->get_array( 'cdn.stackpath.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
87
- <br /><span class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' )?></span>
88
  </td>
89
  </tr>
90
  <tr>
10
  <th style="width: 300px;"><label><?php _e( 'Create account:', 'w3-total-cache' )?></label></th>
11
  <td>
12
  <a href="<?php echo esc_url( W3TC_STACKPATH_SIGNUP_URL ) ?>" target="_blank" id="netdna-stackpath-create-account" class="button-primary"><?php w3tc_e( 'cdn.stackpath.signUpAndSave', 'Sign Up Now and save!' ) ?></a>
13
+ <p class="description"><?php w3tc_e( 'cdn.stackpath.signUpAndSave.description', 'StackPath is a service that lets you speed up your site even more with W3 Total Cache. Sign up now and save!' )?></p>
 
14
  </td>
15
  </tr>
16
  <?php endif ?>
45
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="HyperText Transfer Protocol">HTTP</acronym> <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
46
  </th>
47
  <td class="w3tc_config_value_text">
48
+ <?php echo htmlspecialchars( $http_domain ) ?>
49
+ <p class="description">
50
  This website domain has to be <acronym title="Canonical Name">CNAME</acronym> pointing to this
51
  <acronym title="Content Delivery Network">CDN</acronym> domain for <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests
52
+ </p>
53
  </td>
54
  </tr>
55
  <?php endif ?>
59
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="HyperText Transfer Protocol over SSL">HTTPS</acronym> <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
60
  </th>
61
  <td class="w3tc_config_value_text">
62
+ <?php echo htmlspecialchars( $https_domain ) ?>
63
+ <p class="description">
64
  This website domain has to be <acronym title="Canonical Name">CNAME</acronym> pointing to this
65
  <acronym title="Content Delivery Network">CDN</acronym> domain for <acronym title="HyperText Transfer Protocol over SSL">HTTPS</acronym> requests
66
+ </p>
67
  </td>
68
  </tr>
69
  <?php endif ?>
76
  <option value="enabled"<?php selected( $config->get_string( 'cdn.stackpath.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use <acronym title="Secure Sockets Layer">SSL</acronym>)', 'w3-total-cache' )?></option>
77
  <option value="disabled"<?php selected( $config->get_string( 'cdn.stackpath.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use <acronym title="HyperText Transfer Protocol">HTTP</acronym>)', 'w3-total-cache' )?></option>
78
  </select>
79
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' )?></p>
80
  </td>
81
  </tr>
82
  <tr>
83
  <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' )?></th>
84
  <td>
85
  <?php $cnames = $config->get_array( 'cdn.stackpath.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
86
+ <p class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' )?></p>
87
  </td>
88
  </tr>
89
  <tr>
Cdn_StackPath_Popup_View_Intro.php CHANGED
@@ -5,35 +5,34 @@ if ( !defined( 'W3TC' ) )
5
  die();
6
  ?>
7
  <form class="w3tc_cdn_stackpath_form">
8
- <?php
9
  if ( isset( $details['error_message'] ) )
10
  echo '<div class="error">' . $details['error_message'] . '</div>';
11
  ?>
12
- <div class="metabox-holder">
13
- <?php Util_Ui::postbox_header(
14
  __( 'Your StackPath Account credentials', 'w3-total-cache' ) ); ?>
15
- <table class="form-table">
16
- <tr>
17
- <td>API Key:</td>
18
- <td>
19
- <input name="api_key" type="text" class="w3tc-ignore-change"
20
- style="width: 550px"
21
- value="<?php echo $details['api_key'] ?>" />
22
- <br />
23
- <span class="description">
24
- To obtain API key you can
25
- <a target="_blank" href="<?php echo $url_obtain_key ?>">click here</a>,
26
- log in, and paste the key in above field.
27
- </span>
28
- </td>
29
- </tr>
30
- </table>
31
 
32
- <p class="submit">
33
- <input type="button"
34
- class="w3tc_cdn_stackpath_list_zones w3tc-button-save button-primary"
35
- value="<?php _e( 'Next', 'w3-total-cache' ); ?>" />
36
- </p>
37
- <?php Util_Ui::postbox_footer(); ?>
38
- </div>
39
  </form>
5
  die();
6
  ?>
7
  <form class="w3tc_cdn_stackpath_form">
8
+ <?php
9
  if ( isset( $details['error_message'] ) )
10
  echo '<div class="error">' . $details['error_message'] . '</div>';
11
  ?>
12
+ <div class="metabox-holder">
13
+ <?php Util_Ui::postbox_header(
14
  __( 'Your StackPath Account credentials', 'w3-total-cache' ) ); ?>
15
+ <table class="form-table">
16
+ <tr>
17
+ <td>API Key:</td>
18
+ <td>
19
+ <input name="api_key" type="text" class="w3tc-ignore-change"
20
+ style="width: 550px"
21
+ value="<?php echo $details['api_key'] ?>" />
22
+ <p class="description">
23
+ To obtain API key you can
24
+ <a target="_blank" href="<?php echo $url_obtain_key ?>">click here</a>,
25
+ log in, and paste the key in above field.
26
+ </p>
27
+ </td>
28
+ </tr>
29
+ </table>
 
30
 
31
+ <p class="submit">
32
+ <input type="button"
33
+ class="w3tc_cdn_stackpath_list_zones w3tc-button-save button-primary"
34
+ value="<?php _e( 'Next', 'w3-total-cache' ); ?>" />
35
+ </p>
36
+ <?php Util_Ui::postbox_footer(); ?>
37
+ </div>
38
  </form>
Cdnfsd_CloudFront_Page_View.php CHANGED
@@ -9,10 +9,10 @@ $authorized = !empty( $key );
9
 
10
  ?>
11
  <form id="cdn_form" action="admin.php?page=w3tc_cdn" method="post">
12
- <div class="metabox-holder">
13
- <?php Util_Ui::postbox_header( __( 'Configuration: Full-Site Delivery', 'w3-total-cache' ),
14
  '', 'configuration' ); ?>
15
- <table class="form-table">
16
  <tr>
17
  <th style="width: 300px;">
18
  <label>
@@ -45,17 +45,17 @@ _e( 'Specify account credentials:',
45
  <td class="w3tc_config_value_text">
46
  <?php
47
  echo $config->get_string( 'cdnfsd.cloudfront.distribution_domain' )
48
- ?><br />
49
- <span class="description">
50
  The website domain has to be a CNAME pointing to this
51
  <acronym title="Content Delivery Network">CDN</acronym> domain
52
- </span>
53
  </td>
54
  </tr>
55
  <?php endif ?>
56
- </table>
57
 
58
- <?php Util_Ui::button_config_save( 'cdn_configuration' ); ?>
59
- <?php Util_Ui::postbox_footer(); ?>
60
- </div>
61
  </form>
9
 
10
  ?>
11
  <form id="cdn_form" action="admin.php?page=w3tc_cdn" method="post">
12
+ <div class="metabox-holder">
13
+ <?php Util_Ui::postbox_header( __( 'Configuration: Full-Site Delivery', 'w3-total-cache' ),
14
  '', 'configuration' ); ?>
15
+ <table class="form-table">
16
  <tr>
17
  <th style="width: 300px;">
18
  <label>
45
  <td class="w3tc_config_value_text">
46
  <?php
47
  echo $config->get_string( 'cdnfsd.cloudfront.distribution_domain' )
48
+ ?>
49
+ <p class="description">
50
  The website domain has to be a CNAME pointing to this
51
  <acronym title="Content Delivery Network">CDN</acronym> domain
52
+ </p>
53
  </td>
54
  </tr>
55
  <?php endif ?>
56
+ </table>
57
 
58
+ <?php Util_Ui::button_config_save( 'cdn_configuration' ); ?>
59
+ <?php Util_Ui::postbox_footer(); ?>
60
+ </div>
61
  </form>
Cdnfsd_CloudFront_Popup.php CHANGED
@@ -240,8 +240,8 @@ class Cdnfsd_CloudFront_Popup {
240
 
241
  if ( isset( $details[$field]['current'] ) &&
242
  $details[$field]['current'] != $details[$field]['new'] ) {
243
- echo '<br /><span class="description">currently set to <strong>' .
244
- $details[$field]['current'] . '</strong></span>';
245
  }
246
  }
247
 
240
 
241
  if ( isset( $details[$field]['current'] ) &&
242
  $details[$field]['current'] != $details[$field]['new'] ) {
243
+ echo '<p class="description">currently set to <strong>' .
244
+ $details[$field]['current'] . '</strong></p>';
245
  }
246
  }
247
 
Cdnfsd_CloudFront_Popup_View_Distribution.php CHANGED
@@ -21,15 +21,15 @@ Util_Ui::hidden( '', 'distribution_comment', $details['distribution_comment'] );
21
  </tr>
22
  <tr>
23
  <th>Origin:</th>
24
- <td><?php $this->render_zone_ip_change( $details, 'origin' ) ?><br />
25
- <span class="description">
26
  Create an apex <acronym title="Domain Name System">DNS</acronym> record pointing to your WordPress host <acronym title="Internet Protocol">IP</acronym>.
27
  CloudFront will use this host to mirror your site.
28
 
29
  Tip: If your real domain name is domain.com, then the host
30
  for the apex record should be origin.domain.com with the host
31
  <acronym title="Internet Protocol">IP</acronym> of domain.com, e.g.:
32
- </span>
33
  </td>
34
  </tr>
35
  <tr>
21
  </tr>
22
  <tr>
23
  <th>Origin:</th>
24
+ <td><?php $this->render_zone_ip_change( $details, 'origin' ) ?>
25
+ <p class="description">
26
  Create an apex <acronym title="Domain Name System">DNS</acronym> record pointing to your WordPress host <acronym title="Internet Protocol">IP</acronym>.
27
  CloudFront will use this host to mirror your site.
28
 
29
  Tip: If your real domain name is domain.com, then the host
30
  for the apex record should be origin.domain.com with the host
31
  <acronym title="Internet Protocol">IP</acronym> of domain.com, e.g.:
32
+ </p>
33
  </td>
34
  </tr>
35
  <tr>
Cdnfsd_GeneralPage_View.php CHANGED
@@ -12,26 +12,31 @@ if ( !defined( 'W3TC' ) )
12
  </p>
13
  <table class="form-table">
14
  <?php
15
- Util_Ui::config_item( array(
16
- 'key' => 'cdnfsd.enabled',
17
- 'label' => __( '<acronym title="Full Site Delivery">FSD</acronym> <acronym title="Content Delivery Network">CDN</acronym>:', 'w3-total-cache' ),
18
- 'control' => 'checkbox',
19
- 'checkbox_label' => __( 'Enable', 'w3-total-cache' ),
20
- 'disabled' => ( $is_pro ? null : true ),
21
- 'description' => __( 'The entire website will load quickly for site visitors.',
22
- 'w3-total-cache' ),
23
- 'pro_feature' => true
24
- ) );
 
 
 
 
25
 
26
- Util_Ui::config_item( array(
27
- 'key' => 'cdnfsd.engine',
28
- 'label' => __( '<acronym title="Full Site Delivery">FSD</acronym> <acronym title="Content Delivery Network">CDN</acronym> Type:', 'w3-total-cache' ),
29
- 'control' => 'selectbox',
30
- 'selectbox_values' => $cdnfsd_engine_values,
31
- 'value' => $cdnfsd_engine,
32
- 'disabled' => ( $is_pro ? null : true ),
33
- 'description' => __( 'Select the <acronym title="Content Delivery Network">CDN</acronym> type you wish to use.',
34
- 'w3-total-cache' ) . $cdnfsd_engine_extra_description
35
- ) );
36
- ?>
 
37
  </table>
12
  </p>
13
  <table class="form-table">
14
  <?php
15
+ Util_Ui::config_item_pro( array(
16
+ 'key' => 'cdnfsd.enabled',
17
+ 'label' => __( '<acronym title="Full Site Delivery">FSD</acronym> <acronym title="Content Delivery Network">CDN</acronym>:', 'w3-total-cache' ),
18
+ 'control' => 'checkbox',
19
+ 'checkbox_label' => __( 'Enable', 'w3-total-cache' ),
20
+ 'disabled' => ( $is_pro ? null : true ),
21
+ 'excerpt' => __( 'Deliver visitors the lowest possible response and load times for all site content including HTML, media (e.g. images or fonts), CSS, and JavaScript.', 'w3-total-cache' ),
22
+ 'description' => array(
23
+ __( 'Without Full Site Delivery, the HTML of your website is not delivered with the lowest latency possible. A small change to DNS settings means that every component of your website is delivered to visitors using a worldwide network of servers. The net result is more resources for content creation or for authenticated users to post comments or browser personalized experiences like e-commerce and membership sites etc.', 'w3-total-cache' ),
24
+ __( 'For even better performance, combine FSD with other powerful features like Browser Cache, Minify, Fragment caching, or Lazy Load!', 'w3-total-cache' ),
25
+ __( 'Contact support for any help maximizing your performance scores or troubleshooting.', 'w3-total-cache' )
26
+ )
27
+ ) )
28
+ ?>
29
 
30
+ <?php
31
+ Util_Ui::config_item( array(
32
+ 'key' => 'cdnfsd.engine',
33
+ 'label' => __( '<acronym title="Full Site Delivery">FSD</acronym> <acronym title="Content Delivery Network">CDN</acronym> Type:', 'w3-total-cache' ),
34
+ 'control' => 'selectbox',
35
+ 'selectbox_values' => $cdnfsd_engine_values,
36
+ 'value' => $cdnfsd_engine,
37
+ 'disabled' => ( $is_pro ? null : true ),
38
+ 'description' => __( 'Select the <acronym title="Content Delivery Network">CDN</acronym> type you wish to use.',
39
+ 'w3-total-cache' ) . $cdnfsd_engine_extra_description
40
+ ) )
41
+ ?>
42
  </table>
Cdnfsd_MaxCdn_Page_View.php CHANGED
@@ -9,10 +9,10 @@ $authorized = !empty( $key );
9
 
10
  ?>
11
  <form id="cdn_form" action="admin.php?page=w3tc_cdn" method="post">
12
- <div class="metabox-holder">
13
- <?php Util_Ui::postbox_header( __( 'Configuration: Full-Site Delivery', 'w3-total-cache' ),
14
  '', 'configuration' ); ?>
15
- <table class="form-table">
16
  <tr>
17
  <th style="width: 300px;">
18
  <label>
@@ -43,19 +43,17 @@ _e( 'Specify account credentials:',
43
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
44
  </th>
45
  <td class="w3tc_config_value_text">
46
- <?php
47
- echo $config->get_string( 'cdnfsd.maxcdn.zone_domain' )
48
- ?><br />
49
- <span class="description">
50
  The website domain must <acronym title="Canonical Name">CNAME</acronym> point to the
51
  <acronym title="Content Delivery Network">CDN</acronym> domain
52
- </span>
53
  </td>
54
  </tr>
55
  <?php endif ?>
56
- </table>
57
 
58
- <?php Util_Ui::button_config_save( 'cdn_configuration' ); ?>
59
- <?php Util_Ui::postbox_footer(); ?>
60
- </div>
61
  </form>
9
 
10
  ?>
11
  <form id="cdn_form" action="admin.php?page=w3tc_cdn" method="post">
12
+ <div class="metabox-holder">
13
+ <?php Util_Ui::postbox_header( __( 'Configuration: Full-Site Delivery', 'w3-total-cache' ),
14
  '', 'configuration' ); ?>
15
+ <table class="form-table">
16
  <tr>
17
  <th style="width: 300px;">
18
  <label>
43
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
44
  </th>
45
  <td class="w3tc_config_value_text">
46
+ <?php echo $config->get_string( 'cdnfsd.maxcdn.zone_domain' ) ?>
47
+ <p class="description">
 
 
48
  The website domain must <acronym title="Canonical Name">CNAME</acronym> point to the
49
  <acronym title="Content Delivery Network">CDN</acronym> domain
50
+ </p>
51
  </td>
52
  </tr>
53
  <?php endif ?>
54
+ </table>
55
 
56
+ <?php Util_Ui::button_config_save( 'cdn_configuration' ); ?>
57
+ <?php Util_Ui::postbox_footer(); ?>
58
+ </div>
59
  </form>
Cdnfsd_MaxCdn_Popup.php CHANGED
@@ -215,8 +215,8 @@ class Cdnfsd_MaxCdn_Popup {
215
 
216
  if ( isset( $details[$field]['current'] ) &&
217
  $details[$field]['current'] != $details[$field]['new'] ) {
218
- echo '<br /><span class="description">currently set to <strong>' .
219
- $details[$field]['current'] . '</strong></span>';
220
  }
221
  }
222
 
215
 
216
  if ( isset( $details[$field]['current'] ) &&
217
  $details[$field]['current'] != $details[$field]['new'] ) {
218
+ echo '<p class="description">currently set to <strong>' .
219
+ $details[$field]['current'] . '</strong></p>';
220
  }
221
  }
222
 
Cdnfsd_MaxCdn_Popup_View_Intro.php CHANGED
@@ -5,35 +5,34 @@ if ( !defined( 'W3TC' ) )
5
  die();
6
  ?>
7
  <form class="w3tc_popup_form">
8
- <?php
9
  if ( isset( $details['error_message'] ) )
10
  echo '<div class="error">' . $details['error_message'] . '</div>';
11
  ?>
12
- <div class="metabox-holder">
13
- <?php Util_Ui::postbox_header(
14
  __( 'Your MaxCDN Account credentials', 'w3-total-cache' ) ); ?>
15
- <table class="form-table">
16
- <tr>
17
- <td>API Key:</td>
18
- <td>
19
- <input name="api_key" type="text" class="w3tc-ignore-change"
20
- style="width: 550px"
21
- value="<?php echo esc_attr( $details['api_key'] ) ?>" />
22
- <br />
23
- <span class="description">
24
- To obtain API key you can
25
- <a target="_blank" href="<?php echo esc_attr( $url_obtain_key ) ?>">click here</a>,
26
- log in, and paste the key in above field.
27
- </span>
28
- </td>
29
- </tr>
30
- </table>
31
 
32
- <p class="submit">
33
- <input type="button"
34
- class="w3tc_cdn_maxcdn_fsd_list_zones w3tc-button-save button-primary"
35
- value="<?php _e( 'Next', 'w3-total-cache' ); ?>" />
36
- </p>
37
- <?php Util_Ui::postbox_footer(); ?>
38
- </div>
39
  </form>
5
  die();
6
  ?>
7
  <form class="w3tc_popup_form">
8
+ <?php
9
  if ( isset( $details['error_message'] ) )
10
  echo '<div class="error">' . $details['error_message'] . '</div>';
11
  ?>
12
+ <div class="metabox-holder">
13
+ <?php Util_Ui::postbox_header(
14
  __( 'Your MaxCDN Account credentials', 'w3-total-cache' ) ); ?>
15
+ <table class="form-table">
16
+ <tr>
17
+ <td>API Key:</td>
18
+ <td>
19
+ <input name="api_key" type="text" class="w3tc-ignore-change"
20
+ style="width: 550px"
21
+ value="<?php echo esc_attr( $details['api_key'] ) ?>" />
22
+ <p class="description">
23
+ To obtain API key you can
24
+ <a target="_blank" href="<?php echo esc_attr( $url_obtain_key ) ?>">click here</a>,
25
+ log in, and paste the key in above field.
26
+ </p>
27
+ </td>
28
+ </tr>
29
+ </table>
 
30
 
31
+ <p class="submit">
32
+ <input type="button"
33
+ class="w3tc_cdn_maxcdn_fsd_list_zones w3tc-button-save button-primary"
34
+ value="<?php _e( 'Next', 'w3-total-cache' ); ?>" />
35
+ </p>
36
+ <?php Util_Ui::postbox_footer(); ?>
37
+ </div>
38
  </form>
Cdnfsd_MaxCdn_Popup_View_Zone.php CHANGED
@@ -5,55 +5,55 @@ if ( !defined( 'W3TC' ) )
5
  die();
6
  ?>
7
  <form class="w3tc_popup_form" method="post">
8
- <?php
9
  Util_Ui::hidden( '', 'api_key', $details['api_key'] );
10
  Util_Ui::hidden( '', 'zone_id', $details['zone_id'] );
11
  Util_Ui::hidden( '', 'name', $details['name'] );
12
  ?>
13
 
14
- <div class="metabox-holder">
15
- <?php Util_Ui::postbox_header( __( 'Configure zone', 'w3-total-cache' ) ); ?>
16
- <table class="form-table">
17
- <tr>
18
- <th>Name:</th>
19
- <td><?php echo $details['name'] ?></td>
20
- </tr>
21
- <tr>
22
- <th>Origin URL:</th>
23
- <td><?php $this->render_zone_value_change( $details, 'url' ) ?></td>
24
- </tr>
25
- <tr>
26
- <th>Origin IP:</th>
27
- <td><?php $this->render_zone_ip_change( $details, 'ip' ) ?><br />
28
- <span class="description">IP of your WordPress host</span>
29
- </td>
30
- </tr>
31
- <tr>
32
- <th>Origin IP Resolution:</th>
33
- <td><?php $this->render_zone_boolean_change( $details, 'dns_check' ) ?></td>
34
- </tr>
35
- <tr>
36
- <th>Ignore Cache Control:</th>
37
- <td><?php $this->render_zone_boolean_change( $details, 'dns_check' ) ?></td>
38
- </tr>
39
- <tr>
40
- <th><acronym title="Content Delivery Network">CDN</acronym> Domain:</th>
41
- <td>
42
- <?php $this->render_zone_value_change( $details, 'custom_domain' ) ?><br />
43
- <span class="description">Domain <acronym title="Content Delivery Network">CDN</acronym> will handle</span>
44
- </td>
45
- </tr>
46
- </table>
47
 
48
- <p class="submit">
49
- <input type="button"
50
- class="w3tc_cdn_maxcdn_fsd_configure_zone w3tc-button-save button-primary"
51
- value="<?php _e( 'Apply', 'w3-total-cache' ); ?>" />
52
- <input type="button"
53
- class="w3tc_cdn_maxcdn_fsd_configure_zone_skip w3tc-button-save button"
54
- value="<?php _e( 'Don\'t reconfigure, I know what I\'m doing', 'w3-total-cache' ); ?>" />
55
 
56
- </p>
57
- <?php Util_Ui::postbox_footer(); ?>
58
- </div>
59
  </form>
5
  die();
6
  ?>
7
  <form class="w3tc_popup_form" method="post">
8
+ <?php
9
  Util_Ui::hidden( '', 'api_key', $details['api_key'] );
10
  Util_Ui::hidden( '', 'zone_id', $details['zone_id'] );
11
  Util_Ui::hidden( '', 'name', $details['name'] );
12
  ?>
13
 
14
+ <div class="metabox-holder">
15
+ <?php Util_Ui::postbox_header( __( 'Configure zone', 'w3-total-cache' ) ); ?>
16
+ <table class="form-table">
17
+ <tr>
18
+ <th>Name:</th>
19
+ <td><?php echo $details['name'] ?></td>
20
+ </tr>
21
+ <tr>
22
+ <th>Origin URL:</th>
23
+ <td><?php $this->render_zone_value_change( $details, 'url' ) ?></td>
24
+ </tr>
25
+ <tr>
26
+ <th>Origin IP:</th>
27
+ <td><?php $this->render_zone_ip_change( $details, 'ip' ) ?>
28
+ <p class="description">IP of your WordPress host</p>
29
+ </td>
30
+ </tr>
31
+ <tr>
32
+ <th>Origin IP Resolution:</th>
33
+ <td><?php $this->render_zone_boolean_change( $details, 'dns_check' ) ?></td>
34
+ </tr>
35
+ <tr>
36
+ <th>Ignore Cache Control:</th>
37
+ <td><?php $this->render_zone_boolean_change( $details, 'dns_check' ) ?></td>
38
+ </tr>
39
+ <tr>
40
+ <th><acronym title="Content Delivery Network">CDN</acronym> Domain:</th>
41
+ <td>
42
+ <?php $this->render_zone_value_change( $details, 'custom_domain' ) ?>
43
+ <p class="description">Domain <acronym title="Content Delivery Network">CDN</acronym> will handle</p>
44
+ </td>
45
+ </tr>
46
+ </table>
47
 
48
+ <p class="submit">
49
+ <input type="button"
50
+ class="w3tc_cdn_maxcdn_fsd_configure_zone w3tc-button-save button-primary"
51
+ value="<?php _e( 'Apply', 'w3-total-cache' ); ?>" />
52
+ <input type="button"
53
+ class="w3tc_cdn_maxcdn_fsd_configure_zone_skip w3tc-button-save button"
54
+ value="<?php _e( 'Don\'t reconfigure, I know what I\'m doing', 'w3-total-cache' ); ?>" />
55
 
56
+ </p>
57
+ <?php Util_Ui::postbox_footer(); ?>
58
+ </div>
59
  </form>
Cdnfsd_StackPath2_Page_View.php CHANGED
@@ -43,13 +43,11 @@ _e( 'Specify account credentials:',
43
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
44
  </th>
45
  <td class="w3tc_config_value_text">
46
- <?php
47
- echo implode( ', ', $config->get_array( 'cdnfsd.stackpath2.domain' ) )
48
- ?><br />
49
- <span class="description">
50
  The website domain must <acronym title="Canonical Name">CNAME</acronym> point to the
51
  <acronym title="Content Delivery Network">CDN</acronym> domain
52
- </span>
53
  </td>
54
  </tr>
55
  <?php endif ?>
43
  <label><?php _e( '<acronym title="Content Delivery Network">CDN</acronym> <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?></label>
44
  </th>
45
  <td class="w3tc_config_value_text">
46
+ <?php echo implode( ', ', $config->get_array( 'cdnfsd.stackpath2.domain' ) ) ?>
47
+ <p class="description">
 
 
48
  The website domain must <acronym title="Canonical Name">CNAME</acronym> point to the
49
  <acronym title="Content Delivery Network">CDN</acronym> domain
50
+ </p>
51
  </td>
52
  </tr>
53
  <?php endif ?>
Cdnfsd_StackPath2_Popup_View_Intro.php CHANGED
@@ -27,12 +27,11 @@ if ( isset( $details['error_message'] ) )
27
  <input name="client_secret" type="text" class="w3tc-ignore-change"
28
  style="width: 550px"
29
  value="<?php echo esc_attr( $details['client_secret'] ) ?>" />
30
- <br />
31
- <span class="description">
32
  To obtain API key you can
33
  <a target="_blank" href="<?php echo esc_attr( $url_obtain_key ) ?>">click here</a>,
34
  log in, and paste the key in above field.
35
- </span>
36
  </td>
37
  </tr>
38
  </table>
27
  <input name="client_secret" type="text" class="w3tc-ignore-change"
28
  style="width: 550px"
29
  value="<?php echo esc_attr( $details['client_secret'] ) ?>" />
30
+ <p class="description">
 
31
  To obtain API key you can
32
  <a target="_blank" href="<?php echo esc_attr( $url_obtain_key ) ?>">click here</a>,
33
  log in, and paste the key in above field.
34
+ </p>
35
  </td>
36
  </tr>
37
  </table>
Cdnfsd_StackPath_Page_View.php CHANGED
@@ -9,10 +9,10 @@ $authorized = !empty( $key );
9
 
10
  ?>
11
  <form id="cdn_form" action="admin.php?page=w3tc_cdn" method="post">
12
- <div class="metabox-holder">
13
- <?php Util_Ui::postbox_header( __( 'Configuration: Full-Site Delivery', 'w3-total-cache' ),
14
  '', 'configuration' ); ?>
15
- <table class="form-table">
16
  <tr>
17
  <th style="width: 300px;">
18
  <label>
@@ -45,17 +45,17 @@ _e( 'Specify account credentials:',
45
  <td class="w3tc_config_value_text">
46
  <?php
47
  echo $config->get_string( 'cdnfsd.stackpath.zone_domain' )
48
- ?><br />
49
- <span class="description">
50
  The website domain must <acronym title="Canonical Name">CNAME</acronym> point to the
51
  <acronym title="Content Delivery Network">CDN</acronym> domain
52
- </span>
53
  </td>
54
  </tr>
55
  <?php endif ?>
56
- </table>
57
 
58
- <?php Util_Ui::button_config_save( 'cdn_configuration' ); ?>
59
- <?php Util_Ui::postbox_footer(); ?>
60
- </div>
61
  </form>
9
 
10
  ?>
11
  <form id="cdn_form" action="admin.php?page=w3tc_cdn" method="post">
12
+ <div class="metabox-holder">
13
+ <?php Util_Ui::postbox_header( __( 'Configuration: Full-Site Delivery', 'w3-total-cache' ),
14
  '', 'configuration' ); ?>
15
+ <table class="form-table">
16
  <tr>
17
  <th style="width: 300px;">
18
  <label>
45
  <td class="w3tc_config_value_text">
46
  <?php
47
  echo $config->get_string( 'cdnfsd.stackpath.zone_domain' )
48
+ ?>
49
+ <p class="description">
50
  The website domain must <acronym title="Canonical Name">CNAME</acronym> point to the
51
  <acronym title="Content Delivery Network">CDN</acronym> domain
52
+ </p>
53
  </td>
54
  </tr>
55
  <?php endif ?>
56
+ </table>
57
 
58
+ <?php Util_Ui::button_config_save( 'cdn_configuration' ); ?>
59
+ <?php Util_Ui::postbox_footer(); ?>
60
+ </div>
61
  </form>
Cdnfsd_StackPath_Popup.php CHANGED
@@ -205,8 +205,8 @@ class Cdnfsd_StackPath_Popup {
205
 
206
  if ( isset( $details[$field]['current'] ) &&
207
  $details[$field]['current'] != $details[$field]['new'] ) {
208
- echo '<br /><span class="description">currently set to <strong>' .
209
- $details[$field]['current'] . '</strong></span>';
210
  }
211
  }
212
 
205
 
206
  if ( isset( $details[$field]['current'] ) &&
207
  $details[$field]['current'] != $details[$field]['new'] ) {
208
+ echo '<p class="description">currently set to <strong>' .
209
+ $details[$field]['current'] . '</strong></p>';
210
  }
211
  }
212
 
Cdnfsd_StackPath_Popup_View_Intro.php CHANGED
@@ -19,12 +19,11 @@ if ( isset( $details['error_message'] ) )
19
  <input name="api_key" type="text" class="w3tc-ignore-change"
20
  style="width: 550px"
21
  value="<?php echo esc_attr( $details['api_key'] ) ?>" />
22
- <br />
23
- <span class="description">
24
  To obtain API key you can
25
  <a target="_blank" href="<?php echo esc_attr( $url_obtain_key ) ?>">click here</a>,
26
  log in, and paste the key in above field.
27
- </span>
28
  </td>
29
  </tr>
30
  </table>
19
  <input name="api_key" type="text" class="w3tc-ignore-change"
20
  style="width: 550px"
21
  value="<?php echo esc_attr( $details['api_key'] ) ?>" />
22
+ <p class="description">
 
23
  To obtain API key you can
24
  <a target="_blank" href="<?php echo esc_attr( $url_obtain_key ) ?>">click here</a>,
25
  log in, and paste the key in above field.
26
+ </p>
27
  </td>
28
  </tr>
29
  </table>
Cdnfsd_StackPath_Popup_View_Zone.php CHANGED
@@ -5,55 +5,55 @@ if ( !defined( 'W3TC' ) )
5
  die();
6
  ?>
7
  <form class="w3tc_popup_form" method="post">
8
- <?php
9
  Util_Ui::hidden( '', 'api_key', $details['api_key'] );
10
  Util_Ui::hidden( '', 'zone_id', $details['zone_id'] );
11
  Util_Ui::hidden( '', 'name', $details['name'] );
12
  ?>
13
 
14
- <div class="metabox-holder">
15
- <?php Util_Ui::postbox_header( __( 'Configure zone', 'w3-total-cache' ) ); ?>
16
- <table class="form-table">
17
- <tr>
18
- <th>Name:</th>
19
- <td><?php echo $details['name'] ?></td>
20
- </tr>
21
- <tr>
22
- <th>Origin URL:</th>
23
- <td><?php $this->render_zone_value_change( $details, 'url' ) ?></td>
24
- </tr>
25
- <tr>
26
- <th>Origin IP:</th>
27
- <td><?php $this->render_zone_ip_change( $details, 'ip' ) ?><br />
28
- <span class="description">IP of your WordPress host</span>
29
- </td>
30
- </tr>
31
- <tr>
32
- <th>Origin IP Resolution:</th>
33
- <td><?php $this->render_zone_boolean_change( $details, 'dns_check' ) ?></td>
34
- </tr>
35
- <tr>
36
- <th>Ignore Cache Control:</th>
37
- <td><?php $this->render_zone_boolean_change( $details, 'dns_check' ) ?></td>
38
- </tr>
39
- <tr>
40
- <th><acronym title="Content Delivery Network">CDN</acronym> Domain:</th>
41
- <td>
42
- <?php $this->render_zone_value_change( $details, 'custom_domain' ) ?><br />
43
- <span class="description">Domain <acronym title="Content Delivery Network">CDN</acronym> will handle</span>
44
- </td>
45
- </tr>
46
- </table>
47
 
48
- <p class="submit">
49
- <input type="button"
50
- class="w3tc_cdn_stackpath_fsd_configure_zone w3tc-button-save button-primary"
51
- value="<?php _e( 'Apply', 'w3-total-cache' ); ?>" />
52
- <input type="button"
53
- class="w3tc_cdn_stackpath_fsd_configure_zone_skip w3tc-button-save button"
54
- value="<?php _e( 'Don\'t reconfigure, I know what I\'m doing', 'w3-total-cache' ); ?>" />
55
 
56
- </p>
57
- <?php Util_Ui::postbox_footer(); ?>
58
- </div>
59
  </form>
5
  die();
6
  ?>
7
  <form class="w3tc_popup_form" method="post">
8
+ <?php
9
  Util_Ui::hidden( '', 'api_key', $details['api_key'] );
10
  Util_Ui::hidden( '', 'zone_id', $details['zone_id'] );
11
  Util_Ui::hidden( '', 'name', $details['name'] );
12
  ?>
13
 
14
+ <div class="metabox-holder">
15
+ <?php Util_Ui::postbox_header( __( 'Configure zone', 'w3-total-cache' ) ); ?>
16
+ <table class="form-table">
17
+ <tr>
18
+ <th>Name:</th>
19
+ <td><?php echo $details['name'] ?></td>
20
+ </tr>
21
+ <tr>
22
+ <th>Origin URL:</th>
23
+ <td><?php $this->render_zone_value_change( $details, 'url' ) ?></td>
24
+ </tr>
25
+ <tr>
26
+ <th>Origin IP:</th>
27
+ <td><?php $this->render_zone_ip_change( $details, 'ip' ) ?>
28
+ <p class="description">IP of your WordPress host</p>
29
+ </td>
30
+ </tr>
31
+ <tr>
32
+ <th>Origin IP Resolution:</th>
33
+ <td><?php $this->render_zone_boolean_change( $details, 'dns_check' ) ?></td>
34
+ </tr>
35
+ <tr>
36
+ <th>Ignore Cache Control:</th>
37
+ <td><?php $this->render_zone_boolean_change( $details, 'dns_check' ) ?></td>
38
+ </tr>
39
+ <tr>
40
+ <th><acronym title="Content Delivery Network">CDN</acronym> Domain:</th>
41
+ <td>
42
+ <?php $this->render_zone_value_change( $details, 'custom_domain' ) ?>
43
+ <p class="description">Domain <acronym title="Content Delivery Network">CDN</acronym> will handle</p>
44
+ </td>
45
+ </tr>
46
+ </table>
47
 
48
+ <p class="submit">
49
+ <input type="button"
50
+ class="w3tc_cdn_stackpath_fsd_configure_zone w3tc-button-save button-primary"
51
+ value="<?php _e( 'Apply', 'w3-total-cache' ); ?>" />
52
+ <input type="button"
53
+ class="w3tc_cdn_stackpath_fsd_configure_zone_skip w3tc-button-save button"
54
+ value="<?php _e( 'Don\'t reconfigure, I know what I\'m doing', 'w3-total-cache' ); ?>" />
55
 
56
+ </p>
57
+ <?php Util_Ui::postbox_footer(); ?>
58
+ </div>
59
  </form>
ConfigCompiler.php CHANGED
@@ -246,6 +246,19 @@ class ConfigCompiler {
246
  }
247
  }
248
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  //
250
  // changes in 0.9.7
251
  //
246
  }
247
  }
248
 
249
+ //
250
+ // changes in 0.13
251
+ //
252
+ if ( version_compare( $file_data['version'], '0.12.0', '<=' ) ) {
253
+ if ( empty( $file_data['lazyload.exclude'] ) ) {
254
+ $file_data['lazyload.exclude'] = array();
255
+ }
256
+
257
+ if ( !in_array( 'skip_lazy', $file_data['lazyload.exclude'] ) ) {
258
+ $file_data['lazyload.exclude'][] = 'skip_lazy';
259
+ }
260
+ }
261
+
262
  //
263
  // changes in 0.9.7
264
  //
ConfigKeys.php CHANGED
@@ -41,6 +41,10 @@ $keys = array(
41
  'type' => 'boolean',
42
  'default' => false
43
  ),
 
 
 
 
44
  'dbcache.enabled' => array(
45
  'type' => 'boolean',
46
  'default' => false
@@ -188,6 +192,7 @@ $keys = array(
188
  'loading="eager"',
189
  'no-lazy',
190
  'rev-slidebg',
 
191
  'soliloquy-image',
192
  'swatch-img',
193
  'w3-total-cache',
@@ -212,6 +217,10 @@ $keys = array(
212
  'type' => 'boolean',
213
  'default' => false
214
  ),
 
 
 
 
215
  'objectcache.enabled_for_wp_admin' => array(
216
  'type' => 'boolean',
217
  'default' => true
@@ -325,6 +334,10 @@ $keys = array(
325
  'type' => 'boolean',
326
  'default' => false
327
  ),
 
 
 
 
328
  'pgcache.engine' => array(
329
  'type' => 'string',
330
  'default' => 'file_generic'
@@ -1994,7 +2007,14 @@ $keys = array(
1994
  'type' => 'string',
1995
  'default' => ''
1996
  ),
1997
-
 
 
 
 
 
 
 
1998
 
1999
 
2000
  'mobile.configuration_overloaded' => array(
41
  'type' => 'boolean',
42
  'default' => false
43
  ),
44
+ 'dbcache.debug_purge' => array(
45
+ 'type' => 'boolean',
46
+ 'default' => false
47
+ ),
48
  'dbcache.enabled' => array(
49
  'type' => 'boolean',
50
  'default' => false
192
  'loading="eager"',
193
  'no-lazy',
194
  'rev-slidebg',
195
+ 'skip-lazy',
196
  'soliloquy-image',
197
  'swatch-img',
198
  'w3-total-cache',
217
  'type' => 'boolean',
218
  'default' => false
219
  ),
220
+ 'objectcache.debug_purge' => array(
221
+ 'type' => 'boolean',
222
+ 'default' => false
223
+ ),
224
  'objectcache.enabled_for_wp_admin' => array(
225
  'type' => 'boolean',
226
  'default' => true
334
  'type' => 'boolean',
335
  'default' => false
336
  ),
337
+ 'pgcache.debug_purge' => array(
338
+ 'type' => 'boolean',
339
+ 'default' => false
340
+ ),
341
  'pgcache.engine' => array(
342
  'type' => 'string',
343
  'default' => 'file_generic'
2007
  'type' => 'string',
2008
  'default' => ''
2009
  ),
2010
+ 'browsercache.security.fp' => array(
2011
+ 'type' => 'boolean',
2012
+ 'default' => false
2013
+ ),
2014
+ 'browsercache.security.fp.values' => array(
2015
+ 'type' => 'array',
2016
+ 'default' => array()
2017
+ ),
2018
 
2019
 
2020
  'mobile.configuration_overloaded' => array(
DbCache_WpdbInjection_QueryCaching.php CHANGED
@@ -301,6 +301,10 @@ class DbCache_WpdbInjection_QueryCaching extends DbCache_WpdbInjection {
301
  'flushing based on sqlquery group ' . $group .
302
  ' with extras ' . json_encode( $extras ) );
303
  }
 
 
 
 
304
 
305
  $cache = $this->_get_cache();
306
  $flush_groups = $this->_get_flush_groups( $group, $extras );
301
  'flushing based on sqlquery group ' . $group .
302
  ' with extras ' . json_encode( $extras ) );
303
  }
304
+ if ( $this->_config->get_boolean( 'dbcache.debug_purge' ) ) {
305
+ Util_Debug::log_purge( 'dbcache', '_flush_cache_for_sql_group',
306
+ array( $group, $extras ) );
307
+ }
308
 
309
  $cache = $this->_get_cache();
310
  $flush_groups = $this->_get_flush_groups( $group, $extras );
Extension_Amp_Plugin.php CHANGED
@@ -209,8 +209,15 @@ class Extension_Amp_Plugin {
209
 
210
  if ( $c->get_string( array( 'amp', 'url_type' ) ) == 'querystring' ) {
211
  $url_postfix = $c->get_string( array( 'amp', 'url_postfix' ) );
212
- if ( preg_match( "~(\\?|&)$url_postfix(&|$)~", $url ) ) {
213
- $page_key[1] .= '_amp';
 
 
 
 
 
 
 
214
  }
215
  }
216
 
209
 
210
  if ( $c->get_string( array( 'amp', 'url_type' ) ) == 'querystring' ) {
211
  $url_postfix = $c->get_string( array( 'amp', 'url_postfix' ) );
212
+
213
+ if ( strpos( $url_postfix, '=' ) === false ) {
214
+ if ( preg_match( "~(\\?|&)$url_postfix(=[^&]*)?(&|$)~", $url ) ) {
215
+ $page_key[1] .= '_amp';
216
+ }
217
+ } else {
218
+ if ( preg_match( "~(\\?|&)$url_postfix(&|$)~", $url ) ) {
219
+ $page_key[1] .= '_amp';
220
+ }
221
  }
222
  }
223
 
Extension_FragmentCache_Page_View.php CHANGED
@@ -31,9 +31,9 @@ $engine = $config->get_string( array( 'fragmentcache', 'engine' ) );
31
  <?php
32
  $ext = Extensions_Util::get_extension( $config, 'fragmentcache' );
33
  if ( !empty( $ext['requirements'] ) ) {
34
- echo ' (<span class="description">' .
35
  $ext['requirements'] .
36
- '</span>)';
37
  }
38
  ?>
39
  <?php endif ?>
@@ -66,9 +66,9 @@ $engine = $config->get_string( array( 'fragmentcache', 'engine' ) );
66
  implode( ',', $descriptor['actions'] ), '</li>';
67
  ?>
68
  </ul>
69
- <span class="description"><?php _e( 'The groups above will be flushed upon setting changes.', 'w3-total-cache' ); ?></span>
70
  <?php else: ?>
71
- <span class="description"><?php _e( 'No groups have been registered.', 'w3-total-cache' ); ?></span>
72
  <?php endif ?>
73
  </td>
74
  </tr>
@@ -91,14 +91,14 @@ if ( $config->get_string( array( 'fragmentcache', 'engine' ) ) == 'memcached' )
91
  <th style="width: 250px;"><label for="fragmentcache_lifetime"><?php _e( 'Default lifetime of cached fragments:', 'w3-total-cache' ) ?></label></th>
92
  <td>
93
  <input id="fragmentcache_lifetime" type="text" <?php Util_Ui::sealing_disabled( 'fragmentcache.' ) ?> name="fragmentcache___lifetime" value="<?php echo esc_attr( $config->get_integer( array( 'fragmentcache', 'lifetime' ) ) ) ?>" size="8" /><?php _e( 'seconds', 'w3-total-cache' ) ?>
94
- <br /><span class="description"><?php _e( 'Determines the natural expiration time of unchanged cache items. The higher the value, the larger the cache.', 'w3-total-cache' ); ?></span>
95
  </td>
96
  </tr>
97
  <tr>
98
  <th><label for="fragmentcache_file_gc"><?php _e( 'Garbage collection interval:', 'w3-total-cache' ) ?></label></th>
99
  <td>
100
  <input id="fragmentcache_file_gc" type="text" <?php Util_Ui::sealing_disabled( 'fragmentcache.' ) ?> name="fragmentcache___file__gc" value="<?php echo esc_attr( $config->get_integer( array( 'fragmentcache', 'file.gc' ) ) ) ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ) ?>
101
- <br /><span class="description"><?php _e( 'If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.', 'w3-total-cache' ); ?></span>
102
  </td>
103
  </tr>
104
  <tr>
@@ -106,8 +106,8 @@ if ( $config->get_string( array( 'fragmentcache', 'engine' ) ) == 'memcached' )
106
  <td>
107
  <textarea id="fragmentcache_groups" name="fragmentcache___groups"
108
  <?php Util_Ui::sealing_disabled( 'fragmentcache.' ) ?>
109
- cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $config->get_array( array( 'fragmentcache', 'groups' ) ) ) ); ?></textarea><br />
110
- <span class="description"><?php _e( 'Specify fragment groups that should be managed by W3 Total Cache. Enter one action per line comma delimited, e.g. (group, action1, action2). Include the prefix used for a transient by a theme or plugin.', 'w3-total-cache' ); ?></span>
111
  </td>
112
  </tr>
113
  </table>
31
  <?php
32
  $ext = Extensions_Util::get_extension( $config, 'fragmentcache' );
33
  if ( !empty( $ext['requirements'] ) ) {
34
+ echo ' (<p class="description">' .
35
  $ext['requirements'] .
36
+ '</p>)';
37
  }
38
  ?>
39
  <?php endif ?>
66
  implode( ',', $descriptor['actions'] ), '</li>';
67
  ?>
68
  </ul>
69
+ <p class="description"><?php _e( 'The groups above will be flushed upon setting changes.', 'w3-total-cache' ); ?></p>
70
  <?php else: ?>
71
+ <p class="description"><?php _e( 'No groups have been registered.', 'w3-total-cache' ); ?></p>
72
  <?php endif ?>
73
  </td>
74
  </tr>
91
  <th style="width: 250px;"><label for="fragmentcache_lifetime"><?php _e( 'Default lifetime of cached fragments:', 'w3-total-cache' ) ?></label></th>
92
  <td>
93
  <input id="fragmentcache_lifetime" type="text" <?php Util_Ui::sealing_disabled( 'fragmentcache.' ) ?> name="fragmentcache___lifetime" value="<?php echo esc_attr( $config->get_integer( array( 'fragmentcache', 'lifetime' ) ) ) ?>" size="8" /><?php _e( 'seconds', 'w3-total-cache' ) ?>
94
+ <p class="description"><?php _e( 'Determines the natural expiration time of unchanged cache items. The higher the value, the larger the cache.', 'w3-total-cache' ); ?></p>
95
  </td>
96
  </tr>
97
  <tr>
98
  <th><label for="fragmentcache_file_gc"><?php _e( 'Garbage collection interval:', 'w3-total-cache' ) ?></label></th>
99
  <td>
100
  <input id="fragmentcache_file_gc" type="text" <?php Util_Ui::sealing_disabled( 'fragmentcache.' ) ?> name="fragmentcache___file__gc" value="<?php echo esc_attr( $config->get_integer( array( 'fragmentcache', 'file.gc' ) ) ) ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ) ?>
101
+ <p class="description"><?php _e( 'If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.', 'w3-total-cache' ); ?></p>
102
  </td>
103
  </tr>
104
  <tr>
106
  <td>
107
  <textarea id="fragmentcache_groups" name="fragmentcache___groups"
108
  <?php Util_Ui::sealing_disabled( 'fragmentcache.' ) ?>
109
+ cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $config->get_array( array( 'fragmentcache', 'groups' ) ) ) ); ?></textarea>
110
+ <p class="description"><?php _e( 'Specify fragment groups that should be managed by W3 Total Cache. Enter one action per line comma delimited, e.g. (group, action1, action2). Include the prefix used for a transient by a theme or plugin.', 'w3-total-cache' ); ?></p>
111
  </td>
112
  </tr>
113
  </table>
Extension_FragmentCache_Plugin_Admin.php CHANGED
@@ -21,6 +21,12 @@ class Extension_FragmentCache_Plugin_Admin {
21
  'extension_uri' => 'https://www.w3-edge.com/',
22
  'extension_id' => 'fragmentcache',
23
  'pro_feature' => true,
 
 
 
 
 
 
24
  'settings_exists' => true,
25
  'version' => '1.0',
26
  'enabled' => empty( $requirements ),
21
  'extension_uri' => 'https://www.w3-edge.com/',
22
  'extension_id' => 'fragmentcache',
23
  'pro_feature' => true,
24
+ 'pro_excerpt' => __( 'Increase the performance of dynamic sites that cannot benefit from the caching of entire pages.', 'w3-total-cache' ),
25
+ 'pro_description' => array(
26
+ __( 'Fragment caching extends the core functionality of WordPress by enabling caching policies to be set on groups of objects that are cached. The benefit of this approach is not only that capabilities in themes and plugins can be optimized to use caching to save resources and reduce response times, but caching methods like Memcached or Redis (for example) can also be used to scale. Instructions for use are available in the FAQ available under the help menu or contact support for premium services to improve website performance.', 'w3-total-cache' ),
27
+
28
+ __( 'This feature gives you control over the caching policies by the group as well as visibility into the configuration by extending the WordPress Object API with additional functionality.', 'w3-total-cache' )
29
+ ),
30
  'settings_exists' => true,
31
  'version' => '1.0',
32
  'enabled' => empty( $requirements ),
Extension_Genesis_Page_View.php CHANGED
@@ -6,16 +6,16 @@ if ( !defined( 'W3TC' ) )
6
 
7
  ?>
8
  <p id="w3tc-options-menu">
9
- Jump to:
10
- <a href="admin.php?page=w3tc_general"><?php _e( 'Main Menu', 'w3-total-cache' ); ?></a> |
11
- <a href="admin.php?page=w3tc_extensions"><?php _e( 'Extensions', 'w3-total-cache' ); ?></a> |
12
- <a href="#header"><?php _e( 'Header', 'w3-total-cache' ); ?></a> |
13
- <a href="#content"><?php _e( 'Content', 'w3-total-cache' ); ?></a> |
14
- <a href="#sidebar"><?php _e( 'Sidebar', 'w3-total-cache' ); ?></a> |
15
- <a href="#exclusions"><?php _e( 'Exclusions', 'w3-total-cache' ); ?></a>
16
  </p>
17
  <p>
18
- Genesis extension is currently <?php
19
  if ( $config->is_extension_active_frontend( 'genesis.theme' ) )
20
  echo '<span class="w3tc-enabled">enabled</span>';
21
  else
@@ -24,9 +24,9 @@ else
24
  <p>
25
 
26
  <div class="metabox-holder">
27
- <?php Util_Ui::postbox_header( __( 'Header', 'w3-total-cache' ), '', 'header' ); ?>
28
- <table class="form-table">
29
- <?php
30
  Util_Ui::config_item( array(
31
  'key' => array( 'genesis.theme', 'wp_head' ),
32
  'control' => 'checkbox',
@@ -57,15 +57,15 @@ Util_Ui::config_item( array(
57
  ) );
58
 
59
  ?>
60
- </table>
61
- <?php Util_Ui::button_config_save( 'extension_genesis_header' ); ?>
62
- <?php Util_Ui::postbox_footer(); ?>
63
 
64
 
65
 
66
- <?php Util_Ui::postbox_header( __( 'Content', 'w3-total-cache' ), '', 'content' ); ?>
67
- <table class="form-table">
68
- <?php
69
  Util_Ui::config_item( array(
70
  'key' => array( 'genesis.theme', 'loop_front_page' ),
71
  'control' => 'checkbox',
@@ -121,15 +121,15 @@ Util_Ui::config_item( array(
121
  'description' => __( 'Caches the ping loop, pagination is supported. One per line.', 'w3-total-cache' )
122
  ) );
123
  ?>
124
- </table>
125
- <?php Util_Ui::button_config_save( 'extension_genesis_content' ); ?>
126
- <?php Util_Ui::postbox_footer(); ?>
127
 
128
 
129
 
130
- <?php Util_Ui::postbox_header( __( 'Sidebar', 'w3-total-cache' ), '', 'sidebar' ); ?>
131
- <table class="form-table">
132
- <?php
133
  Util_Ui::config_item( array(
134
  'key' => array( 'genesis.theme', 'sidebar' ),
135
  'control' => 'checkbox',
@@ -144,15 +144,15 @@ Util_Ui::config_item( array(
144
  'description' => __( 'List of pages that should not have sidebar cached. Specify one page / post per line. This area supports regular expressions.', 'w3-total-cache' )
145
  ) );
146
  ?>
147
- </table>
148
- <?php Util_Ui::button_config_save( 'extension_genesis_sidebar' ); ?>
149
- <?php Util_Ui::postbox_footer(); ?>
150
 
151
 
152
 
153
- <?php Util_Ui::postbox_header( __( 'Footer', 'w3-total-cache' ) ); ?>
154
- <table class="form-table">
155
- <?php
156
  Util_Ui::config_item( array(
157
  'key' => array( 'genesis.theme', 'genesis_footer' ),
158
  'control' => 'checkbox',
@@ -175,17 +175,17 @@ Util_Ui::config_item( array(
175
  'description' => 'Don\'t use fragment cache with the following hooks and for the specified user roles.'
176
  ) );
177
  ?>
178
- </table>
179
- <?php Util_Ui::button_config_save( 'extension_genesis_footer' ); ?>
180
- <?php Util_Ui::postbox_footer(); ?>
181
 
182
 
183
- <?php Util_Ui::postbox_header( __( 'Exclusions', 'w3-total-cache' ), '', 'exclusions' ); ?>
184
- <table class="form-table">
185
- <tr>
186
- <td><?php _e( 'Select hooks', 'w3-total-cache' ) ?></td>
187
- <td>
188
- <?php
189
 
190
  $saved_hooks = $config->get_array( array( 'genesis.theme', 'reject_logged_roles_on_actions' ) );
191
  $name = Util_Ui::config_key_to_http_name( array( 'genesis.theme', 'reject_logged_roles_on_actions' ) );
@@ -203,47 +203,45 @@ $hooks = array(
203
  );
204
  ?>
205
 
206
- <input <?php disabled( $config->is_sealed( 'genesis.theme' ) ) ?>
207
- type="hidden" name="<?php echo esc_attr( $name )?>" value="" />
208
- <?php foreach ( $hooks as $hook => $hook_label ) : ?>
209
- <input <?php disabled( $config->is_sealed( 'genesis.theme' ) ) ?>
210
- type="checkbox" name="<?php echo esc_attr( $name )?>[]"
211
- value="<?php echo $hook ?>"
212
- <?php checked( in_array( $hook, $saved_hooks ) ) ?>
213
- id="role_<?php echo $hook ?>" />
214
- <label for="role_<?php echo $hook ?>"><?php echo $hook_label ?></label><br />
215
- <?php endforeach; ?>
216
-
217
- <br />
218
- <span class="description">
219
- <?php _e( 'Select hooks from the list that should not be cached if user belongs to any of the roles selected below.', 'w3-total-cache' ) ?>
220
- </span>
221
- </td>
222
- </tr>
223
- <tr>
224
- <td><?php _e( 'Select roles:', 'w3-total-cache' ) ?></td>
225
- <td>
226
- <?php
227
  $saved_roles = $config->get_array( array( 'genesis.theme', 'reject_roles' ) );
228
  $name = Util_Ui::config_key_to_http_name( array( 'genesis.theme', 'reject_roles' ) );
229
 
230
  ?>
231
- <input type="hidden" name="<?php echo esc_attr( $name )?>" value="" />
232
- <?php foreach ( get_editable_roles() as $role_name => $role_data ) : ?>
233
- <input <?php disabled( $config->is_sealed( 'genesis.theme' ) ) ?>
234
- type="checkbox"
235
- name="<?php echo esc_attr( $name )?>[]"
236
- value="<?php echo $role_name ?>" <?php checked( in_array( $role_name, $saved_roles ) ) ?> id="role_<?php echo $role_name ?>" />
237
- <label for="role_<?php echo $role_name ?>"><?php echo $role_data['name'] ?></label>
238
- <?php endforeach; ?>
239
- <br />
240
- <span class="description">
241
- <?php _e( 'Select user roles that should not use the fragment cache.', 'w3-total-cache' ) ?>
242
- </span>
243
- </td>
244
- </tr>
245
- </table>
246
- <?php Util_Ui::button_config_save( 'extension_genesis_exclusions' ); ?>
247
- <?php Util_Ui::postbox_footer(); ?>
248
 
249
  </div>
6
 
7
  ?>
8
  <p id="w3tc-options-menu">
9
+ Jump to:
10
+ <a href="admin.php?page=w3tc_general"><?php _e( 'Main Menu', 'w3-total-cache' ); ?></a> |
11
+ <a href="admin.php?page=w3tc_extensions"><?php _e( 'Extensions', 'w3-total-cache' ); ?></a> |
12
+ <a href="#header"><?php _e( 'Header', 'w3-total-cache' ); ?></a> |
13
+ <a href="#content"><?php _e( 'Content', 'w3-total-cache' ); ?></a> |
14
+ <a href="#sidebar"><?php _e( 'Sidebar', 'w3-total-cache' ); ?></a> |
15
+ <a href="#exclusions"><?php _e( 'Exclusions', 'w3-total-cache' ); ?></a>
16
  </p>
17
  <p>
18
+ Genesis extension is currently <?php
19
  if ( $config->is_extension_active_frontend( 'genesis.theme' ) )
20
  echo '<span class="w3tc-enabled">enabled</span>';
21
  else
24
  <p>
25
 
26
  <div class="metabox-holder">
27
+ <?php Util_Ui::postbox_header( __( 'Header', 'w3-total-cache' ), '', 'header' ); ?>
28
+ <table class="form-table">
29
+ <?php
30
  Util_Ui::config_item( array(
31
  'key' => array( 'genesis.theme', 'wp_head' ),
32
  'control' => 'checkbox',
57
  ) );
58
 
59
  ?>
60
+ </table>
61
+ <?php Util_Ui::button_config_save( 'extension_genesis_header' ); ?>
62
+ <?php Util_Ui::postbox_footer(); ?>
63
 
64
 
65
 
66
+ <?php Util_Ui::postbox_header( __( 'Content', 'w3-total-cache' ), '', 'content' ); ?>
67
+ <table class="form-table">
68
+ <?php
69
  Util_Ui::config_item( array(
70
  'key' => array( 'genesis.theme', 'loop_front_page' ),
71
  'control' => 'checkbox',
121
  'description' => __( 'Caches the ping loop, pagination is supported. One per line.', 'w3-total-cache' )
122
  ) );
123
  ?>
124
+ </table>
125
+ <?php Util_Ui::button_config_save( 'extension_genesis_content' ); ?>
126
+ <?php Util_Ui::postbox_footer(); ?>
127
 
128
 
129
 
130
+ <?php Util_Ui::postbox_header( __( 'Sidebar', 'w3-total-cache' ), '', 'sidebar' ); ?>
131
+ <table class="form-table">
132
+ <?php
133
  Util_Ui::config_item( array(
134
  'key' => array( 'genesis.theme', 'sidebar' ),
135
  'control' => 'checkbox',
144
  'description' => __( 'List of pages that should not have sidebar cached. Specify one page / post per line. This area supports regular expressions.', 'w3-total-cache' )
145
  ) );
146
  ?>
147
+ </table>
148
+ <?php Util_Ui::button_config_save( 'extension_genesis_sidebar' ); ?>
149
+ <?php Util_Ui::postbox_footer(); ?>
150
 
151
 
152
 
153
+ <?php Util_Ui::postbox_header( __( 'Footer', 'w3-total-cache' ) ); ?>
154
+ <table class="form-table">
155
+ <?php
156
  Util_Ui::config_item( array(
157
  'key' => array( 'genesis.theme', 'genesis_footer' ),
158
  'control' => 'checkbox',
175
  'description' => 'Don\'t use fragment cache with the following hooks and for the specified user roles.'
176
  ) );
177
  ?>
178
+ </table>
179
+ <?php Util_Ui::button_config_save( 'extension_genesis_footer' ); ?>
180
+ <?php Util_Ui::postbox_footer(); ?>
181
 
182
 
183
+ <?php Util_Ui::postbox_header( __( 'Exclusions', 'w3-total-cache' ), '', 'exclusions' ); ?>
184
+ <table class="form-table">
185
+ <tr>
186
+ <td><?php _e( 'Select hooks', 'w3-total-cache' ) ?></td>
187
+ <td>
188
+ <?php
189
 
190
  $saved_hooks = $config->get_array( array( 'genesis.theme', 'reject_logged_roles_on_actions' ) );
191
  $name = Util_Ui::config_key_to_http_name( array( 'genesis.theme', 'reject_logged_roles_on_actions' ) );
203
  );
204
  ?>
205
 
206
+ <input <?php disabled( $config->is_sealed( 'genesis.theme' ) ) ?>
207
+ type="hidden" name="<?php echo esc_attr( $name )?>" value="" />
208
+ <?php foreach ( $hooks as $hook => $hook_label ) : ?>
209
+ <input <?php disabled( $config->is_sealed( 'genesis.theme' ) ) ?>
210
+ type="checkbox" name="<?php echo esc_attr( $name )?>[]"
211
+ value="<?php echo $hook ?>"
212
+ <?php checked( in_array( $hook, $saved_hooks ) ) ?>
213
+ id="role_<?php echo $hook ?>" />
214
+ <label for="role_<?php echo $hook ?>"><?php echo $hook_label ?></label><br />
215
+ <?php endforeach; ?>
216
+
217
+ <p class="description">
218
+ <?php _e( 'Select hooks from the list that should not be cached if user belongs to any of the roles selected below.', 'w3-total-cache' ) ?>
219
+ </p>
220
+ </td>
221
+ </tr>
222
+ <tr>
223
+ <td><?php _e( 'Select roles:', 'w3-total-cache' ) ?></td>
224
+ <td>
225
+ <?php
 
226
  $saved_roles = $config->get_array( array( 'genesis.theme', 'reject_roles' ) );
227
  $name = Util_Ui::config_key_to_http_name( array( 'genesis.theme', 'reject_roles' ) );
228
 
229
  ?>
230
+ <input type="hidden" name="<?php echo esc_attr( $name )?>" value="" />
231
+ <?php foreach ( get_editable_roles() as $role_name => $role_data ) : ?>
232
+ <input <?php disabled( $config->is_sealed( 'genesis.theme' ) ) ?>
233
+ type="checkbox"
234
+ name="<?php echo esc_attr( $name )?>[]"
235
+ value="<?php echo $role_name ?>" <?php checked( in_array( $role_name, $saved_roles ) ) ?> id="role_<?php echo $role_name ?>" />
236
+ <label for="role_<?php echo $role_name ?>"><?php echo $role_data['name'] ?></label>
237
+ <?php endforeach; ?>
238
+ <p class="description">
239
+ <?php _e( 'Select user roles that should not use the fragment cache.', 'w3-total-cache' ) ?>
240
+ </p>
241
+ </td>
242
+ </tr>
243
+ </table>
244
+ <?php Util_Ui::button_config_save( 'extension_genesis_exclusions' ); ?>
245
+ <?php Util_Ui::postbox_footer(); ?>
 
246
 
247
  </div>
Extension_Genesis_Plugin_Admin.php CHANGED
@@ -40,6 +40,8 @@ class Extension_Genesis_Plugin_Admin {
40
  'extension_uri' => 'https://www.w3-edge.com/',
41
  'extension_id' => 'genesis.theme',
42
  'pro_feature' => true,
 
 
43
  'settings_exists' => true,
44
  'version' => '0.1',
45
  'enabled' => empty( $requirements ),
40
  'extension_uri' => 'https://www.w3-edge.com/',
41
  'extension_id' => 'genesis.theme',
42
  'pro_feature' => true,
43
+ 'pro_excerpt' => __( 'Increase the performance of themes powered by the Genesis Theme Framework by up to 60%.', 'w3-total-cache'),
44
+ 'pro_description' => array(),
45
  'settings_exists' => true,
46
  'version' => '0.1',
47
  'enabled' => empty( $requirements ),
Extension_NewRelic_Page_View_Apm.php CHANGED
@@ -6,12 +6,12 @@ if ( !defined( 'W3TC' ) )
6
 
7
  ?>
8
  <p>
9
- Jump to:
10
- <a href="admin.php?page=w3tc_general"><?php _e( 'Main Menu', 'w3-total-cache' ); ?></a> |
11
- <a href="admin.php?page=w3tc_extensions"><?php _e( 'Extensions', 'w3-total-cache' ); ?></a>
12
  </p>
13
  <p>
14
- NewRelic extension is currently <?php
15
  if ( $config->is_extension_active_frontend( 'newrelic' ) )
16
  echo '<span class="w3tc-enabled">enabled</span>';
17
  else
@@ -21,196 +21,195 @@ else
21
 
22
  <form action="admin.php?page=w3tc_monitoring" method="post">
23
  <div class="metabox-holder">
24
- <?php Util_Ui::postbox_header( __( 'Application Settings', 'w3-total-cache' ), '', 'application' ); ?>
25
- <?php if ( $application_settings ): ?>
26
- <table class="form-table">
27
- <tr>
28
- <th>
29
- <label>Application ID:</label>
30
- </th>
31
- <td>
32
- <?php esc_attr_e( $application_settings['application-id'] )?>
33
- </td>
34
- </tr>
35
- <tr>
36
- <th>
37
- <label>Application name:</label>
38
- </th>
39
- <td>
40
- <?php esc_attr_e( $application_settings['name'] )?>
41
- </td>
42
- </tr>
43
- <tr>
44
- <th>
45
- <label for="alerts-enabled">Alerts enabled:</label>
46
- </th>
47
- <td>
48
- <input name="alerts-enabled]" type="hidden" value="false" />
49
- <input id="alerts-enabled" name="application[alerts_enabled]"
50
- type="checkbox" value="1" <?php checked( $application_settings['alerts-enabled'], 'true' ) ?> <?php Util_Ui::sealing_disabled( 'newrelic' ) ?>/>
51
- </td>
52
- </tr>
53
- <tr>
54
- <th>
55
- <label for="app-apdex-t">Application ApDex Threshold:</label>
56
- </th>
57
- <td>
58
- <input id="app-apdex-t" name="application[app_apdex_t]" type="text"
59
- value="<?php echo esc_attr( $application_settings['app-apdex-t'] )?>"
60
- <?php Util_Ui::sealing_disabled( 'newrelic' ) ?> />
61
- </td>
62
- </tr>
63
- <tr>
64
- <th>
65
- <label for="rum-apdex-t"><acronym title="Real User Monitoring">RUM</acronym> ApDex Threshold:</label>
66
- </th>
67
- <td>
68
- <input id="rum-apdex-t" name="application[rum_apdex_t]" type="text"
69
- value="<?php echo esc_attr( $application_settings['rum-apdex-t'] )?>"
70
- <?php Util_Ui::sealing_disabled( 'newrelic' ) ?>/>
71
- </td>
72
- </tr>
73
- <tr>
74
- <th>
75
- <label for="rum-enabled"><acronym title="Real User Monitoring">RUM</acronym> enabled:</label>
76
- </th>
77
- <td>
78
- <input name="application[rum_enabled]" type="hidden" value="false"
79
- <?php Util_Ui::sealing_disabled( 'newrelic' ) ?> />
80
- <input id="rum-enabled" name="application[rum_enabled]"
81
- type="checkbox" value="1"
82
- <?php checked( $application_settings['rum-enabled'], 'true' ) ?>
83
- <?php Util_Ui::sealing_disabled( 'newrelic' ) ?>/>
84
- </td>
85
- </tr>
86
- </table>
87
- <p class="submit">
88
- <?php echo Util_Ui::nonce_field( 'w3tc' ); ?>
89
- <input type="submit" name="w3tc_save_new_relic"
90
- class="w3tc-button-save button-primary"
91
- <?php Util_Ui::sealing_disabled( 'newrelic' ) ?>
92
- value="Save New Relic settings" />
93
- </p>
94
- <?php elseif ( empty( $application_settings ) ): ?>
95
- <p><span class="description"><?php echo sprintf( __( 'Application settings could not be retrieved. New Relic may not be properly configured, <a href="%s">review the settings</a>.', 'w3-total-cache' ), network_admin_url( 'admin.php?page=w3tc_general#monitoring' ) ) ?></span></p>
96
- <?php else: ?>
97
- <p><?php _e( 'Application settings are only visible when New Relic is enabled', 'w3-total-cache', 'w3-total-cache' ) ?></p>
98
- <?php endif; ?>
99
- <?php Util_Ui::postbox_footer(); ?>
100
- </form>
101
- <form action="admin.php?page=w3tc_monitoring" method="post">
102
 
103
- <?php Util_Ui::postbox_header( __( 'Dashboard Settings', 'w3-total-cache' ), '', 'dashboard' ); ?>
104
- <table class="form-table">
105
- <tr>
106
- <th>
107
- <label for="newrelic_cache_time"><?php
108
  _e( 'Cache time:', 'w3-total-cache' )
109
  ?></label></th>
110
- <td><input id="newrelic_cache_time" name="extension__newrelic__cache_time"
111
- type="text" value="<?php echo esc_attr( $config->get_integer( array( 'newrelic', 'cache_time', 5 ) ) ) ?>"
112
- <?php Util_Ui::sealing_disabled( 'newrelic' ) ?> />
113
- <p><span class="description">
114
- <?php _e( 'How many minutes data retrieved from New Relic should be stored. Minimum is 1 minute.', 'w3-total-cache' ) ?>
115
- </span>
116
- </p>
117
- </td>
118
- </tr>
119
- </table>
120
- <?php Util_Ui::button_config_save( 'extension_newrelic_dashboard' ); ?>
121
- <?php Util_Ui::postbox_footer(); ?>
122
 
123
- <?php Util_Ui::postbox_header( __( 'Behavior Settings', 'w3-total-cache' ), '', 'behavior' ); ?>
124
- <table class="form-table">
125
- <tr>
126
- <th colspan="2">
127
- <?php
128
  Util_Ui::checkbox( '',
129
  Util_Ui::config_key_to_http_name( array( 'newrelic', 'accept.logged_roles' ) ),
130
  $config->get_boolean( array( 'newrelic', 'accept.logged_roles' ) ),
131
  $config->is_sealed( 'newrelic' ) );
132
  _e( 'Use <acronym title="Real User Monitoring">RUM</acronym> only for following user roles', 'w3-total-cache' )
133
- ?></label><br />
134
- <span class="description"><?php
135
- _e( 'Select user roles that <acronym title="Real User Monitoring">RUM</acronym> should be enabled for:', 'w3-total-cache' )
136
- ?></span>
137
 
138
- <div id="newrelic_accept_roles" class="w3tc_reject_roles">
139
- <?php $saved_roles = $config->get_array( array( 'newrelic', 'accept.roles' ) ); ?>
140
- <input type="hidden" name="newrelic___accept__roles" value="" /><br />
141
- <?php foreach ( get_editable_roles() as $role_name => $role_data ) : ?>
142
- <input type="checkbox" name="newrelic___accept__roles[]" value="<?php echo $role_name ?>"
143
- <?php checked( in_array( $role_name, $saved_roles ) ) ?>
144
- id="role_<?php echo $role_name ?>"
145
- <?php Util_Ui::sealing_disabled( 'newrelic' ) ?> />
146
- <label for="role_<?php echo $role_name ?>"><?php echo $role_data['name'] ?></label>
147
- <?php endforeach; ?>
148
- </div>
149
- </th>
150
- </tr>
151
- <tr>
152
- <th>
153
- <label for="newrelic_include_rum"><?php
154
  _e( 'Include <acronym title="Real User Monitoring">RUM</acronym> in compressed or cached pages:', 'w3-total-cache' )
155
  ?></label>
156
- </th>
157
- <td>
158
- <input name="extension__newrelic__include_rum" type="hidden" value="0"
159
- <?php Util_Ui::sealing_disabled( 'newrelic' ) ?> />
160
- <input id="newrelic_include_rum" name="extension__newrelic__include_rum"
161
- type="checkbox" value="1"
162
- <?php checked( $config->get_boolean( array( 'newrelic', 'include_rum' ) ) ) ?>
163
- <?php Util_Ui::sealing_disabled( 'newrelic' ) ?> />
164
- <p><span class="description">
165
- <?php _e( 'This enables inclusion of <acronym title="Real User Monitoring">RUM</acronym> when using Page Cache together with Browser Cache gzip or when using Page Cache with Disc: Enhanced', 'w3-total-cache' )?>
166
- </span>
167
- </p>
168
- </td>
169
- </tr>
170
- <tr>
171
- <th>
172
- <label for="newrelic_use_php_function"><?php
173
  _e( 'Use <acronym title=\"Hypertext Preprocessor\">PHP</acronym> function to set application name:', 'w3-total-cache' )
174
  ?></label></th>
175
- <td>
176
- <?php if ( Util_Environment::is_wpmu() ): ?>
177
- <input id="newrelic_use_php_function" name="extension__newrelic__use_php_function" type="checkbox" value="1" checked="checked" disabled="disabled" />
178
- <p><span class="description">
179
- <?php _e( 'This is required when using New Relic on a network install to set the proper names for sites.', 'w3-total-cache' ) ?></span></p>
180
- <?php else: ?>
181
- <input name="extension__newrelic__use_php_function" type="hidden" value="0" />
182
- <input id="newrelic_use_php_function" name="extension__newrelic__use_php_function" type="checkbox" value="1" <?php checked( $config->get_boolean( array( 'newrelic', 'use_php_function' ) ) ) ?>/>
183
- <p><span class="description">
184
- <?php _e( 'Enable this to dynamically set proper application name. (See New Relic <a href="https://newrelic.com/docs/php/per-directory-settings">Per-directory settings</a> for other methods.', 'w3-total-cache' ) ?></span>
185
- </p>
186
- <?php endif ?>
187
- </td>
188
- </tr>
189
- <tr>
190
- <th>
191
- <label for="newrelic_enable_xmit"><?php
 
192
  _e( 'Enable XMIT:', 'w3-total-cache' )
193
  ?></label>
194
- </th>
195
- <td><input name="" type="hidden" value="0" />
196
- <input id="newrelic_enable_xmit" name="extension__newrelic__enable_xmit" type="checkbox" value="1" <?php checked( $config->get_boolean( array( 'newrelic', 'enable_xmit' ) ) ) ?> <?php Util_Ui::sealing_disabled( 'newrelic' ) ?>/>
197
- <p><span class="description"><?php _e( sprintf( 'Enable this if you want to record the metric and transaction data (until the name is changed using PHP function), specify a value of true for this argument to make the agent send the transaction to the daemon. There is a slight performance impact as it takes a few milliseconds for the agent to dump its data. <em>From %s</em>',
198
  '<a href="https://newrelic.com/docs/php/the-php-api">New Relic PHP API doc</a>' )
199
- , 'w3-total-cache' )?></span></p>
200
- </td>
201
- </tr>
202
- </table>
203
- <?php Util_Ui::button_config_save( 'extension_newrelic_behaviour' ); ?>
204
- <?php Util_Ui::postbox_footer(); ?>
205
- </form>
206
  </div>
207
  <?php if ( $view_metric ):?>
208
  <table>
209
  <?php foreach ( $metric_names as $metric ):?>
210
- <tr>
211
- <th style="text-align: right"><strong><?php echo $metric->name ?></strong></th>
212
- <td><?php echo implode( ', ', $metric->fields ) ?></td>
213
- </tr>
214
  <?php endforeach; ?>
215
  </table>
216
  <?php endif; ?>
6
 
7
  ?>
8
  <p>
9
+ Jump to:
10
+ <a href="admin.php?page=w3tc_general"><?php _e( 'Main Menu', 'w3-total-cache' ); ?></a> |
11
+ <a href="admin.php?page=w3tc_extensions"><?php _e( 'Extensions', 'w3-total-cache' ); ?></a>
12
  </p>
13
  <p>
14
+ NewRelic extension is currently <?php
15
  if ( $config->is_extension_active_frontend( 'newrelic' ) )
16
  echo '<span class="w3tc-enabled">enabled</span>';
17
  else
21
 
22
  <form action="admin.php?page=w3tc_monitoring" method="post">
23
  <div class="metabox-holder">
24
+ <?php Util_Ui::postbox_header( __( 'Application Settings', 'w3-total-cache' ), '', 'application' ); ?>
25
+ <?php if ( $application_settings ): ?>
26
+ <table class="form-table">
27
+ <tr>
28
+ <th>
29
+ <label>Application ID:</label>
30
+ </th>
31
+ <td>
32
+ <?php esc_attr_e( $application_settings['application-id'] )?>
33
+ </td>
34
+ </tr>
35
+ <tr>
36
+ <th>
37
+ <label>Application name:</label>
38
+ </th>
39
+ <td>
40
+ <?php esc_attr_e( $application_settings['name'] )?>
41
+ </td>
42
+ </tr>
43
+ <tr>
44
+ <th>
45
+ <label for="alerts-enabled">Alerts enabled:</label>
46
+ </th>
47
+ <td>
48
+ <input name="alerts-enabled]" type="hidden" value="false" />
49
+ <input id="alerts-enabled" name="application[alerts_enabled]"
50
+ type="checkbox" value="1" <?php checked( $application_settings['alerts-enabled'], 'true' ) ?> <?php Util_Ui::sealing_disabled( 'newrelic' ) ?>/>
51
+ </td>
52
+ </tr>
53
+ <tr>
54
+ <th>
55
+ <label for="app-apdex-t">Application ApDex Threshold:</label>
56
+ </th>
57
+ <td>
58
+ <input id="app-apdex-t" name="application[app_apdex_t]" type="text"
59
+ value="<?php echo esc_attr( $application_settings['app-apdex-t'] )?>"
60
+ <?php Util_Ui::sealing_disabled( 'newrelic' ) ?> />
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <th>
65
+ <label for="rum-apdex-t"><acronym title="Real User Monitoring">RUM</acronym> ApDex Threshold:</label>
66
+ </th>
67
+ <td>
68
+ <input id="rum-apdex-t" name="application[rum_apdex_t]" type="text"
69
+ value="<?php echo esc_attr( $application_settings['rum-apdex-t'] )?>"
70
+ <?php Util_Ui::sealing_disabled( 'newrelic' ) ?>/>
71
+ </td>
72
+ </tr>
73
+ <tr>
74
+ <th>
75
+ <label for="rum-enabled"><acronym title="Real User Monitoring">RUM</acronym> enabled:</label>
76
+ </th>
77
+ <td>
78
+ <input name="application[rum_enabled]" type="hidden" value="false"
79
+ <?php Util_Ui::sealing_disabled( 'newrelic' ) ?> />
80
+ <input id="rum-enabled" name="application[rum_enabled]"
81
+ type="checkbox" value="1"
82
+ <?php checked( $application_settings['rum-enabled'], 'true' ) ?>
83
+ <?php Util_Ui::sealing_disabled( 'newrelic' ) ?>/>
84
+ </td>
85
+ </tr>
86
+ </table>
87
+ <p class="submit">
88
+ <?php echo Util_Ui::nonce_field( 'w3tc' ); ?>
89
+ <input type="submit" name="w3tc_save_new_relic"
90
+ class="w3tc-button-save button-primary"
91
+ <?php Util_Ui::sealing_disabled( 'newrelic' ) ?>
92
+ value="Save New Relic settings" />
93
+ </p>
94
+ <?php elseif ( empty( $application_settings ) ): ?>
95
+ <p class="description"><?php echo sprintf( __( 'Application settings could not be retrieved. New Relic may not be properly configured, <a href="%s">review the settings</a>.', 'w3-total-cache' ), network_admin_url( 'admin.php?page=w3tc_general#monitoring' ) ) ?></p>
96
+ <?php else: ?>
97
+ <p><?php _e( 'Application settings are only visible when New Relic is enabled', 'w3-total-cache', 'w3-total-cache' ) ?></p>
98
+ <?php endif; ?>
99
+ <?php Util_Ui::postbox_footer(); ?>
100
+ </form>
101
+ <form action="admin.php?page=w3tc_monitoring" method="post">
102
 
103
+ <?php Util_Ui::postbox_header( __( 'Dashboard Settings', 'w3-total-cache' ), '', 'dashboard' ); ?>
104
+ <table class="form-table">
105
+ <tr>
106
+ <th>
107
+ <label for="newrelic_cache_time"><?php
108
  _e( 'Cache time:', 'w3-total-cache' )
109
  ?></label></th>
110
+ <td><input id="newrelic_cache_time" name="extension__newrelic__cache_time"
111
+ type="text" value="<?php echo esc_attr( $config->get_integer( array( 'newrelic', 'cache_time', 5 ) ) ) ?>"
112
+ <?php Util_Ui::sealing_disabled( 'newrelic' ) ?> />
113
+ <p class="description">
114
+ <?php _e( 'How many minutes data retrieved from New Relic should be stored. Minimum is 1 minute.', 'w3-total-cache' ) ?>
115
+ </p>
116
+ </td>
117
+ </tr>
118
+ </table>
119
+ <?php Util_Ui::button_config_save( 'extension_newrelic_dashboard' ); ?>
120
+ <?php Util_Ui::postbox_footer(); ?>
 
121
 
122
+ <?php Util_Ui::postbox_header( __( 'Behavior Settings', 'w3-total-cache' ), '', 'behavior' ); ?>
123
+ <table class="form-table">
124
+ <tr>
125
+ <th colspan="2">
126
+ <?php
127
  Util_Ui::checkbox( '',
128
  Util_Ui::config_key_to_http_name( array( 'newrelic', 'accept.logged_roles' ) ),
129
  $config->get_boolean( array( 'newrelic', 'accept.logged_roles' ) ),
130
  $config->is_sealed( 'newrelic' ) );
131
  _e( 'Use <acronym title="Real User Monitoring">RUM</acronym> only for following user roles', 'w3-total-cache' )
132
+ ?></label>
133
+ <p class="description">
134
+ <?php _e( 'Select user roles that <acronym title="Real User Monitoring">RUM</acronym> should be enabled for:', 'w3-total-cache' ) ?>
135
+ </p>
136
 
137
+ <div id="newrelic_accept_roles" class="w3tc_reject_roles">
138
+ <?php $saved_roles = $config->get_array( array( 'newrelic', 'accept.roles' ) ); ?>
139
+ <input type="hidden" name="newrelic___accept__roles" value="" /><br />
140
+ <?php foreach ( get_editable_roles() as $role_name => $role_data ) : ?>
141
+ <input type="checkbox" name="newrelic___accept__roles[]" value="<?php echo $role_name ?>"
142
+ <?php checked( in_array( $role_name, $saved_roles ) ) ?>
143
+ id="role_<?php echo $role_name ?>"
144
+ <?php Util_Ui::sealing_disabled( 'newrelic' ) ?> />
145
+ <label for="role_<?php echo $role_name ?>"><?php echo $role_data['name'] ?></label>
146
+ <?php endforeach; ?>
147
+ </div>
148
+ </th>
149
+ </tr>
150
+ <tr>
151
+ <th>
152
+ <label for="newrelic_include_rum"><?php
153
  _e( 'Include <acronym title="Real User Monitoring">RUM</acronym> in compressed or cached pages:', 'w3-total-cache' )
154
  ?></label>
155
+ </th>
156
+ <td>
157
+ <input name="extension__newrelic__include_rum" type="hidden" value="0"
158
+ <?php Util_Ui::sealing_disabled( 'newrelic' ) ?> />
159
+ <input id="newrelic_include_rum" name="extension__newrelic__include_rum"
160
+ type="checkbox" value="1"
161
+ <?php checked( $config->get_boolean( array( 'newrelic', 'include_rum' ) ) ) ?>
162
+ <?php Util_Ui::sealing_disabled( 'newrelic' ) ?> />
163
+ <p class="description">
164
+ <?php _e( 'This enables inclusion of <acronym title="Real User Monitoring">RUM</acronym> when using Page Cache together with Browser Cache gzip or when using Page Cache with Disc: Enhanced', 'w3-total-cache' )?>
165
+ </p>
166
+ </td>
167
+ </tr>
168
+ <tr>
169
+ <th>
170
+ <label for="newrelic_use_php_function"><?php
 
171
  _e( 'Use <acronym title=\"Hypertext Preprocessor\">PHP</acronym> function to set application name:', 'w3-total-cache' )
172
  ?></label></th>
173
+ <td>
174
+ <?php if ( Util_Environment::is_wpmu() ): ?>
175
+ <input id="newrelic_use_php_function" name="extension__newrelic__use_php_function" type="checkbox" value="1" checked="checked" disabled="disabled" />
176
+ <p class="description">
177
+ <?php _e( 'This is required when using New Relic on a network install to set the proper names for sites.', 'w3-total-cache' ) ?>
178
+ </p>
179
+ <?php else: ?>
180
+ <input name="extension__newrelic__use_php_function" type="hidden" value="0" />
181
+ <input id="newrelic_use_php_function" name="extension__newrelic__use_php_function" type="checkbox" value="1" <?php checked( $config->get_boolean( array( 'newrelic', 'use_php_function' ) ) ) ?>/>
182
+ <p class="description">
183
+ <?php _e( 'Enable this to dynamically set proper application name. (See New Relic <a href="https://newrelic.com/docs/php/per-directory-settings">Per-directory settings</a> for other methods.', 'w3-total-cache' ) ?>
184
+ </p>
185
+ <?php endif ?>
186
+ </td>
187
+ </tr>
188
+ <tr>
189
+ <th>
190
+ <label for="newrelic_enable_xmit"><?php
191
  _e( 'Enable XMIT:', 'w3-total-cache' )
192
  ?></label>
193
+ </th>
194
+ <td><input name="" type="hidden" value="0" />
195
+ <input id="newrelic_enable_xmit" name="extension__newrelic__enable_xmit" type="checkbox" value="1" <?php checked( $config->get_boolean( array( 'newrelic', 'enable_xmit' ) ) ) ?> <?php Util_Ui::sealing_disabled( 'newrelic' ) ?>/>
196
+ <p class="description"><?php _e( sprintf( 'Enable this if you want to record the metric and transaction data (until the name is changed using PHP function), specify a value of true for this argument to make the agent send the transaction to the daemon. There is a slight performance impact as it takes a few milliseconds for the agent to dump its data. <em>From %s</em>',
197
  '<a href="https://newrelic.com/docs/php/the-php-api">New Relic PHP API doc</a>' )
198
+ , 'w3-total-cache' )?></p>
199
+ </td>
200
+ </tr>
201
+ </table>
202
+ <?php Util_Ui::button_config_save( 'extension_newrelic_behaviour' ); ?>
203
+ <?php Util_Ui::postbox_footer(); ?>
204
+ </form>
205
  </div>
206
  <?php if ( $view_metric ):?>
207
  <table>
208
  <?php foreach ( $metric_names as $metric ):?>
209
+ <tr>
210
+ <th style="text-align: right"><strong><?php echo $metric->name ?></strong></th>
211
+ <td><?php echo implode( ', ', $metric->fields ) ?></td>
212
+ </tr>
213
  <?php endforeach; ?>
214
  </table>
215
  <?php endif; ?>
Extension_Wpml_Plugin_Admin.php CHANGED
@@ -53,6 +53,10 @@ class Extension_Wpml_Plugin_Admin {
53
  'extension_uri' => 'https://www.w3-edge.com/',
54
  'extension_id' => 'wpml',
55
  'pro_feature' => true,
 
 
 
 
56
  'settings_exists' => false,
57
  'version' => '0.1',
58
  'enabled' => $enabled,
53
  'extension_uri' => 'https://www.w3-edge.com/',
54
  'extension_id' => 'wpml',
55
  'pro_feature' => true,
56
+ 'pro_excerpt' => __( 'Improve the caching performance of websites localized by WPML.', 'w3-total-cache'),
57
+ 'pro_description' => array(
58
+ __( 'Localization is a type of personalization that makes websites more difficult to scale. This extension reduces the response time of websites localized by WPML.', 'w3-total-cache')
59
+ ),
60
  'settings_exists' => false,
61
  'version' => '0.1',
62
  'enabled' => $enabled,
Generic_AdminActions_Default.php CHANGED
@@ -123,6 +123,20 @@ class Generic_AdminActions_Default {
123
  Util_Admin::redirect( array(), true );
124
  }
125
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  /**
127
  *
128
  */
123
  Util_Admin::redirect( array(), true );
124
  }
125
 
126
+ public function w3tc_default_purgelog_clear() {
127
+ $module = Util_Request::get_label( 'module' );
128
+ $log_filename = Util_Debug::log_filename( $module . '-purge' );
129
+ if ( file_exists( $log_filename ) ) {
130
+ unlink( $log_filename );
131
+ }
132
+
133
+ Util_Admin::redirect( array(
134
+ 'page' => 'w3tc_general',
135
+ 'view' => 'purge_log',
136
+ 'module' => $module
137
+ ), true );
138
+ }
139
+
140
  /**
141
  *
142
  */
Generic_AdminNotes.php CHANGED
@@ -85,12 +85,12 @@ class Generic_AdminNotes {
85
  Util_Ui::button_link( __( 'disable', 'w3-total-cache' ),
86
  Util_Ui::url( array(
87
  'w3tc_config_preview_disable' => 'y' ) ) ) ) .
88
- '<br /><span class="description">'.
89
  sprintf(
90
  __( 'To preview any changed settings (without deploying): %s',
91
  'w3-total-cache' ),
92
  Util_Ui::preview_link() ).
93
- '</span>';
94
  }
95
 
96
  /**
85
  Util_Ui::button_link( __( 'disable', 'w3-total-cache' ),
86
  Util_Ui::url( array(
87
  'w3tc_config_preview_disable' => 'y' ) ) ) ) .
88
+ '<p class="description">'.
89
  sprintf(
90
  __( 'To preview any changed settings (without deploying): %s',
91
  'w3-total-cache' ),
92
  Util_Ui::preview_link() ).
93
+ '</p>';
94
  }
95
 
96
  /**
Generic_Page_General.php CHANGED
@@ -11,12 +11,23 @@ class Generic_Page_General extends Base_Page_Settings {
11
  */
12
  protected $_page = 'w3tc_general';
13
 
 
 
 
 
 
 
14
  /**
15
  * General tab
16
  *
17
  * @return void
18
  */
19
  function view() {
 
 
 
 
 
20
 
21
  $current_user = wp_get_current_user();
22
  $config_master = $this->_config_master;
11
  */
12
  protected $_page = 'w3tc_general';
13
 
14
+ private function to_human($bytes, $decimals = 2) {
15
+ $size = array('B','kB','MB','GB','TB','PB','EB','ZB','YB');
16
+ $factor = floor((strlen($bytes) - 1) / 3);
17
+ return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$size[$factor];
18
+ }
19
+
20
  /**
21
  * General tab
22
  *
23
  * @return void
24
  */
25
  function view() {
26
+ if ( isset( $_REQUEST['view'] ) && $_REQUEST['view'] == 'purge_log' ) {
27
+ $p = new Generic_Page_PurgeLog();
28
+ $p->render_content();
29
+ exit;
30
+ }
31
 
32
  $current_user = wp_get_current_user();
33
  $config_master = $this->_config_master;
Generic_Page_PurgeLog.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace W3TC;
3
+
4
+
5
+
6
+ class Generic_Page_PurgeLog {
7
+ private $plugins_regexp = null;
8
+
9
+
10
+
11
+ public function __construct() {
12
+ $p = dirname( dirname( __FILE__ ) );
13
+ if ( $this->starts_with( $p, ABSPATH ) ) {
14
+ $p = substr( $p, strlen( ABSPATH ) );
15
+ }
16
+
17
+ $this->plugins_regexp = '~^(' . Util_Environment::preg_quote( $p ) .
18
+ '/)([^/]+)(.*)~';
19
+ }
20
+
21
+
22
+
23
+ public function render_content() {
24
+ $module = Util_Request::get_label( 'module' );
25
+ $log_filename = Util_Debug::log_filename( $module . '-purge' );
26
+ if ( file_exists( $log_filename ) ) {
27
+ $log_filefize = $this->to_human( filesize( $log_filename ) );
28
+ } else {
29
+ $log_filefize = 'n/a';
30
+ }
31
+
32
+ $lines = Util_DebugPurgeLog_Reader::read( $module );
33
+
34
+ $purgelog_modules = array();
35
+ $c = Dispatcher::config();
36
+ if ( $c->get_boolean( 'pgcache.debug_purge' ) ) {
37
+ $purgelog_modules[] = array(
38
+ 'label' => 'pagecache',
39
+ 'name' => 'Page Cache',
40
+ 'postfix' => ''
41
+ );
42
+ }
43
+ if ( $c->get_boolean( 'dbcache.debug_purge' ) ) {
44
+ $purgelog_modules[] = array(
45
+ 'label' => 'dbcache',
46
+ 'name' => 'Database Cache',
47
+ 'postfix' => ''
48
+ );
49
+ }
50
+ if ( $c->get_boolean( 'objectcache.debug_purge' ) ) {
51
+ $purgelog_modules[] = array(
52
+ 'label' => 'objectcache',
53
+ 'name' => 'Object Cache',
54
+ 'postfix' => ''
55
+ );
56
+ }
57
+
58
+ for ( $n = 0; $n < count( $purgelog_modules ) - 1; $n++ ) {
59
+ $purgelog_modules[$n]['postfix'] = '|';
60
+ }
61
+
62
+ require( __DIR__ . '/Generic_Page_PurgeLog_View.php' );
63
+ }
64
+
65
+
66
+
67
+ private function to_human($bytes, $decimals = 2) {
68
+ $size = array('B','kB','MB','GB','TB','PB','EB','ZB','YB');
69
+ $factor = floor((strlen($bytes) - 1) / 3);
70
+ return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$size[$factor];
71
+ }
72
+
73
+
74
+
75
+ private function starts_with( $s, $prefix ) {
76
+ return substr( $s, 0, strlen( $prefix ) ) == $prefix;
77
+ }
78
+
79
+
80
+
81
+ private function esc_filename( $filename ) {
82
+ $m = null;
83
+ if ( preg_match( $this->plugins_regexp, $filename, $m ) ) {
84
+ return esc_html( $m[1] ) .
85
+ '<strong>' . esc_html( $m[2] ) . '</strong>' .
86
+ esc_html( $m[3] );
87
+ }
88
+
89
+ return esc_html( $filename );
90
+ }
91
+ }
Generic_Page_PurgeLog_View.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace W3TC;
3
+
4
+ if ( !defined( 'W3TC' ) )
5
+ die();
6
+
7
+ include W3TC_INC_DIR . '/options/common/header.php';
8
+ ?>
9
+ <style>
10
+ .w3tc_purge_log_header {
11
+ width: 100%;
12
+ display: flex;
13
+ align-items: center;
14
+ justify-content: space-between;
15
+ }
16
+
17
+ .w3tc_purge_log_clear {
18
+ text-align: right;
19
+ }
20
+
21
+ .w3tc_purge_log_table {
22
+ display: grid;
23
+ grid-template-columns: auto 1fr;
24
+ grid-gap: 10px;
25
+ background: #fff;
26
+ padding: 11px;
27
+ border: 1px solid #ccd0d4;
28
+ margin-bottom: 11px;
29
+ }
30
+ .w3tc_purge_log_label {
31
+ white-space: nowrap;
32
+ font-weight: bold;
33
+ }
34
+
35
+ .w3tc_purge_log_urls {
36
+ font-family: courier;
37
+ }
38
+
39
+ .w3tc_purge_log_backtrace {
40
+ font-family: courier;
41
+ border: 1px solid #ccd0d4;
42
+ border-spacing: 0;
43
+ }
44
+
45
+ .w3tc_purge_log_backtrace td {
46
+ padding: 5px 5px;
47
+ }
48
+
49
+ .w3tc_purge_log_backtrace tr:nth-child(odd){
50
+ background-color: #f2f2f2;
51
+ }
52
+
53
+ </style>
54
+ <div class="w3tc_purge_log_header">
55
+ <h1>Purges Log</h1>
56
+ <div class="w3tc_purge_log_clear">
57
+ <?php
58
+ echo Util_Ui::button_link( __( 'Clear Log', 'w3-total-cache' ),
59
+ Util_Ui::url( array(
60
+ 'w3tc_default_purgelog_clear' => 'y',
61
+ 'module' => $module
62
+ ) ) )
63
+ ?>
64
+ </div>
65
+ </div>
66
+
67
+
68
+ <p>
69
+ Available logs:
70
+ <?php foreach ( $purgelog_modules as $module ): ?>
71
+ <a href="admin.php?page=w3tc_general&view=purge_log&module=<?php echo esc_attr( $module['label'] ) ?>"><?php echo esc_html( $module['name'] ) ?></a>
72
+ <?php echo esc_html( $module['postfix'] ) ?>
73
+ <?php endforeach ?>
74
+ </p>
75
+ <p>
76
+ Filename: <?php echo esc_html( $log_filename ) ?> (<?php echo esc_html( $log_filefize ) ?>)
77
+ </p>
78
+
79
+ <?php foreach ( $lines as $line ): ?>
80
+ <div class="w3tc_purge_log_table">
81
+ <div class="w3tc_purge_log_label">Date</div>
82
+ <div><?php echo esc_html( $line['date'] ) ?></div>
83
+
84
+ <div class="w3tc_purge_log_label">Action</div>
85
+ <div class="w3tc_purge_log_message"><?php echo esc_html( $line['message'] ) ?></div>
86
+
87
+ <div class="w3tc_purge_log_label">User</div>
88
+ <div class="w3tc_purge_log_message"><?php echo esc_html( $line['username'] ) ?></div>
89
+
90
+ <?php if ( !empty( $line['urls'] ) ): ?>
91
+ <div class="w3tc_purge_log_label">Pages Flushed</div>
92
+ <div class="w3tc_purge_log_urls">
93
+ <?php foreach ( $line['urls'] as $url ): ?>
94
+ <div><?php echo esc_html( $url ) ?></div>
95
+ <?php endforeach ?>
96
+ </div>
97
+ <?php endif ?>
98
+
99
+ <div class="w3tc_purge_log_label">Stack Trace</div>
100
+ <table class="w3tc_purge_log_backtrace">
101
+ <?php foreach ( $line['backtrace'] as $backtrace_line ): ?>
102
+ <tr>
103
+ <td><?php echo esc_html( $backtrace_line['number'] ) ?></td>
104
+ <td><?php echo $this->esc_filename( $backtrace_line['filename'] ) ?></td>
105
+ <td><?php echo esc_html( $backtrace_line['function'] ) ?></td>
106
+ </tr>
107
+ <?php endforeach ?>
108
+ </table>
109
+ </div>
110
+ <?php endforeach ?>
ObjectCache_Page_View_PurgeLog.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace W3TC;
3
+
4
+ if ( !defined( 'W3TC' ) )
5
+ die();
6
+
7
+ include W3TC_INC_DIR . '/options/common/header.php';
8
+ ?>
9
+ <style>
10
+ <?php require_once(__DIR__ . '/shared/purge_log.css') ?>
11
+ </style>
12
+ <div class="metabox-holder">
13
+ <?php Util_Ui::postbox_header( __( 'Object Cache Purges Log', 'w3-total-cache' ) ); ?>
14
+
15
+ <h1>Purges Log</h1>
16
+
17
+ <div class="w3tc_purge_log_table">
18
+ <?php foreach ( $lines as $line ): ?>
19
+ <div class="w3tc_purge_log_date"><?php echo esc_html( $line['date'] ) ?></div>
20
+ <div class="w3tc_purge_log_message"><td><?php echo esc_html( $line['message'] ) ?></div>
21
+ <div class="w3tc_purge_log_backtrace">
22
+ <?php foreach ( $line['backtrace'] as $backtrace_line ): ?>
23
+ <div class="w3tc_purge_log_traceline">
24
+ <?php echo esc_html( $backtrace_line ) ?>
25
+ </div>
26
+ <?php endforeach ?>
27
+ </div>
28
+ <?php endforeach ?>
29
+ </div>
30
+
31
+ <?php Util_Ui::postbox_footer(); ?>
32
+ </div>
ObjectCache_WpObjectCache_Regular.php CHANGED
@@ -425,6 +425,9 @@ class ObjectCache_WpObjectCache_Regular {
425
  if ( $this->_debug || $this->stats_enabled ) {
426
  $time_start = Util_Debug::microtime();
427
  }
 
 
 
428
 
429
  $this->cache = array();
430
 
425
  if ( $this->_debug || $this->stats_enabled ) {
426
  $time_start = Util_Debug::microtime();
427
  }
428
+ if ( $this->_config->get_boolean( 'objectcache.debug_purge' ) ) {
429
+ Util_Debug::log_purge( 'objectcache', 'flush', $reason );
430
+ }
431
 
432
  $this->cache = array();
433
 
PgCache_ContentGrabber.php CHANGED
@@ -420,9 +420,10 @@ class PgCache_ContentGrabber {
420
 
421
  $compression = false;
422
  $has_dynamic = $this->_has_dynamic( $buffer );
 
423
 
424
  // TODO: call modifies object state, rename method at least
425
- $original_can_cache = $this->_can_cache2( $buffer );
426
  $can_cache = apply_filters( 'w3tc_can_cache', $original_can_cache, $this, $buffer );
427
  if ( $can_cache != $original_can_cache ) {
428
  $this->cache_reject_reason = 'Third-party plugin has modified caching activity';
@@ -441,7 +442,7 @@ class PgCache_ContentGrabber {
441
  $buffer );
442
 
443
  if ( $can_cache ) {
444
- $buffer = $this->_maybe_save_cached_result( $buffer, $has_dynamic );
445
  } else {
446
  if ( $has_dynamic ) {
447
  // send common headers since output will be compressed
@@ -636,7 +637,7 @@ class PgCache_ContentGrabber {
636
  * @param string $buffer
637
  * @return boolean
638
  */
639
- private function _can_cache2( $buffer ) {
640
  /**
641
  * Skip if caching is disabled
642
  */
@@ -749,6 +750,31 @@ class PgCache_ContentGrabber {
749
  }
750
  }
751
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
752
  return true;
753
  }
754
 
@@ -1317,8 +1343,8 @@ class PgCache_ContentGrabber {
1317
  foreach ( $headers_list as $header ) {
1318
  $pos = strpos( $header, ':' );
1319
  if ( $pos ) {
1320
- $header_name = substr( $header, 0, $pos );
1321
- $header_value = substr( $header, $pos + 1 );
1322
  } else {
1323
  $header_name = $header;
1324
  $header_value = '';
@@ -1771,7 +1797,7 @@ class PgCache_ContentGrabber {
1771
  */
1772
  function _check_match( $etag ) {
1773
  if ( !empty( $_SERVER['HTTP_IF_NONE_MATCH'] ) ) {
1774
- $if_none_match = ( get_magic_quotes_gpc() ? stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) : $_SERVER['HTTP_IF_NONE_MATCH'] );
1775
  $client_etags = explode( ',', $if_none_match );
1776
 
1777
  foreach ( $client_etags as $client_etag ) {
@@ -1981,7 +2007,7 @@ class PgCache_ContentGrabber {
1981
  }
1982
  }
1983
 
1984
- private function _maybe_save_cached_result( $buffer, $has_dynamic ) {
1985
  $mobile_group = $this->_page_key_extension['useragent'];
1986
  $referrer_group = $this->_page_key_extension['referrer'];
1987
  $encryption = $this->_page_key_extension['encryption'];
@@ -2002,19 +2028,8 @@ class PgCache_ContentGrabber {
2002
  ( $has_dynamic ? false : $compression_header );
2003
 
2004
  $is_404 = ( function_exists( 'is_404' ) ? is_404() : false );
2005
- $response_headers = $this->_get_response_headers();
2006
  $headers = $this->_get_cached_headers( $response_headers['plain'] );
2007
 
2008
- if ( !empty( $response_headers['kv']['Content-Encoding'] ) ) {
2009
- $this->cache_reject_reason = 'Response is compressed';
2010
- return $buffer;
2011
- }
2012
-
2013
- if ( empty( $buffer ) && empty( $response_headers['kv']['Location'] ) ) {
2014
- $this->cache_reject_reason = 'Empty response';
2015
- return $buffer;
2016
- }
2017
-
2018
  if ( $this->_enhanced_mode ) {
2019
  // redirect issued, if we have some old cache entries
2020
  // they will be turned into fresh files and catch further requests
420
 
421
  $compression = false;
422
  $has_dynamic = $this->_has_dynamic( $buffer );
423
+ $response_headers = $this->_get_response_headers();
424
 
425
  // TODO: call modifies object state, rename method at least
426
+ $original_can_cache = $this->_can_cache2( $buffer, $response_headers );
427
  $can_cache = apply_filters( 'w3tc_can_cache', $original_can_cache, $this, $buffer );
428
  if ( $can_cache != $original_can_cache ) {
429
  $this->cache_reject_reason = 'Third-party plugin has modified caching activity';
442
  $buffer );
443
 
444
  if ( $can_cache ) {
445
+ $buffer = $this->_maybe_save_cached_result( $buffer, $response_headers, $has_dynamic );
446
  } else {
447
  if ( $has_dynamic ) {
448
  // send common headers since output will be compressed
637
  * @param string $buffer
638
  * @return boolean
639
  */
640
+ private function _can_cache2( $buffer, $response_headers ) {
641
  /**
642
  * Skip if caching is disabled
643
  */
750
  }
751
  }
752
 
753
+ if ( !empty( $response_headers['kv']['Content-Encoding'] ) ) {
754
+ $this->cache_reject_reason = 'Response is compressed';
755
+ $this->process_status = 'miss_compressed';
756
+ return false;
757
+ }
758
+
759
+ if ( empty( $buffer ) && empty( $response_headers['kv']['Location'] ) ) {
760
+ $this->cache_reject_reason = 'Empty response';
761
+ $this->process_status = 'miss_empty_response';
762
+ return false;
763
+ }
764
+
765
+ if ( isset( $response_headers['kv']['Location'] ) ) {
766
+ // dont cache query-string normalization redirects
767
+ // (e.g. from wp core)
768
+ // when cache key is normalized, since that cause redirect loop
769
+
770
+ if ( $this->_get_page_key( $this->_page_key_extension ) ==
771
+ $this->_get_page_key( $page_key_extension, $response_headers['kv']['Location'] ) ) {
772
+ $this->cache_reject_reason = 'Normalization redirect';
773
+ $this->process_status = 'miss_normalization_redirect';
774
+ return false;
775
+ }
776
+ }
777
+
778
  return true;
779
  }
780
 
1343
  foreach ( $headers_list as $header ) {
1344
  $pos = strpos( $header, ':' );
1345
  if ( $pos ) {
1346
+ $header_name = trim( substr( $header, 0, $pos ) );
1347
+ $header_value = trim( substr( $header, $pos + 1 ) );
1348
  } else {
1349
  $header_name = $header;
1350
  $header_value = '';
1797
  */
1798
  function _check_match( $etag ) {
1799
  if ( !empty( $_SERVER['HTTP_IF_NONE_MATCH'] ) ) {
1800
+ $if_none_match = $_SERVER['HTTP_IF_NONE_MATCH'] ;
1801
  $client_etags = explode( ',', $if_none_match );
1802
 
1803
  foreach ( $client_etags as $client_etag ) {
2007
  }
2008
  }
2009
 
2010
+ private function _maybe_save_cached_result( $buffer, $response_headers, $has_dynamic ) {
2011
  $mobile_group = $this->_page_key_extension['useragent'];
2012
  $referrer_group = $this->_page_key_extension['referrer'];
2013
  $encryption = $this->_page_key_extension['encryption'];
2028
  ( $has_dynamic ? false : $compression_header );
2029
 
2030
  $is_404 = ( function_exists( 'is_404' ) ? is_404() : false );
 
2031
  $headers = $this->_get_cached_headers( $response_headers['plain'] );
2032
 
 
 
 
 
 
 
 
 
 
 
2033
  if ( $this->_enhanced_mode ) {
2034
  // redirect issued, if we have some old cache entries
2035
  // they will be turned into fresh files and catch further requests
PgCache_Flush.php CHANGED
@@ -10,21 +10,32 @@ class PgCache_Flush extends PgCache_ContentGrabber {
10
  */
11
  private $queued_urls = array();
12
  private $queued_groups = array();
 
13
  private $flush_all_operation_requested = false;
 
14
 
15
  public function __construct() {
16
  parent::__construct();
 
17
  }
18
 
19
  /**
20
  * Flushes all caches
21
  */
22
  public function flush() {
 
 
 
 
23
  $this->flush_all_operation_requested = true;
24
  return true;
25
  }
26
 
27
  public function flush_group( $group ) {
 
 
 
 
28
  $this->queued_groups[$group] = '*';
29
  }
30
 
@@ -38,15 +49,31 @@ class PgCache_Flush extends PgCache_ContentGrabber {
38
  $post_id = Util_Environment::detect_post_id();
39
  }
40
 
41
- if ( !$post_id )
42
  return false;
 
43
 
44
  global $wp_rewrite; // required by many Util_PageUrls methods
45
  if ( empty( $wp_rewrite ) ) {
46
- error_log('Post was modified before wp_rewrite initialization. Cant flush cache.');
 
 
 
 
 
 
 
47
  return false;
48
  }
49
 
 
 
 
 
 
 
 
 
50
  $full_urls = array();
51
  $post = get_post( $post_id );
52
  $terms = array();
@@ -159,6 +186,11 @@ class PgCache_Flush extends PgCache_ContentGrabber {
159
  $full_urls = apply_filters( 'pgcache_flush_post_queued_urls',
160
  $full_urls );
161
 
 
 
 
 
 
162
  // Queue flush
163
  if ( count( $full_urls ) ) {
164
  foreach ( $full_urls as $url )
@@ -177,6 +209,11 @@ class PgCache_Flush extends PgCache_ContentGrabber {
177
  ( isset( $parts['query'] ) ? '?' . $parts['query'] : '' );
178
  $group = $this->get_cache_group_by_uri( $uri );
179
 
 
 
 
 
 
180
  $this->queued_urls[$url] = ( empty( $group ) ? '*' : $group );
181
  }
182
 
10
  */
11
  private $queued_urls = array();
12
  private $queued_groups = array();
13
+ private $queued_post_ids = array();
14
  private $flush_all_operation_requested = false;
15
+ private $debug_purge = false;
16
 
17
  public function __construct() {
18
  parent::__construct();
19
+ $this->debug_purge = $this->_config->get_boolean( 'pgcache.debug_purge' );
20
  }
21
 
22
  /**
23
  * Flushes all caches
24
  */
25
  public function flush() {
26
+ if ( $this->debug_purge ) {
27
+ Util_Debug::log_purge( 'pagecache', 'flush_all' );
28
+ }
29
+
30
  $this->flush_all_operation_requested = true;
31
  return true;
32
  }
33
 
34
  public function flush_group( $group ) {
35
+ if ( $this->debug_purge ) {
36
+ Util_Debug::log_purge( 'pagecache', 'flush_group', $group );
37
+ }
38
+
39
  $this->queued_groups[$group] = '*';
40
  }
41
 
49
  $post_id = Util_Environment::detect_post_id();
50
  }
51
 
52
+ if ( !$post_id ) {
53
  return false;
54
+ }
55
 
56
  global $wp_rewrite; // required by many Util_PageUrls methods
57
  if ( empty( $wp_rewrite ) ) {
58
+ if ( $this->debug_purge ) {
59
+ Util_Debug::log_purge( 'pagecache', 'flush_post', array(
60
+ 'post_id' => $post_id,
61
+ 'error' => 'Post flush attempt before wp_rewrite initialization. Cant flush cache.'
62
+ ) );
63
+ }
64
+
65
+ error_log('Post flush attempt before wp_rewrite initialization. Cant flush cache.');
66
  return false;
67
  }
68
 
69
+ // prevent multiple calculation of post urls
70
+ $queued_post_id_key = Util_Environment::blog_id() . '.' . $post_id;
71
+ if ( isset( $this->queued_post_ids[$queued_post_id_key] ) ) {
72
+ return true;
73
+ }
74
+ $this->queued_post_ids[$queued_post_id_key] = '*';
75
+
76
+ // calculate urls to purge
77
  $full_urls = array();
78
  $post = get_post( $post_id );
79
  $terms = array();
186
  $full_urls = apply_filters( 'pgcache_flush_post_queued_urls',
187
  $full_urls );
188
 
189
+ if ( $this->debug_purge ) {
190
+ Util_Debug::log_purge( 'pagecache', 'flush_post', $post_id,
191
+ $full_urls );
192
+ }
193
+
194
  // Queue flush
195
  if ( count( $full_urls ) ) {
196
  foreach ( $full_urls as $url )
209
  ( isset( $parts['query'] ) ? '?' . $parts['query'] : '' );
210
  $group = $this->get_cache_group_by_uri( $uri );
211
 
212
+ if ( $this->debug_purge ) {
213
+ Util_Debug::log_purge( 'pagecache', 'flush_url', array(
214
+ $url, $group ) );
215
+ }
216
+
217
  $this->queued_urls[$url] = ( empty( $group ) ? '*' : $group );
218
  }
219
 
PgCache_Page_CookieGroups_View.js CHANGED
@@ -54,8 +54,8 @@ jQuery('#w3tc_cookiegroup_add').click(function() {
54
  '<tr>' +
55
  '<th><label for="cookiegroups_' + group + '_cookies">Cookies:</label></th>' +
56
  '<td><textarea id="cookiegroups_' + group + '_cookies" name="cookiegroups[' +
57
- group + '][cookies]" rows="10" cols="50"></textarea><br />' +
58
- '<span class="description">Specify the cookies for this group. Values like \'cookie\', \'cookie=value\', and cookie[a-z]+=value[a-z]+are supported. Remember to escape special characters like spaces, dots or dashes with a backslash. Regular expressions are also supported.</span></td></tr>' +
59
  '</table></li>');
60
  var select = li.find('select');
61
 
54
  '<tr>' +
55
  '<th><label for="cookiegroups_' + group + '_cookies">Cookies:</label></th>' +
56
  '<td><textarea id="cookiegroups_' + group + '_cookies" name="cookiegroups[' +
57
+ group + '][cookies]" rows="10" cols="50"></textarea>' +
58
+ '<p class="description">Specify the cookies for this group. Values like \'cookie\', \'cookie=value\', and cookie[a-z]+=value[a-z]+are supported. Remember to escape special characters like spaces, dots or dashes with a backslash. Regular expressions are also supported.</p></td></tr>' +
59
  '</table></li>');
60
  var select = li.find('select');
61
 
PgCache_Page_CookieGroups_View.php CHANGED
@@ -74,10 +74,9 @@ if ( !defined( 'W3TC' ) )
74
  <textarea id="cookiegroup_<?php echo esc_attr( $group ); ?>_cookies"
75
  name="cookiegroups[<?php echo esc_attr( $group ); ?>][cookies]"
76
  rows="10" cols="50" <?php disabled( $groups['disabled'] ) ?>><?php echo esc_textarea( implode( "\r\n", (array) $group_config['cookies'] ) ); ?></textarea>
77
- <br />
78
- <span class="description">
79
  <?php _e( 'Specify the cookies for this group. Values like \'cookie\', \'cookie=value\', and cookie[a-z]+=value[a-z]+ are supported. Remember to escape special characters like spaces, dots or dashes with a backslash. Regular expressions are also supported.', 'w3-total-cache' ); ?>
80
- </span>
81
  </td>
82
  </tr>
83
  </table>
74
  <textarea id="cookiegroup_<?php echo esc_attr( $group ); ?>_cookies"
75
  name="cookiegroups[<?php echo esc_attr( $group ); ?>][cookies]"
76
  rows="10" cols="50" <?php disabled( $groups['disabled'] ) ?>><?php echo esc_textarea( implode( "\r\n", (array) $group_config['cookies'] ) ); ?></textarea>
77
+ <p class="description">
 
78
  <?php _e( 'Specify the cookies for this group. Values like \'cookie\', \'cookie=value\', and cookie[a-z]+=value[a-z]+ are supported. Remember to escape special characters like spaces, dots or dashes with a backslash. Regular expressions are also supported.', 'w3-total-cache' ); ?>
79
+ </p>
80
  </td>
81
  </tr>
82
  </table>
UsageStatistics_GeneralPage_View.php CHANGED
@@ -14,14 +14,21 @@ $is_pro = Util_Environment::is_w3tc_pro( $c );
14
 
15
  <table class="form-table">
16
  <?php
17
- Util_Ui::config_item( array(
18
  'key' => 'stats.enabled',
19
  'control' => 'checkbox',
20
  'checkbox_label' => __( 'Enable', 'w3-total-cache' ),
21
  'disabled' => ( $is_pro ? null : true ),
22
- 'description' => __( 'Enable statistics collection. Note that this consumes additional resources and is not recommended to be run continuously.',
23
  'w3-total-cache' ),
24
- 'pro_feature' => true
 
 
 
 
 
 
 
25
  ) );
26
  Util_Ui::config_item( array(
27
  'key' => 'stats.slot_seconds',
14
 
15
  <table class="form-table">
16
  <?php
17
+ Util_Ui::config_item_pro( array(
18
  'key' => 'stats.enabled',
19
  'control' => 'checkbox',
20
  'checkbox_label' => __( 'Enable', 'w3-total-cache' ),
21
  'disabled' => ( $is_pro ? null : true ),
22
+ 'excerpt' => __( 'Enable statistics collection. Note that this consumes additional resources and is not recommended to be run continuously.',
23
  'w3-total-cache' ),
24
+ 'description' => array(
25
+ __( 'Statistics provide transparency into the behavior of your caching performance. Without statistics, it’s challenging to identify opportunities for improvement or ensure operations are working as expected consistently. Metrics like cache sizes, object lifetimes, hit vs miss ratio, etc across every caching method configured in your settings.', 'w3-total-cache' ),
26
+
27
+ __( 'Some statistics are available directly on your Performance Dashboard, however, the comprehensive suite of statistics are available on the Statistics screen. Web server logs created by Nginx or Apache can be analyzed if accessible.', 'w3-total-cache' ),
28
+
29
+ __( 'Use the caching statistics to compare the performance of different configurations like caching methods, object lifetimes and so on. Contact support for any help optimizing performance metrics or troubleshooting.',
30
+ 'w3-total-cache' )
31
+ )
32
  ) );
33
  Util_Ui::config_item( array(
34
  'key' => 'stats.slot_seconds',
UsageStatistics_Source_ObjectCacheLog.php CHANGED
@@ -61,7 +61,7 @@ class UsageStatistics_Source_ObjectCacheLog {
61
  'count_get_hit' => $data['count_get_hit'],
62
  'count_set' => $data['count_set'],
63
  'sum_size' => $data['sum_size'],
64
- 'avg_size' => (int)( $data['sum_size'] / $data['count_total'] ),
65
  'sum_time_ms' => (int)$data['sum_time_ms']
66
  );
67
  }
@@ -122,7 +122,7 @@ class UsageStatistics_Source_ObjectCacheLog {
122
  $id = $matches[3];
123
  $reason = $matches[4];
124
  $size = (int)$matches[5];
125
- $time_taken_ms = (float)$matches[6] / 1000;
126
 
127
  $time = strtotime($date_string);
128
 
61
  'count_get_hit' => $data['count_get_hit'],
62
  'count_set' => $data['count_set'],
63
  'sum_size' => $data['sum_size'],
64
+ 'avg_size' => $data['count_total'] ? (int)( $data['sum_size'] / $data['count_total'] ) : 0,
65
  'sum_time_ms' => (int)$data['sum_time_ms']
66
  );
67
  }
122
  $id = $matches[3];
123
  $reason = $matches[4];
124
  $size = (int)$matches[5];
125
+ $time_taken_ms = isset( $matches[6] ) ? (float)$matches[6] / 1000 : 0;
126
 
127
  $time = strtotime($date_string);
128
 
Util_Debug.php CHANGED
@@ -32,8 +32,8 @@ class Util_Debug {
32
 
33
  if ( defined( 'W3TC_BLOG_LEVELS' ) ) {
34
  for ( $n = 0; $n < W3TC_BLOG_LEVELS; $n++ )
35
- $postfix = substr( $postfix, strlen( $postfix ) - 1 - $n, 1 ) . '/' .
36
- $postfix;
37
  }
38
  $from_dir = W3TC_CACHE_DIR;
39
  if ( defined( 'W3TC_DEBUG_DIR' ) && W3TC_DEBUG_DIR ) {
@@ -57,6 +57,102 @@ class Util_Debug {
57
  $message = strtr( $message, '<>', '..' );
58
  $filename = Util_Debug::log_filename( $module );
59
 
60
- return @file_put_contents( $filename, date( 'r' ) . ' ' . $message . "\n", FILE_APPEND );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  }
62
  }
32
 
33
  if ( defined( 'W3TC_BLOG_LEVELS' ) ) {
34
  for ( $n = 0; $n < W3TC_BLOG_LEVELS; $n++ )
35
+ $postfix = substr( $postfix, strlen( $postfix ) - 1 - $n, 1 ) .
36
+ '/' . $postfix;
37
  }
38
  $from_dir = W3TC_CACHE_DIR;
39
  if ( defined( 'W3TC_DEBUG_DIR' ) && W3TC_DEBUG_DIR ) {
57
  $message = strtr( $message, '<>', '..' );
58
  $filename = Util_Debug::log_filename( $module );
59
 
60
+ return @file_put_contents( $filename, '[' . date( 'r' ) . '] ' .
61
+ $message . "\n", FILE_APPEND );
62
+ }
63
+
64
+
65
+
66
+ /**
67
+ * Log cache purge event
68
+ */
69
+ static public function log_purge( $module, $message, $parameters = null,
70
+ $explicit_postfix = null ) {
71
+ $backtrace = debug_backtrace( 0 );
72
+ $backtrace_lines = array();
73
+ $pos = 0;
74
+ for ( $n = 2; $n < count( $backtrace ); $n++ ) {
75
+ if ( !Util_Debug::log_purge_should_print_item( $backtrace, $n ) ) {
76
+ continue;
77
+ }
78
+
79
+ $i = $backtrace[$n];
80
+ $filename = isset( $i['file'] ) ? $i['file'] : '';
81
+ $filename = str_replace( ABSPATH, '', $filename );
82
+
83
+ $line = isset( $i['line'] ) ? $i['line'] : '';
84
+
85
+ $method = ( !empty( $i['class'] ) ? $i['class'] . '--' : '' ) .
86
+ $i['function'];
87
+ $args = ' ' . Util_Debug::encode_params( $i['args'] );
88
+ $backtrace_lines[] = "\t#" . ( $pos ) . ' ' .
89
+ $filename . '(' . $line . '): ' . $method . $args;
90
+ $pos++;
91
+ }
92
+
93
+ $message = $message;
94
+ if ( !is_null( $parameters ) ) {
95
+ $message .= Util_Debug::encode_params( $parameters );
96
+ }
97
+
98
+ $user = function_exists( 'wp_get_current_user' ) ? wp_get_current_user() : null;
99
+ $username = ( empty( $user ) ? 'anonymous' : $user->user_login );
100
+ $message .= "\n\tusername:$username";
101
+
102
+ if ( is_array( $explicit_postfix ) ) {
103
+ $message .= "\n\t" . implode( "\n\t", $explicit_postfix );
104
+ }
105
+
106
+ $message .= "\n" . implode( "\n", $backtrace_lines );
107
+
108
+ return Util_Debug::log( $module . '-purge', $message );
109
+ }
110
+
111
+
112
+
113
+ static private function log_purge_should_print_item( $backtrace, $n ) {
114
+ if ( !empty( $backtrace[$n]['class']) &&
115
+ $backtrace[$n]['class'] == 'W3TC\\CacheFlush_Locally' ) {
116
+ return false;
117
+ }
118
+ if ( !empty( $backtrace[$n]['class']) &&
119
+ $backtrace[$n]['class'] == 'WP_Hook' &&
120
+ !empty( $backtrace[$n + 1]['function'] ) ) {
121
+ $f = $backtrace[$n + 1]['function'];
122
+ if ( $f == 'do_action' || $f == 'apply_filters' ) {
123
+ return false;
124
+ }
125
+
126
+ return Util_Debug::log_purge_should_print_item( $backtrace, $n + 1 );
127
+ }
128
+
129
+ return true;
130
+ }
131
+
132
+
133
+
134
+ static private function encode_params( $args ) {
135
+ $args_strings = array();
136
+ if ( !is_array( $args ) ) {
137
+ $s = (string)$args;
138
+
139
+ if ( strlen( $s ) > 100 ) {
140
+ $s = substr( $s, 0, 98 ) . '..';
141
+ }
142
+
143
+ $args_strings[] = $s;
144
+ } else {
145
+ foreach ( $args as $arg ) {
146
+ $s = json_encode( $arg,
147
+ JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE );
148
+ if ( strlen( $s ) > 100 ) {
149
+ $s = substr( $s, 0, 98 ) . '..';
150
+ }
151
+
152
+ $args_strings[] = $s;
153
+ }
154
+ }
155
+
156
+ return '(' . implode( ', ', $args_strings ) . ')';
157
  }
158
  }
Util_DebugPurgeLog_Reader.php ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace W3TC;
3
+
4
+
5
+
6
+ /**
7
+ * Reads purge log from the end to top to get last records
8
+ */
9
+ class Util_DebugPurgeLog_Reader {
10
+ private $lines = array();
11
+ private $current_item = array();
12
+
13
+
14
+
15
+ private function __construct() {
16
+ }
17
+
18
+
19
+
20
+ static public function read( $module ) {
21
+ $o = new Util_DebugPurgeLog_Reader();
22
+ return $o->_read( $module );
23
+ }
24
+
25
+
26
+
27
+ private function _read( $module ) {
28
+ $log_filename = Util_Debug::log_filename( $module . '-purge' );
29
+ if ( !file_exists( $log_filename) ) {
30
+ return array();
31
+ }
32
+
33
+ $h = @fopen( $log_filename, 'rb' );
34
+ if ( !$h ) {
35
+ throw new \Exception( 'Failed to open log file' . $log_filename );
36
+ }
37
+
38
+ fseek( $h, 0, SEEK_END );
39
+ $pos = ftell( $h );
40
+ $unparsed_head = '';
41
+
42
+ $more_log_needed = true;
43
+
44
+ while ( $pos >= 0 ) {
45
+ $to_read = 26;
46
+ $pos -= $to_read;
47
+ if ( $pos <= 0 ) {
48
+ $to_read = $to_read + $pos;
49
+ $pos = 0;
50
+ }
51
+ fseek( $h, $pos );
52
+
53
+ $s = fread( $h, $to_read );
54
+
55
+ $unparsed_head = $this->parse_string( $s . $unparsed_head );
56
+ if ( count( $this->lines ) > 100 ) {
57
+ break;
58
+ }
59
+ if ( $pos <= 0 ) {
60
+ $this->push_line( $unparsed_head );
61
+ break;
62
+ }
63
+ }
64
+
65
+ return $this->lines;
66
+ }
67
+
68
+
69
+
70
+ private function parse_string( $s ) {
71
+ $first_unparsed = strlen( $s );
72
+ $pos = $first_unparsed;
73
+
74
+ for ( ; $pos >= 0; $pos-- ) {
75
+ $c = substr( $s, $pos, 1 );
76
+ if ( $c == "\r" || $c == "\n" ) {
77
+ $this->push_line( substr( $s, $pos + 1, $first_unparsed - $pos - 1 ) );
78
+ $first_unparsed = $pos;
79
+ }
80
+ }
81
+
82
+ return substr( $s, 0, $first_unparsed );
83
+ }
84
+
85
+
86
+
87
+ private function push_line( $line ) {
88
+ if ( empty( $line ) ) {
89
+ return;
90
+ }
91
+
92
+ if ( substr( $line, 0, 1) == "\t" ) {
93
+ array_unshift( $this->current_item, $line );
94
+ return;
95
+ }
96
+
97
+ // split secondary lines to urls and backtrace
98
+ $postfix = array();
99
+ $backtrace = array();
100
+ $username = '';
101
+ foreach ( $this->current_item as $item ) {
102
+ $item = trim( $item );
103
+ if ( preg_match( '~^(#[^ ]+) ([^:]+): (.*)~', $item, $m ) ) {
104
+ $backtrace[] = array(
105
+ 'number' => $m[1],
106
+ 'filename' => $m[2],
107
+ 'function' => $m[3]
108
+ );
109
+ } elseif ( preg_match( '~^username:(.*)~', $item, $m ) ) {
110
+ $username = $m[1];
111
+ } else {
112
+ $postfix[] = $item;
113
+ }
114
+ }
115
+
116
+ $m = null;
117
+ if ( preg_match( '~\\[([^\\]]+)\\] (.*)~', $line, $m ) ) {
118
+ $this->lines[] = array(
119
+ 'date' => $m[1],
120
+ 'message' => $m[2],
121
+ 'username' => $username,
122
+ 'postfix' => $postfix,
123
+ 'backtrace' => $backtrace
124
+ );
125
+ }
126
+
127
+ $this->current_item = array();
128
+ }
129
+ }
Util_Request.php CHANGED
@@ -22,7 +22,7 @@ class Util_Request {
22
  if ( isset( $request[$key] ) ) {
23
  $value = $request[$key];
24
 
25
- if ( defined( 'TEMPLATEPATH' ) || get_magic_quotes_gpc() ) {
26
  $value = Util_Environment::stripslashes( $value );
27
  }
28
 
@@ -46,6 +46,11 @@ class Util_Request {
46
  return ( $trim ) ? trim( $value ) : $value;
47
  }
48
 
 
 
 
 
 
49
  /**
50
  * Returns integer value
51
  *
22
  if ( isset( $request[$key] ) ) {
23
  $value = $request[$key];
24
 
25
+ if ( defined( 'TEMPLATEPATH' ) ) {
26
  $value = Util_Environment::stripslashes( $value );
27
  }
28
 
46
  return ( $trim ) ? trim( $value ) : $value;
47
  }
48
 
49
+ static function get_label( $key, $default = '' ) {
50
+ $v = self::get_string( $key, $default);
51
+ return preg_replace('/[^A-Za-z0-9_\\-]/', '', $v);
52
+ }
53
+
54
  /**
55
  * Returns integer value
56
  *
Util_Ui.php CHANGED
@@ -352,13 +352,20 @@ class Util_Ui {
352
  * @param bool $disabled
353
  * @param int $size
354
  */
355
- static public function textbox( $id, $name, $value, $disabled = false, $size = 40, $type = 'text' ) {
 
356
  echo '<input class="enabled" type="' . esc_attr( $type ) .
357
  '" id="' . esc_attr( $id ) .
358
  '" name="' . esc_attr( $name ) .
359
- '" value="' . esc_attr( $value ) . '" ';
360
  disabled( $disabled );
361
- echo ' size="' . esc_attr( $size ) . '" />';
 
 
 
 
 
 
362
  }
363
 
364
  /**
@@ -483,6 +490,9 @@ class Util_Ui {
483
  echo $label;
484
  echo '</label>' . $postfix . "\n";
485
  if ( $pro_feature ) {
 
 
 
486
  Util_Ui::pro_wrap_maybe_end( $name . '__' . $key );
487
  }
488
  }
@@ -556,6 +566,83 @@ class Util_Ui {
556
  }
557
  }
558
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
559
 
560
 
561
  /**
@@ -571,23 +658,15 @@ class Util_Ui {
571
  $id = isset( $a['id'] ) ? $a['id'] : '';
572
  $a = apply_filters( 'w3tc_ui_settings_item', $a );
573
 
574
- if ( isset( $a['style'] ) ) {
575
- echo '<tr><th colspan="2">';
576
- } else {
577
- echo '<tr><th';
578
 
579
- if ( isset( $a['label_class'] ) )
580
- echo ' class="' . $a['label_class'] . '"';
581
- echo '>';
582
- if ( isset( $a['label'] ) )
583
- Util_Ui::label( $id, $a['label'] );
584
-
585
- echo "</th>\n<td>\n";
586
- }
587
 
588
- if ( isset( $a['pro_feature'] ) && $a['pro_feature'] ) {
589
- Util_Ui::pro_wrap_maybe_start();
590
- }
591
 
592
  foreach ( $a as $key => $e ) {
593
  if ( $key == 'checkbox' )
@@ -597,7 +676,7 @@ class Util_Ui {
597
  ( isset( $e['disabled'] ) ? $e['disabled'] : false ),
598
  ( isset( $e['label'] ) ? $e['label'] : null ) );
599
  elseif ( $key == 'description' )
600
- echo '<br /><span class="description">' . $e . '</span>';
601
  elseif ( $key == 'hidden' )
602
  Util_Ui::hidden( '', $e['name'], $e['value'] );
603
  elseif ( $key == 'html' )
@@ -613,21 +692,14 @@ class Util_Ui {
613
  Util_Ui::textbox( $id, $e['name'], $e['value'],
614
  ( isset( $e['disabled'] ) ? $e['disabled'] : false ),
615
  ( !empty( $e['size'] ) ? $e['size'] : 20 ),
616
- ( !empty( $e['type'] ) ? $e['type'] : 'text' ) );
 
617
  elseif ( $key == 'textarea' )
618
  Util_Ui::textarea( $id, $e['name'], $e['value'],
619
  ( isset( $e['disabled'] ) ? $e['disabled'] : false ) );
620
  }
621
 
622
- if ( isset( $a['pro_feature'] ) && $a['pro_feature'] ) {
623
- Util_Ui::pro_wrap_maybe_end( $id );
624
- }
625
-
626
- if ( isset( $a['style'] ) )
627
- echo "</th>";
628
- else
629
- echo "</td>";
630
-
631
  echo "</tr>\n";
632
  }
633
 
@@ -649,90 +721,96 @@ class Util_Ui {
649
  * description => description shown to the user below
650
  */
651
  static public function config_item( $a ) {
652
- $c = Dispatcher::config();
653
 
654
- if ( !isset( $a['value'] ) || is_null( $a['value'] ) ) {
655
- $a['value'] = $c->get( $a['key'] );
656
- if ( is_array( $a['value'] ) )
657
- $a['value'] = implode( "\n", $a['value'] );
 
 
 
 
 
 
658
  }
659
 
660
- if ( isset( $a['disabled'] ) && !is_null( $a['disabled'] ) )
661
- $disabled = $a['disabled'];
662
- else
663
- $disabled = $c->is_sealed( $a['key'] );
664
 
665
- if ( empty( $a['label'] ) )
666
- $a['label'] = Util_Ui::config_label( $a['key'] );
 
 
 
 
667
 
668
- $action_key = $a['key'];
669
- if ( is_array( $action_key ) )
670
- $action_key = 'extension.' . $action_key[0] . '.' . $action_key[1];
671
 
672
- $a = apply_filters( 'w3tc_ui_config_item_' . $action_key, $a );
673
 
674
- // convert to table_tr data
675
- $table_tr = array(
676
- 'id' => Util_Ui::config_key_to_http_name( $a['key'] ),
677
- 'label' => $a['label']
678
- );
679
 
680
- if ( isset( $a['style'] ) )
681
- $table_tr['style'] = $a['style'];
682
 
683
- if ( $a['control'] == 'checkbox' ) {
684
- $table_tr['label_class'] = 'w3tc_config_checkbox';
685
- $table_tr['checkbox'] = array(
686
- 'name' => Util_Ui::config_key_to_http_name( $a['key'] ),
687
- 'value' => $a['value'],
688
- 'disabled' => $disabled,
689
- 'label' => $a['checkbox_label']
690
- );
691
- } else if ( $a['control'] == 'radiogroup' ) {
692
- $table_tr['radiogroup'] = array(
693
- 'name' => Util_Ui::config_key_to_http_name( $a['key'] ),
694
- 'value' => $a['value'],
695
- 'disabled' => $disabled,
696
- 'values' => $a['radiogroup_values'],
697
- 'separator' => isset( $a['radiogroup_separator'] ) ?
698
- $a['radiogroup_separator'] : ''
699
- );
700
- } else if ( $a['control'] == 'selectbox' ) {
701
- $table_tr['selectbox'] = array(
702
- 'name' => Util_Ui::config_key_to_http_name( $a['key'] ),
703
- 'value' => $a['value'],
704
- 'disabled' => $disabled,
705
- 'values' => $a['selectbox_values'],
706
- 'optgroups' => isset( $a['selectbox_optgroups'] ) ?
707
- $a['selectbox_optgroups'] : null
708
- );
709
- } else if ( $a['control'] == 'textbox' ) {
710
- $table_tr['textbox'] = array(
711
- 'name' => Util_Ui::config_key_to_http_name( $a['key'] ),
712
- 'value' => $a['value'],
713
- 'disabled' => $disabled,
714
- 'type' => isset( $a['textbox_type'] ) ? $a['textbox_type'] : null,
715
- 'size' => isset( $a['textbox_size'] ) ? $a['textbox_size'] : null
716
- );
717
- } else if ( $a['control'] == 'textarea' ) {
718
- $table_tr['textarea'] = array(
719
- 'name' => Util_Ui::config_key_to_http_name( $a['key'] ),
720
- 'value' => $a['value'],
721
- 'disabled' => $disabled
722
- );
723
  }
724
 
 
 
 
 
 
 
 
725
  if ( isset( $a['control_after'] ) ) {
726
- $table_tr['html'] = $a['control_after'];
727
  }
728
- if ( isset( $a['description'] ) ) {
729
- $table_tr['description'] = $a['description'];
 
 
 
 
 
730
  }
731
- if ( isset( $a['pro_feature'] ) ) {
732
- $table_tr['pro_feature'] = $a['pro_feature'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
733
  }
734
 
735
- Util_Ui::table_tr( $table_tr );
 
 
 
 
 
736
  }
737
 
738
 
@@ -811,6 +889,24 @@ class Util_Ui {
811
 
812
 
813
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
814
  static public function pro_wrap_maybe_end( $button_data_src ) {
815
  if ( Util_Environment::is_w3tc_pro( Dispatcher::config() ) ) {
816
  return;
@@ -818,9 +914,10 @@ class Util_Ui {
818
 
819
  ?>
820
  </div>
821
- <div style="text-align:right">
 
822
  <button class="button w3tc-gopro-button button-buy-plugin" data-src="<?php echo esc_attr( $button_data_src ) ?>">
823
- Unlock Feature
824
  </button>
825
  </div>
826
  </div>
352
  * @param bool $disabled
353
  * @param int $size
354
  */
355
+ static public function textbox( $id, $name, $value, $disabled = false,
356
+ $size = 40, $type = 'text', $placeholder = '' ) {
357
  echo '<input class="enabled" type="' . esc_attr( $type ) .
358
  '" id="' . esc_attr( $id ) .
359
  '" name="' . esc_attr( $name ) .
360
+ '" value="' . esc_attr( $value ) . '"';
361
  disabled( $disabled );
362
+ echo ' size="' . esc_attr( $size ) . '"';
363
+
364
+ if ( !empty( $placeholder ) ) {
365
+ echo ' placeholder="' . esc_attr( $placeholder ) . '"';
366
+ }
367
+
368
+ echo ' />';
369
  }
370
 
371
  /**
490
  echo $label;
491
  echo '</label>' . $postfix . "\n";
492
  if ( $pro_feature ) {
493
+ Util_Ui::pro_wrap_description( $label_or_array['pro_excerpt'],
494
+ $label_or_array['pro_description'] );
495
+
496
  Util_Ui::pro_wrap_maybe_end( $name . '__' . $key );
497
  }
498
  }
566
  }
567
  }
568
 
569
+ static public function checkbox2( $e ) {
570
+ Util_Ui::checkbox( $e['name'],
571
+ $e['name'],
572
+ $e['value'],
573
+ ( isset( $e['disabled'] ) ? $e['disabled'] : false ),
574
+ ( isset( $e['label'] ) ? $e['label'] : null ) );
575
+ }
576
+
577
+ static public function radiogroup2( $e ) {
578
+ Util_Ui::radiogroup( $e['name'], $e['value'], $e['values'],
579
+ $e['disabled'], $e['separator'] );
580
+ }
581
+
582
+ static public function selectbox2( $e ) {
583
+ Util_Ui::selectbox( $e['name'], $e['name'], $e['value'], $e['values'],
584
+ ( isset( $e['disabled'] ) ? $e['disabled'] : false ),
585
+ ( isset( $e['optgroups'] ) ? $e['optgroups'] : null ) );
586
+ }
587
+
588
+ static public function textbox2( $e ) {
589
+ Util_Ui::textbox( $e['name'], $e['name'], $e['value'],
590
+ ( isset( $e['disabled'] ) ? $e['disabled'] : false ),
591
+ ( !empty( $e['size'] ) ? $e['size'] : 20 ),
592
+ ( !empty( $e['type'] ) ? $e['type'] : 'text' ),
593
+ ( !empty( $e['placeholder'] ) ? $e['placeholder'] : '' ) );
594
+ }
595
+
596
+ static public function textarea2( $e ) {
597
+ Util_Ui::textarea( $e['name'], $e['name'], $e['value'],
598
+ ( isset( $e['disabled'] ) ? $e['disabled'] : false ) );
599
+ }
600
+
601
+ static public function control2( $a ) {
602
+ if ( $a['control'] == 'checkbox' ) {
603
+ Util_Ui::checkbox2( array(
604
+ 'name' => $a['control_name'],
605
+ 'value' => $a['value'],
606
+ 'disabled' => $a['disabled'],
607
+ 'label' => $a['checkbox_label']
608
+ ) );
609
+ } elseif ( $a['control'] == 'radiogroup' ) {
610
+ Util_Ui::radiogroup2( array(
611
+ 'name' => $a['control_name'],
612
+ 'value' => $a['value'],
613
+ 'disabled' => $a['disabled'],
614
+ 'values' => $a['radiogroup_values'],
615
+ 'separator' => isset( $a['radiogroup_separator'] ) ?
616
+ $a['radiogroup_separator'] : ''
617
+ ) );
618
+ } elseif ( $a['control'] == 'selectbox' ) {
619
+ Util_Ui::selectbox2( array(
620
+ 'name' => $a['control_name'],
621
+ 'value' => $a['value'],
622
+ 'disabled' => $a['disabled'],
623
+ 'values' => $a['selectbox_values'],
624
+ 'optgroups' => isset( $a['selectbox_optgroups'] ) ?
625
+ $a['selectbox_optgroups'] : null
626
+ ) );
627
+ } elseif ( $a['control'] == 'textbox' ) {
628
+ Util_Ui::textbox2( array(
629
+ 'name' => $a['control_name'],
630
+ 'value' => $a['value'],
631
+ 'disabled' => $a['disabled'],
632
+ 'type' => isset( $a['textbox_type'] ) ? $a['textbox_type'] : null,
633
+ 'size' => isset( $a['textbox_size'] ) ? $a['textbox_size'] : null,
634
+ 'placeholder' => isset( $a['textbox_placeholder'] ) ?
635
+ $a['textbox_placeholder'] : null
636
+ ) );
637
+ } elseif ( $a['control'] == 'textarea' ) {
638
+ Util_Ui::textarea2( array(
639
+ 'name' => $a['control_name'],
640
+ 'value' => $a['value'],
641
+ 'disabled' => $a['disabled']
642
+ ) );
643
+ }
644
+ }
645
+
646
 
647
 
648
  /**
658
  $id = isset( $a['id'] ) ? $a['id'] : '';
659
  $a = apply_filters( 'w3tc_ui_settings_item', $a );
660
 
661
+ echo '<tr><th';
 
 
 
662
 
663
+ if ( isset( $a['label_class'] ) )
664
+ echo ' class="' . $a['label_class'] . '"';
665
+ echo '>';
666
+ if ( isset( $a['label'] ) )
667
+ Util_Ui::label( $id, $a['label'] );
 
 
 
668
 
669
+ echo "</th>\n<td>\n";
 
 
670
 
671
  foreach ( $a as $key => $e ) {
672
  if ( $key == 'checkbox' )
676
  ( isset( $e['disabled'] ) ? $e['disabled'] : false ),
677
  ( isset( $e['label'] ) ? $e['label'] : null ) );
678
  elseif ( $key == 'description' )
679
+ echo '<p class="description">' . $e . '</p>';
680
  elseif ( $key == 'hidden' )
681
  Util_Ui::hidden( '', $e['name'], $e['value'] );
682
  elseif ( $key == 'html' )
692
  Util_Ui::textbox( $id, $e['name'], $e['value'],
693
  ( isset( $e['disabled'] ) ? $e['disabled'] : false ),
694
  ( !empty( $e['size'] ) ? $e['size'] : 20 ),
695
+ ( !empty( $e['type'] ) ? $e['type'] : 'text' ),
696
+ ( !empty( $e['placeholder'] ) ? $e['placeholder'] : '' ) );
697
  elseif ( $key == 'textarea' )
698
  Util_Ui::textarea( $id, $e['name'], $e['value'],
699
  ( isset( $e['disabled'] ) ? $e['disabled'] : false ) );
700
  }
701
 
702
+ echo "</td>";
 
 
 
 
 
 
 
 
703
  echo "</tr>\n";
704
  }
705
 
721
  * description => description shown to the user below
722
  */
723
  static public function config_item( $a ) {
724
+ $a = Util_Ui::config_item_preprocess( $a );
725
 
726
+ if ( $a['label_class'] == 'w3tc_single_column' ) {
727
+ echo '<tr><th colspan="2">';
728
+ } else {
729
+ echo '<tr><th class="' . $a['label_class'] . '">';
730
+
731
+ if ( !empty( $a['label'] ) ) {
732
+ Util_Ui::label( $a['control_name'], $a['label'] );
733
+ }
734
+
735
+ echo "</th>\n<td>\n";
736
  }
737
 
738
+ Util_Ui::control2( $a );
 
 
 
739
 
740
+ if ( isset( $a['control_after'] ) ) {
741
+ echo $a['control_after'];
742
+ }
743
+ if ( isset( $a['description'] ) ) {
744
+ echo '<p class="description">' . $a['description'] . '</p>';
745
+ }
746
 
747
+ echo ( isset( $a['style'] ) ? "</th>" : "</td>" );
748
+ echo "</tr>\n";
749
+ }
750
 
 
751
 
 
 
 
 
 
752
 
753
+ static public function config_item_pro( $a ) {
754
+ $a = Util_Ui::config_item_preprocess( $a );
755
 
756
+ if ( $a['label_class'] != 'w3tc_no_trtd' ) {
757
+ echo '<tr><th class="' . $a['label_class'] . '">';
758
+
759
+ if ( !empty( $a['label'] ) ) {
760
+ Util_Ui::label( $a['control_name'], $a['label'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
761
  }
762
 
763
+ echo "</th>\n<td>\n";
764
+ }
765
+
766
+ Util_Ui::pro_wrap_maybe_start();
767
+
768
+ Util_Ui::control2( $a );
769
+
770
  if ( isset( $a['control_after'] ) ) {
771
+ echo $a['control_after'];
772
  }
773
+
774
+ Util_Ui::pro_wrap_description( $a['excerpt'], $a['description'] );
775
+ Util_Ui::pro_wrap_maybe_end( $a['control_name'] );
776
+
777
+ if ( $a['label_class'] != 'w3tc_no_trtd' ) {
778
+ echo "</th>";
779
+ echo "</tr>\n";
780
  }
781
+ }
782
+
783
+
784
+
785
+ static private function config_item_preprocess( $a ) {
786
+ $c = Dispatcher::config();
787
+
788
+ if ( !isset( $a['value'] ) || is_null( $a['value'] ) ) {
789
+ $a['value'] = $c->get( $a['key'] );
790
+ if ( is_array( $a['value'] ) )
791
+ $a['value'] = implode( "\n", $a['value'] );
792
+ }
793
+
794
+ if ( !isset( $a['disabled'] ) || is_null( $a['disabled'] ) ) {
795
+ $a['disabled'] = $c->is_sealed( $a['key'] );
796
+ }
797
+
798
+ if ( empty( $a['label'] ) ) {
799
+ $a['label'] = Util_Ui::config_label( $a['key'] );
800
+ }
801
+
802
+ $a['control_name'] = Util_Ui::config_key_to_http_name( $a['key'] );
803
+ $a['label_class'] = empty( $a['label_class'] ) ? '' : $a['label_class'];
804
+ if ( empty( $a['label_class'] ) && $a['control'] == 'checkbox' ) {
805
+ $a['label_class'] = 'w3tc_config_checkbox';
806
  }
807
 
808
+ $action_key = $a['key'];
809
+ if ( is_array( $action_key ) ) {
810
+ $action_key = 'extension.' . $action_key[0] . '.' . $action_key[1];
811
+ }
812
+
813
+ return apply_filters( 'w3tc_ui_config_item_' . $action_key, $a );
814
  }
815
 
816
 
889
 
890
 
891
 
892
+ static public function pro_wrap_description( $excerpt, $description ) {
893
+ echo '<p class="description w3tc-gopro-excerpt">' . $excerpt . '</p>';
894
+
895
+ if ( !empty( $description ) ) {
896
+ $d = array_map(
897
+ function($e) {
898
+ return "<p class='description'>$e</p>";
899
+ },
900
+ $description
901
+ );
902
+
903
+ echo '<div class="w3tc-gopro-description">' . implode( "\n", $d ) . '</div>';
904
+ echo '<a href="#" class="w3tc-gopro-more">Show More <span class="dashicons dashicons-arrow-down-alt2"></span></a>';
905
+ }
906
+ }
907
+
908
+
909
+
910
  static public function pro_wrap_maybe_end( $button_data_src ) {
911
  if ( Util_Environment::is_w3tc_pro( Dispatcher::config() ) ) {
912
  return;
914
 
915
  ?>
916
  </div>
917
+ <div class="w3tc-gopro-action">
918
+ <i>Pro Feature!</i>
919
  <button class="button w3tc-gopro-button button-buy-plugin" data-src="<?php echo esc_attr( $button_data_src ) ?>">
920
+ Learn more about Pro
921
  </button>
922
  </div>
923
  </div>
inc/lightbox/create_netdna_maxcdn_pull_zone.php CHANGED
@@ -2,34 +2,34 @@
2
  <h3><?php _e( 'Create Pull Zone', 'w3-total-cache' )?></h3>
3
  <style type="text/css">.form-table th {width:auto}</style>
4
  <div class="netdna-maxcdn-form">
5
- <div class="create-error w3tc-error"></div>
6
- <table class="form-table">
7
- <tr>
8
- <th><label for="name"><?php _e( 'Name:', 'w3-total-cache' ) ?></label></th>
9
- <td><input type="text" id="name" name="name"/><div class="name_message w3tc-error inline"></div>
10
- <p><span class="description"><?php _e( 'Pull Zone Name. Length: 3-32 chars; only letters, digits, and dash (-) accepted', 'w3-total-cache' )?></span></p>
11
- </td>
12
- </tr>
13
- <tr>
14
- <th><label for="url"><?php _e( 'Origin <acronym title="Uniform Resource Indicator">URL</acronym>:', 'w3-total-cache' ) ?></label></th>
15
- <td><?php echo get_home_url() ?>
16
- <p><span class="description"><?php _e( 'Your server\'s hostname or domain', 'w3-total-cache' ) ?></span></p>
17
- </td>
18
- </tr>
19
- <tr>
20
- <th><label for="label"><?php _e( 'Description:', 'w3-total-cache' ) ?></label></th>
21
- <td><textarea id="label" name="label" cols="40"></textarea><div class="label_message w3tc-error inline"></div>
22
- <p><span class="description"><?php _e( 'Something that describes your zone. Length: 1-255 chars', 'w3-total-cache' )?></span></p>
23
- </td>
24
- </tr>
25
- <tr>
26
- <th></th>
27
- <td>
28
- <input type="hidden" name="type" id="type" value="<?php echo $type ?>" />
29
- <?php wp_nonce_field( 'w3tc' ) ?>
30
- <input id="create_pull_zone" id="create_pull_zone" type="button" value="<?php _e( 'Create Pull Zone', 'w3-total-cache' )?>" class="button-primary" />
31
- <div id="pull-zone-loading" style="display:inline-block;"></div>
32
- </td>
33
- </tr>
34
  </table>
35
  </div>
2
  <h3><?php _e( 'Create Pull Zone', 'w3-total-cache' )?></h3>
3
  <style type="text/css">.form-table th {width:auto}</style>
4
  <div class="netdna-maxcdn-form">
5
+ <div class="create-error w3tc-error"></div>
6
+ <table class="form-table">
7
+ <tr>
8
+ <th><label for="name"><?php _e( 'Name:', 'w3-total-cache' ) ?></label></th>
9
+ <td><input type="text" id="name" name="name"/><div class="name_message w3tc-error inline"></div>
10
+ <p class="description"><?php _e( 'Pull Zone Name. Length: 3-32 chars; only letters, digits, and dash (-) accepted', 'w3-total-cache' )?></p>
11
+ </td>
12
+ </tr>
13
+ <tr>
14
+ <th><label for="url"><?php _e( 'Origin <acronym title="Uniform Resource Indicator">URL</acronym>:', 'w3-total-cache' ) ?></label></th>
15
+ <td><?php echo get_home_url() ?>
16
+ <p class="description"><?php _e( 'Your server\'s hostname or domain', 'w3-total-cache' ) ?></p>
17
+ </td>
18
+ </tr>
19
+ <tr>
20
+ <th><label for="label"><?php _e( 'Description:', 'w3-total-cache' ) ?></label></th>
21
+ <td><textarea id="label" name="label" cols="40"></textarea><div class="label_message w3tc-error inline"></div>
22
+ <p class="description"><?php _e( 'Something that describes your zone. Length: 1-255 chars', 'w3-total-cache' )?></p>
23
+ </td>
24
+ </tr>
25
+ <tr>
26
+ <th></th>
27
+ <td>
28
+ <input type="hidden" name="type" id="type" value="<?php echo $type ?>" />
29
+ <?php wp_nonce_field( 'w3tc' ) ?>
30
+ <input id="create_pull_zone" id="create_pull_zone" type="button" value="<?php _e( 'Create Pull Zone', 'w3-total-cache' )?>" class="button-primary" />
31
+ <div id="pull-zone-loading" style="display:inline-block;"></div>
32
+ </td>
33
+ </tr>
34
  </table>
35
  </div>
inc/options/browsercache.php CHANGED
@@ -14,786 +14,436 @@ $security_session_values = array(
14
  <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
15
 
16
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
17
- <p>
18
- <?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>' ); ?>
19
- </p>
20
- <p>
21
- <?php echo Util_Ui::nonce_field( 'w3tc' ); ?>
22
 
23
- <?php echo sprintf(
24
- __( '%sUpdate media query string%s to make existing file modifications visible to visitors with a primed cache', 'w3-total-cache' ),
25
- '<input type="submit" name="w3tc_flush_browser_cache" value="',
26
- '" ' . disabled( !( $browsercache_enabled && $browsercache_update_media_qs ), true, false ) . ' class="button" />' );
27
- ?>
28
- </p>
29
  </form>
30
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
31
- <div class="metabox-holder">
32
- <?php Util_Ui::postbox_header( __( 'General', 'w3-total-cache' ), '', 'general' ); ?>
33
- <p><?php _e( 'Specify global browser cache policy.', 'w3-total-cache' ) ?></p>
34
- <table class="form-table">
35
- <tr>
36
- <th colspan="2">
37
- <label>
38
- <input id="browsercache_last_modified" type="checkbox" name="expires"
39
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
40
- value="1"<?php checked( $browsercache_last_modified, true ); ?> /> <?php _e( 'Set Last-Modified header', 'w3-total-cache' ); ?></label>
41
- <br /><span class="description"><?php _e( 'Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache' ); ?></span>
42
- </th>
43
- </tr>
44
- <tr>
45
- <th colspan="2">
46
- <label>
47
- <input id="browsercache_expires" type="checkbox" name="expires"
48
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
49
- value="1"<?php checked( $browsercache_expires, true ); ?> /> <?php _e( 'Set expires header', 'w3-total-cache' ); ?></label>
50
- <br /><span class="description"><?php _e( 'Set the expires header to encourage browser caching of files.', 'w3-total-cache' ); ?></span>
51
- </th>
52
- </tr>
53
- <tr>
54
- <th colspan="2">
55
- <label><input id="browsercache_cache_control" type="checkbox"
56
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> name="cache_control" value="1"<?php checked( $browsercache_cache_control, true ); ?> /> <?php _e( 'Set cache control header', 'w3-total-cache' ); ?></label>
57
- <br /><span class="description"><?php _e( 'Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache' ); ?></span>
58
- </th>
59
- </tr>
60
- <tr>
61
- <th colspan="2">
62
- <label><input id="browsercache_etag" type="checkbox"
63
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
64
- name="etag" value="1"<?php checked( $browsercache_etag, true ); ?> /> <?php _e( 'Set entity tag (ETag)', 'w3-total-cache' ); ?></label>
65
- <br /><span class="description"><?php _e( 'Set the ETag header to encourage browser caching of files.', 'w3-total-cache' ); ?></span>
66
- </th>
67
- </tr>
68
- <tr>
69
- <th colspan="2">
70
- <label><input id="browsercache_w3tc" type="checkbox" name="w3tc"
71
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="1" <?php checked( $browsercache_w3tc, true ); ?> /> <?php _e( 'Set W3 Total Cache header', 'w3-total-cache' ); ?></label>
72
- <br /><span class="description"><?php _e( 'Set this header to assist in identifying optimized files.', 'w3-total-cache' ); ?></span>
73
- </th>
74
- </tr>
75
- <tr>
76
- <th colspan="2">
77
- <label><input id="browsercache_compression" type="checkbox"
78
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
79
- 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>
80
- <br /><span class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></span>
81
- </th>
82
- </tr>
83
- <tr>
84
- <th colspan="2">
85
- <label><input id="browsercache_brotli" type="checkbox"
86
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
87
- <?php if ( !function_exists( 'brotli_compress' ) ) echo 'disabled="disabled"' ?>
88
- name="compression"<?php checked( $browsercache_brotli, true ); ?> value="1" /> <?php _e( 'Enable <acronym title="Hypertext Transfer Protocol">HTTP</acronym> (brotli) compression', 'w3-total-cache' ); ?></label>
89
- <br /><span class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></span>
90
- </th>
91
- </tr>
92
- <tr>
93
- <th colspan="2">
94
- <label><input id="browsercache_replace" type="checkbox"
95
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
96
- name="replace" value="1"<?php checked( $browsercache_replace, true ); ?> /> <?php _e( 'Prevent caching of objects after settings change', 'w3-total-cache' ); ?></label>
97
- <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>
98
- </th>
99
- </tr>
100
- <tr>
101
- <th colspan="2">
102
- <label><input id="browsercache_querystring" type="checkbox"
103
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
104
- name="querystring" value="1"<?php checked( $browsercache_querystring, true ); ?> /> <?php _e( 'Remove query strings from static resources', 'w3-total-cache' ); ?></label>
105
- <br /><span class="description"><?php _e( 'Resources with a "?" in the <acronym title="Uniform Resource Locator">URL</acronym> are not cached by some proxy caching servers.', 'w3-total-cache' ); ?></span>
106
- </th>
107
- </tr>
108
- <tr>
109
- <th><label for="browsercache_replace_exceptions"><?php Util_Ui::e_config_label( 'browsercache.replace.exceptions' ) ?></label></th>
110
- <td>
111
- <textarea id="browsercache_replace_exceptions"
112
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
113
- name="browsercache__replace__exceptions" cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'browsercache.replace.exceptions' ) ) ); ?></textarea><br />
114
- <span class="description"><?php _e( 'Do not add the prevent caching query string to the specified <acronym title="Uniform Resource Identifier">URI</acronym>s. Supports regular expressions.', 'w3-total-cache' ); ?></span>
115
- </td>
116
- </tr>
117
- <tr>
118
- <th colspan="2">
119
- <label><input id="browsercache_nocookies" type="checkbox"
120
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
121
- name="nocookies" value="1"<?php checked( $browsercache_nocookies, true ); ?> /> <?php _e( "Don't set cookies for static files", 'w3-total-cache' ); ?></label>
122
- <br /><span class="description"><?php _e( 'Removes Set-Cookie header for responses.' ); ?></span>
123
- </th>
124
- </tr>
125
- <tr>
126
- <th colspan="2">
127
- <?php $this->checkbox( 'browsercache.no404wp', !Util_Rule::can_check_rules() ) ?> <?php Util_Ui::e_config_label( 'browsercache.no404wp' ) ?></label>
128
- <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>
129
- <br /><span class="description"><?php _e( 'If enabled - you may get 404 File Not Found response for some files generated on-the-fly by WordPress plugins. You may add those file <acronym title="Uniform Resource Identifier">URI</acronym>s to 404 error exception list below to avoid that.', 'w3-total-cache' ); ?></span>
130
- </th>
131
- </tr>
132
- <tr>
133
- <th><label for="browsercache_no404wp_exceptions"><?php Util_Ui::e_config_label( 'browsercache.no404wp.exceptions' ) ?></label></th>
134
- <td>
135
- <textarea id="browsercache_no404wp_exceptions"
136
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
137
- name="browsercache__no404wp__exceptions" cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'browsercache.no404wp.exceptions' ) ) ); ?></textarea><br />
138
- <span class="description"><?php _e( 'Never process 404 (not found) events for the specified <acronym title="Uniform Resource Identifier">URI</acronym>s.', 'w3-total-cache' ); ?></span>
139
- </td>
140
- </tr>
141
- <?php
142
- Util_Ui::config_item( array(
143
- 'key' => 'browsercache.rewrite',
144
- 'disabled' => Util_Ui::sealing_disabled( 'browsercache.' ),
145
- 'control' => 'checkbox',
146
- 'checkbox_label' => __( 'Rewrite <acronym title="Universal Resource Locator">URL</acronym> structure of objects', 'w3-total-cache' ),
147
- 'description' => __( 'Generate unique <acronym title="Universal Resource Indicator">URI</acronym> for each file protected from caching by browser.', 'w3-total-cache' ),
148
- 'style' => '2'
149
- ) );
150
- ?>
151
- </table>
152
-
153
- <?php Util_Ui::button_config_save( 'browsercache_general' ); ?>
154
- <?php Util_Ui::postbox_footer(); ?>
155
-
156
- <?php Util_Ui::postbox_header( __( '<acronym title="Cascading Style Sheet">CSS</acronym> &amp; <acronym title="JavaScript">JS</acronym>', 'w3-total-cache' ), '', 'css_js' ); ?>
157
- <p><?php _e( 'Specify browser cache policy for Cascading Style Sheets and JavaScript files.', 'w3-total-cache' ); ?></p>
158
 
159
- <table class="form-table">
160
- <tr>
161
- <th colspan="2">
162
- <?php $this->checkbox( 'browsercache.cssjs.last_modified' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.last_modified' ) ?></label>
163
- <br /><span class="description"><?php _e( 'Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache' ); ?></span>
164
- </th>
165
- </tr>
166
- <tr>
167
- <th colspan="2">
168
- <?php $this->checkbox( 'browsercache.cssjs.expires' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.expires' ) ?></label>
169
- <br /><span class="description"><?php _e( 'Set the expires header to encourage browser caching of files.', 'w3-total-cache' ); ?></span>
170
- </th>
171
- </tr>
172
- <tr>
173
- <th>
174
- <label for="browsercache_cssjs_lifetime"><?php Util_Ui::e_config_label( 'browsercache.cssjs.lifetime' ) ?></label>
175
- </th>
176
- <td>
177
- <input id="browsercache_cssjs_lifetime" type="text"
178
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
179
- name="browsercache__cssjs__lifetime" value="<?php echo esc_attr( $this->_config->get_integer( 'browsercache.cssjs.lifetime' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
180
- </td>
181
- </tr>
182
- <tr>
183
- <th colspan="2">
184
- <?php $this->checkbox( 'browsercache.cssjs.cache.control' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.cache.control' ) ?></label>
185
- <br /><span class="description"><?php _e( 'Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache' ); ?></span>
186
- </th>
187
- </tr>
188
- <tr>
189
- <th>
190
- <label for="browsercache_cssjs_cache_policy"><?php Util_Ui::e_config_label( 'browsercache.cssjs.cache.policy' ) ?></label>
191
- </th>
192
- <td>
193
- <select id="browsercache_cssjs_cache_policy"
194
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
195
- name="browsercache__cssjs__cache__policy">
196
- <?php
197
- $value = $this->_config->get_string( 'browsercache.cssjs.cache.policy' );
198
- $cssjs_expires = $this->_config->get_boolean( 'browsercache.cssjs.expires' );
199
- ?>
200
- <option value="cache"<?php selected( $value, 'cache' ); ?>>cache ("public")</option>
201
- <option value="cache_public_maxage"<?php selected( $value, 'cache_public_maxage' ); disabled( $is_nginx && $cssjs_expires ); ?>><?php _e( 'cache with max-age ("public, max-age=EXPIRES_SECONDS")', 'w3-total-cache' ); ?></option>
202
- <option value="cache_validation"<?php selected( $value, 'cache_validation' ); ?>><?php _e( 'cache with validation ("public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ); ?></option>
203
- <option value="cache_maxage"<?php selected( $value, 'cache_maxage' ); disabled( $is_nginx && $cssjs_expires ); ?>><?php _e( 'cache with max-age and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ); ?></option>
204
- <option value="cache_noproxy"<?php selected( $value, 'cache_noproxy' ); ?>><?php _e( 'cache without proxy ("private, must-revalidate")', 'w3-total-cache' ); ?></option>
205
- <option value="no_cache"<?php selected( $value, 'no_cache' ); ?>><?php _e( 'don\'t cache ("max-age=0, private, no-store, no-cache, must-revalidate")', 'w3-total-cache' ); ?></option>
206
- </select>
207
- <?php if ( $is_nginx && $cssjs_expires ) : ?>
208
- <br /><span class="description"><?php _e( 'The Expires header already sets the max-age.', 'w3-total-cache' ); ?></span>
209
- <?php endif; ?>
210
- </td>
211
- </tr>
212
- <tr>
213
- <th colspan="2">
214
- <?php $this->checkbox( 'browsercache.cssjs.etag' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.etag' ) ?></label>
215
- <br /><span class="description"><?php _e( 'Set the ETag header to encourage browser caching of files.', 'w3-total-cache' ); ?></span>
216
- </th>
217
- </tr>
218
- <tr>
219
- <th colspan="2">
220
- <?php $this->checkbox( 'browsercache.cssjs.w3tc' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.w3tc' ) ?></label>
221
- <br /><span class="description"><?php _e( 'Set this header to assist in identifying optimized files.', 'w3-total-cache' ); ?></span>
222
- </th>
223
- </tr>
224
- <tr>
225
- <th colspan="2">
226
- <?php $this->checkbox( 'browsercache.cssjs.compression' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.compression' ) ?> </label>
227
- <br /><span class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></span>
228
- </th>
229
- </tr>
230
- <tr>
231
- <th colspan="2">
232
- <?php $this->checkbox( 'browsercache.cssjs.brotli', !function_exists( 'brotli_compress' ) ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.brotli' ) ?> </label>
233
- <br /><span class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></span>
234
- </th>
235
- </tr>
236
- <tr>
237
- <th colspan="2">
238
- <?php $this->checkbox( 'browsercache.cssjs.replace' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.replace' ) ?></label>
239
- <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>
240
- </th>
241
- </tr>
242
- <tr>
243
- <th colspan="2">
244
- <?php $this->checkbox( 'browsercache.cssjs.querystring' ) ?> <?php _e( 'Remove query strings from static resources', 'w3-total-cache' ); ?></label>
245
- <br /><span class="description"><?php _e( 'Resources with a "?" in the <acronym title="Uniform Resource Locator">URL</acronym> are not cached by some proxy caching servers.', 'w3-total-cache' ); ?></span>
246
- </th>
247
- </tr>
248
- <tr>
249
- <th colspan="2">
250
- <?php $this->checkbox( 'browsercache.cssjs.nocookies' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.nocookies' ) ?></label>
251
- <br /><span class="description"><?php _e( 'Removes Set-Cookie header for responses.', 'w3-total-cache' ); ?></span>
252
- </th>
253
- </tr>
254
- </table>
255
 
256
- <?php Util_Ui::button_config_save( 'browsercache_css_js' ); ?>
257
- <?php Util_Ui::postbox_footer(); ?>
258
 
259
- <?php Util_Ui::postbox_header( __( '<acronym title="Hypertext Markup Language">HTML</acronym> &amp; <acronym title="Extensible Markup Language">XML</acronym>', 'w3-total-cache' ), '', 'html_xml' ); ?>
260
- <p><?php _e( 'Specify browser cache policy for posts, pages, feeds and text-based files.', 'w3-total-cache' ); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
 
262
- <table class="form-table">
263
- <tr>
264
- <th colspan="2">
265
- <?php $this->checkbox( 'browsercache.html.last_modified' ) ?> <?php Util_Ui::e_config_label( 'browsercache.html.last_modified' ) ?></label>
266
- <br /><span class="description"><?php _e( 'Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache' ); ?></span>
267
- </th>
268
- </tr>
269
- <tr>
270
- <th colspan="2">
271
- <?php $this->checkbox( 'browsercache.html.expires' ) ?> <?php Util_Ui::e_config_label( 'browsercache.html.expires' ) ?></label>
272
- <br /><span class="description"><?php _e( 'Set the expires header to encourage browser caching of files.', 'w3-total-cache' ); ?></span>
273
- </th>
274
- </tr>
275
- <tr>
276
- <th style="width: 250px;">
277
- <label for="browsercache_html_lifetime"><?php Util_Ui::e_config_label( 'browsercache.html.lifetime' ) ?></label>
278
- </th>
279
- <td>
280
- <input id="browsercache_html_lifetime" type="text"
281
- name="browsercache__html__lifetime"
282
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
283
- value="<?php echo esc_attr( $this->_config->get_integer( 'browsercache.html.lifetime' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
284
- </td>
285
- </tr>
286
- <tr>
287
- <th colspan="2">
288
- <?php $this->checkbox( 'browsercache.html.cache.control' ) ?> <?php Util_Ui::e_config_label( 'browsercache.html.cache.control' ) ?></label>
289
- <br /><span class="description"><?php _e( 'Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache' ); ?></span>
290
- </th>
291
- </tr>
292
- <tr>
293
- <th>
294
- <label for="browsercache_html_cache_policy"><?php Util_Ui::e_config_label( 'browsercache.html.cache.policy' ) ?></label>
295
- </th>
296
- <td>
297
- <select id="browsercache_html_cache_policy" name="browsercache__html__cache__policy"
298
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>>
299
- <?php
300
- $value = $this->_config->get_string( 'browsercache.html.cache.policy' );
301
- $html_expires = $this->_config->get_boolean( 'browsercache.html.expires' );
302
- ?>
303
- <option value="cache"<?php selected( $value, 'cache' ); ?>>cache ("public")</option>
304
- <option value="cache_public_maxage"<?php selected( $value, 'cache_public_maxage' ); disabled( $is_nginx && $html_expires ); ?>><?php _e( 'cache with max-age ("public, max-age=EXPIRES_SECONDS")', 'w3-total-cache' ); ?></option>
305
- <option value="cache_validation"<?php selected( $value, 'cache_validation' ); ?>><?php _e( 'cache with validation ("public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ); ?></option>
306
- <option value="cache_maxage"<?php selected( $value, 'cache_maxage' ); disabled( $is_nginx && $html_expires ); ?>><?php _e( 'cache with max-age and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ); ?></option>
307
- <option value="cache_noproxy"<?php selected( $value, 'cache_noproxy' ); ?>><?php _e( 'cache without proxy ("private, must-revalidate")', 'w3-total-cache' ); ?></option>
308
- <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>
309
- </select>
310
- <?php if ( $is_nginx && $html_expires ) : ?>
311
- <br /><span class="description"><?php _e( 'The Expires header already sets the max-age.', 'w3-total-cache' ); ?></span>
312
- <?php endif; ?>
313
- </td>
314
- </tr>
315
- <tr>
316
- <th colspan="2">
317
- <?php $this->checkbox( 'browsercache.html.etag' ) ?> <?php Util_Ui::e_config_label( 'browsercache.html.etag' ) ?></label>
318
- <br /><span class="description"><?php _e( 'Set the ETag header to encourage browser caching of files.', 'w3-total-cache' ); ?></span>
319
- </th>
320
- </tr>
321
- <tr>
322
- <th colspan="2">
323
- <?php $this->checkbox( 'browsercache.html.w3tc' ) ?> <?php Util_Ui::e_config_label( 'browsercache.html.w3tc' ) ?></label>
324
- <br /><span class="description"><?php _e( 'Set this header to assist in identifying optimized files.', 'w3-total-cache' ); ?></span>
325
- </th>
326
- </tr>
327
- <tr>
328
- <th colspan="2">
329
- <?php $this->checkbox( 'browsercache.html.compression' ) ?> <?php Util_Ui::e_config_label( 'browsercache.html.compression' ) ?></label>
330
- <br /><span class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></span>
331
- </th>
332
- </tr>
333
- <tr>
334
- <th colspan="2">
335
- <?php $this->checkbox( 'browsercache.html.brotli', !function_exists( 'brotli_compress' ) ) ?> <?php Util_Ui::e_config_label( 'browsercache.html.brotli' ) ?></label>
336
- <br /><span class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></span>
337
- </th>
338
- </tr>
339
- </table>
340
 
341
- <?php Util_Ui::button_config_save( 'browsercache_html_xml' ); ?>
342
- <?php Util_Ui::postbox_footer(); ?>
343
 
344
- <?php Util_Ui::postbox_header( __( 'Media &amp; Other Files', 'w3-total-cache' ), '', 'media' ); ?>
345
- <table class="form-table">
346
- <tr>
347
- <th colspan="2">
348
- <?php $this->checkbox( 'browsercache.other.last_modified' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.last_modified' ) ?></label>
349
- <br /><span class="description"><?php _e( 'Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache' ); ?></span>
350
- </th>
351
- </tr>
352
- <tr>
353
- <th colspan="2">
354
- <?php $this->checkbox( 'browsercache.other.expires' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.expires' ) ?></label>
355
- <br /><span class="description"><?php _e( 'Set the expires header to encourage browser caching of files.', 'w3-total-cache' ); ?></span>
356
- </th>
357
- </tr>
358
- <tr>
359
- <th style="width: 250px;">
360
- <label for="browsercache_other_lifetime"><?php Util_Ui::e_config_label( 'browsercache.other.lifetime' ) ?></label>
361
- </th>
362
- <td>
363
- <input id="browsercache_other_lifetime" type="text"
364
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
365
- name="browsercache__other__lifetime" value="<?php echo esc_attr( $this->_config->get_integer( 'browsercache.other.lifetime' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
366
- </td>
367
- </tr>
368
- <tr>
369
- <th colspan="2">
370
- <?php $this->checkbox( 'browsercache.other.cache.control' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.cache.control' ) ?></label>
371
- <br /><span class="description"><?php _e( 'Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache' ); ?></span>
372
- </th>
373
- </tr>
374
- <tr>
375
- <th>
376
- <label for="browsercache_other_cache_policy"><?php Util_Ui::e_config_label( 'browsercache.other.cache.policy' ) ?></label>
377
- </th>
378
- <td>
379
- <select id="browsercache_other_cache_policy"
380
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
381
- name="browsercache__other__cache__policy">
382
- <?php
383
- $value = $this->_config->get_string( 'browsercache.other.cache.policy' );
384
- $other_expires = $this->_config->get_string( 'browsercache.other.expires' );
385
- ?>
386
- <option value="cache"<?php selected( $value, 'cache' ); ?>><?php _e( 'cache ("public")' ); ?></option>
387
- <option value="cache_public_maxage"<?php selected( $value, 'cache_public_maxage' ); disabled( $is_nginx && $other_expires ); ?>><?php _e( 'cache with max-age ("public, max-age=EXPIRES_SECONDS")', 'w3-total-cache' ); ?></option>
388
- <option value="cache_validation"<?php selected( $value, 'cache_validation' ); ?>><?php _e( 'cache with validation ("public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ); ?></option>
389
- <option value="cache_maxage"<?php selected( $value, 'cache_maxage' ); disabled( $is_nginx && $other_expires ); ?>><?php _e( 'cache with max-age and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ); ?></option>
390
- <option value="cache_noproxy"<?php selected( $value, 'cache_noproxy' ); ?>><?php _e( 'cache without proxy ("private, must-revalidate")', 'w3-total-cache' ); ?></option>
391
- <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>
392
- </select>
393
- <?php if ( $is_nginx && $other_expires ) : ?>
394
- <br /><span class="description"><?php _e( 'The Expires header already sets the max-age.', 'w3-total-cache' ); ?></span>
395
- <?php endif; ?>
396
- </td>
397
- </tr>
398
- <tr>
399
- <th colspan="2">
400
- <?php $this->checkbox( 'browsercache.other.etag' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.etag' ) ?></label>
401
- <br /><span class="description"><?php _e( 'Set the ETag header to encourage browser caching of files.', 'w3-total-cache' ); ?></span>
402
- </th>
403
- </tr>
404
- <tr>
405
- <th colspan="2">
406
- <?php $this->checkbox( 'browsercache.other.w3tc' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.w3tc' ) ?></label>
407
- <br /><span class="description"><?php _e( 'Set this header to assist in identifying optimized files.', 'w3-total-cache' ); ?></span>
408
- </th>
409
- </tr>
410
- <tr>
411
- <th colspan="2">
412
- <?php $this->checkbox( 'browsercache.other.compression' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.compression' ) ?>
413
- <br /><span class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></span>
414
- </th>
415
- </tr>
416
- <tr>
417
- <th colspan="2">
418
- <?php $this->checkbox( 'browsercache.other.brotli', !function_exists( 'brotli_compress' ) ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.brotli' ) ?>
419
- <br /><span class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></span>
420
- </th>
421
- </tr>
422
- <tr>
423
- <th colspan="2">
424
- <?php $this->checkbox( 'browsercache.other.replace' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.replace' ) ?></label>
425
- <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>
426
- </th>
427
- </tr>
428
- <tr>
429
- <th colspan="2">
430
- <?php $this->checkbox( 'browsercache.other.querystring' ) ?> <?php _e( 'Remove query strings from static resources', 'w3-total-cache' ); ?></label>
431
- <br /><span class="description"><?php _e( 'Resources with a "?" in the <acronym title="Uniform Resource Locator">URL</acronym> are not cached by some proxy caching servers.', 'w3-total-cache' ); ?></span>
432
- </th>
433
- </tr>
434
- <tr>
435
- <th colspan="2">
436
- <?php $this->checkbox( 'browsercache.other.nocookies' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.nocookies' ) ?></label>
437
- <br /><span class="description"><?php _e( 'Removes Set-Cookie header for responses.', 'w3-total-cache' ); ?></span>
438
- </th>
439
- </tr>
440
- </table>
441
 
442
- <?php Util_Ui::button_config_save( 'browsercache_media' ); ?>
443
- <?php Util_Ui::postbox_footer(); ?>
444
 
445
- <?php Util_Ui::postbox_header( __( 'Security Headers', 'w3-total-cache' ), '', 'security' ); ?>
446
- <p><?php _e( '<acronym title="Hypertext Transfer Protocol">HTTP</acronym> security headers provide another layer of protection for your website by helping to mitigate attacks and security vulnerabilities.', 'w3-total-cache' ); ?></p>
447
- <p><a onclick="w3tc_csp_reference()" href="javascript:void(0);">Quick Reference Chart</a></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
448
 
449
- <table class="form-table">
450
- <?php
451
- Util_Ui::config_item( array(
452
- 'key' => 'browsercache.security.session.use_only_cookies',
453
- 'control' => 'selectbox',
454
- 'selectbox_values' => $security_session_values,
455
- 'description' => __( 'This setting prevents attacks that are caused by passing session IDs in <acronym title="Uniform Resource Locator">URL</acronym>s.',
456
- 'w3-total-cache' )
457
- ) );
458
- ?>
459
- <?php
460
- Util_Ui::config_item( array(
461
- 'key' => 'browsercache.security.session.cookie_httponly',
462
- 'control' => 'selectbox',
463
- 'selectbox_values' => $security_session_values,
464
- 'description' => __( 'This tells the user\'s browser not to make the session cookie accessible to client side scripting such as JavaScript. This makes it harder for an attacker to hijack the session ID and masquerade as the effected user.',
465
- 'w3-total-cache' )
466
- ) );
467
- ?>
468
- <?php
469
- Util_Ui::config_item( array(
470
- 'key' => 'browsercache.security.session.cookie_secure',
471
- 'control' => 'selectbox',
472
- 'selectbox_values' => $security_session_values,
473
- 'description' => __( 'This will prevent the user\'s session ID from being transmitted in plain text, making it much harder to hijack the user\'s session.',
474
- 'w3-total-cache' )
475
- ) );
476
- ?>
477
- <tr>
478
- <th colspan="2">
479
- <?php $this->checkbox( 'browsercache.hsts' ) ?> <?php Util_Ui::e_config_label( 'browsercache.hsts' ) ?></label>
480
- <br /><span class="description"><?php _e( '<acronym title="Hypertext Transfer Protocol">HTTP</acronym> Strict-Transport-Security (<acronym title="HTTP Strict Transport Security">HSTS</acronym>) enforces secure (<acronym title="Hypertext Transfer Protocol">HTTP</acronym> over <acronym title="Secure Sockets Layer">SSL</acronym>/<acronym title="Transport Layer Security">TLS</acronym>) connections to the server. This can help mitigate adverse effects caused by bugs and session leaks through cookies and links. It also helps defend against man-in-the-middle attacks. If there are <acronym title="Secure Sockets Layer">SSL</acronym> negotiation warnings then users will not be permitted to ignore them.', 'w3-total-cache' ); ?></span>
481
- </th>
482
- </tr>
483
- <tr>
484
- <th>
485
- <label for="browsercache_security_hsts_directive"><?php Util_Ui::e_config_label( 'browsercache.security.hsts.directive' ) ?></label>
486
- </th>
487
- <td>
488
- <select id="browsercache_security_hsts_directive"
489
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
490
- name="browsercache__security__hsts__directive">
491
- <?php $value = $this->_config->get_string( 'browsercache.security.hsts.directive' ); ?>
492
- <option value="maxage"<?php selected( $value, 'maxage' ); ?>><?php _e( 'max-age=EXPIRES_SECONDS', 'w3-total-cache' ); ?></option>
493
- <option value="maxagepre"<?php selected( $value, 'maxagepre' ); ?>><?php _e( 'max-age=EXPIRES_SECONDS; preload', 'w3-total-cache' ); ?></option>
494
- <option value="maxageinc"<?php selected( $value, 'maxageinc' ); ?>><?php _e( 'max-age=EXPIRES_SECONDS; includeSubDomains', 'w3-total-cache' ); ?></option>
495
- <option value="maxageincpre"<?php selected( $value, 'maxageincpre' ); ?>><?php _e( 'max-age=EXPIRES_SECONDS; includeSubDomains; preload', 'w3-total-cache' ); ?></option>
496
- </select>
497
- <div id="browsercache_security_hsts_directive_description"></div>
498
- </td>
499
- </tr>
500
- <tr>
501
- <th colspan="2">
502
- <?php $this->checkbox( 'browsercache.security.xfo' ) ?> <?php Util_Ui::e_config_label( 'browsercache.security.xfo' ) ?></label>
503
- <br /><span class="description"><?php _e( 'This tells the browser if it is permitted to render a page within a frame-like tag (i.e., &lt;frame&gt;, &lt;iframe&gt; or &lt;object&gt;). This is useful for preventing clickjacking attacks.', 'w3-total-cache' ); ?></span>
504
- </th>
505
- </tr>
506
- <tr>
507
- <th>
508
- <label for="browsercache_security_xfo_directive"><?php Util_Ui::e_config_label( 'browsercache.security.xfo.directive' ) ?></label>
509
- </th>
510
- <td>
511
- <select id="browsercache_security_xfo_directive"
512
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
513
- name="browsercache__security__xfo__directive">
514
- <?php $value = $this->_config->get_string( 'browsercache.security.xfo.directive' ); ?>
515
- <option value="same"<?php selected( $value, 'same' ); ?>><?php _e( 'SameOrigin', 'w3-total-cache' ); ?></option>
516
- <option value="deny"<?php selected( $value, 'deny' ); ?>><?php _e( 'Deny', 'w3-total-cache' ); ?></option>
517
- <option value="allow"<?php selected( $value, 'allow' ); ?>><?php _e( 'Allow-From', 'w3-total-cache' ); ?></option>
518
- </select>
519
- <input id="browsercache_security_xfo_allow" type="text" name="browsercache__security__xfo__allow"
520
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.xfo.allow' ) ); ?>" size="50" placeholder="Enter URL" />
521
- <div id="browsercache_security_xfo_directive_description"></div>
522
- </td>
523
- </tr>
524
- <tr>
525
- <th colspan="2">
526
- <?php $this->checkbox( 'browsercache.security.xss' ) ?> <?php Util_Ui::e_config_label( 'browsercache.security.xss' ) ?></label>
527
- <br /><span class="description"><?php _e( 'This header enables the <acronym title="Cross-Site Scripting">XSS</acronym> filter. It helps to stop malicious scripts from being injected into your website. Although this is already built into and enabled by default in most browsers today it is made available here to enforce its reactivation if it was disabled within the user\'s browser.', 'w3-total-cache' ); ?></span>
528
- </th>
529
- </tr>
530
- <tr>
531
- <th>
532
- <label for="browsercache_security_xss_directive"><?php Util_Ui::e_config_label( 'browsercache.security.xss.directive' ) ?></label>
533
- </th>
534
- <td>
535
- <select id="browsercache_security_xss_directive"
536
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
537
- name="browsercache__security__xss__directive">
538
- <?php $value = $this->_config->get_string( 'browsercache.security.xss.directive' ); ?>
539
- <option value="0"<?php selected( $value, '0' ); ?>><?php _e( '0', 'w3-total-cache' ); ?></option>
540
- <option value="1"<?php selected( $value, '1' ); ?>><?php _e( '1', 'w3-total-cache' ); ?></option>
541
- <option value="block"<?php selected( $value, 'block' ); ?>><?php _e( '1; mode=block', 'w3-total-cache' ); ?></option>
542
- </select>
543
- <div id="browsercache_security_xss_directive_description"></div>
544
- </td>
545
- </tr>
546
- <tr>
547
- <th colspan="2">
548
- <?php $this->checkbox( 'browsercache.security.xcto' ) ?> <?php Util_Ui::e_config_label( 'browsercache.security.xcto' ) ?></label>
549
- <br /><span class="description"><?php _e( 'This instructs the browser to not MIME-sniff a response outside its declared content-type. It helps to reduce drive-by download attacks and stops sites from serving malevolent content that could masquerade as an executable or dynamic HTML file.', 'w3-total-cache' ); ?></span>
550
- </th>
551
- </tr>
552
- <tr>
553
- <th colspan="2">
554
- <?php $this->checkbox( 'browsercache.security.pkp' ) ?> <?php Util_Ui::e_config_label( 'browsercache.security.pkp' ) ?></label>
555
- <br /><span class="description"><?php _e( '<acronym title="Hypertext Transfer Protocol">HTTP</acronym> Public Key Pinning (<acronym title="HTTP Public Key Pinning">HPKP</acronym>) is a security feature for <acronym title="Hypertext Transfer Protocol">HTTP</acronym>S websites that can prevent fraudulently issued certificates from being used to impersonate existing secure websites.' ); ?></span>
556
- </th>
557
- </tr>
558
- <tr>
559
- <th>
560
- <label for="browsercache_security_pkp_pin"><?php Util_Ui::e_config_label( 'browsercache.security.pkp.pin' ) ?></label>
561
- </th>
562
- <td>
563
- <input id="browsercache_security_pkp_pin" type="text" name="browsercache__security__pkp__pin"
564
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.pkp.pin' ) ); ?>" size="50" placeholder="Enter the Base64-Encode of the SHA256 Hash" />
565
- <div><i><?php _e( 'This field is <b>required</b> and represents a <acronym title="Subject Public Key Information">SPKI</acronym> fingerprint. This pin is any public key within your current certificate chain.' ); ?></i></div>
566
- </td>
567
- </tr>
568
- <tr>
569
- <th>
570
- <label for="browsercache_security_pkp_pin_backup"><?php Util_Ui::e_config_label( 'browsercache.security.pkp.pin.backup' ) ?></label>
571
- </th>
572
- <td>
573
- <input id="browsercache_security_pkp_pin_backup" type="text" name="browsercache__security__pkp__pin__backup"
574
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.pkp.pin.backup' ) ); ?>" size="50" placeholder="Enter the Base64-Encode of the SHA256 Hash" />
575
- <div><i><?php _e( 'This field is <b>also required</b> and represents your backup <acronym title="Subject Public Key Information">SPKI</acronym> fingerprint. This pin is any public key not in your current certificate chain and serves as a backup in case your certificate expires or has to be revoked.' ); ?></i></div>
576
- </td>
577
- </tr>
578
- <tr>
579
- <th>
580
- <label for="browsercache_security_pkp_extra"><?php Util_Ui::e_config_label( 'browsercache.security.pkp.extra' ) ?></label>
581
- </th>
582
- <td>
583
- <select id="browsercache_security_pkp_extra"
584
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
585
- name="browsercache__security__pkp__extra">
586
- <?php $value = $this->_config->get_string( 'browsercache.security.pkp.extra' ); ?>
587
- <option value="maxage"<?php selected( $value, 'maxage' ); ?>><?php _e( 'max-age=EXPIRES_SECONDS', 'w3-total-cache' ); ?></option>
588
- <option value="maxageinc"<?php selected( $value, 'maxageinc' ); ?>><?php _e( 'max-age=EXPIRES_SECONDS; includeSubDomains', 'w3-total-cache' ); ?></option>
589
- </select>
590
- <div id="browsercache_security_pkp_extra_description"></div>
591
- </td>
592
- </tr>
593
- <tr>
594
- <th>
595
- <label for="browsercache_security_pkp_report_url"><?php Util_Ui::e_config_label( 'browsercache.security.pkp.report.url' ) ?></label>
596
- </th>
597
- <td>
598
- <input id="browsercache_security_pkp_report_url" type="text" name="browsercache__security__pkp__report__url"
599
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.pkp.report.url' ) ); ?>" size="50" placeholder="Enter URL" />
600
- <div><i><?php _e( 'This optional field can be used to specify a <acronym title="Uniform Resource Locator">URL</acronym> that clients will send reports to if pin validation failures occur. The report is sent as a POST request with a JSON body.' ); ?></i></div>
601
- </td>
602
- </tr>
603
- <tr>
604
- <th>
605
- <label for="browsercache_security_pkp_report_only"><?php Util_Ui::e_config_label( 'browsercache.security.pkp.report.only' ) ?></label>
606
- </th>
607
- <td>
608
- <select id="browsercache_security_pkp_report_only"
609
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
610
- name="browsercache__security__pkp__report__only">
611
- <?php $value = $this->_config->get_string( 'browsercache.security.pkp.report.only' ); ?>
612
- <option value="0"<?php selected( $value, '0' ); ?>><?php _e( 'No = Enforce HPKP', 'w3-total-cache' ); ?></option>
613
- <option value="1"<?php selected( $value, '1' ); ?>><?php _e( 'Yes = Don\'t Enforce HPKP', 'w3-total-cache' ); ?></option>
614
- </select>
615
- <div id="browsercache_security_pkp_report_only_description"></div>
616
- </td>
617
- </tr>
618
- <tr>
619
- <th colspan="2">
620
- <?php $this->checkbox( 'browsercache.security.referrer.policy' ) ?> <?php Util_Ui::e_config_label( 'browsercache.security.referrer.policy' ) ?></label>
621
- <br /><span class="description"><?php _e( 'This header restricts the values of the referer header in outbound links.' ); ?></span>
622
- </th>
623
- </tr>
624
- <tr>
625
- <th>
626
- <label for="browsercache_security_referrer_policy_directive"><?php Util_Ui::e_config_label( 'browsercache.security.referrer.policy.directive' ) ?></label>
627
- </th>
628
- <td>
629
- <select id="browsercache_security_referrer_policy_directive"
630
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
631
- name="browsercache__security__referrer__policy__directive">
632
- <?php $value = $this->_config->get_string( 'browsercache.security.referrer.policy.directive' ); ?>
633
- <option value="0"<?php selected( $value, '0' ); ?>><?php _e( 'Not Set', 'w3-total-cache' ); ?></option>
634
- <option value="no-referrer"<?php selected( $value, 'no-referrer' ); ?>><?php _e( 'no-referrer', 'w3-total-cache' ); ?></option>
635
- <option value="no-referrer-when-downgrade"<?php selected( $value, 'no-referrer-when-downgrade' ); ?>><?php _e( 'no-referrer-when-downgrade', 'w3-total-cache' ); ?></option>
636
- <option value="same-origin"<?php selected( $value, 'same-origin' ); ?>><?php _e( 'same-origin', 'w3-total-cache' ); ?></option>
637
- <option value="origin"<?php selected( $value, 'origin' ); ?>><?php _e( 'origin', 'w3-total-cache' ); ?></option>
638
- <option value="strict-origin"<?php selected( $value, 'strict-origin' ); ?>><?php _e( 'strict-origin', 'w3-total-cache' ); ?></option>
639
- <option value="origin-when-cross-origin"<?php selected( $value, 'origin-when-cross-origin' ); ?>><?php _e( 'origin-when-cross-origin', 'w3-total-cache' ); ?></option>
640
- <option value="strict-origin-when-cross-origin"<?php selected( $value, 'strict-origin-when-cross-origin' ); ?>><?php _e( 'strict-origin-when-cross-origin', 'w3-total-cache' ); ?></option>
641
- <option value="unsafe-url"<?php selected( $value, 'unsafe-url' ); ?>><?php _e( 'unsafe-url', 'w3-total-cache' ); ?></option>
642
- </select>
643
- <div id="browsercache_security_referrer_policy_directive_description"></div>
644
- </td>
645
- </tr>
646
- <tr>
647
- <th colspan="2">
648
- <?php $this->checkbox( 'browsercache.security.csp' ) ?> <?php Util_Ui::e_config_label( 'browsercache.security.csp' ) ?></label>
649
- <br /><span class="description"><?php _e( 'The Content Security Policy (<acronym title="Content Security Policy">CSP</acronym>) header reduces the risk of <acronym title="Cross-Site Scripting">XSS</acronym> attacks by allowing you to define where resources can be retrieved from, preventing browsers from loading data from any other locations. This makes it harder for an attacker to inject malicious code into your site.' ); ?></span>
650
- </th>
651
- </tr>
652
- <tr>
653
- <th>
654
- <label for="browsercache_security_csp_base"><?php Util_Ui::e_config_label( 'browsercache.security.csp.base' ) ?></label>
655
- </th>
656
- <td>
657
- <input id="browsercache_security_csp_base" type="text" name="browsercache__security__csp__base"
658
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.base' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
659
- <div><i><?php _e( 'Restricts the <acronym title="Uniform Resource Locator">URL</acronym>s which can be used in a document\'s &lt;base&gt; element.' ); ?></i></div>
660
- </td>
661
- </tr>
662
- <tr>
663
- <th>
664
- <label for="browsercache_security_csp_connect"><?php Util_Ui::e_config_label( 'browsercache.security.csp.connect' ) ?></label>
665
- </th>
666
- <td>
667
- <input id="browsercache_security_csp_connect" type="text" name="browsercache__security__csp__connect"
668
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.connect' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
669
- <div><i><?php _e( 'Limits the origins to which you can connect via XMLHttpRequest, WebSockets, and EventSource.' ); ?></i></div>
670
- </td>
671
- </tr>
672
- <tr>
673
- <th>
674
- <label for="browsercache_security_csp_font"><?php Util_Ui::e_config_label( 'browsercache.security.csp.font' ) ?></label>
675
- </th>
676
- <td>
677
- <input id="browsercache_security_csp_font" type="text" name="browsercache__security__csp__font"
678
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.font' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
679
- <div><i><?php _e( 'Specifies the origins that can serve web fonts.' ); ?></i></div>
680
- </td>
681
- </tr>
682
- <tr>
683
- <th>
684
- <label for="browsercache_security_csp_frame"><?php Util_Ui::e_config_label( 'browsercache.security.csp.frame' ) ?></label>
685
- </th>
686
- <td>
687
- <input id="browsercache_security_csp_frame" type="text" name="browsercache__security__csp__frame"
688
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.frame' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
689
- <div><i><?php _e( 'Restricts from where the protected resource can embed frames.' ); ?></i></div>
690
- </td>
691
- </tr>
692
- <tr>
693
- <th>
694
- <label for="browsercache_security_csp_img"><?php Util_Ui::e_config_label( 'browsercache.security.csp.img' ) ?></label>
695
- </th>
696
- <td>
697
- <input id="browsercache_security_csp_img" type="text" name="browsercache__security__csp__img"
698
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.img' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
699
- <div><i><?php _e( 'Specifies valid sources for images and favicons.' ); ?></i></div>
700
- </td>
701
- </tr>
702
- <tr>
703
- <th>
704
- <label for="browsercache_security_csp_media"><?php Util_Ui::e_config_label( 'browsercache.security.csp.media' ) ?></label>
705
- </th>
706
- <td>
707
- <input id="browsercache_security_csp_media" type="text" name="browsercache__security__csp__media"
708
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.media' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
709
- <div><i><?php _e( 'Specifies valid sources for loading media using the &lt;audio&gt; and &lt;video&gt; elements.' ); ?></i></div>
710
- </td>
711
- </tr>
712
- <tr>
713
- <th>
714
- <label for="browsercache_security_csp_object"><?php Util_Ui::e_config_label( 'browsercache.security.csp.object' ) ?></label>
715
- </th>
716
- <td>
717
- <input id="browsercache_security_csp_object" type="text" name="browsercache__security__csp__object"
718
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.object' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
719
- <div><i><?php _e( 'Allows control over the &lt;object&gt;, &lt;embed&gt;, and &lt;applet&gt; elements used by Flash and other plugins.' ); ?></i></div>
720
- </td>
721
- </tr>
722
- <tr>
723
- <th>
724
- <label for="browsercache_security_csp_script"><?php Util_Ui::e_config_label( 'browsercache.security.csp.script' ) ?></label>
725
- </th>
726
- <td>
727
- <input id="browsercache_security_csp_script" type="text" name="browsercache__security__csp__script"
728
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.script' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
729
- <div><i><?php _e( 'Specifies valid sources for JavaScript.' ); ?></i></div>
730
- </td>
731
- </tr>
732
- <tr>
733
- <th>
734
- <label for="browsercache_security_csp_style"><?php Util_Ui::e_config_label( 'browsercache.security.csp.style' ) ?></label>
735
- </th>
736
- <td>
737
- <input id="browsercache_security_csp_style" type="text" name="browsercache__security__csp__style"
738
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.style' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
739
- <div><i><?php _e( 'Specifies valid sources for <acronym title="Cascading Style Sheet">CSS</acronym> stylesheets.' ); ?></i></div>
740
- </td>
741
- </tr>
742
- <tr>
743
- <th>
744
- <label for="browsercache_security_csp_form"><?php Util_Ui::e_config_label( 'browsercache.security.csp.form' ) ?></label>
745
- </th>
746
- <td>
747
- <input id="browsercache_security_csp_form" type="text" name="browsercache__security__csp__form"
748
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.form' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
749
- <div><i><?php _e( 'Restricts the <acronym title="Uniform Resource Locator">URL</acronym>s which can be used as the target of form submissions from a given context.' ); ?></i></div>
750
- </td>
751
- </tr>
752
- <tr>
753
- <th>
754
- <label for="browsercache_security_csp_frame_ancestors"><?php Util_Ui::e_config_label( 'browsercache.security.csp.frame.ancestors' ) ?></label>
755
- </th>
756
- <td>
757
- <input id="browsercache_security_csp_frame_ancestors" type="text" name="browsercache__security__csp__frame__ancestors"
758
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.frame.ancestors' ) ); ?>" size="50" placeholder="Example: 'none'" />
759
- <div><i><?php _e( 'Specifies valid parents that may embed a page using &lt;frame&gt;, &lt;iframe&gt;, &lt;object&gt;, &lt;embed&gt;, or &lt;applet&gt;.' ); ?></i></div>
760
- </td>
761
- </tr>
762
- <tr>
763
- <th>
764
- <label for="browsercache_security_csp_plugin"><?php Util_Ui::e_config_label( 'browsercache.security.csp.plugin' ) ?></label>
765
- </th>
766
- <td>
767
- <input id="browsercache_security_csp_plugin" type="text" name="browsercache__security__csp__plugin"
768
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.plugin' ) ); ?>" size="50" placeholder="Example: application/x-shockwave-flash" />
769
- <div><i><?php _e( 'Restricts the set of plugins that can be embedded into a document by limiting the types of resources which can be loaded.' ); ?></i></div>
770
- </td>
771
- </tr>
772
- <tr>
773
- <th>
774
- <label for="browsercache_security_csp_sandbox"><?php Util_Ui::e_config_label( 'browsercache.security.csp.sandbox' ) ?></label>
775
- </th>
776
- <td>
777
- <input id="browsercache_security_csp_sandbox" type="text" name="browsercache__security__csp__sandbox"
778
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.sandbox' ) ); ?>" size="50" placeholder="Example: allow-popups" />
779
- <div><i><?php _e( 'This directive operates similarly to the &lt;iframe&gt; sandbox attribute by applying restrictions to a page\'s actions, including preventing popups, preventing the execution of plugins and scripts, and enforcing a same-origin policy.' ); ?></i></div>
780
- </td>
781
- </tr>
782
- <tr>
783
- <th>
784
- <label for="browsercache_security_csp_default"><?php Util_Ui::e_config_label( 'browsercache.security.csp.default' ) ?></label>
785
- </th>
786
- <td>
787
- <input id="browsercache_security_csp_default" type="text" name="browsercache__security__csp__default"
788
- <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'browsercache.security.csp.default' ) ); ?>" size="50" placeholder="Example: 'self' 'unsafe-inline' *.domain.com" />
789
- <div><i><?php _e( 'Defines the defaults for directives you leave unspecified. Generally, this applies to any directive that ends with -src.' ); ?></i></div>
790
- </td>
791
- </tr>
792
- </table>
793
 
794
- <?php Util_Ui::button_config_save( 'browsercache_security' ); ?>
795
- <?php Util_Ui::postbox_footer(); ?>
796
- </div>
797
  </form>
798
 
799
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
14
  <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
15
 
16
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
17
+ <p>
18
+ <?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>' ) ?>
19
+ </p>
20
+ <p>
21
+ <?php echo Util_Ui::nonce_field( 'w3tc' ) ?>
22
 
23
+ <?php
24
+ echo sprintf( __( '%sUpdate media query string%s to make existing file modifications visible to visitors with a primed cache', 'w3-total-cache' ),
25
+ '<input type="submit" name="w3tc_flush_browser_cache" value="',
26
+ '" ' . disabled( !( $browsercache_enabled && $browsercache_update_media_qs ), true, false ) . ' class="button" />' );
27
+ ?>
28
+ </p>
29
  </form>
30
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
31
+ <div class="metabox-holder">
32
+ <?php Util_Ui::postbox_header( __( 'General', 'w3-total-cache' ), '', 'general' ) ?>
33
+ <p><?php _e( 'Specify global browser cache policy.', 'w3-total-cache' ) ?></p>
34
+ <table class="form-table">
35
+ <tr>
36
+ <th colspan="2">
37
+ <label>
38
+ <input id="browsercache_last_modified" type="checkbox" name="expires"
39
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
40
+ value="1"<?php checked( $browsercache_last_modified, true ) ?> /> <?php _e( 'Set Last-Modified header', 'w3-total-cache' ) ?></label>
41
+ <p class="description"><?php _e( 'Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache' ) ?></p>
42
+ </th>
43
+ </tr>
44
+ <tr>
45
+ <th colspan="2">
46
+ <label>
47
+ <input id="browsercache_expires" type="checkbox" name="expires"
48
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
49
+ value="1"<?php checked( $browsercache_expires, true ) ?> /> <?php _e( 'Set expires header', 'w3-total-cache' ) ?></label>
50
+ <p class="description"><?php _e( 'Set the expires header to encourage browser caching of files.', 'w3-total-cache' ) ?></p>
51
+ </th>
52
+ </tr>
53
+ <tr>
54
+ <th colspan="2">
55
+ <label><input id="browsercache_cache_control" type="checkbox"
56
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> name="cache_control" value="1"<?php checked( $browsercache_cache_control, true ) ?> /> <?php _e( 'Set cache control header', 'w3-total-cache' ) ?></label>
57
+ <p class="description"><?php _e( 'Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache' ) ?></p>
58
+ </th>
59
+ </tr>
60
+ <tr>
61
+ <th colspan="2">
62
+ <label><input id="browsercache_etag" type="checkbox"
63
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
64
+ name="etag" value="1"<?php checked( $browsercache_etag, true ) ?> /> <?php _e( 'Set entity tag (ETag)', 'w3-total-cache' ) ?></label>
65
+ <p class="description"><?php _e( 'Set the ETag header to encourage browser caching of files.', 'w3-total-cache' ) ?></p>
66
+ </th>
67
+ </tr>
68
+ <tr>
69
+ <th colspan="2">
70
+ <label><input id="browsercache_w3tc" type="checkbox" name="w3tc"
71
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?> value="1" <?php checked( $browsercache_w3tc, true ) ?> /> <?php _e( 'Set W3 Total Cache header', 'w3-total-cache' ) ?></label>
72
+ <p class="description"><?php _e( 'Set this header to assist in identifying optimized files.', 'w3-total-cache' ) ?></p>
73
+ </th>
74
+ </tr>
75
+ <tr>
76
+ <th colspan="2">
77
+ <label><input id="browsercache_compression" type="checkbox"
78
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
79
+ 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>
80
+ <p class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ) ?></p>
81
+ </th>
82
+ </tr>
83
+ <tr>
84
+ <th colspan="2">
85
+ <label><input id="browsercache_brotli" type="checkbox"
86
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
87
+ <?php if ( !function_exists( 'brotli_compress' ) ) echo 'disabled="disabled"' ?>
88
+ name="compression"<?php checked( $browsercache_brotli, true ) ?> value="1" /> <?php _e( 'Enable <acronym title="Hypertext Transfer Protocol">HTTP</acronym> (brotli) compression', 'w3-total-cache' ) ?></label>
89
+ <p class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ) ?></p>
90
+ </th>
91
+ </tr>
92
+ <tr>
93
+ <th colspan="2">
94
+ <label><input id="browsercache_replace" type="checkbox"
95
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
96
+ name="replace" value="1"<?php checked( $browsercache_replace, true ) ?> /> <?php _e( 'Prevent caching of objects after settings change', 'w3-total-cache' ) ?></label>
97
+ <p 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' ) ?></p>
98
+ </th>
99
+ </tr>
100
+ <tr>
101
+ <th colspan="2">
102
+ <label><input id="browsercache_querystring" type="checkbox"
103
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
104
+ name="querystring" value="1"<?php checked( $browsercache_querystring, true ) ?> /> <?php _e( 'Remove query strings from static resources', 'w3-total-cache' ) ?></label>
105
+ <p class="description"><?php _e( 'Resources with a "?" in the <acronym title="Uniform Resource Locator">URL</acronym> are not cached by some proxy caching servers.', 'w3-total-cache' ) ?></p>
106
+ </th>
107
+ </tr>
108
+ <tr>
109
+ <th><label for="browsercache_replace_exceptions"><?php Util_Ui::e_config_label( 'browsercache.replace.exceptions' ) ?></label></th>
110
+ <td>
111
+ <textarea id="browsercache_replace_exceptions"
112
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
113
+ name="browsercache__replace__exceptions" cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'browsercache.replace.exceptions' ) ) ) ?></textarea>
114
+ <p class="description"><?php _e( 'Do not add the prevent caching query string to the specified <acronym title="Uniform Resource Identifier">URI</acronym>s. Supports regular expressions.', 'w3-total-cache' ) ?></p>
115
+ </td>
116
+ </tr>
117
+ <tr>
118
+ <th colspan="2">
119
+ <label><input id="browsercache_nocookies" type="checkbox"
120
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
121
+ name="nocookies" value="1"<?php checked( $browsercache_nocookies, true ) ?> /> <?php _e( "Don't set cookies for static files", 'w3-total-cache' ) ?></label>
122
+ <p class="description"><?php _e( 'Removes Set-Cookie header for responses.' ) ?></p>
123
+ </th>
124
+ </tr>
125
+ <tr>
126
+ <th colspan="2">
127
+ <?php $this->checkbox( 'browsercache.no404wp', !Util_Rule::can_check_rules() ) ?> <?php Util_Ui::e_config_label( 'browsercache.no404wp' ) ?></label>
128
+ <p 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' ) ?></p>
129
+ <p class="description"><?php _e( 'If enabled - you may get 404 File Not Found response for some files generated on-the-fly by WordPress plugins. You may add those file <acronym title="Uniform Resource Identifier">URI</acronym>s to 404 error exception list below to avoid that.', 'w3-total-cache' ) ?></p>
130
+ </th>
131
+ </tr>
132
+ <tr>
133
+ <th><label for="browsercache_no404wp_exceptions"><?php Util_Ui::e_config_label( 'browsercache.no404wp.exceptions' ) ?></label></th>
134
+ <td>
135
+ <textarea id="browsercache_no404wp_exceptions"
136
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
137
+ name="browsercache__no404wp__exceptions" cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'browsercache.no404wp.exceptions' ) ) ) ?></textarea>
138
+ <p class="description"><?php _e( 'Never process 404 (not found) events for the specified <acronym title="Uniform Resource Identifier">URI</acronym>s.', 'w3-total-cache' ) ?></p>
139
+ </td>
140
+ </tr>
141
+ <?php
142
+ Util_Ui::config_item( array(
143
+ 'key' => 'browsercache.rewrite',
144
+ 'disabled' => Util_Ui::sealing_disabled( 'browsercache.' ),
145
+ 'control' => 'checkbox',
146
+ 'checkbox_label' => __( 'Rewrite <acronym title="Universal Resource Locator">URL</acronym> structure of objects', 'w3-total-cache' ),
147
+ 'description' => __( 'Generate unique <acronym title="Universal Resource Indicator">URI</acronym> for each file protected from caching by browser.', 'w3-total-cache' ),
148
+ 'label_class' => 'w3tc_single_column'
149
+ ) );
150
+ ?>
151
+ </table>
 
 
 
 
 
 
152
 
153
+ <?php Util_Ui::button_config_save( 'browsercache_general' ) ?>
154
+ <?php Util_Ui::postbox_footer() ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
 
156
+ <?php Util_Ui::postbox_header( __( '<acronym title="Cascading Style Sheet">CSS</acronym> &amp; <acronym title="JavaScript">JS</acronym>', 'w3-total-cache' ), '', 'css_js' ) ?>
157
+ <p><?php _e( 'Specify browser cache policy for Cascading Style Sheets and JavaScript files.', 'w3-total-cache' ) ?></p>
158
 
159
+ <table class="form-table">
160
+ <tr>
161
+ <th colspan="2">
162
+ <?php $this->checkbox( 'browsercache.cssjs.last_modified' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.last_modified' ) ?></label>
163
+ <p class="description"><?php _e( 'Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache' ) ?></p>
164
+ </th>
165
+ </tr>
166
+ <tr>
167
+ <th colspan="2">
168
+ <?php $this->checkbox( 'browsercache.cssjs.expires' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.expires' ) ?></label>
169
+ <p class="description"><?php _e( 'Set the expires header to encourage browser caching of files.', 'w3-total-cache' ) ?></p>
170
+ </th>
171
+ </tr>
172
+ <tr>
173
+ <th>
174
+ <label for="browsercache_cssjs_lifetime"><?php Util_Ui::e_config_label( 'browsercache.cssjs.lifetime' ) ?></label>
175
+ </th>
176
+ <td>
177
+ <input id="browsercache_cssjs_lifetime" type="text"
178
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
179
+ name="browsercache__cssjs__lifetime" value="<?php echo esc_attr( $this->_config->get_integer( 'browsercache.cssjs.lifetime' ) ) ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ) ?>
180
+ </td>
181
+ </tr>
182
+ <tr>
183
+ <th colspan="2">
184
+ <?php $this->checkbox( 'browsercache.cssjs.cache.control' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.cache.control' ) ?></label>
185
+ <p class="description"><?php _e( 'Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache' ) ?></p>
186
+ </th>
187
+ </tr>
188
+ <tr>
189
+ <th>
190
+ <label for="browsercache_cssjs_cache_policy"><?php Util_Ui::e_config_label( 'browsercache.cssjs.cache.policy' ) ?></label>
191
+ </th>
192
+ <td>
193
+ <select id="browsercache_cssjs_cache_policy"
194
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
195
+ name="browsercache__cssjs__cache__policy">
196
+ <?php
197
+ $value = $this->_config->get_string( 'browsercache.cssjs.cache.policy' );
198
+ $cssjs_expires = $this->_config->get_boolean( 'browsercache.cssjs.expires' );
199
+ ?>
200
+ <option value="cache"<?php selected( $value, 'cache' ) ?>>cache ("public")</option>
201
+ <option value="cache_public_maxage"<?php selected( $value, 'cache_public_maxage' ); disabled( $is_nginx && $cssjs_expires ) ?>><?php _e( 'cache with max-age ("public, max-age=EXPIRES_SECONDS")', 'w3-total-cache' ) ?></option>
202
+ <option value="cache_validation"<?php selected( $value, 'cache_validation' ) ?>><?php _e( 'cache with validation ("public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ) ?></option>
203
+ <option value="cache_maxage"<?php selected( $value, 'cache_maxage' ); disabled( $is_nginx && $cssjs_expires ) ?>><?php _e( 'cache with max-age and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ) ?></option>
204
+ <option value="cache_noproxy"<?php selected( $value, 'cache_noproxy' ) ?>><?php _e( 'cache without proxy ("private, must-revalidate")', 'w3-total-cache' ) ?></option>
205
+ <option value="no_cache"<?php selected( $value, 'no_cache' ) ?>><?php _e( 'don\'t cache ("max-age=0, private, no-store, no-cache, must-revalidate")', 'w3-total-cache' ) ?></option>
206
+ </select>
207
+ <?php if ( $is_nginx && $cssjs_expires ) : ?>
208
+ <p class="description"><?php _e( 'The Expires header already sets the max-age.', 'w3-total-cache' ) ?></p>
209
+ <?php endif; ?>
210
+ </td>
211
+ </tr>
212
+ <tr>
213
+ <th colspan="2">
214
+ <?php $this->checkbox( 'browsercache.cssjs.etag' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.etag' ) ?></label>
215
+ <p class="description"><?php _e( 'Set the ETag header to encourage browser caching of files.', 'w3-total-cache' ) ?></p>
216
+ </th>
217
+ </tr>
218
+ <tr>
219
+ <th colspan="2">
220
+ <?php $this->checkbox( 'browsercache.cssjs.w3tc' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.w3tc' ) ?></label>
221
+ <p class="description"><?php _e( 'Set this header to assist in identifying optimized files.', 'w3-total-cache' ) ?></p>
222
+ </th>
223
+ </tr>
224
+ <tr>
225
+ <th colspan="2">
226
+ <?php $this->checkbox( 'browsercache.cssjs.compression' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.compression' ) ?> </label>
227
+ <p class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ) ?></p>
228
+ </th>
229
+ </tr>
230
+ <tr>
231
+ <th colspan="2">
232
+ <?php $this->checkbox( 'browsercache.cssjs.brotli', !function_exists( 'brotli_compress' ) ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.brotli' ) ?> </label>
233
+ <p class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ) ?></p>
234
+ </th>
235
+ </tr>
236
+ <tr>
237
+ <th colspan="2">
238
+ <?php $this->checkbox( 'browsercache.cssjs.replace' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.replace' ) ?></label>
239
+ <p 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' ) ?></p>
240
+ </th>
241
+ </tr>
242
+ <tr>
243
+ <th colspan="2">
244
+ <?php $this->checkbox( 'browsercache.cssjs.querystring' ) ?> <?php _e( 'Remove query strings from static resources', 'w3-total-cache' ) ?></label>
245
+ <p class="description"><?php _e( 'Resources with a "?" in the <acronym title="Uniform Resource Locator">URL</acronym> are not cached by some proxy caching servers.', 'w3-total-cache' ) ?></p>
246
+ </th>
247
+ </tr>
248
+ <tr>
249
+ <th colspan="2">
250
+ <?php $this->checkbox( 'browsercache.cssjs.nocookies' ) ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.nocookies' ) ?></label>
251
+ <p class="description"><?php _e( 'Removes Set-Cookie header for responses.', 'w3-total-cache' ) ?></p>
252
+ </th>
253
+ </tr>
254
+ </table>
255
 
256
+ <?php Util_Ui::button_config_save( 'browsercache_css_js' ) ?>
257
+ <?php Util_Ui::postbox_footer() ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
258
 
259
+ <?php Util_Ui::postbox_header( __( '<acronym title="Hypertext Markup Language">HTML</acronym> &amp; <acronym title="Extensible Markup Language">XML</acronym>', 'w3-total-cache' ), '', 'html_xml' ) ?>
260
+ <p><?php _e( 'Specify browser cache policy for posts, pages, feeds and text-based files.', 'w3-total-cache' ) ?></p>
261
 
262
+ <table class="form-table">
263
+ <tr>
264
+ <th colspan="2">
265
+ <?php $this->checkbox( 'browsercache.html.last_modified' ) ?> <?php Util_Ui::e_config_label( 'browsercache.html.last_modified' ) ?></label>
266
+ <p class="description"><?php _e( 'Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache' ) ?></p>
267
+ </th>
268
+ </tr>
269
+ <tr>
270
+ <th colspan="2">
271
+ <?php $this->checkbox( 'browsercache.html.expires' ) ?> <?php Util_Ui::e_config_label( 'browsercache.html.expires' ) ?></label>
272
+ <p class="description"><?php _e( 'Set the expires header to encourage browser caching of files.', 'w3-total-cache' ) ?></p>
273
+ </th>
274
+ </tr>
275
+ <tr>
276
+ <th style="width: 250px;">
277
+ <label for="browsercache_html_lifetime"><?php Util_Ui::e_config_label( 'browsercache.html.lifetime' ) ?></label>
278
+ </th>
279
+ <td>
280
+ <input id="browsercache_html_lifetime" type="text"
281
+ name="browsercache__html__lifetime"
282
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
283
+ value="<?php echo esc_attr( $this->_config->get_integer( 'browsercache.html.lifetime' ) ) ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ) ?>
284
+ </td>
285
+ </tr>
286
+ <tr>
287
+ <th colspan="2">
288
+ <?php $this->checkbox( 'browsercache.html.cache.control' ) ?> <?php Util_Ui::e_config_label( 'browsercache.html.cache.control' ) ?></label>
289
+ <p class="description"><?php _e( 'Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache' ) ?></p>
290
+ </th>
291
+ </tr>
292
+ <tr>
293
+ <th>
294
+ <label for="browsercache_html_cache_policy"><?php Util_Ui::e_config_label( 'browsercache.html.cache.policy' ) ?></label>
295
+ </th>
296
+ <td>
297
+ <select id="browsercache_html_cache_policy" name="browsercache__html__cache__policy"
298
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>>
299
+ <?php
300
+ $value = $this->_config->get_string( 'browsercache.html.cache.policy' );
301
+ $html_expires = $this->_config->get_boolean( 'browsercache.html.expires' );
302
+ ?>
303
+ <option value="cache"<?php selected( $value, 'cache' ) ?>>cache ("public")</option>
304
+ <option value="cache_public_maxage"<?php selected( $value, 'cache_public_maxage' ); disabled( $is_nginx && $html_expires ) ?>><?php _e( 'cache with max-age ("public, max-age=EXPIRES_SECONDS")', 'w3-total-cache' ) ?></option>
305
+ <option value="cache_validation"<?php selected( $value, 'cache_validation' ) ?>><?php _e( 'cache with validation ("public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ) ?></option>
306
+ <option value="cache_maxage"<?php selected( $value, 'cache_maxage' ); disabled( $is_nginx && $html_expires ) ?>><?php _e( 'cache with max-age and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ) ?></option>
307
+ <option value="cache_noproxy"<?php selected( $value, 'cache_noproxy' ) ?>><?php _e( 'cache without proxy ("private, must-revalidate")', 'w3-total-cache' ) ?></option>
308
+ <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>
309
+ </select>
310
+ <?php if ( $is_nginx && $html_expires ) : ?>
311
+ <p class="description"><?php _e( 'The Expires header already sets the max-age.', 'w3-total-cache' ) ?></p>
312
+ <?php endif; ?>
313
+ </td>
314
+ </tr>
315
+ <tr>
316
+ <th colspan="2">
317
+ <?php $this->checkbox( 'browsercache.html.etag' ) ?> <?php Util_Ui::e_config_label( 'browsercache.html.etag' ) ?></label>
318
+ <p class="description"><?php _e( 'Set the ETag header to encourage browser caching of files.', 'w3-total-cache' ) ?></p>
319
+ </th>
320
+ </tr>
321
+ <tr>
322
+ <th colspan="2">
323
+ <?php $this->checkbox( 'browsercache.html.w3tc' ) ?> <?php Util_Ui::e_config_label( 'browsercache.html.w3tc' ) ?></label>
324
+ <p class="description"><?php _e( 'Set this header to assist in identifying optimized files.', 'w3-total-cache' ) ?></p>
325
+ </th>
326
+ </tr>
327
+ <tr>
328
+ <th colspan="2">
329
+ <?php $this->checkbox( 'browsercache.html.compression' ) ?> <?php Util_Ui::e_config_label( 'browsercache.html.compression' ) ?></label>
330
+ <p class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ) ?></p>
331
+ </th>
332
+ </tr>
333
+ <tr>
334
+ <th colspan="2">
335
+ <?php $this->checkbox( 'browsercache.html.brotli', !function_exists( 'brotli_compress' ) ) ?> <?php Util_Ui::e_config_label( 'browsercache.html.brotli' ) ?></label>
336
+ <p class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ) ?></p>
337
+ </th>
338
+ </tr>
339
+ </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
340
 
341
+ <?php Util_Ui::button_config_save( 'browsercache_html_xml' ) ?>
342
+ <?php Util_Ui::postbox_footer() ?>
343
 
344
+ <?php Util_Ui::postbox_header( __( 'Media &amp; Other Files', 'w3-total-cache' ), '', 'media' ) ?>
345
+ <table class="form-table">
346
+ <tr>
347
+ <th colspan="2">
348
+ <?php $this->checkbox( 'browsercache.other.last_modified' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.last_modified' ) ?></label>
349
+ <p class="description"><?php _e( 'Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache' ) ?></p>
350
+ </th>
351
+ </tr>
352
+ <tr>
353
+ <th colspan="2">
354
+ <?php $this->checkbox( 'browsercache.other.expires' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.expires' ) ?></label>
355
+ <p class="description"><?php _e( 'Set the expires header to encourage browser caching of files.', 'w3-total-cache' ) ?></p>
356
+ </th>
357
+ </tr>
358
+ <tr>
359
+ <th style="width: 250px;">
360
+ <label for="browsercache_other_lifetime"><?php Util_Ui::e_config_label( 'browsercache.other.lifetime' ) ?></label>
361
+ </th>
362
+ <td>
363
+ <input id="browsercache_other_lifetime" type="text"
364
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
365
+ name="browsercache__other__lifetime" value="<?php echo esc_attr( $this->_config->get_integer( 'browsercache.other.lifetime' ) ) ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ) ?>
366
+ </td>
367
+ </tr>
368
+ <tr>
369
+ <th colspan="2">
370
+ <?php $this->checkbox( 'browsercache.other.cache.control' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.cache.control' ) ?></label>
371
+ <p class="description"><?php _e( 'Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache' ) ?></p>
372
+ </th>
373
+ </tr>
374
+ <tr>
375
+ <th>
376
+ <label for="browsercache_other_cache_policy"><?php Util_Ui::e_config_label( 'browsercache.other.cache.policy' ) ?></label>
377
+ </th>
378
+ <td>
379
+ <select id="browsercache_other_cache_policy"
380
+ <?php Util_Ui::sealing_disabled( 'browsercache.' ) ?>
381
+ name="browsercache__other__cache__policy">
382
+ <?php
383
+ $value = $this->_config->get_string( 'browsercache.other.cache.policy' );
384
+ $other_expires = $this->_config->get_string( 'browsercache.other.expires' );
385
+ ?>
386
+ <option value="cache"<?php selected( $value, 'cache' ) ?>><?php _e( 'cache ("public")' ) ?></option>
387
+ <option value="cache_public_maxage"<?php selected( $value, 'cache_public_maxage' ); disabled( $is_nginx && $other_expires ) ?>><?php _e( 'cache with max-age ("public, max-age=EXPIRES_SECONDS")', 'w3-total-cache' ) ?></option>
388
+ <option value="cache_validation"<?php selected( $value, 'cache_validation' ) ?>><?php _e( 'cache with validation ("public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ) ?></option>
389
+ <option value="cache_maxage"<?php selected( $value, 'cache_maxage' ); disabled( $is_nginx && $other_expires ) ?>><?php _e( 'cache with max-age and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ) ?></option>
390
+ <option value="cache_noproxy"<?php selected( $value, 'cache_noproxy' ) ?>><?php _e( 'cache without proxy ("private, must-revalidate")', 'w3-total-cache' ) ?></option>
391
+ <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>
392
+ </select>
393
+ <?php if ( $is_nginx && $other_expires ) : ?>
394
+ <p class="description"><?php _e( 'The Expires header already sets the max-age.', 'w3-total-cache' ) ?></p>
395
+ <?php endif; ?>
396
+ </td>
397
+ </tr>
398
+ <tr>
399
+ <th colspan="2">
400
+ <?php $this->checkbox( 'browsercache.other.etag' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.etag' ) ?></label>
401
+ <p class="description"><?php _e( 'Set the ETag header to encourage browser caching of files.', 'w3-total-cache' ) ?></p>
402
+ </th>
403
+ </tr>
404
+ <tr>
405
+ <th colspan="2">
406
+ <?php $this->checkbox( 'browsercache.other.w3tc' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.w3tc' ) ?></label>
407
+ <p class="description"><?php _e( 'Set this header to assist in identifying optimized files.', 'w3-total-cache' ) ?></p>
408
+ </th>
409
+ </tr>
410
+ <tr>
411
+ <th colspan="2">
412
+ <?php $this->checkbox( 'browsercache.other.compression' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.compression' ) ?>
413
+ <p class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ) ?></p>
414
+ </th>
415
+ </tr>
416
+ <tr>
417
+ <th colspan="2">
418
+ <?php $this->checkbox( 'browsercache.other.brotli', !function_exists( 'brotli_compress' ) ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.brotli' ) ?>
419
+ <p class="description"><?php _e( 'Reduce the download time for text-based files.', 'w3-total-cache' ) ?></p>
420
+ </th>
421
+ </tr>
422
+ <tr>
423
+ <th colspan="2">
424
+ <?php $this->checkbox( 'browsercache.other.replace' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.replace' ) ?></label>
425
+ <p 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' ) ?></p>
426
+ </th>
427
+ </tr>
428
+ <tr>
429
+ <th colspan="2">
430
+ <?php $this->checkbox( 'browsercache.other.querystring' ) ?> <?php _e( 'Remove query strings from static resources', 'w3-total-cache' ) ?></label>
431
+ <p class="description"><?php _e( 'Resources with a "?" in the <acronym title="Uniform Resource Locator">URL</acronym> are not cached by some proxy caching servers.', 'w3-total-cache' ) ?></p>
432
+ </th>
433
+ </tr>
434
+ <tr>
435
+ <th colspan="2">
436
+ <?php $this->checkbox( 'browsercache.other.nocookies' ) ?> <?php Util_Ui::e_config_label( 'browsercache.other.nocookies' ) ?></label>
437
+ <p class="description"><?php _e( 'Removes Set-Cookie header for responses.', 'w3-total-cache' ) ?></p>
438
+ </th>
439
+ </tr>
440
+ </table>
441
 
442
+ <?php Util_Ui::button_config_save( 'browsercache_media' ) ?>
443
+ <?php Util_Ui::postbox_footer() ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
444
 
445
+ <?php require( W3TC_DIR . '/BrowserCache_Page_View_SectionSecurity.php' ) ?>
446
+ </div>
 
447
  </form>
448
 
449
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
inc/options/cdn.php CHANGED
@@ -65,13 +65,13 @@ $upload_blogfiles_enabled = $cdn_mirror || !is_network_admin() ||
65
  $this->checkbox( 'cdn.uploads.enable', !$upload_blogfiles_enabled, '',
66
  true, $force_value );
67
  ?>
68
- <?php Util_Ui::e_config_label( 'cdn.uploads.enable' ) ?></label><br />
69
- <span class="description"><?php
70
  _e( 'If checked, all attachments will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache' );
71
  if ( !$upload_blogfiles_enabled )
72
  _e( '<br />To enable that, switch off "Use single network configuration file for all sites" option at General settings page and use specific settings for each blog.', 'w3-total-cache' );
73
  ?>
74
- </span>
75
  </th>
76
  <?php if ( ! $cdn_mirror ): ?>
77
  <td>
@@ -83,8 +83,8 @@ if ( !$upload_blogfiles_enabled )
83
  </tr>
84
  <tr>
85
  <th<?php if ( $cdn_mirror ): ?> colspan="2"<?php endif; ?>>
86
- <?php $this->checkbox( 'cdn.includes.enable' ) ?> <?php Util_Ui::e_config_label( 'cdn.includes.enable' ) ?></label><br />
87
- <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>
88
  </th>
89
  <?php if ( ! $cdn_mirror ): ?>
90
  <td>
@@ -96,8 +96,8 @@ if ( !$upload_blogfiles_enabled )
96
  </tr>
97
  <tr>
98
  <th<?php if ( $cdn_mirror ): ?> colspan="2"<?php endif; ?>>
99
- <?php $this->checkbox( 'cdn.theme.enable' ) ?> <?php Util_Ui::e_config_label( 'cdn.theme.enable' ) ?></label><br />
100
- <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>
101
  </th>
102
  <?php if ( ! $cdn_mirror ): ?>
103
  <td>
@@ -109,8 +109,8 @@ if ( !$upload_blogfiles_enabled )
109
  </tr>
110
  <tr>
111
  <th<?php if ( $cdn_mirror ): ?> colspan="2"<?php endif; ?>>
112
- <?php $this->checkbox( 'cdn.minify.enable', !$minify_enabled ) ?> <?php Util_Ui::e_config_label( 'cdn.minify.enable' ) ?></label><br />
113
- <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>
114
  </th>
115
  <?php if ( ! $cdn_mirror ): ?>
116
  <td>
@@ -122,11 +122,11 @@ if ( !$upload_blogfiles_enabled )
122
  </tr>
123
  <tr>
124
  <th<?php if ( $cdn_mirror ): ?> colspan="2"<?php endif; ?>>
125
- <?php $this->checkbox( 'cdn.custom.enable' ) ?> <?php Util_Ui::e_config_label( 'cdn.custom.enable' ) ?></label><br />
126
- <span class="description">
127
  <?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>.', 'w3-total-cache' ),
128
- 'https://api.w3-edge.com/v1/redirects/faq/usage/regexp-support' ); ?>
129
- </span>
130
  </th>
131
  <?php if ( ! $cdn_mirror ): ?>
132
  <td>
@@ -139,8 +139,8 @@ if ( !$upload_blogfiles_enabled )
139
  <?php if ( ! $cdn_mirror ): ?>
140
  <tr>
141
  <th colspan="2">
142
- <?php $this->checkbox( 'cdn.force.rewrite' ) ?> <?php Util_Ui::e_config_label( 'cdn.force.rewrite' ) ?></label><br />
143
- <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>
144
  </th>
145
  </tr>
146
  <?php endif; ?>
@@ -148,8 +148,8 @@ if ( !$upload_blogfiles_enabled )
148
  <?php if ( $cdn_supports_header ): ?>
149
  <tr>
150
  <th colspan="2">
151
- <?php $this->checkbox( 'cdn.canonical_header' ) ?> <?php Util_Ui::e_config_label( 'cdn.canonical_header' ) ?></label><br />
152
- <span class="description"><?php _e( 'Adds canonical <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header to assets files.', 'w3-total-cache' ) ?></span>
153
  </th>
154
  </tr>
155
  <?php endif; ?>
@@ -187,34 +187,34 @@ if ( $cdn_engine == 'google_drive' ||
187
  <tr>
188
  <th colspan="2">
189
  <?php $this->checkbox( 'cdn.flush_manually' ) ?>
190
- <?php _e( 'Only purge <acronym title="Content Delivery Network">CDN</acronym> manually', 'w3-total-cache' ) ?></label><br />
191
- <span class="description"><?php _e( 'Purge <acronym title="Content Delivery Network">CDN</acronym> only if explicit purge button is clicked.', 'w3-total-cache' ) ?></span>
192
  </th>
193
  </tr>
194
 
195
  <tr>
196
  <th colspan="2">
197
- <?php $this->checkbox( 'cdn.reject.ssl' ) ?> <?php Util_Ui::e_config_label( 'cdn.reject.ssl' ) ?></label><br />
198
- <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>
199
  </th>
200
  </tr>
201
  <tr>
202
  <th colspan="2">
203
- <?php $this->checkbox( 'cdn.admin.media_library' ) ?> <?php Util_Ui::e_config_label( 'cdn.admin.media_library' ) ?></label><br />
204
- <span class="description">All Media Library content will use <acronym title="Content Delivery Network">CDN</acronym> links on administration pages.</span>
205
  </th>
206
  </tr>
207
  <tr>
208
  <th colspan="2">
209
- <?php $this->checkbox( 'cdn.cors_header' ) ?> Add <acronym title="Access-Control-Allow-Origin">CORS</acronym> header</label><br />
210
- <span class="description">Add <acronym title="Access-Control-Allow-Origin">CORS</acronym> headers to allow cross-domain assets usage.</span>
211
  </th>
212
  </tr>
213
 
214
  <tr>
215
  <th colspan="2">
216
- <?php $this->checkbox( 'cdn.reject.logged_roles' ) ?> <?php Util_Ui::e_config_label( 'cdn.reject.logged_roles' ) ?></label><br />
217
- <span class="description"><?php _e( 'Select user roles that will use the origin server exclusively:', 'w3-total-cache' ) ?></span>
218
 
219
  <div id="cdn_reject_roles" class="w3tc_reject_roles">
220
  <?php $saved_roles = $this->_config->get_array( 'cdn.reject.roles' ); ?>
@@ -232,14 +232,14 @@ if ( $cdn_engine == 'google_drive' ||
232
  <td>
233
  <textarea id="cdn_reject_uri" name="cdn__reject__uri"
234
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?>
235
- cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.reject.uri' ) ) ); ?></textarea><br />
236
- <span class="description"><?php echo sprintf( __( 'Always ignore the specified pages / directories. Supports regular expression (See <a href="%s"><acronym title="Frequently Asked Questions">FAQ</acronym></a>)' ), network_admin_url( 'admin.php?page=w3tc_faq' ) ) ?></span>
237
  </td>
238
  </tr>
239
  <tr>
240
  <th colspan="2">
241
- <?php $this->checkbox( 'minify.upload', $this->_config->get_boolean( 'minify.auto' ) ) ?> <?php _e( 'Automatically upload minify files', 'w3-total-cache' ) ?></label><br />
242
- <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>
243
  </th>
244
  </tr>
245
  <tr>
@@ -256,8 +256,8 @@ if ( $this->_config->get_string( 'cdn.engine' ) == 'google_drive' ) {
256
  $this->checkbox( 'cdn.autoupload.enabled', $disabled, '',
257
  true, $force_value );
258
  ?>
259
- <?php Util_Ui::e_config_label( 'cdn.autoupload.enabled' ) ?></label><br />
260
- <span class="description"><?php _e( 'Automatically attempt to find and upload changed files.', 'w3-total-cache' ) ?></span>
261
  </th>
262
  </tr>
263
  <tr>
@@ -266,8 +266,8 @@ $this->checkbox( 'cdn.autoupload.enabled', $disabled, '',
266
  <input id="cdn_autoupload_interval" type="text"
267
  name="cdn__autoupload__interval"
268
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?>
269
- value="<?php esc_attr_e( $this->_config->get_integer( 'cdn.autoupload.interval' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ) ?><br />
270
- <span class="description"><?php _e( 'Specify the interval between upload of changed files.', 'w3-total-cache' ) ?></span>
271
  </td>
272
  </tr>
273
  <tr>
@@ -275,8 +275,8 @@ $this->checkbox( 'cdn.autoupload.enabled', $disabled, '',
275
  <td>
276
  <input id="cdn_limit_interval" type="text"
277
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?>
278
- 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 />
279
- <span class="description"><?php _e( 'The number of seconds to wait before upload attempt.', 'w3-total-cache' ) ?></span>
280
  </td>
281
  </tr>
282
  <tr>
@@ -284,8 +284,8 @@ $this->checkbox( 'cdn.autoupload.enabled', $disabled, '',
284
  <td>
285
  <input id="cdn_limit_queue" type="text"
286
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?>
287
- name="cdn__queue__limit" value="<?php esc_attr_e( $this->_config->get_integer( 'cdn.queue.limit' ) ); ?>" size="10" /><br />
288
- <span class="description"><?php _e( 'Number of files processed per upload attempt.', 'w3-total-cache' ) ?></span>
289
  </td>
290
  </tr>
291
  <?php endif ?>
@@ -294,8 +294,8 @@ $this->checkbox( 'cdn.autoupload.enabled', $disabled, '',
294
  <td>
295
  <input id="cdn_includes_files" type="text"
296
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?>
297
- name="cdn__includes__files" value="<?php esc_attr_e( $this->_config->get_string( 'cdn.includes.files' ) ); ?>" size="100" /><br />
298
- <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>
299
  </td>
300
  </tr>
301
  <tr>
@@ -303,8 +303,8 @@ $this->checkbox( 'cdn.autoupload.enabled', $disabled, '',
303
  <td>
304
  <input id="cdn_theme_files" type="text" name="cdn__theme__files"
305
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?>
306
- value="<?php esc_attr_e( $this->_config->get_string( 'cdn.theme.files' ) ); ?>" size="100" /><br />
307
- <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>
308
  </td>
309
  </tr>
310
  <tr>
@@ -312,8 +312,8 @@ $this->checkbox( 'cdn.autoupload.enabled', $disabled, '',
312
  <td>
313
  <input id="cdn_import_files" type="text" name="cdn__import__files"
314
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?>
315
- value="<?php esc_attr_e( $this->_config->get_string( 'cdn.import.files' ) ); ?>" size="100" /><br />
316
- <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>
317
  </td>
318
  </tr>
319
  <tr>
@@ -321,29 +321,29 @@ $this->checkbox( 'cdn.autoupload.enabled', $disabled, '',
321
  <td>
322
  <textarea id="cdn_custom_files" name="cdn__custom__files"
323
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> cols="40"
324
- rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.custom.files' ) ) ); ?></textarea><br />
325
- <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' ) ?>
326
  <?php if ( Util_Environment::is_wpmu() ): ?>
327
  <br />
328
  <?php _e( 'To upload files in blogs.dir for current blog write wp-content/&lt;currentblog&gt;/.', 'w3-total-cache' ) ?>
329
  <?php endif ?>
330
- </span>
331
  </td>
332
  </tr>
333
  <tr>
334
  <th><label for="cdn_reject_ua"><?php Util_Ui::e_config_label( 'cdn.reject.ua' ) ?></label></th>
335
  <td>
336
  <textarea id="cdn_reject_ua" name="cdn__reject__ua" cols="40"
337
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.reject.ua' ) ) ); ?></textarea><br />
338
- <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>
339
  </td>
340
  </tr>
341
  <tr>
342
  <th><label for="cdn_reject_files"><?php Util_Ui::e_config_label( 'cdn.reject.files' ) ?></label></th>
343
  <td>
344
  <textarea id="cdn_reject_files" name="cdn__reject__files"
345
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.reject.files' ) ) ); ?></textarea><br />
346
- <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>
347
  </td>
348
  </tr>
349
  <tr>
@@ -352,7 +352,7 @@ $this->checkbox( 'cdn.autoupload.enabled', $disabled, '',
352
  <input type="hidden" name="set_cookie_domain_new" value="0" />
353
  <label><input type="checkbox" name="set_cookie_domain_new"
354
  <?php Util_Ui::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>
355
- <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>
356
  </th>
357
  </tr>
358
  </table>
65
  $this->checkbox( 'cdn.uploads.enable', !$upload_blogfiles_enabled, '',
66
  true, $force_value );
67
  ?>
68
+ <?php Util_Ui::e_config_label( 'cdn.uploads.enable' ) ?></label>
69
+ <p class="description"><?php
70
  _e( 'If checked, all attachments will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache' );
71
  if ( !$upload_blogfiles_enabled )
72
  _e( '<br />To enable that, switch off "Use single network configuration file for all sites" option at General settings page and use specific settings for each blog.', 'w3-total-cache' );
73
  ?>
74
+ </p>
75
  </th>
76
  <?php if ( ! $cdn_mirror ): ?>
77
  <td>
83
  </tr>
84
  <tr>
85
  <th<?php if ( $cdn_mirror ): ?> colspan="2"<?php endif; ?>>
86
+ <?php $this->checkbox( 'cdn.includes.enable' ) ?> <?php Util_Ui::e_config_label( 'cdn.includes.enable' ) ?></label>
87
+ <p 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' ) ?></p>
88
  </th>
89
  <?php if ( ! $cdn_mirror ): ?>
90
  <td>
96
  </tr>
97
  <tr>
98
  <th<?php if ( $cdn_mirror ): ?> colspan="2"<?php endif; ?>>
99
+ <?php $this->checkbox( 'cdn.theme.enable' ) ?> <?php Util_Ui::e_config_label( 'cdn.theme.enable' ) ?></label>
100
+ <p 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' ) ?></p>
101
  </th>
102
  <?php if ( ! $cdn_mirror ): ?>
103
  <td>
109
  </tr>
110
  <tr>
111
  <th<?php if ( $cdn_mirror ): ?> colspan="2"<?php endif; ?>>
112
+ <?php $this->checkbox( 'cdn.minify.enable', !$minify_enabled ) ?> <?php Util_Ui::e_config_label( 'cdn.minify.enable' ) ?></label>
113
+ <p 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' ) ?></p>
114
  </th>
115
  <?php if ( ! $cdn_mirror ): ?>
116
  <td>
122
  </tr>
123
  <tr>
124
  <th<?php if ( $cdn_mirror ): ?> colspan="2"<?php endif; ?>>
125
+ <?php $this->checkbox( 'cdn.custom.enable' ) ?> <?php Util_Ui::e_config_label( 'cdn.custom.enable' ) ?></label>
126
+ <p class="description">
127
  <?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>.', 'w3-total-cache' ),
128
+ 'https://api.w3-edge.com/v1/redirects/faq/usage/regexp-support' ); ?>
129
+ </p>
130
  </th>
131
  <?php if ( ! $cdn_mirror ): ?>
132
  <td>
139
  <?php if ( ! $cdn_mirror ): ?>
140
  <tr>
141
  <th colspan="2">
142
+ <?php $this->checkbox( 'cdn.force.rewrite' ) ?> <?php Util_Ui::e_config_label( 'cdn.force.rewrite' ) ?></label>
143
+ <p class="description"><?php _e( 'If modified files are not always detected and replaced, use this option to over-write them.', 'w3-total-cache' ) ?></p>
144
  </th>
145
  </tr>
146
  <?php endif; ?>
148
  <?php if ( $cdn_supports_header ): ?>
149
  <tr>
150
  <th colspan="2">
151
+ <?php $this->checkbox( 'cdn.canonical_header' ) ?> <?php Util_Ui::e_config_label( 'cdn.canonical_header' ) ?></label>
152
+ <p class="description"><?php _e( 'Adds canonical <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header to assets files.', 'w3-total-cache' ) ?></p>
153
  </th>
154
  </tr>
155
  <?php endif; ?>
187
  <tr>
188
  <th colspan="2">
189
  <?php $this->checkbox( 'cdn.flush_manually' ) ?>
190
+ <?php _e( 'Only purge <acronym title="Content Delivery Network">CDN</acronym> manually', 'w3-total-cache' ) ?></label>
191
+ <p class="description"><?php _e( 'Purge <acronym title="Content Delivery Network">CDN</acronym> only if explicit purge button is clicked.', 'w3-total-cache' ) ?></p>
192
  </th>
193
  </tr>
194
 
195
  <tr>
196
  <th colspan="2">
197
+ <?php $this->checkbox( 'cdn.reject.ssl' ) ?> <?php Util_Ui::e_config_label( 'cdn.reject.ssl' ) ?></label>
198
+ <p 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.</p>
199
  </th>
200
  </tr>
201
  <tr>
202
  <th colspan="2">
203
+ <?php $this->checkbox( 'cdn.admin.media_library' ) ?> <?php Util_Ui::e_config_label( 'cdn.admin.media_library' ) ?></label>
204
+ <p class="description">All Media Library content will use <acronym title="Content Delivery Network">CDN</acronym> links on administration pages.</p>
205
  </th>
206
  </tr>
207
  <tr>
208
  <th colspan="2">
209
+ <?php $this->checkbox( 'cdn.cors_header' ) ?> Add <acronym title="Access-Control-Allow-Origin">CORS</acronym> header</label>
210
+ <p class="description">Add <acronym title="Access-Control-Allow-Origin">CORS</acronym> headers to allow cross-domain assets usage.</p>
211
  </th>
212
  </tr>
213
 
214
  <tr>
215
  <th colspan="2">
216
+ <?php $this->checkbox( 'cdn.reject.logged_roles' ) ?> <?php Util_Ui::e_config_label( 'cdn.reject.logged_roles' ) ?></label>
217
+ <p class="description"><?php _e( 'Select user roles that will use the origin server exclusively:', 'w3-total-cache' ) ?></p>
218
 
219
  <div id="cdn_reject_roles" class="w3tc_reject_roles">
220
  <?php $saved_roles = $this->_config->get_array( 'cdn.reject.roles' ); ?>
232
  <td>
233
  <textarea id="cdn_reject_uri" name="cdn__reject__uri"
234
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?>
235
+ cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.reject.uri' ) ) ); ?></textarea>
236
+ <p class="description"><?php echo sprintf( __( 'Always ignore the specified pages / directories. Supports regular expression (See <a href="%s"><acronym title="Frequently Asked Questions">FAQ</acronym></a>)' ), network_admin_url( 'admin.php?page=w3tc_faq' ) ) ?></p>
237
  </td>
238
  </tr>
239
  <tr>
240
  <th colspan="2">
241
+ <?php $this->checkbox( 'minify.upload', $this->_config->get_boolean( 'minify.auto' ) ) ?> <?php _e( 'Automatically upload minify files', 'w3-total-cache' ) ?></label>
242
+ <p 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' ) ?></p>
243
  </th>
244
  </tr>
245
  <tr>
256
  $this->checkbox( 'cdn.autoupload.enabled', $disabled, '',
257
  true, $force_value );
258
  ?>
259
+ <?php Util_Ui::e_config_label( 'cdn.autoupload.enabled' ) ?></label>
260
+ <p class="description"><?php _e( 'Automatically attempt to find and upload changed files.', 'w3-total-cache' ) ?></p>
261
  </th>
262
  </tr>
263
  <tr>
266
  <input id="cdn_autoupload_interval" type="text"
267
  name="cdn__autoupload__interval"
268
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?>
269
+ value="<?php esc_attr_e( $this->_config->get_integer( 'cdn.autoupload.interval' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ) ?>
270
+ <p class="description"><?php _e( 'Specify the interval between upload of changed files.', 'w3-total-cache' ) ?></p>
271
  </td>
272
  </tr>
273
  <tr>
275
  <td>
276
  <input id="cdn_limit_interval" type="text"
277
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?>
278
+ name="cdn__queue__interval" value="<?php esc_attr_e( $this->_config->get_integer( 'cdn.queue.interval' ) ); ?>" size="10" /> <?php _e( 'seconds', 'w3-total-cache' ) ?>
279
+ <p class="description"><?php _e( 'The number of seconds to wait before upload attempt.', 'w3-total-cache' ) ?></p>
280
  </td>
281
  </tr>
282
  <tr>
284
  <td>
285
  <input id="cdn_limit_queue" type="text"
286
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?>
287
+ name="cdn__queue__limit" value="<?php esc_attr_e( $this->_config->get_integer( 'cdn.queue.limit' ) ); ?>" size="10" />
288
+ <p class="description"><?php _e( 'Number of files processed per upload attempt.', 'w3-total-cache' ) ?></p>
289
  </td>
290
  </tr>
291
  <?php endif ?>
294
  <td>
295
  <input id="cdn_includes_files" type="text"
296
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?>
297
+ name="cdn__includes__files" value="<?php esc_attr_e( $this->_config->get_string( 'cdn.includes.files' ) ); ?>" size="100" />
298
+ <p 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' ) ?></p>
299
  </td>
300
  </tr>
301
  <tr>
303
  <td>
304
  <input id="cdn_theme_files" type="text" name="cdn__theme__files"
305
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?>
306
+ value="<?php esc_attr_e( $this->_config->get_string( 'cdn.theme.files' ) ); ?>" size="100" />
307
+ <p 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' ) ?></p>
308
  </td>
309
  </tr>
310
  <tr>
312
  <td>
313
  <input id="cdn_import_files" type="text" name="cdn__import__files"
314
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?>
315
+ value="<?php esc_attr_e( $this->_config->get_string( 'cdn.import.files' ) ); ?>" size="100" />
316
+ <p 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' ) ?></p>
317
  </td>
318
  </tr>
319
  <tr>
321
  <td>
322
  <textarea id="cdn_custom_files" name="cdn__custom__files"
323
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> cols="40"
324
+ rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.custom.files' ) ) ); ?></textarea>
325
+ <p 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' ) ?>
326
  <?php if ( Util_Environment::is_wpmu() ): ?>
327
  <br />
328
  <?php _e( 'To upload files in blogs.dir for current blog write wp-content/&lt;currentblog&gt;/.', 'w3-total-cache' ) ?>
329
  <?php endif ?>
330
+ </p>
331
  </td>
332
  </tr>
333
  <tr>
334
  <th><label for="cdn_reject_ua"><?php Util_Ui::e_config_label( 'cdn.reject.ua' ) ?></label></th>
335
  <td>
336
  <textarea id="cdn_reject_ua" name="cdn__reject__ua" cols="40"
337
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.reject.ua' ) ) ); ?></textarea>
338
+ <p 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' ) ?></p>
339
  </td>
340
  </tr>
341
  <tr>
342
  <th><label for="cdn_reject_files"><?php Util_Ui::e_config_label( 'cdn.reject.files' ) ?></label></th>
343
  <td>
344
  <textarea id="cdn_reject_files" name="cdn__reject__files"
345
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.reject.files' ) ) ); ?></textarea>
346
+ <p class="description"><?php _e( 'Specify the path of files that should not use the <acronym title="Content Delivery Network">CDN</acronym>.', 'w3-total-cache' ) ?></p>
347
  </td>
348
  </tr>
349
  <tr>
352
  <input type="hidden" name="set_cookie_domain_new" value="0" />
353
  <label><input type="checkbox" name="set_cookie_domain_new"
354
  <?php Util_Ui::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>
355
+ <p 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' ) ?></p>
356
  </th>
357
  </tr>
358
  </table>
inc/options/cdn/akamai.php CHANGED
@@ -6,45 +6,44 @@ if ( !defined( 'W3TC' ) )
6
 
7
  ?>
8
  <tr>
9
- <th style="width: 300px;"><label for="cdn_akamai_username"><?php _e( 'Username:', 'w3-total-cache' ); ?></label></th>
10
- <td>
11
- <input id="cdn_akamai_username" class="w3tc-ignore-change" type="text"
12
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__akamai__username" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.akamai.username' ) ); ?>" size="60" />
13
- </td>
14
  </tr>
15
  <tr>
16
- <th><label for="cdn_akamai_password"><?php _e( 'Password:', 'w3-total-cache' ); ?></label></th>
17
- <td>
18
- <input id="cdn_akamai_password" class="w3tc-ignore-change"
19
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> type="password" name="cdn__akamai__password" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.akamai.password' ) ); ?>" size="60" />
20
- </td>
21
  </tr>
22
  <tr>
23
- <th><label for="cdn_akamai_email_notification"><?php _e( 'Email notification:', 'w3-total-cache' ); ?></label></th>
24
- <td>
25
- <textarea id="cdn_akamai_email_notification" name="cdn__akamai__email_notification"
26
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.akamai.email_notification' ) ) ); ?></textarea>
27
- <br />
28
- <span class="description"><?php _e( 'Specify email addresses for completed removal notifications. One email per line.', 'w3-total-cache' ); ?></span>
29
- </td>
30
  </tr>
31
  <tr>
32
- <th><label for="cdn_akamai_zone"><?php _e( 'Domain to purge:', 'w3-total-cache' ); ?></label></th>
33
- <td>
34
- <select id="cdn_akamai_zone" name="cdn__akamai__zone">
35
- <option value="production" <?php selected( $this->_config->get_string( 'cdn.akamai.zone' ), 'production' ); ?>>Production</option>
36
- <option value="staging" <?php selected( $this->_config->get_string( 'cdn.akamai.zone' ), 'staging' ); ?>>Staging</option>
37
- </select>
38
- </td>
39
  </tr>
40
  <tr>
41
- <th><label for="cdn_akamai_action"><?php _e( 'Purge action:', 'w3-total-cache' ); ?></label></th>
42
- <td>
43
- <select id="cdn_akamai_action" name="cdn__akamai__action">
44
- <option value="invalidate" <?php selected( $this->_config->get_string( 'cdn.akamai.action' ), 'invalidate' ); ?>>Invalidate</option>
45
- <option value="remove" <?php selected( $this->_config->get_string( 'cdn.akamai.action' ), 'remove' ); ?>>Remove</option>
46
- </select>
47
- </td>
48
  </tr>
49
  <tr>
50
  <th><label for="cdn_akamai_ssl"><?php _e( '<acronym title="Secure Sockets Layer">SSL</acronym> support:</label>', 'w3-total-cache' ); ?></th>
@@ -54,18 +53,18 @@ if ( !defined( 'W3TC' ) )
54
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.akamai.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
55
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.akamai.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
56
  </select>
57
- <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>
58
  </td>
59
  </tr>
60
  <tr>
61
- <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
62
- <td>
63
  <?php $cnames = $this->_config->get_array( 'cdn.akamai.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
64
- <br /><span class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></span>
65
- </td>
66
  </tr>
67
  <tr>
68
  <th colspan="2">
69
- <input id="cdn_test" class="button {type: 'akamai', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}" type="button" value="<?php _e( 'Test akamai', 'w3-total-cache' ); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
70
- </th>
71
  </tr>
6
 
7
  ?>
8
  <tr>
9
+ <th style="width: 300px;"><label for="cdn_akamai_username"><?php _e( 'Username:', 'w3-total-cache' ); ?></label></th>
10
+ <td>
11
+ <input id="cdn_akamai_username" class="w3tc-ignore-change" type="text"
12
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__akamai__username" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.akamai.username' ) ); ?>" size="60" />
13
+ </td>
14
  </tr>
15
  <tr>
16
+ <th><label for="cdn_akamai_password"><?php _e( 'Password:', 'w3-total-cache' ); ?></label></th>
17
+ <td>
18
+ <input id="cdn_akamai_password" class="w3tc-ignore-change"
19
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> type="password" name="cdn__akamai__password" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.akamai.password' ) ); ?>" size="60" />
20
+ </td>
21
  </tr>
22
  <tr>
23
+ <th><label for="cdn_akamai_email_notification"><?php _e( 'Email notification:', 'w3-total-cache' ); ?></label></th>
24
+ <td>
25
+ <textarea id="cdn_akamai_email_notification" name="cdn__akamai__email_notification"
26
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.akamai.email_notification' ) ) ); ?></textarea>
27
+ <p class="description"><?php _e( 'Specify email addresses for completed removal notifications. One email per line.', 'w3-total-cache' ); ?></p>
28
+ </td>
 
29
  </tr>
30
  <tr>
31
+ <th><label for="cdn_akamai_zone"><?php _e( 'Domain to purge:', 'w3-total-cache' ); ?></label></th>
32
+ <td>
33
+ <select id="cdn_akamai_zone" name="cdn__akamai__zone">
34
+ <option value="production" <?php selected( $this->_config->get_string( 'cdn.akamai.zone' ), 'production' ); ?>>Production</option>
35
+ <option value="staging" <?php selected( $this->_config->get_string( 'cdn.akamai.zone' ), 'staging' ); ?>>Staging</option>
36
+ </select>
37
+ </td>
38
  </tr>
39
  <tr>
40
+ <th><label for="cdn_akamai_action"><?php _e( 'Purge action:', 'w3-total-cache' ); ?></label></th>
41
+ <td>
42
+ <select id="cdn_akamai_action" name="cdn__akamai__action">
43
+ <option value="invalidate" <?php selected( $this->_config->get_string( 'cdn.akamai.action' ), 'invalidate' ); ?>>Invalidate</option>
44
+ <option value="remove" <?php selected( $this->_config->get_string( 'cdn.akamai.action' ), 'remove' ); ?>>Remove</option>
45
+ </select>
46
+ </td>
47
  </tr>
48
  <tr>
49
  <th><label for="cdn_akamai_ssl"><?php _e( '<acronym title="Secure Sockets Layer">SSL</acronym> support:</label>', 'w3-total-cache' ); ?></th>
53
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.akamai.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
54
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.akamai.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
55
  </select>
56
+ <p 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' ); ?></p>
57
  </td>
58
  </tr>
59
  <tr>
60
+ <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
61
+ <td>
62
  <?php $cnames = $this->_config->get_array( 'cdn.akamai.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
63
+ <p class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></p>
64
+ </td>
65
  </tr>
66
  <tr>
67
  <th colspan="2">
68
+ <input id="cdn_test" class="button {type: 'akamai', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}" type="button" value="<?php _e( 'Test akamai', 'w3-total-cache' ); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
69
+ </th>
70
  </tr>
inc/options/cdn/att.php CHANGED
@@ -6,18 +6,18 @@ if ( !defined( 'W3TC' ) )
6
 
7
  ?>
8
  <tr>
9
- <th style="width: 300px;"><label for="cdn_att_account"><?php _e( 'Account #:', 'w3-total-cache' ); ?></label></th>
10
- <td>
11
- <input id="cdn_att_account" class="w3tc-ignore-change" type="text"
12
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__att__account" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.att.account' ) ); ?>" size="60" />
13
- </td>
14
  </tr>
15
  <tr>
16
- <th><label for="cdn_att_token"><?php _e( 'Token:', 'w3-total-cache' ); ?></th>
17
- <td>
18
- <input id="cdn_att_token" class="w3tc-ignore-change" type="password"
19
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__att__token" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.att.token' ) ); ?>" size="60" />
20
- </td>
21
  </tr>
22
  <tr>
23
  <th><label for="cdn_att_ssl"><?php _e( '<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache' ); ?></label></th>
@@ -27,18 +27,18 @@ if ( !defined( 'W3TC' ) )
27
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.att.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
28
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.att.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
29
  </select>
30
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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>
31
  </td>
32
  </tr>
33
  <tr>
34
- <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
35
- <td>
36
  <?php $cnames = $this->_config->get_array( 'cdn.att.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
37
- <br /><span class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></span>
38
- </td>
39
  </tr>
40
  <tr>
41
  <th colspan="2">
42
- <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>
43
- </th>
44
  </tr>
6
 
7
  ?>
8
  <tr>
9
+ <th style="width: 300px;"><label for="cdn_att_account"><?php _e( 'Account #:', 'w3-total-cache' ); ?></label></th>
10
+ <td>
11
+ <input id="cdn_att_account" class="w3tc-ignore-change" type="text"
12
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__att__account" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.att.account' ) ); ?>" size="60" />
13
+ </td>
14
  </tr>
15
  <tr>
16
+ <th><label for="cdn_att_token"><?php _e( 'Token:', 'w3-total-cache' ); ?></th>
17
+ <td>
18
+ <input id="cdn_att_token" class="w3tc-ignore-change" type="password"
19
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__att__token" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.att.token' ) ); ?>" size="60" />
20
+ </td>
21
  </tr>
22
  <tr>
23
  <th><label for="cdn_att_ssl"><?php _e( '<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache' ); ?></label></th>
27
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.att.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
28
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.att.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
29
  </select>
30
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' ); ?></p>
31
  </td>
32
  </tr>
33
  <tr>
34
+ <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
35
+ <td>
36
  <?php $cnames = $this->_config->get_array( 'cdn.att.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
37
+ <p class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></p>
38
+ </td>
39
  </tr>
40
  <tr>
41
  <th colspan="2">
42
+ <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>
43
+ </th>
44
  </tr>
inc/options/cdn/azure.php CHANGED
@@ -9,23 +9,23 @@ if ( !defined( 'W3TC' ) )
9
  <th style="width: 300px;"><label for="cdn_azure_user"><?php _e( 'Account name:', 'w3-total-cache' ); ?></label></th>
10
  <td>
11
  <input id="cdn_azure_user" class="w3tc-ignore-change" type="text"
12
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__azure__user" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.azure.user' ) ); ?>" size="30" />
13
  </td>
14
  </tr>
15
  <tr>
16
  <th><label for="cdn_azure_key"><?php _e( 'Account key:', 'w3-total-cache' ); ?></label></th>
17
  <td>
18
  <input id="cdn_azure_key" class="w3tc-ignore-change"
19
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> type="password" name="cdn__azure__key" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.azure.key' ) ); ?>" size="60" />
20
  </td>
21
  </tr>
22
  <tr>
23
  <th><label for="cdn_azure_container"><?php _e( 'Container:', 'w3-total-cache' ); ?></label></th>
24
  <td>
25
  <input id="cdn_azure_container" type="text"
26
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__azure__container" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.azure.container' ) ); ?>" size="30" />
27
  <input id="cdn_create_container" <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> class="button {type: 'azure', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}" type="button" value="<?php _e( 'Create container', 'w3-total-cache' ); ?>" />
28
- <span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
29
  </td>
30
  </tr>
31
  <tr>
@@ -36,22 +36,22 @@ if ( !defined( 'W3TC' ) )
36
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.azure.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
37
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.azure.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
38
  </select>
39
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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>
40
  </td>
41
  </tr>
42
  <tr>
43
  <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
44
  <td>
45
  <?php if ( ( $cdn_azure_user = $this->_config->get_string( 'cdn.azure.user' ) ) != '' ): ?>
46
- <?php echo esc_attr( $cdn_azure_user ); ?>.blob.core.windows.net
47
  <?php else: ?>
48
- &lt;account name&gt;.blob.core.windows.net
49
  <?php endif; ?> <?php _e( 'or <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?>
50
  <?php $cnames = $this->_config->get_array( 'cdn.azure.cname' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
51
  </td>
52
  </tr>
53
  <tr>
54
  <th colspan="2">
55
- <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>
56
- </th>
57
  </tr>
9
  <th style="width: 300px;"><label for="cdn_azure_user"><?php _e( 'Account name:', 'w3-total-cache' ); ?></label></th>
10
  <td>
11
  <input id="cdn_azure_user" class="w3tc-ignore-change" type="text"
12
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__azure__user" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.azure.user' ) ); ?>" size="30" />
13
  </td>
14
  </tr>
15
  <tr>
16
  <th><label for="cdn_azure_key"><?php _e( 'Account key:', 'w3-total-cache' ); ?></label></th>
17
  <td>
18
  <input id="cdn_azure_key" class="w3tc-ignore-change"
19
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> type="password" name="cdn__azure__key" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.azure.key' ) ); ?>" size="60" />
20
  </td>
21
  </tr>
22
  <tr>
23
  <th><label for="cdn_azure_container"><?php _e( 'Container:', 'w3-total-cache' ); ?></label></th>
24
  <td>
25
  <input id="cdn_azure_container" type="text"
26
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__azure__container" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.azure.container' ) ); ?>" size="30" />
27
  <input id="cdn_create_container" <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> class="button {type: 'azure', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}" type="button" value="<?php _e( 'Create container', 'w3-total-cache' ); ?>" />
28
+ <span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
29
  </td>
30
  </tr>
31
  <tr>
36
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.azure.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
37
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.azure.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
38
  </select>
39
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' ); ?></p>
40
  </td>
41
  </tr>
42
  <tr>
43
  <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
44
  <td>
45
  <?php if ( ( $cdn_azure_user = $this->_config->get_string( 'cdn.azure.user' ) ) != '' ): ?>
46
+ <?php echo esc_attr( $cdn_azure_user ); ?>.blob.core.windows.net
47
  <?php else: ?>
48
+ &lt;account name&gt;.blob.core.windows.net
49
  <?php endif; ?> <?php _e( 'or <acronym title="Canonical Name">CNAME</acronym>:', 'w3-total-cache' ); ?>
50
  <?php $cnames = $this->_config->get_array( 'cdn.azure.cname' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
51
  </td>
52
  </tr>
53
  <tr>
54
  <th colspan="2">
55
+ <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>
56
+ </th>
57
  </tr>
inc/options/cdn/cf.php CHANGED
@@ -7,7 +7,7 @@ if ( !defined( 'W3TC' ) )
7
  ?>
8
  <tr>
9
  <th colspan="2">
10
- <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>
11
  </th>
12
  </tr>
13
  <tr>
@@ -50,7 +50,7 @@ if ( !defined( 'W3TC' ) )
50
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.cf.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
51
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.cf.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
52
  </select>
53
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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>
54
  </td>
55
  </tr>
56
  <tr>
@@ -59,7 +59,7 @@ if ( !defined( 'W3TC' ) )
59
  <input id="cdn_cf_id" type="text" name="cdn__cf__id"
60
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cf.id' ) ); ?>" size="18" style="text-align: right;" />.cloudfront.net or <acronym title="Canonical Name">CNAME</acronym>:
61
  <?php $cnames = $this->_config->get_array( 'cdn.cf.cname' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
62
- <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"><acronym title="Canonical Name">CNAME</acronym></a> to your <acronym title="Domain Name System">DNS</acronym> Zone, enter it here.', 'w3-total-cache' ); ?></span>
63
  </td>
64
  </tr>
65
  <tr>
7
  ?>
8
  <tr>
9
  <th colspan="2">
10
+ <p 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' ); ?></p>
11
  </th>
12
  </tr>
13
  <tr>
50
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.cf.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
51
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.cf.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
52
  </select>
53
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' ); ?></p>
54
  </td>
55
  </tr>
56
  <tr>
59
  <input id="cdn_cf_id" type="text" name="cdn__cf__id"
60
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cf.id' ) ); ?>" size="18" style="text-align: right;" />.cloudfront.net or <acronym title="Canonical Name">CNAME</acronym>:
61
  <?php $cnames = $this->_config->get_array( 'cdn.cf.cname' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
62
+ <p 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"><acronym title="Canonical Name">CNAME</acronym></a> to your <acronym title="Domain Name System">DNS</acronym> Zone, enter it here.', 'w3-total-cache' ); ?></p>
63
  </td>
64
  </tr>
65
  <tr>
inc/options/cdn/cf2.php CHANGED
@@ -7,7 +7,7 @@ if ( !defined( 'W3TC' ) )
7
  ?>
8
  <tr>
9
  <th colspan="2">
10
- <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>
11
  </th>
12
  </tr>
13
  <tr>
@@ -41,7 +41,7 @@ if ( !defined( 'W3TC' ) )
41
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.cf2.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
42
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.cf2.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
43
  </select>
44
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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>
45
  </td>
46
  </tr>
47
  <tr>
@@ -50,7 +50,7 @@ if ( !defined( 'W3TC' ) )
50
  <input id="cdn_cf2_id" type="text" name="cdn__cf2__id"
51
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cf2.id' ) ); ?>" size="18" style="text-align: right;" />.cloudfront.net or <acronym title="Canonical Name">CNAME</acronym>:
52
  <?php $cnames = $this->_config->get_array( 'cdn.cf2.cname' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
53
- <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"><acronym title="Canonical Name">CNAME</acronym></a> to your <acronym title="Domain Name System">DNS</acronym> Zone, enter it here.', 'w3-total-cache' ); ?></span>
54
  </td>
55
  </tr>
56
  <tr>
7
  ?>
8
  <tr>
9
  <th colspan="2">
10
+ <p 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' ); ?></p>
11
  </th>
12
  </tr>
13
  <tr>
41
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.cf2.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
42
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.cf2.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
43
  </select>
44
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' ); ?></p>
45
  </td>
46
  </tr>
47
  <tr>
50
  <input id="cdn_cf2_id" type="text" name="cdn__cf2__id"
51
  <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cf2.id' ) ); ?>" size="18" style="text-align: right;" />.cloudfront.net or <acronym title="Canonical Name">CNAME</acronym>:
52
  <?php $cnames = $this->_config->get_array( 'cdn.cf2.cname' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
53
+ <p 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"><acronym title="Canonical Name">CNAME</acronym></a> to your <acronym title="Domain Name System">DNS</acronym> Zone, enter it here.', 'w3-total-cache' ); ?></p>
54
  </td>
55
  </tr>
56
  <tr>
inc/options/cdn/cotendo.php CHANGED
@@ -6,25 +6,25 @@ if ( !defined( 'W3TC' ) )
6
 
7
  ?>
8
  <tr>
9
- <th style="width: 300px;"><label for="cdn_cotendo_username"><?php _e( 'Username:', 'w3-total-cache' ); ?></label></th>
10
- <td>
11
- <input id="cdn_cotendo_username" class="w3tc-ignore-change" type="text"
12
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__cotendo__username" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cotendo.username' ) ); ?>" size="60" />
13
- </td>
14
  </tr>
15
  <tr>
16
- <th><label for="cdn_cotendo_password"><?php _e( 'Password:', 'w3-total-cache' ); ?></label></th>
17
- <td>
18
- <input id="cdn_cotendo_password" class="w3tc-ignore-change"
19
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> type="password" name="cdn__cotendo__password" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cotendo.password' ) ); ?>" size="60" />
20
- </td>
21
  </tr>
22
  <tr>
23
- <th><label for="cdn_cotendo_zones"><?php _e( 'Zones to purge:', 'w3-total-cache' ); ?></label></th>
24
- <td>
25
- <textarea id="cdn_cotendo_zones" name="cdn__cotendo__zones"
26
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.cotendo.zones' ) ) ); ?></textarea>
27
- </td>
28
  </tr>
29
  <tr>
30
  <th><label for="cdn_cotendo_ssl"><?php _e( '<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache' ); ?></label></th>
@@ -34,18 +34,18 @@ if ( !defined( 'W3TC' ) )
34
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.cotendo.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
35
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.cotendo.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
36
  </select>
37
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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 $cnames = $this->_config->get_array( 'cdn.cotendo.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
44
- <br /><span class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></span>
45
- </td>
46
  </tr>
47
  <tr>
48
  <th colspan="2">
49
  <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>
50
- </th>
51
  </tr>
6
 
7
  ?>
8
  <tr>
9
+ <th style="width: 300px;"><label for="cdn_cotendo_username"><?php _e( 'Username:', 'w3-total-cache' ); ?></label></th>
10
+ <td>
11
+ <input id="cdn_cotendo_username" class="w3tc-ignore-change" type="text"
12
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__cotendo__username" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cotendo.username' ) ); ?>" size="60" />
13
+ </td>
14
  </tr>
15
  <tr>
16
+ <th><label for="cdn_cotendo_password"><?php _e( 'Password:', 'w3-total-cache' ); ?></label></th>
17
+ <td>
18
+ <input id="cdn_cotendo_password" class="w3tc-ignore-change"
19
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> type="password" name="cdn__cotendo__password" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cotendo.password' ) ); ?>" size="60" />
20
+ </td>
21
  </tr>
22
  <tr>
23
+ <th><label for="cdn_cotendo_zones"><?php _e( 'Zones to purge:', 'w3-total-cache' ); ?></label></th>
24
+ <td>
25
+ <textarea id="cdn_cotendo_zones" name="cdn__cotendo__zones"
26
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.cotendo.zones' ) ) ); ?></textarea>
27
+ </td>
28
  </tr>
29
  <tr>
30
  <th><label for="cdn_cotendo_ssl"><?php _e( '<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache' ); ?></label></th>
34
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.cotendo.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
35
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.cotendo.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
36
  </select>
37
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' ); ?></p>
38
  </td>
39
  </tr>
40
  <tr>
41
+ <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
42
+ <td>
43
  <?php $cnames = $this->_config->get_array( 'cdn.cotendo.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
44
+ <p class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></p>
45
+ </td>
46
  </tr>
47
  <tr>
48
  <th colspan="2">
49
  <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>
50
+ </th>
51
  </tr>
inc/options/cdn/edgecast.php CHANGED
@@ -6,18 +6,18 @@ if ( !defined( 'W3TC' ) )
6
 
7
  ?>
8
  <tr>
9
- <th style="width: 300px;"><label for="cdn_edgecast_account"><?php _e( 'Account #:', 'w3-total-cache' ); ?></label></th>
10
- <td>
11
- <input id="cdn_edgecast_account" class="w3tc-ignore-change" type="text"
12
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__edgecast__account" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.edgecast.account' ) ); ?>" size="60" />
13
- </td>
14
  </tr>
15
  <tr>
16
- <th><label for="cdn_edgecast_token"><?php _e( 'Token:', 'w3-total-cache' ); ?></th>
17
- <td>
18
- <input id="cdn_edgecast_token" class="w3tc-ignore-change" type="password"
19
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__edgecast__token" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.edgecast.token' ) ); ?>" size="60" />
20
- </td>
21
  </tr>
22
  <tr>
23
  <th><label for="cdn_edgecast_ssl"><?php _e( '<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache' ); ?></label></th>
@@ -27,18 +27,18 @@ if ( !defined( 'W3TC' ) )
27
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.edgecast.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
28
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.edgecast.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
29
  </select>
30
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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>
31
  </td>
32
  </tr>
33
  <tr>
34
- <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
35
- <td>
36
  <?php $cnames = $this->_config->get_array( 'cdn.edgecast.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
37
- <br /><span class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></span>
38
- </td>
39
  </tr>
40
  <tr>
41
  <th colspan="2">
42
- <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>
43
- </th>
44
  </tr>
6
 
7
  ?>
8
  <tr>
9
+ <th style="width: 300px;"><label for="cdn_edgecast_account"><?php _e( 'Account #:', 'w3-total-cache' ); ?></label></th>
10
+ <td>
11
+ <input id="cdn_edgecast_account" class="w3tc-ignore-change" type="text"
12
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__edgecast__account" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.edgecast.account' ) ); ?>" size="60" />
13
+ </td>
14
  </tr>
15
  <tr>
16
+ <th><label for="cdn_edgecast_token"><?php _e( 'Token:', 'w3-total-cache' ); ?></th>
17
+ <td>
18
+ <input id="cdn_edgecast_token" class="w3tc-ignore-change" type="password"
19
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__edgecast__token" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.edgecast.token' ) ); ?>" size="60" />
20
+ </td>
21
  </tr>
22
  <tr>
23
  <th><label for="cdn_edgecast_ssl"><?php _e( '<acronym title="Secure Sockets Layer">SSL</acronym> support:', 'w3-total-cache' ); ?></label></th>
27
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.edgecast.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
28
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.edgecast.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
29
  </select>
30
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' ); ?></p>
31
  </td>
32
  </tr>
33
  <tr>
34
+ <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
35
+ <td>
36
  <?php $cnames = $this->_config->get_array( 'cdn.edgecast.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
37
+ <p class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></p>
38
+ </td>
39
  </tr>
40
  <tr>
41
  <th colspan="2">
42
+ <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>
43
+ </th>
44
  </tr>
inc/options/cdn/ftp.php CHANGED
@@ -7,16 +7,16 @@ if ( !defined( 'W3TC' ) )
7
  ?>
8
  <tr>
9
  <th colspan="2">
10
- <?php $this->checkbox( 'cdn.ftp.pasv' ) ?> <?php _e( 'Use passive <acronym title="File Transfer Protocol">FTP</acronym> mode', 'w3-total-cache' ); ?></label><br />
11
- <span class="description"><?php _e( 'Enable this option only if there are connectivity issues, otherwise it\'s not recommended.', 'w3-total-cache' ); ?></span>
12
  </th>
13
  </tr>
14
  <tr>
15
  <th style="width: 300px;"><label for="cdn_ftp_host"><?php _e( '<acronym title="File Transfer Protocol">FTP</acronym> hostname:', 'w3-total-cache' ); ?></label></th>
16
  <td>
17
  <input id="cdn_ftp_host" type="text" name="cdn__ftp__host"
18
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.ftp.host' ) ); ?>" size="30" /><br />
19
- <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>
20
  </td>
21
  </tr>
22
  <tr>
@@ -33,22 +33,22 @@ if ( !defined( 'W3TC' ) )
33
  <th><label for="cdn_ftp_user"><?php _e( '<acronym title="File Transfer Protocol">FTP</acronym> username:', 'w3-total-cache' ); ?></label></th>
34
  <td>
35
  <input id="cdn_ftp_user" class="w3tc-ignore-change" type="text"
36
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__ftp__user" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.ftp.user' ) ); ?>" size="30" />
37
  </td>
38
  </tr>
39
  <tr>
40
  <th><label for="cdn_ftp_pass"><?php _e( '<acronym title="File Transfer Protocol">FTP</acronym> password:', 'w3-total-cache' ); ?></label></th>
41
  <td>
42
  <input id="cdn_ftp_pass" class="w3tc-ignore-change"
43
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> type="password" name="cdn__ftp__pass" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.ftp.pass' ) ); ?>" size="30" />
44
  </td>
45
  </tr>
46
  <tr>
47
  <th><label for="cdn_ftp_path"><?php _e( '<acronym title="File Transfer Protocol">FTP</acronym> path:', 'w3-total-cache' ); ?></label></th>
48
  <td>
49
  <input id="cdn_ftp_path" type="text" name="cdn__ftp__path"
50
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.ftp.path' ) ); ?>" size="30" /><br />
51
- <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>
52
  </td>
53
  </tr>
54
  <tr>
@@ -59,13 +59,13 @@ if ( !defined( 'W3TC' ) )
59
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.ftp.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
60
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.ftp.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
61
  </select>
62
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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>
63
  </td>
64
  </tr>
65
  <tr>
66
  <th colspan="2">
67
- <?php $this->checkbox( 'cdn.ftp.default_keys', !function_exists( 'ssh2_connect' ) ) ?> <?php _e( 'Use default <acronym title="Secure Shell">SSH</acronym> public/private key files', 'w3-total-cache' ); ?></label><br />
68
- <span class="description"><?php _e( 'Enable this option if you don\'t have special public/private key files.', 'w3-total-cache' ); ?></span>
69
  </th>
70
  </tr>
71
  <tr>
@@ -86,11 +86,11 @@ if ( !defined( 'W3TC' ) )
86
  <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
87
  <td>
88
  <?php $cnames = $this->_config->get_array( 'cdn.ftp.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
89
- <br /><span class="description"><?php _e( 'Enter the hostname or <acronym title="Canonical Name">CNAME</acronym>(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>
90
  </td>
91
  </tr>
92
  <tr>
93
  <th colspan="2">
94
- <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>
95
- </th>
96
  </tr>
7
  ?>
8
  <tr>
9
  <th colspan="2">
10
+ <?php $this->checkbox( 'cdn.ftp.pasv' ) ?> <?php _e( 'Use passive <acronym title="File Transfer Protocol">FTP</acronym> mode', 'w3-total-cache' ); ?></label>
11
+ <p class="description"><?php _e( 'Enable this option only if there are connectivity issues, otherwise it\'s not recommended.', 'w3-total-cache' ); ?></p>
12
  </th>
13
  </tr>
14
  <tr>
15
  <th style="width: 300px;"><label for="cdn_ftp_host"><?php _e( '<acronym title="File Transfer Protocol">FTP</acronym> hostname:', 'w3-total-cache' ); ?></label></th>
16
  <td>
17
  <input id="cdn_ftp_host" type="text" name="cdn__ftp__host"
18
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.ftp.host' ) ); ?>" size="30" />
19
+ <p 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' ); ?></p>
20
  </td>
21
  </tr>
22
  <tr>
33
  <th><label for="cdn_ftp_user"><?php _e( '<acronym title="File Transfer Protocol">FTP</acronym> username:', 'w3-total-cache' ); ?></label></th>
34
  <td>
35
  <input id="cdn_ftp_user" class="w3tc-ignore-change" type="text"
36
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__ftp__user" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.ftp.user' ) ); ?>" size="30" />
37
  </td>
38
  </tr>
39
  <tr>
40
  <th><label for="cdn_ftp_pass"><?php _e( '<acronym title="File Transfer Protocol">FTP</acronym> password:', 'w3-total-cache' ); ?></label></th>
41
  <td>
42
  <input id="cdn_ftp_pass" class="w3tc-ignore-change"
43
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> type="password" name="cdn__ftp__pass" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.ftp.pass' ) ); ?>" size="30" />
44
  </td>
45
  </tr>
46
  <tr>
47
  <th><label for="cdn_ftp_path"><?php _e( '<acronym title="File Transfer Protocol">FTP</acronym> path:', 'w3-total-cache' ); ?></label></th>
48
  <td>
49
  <input id="cdn_ftp_path" type="text" name="cdn__ftp__path"
50
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.ftp.path' ) ); ?>" size="30" />
51
+ <p 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' ); ?></p>
52
  </td>
53
  </tr>
54
  <tr>
59
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.ftp.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
60
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.ftp.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
61
  </select>
62
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' ); ?></p>
63
  </td>
64
  </tr>
65
  <tr>
66
  <th colspan="2">
67
+ <?php $this->checkbox( 'cdn.ftp.default_keys', !function_exists( 'ssh2_connect' ) ) ?> <?php _e( 'Use default <acronym title="Secure Shell">SSH</acronym> public/private key files', 'w3-total-cache' ); ?></label>
68
+ <p class="description"><?php _e( 'Enable this option if you don\'t have special public/private key files.', 'w3-total-cache' ); ?></p>
69
  </th>
70
  </tr>
71
  <tr>
86
  <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
87
  <td>
88
  <?php $cnames = $this->_config->get_array( 'cdn.ftp.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
89
+ <p class="description"><?php _e( 'Enter the hostname or <acronym title="Canonical Name">CNAME</acronym>(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' ); ?></p>
90
  </td>
91
  </tr>
92
  <tr>
93
  <th colspan="2">
94
+ <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>
95
+ </th>
96
  </tr>
inc/options/cdn/mirror.php CHANGED
@@ -13,18 +13,18 @@ if ( !defined( 'W3TC' ) )
13
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.mirror.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
14
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.mirror.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
15
  </select>
16
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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>
17
  </td>
18
  </tr>
19
  <tr>
20
  <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
21
  <td>
22
  <?php $cnames = $this->_config->get_array( 'cdn.mirror.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
23
- <br /><span class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></span>
24
  </td>
25
  </tr>
26
  <tr>
27
  <th colspan="2">
28
  <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>
29
- </th>
30
  </tr>
13
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.mirror.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
14
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.mirror.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
15
  </select>
16
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' ); ?></p>
17
  </td>
18
  </tr>
19
  <tr>
20
  <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
21
  <td>
22
  <?php $cnames = $this->_config->get_array( 'cdn.mirror.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
23
+ <p class="description"><?php _e( 'Enter the hostname provided by your <acronym title="Content Delivery Network">CDN</acronym> provider, this value will replace your site\'s hostname in the <acronym title="Hypertext Markup Language">HTML</acronym>.', 'w3-total-cache' ); ?></p>
24
  </td>
25
  </tr>
26
  <tr>
27
  <th colspan="2">
28
  <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>
29
+ </th>
30
  </tr>
inc/options/cdn/rscf.php CHANGED
@@ -9,14 +9,14 @@ if ( !defined( 'W3TC' ) )
9
  <th style="width: 300px;"><label for="cdn_rscf_user"><?php _e( 'Username:', 'w3-total-cache' ); ?></label></th>
10
  <td>
11
  <input id="cdn_rscf_user" class="w3tc-ignore-change" type="text"
12
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__rscf__user" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.rscf.user' ) ); ?>" size="30" />
13
  </td>
14
  </tr>
15
  <tr>
16
  <th><label for="cdn_rscf_key"><?php _e( '<acronym title="Application Programming Interface">API</acronym> key:', 'w3-total-cache' ); ?></label></th>
17
  <td>
18
  <input id="cdn_rscf_key" class="w3tc-ignore-change" type="password"
19
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__rscf__key" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.rscf.key' ) ); ?>" size="60" />
20
  </td>
21
  </tr>
22
  <?php
@@ -33,9 +33,9 @@ Util_Ui::config_item( array(
33
  <th><label for="cdn_rscf_container"><?php _e( 'Container:', 'w3-total-cache' ); ?></label></th>
34
  <td>
35
  <input id="cdn_rscf_container" type="text" name="cdn__rscf__container"
36
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.rscf.container' ) ); ?>" size="30" />
37
  <input id="cdn_create_container"
38
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> class="button {type: 'rscf', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}" type="button" value="<?php _e( 'Create container', 'w3-total-cache' ); ?>" />
39
  <span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
40
  </td>
41
  </tr>
@@ -47,18 +47,18 @@ Util_Ui::config_item( array(
47
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.rscf.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
48
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.rscf.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
49
  </select>
50
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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>
51
  </td>
52
  </tr>
53
  <tr>
54
- <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
55
- <td>
56
  <?php $cnames = $this->_config->get_array( 'cdn.rscf.cname' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
57
- <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>
58
- </td>
59
  </tr>
60
  <tr>
61
  <th colspan="2">
62
- <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>
63
- </th>
64
  </tr>
9
  <th style="width: 300px;"><label for="cdn_rscf_user"><?php _e( 'Username:', 'w3-total-cache' ); ?></label></th>
10
  <td>
11
  <input id="cdn_rscf_user" class="w3tc-ignore-change" type="text"
12
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__rscf__user" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.rscf.user' ) ); ?>" size="30" />
13
  </td>
14
  </tr>
15
  <tr>
16
  <th><label for="cdn_rscf_key"><?php _e( '<acronym title="Application Programming Interface">API</acronym> key:', 'w3-total-cache' ); ?></label></th>
17
  <td>
18
  <input id="cdn_rscf_key" class="w3tc-ignore-change" type="password"
19
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> name="cdn__rscf__key" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.rscf.key' ) ); ?>" size="60" />
20
  </td>
21
  </tr>
22
  <?php
33
  <th><label for="cdn_rscf_container"><?php _e( 'Container:', 'w3-total-cache' ); ?></label></th>
34
  <td>
35
  <input id="cdn_rscf_container" type="text" name="cdn__rscf__container"
36
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.rscf.container' ) ); ?>" size="30" />
37
  <input id="cdn_create_container"
38
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> class="button {type: 'rscf', nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}" type="button" value="<?php _e( 'Create container', 'w3-total-cache' ); ?>" />
39
  <span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
40
  </td>
41
  </tr>
47
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.rscf.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
48
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.rscf.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
49
  </select>
50
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' ); ?></p>
51
  </td>
52
  </tr>
53
  <tr>
54
+ <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
55
+ <td>
56
  <?php $cnames = $this->_config->get_array( 'cdn.rscf.cname' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
57
+ <p 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' ); ?></p>
58
+ </td>
59
  </tr>
60
  <tr>
61
  <th colspan="2">
62
+ <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>
63
+ </th>
64
  </tr>
inc/options/cdn/s3.php CHANGED
@@ -7,7 +7,7 @@ if ( !defined( 'W3TC' ) )
7
  ?>
8
  <tr>
9
  <th colspan="2">
10
- <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>
11
  </th>
12
  </tr>
13
  <tr>
@@ -50,7 +50,7 @@ if ( !defined( 'W3TC' ) )
50
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.s3.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
51
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.s3.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
52
  </select>
53
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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>
54
  </td>
55
  </tr>
56
  <tr>
@@ -62,7 +62,7 @@ if ( !defined( 'W3TC' ) )
62
  &lt;bucket&gt;.s3.amazonaws.com
63
  <?php endif; ?> <?php _e( 'or CNAME:', 'w3-total-cache' ); ?>
64
  <?php $cnames = $this->_config->get_array( 'cdn.s3.cname' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
65
- <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>
66
  </td>
67
  </tr>
68
  <tr>
7
  ?>
8
  <tr>
9
  <th colspan="2">
10
+ <p 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' ); ?></p>
11
  </th>
12
  </tr>
13
  <tr>
50
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.s3.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
51
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.s3.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
52
  </select>
53
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' ); ?></p>
54
  </td>
55
  </tr>
56
  <tr>
62
  &lt;bucket&gt;.s3.amazonaws.com
63
  <?php endif; ?> <?php _e( 'or CNAME:', 'w3-total-cache' ); ?>
64
  <?php $cnames = $this->_config->get_array( 'cdn.s3.cname' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
65
+ <p 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' ); ?></p>
66
  </td>
67
  </tr>
68
  <tr>
inc/options/cdn/s3_compatible.php CHANGED
@@ -24,14 +24,14 @@ Util_Ui::config_item( array(
24
  <th><label for="cdn_s3_secret"><?php _e( 'Secret key:', 'w3-total-cache' ); ?></label></th>
25
  <td>
26
  <input id="cdn_s3_secret" class="w3tc-ignore-change"
27
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> type="password" name="cdn__s3__secret" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.s3.secret' ) ); ?>" size="60" />
28
  </td>
29
  </tr>
30
  <tr>
31
  <th><label for="cdn_s3_bucket"><?php _e( 'Bucket:', 'w3-total-cache' ); ?></label></th>
32
  <td>
33
  <input id="cdn_s3_bucket" type="text" name="cdn__s3__bucket"
34
- <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.s3.bucket' ) ); ?>" size="30" />
35
  </td>
36
  </tr>
37
  <tr>
@@ -42,18 +42,18 @@ Util_Ui::config_item( array(
42
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.s3.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
43
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.s3.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
44
  </select>
45
- <br /><span class="description"><?php _e( 'Some <acronym title="Content Delivery Network">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>
46
  </td>
47
  </tr>
48
  <tr>
49
  <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
50
  <td>
51
  <?php $cnames = $this->_config->get_array( 'cdn.s3.cname' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
52
- <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>
53
  </td>
54
  </tr>
55
  <tr>
56
  <th colspan="2">
57
- <input id="cdn_test" class="button {type: 's3_compatible', 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>
58
- </th>
59
  </tr>
24
  <th><label for="cdn_s3_secret"><?php _e( 'Secret key:', 'w3-total-cache' ); ?></label></th>
25
  <td>
26
  <input id="cdn_s3_secret" class="w3tc-ignore-change"
27
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> type="password" name="cdn__s3__secret" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.s3.secret' ) ); ?>" size="60" />
28
  </td>
29
  </tr>
30
  <tr>
31
  <th><label for="cdn_s3_bucket"><?php _e( 'Bucket:', 'w3-total-cache' ); ?></label></th>
32
  <td>
33
  <input id="cdn_s3_bucket" type="text" name="cdn__s3__bucket"
34
+ <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.s3.bucket' ) ); ?>" size="30" />
35
  </td>
36
  </tr>
37
  <tr>
42
  <option value="enabled"<?php selected( $this->_config->get_string( 'cdn.s3.ssl' ), 'enabled' ); ?>><?php _e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
43
  <option value="disabled"<?php selected( $this->_config->get_string( 'cdn.s3.ssl' ), 'disabled' ); ?>><?php _e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
44
  </select>
45
+ <p class="description"><?php _e( 'Some <acronym title="Content Delivery Network">CDN</acronym> providers may or may not support <acronym title="Secure Sockets Layer">SSL</acronym>, contact your vendor for more information.', 'w3-total-cache' ); ?></p>
46
  </td>
47
  </tr>
48
  <tr>
49
  <th><?php _e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
50
  <td>
51
  <?php $cnames = $this->_config->get_array( 'cdn.s3.cname' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
52
+ <p 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' ); ?></p>
53
  </td>
54
  </tr>
55
  <tr>
56
  <th colspan="2">
57
+ <input id="cdn_test" class="button {type: 's3_compatible', 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>
58
+ </th>
59
  </tr>
inc/options/common/header.php CHANGED
@@ -21,6 +21,9 @@ $licensing_visible = ( ( !Util_Environment::is_wpmu() || is_network_admin() ) &&
21
  <?php
22
  switch ( $page ) {
23
  case 'w3tc_general':
 
 
 
24
  $anchors = array(
25
  array( 'id' => 'general', 'text' => __( 'General', 'w3-total-cache' ) ),
26
  array( 'id' => 'page_cache', 'text' => __( 'Page Cache', 'w3-total-cache' ) ),
21
  <?php
22
  switch ( $page ) {
23
  case 'w3tc_general':
24
+ if ( !empty( $_REQUEST['view'] ) ) {
25
+ break;
26
+ }
27
  $anchors = array(
28
  array( 'id' => 'general', 'text' => __( 'General', 'w3-total-cache' ) ),
29
  array( 'id' => 'page_cache', 'text' => __( 'Page Cache', 'w3-total-cache' ) ),
inc/options/dbcache.php CHANGED
@@ -8,35 +8,35 @@ if ( !defined( 'W3TC' ) )
8
  <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
9
 
10
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
11
- <p>
12
  <?php echo sprintf( __( 'Database caching via %s is currently %s.', 'w3-total-cache' ), Cache::engine_name( $this->_config->get_string( 'dbcache.engine' ) ) , '<span class="w3tc-' . ( $dbcache_enabled ? 'enabled">' . __( 'enabled', 'w3-total-cache' ) : 'disabled">' . __( 'disabled', 'w3-total-cache' ) ) . '</span>' ); ?>
13
- </p>
14
- <p>
15
- <?php _e( 'To rebuild the database cache use the', 'w3-total-cache' ) ?>
16
- <?php echo Util_Ui::nonce_field( 'w3tc' ); ?>
17
- <input type="submit" name="w3tc_flush_dbcache" value="<?php _e( 'empty cache', 'w3-total-cache' ); ?>"<?php if ( ! $dbcache_enabled ): ?> disabled="disabled"<?php endif; ?> class="button" />
18
  <?php _e( 'operation.', 'w3-total-cache' ); ?>
19
- </p>
20
  </form>
21
 
22
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
23
- <div class="metabox-holder">
24
- <?php Util_Ui::postbox_header( __( 'General', 'w3-total-cache' ), '', 'general' ); ?>
25
- <table class="form-table">
26
- <tr>
27
- <th>
28
- <?php $this->checkbox( 'dbcache.reject.logged' ) ?> <?php Util_Ui::e_config_label( 'dbcache.reject.logged' ) ?></label>
29
- <br /><span class="description"><?php _e( 'Enabling this option is recommended to maintain default WordPress behavior.', 'w3-total-cache' ); ?></span>
30
- </th>
31
- </tr>
32
- </table>
33
 
34
- <?php Util_Ui::button_config_save( 'dbcache_general' ); ?>
35
- <?php Util_Ui::postbox_footer(); ?>
36
 
37
- <?php Util_Ui::postbox_header( __( 'Advanced', 'w3-total-cache' ), '', 'advanced' ); ?>
38
- <table class="form-table">
39
- <?php
40
  if ( $this->_config->get_string( 'dbcache.engine' ) == 'memcached' ) {
41
  $module = 'dbcache';
42
  include W3TC_INC_DIR . '/options/parts/memcached.php';
@@ -45,63 +45,63 @@ if ( $this->_config->get_string( 'dbcache.engine' ) == 'memcached' ) {
45
  include W3TC_INC_DIR . '/options/parts/redis.php';
46
  }
47
  ?>
48
- <tr>
49
- <th style="width: 250px;"><label for="dbcache_lifetime"><?php Util_Ui::e_config_label( 'dbcache.lifetime' ) ?></label></th>
50
- <td>
51
- <input id="dbcache_lifetime" type="text" name="dbcache__lifetime"
52
- <?php Util_Ui::sealing_disabled( 'dbcache.' ) ?>
53
- value="<?php echo esc_attr( $this->_config->get_integer( 'dbcache.lifetime' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
54
- <br /><span class="description"><?php _e( 'Determines the natural expiration time of unchanged cache items. The higher the value, the larger the cache.', 'w3-total-cache' ); ?></span>
55
- </td>
56
- </tr>
57
- <tr>
58
- <th><label for="dbcache_file_gc"><?php Util_Ui::e_config_label( 'dbcache.file.gc' ) ?></label></th>
59
- <td>
60
- <input id="dbcache_file_gc" type="text" name="dbcache__file__gc"
61
  <?php Util_Ui::sealing_disabled( 'dbcache.' ) ?> value="<?php echo esc_attr( $this->_config->get_integer( 'dbcache.file.gc' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
62
- <br /><span class="description"><?php _e( 'If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.', 'w3-total-cache' ); ?></span>
63
- </td>
64
- </tr>
65
- <tr>
66
- <th><label for="dbcache_reject_uri"><?php Util_Ui::e_config_label( 'dbcache.reject.uri' ) ?></label></th>
67
- <td>
68
- <textarea id="dbcache_reject_uri" name="dbcache__reject__uri"
69
- <?php Util_Ui::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"><acronym title="Frequently Asked Questions">FAQ</acronym></a>).', 'w3-total-cache' ),
72
  'https://api.w3-edge.com/v1/redirects/faq/usage/regexp-support' ); ?>
73
- </span>
74
- </td>
75
- </tr>
76
- <tr>
77
- <th><label for="dbcache_reject_sql"><?php Util_Ui::e_config_label( 'dbcache.reject.sql' ) ?></label></th>
78
- <td>
79
- <textarea id="dbcache_reject_sql" name="dbcache__reject__sql"
80
- <?php Util_Ui::sealing_disabled( 'dbcache.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'dbcache.reject.sql' ) ) ); ?></textarea><br />
81
- <span class="description"><?php _e( 'Do not cache queries that contain these terms. Any entered prefix (set in wp-config.php) will be replaced with current database prefix (default: wp_). Query stems can be identified using debug mode.', 'w3-total-cache' ); ?></span>
82
- </td>
83
- </tr>
84
- <tr>
85
- <th><label for="dbcache_reject_words"><?php Util_Ui::e_config_label( 'dbcache.reject.words' ) ?></label></th>
86
- <td>
87
- <textarea id="dbcache_reject_words" name="dbcache__reject__words"
88
- <?php Util_Ui::sealing_disabled( 'dbcache.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'dbcache.reject.words' ) ) ); ?></textarea><br />
89
- <span class="description"><?php _e( 'Do not cache queries that contain these words or regular expressions.', 'w3-total-cache' ); ?></span>
90
- </td>
91
- </tr>
92
- <tr>
93
- <th><label for="dbcache_reject_constants"><?php _e( 'Reject constants:' ) ?></label></th>
94
- <td>
95
- <textarea id="dbcache_reject_constants" name="dbcache__reject__constants"
96
- <?php Util_Ui::sealing_disabled( 'dbcache.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'dbcache.reject.constants' ) ) ); ?></textarea><br />
97
- <span class="description"><?php _e( 'Disable caching once specified constants defined.', 'w3-total-cache' ); ?></span>
98
- </td>
99
- </tr>
100
- </table>
101
 
102
- <?php Util_Ui::button_config_save( 'dbcache_advanced' ); ?>
103
- <?php Util_Ui::postbox_footer(); ?>
104
- </div>
105
  </form>
106
 
107
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
8
  <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
9
 
10
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
11
+ <p>
12
  <?php echo sprintf( __( 'Database caching via %s is currently %s.', 'w3-total-cache' ), Cache::engine_name( $this->_config->get_string( 'dbcache.engine' ) ) , '<span class="w3tc-' . ( $dbcache_enabled ? 'enabled">' . __( 'enabled', 'w3-total-cache' ) : 'disabled">' . __( 'disabled', 'w3-total-cache' ) ) . '</span>' ); ?>
13
+ </p>
14
+ <p>
15
+ <?php _e( 'To rebuild the database cache use the', 'w3-total-cache' ) ?>
16
+ <?php echo Util_Ui::nonce_field( 'w3tc' ); ?>
17
+ <input type="submit" name="w3tc_flush_dbcache" value="<?php _e( 'empty cache', 'w3-total-cache' ); ?>"<?php if ( ! $dbcache_enabled ): ?> disabled="disabled"<?php endif; ?> class="button" />
18
  <?php _e( 'operation.', 'w3-total-cache' ); ?>
19
+ </p>
20
  </form>
21
 
22
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
23
+ <div class="metabox-holder">
24
+ <?php Util_Ui::postbox_header( __( 'General', 'w3-total-cache' ), '', 'general' ); ?>
25
+ <table class="form-table">
26
+ <tr>
27
+ <th>
28
+ <?php $this->checkbox( 'dbcache.reject.logged' ) ?> <?php Util_Ui::e_config_label( 'dbcache.reject.logged' ) ?></label>
29
+ <p class="description"><?php _e( 'Enabling this option is recommended to maintain default WordPress behavior.', 'w3-total-cache' ); ?></p>
30
+ </th>
31
+ </tr>
32
+ </table>
33
 
34
+ <?php Util_Ui::button_config_save( 'dbcache_general' ); ?>
35
+ <?php Util_Ui::postbox_footer(); ?>
36
 
37
+ <?php Util_Ui::postbox_header( __( 'Advanced', 'w3-total-cache' ), '', 'advanced' ); ?>
38
+ <table class="form-table">
39
+ <?php
40
  if ( $this->_config->get_string( 'dbcache.engine' ) == 'memcached' ) {
41
  $module = 'dbcache';
42
  include W3TC_INC_DIR . '/options/parts/memcached.php';
45
  include W3TC_INC_DIR . '/options/parts/redis.php';
46
  }
47
  ?>
48
+ <tr>
49
+ <th style="width: 250px;"><label for="dbcache_lifetime"><?php Util_Ui::e_config_label( 'dbcache.lifetime' ) ?></label></th>
50
+ <td>
51
+ <input id="dbcache_lifetime" type="text" name="dbcache__lifetime"
52
+ <?php Util_Ui::sealing_disabled( 'dbcache.' ) ?>
53
+ value="<?php echo esc_attr( $this->_config->get_integer( 'dbcache.lifetime' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
54
+ <p class="description"><?php _e( 'Determines the natural expiration time of unchanged cache items. The higher the value, the larger the cache.', 'w3-total-cache' ); ?></p>
55
+ </td>
56
+ </tr>
57
+ <tr>
58
+ <th><label for="dbcache_file_gc"><?php Util_Ui::e_config_label( 'dbcache.file.gc' ) ?></label></th>
59
+ <td>
60
+ <input id="dbcache_file_gc" type="text" name="dbcache__file__gc"
61
  <?php Util_Ui::sealing_disabled( 'dbcache.' ) ?> value="<?php echo esc_attr( $this->_config->get_integer( 'dbcache.file.gc' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
62
+ <p class="description"><?php _e( 'If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.', 'w3-total-cache' ); ?></p>
63
+ </td>
64
+ </tr>
65
+ <tr>
66
+ <th><label for="dbcache_reject_uri"><?php Util_Ui::e_config_label( 'dbcache.reject.uri' ) ?></label></th>
67
+ <td>
68
+ <textarea id="dbcache_reject_uri" name="dbcache__reject__uri"
69
+ <?php Util_Ui::sealing_disabled( 'dbcache.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'dbcache.reject.uri' ) ) ); ?></textarea>
70
+ <p class="description">
71
  <?php echo sprintf( __( 'Always ignore the specified pages / directories. Supports regular expressions (See <a href="%s"><acronym title="Frequently Asked Questions">FAQ</acronym></a>).', 'w3-total-cache' ),
72
  'https://api.w3-edge.com/v1/redirects/faq/usage/regexp-support' ); ?>
73
+ </p>
74
+ </td>
75
+ </tr>
76
+ <tr>
77
+ <th><label for="dbcache_reject_sql"><?php Util_Ui::e_config_label( 'dbcache.reject.sql' ) ?></label></th>
78
+ <td>
79
+ <textarea id="dbcache_reject_sql" name="dbcache__reject__sql"
80
+ <?php Util_Ui::sealing_disabled( 'dbcache.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'dbcache.reject.sql' ) ) ); ?></textarea>
81
+ <p class="description"><?php _e( 'Do not cache queries that contain these terms. Any entered prefix (set in wp-config.php) will be replaced with current database prefix (default: wp_). Query stems can be identified using debug mode.', 'w3-total-cache' ); ?></p>
82
+ </td>
83
+ </tr>
84
+ <tr>
85
+ <th><label for="dbcache_reject_words"><?php Util_Ui::e_config_label( 'dbcache.reject.words' ) ?></label></th>
86
+ <td>
87
+ <textarea id="dbcache_reject_words" name="dbcache__reject__words"
88
+ <?php Util_Ui::sealing_disabled( 'dbcache.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'dbcache.reject.words' ) ) ); ?></textarea>
89
+ <p class="description"><?php _e( 'Do not cache queries that contain these words or regular expressions.', 'w3-total-cache' ); ?></p>
90
+ </td>
91
+ </tr>
92
+ <tr>
93
+ <th><label for="dbcache_reject_constants"><?php _e( 'Reject constants:' ) ?></label></th>
94
+ <td>
95
+ <textarea id="dbcache_reject_constants" name="dbcache__reject__constants"
96
+ <?php Util_Ui::sealing_disabled( 'dbcache.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'dbcache.reject.constants' ) ) ); ?></textarea>
97
+ <p class="description"><?php _e( 'Disable caching once specified constants defined.', 'w3-total-cache' ); ?></p>
98
+ </td>
99
+ </tr>
100
+ </table>
101
 
102
+ <?php Util_Ui::button_config_save( 'dbcache_advanced' ); ?>
103
+ <?php Util_Ui::postbox_footer(); ?>
104
+ </div>
105
  </form>
106
 
107
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
inc/options/edd/buy.php CHANGED
@@ -10,8 +10,8 @@ if ( !defined( 'W3TC' ) )
10
  '<input type="button" class="button-primary button-buy-plugin" data-src="' . esc_attr( 'page_' . $page ) .
11
  '" value="' . __( 'upgrade', 'w3-total-cache' ) . '" />' ) ?>
12
  <div id="w3tc-license-instruction" style="display: none;">
13
- <span class="description"><?php printf( __( 'Please enter the license key you received after successful checkout %s.', 'w3-total-cache' ),
14
  '<a href="' . network_admin_url( 'admin.php?page=w3tc_general#licensing' ) .'">' . __( 'here', 'w3-total-cache' ) . '</a>' )
15
- ?></span>
16
  </div>
17
  </div>
10
  '<input type="button" class="button-primary button-buy-plugin" data-src="' . esc_attr( 'page_' . $page ) .
11
  '" value="' . __( 'upgrade', 'w3-total-cache' ) . '" />' ) ?>
12
  <div id="w3tc-license-instruction" style="display: none;">
13
+ <p class="description"><?php printf( __( 'Please enter the license key you received after successful checkout %s.', 'w3-total-cache' ),
14
  '<a href="' . network_admin_url( 'admin.php?page=w3tc_general#licensing' ) .'">' . __( 'here', 'w3-total-cache' ) . '</a>' )
15
+ ?></p>
16
  </div>
17
  </div>
inc/options/enterprise/dbcluster-config.php CHANGED
@@ -8,28 +8,27 @@ if ( !defined( 'W3TC' ) )
8
  <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
9
 
10
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
11
- <div class="metabox-holder">
12
- <?php Util_Ui::postbox_header( __( 'Database Cluster Configuration File', 'w3-total-cache' ) ); ?>
13
- <table class="form-table">
14
- <tr>
15
- <th>
16
- <textarea cols="70" rows="25" style="width: 100%"
17
- name="newcontent" id="newcontent"
18
- tabindex="1"><?php echo esc_textarea( $content ); ?></textarea><br />
19
- <br />
20
- <span class="description">
21
- <?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' ); ?>
22
- </span>
23
- </th>
24
- </tr>
25
- </table>
26
 
27
- <p class="submit">
28
- <?php echo Util_Ui::nonce_field( 'w3tc' ); ?>
29
- <input type="submit" name="w3tc_config_dbcluster_config_save" class="w3tc-button-save button-primary" value="<?php _e( 'Save configuration file', 'w3-total-cache' ); ?>" />
30
- </p>
31
- <?php Util_Ui::postbox_footer(); ?>
32
- </div>
33
  </form>
34
 
35
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
8
  <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
9
 
10
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
11
+ <div class="metabox-holder">
12
+ <?php Util_Ui::postbox_header( __( 'Database Cluster Configuration File', 'w3-total-cache' ) ); ?>
13
+ <table class="form-table">
14
+ <tr>
15
+ <th>
16
+ <textarea cols="70" rows="25" style="width: 100%"
17
+ name="newcontent" id="newcontent"
18
+ tabindex="1"><?php echo esc_textarea( $content ); ?></textarea><br />
19
+ <p class="description">
20
+ <?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' ); ?>
21
+ </p>
22
+ </th>
23
+ </tr>
24
+ </table>
 
25
 
26
+ <p class="submit">
27
+ <?php echo Util_Ui::nonce_field( 'w3tc' ); ?>
28
+ <input type="submit" name="w3tc_config_dbcluster_config_save" class="w3tc-button-save button-primary" value="<?php _e( 'Save configuration file', 'w3-total-cache' ); ?>" />
29
+ </p>
30
+ <?php Util_Ui::postbox_footer(); ?>
31
+ </div>
32
  </form>
33
 
34
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
inc/options/enterprise/dbcluster_general_section.php CHANGED
@@ -6,10 +6,10 @@ if ( !defined( 'W3TC' ) )
6
 
7
  ?>
8
  <tr>
9
- <th><label for="w3tc_dbcluster_config">Database cluster:</th>
10
- <td>
11
- <input type="submit" id="w3tc_dbcluster_config" name="w3tc_dbcluster_config" class="button"
12
- value="<?php echo Util_Environment::is_dbcluster() ? 'Edit Database Cluster Configuration' : 'Enable database cluster'; ?>" /><br />
13
- <span class="description">Create db-cluster-config.php file with your database cluster configuration to enable it.</span>
14
- </td>
15
  </tr>
6
 
7
  ?>
8
  <tr>
9
+ <th><label for="w3tc_dbcluster_config">Database cluster:</th>
10
+ <td>
11
+ <input type="submit" id="w3tc_dbcluster_config" name="w3tc_dbcluster_config" class="button"
12
+ value="<?php echo Util_Environment::is_dbcluster() ? 'Edit Database Cluster Configuration' : 'Enable database cluster'; ?>" />
13
+ <p class="description">Create db-cluster-config.php file with your database cluster configuration to enable it.</p>
14
+ </td>
15
  </tr>
inc/options/extensions/list.php CHANGED
@@ -114,17 +114,14 @@ if ( $links ) {
114
  <p>
115
  <?php if ( isset( $meta['pro_feature'] ) && $meta['pro_feature'] ): ?>
116
  <?php Util_Ui::pro_wrap_maybe_start() ?>
117
- <?php endif ?>
118
-
119
- <?php _e( $meta['description'] ) ?>
120
-
121
- <?php if ( isset( $meta['pro_feature'] ) && $meta['pro_feature'] ): ?>
122
  <?php Util_Ui::pro_wrap_maybe_end( "extension_$extension" ) ?>
 
 
123
  <?php endif ?>
124
 
125
  <?php if ( !empty( $meta['requirements'] ) ): ?>
126
- <br />
127
- <span class="description"><?php printf( __( 'Requirements: %s', 'w3-total-cache' ), apply_filters( "w3tc_extension_requirements-{$extension}", $meta['requirements'] ) ) ?></span>
128
  <?php do_action( "w3tc_extension_requirements-{$extension}" ) ?>
129
  <?php endif ?>
130
  </p>
114
  <p>
115
  <?php if ( isset( $meta['pro_feature'] ) && $meta['pro_feature'] ): ?>
116
  <?php Util_Ui::pro_wrap_maybe_start() ?>
117
+ <?php Util_Ui::pro_wrap_description( $meta['pro_excerpt'], $meta['pro_description'] ) ?>
 
 
 
 
118
  <?php Util_Ui::pro_wrap_maybe_end( "extension_$extension" ) ?>
119
+ <?php else: ?>
120
+ <?php _e( $meta['description'] ) ?>
121
  <?php endif ?>
122
 
123
  <?php if ( !empty( $meta['requirements'] ) ): ?>
124
+ <p class="description"><?php printf( __( 'Requirements: %s', 'w3-total-cache' ), apply_filters( "w3tc_extension_requirements-{$extension}", $meta['requirements'] ) ) ?></p>
 
125
  <?php do_action( "w3tc_extension_requirements-{$extension}" ) ?>
126
  <?php endif ?>
127
  </p>
inc/options/general.php CHANGED
@@ -23,11 +23,11 @@ echo sprintf( 'The plugin is currently %1$s If an option is disabled it means th
23
  <?php if ( $this->_config->is_preview() ): ?>
24
  <input type="submit" name="w3tc_config_preview_disable" class="button-primary" value="<?php _e( 'Disable', 'w3-total-cache' ); ?>" />
25
  <?php echo Util_Ui::button_link( __( 'Deploy', 'w3-total-cache' ), wp_nonce_url( sprintf( 'admin.php?page=%s&w3tc_config_preview_deploy', $this->_page ), 'w3tc' ) ); ?>
26
- <br /><span class="description"> <?php printf( __( 'To preview any changed settings (without deploying): %s', 'w3-total-cache' ), Util_Ui::preview_link() ) ?> </span>
27
  <?php else: ?>
28
  <input type="submit" name="w3tc_config_preview_enable" class="button-primary" value="<?php _e( 'Enable', 'w3-total-cache' ); ?>" />
29
  <?php endif; ?>
30
- <br /><span class="description"><?php _e( 'Use preview mode to test configuration scenarios prior to releasing them (deploy) on the actual site. Preview mode remains active even after deploying settings until the feature is disabled.', 'w3-total-cache' ); ?></span>
31
  </td>
32
  </tr>
33
  </table>
@@ -311,8 +311,8 @@ echo sprintf(
311
  <th><label for="pgcache_varnish_servers"><?php Util_Ui::e_config_label( 'varnish.servers' ) ?></label></th>
312
  <td>
313
  <textarea id="pgcache_varnish_servers" name="varnish__servers"
314
- cols="40" rows="5" <?php Util_Ui::sealing_disabled( 'varnish.' ); ?>><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'varnish.servers' ) ) ); ?></textarea><br />
315
- <span class="description"><?php _e( 'Specify the IP addresses of your varnish instances above. The <acronym title="Varnish Configuration Language">VCL</acronym>\'s <acronym title="Access Control List">ACL</acronym> must allow this request.', 'w3-total-cache' ); ?></span>
316
  </td>
317
  </tr>
318
  </table>
@@ -344,8 +344,8 @@ Util_Ui::button_config_save( 'general_varnish',
344
  <input id="cluster_messagebus_sns_region"
345
  class="w3tc-ignore-change" type="text"
346
  name="cluster__messagebus__sns__region"
347
- value="<?php echo esc_attr( $this->_config->get_string( 'cluster.messagebus.sns.region' ) ); ?>" size="60" /><br />
348
- <span class="description"><?php _e( 'Specify the Amazon <acronym title="Simple Notification Service">SNS</acronym> service endpoint hostname. If empty, then default "sns.us-east-1.amazonaws.com" will be used.', 'w3-total-cache' ); ?></span>
349
  </td>
350
  </tr>
351
  <tr>
@@ -354,8 +354,8 @@ Util_Ui::button_config_save( 'general_varnish',
354
  <input id="cluster_messagebus_sns_api_key"
355
  class="w3tc-ignore-change" type="text"
356
  name="cluster__messagebus__sns__api_key"
357
- value="<?php echo esc_attr( $this->_config->get_string( 'cluster.messagebus.sns.api_key' ) ); ?>" size="60" /><br />
358
- <span class="description"><?php _e( 'Specify the <acronym title="Application Programming Interface">API</acronym> Key.', 'w3-total-cache' ); ?></span>
359
  </td>
360
  </tr>
361
  <tr>
@@ -364,8 +364,8 @@ Util_Ui::button_config_save( 'general_varnish',
364
  <input id="cluster_messagebus_sns_api_secret"
365
  class="w3tc-ignore-change" type="text"
366
  name="cluster__messagebus__sns__api_secret"
367
- value="<?php echo esc_attr( $this->_config->get_string( 'cluster.messagebus.sns.api_secret' ) ); ?>" size="60" /><br />
368
- <span class="description"><?php _e( 'Specify the <acronym title="Application Programming Interface">API</acronym> secret.', 'w3-total-cache' ); ?></span>
369
  </td>
370
  </tr>
371
  <tr>
@@ -374,8 +374,8 @@ Util_Ui::button_config_save( 'general_varnish',
374
  <input id="cluster_messagebus_sns_topic_arn"
375
  class="w3tc-ignore-change" type="text"
376
  name="cluster__messagebus__sns__topic_arn"
377
- value="<?php echo esc_attr( $this->_config->get_string( 'cluster.messagebus.sns.topic_arn' ) ); ?>" size="60" /><br />
378
- <span class="description"><?php _e( 'Specify the <acronym title="Simple Notification Service">SNS</acronym> topic.', 'w3-total-cache' ); ?></span>
379
  </td>
380
  </tr>
381
  </table>
@@ -399,8 +399,7 @@ foreach ( $custom_areas as $area )
399
  <input id="plugin_license_key" name="plugin__license_key" type="text" value="<?php echo esc_attr( $this->_config->get_string( 'plugin.license_key' ) )?>" size="45"/>
400
  <input id="plugin_license_key_verify" type="button" class="button" value="<?php _e( 'Verify license key', 'w3-total-cache' ) ?>"/>
401
  <span class="w3tc_license_verification"></span>
402
- <br />
403
- <span class="description"><?php printf( __( 'Please enter the license key provided after %s.', 'w3-total-cache' ), '<a class="button-buy-plugin" data-src="generic_license" href="#">' . __( 'upgrading', 'w3-total-cache' ) . '</a>' )?></span>
404
  </td>
405
  </tr>
406
 
@@ -417,21 +416,21 @@ Util_Ui::config_item( array(
417
  'control' => 'checkbox',
418
  'checkbox_label' => __( 'Enable Google Page Speed dashboard widget', 'w3-total-cache' ),
419
  'description' => __( 'Display Google Page Speed results on the WordPress dashboard.', 'w3-total-cache' ),
420
- 'style' => '2'
421
  ) );
422
  ?>
423
  <tr>
424
  <th><label for="widget_pagespeed_key"><?php Util_Ui::e_config_label( 'widget.pagespeed.key' ) ?></label></th>
425
  <td>
426
- <input id="widget_pagespeed_key" type="text" name="widget__pagespeed__key" value="<?php echo esc_attr( $this->_config->get_string( 'widget.pagespeed.key' ) ); ?>" <?php Util_Ui::sealing_disabled( 'common.' ) ?> size="60" /><br />
427
- <span class="description"><?php _e( 'Learn more about obtaining a <a href="https://support.google.com/cloud/answer/6158862" target="_blank"><acronym title="Application Programming Interface">API</acronym> key here</a>.', 'w3-total-cache' ); ?></span>
428
  </td>
429
  </tr>
430
  <tr>
431
  <th><label for="widget_pagespeed_key"><?php Util_Ui::e_config_label( 'widget.pagespeed.key.restrict.referrer', 'general' ) ?></label></th>
432
  <td>
433
- <input id="widget_pagespeed_key_restrict_referrer" type="text" name="widget__pagespeed__key__restrict__referrer" value="<?php echo esc_attr( $this->_config->get_string( 'widget.pagespeed.key.restrict.referrer' ) ); ?>" size="60" /><br>
434
- <span class="description">Although not required, to prevent unauthorized use and quota theft, you have the option to restrict your key using a designated HTTP referrer. If you decide to use it, you will need to set this referrer within the API Console's "Http Referrers (web sites)" key restriction area (under Credentials).</span>
435
  </td>
436
  </tr>
437
  <?php
@@ -439,7 +438,7 @@ Util_Ui::config_item( array(
439
  'key' => 'widget.pagespeed.show_in_admin_bar',
440
  'control' => 'checkbox',
441
  'checkbox_label' => __( 'Show page rating in admin bar', 'w3-total-cache' ),
442
- 'style' => '2'
443
  ) );
444
  ?>
445
 
@@ -447,7 +446,7 @@ Util_Ui::config_item( array(
447
  <tr>
448
  <th colspan="2">
449
  <?php $this->checkbox( 'common.force_master' ) ?> <?php Util_Ui::e_config_label( 'common.force_master' ) ?></label>
450
- <br /><span class="description"><?php _e( 'Only one configuration file for whole network will be created and used. Recommended if all sites have the same configuration.', 'w3-total-cache' ); ?></span>
451
  </th>
452
  </tr>
453
  <?php endif; ?>
@@ -456,7 +455,7 @@ Util_Ui::config_item( array(
456
  <th><?php Util_Ui::e_config_label( 'config.path' ) ?></th>
457
  <td>
458
  <input type="text" name="config__path" value="<?php echo esc_attr( $this->_config->get_string( 'config.path' ) ); ?>" size="80" <?php Util_Ui::sealing_disabled( 'common.' ) ?>/>
459
- <br /><span class="description"><?php _e( 'If empty the default path will be used..', 'w3-total-cache' ); ?></span>
460
  </td>
461
  </tr>
462
  <?php endif; ?>
@@ -464,21 +463,21 @@ Util_Ui::config_item( array(
464
  <th colspan="2">
465
  <input type="hidden" name="config__check" value="0" <?php Util_Ui::sealing_disabled( 'common.' ) ?> />
466
  <label><input type="checkbox" name="config__check" value="1"<?php checked( $this->_config->get_boolean( 'config.check' ), true ); Util_Ui::sealing_disabled( 'common.' ); ?> /> <?php Util_Ui::e_config_label( 'config.check' ) ?></label>
467
- <br /><span class="description"><?php _e( 'Notify of server configuration errors, if this option is disabled, the server configuration for active settings can be found on the <a href="admin.php?page=w3tc_install">install</a> tab.', 'w3-total-cache' ); ?></span>
468
  </th>
469
  </tr>
470
  <tr>
471
  <th colspan="2">
472
  <input type="hidden" name="file_locking" value="0"<?php Util_Ui::sealing_disabled( 'common.' ) ?> />
473
  <label><input type="checkbox" name="file_locking" value="1"<?php checked( $file_locking, true ); Util_Ui::sealing_disabled( 'common.' ) ?> /> <?php _e( 'Enable file locking', 'w3-total-cache' ); ?></label>
474
- <br /><span class="description"><?php _e( 'Not recommended for <acronym title="Network File System">NFS</acronym> systems.', 'w3-total-cache' ); ?></span>
475
  </th>
476
  </tr>
477
  <tr>
478
  <th colspan="2">
479
  <input type="hidden" name="file_nfs" value="0" <?php Util_Ui::sealing_disabled( 'common.' ) ?> />
480
  <label><input type="checkbox" name="file_nfs" value="1"<?php checked( $file_nfs, true ); Util_Ui::sealing_disabled( 'common.' ); ?> /> <?php _e( 'Optimize disk enhanced page and minify disk caching for <acronym title="Network File System">NFS</acronym>', 'w3-total-cache' ); ?></label>
481
- <br /><span class="description"><?php _e( 'Try this option if your hosting environment uses a network based file system for a possible performance improvement.', 'w3-total-cache' ); ?></span>
482
  </th>
483
  </tr>
484
  <?php
@@ -486,7 +485,7 @@ Util_Ui::config_item( array(
486
  'key' => 'common.track_usage',
487
  'control' => 'checkbox',
488
  'checkbox_label' => __( 'Anonymously track usage to improve product quality', 'w3-total-cache' ),
489
- 'style' => '2'
490
  ) );
491
  ?>
492
  </table>
@@ -510,13 +509,52 @@ Util_Ui::config_item( array(
510
  <?php endif; ?>
511
  <?php $this->checkbox_debug( 'cdn.debug' ) ?> <?php Util_Ui::e_config_label( 'cdn.debug' ) ?></label><br />
512
  <?php $this->checkbox_debug( 'cdnfsd.debug' ) ?> <?php Util_Ui::e_config_label( 'cdnfsd.debug' ) ?></label><br />
513
- <?php $this->checkbox_debug( 'varnish.debug' ) ?> <?php Util_Ui::e_config_label( 'varnish.debug' ) ?></label><br />
514
  <?php if ( Util_Environment::is_w3tc_pro() ): ?>
515
- <?php $this->checkbox_debug( 'cluster.messagebus.debug' ) ?> <?php Util_Ui::e_config_label( 'cluster.messagebus.debug' ) ?></label><br />
516
- <?php endif; ?>
517
- <span class="description"><?php _e( 'If selected, detailed caching information will appear at the end of each page in a <acronym title="Hypertext Markup Language">HTML</acronym> comment. View a page\'s source code to review.', 'w3-total-cache' ); ?></span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
518
  </td>
519
  </tr>
 
520
  </table>
521
 
522
  <?php Util_Ui::button_config_save( 'general_debug' ); ?>
@@ -534,21 +572,21 @@ Util_Ui::config_item( array(
534
  <td>
535
  <input type="file" name="config_file" />
536
  <input type="submit" name="w3tc_config_import" class="w3tc-button-save button" value="<?php _e( 'Upload', 'w3-total-cache' ); ?>" />
537
- <br /><span class="description"><?php _e( 'Upload and replace the active settings file.', 'w3-total-cache' ); ?></span>
538
  </td>
539
  </tr>
540
  <tr>
541
  <th><?php _e( 'Export configuration:', 'w3-total-cache' ); ?></th>
542
  <td>
543
  <input type="submit" name="w3tc_config_export" class="button" value="<?php _e( 'Download', 'w3-total-cache' ); ?>" />
544
- <br /><span class="description"><?php _e( 'Download the active settings file.', 'w3-total-cache' ); ?></span>
545
  </td>
546
  </tr>
547
  <tr>
548
  <th><?php _e( 'Reset configuration:', 'w3-total-cache' ); ?></th>
549
  <td>
550
  <input type="submit" name="w3tc_config_reset" class="button" value="<?php _e( 'Restore Default Settings', 'w3-total-cache' ); ?>" />
551
- <br /><span class="description"><?php _e( 'Revert all settings to the defaults. Any settings staged in preview mode will not be modified.', 'w3-total-cache' ); ?></span>
552
  </td>
553
  </tr>
554
  </table>
23
  <?php if ( $this->_config->is_preview() ): ?>
24
  <input type="submit" name="w3tc_config_preview_disable" class="button-primary" value="<?php _e( 'Disable', 'w3-total-cache' ); ?>" />
25
  <?php echo Util_Ui::button_link( __( 'Deploy', 'w3-total-cache' ), wp_nonce_url( sprintf( 'admin.php?page=%s&w3tc_config_preview_deploy', $this->_page ), 'w3tc' ) ); ?>
26
+ <p class="description"> <?php printf( __( 'To preview any changed settings (without deploying): %s', 'w3-total-cache' ), Util_Ui::preview_link() ) ?> </p>
27
  <?php else: ?>
28
  <input type="submit" name="w3tc_config_preview_enable" class="button-primary" value="<?php _e( 'Enable', 'w3-total-cache' ); ?>" />
29
  <?php endif; ?>
30
+ <p class="description"><?php _e( 'Use preview mode to test configuration scenarios prior to releasing them (deploy) on the actual site. Preview mode remains active even after deploying settings until the feature is disabled.', 'w3-total-cache' ); ?></p>
31
  </td>
32
  </tr>
33
  </table>
311
  <th><label for="pgcache_varnish_servers"><?php Util_Ui::e_config_label( 'varnish.servers' ) ?></label></th>
312
  <td>
313
  <textarea id="pgcache_varnish_servers" name="varnish__servers"
314
+ cols="40" rows="5" <?php Util_Ui::sealing_disabled( 'varnish.' ); ?>><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'varnish.servers' ) ) ); ?></textarea>
315
+ <p class="description"><?php _e( 'Specify the IP addresses of your varnish instances above. The <acronym title="Varnish Configuration Language">VCL</acronym>\'s <acronym title="Access Control List">ACL</acronym> must allow this request.', 'w3-total-cache' ); ?></p>
316
  </td>
317
  </tr>
318
  </table>
344
  <input id="cluster_messagebus_sns_region"
345
  class="w3tc-ignore-change" type="text"
346
  name="cluster__messagebus__sns__region"
347
+ value="<?php echo esc_attr( $this->_config->get_string( 'cluster.messagebus.sns.region' ) ); ?>" size="60" />
348
+ <p class="description"><?php _e( 'Specify the Amazon <acronym title="Simple Notification Service">SNS</acronym> service endpoint hostname. If empty, then default "sns.us-east-1.amazonaws.com" will be used.', 'w3-total-cache' ); ?></p>
349
  </td>
350
  </tr>
351
  <tr>
354
  <input id="cluster_messagebus_sns_api_key"
355
  class="w3tc-ignore-change" type="text"
356
  name="cluster__messagebus__sns__api_key"
357
+ value="<?php echo esc_attr( $this->_config->get_string( 'cluster.messagebus.sns.api_key' ) ); ?>" size="60" />
358
+ <p class="description"><?php _e( 'Specify the <acronym title="Application Programming Interface">API</acronym> Key.', 'w3-total-cache' ); ?></p>
359
  </td>
360
  </tr>
361
  <tr>
364
  <input id="cluster_messagebus_sns_api_secret"
365
  class="w3tc-ignore-change" type="text"
366
  name="cluster__messagebus__sns__api_secret"
367
+ value="<?php echo esc_attr( $this->_config->get_string( 'cluster.messagebus.sns.api_secret' ) ); ?>" size="60" />
368
+ <p class="description"><?php _e( 'Specify the <acronym title="Application Programming Interface">API</acronym> secret.', 'w3-total-cache' ); ?></p>
369
  </td>
370
  </tr>
371
  <tr>
374
  <input id="cluster_messagebus_sns_topic_arn"
375
  class="w3tc-ignore-change" type="text"
376
  name="cluster__messagebus__sns__topic_arn"
377
+ value="<?php echo esc_attr( $this->_config->get_string( 'cluster.messagebus.sns.topic_arn' ) ); ?>" size="60" />
378
+ <p class="description"><?php _e( 'Specify the <acronym title="Simple Notification Service">SNS</acronym> topic.', 'w3-total-cache' ); ?></p>
379
  </td>
380
  </tr>
381
  </table>
399
  <input id="plugin_license_key" name="plugin__license_key" type="text" value="<?php echo esc_attr( $this->_config->get_string( 'plugin.license_key' ) )?>" size="45"/>
400
  <input id="plugin_license_key_verify" type="button" class="button" value="<?php _e( 'Verify license key', 'w3-total-cache' ) ?>"/>
401
  <span class="w3tc_license_verification"></span>
402
+ <p class="description"><?php printf( __( 'Please enter the license key provided after %s.', 'w3-total-cache' ), '<a class="button-buy-plugin" data-src="generic_license" href="#">' . __( 'upgrading', 'w3-total-cache' ) . '</a>' )?></p>
 
403
  </td>
404
  </tr>
405
 
416
  'control' => 'checkbox',
417
  'checkbox_label' => __( 'Enable Google Page Speed dashboard widget', 'w3-total-cache' ),
418
  'description' => __( 'Display Google Page Speed results on the WordPress dashboard.', 'w3-total-cache' ),
419
+ 'label_class' => 'w3tc_single_column'
420
  ) );
421
  ?>
422
  <tr>
423
  <th><label for="widget_pagespeed_key"><?php Util_Ui::e_config_label( 'widget.pagespeed.key' ) ?></label></th>
424
  <td>
425
+ <input id="widget_pagespeed_key" type="text" name="widget__pagespeed__key" value="<?php echo esc_attr( $this->_config->get_string( 'widget.pagespeed.key' ) ); ?>" <?php Util_Ui::sealing_disabled( 'common.' ) ?> size="60" />
426
+ <p class="description"><?php _e( 'Learn more about obtaining a <a href="https://support.google.com/cloud/answer/6158862" target="_blank"><acronym title="Application Programming Interface">API</acronym> key here</a>.', 'w3-total-cache' ); ?></p>
427
  </td>
428
  </tr>
429
  <tr>
430
  <th><label for="widget_pagespeed_key"><?php Util_Ui::e_config_label( 'widget.pagespeed.key.restrict.referrer', 'general' ) ?></label></th>
431
  <td>
432
+ <input id="widget_pagespeed_key_restrict_referrer" type="text" name="widget__pagespeed__key__restrict__referrer" value="<?php echo esc_attr( $this->_config->get_string( 'widget.pagespeed.key.restrict.referrer' ) ); ?>" size="60" />
433
+ <p class="description">Although not required, to prevent unauthorized use and quota theft, you have the option to restrict your key using a designated HTTP referrer. If you decide to use it, you will need to set this referrer within the API Console's "Http Referrers (web sites)" key restriction area (under Credentials).</p>
434
  </td>
435
  </tr>
436
  <?php
438
  'key' => 'widget.pagespeed.show_in_admin_bar',
439
  'control' => 'checkbox',
440
  'checkbox_label' => __( 'Show page rating in admin bar', 'w3-total-cache' ),
441
+ 'label_class' => 'w3tc_single_column'
442
  ) );
443
  ?>
444
 
446
  <tr>
447
  <th colspan="2">
448
  <?php $this->checkbox( 'common.force_master' ) ?> <?php Util_Ui::e_config_label( 'common.force_master' ) ?></label>
449
+ <p class="description"><?php _e( 'Only one configuration file for whole network will be created and used. Recommended if all sites have the same configuration.', 'w3-total-cache' ); ?></p>
450
  </th>
451
  </tr>
452
  <?php endif; ?>
455
  <th><?php Util_Ui::e_config_label( 'config.path' ) ?></th>
456
  <td>
457
  <input type="text" name="config__path" value="<?php echo esc_attr( $this->_config->get_string( 'config.path' ) ); ?>" size="80" <?php Util_Ui::sealing_disabled( 'common.' ) ?>/>
458
+ <p class="description"><?php _e( 'If empty the default path will be used..', 'w3-total-cache' ); ?></p>
459
  </td>
460
  </tr>
461
  <?php endif; ?>
463
  <th colspan="2">
464
  <input type="hidden" name="config__check" value="0" <?php Util_Ui::sealing_disabled( 'common.' ) ?> />
465
  <label><input type="checkbox" name="config__check" value="1"<?php checked( $this->_config->get_boolean( 'config.check' ), true ); Util_Ui::sealing_disabled( 'common.' ); ?> /> <?php Util_Ui::e_config_label( 'config.check' ) ?></label>
466
+ <p class="description"><?php _e( 'Notify of server configuration errors, if this option is disabled, the server configuration for active settings can be found on the <a href="admin.php?page=w3tc_install">install</a> tab.', 'w3-total-cache' ); ?></p>
467
  </th>
468
  </tr>
469
  <tr>
470
  <th colspan="2">
471
  <input type="hidden" name="file_locking" value="0"<?php Util_Ui::sealing_disabled( 'common.' ) ?> />
472
  <label><input type="checkbox" name="file_locking" value="1"<?php checked( $file_locking, true ); Util_Ui::sealing_disabled( 'common.' ) ?> /> <?php _e( 'Enable file locking', 'w3-total-cache' ); ?></label>
473
+ <p class="description"><?php _e( 'Not recommended for <acronym title="Network File System">NFS</acronym> systems.', 'w3-total-cache' ); ?></p>
474
  </th>
475
  </tr>
476
  <tr>
477
  <th colspan="2">
478
  <input type="hidden" name="file_nfs" value="0" <?php Util_Ui::sealing_disabled( 'common.' ) ?> />
479
  <label><input type="checkbox" name="file_nfs" value="1"<?php checked( $file_nfs, true ); Util_Ui::sealing_disabled( 'common.' ); ?> /> <?php _e( 'Optimize disk enhanced page and minify disk caching for <acronym title="Network File System">NFS</acronym>', 'w3-total-cache' ); ?></label>
480
+ <p class="description"><?php _e( 'Try this option if your hosting environment uses a network based file system for a possible performance improvement.', 'w3-total-cache' ); ?></p>
481
  </th>
482
  </tr>
483
  <?php
485
  'key' => 'common.track_usage',
486
  'control' => 'checkbox',
487
  'checkbox_label' => __( 'Anonymously track usage to improve product quality', 'w3-total-cache' ),
488
+ 'label_class' => 'w3tc_single_column'
489
  ) );
490
  ?>
491
  </table>
509
  <?php endif; ?>
510
  <?php $this->checkbox_debug( 'cdn.debug' ) ?> <?php Util_Ui::e_config_label( 'cdn.debug' ) ?></label><br />
511
  <?php $this->checkbox_debug( 'cdnfsd.debug' ) ?> <?php Util_Ui::e_config_label( 'cdnfsd.debug' ) ?></label><br />
512
+ <?php $this->checkbox_debug( 'varnish.debug' ) ?> <?php Util_Ui::e_config_label( 'varnish.debug' ) ?></label>
513
  <?php if ( Util_Environment::is_w3tc_pro() ): ?>
514
+ <br />
515
+ <?php $this->checkbox_debug( 'cluster.messagebus.debug' ) ?> <?php Util_Ui::e_config_label( 'cluster.messagebus.debug' ) ?></label>
516
+ <?php endif ?>
517
+ <p class="description"><?php _e( 'If selected, detailed caching information will appear at the end of each page in a <acronym title="Hypertext Markup Language">HTML</acronym> comment. View a page\'s source code to review.', 'w3-total-cache' ); ?></p>
518
+ </td>
519
+ </tr>
520
+ <tr>
521
+ <th><?php _e( 'Purge Logs:', 'w3-total-cache' ); ?></th>
522
+ <td>
523
+ <?php \W3TC\Util_Ui::pro_wrap_maybe_start() ?>
524
+
525
+ <?php
526
+ $this->checkbox_debug_pro( 'pgcache.debug_purge',
527
+ 'Page Cache Purge Log',
528
+ ' (<a href="?page=w3tc_general&view=purge_log&module=pagecache">view log</a>)' )
529
+ ?>
530
+ <br />
531
+
532
+ <?php
533
+ $this->checkbox_debug_pro( 'dbcache.debug_purge',
534
+ 'Database Cache Purge Log',
535
+ ' (<a href="?page=w3tc_general&view=purge_log&module=dbcache">view log</a>)' )
536
+ ?>
537
+ <br />
538
+
539
+ <?php
540
+ $this->checkbox_debug_pro( 'objectcache.debug_purge',
541
+ 'Object Cache Purge Log',
542
+ ' (<a href="?page=w3tc_general&view=purge_log&module=objectcache">view log</a>)' )
543
+ ?>
544
+ <br />
545
+
546
+ <?php
547
+ \W3TC\Util_Ui::pro_wrap_description(
548
+ __( 'Purge Logs provide information on when your cache has been purged and what triggered it.', 'w3-total-cache' ),
549
+ array(
550
+ __( 'If you are troubleshooting a complex issue in which you are not sure why your cache is being cleared, Purge Logs can tell you why', 'w3-total-cache' )
551
+ )
552
+ );
553
+ ?>
554
+ <?php \W3TC\Util_Ui::pro_wrap_maybe_end( 'debug_purge' ) ?>
555
  </td>
556
  </tr>
557
+
558
  </table>
559
 
560
  <?php Util_Ui::button_config_save( 'general_debug' ); ?>
572
  <td>
573
  <input type="file" name="config_file" />
574
  <input type="submit" name="w3tc_config_import" class="w3tc-button-save button" value="<?php _e( 'Upload', 'w3-total-cache' ); ?>" />
575
+ <p class="description"><?php _e( 'Upload and replace the active settings file.', 'w3-total-cache' ); ?></p>
576
  </td>
577
  </tr>
578
  <tr>
579
  <th><?php _e( 'Export configuration:', 'w3-total-cache' ); ?></th>
580
  <td>
581
  <input type="submit" name="w3tc_config_export" class="button" value="<?php _e( 'Download', 'w3-total-cache' ); ?>" />
582
+ <p class="description"><?php _e( 'Download the active settings file.', 'w3-total-cache' ); ?></p>
583
  </td>
584
  </tr>
585
  <tr>
586
  <th><?php _e( 'Reset configuration:', 'w3-total-cache' ); ?></th>
587
  <td>
588
  <input type="submit" name="w3tc_config_reset" class="button" value="<?php _e( 'Restore Default Settings', 'w3-total-cache' ); ?>" />
589
+ <p class="description"><?php _e( 'Revert all settings to the defaults. Any settings staged in preview mode will not be modified.', 'w3-total-cache' ); ?></p>
590
  </td>
591
  </tr>
592
  </table>
inc/options/minify.php CHANGED
@@ -8,57 +8,57 @@ if ( !defined( 'W3TC' ) )
8
  <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
9
 
10
  <script type="text/javascript">/*<![CDATA[*/
11
- var minify_templates = {};
12
- <?php foreach ( $templates as $theme_key => $theme_templates ): ?>
13
- minify_templates['<?php echo addslashes( $theme_key ); ?>'] = {};
14
- <?php foreach ( $theme_templates as $theme_template_key => $theme_template_name ): ?>
15
- minify_templates['<?php echo addslashes( $theme_key ); ?>']['<?php echo addslashes( $theme_template_key ); ?>'] = '<?php echo addslashes( $theme_template_name ); ?>';
16
- <?php endforeach; ?>
17
- <?php endforeach; ?>
18
  /*]]>*/</script>
19
 
20
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
21
- <p>
22
- <?php echo sprintf( __( 'Minify via %s is currently %s.', 'w3-total-cache' ), Cache::engine_name( $this->_config->get_string( 'minify.engine' ) ) , '<span class="w3tc-' . ( $minify_enabled ? 'enabled">' . __( 'enabled', 'w3-total-cache' ) : 'disabled">' . __( 'disabled', 'w3-total-cache' ) ) . '</span>' ); ?>
23
- </p>
24
- <p>
25
  <?php
26
  echo sprintf( __( 'To rebuild the minify cache use the %s operation.', 'w3-total-cache' ),
27
  Util_Ui::nonce_field( 'w3tc' ) . '<input type="submit" name="w3tc_flush_minify" value="' . __( 'empty cache', 'w3-total-cache' ) . '"' . disabled( $minify_enabled, false, false ) . ' class="button" />' );
28
  ?>
29
- <?php if ( !$auto ): ?>
30
- <?php _e( 'Get minify hints using the', 'w3-total-cache' ); ?>
31
- <input type="button" class="button button-minify-recommendations {nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}" value="<?php _e( 'help', 'w3-total-cache' ); ?>" />
32
- <?php _e( 'wizard.', 'w3-total-cache' ); ?>
33
- <?php endif; ?>
34
- <?php echo sprintf( __( '%s to make existing file modifications visible to visitors with a primed cache.', 'w3-total-cache' ),
35
  '<input type="submit" name="w3tc_flush_browser_cache" value="'. __( 'Update media query string', 'w3-total-cache' ) . '"' . disabled( ! ( $browsercache_enabled && $browsercache_update_media_qs ), true, false ) . ' class="button" />' );
36
  ?>
37
- </p>
38
  </form>
39
 
40
  <form id="minify_form" action="admin.php?page=<?php echo $this->_page; ?>" method="post">
41
- <div class="metabox-holder">
42
- <?php Util_Ui::postbox_header( __( 'General', 'w3-total-cache' ), '', 'general' ); ?>
43
- <table class="form-table">
44
- <tr>
45
- <th colspan="2">
46
- <?php
47
 
48
  $this->checkbox( 'minify.rewrite',
49
  $minify_rewrite_disabled, '', true,
50
  ( !Util_Rule::can_check_rules() ? false : null ) );
51
- ?> <?php Util_Ui::e_config_label( 'minify.rewrite' ) ?></label><br />
52
- <span class="description"><?php _e( 'If disabled, <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym> embeddings will use GET variables instead of "fancy" links.', 'w3-total-cache' ); ?></span>
53
- </th>
54
- </tr>
55
- <tr>
56
- <th colspan="2">
57
- <?php $this->checkbox( 'minify.reject.logged' ) ?> <?php Util_Ui::e_config_label( 'minify.reject.logged' ) ?></label><br />
58
- <span class="description"><?php _e( 'Authenticated users will not receive minified pages if this option is enabled.', 'w3-total-cache' ); ?></span>
59
- </th>
60
- </tr>
61
- <?php
62
  Util_Ui::config_item( array(
63
  'key' => 'minify.error.notification',
64
  'control' => 'selectbox',
@@ -73,21 +73,21 @@ Util_Ui::config_item( array(
73
  'w3-total-cache' )
74
  ) );
75
  ?>
76
- </table>
77
 
78
- <?php Util_Ui::button_config_save( 'minify_general' ); ?>
79
- <?php Util_Ui::postbox_footer(); ?>
80
 
81
- <?php Util_Ui::postbox_header( __( '<acronym title="Hypertext Markup Language">HTML</acronym> &amp; <acronym title="eXtensible Markup Language">XML</acronym>', 'w3-total-cache' ), '', 'html_xml' ); ?>
82
- <table class="form-table">
83
- <tr>
84
- <th><?php _e( '<acronym title="Hypertext Markup Language">HTML</acronym> minify settings:', 'w3-total-cache' ); ?></th>
85
- <td>
86
- <?php $this->checkbox( 'minify.html.enable' ) ?> <?php Util_Ui::e_config_label( 'minify.html.enable' ) ?></label><br />
87
- <?php $this->checkbox( 'minify.html.inline.css', false, 'html_' ) ?> <?php Util_Ui::e_config_label( 'minify.html.inline.css' ) ?></label><br />
88
- <?php $this->checkbox( 'minify.html.inline.js', false, 'html_' ) ?> <?php Util_Ui::e_config_label( 'minify.html.inline.js' ) ?></label><br />
89
- <?php $this->checkbox( 'minify.html.reject.feed', false, 'html_' ) ?> <?php Util_Ui::e_config_label( 'minify.html.reject.feed' ) ?></label><br />
90
- <?php
91
  $html_engine_file = '';
92
 
93
  switch ( $html_engine ) {
@@ -101,18 +101,18 @@ if ( file_exists( $html_engine_file ) ) {
101
  include $html_engine_file;
102
  }
103
  ?>
104
- </td>
105
- </tr>
106
- <tr>
107
- <th><label for="minify_html_comments_ignore"><?php Util_Ui::e_config_label( 'minify.html.comments.ignore' ) ?></label></th>
108
- <td>
109
- <textarea id="minify_html_comments_ignore"
110
- <?php Util_Ui::sealing_disabled( 'minify.' ) ?>
111
- name="minify__html__comments__ignore" class="html_enabled" cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'minify.html.comments.ignore' ) ) ); ?></textarea><br />
112
- <span class="description"><?php _e( 'Do not remove comments that contain these terms.', 'w3-total-cache' ); ?></span>
113
- </td>
114
- </tr>
115
- <?php
116
  $html_engine_file2 = '';
117
 
118
  switch ( $html_engine_file2 ) {
@@ -126,92 +126,92 @@ if ( file_exists( $html_engine_file2 ) ) {
126
  include $html_engine_file2;
127
  }
128
  ?>
129
- </table>
130
 
131
- <?php Util_Ui::button_config_save( 'minify_html_xml' ); ?>
132
- <?php Util_Ui::postbox_footer(); ?>
133
 
134
- <?php Util_Ui::postbox_header( __( '<acronym title="JavaScript">JS</acronym>', 'w3-total-cache' ), '', 'js' ); ?>
135
- <table class="form-table">
136
- <tr>
137
- <th><?php _e( '<acronym title="JavaScript">JS</acronym> minify settings:', 'w3-total-cache' ); ?></th>
138
- <td>
139
- <?php $this->checkbox( 'minify.js.enable' ) ?> <?php Util_Ui::e_config_label( 'minify.js.enable' ) ?></label><br />
140
- <fieldset><legend><?php _e( 'Operations in areas:', 'w3-total-cache' ); ?></legend>
141
- <table id="minify_table">
142
- <tr>
143
- <td></td>
144
- <td></td>
145
- <td class="options"><?php Util_Ui::e_config_label( 'minify.js.header.embed_type' ) ?></td>
146
- </tr>
147
- <tr>
148
- <td class="placement">
149
- <?php _e( 'Before <span class="html-tag">&lt;/head&gt;', 'w3-total-cache' ); ?></span>
150
- </td>
151
- <td class="options">
152
- <?php if ( !$auto ): ?>
153
- <?php $this->radio( 'minify.js.combine.header', false, false, 'js_' ) ?> <?php _e( 'Minify', 'w3-total-cache' ); ?> </label> <?php $this->radio( 'minify.js.combine.header', true, false, 'js_' ) ?> <?php Util_Ui::e_config_label( 'minify.js.combine.header' ) ?></label>
154
- <?php endif; ?>
155
- </td>
156
- <td class="options">
157
- <select id="js_use_type_header" name="minify__js__header__embed_type" class="js_enabled">
158
- <option value="blocking" <?php selected( 'blocking' , $this->_config->get_string( 'minify.js.header.embed_type' ) ) ?>><?php _e( 'Default (blocking)', 'w3-total-cache' ); ?></option>
159
- <option value="nb-js" <?php selected( 'nb-js' , $this->_config->get_string( 'minify.js.header.embed_type' ) ) ?>><?php _e( 'Non-blocking using JS', 'w3-total-cache' ); ?></option>
160
- <option value="nb-async" <?php selected( 'nb-async' , $this->_config->get_string( 'minify.js.header.embed_type' ) ) ?>><?php _e( 'Non-blocking using "async"', 'w3-total-cache' ); ?></option>
161
- <option value="nb-defer" <?php selected( 'nb-defer' , $this->_config->get_string( 'minify.js.header.embed_type' ) ) ?>><?php _e( 'Non-blocking using "defer"', 'w3-total-cache' ); ?></option>
162
- <?php if ( !$auto ): ?>
163
- <option value="extsrc" <?php selected( 'extsrc' , $this->_config->get_string( 'minify.js.header.embed_type' ) ) ?>><?php _e( 'Non-blocking using "extsrc"', 'w3-total-cache' ); ?></option>
164
- <option value="asyncsrc" <?php selected( 'asyncsrc' , $this->_config->get_string( 'minify.js.header.embed_type' ) ) ?>><?php _e( 'Non-blocking using "asyncsrc"', 'w3-total-cache' ); ?></option>
165
- <?php endif; ?>
166
- </select>
167
- </td>
168
- <tr>
169
- <td class="placement"><?php Util_Ui::e_config_label( 'minify.js.body.embed_type' ) ?></td>
170
- <td class="options">
171
- <?php if ( !$auto ): ?>
172
- <?php $this->radio( 'minify.js.combine.body', false, $auto, 'js_' ) ?> <?php _e( 'Minify', 'w3-total-cache' ); ?> </label> <?php $this->radio( 'minify.js.combine.body', true ) ?> <?php Util_Ui::e_config_label( 'minify.js.combine.body' ) ?></label>
173
- <?php endif; ?>
174
- </td>
175
- <td class="options">
176
- <select id="js_use_type_body" name="minify__js__body__embed_type" class="js_enabled">
177
- <option value="blocking" <?php selected( 'blocking' , $this->_config->get_string( 'minify.js.body.embed_type' ) ) ?>><?php _e( 'Default (blocking)', 'w3-total-cache' ); ?></option>
178
- <option value="nb-js" <?php selected( 'nb-js' , $this->_config->get_string( 'minify.js.body.embed_type' ) ) ?>><?php _e( 'Non-blocking using JS', 'w3-total-cache' ); ?></option>
179
- <option value="nb-async" <?php selected( 'nb-async' , $this->_config->get_string( 'minify.js.body.embed_type' ) ) ?>><?php _e( 'Non-blocking using "async"', 'w3-total-cache' ); ?></option>
180
- <option value="nb-defer" <?php selected( 'nb-defer' , $this->_config->get_string( 'minify.js.body.embed_type' ) ) ?>><?php _e( 'Non-blocking using "defer"', 'w3-total-cache' ); ?></option>
181
- <?php if ( !$auto ): ?>
182
- <option value="extsrc" <?php selected( 'extsrc' , $this->_config->get_string( 'minify.js.body.embed_type' ) ) ?>><?php _e( 'Non-blocking using "extsrc"', 'w3-total-cache' ); ?></option>
183
- <option value="asyncsrc" <?php selected( 'asyncsrc' , $this->_config->get_string( 'minify.js.body.embed_type' ) ) ?>><?php _e( 'Non-blocking using "asyncsrc"', 'w3-total-cache' ); ?></option>
184
- <?php endif; ?>
185
- </select>
186
- </td>
187
- </tr>
188
- <?php if ( !$auto ): ?>
189
- <tr>
190
- <td class="placement"><?php Util_Ui::e_config_label( 'minify.js.footer.embed_type' ) ?></td>
191
- <td class="options">
192
- <?php $this->radio( 'minify.js.combine.footer', false, $auto, 'js_' ) ?> <?php _e( 'Minify', 'w3-total-cache' ); ?> </label> <?php $this->radio( 'minify.js.combine.footer', true ) ?> <?php Util_Ui::e_config_label( 'minify.js.combine.footer' ) ?></label>
193
- </td>
194
- <td class="options">
195
- <select id="js_use_type_footer" name="minify__js__footer__embed_type" class="js_enabled">
196
- <option value="blocking" <?php selected( 'blocking' , $this->_config->get_string( 'minify.js.footer.embed_type' ) ) ?>><?php _e( 'Default (blocking)', 'w3-total-cache' ); ?></option>
197
- <option value="nb-js" <?php selected( 'nb-js' , $this->_config->get_string( 'minify.js.footer.embed_type' ) ) ?>><?php _e( 'Non-blocking using JS', 'w3-total-cache' ); ?></option>
198
- <option value="nb-async" <?php selected( 'nb-async' , $this->_config->get_string( 'minify.js.footer.embed_type' ) ) ?>><?php _e( 'Non-blocking using "async"', 'w3-total-cache' ); ?></option>
199
- <option value="nb-defer" <?php selected( 'nb-defer' , $this->_config->get_string( 'minify.js.footer.embed_type' ) ) ?>><?php _e( 'Non-blocking using "defer"', 'w3-total-cache' ); ?></option>
200
- <option value="extsrc" <?php selected( 'extsrc' , $this->_config->get_string( 'minify.js.footer.embed_type' ) ) ?>><?php _e( 'Non-blocking using "extsrc"', 'w3-total-cache' ); ?></option>
201
- <option value="asyncsrc" <?php selected( 'asyncsrc' , $this->_config->get_string( 'minify.js.footer.embed_type' ) ) ?>><?php _e( 'Non-blocking using "asyncsrc"', 'w3-total-cache' ); ?></option>
202
- </select>
203
- </td>
204
- </tr>
205
- <?php endif; ?>
206
- </table>
207
- </fieldset>
208
- <?php if ( $auto ): ?>
209
- <p>
210
- <?php $this->radio( 'minify.js.combine.header', false, false, 'js_' ) ?> <?php _e( 'Minify', 'w3-total-cache' ); ?> </label> <?php $this->radio( 'minify.js.combine.header', true, false, 'js_' ) ?> <?php Util_Ui::e_config_label( 'minify.js.combine.header' ) ?></label>
211
- </p>
212
- <?php endif; ?>
213
 
214
- <?php
215
  $js_engine_file = '';
216
 
217
  switch ( $js_engine ) {
@@ -226,9 +226,9 @@ if ( file_exists( $js_engine_file ) ) {
226
  include $js_engine_file;
227
  }
228
  ?>
229
- </td>
230
- </tr>
231
- <?php
232
  $js_engine_file2 = '';
233
 
234
  switch ( $js_engine ) {
@@ -244,97 +244,97 @@ if ( file_exists( $js_engine_file2 ) ) {
244
  include $js_engine_file2;
245
  }
246
  ?>
247
- <?php if ( !$auto ): ?>
248
- <tr>
249
- <th><?php _e( '<acronym title="JavaScript">JS</acronym> file management:', 'w3-total-cache' ); ?></th>
250
- <td>
251
- <p>
252
- <label>
253
- <?php _e( 'Theme:', 'w3-total-cache' ); ?>
254
- <select id="js_themes" class="js_enabled" name="js_theme"
255
- <?php Util_Ui::sealing_disabled( 'minify.' ) ?>>
256
- <?php foreach ( $themes as $theme_key => $theme_name ): ?>
257
- <option value="<?php echo esc_attr( $theme_key ); ?>"<?php selected( $theme_key, $js_theme ); ?>><?php echo htmlspecialchars( $theme_name ); ?><?php if ( $theme_key == $js_theme ): ?> (active)<?php endif; ?></option>
258
- <?php endforeach; ?>
259
- </select>
260
- </label>
261
- <br /><span class="description"><?php _e( 'Files are minified by template. First select the theme to manage, then add scripts used in all templates to the "All Templates" group. Use the menu above to manage scripts unique to a specific template. If necessary drag &amp; drop to resolve dependency issues (due to incorrect order).', 'w3-total-cache' ); ?></span>
262
- </p>
263
- <ul id="js_files" class="minify-files">
264
- <?php foreach ( $js_groups as $js_theme => $js_templates ): if ( isset( $templates[$js_theme] ) ): ?>
265
- <?php $index = 0; foreach ( $js_templates as $js_template => $js_locations ): ?>
266
- <?php foreach ( (array) $js_locations as $js_location => $js_config ): ?>
267
- <?php if ( ! empty( $js_config['files'] ) ): foreach ( (array) $js_config['files'] as $js_file ): $index++; ?>
268
- <li>
269
- <table>
270
- <tr>
271
- <th>&nbsp;</th>
272
- <th><?php _e( 'File URI:', 'w3-total-cache' ); ?></th>
273
- <th><?php _e( 'Template:', 'w3-total-cache' ); ?></th>
274
- <th colspan="3"><?php _e( 'Embed Location:', 'w3-total-cache' ); ?></th>
275
- </tr>
276
- <tr>
277
- <td><?php echo $index; ?>.</td>
278
- <td>
279
- <input class="js_enabled" type="text"
280
- <?php Util_Ui::sealing_disabled( 'minify.' ) ?>
281
- name="js_files[<?php echo esc_attr( $js_theme ); ?>][<?php echo esc_attr( $js_template ); ?>][<?php echo esc_attr( $js_location ); ?>][]" value="<?php echo htmlspecialchars( $js_file ); /* search w3tc-url-escaping */ ?>" size="70" />
282
- </td>
283
- <td>
284
- <select class="js_file_template js_enabled" <?php Util_Ui::sealing_disabled( 'minify.' ) ?>>
285
- <?php foreach ( $templates[$js_theme] as $theme_template_key => $theme_template_name ): ?>
286
- <option value="<?php echo esc_attr( $theme_template_key ); ?>"<?php selected( $theme_template_key, $js_template ); ?>><?php echo esc_attr( $theme_template_name ); ?></option>
287
- <?php endforeach; ?>
288
- </select>
289
- </td>
290
- <td>
291
- <select class="js_file_location js_enabled" <?php Util_Ui::sealing_disabled( 'minify.' ) ?>>
292
- <option value="include" <?php selected( $js_location, 'include' ) ?>><?php _e( 'Embed in &lt;head&gt;', 'w3-total-cache' ); ?></option>
293
- <option value="include-body" <?php selected( $js_location, 'include-body' ) ?>><?php _e( 'Embed after &lt;body&gt;', 'w3-total-cache' ); ?></option>
294
- <option value="include-footer" <?php selected( $js_location, 'include-footer' ) ?>><?php _e( 'Embed before &lt;/body&gt;', 'w3-total-cache' ); ?></option>
295
- </select>
296
- </td>
297
- <td>
298
- <input class="js_file_delete js_enabled button" type="button" value="<?php _e( 'Delete', 'w3-total-cache' ); ?>" />
299
- <input class="js_file_verify js_enabled button" type="button" value="<?php _e( 'Verify URI', 'w3-total-cache' ); ?>" />
300
- </td>
301
- </tr>
302
- </table>
303
- </li>
304
- <?php endforeach; endif; ?>
305
- <?php endforeach; ?>
306
- <?php endforeach; ?>
307
- <?php endif; endforeach; ?>
308
- </ul>
309
- <div id="js_files_empty" class="w3tc-empty" style="display: none;"><?php _e( 'No <acronym title="JavaScript">JS</acronym> files added', 'w3-total-cache' ); ?></div>
310
- <input id="js_file_add" class="js_enabled button" type="button" value="<?php _e( 'Add a script', 'w3-total-cache' ); ?>" />
311
- </td>
312
- </tr>
313
- <?php endif; ?>
314
- <?php
315
  Util_Ui::config_item( array(
316
- 'key' => 'minify.js.http2push',
317
- 'label' => '<acronym title="Hypertext Markup Language">HTTP</acronym>/2 push',
318
- 'control' => 'checkbox',
319
- 'checkbox_label' => __( 'Enable', 'w3-total-cache' ),
320
- 'description' => __( 'For better performance, send files to browser before they are requested when using the <acronym title="Hypertext Markup Language">HTTP</acronym>/2 protocol.',
321
- 'w3-total-cache' ) .
322
- ( $this->_config->get_string( 'pgcache.engine' ) != 'file_generic' ? '' :
323
- __( ' <br /><b>Not supported by "Disk: Enhanced" page cache method for Nginx</b>', 'w3-total-cache' ) )
324
- ) ); ?>
325
- </table>
326
 
327
- <?php Util_Ui::button_config_save( 'minify_js' ); ?>
328
- <?php Util_Ui::postbox_footer(); ?>
329
 
330
- <?php Util_Ui::postbox_header( __( '<acronym title="Cascading Style Sheet">CSS</acronym>', 'w3-total-cache' ), '', 'css' ); ?>
331
- <table class="form-table">
332
- <tr>
333
- <th><?php _e( '<acronym title="Cascading Style Sheet">CSS</acronym> minify settings:', 'w3-total-cache' ); ?></th>
334
- <td>
335
- <?php $this->checkbox( 'minify.css.enable' ) ?> <?php Util_Ui::e_config_label( 'minify.css.enable' ) ?></label><br />
336
- <?php $this->checkbox( 'minify.css.combine', false, 'css_' ) ?> <?php Util_Ui::e_config_label( 'minify.css.combine' ) ?></label><br />
337
- <?php
338
  $css_engine_file = '';
339
 
340
  switch ( $css_engine ) {
@@ -349,20 +349,20 @@ if ( file_exists( $css_engine_file ) ) {
349
  include $css_engine_file;
350
  }
351
  ?>
352
- </td>
353
- </tr>
354
- <tr>
355
- <th><label for="minify_css_import"><?php Util_Ui::e_config_label( 'minify.css.imports' ) ?></label></th>
356
- <td>
357
- <select id="minify_css_import" class="css_enabled" name="minify__css__imports"
358
- <?php Util_Ui::sealing_disabled( 'minify.' ) ?>>
359
- <?php foreach ( $css_imports_values as $css_imports_key => $css_imports_value ): ?>
360
- <option value="<?php echo esc_attr( $css_imports_key ); ?>"<?php selected( $css_imports, $css_imports_key ); ?>><?php echo $css_imports_value; ?></option>
361
- <?php endforeach; ?>
362
- </select>
363
- </td>
364
- </tr>
365
- <?php
366
  $css_engine_file2 = '';
367
 
368
  switch ( $css_engine ) {
@@ -377,83 +377,83 @@ if ( file_exists( $css_engine_file2 ) ) {
377
  include $css_engine_file2;
378
  }
379
  ?>
380
- <?php if ( !$auto ): ?>
381
- <tr>
382
- <th><?php _e( '<acronym title="Cascading Style Sheet">CSS</acronym> file management:', 'w3-total-cache' ); ?></th>
383
- <td>
384
- <p>
385
- <label>
386
- <?php _e( 'Theme:', 'w3-total-cache' ); ?>
387
- <select id="css_themes" class="css_enabled" name="css_theme"
388
- <?php Util_Ui::sealing_disabled( 'minify.' ) ?>>
389
- <?php foreach ( $themes as $theme_key => $theme_name ): ?>
390
- <option value="<?php echo esc_attr( $theme_key ); ?>"<?php selected( $theme_key, $css_theme ); ?>><?php echo htmlspecialchars( $theme_name ); ?><?php if ( $theme_key == $css_theme ): ?> (active)<?php endif; ?></option>
391
- <?php endforeach; ?>
392
- </select>
393
- </label>
394
- <br /><span class="description"><?php _e( 'Files are minified by template. First select the theme to manage, then add style sheets used in all templates to the "All Templates" group. Use the menu above to manage style sheets unique to a specific template. If necessary drag &amp; drop to resolve dependency issues (due to incorrect order).', 'w3-total-cache' ); ?></span>
395
- </p>
396
- <ul id="css_files" class="minify-files">
397
- <?php foreach ( $css_groups as $css_theme => $css_templates ): if ( isset( $templates[$css_theme] ) ): ?>
398
- <?php $index = 0; foreach ( $css_templates as $css_template => $css_locations ): ?>
399
- <?php foreach ( (array) $css_locations as $css_location => $css_config ): ?>
400
- <?php if ( ! empty( $css_config['files'] ) ): foreach ( (array) $css_config['files'] as $css_file ): $index++; ?>
401
- <li>
402
- <table>
403
- <tr>
404
- <th>&nbsp;</th>
405
- <th><?php _e( 'File URI:', 'w3-total-cache' ); ?></th>
406
- <th colspan="2"><?php _e( 'Template:', 'w3-total-cache' ); ?></th>
407
- </tr>
408
- <tr>
409
- <td><?php echo $index; ?>.</td>
410
- <td>
411
- <input class="css_enabled" type="text"
412
- <?php Util_Ui::sealing_disabled( 'minify.' ) ?>
413
- name="css_files[<?php echo esc_attr( $css_theme ); ?>][<?php echo esc_attr( $css_template ); ?>][<?php echo esc_attr( $css_location ); ?>][]" value="<?php echo htmlspecialchars( $css_file ); /* search w3tc-url-escaping */ ?>" size="70" /><br />
414
- </td>
415
- <td>
416
- <select class="css_file_template css_enabled" <?php Util_Ui::sealing_disabled( 'minify.' ) ?>>
417
- <?php foreach ( $templates[$css_theme] as $theme_template_key => $theme_template_name ): ?>
418
- <option value="<?php echo esc_attr( $theme_template_key ); ?>"<?php selected( $theme_template_key, $css_template ); ?>><?php echo esc_attr( $theme_template_name ); ?></option>
419
- <?php endforeach; ?>
420
- </select>
421
- </td>
422
- <td>
423
- <input class="css_file_delete css_enabled button" type="button" value="<?php _e( 'Delete', 'w3-total-cache' ); ?>" />
424
- <input class="css_file_verify css_enabled button" type="button" value="<?php _e( 'Verify URI', 'w3-total-cache' ); ?>" />
425
- </td>
426
- </tr>
427
- </table>
428
- </li>
429
- <?php endforeach; endif; ?>
430
- <?php endforeach; ?>
431
- <?php endforeach; ?>
432
- <?php endif; endforeach; ?>
433
- </ul>
434
- <div id="css_files_empty" class="w3tc-empty" style="display: none;"><?php _e( 'No <acronym title="Cascading Style Sheet">CSS</acronym> files added', 'w3-total-cache' ); ?></div>
435
- <input id="css_file_add" class="css_enabled button" type="button" value="<?php _e( 'Add a style sheet', 'w3-total-cache' ); ?>" />
436
- </td>
437
- </tr>
438
- <?php endif; ?>
439
- <?php
440
  Util_Ui::config_item( array(
441
- 'key' => 'minify.css.http2push',
442
- 'label' => '<acronym title="Hypertext Markup Language">HTTP</acronym>/2 push',
443
- 'control' => 'checkbox',
444
- 'checkbox_label' => __( 'Enable', 'w3-total-cache' ),
445
- 'description' => __( 'For better performance, send files to browser before they are requested when using the <acronym title="Hypertext Markup Language">HTTP</acronym>/2 protocol.',
446
- 'w3-total-cache' ) .
447
- ( $this->_config->get_string( 'pgcache.engine' ) != 'file_generic' ? '' :
448
- __( ' <br /><b>Not supported by "Disk: Enhanced" page cache method for Nginx</b>', 'w3-total-cache' ) )
449
- ) ); ?>
450
- </table>
451
 
452
- <?php Util_Ui::button_config_save( 'minify_css' ); ?>
453
- <?php Util_Ui::postbox_footer(); ?>
454
 
455
- <?php Util_Ui::postbox_header( __( 'Advanced', 'w3-total-cache' ), '', 'advanced' ); ?>
456
- <table class="form-table">
457
  <?php
458
  if ( $this->_config->get_string( 'minify.engine' ) == 'memcached' ) {
459
  $module = 'minify';
@@ -463,93 +463,93 @@ if ( $this->_config->get_string( 'minify.engine' ) == 'memcached' ) {
463
  include W3TC_INC_DIR . '/options/parts/redis.php';
464
  }
465
  ?>
466
- <tr>
467
- <th><label for="minify_lifetime"><?php Util_Ui::e_config_label( 'minify.lifetime' ) ?></label></th>
468
- <td>
469
- <input id="minify_lifetime" type="text" name="minify__lifetime"
470
- <?php Util_Ui::sealing_disabled( 'minify.' ) ?>
471
- value="<?php echo esc_attr( $this->_config->get_integer( 'minify.lifetime' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?><br />
472
- <span class="description"><?php _e( 'Specify the interval between download and update of external files in the minify cache. Hint: 6 hours is 21600 seconds. 12 hours is 43200 seconds. 24 hours is 86400 seconds.', 'w3-total-cache' ); ?></span>
473
- </td>
474
- </tr>
475
- <tr>
476
- <th><label for="minify_file_gc"><?php Util_Ui::e_config_label( 'minify.file.gc' ) ?></label></th>
477
- <td>
478
- <input id="minify_file_gc" type="text" name="minify__file__gc"
479
- <?php Util_Ui::sealing_disabled( 'minify.' ) ?>
480
- value="<?php echo esc_attr( $this->_config->get_integer( 'minify.file.gc' ) ); ?>" size="8"<?php if ( $this->_config->get_string( 'minify.engine' ) != 'file' ): ?> disabled="disabled"<?php endif; ?> /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
481
- <br /><span class="description"><?php _e( 'If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.', 'w3-total-cache' ); ?></span>
482
- </td>
483
- </tr>
484
- <tr>
485
- <th><label for="minify_reject_uri"><?php Util_Ui::e_config_label( 'minify.reject.uri' ) ?></label></th>
486
- <td>
487
- <textarea id="minify_reject_uri" name="minify__reject__uri"
488
- <?php Util_Ui::sealing_disabled( 'minify.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'minify.reject.uri' ) ) ); ?></textarea><br />
489
- <span class="description"><?php _e( 'Always ignore the specified pages / directories. Use relative paths. Omit: protocol, hostname, leading forward slash and query strings.', 'w3-total-cache' ); ?></span>
490
- </td>
491
- </tr>
492
- <tr>
493
- <th><label for="minify_reject_files_js"><?php Util_Ui::e_config_label( 'minify.reject.files.js' ) ?></label></th>
494
- <td>
495
- <textarea id="minify_reject_files_js" name="minify__reject__files__js"
496
- <?php Util_Ui::sealing_disabled( 'minify.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'minify.reject.files.js' ) ) ); ?></textarea><br />
497
- <span class="description"><?php _e( 'Always ignore the specified <acronym title="JavaScript">JS</acronym> files. Use relative paths. Omit: protocol, hostname, leading forward slash and query strings.', 'w3-total-cache' ); ?></span>
498
- </td>
499
- </tr>
500
- <tr>
501
- <th><label for="minify_reject_files_css"><?php Util_Ui::e_config_label( 'minify.reject.files.css' ) ?></label></th>
502
- <td>
503
- <textarea id="minify_reject_files_css" name="minify__reject__files__css"
504
- <?php Util_Ui::sealing_disabled( 'minify.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'minify.reject.files.css' ) ) ); ?></textarea><br />
505
- <span class="description"><?php _e( 'Always ignore the specified <acronym title="Cascading Style Sheet">CSS</acronym> files. Use relative paths. Omit: protocol, hostname, leading forward slash and query strings.', 'w3-total-cache' ); ?></span>
506
- </td>
507
- </tr>
508
- <tr>
509
- <th><label for="minify_reject_ua"><?php Util_Ui::e_config_label( 'minify.reject.ua' ) ?></label></th>
510
- <td>
511
- <textarea id="minify_reject_ua" name="minify__reject__ua"
512
- <?php Util_Ui::sealing_disabled( 'minify.' ) ?>
513
- cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'minify.reject.ua' ) ) ); ?></textarea><br />
514
- <span class="description"><?php _e( 'Specify user agents that will never receive minified content.', 'w3-total-cache' ); ?></span>
515
- </td>
516
- </tr>
517
- <?php if ( $auto ): ?>
518
- <tr>
519
- <th><label for="minify_cache_files"><?php Util_Ui::e_config_label( 'minify.cache.files' ) ?></label></th>
520
- <td>
521
- <textarea id="minify_cache_files" name="minify__cache__files"
522
- <?php Util_Ui::sealing_disabled( 'minify.' ) ?>
523
- cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'minify.cache.files' ) ) ); ?></textarea><br />
524
- <span class="description"><?php _e( 'Specify external files/libraries that should be combined.', 'w3-total-cache' ); ?></span>
525
- </td>
526
- </tr>
527
- <tr>
528
- <th colspan="2">
529
- <?php $this->checkbox( 'minify.cache.files_regexp', false, '', true, null ); ?>
530
- <?php _e( 'Use Regular Expressions for file name matching', 'w3-total-cache' ) ?><br />
531
- <span class="description"><?php _e( 'If external script file names vary, use regular expressions in the "Include external files/libraries" field to simplify matching.', 'w3-total-cache' ); ?></span>
532
- </th>
533
- </tr>
534
- <?php endif; ?>
535
- </table>
536
 
537
- <?php Util_Ui::button_config_save( 'minify_advanced' ); ?>
538
- <?php Util_Ui::postbox_footer(); ?>
539
 
540
- <?php Util_Ui::postbox_header( __( 'Note(s):', 'w3-total-cache' ), '', 'notes' ); ?>
541
- <table class="form-table">
542
- <tr>
543
- <th colspan="2">
544
- <ul>
545
- <li><?php _e( 'Enable <acronym title="Hypertext Transfer Protocol">HTTP</acronym> compression in the "Cascading Style Sheets &amp; JavaScript" section on <a href="admin.php?page=w3tc_browsercache">Browser Cache</a> Settings tab.', 'w3-total-cache' ); ?></li>
546
- <li><?php _e( 'The <acronym title="Time to Live">TTL</acronym> of page cache files is set via the "Expires header lifetime" field in the "Cascading Style Sheets &amp; JavaScript" section on <a href="admin.php?page=w3tc_browsercache">Browser Cache</a> Settings tab.', 'w3-total-cache' ); ?></li>
547
- </ul>
548
- </th>
549
- </tr>
550
- </table>
551
- <?php Util_Ui::postbox_footer(); ?>
552
- </div>
553
  </form>
554
 
555
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
8
  <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
9
 
10
  <script type="text/javascript">/*<![CDATA[*/
11
+ var minify_templates = {};
12
+ <?php foreach ( $templates as $theme_key => $theme_templates ): ?>
13
+ minify_templates['<?php echo addslashes( $theme_key ); ?>'] = {};
14
+ <?php foreach ( $theme_templates as $theme_template_key => $theme_template_name ): ?>
15
+ minify_templates['<?php echo addslashes( $theme_key ); ?>']['<?php echo addslashes( $theme_template_key ); ?>'] = '<?php echo addslashes( $theme_template_name ); ?>';
16
+ <?php endforeach; ?>
17
+ <?php endforeach; ?>
18
  /*]]>*/</script>
19
 
20
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
21
+ <p>
22
+ <?php echo sprintf( __( 'Minify via %s is currently %s.', 'w3-total-cache' ), Cache::engine_name( $this->_config->get_string( 'minify.engine' ) ) , '<span class="w3tc-' . ( $minify_enabled ? 'enabled">' . __( 'enabled', 'w3-total-cache' ) : 'disabled">' . __( 'disabled', 'w3-total-cache' ) ) . '</span>' ); ?>
23
+ </p>
24
+ <p>
25
  <?php
26
  echo sprintf( __( 'To rebuild the minify cache use the %s operation.', 'w3-total-cache' ),
27
  Util_Ui::nonce_field( 'w3tc' ) . '<input type="submit" name="w3tc_flush_minify" value="' . __( 'empty cache', 'w3-total-cache' ) . '"' . disabled( $minify_enabled, false, false ) . ' class="button" />' );
28
  ?>
29
+ <?php if ( !$auto ): ?>
30
+ <?php _e( 'Get minify hints using the', 'w3-total-cache' ); ?>
31
+ <input type="button" class="button button-minify-recommendations {nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}" value="<?php _e( 'help', 'w3-total-cache' ); ?>" />
32
+ <?php _e( 'wizard.', 'w3-total-cache' ); ?>
33
+ <?php endif; ?>
34
+ <?php echo sprintf( __( '%s to make existing file modifications visible to visitors with a primed cache.', 'w3-total-cache' ),
35
  '<input type="submit" name="w3tc_flush_browser_cache" value="'. __( 'Update media query string', 'w3-total-cache' ) . '"' . disabled( ! ( $browsercache_enabled && $browsercache_update_media_qs ), true, false ) . ' class="button" />' );
36
  ?>
37
+ </p>
38
  </form>
39
 
40
  <form id="minify_form" action="admin.php?page=<?php echo $this->_page; ?>" method="post">
41
+ <div class="metabox-holder">
42
+ <?php Util_Ui::postbox_header( __( 'General', 'w3-total-cache' ), '', 'general' ); ?>
43
+ <table class="form-table">
44
+ <tr>
45
+ <th colspan="2">
46
+ <?php
47
 
48
  $this->checkbox( 'minify.rewrite',
49
  $minify_rewrite_disabled, '', true,
50
  ( !Util_Rule::can_check_rules() ? false : null ) );
51
+ ?> <?php Util_Ui::e_config_label( 'minify.rewrite' ) ?></label>
52
+ <p class="description"><?php _e( 'If disabled, <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym> embeddings will use GET variables instead of "fancy" links.', 'w3-total-cache' ); ?></p>
53
+ </th>
54
+ </tr>
55
+ <tr>
56
+ <th colspan="2">
57
+ <?php $this->checkbox( 'minify.reject.logged' ) ?> <?php Util_Ui::e_config_label( 'minify.reject.logged' ) ?></label>
58
+ <p class="description"><?php _e( 'Authenticated users will not receive minified pages if this option is enabled.', 'w3-total-cache' ); ?></p>
59
+ </th>
60
+ </tr>
61
+ <?php
62
  Util_Ui::config_item( array(
63
  'key' => 'minify.error.notification',
64
  'control' => 'selectbox',
73
  'w3-total-cache' )
74
  ) );
75
  ?>
76
+ </table>
77
 
78
+ <?php Util_Ui::button_config_save( 'minify_general' ); ?>
79
+ <?php Util_Ui::postbox_footer(); ?>
80
 
81
+ <?php Util_Ui::postbox_header( __( '<acronym title="Hypertext Markup Language">HTML</acronym> &amp; <acronym title="eXtensible Markup Language">XML</acronym>', 'w3-total-cache' ), '', 'html_xml' ); ?>
82
+ <table class="form-table">
83
+ <tr>
84
+ <th><?php _e( '<acronym title="Hypertext Markup Language">HTML</acronym> minify settings:', 'w3-total-cache' ); ?></th>
85
+ <td>
86
+ <?php $this->checkbox( 'minify.html.enable' ) ?> <?php Util_Ui::e_config_label( 'minify.html.enable' ) ?></label><br />
87
+ <?php $this->checkbox( 'minify.html.inline.css', false, 'html_' ) ?> <?php Util_Ui::e_config_label( 'minify.html.inline.css' ) ?></label><br />
88
+ <?php $this->checkbox( 'minify.html.inline.js', false, 'html_' ) ?> <?php Util_Ui::e_config_label( 'minify.html.inline.js' ) ?></label><br />
89
+ <?php $this->checkbox( 'minify.html.reject.feed', false, 'html_' ) ?> <?php Util_Ui::e_config_label( 'minify.html.reject.feed' ) ?></label><br />
90
+ <?php
91
  $html_engine_file = '';
92
 
93
  switch ( $html_engine ) {
101
  include $html_engine_file;
102
  }
103
  ?>
104
+ </td>
105
+ </tr>
106
+ <tr>
107
+ <th><label for="minify_html_comments_ignore"><?php Util_Ui::e_config_label( 'minify.html.comments.ignore' ) ?></label></th>
108
+ <td>
109
+ <textarea id="minify_html_comments_ignore"
110
+ <?php Util_Ui::sealing_disabled( 'minify.' ) ?>
111
+ name="minify__html__comments__ignore" class="html_enabled" cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'minify.html.comments.ignore' ) ) ); ?></textarea>
112
+ <p class="description"><?php _e( 'Do not remove comments that contain these terms.', 'w3-total-cache' ); ?></p>
113
+ </td>
114
+ </tr>
115
+ <?php
116
  $html_engine_file2 = '';
117
 
118
  switch ( $html_engine_file2 ) {
126
  include $html_engine_file2;
127
  }
128
  ?>
129
+ </table>
130
 
131
+ <?php Util_Ui::button_config_save( 'minify_html_xml' ); ?>
132
+ <?php Util_Ui::postbox_footer(); ?>
133
 
134
+ <?php Util_Ui::postbox_header( __( '<acronym title="JavaScript">JS</acronym>', 'w3-total-cache' ), '', 'js' ); ?>
135
+ <table class="form-table">
136
+ <tr>
137
+ <th><?php _e( '<acronym title="JavaScript">JS</acronym> minify settings:', 'w3-total-cache' ); ?></th>
138
+ <td>
139
+ <?php $this->checkbox( 'minify.js.enable' ) ?> <?php Util_Ui::e_config_label( 'minify.js.enable' ) ?></label><br />
140
+ <fieldset><legend><?php _e( 'Operations in areas:', 'w3-total-cache' ); ?></legend>
141
+ <table id="minify_table">
142
+ <tr>
143
+ <td></td>
144
+ <td></td>
145
+ <td class="options"><?php Util_Ui::e_config_label( 'minify.js.header.embed_type' ) ?></td>
146
+ </tr>
147
+ <tr>
148
+ <td class="placement">
149
+ <?php _e( 'Before <span class="html-tag">&lt;/head&gt;', 'w3-total-cache' ); ?></span>
150
+ </td>
151
+ <td class="options">
152
+ <?php if ( !$auto ): ?>
153
+ <?php $this->radio( 'minify.js.combine.header', false, false, 'js_' ) ?> <?php _e( 'Minify', 'w3-total-cache' ); ?> </label> <?php $this->radio( 'minify.js.combine.header', true, false, 'js_' ) ?> <?php Util_Ui::e_config_label( 'minify.js.combine.header' ) ?></label>
154
+ <?php endif; ?>
155
+ </td>
156
+ <td class="options">
157
+ <select id="js_use_type_header" name="minify__js__header__embed_type" class="js_enabled">
158
+ <option value="blocking" <?php selected( 'blocking' , $this->_config->get_string( 'minify.js.header.embed_type' ) ) ?>><?php _e( 'Default (blocking)', 'w3-total-cache' ); ?></option>
159
+ <option value="nb-js" <?php selected( 'nb-js' , $this->_config->get_string( 'minify.js.header.embed_type' ) ) ?>><?php _e( 'Non-blocking using JS', 'w3-total-cache' ); ?></option>
160
+ <option value="nb-async" <?php selected( 'nb-async' , $this->_config->get_string( 'minify.js.header.embed_type' ) ) ?>><?php _e( 'Non-blocking using "async"', 'w3-total-cache' ); ?></option>
161
+ <option value="nb-defer" <?php selected( 'nb-defer' , $this->_config->get_string( 'minify.js.header.embed_type' ) ) ?>><?php _e( 'Non-blocking using "defer"', 'w3-total-cache' ); ?></option>
162
+ <?php if ( !$auto ): ?>
163
+ <option value="extsrc" <?php selected( 'extsrc' , $this->_config->get_string( 'minify.js.header.embed_type' ) ) ?>><?php _e( 'Non-blocking using "extsrc"', 'w3-total-cache' ); ?></option>
164
+ <option value="asyncsrc" <?php selected( 'asyncsrc' , $this->_config->get_string( 'minify.js.header.embed_type' ) ) ?>><?php _e( 'Non-blocking using "asyncsrc"', 'w3-total-cache' ); ?></option>
165
+ <?php endif; ?>
166
+ </select>
167
+ </td>
168
+ <tr>
169
+ <td class="placement"><?php Util_Ui::e_config_label( 'minify.js.body.embed_type' ) ?></td>
170
+ <td class="options">
171
+ <?php if ( !$auto ): ?>
172
+ <?php $this->radio( 'minify.js.combine.body', false, $auto, 'js_' ) ?> <?php _e( 'Minify', 'w3-total-cache' ); ?> </label> <?php $this->radio( 'minify.js.combine.body', true ) ?> <?php Util_Ui::e_config_label( 'minify.js.combine.body' ) ?></label>
173
+ <?php endif; ?>
174
+ </td>
175
+ <td class="options">
176
+ <select id="js_use_type_body" name="minify__js__body__embed_type" class="js_enabled">
177
+ <option value="blocking" <?php selected( 'blocking' , $this->_config->get_string( 'minify.js.body.embed_type' ) ) ?>><?php _e( 'Default (blocking)', 'w3-total-cache' ); ?></option>
178
+ <option value="nb-js" <?php selected( 'nb-js' , $this->_config->get_string( 'minify.js.body.embed_type' ) ) ?>><?php _e( 'Non-blocking using JS', 'w3-total-cache' ); ?></option>
179
+ <option value="nb-async" <?php selected( 'nb-async' , $this->_config->get_string( 'minify.js.body.embed_type' ) ) ?>><?php _e( 'Non-blocking using "async"', 'w3-total-cache' ); ?></option>
180
+ <option value="nb-defer" <?php selected( 'nb-defer' , $this->_config->get_string( 'minify.js.body.embed_type' ) ) ?>><?php _e( 'Non-blocking using "defer"', 'w3-total-cache' ); ?></option>
181
+ <?php if ( !$auto ): ?>
182
+ <option value="extsrc" <?php selected( 'extsrc' , $this->_config->get_string( 'minify.js.body.embed_type' ) ) ?>><?php _e( 'Non-blocking using "extsrc"', 'w3-total-cache' ); ?></option>
183
+ <option value="asyncsrc" <?php selected( 'asyncsrc' , $this->_config->get_string( 'minify.js.body.embed_type' ) ) ?>><?php _e( 'Non-blocking using "asyncsrc"', 'w3-total-cache' ); ?></option>
184
+ <?php endif; ?>
185
+ </select>
186
+ </td>
187
+ </tr>
188
+ <?php if ( !$auto ): ?>
189
+ <tr>
190
+ <td class="placement"><?php Util_Ui::e_config_label( 'minify.js.footer.embed_type' ) ?></td>
191
+ <td class="options">
192
+ <?php $this->radio( 'minify.js.combine.footer', false, $auto, 'js_' ) ?> <?php _e( 'Minify', 'w3-total-cache' ); ?> </label> <?php $this->radio( 'minify.js.combine.footer', true ) ?> <?php Util_Ui::e_config_label( 'minify.js.combine.footer' ) ?></label>
193
+ </td>
194
+ <td class="options">
195
+ <select id="js_use_type_footer" name="minify__js__footer__embed_type" class="js_enabled">
196
+ <option value="blocking" <?php selected( 'blocking' , $this->_config->get_string( 'minify.js.footer.embed_type' ) ) ?>><?php _e( 'Default (blocking)', 'w3-total-cache' ); ?></option>
197
+ <option value="nb-js" <?php selected( 'nb-js' , $this->_config->get_string( 'minify.js.footer.embed_type' ) ) ?>><?php _e( 'Non-blocking using JS', 'w3-total-cache' ); ?></option>
198
+ <option value="nb-async" <?php selected( 'nb-async' , $this->_config->get_string( 'minify.js.footer.embed_type' ) ) ?>><?php _e( 'Non-blocking using "async"', 'w3-total-cache' ); ?></option>
199
+ <option value="nb-defer" <?php selected( 'nb-defer' , $this->_config->get_string( 'minify.js.footer.embed_type' ) ) ?>><?php _e( 'Non-blocking using "defer"', 'w3-total-cache' ); ?></option>
200
+ <option value="extsrc" <?php selected( 'extsrc' , $this->_config->get_string( 'minify.js.footer.embed_type' ) ) ?>><?php _e( 'Non-blocking using "extsrc"', 'w3-total-cache' ); ?></option>
201
+ <option value="asyncsrc" <?php selected( 'asyncsrc' , $this->_config->get_string( 'minify.js.footer.embed_type' ) ) ?>><?php _e( 'Non-blocking using "asyncsrc"', 'w3-total-cache' ); ?></option>
202
+ </select>
203
+ </td>
204
+ </tr>
205
+ <?php endif; ?>
206
+ </table>
207
+ </fieldset>
208
+ <?php if ( $auto ): ?>
209
+ <p>
210
+ <?php $this->radio( 'minify.js.combine.header', false, false, 'js_' ) ?> <?php _e( 'Minify', 'w3-total-cache' ); ?> </label> <?php $this->radio( 'minify.js.combine.header', true, false, 'js_' ) ?> <?php Util_Ui::e_config_label( 'minify.js.combine.header' ) ?></label>
211
+ </p>
212
+ <?php endif; ?>
213
 
214
+ <?php
215
  $js_engine_file = '';
216
 
217
  switch ( $js_engine ) {
226
  include $js_engine_file;
227
  }
228
  ?>
229
+ </td>
230
+ </tr>
231
+ <?php
232
  $js_engine_file2 = '';
233
 
234
  switch ( $js_engine ) {
244
  include $js_engine_file2;
245
  }
246
  ?>
247
+ <?php if ( !$auto ): ?>
248
+ <tr>
249
+ <th><?php _e( '<acronym title="JavaScript">JS</acronym> file management:', 'w3-total-cache' ); ?></th>
250
+ <td>
251
+ <p>
252
+ <label>
253
+ <?php _e( 'Theme:', 'w3-total-cache' ); ?>
254
+ <select id="js_themes" class="js_enabled" name="js_theme"
255
+ <?php Util_Ui::sealing_disabled( 'minify.' ) ?>>
256
+ <?php foreach ( $themes as $theme_key => $theme_name ): ?>
257
+ <option value="<?php echo esc_attr( $theme_key ); ?>"<?php selected( $theme_key, $js_theme ); ?>><?php echo htmlspecialchars( $theme_name ); ?><?php if ( $theme_key == $js_theme ): ?> (active)<?php endif; ?></option>
258
+ <?php endforeach; ?>
259
+ </select>
260
+ </label>
261
+ <p class="description"><?php _e( 'Files are minified by template. First select the theme to manage, then add scripts used in all templates to the "All Templates" group. Use the menu above to manage scripts unique to a specific template. If necessary drag &amp; drop to resolve dependency issues (due to incorrect order).', 'w3-total-cache' ); ?></p>
262
+ </p>
263
+ <ul id="js_files" class="minify-files">
264
+ <?php foreach ( $js_groups as $js_theme => $js_templates ): if ( isset( $templates[$js_theme] ) ): ?>
265
+ <?php $index = 0; foreach ( $js_templates as $js_template => $js_locations ): ?>
266
+ <?php foreach ( (array) $js_locations as $js_location => $js_config ): ?>
267
+ <?php if ( ! empty( $js_config['files'] ) ): foreach ( (array) $js_config['files'] as $js_file ): $index++; ?>
268
+ <li>
269
+ <table>
270
+ <tr>
271
+ <th>&nbsp;</th>
272
+ <th><?php _e( 'File URI:', 'w3-total-cache' ); ?></th>
273
+ <th><?php _e( 'Template:', 'w3-total-cache' ); ?></th>
274
+ <th colspan="3"><?php _e( 'Embed Location:', 'w3-total-cache' ); ?></th>
275
+ </tr>
276
+ <tr>
277
+ <td><?php echo $index; ?>.</td>
278
+ <td>
279
+ <input class="js_enabled" type="text"
280
+ <?php Util_Ui::sealing_disabled( 'minify.' ) ?>
281
+ name="js_files[<?php echo esc_attr( $js_theme ); ?>][<?php echo esc_attr( $js_template ); ?>][<?php echo esc_attr( $js_location ); ?>][]" value="<?php echo htmlspecialchars( $js_file ); /* search w3tc-url-escaping */ ?>" size="70" />
282
+ </td>
283
+ <td>
284
+ <select class="js_file_template js_enabled" <?php Util_Ui::sealing_disabled( 'minify.' ) ?>>
285
+ <?php foreach ( $templates[$js_theme] as $theme_template_key => $theme_template_name ): ?>
286
+ <option value="<?php echo esc_attr( $theme_template_key ); ?>"<?php selected( $theme_template_key, $js_template ); ?>><?php echo esc_attr( $theme_template_name ); ?></option>
287
+ <?php endforeach; ?>
288
+ </select>
289
+ </td>
290
+ <td>
291
+ <select class="js_file_location js_enabled" <?php Util_Ui::sealing_disabled( 'minify.' ) ?>>
292
+ <option value="include" <?php selected( $js_location, 'include' ) ?>><?php _e( 'Embed in &lt;head&gt;', 'w3-total-cache' ); ?></option>
293
+ <option value="include-body" <?php selected( $js_location, 'include-body' ) ?>><?php _e( 'Embed after &lt;body&gt;', 'w3-total-cache' ); ?></option>
294
+ <option value="include-footer" <?php selected( $js_location, 'include-footer' ) ?>><?php _e( 'Embed before &lt;/body&gt;', 'w3-total-cache' ); ?></option>
295
+ </select>
296
+ </td>
297
+ <td>
298
+ <input class="js_file_delete js_enabled button" type="button" value="<?php _e( 'Delete', 'w3-total-cache' ); ?>" />
299
+ <input class="js_file_verify js_enabled button" type="button" value="<?php _e( 'Verify URI', 'w3-total-cache' ); ?>" />
300
+ </td>
301
+ </tr>
302
+ </table>
303
+ </li>
304
+ <?php endforeach; endif; ?>
305
+ <?php endforeach; ?>
306
+ <?php endforeach; ?>
307
+ <?php endif; endforeach; ?>
308
+ </ul>
309
+ <div id="js_files_empty" class="w3tc-empty" style="display: none;"><?php _e( 'No <acronym title="JavaScript">JS</acronym> files added', 'w3-total-cache' ); ?></div>
310
+ <input id="js_file_add" class="js_enabled button" type="button" value="<?php _e( 'Add a script', 'w3-total-cache' ); ?>" />
311
+ </td>
312
+ </tr>
313
+ <?php endif; ?>
314
+ <?php
315
  Util_Ui::config_item( array(
316
+ 'key' => 'minify.js.http2push',
317
+ 'label' => '<acronym title="Hypertext Markup Language">HTTP</acronym>/2 push',
318
+ 'control' => 'checkbox',
319
+ 'checkbox_label' => __( 'Enable', 'w3-total-cache' ),
320
+ 'description' => __( 'For better performance, send files to browser before they are requested when using the <acronym title="Hypertext Markup Language">HTTP</acronym>/2 protocol.',
321
+ 'w3-total-cache' ) .
322
+ ( $this->_config->get_string( 'pgcache.engine' ) != 'file_generic' ? '' :
323
+ __( ' <br /><b>Not supported by "Disk: Enhanced" page cache method for Nginx</b>', 'w3-total-cache' ) )
324
+ ) ); ?>
325
+ </table>
326
 
327
+ <?php Util_Ui::button_config_save( 'minify_js' ); ?>
328
+ <?php Util_Ui::postbox_footer(); ?>
329
 
330
+ <?php Util_Ui::postbox_header( __( '<acronym title="Cascading Style Sheet">CSS</acronym>', 'w3-total-cache' ), '', 'css' ); ?>
331
+ <table class="form-table">
332
+ <tr>
333
+ <th><?php _e( '<acronym title="Cascading Style Sheet">CSS</acronym> minify settings:', 'w3-total-cache' ); ?></th>
334
+ <td>
335
+ <?php $this->checkbox( 'minify.css.enable' ) ?> <?php Util_Ui::e_config_label( 'minify.css.enable' ) ?></label><br />
336
+ <?php $this->checkbox( 'minify.css.combine', false, 'css_' ) ?> <?php Util_Ui::e_config_label( 'minify.css.combine' ) ?></label><br />
337
+ <?php
338
  $css_engine_file = '';
339
 
340
  switch ( $css_engine ) {
349
  include $css_engine_file;
350
  }
351
  ?>
352
+ </td>
353
+ </tr>
354
+ <tr>
355
+ <th><label for="minify_css_import"><?php Util_Ui::e_config_label( 'minify.css.imports' ) ?></label></th>
356
+ <td>
357
+ <select id="minify_css_import" class="css_enabled" name="minify__css__imports"
358
+ <?php Util_Ui::sealing_disabled( 'minify.' ) ?>>
359
+ <?php foreach ( $css_imports_values as $css_imports_key => $css_imports_value ): ?>
360
+ <option value="<?php echo esc_attr( $css_imports_key ); ?>"<?php selected( $css_imports, $css_imports_key ); ?>><?php echo $css_imports_value; ?></option>
361
+ <?php endforeach; ?>
362
+ </select>
363
+ </td>
364
+ </tr>
365
+ <?php
366
  $css_engine_file2 = '';
367
 
368
  switch ( $css_engine ) {
377
  include $css_engine_file2;
378
  }
379
  ?>
380
+ <?php if ( !$auto ): ?>
381
+ <tr>
382
+ <th><?php _e( '<acronym title="Cascading Style Sheet">CSS</acronym> file management:', 'w3-total-cache' ); ?></th>
383
+ <td>
384
+ <p>
385
+ <label>
386
+ <?php _e( 'Theme:', 'w3-total-cache' ); ?>
387
+ <select id="css_themes" class="css_enabled" name="css_theme"
388
+ <?php Util_Ui::sealing_disabled( 'minify.' ) ?>>
389
+ <?php foreach ( $themes as $theme_key => $theme_name ): ?>
390
+ <option value="<?php echo esc_attr( $theme_key ); ?>"<?php selected( $theme_key, $css_theme ); ?>><?php echo htmlspecialchars( $theme_name ); ?><?php if ( $theme_key == $css_theme ): ?> (active)<?php endif; ?></option>
391
+ <?php endforeach; ?>
392
+ </select>
393
+ </label>
394
+ <p class="description"><?php _e( 'Files are minified by template. First select the theme to manage, then add style sheets used in all templates to the "All Templates" group. Use the menu above to manage style sheets unique to a specific template. If necessary drag &amp; drop to resolve dependency issues (due to incorrect order).', 'w3-total-cache' ); ?></p>
395
+ </p>
396
+ <ul id="css_files" class="minify-files">
397
+ <?php foreach ( $css_groups as $css_theme => $css_templates ): if ( isset( $templates[$css_theme] ) ): ?>
398
+ <?php $index = 0; foreach ( $css_templates as $css_template => $css_locations ): ?>
399
+ <?php foreach ( (array) $css_locations as $css_location => $css_config ): ?>
400
+ <?php if ( ! empty( $css_config['files'] ) ): foreach ( (array) $css_config['files'] as $css_file ): $index++; ?>
401
+ <li>
402
+ <table>
403
+ <tr>
404
+ <th>&nbsp;</th>
405
+ <th><?php _e( 'File URI:', 'w3-total-cache' ); ?></th>
406
+ <th colspan="2"><?php _e( 'Template:', 'w3-total-cache' ); ?></th>
407
+ </tr>
408
+ <tr>
409
+ <td><?php echo $index; ?>.</td>
410
+ <td>
411
+ <input class="css_enabled" type="text"
412
+ <?php Util_Ui::sealing_disabled( 'minify.' ) ?>
413
+ name="css_files[<?php echo esc_attr( $css_theme ); ?>][<?php echo esc_attr( $css_template ); ?>][<?php echo esc_attr( $css_location ); ?>][]" value="<?php echo htmlspecialchars( $css_file ); /* search w3tc-url-escaping */ ?>" size="70" /><br />
414
+ </td>
415
+ <td>
416
+ <select class="css_file_template css_enabled" <?php Util_Ui::sealing_disabled( 'minify.' ) ?>>
417
+ <?php foreach ( $templates[$css_theme] as $theme_template_key => $theme_template_name ): ?>
418
+ <option value="<?php echo esc_attr( $theme_template_key ); ?>"<?php selected( $theme_template_key, $css_template ); ?>><?php echo esc_attr( $theme_template_name ); ?></option>
419
+ <?php endforeach; ?>
420
+ </select>
421
+ </td>
422
+ <td>
423
+ <input class="css_file_delete css_enabled button" type="button" value="<?php _e( 'Delete', 'w3-total-cache' ); ?>" />
424
+ <input class="css_file_verify css_enabled button" type="button" value="<?php _e( 'Verify URI', 'w3-total-cache' ); ?>" />
425
+ </td>
426
+ </tr>
427
+ </table>
428
+ </li>
429
+ <?php endforeach; endif; ?>
430
+ <?php endforeach; ?>
431
+ <?php endforeach; ?>
432
+ <?php endif; endforeach; ?>
433
+ </ul>
434
+ <div id="css_files_empty" class="w3tc-empty" style="display: none;"><?php _e( 'No <acronym title="Cascading Style Sheet">CSS</acronym> files added', 'w3-total-cache' ); ?></div>
435
+ <input id="css_file_add" class="css_enabled button" type="button" value="<?php _e( 'Add a style sheet', 'w3-total-cache' ); ?>" />
436
+ </td>
437
+ </tr>
438
+ <?php endif; ?>
439
+ <?php
440
  Util_Ui::config_item( array(
441
+ 'key' => 'minify.css.http2push',
442
+ 'label' => '<acronym title="Hypertext Markup Language">HTTP</acronym>/2 push',
443
+ 'control' => 'checkbox',
444
+ 'checkbox_label' => __( 'Enable', 'w3-total-cache' ),
445
+ 'description' => __( 'For better performance, send files to browser before they are requested when using the <acronym title="Hypertext Markup Language">HTTP</acronym>/2 protocol.',
446
+ 'w3-total-cache' ) .
447
+ ( $this->_config->get_string( 'pgcache.engine' ) != 'file_generic' ? '' :
448
+ __( ' <br /><b>Not supported by "Disk: Enhanced" page cache method for Nginx</b>', 'w3-total-cache' ) )
449
+ ) ); ?>
450
+ </table>
451
 
452
+ <?php Util_Ui::button_config_save( 'minify_css' ); ?>
453
+ <?php Util_Ui::postbox_footer(); ?>
454
 
455
+ <?php Util_Ui::postbox_header( __( 'Advanced', 'w3-total-cache' ), '', 'advanced' ); ?>
456
+ <table class="form-table">
457
  <?php
458
  if ( $this->_config->get_string( 'minify.engine' ) == 'memcached' ) {
459
  $module = 'minify';
463
  include W3TC_INC_DIR . '/options/parts/redis.php';
464
  }
465
  ?>
466
+ <tr>
467
+ <th><label for="minify_lifetime"><?php Util_Ui::e_config_label( 'minify.lifetime' ) ?></label></th>
468
+ <td>
469
+ <input id="minify_lifetime" type="text" name="minify__lifetime"
470
+ <?php Util_Ui::sealing_disabled( 'minify.' ) ?>
471
+ value="<?php echo esc_attr( $this->_config->get_integer( 'minify.lifetime' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
472
+ <p class="description"><?php _e( 'Specify the interval between download and update of external files in the minify cache. Hint: 6 hours is 21600 seconds. 12 hours is 43200 seconds. 24 hours is 86400 seconds.', 'w3-total-cache' ); ?></p>
473
+ </td>
474
+ </tr>
475
+ <tr>
476
+ <th><label for="minify_file_gc"><?php Util_Ui::e_config_label( 'minify.file.gc' ) ?></label></th>
477
+ <td>
478
+ <input id="minify_file_gc" type="text" name="minify__file__gc"
479
+ <?php Util_Ui::sealing_disabled( 'minify.' ) ?>
480
+ value="<?php echo esc_attr( $this->_config->get_integer( 'minify.file.gc' ) ); ?>" size="8"<?php if ( $this->_config->get_string( 'minify.engine' ) != 'file' ): ?> disabled="disabled"<?php endif; ?> /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
481
+ <p class="description"><?php _e( 'If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.', 'w3-total-cache' ); ?></p>
482
+ </td>
483
+ </tr>
484
+ <tr>
485
+ <th><label for="minify_reject_uri"><?php Util_Ui::e_config_label( 'minify.reject.uri' ) ?></label></th>
486
+ <td>
487
+ <textarea id="minify_reject_uri" name="minify__reject__uri"
488
+ <?php Util_Ui::sealing_disabled( 'minify.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'minify.reject.uri' ) ) ); ?></textarea>
489
+ <p class="description"><?php _e( 'Always ignore the specified pages / directories. Use relative paths. Omit: protocol, hostname, leading forward slash and query strings.', 'w3-total-cache' ); ?></p>
490
+ </td>
491
+ </tr>
492
+ <tr>
493
+ <th><label for="minify_reject_files_js"><?php Util_Ui::e_config_label( 'minify.reject.files.js' ) ?></label></th>
494
+ <td>
495
+ <textarea id="minify_reject_files_js" name="minify__reject__files__js"
496
+ <?php Util_Ui::sealing_disabled( 'minify.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'minify.reject.files.js' ) ) ); ?></textarea>
497
+ <p class="description"><?php _e( 'Always ignore the specified <acronym title="JavaScript">JS</acronym> files. Use relative paths. Omit: protocol, hostname, leading forward slash and query strings.', 'w3-total-cache' ); ?></p>
498
+ </td>
499
+ </tr>
500
+ <tr>
501
+ <th><label for="minify_reject_files_css"><?php Util_Ui::e_config_label( 'minify.reject.files.css' ) ?></label></th>
502
+ <td>
503
+ <textarea id="minify_reject_files_css" name="minify__reject__files__css"
504
+ <?php Util_Ui::sealing_disabled( 'minify.' ) ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'minify.reject.files.css' ) ) ); ?></textarea>
505
+ <p class="description"><?php _e( 'Always ignore the specified <acronym title="Cascading Style Sheet">CSS</acronym> files. Use relative paths. Omit: protocol, hostname, leading forward slash and query strings.', 'w3-total-cache' ); ?></p>
506
+ </td>
507
+ </tr>
508
+ <tr>
509
+ <th><label for="minify_reject_ua"><?php Util_Ui::e_config_label( 'minify.reject.ua' ) ?></label></th>
510
+ <td>
511
+ <textarea id="minify_reject_ua" name="minify__reject__ua"
512
+ <?php Util_Ui::sealing_disabled( 'minify.' ) ?>
513
+ cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'minify.reject.ua' ) ) ); ?></textarea>
514
+ <p class="description"><?php _e( 'Specify user agents that will never receive minified content.', 'w3-total-cache' ); ?></p>
515
+ </td>
516
+ </tr>
517
+ <?php if ( $auto ): ?>
518
+ <tr>
519
+ <th><label for="minify_cache_files"><?php Util_Ui::e_config_label( 'minify.cache.files' ) ?></label></th>
520
+ <td>
521
+ <textarea id="minify_cache_files" name="minify__cache__files"
522
+ <?php Util_Ui::sealing_disabled( 'minify.' ) ?>
523
+ cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'minify.cache.files' ) ) ); ?></textarea>
524
+ <p class="description"><?php _e( 'Specify external files/libraries that should be combined.', 'w3-total-cache' ); ?></p>
525
+ </td>
526
+ </tr>
527
+ <tr>
528
+ <th colspan="2">
529
+ <?php $this->checkbox( 'minify.cache.files_regexp', false, '', true, null ); ?>
530
+ <?php _e( 'Use Regular Expressions for file name matching', 'w3-total-cache' ) ?>
531
+ <p class="description"><?php _e( 'If external script file names vary, use regular expressions in the "Include external files/libraries" field to simplify matching.', 'w3-total-cache' ); ?></p>
532
+ </th>
533
+ </tr>
534
+ <?php endif; ?>
535
+ </table>
536
 
537
+ <?php Util_Ui::button_config_save( 'minify_advanced' ); ?>
538
+ <?php Util_Ui::postbox_footer(); ?>
539
 
540
+ <?php Util_Ui::postbox_header( __( 'Note(s):', 'w3-total-cache' ), '', 'notes' ); ?>
541
+ <table class="form-table">
542
+ <tr>
543
+ <th colspan="2">
544
+ <ul>
545
+ <li><?php _e( 'Enable <acronym title="Hypertext Transfer Protocol">HTTP</acronym> compression in the "Cascading Style Sheets &amp; JavaScript" section on <a href="admin.php?page=w3tc_browsercache">Browser Cache</a> Settings tab.', 'w3-total-cache' ); ?></li>
546
+ <li><?php _e( 'The <acronym title="Time to Live">TTL</acronym> of page cache files is set via the "Expires header lifetime" field in the "Cascading Style Sheets &amp; JavaScript" section on <a href="admin.php?page=w3tc_browsercache">Browser Cache</a> Settings tab.', 'w3-total-cache' ); ?></li>
547
+ </ul>
548
+ </th>
549
+ </tr>
550
+ </table>
551
+ <?php Util_Ui::postbox_footer(); ?>
552
+ </div>
553
  </form>
554
 
555
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
inc/options/minify/css.php CHANGED
@@ -10,7 +10,20 @@ $is_pro = Util_Environment::is_w3tc_pro( $this->_config );
10
  <?php $this->checkbox( 'minify.css.strip.comments', false, 'css_' ) ?> <?php Util_Ui::e_config_label( 'minify.css.strip.comments' ) ?></label><br />
11
  <?php $this->checkbox( 'minify.css.strip.crlf', false, 'css_' ) ?> <?php Util_Ui::e_config_label( 'minify.css.strip.crlf' ) ?></label><br />
12
 
13
- <?php Util_Ui::pro_wrap_maybe_start() ?>
14
- <?php $this->checkbox( 'minify.css.embed', !$is_pro, 'csse_', true, ( $is_pro ? null : false ) ) ?> Eliminate render-blocking <acronym title="Cascading Style Sheet">CSS</acronym> by moving it to <acronym title="Hypertext Markup Language">HTTP</acronym> body</label>
15
- <?php Util_Ui::pro_wrap_maybe_end('minify_css_renderblocking') ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  <br />
10
  <?php $this->checkbox( 'minify.css.strip.comments', false, 'css_' ) ?> <?php Util_Ui::e_config_label( 'minify.css.strip.comments' ) ?></label><br />
11
  <?php $this->checkbox( 'minify.css.strip.crlf', false, 'css_' ) ?> <?php Util_Ui::e_config_label( 'minify.css.strip.crlf' ) ?></label><br />
12
 
13
+ <?php
14
+ Util_Ui::config_item_pro( array(
15
+ 'key' => 'minify.css.embed',
16
+ 'control' => 'checkbox',
17
+ 'checkbox_label' => __( 'Eliminate render-blocking <acronym title="Cascading Style Sheet">CSS</acronym> by moving it to <acronym title="Hypertext Markup Language">HTTP</acronym> body', 'w3-total-cache' ),
18
+ 'disabled' => ( $is_pro ? null : true ),
19
+ 'label_class' => 'w3tc_no_trtd',
20
+ 'excerpt' => __( 'Website visitors cannot navigate your website until a given page is ready - reduce the wait time with this feature.', 'w3-total-cache' ),
21
+ 'description' => array(
22
+ __( 'Opportunities to improve user experience exist in nearly every aspect of your website. Once the components are delivered to the web browser there’s an opportunity to improve the performance of how a given page is painted in the browser. Enable, this feature to reduce wait times and ensure that users can interact with your website as quickly as possible.', 'w3-total-cache' ),
23
+
24
+ __( 'Faster paint time is a key last step in lowering bounce rates even for repeat page views.', 'w3-total-cache' )
25
+ )
26
+ ) );
27
+ ?>
28
+
29
  <br />
inc/options/mobile.php CHANGED
@@ -15,100 +15,98 @@ mobile_themes['<?php echo addslashes( $theme_key ); ?>'] = '<?php echo addslashe
15
  /*]]>*/</script>
16
 
17
  <p>
18
- <?php _e( 'User agent group support is always <span class="w3tc-enabled">enabled</span>.', 'w3-total-cache' ); ?>
19
  </p>
20
 
21
  <form id="mobile_form" action="admin.php?page=<?php echo $this->_page; ?>" method="post">
22
- <div class="metabox-holder">
23
- <?php Util_Ui::postbox_header( __( 'Manage User Agent Groups', 'w3-total-cache' ), '', 'manage' ); ?>
24
- <p>
25
- <input id="mobile_add" type="button" class="button"
26
- <?php disabled( $groups['disabled'] ) ?>
27
- value="<?php _e( 'Create a group', 'w3-total-cache' ); ?>" />
28
- <?php _e( 'of user agents by specifying names in the user agents field. Assign a set of user agents to use a specific theme, redirect them to another domain or if an existing mobile plugin is active, create user agent groups to ensure that a unique cache is created for each user agent group. Drag and drop groups into order (if needed) to determine their priority (top -&gt; down).', 'w3-total-cache' ); ?>
29
- </p>
30
 
31
- <ul id="mobile_groups">
32
- <?php $index = 0; foreach ( $groups['value'] as $group => $group_config ): $index++; ?>
33
- <li id="mobile_group_<?php echo esc_attr( $group ); ?>">
34
- <table class="form-table">
35
- <tr>
36
- <th>
37
- <?php _e( 'Group name:', 'w3-total-cache' ); ?>
38
- </th>
39
- <td>
40
- <span class="mobile_group_number"><?php echo $index; ?>.</span> <span class="mobile_group"><?php echo htmlspecialchars( $group ); ?></span>
41
- <input type="button" class="button mobile_delete"
42
- value="Delete group"
43
- <?php disabled( $groups['disabled'] ) ?> />
44
- </td>
45
- </tr>
46
- <tr>
47
- <th>
48
- <label for="mobile_groups_<?php echo esc_attr( $group ); ?>_enabled"><?php _e( 'Enabled:', 'w3-total-cache' ); ?></label>
49
- </th>
50
- <td>
51
- <input type="hidden" name="mobile_groups[<?php echo esc_attr( $group ); ?>][enabled]" value="0" />
52
- <input id="mobile_groups_<?php echo esc_attr( $group ); ?>_enabled"
53
- type="checkbox"
54
- name="mobile_groups[<?php echo esc_attr( $group ); ?>][enabled]"
55
- <?php disabled( $groups['disabled'] ) ?> value="1"
56
- <?php checked( $group_config['enabled'], true ); ?> />
57
- </td>
58
- </tr>
59
- <tr>
60
- <th>
61
- <label for="mobile_groups_<?php echo esc_attr( $group ); ?>_theme"><?php _e( 'Theme:', 'w3-total-cache' ); ?></label>
62
- </th>
63
- <td>
64
- <select id="mobile_groups_<?php echo esc_attr( $group ); ?>_theme"
65
- name="mobile_groups[<?php echo esc_attr( $group ); ?>][theme]"
66
- <?php disabled( $groups['disabled'] ) ?> >
67
- <option value="">-- Pass-through --</option>
68
- <?php foreach ( $themes as $theme_key => $theme_name ): ?>
69
- <option value="<?php echo esc_attr( $theme_key ); ?>"<?php selected( $theme_key, $group_config['theme'] ); ?>><?php echo htmlspecialchars( $theme_name ); ?></option>
70
- <?php endforeach; ?>
71
- </select>
72
- <br />
73
- <span class="description">
74
- <?php _e( 'Assign this group of user agents to a specific theme. Selecting "Pass-through" allows any plugin(s) (e.g. mobile plugins) to properly handle requests for these user agents. If the "redirect users to" field is not empty, this setting is ignored.', 'w3-total-cache' ); ?>
75
- </span>
76
- </td>
77
- </tr>
78
- <tr>
79
- <th>
80
- <label for="mobile_groups_<?php echo esc_attr( $group ); ?>_redirect"><?php _e( 'Redirect users to:', 'w3-total-cache' ) ?></label>
81
- </th>
82
- <td>
83
- <input id="mobile_groups_<?php echo esc_attr( $group ); ?>_redirect"
84
- type="text" name="mobile_groups[<?php echo esc_attr( $group ); ?>][redirect]"
85
- value="<?php echo esc_attr( $group_config['redirect'] ); ?>"
86
- <?php disabled( $groups['disabled'] ) ?>
87
- size="60" />
88
- <br /><span class="description"><?php _e( 'A 302 redirect is used to send this group of users to another hostname (domain); recommended if a 3rd party service provides a mobile version of your site.', 'w3-total-cache' ); ?></span>
89
- </td>
90
- </tr>
91
- <tr>
92
- <th>
93
- <label for="mobile_groups_<?php echo esc_attr( $group ); ?>_agents"><?php _e( 'User agents:', 'w3-total-cache' ); ?></label>
94
- </th>
95
- <td>
96
- <textarea id="mobile_groups_<?php echo esc_attr( $group ); ?>_agents"
97
- name="mobile_groups[<?php echo esc_attr( $group ); ?>][agents]"
98
- rows="10" cols="50" <?php disabled( $groups['disabled'] ) ?>><?php echo esc_textarea( implode( "\r\n", (array) $group_config['agents'] ) ); ?></textarea>
99
- <br />
100
- <span class="description">
101
- <?php _e( 'Specify the user agents for this group. Remember to escape special characters like spaces, dots or dashes with a backslash. Regular expressions are also supported.', 'w3-total-cache' ); ?>
102
- </span>
103
- </td>
104
- </tr>
105
- </table>
106
- </li>
107
- <?php endforeach; ?>
108
- </ul>
109
- <div id="mobile_groups_empty" style="display: none;"><?php _e( 'No groups added. All user agents recieve the same page and minify cache results.', 'w3-total-cache' ) ?></div>
110
 
111
- <?php
112
  if ( !$groups['disabled'] )
113
  Util_Ui::button_config_save( 'mobile' );
114
  Util_Ui::postbox_footer();
@@ -116,17 +114,17 @@ Util_Ui::postbox_footer();
116
  Util_Ui::postbox_header( __( 'Note(s):', 'w3-total-cache' ), '',
117
  'notes' );
118
  ?>
119
- <table class="form-table">
120
- <tr>
121
- <th colspan="2">
122
- <ul>
123
- <?php echo $groups['description'] ?>
124
- </ul>
125
- </th>
126
- </tr>
127
- </table>
128
- <?php Util_Ui::postbox_footer(); ?>
129
- </div>
130
  </form>
131
 
132
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
15
  /*]]>*/</script>
16
 
17
  <p>
18
+ <?php _e( 'User agent group support is always <span class="w3tc-enabled">enabled</span>.', 'w3-total-cache' ); ?>
19
  </p>
20
 
21
  <form id="mobile_form" action="admin.php?page=<?php echo $this->_page; ?>" method="post">
22
+ <div class="metabox-holder">
23
+ <?php Util_Ui::postbox_header( __( 'Manage User Agent Groups', 'w3-total-cache' ), '', 'manage' ); ?>
24
+ <p>
25
+ <input id="mobile_add" type="button" class="button"
26
+ <?php disabled( $groups['disabled'] ) ?>
27
+ value="<?php _e( 'Create a group', 'w3-total-cache' ); ?>" />
28
+ <?php _e( 'of user agents by specifying names in the user agents field. Assign a set of user agents to use a specific theme, redirect them to another domain or if an existing mobile plugin is active, create user agent groups to ensure that a unique cache is created for each user agent group. Drag and drop groups into order (if needed) to determine their priority (top -&gt; down).', 'w3-total-cache' ); ?>
29
+ </p>
30
 
31
+ <ul id="mobile_groups">
32
+ <?php $index = 0; foreach ( $groups['value'] as $group => $group_config ): $index++; ?>
33
+ <li id="mobile_group_<?php echo esc_attr( $group ); ?>">
34
+ <table class="form-table">
35
+ <tr>
36
+ <th>
37
+ <?php _e( 'Group name:', 'w3-total-cache' ); ?>
38
+ </th>
39
+ <td>
40
+ <span class="mobile_group_number"><?php echo $index; ?>.</span> <span class="mobile_group"><?php echo htmlspecialchars( $group ); ?></span>
41
+ <input type="button" class="button mobile_delete"
42
+ value="Delete group"
43
+ <?php disabled( $groups['disabled'] ) ?> />
44
+ </td>
45
+ </tr>
46
+ <tr>
47
+ <th>
48
+ <label for="mobile_groups_<?php echo esc_attr( $group ); ?>_enabled"><?php _e( 'Enabled:', 'w3-total-cache' ); ?></label>
49
+ </th>
50
+ <td>
51
+ <input type="hidden" name="mobile_groups[<?php echo esc_attr( $group ); ?>][enabled]" value="0" />
52
+ <input id="mobile_groups_<?php echo esc_attr( $group ); ?>_enabled"
53
+ type="checkbox"
54
+ name="mobile_groups[<?php echo esc_attr( $group ); ?>][enabled]"
55
+ <?php disabled( $groups['disabled'] ) ?> value="1"
56
+ <?php checked( $group_config['enabled'], true ); ?> />
57
+ </td>
58
+ </tr>
59
+ <tr>
60
+ <th>
61
+ <label for="mobile_groups_<?php echo esc_attr( $group ); ?>_theme"><?php _e( 'Theme:', 'w3-total-cache' ); ?></label>
62
+ </th>
63
+ <td>
64
+ <select id="mobile_groups_<?php echo esc_attr( $group ); ?>_theme"
65
+ name="mobile_groups[<?php echo esc_attr( $group ); ?>][theme]"
66
+ <?php disabled( $groups['disabled'] ) ?> >
67
+ <option value="">-- Pass-through --</option>
68
+ <?php foreach ( $themes as $theme_key => $theme_name ): ?>
69
+ <option value="<?php echo esc_attr( $theme_key ); ?>"<?php selected( $theme_key, $group_config['theme'] ); ?>><?php echo htmlspecialchars( $theme_name ); ?></option>
70
+ <?php endforeach; ?>
71
+ </select>
72
+ <p class="description">
73
+ <?php _e( 'Assign this group of user agents to a specific theme. Selecting "Pass-through" allows any plugin(s) (e.g. mobile plugins) to properly handle requests for these user agents. If the "redirect users to" field is not empty, this setting is ignored.', 'w3-total-cache' ); ?>
74
+ </p>
75
+ </td>
76
+ </tr>
77
+ <tr>
78
+ <th>
79
+ <label for="mobile_groups_<?php echo esc_attr( $group ); ?>_redirect"><?php _e( 'Redirect users to:', 'w3-total-cache' ) ?></label>
80
+ </th>
81
+ <td>
82
+ <input id="mobile_groups_<?php echo esc_attr( $group ); ?>_redirect"
83
+ type="text" name="mobile_groups[<?php echo esc_attr( $group ); ?>][redirect]"
84
+ value="<?php echo esc_attr( $group_config['redirect'] ); ?>"
85
+ <?php disabled( $groups['disabled'] ) ?>
86
+ size="60" />
87
+ <p class="description"><?php _e( 'A 302 redirect is used to send this group of users to another hostname (domain); recommended if a 3rd party service provides a mobile version of your site.', 'w3-total-cache' ); ?></p>
88
+ </td>
89
+ </tr>
90
+ <tr>
91
+ <th>
92
+ <label for="mobile_groups_<?php echo esc_attr( $group ); ?>_agents"><?php _e( 'User agents:', 'w3-total-cache' ); ?></label>
93
+ </th>
94
+ <td>
95
+ <textarea id="mobile_groups_<?php echo esc_attr( $group ); ?>_agents"
96
+ name="mobile_groups[<?php echo esc_attr( $group ); ?>][agents]"
97
+ rows="10" cols="50" <?php disabled( $groups['disabled'] ) ?>><?php echo esc_textarea( implode( "\r\n", (array) $group_config['agents'] ) ); ?></textarea>
98
+ <p class="description">
99
+ <?php _e( 'Specify the user agents for this group. Remember to escape special characters like spaces, dots or dashes with a backslash. Regular expressions are also supported.', 'w3-total-cache' ); ?>
100
+ </p>
101
+ </td>
102
+ </tr>
103
+ </table>
104
+ </li>
105
+ <?php endforeach; ?>
106
+ </ul>
107
+ <div id="mobile_groups_empty" style="display: none;"><?php _e( 'No groups added. All user agents recieve the same page and minify cache results.', 'w3-total-cache' ) ?></div>
 
 
108
 
109
+ <?php
110
  if ( !$groups['disabled'] )
111
  Util_Ui::button_config_save( 'mobile' );
112
  Util_Ui::postbox_footer();
114
  Util_Ui::postbox_header( __( 'Note(s):', 'w3-total-cache' ), '',
115
  'notes' );
116
  ?>
117
+ <table class="form-table">
118
+ <tr>
119
+ <th colspan="2">
120
+ <ul>
121
+ <?php echo $groups['description'] ?>
122
+ </ul>
123
+ </th>
124
+ </tr>
125
+ </table>
126
+ <?php Util_Ui::postbox_footer(); ?>
127
+ </div>
128
  </form>
129
 
130
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
inc/options/objectcache.php CHANGED
@@ -8,27 +8,27 @@ if ( !defined( 'W3TC' ) )
8
  <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
9
 
10
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
11
- <p>
12
- <?php echo
13
  sprintf( __( 'Object caching via %1$s is currently %2$s', 'w3-total-cache' ),
14
  '<strong>'.Cache::engine_name( $this->_config->get_string( 'objectcache.engine' ) ).'</strong>',
15
  '<span class="w3tc-'.( $objectcache_enabled ? 'enabled">' . __( 'enabled', 'w3-total-cache' ) : 'disabled">' . __( 'disabled', 'w3-total-cache' ) ) . '</span>'
16
  );
17
  ?>
18
- </p>
19
- <p>
20
- To rebuild the object cache use the
21
- <?php echo Util_Ui::nonce_field( 'w3tc' ); ?>
22
- <input type="submit" name="w3tc_flush_objectcache" value="<?php _e( 'empty cache', 'w3-total-cache' ); ?>"<?php if ( ! $objectcache_enabled ): ?> disabled="disabled"<?php endif; ?> class="button" />
23
- operation.
24
- </p>
25
  </form>
26
 
27
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
28
- <div class="metabox-holder">
29
- <?php Util_Ui::postbox_header( __( 'Advanced', 'w3-total-cache' ), '', 'advanced' ); ?>
30
- <table class="form-table">
31
- <?php
32
  if ( $this->_config->get_string( 'objectcache.engine' ) == 'memcached' ) {
33
  $module = 'objectcache';
34
  include W3TC_INC_DIR . '/options/parts/memcached.php';
@@ -37,66 +37,66 @@ if ( $this->_config->get_string( 'objectcache.engine' ) == 'memcached' ) {
37
  include W3TC_INC_DIR . '/options/parts/redis.php';
38
  }
39
  ?>
40
- <tr>
41
- <th style="width: 250px;"><label for="objectcache_lifetime"><?php Util_Ui::e_config_label( 'objectcache.lifetime' ) ?></label></th>
42
- <td>
43
- <input id="objectcache_lifetime" type="text"
44
- <?php Util_Ui::sealing_disabled( 'objectcache.' ) ?> name="objectcache__lifetime" value="<?php echo esc_attr( $this->_config->get_integer( 'objectcache.lifetime' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
45
- <br /><span class="description"><?php _e( 'Determines the natural expiration time of unchanged cache items. The higher the value, the larger the cache.', 'w3-total-cache' ); ?></span>
46
- </td>
47
- </tr>
48
- <tr>
49
- <th><label for="objectcache_file_gc"><?php Util_Ui::e_config_label( 'objectcache.file.gc' ) ?></label></th>
50
- <td>
51
- <input id="objectcache_file_gc" type="text"
52
- <?php Util_Ui::sealing_disabled( 'objectcache.' ) ?> name="objectcache__file__gc" value="<?php echo esc_attr( $this->_config->get_integer( 'objectcache.file.gc' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
53
- <br /><span class="description"><?php _e( 'If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.', 'w3-total-cache' ); ?></span>
54
- </td>
55
- </tr>
56
- <tr>
57
- <th><label for="objectcache_groups_global"><?php Util_Ui::e_config_label( 'objectcache.groups.global' ) ?></label></th>
58
- <td>
59
- <textarea id="objectcache_groups_global"
60
- <?php Util_Ui::sealing_disabled( 'objectcache.' ) ?> name="objectcache__groups__global" cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'objectcache.groups.global' ) ) ); ?></textarea>
61
- <br /><span class="description"><?php _e( 'Groups shared amongst sites in network mode.', 'w3-total-cache' ); ?></span>
62
- </td>
63
- </tr>
64
- <tr>
65
- <th><label for="objectcache_groups_nonpersistent"><?php Util_Ui::e_config_label( 'objectcache.groups.nonpersistent' ) ?></label></th>
66
- <td>
67
- <textarea id="objectcache_groups_nonpersistent"
68
- <?php Util_Ui::sealing_disabled( 'objectcache.' ) ?> name="objectcache__groups__nonpersistent" cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'objectcache.groups.nonpersistent' ) ) ); ?></textarea>
69
- <br /><span class="description"><?php _e( 'Groups that should not be cached.', 'w3-total-cache' ); ?></span>
70
- </td>
71
- </tr>
72
 
73
- <tr>
74
- <th colspan="2">
75
- <?php $this->checkbox( 'objectcache.enabled_for_wp_admin' ) ?> Enable caching for wp-admin requests</label>
76
- <br /><span class="description"><?php _e( 'Enabling this option will increase wp-admin performance, but may cause side-effects', 'w3-total-cache' )?></span>
77
- </th>
78
- </tr>
79
- <tr>
80
- <th colspan="2">
81
- <?php $this->checkbox( 'objectcache.fallback_transients' ) ?> Store transients in database</label>
82
- <br /><span class="description"><?php _e( 'Use that to store transients in database even when external cache is used. That allows transient values to survive object cache cleaning / expiration', 'w3-total-cache' )?></span>
83
- </th>
84
- </tr>
85
- <?php if ( $this->_config->get_boolean( 'cluster.messagebus.enabled' ) ): ?>
86
- <tr>
87
- <th colspan="2">
88
- <?php $this->checkbox( 'objectcache.purge.all' ) ?> <?php Util_Ui::e_config_label( 'objectcache.purge.all' ) ?></label>
89
- <br /><span class="description"><?php _e( 'Enabling this option will increase load on server on certain actions but will guarantee that
90
- the Object Cache is always clean and contains latest changes. <em>Enable if you are experiencing issues
91
- with options displaying wrong value/state (checkboxes etc).</em>', 'w3-total-cache' )?></span>
92
- </th>
93
- </tr>
94
- <?php endif ?>
95
- </table>
96
 
97
- <?php Util_Ui::button_config_save( 'objectcache' ); ?>
98
- <?php Util_Ui::postbox_footer(); ?>
99
- </div>
100
  </form>
101
 
102
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
8
  <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
9
 
10
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
11
+ <p>
12
+ <?php echo
13
  sprintf( __( 'Object caching via %1$s is currently %2$s', 'w3-total-cache' ),
14
  '<strong>'.Cache::engine_name( $this->_config->get_string( 'objectcache.engine' ) ).'</strong>',
15
  '<span class="w3tc-'.( $objectcache_enabled ? 'enabled">' . __( 'enabled', 'w3-total-cache' ) : 'disabled">' . __( 'disabled', 'w3-total-cache' ) ) . '</span>'
16
  );
17
  ?>
18
+ </p>
19
+ <p>
20
+ To rebuild the object cache use the
21
+ <?php echo Util_Ui::nonce_field( 'w3tc' ); ?>
22
+ <input type="submit" name="w3tc_flush_objectcache" value="<?php _e( 'empty cache', 'w3-total-cache' ); ?>"<?php if ( ! $objectcache_enabled ): ?> disabled="disabled"<?php endif; ?> class="button" />
23
+ operation.
24
+ </p>
25
  </form>
26
 
27
  <form action="admin.php?page=<?php echo $this->_page; ?>" method="post">
28
+ <div class="metabox-holder">
29
+ <?php Util_Ui::postbox_header( __( 'Advanced', 'w3-total-cache' ), '', 'advanced' ); ?>
30
+ <table class="form-table">
31
+ <?php
32
  if ( $this->_config->get_string( 'objectcache.engine' ) == 'memcached' ) {
33
  $module = 'objectcache';
34
  include W3TC_INC_DIR . '/options/parts/memcached.php';
37
  include W3TC_INC_DIR . '/options/parts/redis.php';
38
  }
39
  ?>
40
+ <tr>
41
+ <th style="width: 250px;"><label for="objectcache_lifetime"><?php Util_Ui::e_config_label( 'objectcache.lifetime' ) ?></label></th>
42
+ <td>
43
+ <input id="objectcache_lifetime" type="text"
44
+ <?php Util_Ui::sealing_disabled( 'objectcache.' ) ?> name="objectcache__lifetime" value="<?php echo esc_attr( $this->_config->get_integer( 'objectcache.lifetime' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
45
+ <p class="description"><?php _e( 'Determines the natural expiration time of unchanged cache items. The higher the value, the larger the cache.', 'w3-total-cache' ); ?></p>
46
+ </td>
47
+ </tr>
48
+ <tr>
49
+ <th><label for="objectcache_file_gc"><?php Util_Ui::e_config_label( 'objectcache.file.gc' ) ?></label></th>
50
+ <td>
51
+ <input id="objectcache_file_gc" type="text"
52
+ <?php Util_Ui::sealing_disabled( 'objectcache.' ) ?> name="objectcache__file__gc" value="<?php echo esc_attr( $this->_config->get_integer( 'objectcache.file.gc' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
53
+ <p class="description"><?php _e( 'If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.', 'w3-total-cache' ); ?></p>
54
+ </td>
55
+ </tr>
56
+ <tr>
57
+ <th><label for="objectcache_groups_global"><?php Util_Ui::e_config_label( 'objectcache.groups.global' ) ?></label></th>
58
+ <td>
59
+ <textarea id="objectcache_groups_global"
60
+ <?php Util_Ui::sealing_disabled( 'objectcache.' ) ?> name="objectcache__groups__global" cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'objectcache.groups.global' ) ) ); ?></textarea>
61
+ <p class="description"><?php _e( 'Groups shared amongst sites in network mode.', 'w3-total-cache' ); ?></p>
62
+ </td>
63
+ </tr>
64
+ <tr>
65
+ <th><label for="objectcache_groups_nonpersistent"><?php Util_Ui::e_config_label( 'objectcache.groups.nonpersistent' ) ?></label></th>
66
+ <td>
67
+ <textarea id="objectcache_groups_nonpersistent"
68
+ <?php Util_Ui::sealing_disabled( 'objectcache.' ) ?> name="objectcache__groups__nonpersistent" cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'objectcache.groups.nonpersistent' ) ) ); ?></textarea>
69
+ <p class="description"><?php _e( 'Groups that should not be cached.', 'w3-total-cache' ); ?></p>
70
+ </td>
71
+ </tr>
72
 
73
+ <tr>
74
+ <th colspan="2">
75
+ <?php $this->checkbox( 'objectcache.enabled_for_wp_admin' ) ?> Enable caching for wp-admin requests</label>
76
+ <p class="description"><?php _e( 'Enabling this option will increase wp-admin performance, but may cause side-effects', 'w3-total-cache' )?></p>
77
+ </th>
78
+ </tr>
79
+ <tr>
80
+ <th colspan="2">
81
+ <?php $this->checkbox( 'objectcache.fallback_transients' ) ?> Store transients in database</label>
82
+ <p class="description"><?php _e( 'Use that to store transients in database even when external cache is used. That allows transient values to survive object cache cleaning / expiration', 'w3-total-cache' )?></p>
83
+ </th>
84
+ </tr>
85
+ <?php if ( $this->_config->get_boolean( 'cluster.messagebus.enabled' ) ): ?>
86
+ <tr>
87
+ <th colspan="2">
88
+ <?php $this->checkbox( 'objectcache.purge.all' ) ?> <?php Util_Ui::e_config_label( 'objectcache.purge.all' ) ?></label>
89
+ <p class="description"><?php _e( 'Enabling this option will increase load on server on certain actions but will guarantee that
90
+ the Object Cache is always clean and contains latest changes. <em>Enable if you are experiencing issues
91
+ with options displaying wrong value/state (checkboxes etc).</em>', 'w3-total-cache' )?></p>
92
+ </th>
93
+ </tr>
94
+ <?php endif ?>
95
+ </table>
96
 
97
+ <?php Util_Ui::button_config_save( 'objectcache' ); ?>
98
+ <?php Util_Ui::postbox_footer(); ?>
99
+ </div>
100
  </form>
101
 
102
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
inc/options/parts/memcached.php CHANGED
@@ -19,14 +19,14 @@ if ( !defined( 'W3TC' ) )
19
  <?php Util_Ui::sealing_disabled( $module ) ?>
20
  type="button" value="<?php esc_attr_e( 'Test', 'w3-total-cache' ); ?>" />
21
  <span id="memcached_test_status" class="w3tc-status w3tc-process"></span>
22
- <br /><span class="description"><?php _e( 'Multiple servers may be used and seperated by a comma; e.g. 192.168.1.100:11211, domain.com:22122', 'w3-total-cache' ); ?></span>
23
  </td>
24
  </tr>
25
  <tr>
26
  <th><label><?php _e( 'Use persistent connection:', 'w3-total-cache' ); ?></label></th>
27
  <td>
28
- <?php $this->checkbox( $module . '.memcached.persistent' ) ?> <?php echo Util_ConfigLabel::get( 'memcached.persistent' ) ?></label><br />
29
- <span class="description"><?php _e( 'Using persistent connection doesn\'t reinitialize memcached driver on each request', 'w3-total-cache' ); ?></span>
30
  </td>
31
  </tr>
32
  <tr>
@@ -34,22 +34,22 @@ if ( !defined( 'W3TC' ) )
34
  <td>
35
  <label><?php $this->checkbox( $module . '.memcached.aws_autodiscovery',
36
  !Util_Installed::memcached_aws() ) ?>
37
- Amazon Node Auto Discovery</label><br />
38
- <span class="description">
39
  <?php
40
  if ( !Util_Installed::memcached_aws() )
41
  _e( 'ElastiCache <acronym title="Hypertext Preprocessor">PHP</acronym> module not found', 'w3-total-cache' );
42
  else
43
  _e( 'When Amazon ElastiCache used, specify configuration endpoint as Memcached host', 'w3-total-cache' );
44
  ?>
45
- </span>
46
  </td>
47
  </tr>
48
  <tr>
49
  <th><label><?php _e( 'Use binary protocol:', 'w3-total-cache' ); ?></label></th>
50
  <td>
51
- <?php $this->checkbox( $module . '.memcached.binary_protocol' ) ?> <?php echo Util_ConfigLabel::get( 'memcached.binary_protocol' ) ?></label><br />
52
- <span class="description"><?php _e( 'Using binary protocol can increase throughput.', 'w3-total-cache' ); ?></span>
53
  </td>
54
  </tr>
55
 
@@ -61,12 +61,12 @@ else
61
  <?php
62
  $this->value_with_disabled( $module . '.memcached.username',
63
  !Util_Installed::memcached_auth(), '' )
64
- ?> /><br />
65
- <span class="description">
66
  <?php _e( 'Specify memcached username, when <acronym title="Simple Authentication and Security Layer">SASL</acronym> authentication used', 'w3-total-cache' );
67
  if ( !Util_Installed::memcached_auth() )
68
  _e( '<br>Available when memcached extension installed, built with <acronym title="Simple Authentication and Security Layer">SASL</acronym>', 'w3-total-cache' )
69
- ?></span>
70
  </td>
71
  </tr>
72
  <tr>
@@ -77,7 +77,7 @@ if ( !Util_Installed::memcached_auth() )
77
  <?php
78
  $this->value_with_disabled( $module . '.memcached.password',
79
  !Util_Installed::memcached_auth(), '' )
80
- ?> /><br />
81
- <span class="description"><?php _e( 'Specify memcached password, when <acronym title="Simple Authentication and Security Layer">SASL</acronym> authentication used', 'w3-total-cache' )?></span>
82
  </td>
83
  </tr>
19
  <?php Util_Ui::sealing_disabled( $module ) ?>
20
  type="button" value="<?php esc_attr_e( 'Test', 'w3-total-cache' ); ?>" />
21
  <span id="memcached_test_status" class="w3tc-status w3tc-process"></span>
22
+ <p class="description"><?php _e( 'Multiple servers may be used and seperated by a comma; e.g. 192.168.1.100:11211, domain.com:22122', 'w3-total-cache' ); ?></p>
23
  </td>
24
  </tr>
25
  <tr>
26
  <th><label><?php _e( 'Use persistent connection:', 'w3-total-cache' ); ?></label></th>
27
  <td>
28
+ <?php $this->checkbox( $module . '.memcached.persistent' ) ?> <?php echo Util_ConfigLabel::get( 'memcached.persistent' ) ?></label>
29
+ <p class="description"><?php _e( 'Using persistent connection doesn\'t reinitialize memcached driver on each request', 'w3-total-cache' ); ?></p>
30
  </td>
31
  </tr>
32
  <tr>
34
  <td>
35
  <label><?php $this->checkbox( $module . '.memcached.aws_autodiscovery',
36
  !Util_Installed::memcached_aws() ) ?>
37
+ Amazon Node Auto Discovery</label>
38
+ <p class="description">
39
  <?php
40
  if ( !Util_Installed::memcached_aws() )
41
  _e( 'ElastiCache <acronym title="Hypertext Preprocessor">PHP</acronym> module not found', 'w3-total-cache' );
42
  else
43
  _e( 'When Amazon ElastiCache used, specify configuration endpoint as Memcached host', 'w3-total-cache' );
44
  ?>
45
+ </p>
46
  </td>
47
  </tr>
48
  <tr>
49
  <th><label><?php _e( 'Use binary protocol:', 'w3-total-cache' ); ?></label></th>
50
  <td>
51
+ <?php $this->checkbox( $module . '.memcached.binary_protocol' ) ?> <?php echo Util_ConfigLabel::get( 'memcached.binary_protocol' ) ?></label>
52
+ <p class="description"><?php _e( 'Using binary protocol can increase throughput.', 'w3-total-cache' ); ?></p>
53
  </td>
54
  </tr>
55
 
61
  <?php
62
  $this->value_with_disabled( $module . '.memcached.username',
63
  !Util_Installed::memcached_auth(), '' )
64
+ ?> />
65
+ <p class="description">
66
  <?php _e( 'Specify memcached username, when <acronym title="Simple Authentication and Security Layer">SASL</acronym> authentication used', 'w3-total-cache' );
67
  if ( !Util_Installed::memcached_auth() )
68
  _e( '<br>Available when memcached extension installed, built with <acronym title="Simple Authentication and Security Layer">SASL</acronym>', 'w3-total-cache' )
69
+ ?></p>
70
  </td>
71
  </tr>
72
  <tr>
77
  <?php
78
  $this->value_with_disabled( $module . '.memcached.password',
79
  !Util_Installed::memcached_auth(), '' )
80
+ ?> />
81
+ <p class="description"><?php _e( 'Specify memcached password, when <acronym title="Simple Authentication and Security Layer">SASL</acronym> authentication used', 'w3-total-cache' )?></p>
82
  </td>
83
  </tr>
inc/options/parts/memcached_extension.php CHANGED
@@ -20,7 +20,7 @@ $config = Dispatcher::config();
20
  <?php Util_Ui::sealing_disabled( $module ) ?>
21
  type="button" value="<?php esc_attr_e( 'Test', 'w3-total-cache' ); ?>" />
22
  <span id="memcached_test_status" class="w3tc-status w3tc-process"></span>
23
- <br /><span class="description"><?php _e( 'Multiple servers may be used and seperated by a comma; e.g. 192.168.1.100:11211, domain.com:22122', 'w3-total-cache' ); ?></span>
24
  </td>
25
  </tr>
26
  <?php
20
  <?php Util_Ui::sealing_disabled( $module ) ?>
21
  type="button" value="<?php esc_attr_e( 'Test', 'w3-total-cache' ); ?>" />
22
  <span id="memcached_test_status" class="w3tc-status w3tc-process"></span>
23
+ <p class="description"><?php _e( 'Multiple servers may be used and seperated by a comma; e.g. 192.168.1.100:11211, domain.com:22122', 'w3-total-cache' ); ?></p>
24
  </td>
25
  </tr>
26
  <?php
inc/options/parts/redis.php CHANGED
@@ -9,46 +9,46 @@ if ( !defined( 'W3TC' ) )
9
  */
10
  ?>
11
  <tr>
12
- <th><label for="redis_servers"><?php echo Util_ConfigLabel::get( 'redis.servers' ) ?></label></th>
13
- <td>
14
- <input id="redis_servers" type="text"
15
- name="<?php echo $module ?>__redis__servers"
16
- <?php Util_Ui::sealing_disabled( $module ) ?>
17
- value="<?php echo esc_attr( implode( ',', $this->_config->get_array( $module . '.redis.servers' ) ) ); ?>"
18
- size="100" />
19
- <input class="w3tc_common_redis_test button {nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}"
20
- <?php Util_Ui::sealing_disabled( $module ) ?>
21
- type="button" value="<?php esc_attr_e( 'Test', 'w3-total-cache' ); ?>" />
22
- <span class="w3tc_common_redis_test_result w3tc-status w3tc-process"></span>
23
- <br /><span class="description"><?php _e( 'Multiple servers may be used and seperated by a comma; e.g. 192.168.1.100:11211, domain.com:22122', 'w3-total-cache' ); ?></span>
24
- </td>
25
  </tr>
26
  <tr>
27
- <th><label><?php _e( 'Use persistent connection:', 'w3-total-cache' ); ?></label></th>
28
- <td>
29
- <?php $this->checkbox( $module . '.redis.persistent' ) ?> <?php echo Util_ConfigLabel::get( 'redis.persistent' ) ?></label><br />
30
- <span class="description"><?php _e( 'Using persistent connection doesn\'t reinitialize redis driver on each request', 'w3-total-cache' ); ?></span>
31
- </td>
32
  </tr>
33
  <tr>
34
- <th style="width: 250px;"><label for="redis_dbid"><?php echo Util_ConfigLabel::get( 'redis.dbid' ) ?></label></th>
35
- <td>
36
- <input id="redis_dbid" type="text" name="<?php echo $module ?>__redis__dbid"
37
- <?php Util_Ui::sealing_disabled( $module ) ?>
38
- value="<?php echo esc_attr( $this->_config->get_integer( $module . '.redis.dbid' ) ); ?>"
39
- size="8" />
40
- <br /><span class="description"><?php _e( 'Database ID to use', 'w3-total-cache' ); ?></span>
41
- </td>
42
  </tr>
43
  <tr>
44
- <th><label for="redis_password"><?php echo Util_ConfigLabel::get( 'redis.password' ) ?></label></th>
45
- <td>
46
- <input id="redis_password" name="<?php echo $module ?>__redis__password" type="text"
47
- <?php Util_Ui::sealing_disabled( $module ) ?>
48
- <?php
49
  $this->value_with_disabled( $module . '.redis.password',
50
  false, '' )
51
- ?> /><br />
52
- <span class="description"><?php _e( 'Specify redis password, when <acronym title="Simple Authentication and Security Layer">SASL</acronym> authentication used', 'w3-total-cache' )?></span>
53
- </td>
54
  </tr>
9
  */
10
  ?>
11
  <tr>
12
+ <th><label for="redis_servers"><?php echo Util_ConfigLabel::get( 'redis.servers' ) ?></label></th>
13
+ <td>
14
+ <input id="redis_servers" type="text"
15
+ name="<?php echo $module ?>__redis__servers"
16
+ <?php Util_Ui::sealing_disabled( $module ) ?>
17
+ value="<?php echo esc_attr( implode( ',', $this->_config->get_array( $module . '.redis.servers' ) ) ); ?>"
18
+ size="100" />
19
+ <input class="w3tc_common_redis_test button {nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}"
20
+ <?php Util_Ui::sealing_disabled( $module ) ?>
21
+ type="button" value="<?php esc_attr_e( 'Test', 'w3-total-cache' ); ?>" />
22
+ <span class="w3tc_common_redis_test_result w3tc-status w3tc-process"></span>
23
+ <p class="description"><?php _e( 'Multiple servers may be used and seperated by a comma; e.g. 192.168.1.100:11211, domain.com:22122', 'w3-total-cache' ); ?></p>
24
+ </td>
25
  </tr>
26
  <tr>
27
+ <th><label><?php _e( 'Use persistent connection:', 'w3-total-cache' ); ?></label></th>
28
+ <td>
29
+ <?php $this->checkbox( $module . '.redis.persistent' ) ?> <?php echo Util_ConfigLabel::get( 'redis.persistent' ) ?></label>
30
+ <p class="description"><?php _e( 'Using persistent connection doesn\'t reinitialize redis driver on each request', 'w3-total-cache' ); ?></p>
31
+ </td>
32
  </tr>
33
  <tr>
34
+ <th style="width: 250px;"><label for="redis_dbid"><?php echo Util_ConfigLabel::get( 'redis.dbid' ) ?></label></th>
35
+ <td>
36
+ <input id="redis_dbid" type="text" name="<?php echo $module ?>__redis__dbid"
37
+ <?php Util_Ui::sealing_disabled( $module ) ?>
38
+ value="<?php echo esc_attr( $this->_config->get_integer( $module . '.redis.dbid' ) ); ?>"
39
+ size="8" />
40
+ <p class="description"><?php _e( 'Database ID to use', 'w3-total-cache' ); ?></p>
41
+ </td>
42
  </tr>
43
  <tr>
44
+ <th><label for="redis_password"><?php echo Util_ConfigLabel::get( 'redis.password' ) ?></label></th>
45
+ <td>
46
+ <input id="redis_password" name="<?php echo $module ?>__redis__password" type="text"
47
+ <?php Util_Ui::sealing_disabled( $module ) ?>
48
+ <?php
49
  $this->value_with_disabled( $module . '.redis.password',
50
  false, '' )
51
+ ?> />
52
+ <p class="description"><?php _e( 'Specify redis password, when <acronym title="Simple Authentication and Security Layer">SASL</acronym> authentication used', 'w3-total-cache' )?></p>
53
+ </td>
54
  </tr>
inc/options/parts/redis_extension.php CHANGED
@@ -11,19 +11,19 @@ $config = Dispatcher::config();
11
 
12
  ?>
13
  <tr>
14
- <th><label for="redis_servers"><?php echo Util_ConfigLabel::get( 'redis.servers' ) ?></label></th>
15
- <td>
16
- <input id="redis_servers" type="text"
17
- name="<?php echo $module ?>___redis__servers"
18
- <?php Util_Ui::sealing_disabled( $module ) ?>
19
- value="<?php echo esc_attr( implode( ',', $config->get_array( array( $module, 'redis.servers' ) ) ) ); ?>"
20
- size="100" />
21
- <input class="w3tc_common_redis_test button {nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}"
22
- <?php Util_Ui::sealing_disabled( $module ) ?>
23
- type="button" value="<?php esc_attr_e( 'Test', 'w3-total-cache' ); ?>" />
24
- <span class="w3tc_common_redis_test_result w3tc-status w3tc-process"></span>
25
- <br /><span class="description"><?php _e( 'Multiple servers may be used and seperated by a comma; e.g. 192.168.1.100:11211, domain.com:22122', 'w3-total-cache' ); ?></span>
26
- </td>
27
  </tr>
28
  <?php
29
 
11
 
12
  ?>
13
  <tr>
14
+ <th><label for="redis_servers"><?php echo Util_ConfigLabel::get( 'redis.servers' ) ?></label></th>
15
+ <td>
16
+ <input id="redis_servers" type="text"
17
+ name="<?php echo $module ?>___redis__servers"
18
+ <?php Util_Ui::sealing_disabled( $module ) ?>
19
+ value="<?php echo esc_attr( implode( ',', $config->get_array( array( $module, 'redis.servers' ) ) ) ); ?>"
20
+ size="100" />
21
+ <input class="w3tc_common_redis_test button {nonce: '<?php echo wp_create_nonce( 'w3tc' ); ?>'}"
22
+ <?php Util_Ui::sealing_disabled( $module ) ?>
23
+ type="button" value="<?php esc_attr_e( 'Test', 'w3-total-cache' ); ?>" />
24
+ <span class="w3tc_common_redis_test_result w3tc-status w3tc-process"></span>
25
+ <p class="description"><?php _e( 'Multiple servers may be used and seperated by a comma; e.g. 192.168.1.100:11211, domain.com:22122', 'w3-total-cache' ); ?></p>
26
+ </td>
27
  </tr>
28
  <?php
29
 
inc/options/pgcache.php CHANGED
@@ -31,54 +31,54 @@ echo sprintf( __( 'To rebuild the page cache use the %s operation', 'w3-total-ca
31
  <table class="form-table">
32
  <tr>
33
  <th>
34
- <?php $this->checkbox( 'pgcache.cache.home' ); ?> <?php Util_Ui::e_config_label( 'pgcache.cache.home' ) ?></label><br />
35
- <span class="description"><?php _e( 'For many blogs this is your most visited page, it is recommended that you cache it.', 'w3-total-cache' ); ?></span>
36
  </th>
37
  </tr>
38
  <?php if ( get_option( 'show_on_front' ) != 'posts' ): ?>
39
  <tr>
40
  <th>
41
- <?php $this->checkbox( 'pgcache.reject.front_page' ); ?> <?php Util_Ui::e_config_label( 'pgcache.reject.front_page' ) ?></label><br />
42
- <span class="description"><?php _e( 'By default the front page is cached when using static front page in reading settings.', 'w3-total-cache' ); ?></span>
43
  </th>
44
  </tr>
45
  <?php endif; ?>
46
  <tr>
47
  <th>
48
- <?php $this->checkbox( 'pgcache.cache.feed' ) ?> <?php Util_Ui::e_config_label( 'pgcache.cache.feed' ) ?></label><br />
49
- <span class="description"><?php _e( 'Even if using a feed proxy service (like <a href="http://en.wikipedia.org/wiki/FeedBurner" target="_blank">FeedBurner</a>), enabling this option is still recommended.', 'w3-total-cache' ); ?></span>
50
  </th>
51
  </tr>
52
  <tr>
53
  <th>
54
- <?php $this->checkbox( 'pgcache.cache.ssl' ) ?> <?php Util_Ui::e_config_label( 'pgcache.cache.ssl' ) ?></label><br />
55
- <span class="description"><?php _e( 'Cache <acronym title="Secure Socket Layer">SSL</acronym> requests (uniquely) for improved performance.', 'w3-total-cache' ); ?></span>
56
  </th>
57
  </tr>
58
  <tr>
59
  <th>
60
  <?php $this->checkbox( 'pgcache.cache.query',
61
  ( $this->_config->get_string( 'pgcache.engine' ) == 'file_generic' ),
62
- '', true, ( $this->_config->get_string( 'pgcache.engine' ) == 'file_generic' ? 0 : null ) ) ?> <?php Util_Ui::e_config_label( 'pgcache.cache.query', 'settings' ) ?></label><br />
63
- <span class="description"><?php _e( 'Search result (and similar) pages will be cached if enabled.', 'w3-total-cache' ); ?></span>
64
  </th>
65
  </tr>
66
  <tr>
67
  <th>
68
- <?php $this->checkbox( 'pgcache.cache.404' ) ?> <?php Util_Ui::e_config_label( 'pgcache.cache.404' ); ?></label><br />
69
- <span class="description"><?php _e( 'Reduce server load by caching 404 pages. If the disk enhanced method of disk caching is used, 404 pages will be returned with a 200 response code. Use at your own risk.', 'w3-total-cache' ); ?></span>
70
  </th>
71
  </tr>
72
  <tr>
73
  <th>
74
- <?php $this->checkbox( 'pgcache.reject.logged' ) ?> <?php Util_Ui::e_config_label( 'pgcache.reject.logged' ) ?></label><br />
75
- <span class="description"><?php _e( 'Unauthenticated users may view a cached version of the last authenticated user\'s view of a given page. Disabling this option is not recommended.', 'w3-total-cache' ); ?></span>
76
  </th>
77
  </tr>
78
  <tr>
79
  <th>
80
- <?php $this->checkbox( 'pgcache.reject.logged_roles' ) ?> <?php Util_Ui::e_config_label( 'pgcache.reject.logged_roles' ) ?></label><br />
81
- <span class="description"><?php _e( 'Select user roles that should not receive cached pages:', 'w3-total-cache' ); ?></span>
82
 
83
  <div id="pgcache_reject_roles" class="w3tc_reject_roles">
84
  <?php $saved_roles = $this->_config->get_array( 'pgcache.reject.roles' ); ?>
@@ -132,8 +132,8 @@ Util_Ui::config_item( array(
132
  <td>
133
  <input id="pgcache_prime_interval" type="text" name="pgcache__prime__interval"
134
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
135
- value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.prime.interval' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?><br />
136
- <span class="description"><?php _e( 'The number of seconds to wait before creating another set of cached pages.', 'w3-total-cache' ); ?></span>
137
  </td>
138
  </tr>
139
  <tr>
@@ -141,8 +141,8 @@ Util_Ui::config_item( array(
141
  <td>
142
  <input id="pgcache_prime_limit" type="text" name="pgcache__prime__limit"
143
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
144
- value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.prime.limit' ) ); ?>" size="8" /><br />
145
- <span class="description"><?php _e( 'Limit the number of pages to create per batch. Fewer pages may be better for under-powered servers.', 'w3-total-cache' ); ?></span>
146
  </td>
147
  </tr>
148
  <tr>
@@ -150,8 +150,8 @@ Util_Ui::config_item( array(
150
  <td>
151
  <input id="pgcache_prime_sitemap" type="text" name="pgcache__prime__sitemap"
152
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
153
- value="<?php echo esc_attr( $this->_config->get_string( 'pgcache.prime.sitemap' ) ); ?>" size="100" /><br />
154
- <span class="description"><?php _e( 'A <a href="http://www.xml-sitemaps.com/validate-xml-sitemap.html" target="_blank">compliant</a> sitemap can be used to specify the pages to maintain in the primed cache. Pages will be cached according to the priorities specified in the <acronym title="Extensible Markup Language">XML</acronym> file.', 'w3-total-cache' ); ?></span>
155
  </td>
156
  </tr>
157
  <tr>
@@ -223,8 +223,8 @@ Util_Ui::postbox_header( __( 'Purge Policy: ', 'w3-total-cache' ) . implode( ',
223
  <tr>
224
  <th><label for="pgcache_purge_postpages_limit"><?php Util_Ui::e_config_label( 'pgcache.purge.postpages_limit' ) ?></label></th>
225
  <td>
226
- <input id="pgcache_purge_postpages_limit" name="pgcache__purge__postpages_limit" <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?> type="text" value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.purge.postpages_limit' ) ); ?>" /><br />
227
- <span class="description"><?php _e( 'Specify number of pages that lists posts (archive etc) that should be purged on post updates etc, i.e example.com/ ... example.com/page/5. <br />0 means all pages that lists posts are purged, i.e example.com/page/2 ... .', 'w3-total-cache' ); ?></span>
228
  </td>
229
  </tr>
230
  <tr>
@@ -232,15 +232,15 @@ Util_Ui::postbox_header( __( 'Purge Policy: ', 'w3-total-cache' ) . implode( ',
232
  <td>
233
  <textarea id="pgcache_purge_pages" name="pgcache__purge__pages"
234
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
235
- cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.purge.pages' ) ) ); ?></textarea><br />
236
- <span class="description"><?php _e( 'Specify additional pages to purge. Including parent page in path. Ex: parent/posts.', 'w3-total-cache' ); ?></span>
237
  </td>
238
  </tr>
239
  <tr>
240
  <th><label for="pgcache_purge_sitemap_regex"><?php Util_Ui::e_config_label( 'pgcache.purge.sitemap_regex' ) ?></label></th>
241
  <td>
242
- <input id="pgcache_purge_sitemap_regex" name="pgcache__purge__sitemap_regex" <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'pgcache.purge.sitemap_regex' ) ) ?>" type="text" /><br />
243
- <span class="description"><?php _e( 'Specify a regular expression that matches your sitemaps.', 'w3-total-cache' ); ?></span>
244
  </td>
245
  </tr>
246
  </table>
@@ -258,9 +258,15 @@ Util_Ui::postbox_header( __( 'Purge Policy: ', 'w3-total-cache' ) . implode( ',
258
  'radiogroup_values' => array(
259
  '' => "Don't cache",
260
  'cache' => array(
261
- 'label' => "Cache",
262
  'disabled' => !Util_Environment::is_w3tc_pro( $this->_config ),
263
- 'pro_feature' => true
 
 
 
 
 
 
264
  ),
265
  'disable' => 'Disable <acronym title="REpresentational State Transfer">REST</acronym> <acronym title="Application Programming Interface">API</acronym>',
266
  ),
@@ -280,7 +286,7 @@ Util_Ui::postbox_header( __( 'Purge Policy: ', 'w3-total-cache' ) . implode( ',
280
  <td>
281
  <input type="hidden" name="pgcache__late_init" value="0" />
282
  <label><input id="pgcache_late_init" type="checkbox" name="pgcache__late_init" value="1"<?php checked( $this->_config->get_string( 'pgcache.engine' ) != 'file_generic' && $this->_config->get_boolean( 'pgcache.late_init' ) ); ?> <?php disabled( $this->_config->get_string( 'pgcache.engine' ), 'file_generic' ) ?> /> <?php _e( 'Enable', 'w3-total-cache' ); ?></label>
283
- <br /><span class="description"><?php _e( 'Enables support for WordPress functionality in fragment caching for the page caching engine. Use of this feature may increase response times.', 'w3-total-cache' )?></span>
284
  </td>
285
  </tr>
286
  <tr>
@@ -288,7 +294,7 @@ Util_Ui::postbox_header( __( 'Purge Policy: ', 'w3-total-cache' ) . implode( ',
288
  <td>
289
  <input type="hidden" name="pgcache__late_caching" value="0" />
290
  <label><input id="pgcache_late_caching" type="checkbox" name="pgcache__late_caching" value="1"<?php checked( $this->_config->get_string( 'pgcache.engine' ) != 'file_generic' && $this->_config->get_boolean( 'pgcache.late_caching' ) ); ?> <?php disabled( $this->_config->get_string( 'pgcache.engine' ), 'file_generic' ) ?> /> <?php _e( 'Enable', 'w3-total-cache' ); ?></label>
291
- <br /><span class="description"><?php _e( 'Overwrites key of page caching via custom filters by postponing entry extraction during the init action.', 'w3-total-cache' )?></span>
292
  </td>
293
  </tr>
294
  <?php
@@ -305,16 +311,16 @@ if ( $this->_config->get_string( 'pgcache.engine' ) == 'memcached' ||
305
  <tr>
306
  <th><label><?php _e( 'Compatibility mode:', 'w3-total-cache' ); ?></label></th>
307
  <td>
308
- <?php $this->checkbox( 'pgcache.compatibility' ) ?> <?php Util_Ui::e_config_label( 'pgcache.compatibility' ) ?></label><br />
309
- <span class="description"><?php _e( 'Decreases performance by ~20% at scale in exchange for increasing interoperability with more hosting environments and WordPress idiosyncrasies. This option should be enabled for most sites.', 'w3-total-cache' ); ?></span>
310
  </td>
311
  </tr>
312
  <?php if ( !Util_Environment::is_nginx() ): ?>
313
  <tr>
314
  <th><label><?php _e( 'Charset:', 'w3-total-cache' )?></label></th>
315
  <td>
316
- <?php $this->checkbox( 'pgcache.remove_charset' ) ?> <?php Util_Ui::e_config_label( 'pgcache.remove_charset' ) ?></label><br />
317
- <span class="description"><?php _e( 'Resolve issues incorrect odd character encoding that may appear in cached pages.', 'w3-total-cache' )?></span>
318
  </td>
319
  </tr>
320
  <?php endif; ?>
@@ -322,11 +328,11 @@ if ( $this->_config->get_string( 'pgcache.engine' ) == 'memcached' ||
322
  <th><label for="pgcache_reject_request_head"><?php _e( 'Reject HEAD requests:', 'w3-total-cache' ); ?></label></th>
323
  <td>
324
  <?php if ( $this->_config->get_string( 'pgcache.engine' ) == 'file_generic' ):?>
325
- <input id="pgcache_reject_request_head" type="checkbox" name="pgcache__reject__request_head" value="1" disabled="disabled" /> <?php Util_Ui::e_config_label( 'pgcache.reject.request_head' ) ?><br />
326
  <?php else: ?>
327
- <?php $this->checkbox( 'pgcache.reject.request_head', false, '', false ) ?><?php Util_Ui::e_config_label( 'pgcache.reject.request_head' ) ?><br />
328
  <?php endif; ?>
329
- <span class="description"><?php _e( 'If disabled, HEAD requests can often be cached resulting in "empty pages" being returned for subsequent requests for a <acronym title="Uniform Resource Locator">URL</acronym>.', 'w3-total-cache' ); ?></span>
330
  </td>
331
  </tr>
332
  <?php endif; ?>
@@ -337,7 +343,7 @@ if ( $this->_config->get_string( 'pgcache.engine' ) == 'memcached' ||
337
  <input id="pgcache_lifetime" type="text" name="pgcache__lifetime"
338
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
339
  value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.lifetime' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
340
- <br /><span class="description"><?php _e( 'Determines the natural expiration time of unchanged cache items. The higher the value, the larger the cache.', 'w3-total-cache' ); ?></span>
341
  </td>
342
  </tr>
343
  <?php endif; ?>
@@ -347,14 +353,14 @@ if ( $this->_config->get_string( 'pgcache.engine' ) == 'memcached' ||
347
  <input id="pgcache_file_gc" type="text" name="pgcache__file__gc"
348
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
349
  value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.file.gc' ) ); ?>" size="8"<?php if ( $this->_config->get_string( 'pgcache.engine' ) != 'file' && $this->_config->get_string( 'pgcache.engine' ) != 'file_generic' ): ?> disabled="disabled"<?php endif; ?> /> <?php _e( 'seconds', 'w3-total-cache' ) ?>
350
- <br /><span class="description"><?php _e( 'If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.', 'w3-total-cache' ); ?></span>
351
  </td>
352
  </tr>
353
  <tr>
354
  <th><label for="pgcache_comment_cookie_ttl"><?php Util_Ui::e_config_label( 'pgcache.comment_cookie_ttl' ) ?></label></th>
355
  <td>
356
  <input id="pgcache_comment_cookie_ttl" type="text" name="pgcache__comment_cookie_ttl" value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.comment_cookie_ttl' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
357
- <br /><span class="description"><?php _e( 'Significantly reduce the default <acronym title="Time to Live">TTL</acronym> for comment cookies to reduce the number of authenticated user traffic. Enter -1 to revert to default <acronym title="Time to Live">TTL</acronym>.', 'w3-total-cache' ); ?></span>
358
  </td>
359
  </tr>
360
  <tr>
@@ -362,8 +368,8 @@ if ( $this->_config->get_string( 'pgcache.engine' ) == 'memcached' ||
362
  <td>
363
  <textarea id="pgcache_accept_qs" name="pgcache__accept__qs"
364
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
365
- cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.accept.qs' ) ) ); ?></textarea><br />
366
- <span class="description"><?php _e( 'Always cache <acronym title="Uniform Resource Locator">URL</acronym>s that use these query string name-value pairs. The value part is not required. But if used, separate name-value pairs with an equals sign (i.e., name=value). Each pair should be on their own line.', 'w3-total-cache' ); ?></span>
367
  </td>
368
  </tr>
369
  <tr>
@@ -371,8 +377,8 @@ if ( $this->_config->get_string( 'pgcache.engine' ) == 'memcached' ||
371
  <td>
372
  <textarea id="pgcache_reject_ua" name="pgcache__reject__ua"
373
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
374
- cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.ua' ) ) ); ?></textarea><br />
375
- <span class="description"><?php _e( 'Never send cache pages for these user agents.', 'w3-total-cache' ); ?></span>
376
  </td>
377
  </tr>
378
  <tr>
@@ -380,8 +386,8 @@ if ( $this->_config->get_string( 'pgcache.engine' ) == 'memcached' ||
380
  <td>
381
  <textarea id="pgcache_reject_cookie" name="pgcache__reject__cookie"
382
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
383
- cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.cookie' ) ) ); ?></textarea><br />
384
- <span class="description"><?php _e( 'Never cache pages that use the specified cookies.', 'w3-total-cache' ); ?></span>
385
  </td>
386
  </tr>
387
  <tr>
@@ -389,15 +395,16 @@ if ( $this->_config->get_string( 'pgcache.engine' ) == 'memcached' ||
389
  <td>
390
  <textarea id="pgcache_reject_uri" name="pgcache__reject__uri"
391
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
392
- cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.uri' ) ) ); ?></textarea><br />
393
- <span class="description">
394
  <?php
395
- echo sprintf(
396
- __( 'Always ignore the specified pages / directories. Supports regular expressions (See <a href="%s"><acronym title="Frequently Asked Questions">FAQ</acronym></a>)',
397
- 'w3-total-cache' ),
398
- 'https://github.com/W3EDGE/w3-total-cache/wiki/FAQ:-Usage#which-textareas-for-file-entries-support-regular-expressions'
399
- ); ?>
400
- </span>
 
401
  </td>
402
  </tr>
403
  <tr>
@@ -405,8 +412,8 @@ echo sprintf(
405
  <td>
406
  <textarea id="pgcache_reject_categories" name="pgcache__reject__categories"
407
  <?php Util_Ui::sealing_disabled( 'pgcache' ) ?>
408
- cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array('pgcache.reject.categories' ) ) ); ?></textarea><br />
409
- <span class="description"><?php _e( 'Always ignore all pages filed under the specified category slugs.', 'w3-total-cache' ); ?></span>
410
  </td>
411
  </tr>
412
  <tr>
@@ -414,8 +421,8 @@ echo sprintf(
414
  <td>
415
  <textarea id="pgcache_reject_tags" name="pgcache__reject__tags"
416
  <?php Util_Ui::sealing_disabled( 'pgcache' ) ?>
417
- cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.tags' ) ) ); ?></textarea><br />
418
- <span class="description"><?php _e( 'Always ignore all pages filed under the specified tag slugs.', 'w3-total-cache' ); ?></span>
419
  </td>
420
  </tr>
421
  <tr>
@@ -423,8 +430,8 @@ echo sprintf(
423
  <td>
424
  <textarea id="pgcache_reject_authors" name="pgcache__reject__authors"
425
  <?php Util_Ui::sealing_disabled( 'pgcache' ) ?>
426
- cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.authors' ) ) ); ?></textarea><br />
427
- <span class="description"><?php _e( 'Always ignore all pages filed under the specified author usernames.', 'w3-total-cache' ); ?></span>
428
  </td>
429
  </tr>
430
  <tr>
@@ -432,8 +439,8 @@ echo sprintf(
432
  <td>
433
  <textarea id="pgcache_reject_custom" name="pgcache__reject__custom"
434
  <?php Util_Ui::sealing_disabled( 'pgcache' ) ?>
435
- cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array('pgcache.reject.custom' ) ) ); ?></textarea><br />
436
- <span class="description"><?php _e( 'Always ignore all pages filed under the specified custom fields. Separate name-value pairs with an equals sign (i.e., name=value).', 'w3-total-cache' ); ?></span>
437
  </td>
438
  </tr>
439
  <tr>
@@ -441,8 +448,8 @@ echo sprintf(
441
  <td>
442
  <textarea id="pgcache_accept_files" name="pgcache__accept__files"
443
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
444
- cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.accept.files' ) ) ); ?></textarea><br />
445
- <span class="description"><?php echo sprintf( __( 'Cache the specified pages / directories even if listed in the "never cache the following pages" field. Supports regular expression (See <a href="%s"><acronym title="Frequently Asked Questions">FAQ</acronym></a>)', 'w3-total-cache' ), network_admin_url( 'admin.php?page=w3tc_faq' ) ); ?></span>
446
  </td>
447
  </tr>
448
  <?php if ( substr( $permalink_structure, -1 ) == '/' ): ?>
@@ -451,8 +458,8 @@ echo sprintf(
451
  <td>
452
  <textarea id="pgcache_accept_uri" name="pgcache__accept__uri"
453
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
454
- cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.accept.uri' ) ) ); ?></textarea><br />
455
- <span class="description"><?php _e( 'Cache the specified pages even if they don\'t have tailing slash.', 'w3-total-cache' ); ?></span>
456
  </td>
457
  </tr>
458
  <?php endif; ?>
@@ -461,16 +468,16 @@ echo sprintf(
461
  <td>
462
  <textarea id="pgcache_cache_headers" name="pgcache__cache__headers"
463
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
464
- cols="40" rows="5"<?php if ( $this->_config->get_string( 'pgcache.engine' ) == 'file_generic' ): ?> disabled="disabled"<?php endif; ?>><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.cache.headers' ) ) ); ?></textarea><br />
465
- <span class="description"><?php _e( 'Specify additional page headers to cache.', 'w3-total-cache' )?></span>
466
  </td>
467
  </tr>
468
  <?php if ( $this->_config->get_string( 'pgcache.engine' ) == 'file_generic' ): ?>
469
  <tr>
470
  <th><label><?php Util_Ui::e_config_label( 'pgcache.cache.nginx_handle_xml' ) ?></label></th>
471
  <td>
472
- <?php $this->checkbox( 'pgcache.cache.nginx_handle_xml' ) ?> <?php Util_Ui::e_config_label( 'pgcache.cache.nginx_handle_xml' ) ?></label><br />
473
- <span class="description"><?php _e( 'Return correct Content-Type header for <acronym title="Extensible Markup Language">XML</acronym> files (e.g., feeds and sitemaps). Slows down cache engine.', 'w3-total-cache' ); ?></span>
474
  </td>
475
  </tr>
476
  <?php endif; ?>
31
  <table class="form-table">
32
  <tr>
33
  <th>
34
+ <?php $this->checkbox( 'pgcache.cache.home' ); ?> <?php Util_Ui::e_config_label( 'pgcache.cache.home' ) ?></label>
35
+ <p class="description"><?php _e( 'For many blogs this is your most visited page, it is recommended that you cache it.', 'w3-total-cache' ); ?></p>
36
  </th>
37
  </tr>
38
  <?php if ( get_option( 'show_on_front' ) != 'posts' ): ?>
39
  <tr>
40
  <th>
41
+ <?php $this->checkbox( 'pgcache.reject.front_page' ); ?> <?php Util_Ui::e_config_label( 'pgcache.reject.front_page' ) ?></label>
42
+ <p class="description"><?php _e( 'By default the front page is cached when using static front page in reading settings.', 'w3-total-cache' ); ?></p>
43
  </th>
44
  </tr>
45
  <?php endif; ?>
46
  <tr>
47
  <th>
48
+ <?php $this->checkbox( 'pgcache.cache.feed' ) ?> <?php Util_Ui::e_config_label( 'pgcache.cache.feed' ) ?></label>
49
+ <p class="description"><?php _e( 'Even if using a feed proxy service (like <a href="http://en.wikipedia.org/wiki/FeedBurner" target="_blank">FeedBurner</a>), enabling this option is still recommended.', 'w3-total-cache' ); ?></p>
50
  </th>
51
  </tr>
52
  <tr>
53
  <th>
54
+ <?php $this->checkbox( 'pgcache.cache.ssl' ) ?> <?php Util_Ui::e_config_label( 'pgcache.cache.ssl' ) ?></label>
55
+ <p class="description"><?php _e( 'Cache <acronym title="Secure Socket Layer">SSL</acronym> requests (uniquely) for improved performance.', 'w3-total-cache' ); ?></p>
56
  </th>
57
  </tr>
58
  <tr>
59
  <th>
60
  <?php $this->checkbox( 'pgcache.cache.query',
61
  ( $this->_config->get_string( 'pgcache.engine' ) == 'file_generic' ),
62
+ '', true, ( $this->_config->get_string( 'pgcache.engine' ) == 'file_generic' ? 0 : null ) ) ?> <?php Util_Ui::e_config_label( 'pgcache.cache.query', 'settings' ) ?></label>
63
+ <p class="description"><?php _e( 'Search result (and similar) pages will be cached if enabled.', 'w3-total-cache' ); ?></p>
64
  </th>
65
  </tr>
66
  <tr>
67
  <th>
68
+ <?php $this->checkbox( 'pgcache.cache.404' ) ?> <?php Util_Ui::e_config_label( 'pgcache.cache.404' ); ?></label>
69
+ <p class="description"><?php _e( 'Reduce server load by caching 404 pages. If the disk enhanced method of disk caching is used, 404 pages will be returned with a 200 response code. Use at your own risk.', 'w3-total-cache' ); ?></p>
70
  </th>
71
  </tr>
72
  <tr>
73
  <th>
74
+ <?php $this->checkbox( 'pgcache.reject.logged' ) ?> <?php Util_Ui::e_config_label( 'pgcache.reject.logged' ) ?></label>
75
+ <p class="description"><?php _e( 'Unauthenticated users may view a cached version of the last authenticated user\'s view of a given page. Disabling this option is not recommended.', 'w3-total-cache' ); ?></p>
76
  </th>
77
  </tr>
78
  <tr>
79
  <th>
80
+ <?php $this->checkbox( 'pgcache.reject.logged_roles' ) ?> <?php Util_Ui::e_config_label( 'pgcache.reject.logged_roles' ) ?></label>
81
+ <p class="description"><?php _e( 'Select user roles that should not receive cached pages:', 'w3-total-cache' ); ?></p>
82
 
83
  <div id="pgcache_reject_roles" class="w3tc_reject_roles">
84
  <?php $saved_roles = $this->_config->get_array( 'pgcache.reject.roles' ); ?>
132
  <td>
133
  <input id="pgcache_prime_interval" type="text" name="pgcache__prime__interval"
134
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
135
+ value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.prime.interval' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
136
+ <p class="description"><?php _e( 'The number of seconds to wait before creating another set of cached pages.', 'w3-total-cache' ); ?></p>
137
  </td>
138
  </tr>
139
  <tr>
141
  <td>
142
  <input id="pgcache_prime_limit" type="text" name="pgcache__prime__limit"
143
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
144
+ value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.prime.limit' ) ); ?>" size="8" />
145
+ <p class="description"><?php _e( 'Limit the number of pages to create per batch. Fewer pages may be better for under-powered servers.', 'w3-total-cache' ); ?></p>
146
  </td>
147
  </tr>
148
  <tr>
150
  <td>
151
  <input id="pgcache_prime_sitemap" type="text" name="pgcache__prime__sitemap"
152
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
153
+ value="<?php echo esc_attr( $this->_config->get_string( 'pgcache.prime.sitemap' ) ); ?>" size="100" />
154
+ <p class="description"><?php _e( 'A <a href="http://www.xml-sitemaps.com/validate-xml-sitemap.html" target="_blank">compliant</a> sitemap can be used to specify the pages to maintain in the primed cache. Pages will be cached according to the priorities specified in the <acronym title="Extensible Markup Language">XML</acronym> file.', 'w3-total-cache' ); ?></p>
155
  </td>
156
  </tr>
157
  <tr>
223
  <tr>
224
  <th><label for="pgcache_purge_postpages_limit"><?php Util_Ui::e_config_label( 'pgcache.purge.postpages_limit' ) ?></label></th>
225
  <td>
226
+ <input id="pgcache_purge_postpages_limit" name="pgcache__purge__postpages_limit" <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?> type="text" value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.purge.postpages_limit' ) ); ?>" />
227
+ <p class="description"><?php _e( 'Specify number of pages that lists posts (archive etc) that should be purged on post updates etc, i.e example.com/ ... example.com/page/5. <br />0 means all pages that lists posts are purged, i.e example.com/page/2 ... .', 'w3-total-cache' ); ?></p>
228
  </td>
229
  </tr>
230
  <tr>
232
  <td>
233
  <textarea id="pgcache_purge_pages" name="pgcache__purge__pages"
234
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
235
+ cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.purge.pages' ) ) ); ?></textarea>
236
+ <p class="description"><?php _e( 'Specify additional pages to purge. Including parent page in path. Ex: parent/posts.', 'w3-total-cache' ); ?></p>
237
  </td>
238
  </tr>
239
  <tr>
240
  <th><label for="pgcache_purge_sitemap_regex"><?php Util_Ui::e_config_label( 'pgcache.purge.sitemap_regex' ) ?></label></th>
241
  <td>
242
+ <input id="pgcache_purge_sitemap_regex" name="pgcache__purge__sitemap_regex" <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?> value="<?php echo esc_attr( $this->_config->get_string( 'pgcache.purge.sitemap_regex' ) ) ?>" type="text" />
243
+ <p class="description"><?php _e( 'Specify a regular expression that matches your sitemaps.', 'w3-total-cache' ); ?></p>
244
  </td>
245
  </tr>
246
  </table>
258
  'radiogroup_values' => array(
259
  '' => "Don't cache",
260
  'cache' => array(
261
+ 'label' => 'Cache',
262
  'disabled' => !Util_Environment::is_w3tc_pro( $this->_config ),
263
+ 'pro_feature' => true,
264
+ 'pro_excerpt' => __( 'If you’re using the WordPress API make sure to use caching to scale performance.', 'w3-total-cache'),
265
+ 'pro_description' => array(
266
+ __( 'If you use WordPress as a backend for integrations, API caching may be for you. Similar to page caching, repeat requests will benefit by having significantly lower response times and consume fewer resources to deliver.', 'w3-total-cache'),
267
+
268
+ __( 'Note: If WordPress is not used as a backend, for additional security, the API can be disabled completely.', 'w3-total-cache')
269
+ )
270
  ),
271
  'disable' => 'Disable <acronym title="REpresentational State Transfer">REST</acronym> <acronym title="Application Programming Interface">API</acronym>',
272
  ),
286
  <td>
287
  <input type="hidden" name="pgcache__late_init" value="0" />
288
  <label><input id="pgcache_late_init" type="checkbox" name="pgcache__late_init" value="1"<?php checked( $this->_config->get_string( 'pgcache.engine' ) != 'file_generic' && $this->_config->get_boolean( 'pgcache.late_init' ) ); ?> <?php disabled( $this->_config->get_string( 'pgcache.engine' ), 'file_generic' ) ?> /> <?php _e( 'Enable', 'w3-total-cache' ); ?></label>
289
+ <p class="description"><?php _e( 'Enables support for WordPress functionality in fragment caching for the page caching engine. Use of this feature may increase response times.', 'w3-total-cache' )?></p>
290
  </td>
291
  </tr>
292
  <tr>
294
  <td>
295
  <input type="hidden" name="pgcache__late_caching" value="0" />
296
  <label><input id="pgcache_late_caching" type="checkbox" name="pgcache__late_caching" value="1"<?php checked( $this->_config->get_string( 'pgcache.engine' ) != 'file_generic' && $this->_config->get_boolean( 'pgcache.late_caching' ) ); ?> <?php disabled( $this->_config->get_string( 'pgcache.engine' ), 'file_generic' ) ?> /> <?php _e( 'Enable', 'w3-total-cache' ); ?></label>
297
+ <p class="description"><?php _e( 'Overwrites key of page caching via custom filters by postponing entry extraction during the init action.', 'w3-total-cache' )?></p>
298
  </td>
299
  </tr>
300
  <?php
311
  <tr>
312
  <th><label><?php _e( 'Compatibility mode:', 'w3-total-cache' ); ?></label></th>
313
  <td>
314
+ <?php $this->checkbox( 'pgcache.compatibility' ) ?> <?php Util_Ui::e_config_label( 'pgcache.compatibility' ) ?></label>
315
+ <p class="description"><?php _e( 'Decreases performance by ~20% at scale in exchange for increasing interoperability with more hosting environments and WordPress idiosyncrasies. This option should be enabled for most sites.', 'w3-total-cache' ); ?></p>
316
  </td>
317
  </tr>
318
  <?php if ( !Util_Environment::is_nginx() ): ?>
319
  <tr>
320
  <th><label><?php _e( 'Charset:', 'w3-total-cache' )?></label></th>
321
  <td>
322
+ <?php $this->checkbox( 'pgcache.remove_charset' ) ?> <?php Util_Ui::e_config_label( 'pgcache.remove_charset' ) ?></label>
323
+ <p class="description"><?php _e( 'Resolve issues incorrect odd character encoding that may appear in cached pages.', 'w3-total-cache' )?></p>
324
  </td>
325
  </tr>
326
  <?php endif; ?>
328
  <th><label for="pgcache_reject_request_head"><?php _e( 'Reject HEAD requests:', 'w3-total-cache' ); ?></label></th>
329
  <td>
330
  <?php if ( $this->_config->get_string( 'pgcache.engine' ) == 'file_generic' ):?>
331
+ <input id="pgcache_reject_request_head" type="checkbox" name="pgcache__reject__request_head" value="1" disabled="disabled" /> <?php Util_Ui::e_config_label( 'pgcache.reject.request_head' ) ?>
332
  <?php else: ?>
333
+ <?php $this->checkbox( 'pgcache.reject.request_head', false, '', false ) ?><?php Util_Ui::e_config_label( 'pgcache.reject.request_head' ) ?>
334
  <?php endif; ?>
335
+ <p class="description"><?php _e( 'If disabled, HEAD requests can often be cached resulting in "empty pages" being returned for subsequent requests for a <acronym title="Uniform Resource Locator">URL</acronym>.', 'w3-total-cache' ); ?></p>
336
  </td>
337
  </tr>
338
  <?php endif; ?>
343
  <input id="pgcache_lifetime" type="text" name="pgcache__lifetime"
344
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
345
  value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.lifetime' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
346
+ <p class="description"><?php _e( 'Determines the natural expiration time of unchanged cache items. The higher the value, the larger the cache.', 'w3-total-cache' ); ?></p>
347
  </td>
348
  </tr>
349
  <?php endif; ?>
353
  <input id="pgcache_file_gc" type="text" name="pgcache__file__gc"
354
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
355
  value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.file.gc' ) ); ?>" size="8"<?php if ( $this->_config->get_string( 'pgcache.engine' ) != 'file' && $this->_config->get_string( 'pgcache.engine' ) != 'file_generic' ): ?> disabled="disabled"<?php endif; ?> /> <?php _e( 'seconds', 'w3-total-cache' ) ?>
356
+ <p class="description"><?php _e( 'If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.', 'w3-total-cache' ); ?></p>
357
  </td>
358
  </tr>
359
  <tr>
360
  <th><label for="pgcache_comment_cookie_ttl"><?php Util_Ui::e_config_label( 'pgcache.comment_cookie_ttl' ) ?></label></th>
361
  <td>
362
  <input id="pgcache_comment_cookie_ttl" type="text" name="pgcache__comment_cookie_ttl" value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.comment_cookie_ttl' ) ); ?>" size="8" /> <?php _e( 'seconds', 'w3-total-cache' ); ?>
363
+ <p class="description"><?php _e( 'Significantly reduce the default <acronym title="Time to Live">TTL</acronym> for comment cookies to reduce the number of authenticated user traffic. Enter -1 to revert to default <acronym title="Time to Live">TTL</acronym>.', 'w3-total-cache' ); ?></p>
364
  </td>
365
  </tr>
366
  <tr>
368
  <td>
369
  <textarea id="pgcache_accept_qs" name="pgcache__accept__qs"
370
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
371
+ cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.accept.qs' ) ) ); ?></textarea>
372
+ <p class="description"><?php _e( 'Always cache <acronym title="Uniform Resource Locator">URL</acronym>s that use these query string name-value pairs. The value part is not required. But if used, separate name-value pairs with an equals sign (i.e., name=value). Each pair should be on their own line.', 'w3-total-cache' ); ?></p>
373
  </td>
374
  </tr>
375
  <tr>
377
  <td>
378
  <textarea id="pgcache_reject_ua" name="pgcache__reject__ua"
379
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
380
+ cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.ua' ) ) ); ?></textarea>
381
+ <p class="description"><?php _e( 'Never send cache pages for these user agents.', 'w3-total-cache' ); ?></p>
382
  </td>
383
  </tr>
384
  <tr>
386
  <td>
387
  <textarea id="pgcache_reject_cookie" name="pgcache__reject__cookie"
388
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
389
+ cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.cookie' ) ) ); ?></textarea>
390
+ <p class="description"><?php _e( 'Never cache pages that use the specified cookies.', 'w3-total-cache' ); ?></p>
391
  </td>
392
  </tr>
393
  <tr>
395
  <td>
396
  <textarea id="pgcache_reject_uri" name="pgcache__reject__uri"
397
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
398
+ cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.uri' ) ) ); ?></textarea>
399
+ <p class="description">
400
  <?php
401
+ echo sprintf(
402
+ __( 'Always ignore the specified pages / directories. Supports regular expressions (See <a href="%s"><acronym title="Frequently Asked Questions">FAQ</acronym></a>)',
403
+ 'w3-total-cache' ),
404
+ 'https://github.com/W3EDGE/w3-total-cache/wiki/FAQ:-Usage#which-textareas-for-file-entries-support-regular-expressions'
405
+ )
406
+ ?>
407
+ </p>
408
  </td>
409
  </tr>
410
  <tr>
412
  <td>
413
  <textarea id="pgcache_reject_categories" name="pgcache__reject__categories"
414
  <?php Util_Ui::sealing_disabled( 'pgcache' ) ?>
415
+ cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array('pgcache.reject.categories' ) ) ); ?></textarea>
416
+ <p class="description"><?php _e( 'Always ignore all pages filed under the specified category slugs.', 'w3-total-cache' ); ?></p>
417
  </td>
418
  </tr>
419
  <tr>
421
  <td>
422
  <textarea id="pgcache_reject_tags" name="pgcache__reject__tags"
423
  <?php Util_Ui::sealing_disabled( 'pgcache' ) ?>
424
+ cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.tags' ) ) ); ?></textarea>
425
+ <p class="description"><?php _e( 'Always ignore all pages filed under the specified tag slugs.', 'w3-total-cache' ); ?></p>
426
  </td>
427
  </tr>
428
  <tr>
430
  <td>
431
  <textarea id="pgcache_reject_authors" name="pgcache__reject__authors"
432
  <?php Util_Ui::sealing_disabled( 'pgcache' ) ?>
433
+ cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.authors' ) ) ); ?></textarea>
434
+ <p class="description"><?php _e( 'Always ignore all pages filed under the specified author usernames.', 'w3-total-cache' ); ?></p>
435
  </td>
436
  </tr>
437
  <tr>
439
  <td>
440
  <textarea id="pgcache_reject_custom" name="pgcache__reject__custom"
441
  <?php Util_Ui::sealing_disabled( 'pgcache' ) ?>
442
+ cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array('pgcache.reject.custom' ) ) ); ?></textarea>
443
+ <p class="description"><?php _e( 'Always ignore all pages filed under the specified custom fields. Separate name-value pairs with an equals sign (i.e., name=value).', 'w3-total-cache' ); ?></p>
444
  </td>
445
  </tr>
446
  <tr>
448
  <td>
449
  <textarea id="pgcache_accept_files" name="pgcache__accept__files"
450
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
451
+ cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.accept.files' ) ) ); ?></textarea>
452
+ <p class="description"><?php echo sprintf( __( 'Cache the specified pages / directories even if listed in the "never cache the following pages" field. Supports regular expression (See <a href="%s"><acronym title="Frequently Asked Questions">FAQ</acronym></a>)', 'w3-total-cache' ), network_admin_url( 'admin.php?page=w3tc_faq' ) ); ?></p>
453
  </td>
454
  </tr>
455
  <?php if ( substr( $permalink_structure, -1 ) == '/' ): ?>
458
  <td>
459
  <textarea id="pgcache_accept_uri" name="pgcache__accept__uri"
460
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
461
+ cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.accept.uri' ) ) ); ?></textarea>
462
+ <p class="description"><?php _e( 'Cache the specified pages even if they don\'t have tailing slash.', 'w3-total-cache' ); ?></p>
463
  </td>
464
  </tr>
465
  <?php endif; ?>
468
  <td>
469
  <textarea id="pgcache_cache_headers" name="pgcache__cache__headers"
470
  <?php Util_Ui::sealing_disabled( 'pgcache.' ) ?>
471
+ cols="40" rows="5"<?php if ( $this->_config->get_string( 'pgcache.engine' ) == 'file_generic' ): ?> disabled="disabled"<?php endif; ?>><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.cache.headers' ) ) ); ?></textarea>
472
+ <p class="description"><?php _e( 'Specify additional page headers to cache.', 'w3-total-cache' )?></p>
473
  </td>
474
  </tr>
475
  <?php if ( $this->_config->get_string( 'pgcache.engine' ) == 'file_generic' ): ?>
476
  <tr>
477
  <th><label><?php Util_Ui::e_config_label( 'pgcache.cache.nginx_handle_xml' ) ?></label></th>
478
  <td>
479
+ <?php $this->checkbox( 'pgcache.cache.nginx_handle_xml' ) ?> <?php Util_Ui::e_config_label( 'pgcache.cache.nginx_handle_xml' ) ?></label>
480
+ <p class="description"><?php _e( 'Return correct Content-Type header for <acronym title="Extensible Markup Language">XML</acronym> files (e.g., feeds and sitemaps). Slows down cache engine.', 'w3-total-cache' ); ?></p>
481
  </td>
482
  </tr>
483
  <?php endif; ?>
inc/options/referrer.php CHANGED
@@ -8,85 +8,85 @@ if ( !defined( 'W3TC' ) )
8
  <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
9
 
10
  <script type="text/javascript">/*<![CDATA[*/
11
- var referrer_themes = {};
12
- <?php foreach ( $themes as $theme_key => $theme_name ): ?>
13
- referrer_themes['<?php echo addslashes( $theme_key ); ?>'] = '<?php echo addslashes( $theme_name ); ?>';
14
- <?php endforeach; ?>
15
  /*]]>*/</script>
16
 
17
  <p>
18
- <?php _e( 'Referrer group support is always <span class="w3tc-enabled">enabled', 'w3-total-cache' ); ?></span>.
19
  </p>
20
 
21
  <form id="referrer_form" action="admin.php?page=<?php echo $this->_page; ?>" method="post">
22
- <div class="metabox-holder">
23
- <?php Util_Ui::postbox_header( __( 'Manage Referrer Groups', 'w3-total-cache' ), '', 'manage' ); ?>
24
- <p>
25
- <input id="referrer_add" type="button" class="button" value="<?php _e( 'Create a group', 'w3-total-cache' ); ?>" /> <?php _e( 'of referrers by specifying names in the referrers field. Assign a set of referrers to use a specific theme, redirect them to another domain, create referrer groups to ensure that a unique cache is created for each referrer group. Drag and drop groups into order (if needed) to determine their priority (top -&gt; down).', 'w3-total-cache' ); ?>
26
- </p>
27
 
28
- <ul id="referrer_groups">
29
- <?php $index = 0; foreach ( $groups as $group => $group_config ): $index++; ?>
30
- <li id="referrer_group_<?php echo esc_attr( $group ); ?>">
31
- <table class="form-table">
32
- <tr>
33
- <th>
34
- <?php _e( 'Group name:', 'w3-total-cache' ); ?>
35
- </th>
36
- <td>
37
- <span class="referrer_group_number"><?php echo $index; ?>.</span> <span class="referrer_group"><?php echo htmlspecialchars( $group ); ?></span> <input type="button" class="button referrer_delete" value="<?php _e( 'Delete group', 'w3-total-cache' ); ?>" />
38
- </td>
39
- </tr>
40
- <tr>
41
- <th>
42
- <label for="referrer_groups_<?php echo esc_attr( $group ); ?>_enabled"><?php _e( 'Enabled:', 'w3-total-cache' ); ?></label>
43
- </th>
44
- <td>
45
- <input type="hidden" name="referrer_groups[<?php echo esc_attr( $group ); ?>][enabled]" value="0" />
46
- <input id="referrer_groups_<?php echo esc_attr( $group ); ?>_enabled" type="checkbox" name="referrer_groups[<?php echo esc_attr( $group ); ?>][enabled]" value="1"<?php checked( $group_config['enabled'], true ); ?> />
47
- </td>
48
- </tr>
49
- <tr>
50
- <th>
51
- <label for="referrer_groups_<?php echo esc_attr( $group ); ?>_theme"><?php _e( 'Theme:', 'w3-total-cache' ); ?></label>
52
- </th>
53
- <td>
54
- <select id="referrer_groups_<?php echo esc_attr( $group ); ?>_theme" name="referrer_groups[<?php echo esc_attr( $group ); ?>][theme]">
55
- <option value=""><?php _e( '-- Pass-through --', 'w3-total-cache' ); ?></option>
56
- <?php foreach ( $themes as $theme_key => $theme_name ): ?>
57
- <option value="<?php echo esc_attr( $theme_key ); ?>"<?php selected( $theme_key, $group_config['theme'] ); ?>><?php echo htmlspecialchars( $theme_name ); ?></option>
58
- <?php endforeach; ?>
59
- </select>
60
- <br /><span class="description"><?php _e( 'Assign this group of referrers to a specific theme. Selecting "Pass-through" allows any plugin(s) (e.g. referrer plugins) to properly handle requests for these referrers. If the "redirect users to" field is not empty, this setting is ignored.', 'w3-total-cache' ); ?></span>
61
- </td>
62
- </tr>
63
- <tr>
64
- <th>
65
- <label for="referrer_groups_<?php echo esc_attr( $group ); ?>_redirect"><?php _e( 'Redirect users to:', 'w3-total-cache' ); ?></label>
66
- </th>
67
- <td>
68
- <input id="referrer_groups_<?php echo esc_attr( $group ); ?>_redirect" type="text" name="referrer_groups[<?php echo esc_attr( $group ); ?>][redirect]" value="<?php echo esc_attr( $group_config['redirect'] ); ?>" size="60" />
69
- <br /><span class="description"><?php _e( 'A 302 redirect is used to send this group of referrers to another hostname (domain).', 'w3-total-cache' ); ?></span>
70
- </td>
71
- </tr>
72
- <tr>
73
- <th>
74
- <label for="referrer_groups_<?php echo esc_attr( $group ); ?>_referrers"><?php _e( 'Referrers:', 'w3-total-cache' ); ?></label>
75
- </th>
76
- <td>
77
- <textarea id="referrer_groups_<?php echo esc_attr( $group ); ?>_referrers" name="referrer_groups[<?php echo esc_attr( $group ); ?>][referrers]" rows="10" cols="50"><?php echo esc_textarea( implode( "\r\n", (array) $group_config['referrers'] ) ); ?></textarea>
78
- <br /><span class="description"><?php _e( 'Specify the referrers for this group. Remember to escape special characters like spaces, dots or dashes with a backslash. Regular expressions are also supported.', 'w3-total-cache' ); ?></span>
79
- </td>
80
- </tr>
81
- </table>
82
- </li>
83
- <?php endforeach; ?>
84
- </ul>
85
- <div id="referrer_groups_empty" style="display: none;"><?php _e( 'No groups added. All referrers recieve the same page and minify cache results.', 'w3-total-cache' ); ?></div>
86
 
87
- <?php Util_Ui::button_config_save( 'referrers' ); ?>
88
- <?php Util_Ui::postbox_footer(); ?>
89
- </div>
90
  </form>
91
 
92
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
8
  <?php include W3TC_INC_DIR . '/options/common/header.php'; ?>
9
 
10
  <script type="text/javascript">/*<![CDATA[*/
11
+ var referrer_themes = {};
12
+ <?php foreach ( $themes as $theme_key => $theme_name ): ?>
13
+ referrer_themes['<?php echo addslashes( $theme_key ); ?>'] = '<?php echo addslashes( $theme_name ); ?>';
14
+ <?php endforeach; ?>
15
  /*]]>*/</script>
16
 
17
  <p>
18
+ <?php _e( 'Referrer group support is always <span class="w3tc-enabled">enabled', 'w3-total-cache' ); ?></span>.
19
  </p>
20
 
21
  <form id="referrer_form" action="admin.php?page=<?php echo $this->_page; ?>" method="post">
22
+ <div class="metabox-holder">
23
+ <?php Util_Ui::postbox_header( __( 'Manage Referrer Groups', 'w3-total-cache' ), '', 'manage' ); ?>
24
+ <p>
25
+ <input id="referrer_add" type="button" class="button" value="<?php _e( 'Create a group', 'w3-total-cache' ); ?>" /> <?php _e( 'of referrers by specifying names in the referrers field. Assign a set of referrers to use a specific theme, redirect them to another domain, create referrer groups to ensure that a unique cache is created for each referrer group. Drag and drop groups into order (if needed) to determine their priority (top -&gt; down).', 'w3-total-cache' ); ?>
26
+ </p>
27
 
28
+ <ul id="referrer_groups">
29
+ <?php $index = 0; foreach ( $groups as $group => $group_config ): $index++; ?>
30
+ <li id="referrer_group_<?php echo esc_attr( $group ); ?>">
31
+ <table class="form-table">
32
+ <tr>
33
+ <th>
34
+ <?php _e( 'Group name:', 'w3-total-cache' ); ?>
35
+ </th>
36
+ <td>
37
+ <span class="referrer_group_number"><?php echo $index; ?>.</span> <span class="referrer_group"><?php echo htmlspecialchars( $group ); ?></span> <input type="button" class="button referrer_delete" value="<?php _e( 'Delete group', 'w3-total-cache' ); ?>" />
38
+ </td>
39
+ </tr>
40
+ <tr>
41
+ <th>
42
+ <label for="referrer_groups_<?php echo esc_attr( $group ); ?>_enabled"><?php _e( 'Enabled:', 'w3-total-cache' ); ?></label>
43
+ </th>
44
+ <td>
45
+ <input type="hidden" name="referrer_groups[<?php echo esc_attr( $group ); ?>][enabled]" value="0" />
46
+ <input id="referrer_groups_<?php echo esc_attr( $group ); ?>_enabled" type="checkbox" name="referrer_groups[<?php echo esc_attr( $group ); ?>][enabled]" value="1"<?php checked( $group_config['enabled'], true ); ?> />
47
+ </td>
48
+ </tr>
49
+ <tr>
50
+ <th>
51
+ <label for="referrer_groups_<?php echo esc_attr( $group ); ?>_theme"><?php _e( 'Theme:', 'w3-total-cache' ); ?></label>
52
+ </th>
53
+ <td>
54
+ <select id="referrer_groups_<?php echo esc_attr( $group ); ?>_theme" name="referrer_groups[<?php echo esc_attr( $group ); ?>][theme]">
55
+ <option value=""><?php _e( '-- Pass-through --', 'w3-total-cache' ); ?></option>
56
+ <?php foreach ( $themes as $theme_key => $theme_name ): ?>
57
+ <option value="<?php echo esc_attr( $theme_key ); ?>"<?php selected( $theme_key, $group_config['theme'] ); ?>><?php echo htmlspecialchars( $theme_name ); ?></option>
58
+ <?php endforeach; ?>
59
+ </select>
60
+ <p class="description"><?php _e( 'Assign this group of referrers to a specific theme. Selecting "Pass-through" allows any plugin(s) (e.g. referrer plugins) to properly handle requests for these referrers. If the "redirect users to" field is not empty, this setting is ignored.', 'w3-total-cache' ); ?></p>
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <th>
65
+ <label for="referrer_groups_<?php echo esc_attr( $group ); ?>_redirect"><?php _e( 'Redirect users to:', 'w3-total-cache' ); ?></label>
66
+ </th>
67
+ <td>
68
+ <input id="referrer_groups_<?php echo esc_attr( $group ); ?>_redirect" type="text" name="referrer_groups[<?php echo esc_attr( $group ); ?>][redirect]" value="<?php echo esc_attr( $group_config['redirect'] ); ?>" size="60" />
69
+ <p class="description"><?php _e( 'A 302 redirect is used to send this group of referrers to another hostname (domain).', 'w3-total-cache' ); ?></p>
70
+ </td>
71
+ </tr>
72
+ <tr>
73
+ <th>
74
+ <label for="referrer_groups_<?php echo esc_attr( $group ); ?>_referrers"><?php _e( 'Referrers:', 'w3-total-cache' ); ?></label>
75
+ </th>
76
+ <td>
77
+ <textarea id="referrer_groups_<?php echo esc_attr( $group ); ?>_referrers" name="referrer_groups[<?php echo esc_attr( $group ); ?>][referrers]" rows="10" cols="50"><?php echo esc_textarea( implode( "\r\n", (array) $group_config['referrers'] ) ); ?></textarea>
78
+ <p class="description"><?php _e( 'Specify the referrers for this group. Remember to escape special characters like spaces, dots or dashes with a backslash. Regular expressions are also supported.', 'w3-total-cache' ); ?></p>
79
+ </td>
80
+ </tr>
81
+ </table>
82
+ </li>
83
+ <?php endforeach; ?>
84
+ </ul>
85
+ <div id="referrer_groups_empty" style="display: none;"><?php _e( 'No groups added. All referrers recieve the same page and minify cache results.', 'w3-total-cache' ); ?></div>
86
 
87
+ <?php Util_Ui::button_config_save( 'referrers' ); ?>
88
+ <?php Util_Ui::postbox_footer(); ?>
89
+ </div>
90
  </form>
91
 
92
  <?php include W3TC_INC_DIR . '/options/common/footer.php'; ?>
lib/Db/mssql.php CHANGED
@@ -519,10 +519,6 @@ class DbCache_WpdbBase extends \SQL_Translations {
519
  // The TDS library and the ntwdblib.dll can't be speaking two different protocols.
520
  putenv("TDSVER=70");
521
 
522
- if (get_magic_quotes_gpc()) {
523
- $dbhost = trim(str_replace("\\\\", "\\", $dbhost));
524
- }
525
-
526
  $this->dbh = sqlsrv_connect($dbhost,array("Database"=>$dbname,"UID"=>$dbuser,"PWD"=>$dbpassword));
527
 
528
  if ( !$this->dbh ) {
519
  // The TDS library and the ntwdblib.dll can't be speaking two different protocols.
520
  putenv("TDSVER=70");
521
 
 
 
 
 
522
  $this->dbh = sqlsrv_connect($dbhost,array("Database"=>$dbname,"UID"=>$dbuser,"PWD"=>$dbpassword));
523
 
524
  if ( !$this->dbh ) {
lib/Minify/HTTP/ConditionalGet.php CHANGED
@@ -364,9 +364,7 @@ class HTTP_ConditionalGet {
364
  if (!isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
365
  return false;
366
  }
367
- $clientEtagList = get_magic_quotes_gpc()
368
- ? stripslashes($_SERVER['HTTP_IF_NONE_MATCH'])
369
- : $_SERVER['HTTP_IF_NONE_MATCH'];
370
  $clientEtags = explode(',', $clientEtagList);
371
 
372
  $compareTo = $this->normalizeEtag($this->_etag);
364
  if (!isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
365
  return false;
366
  }
367
+ $clientEtagList = $_SERVER['HTTP_IF_NONE_MATCH'];
 
 
368
  $clientEtags = explode(',', $clientEtagList);
369
 
370
  $compareTo = $this->normalizeEtag($this->_etag);
pub/css/options.css CHANGED
@@ -475,10 +475,46 @@ th.w3tc_extensions_manage_column_check {
475
  border-left: 4px solid #46b450;
476
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
477
  padding: 5px;
478
- grid-template-columns: 3fr 1fr;
479
  display: grid;
480
- grid-gap: 10px;
481
- align-items: center;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
482
  }
483
 
484
  /* For pro features in a table, ensure the checkboxes / etc remained aligned. */
475
  border-left: 4px solid #46b450;
476
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
477
  padding: 5px;
478
+ grid-template-columns: 1fr auto;
479
  display: grid;
480
+ grid-gap: 30px;
481
+ align-items: flex-start;
482
+ }
483
+
484
+ .w3tc-gopro-action strong,
485
+ .w3tc-gopro-action i {
486
+ display: block;
487
+ text-align: center;
488
+ }
489
+
490
+ .w3tc-gopro-action i {
491
+ margin-top: 2px;
492
+ margin-bottom: 10px;
493
+ }
494
+
495
+ .w3tc-gopro-more {
496
+ display: block;
497
+ }
498
+
499
+ .w3tc-gopro-more:focus {
500
+ box-shadow: none;
501
+ outline: none;
502
+ }
503
+
504
+ .w3tc-gopro-more .dashicons {
505
+ display: inline;
506
+ font-size: inherit;
507
+ line-height: inherit;
508
+ }
509
+
510
+ .w3tc-gopro-excerpt {
511
+ display: block;
512
+ }
513
+ .w3tc-gopro-description {
514
+ display: block;
515
+ max-height: 0px;
516
+ transition: max-height 0.5s ease-out;
517
+ overflow: hidden;
518
  }
519
 
520
  /* For pro features in a table, ensure the checkboxes / etc remained aligned. */
pub/js/options.js CHANGED
@@ -1160,7 +1160,7 @@ jQuery(function() {
1160
  });
1161
 
1162
  if (!exists) {
1163
- var li = jQuery('<li id="mobile_group_' + group + '"><table class="form-table"><tr><th>Group name:</th><td><span class="mobile_group_number">' + (jQuery('#mobile_groups li').size() + 1) + '.</span> <span class="mobile_group">' + group + '</span> <input type="button" class="button mobile_delete" value="Delete group" /></td></tr><tr><th><label for="mobile_groups_' + group + '_enabled">Enabled:</label></th><td><input type="hidden" name="mobile_groups[' + group + '][enabled]" value="0" /><input id="mobile_groups_' + group + '_enabled" type="checkbox" name="mobile_groups[' + group + '][enabled]" value="1" checked="checked" /></td></tr><tr><th><label for="mobile_groups_' + group + '_theme">Theme:</label></th><td><select id="mobile_groups_' + group + '_theme" name="mobile_groups[' + group + '][theme]"><option value="">-- Pass-through --</option></select><br /><span class="description">Assign this group of user agents to a specific them. Leaving this option "Active Theme" allows any plugins you have (e.g. mobile plugins) to properly handle requests for these user agents. If the "redirect users to" field is not empty, this setting is ignored.</span></td></tr><tr><th><label for="mobile_groups_' + group + '_redirect">Redirect users to:</label></th><td><input id="mobile_groups_' + group + '_redirect" type="text" name="mobile_groups[' + group + '][redirect]" value="" size="60" /><br /><span class="description">A 302 redirect is used to send this group of users to another hostname (domain); recommended if a 3rd party service provides a mobile version of your site.</span></td></tr><tr><th><label for="mobile_groups_' + group + '_agents">User agents:</label></th><td><textarea id="mobile_groups_' + group + '_agents" name="mobile_groups[' + group + '][agents]" rows="10" cols="50"></textarea><br /><span class="description">Specify the user agents for this group.</span></td></tr></table></li>');
1164
  var select = li.find('select');
1165
 
1166
  jQuery.each(mobile_themes, function(index, value) {
@@ -1262,7 +1262,7 @@ jQuery(function() {
1262
  });
1263
 
1264
  if (!exists) {
1265
- var li = jQuery('<li id="referrer_group_' + group + '"><table class="form-table"><tr><th>Group name:</th><td><span class="referrer_group_number">' + (jQuery('#referrer_groups li').size() + 1) + '.</span> <span class="referrer_group">' + group + '</span> <input type="button" class="button referrer_delete" value="Delete group" /></td></tr><tr><th><label for="referrer_groups_' + group + '_enabled">Enabled:</label></th><td><input type="hidden" name="referrer_groups[' + group + '][enabled]" value="0" /><input id="referrer_groups_' + group + '_enabled" type="checkbox" name="referrer_groups[' + group + '][enabled]" value="1" checked="checked" /></td></tr><tr><th><label for="referrer_groups_' + group + '_theme">Theme:</label></th><td><select id="referrer_groups_' + group + '_theme" name="referrer_groups[' + group + '][theme]"><option value="">-- Pass-through --</option></select><br /><span class="description">Assign this group of referrers to a specific them. Leaving this option "Active Theme" allows any plugins you have (e.g. referrer plugins) to properly handle requests for these referrers. If the "redirect users to" field is not empty, this setting is ignored.</span></td></tr><tr><th><label for="referrer_groups_' + group + '_redirect">Redirect users to:</label></th><td><input id="referrer_groups_' + group + '_redirect" type="text" name="referrer_groups[' + group + '][redirect]" value="" size="60" /><br /><span class="description">A 302 redirect is used to send this group of users to another hostname (domain); recommended if a 3rd party service provides a referrer version of your site.</span></td></tr><tr><th><label for="referrer_groups_' + group + '_referrers">Referrers:</label></th><td><textarea id="referrer_groups_' + group + '_referrers" name="referrer_groups[' + group + '][referrers]" rows="10" cols="50"></textarea><br /><span class="description">Specify the referrers for this group.</span></td></tr></table></li>');
1266
  var select = li.find('select');
1267
 
1268
  jQuery.each(referrer_themes, function(index, value) {
@@ -1453,6 +1453,20 @@ jQuery(function() {
1453
  });
1454
  });
1455
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1456
  // google analytics events
1457
  if (typeof w3tc_ga != 'undefined') {
1458
  jQuery('.w3tc_error').each(function() {
1160
  });
1161
 
1162
  if (!exists) {
1163
+ var li = jQuery('<li id="mobile_group_' + group + '"><table class="form-table"><tr><th>Group name:</th><td><span class="mobile_group_number">' + (jQuery('#mobile_groups li').size() + 1) + '.</span> <span class="mobile_group">' + group + '</span> <input type="button" class="button mobile_delete" value="Delete group" /></td></tr><tr><th><label for="mobile_groups_' + group + '_enabled">Enabled:</label></th><td><input type="hidden" name="mobile_groups[' + group + '][enabled]" value="0" /><input id="mobile_groups_' + group + '_enabled" type="checkbox" name="mobile_groups[' + group + '][enabled]" value="1" checked="checked" /></td></tr><tr><th><label for="mobile_groups_' + group + '_theme">Theme:</label></th><td><select id="mobile_groups_' + group + '_theme" name="mobile_groups[' + group + '][theme]"><option value="">-- Pass-through --</option></select><p class="description">Assign this group of user agents to a specific them. Leaving this option "Active Theme" allows any plugins you have (e.g. mobile plugins) to properly handle requests for these user agents. If the "redirect users to" field is not empty, this setting is ignored.</p></td></tr><tr><th><label for="mobile_groups_' + group + '_redirect">Redirect users to:</label></th><td><input id="mobile_groups_' + group + '_redirect" type="text" name="mobile_groups[' + group + '][redirect]" value="" size="60" /><p class="description">A 302 redirect is used to send this group of users to another hostname (domain); recommended if a 3rd party service provides a mobile version of your site.</p></td></tr><tr><th><label for="mobile_groups_' + group + '_agents">User agents:</label></th><td><textarea id="mobile_groups_' + group + '_agents" name="mobile_groups[' + group + '][agents]" rows="10" cols="50"></textarea><p class="description">Specify the user agents for this group.</p></td></tr></table></li>');
1164
  var select = li.find('select');
1165
 
1166
  jQuery.each(mobile_themes, function(index, value) {
1262
  });
1263
 
1264
  if (!exists) {
1265
+ var li = jQuery('<li id="referrer_group_' + group + '"><table class="form-table"><tr><th>Group name:</th><td><span class="referrer_group_number">' + (jQuery('#referrer_groups li').size() + 1) + '.</span> <span class="referrer_group">' + group + '</span> <input type="button" class="button referrer_delete" value="Delete group" /></td></tr><tr><th><label for="referrer_groups_' + group + '_enabled">Enabled:</label></th><td><input type="hidden" name="referrer_groups[' + group + '][enabled]" value="0" /><input id="referrer_groups_' + group + '_enabled" type="checkbox" name="referrer_groups[' + group + '][enabled]" value="1" checked="checked" /></td></tr><tr><th><label for="referrer_groups_' + group + '_theme">Theme:</label></th><td><select id="referrer_groups_' + group + '_theme" name="referrer_groups[' + group + '][theme]"><option value="">-- Pass-through --</option></select><p class="description">Assign this group of referrers to a specific them. Leaving this option "Active Theme" allows any plugins you have (e.g. referrer plugins) to properly handle requests for these referrers. If the "redirect users to" field is not empty, this setting is ignored.</p></td></tr><tr><th><label for="referrer_groups_' + group + '_redirect">Redirect users to:</label></th><td><input id="referrer_groups_' + group + '_redirect" type="text" name="referrer_groups[' + group + '][redirect]" value="" size="60" /><p class="description">A 302 redirect is used to send this group of users to another hostname (domain); recommended if a 3rd party service provides a referrer version of your site.</p></td></tr><tr><th><label for="referrer_groups_' + group + '_referrers">Referrers:</label></th><td><textarea id="referrer_groups_' + group + '_referrers" name="referrer_groups[' + group + '][referrers]" rows="10" cols="50"></textarea><p class="description">Specify the referrers for this group.</p></td></tr></table></li>');
1266
  var select = li.find('select');
1267
 
1268
  jQuery.each(referrer_themes, function(index, value) {
1453
  });
1454
  });
1455
 
1456
+ // gopro block
1457
+ jQuery('.w3tc-gopro-more').click(function(e) {
1458
+ e.preventDefault();
1459
+ if (!jQuery(this).attr('data-expanded')) {
1460
+ jQuery(this).attr('data-expanded', '1');
1461
+ jQuery(this).html('Show Less <span class="dashicons dashicons-arrow-up-alt2"></span>');
1462
+ jQuery(this).parent().find('.w3tc-gopro-description').css('max-height', '300px');
1463
+ } else {
1464
+ jQuery(this).attr('data-expanded', '');
1465
+ jQuery(this).html('Show More <span class="dashicons dashicons-arrow-down-alt2"></span>');
1466
+ jQuery(this).parent().find('.w3tc-gopro-description').css('max-height', '');
1467
+ }
1468
+ });
1469
+
1470
  // google analytics events
1471
  if (typeof w3tc_ga != 'undefined') {
1472
  jQuery('.w3tc_error').each(function() {
readme.txt CHANGED
@@ -1,19 +1,19 @@
1
  === Plugin Name ===
2
- Contributors: boldgrid, fredericktownes, maxicusc, gidomanders, bwmarkle
3
- Tags: seo, cache, caching, compression, maxcdn, nginx, varnish, redis, new relic, aws, amazon web services, s3, cloudfront, rackspace, cloudflare, azure, apache
4
  Requires at least: 3.2
5
  Tested up to: 5.3
6
- Stable tag: 0.12.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
- Search Engine (SEO) &amp; Performance Optimization (WPO) via caching. Integrated caching: CDN, Minify, Page, Object, Fragment, Database support.
11
 
12
  == Description ==
13
 
14
- W3 Total Cache improves the SEO and user experience of your site by increasing website performance, reducing load times via features like content delivery network (CDN) integration and the latest best practices.
15
 
16
- The **only** web host agnostic Web Performance Optimization (WPO) framework for WordPress trusted by millions of publishers, web developers, and web hosts worldwide for more than a decade.
17
 
18
  An inside look:
19
 
@@ -28,7 +28,7 @@ https://youtu.be/7AsNSSrZq4Y
28
  * Optimized progressive render: pages start rendering quickly and can be interacted with more quickly
29
  * Reduced page load time: increased visitor time on site; visitors view more pages
30
  * Improved web server performance; sustain high traffic periods
31
- * Up to 80% bandwidth savings via minify and HTTP compression of HTML, CSS, JavaScript and feeds
32
 
33
  *KEY FEATURES*
34
 
@@ -45,20 +45,24 @@ https://youtu.be/7AsNSSrZq4Y
45
  * Caching of objects in memory or on disk
46
  * Caching of fragments in memory or on disk
47
  * Caching methods include local Disk, Redis, Memcached, APC, APCu, eAccelerator, XCache, and WinCache
48
- * Minification of posts and pages and feeds
49
- * Minification of inline, embedded or 3rd party JavaScript (with automated updates)
50
- * Minification of inline, embedded or 3rd party CSS (with automated updates)
 
 
 
51
  * Browser caching using cache-control, future expire headers and entity tags (ETag) with "cache-busting"
52
  * JavaScript grouping by template (home page, post page etc) with embed location control
53
  * Non-blocking JavaScript embedding
54
  * Import post attachments directly into the Media Library (and CDN)
 
55
  * WP-CLI support for cache purging, query string updating and more
56
- * Various security features
57
- * Caching statistics for performance insights
58
- * Extension framework for customization or extensibility e.g. New Relic, Cloudflare, WPML and more
59
  * Reverse proxy integration via Nginx or Varnish
60
 
61
- Improve the user experience for your readers without having to change WordPress, your theme, your plugins or how you produce your content.
62
 
63
  == Frequently Asked Questions ==
64
 
@@ -271,6 +275,14 @@ Please reach out to all of these people and support their projects if you're so
271
 
272
  == Changelog ==
273
 
 
 
 
 
 
 
 
 
274
  = 0.12.0 =
275
  * Added querystring based URL structures for AMP pages
276
  * Added filter of minify options
@@ -669,4 +681,4 @@ Thanks for using W3 Total Cache! This release includes performance improvements
669
  Thanks for using W3 Total Cache! This release addresses security issues for Cloudflare users as well as users that implement fragment caching via the mfunc functionality. For those using mfunc, temporarily disable page caching to allow yourself time to check the FAQ tab for new usage instructions; if you have a staging environment, that is the most convenient way to test prior to production roll out.
670
 
671
  = 0.9.2.8 =
672
- Thanks for using W3 Total Cache! The recent releases attempted to use WordPress' built in support for managing files and folders and clearly has not worked. Since W3TC is a caching plugin, file management is a critical issue that will cause lots of issues if it doesn't work perfectly. This release is hopefully the last attempt to restore file management back to the reliability of previous versions (0.9.2.4 etc). We realize that having *any* problems is not acceptable, but caching means changing server behavior, so while this plugin is still in pre-release we're trying to focus on learning.
1
  === Plugin Name ===
2
+ Contributors: boldgrid, fredericktownes, maxicusc, gidomanders, bwmarkle, harryjackson1221
3
+ Tags: seo, cache, optimize, pagespeed, performance, caching, compression, maxcdn, nginx, varnish, redis, new relic, aws, amazon web services, s3, cloudfront, rackspace, cloudflare, azure, apache
4
  Requires at least: 3.2
5
  Tested up to: 5.3
6
+ Stable tag: 0.13.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
+ Search Engine (SEO) &amp; Performance Optimization (WPO) via caching. Integrated caching: CDN, Page, Minify, Object, Fragment, Database support.
11
 
12
  == Description ==
13
 
14
+ W3 Total Cache (W3TC) improves the SEO and user experience of your site by increasing website performance and reducing load times by leveraging features like content delivery network (CDN) integration and the latest best practices.
15
 
16
+ W3TC is the **only** web host agnostic Web Performance Optimization (WPO) framework for WordPress trusted by millions of publishers, web developers, and web hosts worldwide for more than a decade. It is the total performance solution for optimizing your WordPress Website.
17
 
18
  An inside look:
19
 
28
  * Optimized progressive render: pages start rendering quickly and can be interacted with more quickly
29
  * Reduced page load time: increased visitor time on site; visitors view more pages
30
  * Improved web server performance; sustain high traffic periods
31
+ * Up to 80% bandwidth savings when you minify HTML, minify CSS and minify JS files.
32
 
33
  *KEY FEATURES*
34
 
45
  * Caching of objects in memory or on disk
46
  * Caching of fragments in memory or on disk
47
  * Caching methods include local Disk, Redis, Memcached, APC, APCu, eAccelerator, XCache, and WinCache
48
+ * Minify CSS, Minify JavaScript and Minify HTML with granular control
49
+ * Minification of posts and pages and RSS feeds
50
+ * Minification of inline, embedded or 3rd party JavaScript with automated updates to assets
51
+ * Minification of inline, embedded or 3rd party CSS with automated updates to assets
52
+ * Defer non critical CSS and Javascript for rendering pages faster than ever before
53
+ * Defer offscreen images using Lazy Load to improve the user experience
54
  * Browser caching using cache-control, future expire headers and entity tags (ETag) with "cache-busting"
55
  * JavaScript grouping by template (home page, post page etc) with embed location control
56
  * Non-blocking JavaScript embedding
57
  * Import post attachments directly into the Media Library (and CDN)
58
+ * Leverage our multiple CDN integrations to optimize images
59
  * WP-CLI support for cache purging, query string updating and more
60
+ * Various security features to help ensure website safety
61
+ * Caching statistics for performance insights of any enabled feature
62
+ * Extension framework for customization or extensibility for Cloudflare, WPML and much more
63
  * Reverse proxy integration via Nginx or Varnish
64
 
65
+ Speed up your site tremendously, and improve the user experience for your readers without having to change WordPress, your theme, your plugins or how you produce your content.
66
 
67
  == Frequently Asked Questions ==
68
 
275
 
276
  == Changelog ==
277
 
278
+ = 0.13.0 =
279
+ * Added new Pro feature, Debug - Purge Stack Trace
280
+ * Added "Feature Policy" security header
281
+ * Removed deprecated get_magic_quotes_gpc()
282
+ * Improved AMP Extension by ignoring value of amp querystring marker in request if passed without value in config
283
+ * Improved lazyload by not processing elements with skip-lazy class or data-skip-lazy attribute
284
+ * Fixed caching of query-string normalization redirects, no longer cached when cache key is normalized by accept querystring arguments, caused redirect loop
285
+
286
  = 0.12.0 =
287
  * Added querystring based URL structures for AMP pages
288
  * Added filter of minify options
681
  Thanks for using W3 Total Cache! This release addresses security issues for Cloudflare users as well as users that implement fragment caching via the mfunc functionality. For those using mfunc, temporarily disable page caching to allow yourself time to check the FAQ tab for new usage instructions; if you have a staging environment, that is the most convenient way to test prior to production roll out.
682
 
683
  = 0.9.2.8 =
684
+ Thanks for using W3 Total Cache! The recent releases attempted to use WordPress' built in support for managing files and folders and clearly has not worked. Since W3TC is a caching plugin, file management is a critical issue that will cause lots of issues if it doesn't work perfectly. This release is hopefully the last attempt to restore file management back to the reliability of previous versions (0.9.2.4 etc). We realize that having *any* problems is not acceptable, but caching means changing server behavior, so while this plugin is still in pre-release we're trying to focus on learning.
w3-total-cache-api.php CHANGED
@@ -5,7 +5,7 @@ if ( !defined( 'ABSPATH' ) ) {
5
  }
6
 
7
  define( 'W3TC', true );
8
- define( 'W3TC_VERSION', '0.12.0' );
9
  define( 'W3TC_POWERED_BY', 'W3 Total Cache' );
10
  define( 'W3TC_EMAIL', 'w3tc@w3-edge.com' );
11
  define( 'W3TC_TEXT_DOMAIN', 'w3-total-cache' );
5
  }
6
 
7
  define( 'W3TC', true );
8
+ define( 'W3TC_VERSION', '0.13.0' );
9
  define( 'W3TC_POWERED_BY', 'W3 Total Cache' );
10
  define( 'W3TC_EMAIL', 'w3tc@w3-edge.com' );
11
  define( 'W3TC_TEXT_DOMAIN', 'w3-total-cache' );
w3-total-cache.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: W3 Total Cache
4
  Description: The highest rated and most complete WordPress performance plugin. Dramatically improve the speed and user experience of your site. Add browser, page, object and database caching as well as minify and content delivery network (CDN) to WordPress.
5
- Version: 0.12.0
6
  Plugin URI: https://www.boldgrid.com/totalcache/
7
  Author: BoldGrid
8
  Author URI: https://www.boldgrid.com/
2
  /*
3
  Plugin Name: W3 Total Cache
4
  Description: The highest rated and most complete WordPress performance plugin. Dramatically improve the speed and user experience of your site. Add browser, page, object and database caching as well as minify and content delivery network (CDN) to WordPress.
5
+ Version: 0.13.0
6
  Plugin URI: https://www.boldgrid.com/totalcache/
7
  Author: BoldGrid
8
  Author URI: https://www.boldgrid.com/