Autoptimize - Version 3.0.1

Version Description

  • fix for minification of inline script with type text/template breaking the template (e.g. ninja forms), hat tip to @bobsled.
  • fix for regression in import of CSS-files where e.g. fontawesome CSS was broken due to being escaped again with help of @bobsled, thanks man!
Download this release

Release Info

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

Code changes from version 3.0.0 to 3.0.1

autoptimize.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Autoptimize
4
  * Plugin URI: https://autoptimize.com/
5
  * Description: Makes your site faster by optimizing CSS, JS, Images, Google fonts and more.
6
- * Version: 3.0.0
7
  * Author: Frank Goossens (futtta)
8
  * Author URI: https://autoptimize.com/
9
  * Text Domain: autoptimize
@@ -21,7 +21,7 @@ if ( ! defined( 'ABSPATH' ) ) {
21
  exit;
22
  }
23
 
24
- define( 'AUTOPTIMIZE_PLUGIN_VERSION', '3.0.0' );
25
 
26
  // plugin_dir_path() returns the trailing slash!
27
  define( 'AUTOPTIMIZE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
3
  * Plugin Name: Autoptimize
4
  * Plugin URI: https://autoptimize.com/
5
  * Description: Makes your site faster by optimizing CSS, JS, Images, Google fonts and more.
6
+ * Version: 3.0.1
7
  * Author: Frank Goossens (futtta)
8
  * Author URI: https://autoptimize.com/
9
  * Text Domain: autoptimize
21
  exit;
22
  }
23
 
24
+ define( 'AUTOPTIMIZE_PLUGIN_VERSION', '3.0.1' );
25
 
26
  // plugin_dir_path() returns the trailing slash!
27
  define( 'AUTOPTIMIZE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
classes/autoptimizeHTML.php CHANGED
@@ -84,7 +84,7 @@ class autoptimizeHTML extends autoptimizeBase
84
 
85
  // Optionally minify inline JS & CSS.
86
  if ( apply_filters( 'autoptimize_html_minify_inline_js_css', true ) && false === $this->keepcomments ) {
87
- if ( false != autoptimizeOptionWrapper::get_option( 'autoptimize_js' ) && false != autoptimizeConfig::get_post_meta_ao_settings( 'ao_post_js_optimize' ) && true !== apply_filters( 'autoptimize_filter_js_noptimize', false, $this->content ) ) {
88
  $options['jsMinifier'] = 'JSMin::minify';
89
  }
90
  if ( false != autoptimizeOptionWrapper::get_option( 'autoptimize_css' ) && false != autoptimizeConfig::get_post_meta_ao_settings( 'ao_post_css_optimize' ) && true !== apply_filters( 'autoptimize_filter_css_noptimize', false, $this->content ) ) {
84
 
85
  // Optionally minify inline JS & CSS.
86
  if ( apply_filters( 'autoptimize_html_minify_inline_js_css', true ) && false === $this->keepcomments ) {
87
+ if ( false != autoptimizeOptionWrapper::get_option( 'autoptimize_js' ) && false != autoptimizeConfig::get_post_meta_ao_settings( 'ao_post_js_optimize' ) && true !== apply_filters( 'autoptimize_filter_js_noptimize', false, $this->content ) && false === strpos( $this->content, 'text/template' ) ) {
88
  $options['jsMinifier'] = 'JSMin::minify';
89
  }
90
  if ( false != autoptimizeOptionWrapper::get_option( 'autoptimize_css' ) && false != autoptimizeConfig::get_post_meta_ao_settings( 'ao_post_css_optimize' ) && true !== apply_filters( 'autoptimize_filter_css_noptimize', false, $this->content ) ) {
classes/autoptimizeStyles.php CHANGED
@@ -873,7 +873,7 @@ class autoptimizeStyles extends autoptimizeBase
873
  }
874
 
875
  if ( ! empty( $code ) ) {
876
- $tmp_thiscss = str_replace( $import, $code, $thiscss );
877
  if ( ! empty( $tmp_thiscss ) ) {
878
  $thiscss = $tmp_thiscss;
879
  $import_ok = true;
873
  }
874
 
875
  if ( ! empty( $code ) ) {
876
+ $tmp_thiscss = str_replace( $import, stripcslashes( $code ), $thiscss );
877
  if ( ! empty( $tmp_thiscss ) ) {
878
  $thiscss = $tmp_thiscss;
879
  $import_ok = true;
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: http://blog.futtta.be/2013/10/21/do-not-donate-to-me/
5
  Requires at least: 4.9
6
  Tested up to: 5.9
7
  Requires PHP: 5.6
8
- Stable tag: 3.0.0
9
 
10
  Autoptimize speeds up your website by optimizing JS, CSS, images (incl. lazy-load), HTML and Google Fonts, asyncing JS, removing emoji cruft and more.
11
 
@@ -324,6 +324,10 @@ Just [fork Autoptimize on Github](https://github.com/futtta/autoptimize) and cod
324
 
325
  == Changelog ==
326
 
 
 
 
 
327
  = 3.0.0 =
328
  * fundamental change for new installations: by default Autoptimize will not aggregate JS/ CSS any more (HTTP/2 is ubiquitous and there are other advantages to not aggregating esp. re. inline JS/ CSS and dependancies)
329
  * new: no API needed any more to create manual critical CSS rules.
5
  Requires at least: 4.9
6
  Tested up to: 5.9
7
  Requires PHP: 5.6
8
+ Stable tag: 3.0.1
9
 
10
  Autoptimize speeds up your website by optimizing JS, CSS, images (incl. lazy-load), HTML and Google Fonts, asyncing JS, removing emoji cruft and more.
11
 
324
 
325
  == Changelog ==
326
 
327
+ = 3.0.1 =
328
+ * fix for minification of inline script with type text/template breaking the template (e.g. ninja forms), hat tip to @bobsled.
329
+ * fix for regression in import of CSS-files where e.g. fontawesome CSS was broken due to being escaped again with help of @bobsled, thanks man!
330
+
331
  = 3.0.0 =
332
  * fundamental change for new installations: by default Autoptimize will not aggregate JS/ CSS any more (HTTP/2 is ubiquitous and there are other advantages to not aggregating esp. re. inline JS/ CSS and dependancies)
333
  * new: no API needed any more to create manual critical CSS rules.