Autoptimize - Version 1.8.5

Version Description

  • Updated to lastest version of CSS minification component
  • Improvement: for multi-sites the cache is now written to seperate directories, avoiding one site to clean out the cache for the entire installation. Code contributed by Joern Lund, kudo's Joern!!
  • Improvement: add WordPress plugin header to autoptimize_helper.php_example to make it easier to enable it as a module
  • Improvement: nonce and post_id are added to default configuration for JS exclusion
  • Improvement: explicitely exclude wp-admin from being Autoptimized
  • Bugfix: plupload.min.js, syntaxhighlighter and "adsbygoogle" are excluded from JS aggregation.
  • Bugfix: avoid double closing body-tags when Autoptimize adds JS to HTML as reported by Can
  • Bugfix: make .htaccess compatible with both Apache 2.2 and 2.4 (http://wordpress.org/support/topic/feature-request-support-generating-htaccess-files-for-apache-24?replies=3)
Download this release

Release Info

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

Code changes from version 1.8.4 to 1.8.5

autoptimize.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Autoptimize
4
  Plugin URI: http://blog.futtta.be/autoptimize
5
  Description: Optimizes your website, concatenating the CSS and JavaScript code, and compressing it.
6
- Version: 1.8.4
7
  Author: Frank Goossens (futtta)
8
  Author URI: http://blog.futtta.be/
9
  Domain Path: localization/
@@ -24,7 +24,12 @@ define('AUTOPTIMIZE_CACHE_NOGZIP',(bool) get_option('autoptimize_cache_nogzip'))
24
  include(WP_PLUGIN_DIR.'/autoptimize/classes/autoptimizeCache.php');
25
 
26
  // Plugin dir constants (plugin url's defined later to accomodate domain mapped sites)
27
- define('AUTOPTIMIZE_CACHE_DIR',WP_CONTENT_DIR.'/cache/autoptimize/');
 
 
 
 
 
28
  define('AUTOPTIMIZE_CACHE_DELAY',true);
29
  define('WP_ROOT_DIR',str_replace('/wp-content','',WP_CONTENT_DIR));
30
 
@@ -34,7 +39,7 @@ $conf = autoptimizeConfig::instance();
34
  /* Check if we're updating, in which case we might need to do stuff and flush the cache
35
  to avoid old versions of aggregated files lingering around */
36
 
37
- $autoptimize_version="1.8.4";
38
  $autoptimize_db_version=get_option('autoptimize_version','none');
39
 
40
  if ($autoptimize_db_version !== $autoptimize_version) {
@@ -140,7 +145,7 @@ function autoptimize_start_buffering() {
140
  }
141
  }
142
 
143
- if (!is_feed() && !$ao_noptimize ) {
144
 
145
  // Config element
146
  $conf = autoptimizeConfig::instance();
@@ -180,7 +185,7 @@ function autoptimize_start_buffering() {
180
  }
181
  } else {
182
  if (!class_exists('CSSmin')) {
183
- @include(WP_PLUGIN_DIR.'/autoptimize/classes/external/php/yui-php-cssmin-2.4.8-2_fgo.php');
184
  }
185
  }
186
  define('COMPRESS_CSS',false);
@@ -203,7 +208,12 @@ function autoptimize_end_buffering($content) {
203
  define('AUTOPTIMIZE_WP_SITE_URL',site_url());
204
  define('AUTOPTIMIZE_WP_CONTENT_URL',content_url());
205
  }
206
- define('AUTOPTIMIZE_CACHE_URL',AUTOPTIMIZE_WP_CONTENT_URL.'/cache/autoptimize/');
 
 
 
 
 
207
  define('AUTOPTIMIZE_WP_ROOT_URL',str_replace('/wp-content','',AUTOPTIMIZE_WP_CONTENT_URL));
208
 
209
  // Config element
3
  Plugin Name: Autoptimize
4
  Plugin URI: http://blog.futtta.be/autoptimize
5
  Description: Optimizes your website, concatenating the CSS and JavaScript code, and compressing it.
6
+ Version: 1.8.5
7
  Author: Frank Goossens (futtta)
8
  Author URI: http://blog.futtta.be/
9
  Domain Path: localization/
24
  include(WP_PLUGIN_DIR.'/autoptimize/classes/autoptimizeCache.php');
25
 
26
  // Plugin dir constants (plugin url's defined later to accomodate domain mapped sites)
27
+ if (is_multisite()) {
28
+ $blog_id = get_current_blog_id();
29
+ define('AUTOPTIMIZE_CACHE_DIR' , WP_CONTENT_DIR.'/cache/autoptimize/'.$blog_id.'/' );
30
+ } else {
31
+ define('AUTOPTIMIZE_CACHE_DIR',WP_CONTENT_DIR.'/cache/autoptimize/');
32
+ }
33
  define('AUTOPTIMIZE_CACHE_DELAY',true);
34
  define('WP_ROOT_DIR',str_replace('/wp-content','',WP_CONTENT_DIR));
35
 
39
  /* Check if we're updating, in which case we might need to do stuff and flush the cache
40
  to avoid old versions of aggregated files lingering around */
41
 
42
+ $autoptimize_version="1.8.5";
43
  $autoptimize_db_version=get_option('autoptimize_version','none');
44
 
45
  if ($autoptimize_db_version !== $autoptimize_version) {
145
  }
146
  }
147
 
148
+ if (!is_feed() && !$ao_noptimize && !is_admin()) {
149
 
150
  // Config element
151
  $conf = autoptimizeConfig::instance();
185
  }
186
  } else {
187
  if (!class_exists('CSSmin')) {
188
+ @include(WP_PLUGIN_DIR.'/autoptimize/classes/external/php/yui-php-cssmin-2.4.8-3.php');
189
  }
190
  }
191
  define('COMPRESS_CSS',false);
208
  define('AUTOPTIMIZE_WP_SITE_URL',site_url());
209
  define('AUTOPTIMIZE_WP_CONTENT_URL',content_url());
210
  }
211
+ if ( is_multisite() ) {
212
+ $blog_id = get_current_blog_id();
213
+ define('AUTOPTIMIZE_CACHE_URL' , AUTOPTIMIZE_WP_CONTENT_URL.'/cache/autoptimize/'.$blog_id.'/' );
214
+ } else {
215
+ define('AUTOPTIMIZE_CACHE_URL',AUTOPTIMIZE_WP_CONTENT_URL.'/cache/autoptimize/');
216
+ }
217
  define('AUTOPTIMIZE_WP_ROOT_URL',str_replace('/wp-content','',AUTOPTIMIZE_WP_CONTENT_URL));
218
 
219
  // Config element
autoptimize_helper.php_example CHANGED
@@ -1,4 +1,13 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
  // add_filter('autoptimize_filter_css_datauri_maxsize','my_ao_override_dataursize',10,1);
3
  function my_ao_override_dataursize($urisizeIn) {
4
  return 10000;
@@ -32,4 +41,4 @@ function my_ao_override_cssexclude($exclude) {
32
  function my_ao_override_movelast($movelast) {
33
  $movelast[]="console.log";
34
  return $movelast;
35
- }
1
  <?php
2
+ /*
3
+ Plugin Name: Autoptimize Helper
4
+ Plugin URI: http://blog.futtta.be/autoptimize
5
+ Description: Autoptimize Helper contains some helper functions to make Autoptimize even more flexible
6
+ Author: Frank Goossens (futtta)
7
+ Version: 0.1
8
+ Author URI: http://blog.futtta.be/
9
+ */
10
+
11
  // add_filter('autoptimize_filter_css_datauri_maxsize','my_ao_override_dataursize',10,1);
12
  function my_ao_override_dataursize($urisizeIn) {
13
  return 10000;
41
  function my_ao_override_movelast($movelast) {
42
  $movelast[]="console.log";
43
  return $movelast;
44
+ }
classes/autoptimizeCache.php CHANGED
@@ -176,6 +176,7 @@ class autoptimizeCache
176
  $htAccess=AUTOPTIMIZE_CACHE_DIR.'/.htaccess';
177
  if(!is_file($htAccess)) {
178
  if (is_multisite() || AUTOPTIMIZE_CACHE_NOGZIP == false) {
 
179
  @file_put_contents($htAccess,'<IfModule mod_headers.c>
180
  Header set Vary "Accept-Encoding"
181
  Header set Cache-Control "max-age=10672000, must-revalidate"
@@ -191,9 +192,17 @@ class autoptimizeCache
191
  SetOutputFilter DEFLATE
192
  </FilesMatch>
193
  </IfModule>
194
- <Files *.php>
 
 
 
 
 
 
 
195
  Allow from all
196
- </Files>');
 
197
  } else {
198
  @file_put_contents($htAccess,'<IfModule mod_headers.c>
199
  Header set Vary "Accept-Encoding"
@@ -210,9 +219,17 @@ class autoptimizeCache
210
  SetOutputFilter DEFLATE
211
  </FilesMatch>
212
  </IfModule>
213
- <Files *.php>
 
 
 
 
 
 
 
214
  Deny from all
215
- </Files>');
 
216
  }
217
  }
218
  //All OK
176
  $htAccess=AUTOPTIMIZE_CACHE_DIR.'/.htaccess';
177
  if(!is_file($htAccess)) {
178
  if (is_multisite() || AUTOPTIMIZE_CACHE_NOGZIP == false) {
179
+
180
  @file_put_contents($htAccess,'<IfModule mod_headers.c>
181
  Header set Vary "Accept-Encoding"
182
  Header set Cache-Control "max-age=10672000, must-revalidate"
192
  SetOutputFilter DEFLATE
193
  </FilesMatch>
194
  </IfModule>
195
+ <IfModule mod_authz_core.c>
196
+ <Files *.php>
197
+ Require all granted
198
+ </Files>
199
+ </IfModule>
200
+ <IfModule !mod_authz_core.c>
201
+ <Files *.php>
202
+ Order allow,deny
203
  Allow from all
204
+ </Files>
205
+ </IfModule>');
206
  } else {
207
  @file_put_contents($htAccess,'<IfModule mod_headers.c>
208
  Header set Vary "Accept-Encoding"
219
  SetOutputFilter DEFLATE
220
  </FilesMatch>
221
  </IfModule>
222
+ <IfModule mod_authz_core.c>
223
+ <Files *.php>
224
+ Require all denied
225
+ </Files>
226
+ </IfModule>
227
+ <IfModule !mod_authz_core.c>
228
+ <Files *.php>
229
+ Order deny,allow
230
  Deny from all
231
+ </Files>
232
+ </IfModule>');
233
  }
234
  }
235
  //All OK
classes/autoptimizeConfig.php CHANGED
@@ -105,7 +105,7 @@ if (get_option('autoptimize_show_adv','0')=='1') {
105
  </tr>
106
  <tr valign="top" class="hidden ao_adv">
107
  <th scope="row"><?php _e('Exclude scripts from Autoptimize:','autoptimize'); ?></th>
108
- <td><label for="autoptimize_js_exclude"><input type="text" style="width:100%;" name="autoptimize_js_exclude" value="<?php echo get_option('autoptimize_js_exclude',"s_sid,smowtion_size,sc_project,WAU_,wau_add,comment-form-quicktags,edToolbar,ch_client"); ?>"/><br />
109
  <?php _e('A comma-seperated list of scripts you want to exclude from being optimized, for example \'whatever.js, another.js\' (without the quotes) to exclude those scripts from being aggregated and minimized by Autoptimize.','autoptimize'); ?></label></td>
110
  </tr>
111
  <tr valign="top" class="hidden ao_adv">
@@ -329,7 +329,7 @@ if (get_option('autoptimize_show_adv','0')=='1') {
329
  $config = array('autoptimize_html' => 0,
330
  'autoptimize_html_keepcomments' => 0,
331
  'autoptimize_js' => 0,
332
- 'autoptimize_js_exclude' => "s_sid, smowtion_size, sc_project, WAU_, wau_add, comment-form-quicktags, edToolbar, ch_client",
333
  'autoptimize_js_trycatch' => 0,
334
  'autoptimize_js_justhead' => 0,
335
  'autoptimize_js_forcehead' => 0,
105
  </tr>
106
  <tr valign="top" class="hidden ao_adv">
107
  <th scope="row"><?php _e('Exclude scripts from Autoptimize:','autoptimize'); ?></th>
108
+ <td><label for="autoptimize_js_exclude"><input type="text" style="width:100%;" name="autoptimize_js_exclude" value="<?php echo get_option('autoptimize_js_exclude',"s_sid,smowtion_size,sc_project,WAU_,wau_add,comment-form-quicktags,edToolbar,ch_client,nonce,post_id"); ?>"/><br />
109
  <?php _e('A comma-seperated list of scripts you want to exclude from being optimized, for example \'whatever.js, another.js\' (without the quotes) to exclude those scripts from being aggregated and minimized by Autoptimize.','autoptimize'); ?></label></td>
110
  </tr>
111
  <tr valign="top" class="hidden ao_adv">
329
  $config = array('autoptimize_html' => 0,
330
  'autoptimize_html_keepcomments' => 0,
331
  'autoptimize_js' => 0,
332
+ 'autoptimize_js_exclude' => "s_sid, smowtion_size, sc_project, WAU_, wau_add, comment-form-quicktags, edToolbar, ch_client, nonce, post_id",
333
  'autoptimize_js_trycatch' => 0,
334
  'autoptimize_js_justhead' => 0,
335
  'autoptimize_js_forcehead' => 0,
classes/autoptimizeScripts.php CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
  class autoptimizeScripts extends autoptimizeBase
5
  {
6
  private $scripts = array();
7
- private $dontmove = array('document.write','html5.js','show_ads.js','google_ad','blogcatalog.com/w','tweetmeme.com/i','mybloglog.com/','histats.com/js','ads.smowtion.com/ad.js','statcounter.com/counter/counter.js','widgets.amung.us','ws.amazon.com/widgets','media.fastclick.net','/ads/','comment-form-quicktags/quicktags.php','edToolbar','intensedebate.com','scripts.chitika.net/','_gaq.push','jotform.com/','admin-bar.min.js');
8
  private $domove = array('gaJsHost','load_cmc','jd.gallery.transitions.js','swfobject.embedSWF(','tiny_mce.js','tinyMCEPreInit.go');
9
  private $domovelast = array('addthis.com','/afsonline/show_afs_search.js','disqus.js','networkedblogs.com/getnetworkwidget','infolinks.com/js/','jd.gallery.js.php','jd.gallery.transitions.js','swfobject.embedSWF(','linkwithin.com/widget.js','tiny_mce.js','tinyMCEPreInit.go');
10
  private $trycatch = false;
@@ -219,10 +219,10 @@ class autoptimizeScripts extends autoptimizeBase
219
 
220
  $bodyreplacement = implode('',$this->move['first']);
221
  $bodyreplacement .= '<script type="text/javascript" '.$defer.'src="'.$this->url.'"></script>';
222
- $bodyreplacement .= implode('',$this->move['last']).$replaceTag;
223
 
224
  if (strpos($this->content,$replaceTag)!== false) {
225
- $this->content = str_replace($replaceTag,$bodyreplacement,$this->content);
226
  } else {
227
  $this->content .= $bodyreplacement;
228
  $this->warn_html();
4
  class autoptimizeScripts extends autoptimizeBase
5
  {
6
  private $scripts = array();
7
+ private $dontmove = array('document.write','html5.js','show_ads.js','google_ad','blogcatalog.com/w','tweetmeme.com/i','mybloglog.com/','histats.com/js','ads.smowtion.com/ad.js','statcounter.com/counter/counter.js','widgets.amung.us','ws.amazon.com/widgets','media.fastclick.net','/ads/','comment-form-quicktags/quicktags.php','edToolbar','intensedebate.com','scripts.chitika.net/','_gaq.push','jotform.com/','admin-bar.min.js','GoogleAnalyticsObject','plupload.full.min.js','syntaxhighlighter3/scripts','adsbygoogle');
8
  private $domove = array('gaJsHost','load_cmc','jd.gallery.transitions.js','swfobject.embedSWF(','tiny_mce.js','tinyMCEPreInit.go');
9
  private $domovelast = array('addthis.com','/afsonline/show_afs_search.js','disqus.js','networkedblogs.com/getnetworkwidget','infolinks.com/js/','jd.gallery.js.php','jd.gallery.transitions.js','swfobject.embedSWF(','linkwithin.com/widget.js','tiny_mce.js','tinyMCEPreInit.go');
10
  private $trycatch = false;
219
 
220
  $bodyreplacement = implode('',$this->move['first']);
221
  $bodyreplacement .= '<script type="text/javascript" '.$defer.'src="'.$this->url.'"></script>';
222
+ $bodyreplacement .= implode('',$this->move['last']);
223
 
224
  if (strpos($this->content,$replaceTag)!== false) {
225
+ $this->content = str_replace($replaceTag,$bodyreplacement.$replaceTag,$this->content);
226
  } else {
227
  $this->content .= $bodyreplacement;
228
  $this->warn_html();
classes/external/php/{yui-php-cssmin-2.4.8-2.php → yui-php-cssmin-2.4.8-3.php} RENAMED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  /*!
4
- * cssmin.php 2.4.8-2
5
  * Author: Tubal Martin - http://tubalmartin.me/
6
  * Repo: https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port
7
  *
@@ -107,7 +107,7 @@ class CSSmin
107
  $l = strlen($css);
108
 
109
 
110
- // if the number of characters is 25000 or less, do not chunk
111
  if ($l <= $css_chunk_length) {
112
  $css_chunks[] = $css;
113
  } else {
@@ -291,7 +291,7 @@ class CSSmin
291
  // Remove the spaces before the things that should not have spaces before them.
292
  // But, be careful not to turn "p :link {...}" into "p:link{...}"
293
  // Swap out any pseudo-class colons with the token, and then swap back.
294
- $css = preg_replace_callback('/(?:^|\})(?:(?:[^\{\:])+\:)+(?:[^\{]*\{)/', array($this, 'replace_colon'), $css);
295
 
296
  // Remove spaces before the things that should not have spaces before them.
297
  $css = preg_replace('/\s+([\!\{\}\;\:\>\+\(\)\]\~\=,])/', '$1', $css);
@@ -336,8 +336,10 @@ class CSSmin
336
  // to avoid issues on Symbian S60 3.x browsers.
337
  $css = preg_replace('/(\*[a-z0-9\-]+\s*\:[^;\}]+)(\})/', '$1;$2', $css);
338
 
339
- // Replace 0 length units 0(px,em,%) with 0.
340
- $css = preg_replace('/(^|[^0-9])(?:0?\.)?0(?:em|ex|ch|rem|vw|vh|vm|vmin|cm|mm|in|px|pt|pc|%|deg|g?rad|m?s|k?hz)/iS', '${1}0', $css);
 
 
341
 
342
  // 0% step in a keyframe? restore the % unit
343
  $css = preg_replace_callback('/(@[a-z\-]*?keyframes[^\{]*?\{)(.*?\}\s*\})/iS', array($this, 'replace_keyframe_zero'), $css);
@@ -772,4 +774,4 @@ class CSSmin
772
 
773
  return (int) $size;
774
  }
775
- }
1
  <?php
2
 
3
  /*!
4
+ * cssmin.php 2.4.8-3
5
  * Author: Tubal Martin - http://tubalmartin.me/
6
  * Repo: https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port
7
  *
107
  $l = strlen($css);
108
 
109
 
110
+ // if the number of characters is 5000 or less, do not chunk
111
  if ($l <= $css_chunk_length) {
112
  $css_chunks[] = $css;
113
  } else {
291
  // Remove the spaces before the things that should not have spaces before them.
292
  // But, be careful not to turn "p :link {...}" into "p:link{...}"
293
  // Swap out any pseudo-class colons with the token, and then swap back.
294
+ $css = preg_replace_callback('/(?:^|\})[^\{]*\s+\:/', array($this, 'replace_colon'), $css);
295
 
296
  // Remove spaces before the things that should not have spaces before them.
297
  $css = preg_replace('/\s+([\!\{\}\;\:\>\+\(\)\]\~\=,])/', '$1', $css);
336
  // to avoid issues on Symbian S60 3.x browsers.
337
  $css = preg_replace('/(\*[a-z0-9\-]+\s*\:[^;\}]+)(\})/', '$1;$2', $css);
338
 
339
+ // Replace 0 <length> and 0 <percentage> values with 0.
340
+ // <length> data type: https://developer.mozilla.org/en-US/docs/Web/CSS/length
341
+ // <percentage> data type: https://developer.mozilla.org/en-US/docs/Web/CSS/percentage
342
+ $css = preg_replace('/([^\\\\]\:|\s)0(?:em|ex|ch|rem|vw|vh|vm|vmin|cm|mm|in|px|pt|pc|%)/iS', '${1}0', $css);
343
 
344
  // 0% step in a keyframe? restore the % unit
345
  $css = preg_replace_callback('/(@[a-z\-]*?keyframes[^\{]*?\{)(.*?\}\s*\})/iS', array($this, 'replace_keyframe_zero'), $css);
774
 
775
  return (int) $size;
776
  }
777
+ }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: futtta, turl
3
  Tags: css, html, javascript, js, optimize, speed, cache, data-uri, aggregate, minimize, minification, performance, pagespeed, booster, multisite
4
  Donate link: http://blog.futtta.be/2013/10/21/do-not-donate-to-me/
5
  Requires at least: 2.7
6
- Tested up to: 3.9
7
- Stable tag: 1.8.4
8
 
9
  Autoptimize speeds up your website and helps you save bandwidth by aggregating and minimizing JS, CSS and HTML.
10
 
@@ -31,7 +31,7 @@ It concatenates all scripts and styles, minifies and compresses them, adds expir
31
 
32
  = Will this work with my blog? =
33
 
34
- 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.
35
 
36
  = What is the use of deferring CSS? =
37
 
@@ -95,7 +95,7 @@ After having installed and activated the plugin, you'll have access to an admin
95
  If your blog doesn't function normally after having turned on Autoptimize, here are some pointers to identify & solve such issues using "advanced settings":
96
 
97
  * In case your blog looks weird, i.e. when the layout gets messed up, there is problem with CSS optimization. In this case you can turn on the option "Look for styles on just head?" and see if that solves the problem. You can also force CSS not to be aggregated by wrapping it in noptimize-tags in your theme or widget or by adding filename (for external stylesheets) or string (for inline styles) to the exclude-list.
98
- * In case some functionality on your site stops working (a carroussel, a menu, the search input, ...) you're likely hitting JavaScript optimization trouble. Enable the option "Look for scripts only in head?" and/or "Force JavaScript in <head>?" and try again. Alternatively -for the technically savvy- you can exclude specific scripts from being treated (moved and/ or aggregated) by Autoptimize by adding a string that will match the offending Javascript or excluding it from within your template files or widgets by wrapping the code between noptimize-tags. Identifying the offending JavaScript and choosing the correct exclusion-string can be trial and error, but in the majority of cases JavaScript optimization issues can be solved this way.
99
  * If your theme uses jQuery, you can try either forcing all in head or excluding jquery(-min).js (and jQuery-plugins if needed).
100
  * If you can't get either CSS or JS optimization working, you can off course always continue using the other two optimization-techniques.
101
  * If you tried the troubleshooting tips above and you still can't get CSS and JS working at all, you can ask for support on the [WordPress Autoptimize support forum](http://wordpress.org/support/plugin/autoptimize). See below for a description of what information you should provide in your "trouble ticket"
@@ -123,8 +123,23 @@ You can report problems on the [wordpress.org support forum](http://wordpress.or
123
  * the Theme used (including the Theme's download link)
124
  * optionally plugins used (if you suspect one or more plugins are raising havoc)
125
 
 
 
 
 
 
126
  == Changelog ==
127
 
 
 
 
 
 
 
 
 
 
 
128
  = 1.8.4 =
129
  * Bugfix: code in inline JS (or CSS) can be wrapped inside HTML-comments, but these got removed since 1.8.2 as part of a bugfix.
130
 
3
  Tags: css, html, javascript, js, optimize, speed, cache, data-uri, aggregate, minimize, minification, performance, pagespeed, booster, multisite
4
  Donate link: http://blog.futtta.be/2013/10/21/do-not-donate-to-me/
5
  Requires at least: 2.7
6
+ Tested up to: 3.9.1
7
+ Stable tag: 1.8.5
8
 
9
  Autoptimize speeds up your website and helps you save bandwidth by aggregating and minimizing JS, CSS and HTML.
10
 
31
 
32
  = Will this work with my blog? =
33
 
34
+ Although Autoptimize comes without any warranties, it will in general work flawlessly if you configure it correctly. See "Troubleshooting" below for info on how to configure in case of problems.
35
 
36
  = What is the use of deferring CSS? =
37
 
95
  If your blog doesn't function normally after having turned on Autoptimize, here are some pointers to identify & solve such issues using "advanced settings":
96
 
97
  * In case your blog looks weird, i.e. when the layout gets messed up, there is problem with CSS optimization. In this case you can turn on the option "Look for styles on just head?" and see if that solves the problem. You can also force CSS not to be aggregated by wrapping it in noptimize-tags in your theme or widget or by adding filename (for external stylesheets) or string (for inline styles) to the exclude-list.
98
+ * In case some functionality on your site stops working (a carroussel, a menu, the search input, ...) you're likely hitting JavaScript optimization trouble. Enable the option "Look for scripts only in head?" and/or "Force JavaScript in <head>?" and/or "Add try/catch wrapping" and try again. Alternatively -for the technically savvy- you can exclude specific scripts from being treated (moved and/ or aggregated) by Autoptimize by adding a string that will match the offending Javascript or excluding it from within your template files or widgets by wrapping the code between noptimize-tags. Identifying the offending JavaScript and choosing the correct exclusion-string can be trial and error, but in the majority of cases JavaScript optimization issues can be solved this way.
99
  * If your theme uses jQuery, you can try either forcing all in head or excluding jquery(-min).js (and jQuery-plugins if needed).
100
  * If you can't get either CSS or JS optimization working, you can off course always continue using the other two optimization-techniques.
101
  * If you tried the troubleshooting tips above and you still can't get CSS and JS working at all, you can ask for support on the [WordPress Autoptimize support forum](http://wordpress.org/support/plugin/autoptimize). See below for a description of what information you should provide in your "trouble ticket"
123
  * the Theme used (including the Theme's download link)
124
  * optionally plugins used (if you suspect one or more plugins are raising havoc)
125
 
126
+ = I want out, how should I remove Autoptimize? =
127
+ * Disable the plugin (this will remove options and cache)
128
+ * Remove the plugin
129
+ * Clear any cache that might still have pages which reference Autoptimized CSS/JS (e.g. of a page caching plugin such as WP Super Cache)
130
+
131
  == Changelog ==
132
 
133
+ = 1.8.5 =
134
+ * Updated to lastest version of [CSS minification component](https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/)
135
+ * Improvement: for multi-sites the cache is now written to seperate directories, avoiding one site to clean out the cache for the entire installation. Code [contributed by Joern Lund](http://wordpress.org/support/topic/multisite-blog-admin-can-delete-entire-network-cache), kudo's Joern!!
136
+ * Improvement: add WordPress plugin header to autoptimize_helper.php_example to make it easier to enable it as a module
137
+ * Improvement: nonce and post_id are added to default configuration for JS exclusion
138
+ * Improvement: explicitely exclude wp-admin from being Autoptimized
139
+ * Bugfix: plupload.min.js, syntaxhighlighter and "adsbygoogle" are excluded from JS aggregation.
140
+ * Bugfix: avoid double closing body-tags when Autoptimize adds JS to HTML as [reported by Can](http://wordpress.org/support/topic/works-like-a-charm-but-i-have-two-problems)
141
+ * Bugfix: make .htaccess compatible with both Apache 2.2 and 2.4 (http://wordpress.org/support/topic/feature-request-support-generating-htaccess-files-for-apache-24?replies=3)
142
+
143
  = 1.8.4 =
144
  * Bugfix: code in inline JS (or CSS) can be wrapped inside HTML-comments, but these got removed since 1.8.2 as part of a bugfix.
145