Autoptimize - Version 1.6.4

Version Description

  • fix for PHP notice about mfunc_functions
  • fix for strpos warnings due to empty values from the "Exclude scripts from autoptimize" configuration as reported by CandleFOREX
  • fix for broken feeds as reported by Dinata and talgalili
Download this release

Release Info

Developer futtta
Plugin Icon 128x128 Autoptimize
Version 1.6.4
Comparing to
See all releases

Code changes from version 1.6.3 to 1.6.4

autoptimize.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Autoptimize
4
  Plugin URI: http://blog.futtta.be/category/autoptimize/
5
  Description: Optimizes your website, concatenating the CSS and JavaScript code, and compressing it.
6
- Version: 1.6.3
7
  Author: Frank Goossens (futtta)
8
  Author URI: http://blog.futtta.be/
9
  Released under the GNU General Public License (GPL)
@@ -26,9 +26,8 @@ $conf = autoptimizeConfig::instance();
26
 
27
  /* Check if we're updating, in which case we need to flush the cache
28
  to avoid old versions of aggregated files lingering around */
29
- // update_option('autoptimize_version','none');
30
 
31
- $autoptimize_version="1.6.3";
32
  $autoptimize_db_version=get_option('autoptimize_version','none');
33
 
34
  if ($autoptimize_db_version !== $autoptimize_version) {
@@ -47,7 +46,7 @@ load_plugin_textdomain('autoptimize','wp-content/plugins/'.$plugin_dir.'/localiz
47
  // Set up the buffering
48
  function autoptimize_start_buffering()
49
  {
50
- // if (!is_user_logged_in()) {
51
 
52
  // Config element
53
  $conf = autoptimizeConfig::instance();
@@ -90,7 +89,7 @@ function autoptimize_start_buffering()
90
  // Now, start the real thing!
91
  ob_start('autoptimize_end_buffering');
92
 
93
- // }
94
  }
95
 
96
  //Action on end -
3
  Plugin Name: Autoptimize
4
  Plugin URI: http://blog.futtta.be/category/autoptimize/
5
  Description: Optimizes your website, concatenating the CSS and JavaScript code, and compressing it.
6
+ Version: 1.6.4
7
  Author: Frank Goossens (futtta)
8
  Author URI: http://blog.futtta.be/
9
  Released under the GNU General Public License (GPL)
26
 
27
  /* Check if we're updating, in which case we need to flush the cache
28
  to avoid old versions of aggregated files lingering around */
 
29
 
30
+ $autoptimize_version="1.6.4";
31
  $autoptimize_db_version=get_option('autoptimize_version','none');
32
 
33
  if ($autoptimize_db_version !== $autoptimize_version) {
46
  // Set up the buffering
47
  function autoptimize_start_buffering()
48
  {
49
+ if (!is_feed()) {
50
 
51
  // Config element
52
  $conf = autoptimizeConfig::instance();
89
  // Now, start the real thing!
90
  ob_start('autoptimize_end_buffering');
91
 
92
+ }
93
  }
94
 
95
  //Action on end -
classes/autoptimizeHTML.php CHANGED
@@ -32,7 +32,7 @@ class autoptimizeHTML extends autoptimizeBase
32
  $this->content = Minify_HTML::minify($this->content,$options);
33
 
34
 
35
- if ($restore_mfuncs) {
36
  $this->content = preg_replace('#%%MFUNC%%(.*)%%MFUNC%%#sie','stripslashes(base64_decode("$1"))',$this->content);
37
  }
38
 
32
  $this->content = Minify_HTML::minify($this->content,$options);
33
 
34
 
35
+ if (isset($restore_mfuncs)) {
36
  $this->content = preg_replace('#%%MFUNC%%(.*)%%MFUNC%%#sie','stripslashes(base64_decode("$1"))',$this->content);
37
  }
38
 
classes/autoptimizeScripts.php CHANGED
@@ -27,7 +27,7 @@ class autoptimizeScripts extends autoptimizeBase
27
 
28
  $excludeJS = $options['exclude'];
29
  if ($excludeJS!=="") {
30
- $exclJSArr = array_map('trim',explode(",",$excludeJS));
31
  $this->dontmove = array_merge($exclJSArr,$this->dontmove);
32
  }
33
 
27
 
28
  $excludeJS = $options['exclude'];
29
  if ($excludeJS!=="") {
30
+ $exclJSArr = array_filter(array_map('trim',explode(",",$excludeJS)));
31
  $this->dontmove = array_merge($exclJSArr,$this->dontmove);
32
  }
33
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: futtta, turl
3
  Tags: css, html, javascript, js, optimize, speed, cache, data-uri, aggregate, minimize, performance, pagespeed, booster, multisite
4
  Requires at least: 2.7
5
  Tested up to: 3.6
6
- Stable tag: 1.6.3
7
 
8
  Autoptimize speeds up your website and helps you save bandwidth by aggregating and minimizing JS and CSS.
9
 
@@ -12,7 +12,7 @@ Autoptimize speeds up your website and helps you save bandwidth by aggregating a
12
  Autoptimize makes optimizing your site really easy. It concatenates all scripts and styles, minifies and compresses them, adds expires headers, caches them, and moves styles to the page head, and scripts to the footer. It also minifies the HTML code itself, making your page really lightweight.
13
 
14
  If you consider performance important, we recommend the use of a caching-plugin such as e.g. [WP Super Cache](http://wordpress.org/extend/plugins/wp-super-cache/) or
15
- [HyperCache](http://wordpress.org/extend/plugins/hyper-cache/) as well.
16
 
17
  == Installation ==
18
 
@@ -30,6 +30,10 @@ It concatenates all scripts and styles, minifies and compresses them, adds expir
30
 
31
  Yes, most of the time, but there will always be exceptions. Although Autoptimize goes through great lengths to work with as many themes and plugins possible, there undoubtably are circumstances in which Autoptimize will not work to the full extent (full HTML, JS and CSS optimization). See "Troubleshooting" below for info on how to proceed if you encounter issues.
32
 
 
 
 
 
33
  = Compatibility with WP SlimSat =
34
 
35
  There have been reports of sightings of javascript errors when using Autoptimize together with WP SlimStat. Both [Camu (WP SlimStat developer)](http://profiles.wordpress.org/coolmann/) and I have installed both plugins on test-environments and [found no proof of such incompatibility](http://wordpress.org/support/topic/dropdown-menus-dont-work-when-slimstat-is-enabled?replies=14#post-4086894). Our common conclusion is that there are rare cases in which yet another theme or plugin's JavaScript are triggering these errors. If you do encounter JavaScript-errors when you have both WP SlimStat and Autoptimize installed, add "SlimStatParams, wp-slimstat.js" in the "Exclude scripts from autoptimize:" option on the admin-page and all should be well.
@@ -58,6 +62,11 @@ You can report problems on the [wordpress.org support forum](http://wordpress.or
58
 
59
  == Changelog ==
60
 
 
 
 
 
 
61
  = 1.6.3 =
62
  * fix for IE-hacks with javascript inside, causing javascript breakage (as seen in Sampression theme) as reported by [Takahiro of hiskip.com](http://www.hiskip.com/wp/)
63
  * fix for escaping problem of imported css causing css breakage (as seen in Sampression theme) as reported by Takahiro as well
3
  Tags: css, html, javascript, js, optimize, speed, cache, data-uri, aggregate, minimize, performance, pagespeed, booster, multisite
4
  Requires at least: 2.7
5
  Tested up to: 3.6
6
+ Stable tag: 1.6.4
7
 
8
  Autoptimize speeds up your website and helps you save bandwidth by aggregating and minimizing JS and CSS.
9
 
12
  Autoptimize makes optimizing your site really easy. It concatenates all scripts and styles, minifies and compresses them, adds expires headers, caches them, and moves styles to the page head, and scripts to the footer. It also minifies the HTML code itself, making your page really lightweight.
13
 
14
  If you consider performance important, we recommend the use of a caching-plugin such as e.g. [WP Super Cache](http://wordpress.org/extend/plugins/wp-super-cache/) or
15
+ [HyperCache](http://wordpress.org/extend/plugins/hyper-cache/).
16
 
17
  == Installation ==
18
 
30
 
31
  Yes, most of the time, but there will always be exceptions. Although Autoptimize goes through great lengths to work with as many themes and plugins possible, there undoubtably are circumstances in which Autoptimize will not work to the full extent (full HTML, JS and CSS optimization). See "Troubleshooting" below for info on how to proceed if you encounter issues.
32
 
33
+ = Does Autoptimize work with BuddyPress? =
34
+
35
+ Based on feedback received from BuddyPress users, CSS and JS-Autoptimization do not seem to work correctly, leaving you with only HTML optimizations. I will look into this in the future and am happy to take hints or code-improvements the help with BuddyPress compatibility in the mean time.
36
+
37
  = Compatibility with WP SlimSat =
38
 
39
  There have been reports of sightings of javascript errors when using Autoptimize together with WP SlimStat. Both [Camu (WP SlimStat developer)](http://profiles.wordpress.org/coolmann/) and I have installed both plugins on test-environments and [found no proof of such incompatibility](http://wordpress.org/support/topic/dropdown-menus-dont-work-when-slimstat-is-enabled?replies=14#post-4086894). Our common conclusion is that there are rare cases in which yet another theme or plugin's JavaScript are triggering these errors. If you do encounter JavaScript-errors when you have both WP SlimStat and Autoptimize installed, add "SlimStatParams, wp-slimstat.js" in the "Exclude scripts from autoptimize:" option on the admin-page and all should be well.
62
 
63
  == Changelog ==
64
 
65
+ = 1.6.4 =
66
+ * fix for PHP notice about mfunc_functions
67
+ * fix for strpos warnings due to empty values from the "Exclude scripts from autoptimize" configuration as [reported by CandleFOREX](http://wordpress.org/support/topic/empty-needle-warning)
68
+ * fix for broken feeds as [reported by Dinata and talgalili](http://wordpress.org/support/topic/feed-issue-5)
69
+
70
  = 1.6.3 =
71
  * fix for IE-hacks with javascript inside, causing javascript breakage (as seen in Sampression theme) as reported by [Takahiro of hiskip.com](http://www.hiskip.com/wp/)
72
  * fix for escaping problem of imported css causing css breakage (as seen in Sampression theme) as reported by Takahiro as well