Version Description
- fix Javascript error in bulk in some cases
Download this release
Release Info
Developer | ShortPixel |
Plugin | ShortPixel Image Optimizer |
Version | 4.5.3 |
Comparing to | |
See all releases |
Code changes from version 4.5.2 to 4.5.3
- class/view/shortpixel_view.php +11 -8
- class/wp-short-pixel.php +3 -3
- readme.txt +5 -1
- res/js/short-pixel.js +2 -1
- shortpixel_api.php +1 -1
- wp-shortpixel.php +2 -2
class/view/shortpixel_view.php
CHANGED
@@ -49,7 +49,7 @@ class ShortPixelView {
|
|
49 |
onclick="ShortPixel.recheckQuota()">
|
50 |
</div>
|
51 |
<p><?php _e('Get more image credits by referring ShortPixel to your friends!','shortpixel-image-optimiser');?>
|
52 |
-
<a href="https://shortpixel.com/login/<?php echo($this->ctrl->getApiKey());?>/tell-a-friend" target="_blank">
|
53 |
<?php _e('Check your account','shortpixel-image-optimiser');?>
|
54 |
</a> <?php _e('for your unique referral link. For each user that joins, you will receive +100 additional image credits/month.','shortpixel-image-optimiser');?>
|
55 |
</p>
|
@@ -289,7 +289,8 @@ class ShortPixelView {
|
|
289 |
</div>
|
290 |
<p><?php printf(__('Go to the ShortPixel <a href="%soptions-general.php?page=wp-shortpixel#stats">Stats</a> '
|
291 |
. 'and see all your websites\' optimized stats. Download your detailed <a href="https://api.shortpixel.com/v2/report.php?key=%s">Optimization Report</a> '
|
292 |
-
. 'to check your image optimization statistics for the last 40 days.','shortpixel-image-optimiser'),
|
|
|
293 |
<?php
|
294 |
$failed = $this->ctrl->getPrioQ()->getFailed();
|
295 |
if(count($failed)) { ?>
|
@@ -580,7 +581,9 @@ class ShortPixelView {
|
|
580 |
?>
|
581 |
<h1><?php _e('ShortPixel Plugin Settings','shortpixel-image-optimiser');?></h1>
|
582 |
<p style="font-size:18px">
|
583 |
-
<a href="https://shortpixel.com/<?php
|
|
|
|
|
584 |
<?php _e('Upgrade now','shortpixel-image-optimiser');?>
|
585 |
</a> |
|
586 |
<a href="https://shortpixel.com/contact/<?php //echo($this->ctrl->getEncryptedData());?>" target="_blank" style="font-size:18px"><?php _e('Support','shortpixel-image-optimiser');?> </a>
|
@@ -1064,9 +1067,9 @@ class ShortPixelView {
|
|
1064 |
$DaysToReset = 30 - ((($DateNow - $DateSubscription) / 84600) % 30);
|
1065 |
printf(__('%s/month, renews in %s days, on %s ( <a href="https://shortpixel.com/login/%s" target="_blank">Need More? See the options available</a> )','shortpixel-image-optimiser'),
|
1066 |
$quotaData['APICallsQuota'], $DaysToReset,
|
1067 |
-
date('M d, Y', strtotime(date('M d, Y') . ' + ' . $DaysToReset . ' days')), $this->ctrl->getApiKey());?><br/>
|
1068 |
<?php printf(__('<a href="https://shortpixel.com/login/%s/tell-a-friend" target="_blank">Join our friend referral system</a> to win more credits. For each user that joins, you receive +100 images credits/month.','shortpixel-image-optimiser'),
|
1069 |
-
$this->ctrl->getApiKey());?>
|
1070 |
</td>
|
1071 |
</tr>
|
1072 |
<tr>
|
@@ -1075,7 +1078,7 @@ class ShortPixelView {
|
|
1075 |
</tr>
|
1076 |
<tr>
|
1077 |
<th scope="row"><label for="usedQUota"><?php _e('Number of images processed this month:','shortpixel-image-optimiser');?></label></th>
|
1078 |
-
<td><?php echo($totalCallsMade);?> (<a href="https://api.shortpixel.com/v2/report.php?key=<?php echo($this->ctrl->getApiKey());?>" target="_blank">
|
1079 |
<?php _e('see report','shortpixel-image-optimiser');?>
|
1080 |
</a>)
|
1081 |
</td>
|
@@ -1089,7 +1092,7 @@ class ShortPixelView {
|
|
1089 |
|
1090 |
<p style="padding-top: 0px; color: #818181;" >
|
1091 |
<?php printf(__('** Increase your image quota by <a href="https://shortpixel.com/login/%s" target="_blank">upgrading your ShortPixel plan.</a>','shortpixel-image-optimiser'),
|
1092 |
-
$this->ctrl->getApiKey());?>
|
1093 |
</p>
|
1094 |
|
1095 |
<table class="form-table">
|
@@ -1243,7 +1246,7 @@ class ShortPixelView {
|
|
1243 |
|
1244 |
public function getQuotaExceededHTML($message = '') {
|
1245 |
return "<div class='sp-column-actions' style='width:110px;'>
|
1246 |
-
<a class='button button-smaller button-primary' href='https://shortpixel.com/login/". $this->ctrl->getApiKey() . "' target='_blank'>"
|
1247 |
. __('Extend Quota','shortpixel-image-optimiser') .
|
1248 |
"</a>
|
1249 |
<a class='button button-smaller' href='admin.php?action=shortpixel_check_quota'>"
|
49 |
onclick="ShortPixel.recheckQuota()">
|
50 |
</div>
|
51 |
<p><?php _e('Get more image credits by referring ShortPixel to your friends!','shortpixel-image-optimiser');?>
|
52 |
+
<a href="https://shortpixel.com/login/<?php echo(defined("SHORTPIXEL_HIDE_API_KEY") ? '' : $this->ctrl->getApiKey());?>/tell-a-friend" target="_blank">
|
53 |
<?php _e('Check your account','shortpixel-image-optimiser');?>
|
54 |
</a> <?php _e('for your unique referral link. For each user that joins, you will receive +100 additional image credits/month.','shortpixel-image-optimiser');?>
|
55 |
</p>
|
289 |
</div>
|
290 |
<p><?php printf(__('Go to the ShortPixel <a href="%soptions-general.php?page=wp-shortpixel#stats">Stats</a> '
|
291 |
. 'and see all your websites\' optimized stats. Download your detailed <a href="https://api.shortpixel.com/v2/report.php?key=%s">Optimization Report</a> '
|
292 |
+
. 'to check your image optimization statistics for the last 40 days.','shortpixel-image-optimiser'),
|
293 |
+
get_admin_url(), (defined("SHORTPIXEL_HIDE_API_KEY") ? '' : $this->ctrl->getApiKey()) );?></p>
|
294 |
<?php
|
295 |
$failed = $this->ctrl->getPrioQ()->getFailed();
|
296 |
if(count($failed)) { ?>
|
581 |
?>
|
582 |
<h1><?php _e('ShortPixel Plugin Settings','shortpixel-image-optimiser');?></h1>
|
583 |
<p style="font-size:18px">
|
584 |
+
<a href="https://shortpixel.com/<?php
|
585 |
+
echo($this->ctrl->getVerifiedKey() ? "login/".(defined("SHORTPIXEL_HIDE_API_KEY") ? '' : $this->ctrl->getApiKey()) : "pricing");
|
586 |
+
?>" target="_blank" style="font-size:18px">
|
587 |
<?php _e('Upgrade now','shortpixel-image-optimiser');?>
|
588 |
</a> |
|
589 |
<a href="https://shortpixel.com/contact/<?php //echo($this->ctrl->getEncryptedData());?>" target="_blank" style="font-size:18px"><?php _e('Support','shortpixel-image-optimiser');?> </a>
|
1067 |
$DaysToReset = 30 - ((($DateNow - $DateSubscription) / 84600) % 30);
|
1068 |
printf(__('%s/month, renews in %s days, on %s ( <a href="https://shortpixel.com/login/%s" target="_blank">Need More? See the options available</a> )','shortpixel-image-optimiser'),
|
1069 |
$quotaData['APICallsQuota'], $DaysToReset,
|
1070 |
+
date('M d, Y', strtotime(date('M d, Y') . ' + ' . $DaysToReset . ' days')), (defined("SHORTPIXEL_HIDE_API_KEY") ? '' : $this->ctrl->getApiKey()));?><br/>
|
1071 |
<?php printf(__('<a href="https://shortpixel.com/login/%s/tell-a-friend" target="_blank">Join our friend referral system</a> to win more credits. For each user that joins, you receive +100 images credits/month.','shortpixel-image-optimiser'),
|
1072 |
+
(defined("SHORTPIXEL_HIDE_API_KEY") ? '' : $this->ctrl->getApiKey()));?>
|
1073 |
</td>
|
1074 |
</tr>
|
1075 |
<tr>
|
1078 |
</tr>
|
1079 |
<tr>
|
1080 |
<th scope="row"><label for="usedQUota"><?php _e('Number of images processed this month:','shortpixel-image-optimiser');?></label></th>
|
1081 |
+
<td><?php echo($totalCallsMade);?> (<a href="https://api.shortpixel.com/v2/report.php?key=<?php echo(defined("SHORTPIXEL_HIDE_API_KEY") ? '' : $this->ctrl->getApiKey());?>" target="_blank">
|
1082 |
<?php _e('see report','shortpixel-image-optimiser');?>
|
1083 |
</a>)
|
1084 |
</td>
|
1092 |
|
1093 |
<p style="padding-top: 0px; color: #818181;" >
|
1094 |
<?php printf(__('** Increase your image quota by <a href="https://shortpixel.com/login/%s" target="_blank">upgrading your ShortPixel plan.</a>','shortpixel-image-optimiser'),
|
1095 |
+
defined("SHORTPIXEL_HIDE_API_KEY") ? '' : $this->ctrl->getApiKey());?>
|
1096 |
</p>
|
1097 |
|
1098 |
<table class="form-table">
|
1246 |
|
1247 |
public function getQuotaExceededHTML($message = '') {
|
1248 |
return "<div class='sp-column-actions' style='width:110px;'>
|
1249 |
+
<a class='button button-smaller button-primary' href='https://shortpixel.com/login/". (defined("SHORTPIXEL_HIDE_API_KEY") ? '' : $this->ctrl->getApiKey()) . "' target='_blank'>"
|
1250 |
. __('Extend Quota','shortpixel-image-optimiser') .
|
1251 |
"</a>
|
1252 |
<a class='button button-smaller' href='admin.php?action=shortpixel_check_quota'>"
|
class/wp-short-pixel.php
CHANGED
@@ -271,16 +271,16 @@ class WPShortPixel {
|
|
271 |
STATUS_MAINTENANCE: <?php echo ShortPixelAPI::STATUS_MAINTENANCE; ?>,
|
272 |
WP_PLUGIN_URL: '<?php echo plugins_url( '', SHORTPIXEL_PLUGIN_FILE ); ?>',
|
273 |
WP_ADMIN_URL: '<?php echo admin_url(); ?>',
|
274 |
-
API_KEY: "<?php echo $this->_settings->apiKey; ?>",
|
275 |
DEFAULT_COMPRESSION: <?php echo $this->_settings->compressionType; ?>,
|
276 |
MEDIA_ALERT: '<?php echo $this->_settings->mediaAlert ? "done" : "todo"; ?>',
|
277 |
FRONT_BOOTSTRAP: <?php echo $this->_settings->frontBootstrap && (!isset($this->_settings->lastBackAction) || (time() - $this->_settings->lastBackAction > 600)) ? 1 : 0; ?>,
|
278 |
AJAX_URL: '<?php echo admin_url('admin-ajax.php'); ?>'
|
279 |
};
|
280 |
</script> <?php
|
281 |
-
wp_enqueue_style('short-pixel.css', plugins_url('/res/css/short-pixel.css',SHORTPIXEL_PLUGIN_FILE), array(),
|
282 |
|
283 |
-
wp_register_script('short-pixel.js', plugins_url('/res/js/short-pixel.js',SHORTPIXEL_PLUGIN_FILE), array(),
|
284 |
$jsTranslation = array(
|
285 |
'optimizeWithSP' => __( 'Optimize with ShortPixel', 'shortpixel-image-optimiser' ),
|
286 |
'changeMLToListMode' => __( 'In order to access the ShortPixel Optimization actions and info, please change to {0}List View{1}List View{2}Dismiss{3}', 'shortpixel-image-optimiser' ),
|
271 |
STATUS_MAINTENANCE: <?php echo ShortPixelAPI::STATUS_MAINTENANCE; ?>,
|
272 |
WP_PLUGIN_URL: '<?php echo plugins_url( '', SHORTPIXEL_PLUGIN_FILE ); ?>',
|
273 |
WP_ADMIN_URL: '<?php echo admin_url(); ?>',
|
274 |
+
API_KEY: "<?php echo(defined("SHORTPIXEL_HIDE_API_KEY") ? '' : $this->_settings->apiKey); ?>",
|
275 |
DEFAULT_COMPRESSION: <?php echo $this->_settings->compressionType; ?>,
|
276 |
MEDIA_ALERT: '<?php echo $this->_settings->mediaAlert ? "done" : "todo"; ?>',
|
277 |
FRONT_BOOTSTRAP: <?php echo $this->_settings->frontBootstrap && (!isset($this->_settings->lastBackAction) || (time() - $this->_settings->lastBackAction > 600)) ? 1 : 0; ?>,
|
278 |
AJAX_URL: '<?php echo admin_url('admin-ajax.php'); ?>'
|
279 |
};
|
280 |
</script> <?php
|
281 |
+
wp_enqueue_style('short-pixel.css', plugins_url('/res/css/short-pixel.css',SHORTPIXEL_PLUGIN_FILE), array(), SHORTPIXEL_IMAGE_OPTIMISER_VERSION);
|
282 |
|
283 |
+
wp_register_script('short-pixel.js', plugins_url('/res/js/short-pixel.js',SHORTPIXEL_PLUGIN_FILE), array(), SHORTPIXEL_IMAGE_OPTIMISER_VERSION);
|
284 |
$jsTranslation = array(
|
285 |
'optimizeWithSP' => __( 'Optimize with ShortPixel', 'shortpixel-image-optimiser' ),
|
286 |
'changeMLToListMode' => __( 'In order to access the ShortPixel Optimization actions and info, please change to {0}List View{1}List View{2}Dismiss{3}', 'shortpixel-image-optimiser' ),
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: ShortPixel
|
|
3 |
Tags: compress, image, compression, optimize, image optimizer, image compression, resize, compress pdf, compress jpg, compress png, image compression
|
4 |
Requires at least: 3.2.0
|
5 |
Tested up to: 4.8
|
6 |
-
Stable tag: 4.5.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -219,6 +219,10 @@ The ShortPixel team is here to help. <a href="https://shortpixel.com/contact">Co
|
|
219 |
|
220 |
== Changelog ==
|
221 |
|
|
|
|
|
|
|
|
|
222 |
= 4.5.2 =
|
223 |
|
224 |
* fix readme again
|
3 |
Tags: compress, image, compression, optimize, image optimizer, image compression, resize, compress pdf, compress jpg, compress png, image compression
|
4 |
Requires at least: 3.2.0
|
5 |
Tested up to: 4.8
|
6 |
+
Stable tag: 4.5.3
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
219 |
|
220 |
== Changelog ==
|
221 |
|
222 |
+
= 4.5.3 =
|
223 |
+
|
224 |
+
* fix Javascript error in bulk in some cases
|
225 |
+
|
226 |
= 4.5.2 =
|
227 |
|
228 |
* fix readme again
|
res/js/short-pixel.js
CHANGED
@@ -193,7 +193,8 @@ var ShortPixel = function() {
|
|
193 |
if(backupEnabled == 1) {
|
194 |
|
195 |
var successActions = jQuery('.sp-column-actions-template').clone();
|
196 |
-
|
|
|
197 |
|
198 |
var otherTypes;
|
199 |
if(type.length == 0) {
|
193 |
if(backupEnabled == 1) {
|
194 |
|
195 |
var successActions = jQuery('.sp-column-actions-template').clone();
|
196 |
+
|
197 |
+
if(!successActions.length) return false;
|
198 |
|
199 |
var otherTypes;
|
200 |
if(type.length == 0) {
|
shortpixel_api.php
CHANGED
@@ -50,7 +50,7 @@ class ShortPixelAPI {
|
|
50 |
}
|
51 |
|
52 |
$requestParameters = array(
|
53 |
-
'plugin_version' =>
|
54 |
'key' => $this->_settings->apiKey,
|
55 |
'lossy' => $compressionType === false ? $this->_settings->compressionType : $compressionType,
|
56 |
'cmyk2rgb' => $this->_settings->CMYKtoRGBconversion,
|
50 |
}
|
51 |
|
52 |
$requestParameters = array(
|
53 |
+
'plugin_version' => SHORTPIXEL_IMAGE_OPTIMISER_VERSION,
|
54 |
'key' => $this->_settings->apiKey,
|
55 |
'lossy' => $compressionType === false ? $this->_settings->compressionType : $compressionType,
|
56 |
'cmyk2rgb' => $this->_settings->CMYKtoRGBconversion,
|
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.5.
|
7 |
* Author: ShortPixel
|
8 |
* Author URI: https://shortpixel.com
|
9 |
* Text Domain: shortpixel-image-optimiser
|
@@ -17,7 +17,7 @@ define('SHORTPIXEL_PLUGIN_FILE', __FILE__);
|
|
17 |
|
18 |
define('SP_AFFILIATE_CODE', '');
|
19 |
|
20 |
-
define('
|
21 |
define('SP_MAX_TIMEOUT', 10);
|
22 |
define('SP_VALIDATE_MAX_TIMEOUT', 15);
|
23 |
define('SP_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.5.3
|
7 |
* Author: ShortPixel
|
8 |
* Author URI: https://shortpixel.com
|
9 |
* Text Domain: shortpixel-image-optimiser
|
17 |
|
18 |
define('SP_AFFILIATE_CODE', '');
|
19 |
|
20 |
+
define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "4.5.3");
|
21 |
define('SP_MAX_TIMEOUT', 10);
|
22 |
define('SP_VALIDATE_MAX_TIMEOUT', 15);
|
23 |
define('SP_BACKUP', 'ShortpixelBackups');
|