Version Description
- hard-exclude the sidelink-search-box introduced in WP SEO v1.6 from JS optimization (this broke some JS-optimization badly)
- bugfix: first add semi-colon to inline script, only then add try-catch if required instead of the other way around.
Download this release
Release Info
Developer | futtta |
Plugin | Autoptimize |
Version | 1.9.1 |
Comparing to | |
See all releases |
Code changes from version 1.9.0 to 1.9.1
- autoptimize.php +2 -2
- classes/autoptimizeScripts.php +3 -2
- readme.txt +6 -6
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.9.
|
7 |
Author: Frank Goossens (futtta)
|
8 |
Author URI: http://blog.futtta.be/
|
9 |
Domain Path: localization/
|
@@ -39,7 +39,7 @@ $conf = autoptimizeConfig::instance();
|
|
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.9.
|
43 |
$autoptimize_db_version=get_option('autoptimize_version','none');
|
44 |
|
45 |
if ($autoptimize_db_version !== $autoptimize_version) {
|
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.9.1
|
7 |
Author: Frank Goossens (futtta)
|
8 |
Author URI: http://blog.futtta.be/
|
9 |
Domain Path: localization/
|
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.9.1";
|
43 |
$autoptimize_db_version=get_option('autoptimize_version','none');
|
44 |
|
45 |
if ($autoptimize_db_version !== $autoptimize_version) {
|
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','GoogleAnalyticsObject','plupload.full.min.js','syntaxhighlighter','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;
|
@@ -139,11 +139,12 @@ class autoptimizeScripts extends autoptimizeBase
|
|
139 |
if(preg_match('#^INLINE;#',$script)) {
|
140 |
//Inline script
|
141 |
$script = preg_replace('#^INLINE;#','',$script);
|
|
|
142 |
//Add try-catch?
|
143 |
if($this->trycatch) {
|
144 |
$script = 'try{'.$script.'}catch(e){}';
|
145 |
}
|
146 |
-
$this->jscode .= "\n" .
|
147 |
} else {
|
148 |
//External script
|
149 |
if($script !== false && file_exists($script) && is_readable($script)) {
|
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','syntaxhighlighter','adsbygoogle','potentialAction');
|
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;
|
139 |
if(preg_match('#^INLINE;#',$script)) {
|
140 |
//Inline script
|
141 |
$script = preg_replace('#^INLINE;#','',$script);
|
142 |
+
$script = rtrim( $script, ";\n\t\r" ) . ';';
|
143 |
//Add try-catch?
|
144 |
if($this->trycatch) {
|
145 |
$script = 'try{'.$script.'}catch(e){}';
|
146 |
}
|
147 |
+
$this->jscode .= "\n" . $script;
|
148 |
} else {
|
149 |
//External script
|
150 |
if($script !== false && file_exists($script) && is_readable($script)) {
|
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: 4.
|
7 |
-
Stable tag: 1.9.
|
8 |
|
9 |
Autoptimize speeds up your website and helps you save bandwidth by aggregating and minimizing JS, CSS and HTML.
|
10 |
|
@@ -101,10 +101,6 @@ If your blog doesn't function normally after having turned on Autoptimize, here
|
|
101 |
* If you can't get either CSS or JS optimization working, you can off course always continue using the other two optimization-techniques.
|
102 |
* 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"
|
103 |
|
104 |
-
= How does "Exclude from autoptimize" work? =
|
105 |
-
|
106 |
-
You can exclude both JS and CSS from being processed by Autoptimize by using the appropriate settings in the admin-screen. If you want to exclude an external file from being Autoptimized, add the filename (e.g. jquery.js). If you want to exclude inline CSS or JS, add a (unique) string that is in that block of code.
|
107 |
-
|
108 |
= What is noptimize? =
|
109 |
|
110 |
Starting with version 1.6.6 Autoptimize excludes everything inside noptimize tags, e.g.:
|
@@ -131,6 +127,10 @@ You can report problems on the [wordpress.org support forum](http://wordpress.or
|
|
131 |
|
132 |
== Changelog ==
|
133 |
|
|
|
|
|
|
|
|
|
134 |
= 1.9.0 =
|
135 |
* "Inline and defer CSS" allows one to specify which "above the fold CSS" should be inlined, while the normal optimized CSS is deferred.
|
136 |
* Inlined Base64-encoded background Images will now be cached as well and the threshold for inlining these images has been bumped up to 4096 bytes (from 2560).
|
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: 4.1
|
7 |
+
Stable tag: 1.9.1
|
8 |
|
9 |
Autoptimize speeds up your website and helps you save bandwidth by aggregating and minimizing JS, CSS and HTML.
|
10 |
|
101 |
* If you can't get either CSS or JS optimization working, you can off course always continue using the other two optimization-techniques.
|
102 |
* 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"
|
103 |
|
|
|
|
|
|
|
|
|
104 |
= What is noptimize? =
|
105 |
|
106 |
Starting with version 1.6.6 Autoptimize excludes everything inside noptimize tags, e.g.:
|
127 |
|
128 |
== Changelog ==
|
129 |
|
130 |
+
= 1.9.1 =
|
131 |
+
* hard-exclude [the sidelink-search-box introduced in WP SEO v1.6](http://wordpress.org/plugins/wordpress-seo/changelog/) from JS optimization (this [broke some JS-optimization badly](http://wordpress.org/support/topic/190-breaks-js?replies=4))
|
132 |
+
* bugfix: first add semi-colon to inline script, only then add try-catch if required instead of the other way around.
|
133 |
+
|
134 |
= 1.9.0 =
|
135 |
* "Inline and defer CSS" allows one to specify which "above the fold CSS" should be inlined, while the normal optimized CSS is deferred.
|
136 |
* Inlined Base64-encoded background Images will now be cached as well and the threshold for inlining these images has been bumped up to 4096 bytes (from 2560).
|