ShortPixel Image Optimizer - Version 4.14.2

Version Description

=

Release date: 1st July 2019 * Add the possibility to define custom thumb infixes like for example -uat to also select thumbs like image-uat-100x100.jpg

=

Download this release

Release Info

Developer ShortPixel
Plugin Icon 128x128 ShortPixel Image Optimizer
Version 4.14.2
Comparing to
See all releases

Code changes from version 4.14.1 to 4.14.2

class/db/wp-shortpixel-media-library-adapter.php CHANGED
@@ -303,6 +303,18 @@ class WpShortPixelMediaLbraryAdapter {
303
  }
304
  }
305
  }
 
 
 
 
 
 
 
 
 
 
 
 
306
  }
307
  return $thumbs;
308
  }
303
  }
304
  }
305
  }
306
+ if( defined('SHORTPIXEL_CUSTOM_THUMB_INFIXES') ){
307
+ $infixes = explode(',', SHORTPIXEL_CUSTOM_THUMB_INFIXES);
308
+ foreach ($infixes as $infix){
309
+ $thumbsCandidates = @glob($base . $infix . "-*." . $ext);
310
+ $pattern = '/' . preg_quote($base, '/') . $infix . '-\d+x\d+' . '\.'. $ext .'/';
311
+ foreach($thumbsCandidates as $th) {
312
+ if(preg_match($pattern, $th)) {
313
+ $thumbs[]= $th;
314
+ }
315
+ }
316
+ }
317
+ }
318
  }
319
  return $thumbs;
320
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: compressor, image, compression, optimize, image optimizer, image optimiser
4
  Requires at least: 3.2.0
5
  Tested up to: 5.2
6
  Requires PHP: 5.3
7
- Stable tag: 4.14.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -243,6 +243,11 @@ The ShortPixel Image Optimiser plugin calls the following actions and filters:
243
 
244
  == Changelog ==
245
 
 
 
 
 
 
246
  == 4.14.1 ==
247
 
248
  Release date: 17th June 2019
4
  Requires at least: 3.2.0
5
  Tested up to: 5.2
6
  Requires PHP: 5.3
7
+ Stable tag: 4.14.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
243
 
244
  == Changelog ==
245
 
246
+ == 4.14.2 ==
247
+
248
+ Release date: 1st July 2019
249
+ * Add the possibility to define custom thumb infixes like for example -uat to also select thumbs like image-uat-100x100.jpg
250
+
251
  == 4.14.1 ==
252
 
253
  Release date: 17th June 2019
wp-shortpixel.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: ShortPixel Image Optimizer
4
  * Plugin URI: https://shortpixel.com/
5
  * Description: ShortPixel optimizes images automatically, while guarding the quality of your images. Check your <a href="options-general.php?page=wp-shortpixel-settings" target="_blank">Settings &gt; ShortPixel</a> page on how to start optimizing your image library and make your website load faster.
6
- * Version: 4.14.1
7
  * Author: ShortPixel
8
  * Author URI: https://shortpixel.com
9
  * Text Domain: shortpixel-image-optimiser
@@ -19,7 +19,7 @@ define('SHORTPIXEL_PLUGIN_FILE', __FILE__);
19
 
20
  //define('SHORTPIXEL_AFFILIATE_CODE', '');
21
 
22
- define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "4.14.1");
23
  define('SHORTPIXEL_MAX_TIMEOUT', 10);
24
  define('SHORTPIXEL_VALIDATE_MAX_TIMEOUT', 15);
25
  define('SHORTPIXEL_BACKUP', 'ShortpixelBackups');
3
  * Plugin Name: ShortPixel Image Optimizer
4
  * Plugin URI: https://shortpixel.com/
5
  * Description: ShortPixel optimizes images automatically, while guarding the quality of your images. Check your <a href="options-general.php?page=wp-shortpixel-settings" target="_blank">Settings &gt; ShortPixel</a> page on how to start optimizing your image library and make your website load faster.
6
+ * Version: 4.14.2
7
  * Author: ShortPixel
8
  * Author URI: https://shortpixel.com
9
  * Text Domain: shortpixel-image-optimiser
19
 
20
  //define('SHORTPIXEL_AFFILIATE_CODE', '');
21
 
22
+ define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "4.14.2");
23
  define('SHORTPIXEL_MAX_TIMEOUT', 10);
24
  define('SHORTPIXEL_VALIDATE_MAX_TIMEOUT', 15);
25
  define('SHORTPIXEL_BACKUP', 'ShortpixelBackups');