Version Description
Release date June 22nd, 2022 * Fix: some notifications could not be dismissed because of a jQuery error, kudos to @KZeni for the fix; * Fix: a JS typo was preventing certain actions from completing in the Media Library; * Fix: an error was showing up in the bulk when the legacy format date field was missing or incorrect; * Language: 0 new string added, 0 updated, 0 fuzzed, and 0 obsoleted.
Download this release
Release Info
| Developer | petredobrescu |
| Plugin | |
| Version | 5.0.4 |
| Comparing to | |
| See all releases | |
Code changes from version 5.0.3 to 5.0.4
- build/shortpixel/notices/src/NoticeModel.php +6 -6
- class/Model/Image/MediaLibraryModel.php +12 -5
- readme.txt +8 -1
- res/js/shortpixel-processor.js +1 -1
- wp-shortpixel.php +2 -2
build/shortpixel/notices/src/NoticeModel.php
CHANGED
|
@@ -234,9 +234,9 @@ class NoticeModel //extends ShortPixelModel
|
|
| 234 |
document.getElementById('button-$id').onclick = function()
|
| 235 |
{
|
| 236 |
var el = document.getElementById('$id');
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
})
|
| 241 |
});
|
| 242 |
} </script>";
|
|
@@ -289,9 +289,9 @@ class NoticeModel //extends ShortPixelModel
|
|
| 289 |
data.id = parent.getAttribute('id');
|
| 290 |
jQuery.post($url,data);
|
| 291 |
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
})
|
| 296 |
});
|
| 297 |
}";
|
| 234 |
document.getElementById('button-$id').onclick = function()
|
| 235 |
{
|
| 236 |
var el = document.getElementById('$id');
|
| 237 |
+
jQuery(el).fadeTo(100,0,function() {
|
| 238 |
+
jQuery(el).slideUp(100, 0, function () {
|
| 239 |
+
jQuery(el).remove();
|
| 240 |
})
|
| 241 |
});
|
| 242 |
} </script>";
|
| 289 |
data.id = parent.getAttribute('id');
|
| 290 |
jQuery.post($url,data);
|
| 291 |
|
| 292 |
+
jQuery(parent).fadeTo(100,0,function() {
|
| 293 |
+
jQuery(parent).slideUp(100, 0, function () {
|
| 294 |
+
jQuery(parent).remove();
|
| 295 |
})
|
| 296 |
});
|
| 297 |
}";
|
class/Model/Image/MediaLibraryModel.php
CHANGED
|
@@ -1889,7 +1889,7 @@ class MediaLibraryModel extends \ShortPixel\Model\Image\MediaLibraryThumbnailMod
|
|
| 1889 |
$adminNotices = AdminNoticesController::getInstance();
|
| 1890 |
$adminNotices->invokeLegacyNotice();
|
| 1891 |
}
|
| 1892 |
-
|
| 1893 |
Log::addDebug("Conversion of legacy: ", array($metadata));
|
| 1894 |
// echo "*** EXPORT: "; var_export($metadata); echo " *** ";
|
| 1895 |
$type = isset($data['type']) ? $this->legacyConvertType($data['type']) : '';
|
|
@@ -1906,14 +1906,21 @@ class MediaLibraryModel extends \ShortPixel\Model\Image\MediaLibraryThumbnailMod
|
|
| 1906 |
|
| 1907 |
$tsAdded = time();
|
| 1908 |
|
| 1909 |
-
|
| 1910 |
{
|
| 1911 |
//strtotime($tsOptimized)
|
| 1912 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1913 |
$newdate = $newdate->getTimestamp();
|
| 1914 |
|
| 1915 |
-
|
| 1916 |
-
|
| 1917 |
}
|
| 1918 |
|
| 1919 |
$this->image_meta->wasConverted = true;
|
| 1889 |
$adminNotices = AdminNoticesController::getInstance();
|
| 1890 |
$adminNotices->invokeLegacyNotice();
|
| 1891 |
}
|
| 1892 |
+
|
| 1893 |
Log::addDebug("Conversion of legacy: ", array($metadata));
|
| 1894 |
// echo "*** EXPORT: "; var_export($metadata); echo " *** ";
|
| 1895 |
$type = isset($data['type']) ? $this->legacyConvertType($data['type']) : '';
|
| 1906 |
|
| 1907 |
$tsAdded = time();
|
| 1908 |
|
| 1909 |
+
if ($status == self::FILE_STATUS_SUCCESS)
|
| 1910 |
{
|
| 1911 |
//strtotime($tsOptimized)
|
| 1912 |
+
$thedate = (isset($data['date'])) ? $data['date'] : false;
|
| 1913 |
+
$newdate = \DateTime::createFromFormat('Y-m-d H:i:s', $thedate);
|
| 1914 |
+
|
| 1915 |
+
if ($newdate === false)
|
| 1916 |
+
{
|
| 1917 |
+
$newdate = \DateTime::createFromFormat('Y-m-d H:i:s', get_post_time('Y-m-d H:i:s', false, $this->id));
|
| 1918 |
+
}
|
| 1919 |
+
|
| 1920 |
$newdate = $newdate->getTimestamp();
|
| 1921 |
|
| 1922 |
+
$tsOptimized = $newdate;
|
| 1923 |
+
$this->image_meta->tsOptimized = $tsOptimized;
|
| 1924 |
}
|
| 1925 |
|
| 1926 |
$this->image_meta->wasConverted = true;
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Tags: convert webp, optimize images, image optimization, resize, compressor, ima
|
|
| 4 |
Requires at least: 4.8.0
|
| 5 |
Tested up to: 6.0
|
| 6 |
Requires PHP: 5.6
|
| 7 |
-
Stable tag: 5.0.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -309,6 +309,13 @@ Add HTTP basic authentication credentials by defining these constants in wp-conf
|
|
| 309 |
|
| 310 |
== Changelog ==
|
| 311 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 312 |
= 5.0.3 =
|
| 313 |
Release date June 21st, 2022
|
| 314 |
* Fix: the plugin now recognizes the offloaded WebP/AVIF files, when they are not also present anymore on the server;
|
| 4 |
Requires at least: 4.8.0
|
| 5 |
Tested up to: 6.0
|
| 6 |
Requires PHP: 5.6
|
| 7 |
+
Stable tag: 5.0.4
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 309 |
|
| 310 |
== Changelog ==
|
| 311 |
|
| 312 |
+
= 5.0.4 =
|
| 313 |
+
Release date June 22nd, 2022
|
| 314 |
+
* Fix: some notifications could not be dismissed because of a jQuery error, kudos to @KZeni for the fix;
|
| 315 |
+
* Fix: a JS typo was preventing certain actions from completing in the Media Library;
|
| 316 |
+
* Fix: an error was showing up in the bulk when the legacy format date field was missing or incorrect;
|
| 317 |
+
* Language: 0 new string added, 0 updated, 0 fuzzed, and 0 obsoleted.
|
| 318 |
+
|
| 319 |
= 5.0.3 =
|
| 320 |
Release date June 21st, 2022
|
| 321 |
* Fix: the plugin now recognizes the offloaded WebP/AVIF files, when they are not also present anymore on the server;
|
res/js/shortpixel-processor.js
CHANGED
|
@@ -440,7 +440,7 @@ window.ShortPixelProcessor =
|
|
| 440 |
{
|
| 441 |
this.HandleItemError(response.result, type);
|
| 442 |
}
|
| 443 |
-
|
| 444 |
{
|
| 445 |
imageHandled = this.screen.HandleImage(response, type); // whole response here is single item. (final!)
|
| 446 |
}
|
| 440 |
{
|
| 441 |
this.HandleItemError(response.result, type);
|
| 442 |
}
|
| 443 |
+
else if (! imageHandled)
|
| 444 |
{
|
| 445 |
imageHandled = this.screen.HandleImage(response, type); // whole response here is single item. (final!)
|
| 446 |
}
|
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="/wp-admin/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: 5.0.
|
| 7 |
* Author: ShortPixel
|
| 8 |
* Author URI: https://shortpixel.com
|
| 9 |
* GitHub Plugin URI: https://github.com/short-pixel-optimizer/shortpixel-image-optimiser
|
|
@@ -30,7 +30,7 @@ if (! defined('SHORTPIXEL_RESET_ON_ACTIVATE'))
|
|
| 30 |
define('SHORTPIXEL_PLUGIN_FILE', __FILE__);
|
| 31 |
define('SHORTPIXEL_PLUGIN_DIR', __DIR__);
|
| 32 |
|
| 33 |
-
define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "5.0.
|
| 34 |
|
| 35 |
define('SHORTPIXEL_BACKUP', 'ShortpixelBackups');
|
| 36 |
define('SHORTPIXEL_MAX_FAIL_RETRIES', 3);
|
| 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="/wp-admin/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: 5.0.4
|
| 7 |
* Author: ShortPixel
|
| 8 |
* Author URI: https://shortpixel.com
|
| 9 |
* GitHub Plugin URI: https://github.com/short-pixel-optimizer/shortpixel-image-optimiser
|
| 30 |
define('SHORTPIXEL_PLUGIN_FILE', __FILE__);
|
| 31 |
define('SHORTPIXEL_PLUGIN_DIR', __DIR__);
|
| 32 |
|
| 33 |
+
define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "5.0.4");
|
| 34 |
|
| 35 |
define('SHORTPIXEL_BACKUP', 'ShortpixelBackups');
|
| 36 |
define('SHORTPIXEL_MAX_FAIL_RETRIES', 3);
|
