Version Description
Release date May 5th, 2021 * Fix: undefined variable notice; * Fix: some strings had the wrong translation domain; * Fix: WSO banner can now be hidden either with a constant or with a filter; * Language: 0 new strings added, 0 updated, 0 fuzzed, and 0 obsoleted.
Download this release
Release Info
| Developer | petredobrescu |
| Plugin | |
| Version | 4.22.1 |
| Comparing to | |
| See all releases | |
Code changes from version 4.22.0 to 4.22.1
- class/Controller/AdminNoticesController.php +1 -4
- class/view/settings/part-advanced.php +1 -0
- class/view/settings/part-wso.php +10 -2
- readme.txt +16 -1
- shortpixel-plugin.php +1 -1
- wp-shortpixel.php +2 -2
class/Controller/AdminNoticesController.php
CHANGED
|
@@ -672,10 +672,7 @@ class AdminNoticesController extends \ShortPixel\Controller
|
|
| 672 |
$content = false;
|
| 673 |
if (! is_wp_error( $notices_response ) )
|
| 674 |
{
|
| 675 |
-
|
| 676 |
-
$notices = json_decode($notices_response['body']);
|
| 677 |
-
Log::addTemp($notices);
|
| 678 |
-
Log::addTemp(json_last_error_msg());
|
| 679 |
|
| 680 |
if (! is_array($notices))
|
| 681 |
$notices = false;
|
| 672 |
$content = false;
|
| 673 |
if (! is_wp_error( $notices_response ) )
|
| 674 |
{
|
| 675 |
+
$notices = json_decode($notices_response['body']);
|
|
|
|
|
|
|
|
|
|
| 676 |
|
| 677 |
if (! is_array($notices))
|
| 678 |
$notices = false;
|
class/view/settings/part-advanced.php
CHANGED
|
@@ -10,6 +10,7 @@ namespace ShortPixel;
|
|
| 10 |
$deliverWebpUnalteredDisabled = '';
|
| 11 |
$deliverWebpAlteredDisabledNotice = false;
|
| 12 |
$deliverWebpUnalteredLabel ='';
|
|
|
|
| 13 |
|
| 14 |
if( $this->is_nginx ){
|
| 15 |
$deliverWebpUnaltered = ''; // Uncheck
|
| 10 |
$deliverWebpUnalteredDisabled = '';
|
| 11 |
$deliverWebpAlteredDisabledNotice = false;
|
| 12 |
$deliverWebpUnalteredLabel ='';
|
| 13 |
+
$deliverAVIFLabel ='';
|
| 14 |
|
| 15 |
if( $this->is_nginx ){
|
| 16 |
$deliverWebpUnaltered = ''; // Uncheck
|
class/view/settings/part-wso.php
CHANGED
|
@@ -1,5 +1,13 @@
|
|
| 1 |
<?php
|
| 2 |
namespace ShortPixel;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
?>
|
| 4 |
|
| 5 |
<section class='wso banner'>
|
|
@@ -7,11 +15,11 @@ namespace ShortPixel;
|
|
| 7 |
<img src="<?php echo \wpSPIO()->plugin_url() ?>res/img/robo-winky.png" />
|
| 8 |
</span>
|
| 9 |
<span class="line"><h3>
|
| 10 |
-
<?php printf(__('ARE YOU CONCERNED WITH YOUR %s %s SITE SPEED? %s', '
|
| 11 |
</h3>
|
| 12 |
</span>
|
| 13 |
<span class="line"><h3>
|
| 14 |
-
<?php printf(__('ALLOW ShortPixel SPECIALISTS TO %s FIND THE SOLUTION FOR YOU.', '
|
| 15 |
</h3>
|
| 16 |
</span>
|
| 17 |
<span class="button-wrap">
|
| 1 |
<?php
|
| 2 |
namespace ShortPixel;
|
| 3 |
+
|
| 4 |
+
$bool = apply_filters('shortpixel/settings/no_banner', true);
|
| 5 |
+
if (! $bool )
|
| 6 |
+
return;
|
| 7 |
+
|
| 8 |
+
if ( defined('SHORTPIXEL_NO_BANNER') && SHORTPIXEL_NO_BANNER == true)
|
| 9 |
+
return;
|
| 10 |
+
|
| 11 |
?>
|
| 12 |
|
| 13 |
<section class='wso banner'>
|
| 15 |
<img src="<?php echo \wpSPIO()->plugin_url() ?>res/img/robo-winky.png" />
|
| 16 |
</span>
|
| 17 |
<span class="line"><h3>
|
| 18 |
+
<?php printf(__('ARE YOU CONCERNED WITH YOUR %s %s SITE SPEED? %s', 'shortpixel-image-optimiser'),'<br>', '<span class="red">','</span>'); ?>
|
| 19 |
</h3>
|
| 20 |
</span>
|
| 21 |
<span class="line"><h3>
|
| 22 |
+
<?php printf(__('ALLOW ShortPixel SPECIALISTS TO %s FIND THE SOLUTION FOR YOU.', 'shortpixel-image-optimiser'), '<br>'); ?>
|
| 23 |
</h3>
|
| 24 |
</span>
|
| 25 |
<span class="button-wrap">
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Tags: convert webp, optimize images, image optimization, resize, compressor, ima
|
|
| 4 |
Requires at least: 4.2.0
|
| 5 |
Tested up to: 5.7
|
| 6 |
Requires PHP: 5.3
|
| 7 |
-
Stable tag: 4.22.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -284,6 +284,14 @@ Hide the Cloudflare settings by defining these constants in wp-config.php:
|
|
| 284 |
`define('SHORTPIXEL_CFTOKEN', 'the Cloudflare API token that has Purge Cache right');`
|
| 285 |
`define('SHORTPIXEL_CFZONE', 'The Zone ID from the domain settings in Cloudflare');`
|
| 286 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 287 |
== Screenshots ==
|
| 288 |
|
| 289 |
1. Bulk optimization running. (Media>Bulk ShortPixel)
|
|
@@ -306,6 +314,13 @@ Hide the Cloudflare settings by defining these constants in wp-config.php:
|
|
| 306 |
|
| 307 |
== Changelog ==
|
| 308 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 309 |
= 4.22.0 =
|
| 310 |
Release date April 28th, 2021
|
| 311 |
* New: ability to generate and serve the AVIF version of the images;
|
| 4 |
Requires at least: 4.2.0
|
| 5 |
Tested up to: 5.7
|
| 6 |
Requires PHP: 5.3
|
| 7 |
+
Stable tag: 4.22.1
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 284 |
`define('SHORTPIXEL_CFTOKEN', 'the Cloudflare API token that has Purge Cache right');`
|
| 285 |
`define('SHORTPIXEL_CFZONE', 'The Zone ID from the domain settings in Cloudflare');`
|
| 286 |
|
| 287 |
+
Hide the WSO banner in the settings by defining this constant in wp-config.php:
|
| 288 |
+
|
| 289 |
+
`define('SHORTPIXEL_NO_BANNER', true);`
|
| 290 |
+
|
| 291 |
+
Alternatively, you can use this filter in your theme's functions.php file:
|
| 292 |
+
|
| 293 |
+
`add_filter('shortpixel/settings/no_banner', true);`
|
| 294 |
+
|
| 295 |
== Screenshots ==
|
| 296 |
|
| 297 |
1. Bulk optimization running. (Media>Bulk ShortPixel)
|
| 314 |
|
| 315 |
== Changelog ==
|
| 316 |
|
| 317 |
+
= 4.22.1 =
|
| 318 |
+
Release date May 5th, 2021
|
| 319 |
+
* Fix: undefined variable notice;
|
| 320 |
+
* Fix: some strings had the wrong translation domain;
|
| 321 |
+
* Fix: WSO banner can now be hidden either with a constant or with a filter;
|
| 322 |
+
* Language: 0 new strings added, 0 updated, 0 fuzzed, and 0 obsoleted.
|
| 323 |
+
|
| 324 |
= 4.22.0 =
|
| 325 |
Release date April 28th, 2021
|
| 326 |
* New: ability to generate and serve the AVIF version of the images;
|
shortpixel-plugin.php
CHANGED
|
@@ -375,7 +375,7 @@ class ShortPixelPlugin
|
|
| 375 |
$env = wpSPIO()->env();
|
| 376 |
|
| 377 |
if(\WPShortPixelSettings::getOpt('deliverWebp') == 3 && ! $env->is_nginx) {
|
| 378 |
-
\WpShortPixel::alterHtaccess(
|
| 379 |
}
|
| 380 |
|
| 381 |
\WpShortPixelDb::checkCustomTables();
|
| 375 |
$env = wpSPIO()->env();
|
| 376 |
|
| 377 |
if(\WPShortPixelSettings::getOpt('deliverWebp') == 3 && ! $env->is_nginx) {
|
| 378 |
+
\WpShortPixel::alterHtaccess(true, true); //add the htaccess lines
|
| 379 |
}
|
| 380 |
|
| 381 |
\WpShortPixelDb::checkCustomTables();
|
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-settings" target="_blank">Settings > ShortPixel</a> page on how to start optimizing your image library and make your website load faster.
|
| 6 |
-
* Version: 4.22.
|
| 7 |
* Author: ShortPixel
|
| 8 |
* Author URI: https://shortpixel.com
|
| 9 |
* GitHub Plugin URI: https://github.com/short-pixel-optimizer/shortpixel-image-optimiser
|
|
@@ -33,7 +33,7 @@ define('SHORTPIXEL_PLUGIN_DIR', __DIR__);
|
|
| 33 |
|
| 34 |
//define('SHORTPIXEL_AFFILIATE_CODE', '');
|
| 35 |
|
| 36 |
-
define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "4.22.
|
| 37 |
define('SHORTPIXEL_MAX_TIMEOUT', 10);
|
| 38 |
define('SHORTPIXEL_VALIDATE_MAX_TIMEOUT', 15);
|
| 39 |
define('SHORTPIXEL_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-settings" target="_blank">Settings > ShortPixel</a> page on how to start optimizing your image library and make your website load faster.
|
| 6 |
+
* Version: 4.22.1
|
| 7 |
* Author: ShortPixel
|
| 8 |
* Author URI: https://shortpixel.com
|
| 9 |
* GitHub Plugin URI: https://github.com/short-pixel-optimizer/shortpixel-image-optimiser
|
| 33 |
|
| 34 |
//define('SHORTPIXEL_AFFILIATE_CODE', '');
|
| 35 |
|
| 36 |
+
define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "4.22.1");
|
| 37 |
define('SHORTPIXEL_MAX_TIMEOUT', 10);
|
| 38 |
define('SHORTPIXEL_VALIDATE_MAX_TIMEOUT', 15);
|
| 39 |
define('SHORTPIXEL_BACKUP', 'ShortpixelBackups');
|
