updated plugin W3 Total Cache version 2.5.0

This commit is contained in:
2023-10-22 22:21:26 +00:00
committed by Gitium
parent 2f6b5b6047
commit 9e3fa792d7
255 changed files with 10113 additions and 23010 deletions

View File

@ -19,7 +19,7 @@ if ( ! defined( 'W3TC' ) ) {
'%1$sInstalled/Ok/Yes/True/On%2$s: Functionality will work properly.%3$s',
'w3-total-cache'
),
'<span style="background-color: #33cc33">',
'<span style="padding: 0 2px;padding: 0 5px;background-color: #33cc33">',
'</span>',
'<br />'
),
@ -37,7 +37,7 @@ if ( ! defined( 'W3TC' ) ) {
'%1$sNot detected/Not available/Off%2$s: May be installed, but cannot be automatically confirmed. Functionality may be limited.%3$s',
'w3-total-cache'
),
'<span style="background-color: #FFFF00">',
'<span style="padding: 0 2px;padding: 0 5px;background-color: #FFFF00">',
'</span>',
'<br />'
),
@ -55,7 +55,7 @@ if ( ! defined( 'W3TC' ) ) {
'%1$sNot installed/Error/No/False%2$s: Plugin or some functions may not work.%3$s',
'w3-total-cache'
),
'<span style="background-color: #FF0000">',
'<span style="padding: 0 2px;padding: 0 5px;background-color: #FF0000; color: #FFFFFF;">',
'</span>',
'<br />'
),
@ -96,16 +96,16 @@ if ( ! defined( 'W3TC' ) ) {
<?php elseif ( stristr( $_SERVER['SERVER_SOFTWARE'], 'iis' ) !== false ) : ?>
<code>Microsoft IIS</code>
<?php else : ?>
<span style="background-color: #FFFF00">Not detected</span>
<span style="padding: 0 2px;background-color: #FFFF00">Not detected</span>
<?php endif; ?>
</li>
<li>
FTP functions:
<?php if ( function_exists( 'ftp_connect' ) ) : ?>
<span style="background-color: #33cc33">Installed</span>
<span style="padding: 0 2px;background-color: #33cc33">Installed</span>
<?php else : ?>
<span style="background-color: #FFFF00">Not detected</span>
<span style="padding: 0 2px;background-color: #FFFF00">Not detected</span>
<?php endif; ?>
<span class="w3tc-self-test-hint">
<?php
@ -135,9 +135,9 @@ if ( ! defined( 'W3TC' ) ) {
<li>
<?php esc_html_e( 'Multibyte String support:', 'w3-total-cache' ); ?>
<?php if ( function_exists( 'mb_substr' ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<?php endif; ?>
<span class="w3tc-self-test-hint"><?php esc_html_e( '(required for Rackspace Cloud Files support)', 'w3-total-cache' ); ?></span>
</li>
@ -145,9 +145,9 @@ if ( ! defined( 'W3TC' ) ) {
<li>
<?php esc_html_e( 'cURL extension:', 'w3-total-cache' ); ?>
<?php if ( function_exists( 'curl_init' ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<?php endif; ?>
<span class="w3tc-self-test-hint"><?php esc_html_e( '(required for Amazon S3, Amazon CloudFront, Rackspace CloudFiles support)', 'w3-total-cache' ); ?></span>
</li>
@ -155,9 +155,9 @@ if ( ! defined( 'W3TC' ) ) {
<li>
zlib extension:
<?php if ( function_exists( 'gzencode' ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<?php endif; ?>
<span class="w3tc-self-test-hint"><?php esc_html_e( '(required for gzip compression support)', 'w3-total-cache' ); ?></span>
</li>
@ -165,9 +165,9 @@ if ( ! defined( 'W3TC' ) ) {
<li>
brotli extension:
<?php if ( function_exists( 'brotli_compress' ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FFFF00"><?php esc_html_e( 'Not detected', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FFFF00"><?php esc_html_e( 'Not detected', 'w3-total-cache' ); ?></span>
<?php endif; ?>
<span class="w3tc-self-test-hint"><?php esc_html_e( '(required for brotli compression support)', 'w3-total-cache' ); ?></span>
</li>
@ -175,53 +175,53 @@ if ( ! defined( 'W3TC' ) ) {
<li>
Opcode cache:
<?php if ( Util_Installed::opcache() ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed (OPCache)', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed (OPCache)', 'w3-total-cache' ); ?></span>
<?php elseif ( Util_Installed::apc() ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed (APC)', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed (APC)', 'w3-total-cache' ); ?></span>
<?php elseif ( Util_Installed::eaccelerator() ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed (eAccelerator)', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed (eAccelerator)', 'w3-total-cache' ); ?></span>
<?php elseif ( Util_Installed::xcache() ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed (XCache)', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed (XCache)', 'w3-total-cache' ); ?></span>
<?php elseif ( PHP_VERSION >= 6 ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'PHP6', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'PHP6', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<?php endif; ?>
</li>
<li>
<?php esc_html_e( 'Memcached extension:', 'w3-total-cache' ); ?>
<?php if ( class_exists( '\Memcached' ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FFFF00"><?php esc_html_e( 'Not available', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FFFF00"><?php esc_html_e( 'Not available', 'w3-total-cache' ); ?></span>
<?php endif; ?>
</li>
<li>
<?php esc_html_e( 'Memcache extension:', 'w3-total-cache' ); ?>
<?php if ( class_exists( '\Memcache' ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FFFF00"><?php esc_html_e( 'Not available', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FFFF00"><?php esc_html_e( 'Not available', 'w3-total-cache' ); ?></span>
<?php endif; ?>
</li>
<li>
<?php esc_html_e( 'Redis extension:', 'w3-total-cache' ); ?>
<?php if ( Util_Installed::redis() ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FFFF00"><?php esc_html_e( 'Not available', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FFFF00"><?php esc_html_e( 'Not available', 'w3-total-cache' ); ?></span>
<?php endif; ?>
</li>
<li>
<?php esc_html_e( 'HTML Tidy extension:', 'w3-total-cache' ); ?>
<?php if ( Util_Installed::tidy() ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<?php endif; ?>
<span class="w3tc-self-test-hint"><?php esc_html_e( '(required for HTML Tidy minifier support)', 'w3-total-cache' ); ?></span>
</li>
@ -229,11 +229,11 @@ if ( ! defined( 'W3TC' ) ) {
<li>
<?php esc_html_e( 'Mime type detection:', 'w3-total-cache' ); ?>
<?php if ( function_exists( 'finfo_open' ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed (Fileinfo)', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed (Fileinfo)', 'w3-total-cache' ); ?></span>
<?php elseif ( function_exists( 'mime_content_type' ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed (mime_content_type)', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed (mime_content_type)', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<?php endif; ?>
<span class="w3tc-self-test-hint">
<?php
@ -260,47 +260,47 @@ if ( ! defined( 'W3TC' ) ) {
<li>
<?php esc_html_e( 'Hash function:', 'w3-total-cache' ); ?>
<?php if ( function_exists( 'hash' ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed (hash)', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed (hash)', 'w3-total-cache' ); ?></span>
<?php elseif ( function_exists( 'mhash' ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed (mhash)', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed (mhash)', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<?php endif; ?>
</li>
<li>
<?php esc_html_e( 'Open basedir:', 'w3-total-cache' ); ?>
<?php $open_basedir = ini_get( 'open_basedir' ); if ( $open_basedir ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'On:', 'w3-total-cache' ); ?> <?php echo esc_html( $open_basedir ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'On:', 'w3-total-cache' ); ?> <?php echo esc_html( $open_basedir ); ?></span>
<?php else : ?>
<span style="background-color: #FFFF00"><?php esc_html_e( 'Off', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FFFF00"><?php esc_html_e( 'Off', 'w3-total-cache' ); ?></span>
<?php endif; ?>
</li>
<li>
<?php esc_html_e( 'zlib output compression:', 'w3-total-cache' ); ?>
<?php if ( Util_Environment::to_boolean( ini_get( 'zlib.output_compression' ) ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'On', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'On', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FFFF00"><?php esc_html_e( 'Off', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FFFF00"><?php esc_html_e( 'Off', 'w3-total-cache' ); ?></span>
<?php endif; ?>
</li>
<li>
<?php esc_html_e( 'set_time_limit:', 'w3-total-cache' ); ?>
<?php if ( function_exists( 'set_time_limit' ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Available', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Available', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FFFF00"><?php esc_html_e( 'Not available', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FFFF00"><?php esc_html_e( 'Not available', 'w3-total-cache' ); ?></span>
<?php endif; ?>
</li>
<li>
SSH2 extension:
<?php if ( function_exists( 'ssh2_connect' ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FFFF00"><?php esc_html_e( 'Not detected', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FFFF00"><?php esc_html_e( 'Not detected', 'w3-total-cache' ); ?></span>
<?php endif; ?>
<span class="w3tc-self-test-hint">
<?php
@ -390,12 +390,12 @@ if ( ! defined( 'W3TC' ) ) {
<?php echo esc_html( $module ); ?>:
<?php if ( ! empty( $apache_modules ) ) : ?>
<?php if ( in_array( $module, $apache_modules, true ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Not installed', 'w3-total-cache' ); ?></span>
<?php endif; ?>
<?php else : ?>
<span style="background-color: #FFFF00"><?php esc_html_e( 'Not detected', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FFFF00"><?php esc_html_e( 'Not detected', 'w3-total-cache' ); ?></span>
<?php endif; ?>
<span class="w3tc-self-test-hint"><?php esc_html_e( '(required for disk enhanced Page Cache and Browser Cache)', 'w3-total-cache' ); ?></span>
</li>
@ -437,15 +437,15 @@ if ( ! defined( 'W3TC' ) ) {
<?php echo esc_html( $path ); ?>:
<?php if ( file_exists( $path ) ) : ?>
<?php if ( Util_File::is_writable( $path ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'OK', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'OK', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Not write-able', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Not write-able', 'w3-total-cache' ); ?></span>
<?php endif; ?>
<?php else : ?>
<?php if ( Util_File::is_writable_dir( dirname( $path ) ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Write-able', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Write-able', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Not write-able', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Not write-able', 'w3-total-cache' ); ?></span>
<?php endif; ?>
<?php endif; ?>
</li>
@ -457,9 +457,9 @@ if ( ! defined( 'W3TC' ) ) {
<li>
<?php echo esc_html( Util_Environment::normalize_path( WP_CONTENT_DIR ) ); ?>:
<?php if ( Util_File::is_writable_dir( WP_CONTENT_DIR ) ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'OK', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'OK', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Not write-able', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Not write-able', 'w3-total-cache' ); ?></span>
<?php endif; ?>
</li>
@ -467,49 +467,49 @@ if ( ! defined( 'W3TC' ) ) {
<?php $uploads_dir = @wp_upload_dir(); ?>
<?php echo esc_html( $uploads_dir['path'] ); ?>:
<?php if ( ! empty( $uploads_dir['error'] ) ) : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Error:', 'w3-total-cache' ); ?> <?php echo esc_html( $uploads_dir['error'] ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Error:', 'w3-total-cache' ); ?> <?php echo esc_html( $uploads_dir['error'] ); ?></span>
<?php elseif ( ! Util_File::is_writable_dir( $uploads_dir['path'] ) ) : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Not write-able', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Not write-able', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'OK', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'OK', 'w3-total-cache' ); ?></span>
<?php endif; ?>
</li>
<li>
<?php esc_html_e( 'Fancy permalinks:', 'w3-total-cache' ); ?>
<?php $permalink_structure = get_option( 'permalink_structure' ); if ( $permalink_structure ) : ?>
<span style="background-color: #33cc33"><?php echo esc_html( $permalink_structure ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php echo esc_html( $permalink_structure ); ?></span>
<?php else : ?>
<span style="background-color: #FFFF00"><?php esc_html_e( 'Off', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FFFF00"><?php esc_html_e( 'Off', 'w3-total-cache' ); ?></span>
<?php endif; ?>
</li>
<li>
<?php esc_html_e( 'WP_CACHE define:', 'w3-total-cache' ); ?>
<?php if ( defined( 'WP_CACHE' ) && WP_CACHE ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Defined (true)', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Defined (true)', 'w3-total-cache' ); ?></span>
<?php elseif ( defined( 'WP_CACHE' ) && ! WP_CACHE ) : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Defined (false)', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Defined (false)', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Not defined', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Not defined', 'w3-total-cache' ); ?></span>
<?php endif; ?>
</li>
<li>
<?php esc_html_e( 'URL rewrite:', 'w3-total-cache' ); ?>
<?php if ( Util_Rule::can_check_rules() ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'Enabled', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Enabled', 'w3-total-cache' ); ?></span>
<?php else : ?>
<span style="background-color: #FF0000"><?php esc_html_e( 'Disabled', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Disabled', 'w3-total-cache' ); ?></span>
<?php endif; ?>
</li>
<li>
<?php esc_html_e( 'Network mode:', 'w3-total-cache' ); ?>
<?php if ( Util_Environment::is_wpmu() ) : ?>
<span style="background-color: #33cc33"><?php esc_html_e( 'On', 'w3-total-cache' ); ?> (<?php echo Util_Environment::is_wpmu_subdomain() ? 'subdomain' : 'subdir'; ?>)</span>
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'On', 'w3-total-cache' ); ?> (<?php echo Util_Environment::is_wpmu_subdomain() ? 'subdomain' : 'subdir'; ?>)</span>
<?php else : ?>
<span style="background-color: #FFFF00"><?php esc_html_e( 'Off', 'w3-total-cache' ); ?></span>
<span style="padding: 0 2px;background-color: #FFFF00"><?php esc_html_e( 'Off', 'w3-total-cache' ); ?></span>
<?php endif; ?>
</li>
</ul>

View File

@ -259,5 +259,3 @@ if ( ! defined( 'W3TC' ) ) {
<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'; ?>

View File

@ -75,6 +75,7 @@ $security_session_values = array(
</p>
</form>
<form action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
<?php Util_UI::print_control_bar( 'browsercache_form_control' ); ?>
<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>
@ -345,7 +346,6 @@ $security_session_values = array(
?>
</table>
<?php Util_Ui::button_config_save( 'browsercache_general' ); ?>
<?php Util_Ui::postbox_footer(); ?>
<?php
@ -491,7 +491,6 @@ $security_session_values = array(
</tr>
</table>
<?php Util_Ui::button_config_save( 'browsercache_css_js' ); ?>
<?php Util_Ui::postbox_footer(); ?>
<?php
@ -600,7 +599,6 @@ $security_session_values = array(
</tr>
</table>
<?php Util_Ui::button_config_save( 'browsercache_html_xml' ); ?>
<?php Util_Ui::postbox_footer(); ?>
<?php Util_Ui::postbox_header( esc_html__( 'Media &amp; Other Files', 'w3-total-cache' ), '', 'media' ); ?>
@ -720,11 +718,8 @@ $security_session_values = array(
</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'; ?>

View File

@ -15,16 +15,10 @@ if ( ! defined( 'W3TC' ) ) {
// so nothing to upload from network admin.
$upload_blogfiles_enabled = $cdn_mirror || ! is_network_admin() || ! Util_Environment::is_using_master_config();
$can_purge = Cdn_Util::can_purge( $cdn_engine );
require W3TC_INC_DIR . '/options/common/header.php';
?>
<?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
@ -48,63 +42,68 @@ $upload_blogfiles_enabled = $cdn_mirror || ! is_network_admin() || ! Util_Enviro
?>
</p>
<form id="w3tc_cdn" action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
<p>
<?php if ( $cdn_mirror ) : ?>
<?php if ( $cdn_mirror ) : ?>
<p>
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="importing attachments into the Media Library" />
</p>
<?php
if ( $can_purge || $cdn_mirror_purge_all ) {
?>
<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>'
<p>
<?php
$cdn_purge_button = $can_purge ? '<input id="cdn_purge" class="button {nonce: ' . esc_attr( wp_create_nonce( 'w3tc' ) ) . '}" type="button" value="Purge" /> objects from the <acronym title="Content Delivery Network">CDN</acronym>' : '';
$cdn_mirror_purge_button = $cdn_mirror_purge_all ? ( $can_purge ? ' or ' : '' ) . '<input class="button" type="submit" name="w3tc_flush_cdn" value="purge CDN completely" />' : '';
echo $cdn_purge_button . $cdn_mirror_purge_button;
?>
</p>
<?php
}
?>
<?php else :
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 ( $can_purge ) : ?>
<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'
),
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' ); ?>
'<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; ?>
<p>
<?php
echo wp_kses(
Util_Ui::nonce_field( 'w3tc' ),
@ -121,6 +120,7 @@ $upload_blogfiles_enabled = $cdn_mirror || ! is_network_admin() || ! Util_Enviro
</p>
</form>
<form id="cdn_form" action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
<?php Util_UI::print_control_bar( 'cdn_form_control' ); ?>
<div class="metabox-holder">
<?php Util_Ui::postbox_header( esc_html__( 'General', 'w3-total-cache' ), '', 'general' ); ?>
<table class="form-table">
@ -352,7 +352,6 @@ $upload_blogfiles_enabled = $cdn_mirror || ! is_network_admin() || ! Util_Enviro
<?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' ); ?>
@ -372,7 +371,6 @@ $upload_blogfiles_enabled = $cdn_mirror || ! is_network_admin() || ! Util_Enviro
?>
</table>
<?php Util_Ui::button_config_save( 'cdn_configuration' ); ?>
<?php Util_Ui::postbox_footer(); ?>
<?php do_action( 'w3tc_settings_box_cdnfsd' ); ?>
@ -854,7 +852,6 @@ $upload_blogfiles_enabled = $cdn_mirror || ! is_network_admin() || ! Util_Enviro
</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' ); ?>
@ -899,4 +896,3 @@ $upload_blogfiles_enabled = $cdn_mirror || ! is_network_admin() || ! Util_Enviro
<?php Util_Ui::postbox_footer(); ?>
</div>
</form>
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>

View File

@ -1 +1,108 @@
<?php
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
$config = Dispatcher::config();
do_action( 'w3tc-dashboard-footer' );
?>
</div>
<div id="w3tc-footer">
<div id="w3tc-footer-container">
<div class="w3tc-footer-column-1">
<a class="logo-link" href="<?php echo esc_url( Util_UI::admin_url( 'admin.php?page=w3tc_dashboard' ) ); ?>" alt="W3 Total Cache">
<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&reg;%3$s%4$s',
'w3-total-cache'
),
'<span>',
'<sup>',
'</sup>',
'</span>'
),
array(
'span' => array(),
'sup' => array(),
)
);
?>
</h2>
</a>
</div>
<div class="w3tc-footer-column-1">
<h2><?php esc_html_e( 'Documentation', 'w3-total-cache' ); ?></h2>
<a class="w3tc-footer-link" target="_blank" href="<?php echo esc_url( 'https://www.boldgrid.com/support/w3-total-cache/' ); ?>" alt="<?php esc_attr_e( 'Support Center', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Support Center', 'w3-total-cache' ); ?>
</a>
<a class="w3tc-footer-link" target="_blank" href="<?php echo esc_url( 'https://github.com/BoldGrid/w3-total-cache' ); ?>" alt="<?php esc_attr_e( 'GitHub', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'GitHub', 'w3-total-cache' ); ?>
</a>
</div>
<div class="w3tc-footer-column-1">
<h2><?php esc_html_e( 'Support', 'w3-total-cache' ); ?></h2>
<a class="w3tc-footer-link" target="_blank" href="<?php echo esc_url( 'https://www.boldgrid.com/support/forum/w3-total-cache/' ); ?>" alt="<?php esc_attr_e( 'Forums', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Forums', 'w3-total-cache' ); ?>
</a>
<a class="w3tc-footer-link" href="<?php echo esc_url( Util_UI::admin_url( 'admin.php?page=w3tc_support' ) ); ?>" alt="<?php esc_attr_e( 'Premium Support Services', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Premium Support Services', 'w3-total-cache' ); ?>
</a>
</div>
<div class="w3tc-footer-column-2">
<h2><?php esc_html_e( 'Pro Features', 'w3-total-cache' ); ?></h2>
<div class="w3tc-footer-inner-column-50">
<a class="w3tc-footer-link" target="_blank" href="<?php echo esc_url( 'https://www.boldgrid.com/support/w3-total-cache/cdn/full-site-delivery/' ); ?>" alt="<?php esc_attr_e( 'Full Site Delivery', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Full Site Delivery', 'w3-total-cache' ); ?>
</a>
<a class="w3tc-footer-link" target="_blank" href="<?php echo esc_url( 'https://www.boldgrid.com/support/w3-total-cache/what-is-fragment-caching-and-why-do-i-need-it/' ); ?>" alt="<?php esc_attr_e( 'Fragment Cache', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Fragment Cache', 'w3-total-cache' ); ?>
</a>
<a class="w3tc-footer-link" target="_blank" href="<?php echo esc_url( 'https://www.boldgrid.com/support/w3-total-cache/page-cache/rest-api/' ); ?>" alt="<?php esc_attr_e( 'Rest API Caching', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Rest API Caching', 'w3-total-cache' ); ?>
</a>
<a class="w3tc-footer-link" target="_blank" href="<?php echo esc_url( 'https://www.boldgrid.com/support/w3-total-cache/minify/render-blocking-css/' ); ?>" alt="<?php esc_attr_e( 'Eliminate Render Blocking CSS', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Eliminate Render Blocking CSS', 'w3-total-cache' ); ?>
</a>
</div>
<div class="w3tc-footer-inner-column-50">
<a class="w3tc-footer-link" target="_blank" href="<?php echo esc_url( 'https://www.boldgrid.com/support/w3-total-cache/configuring-lazy-loading-for-your-wordpress-website-with-w3-total-cache/' ); ?>" alt="<?php esc_attr_e( 'Lazy Load Google Maps', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Lazy Load Google Maps', 'w3-total-cache' ); ?>
</a>
<a class="w3tc-footer-link" target="_blank" href="<?php echo esc_url( 'https://www.boldgrid.com/support/w3-total-cache/wpml/' ); ?>" alt="<?php esc_attr_e( 'WPML Extension', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'WPML Extension', 'w3-total-cache' ); ?>
</a>
<a class="w3tc-footer-link" target="_blank" href="<?php echo esc_url( 'https://www.boldgrid.com/support/w3-total-cache/configuring-w3-total-cache-statistics-to-give-detailed-information-about-your-cache/' ); ?>" alt="<?php esc_attr_e( 'Caching Statistics', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Caching Statistics', 'w3-total-cache' ); ?>
</a>
<a class="w3tc-footer-link" target="_blank" href="<?php echo esc_url( 'https://www.boldgrid.com/support/w3-total-cache/purge-cache-log/' ); ?>" alt="<?php esc_attr_e( 'Purge Logs', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Purge Logs', 'w3-total-cache' ); ?>
</a>
</div>
<?php
if ( ! Util_Environment::is_w3tc_pro( $config ) ) {
echo '<input type="button" class="button button-buy-plugin {nonce: \'' . esc_attr( wp_create_nonce( 'w3tc' ) ) . '\'}"
data-src="footer" value="' . esc_html__( 'Learn more about Pro!', 'w3-total-cache' ) . '" />';
}
?>
</div>
<div class="w3tc-footer-column-1">
<h2><?php esc_html_e( 'Follow Us', 'w3-total-cache' ); ?></h2>
<a class="w3tc-footer-link" target="_blank" href="<?php echo esc_url( 'https://twitter.com/w3edge' ); ?>" alt="<?php esc_attr_e( 'W3 Edge', 'w3-total-cache' ); ?>">
<span class="dashicons dashicons-twitter"></span><?php esc_html_e( 'W3 Edge', 'w3-total-cache' ); ?>
</a>
<a class="w3tc-footer-link" target="_blank" href="<?php echo esc_url( 'https://twitter.com/boldgrid' ); ?>" alt="<?php esc_attr_e( 'BoldGrid', 'w3-total-cache' ); ?>">
<span class="dashicons dashicons-twitter"></span><?php esc_html_e( 'BoldGrid', 'w3-total-cache' ); ?>
</a>
<a class="w3tc-footer-link" target="_blank" href="<?php echo esc_url( 'https://www.facebook.com/boldgrid/' ); ?>" alt="<?php esc_attr_e( 'BoldGrid', 'w3-total-cache' ); ?>">
<span class="dashicons dashicons-facebook"></span><?php esc_html_e( 'BoldGrid', 'w3-total-cache' ); ?>
</a>
</div>
</div>
</div>

View File

@ -4,397 +4,7 @@ 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&reg;%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 &amp; %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 &amp; %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 &amp; %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;
}
?>
<?php Util_Ui::print_breadcrumb(); ?>

View File

@ -0,0 +1,218 @@
<?php
/**
* File: top_nav_bar.php
*
* @package W3TC
*/
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
die();
}
$config = Dispatcher::config();
$menu_array = array(
'settings' => array(
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_general' ),
'text' => __( 'General Settings', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_pgcache' ),
'text' => __( 'Page Cache', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_minify' ),
'text' => __( 'Minify', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_dbcache' ),
'text' => __( 'Database Cache', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_objectcache' ),
'text' => __( 'Object Cache', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_browsercache' ),
'text' => __( 'Browser Cache', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_cachegroups' ),
'text' => __( 'Cache Groups', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_cdn' ),
'text' => 'CDN',
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_fragmentcache' ),
'text' => __( 'Fragment Cache', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_userexperience' ),
'text' => __( 'User Experience', 'w3-total-cache' ),
),
),
'tools' => array(
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_extensions' ),
'text' => __( 'Extensions', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_stats' ),
'text' => __( 'Statistics', 'w3-total-cache' ),
),
array(
'url' => $config->is_extension_active( 'imageservice' )
? Util_Ui::admin_url( 'upload.php?page=w3tc_extension_page_imageservice' )
: Util_Ui::admin_url( 'admin.php?page=w3tc_general#image_service' ),
'text' => __( 'WebP Converter', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_pagespeed' ),
'text' => __( 'Google PageSpeed', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_setup_guide' ),
'text' => __( 'Setup Guide', 'w3-total-cache' ),
),
),
'info' => array(
array(
'url' => Util_UI::admin_url( 'admin.php?page=w3tc_about' ),
'text' => __( 'About', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_feature_showcase' ),
'text' => __( 'Feature Showcase', 'w3-total-cache' ),
),
array(
'url' => Util_Ui::admin_url( 'admin.php?page=w3tc_install' ),
'text' => __( 'Install', 'w3-total-cache' ),
),
array(
'url' => '#',
'text' => __( 'Compatibility Test', 'w3-total-cache' ),
'class' => 'compatiblity-test button-self-test',
),
array(
'url' => 'https://api.w3-edge.com/v1/redirects/faq',
'text' => 'FAQ',
'target' => '_blank',
'dashicon' => '<span class="dashicons dashicons-external"></span>',
),
),
);
do_action( 'w3tc_dashboard_top_nav_bar' );
?>
<div id="w3tc-top-nav-bar">
<div id="w3tc-top-nav-bar-content">
<a class="logo-link" href="<?php echo esc_url( Util_UI::admin_url( 'admin.php?page=w3tc_dashboard' ) ); ?>" alt="W3 Total Cache">
<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&reg;%3$s%4$s',
'w3-total-cache'
),
'<span>',
'<sup>',
'</sup>',
'</span>'
),
array(
'span' => array(),
'sup' => array(),
)
);
?>
</h2>
</a>
<div id="w3tc-top-nav-bar-content-links">
<a class="w3tc-top-nav-support" href="<?php echo esc_url( Util_UI::admin_url( 'admin.php?page=w3tc_dashboard' ) ); ?>" alt="<?php esc_attr_e( 'Dashboard', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Dashboard', 'w3-total-cache' ); ?>
</a>
<div class="w3tc-top-nav-dropdown">
<a class="w3tc-top-nav-settings no-link" href="#" alt="<?php esc_attr_e( 'Settings', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Settings', 'w3-total-cache' ); ?><span class="dashicons dashicons-arrow-down-alt2"></span>
</a>
<div id="w3tc-top-nav-settings-menu" class="w3tc-top-nav-dropdown-content">
<?php
foreach ( $menu_array['settings'] as $entry ) {
$output = sprintf(
// translators: 1 link class, 2 link href URL , 3 link alt text, 4 link target, 5 link text, 6 link text dashicon.
'<a %1$s href="%2$s" alt="%3$s"%4$s>%5$s%6$s</a>',
! empty( $entry['class'] ) ? ' class="' . esc_attr( $entry['class'] ) . '" ': '',
esc_url( $entry['url'] ),
esc_attr( $entry['text'] ),
( ! empty( $entry['target'] ) ? ' target="' . esc_attr( $entry['target'] ) . '"' : '' ),
esc_html( $entry['text'] ),
( ! empty( $entry['dashicon'] ) ? $entry['dashicon'] : '' )
);
echo wp_kses( $output, Util_Ui::get_allowed_html_for_wp_kses_from_content( $output ) );
}
?>
</div>
</div>
<div class="w3tc-top-nav-dropdown">
<a class="w3tc-top-nav-tools no-link" href="#" alt="<?php esc_attr_e( 'Tools', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Tools', 'w3-total-cache' ); ?><span class="dashicons dashicons-arrow-down-alt2"></span>
</a>
<div id="w3tc-top-nav-tools-menu" class="w3tc-top-nav-dropdown-content">
<?php
foreach ( $menu_array['tools'] as $entry ) {
$output = sprintf(
// translators: 1 link class, 2 link href URL , 3 link alt text, 4 link target, 5 link text, 6 link text dashicon.
'<a %1$s href="%2$s" alt="%3$s"%4$s>%5$s%6$s</a>',
! empty( $entry['class'] ) ? ' class="' . esc_attr( $entry['class'] ) . '" ': '',
esc_url( $entry['url'] ),
esc_attr( $entry['text'] ),
( ! empty( $entry['target'] ) ? ' target="' . esc_attr( $entry['target'] ) . '"' : '' ),
esc_html( $entry['text'] ),
( ! empty( $entry['dashicon'] ) ? $entry['dashicon'] : '' )
);
echo wp_kses( $output, Util_Ui::get_allowed_html_for_wp_kses_from_content( $output ) );
}
?>
</div>
</div>
<div class="w3tc-top-nav-dropdown">
<a class="w3tc-top-nav-info no-link" href="#" alt="<?php esc_attr_e( 'Info', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Info', 'w3-total-cache' ); ?><span class="dashicons dashicons-arrow-down-alt2"></span>
</a>
<div id="w3tc-top-nav-info-menu" class="w3tc-top-nav-dropdown-content">
<?php
foreach ( $menu_array['info'] as $entry ) {
$output = sprintf(
// translators: 1 link class, 2 link href URL , 3 link alt text, 4 link target, 5 link text, 6 link text dashicon.
'<a %1$s href="%2$s" alt="%3$s"%4$s>%5$s%6$s</a>',
! empty( $entry['class'] ) ? ' class="' . esc_attr( $entry['class'] ) . '" ': '',
esc_url( $entry['url'] ),
esc_attr( $entry['text'] ),
( ! empty( $entry['target'] ) ? ' target="' . esc_attr( $entry['target'] ) . '"' : '' ),
esc_html( $entry['text'] ),
( ! empty( $entry['dashicon'] ) ? $entry['dashicon'] : '' )
);
echo wp_kses( $output, Util_Ui::get_allowed_html_for_wp_kses_from_content( $output ) );
}
?>
</div>
</div>
<a class="w3tc-top-nav-support" href="<?php echo esc_url( Util_UI::admin_url( 'admin.php?page=w3tc_support' ) ); ?>" alt="<?php esc_attr_e( 'Support', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Support', 'w3-total-cache' ); ?>
</a>
<?php
if ( ! Util_Environment::is_w3tc_pro( $config ) ) {
echo '<input type="button" class="button-primary button-buy-plugin {nonce: \'' . esc_attr( wp_create_nonce( 'w3tc' ) ) . '\'}"
data-src="top_nav_bar" value="' . esc_html__( 'Upgrade', 'w3-total-cache' ) . '" />';
}
?>
</div>
</div>
</div>

View File

@ -40,53 +40,30 @@ if ( Util_Environment::is_w3tc_pro( Dispatcher::config() ) ) {
// 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 class="w3tc_dashboard_flush_container">
<span><?php esc_html_e( 'Flush caches with ', 'w3-total-cache' ); ?></span>
<div class="w3tc-button-control-container">
<?php Util_Ui::print_flush_split_button(); ?>
</div>
</div>
</form>
<form id="w3tc_dashboard" action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
<?php
echo wp_kses(
Util_Ui::nonce_field( 'w3tc' ),
array(
'input' => array(
'type' => array(),
'name' => array(),
'value' => array(),
),
)
);
?>
<div id="w3tc-dashboard-widgets" class="clearfix widefat metabox-holder">
<?php $screen = get_current_screen(); ?>
<div id="postbox-container-left">
@ -132,4 +109,3 @@ if ( Util_Environment::is_w3tc_pro( Dispatcher::config() ) ) {
?>
</div>
</form>
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>

View File

@ -7,47 +7,29 @@ if ( ! defined( 'W3TC' ) ) {
?>
<?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>'
<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'
),
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>
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>
<form action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
<?php Util_UI::print_control_bar( 'dbcache_form_control' ); ?>
<div class="metabox-holder">
<?php Util_Ui::postbox_header( esc_html__( 'General', 'w3-total-cache' ), '', 'general' ); ?>
<table class="form-table">
@ -59,7 +41,6 @@ if ( ! defined( 'W3TC' ) ) {
</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' ); ?>
@ -149,9 +130,6 @@ if ( ! defined( 'W3TC' ) ) {
</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'; ?>

View File

@ -1,4 +1,10 @@
<?php
/**
* File: buy.php
*
* @package W3TC
*/
namespace W3TC;
if ( ! defined( 'W3TC' ) ) {
@ -10,7 +16,7 @@ if ( ! defined( 'W3TC' ) ) {
<?php
echo wp_kses(
sprintf(
// translators: 1 HTML input button to buy plugin.
// translators: 1 HTML a link to buy plugin.
__(
'Unlock more speed, %1$s now!',
'w3-total-cache'

View File

@ -7,7 +7,7 @@ if ( ! defined( 'W3TC' ) ) {
?>
<?php require W3TC_INC_DIR . '/options/common/header.php'; ?>
<form action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
<form action="admin.php?page=w3tc_general" method="post">
<div class="metabox-holder">
<?php Util_Ui::postbox_header( esc_html__( 'Database Cluster Configuration File', 'w3-total-cache' ) ); ?>
<table class="form-table">
@ -56,5 +56,3 @@ if ( ! defined( 'W3TC' ) ) {
<?php Util_Ui::postbox_footer(); ?>
</div>
</form>
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>

View File

@ -9,7 +9,7 @@ if ( !defined( 'W3TC' ) )
<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'; ?>" />
value="<?php echo Util_Environment::is_dbcluster( $this->_config ) ? '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>

View File

@ -6,28 +6,6 @@ if ( ! defined( 'W3TC' ) ) {
}
?>
<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"; ?>

View File

@ -114,8 +114,9 @@ if ( ! defined( 'W3TC' ) ) {
$links,
array(
'a' => array(
'href' => array(),
'class' => array(),
'href' => array(),
'class' => array(),
'target' => array(),
),
)
);
@ -204,7 +205,8 @@ if ( ! defined( 'W3TC' ) ) {
'By %s',
'w3-total-cache'
),
'<a href="' . esc_url( $meta['author_uri'] ) . '" title="' . __( 'Visit author homepage', 'w3-total-cache' ) . '">' . esc_html( $meta['author'] ) . '</a>'
'<a href="' . esc_url( $meta['author_uri'] ) . '" target="_blank" title="' .
__( 'Visit author homepage', 'w3-total-cache' ) . '">' . esc_html( $meta['author'] ) . '</a>'
),
array(
'a' => array(
@ -215,7 +217,7 @@ if ( ! defined( 'W3TC' ) ) {
);
?>
|
<a href="<?php echo esc_url( $meta['extension_uri'] ); ?>"
<a href="<?php echo esc_url( $meta['extension_uri'] ); ?>" target="_blank"
title="<?php esc_attr_e( 'Visit extension site', 'w3-total-cache' ); ?>">
<?php esc_html_e( 'Visit extension site', 'w3-total-cache' ); ?></a>
</div>
@ -261,7 +263,3 @@ if ( ! defined( 'W3TC' ) ) {
</div>
<br class="clear">
</div>
<?php if ( is_network_admin() ) : ?>
<?php Util_Ui::button_config_save( 'extensions' ); ?>
<?php endif ?>

File diff suppressed because it is too large Load Diff

View File

@ -418,5 +418,3 @@ if ( ! defined( 'W3TC' ) ) {
<?php Util_Ui::postbox_footer(); ?>
</div>
</div>
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>

View File

@ -39,27 +39,6 @@ if ( ! defined( 'W3TC' ) ) {
?>
</p>
<p>
<?php
echo wp_kses(
sprintf(
// translators: 1 HTML submit button to rebuild minify cache.
__(
'To rebuild the minify cache use the %1$s operation.',
'w3-total-cache'
),
Util_Ui::nonce_field( 'w3tc' ) . '<input type="submit" name="w3tc_flush_minify" value="' . esc_attr__( 'empty cache', 'w3-total-cache' ) . '"' . disabled( $minify_enabled, false, false ) . ' class="button" />'
),
array(
'input' => array(
'type' => array(),
'name' => array(),
'value' => array(),
'disabled' => array(),
'class' => array(),
),
)
);
?>
<?php if ( ! $auto ) : ?>
<?php esc_html_e( 'Get minify hints using the', 'w3-total-cache' ); ?>
<input type="button" class="button button-minify-recommendations {nonce: '<?php echo esc_attr( wp_create_nonce( 'w3tc' ) ); ?>'}" value="<?php esc_attr_e( 'help', 'w3-total-cache' ); ?>" />
@ -87,9 +66,9 @@ if ( ! defined( 'W3TC' ) ) {
);
?>
</p>
</form>
<form id="minify_form" action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
<?php Util_UI::print_control_bar( 'minify_form_control' ); ?>
<div class="metabox-holder">
<?php Util_Ui::postbox_header( esc_html__( 'General', 'w3-total-cache' ), '', 'general' ); ?>
<table class="form-table">
@ -153,7 +132,6 @@ if ( ! defined( 'W3TC' ) ) {
?>
</table>
<?php Util_Ui::button_config_save( 'minify_general' ); ?>
<?php Util_Ui::postbox_footer(); ?>
<?php
@ -249,7 +227,6 @@ if ( ! defined( 'W3TC' ) ) {
?>
</table>
<?php Util_Ui::button_config_save( 'minify_html_xml' ); ?>
<?php Util_Ui::postbox_footer(); ?>
<?php
@ -601,7 +578,6 @@ if ( ! defined( 'W3TC' ) ) {
?>
</table>
<?php Util_Ui::button_config_save( 'minify_js' ); ?>
<?php Util_Ui::postbox_footer(); ?>
<?php
@ -877,7 +853,6 @@ if ( ! defined( 'W3TC' ) ) {
?>
</table>
<?php Util_Ui::button_config_save( 'minify_css' ); ?>
<?php Util_Ui::postbox_footer(); ?>
<?php Util_Ui::postbox_header( esc_html__( 'Advanced', 'w3-total-cache' ), '', 'advanced' ); ?>
@ -1004,7 +979,6 @@ if ( ! defined( 'W3TC' ) ) {
<?php endif; ?>
</table>
<?php Util_Ui::button_config_save( 'minify_advanced' ); ?>
<?php Util_Ui::postbox_footer(); ?>
<?php Util_Ui::postbox_header( esc_html__( 'Note(s):', 'w3-total-cache' ), '', 'notes' ); ?>
@ -1071,5 +1045,3 @@ if ( ! defined( 'W3TC' ) ) {
<?php Util_Ui::postbox_footer(); ?>
</div>
</form>
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>

View File

@ -7,48 +7,30 @@ if ( ! defined( 'W3TC' ) ) {
?>
<?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>'
<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'
),
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>
'<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' ) ) . ( ! $this->_config->getf_boolean( 'objectcache.enabled' ) && has_filter( 'w3tc_config_item_objectcache.enabled' ) ? esc_html__( ' via filter', 'w3-total-cache' ) : '' ) . '</span>'
),
array(
'strong' => array(),
'span' => array(
'class' => array(),
),
)
);
?>
</p>
<form action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
<?php Util_UI::print_control_bar( 'objectcache_form_control' ); ?>
<div class="metabox-holder">
<?php Util_Ui::postbox_header( esc_html__( 'Advanced', 'w3-total-cache' ), '', 'advanced' ); ?>
<table class="form-table">
@ -133,9 +115,6 @@ if ( ! defined( 'W3TC' ) ) {
<?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'; ?>

View File

@ -30,7 +30,7 @@ if ( ! defined( 'W3TC' ) ) {
);
?>
</div>
<h3 class="hndle">
<h3 class="postbox-title">
<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">
@ -53,10 +53,8 @@ if ( ! defined( 'W3TC' ) ) {
?>
</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' ); ?>" />
<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>

View File

@ -12,15 +12,12 @@ if ( ! defined( 'W3TC' ) ) {
<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" />
<textarea id="memcached_servers" name="<?php echo esc_attr( $module ); ?>__memcached__servers" <?php Util_Ui::sealing_disabled( $module ); ?> rows="10" cols="50"><?php echo esc_html( implode( "\n", $this->_config->get_array( $module . '.memcached.servers' ) ) ); ?></textarea>
<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. 127.0.0.1:11211, domain.com:11211', 'w3-total-cache' ); ?></p>
<p class="description"><?php esc_html_e( 'Enter one server definition per line: e.g. 127.0.0.1:11211 or domain.com:11211.', 'w3-total-cache' ); ?></p>
</td>
</tr>
<tr>

View File

@ -14,15 +14,12 @@ $config = Dispatcher::config();
<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" />
<textarea id="memcached_servers" name="<?php echo esc_attr( $module ); ?>__memcached__servers" <?php Util_Ui::sealing_disabled( $module ); ?> rows="10" cols="50"><?php echo esc_html( implode( "\n", $config->get_array( array( $module, 'memcached.servers' ) ) ) ); ?></textarea>
<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. 127.0.0.1:11211, domain.com:11211', 'w3-total-cache' ); ?></p>
<p class="description"><?php esc_html_e( 'Enter one server definition per line: e.g. 127.0.0.1:11211 or domain.com:11211.', 'w3-total-cache' ); ?></p>
</td>
</tr>
<?php

View File

@ -18,16 +18,12 @@ if ( ! defined( 'W3TC' ) ) {
<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" />
<textarea id="redis_servers" name="<?php echo esc_attr( $module ); ?>__redis__servers" <?php Util_Ui::sealing_disabled( $module ); ?> rows="10" cols="50"><?php echo esc_html( implode( "\n", $this->_config->get_array( $module . '.redis.servers' ) ) ); ?></textarea>
<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. 127.0.0.1:6379, domain.com:6379. To use TLS, prefix server with tls://', 'w3-total-cache' ); ?></p>
<p class="description"><?php esc_html_e( 'Enter one server definition per line: e.g. 127.0.0.1:11211 or domain.com:11211. To use TLS, prefix server with tls://', 'w3-total-cache' ); ?></p>
</td>
</tr>
<?php

View File

@ -20,16 +20,12 @@ $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" />
<textarea id="redis_servers" name="<?php echo esc_attr( $module ); ?>__redis__servers" <?php Util_Ui::sealing_disabled( $module ); ?> rows="10" cols="50"><?php echo esc_html( implode( "\n", $config->get_array( array( $module, 'redis.servers' ) ) ) ); ?></textarea>
<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. 127.0.0.1:6379, domain.com:6379. To use TLS, prefix server with tls://', 'w3-total-cache' ); ?></p>
<p class="description"><?php esc_html_e( 'Enter one server definition per line: e.g. 127.0.0.1:11211 or domain.com:11211. To use TLS, prefix server with tls://', 'w3-total-cache' ); ?></p>
</td>
</tr>
<?php

View File

@ -7,54 +7,30 @@ if ( ! defined( 'W3TC' ) ) {
?>
<?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>.'
<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'
),
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" />'
'<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(),
),
array(
'input' => array(
'type' => array(),
'name' => array(),
'value' => array(),
'disabled' => array(),
'class' => array(),
),
)
);
?>
</p>
</form>
)
);
?>
</p>
<form action="admin.php?page=<?php echo esc_attr( $this->_page ); ?>" method="post">
<?php Util_UI::print_control_bar( 'pagecache_form_control' ); ?>
<div class="metabox-holder">
<?php Util_Ui::postbox_header( esc_html__( 'General', 'w3-total-cache' ), '', 'general' ); ?>
<table class="form-table">
@ -147,7 +123,6 @@ if ( ! defined( 'W3TC' ) ) {
</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' ); ?>
@ -209,7 +184,7 @@ if ( ! defined( 'W3TC' ) ) {
);
?>
</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' ); ?>
@ -278,7 +253,6 @@ if ( ! defined( 'W3TC' ) ) {
</tr>
</table>
<?php Util_Ui::button_config_save( 'pagecache_cache_preload' ); ?>
<?php Util_Ui::postbox_footer(); ?>
<?php
@ -386,7 +360,6 @@ if ( ! defined( 'W3TC' ) ) {
</tr>
</table>
<?php Util_Ui::button_config_save( 'pagecache_purge_policy' ); ?>
<?php Util_Ui::postbox_footer(); ?>
<?php
@ -476,7 +449,7 @@ if ( ! defined( 'W3TC' ) ) {
);
?>
</table>
<?php Util_Ui::button_config_save( 'rest' ); ?>
<?php Util_Ui::postbox_footer(); ?>
@ -808,7 +781,6 @@ if ( ! defined( 'W3TC' ) ) {
<?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' ); ?>
@ -881,5 +853,3 @@ if ( ! defined( 'W3TC' ) ) {
<?php Util_Ui::postbox_footer(); ?>
</div>
</form>
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>

View File

@ -28,5 +28,3 @@ if ( ! defined( 'W3TC' ) ) {
}
?>
</div>
<?php require W3TC_INC_DIR . '/options/common/footer.php'; ?>

View File

@ -58,5 +58,3 @@ if ( ! defined( 'W3TC' ) ) {
</div>
<div id="cdn_export_file_log" class="log"></div>
<?php require W3TC_INC_DIR . '/popup/common/footer.php'; ?>

View File

@ -48,5 +48,3 @@ jQuery(function() {
</div>
<div id="cdn_export_library_log" class="log"></div>
<?php require W3TC_INC_DIR . '/popup/common/footer.php'; ?>

View File

@ -93,5 +93,3 @@ jQuery(function() {
<p>
<textarea rows="10" cols="90" id="cdn_import_library_rules" class="rules"></textarea>
</p>
<?php require W3TC_INC_DIR . '/popup/common/footer.php'; ?>

View File

@ -84,5 +84,3 @@ if ( ! defined( 'W3TC' ) ) {
</div>
<?php endforeach; ?>
</div>
<?php require W3TC_INC_DIR . '/popup/common/footer.php'; ?>

View File

@ -106,5 +106,3 @@ if ( ! defined( 'W3TC' ) ) {
<p class="empty"><?php esc_html_e( 'Purge queue is empty', 'w3-total-cache' ); ?></p>
<?php endif; ?>
</div>
<?php require W3TC_INC_DIR . '/popup/common/footer.php'; ?>

View File

@ -74,5 +74,3 @@ jQuery(function() {
</div>
<div id="cdn_rename_domain_log" class="log"></div>
<?php require W3TC_INC_DIR . '/popup/common/footer.php'; ?>

View File

@ -98,85 +98,86 @@ class Template {
'tr' => array(),
);
do_action( 'w3tc-dashboard-head' );
?>
<div class="wrap" id="w3tc">
<?php \W3TC\Util_Ui::print_breadcrumb(); ?>
<div id="w3tc-wizard-container">
<div id="w3tc-wizard-container">
<div id="w3tc_wizard_header">
<img id="w3tc_wizard_icon" src="<?php echo esc_url( plugins_url( '/w3-total-cache/pub/img/w3tc_cube-shadow.png' ) ); ?>" />
<div id="w3tc_wizard_title">
<span>TOTAL</span> <span>CACHE</span><span>:</span> <span><?php echo esc_html( $this->config['title'] ); ?></span>
</div>
</div>
<div id="w3tc_wizard_content">
<ul id="w3tc-options-menu">
<?php
foreach ( $this->config['steps'] as $number => $step ) {
$number++;
$element_id = 'w3tc-wizard-step-' . ( isset( $step['id'] ) ? $step['id'] : $number );
if ( isset( $this->config['steps_location'] ) && 'left' === $this->config['steps_location'] ) {
?>
<li id="<?php echo esc_attr( $element_id ); ?>">
<?php echo esc_html( $step['text'] ); ?>
</li>
<?php
} else {
?>
<li id="<?php echo esc_attr( $element_id ); ?>"><?php echo esc_html( $number ); ?></li>
<li id="<?php echo esc_attr( $element_id ); ?>-text"><?php echo esc_html( $step['text'] ); ?></li>
<?php
}
}
?>
</ul>
<?php
// The first slide is visible.
$hidden = '';
foreach ( $this->config['slides'] as $number => $slide ) {
$number++;
$element_id = 'w3tc-wizard-slide-' . ( isset( $slide['id'] ) ? $slide['id'] : $number );
?>
<div id="<?php echo esc_attr( $element_id ); ?>" class="w3tc-wizard-slides<?php echo esc_attr( $hidden ); ?>">
<h3><?php echo wp_kses( $slide['headline'], $allowed_html ); ?></h3>
<?php echo wp_kses( $slide['markup'], $allowed_html ); ?>
<div id="w3tc_wizard_header">
<img id="w3tc_wizard_icon" src="<?php echo esc_url( plugins_url( '/w3-total-cache/pub/img/w3tc_cube-shadow.png' ) ); ?>" />
<div id="w3tc_wizard_title">
<span>TOTAL</span> <span>CACHE</span><span>:</span> <span><?php echo esc_html( $this->config['title'] ); ?></span>
</div>
<?php
// All subsequent slides are hidden.
$hidden = ' hidden';
}
unset( $hidden );
?>
</div>
<div id="w3tc_wizard_footer">
<div id="w3tc-wizard-buttons">
<span>
<button id="w3tc-wizard-skip" class="w3tc-wizard-buttons"><?php esc_html_e( 'SKIP', 'w3-total-cache' ); ?></button>
</span>
<span id="w3tc-wizard-previous-span" class="hidden">
<button id="w3tc-wizard-previous" class="w3tc-wizard-buttons"><?php esc_html_e( 'PREVIOUS', 'w3-total-cache' ); ?></button>
</span>
<span>
<button id="w3tc-wizard-next" class="w3tc-wizard-buttons"><?php esc_html_e( 'NEXT', 'w3-total-cache' ); ?></button>
</span>
<span id="w3tc-wizard-dashboard-span" class="hidden">
<button id="w3tc-wizard-dashboard" class="w3tc-wizard-buttons"><?php esc_html_e( 'DASHBOARD', 'w3-total-cache' ); ?></button>
</span>
</div>
</div>
<?php wp_nonce_field( 'w3tc_wizard' ); ?>
<div id="test-results" class="hidden"></div>
</div>
<div id="w3tc_wizard_content">
<ul id="w3tc-options-menu">
<?php
foreach ( $this->config['steps'] as $number => $step ) {
$number++;
$element_id = 'w3tc-wizard-step-' . ( isset( $step['id'] ) ? $step['id'] : $number );
if ( isset( $this->config['steps_location'] ) && 'left' === $this->config['steps_location'] ) {
?>
<li id="<?php echo esc_attr( $element_id ); ?>">
<?php echo esc_html( $step['text'] ); ?>
</li>
<?php
} else {
?>
<li id="<?php echo esc_attr( $element_id ); ?>"><?php echo esc_html( $number ); ?></li>
<li id="<?php echo esc_attr( $element_id ); ?>-text"><?php echo esc_html( $step['text'] ); ?></li>
<?php
}
}
?>
</ul>
<?php
// The first slide is visible.
$hidden = '';
foreach ( $this->config['slides'] as $number => $slide ) {
$number++;
$element_id = 'w3tc-wizard-slide-' . ( isset( $slide['id'] ) ? $slide['id'] : $number );
?>
<div id="<?php echo esc_attr( $element_id ); ?>" class="w3tc-wizard-slides<?php echo esc_attr( $hidden ); ?>">
<h3><?php echo wp_kses( $slide['headline'], $allowed_html ); ?></h3>
<?php echo wp_kses( $slide['markup'], $allowed_html ); ?>
</div>
<?php
// All subsequent slides are hidden.
$hidden = ' hidden';
}
unset( $hidden );
?>
</div>
<div id="w3tc_wizard_footer">
<div id="w3tc-wizard-buttons">
<span>
<button id="w3tc-wizard-skip" class="w3tc-wizard-buttons"><?php esc_html_e( 'SKIP', 'w3-total-cache' ); ?></button>
</span>
<span id="w3tc-wizard-previous-span" class="hidden">
<button id="w3tc-wizard-previous" class="w3tc-wizard-buttons"><?php esc_html_e( 'PREVIOUS', 'w3-total-cache' ); ?></button>
</span>
<span>
<button id="w3tc-wizard-next" class="w3tc-wizard-buttons"><?php esc_html_e( 'NEXT', 'w3-total-cache' ); ?></button>
</span>
<span id="w3tc-wizard-dashboard-span" class="hidden">
<button id="w3tc-wizard-dashboard" class="w3tc-wizard-buttons"><?php esc_html_e( 'DASHBOARD', 'w3-total-cache' ); ?></button>
</span>
</div>
</div>
<?php wp_nonce_field( 'w3tc_wizard' ); ?>
<div id="test-results" class="hidden"></div>
</div>
<?php
require W3TC_INC_DIR . '/options/common/footer.php';
}
/**