ShortPixel Image Optimizer - Version 3.3.2

Version Description

  • fix for PHP installs that are missing the mcrypt functions
Download this release

Release Info

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

Code changes from version 3.3.1 to 3.3.2

Files changed (2) hide show
  1. readme.txt +6 -2
  2. wp-shortpixel.php +6 -4
readme.txt CHANGED
@@ -5,11 +5,11 @@ Tags: picture, optimization, image editor, pngout, upload speed, shortpixel, co
5
 
6
  Requires at least: 3.2.0
7
  Tested up to: 4.4
8
- Stable tag: 3.3.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
- Easy-to-use, lightweight plugin that optimizes images & PDFs. Make your website faster, keeping the images’ high quality. WooCommerce and WPML compatible.
13
 
14
  == Description ==
15
 
@@ -170,6 +170,10 @@ The ShortPixel team is here to help. <a href="https://shortpixel.com/contact">Co
170
 
171
  == Changelog ==
172
 
 
 
 
 
173
  = 3.3.1 =
174
 
175
  * small fix to the quota revalidation process
5
 
6
  Requires at least: 3.2.0
7
  Tested up to: 4.4
8
+ Stable tag: 3.3.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
+ Easy-to-use, lightweight plugin that optimizes images & PDFs. Make your website faster, keeping the images’ high quality. WooCommerce compatible.
13
 
14
  == Description ==
15
 
170
 
171
  == Changelog ==
172
 
173
+ = 3.3.2 =
174
+
175
+ * fix for PHP installs that are missing the mcrypt functions
176
+
177
  = 3.3.1 =
178
 
179
  * small fix to the quota revalidation process
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: 3.3.1
7
  * Author: ShortPixel
8
  * Author URI: https://shortpixel.com
9
  */
@@ -22,7 +22,7 @@ define('SP_RESET_ON_ACTIVATE', false); //if true TODO set false
22
 
23
  define('SP_AFFILIATE_CODE', '');
24
 
25
- define('PLUGIN_VERSION', "3.3.1");
26
  define('SP_MAX_TIMEOUT', 10);
27
  define('SP_VALIDATE_MAX_TIMEOUT', 15);
28
  define('SP_BACKUP', 'ShortpixelBackups');
@@ -1144,8 +1144,6 @@ class WPShortPixel {
1144
  $comm[] = array("sent" => "POST: " . $requestURL, "args" => $args, "received" => $response);
1145
  }
1146
 
1147
- //die(var_dump($comm));
1148
-
1149
  $defaultData = array(
1150
  "APIKeyValid" => false,
1151
  "Message" => 'API Key could not be validated due to a connectivity error.<BR>Your firewall may be blocking us. Please contact your hosting provider and ask them to allow connections from your site to IP 176.9.106.46.<BR> If you still cannot validate your API Key after this, please <a href="https://shortpixel.com/contact" target="_blank">contact us</a> and we will try to help. ',
@@ -1206,6 +1204,7 @@ class WPShortPixel {
1206
 
1207
  public function generateCustomColumn( $column_name, $id ) {
1208
  if( 'wp-shortPixel' == $column_name ) {
 
1209
  $data = wp_get_attachment_metadata($id);
1210
  $file = get_attached_file($id);
1211
  $fileExtension = strtolower(substr($file,strrpos($file,".")+1));
@@ -1646,6 +1645,9 @@ class WPShortPixel {
1646
  */
1647
  public static function encrypt($pure_string, $encryption_key)
1648
  {
 
 
 
1649
  $iv_size = \mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);
1650
  $iv = \mcrypt_create_iv($iv_size, MCRYPT_RAND);
1651
  $encrypted_string = \mcrypt_encrypt(MCRYPT_BLOWFISH, $encryption_key, utf8_encode($pure_string), MCRYPT_MODE_ECB, $iv);
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: 3.3.2
7
  * Author: ShortPixel
8
  * Author URI: https://shortpixel.com
9
  */
22
 
23
  define('SP_AFFILIATE_CODE', '');
24
 
25
+ define('PLUGIN_VERSION', "3.3.2");
26
  define('SP_MAX_TIMEOUT', 10);
27
  define('SP_VALIDATE_MAX_TIMEOUT', 15);
28
  define('SP_BACKUP', 'ShortpixelBackups');
1144
  $comm[] = array("sent" => "POST: " . $requestURL, "args" => $args, "received" => $response);
1145
  }
1146
 
 
 
1147
  $defaultData = array(
1148
  "APIKeyValid" => false,
1149
  "Message" => 'API Key could not be validated due to a connectivity error.<BR>Your firewall may be blocking us. Please contact your hosting provider and ask them to allow connections from your site to IP 176.9.106.46.<BR> If you still cannot validate your API Key after this, please <a href="https://shortpixel.com/contact" target="_blank">contact us</a> and we will try to help. ',
1204
 
1205
  public function generateCustomColumn( $column_name, $id ) {
1206
  if( 'wp-shortPixel' == $column_name ) {
1207
+
1208
  $data = wp_get_attachment_metadata($id);
1209
  $file = get_attached_file($id);
1210
  $fileExtension = strtolower(substr($file,strrpos($file,".")+1));
1645
  */
1646
  public static function encrypt($pure_string, $encryption_key)
1647
  {
1648
+ if(!function_exists("mcrypt_get_iv_size")) {
1649
+ return "";
1650
+ }
1651
  $iv_size = \mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_ECB);
1652
  $iv = \mcrypt_create_iv($iv_size, MCRYPT_RAND);
1653
  $encrypted_string = \mcrypt_encrypt(MCRYPT_BLOWFISH, $encryption_key, utf8_encode($pure_string), MCRYPT_MODE_ECB, $iv);