Version Description
Release date: 27th September 2018
- fix error when metadata is returned as string by wp_get_attachment_metadata (happens to PDFs when using PDF Image Generator)
- remove the configurable Affiliate code as per new WP Themes rules.
Download this release
Release Info
Developer | ShortPixel |
Plugin | ShortPixel Image Optimizer |
Version | 4.11.3 |
Comparing to | |
See all releases |
Code changes from version 4.11.2 to 4.11.3
- class/wp-short-pixel.php +7 -3
- readme.txt +8 -1
- wp-shortpixel.php +2 -2
class/wp-short-pixel.php
CHANGED
@@ -2838,6 +2838,9 @@ class WPShortPixel {
|
|
2838 |
|
2839 |
$file = get_attached_file($id);
|
2840 |
$data = wp_get_attachment_metadata($id);
|
|
|
|
|
|
|
2841 |
//if($extended) {var_dump(wp_get_attachment_url($id)); var_dump($data);}
|
2842 |
$fileExtension = strtolower(pathinfo($file, PATHINFO_EXTENSION));
|
2843 |
$invalidKey = !$this->_settings->verifiedKey;
|
@@ -3455,9 +3458,10 @@ class WPShortPixel {
|
|
3455 |
return $this->_settings->resizeHeight;
|
3456 |
}
|
3457 |
public static function getAffiliateSufix() {
|
3458 |
-
return isset($_COOKIE["AffiliateShortPixel"])
|
3459 |
-
? "/affiliate/" . $_COOKIE["AffiliateShortPixel"]
|
3460 |
-
: (defined("SHORTPIXEL_AFFILIATE_CODE") && strlen(SHORTPIXEL_AFFILIATE_CODE) ? "/affiliate/" . SHORTPIXEL_AFFILIATE_CODE : "");
|
|
|
3461 |
}
|
3462 |
public function getVerifiedKey() {
|
3463 |
return $this->_settings->verifiedKey;
|
2838 |
|
2839 |
$file = get_attached_file($id);
|
2840 |
$data = wp_get_attachment_metadata($id);
|
2841 |
+
if(!is_array($data)) {
|
2842 |
+
$data = unserialize($data);
|
2843 |
+
}
|
2844 |
//if($extended) {var_dump(wp_get_attachment_url($id)); var_dump($data);}
|
2845 |
$fileExtension = strtolower(pathinfo($file, PATHINFO_EXTENSION));
|
2846 |
$invalidKey = !$this->_settings->verifiedKey;
|
3458 |
return $this->_settings->resizeHeight;
|
3459 |
}
|
3460 |
public static function getAffiliateSufix() {
|
3461 |
+
// return isset($_COOKIE["AffiliateShortPixel"])
|
3462 |
+
// ? "/affiliate/" . $_COOKIE["AffiliateShortPixel"]
|
3463 |
+
// : (defined("SHORTPIXEL_AFFILIATE_CODE") && strlen(SHORTPIXEL_AFFILIATE_CODE) ? "/affiliate/" . SHORTPIXEL_AFFILIATE_CODE : "");
|
3464 |
+
return "";
|
3465 |
}
|
3466 |
public function getVerifiedKey() {
|
3467 |
return $this->_settings->verifiedKey;
|
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: 4.9
|
6 |
Requires PHP: 5.2
|
7 |
-
Stable tag: 4.11.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -241,6 +241,13 @@ The ShortPixel Image Optimiser plugin calls the following actions and filters:
|
|
241 |
|
242 |
== Changelog ==
|
243 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
= 4.11.2 =
|
245 |
|
246 |
Release date: 20th August 2018
|
4 |
Requires at least: 3.2.0
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.2
|
7 |
+
Stable tag: 4.11.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
241 |
|
242 |
== Changelog ==
|
243 |
|
244 |
+
= 4.11.3 =
|
245 |
+
|
246 |
+
Release date: 27th September 2018
|
247 |
+
|
248 |
+
* fix error when metadata is returned as string by wp_get_attachment_metadata (happens to PDFs when using PDF Image Generator)
|
249 |
+
* remove the configurable Affiliate code as per new WP Themes rules.
|
250 |
+
|
251 |
= 4.11.2 =
|
252 |
|
253 |
Release date: 20th August 2018
|
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 > ShortPixel</a> page on how to start optimizing your image library and make your website load faster.
|
6 |
-
* Version: 4.11.
|
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.11.
|
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 > ShortPixel</a> page on how to start optimizing your image library and make your website load faster.
|
6 |
+
* Version: 4.11.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.11.2");
|
22 |
define('SHORTPIXEL_MAX_TIMEOUT', 10);
|
23 |
define('SHORTPIXEL_VALIDATE_MAX_TIMEOUT', 15);
|
24 |
define('SHORTPIXEL_BACKUP', 'ShortpixelBackups');
|