installed plugin W3 Total Cache version 2.3.2

This commit is contained in:
2023-06-05 11:23:16 +00:00
committed by Gitium
parent d9b3c97e40
commit 51ea2ff21c
2730 changed files with 334913 additions and 0 deletions

View File

@ -0,0 +1,138 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
?>
<tr>
<th style="width: 300px;"><label for="cdn_akamai_username"><?php esc_html_e( 'Username:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_akamai_username" class="w3tc-ignore-change" type="text"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__akamai__username" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.akamai.username' ) ); ?>" size="60" />
</td>
</tr>
<tr>
<th><label for="cdn_akamai_password"><?php esc_html_e( 'Password:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_akamai_password" class="w3tc-ignore-change"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> type="password" name="cdn__akamai__password" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.akamai.password' ) ); ?>" size="60" />
</td>
</tr>
<tr>
<th><label for="cdn_akamai_email_notification"><?php esc_html_e( 'Email notification:', 'w3-total-cache' ); ?></label></th>
<td>
<textarea id="cdn_akamai_email_notification" name="cdn__akamai__email_notification"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.akamai.email_notification' ) ) ); ?></textarea>
<p class="description"><?php esc_html_e( 'Specify email addresses for completed removal notifications. One email per line.', 'w3-total-cache' ); ?></p>
</td>
</tr>
<tr>
<th><label for="cdn_akamai_zone"><?php esc_html_e( 'Domain to purge:', 'w3-total-cache' ); ?></label></th>
<td>
<select id="cdn_akamai_zone" name="cdn__akamai__zone">
<option value="production" <?php selected( $this->_config->get_string( 'cdn.akamai.zone' ), 'production' ); ?>>Production</option>
<option value="staging" <?php selected( $this->_config->get_string( 'cdn.akamai.zone' ), 'staging' ); ?>>Staging</option>
</select>
</td>
</tr>
<tr>
<th><label for="cdn_akamai_action"><?php esc_html_e( 'Purge action:', 'w3-total-cache' ); ?></label></th>
<td>
<select id="cdn_akamai_action" name="cdn__akamai__action">
<option value="invalidate" <?php selected( $this->_config->get_string( 'cdn.akamai.action' ), 'invalidate' ); ?>>Invalidate</option>
<option value="remove" <?php selected( $this->_config->get_string( 'cdn.akamai.action' ), 'remove' ); ?>>Remove</option>
</select>
</td>
</tr>
<tr>
<th>
<label for="cdn_akamai_ssl">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sSSL%2$s support:',
'w3-total-cache'
),
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<select id="cdn_akamai_ssl" name="cdn__akamai__ssl" <?php Util_Ui::sealing_disabled( 'cdn.' ); ?>>
<option value="auto"<?php selected( $this->_config->get_string( 'cdn.akamai.ssl' ), 'auto' ); ?>><?php esc_html_e( 'Auto (determine connection type automatically)', 'w3-total-cache' ); ?></option>
<option value="enabled"<?php selected( $this->_config->get_string( 'cdn.akamai.ssl' ), 'enabled' ); ?>><?php esc_html_e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
<option value="disabled"<?php selected( $this->_config->get_string( 'cdn.akamai.ssl' ), 'disabled' ); ?>><?php esc_html_e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
</select>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Some %1$sCDN%2$s providers may or may not support %3$sSSL%4$s, contact your vendor for more information.',
'w3-total-cache'
),
'<acronym title="' . __( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th><?php esc_html_e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
<td>
<?php
$cnames = $this->_config->get_array( 'cdn.akamai.domain' );
require W3TC_INC_DIR . '/options/cdn/common/cnames.php';
?>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Enter the hostname provided by your %1$sCDN%2$s provider, this value will replace your site\'s hostname in the %3$sHTML%4$s.',
'w3-total-cache'
),
'<acronym title="' . __( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Hypertext Markup Language', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th colspan="2">
<input id="cdn_test" class="button {type: 'akamai', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Test akamai', 'w3-total-cache' ); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
</th>
</tr>

View File

@ -0,0 +1,112 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
?>
<tr>
<th style="width: 300px;"><label for="cdn_att_account"><?php esc_html_e( 'Account #:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_att_account" class="w3tc-ignore-change" type="text"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__att__account" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.att.account' ) ); ?>" size="60" />
</td>
</tr>
<tr>
<th><label for="cdn_att_token"><?php esc_html_e( 'Token:', 'w3-total-cache' ); ?></th>
<td>
<input id="cdn_att_token" class="w3tc-ignore-change" type="password"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__att__token" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.att.token' ) ); ?>" size="60" />
</td>
</tr>
<tr>
<th>
<label for="cdn_att_ssl">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sSSL%2$s support:',
'w3-total-cache'
),
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<select id="cdn_att_ssl" name="cdn__att__ssl" <?php Util_Ui::sealing_disabled( 'cdn.' ); ?>>
<option value="auto"<?php selected( $this->_config->get_string( 'cdn.att.ssl' ), 'auto' ); ?>><?php esc_html_e( 'Auto (determine connection type automatically)', 'w3-total-cache' ); ?></option>
<option value="enabled"<?php selected( $this->_config->get_string( 'cdn.att.ssl' ), 'enabled' ); ?>><?php esc_html_e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
<option value="disabled"<?php selected( $this->_config->get_string( 'cdn.att.ssl' ), 'disabled' ); ?>><?php esc_html_e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
</select>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Some %1$sCDN%2$s providers may or may not support %3$sSSL%4$s, contact your vendor for more information.',
'w3-total-cache'
),
'<acronym title="' . __( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th><?php esc_html_e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
<td>
<?php
$cnames = $this->_config->get_array( 'cdn.att.domain' );
require W3TC_INC_DIR . '/options/cdn/common/cnames.php';
?>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Enter the hostname provided by your %1$sCDN%2$s provider, this value will replace your site\'s hostname in the %3$sHTML%4$s.',
'w3-total-cache'
),
'<acronym title="' . __( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Hypertext Markup Language', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th colspan="2">
<input id="cdn_test" class="button {type: 'att', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="Test AT&T" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
</th>
</tr>

View File

@ -0,0 +1,122 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
?>
<tr>
<th style="width: 300px;"><label for="cdn_azure_user"><?php esc_html_e( 'Account name:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_azure_user" class="w3tc-ignore-change" type="text"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__azure__user" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.azure.user' ) ); ?>" size="30" />
</td>
</tr>
<tr>
<th><label for="cdn_azure_key"><?php esc_html_e( 'Account key:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_azure_key" class="w3tc-ignore-change"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> type="password" name="cdn__azure__key" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.azure.key' ) ); ?>" size="60" />
</td>
</tr>
<tr>
<th><label for="cdn_azure_container"><?php esc_html_e( 'Container:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_azure_container" type="text"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__azure__container" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.azure.container' ) ); ?>" size="30" />
<input id="cdn_create_container" <?php Util_Ui::sealing_disabled( 'cdn.' ); ?> class="button {type: 'azure', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Create container', 'w3-total-cache' ); ?>" />
<span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
</td>
</tr>
<tr>
<th>
<label for="cdn_azure_ssl">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sSSL%2$s support:',
'w3-total-cache'
),
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<select id="cdn_azure_ssl" name="cdn__azure__ssl" <?php Util_Ui::sealing_disabled( 'cdn.' ); ?>>
<option value="auto"<?php selected( $this->_config->get_string( 'cdn.azure.ssl' ), 'auto' ); ?>><?php esc_html_e( 'Auto (determine connection type automatically)', 'w3-total-cache' ); ?></option>
<option value="enabled"<?php selected( $this->_config->get_string( 'cdn.azure.ssl' ), 'enabled' ); ?>><?php esc_html_e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
<option value="disabled"<?php selected( $this->_config->get_string( 'cdn.azure.ssl' ), 'disabled' ); ?>><?php esc_html_e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
</select>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Some %1$sCDN%2$s providers may or may not support %3$sSSL%4$s, contact your vendor for more information.',
'w3-total-cache'
),
'<acronym title="' . __( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th><?php esc_html_e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
<td>
<?php
$cdn_azure_user = $this->_config->get_string( 'cdn.azure.user' );
if ( '' !== $cdn_azure_user ) {
echo esc_attr( $cdn_azure_user ) . '.blob.core.windows.net';
} else {
echo '&lt;account name&gt;.blob.core.windows.net';
}
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'or %1$sCNAME%2$s:',
'w3-total-cache'
),
'<acronym title="' . __( 'Canonical Name', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
$cnames = $this->_config->get_array( 'cdn.azure.cname' );
require W3TC_INC_DIR . '/options/cdn/common/cnames.php';
?>
</td>
</tr>
<tr>
<th colspan="2">
<input id="cdn_test" class="button {type: 'azure', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Test Microsoft Azure Storage upload', 'w3-total-cache' ); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
</th>
</tr>

View File

@ -0,0 +1,187 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
?>
<tr>
<th colspan="2">
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML a tag to Amazon UserGuide for Access Policy Language KeyConcepts, 2 opening HTML acronym tag,
// translators: 3 closing HTML acronym tag, 4 closing HTML a tag, 5 opening HTML acronym tag, 6 closing HTML acronym tag,
// translators: 7 opening HTML a tag to Amazon Policy Generator, 8 opening HTML acronym tag,
// translators: 9 closing HTML acronym tag, 10 closing HTML a tag.
__(
'We recommend that you use %1$s%2$sIAM%3$s%4$s to create a new policy for %5$sAWS%6$s services that have limited permissions. A helpful tool: %7$s%8$sAWS%9$s Policy Generator%10$s',
'w3-total-cache'
),
'<a href="http://docs.amazonwebservices.com/IAM/latest/UserGuide/AccessPolicyLanguage_KeyConcepts.html" target="_blank">',
'<acronym title="' . __( 'AWS Identity and Access Management', 'w3-total-cache' ) . '">',
'</acronym>',
'</a>',
'<acronym title="' . __( 'Amazon Web Services', 'w3-total-cache' ) . '">',
'</acronym>',
'<a href="http://awspolicygen.s3.amazonaws.com/policygen.html" target="_blank">',
'<acronym title="' . __( 'Amazon Web Services', 'w3-total-cache' ) . '">',
'</acronym>',
'</a>'
),
array(
'a' => array(
'href' => array(),
'target' => array(),
),
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</th>
</tr>
<tr>
<th style="width: 300px;"><label for="cdn_cf_key"><?php esc_html_e( 'Access key ID:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_cf_key" class="w3tc-ignore-change" type="text"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__cf__key" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cf.key' ) ); ?>" size="30" />
</td>
</tr>
<tr>
<th><label for="cdn_cf_secret"><?php esc_html_e( 'Secret key:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_cf_secret" class="w3tc-ignore-change" type="password"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__cf__secret" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cf.secret' ) ); ?>" size="60" />
</td>
</tr>
<tr>
<th><label for="cdn_cf_bucket"><?php esc_html_e( 'Bucket:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_cf_bucket" type="text" name="cdn__cf__bucket"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> value="<?php echo esc_attr( strtolower( $this->_config->get_string( 'cdn.cf.bucket' ) ) ); ?>" size="30" />
<?php
Util_Ui::selectbox(
'cdn_cf_bucket_location',
'cdn__cf__bucket__location',
$this->_config->get_string( 'cdn.cf.bucket.location' ),
CdnEngine_S3::regions_list()
);
?>
<b>or</b>
<input id="cdn_create_container" class="button {type: 'cf', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Create as new bucket with distribution', 'w3-total-cache' ); ?>" /> <span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
</td>
</tr>
<tr>
<th>
<label for="cdn_cf_ssl">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sSSL%2$s support:',
'w3-total-cache'
),
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<select id="cdn_cf_ssl" name="cdn__cf__ssl" <?php Util_Ui::sealing_disabled( 'cdn.' ); ?>>
<option value="auto"<?php selected( $this->_config->get_string( 'cdn.cf.ssl' ), 'auto' ); ?>><?php esc_html_e( 'Auto (determine connection type automatically)', 'w3-total-cache' ); ?></option>
<option value="enabled"<?php selected( $this->_config->get_string( 'cdn.cf.ssl' ), 'enabled' ); ?>><?php esc_html_e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
<option value="disabled"<?php selected( $this->_config->get_string( 'cdn.cf.ssl' ), 'disabled' ); ?>><?php esc_html_e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
</select>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Some %1$sCDN%2$s providers may or may not support %3$sSSL%4$s, contact your vendor for more information.',
'w3-total-cache'
),
'<acronym title="' . __( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th><label for="cdn_cf_id"><?php esc_html_e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_cf_id" type="text" name="cdn__cf__id"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cf.id' ) ); ?>" size="18" style="text-align: right;" />.cloudfront.net or <acronym title="Canonical Name">CNAME</acronym>:
<?php
$cnames = $this->_config->get_array( 'cdn.cf.cname' );
require W3TC_INC_DIR . '/options/cdn/common/cnames.php';
?>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML a tag to Amazon Developer Guide for CNAMEs, 2 opnening HTML acronym tag,
// translators: 3 closing HTML acronym tag, 4 closing HTML a tag, 5 opening HTML acronym tag,
// translators: 6 closing HTML acronym tag.
__(
'If you have already added a %1$s%2$sCNAME%3$s%4$s to your %5$sDNS%6$s Zone, enter it here.',
'w3-total-cache'
),
'<a href="http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/index.html?CNAMEs.html" target="_blank">',
'<acronym title="' . __( 'Canonical Name', 'w3-total-cache' ) . '">',
'</acronym>',
'</a>',
'<acronym title="' . __( 'Domain Name System', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'a' => array(
'href' => array(),
'target' => array(),
),
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th><label for="cdn_cf_public_objects"><?php _e( 'Set objects to publicly accessible on upload:', 'w3-total-cache' ); ?></label></th>
<td>
<select id="cdn_cf_public_objects" name="cdn__cf__public_objects" <?php Util_Ui::sealing_disabled( 'cdn.' ) ?> >
<option value="enabled"<?php selected( $this->_config->get_string( 'cdn.cf.public_objects' ), 'enabled' ); ?>><?php esc_html_e( 'Enabled (apply the \'public-read\' ACL)', 'w3-total-cache' ); ?></option>
<option value="disabled"<?php selected( $this->_config->get_string( 'cdn.cf.public_objects' ), 'disabled' ); ?>><?php esc_html_e( 'Disabled (don\'t apply an ACL)', 'w3-total-cache' ); ?></option>
</select>
<p class="description"><?php _e( 'Objects in an S3 bucket served from CloudFront do not need to be publicly accessible. Set this value to disabled to ensure that objects are not publicly accessible and can only be accessed via CloudFront or with a suitable IAM role.', 'w3-total-cache' ); ?></p>
</td>
</tr>
<tr>
<th colspan="2">
<input id="cdn_test" class="button {type: 'cf', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Test S3 upload &amp; CloudFront distribution', 'w3-total-cache' ); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
</th>
</tr>

View File

@ -0,0 +1,169 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
?>
<tr>
<th colspan="2">
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML a tag to Amazon UserGuide for AccessPolicyLanguage_KeyConcepts, 2 opening HTML acronym tag,
// translators: 3 closing HTML acronym tag, 4 closing HTML a tag, 5 opening HTML acronym tag, 6 closing HTML acronym tag,
// translators: 7 opening HTML a tag to Amazon AWS Policy Generator, 8 opening HTML acronym tag,
// translators: 9 closing HTML acronym tag, 10 closing HTML a tag.
__(
'We recommend that you use %1$s%2$sIAM%3$s%4$s to create a new policy for %5$sAWS%6$s services that have limited permissions. A helpful tool: %7$s%8$sAWS%9$s Policy Generator%10$s',
'w3-total-cache'
),
'<a href="http://docs.amazonwebservices.com/IAM/latest/UserGuide/AccessPolicyLanguage_KeyConcepts.html" target="_blank">',
'<acronym title="AWS Identity and Access Management">',
'</acronym>',
'</a>',
'<acronym title="Amazon Web Services">',
'</acronym>',
'<a href="http://awspolicygen.s3.amazonaws.com/policygen.html" target="_blank">',
'<acronym title="Amazon Web Services">',
'</acronym>',
'</a>'
),
array(
'acronym' => array(
'title' => array(),
),
'a' => array(
'href' => array(),
'target' => array(),
),
)
);
?>
</p>
</th>
</tr>
<tr>
<th style="width: 300px;"><label for="cdn_cf2_key"><?php esc_html_e( 'Access key ID:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_cf2_key" class="w3tc-ignore-change" type="text"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__cf2__key" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cf2.key' ) ); ?>" size="30" />
</td>
</tr>
<tr>
<th><label for="cdn_cf2_secret"><?php esc_html_e( 'Secret key:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_cf2_secret" class="w3tc-ignore-change"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> type="password" name="cdn__cf2__secret" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cf2.secret' ) ); ?>" size="60" />
</td>
</tr>
<tr>
<th><?php esc_html_e( 'Origin:', 'w3-total-cache' ); ?></th>
<td>
<?php echo esc_html( Util_Environment::host_port() ); ?>
<input id="cdn_create_container"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> class="button {type: 'cf2', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Create distribution', 'w3-total-cache' ); ?>" />
<span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
</td>
</tr>
<tr>
<th>
<label for="cdn_cf2_ssl">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sSSL%2$s support:',
'w3-total-cache'
),
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<select id="cdn_cf2_ssl" name="cdn__cf2__ssl" <?php Util_Ui::sealing_disabled( 'cdn.' ); ?>>
<option value="auto"<?php selected( $this->_config->get_string( 'cdn.cf2.ssl' ), 'auto' ); ?>><?php esc_html_e( 'Auto (determine connection type automatically)', 'w3-total-cache' ); ?></option>
<option value="enabled"<?php selected( $this->_config->get_string( 'cdn.cf2.ssl' ), 'enabled' ); ?>><?php esc_html_e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
<option value="disabled"<?php selected( $this->_config->get_string( 'cdn.cf2.ssl' ), 'disabled' ); ?>><?php esc_html_e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
</select>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Some %1$sCDN%2$s providers may or may not support %3$sSSL%4$s, contact your vendor for more information.',
'w3-total-cache'
),
'<acronym title="' . __( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th><label for="cdn_cf2_id"><?php esc_html_e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_cf2_id" type="text" name="cdn__cf2__id"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cf2.id' ) ); ?>" size="18" style="text-align: right;" />.cloudfront.net or <acronym title="Canonical Name">CNAME</acronym>:
<?php
$cnames = $this->_config->get_array( 'cdn.cf2.cname' );
require W3TC_INC_DIR . '/options/cdn/common/cnames.php';
?>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML a tag to Amazon developer guide for AmazonCloudFront, 2 opening HTML acronym tag,
// translators: 3 closing HTML acronym tag, 4 closing HTML a tag,
// translators: 5 opening HTML acronym tag, 6 closing HTML acronym tag.
__(
'If you have already added a %1$s%2$sCNAME%3$s%4$s to your %5$sDNS%6$s Zone, enter it here.',
'w3-total-cache'
),
'<a href="http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/index.html?CNAMEs.html" target="_blank">',
'<acronym title="' . __( 'Canonical Name', 'w3-total-cache' ) . '">',
'</acronym>',
'</a>',
'<acronym title="' . __( 'Domain Name System', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
'a' => array(
'href' => array(),
'target' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th colspan="2">
<input id="cdn_test" class="button {type: 'cf2', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Test CloudFront distribution', 'w3-total-cache' ); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
</th>
</tr>

View File

@ -0,0 +1,35 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
if ( empty( $cnames ) ) {
} elseif ( count( $cnames ) == 1 ) {
echo '<div class="w3tc_cdn_cnames_readonly">' . esc_html( $cnames[0] ) . '</div>';
} else {
echo '<ol class="w3tc_cdn_cnames_readonly">';
foreach ( $cnames as $index => $cname ) {
$label = '';
if ( 0 === $index ) {
$label = __( '(reserved for CSS)', 'w3-total-cache' );
} elseif ( 1 === $index ) {
$label = __( '(reserved for JS in <head>)', 'w3-total-cache' );
} elseif ( 2 === $index ) {
$label = __( '(reserved for JS after <body>)', 'w3-total-cache' );
} elseif ( 3 === $index ) {
$label = __( '(reserved for JS before </body>)', 'w3-total-cache' );
} else {
$label = '';
}
echo '<li>' . esc_html( $cname ) . '<span class="w3tc_cdn_cname_comment">';
echo esc_html( $label );
echo '</span></li>';
}
echo '</ol>';
}

View File

@ -0,0 +1,67 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
?>
<ol id="cdn_cnames" style="margin: 0">
<?php
if ( ! count( $cnames ) ) {
$cnames = array( '' );
}
$count = count( $cnames );
if ( isset( $cnames['http_default'] ) ) {
$count--;
}
if ( isset( $cnames['https_default'] ) ) {
$count--;
}
$real_index = 0;
foreach ( $cnames as $index => $cname ) :
if ( 'http_default' === $index || 'https_default' === $index ) {
continue;
}
$label = '';
if ( $count > 1 ) :
switch ( $real_index ) :
case 0:
$label = __( '(reserved for CSS)', 'w3-total-cache' );
break;
case 1:
$label = __( '(reserved for JS in <head>)', 'w3-total-cache' );
break;
case 2:
$label = __( '(reserved for JS after <body>)', 'w3-total-cache' );
break;
case 3:
$label = __( '(reserved for JS before </body>)', 'w3-total-cache' );
break;
default:
$label = '';
break;
endswitch;
endif;
?>
<li>
<input type="text" name="cdn_cnames[]" id="cdn_cnames_<?php echo esc_attr( $real_index ); ?>"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> value="<?php echo esc_attr( $cname ); ?>" size="60" />
<input class="button cdn_cname_delete" type="button"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> value="<?php esc_attr_e( 'Delete', 'w3-total-cache' ); ?>"<?php echo ! $index ? ' style="display: none;"' : ''; ?> />
<span><?php echo esc_html( $label ); ?></span>
</li>
<?php
$real_index++;
endforeach;
?>
</ol>
<input id="cdn_cname_add" class="button" type="button" value="<?php esc_attr_e( 'Add CNAME', 'w3-total-cache' ); ?>"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> />

View File

@ -0,0 +1,119 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
?>
<tr>
<th style="width: 300px;"><label for="cdn_cotendo_username"><?php esc_html_e( 'Username:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_cotendo_username" class="w3tc-ignore-change" type="text"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__cotendo__username" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cotendo.username' ) ); ?>" size="60" />
</td>
</tr>
<tr>
<th><label for="cdn_cotendo_password"><?php esc_html_e( 'Password:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_cotendo_password" class="w3tc-ignore-change"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> type="password" name="cdn__cotendo__password" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.cotendo.password' ) ); ?>" size="60" />
</td>
</tr>
<tr>
<th><label for="cdn_cotendo_zones"><?php esc_html_e( 'Zones to purge:', 'w3-total-cache' ); ?></label></th>
<td>
<textarea id="cdn_cotendo_zones" name="cdn__cotendo__zones"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.cotendo.zones' ) ) ); ?></textarea>
</td>
</tr>
<tr>
<th>
<label for="cdn_cotendo_ssl">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sSSL%2$s support:',
'w3-total-cache'
),
'<acronym title="' . __( 'Application Programming Interface', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<select id="cdn_cotendo_ssl" name="cdn__cotendo__ssl" <?php Util_Ui::sealing_disabled( 'cdn.' ); ?>>
<option value="auto"<?php selected( $this->_config->get_string( 'cdn.cotendo.ssl' ), 'auto' ); ?>><?php esc_html_e( 'Auto (determine connection type automatically)', 'w3-total-cache' ); ?></option>
<option value="enabled"<?php selected( $this->_config->get_string( 'cdn.cotendo.ssl' ), 'enabled' ); ?>><?php esc_html_e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
<option value="disabled"<?php selected( $this->_config->get_string( 'cdn.cotendo.ssl' ), 'disabled' ); ?>><?php esc_html_e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
</select>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Some %1$sCDN%2$s providers may or may not support %3$sSSL%4$s, contact your vendor for more information.',
'w3-total-cache'
),
'<acronym title="' . __( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th><?php esc_html_e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
<td>
<?php
$cnames = $this->_config->get_array( 'cdn.cotendo.domain' );
require W3TC_INC_DIR . '/options/cdn/common/cnames.php';
?>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Enter the hostname provided by your %1$sCDN%2$s provider, this value will replace your site\'s hostname in the %3$sHTML%4$s.',
'w3-total-cache'
),
'<acronym title="' . __( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Hypertext Markup Language', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th colspan="2">
<input id="cdn_test" class="button {type: 'cotendo', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Test Cotendo', 'w3-total-cache' ); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
</th>
</tr>

View File

@ -0,0 +1,112 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
?>
<tr>
<th style="width: 300px;"><label for="cdn_edgecast_account"><?php esc_html_e( 'Account #:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_edgecast_account" class="w3tc-ignore-change" type="text"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__edgecast__account" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.edgecast.account' ) ); ?>" size="60" />
</td>
</tr>
<tr>
<th><label for="cdn_edgecast_token"><?php esc_html_e( 'Token:', 'w3-total-cache' ); ?></th>
<td>
<input id="cdn_edgecast_token" class="w3tc-ignore-change" type="password"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__edgecast__token" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.edgecast.token' ) ); ?>" size="60" />
</td>
</tr>
<tr>
<th>
<label for="cdn_edgecast_ssl">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sSSL%2$s support:',
'w3-total-cache'
),
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<select id="cdn_edgecast_ssl" name="cdn__edgecast__ssl" <?php Util_Ui::sealing_disabled( 'cdn.' ); ?>>
<option value="auto"<?php selected( $this->_config->get_string( 'cdn.edgecast.ssl' ), 'auto' ); ?>><?php esc_html_e( 'Auto (determine connection type automatically)', 'w3-total-cache' ); ?></option>
<option value="enabled"<?php selected( $this->_config->get_string( 'cdn.edgecast.ssl' ), 'enabled' ); ?>><?php esc_html_e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
<option value="disabled"<?php selected( $this->_config->get_string( 'cdn.edgecast.ssl' ), 'disabled' ); ?>><?php esc_html_e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
</select>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Some %1$sCDN%2$s providers may or may not support %3$sSSL%4$s, contact your vendor for more information.',
'w3-total-cache'
),
'<acronym title="' . __( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th><?php esc_html_e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
<td>
<?php
$cnames = $this->_config->get_array( 'cdn.edgecast.domain' );
require W3TC_INC_DIR . '/options/cdn/common/cnames.php';
?>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Enter the hostname provided by your %1$sCDN%2$s provider, this value will replace your site\'s hostname in the %3$sHTML%4$s.',
'w3-total-cache'
),
'<acronym title="' . __( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Hypertext Markup Language', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th colspan="2">
<input id="cdn_test" class="button {type: 'edgecast', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Test EdgeCast', 'w3-total-cache' ); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
</th>
</tr>

View File

@ -0,0 +1,348 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
?>
<tr>
<th colspan="2">
<?php $this->checkbox( 'cdn.ftp.pasv' ); ?>
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'Use passive %1$sFTP%2$s mode',
'w3-total-cache'
),
'<acronym title="' . __( 'File Transfer Protocol', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
<p class="description"><?php esc_html_e( 'Enable this option only if there are connectivity issues, otherwise it\'s not recommended.', 'w3-total-cache' ); ?></p>
</th>
</tr>
<tr>
<th style="width: 300px;"><label for="cdn_ftp_host">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sFTP%2$s hostname:',
'w3-total-cache'
),
'<acronym title="' . __( 'File Transfer Protocol', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</th>
<td>
<input id="cdn_ftp_host" type="text" name="cdn__ftp__host"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.ftp.host' ) ); ?>" size="30" />
<p class="description"><?php esc_html_e( 'Specify the server\'s address, e.g.: "ftp.domain.com". Try "127.0.0.1" if using a sub-domain on the same server as your site.', 'w3-total-cache' ); ?></p>
</td>
</tr>
<tr>
<th>
<label for="cdn_ftp_type">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sFTP%2$s connection:',
'w3-total-cache'
),
'<acronym title="' . __( 'File Transfer Protocol', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<select id="cdn_ftp_type" name="cdn__ftp__type" <?php Util_Ui::sealing_disabled( 'cdn.' ); ?>>
<option value=""<?php selected( $this->_config->get_string( 'cdn.ftp.type' ), '' ); ?>><?php esc_html_e( 'Plain FTP', 'w3-total-cache' ); ?></option>
<option value="ftps"<?php selected( $this->_config->get_string( 'cdn.ftp.type' ), 'ftps' ); ?>><?php esc_html_e( 'SSL-FTP connection (FTPS)', 'w3-total-cache' ); ?></option>
<option value="sftp"<?php selected( $this->_config->get_string( 'cdn.ftp.type' ), 'sftp' ); ?><?php echo function_exists( 'ssh2_connect' ) ? '' : ' disabled'; ?>><?php esc_html_e( 'FTP over SSH (SFTP)', 'w3-total-cache' ); ?></option>
</select>
</td>
</tr>
<tr>
<th>
<label for="cdn_ftp_user">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sFTP%2$s username:',
'w3-total-cache'
),
'<acronym title="' . __( 'File Transfer Protocol', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<input id="cdn_ftp_user" class="w3tc-ignore-change" type="text"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__ftp__user" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.ftp.user' ) ); ?>" size="30" />
</td>
</tr>
<tr>
<th>
<label for="cdn_ftp_pass">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sFTP%2$s password:',
'w3-total-cache'
),
'<acronym title="' . __( 'File Transfer Protocol', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<input id="cdn_ftp_pass" class="w3tc-ignore-change"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> type="password" name="cdn__ftp__pass" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.ftp.pass' ) ); ?>" size="30" />
</td>
</tr>
<tr>
<th>
<label for="cdn_ftp_path">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sFTP%2$s path:',
'w3-total-cache'
),
'<acronym title="' . __( 'File Transfer Protocol', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<input id="cdn_ftp_path" type="text" name="cdn__ftp__path"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.ftp.path' ) ); ?>" size="30" />
<p class="description"><?php esc_html_e( 'Specify the directory where files must be uploaded to be accessible in a web browser (the document root).', 'w3-total-cache' ); ?></p>
</td>
</tr>
<tr>
<th>
<label for="cdn_ftp_ssl">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sSSL%2$s support:',
'w3-total-cache'
),
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<select id="cdn_ftp_ssl" name="cdn__ftp__ssl" <?php Util_Ui::sealing_disabled( 'cdn.' ); ?>>
<option value="auto"<?php selected( $this->_config->get_string( 'cdn.ftp.ssl' ), 'auto' ); ?>><?php esc_html_e( 'Auto (determine connection type automatically)', 'w3-total-cache' ); ?></option>
<option value="enabled"<?php selected( $this->_config->get_string( 'cdn.ftp.ssl' ), 'enabled' ); ?>><?php esc_html_e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
<option value="disabled"<?php selected( $this->_config->get_string( 'cdn.ftp.ssl' ), 'disabled' ); ?>><?php esc_html_e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
</select>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Some %1$sCDN%2$s providers may or may not support %3$sSSL%4$s, contact your vendor for more information.',
'w3-total-cache'
),
'<acronym title="' . __( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th colspan="2">
<?php $this->checkbox( 'cdn.ftp.default_keys', ! function_exists( 'ssh2_connect' ) ); ?>
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'Use default %1$sSSH%2$s public/private key files',
'w3-total-cache'
),
'<acronym title="' . __( 'Secure Shell', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
<p class="description"><?php esc_html_e( 'Enable this option if you don\'t have special public/private key files.', 'w3-total-cache' ); ?></p>
</th>
</tr>
<tr>
<th>
<label for="cdn_ftp_pubkey">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sSFTP%2$s public key:',
'w3-total-cache'
),
'<acronym title="' . __( 'Secure File Transfer Protocol', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<input id="cdn_ftp_pubkey" class="w3tc-ignore-change" type="text"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__ftp__pubkey" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.ftp.pubkey' ) ); ?>" size="30" <?php echo function_exists( 'ssh2_connect' ) ? '' : 'disabled'; ?> />
</td>
</tr>
<tr>
<th>
<label for="cdn_ftp_privkey">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sSFTP%2$s private key:',
'w3-total-cache'
),
'<acronym title="' . __( 'Secure File Transfer Protocol', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<input id="cdn_ftp_privkey" class="w3tc-ignore-change" type="text"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__ftp__privkey" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.ftp.privkey' ) ); ?>" size="30" <?php echo function_exists( 'ssh2_connect' ) ? '' : 'disabled'; ?> />
</td>
</tr>
<tr>
<th><?php esc_html_e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
<td>
<?php
$cnames = $this->_config->get_array( 'cdn.ftp.domain' );
require W3TC_INC_DIR . '/options/cdn/common/cnames.php';
?>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag,
// translators: 5 opening HTML acronym tag, 6 closing HTML acronym tag.
__(
'Enter the hostname or %1$sCNAME%2$s(s) of your %3$sFTP%4$s server configured above, these values will replace your site\'s hostname in the %5$sHTML%6$s.',
'w3-total-cache'
),
'<acronym title="' . __( 'Canonical Name', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'File Transfer Protocol', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Hypertext Markup Language', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th colspan="2">
<input id="cdn_test" class="button {type: 'ftp', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Test FTP server', 'w3-total-cache' ); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
</th>
</tr>

View File

@ -0,0 +1,98 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
?>
<tr>
<th>
<label for="cdn_mirror_ssl">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sSSL%2$s support:',
'w3-total-cache'
),
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<select id="cdn_mirror_ssl" name="cdn__mirror__ssl" <?php Util_Ui::sealing_disabled( 'cdn.' ); ?>>
<option value="auto"<?php selected( $this->_config->get_string( 'cdn.mirror.ssl' ), 'auto' ); ?>><?php esc_html_e( 'Auto (determine connection type automatically)', 'w3-total-cache' ); ?></option>
<option value="enabled"<?php selected( $this->_config->get_string( 'cdn.mirror.ssl' ), 'enabled' ); ?>><?php esc_html_e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
<option value="disabled"<?php selected( $this->_config->get_string( 'cdn.mirror.ssl' ), 'disabled' ); ?>><?php esc_html_e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
</select>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Some %1$sCDN%2$s providers may or may not support %3$sSSL%4$s, contact your vendor for more information.',
'w3-total-cache'
),
'<acronym title="' . __( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th><?php esc_html_e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
<td>
<?php
$cnames = $this->_config->get_array( 'cdn.mirror.domain' );
require W3TC_INC_DIR . '/options/cdn/common/cnames.php';
?>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Enter the hostname provided by your %1$sCDN%2$s provider, this value will replace your site\'s hostname in the %3$sHTML%4$s.',
'w3-total-cache'
),
'<acronym title="' . __( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Hypertext Markup Language', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th colspan="2">
<input id="cdn_test" class="button {type: 'mirror', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Test Mirror', 'w3-total-cache' ); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
</th>
</tr>

View File

@ -0,0 +1,152 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
?>
<tr>
<th style="width: 300px;"><label for="cdn_rscf_user"><?php esc_html_e( 'Username:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_rscf_user" class="w3tc-ignore-change" type="text"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__rscf__user" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.rscf.user' ) ); ?>" size="30" />
</td>
</tr>
<tr>
<th>
<label for="cdn_rscf_key">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sAPI%2$s key:',
'w3-total-cache'
),
'<acronym title="' . __( 'Application Programming Interface', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<input id="cdn_rscf_key" class="w3tc-ignore-change" type="password"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__rscf__key" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.rscf.key' ) ); ?>" size="60" />
</td>
</tr>
<?php
Util_Ui::config_item(
array(
'key' => 'cdn.rscf.location',
'control' => 'selectbox',
'selectbox_values' => array(
'us' => 'US',
'uk' => 'uk',
),
)
);
?>
<tr>
<th><label for="cdn_rscf_container"><?php esc_html_e( 'Container:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_rscf_container" type="text" name="cdn__rscf__container"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.rscf.container' ) ); ?>" size="30" />
<input id="cdn_create_container"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> class="button {type: 'rscf', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Create container', 'w3-total-cache' ); ?>" />
<span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
</td>
</tr>
<tr>
<th>
<label for="cdn_rscf_ssl">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sSSL%2$s support:',
'w3-total-cache'
),
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<select id="cdn_rscf_ssl" name="cdn__rscf__ssl" <?php Util_Ui::sealing_disabled( 'cdn.' ); ?>>
<option value="auto"<?php selected( $this->_config->get_string( 'cdn.rscf.ssl' ), 'auto' ); ?>><?php esc_html_e( 'Auto (determine connection type automatically)', 'w3-total-cache' ); ?></option>
<option value="enabled"<?php selected( $this->_config->get_string( 'cdn.rscf.ssl' ), 'enabled' ); ?>><?php esc_html_e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
<option value="disabled"<?php selected( $this->_config->get_string( 'cdn.rscf.ssl' ), 'disabled' ); ?>><?php esc_html_e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
</select>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Some %1$sCDN%2$s providers may or may not support %3$sSSL%4$s, contact your vendor for more information.',
'w3-total-cache'
),
'<acronym title="' . __( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . __( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th><?php esc_html_e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
<td>
<?php
$cnames = $this->_config->get_array( 'cdn.rscf.cname' );
require W3TC_INC_DIR . '/options/cdn/common/cnames.php';
?>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'Enter the hostname provided by Rackspace Cloud Files, this value will replace your site\'s hostname in the %1$sHTML%2$s.',
'w3-total-cache'
),
'<acronym title="' . __( 'Hypertext Markup Language', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th colspan="2">
<input id="cdn_test" class="button {type: 'rscf', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Test Cloud Files upload', 'w3-total-cache' ); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
</th>
</tr>

View File

@ -0,0 +1,196 @@
<?php
/**
* File: s3.php
*
* @package W3TC
*/
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
?>
<tr>
<th colspan="2">
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML a tag to Amazon UserGuide for Access Policy Language KeyConcepts, 2 opening HTML acronym tag.
// translators: 3 closing HTML acronym tag, 4 closing HTML a tag, 5 opening HTML acronym tag,
// translators: 6 closing HTML acronym tag, 7 opening HTML a tag to Amazons Policy Generator,
// translators: 8 opening HTML acronym tag, 9 closing HTML acronym tag, 10 closing HTML a tag.
__(
'We recommend that you use %1$s%2$sIAM%3$s%4$s to create a new policy for %5$sAWS%6$s services that have limited permissions. A helpful tool: %7$s%8$sAWS%9$s Policy Generator%10$s',
'w3-total-cache'
),
'<a href="' . esc_url( 'http://docs.amazonwebservices.com/IAM/latest/UserGuide/AccessPolicyLanguage_KeyConcepts.html' ) . '" target="_blank">',
'<acronym title="' . esc_attr__( 'AWS Identity and Access Management', 'w3-total-cache' ) . '">',
'</acronym>',
'</a>',
'<acronym title="' . esc_attr__( 'Amazon Web Services', 'w3-total-cache' ) . '">',
'</acronym>',
'<a href="' . esc_url( 'http://awspolicygen.s3.amazonaws.com/policygen.html' ) . '" target="_blank">',
'<acronym title="' . esc_attr__( 'Amazon Web Services', 'w3-total-cache' ) . '">',
'</acronym>',
'</a>'
),
array(
'a' => array(
'href' => array(),
'target' => array(),
),
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</th>
</tr>
<tr>
<th style="width: 300px;"><label for="cdn_s3_key"><?php esc_html_e( 'Access key ID:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_s3_key" class="w3tc-ignore-change" type="text"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> name="cdn__s3__key" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.s3.key' ) ); ?>" size="30" />
</td>
</tr>
<tr>
<th><label for="cdn_s3_secret"><?php esc_html_e( 'Secret key:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_s3_secret" class="w3tc-ignore-change"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> type="password" name="cdn__s3__secret" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.s3.secret' ) ); ?>" size="60" />
</td>
</tr>
<tr>
<th><label for="cdn_s3_bucket"><?php esc_html_e( 'Bucket:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_s3_bucket" type="text" name="cdn__s3__bucket"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> value="<?php echo esc_attr( strtolower( $this->_config->get_string( 'cdn.s3.bucket' ) ) ); ?>" size="30" />
<?php
Util_Ui::selectbox(
'cdn_s3_bucket_location',
'cdn__s3__bucket__location',
$this->_config->get_string( 'cdn.s3.bucket.location' ),
CdnEngine_S3::regions_list()
);
?>
<b>or</b>
<input id="cdn_create_container" class="button {type: 's3', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Create as new bucket', 'w3-total-cache' ); ?>" /> <span id="cdn_create_container_status" class="w3tc-status w3tc-process"></span>
</td>
</tr>
<tr>
<th>
<label for="cdn_s3_ssl">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sSSL%2$s support:',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<select id="cdn_s3_ssl" name="cdn__s3__ssl" <?php Util_Ui::sealing_disabled( 'cdn.' ); ?>>
<option value="auto"<?php selected( $this->_config->get_string( 'cdn.s3.ssl' ), 'auto' ); ?>><?php esc_html_e( 'Auto (determine connection type automatically)', 'w3-total-cache' ); ?></option>
<option value="enabled"<?php selected( $this->_config->get_string( 'cdn.s3.ssl' ), 'enabled' ); ?>><?php esc_html_e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
<option value="disabled"<?php selected( $this->_config->get_string( 'cdn.s3.ssl' ), 'disabled' ); ?>><?php esc_html_e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
</select>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Some %1$sCDN%2$s providers may or may not support %3$sSSL%4$s, contact your vendor for more information.',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . esc_attr__( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th><?php esc_html_e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
<td>
<?php
$cdn_s3_bucket = $this->_config->get_string( 'cdn.s3.bucket' );
if ( '' !== $cdn_s3_bucket ) {
echo esc_html( $cdn_s3_bucket ) . '.s3.amazonaws.com ';
} else {
echo '&lt;bucket&gt;.s3.amazonaws.com ';
}
esc_html_e( 'or CNAME:', 'w3-total-cache' );
$cnames = $this->_config->get_array( 'cdn.s3.cname' );
require W3TC_INC_DIR . '/options/cdn/common/cnames.php';
?>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML a tag to Amazon UserGuide for Virtual Hosting, 2 closing HTML a tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'If you have already added a %1$sCNAME%2$s to your %3$sDNS%4$s Zone, enter it here.',
'w3-total-cache'
),
'<a href="' . esc_url( 'https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#VirtualHostingCustomURLs' ) . '" target="_blank">',
'</a>',
'<acronym title="' . esc_attr__( 'Domain Name System', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'a' => array(
'href' => array(),
'target' => array(),
),
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th><label for="cdn_s3_public_objects"><?php esc_html_e( 'Set objects to publicly accessible on upload:', 'w3-total-cache' ); ?></label></th>
<td>
<select id="cdn_s3_public_objects" name="cdn__s3__public_objects" <?php Util_Ui::sealing_disabled( 'cdn.' ); ?> >
<option value="enabled"<?php selected( $this->_config->get_string( 'cdn.s3.public_objects' ), 'enabled' ); ?>><?php esc_html_e( 'Enabled (apply the \'public-read\' ACL)', 'w3-total-cache' ); ?></option>
<option value="disabled"<?php selected( $this->_config->get_string( 'cdn.s3.public_objects' ), 'disabled' ); ?>><?php esc_html_e( 'Disabled (don\'t apply an ACL)', 'w3-total-cache' ); ?></option>
</select>
</td>
</tr>
<tr>
<th colspan="2">
<input id="cdn_test" class="button {type: 's3', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Test S3 upload', 'w3-total-cache' ); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
</th>
</tr>

View File

@ -0,0 +1,154 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
Util_Ui::config_item(
array(
'key' => 'cdn.s3_compatible.api_host',
'label' => esc_html__( 'API host:', 'w3-total-cache' ),
'control' => 'textbox',
'textbox_size' => 30,
'description' => esc_html__( 'Host of API endpoint, comptabile with Amazon S3 API', 'w3-total-cache' ),
)
);
Util_Ui::config_item(
array(
'key' => 'cdn.s3.key',
'label' => esc_html__( 'Access key ID:', 'w3-total-cache' ),
'control' => 'textbox',
'textbox_size' => 30,
'description' => wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Theme files, media library attachments, %1$sCSS%2$s, %3$sJS%4$s files etc will appear to load instantly for site visitors.',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Cascading Style Sheet', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . esc_attr__( 'JavaScript', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
),
)
);
?>
<tr>
<th><label for="cdn_s3_secret"><?php esc_html_e( 'Secret key:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_s3_secret" class="w3tc-ignore-change"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> type="password" name="cdn__s3__secret" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.s3.secret' ) ); ?>" size="60" />
</td>
</tr>
<tr>
<th><label for="cdn_s3_bucket"><?php esc_html_e( 'Bucket:', 'w3-total-cache' ); ?></label></th>
<td>
<input id="cdn_s3_bucket" type="text" name="cdn__s3__bucket"
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'cdn.s3.bucket' ) ); ?>" size="30" />
</td>
</tr>
<tr>
<th>
<label for="cdn_s3_ssl">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
__(
'%1$sSSL%2$s support:',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</label>
</th>
<td>
<select id="cdn_s3_ssl" name="cdn__s3__ssl" <?php Util_Ui::sealing_disabled( 'cdn.' ); ?>>
<option value="auto"<?php selected( $this->_config->get_string( 'cdn.s3.ssl' ), 'auto' ); ?>><?php esc_html_e( 'Auto (determine connection type automatically)', 'w3-total-cache' ); ?></option>
<option value="enabled"<?php selected( $this->_config->get_string( 'cdn.s3.ssl' ), 'enabled' ); ?>><?php esc_html_e( 'Enabled (always use SSL)', 'w3-total-cache' ); ?></option>
<option value="disabled"<?php selected( $this->_config->get_string( 'cdn.s3.ssl' ), 'disabled' ); ?>><?php esc_html_e( 'Disabled (always use HTTP)', 'w3-total-cache' ); ?></option>
</select>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'Some %1$sCDN%2$s providers may or may not support %3$sSSL%4$s, contact your vendor for more information.',
'w3-total-cache'
),
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
'</acronym>',
'<acronym title="' . esc_attr__( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th><?php esc_html_e( 'Replace site\'s hostname with:', 'w3-total-cache' ); ?></th>
<td>
<?php
$cnames = $this->_config->get_array( 'cdn.s3.cname' );
require W3TC_INC_DIR . '/options/cdn/common/cnames.php';
?>
<p class="description">
<?php
echo wp_kses(
sprintf(
// translators: 1 opening HTML a tag to Amazon UserGuide for Virtual Hosting, 2 closing HTML a tag,
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
__(
'If you have already added a %1$sCNAME%2$s to your %3$sDNS%4$s Zone, enter it here.',
'w3-total-cache'
),
'<a href="' . esc_url( 'https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#VirtualHostingCustomURLs' ) . '" target="_blank">',
'</a>',
'<acronym title="' . esc_attr__( 'Domain Name System', 'w3-total-cache' ) . '">',
'</acronym>'
),
array(
'a' => array(
'href' => array(),
'target' => array(),
),
'acronym' => array(
'title' => array(),
),
)
);
?>
</p>
</td>
</tr>
<tr>
<th colspan="2">
<input id="cdn_test" class="button {type: 's3_compatible', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Test S3 upload', 'w3-total-cache' ); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
</th>
</tr>