W3 Total Cache - Version 0.9.2.1

Version Description

  • Fixed bug with existing installation upgrades: set minify to manual mode by default
  • Fixed bug with unsuccessful transfer queue button
  • Fixed bug with background in lightbox
  • Fixed bug with handling of local http requests being blocked on some hosts
  • Disabled CDN for minify files when auto mode is selected and the CDN method is origin push
Download this release

Release Info

Developer fredericktownes
Plugin Icon 128x128 W3 Total Cache
Version 0.9.2.1
Comparing to
See all releases

Code changes from version 0.9.2 to 0.9.2.1

inc/css/lightbox.css CHANGED
@@ -31,35 +31,6 @@
31
  height: 475px;
32
  }
33
 
34
- .minify-files li {
35
- padding: 2px;
36
- cursor: ns-resize;
37
- list-style: none;
38
- }
39
-
40
- .minify-files li:hover {
41
- background: #f9f9f9;
42
- }
43
-
44
- .minify-files th, .minify-files td {
45
- line-height: normal;
46
- border: 0;
47
- padding: 0;
48
- margin: 0;
49
- }
50
-
51
- .minify-files th {
52
- width: auto;
53
- color: #aaa !important;
54
- font-size: 10px;
55
- font-weight: normal;
56
- text-align: left;
57
- }
58
-
59
- .minify-files td {
60
- font-size: 13px;
61
- }
62
-
63
  th.minify-files-add, td.minify-files-add {
64
  width: 40px;
65
  text-align: center;
@@ -82,4 +53,4 @@ th.minify-files-add, td.minify-files-add {
82
  font-size: 0.8em;
83
  font-style: italic;
84
  color: #999;
85
- }
31
  height: 475px;
32
  }
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  th.minify-files-add, td.minify-files-add {
35
  width: 40px;
36
  text-align: center;
53
  font-size: 0.8em;
54
  font-style: italic;
55
  color: #999;
56
+ }
inc/css/options.css CHANGED
@@ -234,6 +234,34 @@
234
  background: none;
235
  }
236
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  #support_loading {
238
  height: 32px;
239
  background: url(../images/loader.gif) left center no-repeat;
234
  background: none;
235
  }
236
 
237
+ .minify-files {
238
+ margin-bottom: 1em;
239
+ }
240
+
241
+ .minify-files li {
242
+ padding: 2px;
243
+ list-style: none;
244
+ background: #f9f9f9;
245
+ cursor: ns-resize;
246
+ border-radius: 8px;
247
+ -webkit-border-radius: 8px;
248
+ -moz-border-radius: 8px;
249
+ line-height: 100%;
250
+ }
251
+
252
+ .minify-files li:hover {
253
+ background: #f3f3f3;
254
+ }
255
+
256
+ .minify-files th,
257
+ .minify-files td {
258
+ width: auto;
259
+ line-height: 100%;
260
+ padding: 3px 5px;
261
+ font-weight: normal;
262
+ text-align: left;
263
+ }
264
+
265
  #support_loading {
266
  height: 32px;
267
  background: url(../images/loader.gif) left center no-repeat;
inc/define.php CHANGED
@@ -728,6 +728,19 @@ function w3_get_site_url() {
728
  return $site_url;
729
  }
730
 
 
 
 
 
 
 
 
 
 
 
 
 
 
731
  /**
732
  * Returns absolute path to document root
733
  *
728
  return $site_url;
729
  }
730
 
731
+ /**
732
+ * Returns SSL site URL
733
+ *
734
+ * @return string
735
+ */
736
+ function w3_get_site_url_ssl() {
737
+ $site_url = w3_get_site_url();
738
+ $ssl = w3_get_url_ssl($site_url);
739
+
740
+ return $ssl;
741
+
742
+ }
743
+
744
  /**
745
  * Returns absolute path to document root
746
  *
inc/options/cdn.phtml CHANGED
@@ -68,13 +68,13 @@
68
  </tr>
69
  <tr>
70
  <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
71
- <input type="hidden" name="cdn.minify.enable" value="0"<?php if (! W3TC_PHP5 || ! $minify_enabled || ! $this->_config->get_boolean('minify.rewrite')): ?> disabled="disabled"<?php endif; ?> />
72
- <label><input type="checkbox" name="cdn.minify.enable" value="1"<?php checked($this->_config->get_boolean('cdn.minify.enable'), true); ?><?php if (! W3TC_PHP5 || ! $minify_enabled || ! $this->_config->get_boolean('minify.rewrite')): ?> disabled="disabled"<?php endif; ?> /> Host minified <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym> files</label><br />
73
  <span class="description">If checked, minified <acronym>CSS</acronym> and <acronym>JS</acronym> files will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.</span>
74
  </th>
75
  <?php if (! $cdn_mirror): ?>
76
  <td>
77
- <input class="button cdn_export" type="button" name="minify" value="Upload minify files"<?php if (! W3TC_PHP5 || ! $minify_enabled || ! $this->_config->get_boolean('minify.rewrite')): ?> disabled="disabled"<?php endif; ?> />
78
  </td>
79
  <?php endif; ?>
80
  </tr>
68
  </tr>
69
  <tr>
70
  <th<?php if ($cdn_mirror): ?> colspan="2"<?php endif; ?>>
71
+ <input type="hidden" name="cdn.minify.enable" value="0"<?php if (!$minify_enabled): ?> disabled="disabled"<?php endif; ?> />
72
+ <label><input type="checkbox" name="cdn.minify.enable" value="1"<?php checked($this->_config->get_boolean('cdn.minify.enable'), true); ?><?php if (!$minify_enabled): ?> disabled="disabled"<?php endif; ?> /> Host minified <acronym title="Cascading Style Sheet">CSS</acronym> and <acronym title="JavaScript">JS</acronym> files</label><br />
73
  <span class="description">If checked, minified <acronym>CSS</acronym> and <acronym>JS</acronym> files will be hosted with the <acronym title="Content Delivery Network">CDN</acronym>.</span>
74
  </th>
75
  <?php if (! $cdn_mirror): ?>
76
  <td>
77
+ <input class="button cdn_export" type="button" name="minify" value="Upload minify files"<?php if (!$minify_enabled): ?> disabled="disabled"<?php endif; ?> />
78
  </td>
79
  <?php endif; ?>
80
  </tr>
lib/W3/Config.php CHANGED
@@ -1007,7 +1007,7 @@ class W3_Config {
1007
  * Disable CDN minify when PHP5 is not installed or minify is disabled
1008
  */
1009
  case 'cdn.minify.enable':
1010
- if (!W3TC_PHP5 || !$this->get_boolean('minify.rewrite')) {
1011
  return false;
1012
  }
1013
  break;
1007
  * Disable CDN minify when PHP5 is not installed or minify is disabled
1008
  */
1009
  case 'cdn.minify.enable':
1010
+ if (!W3TC_PHP5 || !$this->get_boolean('minify.rewrite') || ($this->get_boolean('minify.auto') && !w3_is_cdn_mirror($this->get_string('cdn.engine')))) {
1011
  return false;
1012
  }
1013
  break;
lib/W3/Plugin/Cdn.php CHANGED
@@ -1375,7 +1375,7 @@ class W3_Plugin_Cdn extends W3_Plugin {
1375
  function get_files_minify() {
1376
  $files = array();
1377
 
1378
- if (W3TC_PHP5 && $this->_config->get_boolean('minify.rewrite')) {
1379
  require_once W3TC_LIB_W3_DIR . '/Plugin/Minify.php';
1380
  $minify = & W3_Plugin_Minify::instance();
1381
 
1375
  function get_files_minify() {
1376
  $files = array();
1377
 
1378
+ if (W3TC_PHP5 && $this->_config->get_boolean('minify.rewrite') && (!$this->_config->get_boolean('minify.auto') || w3_is_cdn_mirror($this->_config->get_string('cdn.engine')))) {
1379
  require_once W3TC_LIB_W3_DIR . '/Plugin/Minify.php';
1380
  $minify = & W3_Plugin_Minify::instance();
1381
 
lib/W3/Plugin/Minify.php CHANGED
@@ -740,12 +740,12 @@ class W3_Plugin_Minify extends W3_Plugin {
740
 
741
  $id = $w3_minify->get_id_group($theme, $template, $location, $type);
742
 
743
- $home_url_ssl = w3_get_home_url_ssl();
744
 
745
  if ($this->_config->get_boolean('minify.rewrite')) {
746
- $url = sprintf('%s/%s/%s/%s.%s.%d.%s', $home_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', $home_url_ssl, W3TC_CONTENT_MINIFY_DIR_NAME, $theme, $template, $location, $type, $id);
749
  }
750
 
751
  return $url;
@@ -766,12 +766,12 @@ class W3_Plugin_Minify extends W3_Plugin {
766
  $hash = $w3_minify->get_custom_files_hash($files);
767
  $id = $w3_minify->get_id_custom($hash, $type);
768
 
769
- $home_url_ssl = w3_get_home_url_ssl();
770
 
771
  if ($this->_config->get_boolean('minify.rewrite')) {
772
- $url = sprintf('%s/%s/%s.%d.%s', $home_url_ssl, W3TC_CONTENT_MINIFY_DIR_NAME, $hash, $id, $type);
773
  } else {
774
- $url = sprintf('%s/%s/?h=%s&t=%s&m=%s', $home_url_ssl, W3TC_CONTENT_MINIFY_DIR_NAME, $hash, $type, $id);
775
  }
776
 
777
  return $url;
740
 
741
  $id = $w3_minify->get_id_group($theme, $template, $location, $type);
742
 
743
+ $site_url_ssl = w3_get_site_url_ssl();
744
 
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;
766
  $hash = $w3_minify->get_custom_files_hash($files);
767
  $id = $w3_minify->get_id_custom($hash, $type);
768
 
769
+ $site_url_ssl = w3_get_site_url_ssl();
770
 
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;
lib/W3/Plugin/TotalCache.php CHANGED
@@ -1155,8 +1155,7 @@ class W3_Plugin_TotalCache extends W3_Plugin {
1155
  */
1156
  function admin_print_styles() {
1157
  wp_enqueue_style('w3tc-options');
1158
-
1159
- ('w3tc-lightbox');
1160
  }
1161
 
1162
  /**
@@ -1382,7 +1381,7 @@ class W3_Plugin_TotalCache extends W3_Plugin {
1382
  * Show notification if upload queue is not empty
1383
  */
1384
  if (!$this->is_queue_empty()) {
1385
- $errors[] = 'The <input id="cdn_queue" class="button" type="button" value="unsuccessful transfer queue" /> has unresolved errors. Empty the queue to restore normal operation.';
1386
  }
1387
  }
1388
 
@@ -2275,7 +2274,7 @@ class W3_Plugin_TotalCache extends W3_Plugin {
2275
  $cdn_engine = $this->_config->get_string('cdn.engine');
2276
  $cdn_mirror = w3_is_cdn_mirror($cdn_engine);
2277
 
2278
- $minify_enabled = $this->_config->get_boolean('minify.enabled');
2279
 
2280
  $cookie_domain = $this->get_cookie_domain();
2281
  $set_cookie_domain = $this->is_cookie_domain_enabled();
@@ -4732,9 +4731,16 @@ class W3_Plugin_TotalCache extends W3_Plugin {
4732
 
4733
  if ($result === false) {
4734
  $data = w3_http_get($url);
4735
- $result = (int) ($data == 'OK');
4736
 
4737
- set_transient($key, $result, 30);
 
 
 
 
 
 
 
 
4738
  }
4739
 
4740
  return $result;
1155
  */
1156
  function admin_print_styles() {
1157
  wp_enqueue_style('w3tc-options');
1158
+ wp_enqueue_style('w3tc-lightbox');
 
1159
  }
1160
 
1161
  /**
1381
  * Show notification if upload queue is not empty
1382
  */
1383
  if (!$this->is_queue_empty()) {
1384
+ $errors[] = sprintf('The %s has unresolved errors. Empty the queue to restore normal operation.', $this->button_popup('unsuccessful transfer queue', 'cdn_queue'));
1385
  }
1386
  }
1387
 
2274
  $cdn_engine = $this->_config->get_string('cdn.engine');
2275
  $cdn_mirror = w3_is_cdn_mirror($cdn_engine);
2276
 
2277
+ $minify_enabled = (W3TC_PHP5 && $this->_config->get_boolean('minify.enabled') && $this->_config->get_boolean('minify.rewrite') && (!$this->_config->get_boolean('minify.auto') || w3_is_cdn_mirror($this->_config->get_string('cdn.engine'))));
2278
 
2279
  $cookie_domain = $this->get_cookie_domain();
2280
  $set_cookie_domain = $this->is_cookie_domain_enabled();
4731
 
4732
  if ($result === false) {
4733
  $data = w3_http_get($url);
 
4734
 
4735
+ if ($data !== false) {
4736
+ $result = ($data == 'OK');
4737
+ } else {
4738
+ $result = true;
4739
+ }
4740
+
4741
+ if ($result) {
4742
+ set_transient($key, $result, 30);
4743
+ }
4744
  }
4745
 
4746
  return $result;
readme.txt CHANGED
@@ -3,9 +3,9 @@ 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
7
 
8
- Improve WordPress' performance and user experience of your site via caching: browser, page, object, database, minify and content delivery network.
9
 
10
  == Description ==
11
 
@@ -13,7 +13,7 @@ The **most complete** WordPress performance framework.
13
 
14
  Recommended by web hosts like: MediaTemple, Host Gator, Page.ly and WP Engine and countless more.
15
 
16
- Trusted by countless sites like: mattcutts.com, mashable.com, smashingmagazine.com, makeuseof.com, yoast.com, kiss925.com, pearsonified.com, lockergnome.com, johnchow.com, ilovetypography.com, webdesignerdepot.com, css-tricks.com and thousands of others
17
 
18
  W3 Total Cache improves the user experience of your site by improving your server performance, caching every aspect of your site, reducing the download times and providing transparent content delivery network (CDN) integration.
19
 
@@ -255,6 +255,7 @@ Install the plugin to read the full FAQ.
255
 
256
  **April 2011:**
257
 
 
258
  * [How To Configure The Various W3TC Plugin Settings For Your WordPress Blog](http://www.makeuseof.com/tag/configure-w3tc-plugin-wordpress/), James Bruce
259
  * [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
260
  * [Recipe for Baked WordPress](http://carpeaqua.com/2011/04/05/recipe-for-baked-wordpress/), Justin Williams
@@ -438,6 +439,13 @@ Please reach out to all of these people and support their projects if you're so
438
 
439
  == Changelog ==
440
 
 
 
 
 
 
 
 
441
  = 0.9.2 =
442
  * Added support for nginx web server
443
  * Added support for CloudFlare
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
 
10
  == Description ==
11
 
13
 
14
  Recommended by web hosts like: MediaTemple, Host Gator, Page.ly and WP Engine and countless more.
15
 
16
+ Trusted by countless sites like: mattcutts.com, mashable.com, smashingmagazine.com, makeuseof.com, yoast.com, kiss925.com, pearsonified.com, lockergnome.com, johnchow.com, ilovetypography.com, webdesignerdepot.com, css-tricks.com and tens of thousands of others.
17
 
18
  W3 Total Cache improves the user experience of your site by improving your server performance, caching every aspect of your site, reducing the download times and providing transparent content delivery network (CDN) integration.
19
 
255
 
256
  **April 2011:**
257
 
258
+ * [Setting Up and Optimizing W3 Total Cache](http://tentblogger.com/w3-total-cache/), John Saddington
259
  * [How To Configure The Various W3TC Plugin Settings For Your WordPress Blog](http://www.makeuseof.com/tag/configure-w3tc-plugin-wordpress/), James Bruce
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
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
445
+ * Fixed bug with background in lightbox
446
+ * Fixed bug with handling of local http requests being blocked on some hosts
447
+ * Disabled CDN for minify files when auto mode is selected and the CDN method is origin push
448
+
449
  = 0.9.2 =
450
  * Added support for nginx web server
451
  * Added support for CloudFlare
w3-total-cache.php CHANGED
@@ -2,7 +2,7 @@
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
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
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