Autoptimize - Version 2.7.5

Version Description

  • urgent fix for Google Fonts aggregate & preload that broke badly in 2.7.4.
Download this release

Release Info

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

Code changes from version 2.7.4 to 2.7.5

Files changed (3) hide show
  1. autoptimize.php +2 -2
  2. classes/autoptimizeExtra.php +1 -6
  3. readme.txt +4 -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: 2.7.4
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', '2.7.4' );
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: 2.7.5
7
  * Author: Frank Goossens (futtta)
8
  * Author URI: https://autoptimize.com/
9
  * Text Domain: autoptimize
21
  exit;
22
  }
23
 
24
+ define( 'AUTOPTIMIZE_PLUGIN_VERSION', '2.7.5' );
25
 
26
  // plugin_dir_path() returns the trailing slash!
27
  define( 'AUTOPTIMIZE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
classes/autoptimizeExtra.php CHANGED
@@ -289,7 +289,7 @@ class autoptimizeExtra
289
 
290
  if ( ! empty( $fonts_string ) ) {
291
  if ( '5' === $options['autoptimize_extra_radio_field_4'] ) {
292
- $rel_string = 'rel="preload" as="style" onload="' . autoptimizeConfig::get_ao_css_preload_onload() . '"';
293
  } else {
294
  $rel_string = 'rel="stylesheet"';
295
  }
@@ -333,11 +333,6 @@ class autoptimizeExtra
333
  $out = substr_replace( $in, $fonts_markup . $inject_point, strpos( $in, $inject_point ), strlen( $inject_point ) );
334
  unset( $fonts_collection );
335
 
336
- // and insert preload polyfill if "link preload" and if the polyfill isn't there yet (courtesy of inline&defer).
337
- $preload_polyfill = autoptimizeConfig::get_ao_css_preload_polyfill();
338
- if ( '5' === $options['autoptimize_extra_radio_field_4'] && strpos( $out, $preload_polyfill ) === false ) {
339
- $out = str_replace( '</body>', $preload_polyfill . '</body>', $out );
340
- }
341
  return $out;
342
  }
343
 
289
 
290
  if ( ! empty( $fonts_string ) ) {
291
  if ( '5' === $options['autoptimize_extra_radio_field_4'] ) {
292
+ $rel_string = 'rel="stylesheet" media="print" onload="' . autoptimizeConfig::get_ao_css_preload_onload() . '"';
293
  } else {
294
  $rel_string = 'rel="stylesheet"';
295
  }
333
  $out = substr_replace( $in, $fonts_markup . $inject_point, strpos( $in, $inject_point ), strlen( $inject_point ) );
334
  unset( $fonts_collection );
335
 
 
 
 
 
 
336
  return $out;
337
  }
338
 
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.5
7
  Requires PHP: 5.6
8
- Stable tag: 2.7.4
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
 
@@ -311,6 +311,9 @@ Just [fork Autoptimize on Github](https://github.com/futtta/autoptimize) and cod
311
 
312
  == Changelog ==
313
 
 
 
 
314
  = 2.7.4 =
315
  * Image optimization: also optimize icon links
316
  * Image optimization: fix webp-detection for Safari (contributed by @pinkasey)
5
  Requires at least: 4.9
6
  Tested up to: 5.5
7
  Requires PHP: 5.6
8
+ Stable tag: 2.7.5
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
 
311
 
312
  == Changelog ==
313
 
314
+ = 2.7.5 =
315
+ * urgent fix for Google Fonts aggregate & preload that broke badly in 2.7.4.
316
+
317
  = 2.7.4 =
318
  * Image optimization: also optimize icon links
319
  * Image optimization: fix webp-detection for Safari (contributed by @pinkasey)