ShortPixel Image Optimizer - Version 3.1.4

Version Description

  • fix bug in bulk processing
Download this release

Release Info

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

Code changes from version 3.1.3 to 3.1.4

Files changed (2) hide show
  1. readme.txt +5 -1
  2. wp-shortpixel.php +18 -16
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: picture, optimization, image editor, pngout, upload speed, shortpixel, co
5
 
6
  Requires at least: 3.0.1
7
  Tested up to: 4.3
8
- Stable tag: 3.1.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -168,6 +168,10 @@ The ShortPixel team is here to help. <a href="https://shortpixel.com/contact">Co
168
 
169
  == Changelog ==
170
 
 
 
 
 
171
  = 3.1.3 =
172
 
173
  * fix problems with activating the keys on some systems that do not allow post requests
5
 
6
  Requires at least: 3.0.1
7
  Tested up to: 4.3
8
+ Stable tag: 3.1.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
168
 
169
  == Changelog ==
170
 
171
+ = 3.1.4 =
172
+
173
+ * fix bug in bulk processing
174
+
175
  = 3.1.3 =
176
 
177
  * fix problems with activating the keys on some systems that do not allow post requests
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.1.3
7
  * Author: ShortPixel
8
  * Author URI: https://shortpixel.com
9
  */
@@ -21,7 +21,7 @@ define('SP_RESET_ON_ACTIVATE', false);
21
 
22
  define('SP_AFFILIATE_CODE', '');
23
 
24
- define('PLUGIN_VERSION', "3.1.3");
25
  define('SP_MAX_TIMEOUT', 10);
26
  define('SP_BACKUP', 'ShortpixelBackups');
27
  define('SP_BACKUP_FOLDER', WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . SP_BACKUP);
@@ -238,18 +238,20 @@ class WPShortPixel {
238
  function shortPixelJS() { ?>
239
  <script type="text/javascript" >
240
  jQuery(document).ready(function($){
241
- ShortPixel.setOptions({
242
- STATUS_SUCCESS: <?= ShortPixelAPI::STATUS_SUCCESS ?>,
243
- STATUS_EMPTY_QUEUE: <?= self::BULK_EMPTY_QUEUE ?>,
244
- STATUS_ERROR: <?= ShortPixelAPI::STATUS_ERROR ?>,
245
- STATUS_FAIL: <?= ShortPixelAPI::STATUS_FAIL ?>,
246
- STATUS_QUOTA_EXCEEDED: <?= ShortPixelAPI::STATUS_QUOTA_EXCEEDED ?>,
247
- STATUS_SKIP: <?= ShortPixelAPI::STATUS_SKIP ?>,
248
- STATUS_NO_KEY: <?= ShortPixelAPI::STATUS_NO_KEY ?>,
249
- STATUS_RETRY: <?= ShortPixelAPI::STATUS_RETRY ?>,
250
- WP_PLUGIN_URL: '<?= plugins_url( '', __FILE__ ) ?>',
251
- API_KEY: "<?= $this->_apiKey ?>"
252
- });
 
 
253
  });
254
  </script> <?php
255
  wp_enqueue_style('short-pixel.css', plugins_url('/css/short-pixel.css',__FILE__) );
@@ -446,7 +448,7 @@ class WPShortPixel {
446
  }
447
 
448
  public function handleImageProcessing($ID = null) {
449
- die("stop");
450
  //0: check key
451
  if( $this->_verifiedKey == false) {
452
  if($ID == null){
@@ -1020,7 +1022,7 @@ class WPShortPixel {
1020
  $response = wp_remote_post(str_replace('https://', 'http://', $requestURL), $args);
1021
  //Second fallback to HTTP get
1022
  if(is_wp_error( $response )){
1023
- $args['body'] = array();
1024
  $response = wp_remote_get(str_replace('https://', 'http://', $requestURL).$argsStr, $args);
1025
  }
1026
  $defaultData = array(
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.1.4
7
  * Author: ShortPixel
8
  * Author URI: https://shortpixel.com
9
  */
21
 
22
  define('SP_AFFILIATE_CODE', '');
23
 
24
+ define('PLUGIN_VERSION', "3.1.4");
25
  define('SP_MAX_TIMEOUT', 10);
26
  define('SP_BACKUP', 'ShortpixelBackups');
27
  define('SP_BACKUP_FOLDER', WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . SP_BACKUP);
238
  function shortPixelJS() { ?>
239
  <script type="text/javascript" >
240
  jQuery(document).ready(function($){
241
+ if(typeof ShortPixel !== 'undefined') {
242
+ ShortPixel.setOptions({
243
+ STATUS_SUCCESS: <?= ShortPixelAPI::STATUS_SUCCESS ?>,
244
+ STATUS_EMPTY_QUEUE: <?= self::BULK_EMPTY_QUEUE ?>,
245
+ STATUS_ERROR: <?= ShortPixelAPI::STATUS_ERROR ?>,
246
+ STATUS_FAIL: <?= ShortPixelAPI::STATUS_FAIL ?>,
247
+ STATUS_QUOTA_EXCEEDED: <?= ShortPixelAPI::STATUS_QUOTA_EXCEEDED ?>,
248
+ STATUS_SKIP: <?= ShortPixelAPI::STATUS_SKIP ?>,
249
+ STATUS_NO_KEY: <?= ShortPixelAPI::STATUS_NO_KEY ?>,
250
+ STATUS_RETRY: <?= ShortPixelAPI::STATUS_RETRY ?>,
251
+ WP_PLUGIN_URL: '<?= plugins_url( '', __FILE__ ) ?>',
252
+ API_KEY: "<?= $this->_apiKey ?>"
253
+ });
254
+ }
255
  });
256
  </script> <?php
257
  wp_enqueue_style('short-pixel.css', plugins_url('/css/short-pixel.css',__FILE__) );
448
  }
449
 
450
  public function handleImageProcessing($ID = null) {
451
+ //die("stop");
452
  //0: check key
453
  if( $this->_verifiedKey == false) {
454
  if($ID == null){
1022
  $response = wp_remote_post(str_replace('https://', 'http://', $requestURL), $args);
1023
  //Second fallback to HTTP get
1024
  if(is_wp_error( $response )){
1025
+ $args['body'] = null;
1026
  $response = wp_remote_get(str_replace('https://', 'http://', $requestURL).$argsStr, $args);
1027
  }
1028
  $defaultData = array(