installed plugin W3 Total Cache version 2.3.2

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

View File

@ -0,0 +1,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>

View File

@ -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>

View File

@ -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' ),
)
);
?>

View 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>

View File

@ -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' ),
)
);