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 | ![]() |
Version | 0.13.0 |
Comparing to | |
See all releases |
Code changes from version 0.12.0 to 0.13.0
- Base_Page_Settings.php +34 -1
- BrowserCache_Environment.php +23 -5
- BrowserCache_Environment_Nginx.php +24 -6
- BrowserCache_Page_View_SectionSecurity.php +471 -0
- BrowserCache_Plugin_Admin.php +25 -0
- Cdn_Highwinds_Page_View.php +11 -12
- Cdn_Highwinds_Popup_View_ConfigureCnamesForm.php +12 -13
- Cdn_LimeLight_Page_View.php +11 -12
- Cdn_MaxCdn_Page_View.php +20 -21
- Cdn_MaxCdn_Popup_View_Intro.php +25 -26
- Cdn_RackSpaceCdn_Page_View.php +19 -21
- Cdn_RackSpaceCdn_Popup_View_ConfigureDomains.php +12 -13
- Cdn_RackSpaceCdn_Popup_View_Service_Create.php +74 -76
- Cdn_RackSpaceCloudFiles_Page_View.php +13 -14
- Cdn_StackPath2_Page_View.php +40 -22
- Cdn_StackPath2_Popup_View_Intro.php +2 -3
- Cdn_StackPath2_Widget_View_Unauthorized.php +21 -5
- Cdn_StackPath_Page_View.php +9 -10
- Cdn_StackPath_Popup_View_Intro.php +25 -26
- Cdnfsd_CloudFront_Page_View.php +10 -10
- Cdnfsd_CloudFront_Popup.php +2 -2
- Cdnfsd_CloudFront_Popup_View_Distribution.php +3 -3
- Cdnfsd_GeneralPage_View.php +26 -21
- Cdnfsd_MaxCdn_Page_View.php +10 -12
- Cdnfsd_MaxCdn_Popup.php +2 -2
- Cdnfsd_MaxCdn_Popup_View_Intro.php +25 -26
- Cdnfsd_MaxCdn_Popup_View_Zone.php +44 -44
- Cdnfsd_StackPath2_Page_View.php +3 -5
- Cdnfsd_StackPath2_Popup_View_Intro.php +2 -3
- Cdnfsd_StackPath_Page_View.php +10 -10
- Cdnfsd_StackPath_Popup.php +2 -2
- Cdnfsd_StackPath_Popup_View_Intro.php +2 -3
- Cdnfsd_StackPath_Popup_View_Zone.php +44 -44
- ConfigCompiler.php +13 -0
- ConfigKeys.php +21 -1
- DbCache_WpdbInjection_QueryCaching.php +4 -0
- Extension_Amp_Plugin.php +9 -2
- Extension_FragmentCache_Page_View.php +8 -8
- Extension_FragmentCache_Plugin_Admin.php +6 -0
- Extension_Genesis_Page_View.php +74 -76
- Extension_Genesis_Plugin_Admin.php +2 -0
- Extension_NewRelic_Page_View_Apm.php +172 -173
- Extension_Wpml_Plugin_Admin.php +4 -0
- Generic_AdminActions_Default.php +14 -0
- Generic_AdminNotes.php +2 -2
- Generic_Page_General.php +11 -0
- Generic_Page_PurgeLog.php +91 -0
- Generic_Page_PurgeLog_View.php +110 -0
- ObjectCache_Page_View_PurgeLog.php +32 -0
- ObjectCache_WpObjectCache_Regular.php +3 -0
- PgCache_ContentGrabber.php +33 -18
- PgCache_Flush.php +39 -2
- PgCache_Page_CookieGroups_View.js +2 -2
- PgCache_Page_CookieGroups_View.php +2 -3
- UsageStatistics_GeneralPage_View.php +10 -3
- UsageStatistics_Source_ObjectCacheLog.php +2 -2
- Util_Debug.php +99 -3
- Util_DebugPurgeLog_Reader.php +129 -0
- Util_Request.php +6 -1
- Util_Ui.php +196 -99
- inc/lightbox/create_netdna_maxcdn_pull_zone.php +29 -29
- inc/options/browsercache.php +417 -767
- inc/options/cdn.php +53 -53
- inc/options/cdn/akamai.php +37 -38
- inc/options/cdn/att.php +17 -17
- inc/options/cdn/azure.php +9 -9
- inc/options/cdn/cf.php +3 -3
- inc/options/cdn/cf2.php +3 -3
- inc/options/cdn/cotendo.php +21 -21
- inc/options/cdn/edgecast.php +17 -17
- inc/options/cdn/ftp.php +14 -14
- inc/options/cdn/mirror.php +3 -3
- inc/options/cdn/rscf.php +11 -11
- inc/options/cdn/s3.php +3 -3
- inc/options/cdn/s3_compatible.php +6 -6
- inc/options/common/header.php +3 -0
- inc/options/dbcache.php +75 -75
- inc/options/edd/buy.php +2 -2
- inc/options/enterprise/dbcluster-config.php +20 -21
- inc/options/enterprise/dbcluster_general_section.php +6 -6
- inc/options/extensions/list.php +4 -7
- inc/options/general.php +71 -33
- inc/options/minify.php +407 -407
- inc/options/minify/css.php +16 -3
- inc/options/mobile.php +98 -100
- inc/options/objectcache.php +71 -71
- inc/options/parts/memcached.php +13 -13
- inc/options/parts/memcached_extension.php +1 -1
- inc/options/parts/redis.php +34 -34
- inc/options/parts/redis_extension.php +13 -13
- inc/options/pgcache.php +79 -72
- inc/options/referrer.php +71 -71
- lib/Db/mssql.php +0 -4
- lib/Minify/HTTP/ConditionalGet.php +1 -3
- pub/css/options.css +39 -3
- pub/js/options.js +16 -2
- readme.txt +27 -15
- w3-total-cache-api.php +1 -1
- 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-
|
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., <frame>, <iframe> or <object>). 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 <base> 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 <audio> and <video> 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 <object>, <embed>, and <applet> 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 <frame>, <iframe>, <object>, <embed>, or <applet>.' ) ?></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 <iframe> 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 |
-
|
38 |
</td>
|
39 |
</tr>
|
40 |
<tr>
|
41 |
-
|
42 |
-
|
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 |
-
|
47 |
-
|
48 |
-
</td>
|
49 |
</tr>
|
50 |
<tr>
|
51 |
<th colspan="2">
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
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 |
-
|
9 |
if ( !empty( $details['error_message'] ) )
|
10 |
echo '<div class="error">' . $details['error_message'] . '</div>';
|
11 |
?>
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
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 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
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 |
-
|
32 |
</td>
|
33 |
</tr>
|
34 |
<tr>
|
35 |
-
|
36 |
-
|
37 |
<?php $cnames = $config->get_array( 'cdn.limelight.host.domains' ); include W3TC_INC_DIR . '/options/cdn/common/cnames-readonly.php'; ?>
|
38 |
-
|
39 |
-
|
40 |
-
</td>
|
41 |
</tr>
|
42 |
<tr>
|
43 |
<th colspan="2">
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
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 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
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 )
|
50 |
-
<
|
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 |
-
</
|
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 )
|
64 |
-
<
|
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 |
-
</
|
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 |
-
|
81 |
</td>
|
82 |
</tr>
|
83 |
<tr>
|
84 |
-
|
85 |
-
|
86 |
<?php $cnames = $config->get_array( 'cdn.maxcdn.domain' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
|
87 |
-
|
88 |
-
|
89 |
</tr>
|
90 |
<tr>
|
91 |
<th colspan="2">
|
92 |
-
|
93 |
-
|
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 |
-
|
9 |
if ( isset( $details['error_message'] ) )
|
10 |
echo '<div class="error">' . $details['error_message'] . '</div>';
|
11 |
?>
|
12 |
-
|
13 |
-
|
14 |
__( 'Your MaxCDN Account credentials', 'w3-total-cache' ) ); ?>
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
</table>
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
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 |
-
|
49 |
-
|
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 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
</td>
|
58 |
</tr>
|
59 |
<?php else: ?>
|
60 |
<tr>
|
61 |
-
|
62 |
-
|
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 |
-
|
66 |
value="<?php _e( 'Reload C<acronym title="Canonical Name">CNAME</acronym>s from RackSpace', 'w3-total-cache' ); ?>" />
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
</td>
|
72 |
</tr>
|
73 |
<?php endif ?>
|
74 |
<tr>
|
75 |
<th colspan="2">
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
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 |
-
|
9 |
if ( !empty( $details['error_message'] ) )
|
10 |
echo '<div class="error">' . $details['error_message'] . '</div>';
|
11 |
?>
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
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 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
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 |
-
|
9 |
-
|
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 |
-
|
19 |
if ( isset( $details['error_message'] ) )
|
20 |
echo '<div class="error">' . $details['error_message'] . '</div>';
|
21 |
?>
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
</tr>
|
87 |
-
</table>
|
88 |
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
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 |
-
|
56 |
</td>
|
57 |
</tr>
|
58 |
<tr>
|
59 |
-
|
60 |
-
|
61 |
<?php $cnames = $config->get_array( 'cdn.rscf.cname' ); include W3TC_INC_DIR . '/options/cdn/common/cnames.php'; ?>
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
</td>
|
67 |
</tr>
|
68 |
<tr>
|
69 |
<th colspan="2">
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
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 |
-
<
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
</td>
|
16 |
</tr>
|
17 |
<?php endif ?>
|
@@ -25,17 +35,25 @@ if ( !defined( 'W3TC' ) )
|
|
25 |
</label>
|
26 |
</th>
|
27 |
<td>
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 )
|
50 |
-
<
|
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 |
-
</
|
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 )
|
64 |
-
<
|
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 |
-
</
|
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 |
-
<
|
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 |
-
<
|
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 |
-
<
|
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 |
-
</
|
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 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
14 |
<h4 class="w3tcstackpath_signup_h4"><?php _e( 'Current customers', 'w3-total-cache' )?></h4>
|
15 |
-
<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 |
-
<
|
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 )
|
50 |
-
<
|
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 |
-
</
|
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 )
|
64 |
-
<
|
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 |
-
</
|
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 |
-
<
|
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 |
-
<
|
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 |
-
|
9 |
if ( isset( $details['error_message'] ) )
|
10 |
echo '<div class="error">' . $details['error_message'] . '</div>';
|
11 |
?>
|
12 |
-
|
13 |
-
|
14 |
__( 'Your StackPath Account credentials', 'w3-total-cache' ) ); ?>
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
</table>
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
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 |
-
|
13 |
-
|
14 |
'', 'configuration' ); ?>
|
15 |
-
|
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 |
-
|
49 |
-
<
|
50 |
The website domain has to be a CNAME pointing to this
|
51 |
<acronym title="Content Delivery Network">CDN</acronym> domain
|
52 |
-
</
|
53 |
</td>
|
54 |
</tr>
|
55 |
<?php endif ?>
|
56 |
-
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
|
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 '<
|
244 |
-
$details[$field]['current'] . '</strong></
|
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' )
|
25 |
-
<
|
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 |
-
</
|
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>
|