ShortPixel Image Optimizer - Version 3.3.1

Version Description

  • small fix to the quota revalidation process
Download this release

Release Info

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

Code changes from version 3.3.0 to 3.3.1

css/short-pixel.css CHANGED
@@ -139,7 +139,7 @@ li.shortpixel-hide {
139
  overflow: hidden;
140
  }
141
  .wp-core-ui .column-wp-shortPixel .sp-column-actions {
142
- max-width: 120px;
143
  float:right;
144
  text-align: right;
145
  }
139
  overflow: hidden;
140
  }
141
  .wp-core-ui .column-wp-shortPixel .sp-column-actions {
142
+ max-width: 140px;
143
  float:right;
144
  text-align: right;
145
  }
js/short-pixel.js CHANGED
@@ -109,6 +109,7 @@ function showToolBarAlert($status, $message) {
109
  jQuery("a div", robo).attr("title", "Get API Key");
110
  break;
111
  case ShortPixel.STATUS_SUCCESS:
 
112
  robo.removeClass("shortpixel-alert");
113
  jQuery("a", robo).removeAttr("target");
114
  jQuery("a", robo).attr("href", jQuery("a img", robo).attr("success-url"));
@@ -201,8 +202,10 @@ function checkBulkProcessingCallApi(){
201
  showToolBarAlert(ShortPixel.STATUS_NO_KEY);
202
  break;
203
  case ShortPixel.STATUS_QUOTA_EXCEEDED:
204
- setCellMessage(id, data["Message"] + " <a class='button button-smaller button-primary' href=\"https://shortpixel.com/login/"
205
- + ShortPixel.API_KEY + "\" target=\"_blank\">Extend Quota</a>");
 
 
206
  showToolBarAlert(ShortPixel.STATUS_QUOTA_EXCEEDED);
207
  break;
208
  case ShortPixel.STATUS_FAIL:
@@ -273,6 +276,7 @@ function checkBulkProcessingCallApi(){
273
  }
274
  case ShortPixel.STATUS_RETRY:
275
  console.log('Server response: ' + response);
 
276
  if(isBulkPage && typeof data["BulkPercent"] !== 'undefined') {
277
  progressUpdate(data["BulkPercent"], data["BulkMsg"]);
278
  }
109
  jQuery("a div", robo).attr("title", "Get API Key");
110
  break;
111
  case ShortPixel.STATUS_SUCCESS:
112
+ case ShortPixel.STATUS_RETRY:
113
  robo.removeClass("shortpixel-alert");
114
  jQuery("a", robo).removeAttr("target");
115
  jQuery("a", robo).attr("href", jQuery("a img", robo).attr("success-url"));
202
  showToolBarAlert(ShortPixel.STATUS_NO_KEY);
203
  break;
204
  case ShortPixel.STATUS_QUOTA_EXCEEDED:
205
+ setCellMessage(id, "<div class='sp-column-actions' style='width:110px;'><a class='button button-smaller button-primary' href=\"https://shortpixel.com/login/"
206
+ + ShortPixel.API_KEY + "\" target=\"_blank\">Extend Quota</a>"
207
+ + "<a class='button button-smaller' href='admin.php?action=shortpixel_check_quota'>Check&nbsp;&nbsp;Quota</a></div>"
208
+ + "<div class='sp-column-info'>" + data["Message"] + "</div>" );
209
  showToolBarAlert(ShortPixel.STATUS_QUOTA_EXCEEDED);
210
  break;
211
  case ShortPixel.STATUS_FAIL:
276
  }
277
  case ShortPixel.STATUS_RETRY:
278
  console.log('Server response: ' + response);
279
+ showToolBarAlert(ShortPixel.STATUS_RETRY, "");
280
  if(isBulkPage && typeof data["BulkPercent"] !== 'undefined') {
281
  progressUpdate(data["BulkPercent"], data["BulkMsg"]);
282
  }
readme.txt CHANGED
@@ -1,15 +1,15 @@
1
  === ShortPixel Image Optimizer ===
2
 
3
  Contributors: AlexSP
4
- Tags: picture, optimization, image editor, pngout, upload speed, shortpixel, compression, jpegmini, webp, lossless, cwebp, media, jpegtran, image, image optimisation, image optimization, shrink, picture, photo, optimize photos, compress, performance, tinypng, crunch, pngquant, attachment, optimize, pictures, fast, images, image files, image quality, lossy, upload, kraken, resize, seo, smushit, optipng, kraken image optimizer, ewww, photo optimization, gifsicle, image optimizer, images, krakenio, png, gmagick, image optimize, pdf, pdf optimisation, pdf optimization, optimize pdf, optimise pdf, shrink pdf, jpg, jpeg, jpg optimisation, jpg optimization, optimize jpg, optimise jpg, shrink jpg, gif, animated gif, optimize gif, optimise gif, optimizer, optimiser, compresion, optimization, cruncher, image cruncher, compress png, compress jpg, compress jpeg, compress pdf, faster loading times, image optimiser, improve pagerank, optimise, optimize animated gif, optimise jpeg, optimize jpeg, optimize png, optimise png, optimise pdf, optimize pdf, tinyjpg, short pixel, shortpixel, woocommerce compatible
5
 
6
  Requires at least: 3.2.0
7
  Tested up to: 4.4
8
- Stable tag: 3.3.0
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,6 +170,10 @@ The ShortPixel team is here to help. <a href="https://shortpixel.com/contact">Co
170
 
171
  == Changelog ==
172
 
 
 
 
 
173
  = 3.3.0 =
174
 
175
  * reoptimize lossless/lossy
1
  === ShortPixel Image Optimizer ===
2
 
3
  Contributors: AlexSP
4
+ Tags: picture, optimization, image editor, pngout, upload speed, shortpixel, compression, jpegmini, webp, lossless, cwebp, media, jpegtran, image, image optimisation, image optimization, shrink, picture, photo, optimize photos, compress, performance, tinypng, crunch, pngquant, attachment, optimize, pictures, fast, images, image files, image quality, lossy, upload, kraken, resize, seo, smushit, optipng, kraken image optimizer, ewww, photo optimization, gifsicle, image optimizer, images, krakenio, png, gmagick, image optimize, pdf, pdf optimisation, pdf optimization, optimize pdf, optimise pdf, shrink pdf, jpg, jpeg, jpg optimisation, jpg optimization, optimize jpg, optimise jpg, shrink jpg, gif, animated gif, optimize gif, optimise gif, optimizer, optimiser, compresion, optimization, cruncher, image cruncher, compress png, compress jpg, compress jpeg, compress pdf, faster loading times, image optimiser, improve pagerank, optimise, optimize animated gif, optimise jpeg, optimize jpeg, optimize png, optimise png, optimise pdf, optimize pdf, tinyjpg, short pixel, shortpixel, woocommerce compatible, wpml compatible
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
 
171
  == Changelog ==
172
 
173
+ = 3.3.1 =
174
+
175
+ * small fix to the quota revalidation process
176
+
177
  = 3.3.0 =
178
 
179
  * reoptimize lossless/lossy
shortpixel_view.php CHANGED
@@ -682,8 +682,9 @@ class ShortPixelView {
682
  }
683
 
684
  public function getQuotaExceededHTML($message = '') {
685
- return $message . " Quota Exceeded.
686
  <a class='button button-smaller button-primary' href='https://shortpixel.com/login/". $this->ctrl->getApiKey() . "' target='_blank'>Extend Quota</a>
687
- <a class='button button-smaller' href='admin.php?action=shortpixel_check_quota' target='_blank'>Check&nbsp;&nbsp;Quota</a>";
 
688
  }
689
  }
682
  }
683
 
684
  public function getQuotaExceededHTML($message = '') {
685
+ return "<div class='sp-column-actions' style='width:110px;'>
686
  <a class='button button-smaller button-primary' href='https://shortpixel.com/login/". $this->ctrl->getApiKey() . "' target='_blank'>Extend Quota</a>
687
+ <a class='button button-smaller' href='admin.php?action=shortpixel_check_quota'>Check&nbsp;&nbsp;Quota</a></div>
688
+ <div class='sp-column-info'>" . $message . " Quota Exceeded.</div>";
689
  }
690
  }
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.0
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.0");
26
  define('SP_MAX_TIMEOUT', 10);
27
  define('SP_VALIDATE_MAX_TIMEOUT', 15);
28
  define('SP_BACKUP', 'ShortpixelBackups');
@@ -1226,7 +1226,7 @@ class WPShortPixel {
1226
  elseif (empty($data)) { //TODO asta devine if si decomentam returnurile
1227
  if($fileExtension == "pdf") {
1228
  $renderData['status'] = $quotaExceeded ? 'quotaExceeded' : 'optimizeNow';
1229
- $renderData['message'] = 'PDF not processed';
1230
  }
1231
  else { //Optimization N/A
1232
  $renderData['status'] = 'n/a';
@@ -1271,14 +1271,14 @@ class WPShortPixel {
1271
  }
1272
  elseif(isset($data['ShortPixel']['WaitingProcessing'])) {
1273
  $renderData['status'] = $quotaExceeded ? 'quotaExceeded' : 'retry';
1274
- $renderData['message'] = "<img src=\"" . plugins_url( 'img/loading.gif', __FILE__ ) . "\" class='sp-loading-small'>&nbsp;Image waiting to be processed";
1275
  if($id > $this->prioQ->getFlagBulkId()) $this->prioQ->push($id); //should be there but just to make sure
1276
  }
1277
  else { //finally
1278
  $renderData['status'] = $quotaExceeded ? 'quotaExceeded' : 'optimizeNow';
1279
  $sizes = isset($data['sizes']) ? count($data['sizes']) : 0;
1280
  $renderData['thumbsTotal'] = $sizes;
1281
- $renderData['message'] = ($fileExtension == "pdf" ? 'PDF' : 'Image') . ' not processed';
1282
  }
1283
 
1284
  $this->view->renderCustomColumn($id, $renderData);
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
 
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');
1226
  elseif (empty($data)) { //TODO asta devine if si decomentam returnurile
1227
  if($fileExtension == "pdf") {
1228
  $renderData['status'] = $quotaExceeded ? 'quotaExceeded' : 'optimizeNow';
1229
+ $renderData['message'] = 'PDF not processed.';
1230
  }
1231
  else { //Optimization N/A
1232
  $renderData['status'] = 'n/a';
1271
  }
1272
  elseif(isset($data['ShortPixel']['WaitingProcessing'])) {
1273
  $renderData['status'] = $quotaExceeded ? 'quotaExceeded' : 'retry';
1274
+ $renderData['message'] = "<img src=\"" . plugins_url( 'img/loading.gif', __FILE__ ) . "\" class='sp-loading-small'>&nbsp;Image waiting to be processed.";
1275
  if($id > $this->prioQ->getFlagBulkId()) $this->prioQ->push($id); //should be there but just to make sure
1276
  }
1277
  else { //finally
1278
  $renderData['status'] = $quotaExceeded ? 'quotaExceeded' : 'optimizeNow';
1279
  $sizes = isset($data['sizes']) ? count($data['sizes']) : 0;
1280
  $renderData['thumbsTotal'] = $sizes;
1281
+ $renderData['message'] = ($fileExtension == "pdf" ? 'PDF' : 'Image') . ' not processed.';
1282
  }
1283
 
1284
  $this->view->renderCustomColumn($id, $renderData);