EWWW Image Optimizer - Version 5.6.2

Version Description

  • fixed: fatal error for undefined add_query_var
Download this release

Release Info

Developer nosilver4u
Plugin Icon 128x128 EWWW Image Optimizer
Version 5.6.2
Comparing to
See all releases

Code changes from version 5.6.1 to 5.6.2

Files changed (4) hide show
  1. changelog.txt +3 -0
  2. common.php +3 -3
  3. ewww-image-optimizer.php +1 -7
  4. readme.txt +4 -1
changelog.txt CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  = 5.6.1 =
2
  * changed: prevent unintentional image re-optimization from plugins with a threshold of 5x, indicate intential regen with ewww_image_optimizer_allowed_reopt filter
3
  * changed: include lazy load and WebP in optimization score
1
+ = 5.6.2 =
2
+ * fixed: fatal error for undefined add_query_var
3
+
4
  = 5.6.1 =
5
  * changed: prevent unintentional image re-optimization from plugins with a threshold of 5x, indicate intential regen with ewww_image_optimizer_allowed_reopt filter
6
  * changed: include lazy load and WebP in optimization score
common.php CHANGED
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
14
  exit;
15
  }
16
 
17
- define( 'EWWW_IMAGE_OPTIMIZER_VERSION', '561.0' );
18
 
19
  // Initialize a couple globals.
20
  $eio_debug = '';
@@ -3632,7 +3632,7 @@ function ewww_image_optimizer_delete( $id ) {
3632
  $ewwwdb->delete( $ewwwdb->ewwwio_images, array( 'path' => ewww_image_optimizer_relativize_path( $file_path ) ) );
3633
  }
3634
  }
3635
- list( $file_path, $upload_path ) = ewww_image_optimizer_attachment_path( $meta, $id );
3636
  // If the attachment has an original file set.
3637
  if ( ! empty( $meta['original_image'] ) ) {
3638
  // One way or another, $file_path is now set, and we can get the base folder name.
@@ -6281,7 +6281,7 @@ function ewww_image_optimizer_resize_upload( $file ) {
6281
  }
6282
  // to here is replaced by cloud/API function.
6283
  $new_size = ewww_image_optimizer_filesize( $new_file );
6284
- if ( apply_filters( 'ewww_image_optimizer_resize_filesize_ignore', false ) || ( $new_size && $new_size < $orig_size ) ) {
6285
  // Use this action to perform any operations on the original file before it is overwritten with the new, smaller file.
6286
  do_action( 'ewww_image_optimizer_image_resized', $file, $new_file );
6287
  ewwwio_debug_message( "after resizing: $new_size" );
14
  exit;
15
  }
16
 
17
+ define( 'EWWW_IMAGE_OPTIMIZER_VERSION', '562.0' );
18
 
19
  // Initialize a couple globals.
20
  $eio_debug = '';
3632
  $ewwwdb->delete( $ewwwdb->ewwwio_images, array( 'path' => ewww_image_optimizer_relativize_path( $file_path ) ) );
3633
  }
3634
  }
3635
+ $file_path = get_attached_file( $id );
3636
  // If the attachment has an original file set.
3637
  if ( ! empty( $meta['original_image'] ) ) {
3638
  // One way or another, $file_path is now set, and we can get the base folder name.
6281
  }
6282
  // to here is replaced by cloud/API function.
6283
  $new_size = ewww_image_optimizer_filesize( $new_file );
6284
+ if ( ( $new_size && (int) $new_size !== (int) $orig_size && apply_filters( 'ewww_image_optimizer_resize_filesize_ignore', false ) ) || ( $new_size && $new_size < $orig_size ) ) {
6285
  // Use this action to perform any operations on the original file before it is overwritten with the new, smaller file.
6286
  do_action( 'ewww_image_optimizer_image_resized', $file, $new_file );
6287
  ewwwio_debug_message( "after resizing: $new_size" );
ewww-image-optimizer.php CHANGED
@@ -13,7 +13,7 @@ Plugin Name: EWWW Image Optimizer
13
  Plugin URI: https://wordpress.org/plugins/ewww-image-optimizer/
14
  Description: Reduce file sizes for images within WordPress including NextGEN Gallery and GRAND FlAGallery. Uses jpegtran, optipng/pngout, and gifsicle.
15
  Author: Exactly WWW
16
- Version: 5.6.1
17
  Author URI: https://ewww.io/
18
  License: GPLv3
19
  */
@@ -47,12 +47,6 @@ if ( ! defined( 'PHP_VERSION_ID' ) || PHP_VERSION_ID < 50600 ) {
47
  add_action( 'admin_notices', 'ewww_image_optimizer_dual_plugin' );
48
  // Loads the plugin translations.
49
  add_action( 'plugins_loaded', 'ewww_image_optimizer_false_init' );
50
- } elseif ( defined( 'KINSTAMU_VERSION' ) ) {
51
- add_action( 'network_admin_notices', 'ewww_image_optimizer_notice_kinsta' );
52
- add_action( 'admin_notices', 'ewww_image_optimizer_notice_kinsta' );
53
- require_once( plugin_dir_path( __FILE__ ) . 'classes/class-ewwwio-install-cloud.php' );
54
- // Loads the plugin translations.
55
- add_action( 'plugins_loaded', 'ewww_image_optimizer_false_init' );
56
  } elseif ( defined( 'WPNET_INIT_PLUGIN_VERSION' ) ) {
57
  add_action( 'network_admin_notices', 'ewww_image_optimizer_notice_wpnetnz' );
58
  add_action( 'admin_notices', 'ewww_image_optimizer_notice_wpnetnz' );
13
  Plugin URI: https://wordpress.org/plugins/ewww-image-optimizer/
14
  Description: Reduce file sizes for images within WordPress including NextGEN Gallery and GRAND FlAGallery. Uses jpegtran, optipng/pngout, and gifsicle.
15
  Author: Exactly WWW
16
+ Version: 5.6.2
17
  Author URI: https://ewww.io/
18
  License: GPLv3
19
  */
47
  add_action( 'admin_notices', 'ewww_image_optimizer_dual_plugin' );
48
  // Loads the plugin translations.
49
  add_action( 'plugins_loaded', 'ewww_image_optimizer_false_init' );
 
 
 
 
 
 
50
  } elseif ( defined( 'WPNET_INIT_PLUGIN_VERSION' ) ) {
51
  add_action( 'network_admin_notices', 'ewww_image_optimizer_notice_wpnetnz' );
52
  add_action( 'admin_notices', 'ewww_image_optimizer_notice_wpnetnz' );
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: optimize, image, convert, webp, resize, compress, lazy load, optimization,
5
  Requires at least: 5.1
6
  Tested up to: 5.5
7
  Requires PHP: 5.6
8
- Stable tag: 5.6.1
9
  License: GPLv3
10
 
11
  Speed up your website to better connect with your visitors. Properly compress and size/scale images. Includes lazy load and WebP convert.
@@ -171,6 +171,9 @@ https://developers.google.com/web/tools/lighthouse/audits/optimize-images
171
  * Feature requests can be viewed and submitted at https://feedback.ewww.io
172
  * If you would like to help translate this plugin in your language, get started here: https://translate.wordpress.org/projects/wp-plugins/ewww-image-optimizer/
173
 
 
 
 
174
  = 5.6.1 =
175
  * changed: prevent unintentional image re-optimization from plugins with a threshold of 5x, indicate intential regen with ewww_image_optimizer_allowed_reopt filter
176
  * changed: include lazy load and WebP in optimization score
5
  Requires at least: 5.1
6
  Tested up to: 5.5
7
  Requires PHP: 5.6
8
+ Stable tag: 5.6.2
9
  License: GPLv3
10
 
11
  Speed up your website to better connect with your visitors. Properly compress and size/scale images. Includes lazy load and WebP convert.
171
  * Feature requests can be viewed and submitted at https://feedback.ewww.io
172
  * If you would like to help translate this plugin in your language, get started here: https://translate.wordpress.org/projects/wp-plugins/ewww-image-optimizer/
173
 
174
+ = 5.6.2 =
175
+ * fixed: fatal error for undefined add_query_var
176
+
177
  = 5.6.1 =
178
  * changed: prevent unintentional image re-optimization from plugins with a threshold of 5x, indicate intential regen with ewww_image_optimizer_allowed_reopt filter
179
  * changed: include lazy load and WebP in optimization score