Autoptimize - Version 2.4.4

Version Description

  • bugfix: safer way of removing extra cronjobs
Download this release

Release Info

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

Code changes from version 2.4.3 to 2.4.4

autoptimize.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Autoptimize
4
  Plugin URI: https://autoptimize.com/
5
  Description: Optimize your website's performance: JS, CSS, HTML, images, Google Fonts and more!
6
- Version: 2.4.3
7
  Author: Frank Goossens (futtta)
8
  Author URI: https://autoptimize.com/
9
  Text Domain: autoptimize
@@ -20,7 +20,7 @@ if ( ! defined( 'ABSPATH' ) ) {
20
  exit;
21
  }
22
 
23
- define( 'AUTOPTIMIZE_PLUGIN_VERSION', '2.4.3' );
24
 
25
  // plugin_dir_path() returns the trailing slash!
26
  define( 'AUTOPTIMIZE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
3
  Plugin Name: Autoptimize
4
  Plugin URI: https://autoptimize.com/
5
  Description: Optimize your website's performance: JS, CSS, HTML, images, Google Fonts and more!
6
+ Version: 2.4.4
7
  Author: Frank Goossens (futtta)
8
  Author URI: https://autoptimize.com/
9
  Text Domain: autoptimize
20
  exit;
21
  }
22
 
23
+ define( 'AUTOPTIMIZE_PLUGIN_VERSION', '2.4.4' );
24
 
25
  // plugin_dir_path() returns the trailing slash!
26
  define( 'AUTOPTIMIZE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
classes/autoptimizeVersionUpdatesHandler.php CHANGED
@@ -214,6 +214,20 @@ class autoptimizeVersionUpdatesHandler
214
  * 2.4.2 introduced too many cronned ao_cachecheckers, make this right
215
  */
216
  private function upgrade_from_2_4_2() {
217
- wp_clear_scheduled_hook( 'ao_cachechecker' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
218
  }
219
  }
214
  * 2.4.2 introduced too many cronned ao_cachecheckers, make this right
215
  */
216
  private function upgrade_from_2_4_2() {
217
+ // below code by Thomas Sjolshagen (http://eighty20results.com/)
218
+ // as found on https://www.paidmembershipspro.com/deleting-oldextra-cron-events/.
219
+ $jobs = _get_cron_array();
220
+
221
+ // Remove all ao_cachechecker cron jobs (for now).
222
+ foreach ( $jobs as $when => $job ) {
223
+ $name = key( $job );
224
+
225
+ if ( false !== strpos( $name, 'ao_cachechecker' ) ) {
226
+ unset( $jobs[ $when ] );
227
+ }
228
+ }
229
+
230
+ // Save the data.
231
+ _set_cron_array( $jobs );
232
  }
233
  }
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.0
6
  Tested up to: 5.0
7
  Requires PHP: 5.3
8
- Stable tag: 2.4.3
9
 
10
  Autoptimize speeds up your website by optimizing JS, CSS, HTML, Google Fonts and images, async-ing JS, removing emoji cruft and more.
11
 
@@ -283,6 +283,9 @@ Just [fork Autoptimize on Github](https://github.com/futtta/autoptimize) and cod
283
 
284
  == Changelog ==
285
 
 
 
 
286
  = 2.4.3 =
287
  * improved Google Fonts optimzation, praise to @nextendweb (of Smartslider3 fame)!
288
  * improved deferring of non-aggregated CSS when "inline & defer" is active
5
  Requires at least: 4.0
6
  Tested up to: 5.0
7
  Requires PHP: 5.3
8
+ Stable tag: 2.4.4
9
 
10
  Autoptimize speeds up your website by optimizing JS, CSS, HTML, Google Fonts and images, async-ing JS, removing emoji cruft and more.
11
 
283
 
284
  == Changelog ==
285
 
286
+ = 2.4.4 =
287
+ * bugfix: safer way of removing extra cronjobs
288
+
289
  = 2.4.3 =
290
  * improved Google Fonts optimzation, praise to @nextendweb (of Smartslider3 fame)!
291
  * improved deferring of non-aggregated CSS when "inline & defer" is active