Smush Image Compression and Optimization - Version 2.5.3

Version Description

  • Fixed:
    • Show a Smush progress message in Grid view for Auto Smush ( A lot of people reported it as Auto Smush not working, which works in background though )
    • Translation domain was incorrect for few strings
    • Translation: Load translation domain in main plugin file
    • Include image size medium_large in smush list
    • Error: Cannot use string offset as an array
    • Error in PNG to JPG conversion ( Pro Feature ), added check for mime_content_type function
    • Pro Status not recognised
Download this release

Release Info

Developer UmeshSingla
Plugin Icon 128x128 Smush Image Compression and Optimization
Version 2.5.3
Comparing to
See all releases

Code changes from version 2.5.2 to 2.5.3

assets/js/wp-smushit-admin.js CHANGED
@@ -1213,9 +1213,9 @@ jQuery(function ($) {
1213
 
1214
  //Handle, Change event in Enable Networkwide settings
1215
  $('#wp-smush-networkwide').on('click', function (e) {
1216
- if ( $( this ).is(':checked')) {
1217
- $('.network-settings-wrapper').show();
1218
- }else{
1219
  $('.network-settings-wrapper').hide();
1220
  }
1221
  });
1213
 
1214
  //Handle, Change event in Enable Networkwide settings
1215
  $('#wp-smush-networkwide').on('click', function (e) {
1216
+ if ($(this).is(':checked')) {
1217
+ $('.network-settings-wrapper').show();
1218
+ } else {
1219
  $('.network-settings-wrapper').hide();
1220
  }
1221
  });
assets/shared-ui/wdev-ui.css CHANGED
@@ -1052,14 +1052,14 @@
1052
  /* ****************************************************************************
1053
  * 12. ELEMENT: BUTTONS
1054
  */
1055
- .wpmud button:focus,
1056
  .wpmud .button:focus {
1057
  outline-color: transparent;
1058
  outline-style: none;
1059
  border: 0;
1060
  box-shadow: none;
1061
  }
1062
- .wpmud button,
1063
  .wpmud .button {
1064
  font: 500 15px/20px 'Roboto';
1065
  background: #00ACCA;
@@ -1078,16 +1078,16 @@
1078
  transition: color 0.3s, opacity 0.3s;
1079
  text-shadow: none;
1080
  }
1081
- .wpmud button + button,
1082
- .wpmud .button + button,
1083
- .wpmud button + .button,
1084
  .wpmud .button + .button,
1085
- .wpmud a + button,
1086
  .wpmud a + .button {
1087
  margin-left: 10px;
1088
  }
1089
- .wpmud button:hover:not(:focus):not(:active),
1090
- .wpmud .button:hover:not(:focus):not(:active) {
1091
  background-color: #0093B1;
1092
  color: #FFF;
1093
  box-shadow: none;
1052
  /* ****************************************************************************
1053
  * 12. ELEMENT: BUTTONS
1054
  */
1055
+ .wpmud button:not(.wph-button):not(#collapse-button):focus,
1056
  .wpmud .button:focus {
1057
  outline-color: transparent;
1058
  outline-style: none;
1059
  border: 0;
1060
  box-shadow: none;
1061
  }
1062
+ .wpmud button:not(.wph-button):not(#collapse-button),
1063
  .wpmud .button {
1064
  font: 500 15px/20px 'Roboto';
1065
  background: #00ACCA;
1078
  transition: color 0.3s, opacity 0.3s;
1079
  text-shadow: none;
1080
  }
1081
+ .wpmud button:not(.wph-button):not(#collapse-button) + button:not(.wph-button):not(#collapse-button),
1082
+ .wpmud .button + button:not(.wph-button):not(#collapse-button),
1083
+ .wpmud button:not(.wph-button):not(#collapse-button) + .button,
1084
  .wpmud .button + .button,
1085
+ .wpmud a + button:not(.wph-button):not(#collapse-button),
1086
  .wpmud a + .button {
1087
  margin-left: 10px;
1088
  }
1089
+ .wpmud button:hover:not(:focus):not(:active):not(.wph-button):not(#collapse-button):not([tooltip]),
1090
+ .wpmud .button:hover:not(:focus):not(:active):not(.wph-button):not(#collapse-button):not([tooltip]) {
1091
  background-color: #0093B1;
1092
  color: #FFF;
1093
  box-shadow: none;
extras/dash-notice/wpmudev-dash-notification.php CHANGED
@@ -1,10 +1,11 @@
1
  <?php
2
  /////////////////////////////////////////////////////////////////////////
3
  /* -------- WPMU DEV Dashboard Notice - Aaron Edwards (Incsub) ------- */
 
4
  if ( ! class_exists( 'WPMUDEV_Dashboard_Notice4' ) ) {
5
  class WPMUDEV_Dashboard_Notice4 {
6
 
7
- var $version = '4.1';
8
  var $screen_id = false;
9
  var $product_name = false;
10
  var $product_update = false;
@@ -55,7 +56,11 @@ if ( ! class_exists( 'WPMUDEV_Dashboard_Notice4' ) ) {
55
  if ( isset( $filter_array['function'] ) && is_array( $filter_array['function'] ) ) {
56
  // Test if object is a class, class and method is equal to param !
57
  if ( is_object( $filter_array['function'][0] ) && get_class( $filter_array['function'][0] ) && get_class( $filter_array['function'][0] ) == $class_name && $filter_array['function'][1] == $method_name ) {
58
- unset( $wp_filter[ $hook_name ][ $priority ][ $unique_id ] );
 
 
 
 
59
  return true;
60
  }
61
  }
1
  <?php
2
  /////////////////////////////////////////////////////////////////////////
3
  /* -------- WPMU DEV Dashboard Notice - Aaron Edwards (Incsub) ------- */
4
+ /* This provides notices of available updates for our premium products */
5
  if ( ! class_exists( 'WPMUDEV_Dashboard_Notice4' ) ) {
6
  class WPMUDEV_Dashboard_Notice4 {
7
 
8
+ var $version = '4.2';
9
  var $screen_id = false;
10
  var $product_name = false;
11
  var $product_update = false;
56
  if ( isset( $filter_array['function'] ) && is_array( $filter_array['function'] ) ) {
57
  // Test if object is a class, class and method is equal to param !
58
  if ( is_object( $filter_array['function'][0] ) && get_class( $filter_array['function'][0] ) && get_class( $filter_array['function'][0] ) == $class_name && $filter_array['function'][1] == $method_name ) {
59
+ if ( class_exists( 'WP_Hook' ) ) { //introduced in WP 4.7 https://make.wordpress.org/core/2016/09/08/wp_hook-next-generation-actions-and-filters/
60
+ unset( $wp_filter[ $hook_name ]->callbacks[ $priority ][ $unique_id ] );
61
+ } else {
62
+ unset( $wp_filter[ $hook_name ][ $priority ][ $unique_id ] );
63
+ }
64
  return true;
65
  }
66
  }
languages/wp-smushit.pot CHANGED
@@ -1,14 +1,14 @@
1
- # Copyright (C) 2016 WP Smush
2
  # This file is distributed under the same license as the WP Smush package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WP Smush 2.5.2\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/wp-smushit\n"
7
- "POT-Creation-Date: 2016-11-03 15:54:00+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
@@ -25,95 +25,95 @@ msgid "Oops, we could not do this..."
25
  msgstr ""
26
 
27
  #: assets/shared-ui/plugin-ui.php:272 extras/free-dashboard/module.php:395
28
- #: extras/free-dashboard/module.php:434 lib/class-wp-smush-ui.php:879
29
  msgid "Saving"
30
  msgstr ""
31
 
32
  #: assets/shared-ui/plugin-ui.php:301
33
- #: extras/dash-notice/wpmudev-dash-notification.php:243
34
- #: extras/dash-notice/wpmudev-dash-notification.php:284
35
- #: lib/class-wp-smush-ui.php:879
36
  msgid "Dismiss"
37
  msgstr ""
38
 
39
- #: extras/dash-notice/wpmudev-dash-notification.php:218
40
  msgid "install"
41
  msgstr ""
42
 
43
- #: extras/dash-notice/wpmudev-dash-notification.php:225
44
  msgid "Important updates are available for <strong>%s</strong>. Install the free WPMU DEV Dashboard plugin now for updates and support!"
45
  msgstr ""
46
 
47
- #: extras/dash-notice/wpmudev-dash-notification.php:227
48
  msgid "<strong>%s</strong> is almost ready - install the free WPMU DEV Dashboard plugin for updates and support!"
49
  msgstr ""
50
 
51
- #: extras/dash-notice/wpmudev-dash-notification.php:231
52
  msgid "Important updates are available for your WPMU DEV plugins/themes. Install the free WPMU DEV Dashboard plugin now for updates and support!"
53
  msgstr ""
54
 
55
- #: extras/dash-notice/wpmudev-dash-notification.php:233
56
  msgid "Almost ready - install the free WPMU DEV Dashboard plugin for updates and support!"
57
  msgstr ""
58
 
59
- #: extras/dash-notice/wpmudev-dash-notification.php:239
60
  msgid "Install Plugin"
61
  msgstr ""
62
 
63
- #: extras/dash-notice/wpmudev-dash-notification.php:242
64
- #: extras/dash-notice/wpmudev-dash-notification.php:283
65
  msgid "Saving..."
66
  msgstr ""
67
 
68
- #: extras/dash-notice/wpmudev-dash-notification.php:259
69
  msgid "activate"
70
  msgstr ""
71
 
72
- #: extras/dash-notice/wpmudev-dash-notification.php:266
73
  msgid "Important updates are available for <strong>%s</strong>. Activate the WPMU DEV Dashboard to update now!"
74
  msgstr ""
75
 
76
- #: extras/dash-notice/wpmudev-dash-notification.php:268
77
  msgid "Just one more step to enable updates and support for <strong>%s</strong>!"
78
  msgstr ""
79
 
80
- #: extras/dash-notice/wpmudev-dash-notification.php:272
81
  msgid "Important updates are available for your WPMU DEV plugins/themes. Activate the WPMU DEV Dashboard to update now!"
82
  msgstr ""
83
 
84
- #: extras/dash-notice/wpmudev-dash-notification.php:274
85
  msgid "Just one more step - activate the WPMU DEV Dashboard plugin and you're all done!"
86
  msgstr ""
87
 
88
- #: extras/dash-notice/wpmudev-dash-notification.php:280
89
  msgid "Activate WPMU DEV Dashboard"
90
  msgstr ""
91
 
92
- #: extras/dash-notice/wpmudev-dash-notification.php:947
93
  msgid "We did not find any data for this plugin or theme..."
94
  msgstr ""
95
 
96
- #: extras/dash-notice/wpmudev-dash-notification.php:1126
97
  msgid "%s changelog"
98
  msgstr ""
99
 
100
- #: extras/dash-notice/wpmudev-dash-notification.php:1156
101
  msgid "Current"
102
  msgstr ""
103
 
104
- #: extras/dash-notice/wpmudev-dash-notification.php:1162
105
  msgid "New"
106
  msgstr ""
107
 
108
- #: extras/dash-notice/wpmudev-dash-notification.php:1179
109
  msgid "Version %s"
110
  msgstr ""
111
 
112
- #: extras/dash-notice/wpmudev-dash-notification.php:1197
113
  msgid "Show all changes"
114
  msgstr ""
115
 
116
- #: extras/dash-notice/wpmudev-dash-notification.php:1198
117
  msgid "Hide details"
118
  msgstr ""
119
 
@@ -213,14 +213,14 @@ msgstr ""
213
  msgid "Allow smushing images directly through NextGen Gallery settings."
214
  msgstr ""
215
 
216
- #: lib/class-wp-smush-admin.php:250 lib/class-wp-smush-ui.php:809
217
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:70
218
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:89
219
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:91
220
  msgid "WP Smush"
221
  msgstr ""
222
 
223
- #: lib/class-wp-smush-admin.php:358 lib/class-wp-smush.php:1051
224
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:158
225
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:275
226
  msgid "Super-Smush"
@@ -298,52 +298,61 @@ msgstr ""
298
  msgid "All Done!"
299
  msgstr ""
300
 
301
- #: lib/class-wp-smush-admin.php:1129
 
 
 
 
 
 
 
 
 
302
  msgid "Settings"
303
  msgstr ""
304
 
305
- #: lib/class-wp-smush-admin.php:1275
306
  msgid "Image not smushed, fields empty."
307
  msgstr ""
308
 
309
- #: lib/class-wp-smush-admin.php:1282 lib/class-wp-smush-nextgen.php:568
310
  msgid "Image couldn't be smushed as the nonce verification failed, try reloading the page."
311
  msgstr ""
312
 
313
- #: lib/class-wp-smush-admin.php:1299
314
  msgid "Unable to smush image"
315
  msgstr ""
316
 
317
- #: lib/class-wp-smush-admin.php:1324
318
  msgid "We haven’t found any images in your media library yet so there’s no smushing to be done!"
319
  msgstr ""
320
 
321
- #: lib/class-wp-smush-admin.php:1340
322
  msgid "Yay! All images are optimised as per your current settings."
323
  msgstr ""
324
 
325
- #: lib/class-wp-smush-admin.php:1512 lib/class-wp-smush-ui.php:784
326
  msgid "You have images that need smushing. %sBulk smush now!%s"
327
  msgstr ""
328
 
329
- #: lib/class-wp-smush-admin.php:1898
330
  msgid "Review your setting now."
331
  msgstr ""
332
 
333
- #: lib/class-wp-smush-admin.php:1899 lib/class-wp-smush-ui.php:672
334
- #: lib/class-wp-smush-ui.php:809
335
  msgid "WP Smush Pro"
336
  msgstr ""
337
 
338
- #: lib/class-wp-smush-admin.php:1900
339
  msgid "Welcome to the newest version of WP Smush! Auto-smushing on upload is lightning fast now that we handle all the smushing asynchronously."
340
  msgstr ""
341
 
342
- #: lib/class-wp-smush-admin.php:1903
343
  msgid " And as a multisite user, you can manage %sSmush settings%s globally across all sites!"
344
  msgstr ""
345
 
346
- #: lib/class-wp-smush-admin.php:1906
347
  msgid " %sFind out more here >>%s"
348
  msgstr ""
349
 
@@ -494,271 +503,262 @@ msgstr ""
494
  msgid "The following image sizes will be optimised by WP Smush:"
495
  msgstr ""
496
 
497
- #: lib/class-wp-smush-ui.php:474
498
  msgid "Width"
499
  msgstr ""
500
 
501
- #: lib/class-wp-smush-ui.php:477
502
  msgid "Height"
503
  msgstr ""
504
 
505
- #: lib/class-wp-smush-ui.php:480
506
  msgid "Currently, your largest thumbnail size is set at %s%dpx wide x %dpx high%s. Anything above 2048px in width or height is huge and not recommended."
507
  msgstr ""
508
 
509
- #: lib/class-wp-smush-ui.php:481
510
  msgid "Just to let you know, the width you've entered is less than your largest thumbnail and may result in pixelation."
511
  msgstr ""
512
 
513
- #: lib/class-wp-smush-ui.php:482
514
  msgid "Just to let you know, the height you’ve entered is less than your largest thumbnail and may result in pixelation."
515
  msgstr ""
516
 
517
- #: lib/class-wp-smush-ui.php:609
518
  msgid "BOOST YOUR PERFORMANCE - HUMMINGBIRD"
519
  msgstr ""
520
 
521
- #: lib/class-wp-smush-ui.php:636
522
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:423
523
  msgid "No attachments found - Upload some images"
524
  msgstr ""
525
 
526
- #: lib/class-wp-smush-ui.php:638
527
  msgid "We haven’t found any images in your %smedia library%s yet so there’s no smushing to be done! Once you upload images, reload this page and start playing!"
528
  msgstr ""
529
 
530
- #: lib/class-wp-smush-ui.php:641
531
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:428
532
  msgid "UPLOAD IMAGES"
533
  msgstr ""
534
 
535
- #: lib/class-wp-smush-ui.php:646
536
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:433
537
  msgid "All images are smushed and up to date. Awesome!"
538
  msgstr ""
539
 
540
- #: lib/class-wp-smush-ui.php:651
541
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:438
542
  msgid "BULK SMUSH NOW"
543
  msgstr ""
544
 
545
- #: lib/class-wp-smush-ui.php:670
546
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:446
547
  msgid "%s, you have %s%s%d%s image%s that needs smushing!"
548
  msgid_plural "%s, you have %s%s%d%s images%s that need smushing!"
549
  msgstr[0] ""
550
  msgstr[1] ""
551
 
552
- #: lib/class-wp-smush-ui.php:672
553
  msgid "You can %sUpgrade to Pro%s to bulk smush all your images with one click."
554
  msgstr ""
555
 
556
- #: lib/class-wp-smush-ui.php:673
557
  msgid "Free users can smush 50 images with each click."
558
  msgstr ""
559
 
560
- #: lib/class-wp-smush-ui.php:682
561
  msgid "Enable Super-smush in the Settings area to get even more savings with almost no noticeable quality loss."
562
  msgstr ""
563
 
564
- #: lib/class-wp-smush-ui.php:705
565
  msgid "%sBulk smush is currently running.%s You need to keep this page open for the process to complete."
566
  msgstr ""
567
 
568
- #: lib/class-wp-smush-ui.php:715
569
  msgid "%s%d%s of %d attachments have been smushed."
570
  msgstr ""
571
 
572
- #: lib/class-wp-smush-ui.php:720
573
  msgid "CANCEL"
574
  msgstr ""
575
 
576
- #: lib/class-wp-smush-ui.php:756
577
  msgid "%s, you have %s%s%d%s image%s that needs re-compressing!"
578
  msgid_plural "%s, you have %s%s%d%s images%s that need re-compressing!"
579
  msgstr[0] ""
580
  msgstr[1] ""
581
 
582
- #: lib/class-wp-smush-ui.php:757
583
  msgid "Skip"
584
  msgstr ""
585
 
586
- #: lib/class-wp-smush-ui.php:777
587
  msgid "Your settings have been updated!"
588
  msgstr ""
589
 
590
- #: lib/class-wp-smush-ui.php:811
591
  msgid "Automatic smushing is %senabled%s. Newly uploaded images will be automagically compressed."
592
  msgstr ""
593
 
594
- #: lib/class-wp-smush-ui.php:811
595
  msgid "Automatic smushing is %sdisabled%s. Newly uploaded images will need to be manually smushed."
596
  msgstr ""
597
 
598
- #: lib/class-wp-smush-ui.php:851
599
  msgid "Thanks for installing Smush. We hope you like it!"
600
  msgstr ""
601
 
602
- #: lib/class-wp-smush-ui.php:852
603
  msgid "And hey, if you do, you can now try out Smush Pro for double the smushy goodness (benchmarked), entirely for free!"
604
  msgstr ""
605
 
606
- #: lib/class-wp-smush-ui.php:853 lib/class-wp-smush-ui.php:857
607
  msgid "Try Smush Pro for Free"
608
  msgstr ""
609
 
610
- #: lib/class-wp-smush-ui.php:855
611
  msgid "Thanks for updating Smush. Did you know that you can now try the Smush Pro for FREE?!"
612
  msgstr ""
613
 
614
- #: lib/class-wp-smush-ui.php:856
615
  msgid "Yep, Super Smush your images for double the savings, save originals and batch Smush thousands of images all at once.... no charge!"
616
  msgstr ""
617
 
618
- #: lib/class-wp-smush-ui.php:903
619
  msgid "Did you know WP Smush Pro delivers up to 2x better compression, allows you to smush your originals and removes any bulk smushing limits? – %sTry it absolutely FREE%s"
620
  msgstr ""
621
 
622
- #: lib/class-wp-smush-ui.php:903
623
  msgid "Try WP Smush Pro for FREE"
624
  msgstr ""
625
 
626
- #: lib/class-wp-smush-ui.php:926
627
  msgid "Validating.."
628
  msgstr ""
629
 
630
- #: lib/class-wp-smush-ui.php:928
631
  msgid "It looks like Smush couldn’t verify your WPMU DEV membership so Pro features like Super-Smush may not work correctly. If you think this is an error, run a %sre-check%s or get in touch with our %ssupport team%s."
632
  msgstr ""
633
 
634
- #: lib/class-wp-smush-ui.php:950
635
  msgid "UPDATE SETTINGS"
636
  msgstr ""
637
 
638
- #: lib/class-wp-smush-ui.php:980
639
  msgid "Smush settings were updated, performing a quick scan to check if any of the images need to be Smushed again."
640
  msgstr ""
641
 
642
- #: lib/class-wp-smush.php:194
643
  msgid "File path is empty"
644
  msgstr ""
645
 
646
- #: lib/class-wp-smush.php:199
647
  msgid "Could not find %s"
648
  msgstr ""
649
 
650
- #: lib/class-wp-smush.php:204
651
  msgid "%s is not writable"
652
  msgstr ""
653
 
654
- #: lib/class-wp-smush.php:214
655
  msgid "Skipped (%s), image not found. Attachment: %s"
656
  msgstr ""
657
 
658
- #: lib/class-wp-smush.php:219
659
  msgid "Skipped (%s), size limit exceeded. Attachment: %s"
660
  msgstr ""
661
 
662
- #: lib/class-wp-smush.php:238
663
  msgid "Unknown API error"
664
  msgstr ""
665
 
666
- #: lib/class-wp-smush.php:703
667
  msgid "Error posting to API: %s"
668
  msgstr ""
669
 
670
- #: lib/class-wp-smush.php:709
671
  msgid "Error posting to API: %s %s"
672
  msgstr ""
673
 
674
- #: lib/class-wp-smush.php:726
675
  msgid "Smush data corrupted, try again."
676
  msgstr ""
677
 
678
- #: lib/class-wp-smush.php:746
679
  msgid "Image couldn't be smushed"
680
  msgstr ""
681
 
682
- #: lib/class-wp-smush.php:967 lib/class-wp-smush.php:971
683
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:193
684
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:196
685
  msgid "Already Optimized"
686
  msgstr ""
687
 
688
- #: lib/class-wp-smush.php:980
689
  msgid "%d images reduced "
690
  msgstr ""
691
 
692
- #: lib/class-wp-smush.php:980
693
  msgid "Reduced "
694
  msgstr ""
695
 
696
- #: lib/class-wp-smush.php:984
697
  msgid "by %s %s"
698
  msgstr ""
699
 
700
- #: lib/class-wp-smush.php:990
701
  msgid "<br /> Image Size: %s"
702
  msgstr ""
703
 
704
- #: lib/class-wp-smush.php:1026
705
  msgid "Detailed stats for all the image sizes"
706
  msgstr ""
707
 
708
- #: lib/class-wp-smush.php:1026
709
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:236
710
  msgid "Smush stats"
711
  msgstr ""
712
 
713
- #: lib/class-wp-smush.php:1057
714
- msgid "Smushing in progress.."
715
- msgstr ""
716
-
717
- #: lib/class-wp-smush.php:1070
718
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:249
719
  msgid "Not processed"
720
  msgstr ""
721
 
722
- #: lib/class-wp-smush.php:1076
723
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:255
724
- msgid "Smush Now!"
725
- msgstr ""
726
-
727
- #: lib/class-wp-smush.php:1379
728
  msgid "When you upload an image to WordPress it automatically creates %s thumbnail sizes that are commonly used in your pages. WordPress also stores the original full-size image, but because these are not usually embedded on your site we don’t Smush them. Pro users can override this."
729
  msgstr ""
730
 
731
- #: lib/class-wp-smush.php:1382
732
  msgid "Image couldn't be smushed as it exceeded the 1Mb size limit, Pro users can smush images with size upto 32Mb."
733
  msgstr ""
734
 
735
- #: lib/class-wp-smush.php:1384
736
  msgid " Skipped"
737
  msgstr ""
738
 
739
- #: lib/class-wp-smush.php:1406
740
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:432
741
  msgid "Image size"
742
  msgstr ""
743
 
744
- #: lib/class-wp-smush.php:1407
745
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:433
746
  msgid "Savings"
747
  msgstr ""
748
 
749
- #: lib/class-wp-smush.php:1614
750
  msgid "Restore original image."
751
  msgstr ""
752
 
753
- #: lib/class-wp-smush.php:1614
754
  msgid "Restore image"
755
  msgstr ""
756
 
757
- #: lib/class-wp-smush.php:1662
758
  msgid "Smush image including original file."
759
  msgstr ""
760
 
761
- #: lib/class-wp-smush.php:1662
762
  msgid "Resmush image"
763
  msgstr ""
764
 
1
+ # Copyright (C) 2017 WP Smush
2
  # This file is distributed under the same license as the WP Smush package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WP Smush 2.5.3\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/wp-smushit\n"
7
+ "POT-Creation-Date: 2017-01-06 06:34:05+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
25
  msgstr ""
26
 
27
  #: assets/shared-ui/plugin-ui.php:272 extras/free-dashboard/module.php:395
28
+ #: extras/free-dashboard/module.php:434 lib/class-wp-smush-ui.php:878
29
  msgid "Saving"
30
  msgstr ""
31
 
32
  #: assets/shared-ui/plugin-ui.php:301
33
+ #: extras/dash-notice/wpmudev-dash-notification.php:248
34
+ #: extras/dash-notice/wpmudev-dash-notification.php:289
35
+ #: lib/class-wp-smush-ui.php:878
36
  msgid "Dismiss"
37
  msgstr ""
38
 
39
+ #: extras/dash-notice/wpmudev-dash-notification.php:223
40
  msgid "install"
41
  msgstr ""
42
 
43
+ #: extras/dash-notice/wpmudev-dash-notification.php:230
44
  msgid "Important updates are available for <strong>%s</strong>. Install the free WPMU DEV Dashboard plugin now for updates and support!"
45
  msgstr ""
46
 
47
+ #: extras/dash-notice/wpmudev-dash-notification.php:232
48
  msgid "<strong>%s</strong> is almost ready - install the free WPMU DEV Dashboard plugin for updates and support!"
49
  msgstr ""
50
 
51
+ #: extras/dash-notice/wpmudev-dash-notification.php:236
52
  msgid "Important updates are available for your WPMU DEV plugins/themes. Install the free WPMU DEV Dashboard plugin now for updates and support!"
53
  msgstr ""
54
 
55
+ #: extras/dash-notice/wpmudev-dash-notification.php:238
56
  msgid "Almost ready - install the free WPMU DEV Dashboard plugin for updates and support!"
57
  msgstr ""
58
 
59
+ #: extras/dash-notice/wpmudev-dash-notification.php:244
60
  msgid "Install Plugin"
61
  msgstr ""
62
 
63
+ #: extras/dash-notice/wpmudev-dash-notification.php:247
64
+ #: extras/dash-notice/wpmudev-dash-notification.php:288
65
  msgid "Saving..."
66
  msgstr ""
67
 
68
+ #: extras/dash-notice/wpmudev-dash-notification.php:264
69
  msgid "activate"
70
  msgstr ""
71
 
72
+ #: extras/dash-notice/wpmudev-dash-notification.php:271
73
  msgid "Important updates are available for <strong>%s</strong>. Activate the WPMU DEV Dashboard to update now!"
74
  msgstr ""
75
 
76
+ #: extras/dash-notice/wpmudev-dash-notification.php:273
77
  msgid "Just one more step to enable updates and support for <strong>%s</strong>!"
78
  msgstr ""
79
 
80
+ #: extras/dash-notice/wpmudev-dash-notification.php:277
81
  msgid "Important updates are available for your WPMU DEV plugins/themes. Activate the WPMU DEV Dashboard to update now!"
82
  msgstr ""
83
 
84
+ #: extras/dash-notice/wpmudev-dash-notification.php:279
85
  msgid "Just one more step - activate the WPMU DEV Dashboard plugin and you're all done!"
86
  msgstr ""
87
 
88
+ #: extras/dash-notice/wpmudev-dash-notification.php:285
89
  msgid "Activate WPMU DEV Dashboard"
90
  msgstr ""
91
 
92
+ #: extras/dash-notice/wpmudev-dash-notification.php:952
93
  msgid "We did not find any data for this plugin or theme..."
94
  msgstr ""
95
 
96
+ #: extras/dash-notice/wpmudev-dash-notification.php:1131
97
  msgid "%s changelog"
98
  msgstr ""
99
 
100
+ #: extras/dash-notice/wpmudev-dash-notification.php:1161
101
  msgid "Current"
102
  msgstr ""
103
 
104
+ #: extras/dash-notice/wpmudev-dash-notification.php:1167
105
  msgid "New"
106
  msgstr ""
107
 
108
+ #: extras/dash-notice/wpmudev-dash-notification.php:1184
109
  msgid "Version %s"
110
  msgstr ""
111
 
112
+ #: extras/dash-notice/wpmudev-dash-notification.php:1202
113
  msgid "Show all changes"
114
  msgstr ""
115
 
116
+ #: extras/dash-notice/wpmudev-dash-notification.php:1203
117
  msgid "Hide details"
118
  msgstr ""
119
 
213
  msgid "Allow smushing images directly through NextGen Gallery settings."
214
  msgstr ""
215
 
216
+ #: lib/class-wp-smush-admin.php:250 lib/class-wp-smush-ui.php:808
217
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:70
218
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:89
219
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:91
220
  msgid "WP Smush"
221
  msgstr ""
222
 
223
+ #: lib/class-wp-smush-admin.php:358 lib/class-wp-smush.php:1039
224
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:158
225
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:275
226
  msgid "Super-Smush"
298
  msgid "All Done!"
299
  msgstr ""
300
 
301
+ #: lib/class-wp-smush-admin.php:1118 lib/class-wp-smush.php:1045
302
+ msgid "Smushing in progress.."
303
+ msgstr ""
304
+
305
+ #: lib/class-wp-smush-admin.php:1124 lib/class-wp-smush.php:1064
306
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:255
307
+ msgid "Smush Now!"
308
+ msgstr ""
309
+
310
+ #: lib/class-wp-smush-admin.php:1145
311
  msgid "Settings"
312
  msgstr ""
313
 
314
+ #: lib/class-wp-smush-admin.php:1291
315
  msgid "Image not smushed, fields empty."
316
  msgstr ""
317
 
318
+ #: lib/class-wp-smush-admin.php:1298 lib/class-wp-smush-nextgen.php:568
319
  msgid "Image couldn't be smushed as the nonce verification failed, try reloading the page."
320
  msgstr ""
321
 
322
+ #: lib/class-wp-smush-admin.php:1315
323
  msgid "Unable to smush image"
324
  msgstr ""
325
 
326
+ #: lib/class-wp-smush-admin.php:1340
327
  msgid "We haven’t found any images in your media library yet so there’s no smushing to be done!"
328
  msgstr ""
329
 
330
+ #: lib/class-wp-smush-admin.php:1356
331
  msgid "Yay! All images are optimised as per your current settings."
332
  msgstr ""
333
 
334
+ #: lib/class-wp-smush-admin.php:1528 lib/class-wp-smush-ui.php:783
335
  msgid "You have images that need smushing. %sBulk smush now!%s"
336
  msgstr ""
337
 
338
+ #: lib/class-wp-smush-admin.php:1914
339
  msgid "Review your setting now."
340
  msgstr ""
341
 
342
+ #: lib/class-wp-smush-admin.php:1915 lib/class-wp-smush-ui.php:671
343
+ #: lib/class-wp-smush-ui.php:808
344
  msgid "WP Smush Pro"
345
  msgstr ""
346
 
347
+ #: lib/class-wp-smush-admin.php:1916
348
  msgid "Welcome to the newest version of WP Smush! Auto-smushing on upload is lightning fast now that we handle all the smushing asynchronously."
349
  msgstr ""
350
 
351
+ #: lib/class-wp-smush-admin.php:1919
352
  msgid " And as a multisite user, you can manage %sSmush settings%s globally across all sites!"
353
  msgstr ""
354
 
355
+ #: lib/class-wp-smush-admin.php:1922
356
  msgid " %sFind out more here >>%s"
357
  msgstr ""
358
 
503
  msgid "The following image sizes will be optimised by WP Smush:"
504
  msgstr ""
505
 
506
+ #: lib/class-wp-smush-ui.php:473
507
  msgid "Width"
508
  msgstr ""
509
 
510
+ #: lib/class-wp-smush-ui.php:476
511
  msgid "Height"
512
  msgstr ""
513
 
514
+ #: lib/class-wp-smush-ui.php:479
515
  msgid "Currently, your largest thumbnail size is set at %s%dpx wide x %dpx high%s. Anything above 2048px in width or height is huge and not recommended."
516
  msgstr ""
517
 
518
+ #: lib/class-wp-smush-ui.php:480
519
  msgid "Just to let you know, the width you've entered is less than your largest thumbnail and may result in pixelation."
520
  msgstr ""
521
 
522
+ #: lib/class-wp-smush-ui.php:481
523
  msgid "Just to let you know, the height you’ve entered is less than your largest thumbnail and may result in pixelation."
524
  msgstr ""
525
 
526
+ #: lib/class-wp-smush-ui.php:608
527
  msgid "BOOST YOUR PERFORMANCE - HUMMINGBIRD"
528
  msgstr ""
529
 
530
+ #: lib/class-wp-smush-ui.php:635
531
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:423
532
  msgid "No attachments found - Upload some images"
533
  msgstr ""
534
 
535
+ #: lib/class-wp-smush-ui.php:637
536
  msgid "We haven’t found any images in your %smedia library%s yet so there’s no smushing to be done! Once you upload images, reload this page and start playing!"
537
  msgstr ""
538
 
539
+ #: lib/class-wp-smush-ui.php:640
540
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:428
541
  msgid "UPLOAD IMAGES"
542
  msgstr ""
543
 
544
+ #: lib/class-wp-smush-ui.php:645
545
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:433
546
  msgid "All images are smushed and up to date. Awesome!"
547
  msgstr ""
548
 
549
+ #: lib/class-wp-smush-ui.php:650
550
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:438
551
  msgid "BULK SMUSH NOW"
552
  msgstr ""
553
 
554
+ #: lib/class-wp-smush-ui.php:669
555
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:446
556
  msgid "%s, you have %s%s%d%s image%s that needs smushing!"
557
  msgid_plural "%s, you have %s%s%d%s images%s that need smushing!"
558
  msgstr[0] ""
559
  msgstr[1] ""
560
 
561
+ #: lib/class-wp-smush-ui.php:671
562
  msgid "You can %sUpgrade to Pro%s to bulk smush all your images with one click."
563
  msgstr ""
564
 
565
+ #: lib/class-wp-smush-ui.php:672
566
  msgid "Free users can smush 50 images with each click."
567
  msgstr ""
568
 
569
+ #: lib/class-wp-smush-ui.php:681
570
  msgid "Enable Super-smush in the Settings area to get even more savings with almost no noticeable quality loss."
571
  msgstr ""
572
 
573
+ #: lib/class-wp-smush-ui.php:704
574
  msgid "%sBulk smush is currently running.%s You need to keep this page open for the process to complete."
575
  msgstr ""
576
 
577
+ #: lib/class-wp-smush-ui.php:714
578
  msgid "%s%d%s of %d attachments have been smushed."
579
  msgstr ""
580
 
581
+ #: lib/class-wp-smush-ui.php:719
582
  msgid "CANCEL"
583
  msgstr ""
584
 
585
+ #: lib/class-wp-smush-ui.php:755
586
  msgid "%s, you have %s%s%d%s image%s that needs re-compressing!"
587
  msgid_plural "%s, you have %s%s%d%s images%s that need re-compressing!"
588
  msgstr[0] ""
589
  msgstr[1] ""
590
 
591
+ #: lib/class-wp-smush-ui.php:756
592
  msgid "Skip"
593
  msgstr ""
594
 
595
+ #: lib/class-wp-smush-ui.php:776
596
  msgid "Your settings have been updated!"
597
  msgstr ""
598
 
599
+ #: lib/class-wp-smush-ui.php:810
600
  msgid "Automatic smushing is %senabled%s. Newly uploaded images will be automagically compressed."
601
  msgstr ""
602
 
603
+ #: lib/class-wp-smush-ui.php:810
604
  msgid "Automatic smushing is %sdisabled%s. Newly uploaded images will need to be manually smushed."
605
  msgstr ""
606
 
607
+ #: lib/class-wp-smush-ui.php:850
608
  msgid "Thanks for installing Smush. We hope you like it!"
609
  msgstr ""
610
 
611
+ #: lib/class-wp-smush-ui.php:851
612
  msgid "And hey, if you do, you can now try out Smush Pro for double the smushy goodness (benchmarked), entirely for free!"
613
  msgstr ""
614
 
615
+ #: lib/class-wp-smush-ui.php:852 lib/class-wp-smush-ui.php:856
616
  msgid "Try Smush Pro for Free"
617
  msgstr ""
618
 
619
+ #: lib/class-wp-smush-ui.php:854
620
  msgid "Thanks for updating Smush. Did you know that you can now try the Smush Pro for FREE?!"
621
  msgstr ""
622
 
623
+ #: lib/class-wp-smush-ui.php:855
624
  msgid "Yep, Super Smush your images for double the savings, save originals and batch Smush thousands of images all at once.... no charge!"
625
  msgstr ""
626
 
627
+ #: lib/class-wp-smush-ui.php:902
628
  msgid "Did you know WP Smush Pro delivers up to 2x better compression, allows you to smush your originals and removes any bulk smushing limits? – %sTry it absolutely FREE%s"
629
  msgstr ""
630
 
631
+ #: lib/class-wp-smush-ui.php:902
632
  msgid "Try WP Smush Pro for FREE"
633
  msgstr ""
634
 
635
+ #: lib/class-wp-smush-ui.php:925
636
  msgid "Validating.."
637
  msgstr ""
638
 
639
+ #: lib/class-wp-smush-ui.php:927
640
  msgid "It looks like Smush couldn’t verify your WPMU DEV membership so Pro features like Super-Smush may not work correctly. If you think this is an error, run a %sre-check%s or get in touch with our %ssupport team%s."
641
  msgstr ""
642
 
643
+ #: lib/class-wp-smush-ui.php:949
644
  msgid "UPDATE SETTINGS"
645
  msgstr ""
646
 
647
+ #: lib/class-wp-smush-ui.php:979
648
  msgid "Smush settings were updated, performing a quick scan to check if any of the images need to be Smushed again."
649
  msgstr ""
650
 
651
+ #: lib/class-wp-smush.php:187
652
  msgid "File path is empty"
653
  msgstr ""
654
 
655
+ #: lib/class-wp-smush.php:190
656
  msgid "Could not find %s"
657
  msgstr ""
658
 
659
+ #: lib/class-wp-smush.php:193
660
  msgid "%s is not writable"
661
  msgstr ""
662
 
663
+ #: lib/class-wp-smush.php:203
664
  msgid "Skipped (%s), image not found. Attachment: %s"
665
  msgstr ""
666
 
667
+ #: lib/class-wp-smush.php:206
668
  msgid "Skipped (%s), size limit exceeded. Attachment: %s"
669
  msgstr ""
670
 
671
+ #: lib/class-wp-smush.php:224
672
  msgid "Unknown API error"
673
  msgstr ""
674
 
675
+ #: lib/class-wp-smush.php:691
676
  msgid "Error posting to API: %s"
677
  msgstr ""
678
 
679
+ #: lib/class-wp-smush.php:697
680
  msgid "Error posting to API: %s %s"
681
  msgstr ""
682
 
683
+ #: lib/class-wp-smush.php:714
684
  msgid "Smush data corrupted, try again."
685
  msgstr ""
686
 
687
+ #: lib/class-wp-smush.php:734
688
  msgid "Image couldn't be smushed"
689
  msgstr ""
690
 
691
+ #: lib/class-wp-smush.php:955 lib/class-wp-smush.php:959
692
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:193
693
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:196
694
  msgid "Already Optimized"
695
  msgstr ""
696
 
697
+ #: lib/class-wp-smush.php:968
698
  msgid "%d images reduced "
699
  msgstr ""
700
 
701
+ #: lib/class-wp-smush.php:968
702
  msgid "Reduced "
703
  msgstr ""
704
 
705
+ #: lib/class-wp-smush.php:972
706
  msgid "by %s %s"
707
  msgstr ""
708
 
709
+ #: lib/class-wp-smush.php:978
710
  msgid "<br /> Image Size: %s"
711
  msgstr ""
712
 
713
+ #: lib/class-wp-smush.php:1014
714
  msgid "Detailed stats for all the image sizes"
715
  msgstr ""
716
 
717
+ #: lib/class-wp-smush.php:1014
718
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:236
719
  msgid "Smush stats"
720
  msgstr ""
721
 
722
+ #: lib/class-wp-smush.php:1058
 
 
 
 
723
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:249
724
  msgid "Not processed"
725
  msgstr ""
726
 
727
+ #: lib/class-wp-smush.php:1367
 
 
 
 
 
728
  msgid "When you upload an image to WordPress it automatically creates %s thumbnail sizes that are commonly used in your pages. WordPress also stores the original full-size image, but because these are not usually embedded on your site we don’t Smush them. Pro users can override this."
729
  msgstr ""
730
 
731
+ #: lib/class-wp-smush.php:1370
732
  msgid "Image couldn't be smushed as it exceeded the 1Mb size limit, Pro users can smush images with size upto 32Mb."
733
  msgstr ""
734
 
735
+ #: lib/class-wp-smush.php:1372
736
  msgid " Skipped"
737
  msgstr ""
738
 
739
+ #: lib/class-wp-smush.php:1394
740
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:432
741
  msgid "Image size"
742
  msgstr ""
743
 
744
+ #: lib/class-wp-smush.php:1395
745
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:433
746
  msgid "Savings"
747
  msgstr ""
748
 
749
+ #: lib/class-wp-smush.php:1602
750
  msgid "Restore original image."
751
  msgstr ""
752
 
753
+ #: lib/class-wp-smush.php:1602
754
  msgid "Restore image"
755
  msgstr ""
756
 
757
+ #: lib/class-wp-smush.php:1650
758
  msgid "Smush image including original file."
759
  msgstr ""
760
 
761
+ #: lib/class-wp-smush.php:1650
762
  msgid "Resmush image"
763
  msgstr ""
764
 
lib/class-wp-smush-admin.php CHANGED
@@ -1110,6 +1110,22 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
1110
  * @return string
1111
  */
1112
  function smush_status( $id ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1113
  $response = trim( $this->set_status( $id, false ) );
1114
 
1115
  return $response;
@@ -1400,7 +1416,7 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
1400
  $should_resmush = false;
1401
 
1402
  //For NextGen we get the metadata in the attachment data itself
1403
- if ( ! empty( $attachment['wp_smush'] ) ) {
1404
  $smush_data = $attachment['wp_smush'];
1405
  } else {
1406
  //Check the current settings, and smush data for the image
@@ -1408,7 +1424,7 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
1408
  }
1409
 
1410
  //If the image is already smushed
1411
- if ( ! empty( $smush_data['stats'] ) ) {
1412
 
1413
  //If we need to optmise losslessly, add to resmush list
1414
  $smush_lossy = $WpSmush->lossy_enabled && ! $smush_data['stats']['lossy'];
@@ -1966,7 +1982,7 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
1966
  }
1967
  }
1968
  //Medium Large
1969
- if ( empty( $sizes['medium_large'] ) ) {
1970
  $width = intval( get_option( 'medium_large_size_w' ) );
1971
  $height = intval( get_option( 'medium_large_size_h' ) );
1972
 
1110
  * @return string
1111
  */
1112
  function smush_status( $id ) {
1113
+ global $WpSmush;
1114
+
1115
+ //Show Temporary Status, For Async Optimisation, No Good workaround
1116
+ if ( ! empty( $_POST['action'] ) && 'upload-attachment' == $_POST['action'] && $WpSmush->is_auto_smush_enabled() ) {
1117
+ // the status
1118
+ $status_txt = __( 'Smushing in progress..', 'wp-smushit' );
1119
+
1120
+ // we need to show the smush button
1121
+ $show_button = false;
1122
+
1123
+ // the button text
1124
+ $button_txt = __( 'Smush Now!', 'wp-smushit' );
1125
+
1126
+ return $this->column_html( $id, $status_txt, $button_txt, $show_button, true, false, true );
1127
+ }
1128
+ //Else Return the normal status
1129
  $response = trim( $this->set_status( $id, false ) );
1130
 
1131
  return $response;
1416
  $should_resmush = false;
1417
 
1418
  //For NextGen we get the metadata in the attachment data itself
1419
+ if ( is_array( $attachment ) && ! empty( $attachment['wp_smush'] ) ) {
1420
  $smush_data = $attachment['wp_smush'];
1421
  } else {
1422
  //Check the current settings, and smush data for the image
1424
  }
1425
 
1426
  //If the image is already smushed
1427
+ if ( is_array( $smush_data ) && ! empty( $smush_data['stats'] ) ) {
1428
 
1429
  //If we need to optmise losslessly, add to resmush list
1430
  $smush_lossy = $WpSmush->lossy_enabled && ! $smush_data['stats']['lossy'];
1982
  }
1983
  }
1984
  //Medium Large
1985
+ if ( !isset( $sizes['medium_large'] ) || empty( $sizes['medium_large'] ) ) {
1986
  $width = intval( get_option( 'medium_large_size_w' ) );
1987
  $height = intval( get_option( 'medium_large_size_h' ) );
1988
 
lib/class-wp-smush-png_jpg.php CHANGED
@@ -255,7 +255,20 @@ if ( ! class_exists( 'WpSmushPngtoJpg' ) ) {
255
  //Update File path, Attached File, GUID
256
  $meta = empty( $meta ) ? wp_get_attachment_metadata( $id ) : $meta;
257
 
258
- $mime = mime_content_type( $n_file_path );
 
 
 
 
 
 
 
 
 
 
 
 
 
259
 
260
  //Update File Path, Attached file, Mime Type for Image
261
  if ( 'full' == $size_k ) {
255
  //Update File path, Attached File, GUID
256
  $meta = empty( $meta ) ? wp_get_attachment_metadata( $id ) : $meta;
257
 
258
+ //Get the File mime
259
+ if ( class_exists( 'finfo' ) ) {
260
+ $finfo = new finfo( FILEINFO_MIME_TYPE );
261
+ } else {
262
+ $finfo = false;
263
+ }
264
+
265
+ if ( $finfo ) {
266
+ $mime = file_exists( $n_file_path ) ? $finfo->file( $n_file_path ) : '';
267
+ } elseif ( function_exists( 'mime_content_type' ) ) {
268
+ $mime = mime_content_type( $n_file_path );
269
+ } else {
270
+ $mime = false;
271
+ }
272
 
273
  //Update File Path, Attached file, Mime Type for Image
274
  if ( 'full' == $size_k ) {
lib/class-wp-smush-ui.php CHANGED
@@ -422,9 +422,6 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
422
  <div class="wp-smush-image-size-list">
423
  <p><?php esc_html_e("The following image sizes will be optimised by WP Smush:", "wp-smushit"); ?></p><?php
424
  foreach ( $sizes as $size_k => $size ) {
425
- if( 'medium_large' == $size_k ) {
426
- continue;
427
- }
428
  //If image sizes array isn't set, mark all checked ( Default Values )
429
  if ( false === $image_sizes ) {
430
  $checked = true;
@@ -433,7 +430,9 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
433
  } ?>
434
  <label>
435
  <input type="checkbox" id="wp-smush-size-<?php echo $size_k; ?>" <?php checked( $checked, true ); ?> name="wp-smush-image_sizes[]" value="<?php echo $size_k; ?>"><?php
436
- echo $size_k . " (" . $size['width'] . "x" . $size['height'] . ") "; ?>
 
 
437
  </label><?php
438
  } ?>
439
  </div><?php
422
  <div class="wp-smush-image-size-list">
423
  <p><?php esc_html_e("The following image sizes will be optimised by WP Smush:", "wp-smushit"); ?></p><?php
424
  foreach ( $sizes as $size_k => $size ) {
 
 
 
425
  //If image sizes array isn't set, mark all checked ( Default Values )
426
  if ( false === $image_sizes ) {
427
  $checked = true;
430
  } ?>
431
  <label>
432
  <input type="checkbox" id="wp-smush-size-<?php echo $size_k; ?>" <?php checked( $checked, true ); ?> name="wp-smush-image_sizes[]" value="<?php echo $size_k; ?>"><?php
433
+ if( isset( $size['width'], $size['height'] ) ) {
434
+ echo $size_k . " (" . $size['width'] . "x" . $size['height'] . ") ";
435
+ } ?>
436
  </label><?php
437
  } ?>
438
  </div><?php
lib/class-wp-smush.php CHANGED
@@ -116,9 +116,6 @@ if ( ! class_exists( 'WpSmush' ) ) {
116
  //Enqueue Scripts, And Initialize variables
117
  add_action( 'admin_init', array( $this, 'admin_init' ) );
118
 
119
- //Load Translation files
120
- add_action( 'plugins_loaded', array( $this, 'i18n' ), 12 );
121
-
122
  //Load NextGen Gallery, if hooked too late or early, auto smush doesn't works, also Load after settings have been saved on init action
123
  add_action( 'plugins_loaded', array( $this, 'load_nextgen' ), 90 );
124
 
@@ -139,11 +136,6 @@ if ( ! class_exists( 'WpSmush' ) ) {
139
 
140
  }
141
 
142
- function i18n() {
143
- $path = path_join( dirname( plugin_basename( __FILE__ ) ), 'languages' );
144
- load_plugin_textdomain( 'wp-smushit', false, $path );
145
- }
146
-
147
  /**
148
  * Initialise the setting variables
149
  */
@@ -187,20 +179,17 @@ if ( ! class_exists( 'WpSmush' ) ) {
187
  * @returns array
188
  */
189
  function do_smushit( $file_path = '' ) {
190
- global $wpsmushit_admin;
191
  $errors = new WP_Error();
192
  $dir_name = dirname( $file_path );
 
 
193
  if ( empty( $file_path ) ) {
194
  $errors->add( "empty_path", __( "File path is empty", 'wp-smushit' ) );
195
- }
196
-
197
- // check that the file exists
198
- if ( ! file_exists( $file_path ) || ! is_file( $file_path ) ) {
199
  $errors->add( "file_not_found", sprintf( __( "Could not find %s", 'wp-smushit' ), $file_path ) );
200
- }
201
-
202
- // check that the file is writable
203
- if ( ! is_writable( $dir_name ) ) {
204
  $errors->add( "not_writable", sprintf( __( "%s is not writable", 'wp-smushit' ), $dir_name ) );
205
  }
206
 
@@ -212,10 +201,8 @@ if ( ! class_exists( 'WpSmush' ) ) {
212
  //Check if file exists
213
  if ( $file_size == 0 ) {
214
  $errors->add( "image_not_found", '<p>' . sprintf( __( 'Skipped (%s), image not found. Attachment: %s', 'wp-smushit' ), size_format( $file_size, 1 ), basename( $file_path ) ) . '</p>' );
215
- }
216
-
217
- //Check size limit
218
- if ( $file_size > $max_size ) {
219
  $errors->add( "size_limit", '<p>' . sprintf( __( 'Skipped (%s), size limit exceeded. Attachment: %s', 'wp-smushit' ), size_format( $file_size, 1 ), basename( $file_path ) ) . '</p>' );
220
  }
221
 
@@ -232,9 +219,8 @@ if ( ! class_exists( 'WpSmush' ) ) {
232
 
233
  if ( ! $response['success'] ) {
234
  $errors->add( "false_response", $response['message'] );
235
- }
236
- //If there is no data
237
- if ( empty( $response['data'] ) ) {
238
  $errors->add( "no_data", __( 'Unknown API error', 'wp-smushit' ) );
239
  }
240
 
@@ -685,6 +671,8 @@ if ( ! class_exists( 'WpSmush' ) ) {
685
  'timeout' => WP_SMUSH_TIMEOUT,
686
  'user-agent' => WP_SMUSH_UA,
687
  );
 
 
688
  $result = wp_remote_post( $api_url, $args );
689
 
690
  //Close file connection
@@ -890,7 +878,7 @@ if ( ! class_exists( 'WpSmush' ) ) {
890
  $api_auth[ $api_key ] = array( 'validity' => $valid, 'timestamp' => $timestamp );
891
 
892
  //Update API validity
893
- // update_site_option( 'wp_smush_api_auth', $api_auth );
894
 
895
  }
896
 
@@ -1611,7 +1599,7 @@ if ( ! class_exists( 'WpSmush' ) ) {
1611
 
1612
  $ajax_nonce = wp_create_nonce( "wp-smush-restore-" . $image_id );
1613
 
1614
- return sprintf( '<a href="#" tooltip="%s" data-id="%d" data-nonce="%s" class="%s">%s</a>', esc_html__( "Restore original image.", "wp-smushit" ), $image_id, $ajax_nonce, $class, esc_html__( "Restore image", "wp-smush" ) );
1615
  }
1616
 
1617
  /**
@@ -1659,7 +1647,7 @@ if ( ! class_exists( 'WpSmush' ) ) {
1659
 
1660
  $ajax_nonce = wp_create_nonce( "wp-smush-resmush-" . $image_id );
1661
 
1662
- return sprintf( '<a href="#" tooltip="%s" data-id="%d" data-nonce="%s" class="%s">%s</a>', esc_html__( "Smush image including original file.", "wp-smushit" ), $image_id, $ajax_nonce, $class, esc_html__( "Resmush image", "wp-smush" ) );
1663
  }
1664
 
1665
  /**
116
  //Enqueue Scripts, And Initialize variables
117
  add_action( 'admin_init', array( $this, 'admin_init' ) );
118
 
 
 
 
119
  //Load NextGen Gallery, if hooked too late or early, auto smush doesn't works, also Load after settings have been saved on init action
120
  add_action( 'plugins_loaded', array( $this, 'load_nextgen' ), 90 );
121
 
136
 
137
  }
138
 
 
 
 
 
 
139
  /**
140
  * Initialise the setting variables
141
  */
179
  * @returns array
180
  */
181
  function do_smushit( $file_path = '' ) {
 
182
  $errors = new WP_Error();
183
  $dir_name = dirname( $file_path );
184
+
185
+ //Check if file exists and the directory is writable
186
  if ( empty( $file_path ) ) {
187
  $errors->add( "empty_path", __( "File path is empty", 'wp-smushit' ) );
188
+ } elseif ( ! file_exists( $file_path ) || ! is_file( $file_path ) ) {
189
+ // check that the file exists
 
 
190
  $errors->add( "file_not_found", sprintf( __( "Could not find %s", 'wp-smushit' ), $file_path ) );
191
+ } elseif ( ! is_writable( $dir_name ) ) {
192
+ // check that the file is writable
 
 
193
  $errors->add( "not_writable", sprintf( __( "%s is not writable", 'wp-smushit' ), $dir_name ) );
194
  }
195
 
201
  //Check if file exists
202
  if ( $file_size == 0 ) {
203
  $errors->add( "image_not_found", '<p>' . sprintf( __( 'Skipped (%s), image not found. Attachment: %s', 'wp-smushit' ), size_format( $file_size, 1 ), basename( $file_path ) ) . '</p>' );
204
+ } elseif ( $file_size > $max_size ) {
205
+ //Check size limit
 
 
206
  $errors->add( "size_limit", '<p>' . sprintf( __( 'Skipped (%s), size limit exceeded. Attachment: %s', 'wp-smushit' ), size_format( $file_size, 1 ), basename( $file_path ) ) . '</p>' );
207
  }
208
 
219
 
220
  if ( ! $response['success'] ) {
221
  $errors->add( "false_response", $response['message'] );
222
+ } else if ( empty( $response['data'] ) ) {
223
+ //If there is no data
 
224
  $errors->add( "no_data", __( 'Unknown API error', 'wp-smushit' ) );
225
  }
226
 
671
  'timeout' => WP_SMUSH_TIMEOUT,
672
  'user-agent' => WP_SMUSH_UA,
673
  );
674
+ //Temporary Increase the limit
675
+ @ini_set('memory_limit','256M');
676
  $result = wp_remote_post( $api_url, $args );
677
 
678
  //Close file connection
878
  $api_auth[ $api_key ] = array( 'validity' => $valid, 'timestamp' => $timestamp );
879
 
880
  //Update API validity
881
+ update_site_option( 'wp_smush_api_auth', $api_auth );
882
 
883
  }
884
 
1599
 
1600
  $ajax_nonce = wp_create_nonce( "wp-smush-restore-" . $image_id );
1601
 
1602
+ return sprintf( '<a href="#" tooltip="%s" data-id="%d" data-nonce="%s" class="%s">%s</a>', esc_html__( "Restore original image.", "wp-smushit" ), $image_id, $ajax_nonce, $class, esc_html__( "Restore image", "wp-smushit" ) );
1603
  }
1604
 
1605
  /**
1647
 
1648
  $ajax_nonce = wp_create_nonce( "wp-smush-resmush-" . $image_id );
1649
 
1650
+ return sprintf( '<a href="#" tooltip="%s" data-id="%d" data-nonce="%s" class="%s">%s</a>', esc_html__( "Smush image including original file.", "wp-smushit" ), $image_id, $ajax_nonce, $class, esc_html__( "Resmush image", "wp-smushit" ) );
1651
  }
1652
 
1653
  /**
lib/wp-async-task.php CHANGED
@@ -137,7 +137,7 @@ if ( ! class_exists( 'WP_Async_Task' ) ) {
137
 
138
  //@todo: We've set sslverify to false
139
  $request_args = array(
140
- 'timeout' => 0.01,
141
  'blocking' => false,
142
  'sslverify' => false,
143
  'body' => $this->_body_data,
137
 
138
  //@todo: We've set sslverify to false
139
  $request_args = array(
140
+ 'timeout' => 10,
141
  'blocking' => false,
142
  'sslverify' => false,
143
  'body' => $this->_body_data,
readme.txt CHANGED
@@ -1,13 +1,13 @@
1
  === Smush Image Compression and Optimization ===
2
  Plugin Name: Smush Image Compression and Optimization
3
- Version: 2.5.2
4
  Author: WPMU DEV
5
  Author URI: http://premium.wpmudev.org/
6
  Contributors: WPMUDEV, alexdunae
7
  Tags: image, optimize, compress, performance, lossless, lossy, photo, pictures, optimize JPG, compress PNG, Smush WordPress Compression, Smush.it
8
  Requires at least: 3.5
9
- Tested up to: 4.7
10
- Stable tag: 2.5.2
11
  License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
12
 
13
  Compress and optimize image files, improve performance and boost your SEO rank using Smush WordPress image compression and optimization.
@@ -127,6 +127,18 @@ Yahoo's Smush.it API is gone forever. So WPMU DEV built our own free API that is
127
 
128
  == Changelog ==
129
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  = 2.5.2 =
131
 
132
  * Added:
1
  === Smush Image Compression and Optimization ===
2
  Plugin Name: Smush Image Compression and Optimization
3
+ Version: 2.5.3
4
  Author: WPMU DEV
5
  Author URI: http://premium.wpmudev.org/
6
  Contributors: WPMUDEV, alexdunae
7
  Tags: image, optimize, compress, performance, lossless, lossy, photo, pictures, optimize JPG, compress PNG, Smush WordPress Compression, Smush.it
8
  Requires at least: 3.5
9
+ Tested up to: 4.7.1
10
+ Stable tag: 2.5.3
11
  License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
12
 
13
  Compress and optimize image files, improve performance and boost your SEO rank using Smush WordPress image compression and optimization.
127
 
128
  == Changelog ==
129
 
130
+ = 2.5.3 =
131
+
132
+ * Fixed:
133
+ * Show a Smush progress message in Grid view for Auto Smush
134
+ ( A lot of people reported it as Auto Smush not working, which works in background though )
135
+ * Translation domain was incorrect for few strings
136
+ * Translation: Load translation domain in main plugin file
137
+ * Include image size `medium_large` in smush list
138
+ * Error: Cannot use string offset as an array
139
+ * Error in PNG to JPG conversion ( Pro Feature ), added check for mime_content_type function
140
+ * Pro Status not recognised
141
+
142
  = 2.5.2 =
143
 
144
  * Added:
wp-smush.php CHANGED
@@ -4,9 +4,9 @@ Plugin Name: WP Smush
4
  Plugin URI: http://wordpress.org/extend/plugins/wp-smushit/
5
  Description: Reduce image file sizes, improve performance and boost your SEO using the free <a href="https://premium.wpmudev.org/">WPMU DEV</a> WordPress Smush API.
6
  Author: WPMU DEV
7
- Version: 2.5.2
8
  Author URI: http://premium.wpmudev.org/
9
- Textdomain: wp-smushit
10
  */
11
 
12
  /*
@@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
35
  * Constants
36
  */
37
  $prefix = 'WP_SMUSH_';
38
- $version = '2.5.2';
39
 
40
  //Deactivate the .org version, if pro version is active
41
  add_action( 'admin_init', 'deactivate_smush_org' );
@@ -272,5 +272,11 @@ if ( ! function_exists( 'smush_sanitize_hex_color_no_hash' ) ) {
272
  return smush_sanitize_hex_color( '#' . $color ) ? $color : null;
273
  }
274
  }
 
 
 
 
 
 
275
 
276
  register_activation_hook( __FILE__, 'smush_activated' );
4
  Plugin URI: http://wordpress.org/extend/plugins/wp-smushit/
5
  Description: Reduce image file sizes, improve performance and boost your SEO using the free <a href="https://premium.wpmudev.org/">WPMU DEV</a> WordPress Smush API.
6
  Author: WPMU DEV
7
+ Version: 2.5.3
8
  Author URI: http://premium.wpmudev.org/
9
+ Text Domain: wp-smushit
10
  */
11
 
12
  /*
35
  * Constants
36
  */
37
  $prefix = 'WP_SMUSH_';
38
+ $version = '2.5.3';
39
 
40
  //Deactivate the .org version, if pro version is active
41
  add_action( 'admin_init', 'deactivate_smush_org' );
272
  return smush_sanitize_hex_color( '#' . $color ) ? $color : null;
273
  }
274
  }
275
+ //Load Translation files
276
+ add_action( 'plugins_loaded', 'i18n' );
277
+ function i18n() {
278
+ $path = path_join( dirname( plugin_basename( __FILE__ ) ), 'languages/' );
279
+ load_plugin_textdomain( 'wp-smushit', false, $path );
280
+ }
281
 
282
  register_activation_hook( __FILE__, 'smush_activated' );