Version Description
- Check if the server address is localhost and warn when activating the API key.
- Quota exceeded now displays a link to billing page
Download this release
Release Info
Developer | ShortPixel |
Plugin | ShortPixel Image Optimizer |
Version | 2.1.9 |
Comparing to | |
See all releases |
Code changes from version 2.1.8 to 2.1.9
- readme.txt +6 -1
- wp-shortpixel.php +9 -4
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: AlexSP
|
|
4 |
Tags: picture, optimization, image editor, pngout, upload speed, shortpixel, compression, jpegmini, webp, lossless, cwebp, media, tinypng, jpegtran,image, image optimisation, 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
|
5 |
Requires at least: 3.0.0 or higher
|
6 |
Tested up to: 4.2
|
7 |
-
Stable tag: 2.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -118,6 +118,11 @@ The ShortPixel team is here to help. <a href="https://shortpixel.com/contact">Co
|
|
118 |
|
119 |
== Changelog ==
|
120 |
|
|
|
|
|
|
|
|
|
|
|
121 |
= 2.1.8 =
|
122 |
|
123 |
* improved texts/explanations for different sections
|
4 |
Tags: picture, optimization, image editor, pngout, upload speed, shortpixel, compression, jpegmini, webp, lossless, cwebp, media, tinypng, jpegtran,image, image optimisation, 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
|
5 |
Requires at least: 3.0.0 or higher
|
6 |
Tested up to: 4.2
|
7 |
+
Stable tag: 2.1.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= 2.1.9 =
|
122 |
+
|
123 |
+
* Check if the server address is localhost and warn when activating the API key.
|
124 |
+
* Quota exceeded now displays a link to billing page
|
125 |
+
|
126 |
= 2.1.8 =
|
127 |
|
128 |
* improved texts/explanations for different sections
|
wp-shortpixel.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: ShortPixel Image Optimizer
|
4 |
* Plugin URI: https://shortpixel.com/
|
5 |
* Description: ShortPixel is an image compression tool that helps improve your website performance. The plugin optimizes images automatically using both lossy and lossless compression. Resulting, smaller, images are no different in quality from the original. To install: 1) Click the "Activate" link to the left of this description. 2) <a href="https://shortpixel.com/wp-apikey" target="_blank">Free Sign up</a> for your unique API Key . 3) Check your email for your API key. 4) Use your API key to activate ShortPixel plugin in the 'Plugins' menu in WordPress. 5) Done!
|
6 |
-
* Version: 2.1.
|
7 |
* Author: ShortPixel
|
8 |
* Author URI: https://shortpixel.com
|
9 |
*/
|
@@ -15,7 +15,7 @@ if ( !is_plugin_active( 'wpmandrill/wpmandrill.php' ) ) {
|
|
15 |
require_once( ABSPATH . 'wp-includes/pluggable.php' );//to avoid conflict with wpmandrill plugin
|
16 |
}
|
17 |
|
18 |
-
define('PLUGIN_VERSION', "2.1.
|
19 |
define('SP_DEBUG', false);
|
20 |
define('SP_LOG', false);
|
21 |
define('SP_MAX_TIMEOUT', 10);
|
@@ -851,7 +851,12 @@ class WPShortPixel {
|
|
851 |
if($validityData['APIKeyValid']) {
|
852 |
if(isset($_POST['validate'])) {
|
853 |
//display notification
|
854 |
-
|
|
|
|
|
|
|
|
|
|
|
855 |
}
|
856 |
update_option('wp-short-pixel-verifiedKey', true);
|
857 |
$this->_verifiedKey = true;
|
@@ -1291,7 +1296,7 @@ HTML;
|
|
1291 |
{
|
1292 |
if ( trim(strip_tags($data['ShortPixelImprovement'])) == "Quota exceeded" )
|
1293 |
{
|
1294 |
-
print
|
1295 |
if ( !get_option('wp-short-pixel-quota-exceeded') )
|
1296 |
print " | <a href=\"admin.php?action=shortpixel_manual_optimize&attachment_ID={$id}\">Try again</a>";
|
1297 |
return;
|
3 |
* Plugin Name: ShortPixel Image Optimizer
|
4 |
* Plugin URI: https://shortpixel.com/
|
5 |
* Description: ShortPixel is an image compression tool that helps improve your website performance. The plugin optimizes images automatically using both lossy and lossless compression. Resulting, smaller, images are no different in quality from the original. To install: 1) Click the "Activate" link to the left of this description. 2) <a href="https://shortpixel.com/wp-apikey" target="_blank">Free Sign up</a> for your unique API Key . 3) Check your email for your API key. 4) Use your API key to activate ShortPixel plugin in the 'Plugins' menu in WordPress. 5) Done!
|
6 |
+
* Version: 2.1.9
|
7 |
* Author: ShortPixel
|
8 |
* Author URI: https://shortpixel.com
|
9 |
*/
|
15 |
require_once( ABSPATH . 'wp-includes/pluggable.php' );//to avoid conflict with wpmandrill plugin
|
16 |
}
|
17 |
|
18 |
+
define('PLUGIN_VERSION', "2.1.9");
|
19 |
define('SP_DEBUG', false);
|
20 |
define('SP_LOG', false);
|
21 |
define('SP_MAX_TIMEOUT', 10);
|
851 |
if($validityData['APIKeyValid']) {
|
852 |
if(isset($_POST['validate'])) {
|
853 |
//display notification
|
854 |
+
if(in_array($_SERVER["SERVER_ADDR"], array("127.0.0.1","::1"))) {
|
855 |
+
printf($noticeHTML, '#FFC800', "API Key is valid but your server seems to have a local address.
|
856 |
+
Please make sure that your server is accessible from the Internet before using the API or otherwise we won't be able to optimize them.");
|
857 |
+
} else {
|
858 |
+
printf($noticeHTML, '#7ad03a', 'API Key valid!');
|
859 |
+
}
|
860 |
}
|
861 |
update_option('wp-short-pixel-verifiedKey', true);
|
862 |
$this->_verifiedKey = true;
|
1296 |
{
|
1297 |
if ( trim(strip_tags($data['ShortPixelImprovement'])) == "Quota exceeded" )
|
1298 |
{
|
1299 |
+
print QUOTA_EXCEEDED;
|
1300 |
if ( !get_option('wp-short-pixel-quota-exceeded') )
|
1301 |
print " | <a href=\"admin.php?action=shortpixel_manual_optimize&attachment_ID={$id}\">Try again</a>";
|
1302 |
return;
|