ShortPixel Image Optimizer - Version 4.19.1

Version Description

Release date June 9th 2020 * Fixed a fatal error when WebP delivery was active; * Fixed an error in a specific situation when running out of credits while the bulk processing was running; * Language 0 new strings added, 0 updated, 0 fuzzied, and 0 obsoleted.

Download this release

Release Info

Developer petredobrescu
Plugin Icon 128x128 ShortPixel Image Optimizer
Version 4.19.1
Comparing to
See all releases

Code changes from version 4.19.0 to 4.19.1

build/shortpixel/notices/src/NoticeController.php CHANGED
@@ -182,7 +182,7 @@ class NoticeController //extends ShortPixelController
182
  for($i = 0; $i < count(self::$notices); $i++)
183
  {
184
  $item = self::$notices[$i];
185
- if ($item->getID() == $id)
186
  {
187
  Log::addDebug('Removing notice with ID ' . $id);
188
  unset(self::$notices[$i]);
182
  for($i = 0; $i < count(self::$notices); $i++)
183
  {
184
  $item = self::$notices[$i];
185
+ if (is_object($item) && $item->getID() == $id)
186
  {
187
  Log::addDebug('Removing notice with ID ' . $id);
188
  unset(self::$notices[$i]);
class/BuildAutoLoader.php CHANGED
@@ -6,6 +6,7 @@ class BuildAutoLoader
6
 
7
  public static function buildJSON()
8
  {
 
9
  $plugin = array(
10
  'name' => 'ShortPixel/Plugin',
11
  'description' => 'ShortPixel AutoLoader',
@@ -16,7 +17,11 @@ class BuildAutoLoader
16
  );
17
 
18
  $f = fopen('class/plugin.json', 'w');
19
- fwrite($f, json_encode($plugin));
 
 
 
 
20
  fclose($f);
21
  }
22
 
@@ -28,6 +33,7 @@ class BuildAutoLoader
28
  'class/wp-shortpixel-settings.php',
29
  'class/view/shortpixel_view.php',
30
  'class/shortpixel-png2jpg.php',
 
31
  );
32
 
33
  $models = array(
@@ -58,7 +64,7 @@ class BuildAutoLoader
58
  'class/external/wpengine.php',
59
  );
60
 
61
-
62
  return array_merge($main,$models,$db,$externals);
63
  }
64
 
6
 
7
  public static function buildJSON()
8
  {
9
+ echo 'Building Plugin.JSON';
10
  $plugin = array(
11
  'name' => 'ShortPixel/Plugin',
12
  'description' => 'ShortPixel AutoLoader',
17
  );
18
 
19
  $f = fopen('class/plugin.json', 'w');
20
+ $result = fwrite($f, json_encode($plugin));
21
+
22
+ if ($result === false)
23
+ echo "!!! Error !!! Could not write Plugin.json";
24
+
25
  fclose($f);
26
  }
27
 
33
  'class/wp-shortpixel-settings.php',
34
  'class/view/shortpixel_view.php',
35
  'class/shortpixel-png2jpg.php',
36
+ 'class/front/img-to-picture-webp.php',
37
  );
38
 
39
  $models = array(
64
  'class/external/wpengine.php',
65
  );
66
 
67
+ echo "Build Plugin.JSON ";
68
  return array_merge($main,$models,$db,$externals);
69
  }
70
 
class/Controller/AdminNoticesController.php CHANGED
@@ -78,11 +78,11 @@ class AdminNoticesController extends \ShortPixel\Controller
78
  /** ReInstates A Persistent Notice manually */
79
  public static function reInstateQuotaExceeded()
80
  {
81
- $noticeControl = Notices::getInstance();
82
- $notice = $noticeControl->getNoticeByID(self::MSG_QUOTA_REACHED);
83
- $notice->unDismiss();
84
-
85
- $noticeControl->update();
86
  }
87
 
88
  public function displayNotices()
78
  /** ReInstates A Persistent Notice manually */
79
  public static function reInstateQuotaExceeded()
80
  {
81
+ //$noticeControl = Notices::getInstance();
82
+ //$notice = $noticeControl->getNoticeByID(self::MSG_QUOTA_REACHED);
83
+ Notices::removeNoticeByID(self::MSG_QUOTA_REACHED);
84
+ //$notice->unDismiss();
85
+ //$noticeControl->update();
86
  }
87
 
88
  public function displayNotices()
class/Controller/FrontController.php CHANGED
@@ -3,6 +3,7 @@ namespace ShortPixel\Controller;
3
  use ShortPixel\ShortPixelLogger\ShortPixelLogger as Log;
4
  use ShortPixel\Notices\NoticeController as Notices;
5
 
 
6
 
7
  /** Handle everything that SP is doing front-wise */
8
  class FrontController extends \ShortPixel\Controller
3
  use ShortPixel\ShortPixelLogger\ShortPixelLogger as Log;
4
  use ShortPixel\Notices\NoticeController as Notices;
5
 
6
+ use ShortPixel\ShortPixelImgToPictureWebp as ShortPixelImgToPictureWebp;
7
 
8
  /** Handle everything that SP is doing front-wise */
9
  class FrontController extends \ShortPixel\Controller
class/Controller/View/BulkViewController.php CHANGED
@@ -174,6 +174,7 @@ protected $selected_folders = array();
174
 
175
  if($settings->quotaExceeded == 1) {
176
  AdminNoticesController::reInstateQuotaExceeded();
 
177
  return false;
178
  }
179
 
174
 
175
  if($settings->quotaExceeded == 1) {
176
  AdminNoticesController::reInstateQuotaExceeded();
177
+ $this->loadView();
178
  return false;
179
  }
180
 
class/plugin.json CHANGED
@@ -1 +1 @@
1
- {"name":"ShortPixel\/Plugin","description":"ShortPixel AutoLoader","type":"function","autoload":{"psr-4":{"ShortPixel":"class"},"files":["shortpixel_api.php","class\/wp-short-pixel.php","class\/wp-shortpixel-settings.php","class\/view\/shortpixel_view.php","class\/shortpixel-png2jpg.php","class\/Model\/shortpixel-entity.php","class\/Model\/shortpixel-meta.php","class\/Model\/shortpixel-folder.php","class\/db\/shortpixel-db.php","class\/db\/wp-shortpixel-db.php","class\/db\/shortpixel-custom-meta-dao.php","class\/db\/wp-shortpixel-media-library-adapter.php","class\/db\/shortpixel-meta-facade.php","class\/external\/cloudflare.php","class\/external\/flywheel.php","class\/external\/gravityforms.php","class\/external\/helpscout.php","class\/external\/nextgen.php","class\/external\/securi.php","class\/external\/shortpixel_queue_db.php","class\/external\/visualcomposer.php","class\/external\/wp-offload-media.php","class\/external\/wpengine.php"]}}
1
+ {"name":"ShortPixel\/Plugin","description":"ShortPixel AutoLoader","type":"function","autoload":{"psr-4":{"ShortPixel":"class"},"files":["shortpixel_api.php","class\/wp-short-pixel.php","class\/wp-shortpixel-settings.php","class\/view\/shortpixel_view.php","class\/shortpixel-png2jpg.php","class\/front\/img-to-picture-webp.php","class\/Model\/shortpixel-entity.php","class\/Model\/shortpixel-meta.php","class\/Model\/shortpixel-folder.php","class\/db\/shortpixel-db.php","class\/db\/wp-shortpixel-db.php","class\/db\/shortpixel-custom-meta-dao.php","class\/db\/wp-shortpixel-media-library-adapter.php","class\/db\/shortpixel-meta-facade.php","class\/external\/cloudflare.php","class\/external\/flywheel.php","class\/external\/gravityforms.php","class\/external\/helpscout.php","class\/external\/nextgen.php","class\/external\/securi.php","class\/external\/shortpixel_queue_db.php","class\/external\/visualcomposer.php","class\/external\/wp-offload-media.php","class\/external\/wpengine.php"]}}
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: compressor, image, compression, optimize, image optimizer, image optimiser
4
  Requires at least: 3.2.0
5
  Tested up to: 5.4.1
6
  Requires PHP: 5.3
7
- Stable tag: 4.19.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -281,6 +281,13 @@ Hide the Cloudflare settings by defining these constants in wp-config.php:
281
 
282
  == Changelog ==
283
 
 
 
 
 
 
 
 
284
  = 4.19.0 =
285
 
286
  Release date June 4th 2020
4
  Requires at least: 3.2.0
5
  Tested up to: 5.4.1
6
  Requires PHP: 5.3
7
+ Stable tag: 4.19.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
281
 
282
  == Changelog ==
283
 
284
+ = 4.19.1 =
285
+
286
+ Release date June 9th 2020
287
+ * Fixed a fatal error when WebP delivery was active;
288
+ * Fixed an error in a specific situation when running out of credits while the bulk processing was running;
289
+ * Language – 0 new strings added, 0 updated, 0 fuzzied, and 0 obsoleted.
290
+
291
  = 4.19.0 =
292
 
293
  Release date June 4th 2020
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 &gt; ShortPixel</a> page on how to start optimizing your image library and make your website load faster.
6
- * Version: 4.19.0
7
  * Author: ShortPixel
8
  * Author URI: https://shortpixel.com
9
  * Text Domain: shortpixel-image-optimiser
@@ -32,7 +32,7 @@ define('SHORTPIXEL_PLUGIN_DIR', __DIR__);
32
 
33
  //define('SHORTPIXEL_AFFILIATE_CODE', '');
34
 
35
- define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "4.19.0");
36
  define('SHORTPIXEL_MAX_TIMEOUT', 10);
37
  define('SHORTPIXEL_VALIDATE_MAX_TIMEOUT', 15);
38
  define('SHORTPIXEL_BACKUP', 'ShortpixelBackups');
@@ -88,7 +88,6 @@ $log = \ShortPixel\ShortPixelLogger\ShortPixelLogger::getInstance();
88
  if (\ShortPixel\ShortPixelLogger\ShortPixelLogger::debugIsActive())
89
  $log->setLogPath(SHORTPIXEL_BACKUP_FOLDER . "/shortpixel_log");
90
 
91
-
92
  /* Function to reach core function of ShortPixel
93
  * Use to get plugin url, plugin path, or certain core controllers
94
  */
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 &gt; ShortPixel</a> page on how to start optimizing your image library and make your website load faster.
6
+ * Version: 4.19.1
7
  * Author: ShortPixel
8
  * Author URI: https://shortpixel.com
9
  * Text Domain: shortpixel-image-optimiser
32
 
33
  //define('SHORTPIXEL_AFFILIATE_CODE', '');
34
 
35
+ define('SHORTPIXEL_IMAGE_OPTIMISER_VERSION', "4.19.1");
36
  define('SHORTPIXEL_MAX_TIMEOUT', 10);
37
  define('SHORTPIXEL_VALIDATE_MAX_TIMEOUT', 15);
38
  define('SHORTPIXEL_BACKUP', 'ShortpixelBackups');
88
  if (\ShortPixel\ShortPixelLogger\ShortPixelLogger::debugIsActive())
89
  $log->setLogPath(SHORTPIXEL_BACKUP_FOLDER . "/shortpixel_log");
90
 
 
91
  /* Function to reach core function of ShortPixel
92
  * Use to get plugin url, plugin path, or certain core controllers
93
  */