ShortPixel Image Optimizer - Version 5.0.2

Version Description

Release date June 16th, 2022 * Fix: an uncaught error was fixed for the sites running without the fileinfo PHP extension that is needed by the plugin to get the mime type of the files; * Fix: the resize switch from the settings wasn't properly working; * Fix: a hidden modal in the dashboard was taking up a lot of empty space; * Fix: some popups in the settings were always getting triggered in WordPress versions 5.5 and below; * Fix: if the admin bar tooltip cannot load for any reason, let the JS processor continue its job; * Fix: advancing from step 2 of the bulk process was sometimes blocked; * Tweak: improved the notification text and updated the link around the legacy metadata migration; * Tweak: the legacy conversion notification is now hidden when out of credits; * Language: 0 new strings added, 3 updated, 0 fuzzed, and 0 obsoleted.

Download this release

Release Info

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

Code changes from version 5.0.1 to 5.0.2

class/Controller/AdminNoticesController.php CHANGED
@@ -292,14 +292,14 @@ class AdminNoticesController extends \ShortPixel\Controller
292
  {
293
  $message = '<p><strong>' . __('ShortPixel found items in media library with a legacy optimization format!', 'shortpixel-image-optimiser') . '</strong></p>';
294
 
295
- $message .= '<p>' . __('Prior to version 5.0, a different format was used to store ShortPixel optimization information. ShortPixel automatically converts media library items when they are opened. %s Please check if your images contain the optimization information after conversion. %s Read more %s', 'shortpixel-image-optimiser') . '</p>';
296
 
297
- $message .= '<p>' . __('It is recommended to convert all items to the modern format.', 'shortpixekl-image-optimser') . '</p>';
298
  $message .= '<p><a href="%s" class="button button-primary">%s</a></p>';
299
 
300
- $read_link = esc_url('https://shortpixel.com/knowledge-base/article/434-where-exactly-does-shortpixel-store-the-data-on-the-database');
301
  $action_link = esc_url(admin_url('upload.php?page=wp-short-pixel-bulk&panel=bulk-migrate'));
302
- $action_name = __('Convert legacy data', 'shortpixel-image-optimiser');
303
 
304
  $message = sprintf($message, '<br>', '<a href="' . $read_link . '" target="_blank">', '</a>', $action_link, $action_name);
305
 
@@ -343,18 +343,12 @@ class AdminNoticesController extends \ShortPixel\Controller
343
  */
344
  if($quotaController->hasQuota() === true)
345
  {
346
- // $screen = get_current_screen();
347
  $env = \wpSPIO()->env();
348
 
349
- //$statsSetting = is_array($settings->currentStats) ? $settings->currentStats : array();
350
- //$stats = $shortpixel->countAllIfNeeded($statsSetting, 86400);
351
  $quotaController = QuotaController::getInstance();
352
  $quotaData = $quotaController->getQuota();
353
 
354
  $statsControl = StatsController::getInstance(); // @todo Implement this. (Figure out what this was )
355
- // $stats = $statsControl->
356
-
357
- //$quotaData = $stats;
358
  $noticeController = Notices::getInstance();
359
 
360
  $bulk_notice = $noticeController->getNoticeByID(self::MSG_UPGRADE_BULK);
@@ -572,8 +566,7 @@ class AdminNoticesController extends \ShortPixel\Controller
572
  $message = '<p>' . sprintf(__("You currently have <strong>%d images and thumbnails to optimize</strong> but you only have <strong>%d images</strong> available in your current plan."
573
  . " You might need to upgrade your plan in order to have all your images optimized.", 'shortpixel-image-optimiser'), $extra['filesTodo'], $extra['quotaAvailable']) . '</p>';
574
  $message .= '<p><button class="button button-primary" id="shortpixel-upgrade-advice" onclick="ShortPixel.proposeUpgrade()" style="margin-right:10px;"><strong>' . __('Show me the best available options', 'shortpixel-image-optimiser') . '</strong></button></p>';
575
- $message .= $this->proposeUpgradePopup();
576
- //self::includeProposeUpgradePopup();
577
  return $message;
578
  }
579
 
@@ -582,7 +575,7 @@ class AdminNoticesController extends \ShortPixel\Controller
582
  $message = '<p>' . sprintf(__("You are adding an average of <strong>%d images and thumbnails every month</strong> to your Media Library and you have <strong>a plan of %d images/month</strong>."
583
  . " You might need to upgrade your plan in order to have all your images optimized.", 'shortpixel-image-optimiser'), $extra['monthAvg'], $extra['monthlyQuota']) . '</p>';
584
  $message .= ' <button class="button button-primary" id="shortpixel-upgrade-advice" onclick="ShortPixel.proposeUpgrade()" style="margin-right:10px;"><strong>' . __('Show me the best available options', 'shortpixel-image-optimiser') . '</strong></button>';
585
- $message .= $this->proposeUpgradePopup();
586
  return $message;
587
  }
588
 
@@ -653,7 +646,7 @@ class AdminNoticesController extends \ShortPixel\Controller
653
  </div>';
654
 
655
  $message .= '</div>'; /// closing div
656
- $message .= $this->proposeUpgradePopup();
657
  return $message;
658
  }
659
 
@@ -770,12 +763,12 @@ class AdminNoticesController extends \ShortPixel\Controller
770
  }
771
 
772
  protected function monthlyUpgradeNeeded($quotaData) {
 
773
  if (isset($quotaData->monthly->total))
774
  {
775
  $monthAvg = $this->getMonthAvg($quotaData);
776
  // +20 I suspect to not trigger on very low values of monthly use(?)
777
  $threshold = $quotaData->monthly->total + $quotaData->onetime->remaining/6+20;
778
-
779
  if ($monthAvg > $threshold)
780
  {
781
  return true;
292
  {
293
  $message = '<p><strong>' . __('ShortPixel found items in media library with a legacy optimization format!', 'shortpixel-image-optimiser') . '</strong></p>';
294
 
295
+ $message .= '<p>' . __('Prior to version 5.0, a different format was used to store ShortPixel optimization information. ShortPixel automatically migrates the media library items to the new format when they are opened. %s Please check if your images contain the optimization information after the migration. %s Read more %s', 'shortpixel-image-optimiser') . '</p>';
296
 
297
+ $message .= '<p>' . __('It is recommended to migrate all items to the modern format by clicking on the button below.', 'shortpixekl-image-optimser') . '</p>';
298
  $message .= '<p><a href="%s" class="button button-primary">%s</a></p>';
299
 
300
+ $read_link = esc_url('https://shortpixel.com/knowledge-base/article/539-spio-5-tells-me-to-convert-legacy-data-what-is-this');
301
  $action_link = esc_url(admin_url('upload.php?page=wp-short-pixel-bulk&panel=bulk-migrate'));
302
+ $action_name = __('Migrate legacy data', 'shortpixel-image-optimiser');
303
 
304
  $message = sprintf($message, '<br>', '<a href="' . $read_link . '" target="_blank">', '</a>', $action_link, $action_name);
305
 
343
  */
344
  if($quotaController->hasQuota() === true)
345
  {
 
346
  $env = \wpSPIO()->env();
347
 
 
 
348
  $quotaController = QuotaController::getInstance();
349
  $quotaData = $quotaController->getQuota();
350
 
351
  $statsControl = StatsController::getInstance(); // @todo Implement this. (Figure out what this was )
 
 
 
352
  $noticeController = Notices::getInstance();
353
 
354
  $bulk_notice = $noticeController->getNoticeByID(self::MSG_UPGRADE_BULK);
566
  $message = '<p>' . sprintf(__("You currently have <strong>%d images and thumbnails to optimize</strong> but you only have <strong>%d images</strong> available in your current plan."
567
  . " You might need to upgrade your plan in order to have all your images optimized.", 'shortpixel-image-optimiser'), $extra['filesTodo'], $extra['quotaAvailable']) . '</p>';
568
  $message .= '<p><button class="button button-primary" id="shortpixel-upgrade-advice" onclick="ShortPixel.proposeUpgrade()" style="margin-right:10px;"><strong>' . __('Show me the best available options', 'shortpixel-image-optimiser') . '</strong></button></p>';
569
+ $this->proposeUpgradePopup();
 
570
  return $message;
571
  }
572
 
575
  $message = '<p>' . sprintf(__("You are adding an average of <strong>%d images and thumbnails every month</strong> to your Media Library and you have <strong>a plan of %d images/month</strong>."
576
  . " You might need to upgrade your plan in order to have all your images optimized.", 'shortpixel-image-optimiser'), $extra['monthAvg'], $extra['monthlyQuota']) . '</p>';
577
  $message .= ' <button class="button button-primary" id="shortpixel-upgrade-advice" onclick="ShortPixel.proposeUpgrade()" style="margin-right:10px;"><strong>' . __('Show me the best available options', 'shortpixel-image-optimiser') . '</strong></button>';
578
+ $this->proposeUpgradePopup();
579
  return $message;
580
  }
581
 
646
  </div>';
647
 
648
  $message .= '</div>'; /// closing div
649
+ $this->proposeUpgradePopup();
650
  return $message;
651
  }
652
 
763
  }
764
 
765
  protected function monthlyUpgradeNeeded($quotaData) {
766
+
767
  if (isset($quotaData->monthly->total))
768
  {
769
  $monthAvg = $this->getMonthAvg($quotaData);
770
  // +20 I suspect to not trigger on very low values of monthly use(?)
771
  $threshold = $quotaData->monthly->total + $quotaData->onetime->remaining/6+20;
 
772
  if ($monthAvg > $threshold)
773
  {
774
  return true;
class/Controller/CacheController.php CHANGED
@@ -59,6 +59,7 @@ class CacheController extends \ShortPixel\Controller
59
  {
60
  $cache->delete();
61
  }
 
62
  }
63
 
64
  public function deleteItemObject(CacheModel $cache)
59
  {
60
  $cache->delete();
61
  }
62
+
63
  }
64
 
65
  public function deleteItemObject(CacheModel $cache)
class/Controller/SettingsController.php CHANGED
@@ -236,7 +236,9 @@ class SettingsController extends \ShortPixel\ViewController
236
 
237
  public function action_debug_resetquota()
238
  {
 
239
  $this->loadEnv();
 
240
  $quotaController = QuotaController::getInstance();
241
  $quotaController->forceCheckRemoteQuota();
242
 
236
 
237
  public function action_debug_resetquota()
238
  {
239
+
240
  $this->loadEnv();
241
+
242
  $quotaController = QuotaController::getInstance();
243
  $quotaController->forceCheckRemoteQuota();
244
 
class/Model/EnvironmentModel.php CHANGED
@@ -67,8 +67,8 @@ class EnvironmentModel extends \ShortPixel\Model
67
  {
68
  if (count($this->disabled_functions) == 0)
69
  {
70
- $disabled = ini_get('disable_functions');
71
- $this->disabled_functions = explode($disabled, ',');
72
  }
73
 
74
  if (isset($this->disabled_functions[$function]))
67
  {
68
  if (count($this->disabled_functions) == 0)
69
  {
70
+ $disabled = ini_get('disable_functions');
71
+ $this->disabled_functions = explode(',', $disabled);
72
  }
73
 
74
  if (isset($this->disabled_functions[$function]))
class/Model/Image/ImageModel.php CHANGED
@@ -235,11 +235,19 @@ abstract class ImageModel extends \ShortPixel\Model\File\FileModel
235
  return false;
236
  }
237
 
238
- $this->mime = mime_content_type($this->getFullPath());
239
- if (strpos($this->mime, 'image') >= 0)
240
- return true;
241
- else
242
- return false;
 
 
 
 
 
 
 
 
243
  }
244
 
245
  public function get($name)
235
  return false;
236
  }
237
 
238
+ if (\wpSPIO()->env()->is_function_usable('mime_content_type'))
239
+ {
240
+ $this->mime = mime_content_type($this->getFullPath());
241
+ if (strpos($this->mime, 'image') >= 0)
242
+ return true;
243
+ else
244
+ return false;
245
+
246
+ }
247
+ else {
248
+ return true; // assume without check, that extension says what it is.
249
+ // @todo This should probably trigger a notice in adminNoticesController.
250
+ }
251
  }
252
 
253
  public function get($name)
class/Model/Image/MediaLibraryModel.php CHANGED
@@ -5,6 +5,7 @@ use \ShortPixel\ShortPixelPng2Jpg as ShortPixelPng2Jpg;
5
  use ShortPixel\Controller\ResponseController as ResponseController;
6
  use ShortPixel\Controller\AdminNoticesController as AdminNoticesController;
7
  use ShortPixel\Controller\OptimizeController as OptimizeController;
 
8
 
9
  use ShortPixel\Helper\InstallHelper as InstallHelper;
10
 
@@ -1882,9 +1883,13 @@ class MediaLibraryModel extends \ShortPixel\Model\Image\MediaLibraryThumbnailMod
1882
  return false;
1883
  }
1884
 
1885
- $adminNotices = AdminNoticesController::getInstance();
1886
- $adminNotices->invokeLegacyNotice();
1887
-
 
 
 
 
1888
  Log::addDebug("Conversion of legacy: ", array($metadata));
1889
  // echo "*** EXPORT: "; var_export($metadata); echo " *** ";
1890
  $type = isset($data['type']) ? $this->legacyConvertType($data['type']) : '';
5
  use ShortPixel\Controller\ResponseController as ResponseController;
6
  use ShortPixel\Controller\AdminNoticesController as AdminNoticesController;
7
  use ShortPixel\Controller\OptimizeController as OptimizeController;
8
+ use ShortPixel\Controller\QuotaController as QuotaController;
9
 
10
  use ShortPixel\Helper\InstallHelper as InstallHelper;
11
 
1883
  return false;
1884
  }
1885
 
1886
+ $quotaController = QuotaController::getInstance();
1887
+ if ($quotaController->hasQuota() === false)
1888
+ {
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']) : '';
class/view/settings/part-debug.php CHANGED
@@ -50,13 +50,15 @@ $env = \wpSPIO()->env();
50
  <h3><?php _e('Quota Data', 'shortpixel'); ?></h3>
51
  <pre><?php var_export($this->quotaData); ?></pre>
52
  </div>
 
 
53
  <div class='debug-quota'>
54
- <form method="POST" action="<?php echo esc_url(add_query_arg(array('sp-action' => 'action_debug_resetquota'))) ?>"
55
- id="shortpixel-form-debug-medialib">
56
  <button class='button' type='submit'>Clear Quota Data</button>
57
  </form>
58
  </div>
59
- <div class="stats env">
60
  <h3><?php _e('Stats', 'shortpixel-image-optimiser'); ?></h3>
61
  <h4>Media</h4>
62
  <div class='flex'>
50
  <h3><?php _e('Quota Data', 'shortpixel'); ?></h3>
51
  <pre><?php var_export($this->quotaData); ?></pre>
52
  </div>
53
+
54
+
55
  <div class='debug-quota'>
56
+ <form method="POST" action="<?php echo esc_url(add_query_arg(array('sp-action' => 'action_debug_resetquota'))) ?>">
57
+
58
  <button class='button' type='submit'>Clear Quota Data</button>
59
  </form>
60
  </div>
61
+ <div class="stats env">
62
  <h3><?php _e('Stats', 'shortpixel-image-optimiser'); ?></h3>
63
  <h4>Media</h4>
64
  <div class='flex'>
class/view/settings/part-general.php CHANGED
@@ -216,7 +216,7 @@
216
 
217
  <div class='switch_button'>
218
  <label>
219
- <input type="checkbox" class="switch" name="resize" id='resize' value="1" <?php checked($view->data->resizeImages, true);?>>
220
  <div class="the_switch">&nbsp; </div>
221
  <?php _e('to maximum','shortpixel-image-optimiser') ?>
222
  </label>
216
 
217
  <div class='switch_button'>
218
  <label>
219
+ <input type="checkbox" class="switch" name="resizeImages" id='resize' value="1" <?php checked($view->data->resizeImages, true);?>>
220
  <div class="the_switch">&nbsp; </div>
221
  <?php _e('to maximum','shortpixel-image-optimiser') ?>
222
  </label>
class/view/settings/part-tools.php CHANGED
@@ -33,9 +33,14 @@ $queueRunning = $bulk->isAnyBulkRunning();
33
 
34
  <div class='option'>
35
  <div class='name'><?php _e('Migrate data', 'shortpixel-image-optimiser'); ?></div>
36
- <div class='field'><a href="<?php echo esc_url(add_query_arg(array('sp-action' => 'action_debug_redirectBulk', 'bulk' => 'migrate', 'noheader' => true), $url)); ?>" class="button">
37
- <?php _e('Search and Migrate All', 'shortpixel-image-optimiser'); ?>
38
- </a>
 
 
 
 
 
39
  <p class='settings-info'><?php printf(__('ShortPixel Image Optimizer version 5.0 brings a new format for saving the image optimization information. If you have upgraded from a version prior to version 5.0, you may want to convert all your image data to the new format. This conversion will speed up the plugin and ensure that all data is preserved. %s Check your image data after doing the conversion! %s', 'shortpixel-image-optimiser'), '<br><b>', '</b>') ?> </p>
40
  </div>
41
  </div>
33
 
34
  <div class='option'>
35
  <div class='name'><?php _e('Migrate data', 'shortpixel-image-optimiser'); ?></div>
36
+ <div class='field'>
37
+ <div class='option-content'>
38
+ <div class="spio-inline-help"><span class="dashicons dashicons-editor-help" title="Click for more info" data-link="https://shortpixel.com/knowledge-base/article/539-spio-5-tells-me-to-convert-legacy-data-what-is-this">
39
+ </span></div>
40
+ <a href="<?php echo esc_url(add_query_arg(array('sp-action' => 'action_debug_redirectBulk', 'bulk' => 'migrate', 'noheader' => true), $url)); ?>" class="button">
41
+ <?php _e('Search and Migrate All', 'shortpixel-image-optimiser'); ?>
42
+ </a>
43
+ </div>
44
  <p class='settings-info'><?php printf(__('ShortPixel Image Optimizer version 5.0 brings a new format for saving the image optimization information. If you have upgraded from a version prior to version 5.0, you may want to convert all your image data to the new format. This conversion will speed up the plugin and ensure that all data is preserved. %s Check your image data after doing the conversion! %s', 'shortpixel-image-optimiser'), '<br><b>', '</b>') ?> </p>
45
  </div>
46
  </div>
class/view/snippets/part-upgrade-options.php CHANGED
@@ -1,8 +1,5 @@
1
  <?php
2
  namespace ShortPixel;
3
-
4
- // \WPSPIO()->load_style('shortpixel-admin');
5
-
6
  ?>
7
 
8
  <div id="shortPixelProposeUpgradeShade" class="sp-modal-shade" style="display:none;"></div>
1
  <?php
2
  namespace ShortPixel;
 
 
 
3
  ?>
4
 
5
  <div id="shortPixelProposeUpgradeShade" class="sp-modal-shade" style="display:none;"></div>
class/view/view-settings.php CHANGED
@@ -22,7 +22,7 @@ use ShortPixel\ShortpixelLogger\ShortPixelLogger as Log;
22
  <div class='pie-wrapper'><?php $this->loadView('settings/part-optpie'); ?></div>
23
  </div>
24
 
25
-
26
  <?php if (! is_null($this->quotaData)): ?>
27
  <div class='quota-remaining'>
28
  <a href="https://shortpixel.com/<?php
@@ -49,10 +49,11 @@ use ShortPixel\ShortpixelLogger\ShortPixelLogger as Log;
49
 
50
 
51
  ?>
52
- <form name='wp_shortpixel_options' action='<?php echo esc_url(add_query_arg('noheader', 'true')) ?>' method='post' id='wp_shortpixel_options'>
53
- <input type='hidden' name='display_part' value="<?php echo $this->display_part ?>" />
54
- <?php wp_nonce_field($this->form_action, 'sp-nonce'); ?>
55
  <div class='section-wrapper'>
 
 
 
 
56
  <?php
57
  $this->loadView('settings/part-general');
58
  $this->loadView('settings/part-advanced');
@@ -65,13 +66,16 @@ use ShortPixel\ShortpixelLogger\ShortPixelLogger as Log;
65
  // $this->loadView('settings/part-statistics');
66
  }
67
  $this->loadView('settings/part-tools');
68
- if (Log::debugIsActive())
 
 
 
 
69
  {
70
  $this->loadView('settings/part-debug');
71
  }
72
- ?>
73
- </div>
74
- </form>
75
  <?php
76
  endif;
77
  ?>
22
  <div class='pie-wrapper'><?php $this->loadView('settings/part-optpie'); ?></div>
23
  </div>
24
 
25
+
26
  <?php if (! is_null($this->quotaData)): ?>
27
  <div class='quota-remaining'>
28
  <a href="https://shortpixel.com/<?php
49
 
50
 
51
  ?>
 
 
 
52
  <div class='section-wrapper'>
53
+ <form name='wp_shortpixel_options' action='<?php echo esc_url(add_query_arg('noheader', 'true')) ?>' method='post' id='wp_shortpixel_options'>
54
+ <input type='hidden' name='display_part' value="<?php echo $this->display_part ?>" />
55
+ <?php wp_nonce_field($this->form_action, 'sp-nonce'); ?>
56
+
57
  <?php
58
  $this->loadView('settings/part-general');
59
  $this->loadView('settings/part-advanced');
66
  // $this->loadView('settings/part-statistics');
67
  }
68
  $this->loadView('settings/part-tools');
69
+
70
+ ?>
71
+ </form>
72
+ <?php
73
+ if (Log::debugIsActive())
74
  {
75
  $this->loadView('settings/part-debug');
76
  }
77
+ ?>
78
+ </div> <!-- wrappur -->
 
79
  <?php
80
  endif;
81
  ?>
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.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -309,6 +309,18 @@ Add HTTP basic authentication credentials by defining these constants in wp-conf
309
 
310
  == Changelog ==
311
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  = 5.0.1 =
313
  Release date June 14th, 2022
314
  * Fix: a fatal error showed up in some cases right after updating the plugin, which is now fixed;
4
  Requires at least: 4.8.0
5
  Tested up to: 6.0
6
  Requires PHP: 5.6
7
+ Stable tag: 5.0.2
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.2 =
313
+ Release date June 16th, 2022
314
+ * Fix: an uncaught error was fixed for the sites running without the `fileinfo` PHP extension that is needed by the plugin to get the mime type of the files;
315
+ * Fix: the resize switch from the settings wasn't properly working;
316
+ * Fix: a hidden modal in the dashboard was taking up a lot of empty space;
317
+ * Fix: some popups in the settings were always getting triggered in WordPress versions 5.5 and below;
318
+ * Fix: if the admin bar tooltip cannot load for any reason, let the JS processor continue its job;
319
+ * Fix: advancing from step 2 of the bulk process was sometimes blocked;
320
+ * Tweak: improved the notification text and updated the link around the legacy metadata migration;
321
+ * Tweak: the legacy conversion notification is now hidden when out of credits;
322
+ * Language: 0 new strings added, 3 updated, 0 fuzzed, and 0 obsoleted.
323
+
324
  = 5.0.1 =
325
  Release date June 14th, 2022
326
  * Fix: a fatal error showed up in some cases right after updating the plugin, which is now fixed;
res/css/shortpixel-settings.css CHANGED
@@ -181,21 +181,24 @@
181
  background-color: #fff;
182
  z-index: 2;
183
  }
184
- .settings_page_wp-shortpixel-settings article.sp-tabs section:nth-child(2) h2 {
185
  left: 192px;
186
  }
187
- .settings_page_wp-shortpixel-settings article.sp-tabs section:nth-child(3) h2 {
188
  left: 374px;
189
  }
190
- .settings_page_wp-shortpixel-settings article.sp-tabs section:nth-child(4) h2 {
191
  left: 556px;
192
  }
193
- .settings_page_wp-shortpixel-settings article.sp-tabs section:nth-child(5) h2 {
194
  left: 738px;
195
  }
196
- .settings_page_wp-shortpixel-settings article.sp-tabs section:nth-child(6) h2 {
197
  left: 920px;
198
  }
 
 
 
199
  .settings_page_wp-shortpixel-settings section#tab-debug .flex {
200
  display: flex;
201
  }
181
  background-color: #fff;
182
  z-index: 2;
183
  }
184
+ .settings_page_wp-shortpixel-settings article.sp-tabs section:nth-of-type(2) h2 {
185
  left: 192px;
186
  }
187
+ .settings_page_wp-shortpixel-settings article.sp-tabs section:nth-of-type(3) h2 {
188
  left: 374px;
189
  }
190
+ .settings_page_wp-shortpixel-settings article.sp-tabs section:nth-of-type(4) h2 {
191
  left: 556px;
192
  }
193
+ .settings_page_wp-shortpixel-settings article.sp-tabs section:nth-of-type(5) h2 {
194
  left: 738px;
195
  }
196
+ .settings_page_wp-shortpixel-settings article.sp-tabs section:nth-of-type(6) h2 {
197
  left: 920px;
198
  }
199
+ .settings_page_wp-shortpixel-settings section#tab-debug h2 {
200
+ left: 738px;
201
+ }
202
  .settings_page_wp-shortpixel-settings section#tab-debug .flex {
203
  display: flex;
204
  }
res/css/shortpixel-settings.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../scss/view/_settings.scss","../scss/elements/_colors.scss","../scss/elements/_breakpoints.scss","../scss/view/_settings-advanced.scss","../scss/view/_settings-cloudflare.scss","../scss/view/_settings-tools.scss","../scss/view/_inline-help.scss"],"names":[],"mappings":"AAEA;AA6UE;;AAxUD;EACC,OCPc;;ADUf;EACC;;AAED;EAEC,OCfc;EDgBd,cChBc;;ADkBf;EACC,kBCnBc;EDoBd,cCpBc;EDqBd;;AAEA;EAEC,kBCxBU;EDyBV,cC1Ba;;AD+Bd;EACC;;AAGD;EAEE;EACF;EACA;EACA;EACA;EACA;;AAEA;EAGC;;AADE;EAAI;EAAiB;;AAKxB;EAGE;EACA;;AAEF;EAEC;EACA;EACA;EACA;;AEnDC;EF8CF;IASG;;;AAGH;EACE;EACA;EACA;EAEA;;AAEA;EACE;EACA;EACA;;AAEA;EACC;;AAED;EACC,QCpFM;EDqFN;EACA;;AAED;EAEC;EACA;EACA;EACA;EACA;;AAIH;EACC;EACA;EACA;EACA;EAGA;EAEA;EACA;EACA;EACA;EACA;EACA;;AEtGD;EF2GC;IACE;IACA;;EAEF;IAEC;;;AAMJ;EAEE;;AAEF;EACG;;AAGJ;EAEE;EACA;;AAKA;EACC;;AAIH;EAEI;EACA;;AAQF;EACI;EACA;EACA;;AAEJ;EACI;;AAGD;EACE;;AACF;EAEE;;AAIL;EAEE;;AAEF;EAEC;;AAIA;EAEE;EACA;EACA;EACA;EACA;;AAGF;EAEE;;AAGF;EAEC;EACA;EACA;;AAID;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACA;;AACA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAGR;EAEC;EACA;EACA;;AAID;EACI;;AAEJ;EACI;;AAEJ;EACI;;AAEJ;EACI;;AAEJ;EACI;;AAMD;EACE;;AAEF;EACG;EACA;;AACA;EACI;EACA;;AAGP;EAEG;;AACA;EACI;;AACA;EACE;;AAEF;EAAgB;;AAKpB;EAEG;EACA;;AAKT;EAEG;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;AAEA;EACE;;AAIF;EAAS;;AACT;EACG;;AACA;EAAK;;AAGR;EAEE;;AACA;EACG;EACA;EACA;EACA;EACA;EACA;EACA;;AAQR;EAGE;EACA;EAEA;;AACA;EACE;;AAIJ;EACC;EACA;;AAEC;EAEE;;AAIL;EAEC;;AAGA;EAEE;;AAQE;EAEC;;AAEF;EAEC;;AAEF;EACI;EACA;EACA,kBC7XM;ED8XN;EACA;;AACF;EACI;EACA;EACA;EACA;;AAEJ;EACI;;AACF;EACI,kBC3YI;ED4YJ;;;AG7YZ;AAKE;EAEE;;AACA;EAEE;;AAEF;EAEE;EACA;;AAEF;EAEE;;AAKJ;EAEI;EACA;;AAEA;EAEE;EACA;EACA;;AACA;EAEE;EACA;;AAGJ;EAGE;;AACA;EAEE;EACA;EACA;EACA;;AACA;EAAW;;AAMf;EAAkB;;AAClB;EAAa;;AAGlB;EACG;;;ACxDF;EACE;EACD;EACA;EAEA;;AAIC;EAIE;EACA;;AAIF;EACE;;AAEF;EAEE;EACA;;AAMJ;EACE;;AAED;EAEC;EACA;EACA;;;ACvCH;EAAU;;AACV;EACE;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;;AAGA;EACE;EACA;EACA;EACA;;AACA;EAEE;EACA;EACA;;AAIJ;EAEC;EACA;EACA;;AAQF;EAEC;EACA;;AAKH;EACC;EACA;EACA;;AAED;EAAM;;;ACzDR;EACI;EACF;;AACA;EACI;EACA;EACA;;;AAIN;EACI;AAAe;EACf;AAAiB;EACjB;AAAa;EACb;EACA;EACA;AAAa;EACb;AAAc;EACd;AAAgB;EAChB;AAA8B;EAC9B;AAAmC;;;AAEvC;EACI;AACA;EACF;EACE;EACA;EAEA;EACA;EACA;AAAY;EACZ;AAAkB;EAClB;AAAc;EACd;EACA;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAMJ;EACI;;;AAEJ;EAAa","file":"shortpixel-settings.css"}
1
+ {"version":3,"sourceRoot":"","sources":["../scss/view/_settings.scss","../scss/elements/_colors.scss","../scss/elements/_breakpoints.scss","../scss/view/_settings-advanced.scss","../scss/view/_settings-cloudflare.scss","../scss/view/_settings-tools.scss","../scss/view/_inline-help.scss"],"names":[],"mappings":"AAEA;AAkVE;;AA7UD;EACC,OCPc;;ADUf;EACC;;AAED;EAEC,OCfc;EDgBd,cChBc;;ADkBf;EACC,kBCnBc;EDoBd,cCpBc;EDqBd;;AAEA;EAEC,kBCxBU;EDyBV,cC1Ba;;AD+Bd;EACC;;AAGD;EAEE;EACF;EACA;EACA;EACA;EACA;;AAEA;EAGC;;AADE;EAAI;EAAiB;;AAKxB;EAGE;EACA;;AAEF;EAEC;EACA;EACA;EACA;;AEnDC;EF8CF;IASG;;;AAGH;EACE;EACA;EACA;EAEA;;AAEA;EACE;EACA;EACA;;AAEA;EACC;;AAED;EACC,QCpFM;EDqFN;EACA;;AAED;EAEC;EACA;EACA;EACA;EACA;;AAIH;EACC;EACA;EACA;EACA;EAGA;EAEA;EACA;EACA;EACA;EACA;EACA;;AEtGD;EF2GC;IACE;IACA;;EAEF;IAEC;;;AAMJ;EAEE;;AAEF;EACG;;AAGJ;EAEE;EACA;;AAKA;EACC;;AAIH;EAEI;EACA;;AAQF;EACI;EACA;EACA;;AAEJ;EACI;;AAGD;EACE;;AACF;EAEE;;AAIL;EAEE;;AAEF;EAEC;;AAIA;EAEE;EACA;EACA;EACA;EACA;;AAGF;EAEE;;AAGF;EAEC;EACA;EACA;;AAID;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACA;;AACA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAGR;EAEC;EACA;EACA;;AAID;EACI;;AAEJ;EACI;;AAEJ;EACI;;AAEJ;EACI;;AAEJ;EACI;;AAUH;EAAK;;AACH;EACE;;AAEF;EACG;EACA;;AACA;EACI;EACA;;AAGP;EAEG;;AACA;EACI;;AACA;EACE;;AAEF;EAAgB;;AAKpB;EAEG;EACA;;AAKT;EAEG;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;AAEA;EACE;;AAIF;EAAS;;AACT;EACG;;AACA;EAAK;;AAGR;EAEE;;AACA;EACG;EACA;EACA;EACA;EACA;EACA;EACA;;AAQR;EAGE;EACA;EAEA;;AACA;EACE;;AAIJ;EACC;EACA;;AAEC;EAEE;;AAIL;EAEC;;AAGA;EAEE;;AAQE;EAEC;;AAEF;EAEC;;AAEF;EACI;EACA;EACA,kBClYM;EDmYN;EACA;;AACF;EACI;EACA;EACA;EACA;;AAEJ;EACI;;AACF;EACI,kBChZI;EDiZJ;;;AGlZZ;AAKE;EAEE;;AACA;EAEE;;AAEF;EAEE;EACA;;AAEF;EAEE;;AAKJ;EAEI;EACA;;AAEA;EAEE;EACA;EACA;;AACA;EAEE;EACA;;AAGJ;EAGE;;AACA;EAEE;EACA;EACA;EACA;;AACA;EAAW;;AAMf;EAAkB;;AAClB;EAAa;;AAGlB;EACG;;;ACxDF;EACE;EACD;EACA;EAEA;;AAIC;EAIE;EACA;;AAIF;EACE;;AAEF;EAEE;EACA;;AAMJ;EACE;;AAED;EAEC;EACA;EACA;;;ACvCH;EAAU;;AACV;EACE;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;;AAGA;EACE;EACA;EACA;EACA;;AACA;EAEE;EACA;EACA;;AAIJ;EAEC;EACA;EACA;;AAQF;EAEC;EACA;;AAKH;EACC;EACA;EACA;;AAED;EAAM;;;ACzDR;EACI;EACF;;AACA;EACI;EACA;EACA;;;AAIN;EACI;AAAe;EACf;AAAiB;EACjB;AAAa;EACb;EACA;EACA;AAAa;EACb;AAAc;EACd;AAAgB;EAChB;AAA8B;EAC9B;AAAmC;;;AAEvC;EACI;AACA;EACF;EACE;EACA;EAEA;EACA;EACA;AAAY;EACZ;AAAkB;EAClB;AAAc;EACd;EACA;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAMJ;EACI;;;AAEJ;EAAa","file":"shortpixel-settings.css"}
res/js/screens/screen-bulk.js CHANGED
@@ -133,6 +133,8 @@ console.log("Screen Init Done", initMedia, initCustom);
133
  this.DoActionEvent = function(event)
134
  {
135
  var element = event.target;
 
 
136
 
137
  // Might be the child
138
  if (element.getAttribute('data-action') == null)
133
  this.DoActionEvent = function(event)
134
  {
135
  var element = event.target;
136
+ event.preventDefault();
137
+ event.stopPropagation();
138
 
139
  // Might be the child
140
  if (element.getAttribute('data-action') == null)
res/js/shortpixel-processor.js CHANGED
@@ -97,8 +97,9 @@ window.ShortPixelProcessor =
97
  console.log('Start Data from Server', ShortPixelProcessorData.startData, this.interval, this.deferInterval);
98
  console.log('remoteSecret ' + this.remoteSecret + ', localsecret: ' + this.localSecret + ' - is this bulk? ' + this.isBulkPage);
99
 
100
- this.tooltip = new ShortPixelToolTip({}, this);
101
 
 
 
102
  if (typeof ShortPixelScreen == 'undefined')
103
  {
104
  console.error('Missing Screen!');
@@ -242,7 +243,7 @@ window.ShortPixelProcessor =
242
  {
243
  console.log('Stop Processing #' + this.timer);
244
 
245
- // @todo this can probably go? Why would StopProcess cancel Manual pauses?
246
  if (this.isManualPaused == true) /// processor ends on status paused.
247
  {
248
  this.isManualPaused = false;
97
  console.log('Start Data from Server', ShortPixelProcessorData.startData, this.interval, this.deferInterval);
98
  console.log('remoteSecret ' + this.remoteSecret + ', localsecret: ' + this.localSecret + ' - is this bulk? ' + this.isBulkPage);
99
 
 
100
 
101
+ this.tooltip = new ShortPixelToolTip({}, this);
102
+
103
  if (typeof ShortPixelScreen == 'undefined')
104
  {
105
  console.error('Missing Screen!');
243
  {
244
  console.log('Stop Processing #' + this.timer);
245
 
246
+ // @todo this can probably go? Why would StopProcess cancel Manual pauses?
247
  if (this.isManualPaused == true) /// processor ends on status paused.
248
  {
249
  this.isManualPaused = false;
res/js/shortpixel-settings.js CHANGED
@@ -20,7 +20,7 @@ var ShortPixelSettings = function()
20
  // var target = (action.getAttribute('data-toggle')) ? action.getAttribute('data-toggle') : 'click';
21
  toggle.addEventListener('change', self.DoToggleAction.bind(self));
22
 
23
- var evInit = new Event('change');
24
  toggle.dispatchEvent(evInit);
25
  });
26
 
20
  // var target = (action.getAttribute('data-toggle')) ? action.getAttribute('data-toggle') : 'click';
21
  toggle.addEventListener('change', self.DoToggleAction.bind(self));
22
 
23
+ var evInit = new CustomEvent('change', {detail : { init: true }} );
24
  toggle.dispatchEvent(evInit);
25
  });
26
 
res/js/shortpixel-tooltip.js CHANGED
@@ -13,7 +13,8 @@ var ShortPixelToolTip = function(reserved, processor)
13
  processor.PauseProcess();
14
  }
15
  var control = document.querySelector('.ab-item .controls');
16
- control.addEventListener('click', this.ToggleProcessing.bind(this));
 
17
 
18
  this.ToggleIcon();
19
 
@@ -27,7 +28,12 @@ var ShortPixelToolTip = function(reserved, processor)
27
  }
28
  this.GetToolTip = function() // internal function please.
29
  {
30
- return document.querySelector('li.shortpixel-toolbar-processing');
 
 
 
 
 
31
  }
32
  this.InitStats = function()
33
  {
@@ -58,6 +64,8 @@ var ShortPixelToolTip = function(reserved, processor)
58
  return;
59
 
60
  var toolTip = this.GetToolTip();
 
 
61
  var statTip = toolTip.querySelector('.stats');
62
 
63
  if (statTip == null)
@@ -66,7 +74,7 @@ var ShortPixelToolTip = function(reserved, processor)
66
  var inqueue = stats.in_queue;
67
  var inprocess = stats.in_process;
68
 
69
- // @todo This needs fixing.
70
  var pattern = new RegExp("\\.|\\,", '');
71
 
72
  if (typeof inqueue === 'string' && inqueue)
@@ -151,6 +159,8 @@ var ShortPixelToolTip = function(reserved, processor)
151
  this.DoingProcess = function()
152
  {
153
  var tooltip = this.GetToolTip();
 
 
154
  tooltip.classList.remove('shortpixel-hide');
155
  tooltip.classList.add('shortpixel-processing');
156
  }
@@ -158,6 +168,8 @@ var ShortPixelToolTip = function(reserved, processor)
158
  this.AddNotice = function(message)
159
  {
160
  var tooltip = this.GetToolTip(); // li.shortpixel-toolbar-processing
 
 
161
  var toolcontent = tooltip.querySelector('.toolbar-notice-wrapper');
162
 
163
  if (toolcontent == null)
@@ -194,7 +206,8 @@ var ShortPixelToolTip = function(reserved, processor)
194
  this.ProcessResume = function()
195
  {
196
  var tooltip = this.GetToolTip();
197
-
 
198
  tooltip.classList.remove('shortpixel-paused');
199
  tooltip.classList.add('shortpixel-processing');
200
  this.ToggleIcon();
@@ -203,6 +216,8 @@ var ShortPixelToolTip = function(reserved, processor)
203
  this.ProcessEnd = function()
204
  {
205
  var tooltip = this.GetToolTip();
 
 
206
 
207
  tooltip.classList.add('shortpixel-hide');
208
  tooltip.classList.remove('shortpixel-processing');
@@ -210,6 +225,8 @@ var ShortPixelToolTip = function(reserved, processor)
210
  this.ProcessPause = function()
211
  {
212
  var tooltip = this.GetToolTip();
 
 
213
 
214
  tooltip.classList.add('shortpixel-paused');
215
  tooltip.classList.remove('shortpixel-processing');
@@ -228,8 +245,8 @@ var ShortPixelToolTip = function(reserved, processor)
228
  }
229
  this.HandleError = function()
230
  {
231
-
232
  }
233
 
234
- this.Init();
235
  } // tooltip.
13
  processor.PauseProcess();
14
  }
15
  var control = document.querySelector('.ab-item .controls');
16
+ if (control)
17
+ control.addEventListener('click', this.ToggleProcessing.bind(this));
18
 
19
  this.ToggleIcon();
20
 
28
  }
29
  this.GetToolTip = function() // internal function please.
30
  {
31
+ var element = document.querySelector('li.shortpixel-toolbar-processing');
32
+ if (element === null)
33
+ {
34
+ console.error('Tooltip could not be found!');
35
+ }
36
+ return element;
37
  }
38
  this.InitStats = function()
39
  {
64
  return;
65
 
66
  var toolTip = this.GetToolTip();
67
+ if (toolTip === null)
68
+ return false;
69
  var statTip = toolTip.querySelector('.stats');
70
 
71
  if (statTip == null)
74
  var inqueue = stats.in_queue;
75
  var inprocess = stats.in_process;
76
 
77
+ // @todo This needs fixing.
78
  var pattern = new RegExp("\\.|\\,", '');
79
 
80
  if (typeof inqueue === 'string' && inqueue)
159
  this.DoingProcess = function()
160
  {
161
  var tooltip = this.GetToolTip();
162
+ if (tooltip === null)
163
+ return false;
164
  tooltip.classList.remove('shortpixel-hide');
165
  tooltip.classList.add('shortpixel-processing');
166
  }
168
  this.AddNotice = function(message)
169
  {
170
  var tooltip = this.GetToolTip(); // li.shortpixel-toolbar-processing
171
+ if (tooltip === null)
172
+ return false;
173
  var toolcontent = tooltip.querySelector('.toolbar-notice-wrapper');
174
 
175
  if (toolcontent == null)
206
  this.ProcessResume = function()
207
  {
208
  var tooltip = this.GetToolTip();
209
+ if (tooltip === null)
210
+ return false;
211
  tooltip.classList.remove('shortpixel-paused');
212
  tooltip.classList.add('shortpixel-processing');
213
  this.ToggleIcon();
216
  this.ProcessEnd = function()
217
  {
218
  var tooltip = this.GetToolTip();
219
+ if (tooltip === null)
220
+ return false;
221
 
222
  tooltip.classList.add('shortpixel-hide');
223
  tooltip.classList.remove('shortpixel-processing');
225
  this.ProcessPause = function()
226
  {
227
  var tooltip = this.GetToolTip();
228
+ if (tooltip === null)
229
+ return false;
230
 
231
  tooltip.classList.add('shortpixel-paused');
232
  tooltip.classList.remove('shortpixel-processing');
245
  }
246
  this.HandleError = function()
247
  {
248
+ console.trace('tooltip error');
249
  }
250
 
251
+ this.Init();
252
  } // tooltip.
res/js/shortpixel.js CHANGED
@@ -289,6 +289,11 @@ var ShortPixel = function() {
289
 
290
 
291
  jQuery('input[type=radio][name=deliverWebpType]').on('change', function(e) {
 
 
 
 
 
292
  if (this.value == 'deliverWebpAltered') {
293
  if(window.confirm(_spTr.alertDeliverWebPAltered)){
294
  var selectedItems = jQuery('input[type=radio][name=deliverWebpAlteringType]:checked').length;
289
 
290
 
291
  jQuery('input[type=radio][name=deliverWebpType]').on('change', function(e) {
292
+ // shortpixel-settings init trigger events for toggles, ignore this when so.
293
+ if (e.detail && e.detail.init && e.detail.init === true)
294
+ {
295
+ return false;
296
+ }
297
  if (this.value == 'deliverWebpAltered') {
298
  if(window.confirm(_spTr.alertDeliverWebPAltered)){
299
  var selectedItems = jQuery('input[type=radio][name=deliverWebpAlteringType]:checked').length;
res/scss/view/_settings.scss CHANGED
@@ -241,25 +241,30 @@
241
  }
242
  }
243
 
244
- article.sp-tabs section:nth-child(2) h2 {
245
  left: 192px;
246
  }
247
- article.sp-tabs section:nth-child(3) h2 {
248
  left: 374px;
249
  }
250
- article.sp-tabs section:nth-child(4) h2 {
251
  left: 556px;
252
  }
253
- article.sp-tabs section:nth-child(5) h2 {
254
  left: 738px;
255
  }
256
- article.sp-tabs section:nth-child(6) h2 {
257
  left: 920px;
258
  }
 
 
 
 
259
  //article.sp-tabs section h2
260
 
261
  section#tab-debug
262
  {
 
263
  .flex {
264
  display: flex;
265
  }
241
  }
242
  }
243
 
244
+ article.sp-tabs section:nth-of-type(2) h2 {
245
  left: 192px;
246
  }
247
+ article.sp-tabs section:nth-of-type(3) h2 {
248
  left: 374px;
249
  }
250
+ article.sp-tabs section:nth-of-type(4) h2 {
251
  left: 556px;
252
  }
253
+ article.sp-tabs section:nth-of-type(5) h2 {
254
  left: 738px;
255
  }
256
+ article.sp-tabs section:nth-of-type(6) h2 {
257
  left: 920px;
258
  }
259
+ //debug-tab is now after the other tabs, because of form issues.
260
+ article.sp-tabs section#tab-debug {
261
+
262
+ }
263
  //article.sp-tabs section h2
264
 
265
  section#tab-debug
266
  {
267
+ h2 { left: 738px; }
268
  .flex {
269
  display: flex;
270
  }
shortpixel-plugin.php CHANGED
@@ -434,7 +434,7 @@ class ShortPixelPlugin
434
  wp_register_style('shortpixel', plugins_url('/res/css/short-pixel.css',SHORTPIXEL_PLUGIN_FILE), array(), SHORTPIXEL_IMAGE_OPTIMISER_VERSION);
435
 
436
  // notices. additional styles for SPIO.
437
- wp_register_style('shortpixel-notices', plugins_url('/res/css/shortpixel-notices.css',SHORTPIXEL_PLUGIN_FILE), array(), SHORTPIXEL_IMAGE_OPTIMISER_VERSION);
438
 
439
  // other media screen
440
  wp_register_style('shortpixel-othermedia', plugins_url('/res/css/shortpixel-othermedia.css',SHORTPIXEL_PLUGIN_FILE), array(), SHORTPIXEL_IMAGE_OPTIMISER_VERSION);
@@ -442,9 +442,6 @@ class ShortPixelPlugin
442
  // load everywhere, because we are inconsistent.
443
  wp_register_style('shortpixel-toolbar', plugins_url('/res/css/shortpixel-toolbar.css',SHORTPIXEL_PLUGIN_FILE), array('dashicons'), SHORTPIXEL_IMAGE_OPTIMISER_VERSION);
444
 
445
- //modal - used in settings for selecting folder
446
- wp_register_style('short-pixel-modal.min.css', plugins_url('/res/css/short-pixel-modal.min.css',SHORTPIXEL_PLUGIN_FILE), array(), SHORTPIXEL_IMAGE_OPTIMISER_VERSION);
447
-
448
  // @todo Might need to be removed later on
449
  wp_register_style('shortpixel-admin', plugins_url('/res/css/shortpixel-admin.css', SHORTPIXEL_PLUGIN_FILE),array(), SHORTPIXEL_IMAGE_OPTIMISER_VERSION );
450
 
434
  wp_register_style('shortpixel', plugins_url('/res/css/short-pixel.css',SHORTPIXEL_PLUGIN_FILE), array(), SHORTPIXEL_IMAGE_OPTIMISER_VERSION);
435
 
436
  // notices. additional styles for SPIO.
437
+ wp_register_style('shortpixel-notices', plugins_url('/res/css/shortpixel-notices.css',SHORTPIXEL_PLUGIN_FILE), array('shortpixel-admin'), SHORTPIXEL_IMAGE_OPTIMISER_VERSION);
438
 
439
  // other media screen
440
  wp_register_style('shortpixel-othermedia', plugins_url('/res/css/shortpixel-othermedia.css',SHORTPIXEL_PLUGIN_FILE), array(), SHORTPIXEL_IMAGE_OPTIMISER_VERSION);
442
  // load everywhere, because we are inconsistent.
443
  wp_register_style('shortpixel-toolbar', plugins_url('/res/css/shortpixel-toolbar.css',SHORTPIXEL_PLUGIN_FILE), array('dashicons'), SHORTPIXEL_IMAGE_OPTIMISER_VERSION);
444
 
 
 
 
445
  // @todo Might need to be removed later on
446
  wp_register_style('shortpixel-admin', plugins_url('/res/css/shortpixel-admin.css', SHORTPIXEL_PLUGIN_FILE),array(), SHORTPIXEL_IMAGE_OPTIMISER_VERSION );
447
 
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 &gt; ShortPixel</a> page on how to start optimizing your image library and make your website load faster.
6
- * Version: 5.0.1
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.1");
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 &gt; ShortPixel</a> page on how to start optimizing your image library and make your website load faster.
6
+ * Version: 5.0.2
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.2");
34
 
35
  define('SHORTPIXEL_BACKUP', 'ShortpixelBackups');
36
  define('SHORTPIXEL_MAX_FAIL_RETRIES', 3);