installed plugin W3 Total Cache
version 2.3.2
This commit is contained in:
263
wp-content/plugins/w3-total-cache/inc/options/about.php
Normal file
263
wp-content/plugins/w3-total-cache/inc/options/about.php
Normal file
@ -0,0 +1,263 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
?>
|
||||
<?php require W3TC_INC_DIR . '/options/common/header.php'; ?>
|
||||
|
||||
<div id="about">
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 HTML a tag to memcached.org, 2 HTML acronym open tag, 3 HTML acronym and close tag.
|
||||
__(
|
||||
'User experience is an important aspect of every web site and all web sites can benefit from effective caching and file size reduction. We have applied web site optimization methods typically used with high traffic sites and simplified their implementation. Coupling these methods either %1$s and/or opcode caching and the %2$sCDN%3$s of your choosing to provide the following features and benefits:',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<a href="http://memcached.org/" target="_blank">memcached</a>',
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
'target' => array(),
|
||||
),
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<ul>
|
||||
<li><?php esc_html_e( 'Improved Google search engine ranking', 'w3-total-cache' ); ?></li>
|
||||
<li><?php esc_html_e( 'Increased visitor time on site', 'w3-total-cache' ); ?></li>
|
||||
<li><?php esc_html_e( 'Optimized progressive render (pages start rendering immediately)', 'w3-total-cache' ); ?></li>
|
||||
<li>
|
||||
<?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.
|
||||
__(
|
||||
'Reduced %1$sHTTP%2$s Transactions, %3$sDNS%4$s lookups and reduced document load time',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Transfer Protocol', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Domain Name System', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?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.
|
||||
__(
|
||||
'Bandwidth savings via Minify and %1$sHTTP%2$s compression of %3$sHTML%4$s, %5$sCSS%6$s, JavaScript and feeds',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Transfer Protocol', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Markup Language', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Cascading Style Sheet', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li><?php esc_html_e( 'Increased web server concurrency and increased scale (easily sustain high traffic spikes)', 'w3-total-cache' ); ?></li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Transparent content delivery network (%1$sCDN%2$s) integration with Media Library, theme files and WordPress core',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Caching of pages / posts in memory or on disk or on %1$sCDN%2$s (mirror only)',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
)
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Caching of (minified) %1$sCSS%2$s and JavaScript in memory, on disk or on %3$sCDN%4$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Cascading Style Sheet', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li><?php esc_html_e( 'Caching of database objects in memory or on disk', 'w3-total-cache' ); ?></li>
|
||||
<li><?php esc_html_e( 'Caching of objects in memory or on disk', 'w3-total-cache' ); ?></li>
|
||||
<li><?php esc_html_e( 'Caching of feeds (site, categories, tags, comments, search results) in memory or on disk', 'w3-total-cache' ); ?></li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Caching of search results pages (i.e. %1$sURI%2$ss with query string variables) in memory or on disk',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Uniform Resource Identifier', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li><?php esc_html_e( 'Minification of posts / pages and feeds', 'w3-total-cache' ); ?></li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Minification (concatenation and white space removal) of inline, external or 3rd party JavaScript / %1$sCSS%2$s with automated updates',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Cascading Style Sheet', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML a tag to HTTP ETag Wiki page, 2 closing HTML a tag.
|
||||
__(
|
||||
'Complete header management including %1$sETags%2$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<a href="' . esc_url( 'http://en.wikipedia.org/wiki/HTTP_ETag' ) . '">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li><?php esc_html_e( 'JavaScript embedding group and location management', 'w3-total-cache' ); ?></li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Import post attachments directly into the Media Library (and %1$sCDN%2$s)',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p><?php esc_html_e( 'Your users have less data to download, you can now serve more visitors at once without upgrading your hardware and you don\'t have to change how you do anything; just set it and forget it.', 'w3-total-cache' ); ?></p>
|
||||
|
||||
<h4><?php esc_html_e( 'Who do I thank for all of this?', 'w3-total-cache' ); ?></h4>
|
||||
|
||||
<p><?php esc_html_e( 'It\'s quite difficult to recall all of the innovators that have shared their thoughts, code and experiences in the blogosphere over the years, but here are some names to get you started:', 'w3-total-cache' ); ?></p>
|
||||
|
||||
<ul>
|
||||
<li><a href="<?php echo esc_url( 'http://stevesouders.com/' ); ?>" target="_blank">Steve Souders</a></li>
|
||||
<li><a href="<?php echo esc_url( 'http://mrclay.org/' ); ?>" target="_blank">Steve Clay</a></li>
|
||||
<li><a href="<?php echo esc_url( 'http://wonko.com/' ); ?>" target="_blank">Ryan Grove</a></li>
|
||||
<li><a href="<?php echo esc_url( 'http://www.nczonline.net/blog/2009/06/23/loading-javascript-without-blocking/' ); ?>" target="_blank">Nicholas Zakas</a> </li>
|
||||
<li><a href="<?php echo esc_url( 'http://rtdean.livejournal.com/' ); ?>" target="_blank">Ryan Dean</a></li>
|
||||
<li><a href="<?php echo esc_url( 'http://gravitonic.com/' ); ?>" target="_blank">Andrei Zmievski</a></li>
|
||||
<li>George Schlossnagle</li>
|
||||
<li>Daniel Cowgill</li>
|
||||
<li><a href="<?php echo esc_url( 'http://toys.lerdorf.com/' ); ?>" target="_blank">Rasmus Lerdorf</a></li>
|
||||
<li><a href="<?php echo esc_url( 'http://notmysock.org/' ); ?>" target="_blank">Gopal Vijayaraghavan</a></li>
|
||||
<li><a href="<?php echo esc_url( 'http://eaccelerator.net/' ); ?>" target="_blank">Bart Vanbraban</a></li>
|
||||
<li><a href="<?php echo esc_url( 'http://xcache.lighttpd.net/' ); ?>" target="_blank">mOo</a></li>
|
||||
</ul>
|
||||
|
||||
<p><?php esc_html_e( 'Please reach out to all of these people and support their projects if you\'re so inclined.', 'w3-total-cache' ); ?></p>
|
||||
</div>
|
||||
|
||||
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>
|
730
wp-content/plugins/w3-total-cache/inc/options/browsercache.php
Normal file
730
wp-content/plugins/w3-total-cache/inc/options/browsercache.php
Normal file
@ -0,0 +1,730 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
$security_session_values = array(
|
||||
'' => 'Default',
|
||||
'on' => 'Enable',
|
||||
'off' => 'Disable',
|
||||
);
|
||||
|
||||
?>
|
||||
<?php require W3TC_INC_DIR . '/options/common/header.php'; ?>
|
||||
|
||||
<form action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 HTML span tag indicating Browsercache enabled/disabled.
|
||||
__(
|
||||
'Browser caching is currently %1$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<span class="w3tc-' . ( $browsercache_enabled ? 'enabled">' . esc_html__( 'enabled', 'w3-total-cache' ) : 'disabled">' . esc_html__( 'disabled', 'w3-total-cache' ) ) . '</span>'
|
||||
),
|
||||
array(
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
Util_Ui::nonce_field( 'w3tc' ),
|
||||
array(
|
||||
'input' => array(
|
||||
'type' => array(),
|
||||
'name' => array(),
|
||||
'value' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: HTML input submit for updating media query string.
|
||||
__(
|
||||
'%1$s to make existing file modifications visible to visitors with a primed cache',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<input type="submit" name="w3tc_flush_browser_cache" value="' .
|
||||
esc_attr__( 'Update media query string', 'w3-total-cache' ) . '" ' .
|
||||
disabled( ! ( $browsercache_enabled && $browsercache_update_media_qs ), true, false ) .
|
||||
' class="button" />'
|
||||
),
|
||||
array(
|
||||
'input' => array(
|
||||
'type' => array(),
|
||||
'name' => array(),
|
||||
'value' => array(),
|
||||
'disabled' => array(),
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</form>
|
||||
<form action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
|
||||
<div class="metabox-holder">
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'General', 'w3-total-cache' ), '', 'general' ); ?>
|
||||
<p><?php esc_html_e( 'Specify global browser cache policy.', 'w3-total-cache' ); ?></p>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<label>
|
||||
<input id="browsercache_last_modified" type="checkbox" name="expires"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
|
||||
value="1"<?php checked( $browsercache_last_modified, true ); ?> />
|
||||
<?php esc_html_e( 'Set Last-Modified header', 'w3-total-cache' ); ?>
|
||||
</label>
|
||||
<p class="description"><?php esc_html_e( 'Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<label>
|
||||
<input id="browsercache_expires" type="checkbox" name="expires"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
|
||||
value="1"<?php checked( $browsercache_expires, true ); ?> /> <?php esc_html_e( 'Set expires header', 'w3-total-cache' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set the expires header to encourage browser caching of files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<label><input id="browsercache_cache_control" type="checkbox"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> name="cache_control" value="1"<?php checked( $browsercache_cache_control, true ); ?> /> <?php esc_html_e( 'Set cache control header', 'w3-total-cache' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<label><input id="browsercache_etag" type="checkbox"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
|
||||
name="etag" value="1"<?php checked( $browsercache_etag, true ); ?> /> <?php esc_html_e( 'Set entity tag (ETag)', 'w3-total-cache' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set the ETag header to encourage browser caching of files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<label><input id="browsercache_w3tc" type="checkbox" name="w3tc"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?> value="1" <?php checked( $browsercache_w3tc, true ); ?> /> <?php esc_html_e( 'Set W3 Total Cache header', 'w3-total-cache' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set this header to assist in identifying optimized files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<label><input id="browsercache_compression" type="checkbox"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
|
||||
name="compression"<?php checked( $browsercache_compression, true ); ?> value="1" />
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Enable %1$sHTTP%2$s (gzip) compression',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Transfer Protocol', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</label>
|
||||
<p class="description"><?php esc_html_e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<label><input id="browsercache_brotli" type="checkbox"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
|
||||
<?php echo ! function_exists( 'brotli_compress' ) ? 'disabled="disabled"' : ''; ?>
|
||||
name="compression"<?php checked( $browsercache_brotli, true ); ?> value="1" />
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Enable %1$sHTTP%2$s (brotli) compression',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Transfer Protocol', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</label>
|
||||
<p class="description"><?php esc_html_e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<label><input id="browsercache_replace" type="checkbox"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
|
||||
name="replace" value="1"<?php checked( $browsercache_replace, true ); ?> /> <?php esc_html_e( 'Prevent caching of objects after settings change', 'w3-total-cache' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Whenever settings are changed, a new query string will be generated and appended to objects allowing the new policy to be applied.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<label><input id="browsercache_querystring" type="checkbox"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
|
||||
name="querystring" value="1"<?php checked( $browsercache_querystring, true ); ?> /> <?php esc_html_e( 'Remove query strings from static resources', 'w3-total-cache' ); ?></label>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Resources with a "?" in the %1$sURL%2$s are not cached by some proxy caching servers.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Uniform Resource Locator', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="browsercache_replace_exceptions"><?php Util_Ui::e_config_label( 'browsercache.replace.exceptions' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="browsercache_replace_exceptions"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
|
||||
name="browsercache__replace__exceptions" cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'browsercache.replace.exceptions' ) ) ); ?></textarea>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Do not add the prevent caching query string to the specified %1$sURI%2$ss. Supports regular expressions.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Uniform Resource Identifier', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<label><input id="browsercache_nocookies" type="checkbox"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
|
||||
name="nocookies" value="1"<?php checked( $browsercache_nocookies, true ); ?> /> <?php esc_html_e( "Don't set cookies for static files", 'w3-total-cache' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Removes Set-Cookie header for responses.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.no404wp', ! Util_Rule::can_check_rules() ); ?> <?php Util_Ui::e_config_label( 'browsercache.no404wp' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Reduce server load by allowing the web server to handle 404 (not found) errors for static files (images etc).', 'w3-total-cache' ); ?></p>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'If enabled - you may get 404 File Not Found response for some files generated on-the-fly by WordPress plugins. You may add those file %1$sURI%2$ss to 404 error exception list below to avoid that.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Uniform Resource Identifier', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="browsercache_no404wp_exceptions"><?php Util_Ui::e_config_label( 'browsercache.no404wp.exceptions' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="browsercache_no404wp_exceptions"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
|
||||
name="browsercache__no404wp__exceptions" cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'browsercache.no404wp.exceptions' ) ) ); ?></textarea>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Never process 404 (not found) events for the specified %1$sURI%2$ss.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Uniform Resource Identifier', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
Util_Ui::config_item(
|
||||
array(
|
||||
'key' => 'browsercache.rewrite',
|
||||
'disabled' => Util_Ui::sealing_disabled( 'browsercache.' ),
|
||||
'control' => 'checkbox',
|
||||
'checkbox_label' => wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Rewrite %1$sURL%2$s structure of objects',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Universal Resource Locator', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
'description' => wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Generate unique %1$sURI%2$s for each file protected from caching by browser.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Universal Resource Indicator', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
'label_class' => 'w3tc_single_column',
|
||||
)
|
||||
);
|
||||
?>
|
||||
</table>
|
||||
|
||||
<?php Util_Ui::button_config_save( 'browsercache_general' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
|
||||
<?php
|
||||
Util_Ui::postbox_header(
|
||||
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.
|
||||
__(
|
||||
'%1$sCSS%2$s & %3$sJS%4$s',
|
||||
'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(),
|
||||
),
|
||||
)
|
||||
),
|
||||
'',
|
||||
'css_js'
|
||||
);
|
||||
?>
|
||||
<p><?php esc_html_e( 'Specify browser cache policy for Cascading Style Sheets and JavaScript files.', 'w3-total-cache' ); ?></p>
|
||||
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.cssjs.last_modified' ); ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.last_modified' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.cssjs.expires' ); ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.expires' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set the expires header to encourage browser caching of files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="browsercache_cssjs_lifetime"><?php Util_Ui::e_config_label( 'browsercache.cssjs.lifetime' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="browsercache_cssjs_lifetime" type="text"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
|
||||
name="browsercache__cssjs__lifetime" value="<?php echo esc_attr( $this->_config->get_integer( 'browsercache.cssjs.lifetime' ) ); ?>" size="8" /> <?php esc_html_e( 'seconds', 'w3-total-cache' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.cssjs.cache.control' ); ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.cache.control' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="browsercache_cssjs_cache_policy"><?php Util_Ui::e_config_label( 'browsercache.cssjs.cache.policy' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<select id="browsercache_cssjs_cache_policy"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
|
||||
name="browsercache__cssjs__cache__policy">
|
||||
<?php
|
||||
$value = $this->_config->get_string( 'browsercache.cssjs.cache.policy' );
|
||||
$cssjs_expires = $this->_config->get_boolean( 'browsercache.cssjs.expires' );
|
||||
?>
|
||||
<option value="cache"<?php selected( $value, 'cache' ); ?>>cache ("public")</option>
|
||||
<option value="cache_public_maxage"<?php selected( $value, 'cache_public_maxage' ); ?><?php disabled( $is_nginx && $cssjs_expires ); ?>><?php esc_html_e( 'cache with max-age ("public, max-age=EXPIRES_SECONDS")', 'w3-total-cache' ); ?></option>
|
||||
<option value="cache_validation"<?php selected( $value, 'cache_validation' ); ?>><?php esc_html_e( 'cache with validation ("public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ); ?></option>
|
||||
<option value="cache_maxage"<?php selected( $value, 'cache_maxage' ); ?><?php disabled( $is_nginx && $cssjs_expires ); ?>><?php esc_html_e( 'cache with max-age and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ); ?></option>
|
||||
<option value="cache_noproxy"<?php selected( $value, 'cache_noproxy' ); ?>><?php esc_html_e( 'cache without proxy ("private, must-revalidate")', 'w3-total-cache' ); ?></option>
|
||||
<option value="no_cache"<?php selected( $value, 'no_cache' ); ?>><?php esc_html_e( 'don\'t cache ("max-age=0, private, no-store, no-cache, must-revalidate")', 'w3-total-cache' ); ?></option>
|
||||
</select>
|
||||
<?php if ( $is_nginx && $cssjs_expires ) : ?>
|
||||
<p class="description"><?php esc_html_e( 'The Expires header already sets the max-age.', 'w3-total-cache' ); ?></p>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.cssjs.etag' ); ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.etag' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set the ETag header to encourage browser caching of files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.cssjs.w3tc' ); ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.w3tc' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set this header to assist in identifying optimized files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.cssjs.compression' ); ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.compression' ); ?> </label>
|
||||
<p class="description"><?php esc_html_e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.cssjs.brotli', ! function_exists( 'brotli_compress' ) ); ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.brotli' ); ?> </label>
|
||||
<p class="description"><?php esc_html_e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.cssjs.replace' ); ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.replace' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Whenever settings are changed, a new query string will be generated and appended to objects allowing the new policy to be applied.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.cssjs.querystring' ); ?> <?php esc_html_e( 'Remove query strings from static resources', 'w3-total-cache' ); ?></label>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Resources with a "?" in the %1$sURL%2$s are not cached by some proxy caching servers.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Uniform Resource Locator', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.cssjs.nocookies' ); ?> <?php Util_Ui::e_config_label( 'browsercache.cssjs.nocookies' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Removes Set-Cookie header for responses.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php Util_Ui::button_config_save( 'browsercache_css_js' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
|
||||
<?php
|
||||
Util_Ui::postbox_header(
|
||||
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.
|
||||
__(
|
||||
'%1$sHTML%2$s & %3$sXML%4$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Markup Language', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Extensible Markup Language', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
'',
|
||||
'html_xml'
|
||||
);
|
||||
?>
|
||||
<p><?php esc_html_e( 'Specify browser cache policy for posts, pages, feeds and text-based files.', 'w3-total-cache' ); ?></p>
|
||||
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.html.last_modified' ); ?> <?php Util_Ui::e_config_label( 'browsercache.html.last_modified' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.html.expires' ); ?> <?php Util_Ui::e_config_label( 'browsercache.html.expires' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set the expires header to encourage browser caching of files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 250px;">
|
||||
<label for="browsercache_html_lifetime"><?php Util_Ui::e_config_label( 'browsercache.html.lifetime' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="browsercache_html_lifetime" type="text" name="browsercache__html__lifetime"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
|
||||
value="<?php echo esc_attr( $this->_config->get_integer( 'browsercache.html.lifetime' ) ); ?>"
|
||||
size="8" /> <?php esc_html_e( 'seconds', 'w3-total-cache' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.html.cache.control' ); ?> <?php Util_Ui::e_config_label( 'browsercache.html.cache.control' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="browsercache_html_cache_policy"><?php Util_Ui::e_config_label( 'browsercache.html.cache.policy' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<select id="browsercache_html_cache_policy" name="browsercache__html__cache__policy"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>>
|
||||
<?php
|
||||
$value = $this->_config->get_string( 'browsercache.html.cache.policy' );
|
||||
$html_expires = $this->_config->get_boolean( 'browsercache.html.expires' );
|
||||
?>
|
||||
<option value="cache"<?php selected( $value, 'cache' ); ?>>cache ("public")</option>
|
||||
<option value="cache_public_maxage"<?php selected( $value, 'cache_public_maxage' ); ?><?php disabled( $is_nginx && $html_expires ); ?>><?php esc_html_e( 'cache with max-age ("public, max-age=EXPIRES_SECONDS")', 'w3-total-cache' ); ?></option>
|
||||
<option value="cache_validation"<?php selected( $value, 'cache_validation' ); ?>><?php esc_html_e( 'cache with validation ("public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ); ?></option>
|
||||
<option value="cache_maxage"<?php selected( $value, 'cache_maxage' ); ?><?php disabled( $is_nginx && $html_expires ); ?>><?php esc_html_e( 'cache with max-age and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ); ?></option>
|
||||
<option value="cache_noproxy"<?php selected( $value, 'cache_noproxy' ); ?>><?php esc_html_e( 'cache without proxy ("private, must-revalidate")', 'w3-total-cache' ); ?></option>
|
||||
<option value="no_cache"<?php selected( $value, 'no_cache' ); ?>><?php esc_html_e( 'no-cache ("max-age=0, private, no-store, no-cache, must-revalidate")', 'w3-total-cache' ); ?></option>
|
||||
</select>
|
||||
<?php if ( $is_nginx && $html_expires ) : ?>
|
||||
<p class="description"><?php esc_html_e( 'The Expires header already sets the max-age.', 'w3-total-cache' ); ?></p>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.html.etag' ); ?> <?php Util_Ui::e_config_label( 'browsercache.html.etag' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set the ETag header to encourage browser caching of files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.html.w3tc' ); ?> <?php Util_Ui::e_config_label( 'browsercache.html.w3tc' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set this header to assist in identifying optimized files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.html.compression' ); ?> <?php Util_Ui::e_config_label( 'browsercache.html.compression' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.html.brotli', ! function_exists( 'brotli_compress' ) ); ?> <?php Util_Ui::e_config_label( 'browsercache.html.brotli' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php Util_Ui::button_config_save( 'browsercache_html_xml' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'Media & Other Files', 'w3-total-cache' ), '', 'media' ); ?>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.other.last_modified' ); ?> <?php Util_Ui::e_config_label( 'browsercache.other.last_modified' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set the Last-Modified header to enable 304 Not Modified response.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.other.expires' ); ?> <?php Util_Ui::e_config_label( 'browsercache.other.expires' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set the expires header to encourage browser caching of files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 250px;">
|
||||
<label for="browsercache_other_lifetime"><?php Util_Ui::e_config_label( 'browsercache.other.lifetime' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="browsercache_other_lifetime" type="text"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
|
||||
name="browsercache__other__lifetime" value="<?php echo esc_attr( $this->_config->get_integer( 'browsercache.other.lifetime' ) ); ?>" size="8" /> <?php esc_html_e( 'seconds', 'w3-total-cache' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.other.cache.control' ); ?> <?php Util_Ui::e_config_label( 'browsercache.other.cache.control' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set pragma and cache-control headers to encourage browser caching of files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="browsercache_other_cache_policy"><?php Util_Ui::e_config_label( 'browsercache.other.cache.policy' ); ?></label>
|
||||
</th>
|
||||
<td>
|
||||
<select id="browsercache_other_cache_policy"
|
||||
<?php Util_Ui::sealing_disabled( 'browsercache.' ); ?>
|
||||
name="browsercache__other__cache__policy">
|
||||
<?php
|
||||
$value = $this->_config->get_string( 'browsercache.other.cache.policy' );
|
||||
$other_expires = $this->_config->get_string( 'browsercache.other.expires' );
|
||||
?>
|
||||
<option value="cache"<?php selected( $value, 'cache' ); ?>><?php esc_html_e( 'cache ("public")' ); ?></option>
|
||||
<option value="cache_public_maxage"<?php selected( $value, 'cache_public_maxage' ); ?><?php disabled( $is_nginx && $other_expires ); ?>><?php esc_html_e( 'cache with max-age ("public, max-age=EXPIRES_SECONDS")', 'w3-total-cache' ); ?></option>
|
||||
<option value="cache_validation"<?php selected( $value, 'cache_validation' ); ?>><?php esc_html_e( 'cache with validation ("public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ); ?></option>
|
||||
<option value="cache_maxage"<?php selected( $value, 'cache_maxage' ); ?><?php disabled( $is_nginx && $other_expires ); ?>><?php esc_html_e( 'cache with max-age and validation ("max-age=EXPIRES_SECONDS, public, must-revalidate, proxy-revalidate")', 'w3-total-cache' ); ?></option>
|
||||
<option value="cache_noproxy"<?php selected( $value, 'cache_noproxy' ); ?>><?php esc_html_e( 'cache without proxy ("private, must-revalidate")', 'w3-total-cache' ); ?></option>
|
||||
<option value="no_cache"<?php selected( $value, 'no_cache' ); ?>><?php esc_html_e( 'no-cache ("max-age=0, private, no-store, no-cache, must-revalidate")', 'w3-total-cache' ); ?></option>
|
||||
</select>
|
||||
<?php if ( $is_nginx && $other_expires ) : ?>
|
||||
<p class="description"><?php esc_html_e( 'The Expires header already sets the max-age.', 'w3-total-cache' ); ?></p>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.other.etag' ); ?> <?php Util_Ui::e_config_label( 'browsercache.other.etag' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set the ETag header to encourage browser caching of files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.other.w3tc' ); ?> <?php Util_Ui::e_config_label( 'browsercache.other.w3tc' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Set this header to assist in identifying optimized files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.other.compression' ); ?> <?php Util_Ui::e_config_label( 'browsercache.other.compression' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.other.brotli', ! function_exists( 'brotli_compress' ) ); ?> <?php Util_Ui::e_config_label( 'browsercache.other.brotli' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Reduce the download time for text-based files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.other.replace' ); ?> <?php Util_Ui::e_config_label( 'browsercache.other.replace' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Whenever settings are changed, a new query string will be generated and appended to objects allowing the new policy to be applied.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.other.querystring' ); ?> <?php esc_html_e( 'Remove query strings from static resources', 'w3-total-cache' ); ?></label>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Resources with a "?" in the %1$sURL%2$s are not cached by some proxy caching servers.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Uniform Resource Locator', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'browsercache.other.nocookies' ); ?> <?php Util_Ui::e_config_label( 'browsercache.other.nocookies' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Removes Set-Cookie header for responses.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php Util_Ui::button_config_save( 'browsercache_media' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
|
||||
<?php require W3TC_DIR . '/BrowserCache_Page_View_SectionSecurity.php'; ?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>
|
902
wp-content/plugins/w3-total-cache/inc/options/cdn.php
Normal file
902
wp-content/plugins/w3-total-cache/inc/options/cdn.php
Normal file
@ -0,0 +1,902 @@
|
||||
<?php
|
||||
/**
|
||||
* File: cdn.php
|
||||
*
|
||||
* @package W3TC
|
||||
*/
|
||||
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
// when separate config is used - each blog has own uploads
|
||||
// so nothing to upload from network admin.
|
||||
$upload_blogfiles_enabled = $cdn_mirror || ! is_network_admin() || ! Util_Environment::is_using_master_config();
|
||||
|
||||
?>
|
||||
<?php require W3TC_INC_DIR . '/options/common/header.php'; ?>
|
||||
<p id="w3tc-options-menu">
|
||||
<?php esc_html_e( 'Jump to:', 'w3-total-cache' ); ?>
|
||||
<a href="#toplevel_page_w3tc_general"><?php esc_html_e( 'Main Menu', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#general"><?php esc_html_e( 'General', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#configuration"><?php esc_html_e( 'Configuration', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#advanced"><?php esc_html_e( 'Advanced', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#notes"><?php esc_html_e( 'Note(s)', 'w3-total-cache' ); ?></a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 HTML strong tag containing CDN Engine value, 2 HTML span tag containing CDN Engine enabled/disabled value.
|
||||
__(
|
||||
'Content Delivery Network support via %1$s is currently %2$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<strong>' . Cache::engine_name( $this->_config->get_string( 'cdn.engine' ) ) . '</strong>',
|
||||
'<span class="w3tc-' . ( $cdn_enabled ? 'enabled">' . esc_html__( 'enabled', 'w3-total-cache' ) : 'disabled">' . esc_html__( 'disabled', 'w3-total-cache' ) ) . '</span>'
|
||||
),
|
||||
array(
|
||||
'strong' => array(),
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<form id="w3tc_cdn" action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
|
||||
<p>
|
||||
<?php if ( $cdn_mirror ) : ?>
|
||||
Maximize <acronym title="Content Delivery Network">CDN</acronym> usage by <input id="cdn_rename_domain" class="button {nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="modify attachment URLs" /> or
|
||||
<input id="cdn_import_library" class="button {nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="importing attachments into the Media Library" />.
|
||||
<?php if ( Cdn_Util::can_purge( $cdn_engine ) ) : ?>
|
||||
<input id="cdn_purge" class="button {nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="Purge" /> objects from the <acronym title="Content Delivery Network">CDN</acronym> using this tool
|
||||
<?php endif; ?>
|
||||
<?php if ( $cdn_mirror_purge_all ) : ?>
|
||||
or <input class="button" type="submit" name="w3tc_flush_cdn" value="purge CDN completely" />
|
||||
<?php endif; ?>
|
||||
<?php if ( Cdn_Util::can_purge( $cdn_engine ) ) : ?>
|
||||
.
|
||||
<?php endif; ?>
|
||||
<?php else : ?>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Prepare the %1$sCDN%2$s by:',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<input id="cdn_import_library" class="button {nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'importing attachments into the Media Library', 'w3-total-cache' ); ?>" />.
|
||||
Check <input id="cdn_queue" class="button {nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'unsuccessful file transfers', 'w3-total-cache' ); ?>" /> <?php esc_html_e( 'if some objects appear to be missing.', 'w3-total-cache' ); ?>
|
||||
<?php if ( Cdn_Util::can_purge( $cdn_engine ) ) : ?>
|
||||
<input id="cdn_purge" class="button {nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="<?php esc_attr_e( 'Purge', 'w3-total-cache' ); ?>" />
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
' objects from the %1$sCDN%2$s if needed.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php endif; ?>
|
||||
<input id="cdn_rename_domain" class="button {nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" type="button" value="Modify attachment URLs" /> <?php esc_html_e( 'if the domain name of your site has ever changed.', 'w3-total-cache' ); ?>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
Util_Ui::nonce_field( 'w3tc' ),
|
||||
array(
|
||||
'input' => array(
|
||||
'type' => array(),
|
||||
'name' => array(),
|
||||
'value' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<input type="submit" name="w3tc_flush_browser_cache" value="<?php esc_attr_e( 'Update media query string', 'w3-total-cache' ); ?>" <?php disabled( ! ( $browsercache_enabled && $browsercache_update_media_qs ) ); ?> class="button" /> <?php esc_html_e( 'to make existing file modifications visible to visitors with a primed cache.', 'w3-total-cache' ); ?>
|
||||
</p>
|
||||
</form>
|
||||
<form id="cdn_form" action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
|
||||
<div class="metabox-holder">
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'General', 'w3-total-cache' ), '', 'general' ); ?>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th <?php echo $cdn_mirror ? 'colspan="2"' : 'style="width: 300px;"'; ?>>
|
||||
<?php
|
||||
$force_value = ( $upload_blogfiles_enabled ? null : false );
|
||||
$this->checkbox(
|
||||
'cdn.uploads.enable',
|
||||
! $upload_blogfiles_enabled,
|
||||
'',
|
||||
true,
|
||||
$force_value
|
||||
);
|
||||
?>
|
||||
<?php Util_Ui::e_config_label( 'cdn.uploads.enable' ); ?></label>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'If checked, all attachments will be hosted with the %1$sCDN%2$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
if ( ! $upload_blogfiles_enabled ) :
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 HTML line break.
|
||||
__(
|
||||
'%1$sTo enable that, switch off "Use single network configuration file for all sites" option at General settings page and use specific settings for each blog.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<br />'
|
||||
),
|
||||
array(
|
||||
'br' => array(),
|
||||
)
|
||||
);
|
||||
endif;
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
<?php if ( ! $cdn_mirror ) : ?>
|
||||
<td>
|
||||
<input id="cdn_export_library" class="button {nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}"
|
||||
type="button" value="<?php esc_attr_e( 'Upload attachments', 'w3-total-cache' ); ?>"
|
||||
<?php disabled( ! $upload_blogfiles_enabled ); ?> />
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<th <?php echo $cdn_mirror ? 'colspan="2"' : ''; ?>>
|
||||
<?php $this->checkbox( 'cdn.includes.enable' ); ?> <?php Util_Ui::e_config_label( 'cdn.includes.enable' ); ?></label>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'If checked, WordPress static core file types specified in the "wp-includes file types to upload" field below will be hosted with the %1$sCDN%2$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
<?php if ( ! $cdn_mirror ) : ?>
|
||||
<td>
|
||||
<input class="button cdn_export {type: 'includes', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}"
|
||||
type="button" value="<?php esc_attr_e( 'Upload includes files', 'w3-total-cache' ); ?>" />
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<th <?php echo $cdn_mirror ? 'colspan="2"' : ''; ?>>
|
||||
<?php $this->checkbox( 'cdn.theme.enable' ); ?> <?php Util_Ui::e_config_label( 'cdn.theme.enable' ); ?></label>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'If checked, all theme file types specified in the "theme file types to upload" field below will be hosted with the %1$sCDN%2$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
<?php if ( ! $cdn_mirror ) : ?>
|
||||
<td>
|
||||
<input class="button cdn_export {type: 'theme', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}"
|
||||
type="button" value="<?php esc_attr_e( 'Upload theme files', 'w3-total-cache' ); ?>"
|
||||
/>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<th <?php echo $cdn_mirror ? 'colspan="2"' : ''; ?>>
|
||||
<?php $this->checkbox( 'cdn.minify.enable', ! $minify_enabled ); ?> <?php Util_Ui::e_config_label( 'cdn.minify.enable' ); ?></label>
|
||||
<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.
|
||||
__(
|
||||
'If checked, minified %1$sCSS%2$s and %3$sJS%4$s files will be hosted with the %5$sCDN%6$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Cascading Style Sheet', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'JavaScript', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
<?php if ( ! $cdn_mirror ) : ?>
|
||||
<td>
|
||||
<input class="button cdn_export {type: 'minify', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}"
|
||||
type="button" value="<?php esc_attr_e( 'Upload minify files', 'w3-total-cache' ); ?>"
|
||||
<?php disabled( ! $minify_enabled ); ?> />
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<th <?php echo $cdn_mirror ? 'colspan="2"' : ''; ?>>
|
||||
<?php $this->checkbox( 'cdn.custom.enable' ); ?> <?php Util_Ui::e_config_label( 'cdn.custom.enable' ); ?></label>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'If checked, any file names or paths specified in the "custom file list" field below will be hosted with the %1$sCDN%2$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
<?php if ( ! $cdn_mirror ) : ?>
|
||||
<td>
|
||||
<input class="button cdn_export {type: 'custom', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}"
|
||||
type="button" value="<?php esc_attr_e( 'Upload custom files', 'w3-total-cache' ); ?>"
|
||||
<?php disabled( ! $upload_blogfiles_enabled ); ?> />
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<?php if ( ! $cdn_mirror ) : ?>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'cdn.force.rewrite' ); ?> <?php Util_Ui::e_config_label( 'cdn.force.rewrite' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'If modified files are not always detected and replaced, use this option to over-write them.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $cdn_supports_header ) : ?>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'cdn.canonical_header' ); ?> <?php Util_Ui::e_config_label( 'cdn.canonical_header' ); ?></label>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Adds canonical %1$sHTTP%2$s header to assets files.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Transfer Protocol', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
|
||||
<?php Util_Ui::button_config_save( 'cdn_general' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'Configuration: Objects', 'w3-total-cache' ), '', 'configuration' ); ?>
|
||||
<table class="form-table">
|
||||
<?php
|
||||
if ( 'google_drive' === $cdn_engine ||
|
||||
'highwinds' === $cdn_engine ||
|
||||
'limelight' === $cdn_engine ||
|
||||
'rackspace_cdn' === $cdn_engine ||
|
||||
'rscf' === $cdn_engine ||
|
||||
'stackpath' === $cdn_engine ||
|
||||
'stackpath2' === $cdn_engine ) {
|
||||
do_action( 'w3tc_settings_cdn_boxarea_configuration' );
|
||||
} elseif ( Cdn_Util::is_engine( $cdn_engine ) ) {
|
||||
include W3TC_INC_DIR . '/options/cdn/' . $cdn_engine . '.php';
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
<?php Util_Ui::button_config_save( 'cdn_configuration' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
|
||||
<?php do_action( 'w3tc_settings_box_cdnfsd' ); ?>
|
||||
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'Advanced', 'w3-total-cache' ), '', 'advanced' ); ?>
|
||||
<table class="form-table">
|
||||
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php
|
||||
$this->checkbox( 'cdn.flush_manually' );
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Only purge %1$sCDN%2$s manually',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Purge %1$sCDN%2$s only if explicit purge button is clicked.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<div class="hidden" id="cdn-flushmanually-warning">
|
||||
<div class="notice notice-warning inline"><p>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1: HTML break, 2: HTML anchor open tag, 3: HTML anchor close tag.
|
||||
__(
|
||||
'Please see %2$sAmazon\'s CloudFront documentation -- Paying for file invalidation%3$s:%1$sThe first 1,000 invalidation paths that you submit per month are free; you pay for each invalidation path over 1,000 in a month.%1$sYou can disable automatic purging by enabling "Only purge CDN manually".',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<br />',
|
||||
'<a target="_blank" href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#PayingForInvalidation">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'target' => array(),
|
||||
'href' => array(),
|
||||
),
|
||||
'br' => array(),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p></div>
|
||||
</div>
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'cdn.reject.ssl' ); ?> <?php Util_Ui::e_config_label( 'cdn.reject.ssl' ); ?></label>
|
||||
<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.
|
||||
__(
|
||||
'When %1$sSSL%2$s pages are returned no %3$sCDN%4$s %5$sURL%6$ss will appear in HTML pages.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Secure Sockets Layer', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acornym>',
|
||||
'<acronym title="' . esc_attr__( 'Uniform Resource Indicator', 'w3-total-cache' ) . '">',
|
||||
'</acornym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'cdn.admin.media_library' ); ?> <?php Util_Ui::e_config_label( 'cdn.admin.media_library' ); ?></label>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'All Media Library content will use %1$sCDN%2$s links on administration pages.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'cdn.cors_header' ); ?> Add <acronym title="Access-Control-Allow-Origin">CORS</acronym> header</label>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Add %1$sCORS%2$s headers to allow cross-domain assets usage.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Access-Control-Allow-Origin', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'cdn.reject.logged_roles' ); ?> <?php Util_Ui::e_config_label( 'cdn.reject.logged_roles' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Select user roles that will use the origin server exclusively:', 'w3-total-cache' ); ?></p>
|
||||
|
||||
<div id="cdn_reject_roles" class="w3tc_reject_roles">
|
||||
<?php $saved_roles = $this->_config->get_array( 'cdn.reject.roles' ); ?>
|
||||
<input type="hidden" name="cdn__reject__roles" value="" /><br />
|
||||
<?php foreach ( get_editable_roles() as $role_name => $role_data ) : ?>
|
||||
<input type="checkbox" name="cdn__reject__roles[]" value="<?php echo esc_attr( $role_name ); ?>" <?php checked( in_array( $role_name, $saved_roles, true ) ); ?> id="role_<?php echo esc_attr( $role_name ); ?>" />
|
||||
<label for="role_<?php echo esc_attr( $role_name ); ?>"><?php echo esc_html( $role_data['name'] ); ?></label>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
<?php if ( ! $cdn_mirror ) : ?>
|
||||
<tr>
|
||||
<th><label for="cdn_reject_uri"><?php Util_Ui::e_config_label( 'cdn.reject.uri' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="cdn_reject_uri" name="cdn__reject__uri"
|
||||
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?>
|
||||
cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.reject.uri' ) ) ); ?></textarea>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML a tag to W3TC FAQ admin page, 2 opening HTML acronym tag,
|
||||
// translators: 3 closing HTML acronym tag, 4 closing HTML a tag.
|
||||
__(
|
||||
'Always ignore the specified pages / directories. Supports regular expression (See %1$s%2$sFAQ%3$s%4$s)'
|
||||
),
|
||||
'<a href="' . esc_url( network_admin_url( 'admin.php?page=w3tc_faq' ) ) . '">',
|
||||
'<acronym title="' . esc_attr__( 'Frequently Asked Questions', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'minify.upload', $this->_config->get_boolean( 'minify.auto' ) ); ?> <?php esc_html_e( 'Automatically upload minify files', 'w3-total-cache' ); ?></label>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'If %1$sCDN%2$s is enabled (and not using the origin pull method), your minified files will be automatically uploaded.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php
|
||||
$disabled = false;
|
||||
$force_value = null;
|
||||
|
||||
if ( 'google_drive' === $this->_config->get_string( 'cdn.engine' ) ) {
|
||||
$disabled = true;
|
||||
$force_value = false;
|
||||
}
|
||||
|
||||
$this->checkbox(
|
||||
'cdn.autoupload.enabled',
|
||||
$disabled,
|
||||
'',
|
||||
true,
|
||||
$force_value
|
||||
);
|
||||
?>
|
||||
<?php Util_Ui::e_config_label( 'cdn.autoupload.enabled' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Automatically attempt to find and upload changed files.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="cdn_autoupload_interval"><?php Util_Ui::e_config_label( 'cdn.autoupload.interval' ); ?></label></th>
|
||||
<td>
|
||||
<input id="cdn_autoupload_interval" type="text"
|
||||
name="cdn__autoupload__interval"
|
||||
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?>
|
||||
value="<?php echo esc_attr( $this->_config->get_integer( 'cdn.autoupload.interval' ) ); ?>" size="8" /> <?php esc_html_e( 'seconds', 'w3-total-cache' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Specify the interval between upload of changed files.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="cdn_limit_interval"><?php Util_Ui::e_config_label( 'cdn.queue.interval' ); ?></label></th>
|
||||
<td>
|
||||
<input id="cdn_limit_interval" type="text"
|
||||
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?>
|
||||
name="cdn__queue__interval" value="<?php echo esc_attr( $this->_config->get_integer( 'cdn.queue.interval' ) ); ?>" size="10" /> <?php esc_html_e( 'seconds', 'w3-total-cache' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'The number of seconds to wait before upload attempt.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="cdn_limit_queue"><?php Util_Ui::e_config_label( 'cdn.queue.limit' ); ?></label></th>
|
||||
<td>
|
||||
<input id="cdn_limit_queue" type="text"
|
||||
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?>
|
||||
name="cdn__queue__limit" value="<?php echo esc_attr( $this->_config->get_integer( 'cdn.queue.limit' ) ); ?>" size="10" />
|
||||
<p class="description"><?php esc_html_e( 'Number of files processed per upload attempt.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
<tr>
|
||||
<th style="width: 300px;"><label for="cdn_includes_files"><?php Util_Ui::e_config_label( 'cdn.includes.files' ); ?></label></th>
|
||||
<td>
|
||||
<input id="cdn_includes_files" type="text"
|
||||
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?>
|
||||
name="cdn__includes__files" value="<?php echo esc_attr( $this->_config->get_string( 'cdn.includes.files' ) ); ?>" size="100" />
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Specify the file types within the WordPress core to host with the %1$sCDN%2$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="cdn_theme_files"><?php Util_Ui::e_config_label( 'cdn.theme.files' ); ?></label></th>
|
||||
<td>
|
||||
<input id="cdn_theme_files" type="text" name="cdn__theme__files"
|
||||
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?>
|
||||
value="<?php echo esc_attr( $this->_config->get_string( 'cdn.theme.files' ) ); ?>" size="100" />
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Specify the file types in the active theme to host with the %1$sCDN%2$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="cdn_import_files"><?php Util_Ui::e_config_label( 'cdn.import.files' ); ?></label></th>
|
||||
<td>
|
||||
<input id="cdn_import_files" type="text" name="cdn__import__files"
|
||||
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?>
|
||||
value="<?php echo esc_attr( $this->_config->get_string( 'cdn.import.files' ) ); ?>" size="100" />
|
||||
<p class="description"><?php esc_html_e( 'Automatically import files hosted with 3rd parties of these types (if used in your posts / pages) to your media library.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="cdn_custom_files"><?php Util_Ui::e_config_label( 'cdn.custom.files' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="cdn_custom_files" name="cdn__custom__files"
|
||||
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> cols="40"
|
||||
rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.custom.files' ) ) ); ?></textarea>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Specify any files outside of theme or other common directories to host with the %1$sCDN%2$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php if ( Util_Environment::is_wpmu() ) : ?>
|
||||
<br />
|
||||
<?php esc_html_e( 'To upload files in blogs.dir for current blog write wp-content/<currentblog>/.', 'w3-total-cache' ); ?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="cdn_reject_ua"><?php Util_Ui::e_config_label( 'cdn.reject.ua' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="cdn_reject_ua" name="cdn__reject__ua" cols="40"
|
||||
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.reject.ua' ) ) ); ?></textarea>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Specify user agents that should not access files hosted with the %1$sCDN%2$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="cdn_reject_files"><?php Util_Ui::e_config_label( 'cdn.reject.files' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="cdn_reject_files" name="cdn__reject__files"
|
||||
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'cdn.reject.files' ) ) ); ?></textarea>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Specify the path of files that should not use the %1$sCDN%2$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<input type="hidden" name="set_cookie_domain_old" value="<?php echo (int) $set_cookie_domain; ?>" />
|
||||
<input type="hidden" name="set_cookie_domain_new" value="0" />
|
||||
<label><input type="checkbox" name="set_cookie_domain_new"
|
||||
<?php Util_Ui::sealing_disabled( 'cdn.' ); ?> value="1"<?php checked( $set_cookie_domain, true ); ?> />
|
||||
<?php
|
||||
echo esc_html(
|
||||
sprintf(
|
||||
// translators: 1 Cookie Domain.
|
||||
__(
|
||||
'Set cookie domain to "%1$s"',
|
||||
'w3-total-cache'
|
||||
),
|
||||
$cookie_domain
|
||||
)
|
||||
);
|
||||
?>
|
||||
</label>
|
||||
<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.
|
||||
__(
|
||||
'If using subdomain for %1$sCDN%2$s functionality, this setting helps prevent new users from sending cookies in requests to the %3$sCDN%4$s subdomain.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php Util_Ui::button_config_save( 'cdn_advanced' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'Note(s):', 'w3-total-cache' ), '', 'notes' ); ?>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<ul>
|
||||
<li><?php esc_html_e( 'You can use placeholders {wp_content_dir}, {plugins_dir}, {uploads_dir} instead of writing folder paths (wp-content, wp-content/plugins, wp-content/uploads).', 'w3-total-cache' ); ?></li>
|
||||
<li>
|
||||
<?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 a tag to W3TC BrowserCache admin page, 6 closing HTML a tag.
|
||||
__(
|
||||
'If using Amazon Web Services or Self-Hosted %1$sCDN%2$s types, enable %3$sHTTP%4$s compression in the "Media & Other Files" section on %5$sBrowser Cache%6$s Settings tab.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Transfer Protocol', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<a href="' . esc_url( admin_url( 'admin.php?page=w3tc_browsercache' ) ) . '">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
</div>
|
||||
</form>
|
||||
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>
|
138
wp-content/plugins/w3-total-cache/inc/options/cdn/akamai.php
Normal file
138
wp-content/plugins/w3-total-cache/inc/options/cdn/akamai.php
Normal 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>
|
112
wp-content/plugins/w3-total-cache/inc/options/cdn/att.php
Normal file
112
wp-content/plugins/w3-total-cache/inc/options/cdn/att.php
Normal 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>
|
122
wp-content/plugins/w3-total-cache/inc/options/cdn/azure.php
Normal file
122
wp-content/plugins/w3-total-cache/inc/options/cdn/azure.php
Normal 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 '<account name>.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>
|
187
wp-content/plugins/w3-total-cache/inc/options/cdn/cf.php
Normal file
187
wp-content/plugins/w3-total-cache/inc/options/cdn/cf.php
Normal 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 & CloudFront distribution', 'w3-total-cache' ); ?>" /> <span id="cdn_test_status" class="w3tc-status w3tc-process"></span>
|
||||
</th>
|
||||
</tr>
|
169
wp-content/plugins/w3-total-cache/inc/options/cdn/cf2.php
Normal file
169
wp-content/plugins/w3-total-cache/inc/options/cdn/cf2.php
Normal 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>
|
@ -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>';
|
||||
}
|
@ -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.' ); ?> />
|
119
wp-content/plugins/w3-total-cache/inc/options/cdn/cotendo.php
Normal file
119
wp-content/plugins/w3-total-cache/inc/options/cdn/cotendo.php
Normal 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>
|
112
wp-content/plugins/w3-total-cache/inc/options/cdn/edgecast.php
Normal file
112
wp-content/plugins/w3-total-cache/inc/options/cdn/edgecast.php
Normal 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>
|
348
wp-content/plugins/w3-total-cache/inc/options/cdn/ftp.php
Normal file
348
wp-content/plugins/w3-total-cache/inc/options/cdn/ftp.php
Normal 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>
|
98
wp-content/plugins/w3-total-cache/inc/options/cdn/mirror.php
Normal file
98
wp-content/plugins/w3-total-cache/inc/options/cdn/mirror.php
Normal 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>
|
152
wp-content/plugins/w3-total-cache/inc/options/cdn/rscf.php
Normal file
152
wp-content/plugins/w3-total-cache/inc/options/cdn/rscf.php
Normal 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>
|
196
wp-content/plugins/w3-total-cache/inc/options/cdn/s3.php
Normal file
196
wp-content/plugins/w3-total-cache/inc/options/cdn/s3.php
Normal 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 '<bucket>.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>
|
@ -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>
|
@ -0,0 +1 @@
|
||||
</div>
|
400
wp-content/plugins/w3-total-cache/inc/options/common/header.php
Normal file
400
wp-content/plugins/w3-total-cache/inc/options/common/header.php
Normal file
@ -0,0 +1,400 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
$config = Dispatcher::config();
|
||||
$state = Dispatcher::config_state();
|
||||
$page = Util_Admin::get_current_page();
|
||||
$licensing_visible = (
|
||||
( ! Util_Environment::is_wpmu() || is_network_admin() ) &&
|
||||
! ini_get( 'w3tc.license_key' ) &&
|
||||
'host_valid' !== $state->get_string( 'license.status' )
|
||||
);
|
||||
|
||||
do_action( 'w3tc-dashboard-head' );
|
||||
?>
|
||||
<div class="wrap" id="w3tc">
|
||||
<h2 class="logo">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML span tag, 2 opening HTML sup tag, 3 closing HTML sup tag, 4 closing HTML span tag.
|
||||
__(
|
||||
'W3 Total Cache %1$sby W3 EDGE %2$s®%3$s%4$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<span>',
|
||||
'<sup>',
|
||||
'</sup>',
|
||||
'</span>'
|
||||
),
|
||||
array(
|
||||
'span' => array(),
|
||||
'sup' => array(),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</h2>
|
||||
<?php if ( ! Util_Environment::is_w3tc_pro( $config ) ) : ?>
|
||||
<?php require W3TC_INC_OPTIONS_DIR . '/edd/buy.php'; ?>
|
||||
<?php endif ?>
|
||||
<?php
|
||||
switch ( $page ) {
|
||||
case 'w3tc_general':
|
||||
if ( ! empty( $_REQUEST['view'] ) ) {
|
||||
break;
|
||||
}
|
||||
$anchors = array(
|
||||
array(
|
||||
'id' => 'general',
|
||||
'text' => esc_html__( 'General', 'w3-total-cache' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'page_cache',
|
||||
'text' => esc_html__( 'Page Cache', 'w3-total-cache' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'minify',
|
||||
'text' => esc_html__( 'Minify', 'w3-total-cache' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'system_opcache',
|
||||
'text' => esc_html__( 'Opcode Cache', 'w3-total-cache' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'database_cache',
|
||||
'text' => esc_html__( 'Database Cache', 'w3-total-cache' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'object_cache',
|
||||
'text' => esc_html__( 'Object Cache', 'w3-total-cache' ),
|
||||
),
|
||||
);
|
||||
|
||||
if ( Util_Environment::is_w3tc_pro( $config ) ) {
|
||||
$anchors[] = array(
|
||||
'id' => 'fragmentcache',
|
||||
'text' => esc_html__( 'Fragment Cache', 'w3-total-cache' ),
|
||||
);
|
||||
}
|
||||
|
||||
$anchors = array_merge(
|
||||
$anchors,
|
||||
array(
|
||||
array(
|
||||
'id' => 'browser_cache',
|
||||
'text' => esc_html__( 'Browser Cache', 'w3-total-cache' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'cdn',
|
||||
'text' => wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML abbr tag, 2 closing HTML abbr tag.
|
||||
__(
|
||||
'%1$sCDN%2$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<abbr title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</abbr>'
|
||||
),
|
||||
array(
|
||||
'abbr' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
array(
|
||||
'id' => 'reverse_proxy',
|
||||
'text' => esc_html__( 'Reverse Proxy', 'w3-total-cache' ),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
if ( Util_Environment::is_w3tc_pro() ) {
|
||||
$anchors[] = array(
|
||||
'id' => 'amazon_sns',
|
||||
'text' => esc_html__( 'Message Bus', 'w3-total-cache' ),
|
||||
);
|
||||
}
|
||||
|
||||
$anchors[] = array(
|
||||
'id' => 'monitoring',
|
||||
'text' => esc_html__( 'Monitoring', 'w3-total-cache' ),
|
||||
);
|
||||
|
||||
if ( $licensing_visible ) {
|
||||
array(
|
||||
'id' => 'licensing',
|
||||
'text' => esc_html__( 'Licensing', 'w3-total-cache' ),
|
||||
);
|
||||
}
|
||||
|
||||
$link_attrs = array_merge(
|
||||
$anchors,
|
||||
$custom_areas,
|
||||
array(
|
||||
array(
|
||||
'id' => 'google_page_speed',
|
||||
'text' => __( 'Google PageSpeed', 'w3-total-cache' )
|
||||
),
|
||||
array(
|
||||
'id' => 'miscellaneous',
|
||||
'text' => esc_html__( 'Miscellaneous', 'w3-total-cache' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'debug',
|
||||
'text' => esc_html__( 'Debug', 'w3-total-cache' ),
|
||||
),
|
||||
array(
|
||||
'id' => 'settings',
|
||||
'text' => esc_html__( 'Import / Export Settings', 'w3-total-cache' ),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$links = array();
|
||||
foreach ( $link_attrs as $link ) {
|
||||
$links[] = "<a href=\"#{$link['id']}\">{$link['text']}</a>";
|
||||
}
|
||||
|
||||
$links[] = '<a href="#" class="button-self-test">Compatibility Test</a>';
|
||||
|
||||
?>
|
||||
<p id="w3tc-options-menu">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
implode( ' | ', $links ),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
break;
|
||||
|
||||
case 'w3tc_pgcache':
|
||||
?>
|
||||
<p id="w3tc-options-menu">
|
||||
<?php esc_html_e( 'Jump to:', 'w3-total-cache' ); ?>
|
||||
<a href="#toplevel_page_w3tc_general"><?php esc_html_e( 'Main Menu', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#general"><?php esc_html_e( 'General', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#mirrors"><?php esc_html_e( 'Mirrors', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#advanced"><?php esc_html_e( 'Advanced', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#cache_preload"><?php esc_html_e( 'Cache Preload', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#purge_policy"><?php esc_html_e( 'Purge Policy', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#notes"><?php esc_html_e( 'Note(s)', 'w3-total-cache' ); ?></a>
|
||||
</p>
|
||||
<?php
|
||||
break;
|
||||
|
||||
case 'w3tc_minify':
|
||||
?>
|
||||
<p id="w3tc-options-menu">
|
||||
<?php esc_html_e( 'Jump to: ', 'w3-total-cache' ); ?>
|
||||
<a href="#toplevel_page_w3tc_general"><?php esc_html_e( 'Main Menu', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#general"><?php esc_html_e( 'General', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#html_xml">
|
||||
<?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.
|
||||
__(
|
||||
'%1$sHTML%2$s & %3$sXML%4$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Markup Language', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'eXtensible Markup Language', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</a> |
|
||||
<a href="#js">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'%1$sJS%2$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'JavaScript', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</a> |
|
||||
<a href="#css">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'%1$sCSS%2$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Cascading Style Sheet', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</a> |
|
||||
<a href="#advanced"><?php esc_html_e( 'Advanced', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#notes"><?php esc_html_e( 'Note(s)', 'w3-total-cache' ); ?></a>
|
||||
</p>
|
||||
<?php
|
||||
break;
|
||||
|
||||
case 'w3tc_dbcache':
|
||||
?>
|
||||
<p id="w3tc-options-menu">
|
||||
<?php esc_html_e( 'Jump to: ', 'w3-total-cache' ); ?>
|
||||
<a href="#toplevel_page_w3tc_general"><?php esc_html_e( 'Main Menu', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#general"><?php esc_html_e( 'General', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#advanced"><?php esc_html_e( 'Advanced', 'w3-total-cache' ); ?></a>
|
||||
</p>
|
||||
<?php
|
||||
break;
|
||||
|
||||
case 'w3tc_objectcache':
|
||||
?>
|
||||
<p id="w3tc-options-menu">
|
||||
<?php esc_html_e( 'Jump to: ', 'w3-total-cache' ); ?>
|
||||
<a href="#toplevel_page_w3tc_general"><?php esc_html_e( 'Main Menu', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#advanced"><?php esc_html_e( 'Advanced', 'w3-total-cache' ); ?></a>
|
||||
</p>
|
||||
<?php
|
||||
break;
|
||||
|
||||
case 'w3tc_browsercache':
|
||||
?>
|
||||
<p id="w3tc-options-menu">
|
||||
<?php esc_html_e( 'Jump to: ', 'w3-total-cache' ); ?>
|
||||
<a href="#toplevel_page_w3tc_general"><?php esc_html_e( 'Main Menu', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#general"><?php esc_html_e( 'General', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#css_js">
|
||||
<?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.
|
||||
__(
|
||||
'%1$sCSS%2$s & %3$sJS%4$s',
|
||||
'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(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</a> |
|
||||
<a href="#html_xml">
|
||||
<?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.
|
||||
__(
|
||||
'%1$sHTML%2$s & %3$sXML%4$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Markup Language', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'eXtensible Markup Language', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</a> |
|
||||
<a href="#media"><?php esc_html_e( 'Media', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#security"><?php esc_html_e( 'Security Headers', 'w3-total-cache' ); ?></a>
|
||||
</p>
|
||||
<?php
|
||||
break;
|
||||
|
||||
case 'w3tc_cachegroups':
|
||||
?>
|
||||
<p id="w3tc-options-menu">
|
||||
<?php esc_html_e( 'Jump to: ', 'w3-total-cache' ); ?>
|
||||
<a href="#toplevel_page_w3tc_general"><?php esc_html_e( 'Main Menu', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#manage-uag"><?php esc_html_e( 'Manage User Agent Groups', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#manage-rg"><?php esc_html_e( 'Manage Referrer Groups', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#manage-cg"><?php esc_html_e( 'Manage Cookie Groups', 'w3-total-cache' ); ?></a>
|
||||
</p>
|
||||
<?php
|
||||
break;
|
||||
|
||||
case 'w3tc_install':
|
||||
?>
|
||||
<p id="w3tc-options-menu">
|
||||
<?php esc_html_e( 'Jump to:', 'w3-total-cache' ); ?>
|
||||
<a href="#initial"><?php esc_html_e( 'Initial Installation', 'w3-total-cache' ); ?></a> |
|
||||
<?php if ( count( $rewrite_rules_descriptors ) ) : ?>
|
||||
<a href="#rules"><?php esc_html_e( 'Rewrite Rules', 'w3-total-cache' ); ?></a> |
|
||||
<?php endif ?>
|
||||
<?php if ( count( $other_areas ) ) : ?>
|
||||
<a href="#other"><?php esc_html_e( 'Other', 'w3-total-cache' ); ?></a> |
|
||||
<?php endif ?>
|
||||
<a href="#additional"><?php esc_html_e( 'Services', 'w3-total-cache' ); ?></a> |
|
||||
<a href="#modules">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'%1$sPHP%2$s Modules',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Preprocessor', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</a>
|
||||
</p>
|
||||
<?php
|
||||
break;
|
||||
}
|
||||
?>
|
135
wp-content/plugins/w3-total-cache/inc/options/dashboard.php
Normal file
135
wp-content/plugins/w3-total-cache/inc/options/dashboard.php
Normal file
@ -0,0 +1,135 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
/*
|
||||
* Display the header for our dashboard.
|
||||
*
|
||||
* If we're on the pro version, we'll show the standard W3TC logo and a message stating the user is
|
||||
* on pro. As of 0.14.3, the free version will instead show a really, really nice banner. Really terrific.
|
||||
* Just fantasic. Other banners, not so good. Everyone agrees, believe me.
|
||||
*/
|
||||
if ( Util_Environment::is_w3tc_pro( Dispatcher::config() ) ) {
|
||||
require W3TC_INC_DIR . '/options/common/header.php';
|
||||
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML p tag, 2 HTML span tag indicating plugin enabled/disabled,
|
||||
// translators: 3 HTML strong tag indicating W3TC version, 4 closing HTML p tag.
|
||||
__(
|
||||
'%1$sThe plugin is currently %2$s in %3$s mode.%4$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<p>',
|
||||
'<span class="w3tc-' . ( $enabled ? 'enabled' : 'disabled' ) . '">' . ( $enabled ? esc_html__( 'enabled', 'w3-total-cache' ) : esc_html__( 'disabled', 'w3-total-cache' ) ) . '</span>',
|
||||
'<strong>' . Util_Environment::w3tc_edition( $this->_config ) . '</strong>',
|
||||
'</p>'
|
||||
),
|
||||
array(
|
||||
'p' => array(),
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
),
|
||||
'strong' => array(),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
// When header.php is not included (above), we need to do our head action and open the wrap.
|
||||
do_action( 'w3tc-dashboard-head' );
|
||||
echo '<div class="wrap" id="w3tc">';
|
||||
|
||||
require W3TC_INC_DIR . '/options/parts/dashboard_banner.php';
|
||||
}
|
||||
?>
|
||||
|
||||
<form id="w3tc_dashboard" action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
|
||||
<p>
|
||||
<?php esc_html_e( 'Perform a', 'w3-total-cache' ); ?>
|
||||
<input type="button" class="button button-self-test {nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" value="<?php esc_html_e( 'compatibility check', 'w3-total-cache' ); ?>" />,
|
||||
<?php
|
||||
echo wp_kses(
|
||||
Util_Ui::nonce_field( 'w3tc' ),
|
||||
array(
|
||||
'input' => array(
|
||||
'type' => array(),
|
||||
'name' => array(),
|
||||
'value' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<input id="flush_all" class="button" type="submit" name="w3tc_flush_all" value="<?php esc_html_e( 'empty all caches', 'w3-total-cache' ); ?>"<?php echo ! $enabled ? ' disabled="disabled"' : ''; ?> /> <?php esc_html_e( 'at once or', 'w3-total-cache' ); ?>
|
||||
<input class="button" type="submit" name="w3tc_flush_memcached" value="<?php esc_html_e( 'empty only the memcached cache(s)', 'w3-total-cache' ); ?>"<?php echo ! $can_empty_memcache ? ' disabled="disabled"' : ''; ?> /> <?php esc_html_e( 'or', 'w3-total-cache' ); ?>
|
||||
<input class="button" type="submit" name="w3tc_flush_opcode" value="<?php esc_html_e( 'empty only the opcode cache', 'w3-total-cache' ); ?>"<?php echo ! $can_empty_opcode ? ' disabled="disabled"' : ''; ?> /> <?php esc_html_e( 'or', 'w3-total-cache' ); ?>
|
||||
<input class="button" type="submit" name="w3tc_flush_file" value="<?php esc_html_e( 'empty only the disk cache(s)', 'w3-total-cache' ); ?>"<?php echo ! $can_empty_file ? ' disabled="disabled"' : ''; ?> /> <?php esc_html_e( 'or', 'w3-total-cache' ); ?>
|
||||
<?php if ( $cdn_mirror_purge && $cdn_enabled ) : ?>
|
||||
<input class="button" type="submit" name="w3tc_flush_cdn" value="<?php esc_html_e( 'purge CDN completely', 'w3-total-cache' ); ?>" /> <?php esc_html_e( 'or', 'w3-total-cache' ); ?>
|
||||
<?php endif; ?>
|
||||
<input type="submit" name="w3tc_flush_browser_cache" value="<?php esc_html_e( 'update Media Query String', 'w3-total-cache' ); ?>" <?php disabled( ! ( $browsercache_enabled && $browsercache_update_media_qs ) ); ?> class="button" />
|
||||
<?php
|
||||
$string = esc_html__( 'or', 'w3-total-cache' );
|
||||
echo wp_kses(
|
||||
implode( " $string ", apply_filters( 'w3tc_dashboard_actions', array() ) ),
|
||||
array(
|
||||
'input' => array(
|
||||
'class' => array(),
|
||||
'disabled' => array(),
|
||||
'id' => array(),
|
||||
'name' => array(),
|
||||
'type' => array(),
|
||||
'value' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
.
|
||||
</p>
|
||||
<div id="w3tc-dashboard-widgets" class="clearfix widefat metabox-holder">
|
||||
<?php $screen = get_current_screen(); ?>
|
||||
<div id="postbox-container-left">
|
||||
<div class="content">
|
||||
<div id="dashboard-text" style="display:inline-block;">
|
||||
<h1><?php esc_html_e( 'Dashboard', 'w3-total-cache' ); ?></h1>
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Thanks for choosing W3TC as your Web Performance Optimization (%1$sWPO%2$s) framework!',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Web Performance Optimization', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<div id="widgets-container">
|
||||
<?php do_meta_boxes( $screen->id, 'normal', '' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="postbox-container-right">
|
||||
<div id='postbox-container-3' class='postbox-container' style="width: 100%;">
|
||||
<?php do_meta_boxes( $screen->id, 'side', '' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear:both"></div>
|
||||
|
||||
<?php
|
||||
wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
|
||||
wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
|
||||
?>
|
||||
</div>
|
||||
</form>
|
||||
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>
|
157
wp-content/plugins/w3-total-cache/inc/options/dbcache.php
Normal file
157
wp-content/plugins/w3-total-cache/inc/options/dbcache.php
Normal file
@ -0,0 +1,157 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
?>
|
||||
<?php require W3TC_INC_DIR . '/options/common/header.php'; ?>
|
||||
|
||||
<form action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 Database cache engine name, 2 HTML span indicating DB cache enabled/disabled.
|
||||
__(
|
||||
'Database caching via %1$s is currently %2$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
esc_html( Cache::engine_name( $this->_config->get_string( 'dbcache.engine' ) ) ),
|
||||
'<span class="w3tc-' . ( $dbcache_enabled ? 'enabled">' . esc_html__( 'enabled', 'w3-total-cache' ) : 'disabled">' . esc_html__( 'disabled', 'w3-total-cache' ) ) . '</span>'
|
||||
),
|
||||
array(
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php esc_html_e( 'To rebuild the database cache use the', 'w3-total-cache' ); ?>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
Util_Ui::nonce_field( 'w3tc' ),
|
||||
array(
|
||||
'input' => array(
|
||||
'type' => array(),
|
||||
'name' => array(),
|
||||
'value' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<input type="submit" name="w3tc_flush_dbcache" value="<?php esc_attr_e( 'empty cache', 'w3-total-cache' ); ?>"<?php echo ! $dbcache_enabled ? ' disabled="disabled"' : ''; ?> class="button" />
|
||||
<?php esc_html_e( 'operation.', 'w3-total-cache' ); ?>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<form action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
|
||||
<div class="metabox-holder">
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'General', 'w3-total-cache' ), '', 'general' ); ?>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th>
|
||||
<?php $this->checkbox( 'dbcache.reject.logged' ); ?> <?php Util_Ui::e_config_label( 'dbcache.reject.logged' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Enabling this option is recommended to maintain default WordPress behavior.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php Util_Ui::button_config_save( 'dbcache_general' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'Advanced', 'w3-total-cache' ), '', 'advanced' ); ?>
|
||||
<table class="form-table">
|
||||
<?php
|
||||
if ( 'memcached' === $this->_config->get_string( 'dbcache.engine' ) ) {
|
||||
$module = 'dbcache';
|
||||
include W3TC_INC_DIR . '/options/parts/memcached.php';
|
||||
} elseif ( 'redis' === $this->_config->get_string( 'dbcache.engine' ) ) {
|
||||
$module = 'dbcache';
|
||||
include W3TC_INC_DIR . '/options/parts/redis.php';
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<th style="width: 250px;"><label for="dbcache_lifetime"><?php Util_Ui::e_config_label( 'dbcache.lifetime' ); ?></label></th>
|
||||
<td>
|
||||
<input id="dbcache_lifetime" type="text" name="dbcache__lifetime"
|
||||
<?php Util_Ui::sealing_disabled( 'dbcache.' ); ?>
|
||||
value="<?php echo esc_attr( $this->_config->get_integer( 'dbcache.lifetime' ) ); ?>" size="8" /> <?php esc_html_e( 'seconds', 'w3-total-cache' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Determines the natural expiration time of unchanged cache items. The higher the value, the larger the cache.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="dbcache_file_gc"><?php Util_Ui::e_config_label( 'dbcache.file.gc' ); ?></label></th>
|
||||
<td>
|
||||
<input id="dbcache_file_gc" type="text" name="dbcache__file__gc"
|
||||
<?php Util_Ui::sealing_disabled( 'dbcache.' ); ?> value="<?php echo esc_attr( $this->_config->get_integer( 'dbcache.file.gc' ) ); ?>" size="8" /> <?php esc_html_e( 'seconds', 'w3-total-cache' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="dbcache_reject_uri"><?php Util_Ui::e_config_label( 'dbcache.reject.uri' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="dbcache_reject_uri" name="dbcache__reject__uri"
|
||||
<?php Util_Ui::sealing_disabled( 'dbcache.' ); ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'dbcache.reject.uri' ) ) ); ?></textarea>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML a tag to W3TC regex support, 2 opening HTML acronym tag,
|
||||
// translators: 3 closing HTML acronym tag, 4 closing HTML a tag.
|
||||
__(
|
||||
'Always ignore the specified pages / directories. Supports regular expressions (See %1$s%2$sFAQ%3$s%4$s).',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<a href="' . esc_url( 'https://api.w3-edge.com/v1/redirects/faq/usage/regexp-support' ) . '">',
|
||||
'<acronym title="' . esc_attr__( 'Frequently Asked Questions', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="dbcache_reject_sql"><?php Util_Ui::e_config_label( 'dbcache.reject.sql' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="dbcache_reject_sql" name="dbcache__reject__sql"
|
||||
<?php Util_Ui::sealing_disabled( 'dbcache.' ); ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'dbcache.reject.sql' ) ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Do not cache queries that contain these terms. Any entered prefix (set in wp-config.php) will be replaced with current database prefix (default: wp_). Query stems can be identified using debug mode.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="dbcache_reject_words"><?php Util_Ui::e_config_label( 'dbcache.reject.words' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="dbcache_reject_words" name="dbcache__reject__words"
|
||||
<?php Util_Ui::sealing_disabled( 'dbcache.' ); ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'dbcache.reject.words' ) ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Do not cache queries that contain these words or regular expressions.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="dbcache_reject_constants"><?php esc_html_e( 'Reject constants:' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="dbcache_reject_constants" name="dbcache__reject__constants"
|
||||
<?php Util_Ui::sealing_disabled( 'dbcache.' ); ?> cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'dbcache.reject.constants' ) ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Disable caching once specified constants defined.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php Util_Ui::button_config_save( 'dbcache_advanced' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>
|
51
wp-content/plugins/w3-total-cache/inc/options/edd/buy.php
Normal file
51
wp-content/plugins/w3-total-cache/inc/options/edd/buy.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
?>
|
||||
<div>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 HTML input button to buy plugin.
|
||||
__(
|
||||
'Unlock more speed, %1$s now!',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<input type="button" class="button-primary button-buy-plugin" data-src="' . esc_attr( 'page_' . $page ) . '" value="' . esc_attr( __( 'upgrade', 'w3-total-cache' ) ) . '" />'
|
||||
),
|
||||
array(
|
||||
'input' => array(
|
||||
'type' => array(),
|
||||
'class' => array(),
|
||||
'data-src' => array(),
|
||||
'value' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<div id="w3tc-license-instruction" style="display: none;">
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 HTML a tag to W3TC licencing page.
|
||||
__(
|
||||
'Please enter the license key you received after successful checkout %1$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<a href="' . esc_url( network_admin_url( 'admin.php?page=w3tc_general#licensing' ) ) . '">' . esc_html( __( 'here', 'w3-total-cache' ) ) . '</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
?>
|
||||
<?php require W3TC_INC_DIR . '/options/common/header.php'; ?>
|
||||
|
||||
<form action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
|
||||
<div class="metabox-holder">
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'Database Cluster Configuration File', 'w3-total-cache' ) ); ?>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th>
|
||||
<textarea cols="70" rows="25" style="width: 100%"
|
||||
name="newcontent" id="newcontent"
|
||||
tabindex="1"><?php echo esc_textarea( $content ); ?></textarea><br />
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML strong tag, 2 closing HTML strong tag.
|
||||
__(
|
||||
'Note: Changes will have immediate effect on your database configuration. If the application stops working creating the settings file, edit or remove this configuration file manually at %1$s/wp-content/db-cluster-config.php%2$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<strong>',
|
||||
'</strong>'
|
||||
),
|
||||
array(
|
||||
'strong' => array(),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p class="submit">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
Util_Ui::nonce_field( 'w3tc' ),
|
||||
array(
|
||||
'input' => array(
|
||||
'type' => array(),
|
||||
'name' => array(),
|
||||
'value' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<input type="submit" name="w3tc_config_dbcluster_config_save" class="w3tc-button-save button-primary" value="<?php esc_attr_e( 'Save configuration file', 'w3-total-cache' ); ?>" />
|
||||
</p>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( !defined( 'W3TC' ) )
|
||||
die();
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<th><label for="w3tc_dbcluster_config">Database cluster:</th>
|
||||
<td>
|
||||
<input type="submit" id="w3tc_dbcluster_config" name="w3tc_dbcluster_config" class="button"
|
||||
value="<?php echo Util_Environment::is_dbcluster() ? 'Edit Database Cluster Configuration' : 'Enable database cluster'; ?>" />
|
||||
<p class="description">Create db-cluster-config.php file with your database cluster configuration to enable it.</p>
|
||||
</td>
|
||||
</tr>
|
36
wp-content/plugins/w3-total-cache/inc/options/extensions.php
Normal file
36
wp-content/plugins/w3-total-cache/inc/options/extensions.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
?>
|
||||
<div id="w3tc_extensions">
|
||||
<?php
|
||||
if ( 'list' === $sub_view ) {
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML p tag, 2 opening HTML span tag, 3 closing HTML span tag, 4 closing HTML p tag.
|
||||
__(
|
||||
'%1$sExtension support is always %2$senabled%3$s%4$s'
|
||||
),
|
||||
'<p>',
|
||||
'<span class="w3tc-enabled">',
|
||||
'</span>',
|
||||
'</p>'
|
||||
),
|
||||
array(
|
||||
'p' => array(),
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
<form action="admin.php?page=<?php echo esc_attr( $this->_page ); ?><?php echo $extension ? '&extension=' . esc_attr( $extension ) . '&action=view' : ''; ?>" method="post">
|
||||
<div class="metabox-holder <?php echo $extension ? 'extension-settings' : ''; ?>">
|
||||
<?php require W3TC_INC_OPTIONS_DIR . "/extensions/$sub_view.php"; ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@ -0,0 +1,267 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @var string $extension_status
|
||||
* @var int $page
|
||||
* @var array $extensions list of extensions for current $extension_status
|
||||
* @var array $extensions_all list of all extensions
|
||||
* @var array $extensions_active list of all active extensions
|
||||
* @var array $extensions_inactive list of all inactive extensions
|
||||
* @var array $extensions_core list of all core extensions
|
||||
*/
|
||||
?>
|
||||
<ul class="subsubsub">
|
||||
<li class="all"><a href="?page=w3tc_extensions&extension_status=all"<?php echo 'all' === $extension_status ? ' class="current"' : ''; ?>>All <span class="count">(<?php echo esc_html( count( $extensions_all ) ); ?>)</span></a> |</li>
|
||||
<li class="active"><a href="?page=w3tc_extensions&extension_status=active"<?php echo 'active' === $extension_status ? ' class="current"' : ''; ?>>Active <span class="count">(<?php echo esc_html( count( $extensions_active ) ); ?>)</span></a> |</li>
|
||||
<li class="inactive"><a href="?page=w3tc_extensions&extension_status=inactive"<?php echo 'inactive' === $extension_status ? ' class="current"' : ''; ?>>Inactive <span class="count">(<?php echo esc_html( count( $extensions_inactive ) ); ?>)</span></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tablenav top">
|
||||
|
||||
<?php if ( ! $config->is_sealed( 'extensions.active' ) ) : ?>
|
||||
<div class="alignleft actions">
|
||||
<select name="action">
|
||||
<option value="-1" selected="selected"><?php esc_html_e( 'Bulk Actions', 'w3-total-cache' ); ?></option>
|
||||
<option value="activate-selected"><?php esc_html_e( 'Activate', 'w3-total-cache' ); ?></option>
|
||||
<option value="deactivate-selected"><?php esc_html_e( 'Deactivate', 'w3-total-cache' ); ?></option>
|
||||
</select>
|
||||
<input type="submit" name="" id="doaction" class="w3tc-button-save button action" value="<?php esc_attr_e( 'Apply' ); ?>">
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="tablenav-pages one-page">
|
||||
<span class="displaying-num">
|
||||
<?php
|
||||
echo esc_html(
|
||||
sprintf(
|
||||
translate_nooped_plural(
|
||||
// translators: 1 count of extensions.
|
||||
_n_noop(
|
||||
'%s extension',
|
||||
'%s extensions'
|
||||
),
|
||||
count( $extensions ),
|
||||
'w3-total-cache'
|
||||
),
|
||||
count( $extensions )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
<br class="clear">
|
||||
</div>
|
||||
<table class="wp-list-table widefat plugins w3tc_extensions" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" id="cb" class="w3tc_extensions_manage_column_check"><label class="screen-reader-text" for="cb-select-all-1"><?php esc_html_e( 'Select All', 'w3-total-cache' ); ?></label><input id="cb-select-all-1" type="checkbox" class="w3tc_extensions_manage_input_checkall"></th><th scope="col" id="name" class="manage-column column-name" style=""><?php esc_html_e( 'Extension', 'w3-total-cache' ); ?></th><th scope="col" id="description" class="manage-column column-description" style=""><?php esc_html_e( 'Description', 'w3-total-cache' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th scope="col" class="w3tc_extensions_manage_column_check"><label class="screen-reader-text" for="cb-select-all-2"><?php esc_html_e( 'Select All', 'w3-total-cache' ); ?></label><input id="cb-select-all-2" type="checkbox" class="w3tc_extensions_manage_input_checkall"></th><th scope="col" class="manage-column column-name" style=""><?php esc_html_e( 'Extension', 'w3-total-cache' ); ?></th><th scope="col" class="manage-column column-description" style=""><?php esc_html_e( 'Description', 'w3-total-cache' ); ?></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody id="the-list">
|
||||
<?php
|
||||
$cb_id = 0;
|
||||
foreach ( $extension_keys as $extension ) :
|
||||
$meta = $extensions[ $extension ];
|
||||
$meta = $this->default_meta( $meta );
|
||||
if ( ! $meta['public'] ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$cb_id++;
|
||||
|
||||
do_action( "w3tc_extension_before_row-{$extension}" );
|
||||
|
||||
?>
|
||||
<tr id="<?php echo esc_attr( $extension ); ?>" class="<?php echo $config->is_extension_active( $extension ) ? 'active' : 'inactive'; ?>">
|
||||
<th scope="row" class="check-column">
|
||||
<label class="screen-reader-text" for="checkbox_<?php echo esc_attr( $cb_id ); ?>"><?php echo esc_html( sprintf( /* translators: 1 label for Extension select/deselect checkobox */ __( 'Select %1$s', 'w3-total-cache' ), $meta['name'] ) ); ?></label>
|
||||
<input type="checkbox" name="checked[]" value="<?php echo esc_attr( $extension ); ?>" id="checkbox_<?php echo esc_attr( $cb_id ); ?>" class="w3tc_extensions_input_active" <?php disabled( ! $meta['enabled'] ); ?>>
|
||||
</th>
|
||||
<td class="plugin-title">
|
||||
<strong><?php echo esc_html( $meta['name'] ); ?></strong>
|
||||
<div class="row-actions-visible">
|
||||
<?php
|
||||
if ( $config->is_extension_active( $extension ) ) :
|
||||
$extra_links = array();
|
||||
|
||||
if ( isset( $meta['settings_exists'] ) && $meta['settings_exists'] ) {
|
||||
$extra_links[] = '<a class="edit" href="' .
|
||||
esc_attr( Util_Ui::admin_url( sprintf( 'admin.php?page=w3tc_extensions&extension=%s&action=view', $extension ) ) ) . '">' .
|
||||
esc_html__( 'Settings', 'w3-total-cache' ) . '</a>';
|
||||
}
|
||||
|
||||
if ( isset( $meta['extra_links'] ) && is_Array( $meta['extra_links'] ) ) {
|
||||
$extra_links = array_merge( $extra_links, $meta['extra_links'] );
|
||||
}
|
||||
|
||||
$extra_links = apply_filters( "w3tc_extension_plugin_links_{$extension}", $extra_links );
|
||||
$links = implode( ' | ', $extra_links );
|
||||
|
||||
if ( $links ) {
|
||||
echo wp_kses(
|
||||
$links,
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
|
||||
<span class="0"></span>
|
||||
|
||||
<?php if ( ! $config->is_sealed( 'extensions.active' ) ) : ?>
|
||||
<?php echo $links ? ' | ' : ''; ?>
|
||||
<span class="deactivate">
|
||||
<a href="<?php echo esc_url( wp_nonce_url( Util_Ui::admin_url( sprintf( 'admin.php?page=w3tc_extensions&action=deactivate&extension=%s&extension_status=%s&paged=%d', $extension, $extension_status, $page ) ), 'w3tc' ) ); ?>" title="<?php esc_attr_e( 'Deactivate this extension', 'w3-total-cache' ); ?> ">
|
||||
<?php esc_html_e( 'Deactivate' ); ?>
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php else : ?>
|
||||
<span class="activate">
|
||||
<?php if ( $meta['enabled'] ) : ?>
|
||||
<?php if ( ! $config->is_sealed( 'extensions.active' ) ) : ?>
|
||||
<a href="<?php echo esc_url( wp_nonce_url( Util_Ui::admin_url( sprintf( 'admin.php?page=w3tc_extensions&action=activate&extension=%s&extension_status=%s&paged=%d', $extension, $extension_status, $page ) ), 'w3tc' ) ); ?>" title="<?php esc_attr_e( 'Activate this extension', 'w3-total-cache' ); ?> ">
|
||||
<?php esc_html_e( 'Activate' ); ?>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
<?php else : ?>
|
||||
<?php if ( ! empty( $meta['disabled_message'] ) ) : ?>
|
||||
<?php echo esc_html( $meta['disabled_message'] ); ?>
|
||||
<?php else : ?>
|
||||
<?php esc_html_e( 'Disabled: see Requirements', 'w3-total-cache' ); ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</td>
|
||||
<td class="column-description desc">
|
||||
<div class="plugin-description">
|
||||
<p>
|
||||
<?php if ( isset( $meta['pro_feature'] ) && $meta['pro_feature'] ) : ?>
|
||||
<?php Util_Ui::pro_wrap_maybe_start(); ?>
|
||||
<?php Util_Ui::pro_wrap_description( $meta['pro_excerpt'], $meta['pro_description'], 'extension-' . $extension ); ?>
|
||||
<?php Util_Ui::pro_wrap_maybe_end( "extension_$extension" ); ?>
|
||||
<?php else : ?>
|
||||
<?php echo wp_kses( $meta['description'], Util_Ui::get_allowed_html_for_wp_kses_from_content( $meta['description'] ) ); ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ( ! empty( $meta['requirements'] ) ) : ?>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo esc_html(
|
||||
sprintf(
|
||||
// translators: 1 plugin requirements.
|
||||
__(
|
||||
'Requirements: %s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
apply_filters( "w3tc_extension_requirements-{$extension}", $meta['requirements'] )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<?php do_action( "w3tc_extension_requirements-{$extension}" ); ?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="<?php echo $config->is_extension_active( $extension ) ? 'active' : 'inactive'; ?> second plugin-version-author-uri">
|
||||
<?php
|
||||
echo esc_html(
|
||||
sprintf(
|
||||
// translators: 1 extension version number.
|
||||
__(
|
||||
'Version %s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
$meta['version']
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 HTML a tag to extension author page.
|
||||
__(
|
||||
'By %s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<a href="' . esc_url( $meta['author_uri'] ) . '" title="' . __( 'Visit author homepage', 'w3-total-cache' ) . '">' . esc_html( $meta['author'] ) . '</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
'target' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
|
||||
<a href="<?php echo esc_url( $meta['extension_uri'] ); ?>"
|
||||
title="<?php esc_attr_e( 'Visit extension site', 'w3-total-cache' ); ?>">
|
||||
<?php esc_html_e( 'Visit extension site', 'w3-total-cache' ); ?></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php do_action( 'w3tc_extension_after_row', $extension ); ?>
|
||||
<?php do_action( "w3tc_extension_after_row-{$extension}" ); ?>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="tablenav bottom">
|
||||
|
||||
<?php if ( ! $config->is_sealed( 'extensions.active' ) ) : ?>
|
||||
<div class="alignleft actions">
|
||||
<select name="action2">
|
||||
<option value="-1" selected="selected"><?php esc_html_e( 'Bulk Actions', 'w3-total-cache' ); ?></option>
|
||||
<option value="activate-selected"><?php esc_html_e( 'Activate', 'w3-total-cache' ); ?></option>
|
||||
<option value="deactivate-selected"><?php esc_html_e( 'Deactivate', 'w3-total-cache' ); ?></option>
|
||||
</select>
|
||||
<input type="submit" name="" id="doaction" class="w3tc-button-save button action" value="<?php esc_attr_e( 'Apply', 'w3-total-cache' ); ?>">
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="tablenav-pages one-page">
|
||||
<span class="displaying-num">
|
||||
<?php
|
||||
echo esc_html(
|
||||
sprintf(
|
||||
translate_nooped_plural(
|
||||
// translators: 1 count of extensions.
|
||||
_n_noop(
|
||||
'%s extension',
|
||||
'%s extensions'
|
||||
),
|
||||
count( $extensions ),
|
||||
'w3-total-cache'
|
||||
),
|
||||
count( $extensions )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
<br class="clear">
|
||||
</div>
|
||||
|
||||
<?php if ( is_network_admin() ) : ?>
|
||||
<?php Util_Ui::button_config_save( 'extensions' ); ?>
|
||||
<?php endif ?>
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( !defined( 'W3TC' ) )
|
||||
die();
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @var string $active_tab
|
||||
* @var string $extension
|
||||
* @var array $meta
|
||||
*/
|
||||
|
||||
do_action( "w3tc_extension_page_{$extension}" );
|
1158
wp-content/plugins/w3-total-cache/inc/options/general.php
Normal file
1158
wp-content/plugins/w3-total-cache/inc/options/general.php
Normal file
File diff suppressed because it is too large
Load Diff
422
wp-content/plugins/w3-total-cache/inc/options/install.php
Normal file
422
wp-content/plugins/w3-total-cache/inc/options/install.php
Normal file
@ -0,0 +1,422 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
?>
|
||||
<?php require W3TC_INC_DIR . '/options/common/header.php'; ?>
|
||||
|
||||
<div id="install">
|
||||
<h3 id="initial"><?php esc_html_e( 'Initial Installation', 'w3-total-cache' ); ?></h3>
|
||||
<ol>
|
||||
<li>
|
||||
<?php esc_html_e( 'Set the permissions of wp-content/ back to 755, e.g.:', 'w3-total-cache' ); ?>
|
||||
<pre class="console"># chmod 755 /var/www/vhosts/domain.com/httpdocs/wp-content/</pre>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML a tag to W3TC General admin page, 2 closing HTML a tag.
|
||||
__(
|
||||
'On the "%1$sGeneral%2$s" tab and select your caching methods for page, database and minify. In most cases, "disk enhanced" mode for page cache, "disk" mode for minify and "disk" mode for database caching are "good" settings.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<a href="' . esc_url( admin_url( 'admin.php?page=w3tc_general' ) ) . '">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML a tag to W3TC PageCache admin page, 2 closing HTML a tag.
|
||||
__(
|
||||
'1. The "Compatibility Mode" option found in the advanced section of the %1$s"Page Cache Settings"%2$s tab will enable functionality that optimizes the interoperablity of caching with WordPress, is disabled by default, but highly recommended. Years of testing in hundreds of thousands of installations have helped us learn how to make caching behave well with WordPress. The tradeoff is that disk enhanced page cache performance under load tests will be decreased by ~20%% at scale.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<a href="' . esc_url( admin_url( 'admin.php?page=w3tc_pgcache' ) ) . '">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML em tag, 2 closing HTML em tag,
|
||||
// translators: 3 opening HTML a tag to W3TC Minify admin page, 4 closing HTML a tag,
|
||||
// translators: 5 opening HTML acronym tag, 6 closing HTML acronym tag,
|
||||
// translators: 7 opening HTML acronym tag, 8 closing HTML acronym tag,
|
||||
// translators: 9 opening HTML acronym tag, 10 closing HTML acronym tag,
|
||||
// translators: 11 opening HTML a tag to W3TC Redirects FAQ page, 12 opening HTML acronym tag,
|
||||
// translators: 13 closing HTML acronym tag, 14 closing HTML a tag.
|
||||
__(
|
||||
'%1$sRecommended:%2$s On the "%3$sMinify%4$s" tab all of the recommended settings are preset. Use the help button to simplify discovery of your %5$sCSS%6$s and %7$sJS%8$s files and groups. Pay close attention to the method and location of your %9$sJS%10$s group embeddings. See the plugin\'s %11$s%12$sFAQ%13$s%14$s for more information on usage.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<em>',
|
||||
'</em>',
|
||||
'<a href="admin.php?page=w3tc_minify">',
|
||||
'</a>',
|
||||
'<acronym title="' . esc_attr__( 'Cascading Style Sheet', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'JavaScript', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'JavaScript', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<a href="' . esc_url( 'https://api.w3-edge.com/v1/redirects/faq/usage' ) . '">',
|
||||
'<acronym title="' . esc_attr__( 'Frequently Asked Questions', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'em' => array(),
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML em tag, 2 closing HTML em tag,
|
||||
// translators: 3 opening HTML a tag to W3TC BrowserCache admin page, 4 closing HTML a tag,
|
||||
// translators: 5 opening HTML acronym tag, 6 closing HTML acronym tag.
|
||||
__(
|
||||
'%1$sRecommended:%2$s On the "%3$sBrowser Cache%4$s" tab, %5$sHTTP%6$s compression is enabled by default. Make sure to enable other options to suit your goals.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<em>',
|
||||
'</em>',
|
||||
'<a href="' . esc_url( admin_url( 'admin.php?page=w3tc_browsercache' ) ) . '">',
|
||||
'</a>',
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Transfer Protocol', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'em' => array(),
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML em tag, 2 closing HTML em tag,
|
||||
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag
|
||||
// translators: 5 opening HTML a tag to W3TC CDN admin page, 6 closing HTML a tag,
|
||||
// translators: 7 opening HTML acronym tag, 8 closing HTML acronym tag,
|
||||
// translators: 9 opening HTML acronym tag, 10 closing HTML acronym tag,
|
||||
// translators: 11 opening HTML acronym tag, 12 closing HTML acronym tag,
|
||||
// translators: 13 opening HTML acronym tag, 14 closing HTML acronym tag.
|
||||
__(
|
||||
'%1$sRecommended:%2$s If you already have a content delivery network (%3$sCDN%4$s) provider, proceed to the "%5$sContent Delivery Network%6$s" tab and populate the fields and set your preferences. If you do not use the Media Library, you will need to import your images etc into the default locations. Use the Media Library Import Tool on the "Content Delivery Network" tab to perform this task. If you do not have a %7$sCDN%8$s provider, you can still improve your site\'s performance using the "Self-hosted" method. On your own server, create a subdomain and matching %9$sDNS%10$s Zone record; e.g. static.domain.com and configure %11$sFTP%12$s options on the "Content Delivery Network" tab accordingly. Be sure to %13$sFTP%14$s upload the appropriate files, using the available upload buttons.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<em>',
|
||||
'</em>',
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<a href="' . esc_url( admin_url( 'admin.php?page=w3tc_cdn' ) ) . '">',
|
||||
'</a>',
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Domain Name System', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'File Transfer Protocol', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'File Transfer Protocol', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'herf' => array(),
|
||||
),
|
||||
'em' => array(),
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML em tag, 2 closing HTML em tag,
|
||||
// translators: 3 opening HTML a tag to W3TC DatabaseCache admin page, 4 closing HTML a tag.
|
||||
__(
|
||||
'%1$sOptional:%2$s On the "%3$sDatabase Cache%4$s" tab the recommended settings are preset. If using a shared hosting account use the "disk" method with caution; in either of these cases the response time of the disk may not be fast enough, so this option is disabled by default.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<em>',
|
||||
'</em>',
|
||||
'<a href="' . esc_url( admin_url( 'admin.php?page=w3tc_dbcache' ) ) . '">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'em' => array(),
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML em tag, 2 closing HTML em tag,
|
||||
// translators: 3 opening HTML a tag to W3TC ObjectCache admin page, 4 closing HTML a tag.
|
||||
__(
|
||||
'%1$sOptional:%2$s On the "%3$sObject Cache%4$s" tab the recommended settings are preset. If using a shared hosting account use the "disk" method with caution, the response time of the disk may not be fast enough, so this option is disabled by default. Test this option with and without database cache to ensure that it provides a performance increase.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<em>',
|
||||
'</em>',
|
||||
'<a href="' . esc_url( admin_url( 'admin.php?page=w3tc_objectcache' ) ) . '">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'em' => array(),
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML em tag, 2 closing HTML em tag,
|
||||
// translators: 3 opening HTML a tag to W3TC Cache Groups admin page, 4 closing HTML a tag.
|
||||
__(
|
||||
'%1$sOptional:%2$s On the "%3$sUser Agent Groups%4$s" tab, specify any user agents, like mobile phones if a mobile theme is used.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<em>',
|
||||
'</em>',
|
||||
'<a href="' . esc_url( admin_url( 'admin.php?page=w3tc_cachegroups' ) ) . '">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'em' => array(),
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<p>
|
||||
<?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.
|
||||
__(
|
||||
'Check out the %1$sFAQ%2$s for more details on %3$susage</a>.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Frequently Asked Questions', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<a href="' . esc_url( admin_url( 'admin.php?page=w3tc_faq' ) ) . '">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
||||
<hr />
|
||||
<?php if ( count( $rewrite_rules_descriptors ) ) : ?>
|
||||
<h3 id="rules"><?php esc_html_e( 'Rewrite Rules (based on active settings)', 'w3-total-cache' ); ?></h3>
|
||||
<?php foreach ( $rewrite_rules_descriptors as $descriptor ) : ?>
|
||||
<p><strong><?php echo esc_html( $descriptor['filename'] ); ?>:</strong></p>
|
||||
<pre class="code"><?php echo esc_html( $descriptor['content'] ); ?></pre>
|
||||
<?php endforeach; ?>
|
||||
<hr />
|
||||
<?php endif; ?>
|
||||
<?php if ( count( $other_areas ) ) : ?>
|
||||
<h3 id="other"><?php esc_html_e( 'Other', 'w3-total-cache' ); ?></h3>
|
||||
<?php foreach ( $other_areas as $area => $descriptors ) : ?>
|
||||
<?php foreach ( $descriptors as $descriptor ) : ?>
|
||||
<p><strong><?php echo esc_html( $descriptor['title'] ); ?>:</strong></p>
|
||||
<pre class="code"><?php echo esc_html( $descriptor['content'] ); ?></pre>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
<hr />
|
||||
<?php endif; ?>
|
||||
<h3 id="additional"><?php esc_html_e( 'Services', 'w3-total-cache' ); ?></h3>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://api.w3-edge.com/v1/redirects/faq/installation"><?php esc_html_e( 'Server Preparation', 'w3-total-cache' ); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://api.w3-edge.com/v1/redirects/faq/installation/memcached"><?php esc_html_e( 'Install Memcached Deamon', 'w3-total-cache' ); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr />
|
||||
<h3 id="modules">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'%1$sPHP%2$s Modules',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Preprocessor', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://api.w3-edge.com/v1/redirects/faq/installation/php/memcached"><?php esc_html_e( 'Install Memcached Module', 'w3-total-cache' ); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://api.w3-edge.com/v1/redirects/faq/installation/php/apc">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Install %1$sAPC%2$s module',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Alternative PHP Cache', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://api.w3-edge.com/v1/redirects/faq/installation/php/xcache"><?php esc_html_e( 'Install XCache Module', 'w3-total-cache' ); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://api.w3-edge.com/v1/redirects/faq/installation/php/eaccelerator"><?php esc_html_e( 'Install eAccelerator Module', 'w3-total-cache' ); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://api.w3-edge.com/v1/redirects/faq/installation/newrelic"><?php esc_html_e( 'New Relic Module', 'w3-total-cache' ); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="metabox-holder">
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'Note(s):', 'w3-total-cache' ) ); ?>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<ul>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML a tag to W3TC plugin installation FAQs, 2 closing HTML a tag.
|
||||
__(
|
||||
'Additional installation guides can be found in the %1$swiki%2$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<a href="' . esc_url( 'https://api.w3-edge.com/v1/redirects/faq/installation' ) . '" target="_blank">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
'target' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML a tag to iss.net, 2 closing HTML a tag,
|
||||
// translators: 3 opening HTML a tag to iis.net WinCache for PHP download page, 4 closing HTML a tag.
|
||||
__(
|
||||
'Best compatibility with %1$sIIS%2$s is realized via %3$sWinCache%4$s opcode cache.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<a href="' . esc_url( 'http://www.iis.net/' ) . '" target="_blank">',
|
||||
'</a>',
|
||||
'<a href="' . esc_url( 'http://www.iis.net/download/wincacheforphp' ) . '" target="_blank">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
'target' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li><?php esc_html_e( 'In the case where Apache is not used, the .htaccess file located in the root directory of the WordPress installation, wp-content/w3tc/pgcache/.htaccess and wp-content/w3tc/min/.htaccess contain directives that must be manually created for your web server software.', 'w3-total-cache' ); ?></li>
|
||||
<li><?php esc_html_e( 'Restarting the web server will empty the opcode cache, which means it will have to be rebuilt over time and your site\'s performance will suffer during this period. Still, an opcode cache should be installed in any case to maximize WordPress performance.', 'w3-total-cache' ); ?></li>
|
||||
<li><?php esc_html_e( 'Consider using memcached for objects that must persist across web server restarts or that you wish to share amongst your server pool, e.g.: database objects or page cache.', 'w3-total-cache' ); ?></li>
|
||||
</ul>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>
|
1075
wp-content/plugins/w3-total-cache/inc/options/minify.php
Normal file
1075
wp-content/plugins/w3-total-cache/inc/options/minify.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( !defined( 'W3TC' ) )
|
||||
die();
|
||||
|
||||
?>
|
||||
<input type="hidden" name="minify__ccjs__options__formatting" value="" />
|
||||
<label>
|
||||
<input class="js_enabled" type="checkbox" name="minify__ccjs__options__formatting"
|
||||
value="pretty_print"
|
||||
<?php checked( $this->_config->get_string( 'minify.ccjs.options.formatting' ), 'pretty_print' ); ?>
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ) ?> /> <?php Util_Ui::e_config_label( 'minify.ccjs.options.formatting' ) ?>
|
||||
</label>
|
||||
<br />
|
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
$compilation_levels = array(
|
||||
'WHITESPACE_ONLY' => __( 'Whitespace only', 'w3-total-cache' ),
|
||||
'SIMPLE_OPTIMIZATIONS' => __( 'Simple optimizations', 'w3-total-cache' ),
|
||||
'ADVANCED_OPTIMIZATIONS' => __( 'Advanced optimizations', 'w3-total-cache' ),
|
||||
);
|
||||
|
||||
$c = $this->_config;
|
||||
$compilation_level = $c->get_string( 'minify.ccjs.options.compilation_level' );
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="minify__ccjs__path__java">
|
||||
<?php Util_Ui::e_config_label( 'minify.ccjs.path.java' ); ?>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="minify__ccjs__path__java" class="js_enabled" type="text"
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ); ?>
|
||||
name="minify__ccjs__path__java"
|
||||
value="<?php esc_attr_e( $c->get_string( 'minify.ccjs.path.java' ), 'w3-total-cache' ); ?>"
|
||||
size="60" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="minify__ccjs__path__jar">
|
||||
<?php Util_Ui::e_config_label( 'minify.ccjs.path.jar' ); ?>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input id="minify__ccjs__path__jar" class="js_enabled" type="text"
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ); ?>
|
||||
name="minify__ccjs__path__jar"
|
||||
value="<?php esc_attr_e( $c->get_string( 'minify.ccjs.path.jar' ), 'w3-total-cache' ); ?>"
|
||||
size="60" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<td>
|
||||
<input class="minifier_test js_enabled button {type: 'ccjs', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}"
|
||||
type="button"
|
||||
value="<?php esc_attr_e( 'Test Closure Compiler', 'w3-total-cache' ); ?>" />
|
||||
<span class="minifier_test_status w3tc-status w3tc-process"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="minify_ccjs_options_compilation_level">
|
||||
<?php Util_Ui::e_config_label( 'minify.ccjs.options.compilation_level' ); ?>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<select id="minify_ccjs_options_compilation_level" class="js_enabled"
|
||||
name="minify__ccjs__options__compilation_level"
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ); ?>>
|
||||
<?php foreach ( $compilation_levels as $compilation_level_key => $compilation_level_name ): ?>
|
||||
<option value="<?php echo esc_attr( $compilation_level_key ); ?>"
|
||||
<?php selected( $compilation_level, $compilation_level_key ) ?>>
|
||||
<?php esc_html_e( $compilation_level_name, 'w3-total-cache' ); ?>
|
||||
</option>
|
||||
<?php endforeach ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
36
wp-content/plugins/w3-total-cache/inc/options/minify/css.php
Normal file
36
wp-content/plugins/w3-total-cache/inc/options/minify/css.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( !defined( 'W3TC' ) )
|
||||
die();
|
||||
|
||||
$is_pro = Util_Environment::is_w3tc_pro( $this->_config );
|
||||
|
||||
?>
|
||||
<?php $this->checkbox( 'minify.css.strip.comments', false, 'css_' ) ?> <?php Util_Ui::e_config_label( 'minify.css.strip.comments' ) ?></label><br />
|
||||
<?php $this->checkbox( 'minify.css.strip.crlf', false, 'css_' ) ?> <?php Util_Ui::e_config_label( 'minify.css.strip.crlf' ) ?></label><br />
|
||||
|
||||
<?php
|
||||
Util_Ui::config_item_pro( array(
|
||||
'key' => 'minify.css.embed',
|
||||
'control' => 'checkbox',
|
||||
'checkbox_label' => __( 'Eliminate render-blocking <acronym title="Cascading Style Sheet">CSS</acronym> by moving it to <acronym title="Hypertext Transfer Protocol">HTTP</acronym> body', 'w3-total-cache' ),
|
||||
'disabled' => ( $is_pro ? null : true ),
|
||||
'label_class' => 'w3tc_no_trtd',
|
||||
'excerpt' => __( 'Website visitors cannot navigate your website until a given page is ready - reduce the wait time with this feature.', 'w3-total-cache' ),
|
||||
'description' => array(
|
||||
__( 'Faster paint time is a key last step in lowering bounce rates even for repeat page views. Enable this feature to significantly enhance your website’s user experience by reducing wait times and ensuring that users can interact with your website as quickly as possible.', 'w3-total-cache' ),
|
||||
wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 The opening anchor tag linking to our support page, 2 its closing tag.
|
||||
__( 'Need help? Take a look at our %1$spremium support, customization and audit services%2$s.', 'w3-total-cache' ),
|
||||
'<a href="' . esc_url( admin_url( 'admin.php?page=w3tc_support' ) ) . '">',
|
||||
'</a>'
|
||||
),
|
||||
array( 'a' => array( 'href' => array() ) )
|
||||
),
|
||||
),
|
||||
) );
|
||||
?>
|
||||
|
||||
<br />
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
$css_levels = array(
|
||||
'CSS3.0',
|
||||
'CSS2.1',
|
||||
'CSS2.0',
|
||||
'CSS1.0',
|
||||
);
|
||||
|
||||
$css_level = $this->_config->get_string( 'minify.csstidy.options.css_level' );
|
||||
?>
|
||||
<?php $this->checkbox( 'minify.csstidy.options.remove_bslash', false, 'css_' ); ?> <?php Util_Ui::e_config_label( 'minify.csstidy.options.remove_bslash' ); ?></label><br />
|
||||
<?php $this->checkbox( 'minify.csstidy.options.compress_colors', false, 'css_' ); ?> <?php Util_Ui::e_config_label( 'minify.csstidy.options.compress_colors' ); ?></label><br />
|
||||
<?php $this->checkbox( 'minify.csstidy.options.compress_font-weight', false, 'css_' ); ?> <?php Util_Ui::e_config_label( 'minify.csstidy.options.compress_font-weight' ); ?></label><br />
|
||||
<?php $this->checkbox( 'minify.csstidy.options.lowercase_s', false, 'css_' ); ?> <?php Util_Ui::e_config_label( 'minify.csstidy.options.lowercase_s' ); ?></label><br />
|
||||
<?php $this->checkbox( 'minify.csstidy.options.remove_last_;', false, 'css_' ); ?> <?php Util_Ui::e_config_label( 'minify.csstidy.options.remove_last_;' ); ?></label><br />
|
||||
<?php $this->checkbox( 'minify.csstidy.options.remove_space_before_important', false, 'css_' ); ?> <?php Util_Ui::e_config_label( 'minify.csstidy.options.remove_space_before_important' ); ?></label><br />
|
||||
<?php $this->checkbox( 'minify.csstidy.options.sort_properties', false, 'css_' ); ?> <?php Util_Ui::e_config_label( 'minify.csstidy.options.sort_properties' ); ?></label><br />
|
||||
<?php $this->checkbox( 'minify.csstidy.options.sort_selectors', false, 'css_' ); ?> <?php Util_Ui::e_config_label( 'minify.csstidy.options.sort_selectors' ); ?></label><br />
|
||||
<?php $this->checkbox( 'minify.csstidy.options.discard_invalid_selectors', false, 'css_' ); ?> <?php Util_Ui::e_config_label( 'minify.csstidy.options.discard_invalid_selectors' ); ?></label><br />
|
||||
<?php $this->checkbox( 'minify.csstidy.options.discard_invalid_properties', false, 'css_' ); ?> <?php Util_Ui::e_config_label( 'minify.csstidy.options.discard_invalid_properties' ); ?></label>
|
||||
<select class="css_enabled" name="minify__csstidy__options__css_level"
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ); ?>>
|
||||
<?php foreach ( $css_levels as $_css_level ) : ?>
|
||||
<option value="<?php echo esc_attr( $_css_level ); ?>" <?php selected( $css_level, $_css_level ); ?>>
|
||||
<?php echo esc_html( $_css_level ); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select><br />
|
||||
<?php $this->checkbox( 'minify.csstidy.options.preserve_css', false, 'css_' ); ?> <?php Util_Ui::e_config_label( 'minify.csstidy.options.preserve_css' ); ?></label><br />
|
||||
<?php $this->checkbox( 'minify.csstidy.options.timestamp', false, 'css_' ); ?> <?php Util_Ui::e_config_label( 'minify.csstidy.options.timestamp' ); ?></label><br />
|
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
$csstidy_templates = array(
|
||||
'highest_compression' => __( 'Highest (no readability, smallest size)', 'w3-total-cache' ),
|
||||
'high_compression' => __( 'High (moderate readability, smaller size)', 'w3-total-cache' ),
|
||||
'default' => __( 'Standard (balance between readability and size)', 'w3-total-cache' ),
|
||||
'low_compression' => __( 'Low (higher readability)', 'w3-total-cache' ),
|
||||
);
|
||||
|
||||
$optimise_shorthands_values = array(
|
||||
0 => __( 'Don\'t optimise', 'w3-total-cache' ),
|
||||
1 => __( 'Safe optimisations', 'w3-total-cache' ),
|
||||
2 => __( 'Level II optimisations', 'w3-total-cache' ),
|
||||
3 => __( 'All optimisations', 'w3-total-cache' ),
|
||||
);
|
||||
|
||||
$case_properties_values = array(
|
||||
0 => __( 'None', 'w3-total-cache' ),
|
||||
1 => __( 'Lowercase', 'w3-total-cache' ),
|
||||
2 => __( 'Uppercase', 'w3-total-cache' ),
|
||||
);
|
||||
|
||||
$merge_selectors_values = array(
|
||||
0 => __( 'Do not change anything', 'w3-total-cache' ),
|
||||
1 => __( 'Only seperate selectors (split at ,)', 'w3-total-cache' ),
|
||||
2 => __( 'Merge selectors with the same properties (fast)', 'w3-total-cache' ),
|
||||
);
|
||||
|
||||
$csstidy_template = $this->_config->get_string( 'minify.csstidy.options.template' );
|
||||
$optimise_shorthands = $this->_config->get_integer( 'minify.csstidy.options.optimise_shorthands' );
|
||||
$case_properties = $this->_config->get_integer( 'minify.csstidy.options.case_properties' );
|
||||
$merge_selectors = $this->_config->get_integer( 'minify.csstidy.options.merge_selectors' );
|
||||
?>
|
||||
<tr>
|
||||
<th><label for="minify_csstidy_options_template"><?php Util_Ui::e_config_label( 'minify.csstidy.options.template' ); ?></label></th>
|
||||
<td>
|
||||
<select id="minify_csstidy_options_template" class="css_enabled" name="minify__csstidy__options__template"
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ); ?>>
|
||||
<?php foreach ( $csstidy_templates as $csstidy_template_key => $csstidy_template_name ) : ?>
|
||||
<option value="<?php echo esc_attr( $csstidy_template_key ); ?>" <?php selected( $csstidy_template, $csstidy_template_key ); ?>>
|
||||
<?php echo esc_html( $csstidy_template_name ); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="minify_csstidy_options_optimise_shorthands"><?php Util_Ui::e_config_label( 'minify.csstidy.options.optimise_shorthands' ); ?></label></th>
|
||||
<td>
|
||||
<select id="minify_csstidy_options_optimise_shorthands" class="css_enabled"
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ); ?> name="minify__csstidy__options__optimise_shorthands">
|
||||
<?php foreach ( $optimise_shorthands_values as $optimise_shorthands_key => $optimise_shorthands_name ) : ?>
|
||||
<option value="<?php echo esc_attr( $optimise_shorthands_key ); ?>" <?php selected( $optimise_shorthands, $optimise_shorthands_key ); ?>>
|
||||
<?php echo esc_html( $optimise_shorthands_name ); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="minify_csstidy_options_case_properties"><?php Util_Ui::e_config_label( 'minify.csstidy.options.case_properties' ); ?></label></th>
|
||||
<td>
|
||||
<select id="minify_csstidy_options_case_properties" class="css_enabled"
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ); ?> name="minify__csstidy__options__case_properties">
|
||||
<?php foreach ( $case_properties_values as $case_properties_key => $case_properties_name ) : ?>
|
||||
<option value="<?php echo esc_attr( $case_properties_key ); ?>" <?php selected( $case_properties, $case_properties_key ); ?>>
|
||||
<?php echo esc_html( $case_properties_name ); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="minify_csstidy_options_merge_selectors"><?php Util_Ui::e_config_label( 'minify.csstidy.options.merge_selectors' ); ?></label></th>
|
||||
<td>
|
||||
<select id="minify_csstidy_options_merge_selectors" class="css_enabled"
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ); ?> name="minify__csstidy__options__merge_selectors">
|
||||
<?php foreach ( $merge_selectors_values as $merge_selectors_key => $merge_selectors_name ) : ?>
|
||||
<option value="<?php echo esc_attr( $merge_selectors_key ); ?>" <?php selected( $merge_selectors, $merge_selectors_key ); ?>>
|
||||
<?php echo esc_html( $merge_selectors_name ); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
$compilation_levels = array(
|
||||
'WHITESPACE_ONLY' => __( 'Whitespace only', 'w3-total-cache' ),
|
||||
'SIMPLE_OPTIMIZATIONS' => __( 'Simple optimizations', 'w3-total-cache' ),
|
||||
'ADVANCED_OPTIMIZATIONS' => __( 'Advanced optimizations', 'w3-total-cache' ),
|
||||
);
|
||||
|
||||
$compilation_level = $this->_config->get_string( 'minify.ccjs.options.compilation_level' );
|
||||
?>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<td>
|
||||
<input class="minifier_test js_enabled button {type: 'googleccjs', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}"
|
||||
type="button" value="<?php esc_attr_e( 'Test Closure Compiler', 'w3-total-cache' ); ?>" />
|
||||
<span class="minifier_test_status w3tc-status w3tc-process"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="minify_ccjs_options_compilation_level"><?php Util_Ui::e_config_label( 'minify.ccjs.options.compilation_level' ); ?></label></th>
|
||||
<td>
|
||||
<select id="minify_ccjs_options_compilation_level" class="js_enabled" name="minify__ccjs__options__compilation_level"
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ); ?>>
|
||||
<?php foreach ( $compilation_levels as $compilation_level_key => $compilation_level_name ) : ?>
|
||||
<option value="<?php echo esc_attr( $compilation_level_key ); ?>" <?php selected( $compilation_level, $compilation_level_key ); ?>>
|
||||
<?php echo esc_html( $compilation_level_name ); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>
|
||||
<input type="hidden" name="minify__ccjs__options__formatting" value="" />
|
||||
<label>
|
||||
<input class="js_enabled" type="checkbox" name="minify__ccjs__options__formatting"
|
||||
value="pretty_print"
|
||||
<?php checked( $this->_config->get_string( 'minify.ccjs.options.formatting' ), 'pretty_print' ); ?>
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ); ?> /> <?php Util_Ui::e_config_label( 'minify.ccjs.options.formatting' ); ?>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( !defined( 'W3TC' ) )
|
||||
die();
|
||||
|
||||
?>
|
||||
<?php $this->checkbox( 'minify.html.strip.crlf', false, 'html_' ) ?> <?php Util_Ui::e_config_label( 'minify.html.strip.crlf' ) ?></label><br />
|
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( !defined( 'W3TC' ) )
|
||||
die();
|
||||
|
||||
?>
|
||||
<?php $this->checkbox( 'minify.htmltidy.options.clean', false, 'html_' ) ?> <?php Util_Ui::e_config_label( 'minify.htmltidy.options.clean' ) ?></label><br />
|
||||
<?php $this->checkbox( 'minify.htmltidy.options.hide-comments', false, 'html_' ) ?> <?php Util_Ui::e_config_label( 'minify.htmltidy.options.hide-comments' ) ?></label><br />
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( !defined( 'W3TC' ) )
|
||||
die();
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<th><label for="minify_htmltidy_options_wrap"><?php Util_Ui::e_config_label( 'minify.htmltidy.options.wrap' ) ?></label></th>
|
||||
<td>
|
||||
<input id="minify_htmltidy_options_wrap" class="html_enabled" type="text"
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ) ?> name="minify__htmltidy__options__wrap" value="<?php echo esc_attr( $this->_config->get_integer( 'minify.htmltidy.options.wrap' ) ); ?>" size="8" style="text-align: right;" /> _e('symbols (set to 0 to disable)', 'w3-total-cache'); ?>
|
||||
</td>
|
||||
</tr>
|
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( !defined( 'W3TC' ) )
|
||||
die();
|
||||
|
||||
?>
|
||||
<?php $this->checkbox( 'minify.js.strip.comments', false, 'js_' ) ?> <?php Util_Ui::e_config_label( 'minify.js.strip.comments' ) ?></label><br />
|
||||
<?php $this->checkbox( 'minify.js.strip.crlf', false, 'js_' ) ?> <?php Util_Ui::e_config_label( 'minify.js.strip.crlf' ) ?></label><br />
|
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
$c = $this->_config;
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="minify__yuicss__path__java">
|
||||
<?php Util_Ui::e_config_label( 'minify.yuicss.path.java' ); ?>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input class="css_enabled" id="minify__yuicss__path__java" type="text"
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ); ?>
|
||||
name="minify__yuicss__path__java" value="<?php echo esc_attr( $c->get_string( 'minify.yuicss.path.java' ) ); ?>"
|
||||
size="100" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="minify__yuicss__path__jar"><?php Util_Ui::e_config_label( 'minify.yuicss.path.jar' ); ?></label></th>
|
||||
<td>
|
||||
<input class="css_enabled" id="minify__yuicss__path__jar" type="text"
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ); ?>
|
||||
name="minify__yuicss__path__jar"
|
||||
value="<?php echo esc_attr( $c->get_string( 'minify.yuicss.path.jar' ) ); ?>"
|
||||
size="100" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<td>
|
||||
<input class="minifier_test button css_enabled {type: 'yuicss', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}"
|
||||
type="button" value="<?php esc_attr_e( 'Test YUI Compressor', 'w3-total-cache' ); ?>" />
|
||||
<span class="minifier_test_status w3tc-status w3tc-process"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<label for="minify_yuicss_options_line-break">
|
||||
<?php Util_Ui::e_config_label( 'minify.yuicss.options.line-break' ); ?>
|
||||
</label>
|
||||
</th>
|
||||
<td>
|
||||
<input class="css_enabled" id="minify_yuicss_options_line-break"
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ); ?>
|
||||
type="text" name="minify__yuicss__options__line-break"
|
||||
value="<?php echo esc_attr( $c->get_integer( 'minify.yuicss.options.line-break' ) ); ?>"
|
||||
size="8" style="text-align: right" /> symbols (set to 0 to disable)
|
||||
</td>
|
||||
</tr>
|
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( !defined( 'W3TC' ) )
|
||||
die();
|
||||
|
||||
?>
|
||||
<?php $this->checkbox( 'minify.yuijs.options.nomunge', false, 'js_' ) ?> <?php Util_Ui::e_config_label( 'minify.yuijs.options.nomunge' ) ?></label><br />
|
||||
<?php $this->checkbox( 'minify.yuijs.options.preserve-semi', false, 'js_' ) ?> <?php Util_Ui::e_config_label( 'minify.yuijs.options.preserve-semi' ) ?></label><br />
|
||||
<?php $this->checkbox( 'minify.yuijs.options.disable-optimizations', false, 'js_' ) ?> <?php Util_Ui::e_config_label( 'minify.yuijs.options.disable-optimizations' ) ?></label><br />
|
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<th><label for="minify__yuijs__path__java"><?php esc_html_e( 'Path to JAVA executable:', 'w3-total-cache' ); ?></label></th>
|
||||
<td>
|
||||
<input id="minify__yuijs__path__java" class="js_enabled" type="text"
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ); ?> name="minify__yuijs__path__java"
|
||||
value="<?php echo esc_attr( $this->_config->get_string( 'minify.yuijs.path.java' ) ); ?>"
|
||||
size="100" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="minify__yuijs__path__jar"><?php esc_html_e( 'Path to JAR file:', 'w3-total-cache' ); ?></label></th>
|
||||
<td>
|
||||
<input id="minify__yuijs__path__jar" class="js_enabled" type="text"
|
||||
<?php Util_Ui::sealing_disabled( 'minify.' ); ?> name="minify__yuijs__path__jar"
|
||||
value="<?php echo esc_attr( $this->_config->get_string( 'minify.yuijs.path.jar' ) ); ?>"
|
||||
size="100" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<td>
|
||||
<input class="minifier_test button js_enabled {type: 'yuijs', nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}"
|
||||
type="button" value="<?php esc_attr_e( 'Test YUI Compressor', 'w3-total-cache' ); ?>" />
|
||||
<span class="minifier_test_status w3tc-status w3tc-process"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="minify__yuijs__options__line-break"><?php Util_Ui::e_config_label( 'minify.yuijs.options.line-break' ); ?></label></th>
|
||||
<td>
|
||||
<input id="minify__yuijs__options__line-break" class="js_enabled"
|
||||
type="text" <?php Util_Ui::sealing_disabled( 'minify.' ); ?>
|
||||
name="minify__yuijs__options__line-break" value="<?php echo esc_attr( $this->_config->get_integer( 'minify.yuijs.options.line-break' ) ); ?>"
|
||||
size="8" style="text-align: right;" /> <?php esc_html_e( 'symbols (set to 0 to disable)', 'w3-total-cache' ); ?>
|
||||
</td>
|
||||
</tr>
|
141
wp-content/plugins/w3-total-cache/inc/options/objectcache.php
Normal file
141
wp-content/plugins/w3-total-cache/inc/options/objectcache.php
Normal file
@ -0,0 +1,141 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
?>
|
||||
<?php require W3TC_INC_DIR . '/options/common/header.php'; ?>
|
||||
|
||||
<form action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 HTML strong tag containing Objectcache Engine value, 2 HTML span tag containing Objectcache Engine enabled/disabled value.
|
||||
__(
|
||||
'Object caching via %1$s is currently %2$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<strong>' . Cache::engine_name( $this->_config->get_string( 'objectcache.engine' ) ) . '</strong>',
|
||||
'<span class="w3tc-' . ( $objectcache_enabled ? 'enabled">' . esc_html__( 'enabled', 'w3-total-cache' ) : 'disabled">' . esc_html__( 'disabled', 'w3-total-cache' ) ) . '</span>'
|
||||
),
|
||||
array(
|
||||
'strong' => array(),
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php esc_html_e( 'To rebuild the object cache use the', 'w3-total-cache' ); ?>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
Util_Ui::nonce_field( 'w3tc' ),
|
||||
array(
|
||||
'input' => array(
|
||||
'type' => array(),
|
||||
'name' => array(),
|
||||
'value' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<input type="submit" name="w3tc_flush_objectcache" value="<?php esc_attr_e( 'empty cache', 'w3-total-cache' ); ?>"
|
||||
<?php echo ! $objectcache_enabled ? ' disabled="disabled"' : ''; ?> class="button" /><?php esc_html_e( ' operation.', 'w3-total-cache' ); ?>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<form action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
|
||||
<div class="metabox-holder">
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'Advanced', 'w3-total-cache' ), '', 'advanced' ); ?>
|
||||
<table class="form-table">
|
||||
<?php
|
||||
if ( 'memcached' === $this->_config->get_string( 'objectcache.engine' ) ) {
|
||||
$module = 'objectcache';
|
||||
include W3TC_INC_DIR . '/options/parts/memcached.php';
|
||||
} elseif ( 'redis' === $this->_config->get_string( 'objectcache.engine' ) ) {
|
||||
$module = 'objectcache';
|
||||
include W3TC_INC_DIR . '/options/parts/redis.php';
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<th style="width: 250px;"><label for="objectcache_lifetime"><?php Util_Ui::e_config_label( 'objectcache.lifetime' ); ?></label></th>
|
||||
<td>
|
||||
<input id="objectcache_lifetime" type="text"
|
||||
<?php Util_Ui::sealing_disabled( 'objectcache.' ); ?> name="objectcache__lifetime" value="<?php echo esc_attr( $this->_config->get_integer( 'objectcache.lifetime' ) ); ?>" size="8" /> <?php esc_html_e( 'seconds', 'w3-total-cache' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Determines the natural expiration time of unchanged cache items. The higher the value, the larger the cache.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="objectcache_file_gc"><?php Util_Ui::e_config_label( 'objectcache.file.gc' ); ?></label></th>
|
||||
<td>
|
||||
<input id="objectcache_file_gc" type="text"
|
||||
<?php Util_Ui::sealing_disabled( 'objectcache.' ); ?> name="objectcache__file__gc" value="<?php echo esc_attr( $this->_config->get_integer( 'objectcache.file.gc' ) ); ?>" size="8" /> <?php esc_html_e( 'seconds', 'w3-total-cache' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="objectcache_groups_global"><?php Util_Ui::e_config_label( 'objectcache.groups.global' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="objectcache_groups_global"
|
||||
<?php Util_Ui::sealing_disabled( 'objectcache.' ); ?> name="objectcache__groups__global" cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'objectcache.groups.global' ) ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Groups shared amongst sites in network mode.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="objectcache_groups_nonpersistent"><?php Util_Ui::e_config_label( 'objectcache.groups.nonpersistent' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="objectcache_groups_nonpersistent"
|
||||
<?php Util_Ui::sealing_disabled( 'objectcache.' ); ?> name="objectcache__groups__nonpersistent" cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'objectcache.groups.nonpersistent' ) ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Groups that should not be cached.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'objectcache.enabled_for_wp_admin' ); ?><?php esc_html_e( 'Enable caching for wp-admin requests', 'w3-total-cache' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Enabling this option will increase wp-admin performance, but may cause side-effects', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'objectcache.fallback_transients' ); ?><?php esc_html_e( 'Store transients in database', 'w3-total-cache' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Use that to store transients in database even when external cache is used. That allows transient values to survive object cache cleaning / expiration', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<?php if ( $this->_config->get_boolean( 'cluster.messagebus.enabled' ) ) : ?>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'objectcache.purge.all' ); ?> <?php Util_Ui::e_config_label( 'objectcache.purge.all' ); ?></label>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML em tag, 2 closing HTML em tag.
|
||||
__(
|
||||
'Enabling this option will increase load on server on certain actions but will guarantee that the Object Cache is always clean and contains latest changes. %1$sEnable if you are experiencing issues with options displaying wrong value/state (checkboxes etc).%2$2',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<em>',
|
||||
'</em>'
|
||||
),
|
||||
array(
|
||||
'em' => array(),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
</table>
|
||||
|
||||
<?php Util_Ui::button_config_save( 'objectcache' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>
|
@ -0,0 +1,63 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="w3tc_dashboard_banner" class="metabox-holder">
|
||||
<div class="postbox">
|
||||
<div class="w3tc-postbox-ad">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// Translators: 1 HTML line break, 2 opening HTML a tag to W3TC Support admin page, 3 closing HTML a tag.
|
||||
__(
|
||||
'Did you know that we offer premium support services?%1$s Our experts will configure W3 Total Cache for you! %2$sClick here for info%3$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<br />',
|
||||
'<a href="' . esc_url( admin_url( 'admin.php?page=w3tc_support' ) ) . '">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
'br' => array(),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<h3 class="hndle">
|
||||
<img style="height:32px;" src="<?php echo esc_url( plugins_url( 'w3-total-cache/pub/img/W3TC_dashboard_logo_title.png' ) ); ?>" />
|
||||
</h3>
|
||||
<div class="inside">
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// Translators: 1 opening HTML strong tag, 2 closing HTML strong tag.
|
||||
__(
|
||||
'You\'re using the Community Edition of W3 Total Cache. Maximize your website\'s speed even more by upgrading to %1$sW3 Total Cache Pro%2$s to unlock advanced anaytics, fragment caching, full site delivery, extension support and other tools that will allow you to completely fine tune your website\'s performance.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<strong>',
|
||||
'</strong>'
|
||||
),
|
||||
array(
|
||||
'strong' => array(),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<input
|
||||
type="button"
|
||||
class="button w3tc-gopro-button button-buy-plugin"
|
||||
data-src="dashboard_banner" value="<?php esc_attr_e( 'Learn more about Pro', 'w3-total-cache' ); ?>" />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,149 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
/*
|
||||
* Requires $module variable
|
||||
*/
|
||||
?>
|
||||
<tr>
|
||||
<th><label for="memcached_servers"><?php echo wp_kses( Util_ConfigLabel::get( 'memcached.servers' ), array( 'acronym' => array( 'title' => array() ) ) ); ?></label></th>
|
||||
<td>
|
||||
<input id="memcached_servers" type="text"
|
||||
name="<?php echo esc_attr( $module ); ?>__memcached__servers"
|
||||
<?php Util_Ui::sealing_disabled( $module ); ?>
|
||||
value="<?php echo esc_attr( implode( ',', $this->_config->get_array( $module . '.memcached.servers' ) ) ); ?>" size="80" />
|
||||
<input id="memcached_test" class="button {nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}"
|
||||
<?php Util_Ui::sealing_disabled( $module ); ?>
|
||||
type="button" value="<?php esc_attr_e( 'Test', 'w3-total-cache' ); ?>" />
|
||||
<span id="memcached_test_status" class="w3tc-status w3tc-process"></span>
|
||||
<p class="description"><?php esc_html_e( 'Multiple servers may be used and seperated by a comma; e.g. 192.168.1.100:11211, domain.com:22122', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label><?php esc_html_e( 'Use persistent connection:', 'w3-total-cache' ); ?></label></th>
|
||||
<td>
|
||||
<?php $this->checkbox( $module . '.memcached.persistent' ); ?> <?php echo wp_kses( Util_ConfigLabel::get( 'memcached.persistent' ), array( 'acronym' => array( 'title' => array() ) ) ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Using persistent connection doesn\'t reinitialize memcached driver on each request', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label><?php esc_html_e( 'Node Auto Discovery:', 'w3-total-cache' ); ?></label></th>
|
||||
<td>
|
||||
<label>
|
||||
<?php $this->checkbox( $module . '.memcached.aws_autodiscovery', ! Util_Installed::memcached_aws() ); ?>
|
||||
Amazon Node Auto Discovery
|
||||
</label>
|
||||
<p class="description">
|
||||
<?php
|
||||
if ( ! Util_Installed::memcached_aws() ) {
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'ElastiCache %1$sPHP%2$s module not found',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . __( 'Hypertext Preprocessor', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
} else {
|
||||
esc_html_e( 'When Amazon ElastiCache used, specify configuration endpoint as Memcached host', 'w3-total-cache' );
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label><?php esc_html_e( 'Use binary protocol:', 'w3-total-cache' ); ?></label></th>
|
||||
<td>
|
||||
<?php $this->checkbox( $module . '.memcached.binary_protocol' ); ?> <?php echo wp_kses( Util_ConfigLabel::get( 'memcached.binary_protocol' ), array( 'acronym' => array( 'title' => array() ) ) ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Using binary protocol can increase throughput.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><label for="memcached_username"><?php echo wp_kses( Util_ConfigLabel::get( 'memcached.username' ), array( 'acronym' => array( 'title' => array() ) )); ?></label></th>
|
||||
<td>
|
||||
<input id="memcached_username" name="<?php echo esc_attr( $module ); ?>__memcached__username" type="text"
|
||||
<?php Util_Ui::sealing_disabled( $module ); ?>
|
||||
<?php $this->value_with_disabled( $module . '.memcached.username', ! Util_Installed::memcached_auth(), '' ); ?> />
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Specify memcached username, when %1$sSASL%2$s authentication used',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . __( 'Simple Authentication and Security Layer', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
if ( ! Util_Installed::memcached_auth() ) {
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 HTML line break, 2 opening HTML acronym tag, 3 closing HTML acronym tag.
|
||||
__(
|
||||
'%1$sAvailable when memcached extension installed, built with %2$sSASL%3$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'</ br>',
|
||||
'<acronym title="' . __( 'Simple Authentication and Security Layer', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'br' => array(),
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="memcached_password"><?php echo wp_kses( Util_ConfigLabel::get( 'memcached.password' ), array( 'acronym' => array( 'title' => array() ) ) ); ?></label></th>
|
||||
<td>
|
||||
<input id="memcached_password" name="<?php echo esc_attr( $module ); ?>__memcached__password" type="text"
|
||||
<?php Util_Ui::sealing_disabled( $module ); ?>
|
||||
<?php $this->value_with_disabled( $module . '.memcached.password', ! Util_Installed::memcached_auth(), '' ); ?> />
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Specify memcached password, when %1$sSASL%2$s authentication used',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . __( 'Simple Authentication and Security Layer', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
$config = Dispatcher::config();
|
||||
|
||||
/*
|
||||
* Requires $module variable
|
||||
*/
|
||||
?>
|
||||
<tr>
|
||||
<th><label for="memcached_servers"><?php echo wp_kses( Util_ConfigLabel::get( 'memcached.servers' ), array( 'acronym' => array( 'title' => array() ) ) ); ?></label></th>
|
||||
<td>
|
||||
<input id="memcached_servers" type="text"
|
||||
name="<?php echo esc_attr( $module ); ?>___memcached__servers"
|
||||
<?php Util_Ui::sealing_disabled( $module ); ?>
|
||||
value="<?php echo esc_attr( implode( ',', $config->get_array( array( $module, 'memcached.servers' ) ) ) ); ?>" size="80" />
|
||||
<input id="memcached_test" class="button {nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}"
|
||||
<?php Util_Ui::sealing_disabled( $module ); ?>
|
||||
type="button" value="<?php esc_attr_e( 'Test', 'w3-total-cache' ); ?>" />
|
||||
<span id="memcached_test_status" class="w3tc-status w3tc-process"></span>
|
||||
<p class="description"><?php esc_html_e( 'Multiple servers may be used and seperated by a comma; e.g. 192.168.1.100:11211, domain.com:22122', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
Util_Ui::config_item(
|
||||
array(
|
||||
'key' => array( $module, 'memcached.persistent' ),
|
||||
'label' => __( 'Use persistent connection:', 'w3-total-cache' ),
|
||||
'control' => 'checkbox',
|
||||
'checkbox_label' => Util_ConfigLabel::get( 'memcached.persistent' ),
|
||||
'description' => __( 'Using persistent connection doesn\'t reinitialize memcached driver on each request', 'w3-total-cache' ),
|
||||
)
|
||||
);
|
||||
|
||||
Util_Ui::config_item(
|
||||
array(
|
||||
'key' => array( $module, 'memcached.aws_autodiscovery' ),
|
||||
'label' => __( 'Node Auto Discovery:', 'w3-total-cache' ),
|
||||
'control' => 'checkbox',
|
||||
'checkbox_label' => 'Amazon Node Auto Discovery',
|
||||
'disabled' => ( Util_Installed::memcached_aws() ? null : true ),
|
||||
'description' =>
|
||||
( ! Util_Installed::memcached_aws() ?
|
||||
__( 'ElastiCache <acronym title="Hypertext Preprocessor">PHP</acronym> module not found', 'w3-total-cache' ) :
|
||||
__( 'When Amazon ElastiCache used, specify configuration endpoint as Memecached host', 'w3-total-cache' )
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
Util_Ui::config_item(
|
||||
array(
|
||||
'key' => array( $module, 'memcached.username' ),
|
||||
'label' => Util_ConfigLabel::get( 'memcached.username' ),
|
||||
'control' => 'textbox',
|
||||
'disabled' => ( Util_Installed::memcache_auth() ? null : true ),
|
||||
'description' =>
|
||||
__( 'Specify memcached username, when <acronym title="Simple Authentication and Security Layer">SASL</acronym> authentication used', 'w3-total-cache' ) .
|
||||
( Util_Installed::memcache_auth() ? '' :
|
||||
__( '<br>Available when memcached extension installed, built with <acronym title="Simple Authentication and Security Layer">SASL</acronym>', 'w3-total-cache' )
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
Util_Ui::config_item(
|
||||
array(
|
||||
'key' => array( $module, 'memcached.password' ),
|
||||
'label' => Util_ConfigLabel::get( 'memcached.password' ),
|
||||
'control' => 'textbox',
|
||||
'disabled' => ( Util_Installed::memcache_auth() ? null : true ),
|
||||
'description' => __( 'Specify memcached password, when <acronym title="Simple Authentication and Security Layer">SASL</acronym> authentication used', 'w3-total-cache' ),
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
128
wp-content/plugins/w3-total-cache/inc/options/parts/redis.php
Normal file
128
wp-content/plugins/w3-total-cache/inc/options/parts/redis.php
Normal file
@ -0,0 +1,128 @@
|
||||
<?php
|
||||
/**
|
||||
* File: redis.php
|
||||
*
|
||||
* @package W3TC
|
||||
*/
|
||||
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
/*
|
||||
* Requires $module variable
|
||||
*/
|
||||
?>
|
||||
<tr>
|
||||
<th><label for="redis_servers"><?php echo wp_kses( Util_ConfigLabel::get( 'redis.servers' ), array( 'acronym' => array( 'title' => array() ) ) ); ?></label></th>
|
||||
<td>
|
||||
<input id="redis_servers" type="text"
|
||||
name="<?php echo esc_attr( $module ); ?>__redis__servers"
|
||||
<?php Util_Ui::sealing_disabled( $module ); ?>
|
||||
value="<?php echo esc_attr( implode( ',', $this->_config->get_array( $module . '.redis.servers' ) ) ); ?>"
|
||||
size="100" />
|
||||
<input class="w3tc_common_redis_test button {nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}"
|
||||
<?php Util_Ui::sealing_disabled( $module ); ?>
|
||||
type="button" value="<?php esc_attr_e( 'Test', 'w3-total-cache' ); ?>" />
|
||||
<span class="w3tc_common_redis_test_result w3tc-status w3tc-process"></span>
|
||||
<p class="description"><?php esc_html_e( 'Multiple servers may be used and seperated by a comma; e.g. 192.168.1.100:11211, domain.com:22122. To use TLS, prefix server with tls://', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
// PHP Redis 5.3.2+ supports SSL/TLS.
|
||||
if ( version_compare( phpversion( 'redis' ), '5.3.2', '>=' ) ) {
|
||||
?>
|
||||
<tr>
|
||||
<th><label><?php esc_html_e( 'Verify TLS Certificates:', 'w3-total-cache' ); ?></label></th>
|
||||
<td>
|
||||
<?php $this->checkbox( $module . '.redis.verify_tls_certificates' ); ?> <?php echo wp_kses( Util_ConfigLabel::get( 'redis.verify_tls_certificates' ), array( 'acronym' => array( 'title' => array() ) ) ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Verify the server\'s certificate when connecting via TLS.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<th><label><?php esc_html_e( 'Use persistent connection:', 'w3-total-cache' ); ?></label></th>
|
||||
<td>
|
||||
<?php $this->checkbox( $module . '.redis.persistent' ); ?> <?php echo wp_kses( Util_ConfigLabel::get( 'redis.persistent' ), array( 'acronym' => array( 'title' => array() ) ) ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Using persistent connection doesn\'t reinitialize redis driver on each request', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 250px;"><label for="redis_timeout"><?php echo wp_kses( Util_ConfigLabel::get( 'redis.timeout' ), array( 'acronym' => array( 'title' => array() ) ) ); ?></label></th>
|
||||
<td>
|
||||
<input id="redis_timeout" type="number" name="<?php echo esc_attr( $module ); ?>__redis__timeout"
|
||||
<?php Util_Ui::sealing_disabled( $module ); ?>
|
||||
value="<?php echo esc_attr( $this->_config->get_integer( $module . '.redis.timeout' ) ); ?>"
|
||||
size="8" step="1" min="0" />
|
||||
<p class="description"><?php esc_html_e( 'In seconds', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="width: 250px;"><label for="redis_retry_interval"><?php echo wp_kses( Util_ConfigLabel::get( 'redis.retry_interval' ), array( 'acronym' => array( 'title' => array() ) ) ); ?></label></th>
|
||||
<td>
|
||||
<input id="redis_retry_interval" type="number" name="<?php echo esc_attr( $module ); ?>__redis__retry_interval"
|
||||
<?php Util_Ui::sealing_disabled( $module ); ?>
|
||||
value="<?php echo esc_attr( $this->_config->get_integer( $module . '.redis.retry_interval' ) ); ?>"
|
||||
size="8" step="100" min="0" />
|
||||
<p class="description"><?php esc_html_e( 'In miliseconds', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
// PHP Redis 3.1.3+ supports the read_timeout setting.
|
||||
if ( version_compare( phpversion( 'redis' ), '3.1.3', '>=' ) ) {
|
||||
?>
|
||||
<tr>
|
||||
<th style="width: 250px;"><label for="redis_read_timeout"><?php echo wp_kses( Util_ConfigLabel::get( 'redis.read_timeout' ), array( 'acronym' => array( 'title' => array() ) ) ); ?></label></th>
|
||||
<td>
|
||||
<input id="redis_read_timeout" type="number" name="<?php echo esc_attr( $module ); ?>__redis__read_timeout"
|
||||
<?php Util_Ui::sealing_disabled( $module ); ?>
|
||||
value="<?php echo esc_attr( $this->_config->get_integer( $module . '.redis.read_timeout' ) ); ?>"
|
||||
size="8" step="1" min="0" />
|
||||
<p class="description"><?php esc_html_e( 'In seconds', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<th style="width: 250px;"><label for="redis_dbid"><?php echo wp_kses( Util_ConfigLabel::get( 'redis.dbid' ), array( 'acronym' => array( 'title' => array() ) ) ); ?></label></th>
|
||||
<td>
|
||||
<input id="redis_dbid" type="text" name="<?php echo esc_attr( $module ); ?>__redis__dbid"
|
||||
<?php Util_Ui::sealing_disabled( $module ); ?>
|
||||
value="<?php echo esc_attr( $this->_config->get_integer( $module . '.redis.dbid' ) ); ?>"
|
||||
size="8" />
|
||||
<p class="description"><?php esc_html_e( 'Database ID to use', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="redis_password"><?php echo wp_kses( Util_ConfigLabel::get( 'redis.password' ), array( 'acronym' => array( 'title' => array() ) ) ); ?></label></th>
|
||||
<td>
|
||||
<input id="redis_password" name="<?php echo esc_attr( $module ); ?>__redis__password" type="text"
|
||||
<?php Util_Ui::sealing_disabled( $module ); ?>
|
||||
<?php $this->value_with_disabled( $module . '.redis.password', false, '' ); ?> />
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Specify redis password, when %1$sSASL%2$s authentication used',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . __( 'Simple Authentication and Security Layer', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
@ -0,0 +1,106 @@
|
||||
<?php
|
||||
/**
|
||||
* File: redis_extension.php
|
||||
*
|
||||
* @package W3TC
|
||||
*/
|
||||
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
/*
|
||||
* Requires $module variable
|
||||
*/
|
||||
$config = Dispatcher::config();
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<th><label for="redis_servers"><?php echo wp_kses( Util_ConfigLabel::get( 'redis.servers' ), array( 'acronym' => array( 'title' => array() ) ) ); ?></label></th>
|
||||
<td>
|
||||
<input id="redis_servers" type="text"
|
||||
name="<?php echo esc_attr( $module ); ?>___redis__servers"
|
||||
<?php Util_Ui::sealing_disabled( $module ); ?>
|
||||
value="<?php echo esc_attr( implode( ',', $config->get_array( array( $module, 'redis.servers' ) ) ) ); ?>"
|
||||
size="100" />
|
||||
<input class="w3tc_common_redis_test button {nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}"
|
||||
<?php Util_Ui::sealing_disabled( $module ); ?>
|
||||
type="button" value="<?php esc_attr_e( 'Test', 'w3-total-cache' ); ?>" />
|
||||
<span class="w3tc_common_redis_test_result w3tc-status w3tc-process"></span>
|
||||
<p class="description"><?php esc_html_e( 'Multiple servers may be used and seperated by a comma; e.g. 192.168.1.100:11211, domain.com:22122. To use TLS, prefix server with tls://', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
Util_Ui::config_item(
|
||||
array(
|
||||
'key' => array( $module, 'redis.verify_tls_certificates' ),
|
||||
'label' => Util_ConfigLabel::get( 'redis.verify_tls_certificates' ),
|
||||
'control' => 'checkbox',
|
||||
'checkbox_label' => Util_ConfigLabel::get( 'redis.verify_tls_certificates' ),
|
||||
'description' => __( 'Verify the server\'s certificate when connecting via TLS.', 'w3-total-cache' ),
|
||||
)
|
||||
);
|
||||
|
||||
Util_Ui::config_item(
|
||||
array(
|
||||
'key' => array( $module, 'redis.persistent' ),
|
||||
'label' => __( 'Use persistent connection:', 'w3-total-cache' ),
|
||||
'control' => 'checkbox',
|
||||
'checkbox_label' => Util_ConfigLabel::get( 'redis.persistent' ),
|
||||
'description' => __( 'Using persistent connection doesn\'t reinitialize memcached driver on each request', 'w3-total-cache' ),
|
||||
)
|
||||
);
|
||||
|
||||
Util_Ui::config_item(
|
||||
array(
|
||||
'key' => array( $module, 'redis.timeout' ),
|
||||
'label' => Util_ConfigLabel::get( 'redis.timeout' ),
|
||||
'control' => 'textbox',
|
||||
'textbox_type' => 'number',
|
||||
'description' => __( 'In seconds', 'w3-total-cache' ),
|
||||
)
|
||||
);
|
||||
|
||||
Util_Ui::config_item(
|
||||
array(
|
||||
'key' => array( $module, 'redis.retry_interval' ),
|
||||
'label' => Util_ConfigLabel::get( 'redis.retry_interval' ),
|
||||
'control' => 'textbox',
|
||||
'textbox_type' => 'number',
|
||||
'description' => __( 'In miliseconds', 'w3-total-cache' ),
|
||||
)
|
||||
);
|
||||
|
||||
if ( version_compare( phpversion( 'redis' ), '5', '>=' ) ) {
|
||||
// PHP Redis 5 supports the read_timeout setting.
|
||||
Util_Ui::config_item(
|
||||
array(
|
||||
'key' => array( $module, 'redis.read_timeout' ),
|
||||
'label' => Util_ConfigLabel::get( 'redis.read_timeout' ),
|
||||
'control' => 'textbox',
|
||||
'textbox_type' => 'number',
|
||||
'description' => __( 'In seconds', 'w3-total-cache' ),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Util_Ui::config_item(
|
||||
array(
|
||||
'key' => array( $module, 'redis.dbid' ),
|
||||
'label' => Util_ConfigLabel::get( 'redis.dbid' ),
|
||||
'control' => 'textbox',
|
||||
'description' => __( 'Database ID to use', 'w3-total-cache' ),
|
||||
)
|
||||
);
|
||||
|
||||
Util_Ui::config_item(
|
||||
array(
|
||||
'key' => array( $module, 'redis.password' ),
|
||||
'label' => Util_ConfigLabel::get( 'redis.password' ),
|
||||
'control' => 'textbox',
|
||||
'description' => __( 'Specify redis password', 'w3-total-cache' ),
|
||||
)
|
||||
);
|
884
wp-content/plugins/w3-total-cache/inc/options/pgcache.php
Normal file
884
wp-content/plugins/w3-total-cache/inc/options/pgcache.php
Normal file
@ -0,0 +1,884 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
?>
|
||||
<?php require W3TC_INC_DIR . '/options/common/header.php'; ?>
|
||||
|
||||
<form action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 HTML strong tag containing PageCache Engine name, 2 HTML span tag containing PageCache Engine enabled/disabled.
|
||||
__(
|
||||
'Page caching via %1$s is currently %2$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<strong>' . esc_html( Cache::engine_name( $this->_config->get_string( 'pgcache.engine' ) ) ) . '</strong>',
|
||||
'<span class="w3tc-' . ( $pgcache_enabled ? 'enabled">' . esc_html__( 'enabled', 'w3-total-cache' ) : 'disabled">' . esc_html__( 'disabled', 'w3-total-cache' ) ) . '</span>.'
|
||||
),
|
||||
array(
|
||||
'strong' => array(),
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 Nonce Field followed by submit HTML input to flush PageCache.
|
||||
__(
|
||||
'To rebuild the page cache use the %1$s operation',
|
||||
'w3-total-cache'
|
||||
),
|
||||
Util_Ui::nonce_field( 'w3tc' ) . '<input type="submit" name="w3tc_flush_pgcache" value="empty cache"' . disabled( $pgcache_enabled, false, false ) . ' class="button" />'
|
||||
),
|
||||
array(
|
||||
'input' => array(
|
||||
'type' => array(),
|
||||
'name' => array(),
|
||||
'value' => array(),
|
||||
'disabled' => array(),
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<form action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
|
||||
<div class="metabox-holder">
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'General', 'w3-total-cache' ), '', 'general' ); ?>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th>
|
||||
<?php $this->checkbox( 'pgcache.cache.home' ); ?> <?php Util_Ui::e_config_label( 'pgcache.cache.home' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'For many blogs this is your most visited page, it is recommended that you cache it.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<?php if ( 'posts' !== get_option( 'show_on_front' ) ) : ?>
|
||||
<tr>
|
||||
<th>
|
||||
<?php $this->checkbox( 'pgcache.reject.front_page' ); ?> <?php Util_Ui::e_config_label( 'pgcache.reject.front_page' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'By default the front page is cached when using static front page in reading settings.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<th>
|
||||
<?php $this->checkbox( 'pgcache.cache.feed' ); ?> <?php Util_Ui::e_config_label( 'pgcache.cache.feed' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Even if using a feed proxy service enabling this option is still recommended.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<?php $this->checkbox( 'pgcache.cache.ssl' ); ?> <?php Util_Ui::e_config_label( 'pgcache.cache.ssl' ); ?></label>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Cache %1$sSSL%2$s requests (uniquely) for improved performance.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Secure Socket Layer', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<?php
|
||||
$this->checkbox(
|
||||
'pgcache.cache.query',
|
||||
( 'file_generic' === $this->_config->get_string( 'pgcache.engine' ) ),
|
||||
'',
|
||||
true,
|
||||
( 'file_generic' === $this->_config->get_string( 'pgcache.engine' ) ? 0 : null )
|
||||
);
|
||||
?>
|
||||
<?php Util_Ui::e_config_label( 'pgcache.cache.query', 'settings' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Search result (and similar) pages will be cached if enabled.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<?php $this->checkbox( 'pgcache.cache.404' ); ?> <?php Util_Ui::e_config_label( 'pgcache.cache.404' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Reduce server load by caching 404 pages. If the disk enhanced method of disk caching is used, 404 pages will be returned with a 200 response code. Use at your own risk.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<?php $this->checkbox( 'pgcache.reject.logged' ); ?> <?php Util_Ui::e_config_label( 'pgcache.reject.logged' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Unauthenticated users may view a cached version of the last authenticated user\'s view of a given page. Disabling this option is not recommended.', 'w3-total-cache' ); ?></p>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
<?php $this->checkbox( 'pgcache.reject.logged_roles' ); ?> <?php Util_Ui::e_config_label( 'pgcache.reject.logged_roles' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Select user roles that should not receive cached pages:', 'w3-total-cache' ); ?></p>
|
||||
|
||||
<div id="pgcache_reject_roles" class="w3tc_reject_roles">
|
||||
<?php $saved_roles = $this->_config->get_array( 'pgcache.reject.roles' ); ?>
|
||||
<input type="hidden" name="pgcache__reject__roles" value="" /><br />
|
||||
<?php foreach ( get_editable_roles() as $role_name => $role_data ) : ?>
|
||||
<input type="checkbox" name="pgcache__reject__roles[]" value="<?php echo esc_attr( $role_name ); ?>" <?php checked( in_array( $role_name, $saved_roles, true ) ); ?> id="role_<?php echo esc_attr( $role_name ); ?>" />
|
||||
<label for="role_<?php echo esc_attr( $role_name ); ?>"><?php echo esc_html( $role_data['name'] ); ?></label>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php Util_Ui::button_config_save( 'pagecache_general' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'Aliases', 'w3-total-cache' ), '', 'mirrors' ); ?>
|
||||
<table class="form-table">
|
||||
<?php
|
||||
Util_Ui::config_item(
|
||||
array(
|
||||
'key' => 'pgcache.mirrors.enabled',
|
||||
'control' => 'checkbox',
|
||||
'label' => esc_html__( 'Cache alias hostnames:', 'w3-total-cache' ),
|
||||
'checkbox_label' => esc_html__( 'Enable', 'w3-total-cache' ),
|
||||
'enabled' => ! Util_Environment::is_wpmu_subdomain(),
|
||||
'description' => esc_html__( 'If the same WordPress content is accessed from different domains', 'w3-total-cache' ),
|
||||
)
|
||||
);
|
||||
Util_Ui::config_item(
|
||||
array(
|
||||
'key' => 'pgcache.mirrors.home_urls',
|
||||
'control' => 'textarea',
|
||||
'label' => wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opneing HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Additional home %1$sURL%2$ss:',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Uniform Resource Locator', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
'enabled' => ! Util_Environment::is_wpmu_subdomain(),
|
||||
'description' => wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag, 3 HTML line break tag,
|
||||
// translators: 4 HTML line break tag, 5 HTML line break tag.
|
||||
__(
|
||||
'Specify full home %1$sURL%2$ss of your mirrors so that plugin will flush it\'s cache when content is changed. For example:%3$s http://my-site.com%4$shttp://www.my-site.com%5$shttps://my-site.com',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="Uniform Resource Locator">',
|
||||
'</acronym>',
|
||||
'<br />',
|
||||
'<br />',
|
||||
'<br />'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
'br' => array(),
|
||||
)
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</table>
|
||||
<?php Util_Ui::button_config_save( 'pagecache_aliases' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'Cache Preload', 'w3-total-cache' ), '', 'cache_preload' ); ?>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'pgcache.prime.enabled' ); ?> <?php Util_Ui::e_config_label( 'pgcache.prime.enabled' ); ?></label><br />
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_prime_interval"><?php Util_Ui::e_config_label( 'pgcache.prime.interval' ); ?></label></th>
|
||||
<td>
|
||||
<input id="pgcache_prime_interval" type="text" name="pgcache__prime__interval"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache.' ); ?>
|
||||
value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.prime.interval' ) ); ?>" size="8" /> <?php esc_html_e( 'seconds', 'w3-total-cache' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'The number of seconds to wait before creating another set of cached pages.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_prime_limit"><?php Util_Ui::e_config_label( 'pgcache.prime.limit' ); ?></label></th>
|
||||
<td>
|
||||
<input id="pgcache_prime_limit" type="text" name="pgcache__prime__limit"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache.' ); ?>
|
||||
value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.prime.limit' ) ); ?>" size="8" />
|
||||
<p class="description"><?php esc_html_e( 'Limit the number of pages to create per batch. Fewer pages may be better for under-powered servers.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_prime_sitemap"><?php Util_Ui::e_config_label( 'pgcache.prime.sitemap' ); ?></label></th>
|
||||
<td>
|
||||
<input id="pgcache_prime_sitemap" type="text" name="pgcache__prime__sitemap"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache.' ); ?>
|
||||
value="<?php echo esc_attr( $this->_config->get_string( 'pgcache.prime.sitemap' ) ); ?>" size="100" />
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML a tag to XML Sitemap Validator tool, 2 closing HTML a tag,
|
||||
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag.
|
||||
__(
|
||||
'A %1$scompliant%2$s sitemap can be used to specify the pages to maintain in the primed cache. Pages will be cached according to the priorities specified in the %3$sXML%4$s file.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<a href="' . esc_url( 'http://www.xml-sitemaps.com/validate-xml-sitemap.html' ) . '" target="_blank">',
|
||||
'</a>',
|
||||
'<acronym title="' . esc_attr__( 'Extensible Markup Language', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
'target' => array(),
|
||||
),
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php $this->checkbox( 'pgcache.prime.post.enabled' ); ?> <?php Util_Ui::e_config_label( 'pgcache.prime.post.enabled' ); ?></label><br /> </th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php Util_Ui::button_config_save( 'pagecache_cache_preload' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
|
||||
<?php
|
||||
$modules = array();
|
||||
if ( $pgcache_enabled ) {
|
||||
$modules[] = 'Page Cache';
|
||||
}
|
||||
if ( $varnish_enabled ) {
|
||||
$modules [] = 'Reverse Proxy';
|
||||
}
|
||||
if ( $cdnfsd_enabled ) {
|
||||
$modules[] = 'CDN';
|
||||
}
|
||||
Util_Ui::postbox_header( esc_html__( 'Purge Policy: ', 'w3-total-cache' ) . implode( ', ', $modules ), '', 'purge_policy' );
|
||||
?>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php esc_html_e( 'Specify the pages and feeds to purge when posts are created, edited, or comments posted. The defaults are recommended because additional options may reduce server performance:', 'w3-total-cache' ); ?>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th style="padding-left: 0;">
|
||||
<?php if ( 'posts' !== get_option( 'show_on_front' ) ) : ?>
|
||||
<?php $this->checkbox( 'pgcache.purge.front_page' ); ?> <?php Util_Ui::e_config_label( 'pgcache.purge.front_page' ); ?></label><br />
|
||||
<?php endif; ?>
|
||||
<?php $this->checkbox( 'pgcache.purge.home' ); ?> <?php Util_Ui::e_config_label( 'pgcache.purge.home' ); ?></label><br />
|
||||
<?php $this->checkbox( 'pgcache.purge.post' ); ?> <?php Util_Ui::e_config_label( 'pgcache.purge.post' ); ?></label><br />
|
||||
<?php $this->checkbox( 'pgcache.purge.feed.blog' ); ?> <?php Util_Ui::e_config_label( 'pgcache.purge.feed.blog' ); ?></label><br />
|
||||
|
||||
</th>
|
||||
<th>
|
||||
<?php $this->checkbox( 'pgcache.purge.comments' ); ?> <?php Util_Ui::e_config_label( 'pgcache.purge.comments' ); ?></label><br />
|
||||
<?php $this->checkbox( 'pgcache.purge.author' ); ?> <?php Util_Ui::e_config_label( 'pgcache.purge.author' ); ?></label><br />
|
||||
<?php $this->checkbox( 'pgcache.purge.terms' ); ?> <?php Util_Ui::e_config_label( 'pgcache.purge.terms' ); ?></label><br />
|
||||
</th>
|
||||
<th>
|
||||
<?php $this->checkbox( 'pgcache.purge.feed.comments' ); ?> <?php Util_Ui::e_config_label( 'pgcache.purge.feed.comments' ); ?></label><br />
|
||||
<?php $this->checkbox( 'pgcache.purge.feed.author' ); ?> <?php Util_Ui::e_config_label( 'pgcache.purge.feed.author' ); ?></label><br />
|
||||
<?php $this->checkbox( 'pgcache.purge.feed.terms' ); ?> <?php Util_Ui::e_config_label( 'pgcache.purge.feed.terms' ); ?></label>
|
||||
</th>
|
||||
<th>
|
||||
<?php $this->checkbox( 'pgcache.purge.archive.daily' ); ?> <?php Util_Ui::e_config_label( 'pgcache.purge.archive.daily' ); ?></label><br />
|
||||
<?php $this->checkbox( 'pgcache.purge.archive.monthly' ); ?> <?php Util_Ui::e_config_label( 'pgcache.purge.archive.monthly' ); ?></label><br />
|
||||
<?php $this->checkbox( 'pgcache.purge.archive.yearly' ); ?> <?php Util_Ui::e_config_label( 'pgcache.purge.archive.yearly' ); ?></label><br />
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<?php Util_Ui::e_config_label( 'pgcache.purge.feed.types' ); ?><br />
|
||||
<input type="hidden" name="pgcache__purge__feed__types" value="" />
|
||||
<?php foreach ( $feeds as $feed ) : ?>
|
||||
<label>
|
||||
<input type="checkbox" name="pgcache__purge__feed__types[]"
|
||||
value="<?php echo esc_attr( $feed ); ?>"
|
||||
<?php checked( in_array( $feed, $this->_config->get_array( 'pgcache.purge.feed.types' ), true ), true ); ?>
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache.' ); ?>
|
||||
/>
|
||||
<?php echo esc_html( $feed ); ?>
|
||||
<?php echo $feed === $default_feed ? '(default)' : ''; ?></label><br />
|
||||
<?php endforeach; ?>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_purge_postpages_limit"><?php Util_Ui::e_config_label( 'pgcache.purge.postpages_limit' ); ?></label></th>
|
||||
<td>
|
||||
<input id="pgcache_purge_postpages_limit" name="pgcache__purge__postpages_limit" <?php Util_Ui::sealing_disabled( 'pgcache.' ); ?> type="text" value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.purge.postpages_limit' ) ); ?>" />
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 HTML line break tag.
|
||||
__(
|
||||
'Specify number of pages that lists posts (archive etc) that should be purged on post updates etc, i.e example.com/ ... example.com/page/5. %1$s0 means all pages that lists posts are purged, i.e example.com/page/2 ... .',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<br />'
|
||||
),
|
||||
array(
|
||||
'br' => array(),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_purge_pages"><?php Util_Ui::e_config_label( 'pgcache.purge.pages' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="pgcache_purge_pages" name="pgcache__purge__pages"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache.' ); ?>
|
||||
cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.purge.pages' ) ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Specify additional pages to purge. Including parent page in path. Ex: parent/posts.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_purge_sitemap_regex"><?php Util_Ui::e_config_label( 'pgcache.purge.sitemap_regex' ); ?></label></th>
|
||||
<td>
|
||||
<input id="pgcache_purge_sitemap_regex" name="pgcache__purge__sitemap_regex" <?php Util_Ui::sealing_disabled( 'pgcache.' ); ?> value="<?php echo esc_attr( $this->_config->get_string( 'pgcache.purge.sitemap_regex' ) ); ?>" type="text" />
|
||||
<p class="description"><?php esc_html_e( 'Specify a regular expression that matches your sitemaps.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php Util_Ui::button_config_save( 'pagecache_purge_policy' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
|
||||
<?php
|
||||
Util_Ui::postbox_header(
|
||||
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.
|
||||
__(
|
||||
'%1$sREST%2$s %3$sAPI%4$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'REpresentational State Transfer', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Application Programming Interface', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
'',
|
||||
'rest'
|
||||
);
|
||||
?>
|
||||
<table class="form-table">
|
||||
<?php
|
||||
Util_Ui::config_item(
|
||||
array(
|
||||
'key' => 'pgcache.rest',
|
||||
'label' => '<acronym title="REpresentational State Transfer">REST</acronym> <acronym title="Application Programming Interface">API</acronym>',
|
||||
'control' => 'radiogroup',
|
||||
'radiogroup_values' => array(
|
||||
'' => __( 'Don\'t cache', 'w3-total-cache' ),
|
||||
'cache' => array(
|
||||
'label' => __( 'Cache', 'w3-total-cache' ),
|
||||
'disabled' => ! Util_Environment::is_w3tc_pro( $this->_config ),
|
||||
'pro_feature' => true,
|
||||
'pro_excerpt' => esc_html__( 'If you\'re using the WordPress API make sure to use caching to scale performance.', 'w3-total-cache' ),
|
||||
'pro_description' => array(
|
||||
esc_html__( 'If you use WordPress as a backend for integrations, API caching may be for you. Similar to page caching, repeat requests will benefit by having significantly lower response times and consume fewer resources to deliver. If WordPress is not used as a backend, for additional security, the API can be disabled completely.', 'w3-total-cache' ),
|
||||
),
|
||||
),
|
||||
'disable' => 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.
|
||||
__(
|
||||
'Disable %1$sREST%2$s %3$sAPI%4$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'REpresentational State Transfer', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Application Programming Interface', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
'radiogroup_separator' => '<br />',
|
||||
'description' => wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opneing HTML acronym tag, 2 closing HTML acronym tag,
|
||||
// translators: 3 opneing HTML acronym tag, 4 closing HTML acronym tag.
|
||||
__(
|
||||
'Controls WordPress %1$sREST%2$s %3$sAPI%4$s functionality.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="REpresentational State Transfer">',
|
||||
'</acronym>',
|
||||
'<acronym title="Application Programming Interface">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</table>
|
||||
<?php Util_Ui::button_config_save( 'rest' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
|
||||
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'Advanced', 'w3-total-cache' ), '', 'advanced' ); ?>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th><label for="pgcache_late_init"><?php esc_html_e( 'Late initialization:', 'w3-total-cache' ); ?></label></th>
|
||||
<td>
|
||||
<input type="hidden" name="pgcache__late_init" value="0" />
|
||||
<label><input id="pgcache_late_init" type="checkbox" name="pgcache__late_init" value="1"<?php checked( 'file_generic' !== $this->_config->get_string( 'pgcache.engine' ) && $this->_config->get_boolean( 'pgcache.late_init' ) ); ?> <?php disabled( $this->_config->get_string( 'pgcache.engine' ), 'file_generic' ); ?> /> <?php esc_html_e( 'Enable', 'w3-total-cache' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Enables support for WordPress functionality in fragment caching for the page caching engine. Use of this feature may increase response times.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_late_caching"><?php esc_html_e( 'Late caching:', 'w3-total-cache' ); ?></label></th>
|
||||
<td>
|
||||
<input type="hidden" name="pgcache__late_caching" value="0" />
|
||||
<label><input id="pgcache_late_caching" type="checkbox" name="pgcache__late_caching" value="1"<?php checked( 'file_generic' !== $this->_config->get_string( 'pgcache.engine' ) && $this->_config->get_boolean( 'pgcache.late_caching' ) ); ?> <?php disabled( $this->_config->get_string( 'pgcache.engine' ), 'file_generic' ); ?> /> <?php esc_html_e( 'Enable', 'w3-total-cache' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Overwrites key of page caching via custom filters by postponing entry extraction during the init action.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if ( 'memcached' === $this->_config->get_string( 'pgcache.engine' ) || 'nginx_memcached' === $this->_config->get_string( 'pgcache.engine' ) ) {
|
||||
$module = 'pgcache';
|
||||
include W3TC_INC_DIR . '/options/parts/memcached.php';
|
||||
} elseif ( 'redis' === $this->_config->get_string( 'pgcache.engine' ) ) {
|
||||
$module = 'pgcache';
|
||||
include W3TC_INC_DIR . '/options/parts/redis.php';
|
||||
}
|
||||
?>
|
||||
<?php if ( 'file_generic' === $this->_config->get_string( 'pgcache.engine' ) ) : ?>
|
||||
<tr>
|
||||
<th><label><?php esc_html_e( 'Compatibility mode:', 'w3-total-cache' ); ?></label></th>
|
||||
<td>
|
||||
<?php $this->checkbox( 'pgcache.compatibility' ); ?> <?php Util_Ui::e_config_label( 'pgcache.compatibility' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Decreases performance by ~20% at scale in exchange for increasing interoperability with more hosting environments and WordPress idiosyncrasies. Enable this option if you experience issues with the Apache rules.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ( ! Util_Environment::is_nginx() ) : ?>
|
||||
<tr>
|
||||
<th><label><?php esc_html_e( 'Charset:', 'w3-total-cache' ); ?></label></th>
|
||||
<td>
|
||||
<?php $this->checkbox( 'pgcache.remove_charset' ); ?> <?php Util_Ui::e_config_label( 'pgcache.remove_charset' ); ?></label>
|
||||
<p class="description"><?php esc_html_e( 'Resolve issues incorrect odd character encoding that may appear in cached pages.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<th><label for="pgcache_reject_request_head"><?php esc_html_e( 'Reject HEAD requests:', 'w3-total-cache' ); ?></label></th>
|
||||
<td>
|
||||
<?php if ( 'file_generic' === $this->_config->get_string( 'pgcache.engine' ) ) : ?>
|
||||
<input id="pgcache_reject_request_head" type="checkbox" name="pgcache__reject__request_head" value="1" disabled="disabled" /> <?php Util_Ui::e_config_label( 'pgcache.reject.request_head' ); ?>
|
||||
<?php else : ?>
|
||||
<?php $this->checkbox( 'pgcache.reject.request_head', false, '', false ); ?><?php Util_Ui::e_config_label( 'pgcache.reject.request_head' ); ?>
|
||||
<?php endif; ?>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'If disabled, HEAD requests can often be cached resulting in "empty pages" being returned for subsequent requests for a %1$sURL%2$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Uniform Resource Locator', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if ( 'file_generic' !== $this->_config->get_string( 'pgcache.engine' ) ) : ?>
|
||||
<tr>
|
||||
<th><label for="pgcache_lifetime"><?php Util_Ui::e_config_label( 'pgcache.lifetime' ); ?></label></th>
|
||||
<td>
|
||||
<input id="pgcache_lifetime" type="text" name="pgcache__lifetime"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache.' ); ?>
|
||||
value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.lifetime' ) ); ?>" size="8" /> <?php esc_html_e( 'seconds', 'w3-total-cache' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'Determines the natural expiration time of unchanged cache items. The higher the value, the larger the cache.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<th><label for="pgcache_file_gc"><?php Util_Ui::e_config_label( 'pgcache.file.gc' ); ?></label></th>
|
||||
<td>
|
||||
<input id="pgcache_file_gc" type="text" name="pgcache__file__gc"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache.' ); ?>
|
||||
value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.file.gc' ) ); ?>" size="8"<?php echo ( 'file' !== $this->_config->get_string( 'pgcache.engine' ) && 'file_generic' !== $this->_config->get_string( 'pgcache.engine' ) ) ? ' disabled="disabled"' : ''; ?> /> <?php esc_html_e( 'seconds', 'w3-total-cache' ); ?>
|
||||
<p class="description"><?php esc_html_e( 'If caching to disk, specify how frequently expired cache data is removed. For busy sites, a lower value is best.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_comment_cookie_ttl"><?php Util_Ui::e_config_label( 'pgcache.comment_cookie_ttl' ); ?></label></th>
|
||||
<td>
|
||||
<input id="pgcache_comment_cookie_ttl" type="text" name="pgcache__comment_cookie_ttl" value="<?php echo esc_attr( $this->_config->get_integer( 'pgcache.comment_cookie_ttl' ) ); ?>" size="8" /> <?php esc_html_e( 'seconds', 'w3-total-cache' ); ?>
|
||||
<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.
|
||||
__(
|
||||
'Significantly reduce the default %1$sTTL%2$s for comment cookies to reduce the number of authenticated user traffic. Enter -1 to revert to default %3$sTTL%4$s.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Time to Live', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Time to Live', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_accept_qs"><?php Util_Ui::e_config_label( 'pgcache.accept.qs' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="pgcache_accept_qs" name="pgcache__accept__qs"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache.' ); ?>
|
||||
cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.accept.qs' ) ) ); ?></textarea>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Always cache %1$sURL%2$ss that use these query string name-value pairs. The value part is not required. But if used, separate name-value pairs with an equals sign (i.e., name=value). Each pair should be on their own line.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Uniform Resource Locator', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_reject_ua"><?php Util_Ui::e_config_label( 'pgcache.reject.ua' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="pgcache_reject_ua" name="pgcache__reject__ua"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache.' ); ?>
|
||||
cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.ua' ) ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Never send cache pages for these user agents.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_reject_cookie"><?php Util_Ui::e_config_label( 'pgcache.reject.cookie' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="pgcache_reject_cookie" name="pgcache__reject__cookie"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache.' ); ?>
|
||||
cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.cookie' ) ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Never cache pages that use the specified cookies.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_reject_uri"><?php Util_Ui::e_config_label( 'pgcache.reject.uri' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="pgcache_reject_uri" name="pgcache__reject__uri"
|
||||
w3tc-data-validator="regexps"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache.' ); ?>
|
||||
cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.uri' ) ) ); ?></textarea>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML a tag to W3TC Github FAQ page for which textareas for file entries support regular expressions,
|
||||
// translators: 2 opening HTML acronym tag, 3 closing HTML acronym tag, 4 closing HTML acronym tag.
|
||||
__(
|
||||
'Always ignore the specified pages / directories. Supports regular expressions (See %1$s%2$sFAQ%3$s%4$s)',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<a href="' . esc_url( 'https://github.com/BoldGrid/w3-total-cache/wiki/FAQ:-Usage#which-textareas-for-file-entries-support-regular-expressions' ) . '">',
|
||||
'<acronym title="' . esc_attr__( 'Frequently Asked Questions', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_reject_categories"><?php Util_Ui::e_config_label( 'pgcache.reject.categories' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="pgcache_reject_categories" name="pgcache__reject__categories"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache' ); ?>
|
||||
cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.categories' ) ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Always ignore all pages filed under the specified category slugs.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_reject_tags"><?php Util_Ui::e_config_label( 'pgcache.reject.tags' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="pgcache_reject_tags" name="pgcache__reject__tags"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache' ); ?>
|
||||
cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.tags' ) ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Always ignore all pages filed under the specified tag slugs.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_reject_authors"><?php Util_Ui::e_config_label( 'pgcache.reject.authors' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="pgcache_reject_authors" name="pgcache__reject__authors"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache' ); ?>
|
||||
cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.authors' ) ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Always ignore all pages filed under the specified author usernames.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_reject_custom"><?php Util_Ui::e_config_label( 'pgcache.reject.custom' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="pgcache_reject_custom" name="pgcache__reject__custom"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache' ); ?>
|
||||
cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.reject.custom' ) ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Always ignore all pages filed under the specified custom fields. Separate name-value pairs with an equals sign (i.e., name=value).', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="pgcache_accept_files"><?php Util_Ui::e_config_label( 'pgcache.accept.files' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="pgcache_accept_files" name="pgcache__accept__files"
|
||||
w3tc-data-validator="regexps"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache.' ); ?>
|
||||
cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.accept.files' ) ) ); ?></textarea>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML a tag to W3TC FAQ admin page, 2 opening HTML acronym tag,
|
||||
// translators: 3 closing HTML acronym tag, 4 closing HTML acronym tag.
|
||||
__(
|
||||
'Cache the specified pages / directories even if listed in the "never cache the following pages" field. Supports regular expression (See %1$s%2$sFAQ%3$s%4$s)',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<a href="' . esc_url( network_admin_url( 'admin.php?page=w3tc_faq' ) ) . '">',
|
||||
'<acronym title="' . esc_attr__( 'Frequently Asked Questions', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ( substr( $permalink_structure, -1 ) === '/' ) : ?>
|
||||
<tr>
|
||||
<th><label for="pgcache_accept_uri"><?php Util_Ui::e_config_label( 'pgcache.accept.uri' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="pgcache_accept_uri" name="pgcache__accept__uri"
|
||||
w3tc-data-validator="regexps"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache.' ); ?>
|
||||
cols="40" rows="5"><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.accept.uri' ) ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Cache the specified pages even if they don\'t have trailing slash.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<th><label for="pgcache_cache_headers"><?php Util_Ui::e_config_label( 'pgcache.cache.headers' ); ?></label></th>
|
||||
<td>
|
||||
<textarea id="pgcache_cache_headers" name="pgcache__cache__headers"
|
||||
<?php Util_Ui::sealing_disabled( 'pgcache.' ); ?>
|
||||
cols="40" rows="5"<?php echo 'file_generic' === $this->_config->get_string( 'pgcache.engine' ) ? ' disabled="disabled"' : ''; ?>><?php echo esc_textarea( implode( "\r\n", $this->_config->get_array( 'pgcache.cache.headers' ) ) ); ?></textarea>
|
||||
<p class="description"><?php esc_html_e( 'Specify additional page headers to cache.', 'w3-total-cache' ); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ( 'file_generic' === $this->_config->get_string( 'pgcache.engine' ) ) : ?>
|
||||
<tr>
|
||||
<th><label><?php Util_Ui::e_config_label( 'pgcache.cache.nginx_handle_xml' ); ?></label></th>
|
||||
<td>
|
||||
<?php $this->checkbox( 'pgcache.cache.nginx_handle_xml' ); ?> <?php Util_Ui::e_config_label( 'pgcache.cache.nginx_handle_xml' ); ?></label>
|
||||
<p class="description">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'Return correct Content-Type header for %1$sXML%2$s files (e.g., feeds and sitemaps). Slows down cache engine.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Extensible Markup Language', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
|
||||
<?php Util_Ui::button_config_save( 'pagecache_advanced' ); ?>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
|
||||
<?php Util_Ui::postbox_header( esc_html__( 'Note(s)', 'w3-total-cache' ), '', 'notes' ); ?>
|
||||
<table class="form-table">
|
||||
<tr>
|
||||
<th>
|
||||
<ul>
|
||||
<li>
|
||||
<?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 a tag to W3TC BrowserCache admin page, 6 closing HTML a tag.
|
||||
__(
|
||||
'Enable %1$sHTTP%2$s compression in the "%3$sHTML%4$s" section on %5$sBrowser Cache</a> Settings tab.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Transfer Protocol', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Markup Language', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<a href="' . esc_url( admin_url( 'admin.php?page=w3tc_browsercache' ) ) . '">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<?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 a tag to W3TC BrowserCache admin page, 6 closing HTML a tag.
|
||||
__(
|
||||
'The %1$sTTL%2$s of page cache files is set via the "Expires header lifetime" field in the "%3$sHTML%4$s" section on %5$sBrowser Cache%6$s Settings tab.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Time to Live', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Hypertext Markup Language', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<a href="' . esc_url( admin_url( 'admin.php?page=w3tc_browsercache' ) ) . '">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
<?php Util_Ui::postbox_footer(); ?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>
|
32
wp-content/plugins/w3-total-cache/inc/options/support.php
Normal file
32
wp-content/plugins/w3-total-cache/inc/options/support.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
?>
|
||||
<?php require W3TC_INC_DIR . '/options/common/header.php'; ?>
|
||||
<?php if ( Util_Request::get_boolean( 'payment' ) ) : ?>
|
||||
<div class="error">
|
||||
<p>To complete your support request fill out the form below!</p>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<p>
|
||||
<?php esc_html_e( 'Request premium services, suggest a feature or submit a bug using the form below:', 'w3-total-cache' ); ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<div id="support_container">
|
||||
<?php
|
||||
if ( ! $request_type || ! isset( $this->_request_types[ $request_type ] ) ) {
|
||||
$this->w3tc_support_select();
|
||||
} else {
|
||||
if ( isset( $this->_request_prices[ $request_type ] ) && ! $payment ) {
|
||||
$this->w3tc_support_payment();
|
||||
} else {
|
||||
$this->w3tc_support_form();
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>
|
Reference in New Issue
Block a user