modified file w3-total-cache
This commit is contained in:
@ -0,0 +1,160 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
?>
|
||||
<h3>Minify: Help Wizard</h3>
|
||||
|
||||
<p>
|
||||
<?php esc_html_e( 'To get started with minify, we\'ve identified the following external CSS and JS objects in the', 'w3-total-cache' ); ?>
|
||||
<select id="recom_theme">
|
||||
<?php foreach ( $themes as $_theme_key => $_theme_name ) : ?>
|
||||
<option value="<?php echo esc_attr( $_theme_key ); ?>"<?php selected( $_theme_key, $theme_key ); ?>><?php echo esc_html( $_theme_name ); ?><?php echo $_theme_key === $theme_key ? '(active)' : ''; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php esc_html_e( 'theme. Select "add" the files you wish to minify, then click "apply & close" to save the settings.', 'w3-total-cache' ); ?>
|
||||
</p>
|
||||
|
||||
<div id="recom_container">
|
||||
<h4 style="margin-top: 0;">JavaScript:</h4>
|
||||
<?php if ( count( $js_groups ) ) : ?>
|
||||
<ul id="recom_js_files" class="minify-files">
|
||||
<?php
|
||||
$index = 0;
|
||||
foreach ( $js_groups as $js_group => $js_files ) :
|
||||
foreach ( $js_files as $js_file ) :
|
||||
$index++;
|
||||
?>
|
||||
<li>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="minify-files-add"><?php esc_html_e( 'Add:', 'w3-total-cache' ); ?></th>
|
||||
<th> </th>
|
||||
<th><?php esc_html_e( 'File URI:', 'w3-total-cache' ); ?></th>
|
||||
<th><?php esc_html_e( 'Template:', 'w3-total-cache' ); ?></th>
|
||||
<th colspan="2"><?php esc_html_e( 'Embed Location:', 'w3-total-cache' ); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="minify-files-add">
|
||||
<input type="checkbox" name="recom_js_useit" value="1"<?php checked( isset( $checked_js[ $js_group ][ $js_file ] ), true ); ?> />
|
||||
</td>
|
||||
<td><?php echo esc_html( $index ); ?>.</td>
|
||||
<td>
|
||||
<input type="text" name="recom_js_file" value="<?php echo esc_attr( $js_file ); /* search w3tc-url-escaping */ ?>" size="70" />
|
||||
</td>
|
||||
<td>
|
||||
<select name="recom_js_template">
|
||||
<?php foreach ( $templates as $template_key => $template_name ) : ?>
|
||||
<option value="<?php echo esc_attr( $template_key ); ?>"<?php selected( $template_key, $js_group ); ?>><?php echo esc_html( $template_name ); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<?php $selected = ( isset( $locations_js[ $js_group ][ $js_file ] ) ? $locations_js[ $js_group ][ $js_file ] : '' ); ?>
|
||||
<select name="recom_js_location">
|
||||
<option value="include"<?php selected( $selected, 'include' ); ?>><?php esc_html_e( 'Embed in <head>', 'w3-total-cache' ); ?></option>
|
||||
<option value="include-body"<?php selected( $selected, 'include-body' ); ?>><?php esc_html_e( 'Embed after <body>', 'w3-total-cache' ); ?></option>
|
||||
<option value="include-footer"<?php selected( $selected, 'include-footer' ); ?>><?php esc_html_e( 'Embed before </body>', 'w3-total-cache' ); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input class="js_file_verify button" type="button" value="<?php esc_html_e( 'Verify URI', 'w3-total-cache' ); ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<p>
|
||||
<a href="#" id="recom_js_check"><?php esc_html_e( 'Check / Uncheck All', 'w3-total-cache' ); ?></a>
|
||||
</p>
|
||||
<?php else : ?>
|
||||
<p><?php esc_html_e( 'No files found.', 'w3-total-cache' ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<h4><?php esc_html_e( 'Cascading Style Sheets:', 'w3-total-cache' ); ?></h4>
|
||||
|
||||
<?php if ( count( $css_groups ) ) : ?>
|
||||
<ul id="recom_css_files" class="minify-files">
|
||||
<?php
|
||||
$index = 0;
|
||||
foreach ( $css_groups as $css_group => $css_files ) :
|
||||
foreach ( $css_files as $css_file ) :
|
||||
$index++;
|
||||
?>
|
||||
<li>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="minify-files-add"><?php esc_html_e( 'Add:', 'w3-total-cache' ); ?></th>
|
||||
<th> </th>
|
||||
<th><?php esc_html_e( 'File URI:', 'w3-total-cache' ); ?></th>
|
||||
<th colspan="2"><?php esc_html_e( 'Template:', 'w3-total-cache' ); ?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="minify-files-add">
|
||||
<input type="checkbox" name="recom_css_useit" value="1"<?php checked( isset( $checked_css[ $css_group ][ $css_file ] ), true ); ?> />
|
||||
</td>
|
||||
<td><?php echo esc_html( $index ); ?>.</td>
|
||||
<td>
|
||||
<input type="text" name="recom_css_file" value="<?php echo esc_html( $css_file ); /* search w3tc-url-escaping */ ?>" size="70" />
|
||||
</td>
|
||||
<td>
|
||||
<select name="recom_css_template">
|
||||
<?php foreach ( $templates as $template_key => $template_name ) : ?>
|
||||
<option value="<?php echo esc_attr( $template_key ); ?>"<?php selected( $template_key, $css_group ); ?>><?php echo esc_html( $template_name ); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<input class="css_file_verify button" type="button" value="<?php esc_html_e( 'Verify URI', 'w3-total-cache' ); ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<p>
|
||||
<a href="#" id="recom_css_check"><?php esc_html_e( 'Check / Uncheck All', 'w3-total-cache' ); ?></a>
|
||||
</p>
|
||||
<?php else : ?>
|
||||
<p>No files found.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div id="recom_container_bottom">
|
||||
<p>
|
||||
<input class="recom_apply button-primary" type="button" value="<?php esc_attr_e( 'Apply & close', 'w3-total-cache' ); ?>" />
|
||||
</p>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php esc_html_e( 'Notes', 'w3-total-cache' ); ?></legend>
|
||||
|
||||
<ul>
|
||||
<li><?php esc_html_e( 'Typically minification of advertiser code, analytics/statistics or any other types of tracking code is not recommended.', 'w3-total-cache' ); ?></li>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML a tag to W3TC plugin config support page, 2 closing HTML a tag.
|
||||
__(
|
||||
'Scripts that were not already detected above may require %1$sprofessional consultation%2$s to implement.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<a href="admin.php?page=w3tc_support&request_type=plugin_config">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
</div>
|
@ -0,0 +1,4 @@
|
||||
<div style="min-height:400px;height:100%;margin-top:15px;">
|
||||
<iframe id="buy_frame" name="buy_frame" src="<?php echo esc_url( $iframe_url ); ?>" style="height:90%;width:100%" scrolling="auto">
|
||||
</iframe>
|
||||
</div>
|
@ -0,0 +1,520 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
?>
|
||||
<h3><?php esc_html_e( 'Compatibility Check', 'w3-total-cache' ); ?></h3>
|
||||
|
||||
<fieldset>
|
||||
<legend><?php esc_html_e( 'Legend', 'w3-total-cache' ); ?></legend>
|
||||
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML span with background, 2 closing HTML span tag, 3 HTML line break tag.
|
||||
__(
|
||||
'%1$sInstalled/Ok/Yes/True/On%2$s: Functionality will work properly.%3$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<span style="padding: 0 2px;padding: 0 5px;background-color: #33cc33">',
|
||||
'</span>',
|
||||
'<br />'
|
||||
),
|
||||
array(
|
||||
'span' => array(
|
||||
'style' => array(),
|
||||
),
|
||||
'br' => array(),
|
||||
)
|
||||
);
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML span with background, 2 closing HTML span tag, 3 HTML line break tag.
|
||||
__(
|
||||
'%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="padding: 0 2px;padding: 0 5px;background-color: #FFFF00">',
|
||||
'</span>',
|
||||
'<br />'
|
||||
),
|
||||
array(
|
||||
'span' => array(
|
||||
'style' => array(),
|
||||
),
|
||||
'br' => array(),
|
||||
)
|
||||
);
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML span with background, 2 closing HTML span tag, 3 HTML line break tag.
|
||||
__(
|
||||
'%1$sNot installed/Error/No/False%2$s: Plugin or some functions may not work.%3$s',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<span style="padding: 0 2px;padding: 0 5px;background-color: #FF0000; color: #FFFFFF;">',
|
||||
'</span>',
|
||||
'<br />'
|
||||
),
|
||||
array(
|
||||
'span' => array(
|
||||
'style' => array(),
|
||||
),
|
||||
'br' => array(),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
<div id="w3tc-self-test">
|
||||
<h4 style="margin-top: 0;"><?php esc_html_e( 'Server Modules & Resources:', 'w3-total-cache' ); ?></h4>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<?php esc_html_e( 'Plugin Version:', 'w3-total-cache' ); ?> <code><?php echo esc_html( W3TC_VERSION ); ?></code>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<?php esc_html_e( 'PHP Version:', 'w3-total-cache' ); ?>
|
||||
<code><?php echo PHP_VERSION; ?></code>;
|
||||
</li>
|
||||
|
||||
<li>
|
||||
Web Server:
|
||||
<?php if ( stristr( $_SERVER['SERVER_SOFTWARE'], 'apache' ) !== false ) : ?>
|
||||
<code>Apache</code>
|
||||
<?php elseif ( stristr( $_SERVER['SERVER_SOFTWARE'], 'LiteSpeed' ) !== false ) : ?>
|
||||
<code>Lite Speed</code>
|
||||
<?php elseif ( stristr( $_SERVER['SERVER_SOFTWARE'], 'nginx' ) !== false ) : ?>
|
||||
<code>nginx</code>
|
||||
<?php elseif ( stristr( $_SERVER['SERVER_SOFTWARE'], 'lighttpd' ) !== false ) : ?>
|
||||
<code>lighttpd</code>
|
||||
<?php elseif ( stristr( $_SERVER['SERVER_SOFTWARE'], 'iis' ) !== false ) : ?>
|
||||
<code>Microsoft IIS</code>
|
||||
<?php else : ?>
|
||||
<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="padding: 0 2px;background-color: #33cc33">Installed</span>
|
||||
<?php else : ?>
|
||||
<span style="padding: 0 2px;background-color: #FFFF00">Not detected</span>
|
||||
<?php endif; ?>
|
||||
<span class="w3tc-self-test-hint">
|
||||
<?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.
|
||||
__(
|
||||
'(required for Self-hosted (%1$sFTP%2$s) %3$sCDN%4$s support)',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'File Transfer Protocol', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<?php esc_html_e( 'Multibyte String support:', 'w3-total-cache' ); ?>
|
||||
<?php if ( function_exists( 'mb_substr' ) ) : ?>
|
||||
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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>
|
||||
|
||||
<li>
|
||||
<?php esc_html_e( 'cURL extension:', 'w3-total-cache' ); ?>
|
||||
<?php if ( function_exists( 'curl_init' ) ) : ?>
|
||||
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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>
|
||||
|
||||
<li>
|
||||
zlib extension:
|
||||
<?php if ( function_exists( 'gzencode' ) ) : ?>
|
||||
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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>
|
||||
|
||||
<li>
|
||||
brotli extension:
|
||||
<?php if ( function_exists( 'brotli_compress' ) ) : ?>
|
||||
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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>
|
||||
|
||||
<li>
|
||||
Opcode cache:
|
||||
<?php if ( Util_Installed::opcache() ) : ?>
|
||||
<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="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed (APC)', 'w3-total-cache' ); ?></span>
|
||||
<?php elseif ( Util_Installed::eaccelerator() ) : ?>
|
||||
<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="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed (XCache)', 'w3-total-cache' ); ?></span>
|
||||
<?php elseif ( PHP_VERSION >= 6 ) : ?>
|
||||
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'PHP6', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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>
|
||||
|
||||
<li>
|
||||
<?php esc_html_e( 'Mime type detection:', 'w3-total-cache' ); ?>
|
||||
<?php if ( function_exists( 'finfo_open' ) ) : ?>
|
||||
<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="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed (mime_content_type)', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acornym tag, 2 closing HTML acronym tag.
|
||||
__(
|
||||
'(required for %1$sCDN%2$s support)',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<?php esc_html_e( 'Hash function:', 'w3-total-cache' ); ?>
|
||||
<?php if ( function_exists( 'hash' ) ) : ?>
|
||||
<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="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed (mhash)', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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="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="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="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'On', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Available', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML acronym tag, 2 closing HTML acronym tag,
|
||||
// translators: 3 opening HTML acronym tag, 4 closing HTML acronym tag,
|
||||
// translators: 5 opening HTML acronym tag, 6 closing HTML acronym tag.
|
||||
__(
|
||||
'(required for Self-hosted (%1$sFTP%2$s) %3$sCDN%4$s %5$sSFTP%6$s support)',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<acronym title="' . esc_attr__( 'File Transfer Protocol', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Content Delivery Network', 'w3-total-cache' ) . '">',
|
||||
'</acronym>',
|
||||
'<acronym title="' . esc_attr__( 'Secure File Transfer Protocol', 'w3-total-cache' ) . '">',
|
||||
'</acronym>'
|
||||
),
|
||||
array(
|
||||
'acronym' => array(
|
||||
'title' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<?php
|
||||
if ( Util_Environment::is_apache() ) :
|
||||
|
||||
$modules = array(
|
||||
'mod_deflate',
|
||||
'mod_env',
|
||||
'mod_expires',
|
||||
'mod_filter',
|
||||
'mod_ext_filter',
|
||||
'mod_headers',
|
||||
'mod_mime',
|
||||
'mod_rewrite',
|
||||
'mod_setenvif',
|
||||
);
|
||||
|
||||
if ( function_exists( 'apache_get_modules' ) ) {
|
||||
// apache_get_modules only works when PHP is installed as an Apache module.
|
||||
$apache_modules = apache_get_modules();
|
||||
|
||||
} elseif ( function_exists( 'exec' ) ) {
|
||||
// alternative modules capture for php CGI.
|
||||
exec( 'apache2 -t -D DUMP_MODULES', $output, $status );
|
||||
|
||||
if ( 0 !== $status ) {
|
||||
exec( 'httpd -t -D DUMP_MODULES', $output, $status );
|
||||
}
|
||||
|
||||
if ( 0 === $status && 0 < count( $output ) ) {
|
||||
$apache_modules = array();
|
||||
|
||||
foreach ( $output as $line ) {
|
||||
if ( preg_match( '/^\s(\S+)\s\((\S+)\)$/', $line, $matches ) === 1 ) {
|
||||
$apache_modules[] = $matches[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// modules have slightly different names.
|
||||
$modules = array(
|
||||
'deflate_module',
|
||||
'env_module',
|
||||
'expires_module',
|
||||
'filter_module',
|
||||
'ext_filter_module',
|
||||
'headers_module',
|
||||
'mime_module',
|
||||
'rewrite_module',
|
||||
'setenvif_module',
|
||||
);
|
||||
} else {
|
||||
$apache_modules = false;
|
||||
}
|
||||
|
||||
?>
|
||||
<h5><?php esc_html_e( 'Detection of the below modules may not be possible on all environments. As such "Not detected" means that the environment disallowed detection for the given module which may still be installed/enabled whereas "Not installed" means the given module was detected but is not installed/detected.', 'w3-total-cache' ); ?></h5>
|
||||
<?php foreach ( $modules as $module ) : ?>
|
||||
<li>
|
||||
<?php echo esc_html( $module ); ?>:
|
||||
<?php if ( ! empty( $apache_modules ) ) : ?>
|
||||
<?php if ( in_array( $module, $apache_modules, true ) ) : ?>
|
||||
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Installed', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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="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>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<?php
|
||||
$additional_checks = apply_filters( 'w3tc_compatibility_test', __return_empty_array() );
|
||||
if ( $additional_checks ) :
|
||||
?>
|
||||
<h4><?php esc_html_e( 'Additional Server Modules', 'w3-total-cache' ); ?></h4>
|
||||
<ul>
|
||||
<?php
|
||||
foreach ( $additional_checks as $check ) :
|
||||
echo '<li>' . wp_kses( $check, Util_Ui::get_allowed_html_for_wp_kses_from_content( $check ) ) . '</li>';
|
||||
endforeach;
|
||||
?>
|
||||
</ul>
|
||||
<?php
|
||||
endif;
|
||||
?>
|
||||
|
||||
<h4><?php esc_html_e( 'WordPress Resources', 'w3-total-cache' ); ?></h4>
|
||||
|
||||
<ul>
|
||||
<?php
|
||||
$paths = array_unique(
|
||||
array(
|
||||
Util_Rule::get_pgcache_rules_core_path(),
|
||||
Util_Rule::get_browsercache_rules_cache_path(),
|
||||
)
|
||||
);
|
||||
?>
|
||||
<?php
|
||||
foreach ( $paths as $path ) :
|
||||
if ( $path ) :
|
||||
?>
|
||||
<li>
|
||||
<?php echo esc_html( $path ); ?>:
|
||||
<?php if ( file_exists( $path ) ) : ?>
|
||||
<?php if ( Util_File::is_writable( $path ) ) : ?>
|
||||
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'OK', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Write-able', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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>
|
||||
<?php
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
<li>
|
||||
<?php echo esc_html( Util_Environment::normalize_path( WP_CONTENT_DIR ) ); ?>:
|
||||
<?php if ( Util_File::is_writable_dir( WP_CONTENT_DIR ) ) : ?>
|
||||
<span style="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'OK', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<span style="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Not write-able', 'w3-total-cache' ); ?></span>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<?php $uploads_dir = @wp_upload_dir(); ?>
|
||||
<?php echo esc_html( $uploads_dir['path'] ); ?>:
|
||||
<?php if ( ! empty( $uploads_dir['error'] ) ) : ?>
|
||||
<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="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Not write-able', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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="padding: 0 2px;background-color: #33cc33"><?php echo esc_html( $permalink_structure ); ?></span>
|
||||
<?php else : ?>
|
||||
<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="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="padding: 0 2px;background-color: #FF0000; color: #FFFFFF;"><?php esc_html_e( 'Defined (false)', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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="padding: 0 2px;background-color: #33cc33"><?php esc_html_e( 'Enabled', 'w3-total-cache' ); ?></span>
|
||||
<?php else : ?>
|
||||
<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="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="padding: 0 2px;background-color: #FFFF00"><?php esc_html_e( 'Off', 'w3-total-cache' ); ?></span>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="w3tc-self-test-bottom">
|
||||
<input class="button-primary" type="button" value="<?php esc_attr_e( 'Close', 'w3-total-cache' ); ?>" />
|
||||
</div>
|
@ -0,0 +1,152 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
|
||||
$state_master = Dispatcher::config_state_master();
|
||||
|
||||
?>
|
||||
<div id="w3tc-support-us">
|
||||
<div class="w3tc-overlay-logo"></div>
|
||||
<header>
|
||||
<div class="left" style="float:left">
|
||||
<h2>Frederick Townes</h2>
|
||||
<h3>CEO, W3 EDGE</h3>
|
||||
</div>
|
||||
<div class="right" style="float:right">
|
||||
<div style="display: inline-block">
|
||||
<iframe height="21" width="100" src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2FW3EDGE&width=100&height=21&colorscheme=light&layout=button_count&action=like&show_faces=true&send=false&appId=53494339074" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>
|
||||
</div>
|
||||
<div style="display: inline-block; margin-left: 10px;">
|
||||
<a href="https://twitter.com/w3edge" class="twitter-follow-button" data-show-count="true" data-show-screen-name="false" target="_blank">Follow @w3edge</a>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
</div>
|
||||
<div style="display: inline-block; margin-left: 10px;">
|
||||
<!-- Place this tag where you want the widget to render. -->
|
||||
<div class="g-follow" data-annotation="bubble" data-height="20" data-href="https://plus.google.com/106009620651385224281" data-rel="author"></div>
|
||||
<!-- Place this tag after the last widget tag. -->
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
|
||||
po.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<form action="<?php echo esc_attr( Util_Ui::admin_url( 'admin.php?page=w3tc_general' ) ); ?>&w3tc_config_save_support_us" method="post">
|
||||
|
||||
<div class="content">
|
||||
<h3 class="font-palette-dark-skies"><?php esc_html_e( 'Thank you! You\'ve been using W3 Total Cache for seven days or so! Please support us:', 'w3-total-cache' ); ?></h3>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<label>
|
||||
Please give us a five star rating:<br>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
Util_Ui::action_button(
|
||||
__( 'Login & Rate Us', 'w3-total-cache' ),
|
||||
W3TC_SUPPORT_US_RATE_URL,
|
||||
'btn w3tc-size image btn-default palette-wordpress',
|
||||
true
|
||||
),
|
||||
array(
|
||||
'input' => array(
|
||||
'type' => array(),
|
||||
'name' => array(),
|
||||
'class' => array(),
|
||||
'value' => array(),
|
||||
'onclick' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<label>Post a tweet:<br />
|
||||
<?php
|
||||
$tweet_url = 'http://twitter.com/home/?status=' . rawurlencode( W3TC_SUPPORT_US_TWEET );
|
||||
echo wp_kses(
|
||||
Util_Ui::action_button(
|
||||
__( 'Tell Your Friends', 'w3-total-cache' ),
|
||||
$tweet_url,
|
||||
'btn w3tc-size image btn-default palette-twitter',
|
||||
true
|
||||
),
|
||||
array(
|
||||
'input' => array(
|
||||
'type' => array(),
|
||||
'name' => array(),
|
||||
'class' => array(),
|
||||
'value' => array(),
|
||||
'onclick' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
echo wp_kses(
|
||||
Util_Ui::hidden(
|
||||
__( 'tweeted' ),
|
||||
__( 'tweeted' ),
|
||||
'0'
|
||||
),
|
||||
array(
|
||||
'input' => array(
|
||||
'type' => array(),
|
||||
'id' => array(),
|
||||
'name' => array(),
|
||||
'value' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
<label class="w3tc_signup_email" for="email">Don't forget to join our newsletter:<br />
|
||||
<input id="email" name="email" type="text" class="form-control w3tc-size" value="<?php echo esc_attr( $email ); ?>">
|
||||
</label><br />
|
||||
<input type="checkbox" name="signmeup" id="signmeup" class="css-checkbox" value="1" checked="checked" />
|
||||
<label for="signmeup" class="css-label"> <?php esc_html_e( 'Yes, sign me up.', 'w3-total-cache' ); ?> </label>
|
||||
</p>
|
||||
<?php if ( $state_master->get_string( 'license.community_terms' ) !== 'accept' ) : ?>
|
||||
<p>
|
||||
<input type="checkbox" name="accept_terms" id="accept_terms" class="css-checkbox" value="1"/>
|
||||
<label for="accept_terms" class="css-label">
|
||||
<?php
|
||||
echo wp_kses(
|
||||
sprintf(
|
||||
// translators: 1 opening HTML a tag to W3TC Terms page, 2 closing HTML a tag.
|
||||
__(
|
||||
'Please review the latest %1$sterms of use and privacy policy%2$s, and accept them.',
|
||||
'w3-total-cache'
|
||||
),
|
||||
'<a href="' . esc_url( W3TC_TERMS_URL ) . '" target="blank">',
|
||||
'</a>'
|
||||
),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
'target' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</label>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<div class="w3tc_overlay_footer">
|
||||
<p>
|
||||
<?php wp_nonce_field( 'w3tc' ); ?>
|
||||
<input type="submit" class="btn w3tc-size image w3tc-button-save btn-primary outset save palette-turquoise " value="Save & close">
|
||||
<input type="button" class="btn w3tc-size btn-default outset palette-light-grey w3tc_lightbox_close" value="Cancel">
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
namespace W3TC;
|
||||
|
||||
if ( ! defined( 'W3TC' ) ) {
|
||||
die();
|
||||
}
|
||||
?>
|
||||
<div id="w3tc-upgrade">
|
||||
|
||||
<div id="w3tc_upgrade_header">
|
||||
|
||||
<div>
|
||||
<div>
|
||||
<strong>W3 TOTAL CACHE</strong><br />
|
||||
<span style="font-size:16px;"><?php esc_html_e( 'Unlock more performance options', 'w3-total-cache' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<?php if ( \W3TC\Util_Environment::is_https() ) : ?>
|
||||
<input id="w3tc-purchase" type="button"
|
||||
class="btn w3tc-size w3tc-palette-tp w3tc-gauge-tp"
|
||||
value="<?php esc_attr_e( 'Go Faster With Pro', 'w3-total-cache' ); ?> " />
|
||||
<?php else : ?>
|
||||
<a id="w3tc-purchase-link"
|
||||
href="<?php echo esc_url( \W3TC\Licensing_Core::purchase_url( $data_src, $renew_key, $client_id ) ); ?>"
|
||||
target="_blank"
|
||||
class="btn w3tc-size w3tc-palette-tp w3tc-gauge-tp">
|
||||
<?php esc_html_e( 'Go Faster With Pro', 'w3-total-cache' ); ?>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="w3tc_overlay_upgrade_header">
|
||||
<iframe src="https://www.w3-edge.com/checkout-ad/?data_src=<?php echo esc_attr( $data_src ); ?>&client_id=<?php echo esc_attr( $client_id ); ?>" width="100%" height="410px"></iframe>
|
||||
</div>
|
||||
|
||||
</div>
|
Reference in New Issue
Block a user