function w3tc_footer_comment($strings)
 {
     $strings[] = sprintf(__('Minified using %s%s', 'w3-total-cache'), Cache::engine_name($this->_config->get_string('minify.engine')), $this->minify_reject_reason != '' ? sprintf(' (%s)', $this->minify_reject_reason) : '');
     if ($this->_config->get_boolean('minify.debug')) {
         $strings[] = "Minify debug info:";
         $strings[] = sprintf("%s%s", str_pad('Engine: ', 20), Cache::engine_name($this->_config->get_string('minify.engine')));
         $strings[] = sprintf("%s%s", str_pad('Theme: ', 20), $this->get_theme());
         $strings[] = sprintf("%s%s", str_pad('Template: ', 20), $this->get_template());
         if ($this->minify_reject_reason) {
             $strings[] = sprintf("%s%s", str_pad('Reject reason: ', 20), $this->minify_reject_reason);
         }
         if ($this->error) {
             $strings[] = sprintf("%s%s", str_pad('Errors: ', 20), $this->error);
         }
         if (count($this->replaced_styles)) {
             $strings[] = "Replaced CSS files:";
             foreach ($this->replaced_styles as $index => $file) {
                 $strings[] = sprintf("%d. %s", $index + 1, Util_Content::escape_comment($file));
             }
         }
         if (count($this->replaced_scripts)) {
             $strings[] = "Replaced JavaScript files:";
             foreach ($this->replaced_scripts as $index => $file) {
                 $strings[] = sprintf("%d. %s\r\n", $index + 1, Util_Content::escape_comment($file));
             }
         }
     }
     return $strings;
 }
Esempio n. 2
0
';
    <?php 
    }
    ?>
    <?php 
}
?>
/*]]>*/</script>

<form action="admin.php?page=<?php 
echo $this->_page;
?>
" method="post">
    <p>
        <?php 
echo sprintf(__('Minify via %s is currently %s.', 'w3-total-cache'), Cache::engine_name($this->_config->get_string('minify.engine')), '<span class="w3tc-' . ($minify_enabled ? 'enabled">' . __('enabled', 'w3-total-cache') : 'disabled">' . __('disabled', 'w3-total-cache')) . '</span>');
?>
    </p>
    <p>
		<?php 
echo sprintf(__('To rebuild the minify cache use the %s operation.', 'w3-total-cache'), Util_Ui::nonce_field('w3tc') . '<input type="submit" name="w3tc_flush_minify" value="' . __('empty cache', 'w3-total-cache') . '"' . disabled($minify_enabled, false, false) . ' class="button" />');
?>
        <?php 
if (!$auto) {
    ?>
            <?php 
    _e('Get minify hints using the', 'w3-total-cache');
    ?>
            <input type="button" class="button button-minify-recommendations {nonce: '<?php 
    echo wp_create_nonce('w3tc');
    ?>
namespace W3TC;

if (!defined('W3TC')) {
    die;
}
include W3TC_INC_DIR . '/options/common/header.php';
?>

<form action="admin.php?page=<?php 
echo $this->_page;
?>
" method="post">
	<p>
		<?php 
echo sprintf(__('Page caching via %1$s is currently %2$s', 'w3-total-cache'), '<strong>' . Cache::engine_name($this->_config->get_string('pgcache.engine')) . '</strong>', '<span class="w3tc-' . ($pgcache_enabled ? 'enabled">' . __('enabled', 'w3-total-cache') : 'disabled">' . __('disabled', 'w3-total-cache')) . '</span>.');
?>
	</p>
	<p>
		<?php 
echo sprintf(__('To rebuild the page cache use the %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" />');
?>
	</p>
</form>

<form action="admin.php?page=<?php 
echo $this->_page;
?>
" method="post">
	<div class="metabox-holder">
		<?php 
Esempio n. 4
0
_e('Configuration', 'w3-total-cache');
?>
</a> |
	<a href="#advanced"><?php 
_e('Advanced', 'w3-total-cache');
?>
</a> |
	<a href="#notes"><?php 
_e('Note(s)', 'w3-total-cache');
?>
</a>
</p>

<p>
	<?php 
echo sprintf(__('Content Delivery Network support via %1$s is currently %2$s.', 'w3-total-cache'), '<strong>' . Cache::engine_name($this->_config->get_string('cdn.engine')) . '</strong>', '<span class="w3tc-' . ($cdn_enabled ? 'enabled">' . __('enabled', 'w3-total-cache') : 'disabled">' . __('disabled', 'w3-total-cache')) . '</span>');
?>
</p>
<form id="w3tc_cdn" action="admin.php?page=<?php 
echo $this->_page;
?>
" method="post">
	<p>
<?php 
if ($cdn_mirror) {
    ?>
	Maximize <acronym title="Content Delivery Network">CDN</acronym> usage by <input id="cdn_rename_domain" class="button {nonce: '<?php 
    echo wp_create_nonce('w3tc');
    ?>
'}" type="button" value="modify attachment URLs" /> or
	<input id="cdn_import_library" class="button {nonce: '<?php 
 public function w3tc_footer_comment($strings)
 {
     if ($this->debug) {
         $strings[] = "Db cache debug info:";
         $strings[] = sprintf("%s%s", str_pad('Engine: ', 20), Cache::engine_name($this->_config->get_string('dbcache.engine')));
         $strings[] = sprintf("%s%d", str_pad('Total queries: ', 20), $this->query_total);
         $strings[] = sprintf("%s%d", str_pad('Cached queries: ', 20), $this->query_hits);
         $strings[] = sprintf("%s%.4f", str_pad('Total query time: ', 20), $this->time_total);
         if (count($this->query_stats)) {
             $strings[] = "SQL info:";
             $strings[] = sprintf("%s | %s | %s | % s | %s | %s", str_pad('#', 5, ' ', STR_PAD_LEFT), str_pad('Time (s)', 8, ' ', STR_PAD_LEFT), str_pad('Caching (Reject reason)', 30, ' ', STR_PAD_BOTH), str_pad('Status', 10, ' ', STR_PAD_BOTH), str_pad('Data size (b)', 13, ' ', STR_PAD_LEFT), 'Query');
             foreach ($this->query_stats as $index => $query) {
                 $strings[] = sprintf("%s | %s | %s | %s | %s | %s", str_pad($index + 1, 5, ' ', STR_PAD_LEFT), str_pad(round($query['time_total'], 4), 8, ' ', STR_PAD_LEFT), str_pad($query['caching'] ? 'enabled' : sprintf('disabled (%s)', $query['reason']), 30, ' ', STR_PAD_BOTH), str_pad($query['cached'] ? 'cached' : 'not cached', 10, ' ', STR_PAD_BOTH), str_pad($query['data_size'], 13, ' ', STR_PAD_LEFT), trim($query['query']));
             }
         }
     } else {
         $reason = $this->get_reject_reason();
         $append = $reason ? sprintf(' (%s)', $reason) : '';
         if ($this->query_hits) {
             $strings[] = sprintf(__('Database Caching %d/%d queries in %.3f seconds using %s%s', 'w3-total-cache'), $this->query_hits, $this->query_total, $this->time_total, Cache::engine_name($this->_config->get_string('dbcache.engine')), $append);
         } else {
             $strings[] = sprintf(__('Database Caching using %s%s', 'w3-total-cache'), Cache::engine_name($this->_config->get_string('dbcache.engine')), $append);
         }
     }
     return $strings;
 }
Esempio n. 6
0
namespace W3TC;

if (!defined('W3TC')) {
    die;
}
include W3TC_INC_DIR . '/options/common/header.php';
?>

<form action="admin.php?page=<?php 
echo $this->_page;
?>
" method="post">
    <p>
		<?php 
echo sprintf(__('Database caching via %s is currently %s.', 'w3-total-cache'), Cache::engine_name($this->_config->get_string('dbcache.engine')), '<span class="w3tc-' . ($dbcache_enabled ? 'enabled">' . __('enabled', 'w3-total-cache') : 'disabled">' . __('disabled', 'w3-total-cache')) . '</span>');
?>
    </p>
    <p>
        <?php 
_e('To rebuild the database cache use the', 'w3-total-cache');
?>
        <?php 
echo Util_Ui::nonce_field('w3tc');
?>
        <input type="submit" name="w3tc_flush_dbcache" value="<?php 
_e('empty cache', 'w3-total-cache');
?>
"<?php 
if (!$dbcache_enabled) {
    ?>
	<a href="admin.php?page=w3tc_extensions"><?php 
_e('Extensions', 'w3-total-cache');
?>
</a> |
	<a href="#overview"><?php 
_e('Overview', 'w3-total-cache');
?>
</a> |
	<a href="#advanced"><?php 
_e('Advanced', 'w3-total-cache');
?>
</a>
</p>
<p>
	Fragment caching via <strong><?php 
echo Cache::engine_name($config->get_string(array('fragmentcache', 'engine')));
?>
</strong> is currently <?php 
if ($config->is_extension_active_frontend('fragmentcache')) {
    echo '<span class="w3tc-enabled">enabled</span>';
} else {
    echo '<span class="w3tc-disabled">disabled</span>';
    $ext = Extensions_Util::get_extension($config, 'fragmentcache');
    if (!empty($ext['requirements'])) {
        echo ' (<span class="description">' . $ext['requirements'] . '</span>)';
    }
}
?>
.
<p>
 /**
  * Returns debug info
  *
  * @return string
  */
 public function w3tc_footer_comment($strings)
 {
     if ($this->_config->get_boolean(array('fragmentcache', 'debug'))) {
         $strings[] = "Fragment Cache debug info:";
         $strings[] = sprintf("%s%s", str_pad('Engine: ', 20), Cache::engine_name($this->_config->get_string(array('fragmentcache', 'engine'))));
         $strings[] = sprintf("%s%s", str_pad('Caching: ', 20), $this->_caching ? 'enabled' : 'disabled');
         if (!$this->_caching) {
             $strings[] = sprintf("%s%s", str_pad('Reject reason: ', 20), $this->cache_reject_reason);
         }
         $strings[] = sprintf("%s%d", str_pad('Total calls: ', 20), $this->cache_total);
         $strings[] = sprintf("%s%d", str_pad('Cache hits: ', 20), $this->cache_hits);
         $strings[] = sprintf("%s%d", str_pad('Cache misses: ', 20), $this->cache_misses);
         $strings[] = sprintf("%s%.4f", str_pad('Total time: ', 20), $this->time_total);
         $strings[] = "W3TC Fragment Cache info:";
         $strings[] = sprintf("%s | %s | %s | %s | %s | %s| %s| %s", str_pad('#', 5, ' ', STR_PAD_LEFT), str_pad('Status', 15, ' ', STR_PAD_BOTH), str_pad('Source', 15, ' ', STR_PAD_BOTH), str_pad('Data size (b)', 13, ' ', STR_PAD_LEFT), str_pad('Query time (s)', 14, ' ', STR_PAD_LEFT), str_pad('Group', 14, ' ', STR_PAD_LEFT), str_pad('Accessible', 10, ' ', STR_PAD_LEFT), 'Transient ID');
         foreach ($this->debug_info as $index => $debug) {
             list($fragment_group, $fragment_group_expiration, $fragment_group_global) = $this->_fragment_group($debug['id'], $debug['group']);
             $strings[] = sprintf("%s | %s | %s | %s | %s | %s| %s| %s", str_pad($index + 1, 5, ' ', STR_PAD_LEFT), str_pad($debug['cached'] ? 'cached' : 'not cached', 15, ' ', STR_PAD_BOTH), str_pad($debug['internal'] ? 'internal' : 'persistent', 15, ' ', STR_PAD_BOTH), str_pad($debug['data_size'], 13, ' ', STR_PAD_LEFT), str_pad(round($debug['time'], 4), 14, ' ', STR_PAD_LEFT), str_pad($fragment_group, 14, ' ', STR_PAD_LEFT), str_pad($debug['group'] == 'transient' ? 'site' : 'network', 10, ' ', STR_PAD_LEFT), $debug['id']);
         }
     } else {
         $append = $this->cache_reject_reason != '' ? sprintf(' (%s)', $this->cache_reject_reason) : '';
         $strings[] = sprintf(__('Fragment Caching %d/%d fragments using %s%s', 'w3-total-cache'), $this->cache_hits, $this->cache_total, Cache::engine_name($this->_config->get_string(array('fragmentcache', 'engine'))), $append);
     }
     return $strings;
 }
 public function w3tc_footer_comment($strings)
 {
     if ($this->_config->get_boolean('objectcache.debug')) {
         $strings[] = "Object Cache debug info:";
         $strings[] = sprintf("%s%s", str_pad('Engine: ', 20), Cache::engine_name($this->_config->get_string('objectcache.engine')));
         $strings[] = sprintf("%s%s", str_pad('Caching: ', 20), $this->_caching ? 'enabled' : 'disabled');
         if (!$this->_caching) {
             $strings[] = sprintf("%s%s", str_pad('Reject reason: ', 20), $this->cache_reject_reason);
         }
         $strings[] = sprintf("%s%d", str_pad('Total calls: ', 20), $this->cache_total);
         $strings[] = sprintf("%s%d", str_pad('Cache hits: ', 20), $this->cache_hits);
         $strings[] = sprintf("%s%d", str_pad('Cache misses: ', 20), $this->cache_misses);
         $strings[] = sprintf("%s%.4f", str_pad('Total time: ', 20), $this->time_total);
         $strings[] = "W3TC Object Cache info:";
         $strings[] = sprintf("%s | %s | %s | %s | %s | %s", str_pad('#', 5, ' ', STR_PAD_LEFT), str_pad('Status', 15, ' ', STR_PAD_BOTH), str_pad('Source', 15, ' ', STR_PAD_BOTH), str_pad('Data size (b)', 13, ' ', STR_PAD_LEFT), str_pad('Query time (s)', 14, ' ', STR_PAD_LEFT), 'ID:Group');
         foreach ($this->debug_info as $index => $debug) {
             $strings[] = sprintf("%s | %s | %s | %s | %s | %s", str_pad($index + 1, 5, ' ', STR_PAD_LEFT), str_pad($debug['cached'] ? 'cached' : 'not cached', 15, ' ', STR_PAD_BOTH), str_pad($debug['internal'] ? 'internal' : 'persistent', 15, ' ', STR_PAD_BOTH), str_pad($debug['data_size'], 13, ' ', STR_PAD_LEFT), str_pad(round($debug['time'], 4), 14, ' ', STR_PAD_LEFT), sprintf('%s:%s', $debug['id'], $debug['group']));
         }
     } else {
         $reason = $this->get_reject_reason();
         $append = $reason != '' ? sprintf(' (%s)', $reason) : '';
         $strings[] = sprintf(__('Object Caching %d/%d objects using %s%s', 'w3-total-cache'), $this->cache_hits, $this->cache_total, Cache::engine_name($this->_config->get_string('objectcache.engine')), $append);
     }
     return $strings;
 }
 /**
  * Returns debug info
  *
  * @param boolean $cache
  * @param string  $reason
  * @param boolean $status
  * @param double  $time
  * @return string
  */
 public function w3tc_footer_comment($strings)
 {
     $strings[] = sprintf(__('Page Caching using %s%s', 'w3-total-cache'), Cache::engine_name($this->_config->get_string('pgcache.engine')), $this->cache_reject_reason != '' ? sprintf(' (%s)', $this->cache_reject_reason) : '');
     if ($this->_debug) {
         $time_total = Util_Debug::microtime() - $this->_time_start;
         $engine = $this->_config->get_string('pgcache.engine');
         $strings[] = "Page cache debug info:";
         $strings[] = sprintf("%s%s", str_pad('Engine: ', 20), Cache::engine_name($engine));
         $strings[] = sprintf("%s%s", str_pad('Cache key: ', 20), $this->_page_key);
         if ($this->cache_reject_reason != '') {
             $strings[] = sprintf("%s%s", str_pad('Reject reason: ', 20), $this->cache_reject_reason);
         }
         $strings[] = sprintf("%s%.3fs", str_pad('Creation Time: ', 20), time());
         $headers = $this->_get_response_headers();
         if (count($headers)) {
             $strings[] = "Header info:";
             foreach ($headers as $header_name => $header_value) {
                 $strings[] = sprintf("%s%s", str_pad($header_name . ': ', 20), Util_Content::escape_comment($header_value));
             }
         }
     }
     return $strings;
 }