Version Description
Release date February 8th, 2022
* Fix: an error was occurring on new installs when using PHP8;
* Fix: when uploading an image through Gutenberg's image block, the optimization wasn't getting triggered;
* Fix: wrong path for picturefill.js
that was used only in certain cases on IE;
* Language: 0 new string added, 0 updated, 0 fuzzed, and 0 obsoleted.
Download this release
Release Info
Developer | petredobrescu |
Plugin | ShortPixel Image Optimizer |
Version | 4.22.8 |
Comparing to | |
See all releases |
Code changes from version 4.22.7 to 4.22.8
- class/Controller/FrontController.php +1 -1
- class/Controller/SettingsController.php +1 -1
- readme.txt +8 -1
- shortpixel-plugin.php +2 -1
- wp-shortpixel.php +2 -2
class/Controller/FrontController.php
CHANGED
@@ -114,7 +114,7 @@ class FrontController extends \ShortPixel\Controller
|
|
114 |
. 'if(!window.HTMLPictureElement && document.addEventListener) {'
|
115 |
. 'window.addEventListener("DOMContentLoaded", function() {'
|
116 |
. 'var scriptTag = document.createElement("script");'
|
117 |
-
. 'scriptTag.src = "' . plugins_url('/res/js/picturefill.min.js',
|
118 |
. 'document.body.appendChild(scriptTag);'
|
119 |
. '});'
|
120 |
. '}'
|
114 |
. 'if(!window.HTMLPictureElement && document.addEventListener) {'
|
115 |
. 'window.addEventListener("DOMContentLoaded", function() {'
|
116 |
. 'var scriptTag = document.createElement("script");'
|
117 |
+
. 'scriptTag.src = "' . plugins_url('/res/js/picturefill.min.js', SHORTPIXEL_PLUGIN_FILE) . '";'
|
118 |
. 'document.body.appendChild(scriptTag);'
|
119 |
. '});'
|
120 |
. '}'
|
class/Controller/SettingsController.php
CHANGED
@@ -191,7 +191,7 @@ class SettingsController extends \ShortPixel\Controller
|
|
191 |
$this->view->customFolders= $this->loadCustomFolders();
|
192 |
$this->view->allThumbSizes = $this->shortPixel->getAllThumbnailSizes();
|
193 |
$this->view->averageCompression = $this->shortPixel->getAverageCompression();
|
194 |
-
$this->view->savedBandwidth = \WpShortPixel::formatBytes($this->view->data->savedSpace * 10000,2);
|
195 |
$this->view->resources = wp_remote_post($this->model->httpProto . "://shortpixel.com/resources-frag");
|
196 |
if (is_wp_error($this->view->resources))
|
197 |
$this->view->resources = null;
|
191 |
$this->view->customFolders= $this->loadCustomFolders();
|
192 |
$this->view->allThumbSizes = $this->shortPixel->getAllThumbnailSizes();
|
193 |
$this->view->averageCompression = $this->shortPixel->getAverageCompression();
|
194 |
+
$this->view->savedBandwidth = \WpShortPixel::formatBytes( intval($this->view->data->savedSpace) * 10000,2);
|
195 |
$this->view->resources = wp_remote_post($this->model->httpProto . "://shortpixel.com/resources-frag");
|
196 |
if (is_wp_error($this->view->resources))
|
197 |
$this->view->resources = null;
|
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.9
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 4.22.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -314,6 +314,13 @@ Alternatively, you can use this filter in your theme's functions.php file:
|
|
314 |
|
315 |
== Changelog ==
|
316 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
317 |
= 4.22.7 =
|
318 |
Release date January 17th, 2022
|
319 |
* Fix: switched all requests to the API to https to avoid insecure warnings;
|
4 |
Requires at least: 4.2.0
|
5 |
Tested up to: 5.9
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 4.22.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
314 |
|
315 |
== Changelog ==
|
316 |
|
317 |
+
= 4.22.8 =
|
318 |
+
Release date February 8th, 2022
|
319 |
+
* Fix: an error was occurring on new installs when using PHP8;
|
320 |
+
* Fix: when uploading an image through Gutenberg's image block, the optimization wasn't getting triggered;
|
321 |
+
* Fix: wrong path for `picturefill.js` that was used only in certain cases on IE;
|
322 |
+
* Language: 0 new string added, 0 updated, 0 fuzzed, and 0 obsoleted.
|
323 |
+
|
324 |
= 4.22.7 =
|
325 |
Release date January 17th, 2022
|
326 |
* Fix: switched all requests to the API to https to avoid insecure warnings;
|
shortpixel-plugin.php
CHANGED
@@ -145,8 +145,9 @@ class ShortPixelPlugin
|
|
145 |
}
|
146 |
add_action('wp_handle_replace', array($admin,'handleReplaceHook'));
|
147 |
|
148 |
-
if($this->settings()->autoMediaLibrary && $this->env()->is_front === false) {
|
149 |
|
|
|
|
|
150 |
add_filter( 'wp_generate_attachment_metadata', array($admin,'handleImageUploadHook'), 10, 2 );
|
151 |
// @todo Document what plugin does mpp
|
152 |
add_filter( 'mpp_generate_metadata', array($admin,'handleImageUploadHook'), 10, 2 );
|
145 |
}
|
146 |
add_action('wp_handle_replace', array($admin,'handleReplaceHook'));
|
147 |
|
|
|
148 |
|
149 |
+
// && $this->env()->is_front === false removed - otherwise it won't work in Gutenberg image upload
|
150 |
+
if($this->settings()->autoMediaLibrary ) {
|
151 |
add_filter( 'wp_generate_attachment_metadata', array($admin,'handleImageUploadHook'), 10, 2 );
|
152 |
// @todo Document what plugin does mpp
|
153 |
add_filter( 'mpp_generate_metadata', array($admin,'handleImageUploadHook'), 10, 2 );
|
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.8
|
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.8");
|
37 |
define('SHORTPIXEL_MAX_TIMEOUT', 10);
|
38 |
define('SHORTPIXEL_VALIDATE_MAX_TIMEOUT', 15);
|
39 |
define('SHORTPIXEL_BACKUP', 'ShortpixelBackups');
|