W3 Total Cache - Version 0.9.2.2

Version Description

  • Fixed bug with minify directives, e.g.: "File param is missing," causing minify caching to fail
  • Fixed bug with document root detection for IIS server
  • Fixed bug with HTTP compression when using CloudFlare
  • Fixed bug with HTML validation with JavaScript embed tags
  • Fixed bug with fancy permalinks, sites with or without trailing slashes can now cache pages using disk enhanced
  • Fixed bug with appending WP_CACHE define into wp-config.php for some users
  • Fixed bug with path to JSON.php
  • Fixed bug with listing of buckets error with AWS S3
  • Improved compatibility with WordPress SEO by Yoast, 404 error exception list sitemap value changed to: sitemap(_index|[0-9]+)?.xml(.gz)?
Download this release

Release Info

Developer barry
Plugin Icon 128x128 W3 Total Cache
Version 0.9.2.2
Comparing to
See all releases

Code changes from version 0.9.2.1 to 0.9.2.2

inc/compat.php CHANGED
@@ -18,7 +18,7 @@ if (!function_exists('json_decode')) {
18
  global $json;
19
 
20
  if (!is_a($json, 'Services_JSON')) {
21
- require_once W3TC_LIB_W3_DIR . '/JSON.php';
22
  $json = new Services_JSON();
23
  }
24
 
18
  global $json;
19
 
20
  if (!is_a($json, 'Services_JSON')) {
21
+ require_once W3TC_LIB_DIR . '/JSON.php';
22
  $json = new Services_JSON();
23
  }
24
 
inc/define.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- define('W3TC_VERSION', '0.9.1.4b');
4
  define('W3TC_POWERED_BY', 'W3 Total Cache/' . W3TC_VERSION);
5
  define('W3TC_EMAIL', 'w3tc@w3-edge.com');
6
  define('W3TC_PAYPAL_URL', 'https://www.paypal.com/cgi-bin/webscr');
@@ -753,11 +753,11 @@ function w3_get_document_root() {
753
 
754
  if ($document_root === null) {
755
  if (!empty($_SERVER['SCRIPT_FILENAME'])) {
756
- $document_root = substr($_SERVER['SCRIPT_FILENAME'], 0, -strlen($_SERVER['PHP_SELF']));
757
  } elseif (!empty($_SERVER['PATH_TRANSLATED'])) {
758
- $document_root = substr($_SERVER['PATH_TRANSLATED'], 0, -strlen($_SERVER['PHP_SELF']));
759
  } elseif (!empty($_SERVER['DOCUMENT_ROOT'])) {
760
- $document_root = $_SERVER['DOCUMENT_ROOT'];
761
  } else {
762
  $document_root = w3_get_site_root();
763
  }
@@ -2053,6 +2053,20 @@ function w3_extract_css($content) {
2053
  return $files;
2054
  }
2055
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2056
  /**
2057
  * Loads plugins
2058
  *
1
  <?php
2
 
3
+ define('W3TC_VERSION', '0.9.2.2');
4
  define('W3TC_POWERED_BY', 'W3 Total Cache/' . W3TC_VERSION);
5
  define('W3TC_EMAIL', 'w3tc@w3-edge.com');
6
  define('W3TC_PAYPAL_URL', 'https://www.paypal.com/cgi-bin/webscr');
753
 
754
  if ($document_root === null) {
755
  if (!empty($_SERVER['SCRIPT_FILENAME'])) {
756
+ $document_root = substr(w3_path($_SERVER['SCRIPT_FILENAME']), 0, -strlen(w3_path($_SERVER['PHP_SELF'])));
757
  } elseif (!empty($_SERVER['PATH_TRANSLATED'])) {
758
+ $document_root = substr(w3_path($_SERVER['PATH_TRANSLATED']), 0, -strlen(w3_path($_SERVER['PHP_SELF'])));
759
  } elseif (!empty($_SERVER['DOCUMENT_ROOT'])) {
760
+ $document_root = w3_path($_SERVER['DOCUMENT_ROOT']);
761
  } else {
762
  $document_root = w3_get_site_root();
763
  }
2053
  return $files;
2054
  }
2055
 
2056
+ /**
2057
+ * Escapes HTML comment
2058
+ *
2059
+ * @param string $comment
2060
+ * @return mixed
2061
+ */
2062
+ function w3_escape_comment($comment) {
2063
+ while (strstr($comment, '--') !== false) {
2064
+ $comment = str_replace('--', '- -', $comment);
2065
+ }
2066
+
2067
+ return $comment;
2068
+ }
2069
+
2070
  /**
2071
  * Loads plugins
2072
  *
inc/email/support_request.phtml CHANGED
@@ -1,32 +1,41 @@
1
  <html>
2
  <head></head>
3
  <body>
4
- <p>
5
- Date: <?php echo date('m/d/Y H:i:s'); ?><br />
6
- Request type: <?php echo htmlspecialchars($request_type_text); ?><br />
7
- URL: <a href="<?php echo htmlspecialchars($url); ?>"><?php echo htmlspecialchars($url); ?></a><br />
8
- Name: <?php echo htmlspecialchars($name); ?><br />
9
- E-Mail: <a href="mailto:<?php echo htmlspecialchars($email); ?>"><?php echo htmlspecialchars($email); ?></a><br />
10
- Twitter: <a href="http://twitter.com/<?php echo htmlspecialchars($twitter); ?>"><?php echo htmlspecialchars($twitter); ?></a><br />
11
- Phone: <?php echo htmlspecialchars($phone); ?><br />
12
- <?php if ($forum_url): ?>
13
- Forum Topic URL: <a href="<?php echo htmlspecialchars($forum_url); ?>"><?php echo htmlspecialchars($forum_url); ?></a><br />
14
- <?php endif; ?>
15
- <?php if ($request_data_url): ?>
16
- Request data: <a href="<?php echo htmlspecialchars($request_data_url); ?>"><?php echo htmlspecialchars($request_data_url); ?></a><br />
17
- <?php endif; ?>
18
- Subject: <?php echo htmlspecialchars($subject); ?>
19
- </p>
20
-
21
- <p>
22
- <?php echo nl2br(htmlspecialchars($description)); ?>
23
- </p>
24
-
25
- <hr />
26
-
27
- <font size="-1" color="#ccc">
28
- E-mail sent from IP: <?php echo htmlspecialchars($_SERVER['REMOTE_ADDR']); ?><br />
29
- User Agent: <?php echo htmlspecialchars($_SERVER['HTTP_USER_AGENT']); ?>
30
- </font>
31
- </body>
 
 
 
 
 
 
 
 
 
32
  </html>
1
  <html>
2
  <head></head>
3
  <body>
4
+ <p>
5
+ Date: <?php echo date('m/d/Y H:i:s'); ?><br />
6
+ Version: <?php echo W3TC_VERSION; ?><br />
7
+ URL: <a href="<?php echo htmlspecialchars($url); ?>"><?php echo htmlspecialchars($url); ?></a><br />
8
+ Name: <?php echo htmlspecialchars($name); ?><br />
9
+ E-Mail: <a href="mailto:<?php echo htmlspecialchars($email); ?>"><?php echo htmlspecialchars($email); ?></a><br />
10
+
11
+ <?php if ($twitter): ?>
12
+ Twitter: <a href="http://twitter.com/<?php echo htmlspecialchars($twitter); ?>"><?php echo htmlspecialchars($twitter); ?></a><br />
13
+ <?php endif; ?>
14
+
15
+ <?php if ($phone): ?>
16
+ Phone: <?php echo htmlspecialchars($phone); ?><br />
17
+ <?php endif; ?>
18
+
19
+ <?php if ($forum_url): ?>
20
+ Forum Topic URL: <a href="<?php echo htmlspecialchars($forum_url); ?>"><?php echo htmlspecialchars($forum_url); ?></a><br />
21
+ <?php endif; ?>
22
+
23
+ <?php if ($request_data_url): ?>
24
+ Request data: <a href="<?php echo htmlspecialchars($request_data_url); ?>"><?php echo htmlspecialchars($request_data_url); ?></a><br />
25
+ <?php endif; ?>
26
+
27
+ Subject: <?php echo htmlspecialchars($subject); ?>
28
+ </p>
29
+
30
+ <p>
31
+ <?php echo nl2br(htmlspecialchars($description)); ?>
32
+ </p>
33
+
34
+ <hr />
35
+
36
+ <font size="-1" color="#ccc">
37
+ E-mail sent from IP: <?php echo htmlspecialchars($_SERVER['REMOTE_ADDR']); ?><br />
38
+ User Agent: <?php echo htmlspecialchars($_SERVER['HTTP_USER_AGENT']); ?>
39
+ </font>
40
+ </body>
41
  </html>
inc/lightbox/self_test.phtml CHANGED
@@ -15,6 +15,10 @@
15
  <h4>Server Modules &amp; Resources:</h4>
16
 
17
  <ul>
 
 
 
 
18
  <li>
19
  PHP Version:
20
  <?php if (PHP_VERSION >= 5): ?>
@@ -240,7 +244,7 @@
240
  <li>
241
  <?php $uploads_dir = @wp_upload_dir(); ?>
242
  <?php echo htmlspecialchars($uploads_dir['path']); ?>:
243
- <?if (!empty($uploads_dir['error'])): ?>
244
  <code>Error: <?php echo htmlspecialchars($uploads_dir['error']); ?></code>
245
  <?php elseif (!w3_is_writable_dir($uploads_dir['path'])): ?>
246
  <code>Not write-able</code>
15
  <h4>Server Modules &amp; Resources:</h4>
16
 
17
  <ul>
18
+ <li>
19
+ Plugin Version: <code><?php echo W3TC_VERSION; ?></code>
20
+ </li>
21
+
22
  <li>
23
  PHP Version:
24
  <?php if (PHP_VERSION >= 5): ?>
244
  <li>
245
  <?php $uploads_dir = @wp_upload_dir(); ?>
246
  <?php echo htmlspecialchars($uploads_dir['path']); ?>:
247
+ <?php if (!empty($uploads_dir['error'])): ?>
248
  <code>Error: <?php echo htmlspecialchars($uploads_dir['error']); ?></code>
249
  <?php elseif (!w3_is_writable_dir($uploads_dir['path'])): ?>
250
  <code>Not write-able</code>
inc/options/common/header.phtml CHANGED
@@ -1,11 +1,9 @@
1
  <?php if ($this->_support_reminder): ?>
2
- <script>
3
- /*<![CDATA[*/
4
  jQuery(function($) {
5
  w3tc_lightbox_support_us();
6
  });
7
- /*]]>*/
8
- </script>
9
  <?php endif; ?>
10
 
11
  <div class="wrap" id="w3tc">
1
  <?php if ($this->_support_reminder): ?>
2
+ <script type="text/javascript">/*<![CDATA[*/
 
3
  jQuery(function($) {
4
  w3tc_lightbox_support_us();
5
  });
6
+ /*]]>*/</script>
 
7
  <?php endif; ?>
8
 
9
  <div class="wrap" id="w3tc">
inc/options/minify.phtml CHANGED
@@ -1,6 +1,6 @@
1
  <?php include W3TC_DIR . '/inc/options/common/header.phtml'; ?>
2
 
3
- <script>/*<![CDATA[*/
4
  var minify_templates = {};
5
  <?php foreach ($templates as $theme_key => $theme_templates): ?>
6
  minify_templates['<?php echo addslashes($theme_key); ?>'] = {};
@@ -43,7 +43,7 @@ minify_templates['<?php echo addslashes($theme_key); ?>']['<?php echo addslashes
43
  <tr>
44
  <th colspan="2">
45
  <input type="hidden" name="minify.reject.logged" value="0" />
46
- <label><input type="checkbox" name="minify.reject.logged" value="1"<?php checked($this->_config->get_boolean('minify.reject.logged'), true); ?> /> Disable <acronym title="Hypertext Markup Language">HTML</acronym> minification for logged in users</label><br />
47
  <span class="description">Authenticated users will not recieve minified pages if this option is enabled.</span>
48
  </th>
49
  </tr>
1
  <?php include W3TC_DIR . '/inc/options/common/header.phtml'; ?>
2
 
3
+ <script type="text/javascript">/*<![CDATA[*/
4
  var minify_templates = {};
5
  <?php foreach ($templates as $theme_key => $theme_templates): ?>
6
  minify_templates['<?php echo addslashes($theme_key); ?>'] = {};
43
  <tr>
44
  <th colspan="2">
45
  <input type="hidden" name="minify.reject.logged" value="0" />
46
+ <label><input type="checkbox" name="minify.reject.logged" value="1"<?php checked($this->_config->get_boolean('minify.reject.logged'), true); ?> /> Disable minify for logged in users</label><br />
47
  <span class="description">Authenticated users will not recieve minified pages if this option is enabled.</span>
48
  </th>
49
  </tr>
inc/options/mobile.phtml CHANGED
@@ -1,6 +1,6 @@
1
  <?php include W3TC_DIR . '/inc/options/common/header.phtml'; ?>
2
 
3
- <script>/*<![CDATA[*/
4
  var mobile_themes = {};
5
  <?php foreach ($themes as $theme_key => $theme_name): ?>
6
  mobile_themes['<?php echo addslashes($theme_key); ?>'] = '<?php echo addslashes($theme_name); ?>';
1
  <?php include W3TC_DIR . '/inc/options/common/header.phtml'; ?>
2
 
3
+ <script type="text/javascript">/*<![CDATA[*/
4
  var mobile_themes = {};
5
  <?php foreach ($themes as $theme_key => $theme_name): ?>
6
  mobile_themes['<?php echo addslashes($theme_key); ?>'] = '<?php echo addslashes($theme_name); ?>';
inc/options/pgcache.phtml CHANGED
@@ -108,6 +108,15 @@
108
  <span class="description">Cache the specified pages / directories even if listed in the "never cache the following pages" field.</span>
109
  </td>
110
  </tr>
 
 
 
 
 
 
 
 
 
111
  <tr>
112
  <th><label for="pgcache_cache_headers">Specify page headers:</label></th>
113
  <td>
108
  <span class="description">Cache the specified pages / directories even if listed in the "never cache the following pages" field.</span>
109
  </td>
110
  </tr>
111
+ <?php if (substr($permalink_structure, -1) == '/'): ?>
112
+ <tr>
113
+ <th><label for="pgcache_accept_uri">Non-trailing slash pages:</label></th>
114
+ <td>
115
+ <textarea id="pgcache_accept_uri" name="pgcache.accept.uri" cols="40" rows="5"><?php echo htmlspecialchars(implode("\r\n", $this->_config->get_array('pgcache.accept.uri'))); ?></textarea><br />
116
+ <span class="description">Cache the specified pages even if they don't have tailing slash.</span>
117
+ </td>
118
+ </tr>
119
+ <?php endif; ?>
120
  <tr>
121
  <th><label for="pgcache_cache_headers">Specify page headers:</label></th>
122
  <td>
inc/options/referrer.phtml CHANGED
@@ -1,6 +1,6 @@
1
  <?php include W3TC_DIR . '/inc/options/common/header.phtml'; ?>
2
 
3
- <script>/*<![CDATA[*/
4
  var referrer_themes = {};
5
  <?php foreach ($themes as $theme_key => $theme_name): ?>
6
  referrer_themes['<?php echo addslashes($theme_key); ?>'] = '<?php echo addslashes($theme_name); ?>';
1
  <?php include W3TC_DIR . '/inc/options/common/header.phtml'; ?>
2
 
3
+ <script type="text/javascript">/*<![CDATA[*/
4
  var referrer_themes = {};
5
  <?php foreach ($themes as $theme_key => $theme_name): ?>
6
  referrer_themes['<?php echo addslashes($theme_key); ?>'] = '<?php echo addslashes($theme_name); ?>';
inc/popup/cdn_export_file.phtml CHANGED
@@ -1,17 +1,16 @@
1
  <?php include W3TC_DIR . '/inc/popup/common/header.phtml'; ?>
2
 
3
- <script>
4
  var files = [
5
  <?php $files_count = count($files); foreach ($files as $index => $file): ?>
6
  '<?php echo addslashes($file); ?>'<?php if ($index < $files_count - 1): ?>,<?php endif; ?>
7
-
8
  <?php endforeach; ?>
9
  ];
10
 
11
  jQuery(function() {
12
  W3tc_Popup_Cdn_Export_File.init(files);
13
  });
14
- </script>
15
 
16
  <p>This tool will upload files of the selected type to content delivery network provider.</p>
17
  <table cellspacing="5">
1
  <?php include W3TC_DIR . '/inc/popup/common/header.phtml'; ?>
2
 
3
+ <script type="text/javascript">/*<![CDATA[*/
4
  var files = [
5
  <?php $files_count = count($files); foreach ($files as $index => $file): ?>
6
  '<?php echo addslashes($file); ?>'<?php if ($index < $files_count - 1): ?>,<?php endif; ?>
 
7
  <?php endforeach; ?>
8
  ];
9
 
10
  jQuery(function() {
11
  W3tc_Popup_Cdn_Export_File.init(files);
12
  });
13
+ /*]]>*/</script>
14
 
15
  <p>This tool will upload files of the selected type to content delivery network provider.</p>
16
  <table cellspacing="5">
inc/popup/cdn_export_library.phtml CHANGED
@@ -1,12 +1,10 @@
1
  <?php include W3TC_DIR . '/inc/popup/common/header.phtml'; ?>
2
 
3
- <script>
4
- /*<![CDATA[*/
5
  jQuery(function() {
6
  W3tc_Popup_Cdn_Export_Library.init();
7
  });
8
- /*]]>*/
9
- </script>
10
 
11
  <p>This tool will upload files of the selected type to content delivery network provider.</p>
12
  <table cellspacing="5">
1
  <?php include W3TC_DIR . '/inc/popup/common/header.phtml'; ?>
2
 
3
+ <script type="text/javascript">/*<![CDATA[*/
 
4
  jQuery(function() {
5
  W3tc_Popup_Cdn_Export_Library.init();
6
  });
7
+ /*]]>*/</script>
 
8
 
9
  <p>This tool will upload files of the selected type to content delivery network provider.</p>
10
  <table cellspacing="5">
inc/popup/cdn_import_library.phtml CHANGED
@@ -1,14 +1,12 @@
1
  <?php include W3TC_DIR . '/inc/popup/common/header.phtml'; ?>
2
 
3
- <script>
4
- /*<![CDATA[*/
5
  var cdn_host = '<?php echo $cdn_host; ?>';
6
 
7
  jQuery(function() {
8
  W3tc_Popup_Cdn_Import_Library.init(cdn_host);
9
  });
10
- /*]]>*/
11
- </script>
12
 
13
  <p>This tool will copy post or page attachments into the Media Library allowing WordPress to work as intended.</p>
14
  <table cellspacing="5">
1
  <?php include W3TC_DIR . '/inc/popup/common/header.phtml'; ?>
2
 
3
+ <script type="text/javascript">/*<![CDATA[*/
 
4
  var cdn_host = '<?php echo $cdn_host; ?>';
5
 
6
  jQuery(function() {
7
  W3tc_Popup_Cdn_Import_Library.init(cdn_host);
8
  });
9
+ /*]]>*/</script>
 
10
 
11
  <p>This tool will copy post or page attachments into the Media Library allowing WordPress to work as intended.</p>
12
  <table cellspacing="5">
inc/popup/cdn_rename_domain.phtml CHANGED
@@ -1,12 +1,10 @@
1
  <?php include W3TC_DIR . '/inc/popup/common/header.phtml'; ?>
2
 
3
- <script>
4
- /*<![CDATA[*/
5
  jQuery(function() {
6
  W3tc_Popup_Cdn_Rename_Domain.init();
7
  });
8
- /*]]>*/
9
- </script>
10
 
11
  <p>This tool allows you to modify the URL of Media Library attachments. Use it if the "WordPress address (<acronym title="Uniform Resource Indicator">URL</acronym>)" value has been changed in the past.</p>
12
  <table cellspacing="5">
1
  <?php include W3TC_DIR . '/inc/popup/common/header.phtml'; ?>
2
 
3
+ <script type="text/javascript">/*<![CDATA[*/
 
4
  jQuery(function() {
5
  W3tc_Popup_Cdn_Rename_Domain.init();
6
  });
7
+ /*]]>*/</script>
 
8
 
9
  <p>This tool allows you to modify the URL of Media Library attachments. Use it if the "WordPress address (<acronym title="Uniform Resource Indicator">URL</acronym>)" value has been changed in the past.</p>
10
  <table cellspacing="5">
inc/popup/common/header.phtml CHANGED
@@ -15,8 +15,8 @@
15
  <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
16
  <head>
17
  <link rel="stylesheet" type="text/css" href="<?php echo plugins_url('inc/css/popup.css?ver=' . W3TC_VERSION, W3TC_FILE); ?>" />
18
- <script src="<?php echo site_url('wp-includes/js/jquery/jquery.js?ver=' . W3TC_VERSION); ?>"></script>
19
- <script src="<?php echo plugins_url('inc/js/popup.js?ver=' . W3TC_VERSION, W3TC_FILE); ?>"></script>
20
  <title><?php echo htmlspecialchars($title); ?> - W3 Total Cache</title>
21
  <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
22
  </head>
15
  <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
16
  <head>
17
  <link rel="stylesheet" type="text/css" href="<?php echo plugins_url('inc/css/popup.css?ver=' . W3TC_VERSION, W3TC_FILE); ?>" />
18
+ <script type="text/javascript" src="<?php echo site_url('wp-includes/js/jquery/jquery.js?ver=' . W3TC_VERSION); ?>"></script>
19
+ <script type="text/javascript" src="<?php echo plugins_url('inc/js/popup.js?ver=' . W3TC_VERSION, W3TC_FILE); ?>"></script>
20
  <title><?php echo htmlspecialchars($title); ?> - W3 Total Cache</title>
21
  <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
22
  </head>
lib/W3/Cdn/S3.php CHANGED
@@ -265,7 +265,7 @@ class W3_Cdn_S3 extends W3_Cdn_Base {
265
 
266
  $buckets = @$this->_s3->listBuckets();
267
 
268
- if (!$buckets) {
269
  $error = sprintf('Unable to list buckets (%s).', $this->_get_last_error());
270
 
271
  $this->_restore_error_handler();
@@ -363,7 +363,7 @@ class W3_Cdn_S3 extends W3_Cdn_Base {
363
 
364
  $buckets = @$this->_s3->listBuckets();
365
 
366
- if (!$buckets) {
367
  $error = sprintf('Unable to list buckets (%s).', $this->_get_last_error());
368
 
369
  $this->_restore_error_handler();
265
 
266
  $buckets = @$this->_s3->listBuckets();
267
 
268
+ if ($buckets === false) {
269
  $error = sprintf('Unable to list buckets (%s).', $this->_get_last_error());
270
 
271
  $this->_restore_error_handler();
363
 
364
  $buckets = @$this->_s3->listBuckets();
365
 
366
+ if ($buckets === false) {
367
  $error = sprintf('Unable to list buckets (%s).', $this->_get_last_error());
368
 
369
  $this->_restore_error_handler();
lib/W3/Config.php CHANGED
@@ -65,6 +65,7 @@ class W3_Config {
65
  'pgcache.cache.404' => 'boolean',
66
  'pgcache.cache.flush' => 'boolean',
67
  'pgcache.cache.headers' => 'array',
 
68
  'pgcache.accept.files' => 'array',
69
  'pgcache.reject.logged' => 'boolean',
70
  'pgcache.reject.uri' => 'array',
@@ -303,7 +304,6 @@ class W3_Config {
303
  'notes.no_zlib' => 'boolean',
304
  'notes.zlib_output_compression' => 'boolean',
305
  'notes.no_permalink_rules' => 'boolean',
306
- 'notes.no_trailing_slash' => 'boolean',
307
  'notes.browsercache_rules_cache' => 'boolean',
308
  'notes.browsercache_rules_no404wp' => 'boolean',
309
  'notes.minify_error' => 'boolean',
@@ -357,15 +357,19 @@ class W3_Config {
357
  'users',
358
  'userlogins',
359
  'usermeta',
 
 
360
  'site-options',
361
  'site-lookup',
362
  'blog-lookup',
363
  'blog-details',
364
- 'rss'
 
365
  ),
366
  'objectcache.groups.nonpersistent' => array(
367
  'comment',
368
- 'counts'
 
369
  ),
370
  'objectcache.lifetime' => 180,
371
 
@@ -389,6 +393,9 @@ class W3_Config {
389
  'X-Pingback',
390
  'P3P'
391
  ),
 
 
 
392
  'pgcache.accept.files' => array(
393
  'wp-comments-popup.php',
394
  'wp-links-opml.php',
@@ -588,7 +595,7 @@ class W3_Config {
588
  'browsercache.no404wp' => false,
589
  'browsercache.no404wp.exceptions' => array(
590
  'robots\.txt',
591
- 'sitemap\.xml(\.gz)?'
592
  ),
593
  'browsercache.cssjs.compression' => true,
594
  'browsercache.cssjs.expires' => false,
@@ -818,7 +825,6 @@ class W3_Config {
818
  'notes.no_zlib' => true,
819
  'notes.zlib_output_compression' => true,
820
  'notes.no_permalink_rules' => true,
821
- 'notes.no_trailing_slash' => true,
822
  'notes.browsercache_rules_cache' => true,
823
  'notes.browsercache_rules_no404wp' => true,
824
  'notes.minify_error' => false,
65
  'pgcache.cache.404' => 'boolean',
66
  'pgcache.cache.flush' => 'boolean',
67
  'pgcache.cache.headers' => 'array',
68
+ 'pgcache.accept.uri' => 'array',
69
  'pgcache.accept.files' => 'array',
70
  'pgcache.reject.logged' => 'boolean',
71
  'pgcache.reject.uri' => 'array',
304
  'notes.no_zlib' => 'boolean',
305
  'notes.zlib_output_compression' => 'boolean',
306
  'notes.no_permalink_rules' => 'boolean',
 
307
  'notes.browsercache_rules_cache' => 'boolean',
308
  'notes.browsercache_rules_no404wp' => 'boolean',
309
  'notes.minify_error' => 'boolean',
357
  'users',
358
  'userlogins',
359
  'usermeta',
360
+ 'user_meta',
361
+ 'site-transient',
362
  'site-options',
363
  'site-lookup',
364
  'blog-lookup',
365
  'blog-details',
366
+ 'rss',
367
+ 'global-posts'
368
  ),
369
  'objectcache.groups.nonpersistent' => array(
370
  'comment',
371
+ 'counts',
372
+ 'plugins'
373
  ),
374
  'objectcache.lifetime' => 180,
375
 
393
  'X-Pingback',
394
  'P3P'
395
  ),
396
+ 'pgcache.accept.uri' => array(
397
+ 'sitemap\.xml(\.gz)?'
398
+ ),
399
  'pgcache.accept.files' => array(
400
  'wp-comments-popup.php',
401
  'wp-links-opml.php',
595
  'browsercache.no404wp' => false,
596
  'browsercache.no404wp.exceptions' => array(
597
  'robots\.txt',
598
+ 'sitemap(_index|[0-9]+)?\.xml(\.gz)?'
599
  ),
600
  'browsercache.cssjs.compression' => true,
601
  'browsercache.cssjs.expires' => false,
825
  'notes.no_zlib' => true,
826
  'notes.zlib_output_compression' => true,
827
  'notes.no_permalink_rules' => true,
 
828
  'notes.browsercache_rules_cache' => true,
829
  'notes.browsercache_rules_no404wp' => true,
830
  'notes.minify_error' => false,
lib/W3/Db.php CHANGED
@@ -648,7 +648,7 @@ class W3_Db extends wpdb {
648
  $debug_info .= "SQL info:\r\n";
649
  $debug_info .= sprintf("%s | %s | %s | % s | %s | %s\r\n", 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');
650
  foreach ($this->query_stats as $index => $query) {
651
- $debug_info .= sprintf("%s | %s | %s | %s | %s | %s\r\n", 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), str_replace('-->', '-- >', trim($query['query'])));
652
  }
653
  }
654
 
648
  $debug_info .= "SQL info:\r\n";
649
  $debug_info .= sprintf("%s | %s | %s | % s | %s | %s\r\n", 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');
650
  foreach ($this->query_stats as $index => $query) {
651
+ $debug_info .= sprintf("%s | %s | %s | %s | %s | %s\r\n", 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), w3_escape_comment(trim($query['query'])));
652
  }
653
  }
654
 
lib/W3/Minify.php CHANGED
@@ -51,7 +51,7 @@ class W3_Minify {
51
  $file = W3_Request::get_string('file');
52
 
53
  if (!$file) {
54
- die('File param is missing.');
55
  }
56
 
57
  $hash = '';
@@ -62,7 +62,7 @@ class W3_Minify {
62
  } elseif (preg_match('~^([a-f0-9]+)\\/(.+)\\.(include(\\-(footer|body))?(-nb)?)\\.[0-9]+\\.(css|js)$~', $file, $matches)) {
63
  list(, $theme, $template, $location, , , , $type) = $matches;
64
  } else {
65
- die('Bad file param format.');
66
  }
67
 
68
  require_once W3TC_LIB_MINIFY_DIR . '/Minify.php';
@@ -507,6 +507,17 @@ class W3_Minify {
507
  return $files;
508
  }
509
 
 
 
 
 
 
 
 
 
 
 
 
510
  /**
511
  * Pre-caches external file
512
  *
51
  $file = W3_Request::get_string('file');
52
 
53
  if (!$file) {
54
+ $this->send_error('File param is missing.');
55
  }
56
 
57
  $hash = '';
62
  } elseif (preg_match('~^([a-f0-9]+)\\/(.+)\\.(include(\\-(footer|body))?(-nb)?)\\.[0-9]+\\.(css|js)$~', $file, $matches)) {
63
  list(, $theme, $template, $location, , , , $type) = $matches;
64
  } else {
65
+ $this->send_error('Bad file param format.');
66
  }
67
 
68
  require_once W3TC_LIB_MINIFY_DIR . '/Minify.php';
507
  return $files;
508
  }
509
 
510
+ /**
511
+ * Sends error response
512
+ *
513
+ * @param string $error
514
+ * @return void
515
+ */
516
+ function send_error($error) {
517
+ header('HTTP/1.0 400 Bad Request');
518
+ die($error);
519
+ }
520
+
521
  /**
522
  * Pre-caches external file
523
  *
lib/W3/PgCache.php CHANGED
@@ -517,7 +517,7 @@ class W3_PgCache {
517
  if ($this->_config->get_boolean('pgcache.purge.author') && $post) {
518
  $posts_number = count_user_posts($post->post_author);
519
  $posts_per_page = get_option('posts_per_page');
520
- $posts_pages_number = ceil($posts_number / $posts_per_page);
521
 
522
  $author_link = get_author_link(false, $post->post_author);
523
  $author_uri = str_replace($domain_url, '', $author_link);
@@ -561,7 +561,7 @@ class W3_PgCache {
561
 
562
  $posts_per_page = get_option('posts_per_page');
563
  $posts_number = $this->_get_archive_posts_count($post_year, $post_month, $post_day);
564
- $posts_pages_number = ceil($posts_number / $posts_per_page);
565
 
566
  $day_link = get_day_link($post_year, $post_month, $post_day);
567
  $day_uri = str_replace($domain_url, '', $day_link);
@@ -730,7 +730,7 @@ class W3_PgCache {
730
  * Don't cache in console mode
731
  */
732
  if (PHP_SAPI === 'cli') {
733
- $this->cache_reject_reason = 'console mode';
734
 
735
  return false;
736
  }
@@ -739,7 +739,7 @@ class W3_PgCache {
739
  * Skip if session defined
740
  */
741
  if (defined('SID') && SID != '') {
742
- $this->cache_reject_reason = 'session is started';
743
 
744
  return false;
745
  }
@@ -748,7 +748,7 @@ class W3_PgCache {
748
  * Skip if posting
749
  */
750
  if ($_SERVER['REQUEST_METHOD'] == 'POST') {
751
- $this->cache_reject_reason = 'request method is POST';
752
 
753
  return false;
754
  }
@@ -757,16 +757,7 @@ class W3_PgCache {
757
  * Skip if there is query in the request uri
758
  */
759
  if (!$this->_config->get_boolean('pgcache.cache.query') && strstr($this->_request_uri, '?') !== false) {
760
- $this->cache_reject_reason = 'request URI contains query';
761
-
762
- return false;
763
- }
764
-
765
- /**
766
- * Check for request URI trailing slash
767
- */
768
- if ($this->_enhanced_mode && substr($this->_request_uri, -1) !== '/') {
769
- $this->cache_reject_reason = 'request URI doesn\'t have a trailing slash';
770
 
771
  return false;
772
  }
@@ -775,7 +766,7 @@ class W3_PgCache {
775
  * Check request URI
776
  */
777
  if (!in_array($_SERVER['PHP_SELF'], $this->_config->get_array('pgcache.accept.files')) && !$this->_check_request_uri()) {
778
- $this->cache_reject_reason = 'request URI is rejected';
779
 
780
  return false;
781
  }
@@ -784,7 +775,7 @@ class W3_PgCache {
784
  * Check User Agent
785
  */
786
  if (!$this->_check_ua()) {
787
- $this->cache_reject_reason = 'user agent is rejected';
788
 
789
  return false;
790
  }
@@ -793,7 +784,7 @@ class W3_PgCache {
793
  * Check WordPress cookies
794
  */
795
  if (!$this->_check_cookies()) {
796
- $this->cache_reject_reason = 'cookie is rejected';
797
 
798
  return false;
799
  }
@@ -802,7 +793,7 @@ class W3_PgCache {
802
  * Skip if user is logged in
803
  */
804
  if ($this->_config->get_boolean('pgcache.reject.logged') && !$this->_check_logged_in()) {
805
- $this->cache_reject_reason = 'user is logged in';
806
 
807
  return false;
808
  }
@@ -824,11 +815,34 @@ class W3_PgCache {
824
  return false;
825
  }
826
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
827
  /**
828
  * Check for database error
829
  */
830
  if (w3_is_database_error($buffer)) {
831
- $this->cache_reject_reason = 'Database Error occurred';
832
 
833
  return false;
834
  }
@@ -846,7 +860,7 @@ class W3_PgCache {
846
  * Don't cache 404 pages
847
  */
848
  if (!$this->_config->get_boolean('pgcache.cache.404') && function_exists('is_404') && is_404()) {
849
- $this->cache_reject_reason = 'page is 404';
850
 
851
  return false;
852
  }
@@ -855,7 +869,7 @@ class W3_PgCache {
855
  * Don't cache homepage
856
  */
857
  if (!$this->_config->get_boolean('pgcache.cache.home') && function_exists('is_home') && is_home()) {
858
- $this->cache_reject_reason = 'page is home';
859
 
860
  return false;
861
  }
@@ -864,7 +878,7 @@ class W3_PgCache {
864
  * Don't cache feed
865
  */
866
  if (!$this->_config->get_boolean('pgcache.cache.feed') && function_exists('is_feed') && is_feed()) {
867
- $this->cache_reject_reason = 'page is feed';
868
 
869
  return false;
870
  }
@@ -873,7 +887,7 @@ class W3_PgCache {
873
  * Check if page contains dynamic tags
874
  */
875
  if ($this->_enhanced_mode && $this->_has_dynamic($buffer)) {
876
- $this->cache_reject_reason = 'page that contains dynamic tags (mfunc or mclude) can not be cached in enhanced mode';
877
 
878
  return false;
879
  }
@@ -958,6 +972,25 @@ class W3_PgCache {
958
  return true;
959
  }
960
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
961
  /**
962
  * Checks User Agent
963
  *
@@ -1349,7 +1382,7 @@ class W3_PgCache {
1349
  $debug_info .= "Header info:\r\n";
1350
 
1351
  foreach ($headers as $header_name => $header_value) {
1352
- $debug_info .= sprintf("%s%s\r\n", str_pad($header_name . ': ', 20), $header_value);
1353
  }
1354
  }
1355
 
@@ -1659,7 +1692,7 @@ class W3_PgCache {
1659
  $output = sprintf('Unable to execute code: %s', htmlspecialchars($code));
1660
  }
1661
  } else {
1662
- $output = htmlspecialchars('Inavalid mfunc tag syntax. Correct: <!-- mfunc PHP code --><!-- /mfunc --> or <!-- mfunc -->PHP code<!-- /mfunc -->.');
1663
  }
1664
 
1665
  return $output;
@@ -1688,7 +1721,7 @@ class W3_PgCache {
1688
  $output = sprintf('Unable to open file: %s', htmlspecialchars($file));
1689
  }
1690
  } else {
1691
- $output = htmlspecialchars('Incorrect mclude tag syntax. Correct: <!-- mclude path/to/file.php --><!-- /mclude --> or <!-- mclude -->path/to/file.php<!-- /mclude -->.');
1692
  }
1693
 
1694
  return $output;
517
  if ($this->_config->get_boolean('pgcache.purge.author') && $post) {
518
  $posts_number = count_user_posts($post->post_author);
519
  $posts_per_page = get_option('posts_per_page');
520
+ $posts_pages_number = @ceil($posts_number / $posts_per_page);
521
 
522
  $author_link = get_author_link(false, $post->post_author);
523
  $author_uri = str_replace($domain_url, '', $author_link);
561
 
562
  $posts_per_page = get_option('posts_per_page');
563
  $posts_number = $this->_get_archive_posts_count($post_year, $post_month, $post_day);
564
+ $posts_pages_number = @ceil($posts_number / $posts_per_page);
565
 
566
  $day_link = get_day_link($post_year, $post_month, $post_day);
567
  $day_uri = str_replace($domain_url, '', $day_link);
730
  * Don't cache in console mode
731
  */
732
  if (PHP_SAPI === 'cli') {
733
+ $this->cache_reject_reason = 'Console mode';
734
 
735
  return false;
736
  }
739
  * Skip if session defined
740
  */
741
  if (defined('SID') && SID != '') {
742
+ $this->cache_reject_reason = 'Session started';
743
 
744
  return false;
745
  }
748
  * Skip if posting
749
  */
750
  if ($_SERVER['REQUEST_METHOD'] == 'POST') {
751
+ $this->cache_reject_reason = 'Requested method is POST';
752
 
753
  return false;
754
  }
757
  * Skip if there is query in the request uri
758
  */
759
  if (!$this->_config->get_boolean('pgcache.cache.query') && strstr($this->_request_uri, '?') !== false) {
760
+ $this->cache_reject_reason = 'Requested URI contains query';
 
 
 
 
 
 
 
 
 
761
 
762
  return false;
763
  }
766
  * Check request URI
767
  */
768
  if (!in_array($_SERVER['PHP_SELF'], $this->_config->get_array('pgcache.accept.files')) && !$this->_check_request_uri()) {
769
+ $this->cache_reject_reason = 'Requested URI is rejected';
770
 
771
  return false;
772
  }
775
  * Check User Agent
776
  */
777
  if (!$this->_check_ua()) {
778
+ $this->cache_reject_reason = 'User agent is rejected';
779
 
780
  return false;
781
  }
784
  * Check WordPress cookies
785
  */
786
  if (!$this->_check_cookies()) {
787
+ $this->cache_reject_reason = 'Cookie is rejected';
788
 
789
  return false;
790
  }
793
  * Skip if user is logged in
794
  */
795
  if ($this->_config->get_boolean('pgcache.reject.logged') && !$this->_check_logged_in()) {
796
+ $this->cache_reject_reason = 'User is logged in';
797
 
798
  return false;
799
  }
815
  return false;
816
  }
817
 
818
+ /**
819
+ * Check for request URI trailing slash
820
+ */
821
+ if ($this->_enhanced_mode) {
822
+ $permalink_structure = get_option('permalink_structure');
823
+ $permalink_structure_slash = (substr($permalink_structure, -1) == '/');
824
+ $request_uri_slash = (substr($this->_request_uri, -1) == '/');
825
+
826
+ if ($permalink_structure_slash != $request_uri_slash) {
827
+ if ($permalink_structure_slash) {
828
+ if (!$this->_check_accept_uri()) {
829
+ $this->cache_reject_reason = 'Requested URI doesn\'t have a trailing slash';
830
+
831
+ return false;
832
+ }
833
+ } else {
834
+ $this->cache_reject_reason = 'Requested URI has a trailing slash';
835
+
836
+ return false;
837
+ }
838
+ }
839
+ }
840
+
841
  /**
842
  * Check for database error
843
  */
844
  if (w3_is_database_error($buffer)) {
845
+ $this->cache_reject_reason = 'Database error occurred';
846
 
847
  return false;
848
  }
860
  * Don't cache 404 pages
861
  */
862
  if (!$this->_config->get_boolean('pgcache.cache.404') && function_exists('is_404') && is_404()) {
863
+ $this->cache_reject_reason = 'Page is 404';
864
 
865
  return false;
866
  }
869
  * Don't cache homepage
870
  */
871
  if (!$this->_config->get_boolean('pgcache.cache.home') && function_exists('is_home') && is_home()) {
872
+ $this->cache_reject_reason = 'Page is home';
873
 
874
  return false;
875
  }
878
  * Don't cache feed
879
  */
880
  if (!$this->_config->get_boolean('pgcache.cache.feed') && function_exists('is_feed') && is_feed()) {
881
+ $this->cache_reject_reason = 'Page is feed';
882
 
883
  return false;
884
  }
887
  * Check if page contains dynamic tags
888
  */
889
  if ($this->_enhanced_mode && $this->_has_dynamic($buffer)) {
890
+ $this->cache_reject_reason = 'Page contains dynamic tags (mfunc or mclude) can not be cached in enhanced mode';
891
 
892
  return false;
893
  }
972
  return true;
973
  }
974
 
975
+ /**
976
+ * Checks accept URI
977
+ *
978
+ * @return boolean
979
+ */
980
+ function _check_accept_uri() {
981
+ $accept_uri = $this->_config->get_array('pgcache.accept.uri');
982
+ $accept_uri = array_map('w3_parse_path', $accept_uri);
983
+
984
+ foreach ($accept_uri as $expr) {
985
+ $expr = trim($expr);
986
+ if ($expr != '' && preg_match('~' . $expr . '~i', $this->_request_uri)) {
987
+ return true;
988
+ }
989
+ }
990
+
991
+ return false;
992
+ }
993
+
994
  /**
995
  * Checks User Agent
996
  *
1382
  $debug_info .= "Header info:\r\n";
1383
 
1384
  foreach ($headers as $header_name => $header_value) {
1385
+ $debug_info .= sprintf("%s%s\r\n", str_pad($header_name . ': ', 20), w3_escape_comment($header_value));
1386
  }
1387
  }
1388
 
1692
  $output = sprintf('Unable to execute code: %s', htmlspecialchars($code));
1693
  }
1694
  } else {
1695
+ $output = htmlspecialchars('Invalid mfunc tag syntax. The correct format is: <!-- mfunc PHP code --><!-- /mfunc --> or <!-- mfunc -->PHP code<!-- /mfunc -->.');
1696
  }
1697
 
1698
  return $output;
1721
  $output = sprintf('Unable to open file: %s', htmlspecialchars($file));
1722
  }
1723
  } else {
1724
+ $output = htmlspecialchars('Incorrect mclude tag syntax. The correct format is: <!-- mclude path/to/file.php --><!-- /mclude --> or <!-- mclude -->path/to/file.php<!-- /mclude -->.');
1725
  }
1726
 
1727
  return $output;
lib/W3/Plugin/Cdn.php CHANGED
@@ -1699,7 +1699,7 @@ class W3_Plugin_Cdn extends W3_Plugin {
1699
  'id' => $this->_config->get_string('cdn.cf2.id'),
1700
  'cname' => $this->_config->get_array('cdn.cf2.cname'),
1701
  'ssl' => $this->_config->get_string('cdn.cf2.ssl'),
1702
- 'compression' => $compression
1703
  );
1704
  break;
1705
 
@@ -1765,7 +1765,7 @@ class W3_Plugin_Cdn extends W3_Plugin {
1765
  $debug_info .= "\r\nReplaced URLs:\r\n";
1766
 
1767
  foreach ($this->replaced_urls as $old_url => $new_url) {
1768
- $debug_info .= sprintf("%s => %s\r\n", $old_url, $new_url);
1769
  }
1770
  }
1771
 
1699
  'id' => $this->_config->get_string('cdn.cf2.id'),
1700
  'cname' => $this->_config->get_array('cdn.cf2.cname'),
1701
  'ssl' => $this->_config->get_string('cdn.cf2.ssl'),
1702
+ 'compression' => false
1703
  );
1704
  break;
1705
 
1765
  $debug_info .= "\r\nReplaced URLs:\r\n";
1766
 
1767
  foreach ($this->replaced_urls as $old_url => $new_url) {
1768
+ $debug_info .= sprintf("%s => %s\r\n", w3_escape_comment($old_url), w3_escape_comment($new_url));
1769
  }
1770
  }
1771
 
lib/W3/Plugin/Minify.php CHANGED
@@ -620,16 +620,16 @@ class W3_Plugin_Minify extends W3_Plugin {
620
  static $non_blocking_function = false;
621
 
622
  if ($blocking) {
623
- return '<script src="' . str_replace('&', '&amp;', $url) . '"></script>';
624
  } else {
625
  $script = '';
626
 
627
  if (!$non_blocking_function) {
628
  $non_blocking_function = true;
629
- $script = "<script>function w3tc_load_js(u){var d=document,p=d.getElementsByTagName('HEAD')[0],c=d.createElement('script');c.type='text/javascript';c.src=u;p.appendChild(c);}</script>";
630
  }
631
 
632
- $script .= "<script>w3tc_load_js('" . $url . "');</script>";
633
 
634
  return $script;
635
  }
@@ -745,7 +745,7 @@ class W3_Plugin_Minify extends W3_Plugin {
745
  if ($this->_config->get_boolean('minify.rewrite')) {
746
  $url = sprintf('%s/%s/%s/%s.%s.%d.%s', $site_url_ssl, W3TC_CONTENT_MINIFY_DIR_NAME, $theme, $template, $location, $id, $type);
747
  } else {
748
- $url = sprintf('%s/%s/?tt=%s&gg=%s&g=%s&t=%s&m=%d', $site_url_ssl, W3TC_CONTENT_MINIFY_DIR_NAME, $theme, $template, $location, $type, $id);
749
  }
750
 
751
  return $url;
@@ -771,7 +771,7 @@ class W3_Plugin_Minify extends W3_Plugin {
771
  if ($this->_config->get_boolean('minify.rewrite')) {
772
  $url = sprintf('%s/%s/%s.%d.%s', $site_url_ssl, W3TC_CONTENT_MINIFY_DIR_NAME, $hash, $id, $type);
773
  } else {
774
- $url = sprintf('%s/%s/?h=%s&t=%s&m=%s', $site_url_ssl, W3TC_CONTENT_MINIFY_DIR_NAME, $hash, $type, $id);
775
  }
776
 
777
  return $url;
@@ -832,7 +832,7 @@ class W3_Plugin_Minify extends W3_Plugin {
832
  $debug_info .= "\r\nReplaced CSS files:\r\n";
833
 
834
  foreach ($this->replaced_styles as $index => $file) {
835
- $debug_info .= sprintf("%d. %s\r\n", $index + 1, $file);
836
  }
837
  }
838
 
@@ -840,7 +840,7 @@ class W3_Plugin_Minify extends W3_Plugin {
840
  $debug_info .= "\r\nReplaced JavaScript files:\r\n";
841
 
842
  foreach ($this->replaced_scripts as $index => $file) {
843
- $debug_info .= sprintf("%d. %s\r\n", $index + 1, $file);
844
  }
845
  }
846
 
@@ -1085,7 +1085,7 @@ class W3_Plugin_Minify extends W3_Plugin {
1085
  $rules .= " RewriteRule (.*) $1%{ENV:APPEND_EXT} [L]\n";
1086
  }
1087
 
1088
- $rules .= " RewriteRule (.*) index.php?file=$1 [L]\n";
1089
 
1090
  $rules .= "</IfModule>\n";
1091
  $rules .= W3TC_MARKER_END_MINIFY_CORE . "\n";
@@ -1132,7 +1132,7 @@ class W3_Plugin_Minify extends W3_Plugin {
1132
  $rules .= "}\n";
1133
  }
1134
 
1135
- $rules .= "rewrite ^" . $cache_dir_condition . "/(.+)$ " . $cache_dir_rewrite . "/index.php?file=$" . $offset . " last;\n";
1136
  $rules .= W3TC_MARKER_END_MINIFY_CORE . "\n";
1137
 
1138
  return $rules;
620
  static $non_blocking_function = false;
621
 
622
  if ($blocking) {
623
+ return '<script type="text/javascript" src="' . str_replace('&', '&amp;', $url) . '"></script>';
624
  } else {
625
  $script = '';
626
 
627
  if (!$non_blocking_function) {
628
  $non_blocking_function = true;
629
+ $script = "<script type=\"text/javascript\">function w3tc_load_js(u){var d=document,p=d.getElementsByTagName('HEAD')[0],c=d.createElement('script');c.type='text/javascript';c.src=u;p.appendChild(c);}</script>";
630
  }
631
 
632
+ $script .= "<script type=\"text/javascript\">w3tc_load_js('" . $url . "');</script>";
633
 
634
  return $script;
635
  }
745
  if ($this->_config->get_boolean('minify.rewrite')) {
746
  $url = sprintf('%s/%s/%s/%s.%s.%d.%s', $site_url_ssl, W3TC_CONTENT_MINIFY_DIR_NAME, $theme, $template, $location, $id, $type);
747
  } else {
748
+ $url = sprintf('%s/%s/index.php?file=%s/%s.%s.%d.%s', $site_url_ssl, W3TC_CONTENT_MINIFY_DIR_NAME, $theme, $template, $location, $id, $type);
749
  }
750
 
751
  return $url;
771
  if ($this->_config->get_boolean('minify.rewrite')) {
772
  $url = sprintf('%s/%s/%s.%d.%s', $site_url_ssl, W3TC_CONTENT_MINIFY_DIR_NAME, $hash, $id, $type);
773
  } else {
774
+ $url = sprintf('%s/%s/index.php?file=%s.%d.%s', $site_url_ssl, W3TC_CONTENT_MINIFY_DIR_NAME, $hash, $id, $type);
775
  }
776
 
777
  return $url;
832
  $debug_info .= "\r\nReplaced CSS files:\r\n";
833
 
834
  foreach ($this->replaced_styles as $index => $file) {
835
+ $debug_info .= sprintf("%d. %s\r\n", $index + 1, w3_escape_comment($file));
836
  }
837
  }
838
 
840
  $debug_info .= "\r\nReplaced JavaScript files:\r\n";
841
 
842
  foreach ($this->replaced_scripts as $index => $file) {
843
+ $debug_info .= sprintf("%d. %s\r\n", $index + 1, w3_escape_comment($file));
844
  }
845
  }
846
 
1085
  $rules .= " RewriteRule (.*) $1%{ENV:APPEND_EXT} [L]\n";
1086
  }
1087
 
1088
+ $rules .= " RewriteRule ^(.+\\.(css|js))$ index.php?file=$1 [L]\n";
1089
 
1090
  $rules .= "</IfModule>\n";
1091
  $rules .= W3TC_MARKER_END_MINIFY_CORE . "\n";
1132
  $rules .= "}\n";
1133
  }
1134
 
1135
+ $rules .= "rewrite ^" . $cache_dir_condition . "/(.+\\.(css|js))$ " . $cache_dir_rewrite . "/index.php?file=$" . $offset . " last;\n";
1136
  $rules .= W3TC_MARKER_END_MINIFY_CORE . "\n";
1137
 
1138
  return $rules;
lib/W3/Plugin/PgCache.php CHANGED
@@ -5,10 +5,6 @@
5
  */
6
  require_once W3TC_LIB_W3_DIR . '/Plugin.php';
7
 
8
- if (!defined('W3TC_PLUGIN_PGCACHE_REGEXP_WPCACHE')) {
9
- define('W3TC_PLUGIN_PGCACHE_REGEXP_WPCACHE', '~define\s*\(\s*[\'"]WP_CACHE[\'"]\s*,.*?\)~is');
10
- }
11
-
12
  /**
13
  * Class W3_Plugin_PgCache
14
  */
@@ -152,7 +148,7 @@ class W3_Plugin_PgCache extends W3_Plugin {
152
  w3_writable_error(W3TC_ADDIN_FILE_ADVANCED_CACHE);
153
  }
154
 
155
- if (!$this->enable_wp_cache()) {
156
  $activate_url = wp_nonce_url('plugins.php?action=activate&plugin=' . W3TC_FILE, 'activate-plugin_' . W3TC_FILE);
157
  $reactivate_button = sprintf('<input type="button" value="re-activate plugin" onclick="top.location.href = \'%s\'" />', addslashes($activate_url));
158
  $error = sprintf('<strong>%swp-config.php</strong> could not be written, please edit config and add:<br /><strong style="color:#f00;">define(\'WP_CACHE\', true);</strong> before <strong style="color:#f00;">require_once(ABSPATH . \'wp-settings.php\');</strong><br />then %s.', ABSPATH, $reactivate_button);
@@ -231,13 +227,16 @@ class W3_Plugin_PgCache extends W3_Plugin {
231
  }
232
 
233
  /**
234
- * Check WP_CACHE definition existence
235
  *
236
  * @param string $content
237
- * @return int
238
  */
239
- function is_wp_cache_define($content) {
240
- return preg_match(W3TC_PLUGIN_PGCACHE_REGEXP_WPCACHE, $content);
 
 
 
241
  }
242
 
243
  /**
@@ -253,11 +252,8 @@ class W3_Plugin_PgCache extends W3_Plugin {
253
  return false;
254
  }
255
 
256
- if ($this->is_wp_cache_define($config_data)) {
257
- $new_config_data = preg_replace(W3TC_PLUGIN_PGCACHE_REGEXP_WPCACHE, "define('WP_CACHE', true)", $config_data, 1);
258
- } else {
259
- $new_config_data = preg_replace('~<\?(php)?~', "\\0\r\n/** Enable W3 Total Cache **/\r\ndefine('WP_CACHE', true); // Added by W3 Total Cache\r\n", $config_data, 1);
260
- }
261
 
262
  if ($new_config_data != $config_data) {
263
  if (!@file_put_contents($config_path, $new_config_data)) {
@@ -281,13 +277,11 @@ class W3_Plugin_PgCache extends W3_Plugin {
281
  return false;
282
  }
283
 
284
- if ($this->is_wp_cache_define($config_data)) {
285
- $new_config_data = preg_replace(W3TC_PLUGIN_PGCACHE_REGEXP_WPCACHE, "define('WP_CACHE', false)", $config_data, 1);
286
 
287
- if ($new_config_data != $config_data) {
288
- if (!@file_put_contents($config_path, $new_config_data)) {
289
- return false;
290
- }
291
  }
292
  }
293
 
@@ -555,6 +549,7 @@ class W3_Plugin_PgCache extends W3_Plugin {
555
  $home_path = w3_get_home_path();
556
  $rewrite_base = ($is_network ? $base_path : $home_path);
557
  $cache_dir = w3_path(W3TC_CACHE_FILE_PGCACHE_DIR);
 
558
 
559
  /**
560
  * Auto reject cookies
@@ -604,6 +599,7 @@ class W3_Plugin_PgCache extends W3_Plugin {
604
  $reject_uris = array_merge($reject_uris, $this->_config->get_array('pgcache.reject.uri'));
605
  $reject_uris = array_map('w3_parse_path', $reject_uris);
606
  $reject_user_agents = $this->_config->get_array('pgcache.reject.ua');
 
607
  $accept_files = $this->_config->get_array('pgcache.accept.files');
608
 
609
  /**
@@ -744,9 +740,20 @@ class W3_Plugin_PgCache extends W3_Plugin {
744
  $rules .= " RewriteCond %{QUERY_STRING} =\"\"\n";
745
 
746
  /**
747
- * Accept only URIs with trailing slash
748
  */
749
- $rules .= " RewriteCond %{REQUEST_URI} \\/$\n";
 
 
 
 
 
 
 
 
 
 
 
750
 
751
  /**
752
  * Don't accept rejected URIs
@@ -802,6 +809,7 @@ class W3_Plugin_PgCache extends W3_Plugin {
802
 
803
  $base_path = w3_get_base_path();
804
  $cache_dir = w3_path(W3TC_CACHE_FILE_PGCACHE_DIR);
 
805
 
806
  /**
807
  * Auto reject cookies
@@ -851,6 +859,7 @@ class W3_Plugin_PgCache extends W3_Plugin {
851
  $reject_uris = array_merge($reject_uris, $this->_config->get_array('pgcache.reject.uri'));
852
  $reject_uris = array_map('w3_parse_path', $reject_uris);
853
  $reject_user_agents = $this->_config->get_array('pgcache.reject.ua');
 
854
  $accept_files = $this->_config->get_array('pgcache.accept.files');
855
 
856
  /**
@@ -898,38 +907,74 @@ class W3_Plugin_PgCache extends W3_Plugin {
898
  }
899
  }
900
 
 
 
 
901
  $rules .= "set \$w3tc_rewrite 1;\n";
902
  $rules .= "if (\$request_method = POST) {\n";
903
  $rules .= " set \$w3tc_rewrite 0;\n";
904
  $rules .= "}\n";
905
 
 
 
 
906
  $rules .= "if (\$query_string != \"\") {\n";
907
  $rules .= " set \$w3tc_rewrite 0;\n";
908
  $rules .= "}\n";
909
 
910
- $rules .= "if (\$request_uri !~ \\/$) {\n";
911
- $rules .= " set \$w3tc_rewrite 0;\n";
912
- $rules .= "}\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
913
 
 
 
 
914
  if (!count($accept_files)) {
915
  $rules .= "if (\$request_uri ~* \"(" . implode('|', $reject_uris) . "\") {\n";
916
  $rules .= " set \$w3tc_rewrite 0;\n";
917
  $rules .= "}\n";
918
  } else {
919
- $rules .= "set \$w3tc_rewrite2 1;\n";
920
  $rules .= "if (\$request_uri ~* \"(" . implode('|', $reject_uris) . ")\") {\n";
921
- $rules .= " set \$w3tc_rewrite2 0;\n";
922
  $rules .= "}\n";
923
 
924
  $rules .= "if (\$request_uri ~* \"(" . implode('|', array_map('w3_preg_quote', $accept_files)) . ")\") {\n";
925
- $rules .= " set \$w3tc_rewrite2 1;\n";
926
  $rules .= "}\n";
927
 
928
- $rules .= "if (\$w3tc_rewrite2 != 1) {\n";
929
  $rules .= " set \$w3tc_rewrite 0;\n";
930
  $rules .= "}\n";
931
  }
932
 
 
 
 
933
  $rules .= "if (\$http_cookie ~* \"(" . implode('|', array_map('w3_preg_quote', $reject_cookies)) . ")\") {\n";
934
  $rules .= " set \$w3tc_rewrite 0;\n";
935
  $rules .= "}\n";
5
  */
6
  require_once W3TC_LIB_W3_DIR . '/Plugin.php';
7
 
 
 
 
 
8
  /**
9
  * Class W3_Plugin_PgCache
10
  */
148
  w3_writable_error(W3TC_ADDIN_FILE_ADVANCED_CACHE);
149
  }
150
 
151
+ if ((!defined('WP_CACHE') || !WP_CACHE) && !$this->enable_wp_cache()) {
152
  $activate_url = wp_nonce_url('plugins.php?action=activate&plugin=' . W3TC_FILE, 'activate-plugin_' . W3TC_FILE);
153
  $reactivate_button = sprintf('<input type="button" value="re-activate plugin" onclick="top.location.href = \'%s\'" />', addslashes($activate_url));
154
  $error = sprintf('<strong>%swp-config.php</strong> could not be written, please edit config and add:<br /><strong style="color:#f00;">define(\'WP_CACHE\', true);</strong> before <strong style="color:#f00;">require_once(ABSPATH . \'wp-settings.php\');</strong><br />then %s.', ABSPATH, $reactivate_button);
227
  }
228
 
229
  /**
230
+ * Erases WP_CACHE define
231
  *
232
  * @param string $content
233
+ * @return mixed
234
  */
235
+ function erase_wp_cache($content) {
236
+ $content = preg_replace("~\r\n\\/\\*\\* Enable W3 Total Cache \\*\\*?\\/.*?\\/\\/ Added by W3 Total Cache\r\n~s", '', $content);
237
+ $content = preg_replace("~(\\/\\/\\s*)?define\\s*\\(\\s*['\"]?WP_CACHE['\"]?\\s*,.*?\\)\\s*;+\\r?\\n?~is", '', $content);
238
+
239
+ return $content;
240
  }
241
 
242
  /**
252
  return false;
253
  }
254
 
255
+ $new_config_data = $this->erase_wp_cache($config_data);
256
+ $new_config_data = preg_replace('~<\?(php)?~', "\\0\r\n/** Enable W3 Total Cache */\r\ndefine('WP_CACHE', true); // Added by W3 Total Cache\r\n", $new_config_data, 1);
 
 
 
257
 
258
  if ($new_config_data != $config_data) {
259
  if (!@file_put_contents($config_path, $new_config_data)) {
277
  return false;
278
  }
279
 
280
+ $new_config_data = $this->erase_wp_cache($config_data);
 
281
 
282
+ if ($new_config_data != $config_data) {
283
+ if (!@file_put_contents($config_path, $new_config_data)) {
284
+ return false;
 
285
  }
286
  }
287
 
549
  $home_path = w3_get_home_path();
550
  $rewrite_base = ($is_network ? $base_path : $home_path);
551
  $cache_dir = w3_path(W3TC_CACHE_FILE_PGCACHE_DIR);
552
+ $permalink_structure = get_option('permalink_structure');
553
 
554
  /**
555
  * Auto reject cookies
599
  $reject_uris = array_merge($reject_uris, $this->_config->get_array('pgcache.reject.uri'));
600
  $reject_uris = array_map('w3_parse_path', $reject_uris);
601
  $reject_user_agents = $this->_config->get_array('pgcache.reject.ua');
602
+ $accept_uris = $this->_config->get_array('pgcache.accept.uri');
603
  $accept_files = $this->_config->get_array('pgcache.accept.files');
604
 
605
  /**
740
  $rules .= " RewriteCond %{QUERY_STRING} =\"\"\n";
741
 
742
  /**
743
+ * Check permalink structure trailing slash
744
  */
745
+ if (substr($permalink_structure, -1) == '/') {
746
+ $rules .= " RewriteCond %{REQUEST_URI} \\/$";
747
+
748
+ if (count($accept_uris)) {
749
+ $rules .= " [OR]\n";
750
+ $rules .= " RewriteCond %{REQUEST_URI} (" . implode('|', $accept_uris) . ") [NC]\n";
751
+ } else {
752
+ $rules .= "\n";
753
+ }
754
+ } else {
755
+ $rules .= " RewriteCond %{REQUEST_URI} [^\\/]$\n";
756
+ }
757
 
758
  /**
759
  * Don't accept rejected URIs
809
 
810
  $base_path = w3_get_base_path();
811
  $cache_dir = w3_path(W3TC_CACHE_FILE_PGCACHE_DIR);
812
+ $permalink_structure = get_option('permalink_structure');
813
 
814
  /**
815
  * Auto reject cookies
859
  $reject_uris = array_merge($reject_uris, $this->_config->get_array('pgcache.reject.uri'));
860
  $reject_uris = array_map('w3_parse_path', $reject_uris);
861
  $reject_user_agents = $this->_config->get_array('pgcache.reject.ua');
862
+ $accept_uris = $this->_config->get_array('pgcache.accept.uri');
863
  $accept_files = $this->_config->get_array('pgcache.accept.files');
864
 
865
  /**
907
  }
908
  }
909
 
910
+ /**
911
+ * Don't accept POSTs
912
+ */
913
  $rules .= "set \$w3tc_rewrite 1;\n";
914
  $rules .= "if (\$request_method = POST) {\n";
915
  $rules .= " set \$w3tc_rewrite 0;\n";
916
  $rules .= "}\n";
917
 
918
+ /**
919
+ * Query string should be empty
920
+ */
921
  $rules .= "if (\$query_string != \"\") {\n";
922
  $rules .= " set \$w3tc_rewrite 0;\n";
923
  $rules .= "}\n";
924
 
925
+ /**
926
+ * Check permalink structure trailing slash
927
+ */
928
+ if (substr($permalink_structure, -1) == '/') {
929
+ if (!count($accept_uris)) {
930
+ $rules .= "if (\$request_uri !~ \\/$) {\n";
931
+ $rules .= " set \$w3tc_rewrite 0;\n";
932
+ $rules .= "}\n";
933
+ } else {
934
+ $rules .= "set \$w3tc_rewrite2 1;\n";
935
+ $rules .= "if (\$request_uri !~ \\/$) {\n";
936
+ $rules .= " set \$w3tc_rewrite2 0;\n";
937
+ $rules .= "}\n";
938
+
939
+ $rules .= "if (\$request_uri ~* \"(" . implode('|', $accept_uris) . ")\") {\n";
940
+ $rules .= " set \$w3tc_rewrite2 1;\n";
941
+ $rules .= "}\n";
942
+
943
+ $rules .= "if (\$w3tc_rewrite2 != 1) {\n";
944
+ $rules .= " set \$w3tc_rewrite 0;\n";
945
+ $rules .= "}\n";
946
+ }
947
+ } else {
948
+ $rules .= "if (\$request_uri !~ [^\\/]$) {\n";
949
+ $rules .= " set \$w3tc_rewrite 0;\n";
950
+ $rules .= "}\n";
951
+ }
952
 
953
+ /**
954
+ * Check for rejected URIs
955
+ */
956
  if (!count($accept_files)) {
957
  $rules .= "if (\$request_uri ~* \"(" . implode('|', $reject_uris) . "\") {\n";
958
  $rules .= " set \$w3tc_rewrite 0;\n";
959
  $rules .= "}\n";
960
  } else {
961
+ $rules .= "set \$w3tc_rewrite3 1;\n";
962
  $rules .= "if (\$request_uri ~* \"(" . implode('|', $reject_uris) . ")\") {\n";
963
+ $rules .= " set \$w3tc_rewrite3 0;\n";
964
  $rules .= "}\n";
965
 
966
  $rules .= "if (\$request_uri ~* \"(" . implode('|', array_map('w3_preg_quote', $accept_files)) . ")\") {\n";
967
+ $rules .= " set \$w3tc_rewrite3 1;\n";
968
  $rules .= "}\n";
969
 
970
+ $rules .= "if (\$w3tc_rewrite3 != 1) {\n";
971
  $rules .= " set \$w3tc_rewrite 0;\n";
972
  $rules .= "}\n";
973
  }
974
 
975
+ /**
976
+ * Check for rejected cookies
977
+ */
978
  $rules .= "if (\$http_cookie ~* \"(" . implode('|', array_map('w3_preg_quote', $reject_cookies)) . ")\") {\n";
979
  $rules .= " set \$w3tc_rewrite 0;\n";
980
  $rules .= "}\n";
lib/W3/Plugin/TotalCache.php CHANGED
@@ -1646,30 +1646,20 @@ class W3_Plugin_TotalCache extends W3_Plugin {
1646
  $this->_errors[] = sprintf('Page caching is not available. The current add-in %s is either an incorrect file or an old version. De-activate the plugin, remove the file, then activate the plugin again.', W3TC_ADDIN_FILE_ADVANCED_CACHE);
1647
  } elseif (!defined('WP_CACHE') || !WP_CACHE) {
1648
  $this->_errors[] = sprintf('Page caching is not available: please add: <strong>define(\'WP_CACHE\', true);</strong> to <strong>%swp-config.php</strong>. This error message will automatically disappear once the change is successfully made.', ABSPATH);
1649
- } elseif ($this->_config->get_string('pgcache.engine') == 'file_pgcache') {
1650
- if ($this->_config->get_boolean('notes.no_trailing_slash')) {
1651
- $permalink_structure = get_option('permalink_structure');
1652
 
1653
- if (substr($permalink_structure, -1) !== '/') {
1654
- $this->_errors[] = sprintf('The permalink structure (<strong>%s</strong>) does not include a trailing slash, disk enhanced page caching will fail to cache most requests. Either switch to any other supported caching method or add a trailing slash in the %s. %s', $permalink_structure, $this->button_link('settings', 'options-permalink.php'), $this->button_hide_note('Hide this message', 'no_trailing_slash'));
 
1655
  }
 
 
1656
  }
1657
 
1658
- if ($this->_config->get_boolean('config.check') && w3_can_check_rules()) {
1659
- require_once W3TC_LIB_W3_DIR . '/Plugin/PgCache.php';
1660
- $w3_plugin_pgcache = & W3_Plugin_PgCache::instance();
1661
-
1662
- if ($w3_plugin_pgcache->check_rules_core()) {
1663
- if (!$this->test_rewrite_pgcache()) {
1664
- $this->_errors[] = 'It appears Page Cache <acronym title="Uniform Resource Locator">URL</acronym> rewriting is not working. If using apache, verify that the server configuration allows .htaccess or if using nginx verify all configuration files are included in the configuration.';
1665
- }
1666
- } elseif ($this->_config->get_boolean('notes.pgcache_rules_core')) {
1667
- $this->_errors[] = sprintf('Disk enhanced page caching is not active. To enable it, add the following rules into the server configuration file (<strong>%s</strong>) of the site above the WordPress directives %s <textarea class="w3tc-rules" cols="120" rows="10" readonly="readonly">%s</textarea>. Or if permission allow this can be done automatically, by clicking here: %s. %s', w3_get_pgcache_rules_core_path(), $this->button('view code', '', 'w3tc-show-rules'), htmlspecialchars($w3_plugin_pgcache->generate_rules_core()), $this->button_link('auto-install', sprintf('admin.php?page=%s&pgcache_write_rules_core', $this->_page)), $this->button_hide_note('Hide this message', 'pgcache_rules_core'));
1668
- }
1669
-
1670
- if ($this->_config->get_boolean('notes.pgcache_rules_cache') && !$w3_plugin_pgcache->check_rules_cache()) {
1671
- $this->_errors[] = sprintf('Disk enhanced page caching is not active. To enable it, add the following rules into the server configuration file (<strong>%s</strong>) of the site %s <textarea class="w3tc-rules" cols="120" rows="10" readonly="readonly">%s</textarea>. This can be done automatically, by clicking here: %s. %s', w3_get_pgcache_rules_cache_path(), $this->button('view code', '', 'w3tc-show-rules'), htmlspecialchars($w3_plugin_pgcache->generate_rules_cache()), $this->button_link('auto-install', sprintf('admin.php?page=%s&pgcache_write_rules_cache', $this->_page)), $this->button_hide_note('Hide this message', 'pgcache_rules_cache'));
1672
- }
1673
  }
1674
  }
1675
  }
@@ -2156,6 +2146,7 @@ class W3_Plugin_TotalCache extends W3_Plugin {
2156
 
2157
  $default_feed = get_default_feed();
2158
  $pgcache_enabled = $this->_config->get_boolean('pgcache.enabled');
 
2159
 
2160
  include W3TC_DIR . '/inc/options/pgcache.phtml';
2161
  }
@@ -3762,6 +3753,11 @@ class W3_Plugin_TotalCache extends W3_Plugin {
3762
  $attachments = array();
3763
 
3764
  $attach_files = array(
 
 
 
 
 
3765
  /**
3766
  * Attach config files
3767
  */
@@ -4996,31 +4992,31 @@ class W3_Plugin_TotalCache extends W3_Plugin {
4996
  $host = (!empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost');
4997
 
4998
  if ($this->is_supported()) {
4999
- $buffer .= sprintf("\r\n<!-- Served from: %s @ %s by W3 Total Cache -->", $host, $date);
5000
  } else {
5001
- $buffer .= "\r\n<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/\r\n\r\n";
5002
 
5003
  if ($this->_config->get_boolean('minify.enabled') && !$this->_config->get_boolean('minify.debug')) {
5004
  require_once W3TC_LIB_W3_DIR . '/Plugin/Minify.php';
5005
  $w3_plugin_minify = & W3_Plugin_Minify::instance();
5006
 
5007
- $buffer .= sprintf("Minified using %s%s\r\n", w3_get_engine_name($this->_config->get_string('minify.engine')), ($w3_plugin_minify->minify_reject_reason != '' ? sprintf(' (%s)', $w3_plugin_minify->minify_reject_reason) : ''));
5008
  }
5009
 
5010
  if ($this->_config->get_boolean('pgcache.enabled') && !$this->_config->get_boolean('pgcache.debug')) {
5011
  require_once W3TC_LIB_W3_DIR . '/PgCache.php';
5012
  $w3_pgcache = & W3_PgCache::instance();
5013
 
5014
- $buffer .= sprintf("Page Caching using %s%s\r\n", w3_get_engine_name($this->_config->get_string('pgcache.engine')), ($w3_pgcache->cache_reject_reason != '' ? sprintf(' (%s)', $w3_pgcache->cache_reject_reason) : ''));
5015
  }
5016
 
5017
  if ($this->_config->get_boolean('dbcache.enabled') && !$this->_config->get_boolean('dbcache.debug') && is_a($wpdb, 'W3_Db')) {
5018
  $append = (is_user_logged_in() ? ' (user is logged in)' : '');
5019
 
5020
  if ($wpdb->query_hits) {
5021
- $buffer .= sprintf("Database Caching %d/%d queries in %.3f seconds using %s%s\r\n", $wpdb->query_hits, $wpdb->query_total, $wpdb->time_total, w3_get_engine_name($this->_config->get_string('dbcache.engine')), $append);
5022
  } else {
5023
- $buffer .= sprintf("Database Caching using %s%s\r\n", w3_get_engine_name($this->_config->get_string('dbcache.engine')), $append);
5024
  }
5025
  }
5026
 
@@ -5028,7 +5024,7 @@ class W3_Plugin_TotalCache extends W3_Plugin {
5028
  require_once W3TC_LIB_W3_DIR . '/ObjectCache.php';
5029
  $w3_objectcache = & W3_ObjectCache::instance();
5030
 
5031
- $buffer .= sprintf("Object Caching %d/%d objects using %s\r\n", $w3_objectcache->cache_hits, $w3_objectcache->cache_total, w3_get_engine_name($this->_config->get_string('objectcache.engine')));
5032
  }
5033
 
5034
  if ($this->_config->get_boolean('cdn.enabled') && !$this->_config->get_boolean('cdn.debug')) {
@@ -5038,10 +5034,16 @@ class W3_Plugin_TotalCache extends W3_Plugin {
5038
  $cdn = & $w3_plugin_cdn->get_cdn();
5039
  $via = $cdn->get_via();
5040
 
5041
- $buffer .= sprintf("Content Delivery Network via %s%s\r\n", ($via ? $via : 'N/A'), ($w3_plugin_cdn->cdn_reject_reason != '' ? sprintf(' (%s)', $w3_plugin_cdn->cdn_reject_reason) : ''));
 
 
 
 
 
 
5042
  }
5043
 
5044
- $buffer .= sprintf("\r\nServed from: %s @ %s -->", $host, $date);
5045
  }
5046
  }
5047
  }
@@ -5139,20 +5141,9 @@ class W3_Plugin_TotalCache extends W3_Plugin {
5139
  }
5140
 
5141
  $server_info = array(
5142
- 'wp' => array(
5143
- 'version' => $wp_version,
5144
- 'db_version' => $wp_db_version,
5145
- 'abspath' => ABSPATH,
5146
- 'home' => get_option('home'),
5147
- 'siteurl' => get_option('siteurl'),
5148
- 'email' => get_option('admin_email'),
5149
- 'upload_info' => (array) w3_upload_info(),
5150
- 'theme' => get_theme(get_current_theme()),
5151
- 'plugins' => $wordpress_plugins_active,
5152
- 'wp_cache' => ((defined('WP_CACHE') && WP_CACHE) ? 'true' : 'false')
5153
- ),
5154
  'w3tc' => array(
5155
  'version' => W3TC_VERSION,
 
5156
  'dir' => W3TC_DIR,
5157
  'content_dir' => W3TC_CONTENT_DIR,
5158
  'blogname' => W3TC_BLOGNAME,
@@ -5163,6 +5154,18 @@ class W3_Plugin_TotalCache extends W3_Plugin {
5163
  'home_path' => w3_get_home_path(),
5164
  'site_path' => w3_get_site_path()
5165
  ),
 
 
 
 
 
 
 
 
 
 
 
 
5166
  'mysql' => array(
5167
  'version' => $mysql_version,
5168
  'variables' => $mysql_variables
@@ -6066,7 +6069,8 @@ class W3_Plugin_TotalCache extends W3_Plugin {
6066
 
6067
  $comment = get_comment($id);
6068
 
6069
- $value = array('a' => $comment->comment_author,
 
6070
  'am' => $comment->comment_author_email,
6071
  'ip' => $comment->comment_author_IP,
6072
  'con' => substr($comment->comment_content, 0, 100)
1646
  $this->_errors[] = sprintf('Page caching is not available. The current add-in %s is either an incorrect file or an old version. De-activate the plugin, remove the file, then activate the plugin again.', W3TC_ADDIN_FILE_ADVANCED_CACHE);
1647
  } elseif (!defined('WP_CACHE') || !WP_CACHE) {
1648
  $this->_errors[] = sprintf('Page caching is not available: please add: <strong>define(\'WP_CACHE\', true);</strong> to <strong>%swp-config.php</strong>. This error message will automatically disappear once the change is successfully made.', ABSPATH);
1649
+ } elseif ($this->_config->get_string('pgcache.engine') == 'file_pgcache' && $this->_config->get_boolean('config.check') && w3_can_check_rules()) {
1650
+ require_once W3TC_LIB_W3_DIR . '/Plugin/PgCache.php';
1651
+ $w3_plugin_pgcache = & W3_Plugin_PgCache::instance();
1652
 
1653
+ if ($w3_plugin_pgcache->check_rules_core()) {
1654
+ if (!$this->test_rewrite_pgcache()) {
1655
+ $this->_errors[] = 'It appears Page Cache <acronym title="Uniform Resource Locator">URL</acronym> rewriting is not working. If using apache, verify that the server configuration allows .htaccess or if using nginx verify all configuration files are included in the configuration.';
1656
  }
1657
+ } elseif ($this->_config->get_boolean('notes.pgcache_rules_core')) {
1658
+ $this->_errors[] = sprintf('Disk enhanced page caching is not active. To enable it, add the following rules into the server configuration file (<strong>%s</strong>) of the site above the WordPress directives %s <textarea class="w3tc-rules" cols="120" rows="10" readonly="readonly">%s</textarea>. Or if permission allow this can be done automatically, by clicking here: %s. %s', w3_get_pgcache_rules_core_path(), $this->button('view code', '', 'w3tc-show-rules'), htmlspecialchars($w3_plugin_pgcache->generate_rules_core()), $this->button_link('auto-install', sprintf('admin.php?page=%s&pgcache_write_rules_core', $this->_page)), $this->button_hide_note('Hide this message', 'pgcache_rules_core'));
1659
  }
1660
 
1661
+ if ($this->_config->get_boolean('notes.pgcache_rules_cache') && !$w3_plugin_pgcache->check_rules_cache()) {
1662
+ $this->_errors[] = sprintf('Disk enhanced page caching is not active. To enable it, add the following rules into the server configuration file (<strong>%s</strong>) of the site %s <textarea class="w3tc-rules" cols="120" rows="10" readonly="readonly">%s</textarea>. This can be done automatically, by clicking here: %s. %s', w3_get_pgcache_rules_cache_path(), $this->button('view code', '', 'w3tc-show-rules'), htmlspecialchars($w3_plugin_pgcache->generate_rules_cache()), $this->button_link('auto-install', sprintf('admin.php?page=%s&pgcache_write_rules_cache', $this->_page)), $this->button_hide_note('Hide this message', 'pgcache_rules_cache'));
 
 
 
 
 
 
 
 
 
 
 
 
 
1663
  }
1664
  }
1665
  }
2146
 
2147
  $default_feed = get_default_feed();
2148
  $pgcache_enabled = $this->_config->get_boolean('pgcache.enabled');
2149
+ $permalink_structure = get_option('permalink_structure');
2150
 
2151
  include W3TC_DIR . '/inc/options/pgcache.phtml';
2152
  }
3753
  $attachments = array();
3754
 
3755
  $attach_files = array(
3756
+ /**
3757
+ * Attach WP config file
3758
+ */
3759
+ w3_get_wp_config_path(),
3760
+
3761
  /**
3762
  * Attach config files
3763
  */
4992
  $host = (!empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'localhost');
4993
 
4994
  if ($this->is_supported()) {
4995
+ $buffer .= sprintf("\r\n<!-- Served from: %s @ %s by W3 Total Cache -->", w3_escape_comment($host), $date);
4996
  } else {
4997
+ $strings = array();
4998
 
4999
  if ($this->_config->get_boolean('minify.enabled') && !$this->_config->get_boolean('minify.debug')) {
5000
  require_once W3TC_LIB_W3_DIR . '/Plugin/Minify.php';
5001
  $w3_plugin_minify = & W3_Plugin_Minify::instance();
5002
 
5003
+ $strings[] = sprintf("Minified using %s%s", w3_get_engine_name($this->_config->get_string('minify.engine')), ($w3_plugin_minify->minify_reject_reason != '' ? sprintf(' (%s)', $w3_plugin_minify->minify_reject_reason) : ''));
5004
  }
5005
 
5006
  if ($this->_config->get_boolean('pgcache.enabled') && !$this->_config->get_boolean('pgcache.debug')) {
5007
  require_once W3TC_LIB_W3_DIR . '/PgCache.php';
5008
  $w3_pgcache = & W3_PgCache::instance();
5009
 
5010
+ $strings[] = sprintf("Page Caching using %s%s", w3_get_engine_name($this->_config->get_string('pgcache.engine')), ($w3_pgcache->cache_reject_reason != '' ? sprintf(' (%s)', $w3_pgcache->cache_reject_reason) : ''));
5011
  }
5012
 
5013
  if ($this->_config->get_boolean('dbcache.enabled') && !$this->_config->get_boolean('dbcache.debug') && is_a($wpdb, 'W3_Db')) {
5014
  $append = (is_user_logged_in() ? ' (user is logged in)' : '');
5015
 
5016
  if ($wpdb->query_hits) {
5017
+ $strings[] = sprintf("Database Caching %d/%d queries in %.3f seconds using %s%s", $wpdb->query_hits, $wpdb->query_total, $wpdb->time_total, w3_get_engine_name($this->_config->get_string('dbcache.engine')), $append);
5018
  } else {
5019
+ $strings[] = sprintf("Database Caching using %s%s", w3_get_engine_name($this->_config->get_string('dbcache.engine')), $append);
5020
  }
5021
  }
5022
 
5024
  require_once W3TC_LIB_W3_DIR . '/ObjectCache.php';
5025
  $w3_objectcache = & W3_ObjectCache::instance();
5026
 
5027
+ $strings[] = sprintf("Object Caching %d/%d objects using %s", $w3_objectcache->cache_hits, $w3_objectcache->cache_total, w3_get_engine_name($this->_config->get_string('objectcache.engine')));
5028
  }
5029
 
5030
  if ($this->_config->get_boolean('cdn.enabled') && !$this->_config->get_boolean('cdn.debug')) {
5034
  $cdn = & $w3_plugin_cdn->get_cdn();
5035
  $via = $cdn->get_via();
5036
 
5037
+ $strings[] = sprintf("Content Delivery Network via %s%s", ($via ? $via : 'N/A'), ($w3_plugin_cdn->cdn_reject_reason != '' ? sprintf(' (%s)', $w3_plugin_cdn->cdn_reject_reason) : ''));
5038
+ }
5039
+
5040
+ $buffer .= "\r\n<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/\r\n";
5041
+
5042
+ if (count($strings)) {
5043
+ $buffer .= "\r\n" . implode("\r\n", $strings) . "\r\n";
5044
  }
5045
 
5046
+ $buffer .= sprintf("\r\nServed from: %s @ %s -->", w3_escape_comment($host), $date);
5047
  }
5048
  }
5049
  }
5141
  }
5142
 
5143
  $server_info = array(
 
 
 
 
 
 
 
 
 
 
 
 
5144
  'w3tc' => array(
5145
  'version' => W3TC_VERSION,
5146
+ 'server' => (!empty($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : 'Unknown'),
5147
  'dir' => W3TC_DIR,
5148
  'content_dir' => W3TC_CONTENT_DIR,
5149
  'blogname' => W3TC_BLOGNAME,
5154
  'home_path' => w3_get_home_path(),
5155
  'site_path' => w3_get_site_path()
5156
  ),
5157
+ 'wp' => array(
5158
+ 'version' => $wp_version,
5159
+ 'db_version' => $wp_db_version,
5160
+ 'abspath' => ABSPATH,
5161
+ 'home' => get_option('home'),
5162
+ 'siteurl' => get_option('siteurl'),
5163
+ 'email' => get_option('admin_email'),
5164
+ 'upload_info' => (array) w3_upload_info(),
5165
+ 'theme' => get_theme(get_current_theme()),
5166
+ 'wp_cache' => ((defined('WP_CACHE') && WP_CACHE) ? 'true' : 'false'),
5167
+ 'plugins' => $wordpress_plugins_active
5168
+ ),
5169
  'mysql' => array(
5170
  'version' => $mysql_version,
5171
  'variables' => $mysql_variables
6069
 
6070
  $comment = get_comment($id);
6071
 
6072
+ $value = array(
6073
+ 'a' => $comment->comment_author,
6074
  'am' => $comment->comment_author_email,
6075
  'ip' => $comment->comment_author_IP,
6076
  'con' => substr($comment->comment_content, 0, 100)
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: fredericktownes
3
  Tags: user experience, cache, caching, page cache, css cache, js cache, db cache, disk cache, disk caching, database cache, http compression, gzip, deflate, minify, cdn, content delivery network, media library, performance, speed, multiple hosts, css, merge, combine, unobtrusive javascript, compress, optimize, optimizer, javascript, js, cascading style sheet, plugin, yslow, yui, google, google rank, google page speed, mod_pagespeed, s3, cloudfront, aws, amazon web services, cloud files, rackspace, cotendo, max cdn, limelight, cloudflare, microsoft, microsoft azure, iis, nginx, apache, varnish, xcache, apc, eacclerator, wincache, mysql, w3 total cache, batcache, wp cache, wp super cache, buddypress
4
  Requires at least: 2.8
5
  Tested up to: 3.2
6
- Stable tag: 0.9.2.1
7
 
8
  Improve site performance and user experience via caching: browser, page, object, database, minify and content delivery network support.
9
 
@@ -35,7 +35,7 @@ Features:
35
 
36
  * Compatible with shared hosting, virtual private / dedicated servers and dedicated servers / clusters
37
  * Transparent content delivery network (CDN) integration with Media Library, theme files and WordPress itself
38
- * Mobile support: custom caching of pages by referrer or groups of user agents including theme switching for groups of referrers or user agents
39
  * Caching of (minified and compressed) pages and posts in memory or on disk or on CDN (mirror only)
40
  * Caching of (minified and compressed) CSS and JavaScript in memory, on disk or on CDN
41
  * Caching of feeds (site, categories, tags, comments, search results) in memory or on disk or on CDN (mirror only)
@@ -45,7 +45,7 @@ Features:
45
  * Minification of posts and pages and feeds
46
  * Minification of inline, embedded or 3rd party JavaScript (with automated updates)
47
  * Minification of inline, embedded or 3rd party CSS (with automated updates)
48
- * Browser caching using cache-control, future expire headers and entity tags (ETag)
49
  * JavaScript grouping by template (home page, post page etc) with embed location control
50
  * Non-blocking JavaScript embedding
51
  * Import post attachments directly into the Media Library (and CDN)
@@ -251,6 +251,9 @@ Install the plugin to read the full FAQ.
251
 
252
  **May 2011:**
253
 
 
 
 
254
  * [Use W3 Total Cache to Speed Up Your WordPress Site](http://www.ostraining.com/blog/wordpress/w3-total-cache/), Steve Burge
255
 
256
  **April 2011:**
@@ -260,8 +263,8 @@ Install the plugin to read the full FAQ.
260
  * [Speeding Up Your WordPress Website: 11 Ways to Improve Your Load Time](http://wpmu.org/speeding-up-your-wordpress-website-11-ways-to-improve-your-load-time/), Siobhan Ambrose
261
  * [Recipe for Baked WordPress](http://carpeaqua.com/2011/04/05/recipe-for-baked-wordpress/), Justin Williams
262
  * [WordPress + W3 Total Cache + CDN story](http://translate.google.com/translate?hl=en&sl=auto&tl=en&u=http%3A%2F%2Fblog.gaspanik.com%2Factivate-cdn-option-on-w3totalcache), Mori Masako
263
- * [SETTING UP W3 TOTAL CACHE PART 1](http://www.geekforhim.com/setting-up-w3-total-cache-part-1/), Matthew Snider
264
  * [SETTING UP W3 TOTAL CACHE PART 2](http://www.geekforhim.com/setting-up-w3-total-cache-part-2/), Matthew Snider
 
265
 
266
  **March 2011:**
267
 
@@ -439,6 +442,17 @@ Please reach out to all of these people and support their projects if you're so
439
 
440
  == Changelog ==
441
 
 
 
 
 
 
 
 
 
 
 
 
442
  = 0.9.2.1 =
443
  * Fixed bug with existing installation upgrades: set minify to manual mode by default
444
  * Fixed bug with unsuccessful transfer queue button
@@ -525,7 +539,7 @@ Please reach out to all of these people and support their projects if you're so
525
  * Fixed notification issues with preview mode
526
  * Fixed an issue with fatal errors with minify and memcache(d) caching engine
527
 
528
- = 0.9.0 =
529
  * Added preview feature so all cache settings can be reviewed prior to deployment
530
  * Added minify configuration wizard (help button on minify tab)
531
  * Added "never cache the following pages" to database and object cache
@@ -651,7 +665,7 @@ Please reach out to all of these people and support their projects if you're so
651
  * Fixed various bugs with emptying cache under various obscure permutations
652
  * Fixed bug with installations deeper than document root
653
 
654
- = 0.8.0 =
655
  * Added disk as method for page caching
656
  * Added support for mirror (origin pull) content delivery networks
657
  * Added options to specify minify group policies per template
@@ -709,13 +723,13 @@ Please reach out to all of these people and support their projects if you're so
709
  * Eliminated false negatives in a number of gzip / deflate compression analysis tools
710
  * Total plugin file size reduced
711
 
712
- = 0.7.0 =
713
  * Added minify support for URIs starting with /
714
  * WordPress network mode support bug fixes
715
  * Minor CDN uploader fixes
716
  * Minor error message improvements
717
 
718
- = 0.6.0 =
719
  * Added "Debug Mode" listing all settings and queries with statistics
720
  * Improved error message notifications
721
  * Improved cache stability for large objects
@@ -723,5 +737,5 @@ Please reach out to all of these people and support their projects if you're so
723
  * Support for multiple wordpress installations added
724
  * Resolved bug in minification of feeds
725
 
726
- = 0.5.0 =
727
  * Initial release
3
  Tags: user experience, cache, caching, page cache, css cache, js cache, db cache, disk cache, disk caching, database cache, http compression, gzip, deflate, minify, cdn, content delivery network, media library, performance, speed, multiple hosts, css, merge, combine, unobtrusive javascript, compress, optimize, optimizer, javascript, js, cascading style sheet, plugin, yslow, yui, google, google rank, google page speed, mod_pagespeed, s3, cloudfront, aws, amazon web services, cloud files, rackspace, cotendo, max cdn, limelight, cloudflare, microsoft, microsoft azure, iis, nginx, apache, varnish, xcache, apc, eacclerator, wincache, mysql, w3 total cache, batcache, wp cache, wp super cache, buddypress
4
  Requires at least: 2.8
5
  Tested up to: 3.2
6
+ Stable tag: 0.9.2.2
7
 
8
  Improve site performance and user experience via caching: browser, page, object, database, minify and content delivery network support.
9
 
35
 
36
  * Compatible with shared hosting, virtual private / dedicated servers and dedicated servers / clusters
37
  * Transparent content delivery network (CDN) integration with Media Library, theme files and WordPress itself
38
+ * Mobile support: respective caching of pages by referrer or groups of user agents including theme switching for groups of referrers or user agents
39
  * Caching of (minified and compressed) pages and posts in memory or on disk or on CDN (mirror only)
40
  * Caching of (minified and compressed) CSS and JavaScript in memory, on disk or on CDN
41
  * Caching of feeds (site, categories, tags, comments, search results) in memory or on disk or on CDN (mirror only)
45
  * Minification of posts and pages and feeds
46
  * Minification of inline, embedded or 3rd party JavaScript (with automated updates)
47
  * Minification of inline, embedded or 3rd party CSS (with automated updates)
48
+ * Browser caching using cache-control, future expire headers and entity tags (ETag) with "cache-busting"
49
  * JavaScript grouping by template (home page, post page etc) with embed location control
50
  * Non-blocking JavaScript embedding
51
  * Import post attachments directly into the Media Library (and CDN)
251
 
252
  **May 2011:**
253
 
254
+ * [Optimizing WordPress with Nginx, Varnish, APC, W3 Total Cache, and Amazon S3 (With Benchmarks)](http://danielmiessler.com/blog/optimizing-wordpress-with-nginx-varnish-w3-total-cache-amazon-s3-and-memcached), Daniel Miessler
255
+ * [Poll: Best Caching Plugin for WordPress?](http://digwp.com/2011/05/best-caching-plugin-wordpress/), Jeff Starr
256
+ * [Page Speed Online has a shiny new API](http://googlecode.blogspot.com/2011/05/page-speed-online-has-shiny-new-api.html), Andrew Oates and Richard Rabbat
257
  * [Use W3 Total Cache to Speed Up Your WordPress Site](http://www.ostraining.com/blog/wordpress/w3-total-cache/), Steve Burge
258
 
259
  **April 2011:**
263
  * [Speeding Up Your WordPress Website: 11 Ways to Improve Your Load Time](http://wpmu.org/speeding-up-your-wordpress-website-11-ways-to-improve-your-load-time/), Siobhan Ambrose
264
  * [Recipe for Baked WordPress](http://carpeaqua.com/2011/04/05/recipe-for-baked-wordpress/), Justin Williams
265
  * [WordPress + W3 Total Cache + CDN story](http://translate.google.com/translate?hl=en&sl=auto&tl=en&u=http%3A%2F%2Fblog.gaspanik.com%2Factivate-cdn-option-on-w3totalcache), Mori Masako
 
266
  * [SETTING UP W3 TOTAL CACHE PART 2](http://www.geekforhim.com/setting-up-w3-total-cache-part-2/), Matthew Snider
267
+ * [SETTING UP W3 TOTAL CACHE PART 1](http://www.geekforhim.com/setting-up-w3-total-cache-part-1/), Matthew Snider
268
 
269
  **March 2011:**
270
 
442
 
443
  == Changelog ==
444
 
445
+ = 0.9.2.2 =
446
+ * Fixed bug with minify directives, e.g.: "File param is missing," causing minify caching to fail
447
+ * Fixed bug with document root detection for IIS server
448
+ * Fixed bug with HTTP compression when using CloudFlare
449
+ * Fixed bug with HTML validation with JavaScript embed tags
450
+ * Fixed bug with fancy permalinks, sites with or without trailing slashes can now cache pages using disk enhanced
451
+ * Fixed bug with appending WP_CACHE define into wp-config.php for some users
452
+ * Fixed bug with path to JSON.php
453
+ * Fixed bug with listing of buckets error with AWS S3
454
+ * Improved compatibility with WordPress SEO by Yoast, 404 error exception list sitemap value changed to: sitemap(_index|[0-9]+)?\.xml(\.gz)?
455
+
456
  = 0.9.2.1 =
457
  * Fixed bug with existing installation upgrades: set minify to manual mode by default
458
  * Fixed bug with unsuccessful transfer queue button
539
  * Fixed notification issues with preview mode
540
  * Fixed an issue with fatal errors with minify and memcache(d) caching engine
541
 
542
+ = 0.9 =
543
  * Added preview feature so all cache settings can be reviewed prior to deployment
544
  * Added minify configuration wizard (help button on minify tab)
545
  * Added "never cache the following pages" to database and object cache
665
  * Fixed various bugs with emptying cache under various obscure permutations
666
  * Fixed bug with installations deeper than document root
667
 
668
+ = 0.8 =
669
  * Added disk as method for page caching
670
  * Added support for mirror (origin pull) content delivery networks
671
  * Added options to specify minify group policies per template
723
  * Eliminated false negatives in a number of gzip / deflate compression analysis tools
724
  * Total plugin file size reduced
725
 
726
+ = 0.7 =
727
  * Added minify support for URIs starting with /
728
  * WordPress network mode support bug fixes
729
  * Minor CDN uploader fixes
730
  * Minor error message improvements
731
 
732
+ = 0.6 =
733
  * Added "Debug Mode" listing all settings and queries with statistics
734
  * Improved error message notifications
735
  * Improved cache stability for large objects
737
  * Support for multiple wordpress installations added
738
  * Resolved bug in minification of feeds
739
 
740
+ = 0.5 =
741
  * Initial release
w3-total-cache.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
  /*
3
  Plugin Name: W3 Total Cache
4
- Description: The fastest and most complete WordPress performance plugin. Dramatically improve the speed and user experience of your site. Add browser, page, object and database caching as well as minify and content delivery network (CDN) to WordPress.
5
- Version: 0.9.2.1
6
  Plugin URI: http://www.w3-edge.com/wordpress-plugins/w3-total-cache/
7
  Author: Frederick Townes
8
  Author URI: http://www.linkedin.com/in/w3edge
1
  <?php
2
  /*
3
  Plugin Name: W3 Total Cache
4
+ Description: The highest rated and most complete WordPress performance plugin. Dramatically improve the speed and user experience of your site. Add browser, page, object and database caching as well as minify and content delivery network (CDN) to WordPress.
5
+ Version: 0.9.2.2
6
  Plugin URI: http://www.w3-edge.com/wordpress-plugins/w3-total-cache/
7
  Author: Frederick Townes
8
  Author URI: http://www.linkedin.com/in/w3edge