ShortPixel Image Optimizer - Version 4.12.3

Version Description

Release date: 19th December 2018

  • Fixed: error in getting the lazy- attributes of for WebP handling.
Download this release

Release Info

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

Code changes from version 4.12.2 to 4.12.3

class/front/img-to-picture-webp.php CHANGED
@@ -9,13 +9,13 @@ class ShortPixelImgToPictureWebp {
9
  public static function lazyGet($img, $type) {
10
  return array(
11
  'value' =>
12
- (isset($img['data-lazy-' . $type]) && strlen('data-lazy-' . $img[$type])) ?
13
  $img['data-lazy-' . $type]
14
  : (isset($img['data-' . $type]) && strlen($img['data-' . $type]) ?
15
  $img['data-' . $type]
16
  : (isset($img[$type]) && strlen($img[$type]) ? $img[$type] : false)),
17
  'prefix' =>
18
- (isset($img['data-lazy-' . $type]) && strlen('data-lazy-' . $img[$type])) ? 'data-lazy-'
19
  : (isset($img['data-' . $type]) && strlen($img['data-' . $type]) ? 'data-'
20
  : (isset($img[$type]) && strlen($img[$type]) ? '' : false))
21
  );
@@ -180,4 +180,4 @@ class ShortPixelImgToPictureWebp {
180
  return !empty($attachment_id) ? $attachment_id[0] : false;
181
  }
182
 
183
- }
9
  public static function lazyGet($img, $type) {
10
  return array(
11
  'value' =>
12
+ (isset($img['data-lazy-' . $type]) && strlen($img['data-lazy-' . $type])) ?
13
  $img['data-lazy-' . $type]
14
  : (isset($img['data-' . $type]) && strlen($img['data-' . $type]) ?
15
  $img['data-' . $type]
16
  : (isset($img[$type]) && strlen($img[$type]) ? $img[$type] : false)),
17
  'prefix' =>
18
+ (isset($img['data-lazy-' . $type]) && strlen($img['data-lazy-' . $type])) ? 'data-lazy-'
19
  : (isset($img['data-' . $type]) && strlen($img['data-' . $type]) ? 'data-'
20
  : (isset($img[$type]) && strlen($img[$type]) ? '' : false))
21
  );
180
  return !empty($attachment_id) ? $attachment_id[0] : false;
181
  }
182
 
183
+ }
class/wp-short-pixel.php CHANGED
@@ -2597,7 +2597,7 @@ class WPShortPixel {
2597
  $htaccessPath = get_home_path() . '.htaccess';
2598
  $htaccessExisted = file_exists( $htaccessPath );
2599
  //$htaccessWriteable = insert_with_markers( get_home_path() . '.htaccess', 'ShortPixelWebp', '' );
2600
- $htaccessWriteable = fopen($htaccessPath, "a+") ? true : false;
2601
  if( !$htaccessExisted ){
2602
  unlink( $htaccessPath );
2603
  }
2597
  $htaccessPath = get_home_path() . '.htaccess';
2598
  $htaccessExisted = file_exists( $htaccessPath );
2599
  //$htaccessWriteable = insert_with_markers( get_home_path() . '.htaccess', 'ShortPixelWebp', '' );
2600
+ $htaccessWriteable = @fopen($htaccessPath, "a+") ? true : false;
2601
  if( !$htaccessExisted ){
2602
  unlink( $htaccessPath );
2603
  }
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.0
6
  Requires PHP: 5.2
7
- Stable tag: 4.12.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -17,7 +17,7 @@ Speed up your website and boost your SEO by compressing old & new images and PDF
17
  Increase your website's SEO ranking, number of visitors and ultimately your sales by optimizing any image or PDF document on your website.
18
  ShortPixel is an easy to use, lightweight, install-and-forget-about-it <a href="https://shortpixel.com" target="_blank">image optimization</a> plugin that can compress all your past images and PDF documents with a single click. New images are automatically resized/rescaled and optimized on the fly, in the background.
19
 
20
- **Ready for a quick DEMO? Test <a href="http://sandboxwordpress.com/" target="_blank">here</a> or <a href="http://poopy.life/create?url=/wp-admin/admin.php?page=sandbox" target="_blank">here</a> (no e-mail required).**
21
 
22
  Short Pixel uses minimal resources and works well with any shared, cloud, VPS or dedicated web hosting. It can optimize any image you have on your website even the images that aren't listed in Media Library like those in galleries like <a href="https://wordpress.org/plugins/nextgen-gallery/" target="_blank">NextGEN</a>, <a href="https://wordpress.org/plugins/modula-best-grid-gallery/" target="_blank">Modula</a> or added directly via FTP!
23
 
@@ -76,7 +76,7 @@ Check out <a href="https://shortpixel.com/pricing" target="_blank">our prices</a
76
 
77
  [youtube https://www.youtube.com/watch?v=5EbX0Hsy6j4]
78
 
79
- Help us spread a the word by recommending ShortPixel to your friends and collect 100 additional image credits for each referred sign up. Make money by promoting a great plugin with our <a href="https://shortpixel.com/free-sign-up-affiliate" target="_blank">50/50 affiliate program</a>.
80
 
81
  **Get in touch!**
82
 
@@ -241,9 +241,15 @@ The ShortPixel Image Optimiser plugin calls the following actions and filters:
241
 
242
  == Changelog ==
243
 
 
 
 
 
 
 
244
  = 4.12.2 =
245
 
246
- Release date:
247
 
248
  * Improved: The Webp options interface. Now the user can implement Webp images both via .htaccess and by altering the page code on the server before being sent to the browser.
249
  * Improved: The settings data handling interface in the Plugin deactivation dialogue. Now the option to delete or keep the user settings on plugin deletion is more clear.
4
  Requires at least: 3.2.0
5
  Tested up to: 5.0
6
  Requires PHP: 5.2
7
+ Stable tag: 4.12.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
17
  Increase your website's SEO ranking, number of visitors and ultimately your sales by optimizing any image or PDF document on your website.
18
  ShortPixel is an easy to use, lightweight, install-and-forget-about-it <a href="https://shortpixel.com" target="_blank">image optimization</a> plugin that can compress all your past images and PDF documents with a single click. New images are automatically resized/rescaled and optimized on the fly, in the background.
19
 
20
+ **Ready for a quick DEMO? Test <a href="http://sandboxwordpress.com/?htmldata=http://shortpixel.com/sp.html&slug=shortpixel-image-optimiser&redirect=plugins.php&title=Test%20SHORTPIXEL%20Now!&ga=UA-55918546-1" target="_blank">here</a> or <a href="http://poopy.life/create?url=/wp-admin/admin.php?page=sandbox" target="_blank">here</a>.**
21
 
22
  Short Pixel uses minimal resources and works well with any shared, cloud, VPS or dedicated web hosting. It can optimize any image you have on your website even the images that aren't listed in Media Library like those in galleries like <a href="https://wordpress.org/plugins/nextgen-gallery/" target="_blank">NextGEN</a>, <a href="https://wordpress.org/plugins/modula-best-grid-gallery/" target="_blank">Modula</a> or added directly via FTP!
23
 
76
 
77
  [youtube https://www.youtube.com/watch?v=5EbX0Hsy6j4]
78
 
79
+ Help us spread the word by recommending ShortPixel to your friends and collect **100 lifetime monthly additional image credits for each referred active user**. Make money by promoting a great plugin with our <a href="https://shortpixel.com/free-sign-up-affiliate" target="_blank">50/50 affiliate program</a>.
80
 
81
  **Get in touch!**
82
 
241
 
242
  == Changelog ==
243
 
244
+ = 4.12.3 =
245
+
246
+ Release date: 19th December 2018
247
+
248
+ * Fixed: error in getting the lazy- attributes of <img> for WebP handling.
249
+
250
  = 4.12.2 =
251
 
252
+ Release date: 13th December 2018
253
 
254
  * Improved: The Webp options interface. Now the user can implement Webp images both via .htaccess and by altering the page code on the server before being sent to the browser.
255
  * Improved: The settings data handling interface in the Plugin deactivation dialogue. Now the option to delete or keep the user settings on plugin deletion is more clear.
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" target="_blank">Settings &gt; ShortPixel</a> page on how to start optimizing your image library and make your website load faster.
6
- * Version: 4.12.2
7
  * Author: ShortPixel
8
  * Author URI: https://shortpixel.com
9
  * Text Domain: shortpixel-image-optimiser
@@ -18,7 +18,7 @@ define('SHORTPIXEL_PLUGIN_FILE', __FILE__);
18
 
19
  //define('SHORTPIXEL_AFFILIATE_CODE', '');
20
 
21
- define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "4.12.2");
22
  define('SHORTPIXEL_MAX_TIMEOUT', 10);
23
  define('SHORTPIXEL_VALIDATE_MAX_TIMEOUT', 15);
24
  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" target="_blank">Settings &gt; ShortPixel</a> page on how to start optimizing your image library and make your website load faster.
6
+ * Version: 4.12.3
7
  * Author: ShortPixel
8
  * Author URI: https://shortpixel.com
9
  * Text Domain: shortpixel-image-optimiser
18
 
19
  //define('SHORTPIXEL_AFFILIATE_CODE', '');
20
 
21
+ define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "4.12.3");
22
  define('SHORTPIXEL_MAX_TIMEOUT', 10);
23
  define('SHORTPIXEL_VALIDATE_MAX_TIMEOUT', 15);
24
  define('SHORTPIXEL_BACKUP', 'ShortpixelBackups');