Smush Image Compression and Optimization - Version 2.2.2

Version Description

  • Fixed: JS error causing issue with Editor on some installs, plugin conflict with CoursePress plugin, ACF ( Clear All Caches after plugin upgrade, Cloudflare as well )
  • Fixed: ReSmush count for bulk smushing
  • Fixed: Smush settings accessibility for Screen reader/Keyboard
  • Fixed: WP Admin loading slow ( Load smush stats on required admin pages only )
Download this release

Release Info

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

Code changes from version 2.2 to 2.2.2

assets/css/wp-smushit-admin.css CHANGED
@@ -72,6 +72,7 @@ Smush button transformation
72
  margin-bottom: 20px;
73
  padding-bottom: 0;
74
  }
 
75
  #wp-smush-install-thanks .row {
76
  background-image: url(../images/install-welcome.png);
77
  background-repeat: no-repeat;
@@ -85,6 +86,10 @@ Smush button transformation
85
  margin: 15px 20px 15px 0;
86
  }
87
 
 
 
 
 
88
  .wpmud .wp-smushit-container-wrap {
89
  display: inline-block;
90
  margin-top: 30px;
@@ -487,7 +492,7 @@ table.wp-smush-stats-holder tr td:first-child {
487
  float: right;
488
  font-size: 15px;
489
  line-height: 1.7;
490
- margin: 1.4em auto;
491
  }
492
 
493
  .wp-smush-auto-disabled {
@@ -502,6 +507,7 @@ table.wp-smush-stats-holder tr td:first-child {
502
  overflow: hidden;
503
  padding: 10px 0 0;
504
  margin: 0 0 20px;
 
505
  }
506
 
507
  .wpmud .wp-smush-welcome.wp-smush-container {
@@ -510,6 +516,7 @@ table.wp-smush-stats-holder tr td:first-child {
510
  background-position: 30px bottom;
511
  padding-bottom: 0;
512
  }
 
513
  .wpmud .wp-smush-welcome.wp-smush-container .box-content {
514
  min-height: 149px;
515
  }
@@ -844,13 +851,11 @@ small.smush-setting-description {
844
  padding: 10px;
845
  }
846
 
847
- .wp-smush-lossy-enable {
848
- background: #00ACCA;
849
  border-radius: 3px;
850
- color: #FFF;
851
- cursor: pointer;
852
  font: 500 11px/20px 'Roboto';
853
- padding: 10px;
 
854
  }
855
 
856
  .wp-smush-lossy-enable:hover, .wp-smush-lossy-enable:active, .wp-smush-lossy-enable:focus {
@@ -867,6 +872,10 @@ small.smush-setting-description {
867
  padding: 5px 0;
868
  }
869
 
 
 
 
 
870
  .wpmud .row .col-third.wp-smushit-container-right {
871
  padding-right: 0;
872
  width: 38%;
@@ -1029,12 +1038,15 @@ small.smush-setting-description {
1029
  padding: 0;
1030
  width: 100%;
1031
  }
 
1032
  .wpmud .wp-smush-welcome-content {
1033
  margin: 0 30px 0px 160px;
1034
  }
 
1035
  .dev-box.bulk-smush-wrapper.wp-smush-container {
1036
  padding: 20px 10px;
1037
  }
 
1038
  .wpmud .wp-smush-super-smush-content {
1039
  font-size: 11px;
1040
  margin-left: 160px;
@@ -1047,6 +1059,7 @@ small.smush-setting-description {
1047
  .wp-admin.wpmud [tooltip]:after {
1048
  text-transform: none !important;
1049
  }
 
1050
  .smushit [tooltip] {
1051
  position: relative;
1052
  overflow: visible;
@@ -1166,6 +1179,7 @@ small.smush-setting-description {
1166
  position: relative;
1167
  width: 58%;
1168
  }
 
1169
  /** Arrow **/
1170
  .wp-smush-super-smush-content:after {
1171
  right: 100%;
@@ -1181,9 +1195,14 @@ small.smush-setting-description {
1181
  border-width: 10px;
1182
  margin-top: -10px;
1183
  }
 
1184
  .wpmud .wp-smush-super-smush-content a,
1185
  .wpmud .wp-smush-super-smush-content a:hover,
1186
  .wpmud .wp-smush-super-smush-content a:visited {
1187
  color: black;
1188
  text-decoration: underline;
 
 
 
 
1189
  }
72
  margin-bottom: 20px;
73
  padding-bottom: 0;
74
  }
75
+
76
  #wp-smush-install-thanks .row {
77
  background-image: url(../images/install-welcome.png);
78
  background-repeat: no-repeat;
86
  margin: 15px 20px 15px 0;
87
  }
88
 
89
+ .wp-smush-setting-row .toggle-checkbox:focus + .toggle-label{
90
+ box-shadow: 0px 2px 7px rgba(0, 0, 0, 0.3);
91
+ }
92
+
93
  .wpmud .wp-smushit-container-wrap {
94
  display: inline-block;
95
  margin-top: 30px;
492
  float: right;
493
  font-size: 15px;
494
  line-height: 1.7;
495
+ margin: 1em auto;
496
  }
497
 
498
  .wp-smush-auto-disabled {
507
  overflow: hidden;
508
  padding: 10px 0 0;
509
  margin: 0 0 20px;
510
+ width: 100%;
511
  }
512
 
513
  .wpmud .wp-smush-welcome.wp-smush-container {
516
  background-position: 30px bottom;
517
  padding-bottom: 0;
518
  }
519
+
520
  .wpmud .wp-smush-welcome.wp-smush-container .box-content {
521
  min-height: 149px;
522
  }
851
  padding: 10px;
852
  }
853
 
854
+ .wpmud .wp-smush-stats .button-small.wp-smush-lossy-enable {
 
855
  border-radius: 3px;
 
 
856
  font: 500 11px/20px 'Roboto';
857
+ padding: 5px 8px;
858
+ vertical-align: top;
859
  }
860
 
861
  .wp-smush-lossy-enable:hover, .wp-smush-lossy-enable:active, .wp-smush-lossy-enable:focus {
872
  padding: 5px 0;
873
  }
874
 
875
+ .wpmud .wp-smush-lossy-disabled-wrap {
876
+ padding: 0;
877
+ }
878
+
879
  .wpmud .row .col-third.wp-smushit-container-right {
880
  padding-right: 0;
881
  width: 38%;
1038
  padding: 0;
1039
  width: 100%;
1040
  }
1041
+
1042
  .wpmud .wp-smush-welcome-content {
1043
  margin: 0 30px 0px 160px;
1044
  }
1045
+
1046
  .dev-box.bulk-smush-wrapper.wp-smush-container {
1047
  padding: 20px 10px;
1048
  }
1049
+
1050
  .wpmud .wp-smush-super-smush-content {
1051
  font-size: 11px;
1052
  margin-left: 160px;
1059
  .wp-admin.wpmud [tooltip]:after {
1060
  text-transform: none !important;
1061
  }
1062
+
1063
  .smushit [tooltip] {
1064
  position: relative;
1065
  overflow: visible;
1179
  position: relative;
1180
  width: 58%;
1181
  }
1182
+
1183
  /** Arrow **/
1184
  .wp-smush-super-smush-content:after {
1185
  right: 100%;
1195
  border-width: 10px;
1196
  margin-top: -10px;
1197
  }
1198
+
1199
  .wpmud .wp-smush-super-smush-content a,
1200
  .wpmud .wp-smush-super-smush-content a:hover,
1201
  .wpmud .wp-smush-super-smush-content a:visited {
1202
  color: black;
1203
  text-decoration: underline;
1204
+ }
1205
+ .wpmud .wp-smush-setting-row .toggle .toggle-checkbox {
1206
+ display: inline-block;
1207
+ opacity: 0;
1208
  }
assets/js/wp-smushit-admin-media.js DELETED
@@ -1,84 +0,0 @@
1
- /**
2
- * Adds a smush button in grid view, Show the stats
3
- * @type {WP_Smush|*|{}}
4
- */
5
- var WP_Smush = WP_Smush || {};
6
- jQuery(function ($) {
7
- "use strict";
8
- if (!wp.media) return;
9
-
10
- var manualUrl = ajaxurl + '?action=wp_smushit_manual';
11
-
12
- var SmushButton = Backbone.View.extend({
13
- className: "media-lib-wp-smush-el",
14
- tagName: "div",
15
- events: {
16
- "click .media-lib-wp-smush-icon": "click"
17
- },
18
- template: _.template('<span class="dashicons dashicons-media-archive media-lib-wp-smush-icon"></span>'),
19
- initialize: function () {
20
- this.render();
21
- },
22
- is_smushed: function () {
23
- var self = this,
24
- arr = _.filter(wp_smushit_data.smushed, function (id) {
25
- return id == self.model.get("id").toString();
26
- });
27
- return typeof arr == "object" ? arr.length : false;
28
- },
29
- render: function () {
30
- var data = this.model.toJSON();
31
-
32
-
33
- this.$el.html(this.template());
34
- this.$button = this.$(".media-lib-wp-smush-icon");
35
-
36
- if (this.is_smushed()) {
37
- this.$el.addClass("is_smushed");
38
- } else {
39
- this.$el.addClass("active");
40
- this.$button.prop("title", wp_smush_msgs.smush_now)
41
- }
42
-
43
- this.$button.data("id", data.id);
44
- },
45
- click: function (e) {
46
- var ajax = WP_Smush.ajax(this.model.get("id"), manualUrl, 0),
47
- self = this;
48
-
49
- e.preventDefault();
50
- e.stopPropagation();
51
-
52
- this.$button.css({display: "block"});
53
- this.$button.prop("disabled", true);
54
- this.$button.addClass("active spinner");
55
- ajax.complete(function (res) {
56
- self.$button.prop("disabled", false);
57
- self.$button.removeClass("spinner");
58
- self.$button.removeClass("active");
59
- self.$el.removeClass("active");
60
- self.$el.addClass("is_smushed");
61
- });
62
- }
63
- });
64
-
65
-
66
- /**
67
- * Add smush it button to the image thumb
68
- */
69
- WP_Smush.Attachments = wp.media.view.Attachments.extend({
70
- createAttachmentView: function (attachment) {
71
-
72
- var view = wp.media.view.Attachments.__super__.createAttachmentView.apply(this, arguments);
73
-
74
- _.defer(function () {
75
- var smush_button = new SmushButton({model: view.model});
76
- view.$el.append(smush_button.el);
77
- view.$el.addClass("has-smush-button");
78
- });
79
-
80
- return view;
81
- }
82
- });
83
- //wp.media.view.Attachments = WP_Smush.Attachments;
84
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/wp-smushit-admin.js CHANGED
@@ -786,8 +786,26 @@ jQuery(function ($) {
786
  e.preventDefault();
787
 
788
  var self = $(this);
 
 
 
 
 
 
 
 
 
 
 
 
 
789
  //Update text
790
- self.attr('disabled', 'disabled').addClass('button-grey').val( wp_smush_msgs.checking );
 
 
 
 
 
791
  self.parent().find('.spinner').addClass('is-active');
792
 
793
  //Check if type is set in data attributes
@@ -894,6 +912,18 @@ jQuery(function ($) {
894
  $.post(ajaxurl, param );
895
  });
896
 
 
 
 
 
 
 
 
 
 
 
 
 
897
  });
898
  (function ($) {
899
  var Smush = function (element, options) {
786
  e.preventDefault();
787
 
788
  var self = $(this);
789
+
790
+ //Get all the main settings
791
+ var keep_exif = document.getElementById("wp-smush-keep_exif");
792
+ var super_smush = document.getElementById("wp-smush-lossy");
793
+ var smush_original = document.getElementById("wp-smush-original");
794
+
795
+ var update_button_txt = true;
796
+
797
+ //If Preserve Exif is Checked, and all other settings are off, just save the settings
798
+ if ( keep_exif.checked && !super_smush.checked && !smush_original.checked ) {
799
+ update_button_txt = false;
800
+ }
801
+
802
  //Update text
803
+ self.attr('disabled', 'disabled').addClass('button-grey');
804
+
805
+ if( update_button_txt ) {
806
+ self.val( wp_smush_msgs.checking )
807
+ }
808
+
809
  self.parent().find('.spinner').addClass('is-active');
810
 
811
  //Check if type is set in data attributes
912
  $.post(ajaxurl, param );
913
  });
914
 
915
+ //Allow the checkboxes to be Keyboard Accessible
916
+ $('.wp-smush-setting-row .toggle-checkbox').focus(function () {
917
+ //If Space is pressed
918
+ $(this).keypress(function (e) {
919
+ if (e.keyCode == 32) {
920
+ e.preventDefault();
921
+ $(this).find('.toggle-checkbox').click();
922
+ }
923
+ });
924
+ });
925
+
926
+
927
  });
928
  (function ($) {
929
  var Smush = function (element, options) {
assets/shared-ui/plugin-ui.php CHANGED
@@ -15,7 +15,7 @@ if ( ! class_exists( 'WDEV_Plugin_Ui' ) ) {
15
  /**
16
  * Current module version.
17
  */
18
- const VERSION = '1.0';
19
 
20
  /**
21
  * Internal translation container.
15
  /**
16
  * Current module version.
17
  */
18
+ const VERSION = '1.1';
19
 
20
  /**
21
  * Internal translation container.
assets/shared-ui/wdev-ui.css CHANGED
@@ -161,9 +161,10 @@
161
  display: inline-block;
162
  margin: 0;
163
  }
164
- #wpfooter {
165
  display: none;
166
  }
 
167
  .wpmud a {
168
  text-decoration: none;
169
  color: #19B4CF;
161
  display: inline-block;
162
  margin: 0;
163
  }
164
+ .wpmud #wpfooter {
165
  display: none;
166
  }
167
+
168
  .wpmud a {
169
  text-decoration: none;
170
  color: #19B4CF;
extras/free-dashboard/.gitignore ADDED
@@ -0,0 +1 @@
 
1
+ .svn
extras/free-dashboard/README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WDEV Frash module #
2
+
3
+ WPMU DEV Free Dashboard module (short wdev-frash) is used in our free plugins hosted on wordpress.org
4
+ It will display a welcome message upon plugin activation that offers the user a 5-day introduction email course for the plugin. After 7 days the module will display another message asking the user to rate the plugin on wordpress.org
5
+
6
+ # How to use it #
7
+
8
+ 1. Insert this repository as **sub-module** into the existing project
9
+
10
+ 2. Include the file `module.php` in your main plugin file.
11
+
12
+ 3. Call the action `wdev-register-plugin` with the params mentioned below.
13
+
14
+ 4. Done!
15
+
16
+
17
+ ## Code Example (from Membership 2) ##
18
+
19
+ ```
20
+ #!php
21
+
22
+ <?php
23
+ // Load the WDev-Frash module.
24
+ include_once 'lib/wdev-frash/module.php';
25
+
26
+ // Register the current plugin.
27
+ do_action(
28
+ 'wdev-register-plugin',
29
+ /* 1 Plugin ID */ plugin_basename( __FILE__ ),
30
+ /* 2 Plugin Title */ 'Membership 2',
31
+ /* 3 https://wordpress.org */ '/plugins/membership/',
32
+ /* 4 Email Button CTA */ __( 'Get Members!', MYD_TEXT_DOMAIN ),
33
+ /* 5 getdrip Plugin param */ 'Membership'
34
+ );
35
+ // All done!
36
+ ```
37
+
38
+ 1. Always same, do not change
39
+ 2. The plugin title, same as in the plugin header (no translation!)
40
+ 3. The wordpress.org plugin-URL
41
+ 4. Optional: Title of the Email-subscription button. If empty no email message is displayed.
42
+ 5. Optional: getdrip plugin name (defined in the getdrip rule). If empty no email message is displayed
43
+
44
+
45
+ ## Optional: Customize the messages via filters ##
46
+
47
+ ```
48
+ <?php
49
+ // The email message contains 1 variable: plugin-name
50
+ add_filter(
51
+ 'wdev-email-message-' . plugin_basename( __FILE__ ),
52
+ 'custom_email_message'
53
+ );
54
+ function custom_email_message( $message ) {
55
+ $message = 'You installed %s! This is a custom <u>email message</u>';
56
+ return $message;
57
+ }
58
+ ```
59
+
60
+ ```
61
+ <?php
62
+ // The rating message contains 2 variables: user-name, plugin-name
63
+ add_filter(
64
+ 'wdev-rating-message-' . plugin_basename( __FILE__ ),
65
+ 'custom_rating_message'
66
+ );
67
+ function custom_rating_message( $message ) {
68
+ $message = 'Hi %s, you used %s for a while now! This is a custom <u>rating message</u>';
69
+ return $message;
70
+ }
71
+ ```
languages/wp-smushit.pot CHANGED
@@ -2,9 +2,9 @@
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.2\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/wp-smushit\n"
7
- "POT-Creation-Date: 2016-04-12 10:56:34+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -57,176 +57,176 @@ msgstr ""
57
  msgid "Rate %s"
58
  msgstr ""
59
 
60
- #: lib/class-wp-smush-admin.php:153
61
  msgid "Automatically smush my images on upload"
62
  msgstr ""
63
 
64
- #: lib/class-wp-smush-admin.php:154
65
  msgid "When you upload images to the media library, we’ll automatically optimize them."
66
  msgstr ""
67
 
68
- #: lib/class-wp-smush-admin.php:157
69
  msgid "Preserve image EXIF data"
70
  msgstr ""
71
 
72
- #: lib/class-wp-smush-admin.php:158
73
  msgid "EXIF data stores camera settings, focal length, date, time and location information in image files. EXIF data makes image files larger but if you are a photographer you may want to preserve this information."
74
  msgstr ""
75
 
76
- #: lib/class-wp-smush-admin.php:161
77
  msgid "Super-smush my images"
78
  msgstr ""
79
 
80
- #: lib/class-wp-smush-admin.php:162
81
  msgid "Compress images up to 10x more than regular smush with almost no visible drop in quality."
82
  msgstr ""
83
 
84
- #: lib/class-wp-smush-admin.php:165
85
  msgid "Include my original full-size images"
86
  msgstr ""
87
 
88
- #: lib/class-wp-smush-admin.php:166
89
  msgid "WordPress crops and resizes every image you upload for embedding on your site. By default, Smush only compresses these cropped and resized images, not your original full-size images. To save space on your server, activate this setting to smush your original images, too. Note: This doesn’t usually improve page speed."
90
  msgstr ""
91
 
92
- #: lib/class-wp-smush-admin.php:169
93
  msgid "Make a copy of my original images"
94
  msgstr ""
95
 
96
- #: lib/class-wp-smush-admin.php:170
97
  msgid "Save your original full-size images so you can restore them at any point. Note: Activating this setting will significantly increase the size of your uploads folder by nearly twice as much."
98
  msgstr ""
99
 
100
- #: lib/class-wp-smush-admin.php:177
101
  msgid "Enable NextGen Gallery integration"
102
  msgstr ""
103
 
104
- #: lib/class-wp-smush-admin.php:178
105
  msgid "Allow smushing images directly through NextGen Gallery settings."
106
  msgstr ""
107
 
108
- #: lib/class-wp-smush-admin.php:197 lib/class-wp-smush-ui.php:607
109
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:70
110
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:89
111
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:91
112
  msgid "WP Smush"
113
  msgstr ""
114
 
115
- #: lib/class-wp-smush-admin.php:320 lib/class-wp-smush.php:939
116
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:159
117
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:277
118
  msgid "Super-Smush"
119
  msgstr ""
120
 
121
- #: lib/class-wp-smush-admin.php:321
122
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:160
123
  msgid "Smush Now"
124
  msgstr ""
125
 
126
- #: lib/class-wp-smush-admin.php:322
127
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:161
128
  msgid "{{errors}} image(s) were skipped due to an error."
129
  msgstr ""
130
 
131
- #: lib/class-wp-smush-admin.php:323
132
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:162
133
  msgid "All images are fully optimised."
134
  msgstr ""
135
 
136
- #: lib/class-wp-smush-admin.php:324
137
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:163
138
  msgid "Restoring image.."
139
  msgstr ""
140
 
141
- #: lib/class-wp-smush-admin.php:325
142
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:164
143
  msgid "Smushing image.."
144
  msgstr ""
145
 
146
- #: lib/class-wp-smush-admin.php:326
147
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:165
148
  msgid "Checking images.."
149
  msgstr ""
150
 
151
- #: lib/class-wp-smush-admin.php:504
152
  msgid "Smush request timed out, You can try setting a higher value for `WP_SMUSH_API_TIMEOUT`."
153
  msgstr ""
154
 
155
- #: lib/class-wp-smush-admin.php:526 lib/class-wp-smush-nextgen.php:379
156
  msgid "You don't have permission to work with uploaded files."
157
  msgstr ""
158
 
159
- #: lib/class-wp-smush-admin.php:530 lib/class-wp-smush-nextgen.php:383
160
  msgid "No attachment ID was provided."
161
  msgstr ""
162
 
163
- #: lib/class-wp-smush-admin.php:719
164
  msgid "<strong>%d of %d images</strong> were sent for smushing:"
165
  msgstr ""
166
 
167
- #: lib/class-wp-smush-admin.php:860 lib/class-wp-smush-admin.php:873
168
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:334
169
  msgid "Bulk Smush Now"
170
  msgstr ""
171
 
172
- #: lib/class-wp-smush-admin.php:867
173
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:338
174
  msgid "All Done!"
175
  msgstr ""
176
 
177
- #: lib/class-wp-smush-admin.php:906
178
  msgid "Settings"
179
  msgstr ""
180
 
181
- #: lib/class-wp-smush-admin.php:951
182
  msgid "THANKS FOR UPDATING SMUSH!"
183
  msgstr ""
184
 
185
- #: lib/class-wp-smush-admin.php:951
186
  msgid "HAPPY SMUSHING!"
187
  msgstr ""
188
 
189
- #: lib/class-wp-smush-admin.php:1104 lib/class-wp-smush-nextgen.php:466
190
  msgid "Error in processing restore action, Fields empty."
191
  msgstr ""
192
 
193
- #: lib/class-wp-smush-admin.php:1111 lib/class-wp-smush-nextgen.php:473
194
  msgid "Image not restored, Nonce verification failed."
195
  msgstr ""
196
 
197
- #: lib/class-wp-smush-admin.php:1185 lib/class-wp-smush-nextgen.php:548
198
  msgid "Unable to restore image"
199
  msgstr ""
200
 
201
- #: lib/class-wp-smush-admin.php:1202
202
  msgid "Image not smushed, fields empty."
203
  msgstr ""
204
 
205
- #: lib/class-wp-smush-admin.php:1209 lib/class-wp-smush-nextgen.php:566
206
  msgid "Image couldn't be smushed as the nonce verification failed, try reloading the page."
207
  msgstr ""
208
 
209
- #: lib/class-wp-smush-admin.php:1226
210
  msgid "Unable to smush image"
211
  msgstr ""
212
 
213
- #: lib/class-wp-smush-admin.php:1245
214
  msgid "Yay! All images are optimised as per your current settings."
215
  msgstr ""
216
 
217
- #: lib/class-wp-smush-admin.php:1371 lib/class-wp-smush-ui.php:584
218
  msgid "You have images that need smushing. %sBulk smush now!%s"
219
  msgstr ""
220
 
221
- #: lib/class-wp-smush-nextgen.php:334
222
  msgid "We couldn't find the metadata for the image, possibly the image has been deleted."
223
  msgstr ""
224
 
225
- #: lib/class-wp-smush-nextgen.php:559
226
  msgid "We couldn't process the image, fields empty."
227
  msgstr ""
228
 
229
- #: lib/class-wp-smush-nextgen.php:583
230
  msgid "Unable to smush image, %s"
231
  msgstr ""
232
 
@@ -255,7 +255,7 @@ msgid "Media Library"
255
  msgstr ""
256
 
257
  #: lib/class-wp-smush-ui.php:97
258
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:481
259
  msgid "BULK SMUSH"
260
  msgstr ""
261
 
@@ -264,287 +264,291 @@ msgid "SETTINGS"
264
  msgstr ""
265
 
266
  #: lib/class-wp-smush-ui.php:126
267
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:501
268
  msgid "Lets you check if any images can be further optimised. Useful after changing settings."
269
  msgstr ""
270
 
271
  #: lib/class-wp-smush-ui.php:126
272
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:501
273
  msgid "RE-CHECK IMAGES"
274
  msgstr ""
275
 
276
  #: lib/class-wp-smush-ui.php:127
277
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:502
278
  msgid "STATS"
279
  msgstr ""
280
 
281
  #: lib/class-wp-smush-ui.php:131
282
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:507
283
  msgid "TOTAL % REDUCTIONS"
284
  msgstr ""
285
 
286
  #: lib/class-wp-smush-ui.php:139
287
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:519
288
  msgid "TOTAL SIZE REDUCTIONS"
289
  msgstr ""
290
 
291
  #: lib/class-wp-smush-ui.php:146
292
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:528
293
  msgid "ATTACHMENTS SMUSHED"
294
  msgstr ""
295
 
296
- #: lib/class-wp-smush-ui.php:159
297
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:543
298
  msgid "ATTACHMENTS SUPER-SMUSHED"
299
  msgstr ""
300
 
301
- #: lib/class-wp-smush-ui.php:164
302
  msgid "%sENABLE%s"
303
  msgstr ""
304
 
305
- #: lib/class-wp-smush-ui.php:189
306
  msgid "UPDATE SETTINGS"
307
  msgstr ""
308
 
309
- #: lib/class-wp-smush-ui.php:203
310
  msgid "%sPRO ONLY%s"
311
  msgstr ""
312
 
313
- #: lib/class-wp-smush-ui.php:205
314
  msgid "ADVANCED SETTINGS"
315
  msgstr ""
316
 
317
- #: lib/class-wp-smush-ui.php:376
318
  msgid "TRY WP SMUSH PRO - DEV TEAM"
319
  msgstr ""
320
 
321
- #: lib/class-wp-smush-ui.php:392
322
  msgid "BOOST YOUR PERFORMANCE - HUMMINGBIRD"
323
  msgstr ""
324
 
325
- #: lib/class-wp-smush-ui.php:419
326
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:422
327
  msgid "No attachments found - Upload some images"
328
  msgstr ""
329
 
330
- #: lib/class-wp-smush-ui.php:421
331
  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!"
332
  msgstr ""
333
 
334
- #: lib/class-wp-smush-ui.php:424
335
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:427
336
  msgid "UPLOAD IMAGES"
337
  msgstr ""
338
 
339
- #: lib/class-wp-smush-ui.php:429
340
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:432
341
  msgid "No attachments need smushing. Awesome!"
342
  msgstr ""
343
 
344
- #: lib/class-wp-smush-ui.php:434
345
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:437
346
  msgid "BULK SMUSH NOW"
347
  msgstr ""
348
 
349
- #: lib/class-wp-smush-ui.php:445
350
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:445
351
- msgid "%s, you have %s%s%d%s image%s that need smushing!"
352
  msgid_plural "%s, you have %s%s%d%s images%s that need smushing!"
353
  msgstr[0] ""
354
  msgstr[1] ""
355
 
356
- #: lib/class-wp-smush-ui.php:454
357
  msgid "Enable Super-smush in the Settings area to get even more savings with almost no noticeable quality loss."
358
  msgstr ""
359
 
360
- #: lib/class-wp-smush-ui.php:477
361
  msgid "%sBulk smush is currently running.%s You need to keep this page open."
362
  msgstr ""
363
 
364
- #: lib/class-wp-smush-ui.php:487
365
  msgid "%s%d%s of %d attachments have been smushed."
366
  msgstr ""
367
 
368
- #: lib/class-wp-smush-ui.php:493 lib/class-wp-smush-ui.php:523
369
  msgid "CANCEL"
370
  msgstr ""
371
 
372
- #: lib/class-wp-smush-ui.php:509
373
  msgid "%sBulk re-smush is currently running.%s You need to keep this page open."
374
  msgstr ""
375
 
376
- #: lib/class-wp-smush-ui.php:514
377
  msgid "%s%d%s image left to Re-Smush"
378
  msgid_plural "%s%d%s images left to Re-Smush"
379
  msgstr[0] ""
380
  msgstr[1] ""
381
 
382
- #: lib/class-wp-smush-ui.php:562
383
- msgid "%s, you have %s%s%d%s image%s that need re-compressing!"
384
  msgid_plural "%s, you have %s%s%d%s images%s that need re-compressing!"
385
  msgstr[0] ""
386
  msgstr[1] ""
387
 
388
- #: lib/class-wp-smush-ui.php:563
389
  msgid "Skip"
390
  msgstr ""
391
 
392
- #: lib/class-wp-smush-ui.php:577
393
  msgid "Your settings have been updated!"
394
  msgstr ""
395
 
396
- #: lib/class-wp-smush-ui.php:607
397
  msgid "WP Smush Pro"
398
  msgstr ""
399
 
400
- #: lib/class-wp-smush-ui.php:609
401
  msgid "Automatic smushing is %senabled%s. Newly uploaded images will be automagically compressed."
402
  msgstr ""
403
 
404
- #: lib/class-wp-smush-ui.php:609
405
  msgid "Automatic smushing is %sdisabled%s. Newly uploaded images will need to be manually smushed."
406
  msgstr ""
407
 
408
- #: lib/class-wp-smush-ui.php:636
409
  msgid "Thanks for installing Smush. We hope you like it!"
410
  msgstr ""
411
 
412
- #: lib/class-wp-smush-ui.php:637
413
  msgid "And hey, if you do, you can now try out Smush Pro for double the smushy goodness (benchmarked), entirely for free!"
414
  msgstr ""
415
 
416
- #: lib/class-wp-smush-ui.php:638
417
  msgid "FIND OUT MORE"
418
  msgstr ""
419
 
420
- #: lib/class-wp-smush-ui.php:640
421
  msgid "Did you know that you can now %stry out Smush Pro%s for FREE?"
422
  msgstr ""
423
 
424
- #: lib/class-wp-smush-ui.php:641
425
  msgid "Yep, Super Smush your images for double the savings, save originals and batch Smush thousands of images all at once.... no charge!!!"
426
  msgstr ""
427
 
428
- #: lib/class-wp-smush-ui.php:642
429
  msgid "TRY SMUSH PRO FOR FREE"
430
  msgstr ""
431
 
432
- #: lib/class-wp-smush-ui.php:665
433
  msgid "Did you know WP Smush Pro delivers up to 10x better compression, allows you to smush your originals and removes any bulk smushing limits? – %sTry it absolutely FREE%s"
434
  msgstr ""
435
 
436
- #: lib/class-wp-smush.php:142
 
 
 
 
437
  msgid "File path is empty"
438
  msgstr ""
439
 
440
- #: lib/class-wp-smush.php:147
441
  msgid "Could not find %s"
442
  msgstr ""
443
 
444
- #: lib/class-wp-smush.php:152
445
  msgid "%s is not writable"
446
  msgstr ""
447
 
448
- #: lib/class-wp-smush.php:162
449
  msgid "Skipped (%s), image not found. Attachment: %s"
450
  msgstr ""
451
 
452
- #: lib/class-wp-smush.php:167
453
  msgid "Skipped (%s), size limit exceeded. Attachment: %s"
454
  msgstr ""
455
 
456
- #: lib/class-wp-smush.php:186
457
  msgid "Unknown API error"
458
  msgstr ""
459
 
460
- #: lib/class-wp-smush.php:613
461
  msgid "Error posting to API: %s"
462
  msgstr ""
463
 
464
- #: lib/class-wp-smush.php:619
465
  msgid "Error posting to API: %s %s"
466
  msgstr ""
467
 
468
- #: lib/class-wp-smush.php:636
469
  msgid "Smush data corrupted, try again."
470
  msgstr ""
471
 
472
- #: lib/class-wp-smush.php:652
473
  msgid "Image couldn't be smushed"
474
  msgstr ""
475
 
476
- #: lib/class-wp-smush.php:866 lib/class-wp-smush.php:870
477
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:195
478
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:198
479
  msgid "Already Optimized"
480
  msgstr ""
481
 
482
- #: lib/class-wp-smush.php:879
483
  msgid "%d images reduced "
484
  msgstr ""
485
 
486
- #: lib/class-wp-smush.php:879
487
  msgid "Reduced "
488
  msgstr ""
489
 
490
- #: lib/class-wp-smush.php:880
491
  msgid "by %s ( %01.1f%% )"
492
  msgstr ""
493
 
494
- #: lib/class-wp-smush.php:914
495
  msgid "Detailed stats for all the image sizes"
496
  msgstr ""
497
 
498
- #: lib/class-wp-smush.php:914
499
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:238
500
  msgid "Smush stats"
501
  msgstr ""
502
 
503
- #: lib/class-wp-smush.php:946
504
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:247
505
  msgid "Not processed"
506
  msgstr ""
507
 
508
- #: lib/class-wp-smush.php:952
509
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:253
510
  msgid "Smush Now!"
511
  msgstr ""
512
 
513
- #: lib/class-wp-smush.php:1286
514
  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."
515
  msgstr ""
516
 
517
- #: lib/class-wp-smush.php:1289
518
  msgid "Image couldn't be smushed as it exceeded the 1Mb size limit, Pro users can smush images with size upto 32Mb."
519
  msgstr ""
520
 
521
- #: lib/class-wp-smush.php:1291
522
  msgid " Skipped"
523
  msgstr ""
524
 
525
- #: lib/class-wp-smush.php:1311
526
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:396
527
  msgid "Image size"
528
  msgstr ""
529
 
530
- #: lib/class-wp-smush.php:1312
531
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:397
532
  msgid "Savings"
533
  msgstr ""
534
 
535
- #: lib/class-wp-smush.php:1494
536
  msgid "Restore original image."
537
  msgstr ""
538
 
539
- #: lib/class-wp-smush.php:1494
540
  msgid "Restore image"
541
  msgstr ""
542
 
543
- #: lib/class-wp-smush.php:1539
544
  msgid "Smush image including original file."
545
  msgstr ""
546
 
547
- #: lib/class-wp-smush.php:1539
548
  msgid "Resmush image"
549
  msgstr ""
550
 
@@ -552,23 +556,23 @@ msgstr ""
552
  msgid "Bulk WP Smush"
553
  msgstr ""
554
 
555
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:424
556
  msgid "We haven’t found any images in your %sgallery%s yet, so there’s no smushing to be done! Once you upload images, reload this page and start playing!"
557
  msgstr ""
558
 
559
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:461
560
  msgid "Enable Super-smush in the %sSettings%s area to get even more savings with almost no noticeable quality loss."
561
  msgstr ""
562
 
563
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:476
564
  msgid "Smush individual images via your %sManage Galleries%s section"
565
  msgstr ""
566
 
567
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:476
568
  msgid "Manage Galleries"
569
  msgstr ""
570
 
571
- #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:551
572
  msgid "%sDISABLED%s"
573
  msgstr ""
574
 
@@ -580,11 +584,11 @@ msgstr ""
580
  msgid "Reduced by %s ( %01.1f%% )"
581
  msgstr ""
582
 
583
- #: wp-smush.php:131
584
  msgid "Get Fast"
585
  msgstr ""
586
 
587
- #: wp-smush.php:185
588
  msgid "WP Smush Free was deactivated. You have WP Smush Pro active!"
589
  msgstr ""
590
  #. Plugin Name of the plugin/theme
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.2.2\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/wp-smushit\n"
7
+ "POT-Creation-Date: 2016-04-16 09:30:55+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
57
  msgid "Rate %s"
58
  msgstr ""
59
 
60
+ #: lib/class-wp-smush-admin.php:154
61
  msgid "Automatically smush my images on upload"
62
  msgstr ""
63
 
64
+ #: lib/class-wp-smush-admin.php:155
65
  msgid "When you upload images to the media library, we’ll automatically optimize them."
66
  msgstr ""
67
 
68
+ #: lib/class-wp-smush-admin.php:158
69
  msgid "Preserve image EXIF data"
70
  msgstr ""
71
 
72
+ #: lib/class-wp-smush-admin.php:159
73
  msgid "EXIF data stores camera settings, focal length, date, time and location information in image files. EXIF data makes image files larger but if you are a photographer you may want to preserve this information."
74
  msgstr ""
75
 
76
+ #: lib/class-wp-smush-admin.php:162
77
  msgid "Super-smush my images"
78
  msgstr ""
79
 
80
+ #: lib/class-wp-smush-admin.php:163
81
  msgid "Compress images up to 10x more than regular smush with almost no visible drop in quality."
82
  msgstr ""
83
 
84
+ #: lib/class-wp-smush-admin.php:166
85
  msgid "Include my original full-size images"
86
  msgstr ""
87
 
88
+ #: lib/class-wp-smush-admin.php:167
89
  msgid "WordPress crops and resizes every image you upload for embedding on your site. By default, Smush only compresses these cropped and resized images, not your original full-size images. To save space on your server, activate this setting to smush your original images, too. Note: This doesn’t usually improve page speed."
90
  msgstr ""
91
 
92
+ #: lib/class-wp-smush-admin.php:170
93
  msgid "Make a copy of my original images"
94
  msgstr ""
95
 
96
+ #: lib/class-wp-smush-admin.php:171
97
  msgid "Save your original full-size images so you can restore them at any point. Note: Activating this setting will significantly increase the size of your uploads folder by nearly twice as much."
98
  msgstr ""
99
 
100
+ #: lib/class-wp-smush-admin.php:178
101
  msgid "Enable NextGen Gallery integration"
102
  msgstr ""
103
 
104
+ #: lib/class-wp-smush-admin.php:179
105
  msgid "Allow smushing images directly through NextGen Gallery settings."
106
  msgstr ""
107
 
108
+ #: lib/class-wp-smush-admin.php:198 lib/class-wp-smush-ui.php:615
109
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:70
110
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:89
111
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:91
112
  msgid "WP Smush"
113
  msgstr ""
114
 
115
+ #: lib/class-wp-smush-admin.php:294 lib/class-wp-smush.php:942
116
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:157
117
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:277
118
  msgid "Super-Smush"
119
  msgstr ""
120
 
121
+ #: lib/class-wp-smush-admin.php:295
122
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:158
123
  msgid "Smush Now"
124
  msgstr ""
125
 
126
+ #: lib/class-wp-smush-admin.php:296
127
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:159
128
  msgid "{{errors}} image(s) were skipped due to an error."
129
  msgstr ""
130
 
131
+ #: lib/class-wp-smush-admin.php:297
132
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:160
133
  msgid "All images are fully optimised."
134
  msgstr ""
135
 
136
+ #: lib/class-wp-smush-admin.php:298
137
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:161
138
  msgid "Restoring image.."
139
  msgstr ""
140
 
141
+ #: lib/class-wp-smush-admin.php:299
142
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:162
143
  msgid "Smushing image.."
144
  msgstr ""
145
 
146
+ #: lib/class-wp-smush-admin.php:300
147
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:163
148
  msgid "Checking images.."
149
  msgstr ""
150
 
151
+ #: lib/class-wp-smush-admin.php:503
152
  msgid "Smush request timed out, You can try setting a higher value for `WP_SMUSH_API_TIMEOUT`."
153
  msgstr ""
154
 
155
+ #: lib/class-wp-smush-admin.php:525 lib/class-wp-smush-nextgen.php:384
156
  msgid "You don't have permission to work with uploaded files."
157
  msgstr ""
158
 
159
+ #: lib/class-wp-smush-admin.php:529 lib/class-wp-smush-nextgen.php:388
160
  msgid "No attachment ID was provided."
161
  msgstr ""
162
 
163
+ #: lib/class-wp-smush-admin.php:718
164
  msgid "<strong>%d of %d images</strong> were sent for smushing:"
165
  msgstr ""
166
 
167
+ #: lib/class-wp-smush-admin.php:859 lib/class-wp-smush-admin.php:872
168
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:335
169
  msgid "Bulk Smush Now"
170
  msgstr ""
171
 
172
+ #: lib/class-wp-smush-admin.php:866
173
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:339
174
  msgid "All Done!"
175
  msgstr ""
176
 
177
+ #: lib/class-wp-smush-admin.php:905
178
  msgid "Settings"
179
  msgstr ""
180
 
181
+ #: lib/class-wp-smush-admin.php:950
182
  msgid "THANKS FOR UPDATING SMUSH!"
183
  msgstr ""
184
 
185
+ #: lib/class-wp-smush-admin.php:950
186
  msgid "HAPPY SMUSHING!"
187
  msgstr ""
188
 
189
+ #: lib/class-wp-smush-admin.php:1106 lib/class-wp-smush-nextgen.php:471
190
  msgid "Error in processing restore action, Fields empty."
191
  msgstr ""
192
 
193
+ #: lib/class-wp-smush-admin.php:1113 lib/class-wp-smush-nextgen.php:478
194
  msgid "Image not restored, Nonce verification failed."
195
  msgstr ""
196
 
197
+ #: lib/class-wp-smush-admin.php:1187 lib/class-wp-smush-nextgen.php:553
198
  msgid "Unable to restore image"
199
  msgstr ""
200
 
201
+ #: lib/class-wp-smush-admin.php:1204
202
  msgid "Image not smushed, fields empty."
203
  msgstr ""
204
 
205
+ #: lib/class-wp-smush-admin.php:1211 lib/class-wp-smush-nextgen.php:571
206
  msgid "Image couldn't be smushed as the nonce verification failed, try reloading the page."
207
  msgstr ""
208
 
209
+ #: lib/class-wp-smush-admin.php:1228
210
  msgid "Unable to smush image"
211
  msgstr ""
212
 
213
+ #: lib/class-wp-smush-admin.php:1247
214
  msgid "Yay! All images are optimised as per your current settings."
215
  msgstr ""
216
 
217
+ #: lib/class-wp-smush-admin.php:1391 lib/class-wp-smush-ui.php:590
218
  msgid "You have images that need smushing. %sBulk smush now!%s"
219
  msgstr ""
220
 
221
+ #: lib/class-wp-smush-nextgen.php:339
222
  msgid "We couldn't find the metadata for the image, possibly the image has been deleted."
223
  msgstr ""
224
 
225
+ #: lib/class-wp-smush-nextgen.php:564
226
  msgid "We couldn't process the image, fields empty."
227
  msgstr ""
228
 
229
+ #: lib/class-wp-smush-nextgen.php:588
230
  msgid "Unable to smush image, %s"
231
  msgstr ""
232
 
255
  msgstr ""
256
 
257
  #: lib/class-wp-smush-ui.php:97
258
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:483
259
  msgid "BULK SMUSH"
260
  msgstr ""
261
 
264
  msgstr ""
265
 
266
  #: lib/class-wp-smush-ui.php:126
267
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:503
268
  msgid "Lets you check if any images can be further optimised. Useful after changing settings."
269
  msgstr ""
270
 
271
  #: lib/class-wp-smush-ui.php:126
272
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:503
273
  msgid "RE-CHECK IMAGES"
274
  msgstr ""
275
 
276
  #: lib/class-wp-smush-ui.php:127
277
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:504
278
  msgid "STATS"
279
  msgstr ""
280
 
281
  #: lib/class-wp-smush-ui.php:131
282
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:509
283
  msgid "TOTAL % REDUCTIONS"
284
  msgstr ""
285
 
286
  #: lib/class-wp-smush-ui.php:139
287
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:521
288
  msgid "TOTAL SIZE REDUCTIONS"
289
  msgstr ""
290
 
291
  #: lib/class-wp-smush-ui.php:146
292
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:530
293
  msgid "ATTACHMENTS SMUSHED"
294
  msgstr ""
295
 
296
+ #: lib/class-wp-smush-ui.php:158
297
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:545
298
  msgid "ATTACHMENTS SUPER-SMUSHED"
299
  msgstr ""
300
 
301
+ #: lib/class-wp-smush-ui.php:163
302
  msgid "%sENABLE%s"
303
  msgstr ""
304
 
305
+ #: lib/class-wp-smush-ui.php:188
306
  msgid "UPDATE SETTINGS"
307
  msgstr ""
308
 
309
+ #: lib/class-wp-smush-ui.php:202
310
  msgid "%sPRO ONLY%s"
311
  msgstr ""
312
 
313
+ #: lib/class-wp-smush-ui.php:204
314
  msgid "ADVANCED SETTINGS"
315
  msgstr ""
316
 
317
+ #: lib/class-wp-smush-ui.php:382
318
  msgid "TRY WP SMUSH PRO - DEV TEAM"
319
  msgstr ""
320
 
321
+ #: lib/class-wp-smush-ui.php:398
322
  msgid "BOOST YOUR PERFORMANCE - HUMMINGBIRD"
323
  msgstr ""
324
 
325
+ #: lib/class-wp-smush-ui.php:425
326
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:423
327
  msgid "No attachments found - Upload some images"
328
  msgstr ""
329
 
330
+ #: lib/class-wp-smush-ui.php:427
331
  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!"
332
  msgstr ""
333
 
334
+ #: lib/class-wp-smush-ui.php:430
335
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:428
336
  msgid "UPLOAD IMAGES"
337
  msgstr ""
338
 
339
+ #: lib/class-wp-smush-ui.php:435
340
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:433
341
  msgid "No attachments need smushing. Awesome!"
342
  msgstr ""
343
 
344
+ #: lib/class-wp-smush-ui.php:440
345
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:438
346
  msgid "BULK SMUSH NOW"
347
  msgstr ""
348
 
349
+ #: lib/class-wp-smush-ui.php:451
350
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:446
351
+ msgid "%s, you have %s%s%d%s image%s that needs smushing!"
352
  msgid_plural "%s, you have %s%s%d%s images%s that need smushing!"
353
  msgstr[0] ""
354
  msgstr[1] ""
355
 
356
+ #: lib/class-wp-smush-ui.php:460
357
  msgid "Enable Super-smush in the Settings area to get even more savings with almost no noticeable quality loss."
358
  msgstr ""
359
 
360
+ #: lib/class-wp-smush-ui.php:483
361
  msgid "%sBulk smush is currently running.%s You need to keep this page open."
362
  msgstr ""
363
 
364
+ #: lib/class-wp-smush-ui.php:493
365
  msgid "%s%d%s of %d attachments have been smushed."
366
  msgstr ""
367
 
368
+ #: lib/class-wp-smush-ui.php:499 lib/class-wp-smush-ui.php:529
369
  msgid "CANCEL"
370
  msgstr ""
371
 
372
+ #: lib/class-wp-smush-ui.php:515
373
  msgid "%sBulk re-smush is currently running.%s You need to keep this page open."
374
  msgstr ""
375
 
376
+ #: lib/class-wp-smush-ui.php:520
377
  msgid "%s%d%s image left to Re-Smush"
378
  msgid_plural "%s%d%s images left to Re-Smush"
379
  msgstr[0] ""
380
  msgstr[1] ""
381
 
382
+ #: lib/class-wp-smush-ui.php:568
383
+ msgid "%s, you have %s%s%d%s image%s that needs re-compressing!"
384
  msgid_plural "%s, you have %s%s%d%s images%s that need re-compressing!"
385
  msgstr[0] ""
386
  msgstr[1] ""
387
 
388
+ #: lib/class-wp-smush-ui.php:569
389
  msgid "Skip"
390
  msgstr ""
391
 
392
+ #: lib/class-wp-smush-ui.php:583
393
  msgid "Your settings have been updated!"
394
  msgstr ""
395
 
396
+ #: lib/class-wp-smush-ui.php:615
397
  msgid "WP Smush Pro"
398
  msgstr ""
399
 
400
+ #: lib/class-wp-smush-ui.php:617
401
  msgid "Automatic smushing is %senabled%s. Newly uploaded images will be automagically compressed."
402
  msgstr ""
403
 
404
+ #: lib/class-wp-smush-ui.php:617
405
  msgid "Automatic smushing is %sdisabled%s. Newly uploaded images will need to be manually smushed."
406
  msgstr ""
407
 
408
+ #: lib/class-wp-smush-ui.php:644
409
  msgid "Thanks for installing Smush. We hope you like it!"
410
  msgstr ""
411
 
412
+ #: lib/class-wp-smush-ui.php:645
413
  msgid "And hey, if you do, you can now try out Smush Pro for double the smushy goodness (benchmarked), entirely for free!"
414
  msgstr ""
415
 
416
+ #: lib/class-wp-smush-ui.php:646
417
  msgid "FIND OUT MORE"
418
  msgstr ""
419
 
420
+ #: lib/class-wp-smush-ui.php:648
421
  msgid "Did you know that you can now %stry out Smush Pro%s for FREE?"
422
  msgstr ""
423
 
424
+ #: lib/class-wp-smush-ui.php:649
425
  msgid "Yep, Super Smush your images for double the savings, save originals and batch Smush thousands of images all at once.... no charge!!!"
426
  msgstr ""
427
 
428
+ #: lib/class-wp-smush-ui.php:650
429
  msgid "TRY SMUSH PRO FOR FREE"
430
  msgstr ""
431
 
432
+ #: lib/class-wp-smush-ui.php:673
433
  msgid "Did you know WP Smush Pro delivers up to 10x better compression, allows you to smush your originals and removes any bulk smushing limits? – %sTry it absolutely FREE%s"
434
  msgstr ""
435
 
436
+ #: lib/class-wp-smush-ui.php:673
437
+ msgid "Try WP Smush Pro for FREE"
438
+ msgstr ""
439
+
440
+ #: lib/class-wp-smush.php:145
441
  msgid "File path is empty"
442
  msgstr ""
443
 
444
+ #: lib/class-wp-smush.php:150
445
  msgid "Could not find %s"
446
  msgstr ""
447
 
448
+ #: lib/class-wp-smush.php:155
449
  msgid "%s is not writable"
450
  msgstr ""
451
 
452
+ #: lib/class-wp-smush.php:165
453
  msgid "Skipped (%s), image not found. Attachment: %s"
454
  msgstr ""
455
 
456
+ #: lib/class-wp-smush.php:170
457
  msgid "Skipped (%s), size limit exceeded. Attachment: %s"
458
  msgstr ""
459
 
460
+ #: lib/class-wp-smush.php:189
461
  msgid "Unknown API error"
462
  msgstr ""
463
 
464
+ #: lib/class-wp-smush.php:616
465
  msgid "Error posting to API: %s"
466
  msgstr ""
467
 
468
+ #: lib/class-wp-smush.php:622
469
  msgid "Error posting to API: %s %s"
470
  msgstr ""
471
 
472
+ #: lib/class-wp-smush.php:639
473
  msgid "Smush data corrupted, try again."
474
  msgstr ""
475
 
476
+ #: lib/class-wp-smush.php:655
477
  msgid "Image couldn't be smushed"
478
  msgstr ""
479
 
480
+ #: lib/class-wp-smush.php:869 lib/class-wp-smush.php:873
481
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:195
482
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:198
483
  msgid "Already Optimized"
484
  msgstr ""
485
 
486
+ #: lib/class-wp-smush.php:882
487
  msgid "%d images reduced "
488
  msgstr ""
489
 
490
+ #: lib/class-wp-smush.php:882
491
  msgid "Reduced "
492
  msgstr ""
493
 
494
+ #: lib/class-wp-smush.php:883
495
  msgid "by %s ( %01.1f%% )"
496
  msgstr ""
497
 
498
+ #: lib/class-wp-smush.php:917
499
  msgid "Detailed stats for all the image sizes"
500
  msgstr ""
501
 
502
+ #: lib/class-wp-smush.php:917
503
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:238
504
  msgid "Smush stats"
505
  msgstr ""
506
 
507
+ #: lib/class-wp-smush.php:949
508
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:248
509
  msgid "Not processed"
510
  msgstr ""
511
 
512
+ #: lib/class-wp-smush.php:955
513
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:254
514
  msgid "Smush Now!"
515
  msgstr ""
516
 
517
+ #: lib/class-wp-smush.php:1289
518
  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."
519
  msgstr ""
520
 
521
+ #: lib/class-wp-smush.php:1292
522
  msgid "Image couldn't be smushed as it exceeded the 1Mb size limit, Pro users can smush images with size upto 32Mb."
523
  msgstr ""
524
 
525
+ #: lib/class-wp-smush.php:1294
526
  msgid " Skipped"
527
  msgstr ""
528
 
529
+ #: lib/class-wp-smush.php:1314
530
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:396
531
  msgid "Image size"
532
  msgstr ""
533
 
534
+ #: lib/class-wp-smush.php:1315
535
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:397
536
  msgid "Savings"
537
  msgstr ""
538
 
539
+ #: lib/class-wp-smush.php:1497
540
  msgid "Restore original image."
541
  msgstr ""
542
 
543
+ #: lib/class-wp-smush.php:1497
544
  msgid "Restore image"
545
  msgstr ""
546
 
547
+ #: lib/class-wp-smush.php:1542
548
  msgid "Smush image including original file."
549
  msgstr ""
550
 
551
+ #: lib/class-wp-smush.php:1542
552
  msgid "Resmush image"
553
  msgstr ""
554
 
556
  msgid "Bulk WP Smush"
557
  msgstr ""
558
 
559
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:425
560
  msgid "We haven’t found any images in your %sgallery%s yet, so there’s no smushing to be done! Once you upload images, reload this page and start playing!"
561
  msgstr ""
562
 
563
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:463
564
  msgid "Enable Super-smush in the %sSettings%s area to get even more savings with almost no noticeable quality loss."
565
  msgstr ""
566
 
567
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:478
568
  msgid "Smush individual images via your %sManage Galleries%s section"
569
  msgstr ""
570
 
571
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:478
572
  msgid "Manage Galleries"
573
  msgstr ""
574
 
575
+ #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:553
576
  msgid "%sDISABLED%s"
577
  msgstr ""
578
 
584
  msgid "Reduced by %s ( %01.1f%% )"
585
  msgstr ""
586
 
587
+ #: wp-smush.php:130
588
  msgid "Get Fast"
589
  msgstr ""
590
 
591
+ #: wp-smush.php:183
592
  msgid "WP Smush Free was deactivated. You have WP Smush Pro active!"
593
  msgstr ""
594
  #. Plugin Name of the plugin/theme
lib/class-wp-smush-admin.php CHANGED
@@ -50,6 +50,11 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
50
  */
51
  public $smushed_count;
52
 
 
 
 
 
 
53
  /**
54
  * @var Smushed attachments out of total attachments
55
  */
@@ -80,11 +85,6 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
80
  */
81
  public $exceeding_items_count = 0;
82
 
83
- /**
84
- * @var If the plugin is a pro version or not
85
- */
86
- private $is_pro_user;
87
-
88
  private $attachments = '';
89
 
90
  /**
@@ -145,6 +145,7 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
145
  add_action( 'admin_init', array( $this, 'init_settings' ) );
146
 
147
  $this->bulk_ui = new WpSmushBulkUi();
 
148
  }
149
 
150
  function init_settings() {
@@ -218,8 +219,6 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
218
  //For Nextgen gallery Pages, check later in enqueue function
219
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
220
 
221
- //Reset Transient
222
- $this->check_bulk_limit( true );
223
  }
224
 
225
  /**
@@ -229,36 +228,12 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
229
 
230
  global $WpSmush;
231
 
232
- // Register js for smush utton in grid view
233
- $current_blog_id = get_current_blog_id();
234
- $meta_key = $current_blog_id == 1 ? 'wp_media_library_mode' : 'wp_' . $current_blog_id . '_media_library_mode';
235
- $wp_media_library_mode = get_user_meta( get_current_user_id(), $meta_key, true );
236
-
237
- //Either request variable is not empty and grid mode is set, or if request empty then view is as per user choice, or no view is set
238
- if ( ( ! empty( $_REQUEST['mode'] ) && $_REQUEST['mode'] == 'grid' ) ||
239
- ( empty( $_REQUEST['mode'] ) && $wp_media_library_mode != 'list' )
240
- ) {
241
- wp_register_script( 'wp-smushit-admin-js', WP_SMUSH_URL . 'assets/js/wp-smushit-admin.js', array(
242
- 'jquery',
243
- 'media-views'
244
- ), WP_SMUSH_VERSION );
245
- } else {
246
- wp_register_script( 'wp-smushit-admin-js', WP_SMUSH_URL . 'assets/js/wp-smushit-admin.js', array(
247
- 'jquery',
248
- 'underscore'
249
- ), WP_SMUSH_VERSION );
250
- }
251
- wp_register_script( 'wp-smushit-admin-media-js', WP_SMUSH_URL . 'assets/js/wp-smushit-admin-media.js', array( 'jquery' ), $WpSmush->version );
252
-
253
 
254
  /* Register Style. */
255
  wp_register_style( 'wp-smushit-admin-css', WP_SMUSH_URL . 'assets/css/wp-smushit-admin.css', array(), $WpSmush->version );
256
- //Get resmush list
257
- //If we have a resmush list already, localize those ids
258
- if ( $resmush_ids = get_option( "wp-smush-resmush-list" ) ) {
259
- //get the attachments, and get lossless count
260
- $this->resmush_ids = $resmush_ids;
261
- }
262
  }
263
 
264
  /**
@@ -276,8 +251,8 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
276
  */
277
  $enqueue_smush = apply_filters( 'wp_smush_enqueue', true );
278
 
279
- //If we upgrade/install message is dismissed
280
- if( get_option( 'wp-smush-hide_upgrade_notice' ) ) {
281
  //Do not enqueue, unless it is one of the required screen
282
  if ( ! $enqueue_smush || ( $current_page != 'nggallery-manage-images' && $current_page != 'gallery_page_wp-smush-nextgen-bulk' && $pagenow != 'post.php' && $pagenow != 'post-new.php' && $pagenow != 'upload.php' ) ) {
283
 
@@ -309,13 +284,12 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
309
  * Localize Translations
310
  */
311
  function localize() {
 
 
312
 
313
  $bulk = new WpSmushitBulk();
314
  $handle = 'wp-smushit-admin-js';
315
 
316
- //Setup all the stats
317
- $this->setup_global_stats();
318
-
319
  $wp_smush_msgs = array(
320
  'resmush' => esc_html__( 'Super-Smush', 'wp-smushit' ),
321
  'smush_now' => esc_html__( 'Smush Now', 'wp-smushit' ),
@@ -328,22 +302,47 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
328
 
329
  wp_localize_script( $handle, 'wp_smush_msgs', $wp_smush_msgs );
330
 
331
- $this->attachments = $bulk->get_attachments();
 
332
 
333
- //Localize smushit_ids variable, if there are fix number of ids
334
- $this->ids = ! empty( $_REQUEST['ids'] ) ? array_map( 'intval', explode( ',', $_REQUEST['ids'] ) ) : $this->attachments;
335
 
336
- //Array of all smushed, unsmushed and lossless ids
337
- $data = array(
338
- 'count_smushed' => $this->smushed_count,
339
- 'count_total' => $this->total_count,
340
- 'unsmushed' => $this->ids,
341
- 'resmush' => $this->resmush_ids,
342
- 'timeout' => WP_SMUSH_TIMEOUT * 1000, //Convert it into ms
343
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
 
345
  wp_localize_script( 'wp-smushit-admin-js', 'wp_smushit_data', $data );
346
 
 
347
  }
348
 
349
  /**
@@ -354,7 +353,7 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
354
  */
355
  function setup_global_stats( $force_update = false ) {
356
  $this->total_count = $this->total_count();
357
- $this->smushed_count = $this->smushed_count();
358
  $this->remaining_count = $this->remaining_count();
359
  $this->stats = $this->global_stats( $force_update );
360
  }
@@ -381,7 +380,7 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
381
  }
382
 
383
  //Store that we need not redirect again on plugin activation
384
- update_option( 'wp-smush-hide_smush_welcome', true );
385
 
386
  // var to temporarily assign the option value
387
  $setting = null;
@@ -501,7 +500,7 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
501
  $error = $smush->get_error_message();
502
  //Check for timeout error and suggest to filter timeout
503
  if ( strpos( $error, 'timed out' ) ) {
504
- $error = esc_html__( "Smush request timed out, You can try setting a higher value for `WP_SMUSH_API_TIMEOUT`.", "wp-smushit" );
505
  }
506
  wp_send_json_error( array( 'stats' => $stats, 'error_msg' => $error ) );
507
  } else {
@@ -563,7 +562,7 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
563
  if ( $return ) {
564
  return array( 'error' => $smush->get_error_message() );
565
  } else {
566
- wp_send_json_error( array( 'error_msg' => $smush->get_error_message() ) );
567
  }
568
  } else {
569
  if ( $return ) {
@@ -655,10 +654,10 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
655
  *
656
  * @return array|int
657
  */
658
- function smushed_count( $return_ids = false ) {
659
 
660
  //Don't query again, if the variable is already set
661
- if ( ! empty( $this->smushed_count ) && $this->smushed_count > 0 ) {
662
  return $this->smushed_count;
663
  }
664
 
@@ -931,12 +930,12 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
931
  }
932
 
933
  //Return if notice is already dismissed
934
- if ( get_option( 'wp-smush-hide_upgrade_notice' ) ) {
935
  return;
936
  } ?>
937
  <div class="wpmud wp-smush-updated"><?php
938
 
939
- $install_type = get_option( 'wp-smush-install-type', false );
940
 
941
  if ( ! $install_type ) {
942
  if ( $this->smushed_count > 0 ) {
@@ -944,7 +943,7 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
944
  } else {
945
  $install_type = 'new';
946
  }
947
- update_option( 'wp-smush-install-type', $install_type );
948
  }
949
 
950
  //Whether New/Existing Installation
@@ -1079,16 +1078,19 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
1079
  * Store a key/value to hide the smush features on bulk page
1080
  */
1081
  function dismiss_welcome_notice() {
1082
- update_option( 'wp-smush-hide_smush_welcome', 1 );
1083
  wp_send_json_success();
1084
  }
1085
 
1086
  /**
1087
  * Store a key/value to hide the smush features on bulk page
1088
  */
1089
- function dismiss_upgrade_notice() {
1090
- update_option( 'wp-smush-hide_upgrade_notice', 1 );
1091
- wp_send_json_success();
 
 
 
1092
  }
1093
 
1094
  /**
@@ -1243,7 +1245,7 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
1243
  //Default Notice, to be displayed at the top of page
1244
  //Show a message, at the top
1245
  $message = esc_html__( 'Yay! All images are optimised as per your current settings.', 'wp-smushit' );
1246
- $resp = '<div class="wp-smush-notice wp-smush-resmush-message"><i class="dev-icon dev-icon-tick"></i> ' . $message . '
1247
  <i class="dev-icon dev-icon-cross"></i>
1248
  </div>';
1249
 
@@ -1264,9 +1266,21 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
1264
  //Allow to smush Upfront images as well
1265
  $upfront_active = class_exists( 'Upfront' );
1266
 
 
 
 
 
 
 
 
 
 
 
1267
  $key = 'nextgen' == $type ? 'wp-smush-nextgen-resmush-list' : 'wp-smush-resmush-list';
1268
 
1269
- if ( ! $WpSmush->lossy_enabled && ! $WpSmush->smush_original && $WpSmush->keep_exif && ! $upfront_active ) {
 
 
1270
  delete_option( $key );
1271
  wp_send_json_success( array( 'notice' => $resp ) );
1272
  }
@@ -1343,42 +1357,43 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
1343
 
1344
  //Store the resmush list in Options table
1345
  update_option( $key, $resmush_list );
 
1346
 
1347
- //Return the Remsmush list and UI to be appended to Bulk Smush UI
1348
- if ( $return_ui ) {
1349
- if ( 'nextgen' != $type ) {
1350
- //Set the variables
1351
- $this->resmush_ids = $resmush_list;
1352
- } else {
1353
- //To avoid the php warning
1354
- $wpsmushnextgenadmin->resmush_ids = $resmush_list;
1355
- }
1356
 
1357
- //Initialize stats
1358
- if ( empty( $this->remaining_count ) ) {
1359
- $this->setup_global_stats();
1360
- }
 
 
 
 
 
 
 
1361
 
1362
- if ( ( $count = count( $resmush_list ) ) > 0 || $this->remaining_count > 0 ) {
1363
  $show = true;
1364
 
1365
- if ( empty( $wpsmushnextgenadmin->remaining_count ) && 'nextgen' == $type ) {
1366
- $wpsmushnextgenadmin->setup_stats();
1367
- }
1368
  $count += 'nextgen' == $type ? $wpsmushnextgenadmin->remaining_count : $this->remaining_count;
1369
 
1370
  $ajax_response = $this->bulk_ui->bulk_resmush_content( $count, $show );
1371
- $message = sprintf( esc_html__("You have images that need smushing. %sBulk smush now!%s", "wp-smushit"), '<a href="#" class="wp-smush-trigger-bulk">', '</a>' );
1372
- $resp = '<div class="wp-smush-notice wp-smush-resmush-message wp-smush-resmush-pending"><i class="dev-icon dev-icon-tick"></i> ' . $message . '
1373
- <i class="dev-icon dev-icon-cross"></i>
1374
- </div>';
1375
- } else {
1376
- //Delete the resmush list
1377
- delete_option( $key );
1378
  }
1379
  }
1380
  }
1381
 
 
 
 
 
 
 
 
1382
  //If there is a Ajax response return it, else return null
1383
  $return = ! empty( $ajax_response ) ? array(
1384
  "resmush_ids" => $resmush_list,
@@ -1655,8 +1670,10 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
1655
 
1656
  //Get all the smushed attachments
1657
  $attachments = $this->get_lossy_attachments( '', false );
1658
- foreach ( $attachments as $attachment ) {
1659
- update_post_meta( $attachment, 'wp-smush-lossy', 1 );
 
 
1660
  }
1661
  }
1662
  //Get all the attachments with wp-smush-lossy
50
  */
51
  public $smushed_count;
52
 
53
+ /**
54
+ * @var Smushed attachments out of total attachments
55
+ */
56
+ public $remaining_count;
57
+
58
  /**
59
  * @var Smushed attachments out of total attachments
60
  */
85
  */
86
  public $exceeding_items_count = 0;
87
 
 
 
 
 
 
88
  private $attachments = '';
89
 
90
  /**
145
  add_action( 'admin_init', array( $this, 'init_settings' ) );
146
 
147
  $this->bulk_ui = new WpSmushBulkUi();
148
+
149
  }
150
 
151
  function init_settings() {
219
  //For Nextgen gallery Pages, check later in enqueue function
220
  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
221
 
 
 
222
  }
223
 
224
  /**
228
 
229
  global $WpSmush;
230
 
231
+ wp_register_script( 'wp-smushit-admin-js', WP_SMUSH_URL . 'assets/js/wp-smushit-admin.js', array(
232
+ 'jquery'
233
+ ), WP_SMUSH_VERSION );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
 
235
  /* Register Style. */
236
  wp_register_style( 'wp-smushit-admin-css', WP_SMUSH_URL . 'assets/css/wp-smushit-admin.css', array(), $WpSmush->version );
 
 
 
 
 
 
237
  }
238
 
239
  /**
251
  */
252
  $enqueue_smush = apply_filters( 'wp_smush_enqueue', true );
253
 
254
+ //If we upgrade/install message is dismissed and for pro users
255
+ if( get_option( 'wp-smush-hide_upgrade_notice' ) || get_site_option( 'wp-smush-hide_upgrade_notice' ) || $this->is_pro() ) {
256
  //Do not enqueue, unless it is one of the required screen
257
  if ( ! $enqueue_smush || ( $current_page != 'nggallery-manage-images' && $current_page != 'gallery_page_wp-smush-nextgen-bulk' && $pagenow != 'post.php' && $pagenow != 'post-new.php' && $pagenow != 'upload.php' ) ) {
258
 
284
  * Localize Translations
285
  */
286
  function localize() {
287
+ global $current_screen;
288
+ $current_page = !empty( $current_screen ) ? $current_screen->base : '';
289
 
290
  $bulk = new WpSmushitBulk();
291
  $handle = 'wp-smushit-admin-js';
292
 
 
 
 
293
  $wp_smush_msgs = array(
294
  'resmush' => esc_html__( 'Super-Smush', 'wp-smushit' ),
295
  'smush_now' => esc_html__( 'Smush Now', 'wp-smushit' ),
302
 
303
  wp_localize_script( $handle, 'wp_smush_msgs', $wp_smush_msgs );
304
 
305
+ //Load the stats on selected screens only
306
+ if ( $current_page == 'media_page_wp-smush-bulk' ) {
307
 
308
+ $this->attachments = $bulk->get_attachments();
 
309
 
310
+ //Setup all the stats
311
+ $this->setup_global_stats();
312
+
313
+ //Localize smushit_ids variable, if there are fix number of ids
314
+ $this->ids = ! empty( $_REQUEST['ids'] ) ? array_map( 'intval', explode( ',', $_REQUEST['ids'] ) ) : $this->attachments;
315
+
316
+ //Get resmush list, If we have a resmush list already, localize those ids
317
+ if ( $resmush_ids = get_option( "wp-smush-resmush-list" ) ) {
318
+
319
+ //get the attachments, and get lossless count
320
+ $this->resmush_ids = $resmush_ids;
321
+
322
+ }
323
+
324
+ //Array of all smushed, unsmushed and lossless ids
325
+ $data = array(
326
+ 'count_smushed' => $this->smushed_count,
327
+ 'count_total' => $this->total_count,
328
+ 'unsmushed' => $this->ids,
329
+ 'resmush' => $this->resmush_ids,
330
+ );
331
+ }else{
332
+ $data = array(
333
+ 'count_smushed' => '',
334
+ 'count_total' => '',
335
+ 'unsmushed' => '',
336
+ 'resmush' => '',
337
+ );
338
+
339
+ }
340
+
341
+ $data['timeout'] = WP_SMUSH_TIMEOUT * 1000; //Convert it into ms
342
 
343
  wp_localize_script( 'wp-smushit-admin-js', 'wp_smushit_data', $data );
344
 
345
+
346
  }
347
 
348
  /**
353
  */
354
  function setup_global_stats( $force_update = false ) {
355
  $this->total_count = $this->total_count();
356
+ $this->smushed_count = $this->smushed_count( false );
357
  $this->remaining_count = $this->remaining_count();
358
  $this->stats = $this->global_stats( $force_update );
359
  }
380
  }
381
 
382
  //Store that we need not redirect again on plugin activation
383
+ update_site_option( 'wp-smush-hide_smush_welcome', true );
384
 
385
  // var to temporarily assign the option value
386
  $setting = null;
500
  $error = $smush->get_error_message();
501
  //Check for timeout error and suggest to filter timeout
502
  if ( strpos( $error, 'timed out' ) ) {
503
+ $error = '<p class="wp-smush-error-message">' . esc_html__( "Smush request timed out, You can try setting a higher value for `WP_SMUSH_API_TIMEOUT`.", "wp-smushit" ) . '</p>';
504
  }
505
  wp_send_json_error( array( 'stats' => $stats, 'error_msg' => $error ) );
506
  } else {
562
  if ( $return ) {
563
  return array( 'error' => $smush->get_error_message() );
564
  } else {
565
+ wp_send_json_error( array( 'error_msg' => '<p class="wp-smush-error-message">' . $smush->get_error_message() . '</p>' ) );
566
  }
567
  } else {
568
  if ( $return ) {
654
  *
655
  * @return array|int
656
  */
657
+ function smushed_count( $return_ids ) {
658
 
659
  //Don't query again, if the variable is already set
660
+ if ( ! $return_ids && ! empty( $this->smushed_count ) && $this->smushed_count > 0 ) {
661
  return $this->smushed_count;
662
  }
663
 
930
  }
931
 
932
  //Return if notice is already dismissed
933
+ if ( get_option( 'wp-smush-hide_upgrade_notice' ) || get_site_option( 'wp-smush-hide_upgrade_notice' ) ) {
934
  return;
935
  } ?>
936
  <div class="wpmud wp-smush-updated"><?php
937
 
938
+ $install_type = get_site_option( 'wp-smush-install-type', false );
939
 
940
  if ( ! $install_type ) {
941
  if ( $this->smushed_count > 0 ) {
943
  } else {
944
  $install_type = 'new';
945
  }
946
+ update_site_option( 'wp-smush-install-type', $install_type );
947
  }
948
 
949
  //Whether New/Existing Installation
1078
  * Store a key/value to hide the smush features on bulk page
1079
  */
1080
  function dismiss_welcome_notice() {
1081
+ update_site_option( 'wp-smush-hide_smush_welcome', 1 );
1082
  wp_send_json_success();
1083
  }
1084
 
1085
  /**
1086
  * Store a key/value to hide the smush features on bulk page
1087
  */
1088
+ function dismiss_upgrade_notice( $ajax = true ) {
1089
+ update_site_option( 'wp-smush-hide_upgrade_notice', 1 );
1090
+ //No Need to send json response for other requests
1091
+ if ( $ajax ) {
1092
+ wp_send_json_success();
1093
+ }
1094
  }
1095
 
1096
  /**
1245
  //Default Notice, to be displayed at the top of page
1246
  //Show a message, at the top
1247
  $message = esc_html__( 'Yay! All images are optimised as per your current settings.', 'wp-smushit' );
1248
+ $resp = '<div class="wp-smush-notice wp-smush-resmush-message" tabindex="0"><i class="dev-icon dev-icon-tick"></i> ' . $message . '
1249
  <i class="dev-icon dev-icon-cross"></i>
1250
  </div>';
1251
 
1266
  //Allow to smush Upfront images as well
1267
  $upfront_active = class_exists( 'Upfront' );
1268
 
1269
+ //Initialize Media Library Stats
1270
+ if ( 'nextgen' != $type && empty( $this->remaining_count ) ) {
1271
+ $this->setup_global_stats();
1272
+ }
1273
+
1274
+ //Intialize NextGen Stats
1275
+ if ( 'nextgen' == $type && is_object( $wpsmushnextgenadmin ) && empty( $wpsmushnextgenadmin->remaining_count ) ) {
1276
+ $wpsmushnextgenadmin->setup_stats();
1277
+ }
1278
+
1279
  $key = 'nextgen' == $type ? 'wp-smush-nextgen-resmush-list' : 'wp-smush-resmush-list';
1280
 
1281
+ $remaining_count = 'nextgen' == $type ? $wpsmushnextgenadmin->remaining_count : $this->remaining_count;
1282
+
1283
+ if ( 0 == $remaining_count && ! $WpSmush->lossy_enabled && ! $WpSmush->smush_original && $WpSmush->keep_exif && ! $upfront_active ) {
1284
  delete_option( $key );
1285
  wp_send_json_success( array( 'notice' => $resp ) );
1286
  }
1357
 
1358
  //Store the resmush list in Options table
1359
  update_option( $key, $resmush_list );
1360
+ }
1361
 
1362
+ //Delete resmush list if empty
1363
+ if ( empty( $resmush_list ) ) {
1364
+ //Delete the resmush list
1365
+ delete_option( $key );
1366
+ }
 
 
 
 
1367
 
1368
+ //Return the Remsmush list and UI to be appended to Bulk Smush UI
1369
+ if ( $return_ui ) {
1370
+ if ( 'nextgen' != $type ) {
1371
+ //Set the variables
1372
+ $this->resmush_ids = $resmush_list;
1373
+ } else {
1374
+ //To avoid the php warning
1375
+ $wpsmushnextgenadmin->resmush_ids = $resmush_list;
1376
+ }
1377
+
1378
+ if ( ( $count = count( $resmush_list ) ) > 0 || $this->remaining_count > 0 ) {
1379
 
1380
+ if ( $count ) {
1381
  $show = true;
1382
 
 
 
 
1383
  $count += 'nextgen' == $type ? $wpsmushnextgenadmin->remaining_count : $this->remaining_count;
1384
 
1385
  $ajax_response = $this->bulk_ui->bulk_resmush_content( $count, $show );
 
 
 
 
 
 
 
1386
  }
1387
  }
1388
  }
1389
 
1390
+ if( !empty( $resmush_list ) || $remaining_count > 0 ) {
1391
+ $message = sprintf( esc_html__( "You have images that need smushing. %sBulk smush now!%s", "wp-smushit" ), '<a href="#" class="wp-smush-trigger-bulk">', '</a>' );
1392
+ $resp = '<div class="wp-smush-notice wp-smush-resmush-message wp-smush-resmush-pending" tabindex="0"><i class="dev-icon dev-icon-tick"></i> ' . $message . '
1393
+ <i class="dev-icon dev-icon-cross"></i>
1394
+ </div>';
1395
+ }
1396
+
1397
  //If there is a Ajax response return it, else return null
1398
  $return = ! empty( $ajax_response ) ? array(
1399
  "resmush_ids" => $resmush_list,
1670
 
1671
  //Get all the smushed attachments
1672
  $attachments = $this->get_lossy_attachments( '', false );
1673
+ if( !empty( $attachments ) ) {
1674
+ foreach ( $attachments as $attachment ) {
1675
+ update_post_meta( $attachment, 'wp-smush-lossy', 1 );
1676
+ }
1677
  }
1678
  }
1679
  //Get all the attachments with wp-smush-lossy
lib/class-wp-smush-nextgen.php CHANGED
@@ -253,10 +253,15 @@ if ( ! class_exists( 'WpSmushNextGen' ) ) {
253
 
254
  if ( ! empty( $existing_stats ) ) {
255
  $e_size_before = !empty( $existing_stats['stats']['size_before'] ) ? $existing_stats['stats']['size_before'] : '';
 
256
 
257
  //Store Original size before
258
  $stats['stats']['size_before'] = ( !empty($e_size_before ) && $e_size_before > $stats['stats']['size_before'] ) ? $e_size_before : $stats['stats']['size_before'];
259
 
 
 
 
 
260
  //Update total bytes saved, and compression percent
261
  $stats['stats']['bytes'] = isset( $existing_stats['stats']['bytes'] ) ? $existing_stats['stats']['bytes'] + $stats['stats']['bytes'] : $stats['stats']['bytes'];
262
 
@@ -331,7 +336,7 @@ if ( ! class_exists( 'WpSmushNextGen' ) ) {
331
  $metadata = ! empty( $image ) ? $image->meta_data : '';
332
 
333
  if ( empty( $metadata ) ) {
334
- wp_send_json_error( array( 'error_msg' => esc_html__( "We couldn't find the metadata for the image, possibly the image has been deleted.", "wp-smushit" ) ) );
335
  }
336
 
337
  //smush the main image and its sizes
253
 
254
  if ( ! empty( $existing_stats ) ) {
255
  $e_size_before = !empty( $existing_stats['stats']['size_before'] ) ? $existing_stats['stats']['size_before'] : '';
256
+ $e_size_after = isset( $existing_stats['stats']['size_after'] ) ? $existing_stats['stats']['size_after'] : '';
257
 
258
  //Store Original size before
259
  $stats['stats']['size_before'] = ( !empty($e_size_before ) && $e_size_before > $stats['stats']['size_before'] ) ? $e_size_before : $stats['stats']['size_before'];
260
 
261
+ if ( $size_after == 0 || empty( $stats['stats']['size_after'] ) || $stats['stats']['size_after'] == $stats['stats']['size_before'] ) {
262
+ $stats['stats']['size_after'] = $e_size_after < $stats['stats']['size_before'] ? $e_size_after : $stats['stats']['size_before'];
263
+ }
264
+
265
  //Update total bytes saved, and compression percent
266
  $stats['stats']['bytes'] = isset( $existing_stats['stats']['bytes'] ) ? $existing_stats['stats']['bytes'] + $stats['stats']['bytes'] : $stats['stats']['bytes'];
267
 
336
  $metadata = ! empty( $image ) ? $image->meta_data : '';
337
 
338
  if ( empty( $metadata ) ) {
339
+ wp_send_json_error( array( 'error_msg' => '<p class="wp-smush-error-message">' . esc_html__( "We couldn't find the metadata for the image, possibly the image has been deleted.", "wp-smushit" ) . '</p>' ) );
340
  }
341
 
342
  //smush the main image and its sizes
lib/class-wp-smush-ui.php CHANGED
@@ -42,7 +42,7 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
42
  }
43
  echo '<section class="dev-box ' . $classes . ' wp-smush-container" id="' . $id . '">'; ?>
44
  <div class="wp-smush-container-header box-title">
45
- <h3><?php echo $heading ?></h3><?php
46
  //Sub Heading
47
  if ( ! empty( $sub_heading ) ) { ?>
48
  <div class="smush-container-subheading roboto-medium"><?php echo $sub_heading ?></div><?php
@@ -155,15 +155,14 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
155
  $wpsmushit_admin->super_smushed = $wpsmushit_admin->super_smushed_count(); ?>
156
  <hr>
157
  <div class="row super-smush-attachments">
158
- <span
159
- class="float-l wp-smush-stats-label"><strong><?php esc_html_e( "ATTACHMENTS SUPER-SMUSHED", "wp-smushit" ); ?></strong></span>
160
- <span class="float-r wp-smush-stats"><?php
161
- if ( $WpSmush->lossy_enabled ) {
162
- echo '<strong><span class="smushed-count">' . intval( $wpsmushit_admin->super_smushed ) . '</span>/' . $wpsmushit_admin->total_count . '</strong>';
163
- } else {
164
- printf( esc_html__( "%sENABLE%s", "wp-smushit" ), '<span class="wp-smush-lossy-enable">', '</span>' );
165
- } ?>
166
- </span>
167
  </div><?php
168
  }
169
  /**
@@ -217,14 +216,13 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
217
  if ( $WpSmush->is_pro() ) {
218
  echo "<hr />";
219
  }
220
-
221
  //Iterate Over all the available settings, and print a row for each of them
222
  foreach ( $pro_settings as $setting_key ) {
223
  if ( isset( $wpsmushit_admin->settings[ $setting_key ] ) ) {
224
  $setting_m_key = WP_SMUSH_PREFIX . $setting_key;
225
  $setting_val = $WpSmush->is_pro() ? get_option( $setting_m_key, false ) : 0; ?>
226
  <div class='wp-smush-setting-row wp-smush-advanced'>
227
- <label class="inline-label" for="<?php echo $setting_m_key; ?>">
228
  <span
229
  class="wp-smush-setting-label"><?php echo $wpsmushit_admin->settings[ $setting_key ]['label']; ?></span>
230
  <br/>
@@ -236,7 +234,7 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
236
  <input type="checkbox" class="toggle-checkbox"
237
  id="<?php echo $setting_m_key; ?>" <?php checked( $setting_val, 1, true ); ?>
238
  value="1"
239
- name="<?php echo $setting_m_key; ?>">
240
  <label class="toggle-label" for="<?php echo $setting_m_key; ?>"></label>
241
  </span>
242
  </div>
@@ -274,24 +272,27 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
274
  $opt_keep_exif = WP_SMUSH_PREFIX . 'keep_exif';
275
  //Keep Exif
276
  $opt_keep_exif_val = get_option( $opt_keep_exif, false ); ?>
 
277
  <div class='wp-smush-setting-row wp-smush-basic'>
278
- <label class="inline-label" for="<?php echo $opt_auto; ?>">
279
- <span
280
- class="wp-smush-setting-label"><?php echo $wpsmushit_admin->settings['auto']['label']; ?></span><br/>
281
- <small
282
- class="smush-setting-description"><?php echo $wpsmushit_admin->settings['auto']['desc']; ?></small>
 
 
283
  </label>
284
- <span class="toggle float-r">
285
- <input type="checkbox" class="toggle-checkbox"
286
- id="<?php echo $opt_auto; ?>"
287
- name="<?php echo $opt_auto; ?>" <?php checked( $opt_auto_val, 1, true ); ?> value="1">
288
- <label class="toggle-label" for="<?php echo $opt_auto; ?>"></label>
289
- </span>
290
  </div>
291
  <hr/>
292
  <div class='wp-smush-setting-row wp-smush-basic'>
293
- <label class="inline-label" for="<?php echo $opt_keep_exif; ?>"><span
294
- class="wp-smush-setting-label"><?php echo $wpsmushit_admin->settings['keep_exif']['label']; ?></span>
295
  <br/>
296
  <small class="smush-setting-description">
297
  <?php echo $wpsmushit_admin->settings['keep_exif']['desc']; ?>
@@ -300,7 +301,7 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
300
  <span class="toggle float-r">
301
  <input type="checkbox" class="toggle-checkbox"
302
  id="<?php echo $opt_keep_exif; ?>" <?php checked( $opt_keep_exif_val, 1, true ); ?>
303
- value="1" name="<?php echo $opt_keep_exif; ?>">
304
  <label class="toggle-label" for="<?php echo $opt_keep_exif; ?>"></label>
305
  </span>
306
  </div> <!-- End of Basic Settings --><?php
@@ -313,11 +314,16 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
313
  * Display the Whole page ui, Call all the other functions under this
314
  */
315
  function ui() {
 
316
  global $WpSmush, $wpsmushit_admin;
 
 
 
 
317
  $this->smush_page_header();
318
 
319
  //Show Configure screen for only a new installation and for only network admins
320
- if ( 1 != get_option( 'wp-smush-hide_smush_welcome' ) && 1 != get_option( 'hide_smush_features' ) && 0 >= $wpsmushit_admin->smushed_count && is_super_admin() ) {
321
  echo '<div class="block float-l smush-welcome-wrapper">';
322
  $this->welcome_screen();
323
  echo '</div>';
@@ -425,7 +431,7 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
425
  </span><?php
426
  } else { ?>
427
  <!-- Hide All done div if there are images pending -->
428
- <div class="wp-smush-notice wp-smush-all-done<?php echo $all_done ? '' : ' hidden' ?>">
429
  <i class="dev-icon dev-icon-tick"></i><?php esc_html_e( "No attachments need smushing. Awesome!", "wp-smushit" ); ?>
430
  </div>
431
  <div class="wp-smush-bulk-wrapper <?php echo $all_done ? ' hidden' : ''; ?>"><?php
@@ -437,12 +443,12 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
437
  if ( $wpsmushit_admin->remaining_count > 0 ) {
438
  $class = count( $wpsmushit_admin->resmush_ids ) > 0 ? ' hidden' : '';
439
  ?>
440
- <div class="wp-smush-notice wp-smush-remaining<?php echo $class; ?>">
441
  <i class="dev-icon">
442
  <img src="<?php echo WP_SMUSH_URL . 'assets/images/icon-gzip.svg'; ?>" width="14px">
443
  </i>
444
  <span class="wp-smush-notice-text">
445
- <?php printf( _n( "%s, you have %s%s%d%s image%s that need smushing!", "%s, you have %s%s%d%s images%s that need smushing!", $wpsmushit_admin->remaining_count, "wp-smushit" ), $wpsmushit_admin->get_user_name(), '<strong>', '<span class="wp-smush-remaining-count">', $wpsmushit_admin->remaining_count, '</span>', '</strong>' ); ?>
446
  </span>
447
  </div><?php
448
  } ?>
@@ -557,9 +563,9 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
557
  }
558
  //Show only if we have any images to ber resmushed
559
  if ( $show ) {
560
- return '<div class="wp-smush-notice wp-smush-resmush-notice wp-smush-remaining">
561
  <i class="dev-icon"><img src="' . WP_SMUSH_URL . 'assets/images/icon-gzip.svg" width="14px"></i>
562
- <span class="wp-smush-notice-text">' . sprintf( _n( "%s, you have %s%s%d%s image%s that need re-compressing!", "%s, you have %s%s%d%s images%s that need re-compressing!", $count, "wp-smushit" ), $wpsmushit_admin->get_user_name(), '<strong>', '<span class="wp-smush-remaining-count">', $count, '</span>', '</strong>' ) . '</span>
563
  <button class="button button-grey button-small wp-smush-skip-resmush">' . esc_html__( "Skip", "wp-smushit" ) . '</button>
564
  </div>';
565
  }
@@ -600,8 +606,10 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
600
  //Include Shared UI
601
  require_once WP_SMUSH_DIR . 'assets/shared-ui/plugin-ui.php';
602
 
603
- //Initialize global Stats
604
- $wpsmushit_admin->setup_global_stats();
 
 
605
 
606
  //Page Heading for Free and Pro Version
607
  $page_heading = $WpSmush->is_pro() ? esc_html__( 'WP Smush Pro', 'wp-smushit' ) : esc_html__( 'WP Smush', 'wp-smushit' );
@@ -625,11 +633,11 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
625
  global $wpsmushit_admin;
626
 
627
  //Whether New/Existing Installation
628
- $install_type = get_option('wp-smush-install-type', false );
629
 
630
  if( !$install_type ) {
631
  $install_type = $wpsmushit_admin->smushed_count > 0 ? 'existing' : 'new';
632
- update_option( 'wp-smush-install-type', $install_type );
633
  }
634
 
635
  if ( 'new' == $install_type ) {
@@ -646,7 +654,7 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
646
  <div class="wp-smush-install-welcome<?php echo 'new' == $install_type ? ' wp-smush-fresh' : ' wp-smush-existing'; ?>">
647
  <p class="wp-smush-install-heading roboto-medium"><?php echo $notice_heading; ?></p>
648
  <p class="wp-smush-install-content roboto-regular"><?php echo $notice_content; ?></p>
649
- <button class="button button-green button-cta"><?php echo $button_content; ?></button>
650
  </div>
651
  </div>
652
  </div><?php
@@ -662,7 +670,7 @@ if ( ! class_exists( 'WpSmushBulkUi' ) ) {
662
  } ?>
663
  <div class="wp-smush-super-smush-promo">
664
  <div class="wp-smush-super-smush-content"><?php
665
- printf( esc_html__("Did you know WP Smush Pro delivers up to 10x better compression, allows you to smush your originals and removes any bulk smushing limits? – %sTry it absolutely FREE%s", "wp-smushit"), '<a href="' . esc_url( $wpsmushit_admin->upgrade_url ). '" target="_blank">', '</a>' ); ?>
666
  </div>
667
  </div>
668
  <?php
42
  }
43
  echo '<section class="dev-box ' . $classes . ' wp-smush-container" id="' . $id . '">'; ?>
44
  <div class="wp-smush-container-header box-title">
45
+ <h3 tabindex="0"><?php echo $heading ?></h3><?php
46
  //Sub Heading
47
  if ( ! empty( $sub_heading ) ) { ?>
48
  <div class="smush-container-subheading roboto-medium"><?php echo $sub_heading ?></div><?php
155
  $wpsmushit_admin->super_smushed = $wpsmushit_admin->super_smushed_count(); ?>
156
  <hr>
157
  <div class="row super-smush-attachments">
158
+ <span class="float-l wp-smush-stats-label"><strong><?php esc_html_e( "ATTACHMENTS SUPER-SMUSHED", "wp-smushit" ); ?></strong></span>
159
+ <span class="float-r wp-smush-stats<?php echo $WpSmush->lossy_enabled ? '' : ' wp-smush-lossy-disabled-wrap' ?>"><?php
160
+ if ( $WpSmush->lossy_enabled ) {
161
+ echo '<strong><span class="smushed-count">' . intval( $wpsmushit_admin->super_smushed ) . '</span>/' . $wpsmushit_admin->total_count . '</strong>';
162
+ } else {
163
+ printf( esc_html__( "%sENABLE%s", "wp-smushit" ), '<button class="wp-smush-lossy-enable button button-small">', '</button>' );
164
+ } ?>
165
+ </span>
 
166
  </div><?php
167
  }
168
  /**
216
  if ( $WpSmush->is_pro() ) {
217
  echo "<hr />";
218
  }
 
219
  //Iterate Over all the available settings, and print a row for each of them
220
  foreach ( $pro_settings as $setting_key ) {
221
  if ( isset( $wpsmushit_admin->settings[ $setting_key ] ) ) {
222
  $setting_m_key = WP_SMUSH_PREFIX . $setting_key;
223
  $setting_val = $WpSmush->is_pro() ? get_option( $setting_m_key, false ) : 0; ?>
224
  <div class='wp-smush-setting-row wp-smush-advanced'>
225
+ <label class="inline-label" for="<?php echo $setting_m_key; ?>" tabindex="0">
226
  <span
227
  class="wp-smush-setting-label"><?php echo $wpsmushit_admin->settings[ $setting_key ]['label']; ?></span>
228
  <br/>
234
  <input type="checkbox" class="toggle-checkbox"
235
  id="<?php echo $setting_m_key; ?>" <?php checked( $setting_val, 1, true ); ?>
236
  value="1"
237
+ name="<?php echo $setting_m_key; ?>" tabindex= "0">
238
  <label class="toggle-label" for="<?php echo $setting_m_key; ?>"></label>
239
  </span>
240
  </div>
272
  $opt_keep_exif = WP_SMUSH_PREFIX . 'keep_exif';
273
  //Keep Exif
274
  $opt_keep_exif_val = get_option( $opt_keep_exif, false ); ?>
275
+ <!-- A tab index of 0 keeps the element in tab flow with other elements with an unspecified tab index which are still tabbable.) -->
276
  <div class='wp-smush-setting-row wp-smush-basic'>
277
+ <label class="inline-label" for="<?php echo $opt_auto; ?>" tabindex="0">
278
+ <span class="wp-smush-setting-label">
279
+ <?php echo $wpsmushit_admin->settings['auto']['label']; ?>
280
+ </span><br/>
281
+ <small class="smush-setting-description">
282
+ <?php echo $wpsmushit_admin->settings['auto']['desc']; ?>
283
+ </small>
284
  </label>
285
+ <span class="toggle float-r">
286
+ <input type="checkbox" class="toggle-checkbox"
287
+ id="<?php echo $opt_auto; ?>"
288
+ name="<?php echo $opt_auto; ?>" <?php checked( $opt_auto_val, 1, true ); ?> value="1" tabindex="0">
289
+ <label class="toggle-label" for="<?php echo $opt_auto; ?>"></label>
290
+ </span>
291
  </div>
292
  <hr/>
293
  <div class='wp-smush-setting-row wp-smush-basic'>
294
+ <label class="inline-label" for="<?php echo $opt_keep_exif; ?>" tabindex="0">
295
+ <span class="wp-smush-setting-label"><?php echo $wpsmushit_admin->settings['keep_exif']['label']; ?></span>
296
  <br/>
297
  <small class="smush-setting-description">
298
  <?php echo $wpsmushit_admin->settings['keep_exif']['desc']; ?>
301
  <span class="toggle float-r">
302
  <input type="checkbox" class="toggle-checkbox"
303
  id="<?php echo $opt_keep_exif; ?>" <?php checked( $opt_keep_exif_val, 1, true ); ?>
304
+ value="1" name="<?php echo $opt_keep_exif; ?>" tabindex="0">
305
  <label class="toggle-label" for="<?php echo $opt_keep_exif; ?>"></label>
306
  </span>
307
  </div> <!-- End of Basic Settings --><?php
314
  * Display the Whole page ui, Call all the other functions under this
315
  */
316
  function ui() {
317
+
318
  global $WpSmush, $wpsmushit_admin;
319
+
320
+ //Reset Transient
321
+ $wpsmushit_admin->check_bulk_limit( true );
322
+
323
  $this->smush_page_header();
324
 
325
  //Show Configure screen for only a new installation and for only network admins
326
+ if ( ( 1 != get_site_option( 'wp-smush-hide_smush_welcome' ) || 1 != get_option( 'wp-smush-hide_smush_welcome' ) ) && 1 != get_option( 'hide_smush_features' ) && 0 >= $wpsmushit_admin->smushed_count && is_super_admin() ) {
327
  echo '<div class="block float-l smush-welcome-wrapper">';
328
  $this->welcome_screen();
329
  echo '</div>';
431
  </span><?php
432
  } else { ?>
433
  <!-- Hide All done div if there are images pending -->
434
+ <div class="wp-smush-notice wp-smush-all-done<?php echo $all_done ? '' : ' hidden' ?>" tabindex="0">
435
  <i class="dev-icon dev-icon-tick"></i><?php esc_html_e( "No attachments need smushing. Awesome!", "wp-smushit" ); ?>
436
  </div>
437
  <div class="wp-smush-bulk-wrapper <?php echo $all_done ? ' hidden' : ''; ?>"><?php
443
  if ( $wpsmushit_admin->remaining_count > 0 ) {
444
  $class = count( $wpsmushit_admin->resmush_ids ) > 0 ? ' hidden' : '';
445
  ?>
446
+ <div class="wp-smush-notice wp-smush-remaining<?php echo $class; ?>" tabindex="0">
447
  <i class="dev-icon">
448
  <img src="<?php echo WP_SMUSH_URL . 'assets/images/icon-gzip.svg'; ?>" width="14px">
449
  </i>
450
  <span class="wp-smush-notice-text">
451
+ <?php printf( _n( "%s, you have %s%s%d%s image%s that needs smushing!", "%s, you have %s%s%d%s images%s that need smushing!", $wpsmushit_admin->remaining_count, "wp-smushit" ), $wpsmushit_admin->get_user_name(), '<strong>', '<span class="wp-smush-remaining-count">', $wpsmushit_admin->remaining_count, '</span>', '</strong>' ); ?>
452
  </span>
453
  </div><?php
454
  } ?>
563
  }
564
  //Show only if we have any images to ber resmushed
565
  if ( $show ) {
566
+ return '<div class="wp-smush-notice wp-smush-resmush-notice wp-smush-remaining" tabindex="0">
567
  <i class="dev-icon"><img src="' . WP_SMUSH_URL . 'assets/images/icon-gzip.svg" width="14px"></i>
568
+ <span class="wp-smush-notice-text">' . sprintf( _n( "%s, you have %s%s%d%s image%s that needs re-compressing!", "%s, you have %s%s%d%s images%s that need re-compressing!", $count, "wp-smushit" ), $wpsmushit_admin->get_user_name(), '<strong>', '<span class="wp-smush-remaining-count">', $count, '</span>', '</strong>' ) . '</span>
569
  <button class="button button-grey button-small wp-smush-skip-resmush">' . esc_html__( "Skip", "wp-smushit" ) . '</button>
570
  </div>';
571
  }
606
  //Include Shared UI
607
  require_once WP_SMUSH_DIR . 'assets/shared-ui/plugin-ui.php';
608
 
609
+ if( $wpsmushit_admin->remaining_count == 0 || $wpsmushit_admin->smushed_count == 0 ) {
610
+ //Initialize global Stats
611
+ $wpsmushit_admin->setup_global_stats();
612
+ }
613
 
614
  //Page Heading for Free and Pro Version
615
  $page_heading = $WpSmush->is_pro() ? esc_html__( 'WP Smush Pro', 'wp-smushit' ) : esc_html__( 'WP Smush', 'wp-smushit' );
633
  global $wpsmushit_admin;
634
 
635
  //Whether New/Existing Installation
636
+ $install_type = get_site_option('wp-smush-install-type', false );
637
 
638
  if( !$install_type ) {
639
  $install_type = $wpsmushit_admin->smushed_count > 0 ? 'existing' : 'new';
640
+ update_site_option( 'wp-smush-install-type', $install_type );
641
  }
642
 
643
  if ( 'new' == $install_type ) {
654
  <div class="wp-smush-install-welcome<?php echo 'new' == $install_type ? ' wp-smush-fresh' : ' wp-smush-existing'; ?>">
655
  <p class="wp-smush-install-heading roboto-medium"><?php echo $notice_heading; ?></p>
656
  <p class="wp-smush-install-content roboto-regular"><?php echo $notice_content; ?></p>
657
+ <a href="<?php echo esc_url( $wpsmushit_admin->upgrade_url ); ?>" class="button button-green button-cta" target="_blank"><?php echo $button_content; ?></a>
658
  </div>
659
  </div>
660
  </div><?php
670
  } ?>
671
  <div class="wp-smush-super-smush-promo">
672
  <div class="wp-smush-super-smush-content"><?php
673
+ printf( esc_html__("Did you know WP Smush Pro delivers up to 10x better compression, allows you to smush your originals and removes any bulk smushing limits? – %sTry it absolutely FREE%s", "wp-smushit"), '<a href="' . esc_url( $wpsmushit_admin->upgrade_url ). '" target="_blank" title="' . esc_html__("Try WP Smush Pro for FREE", "wp-smushit") . '">', '</a>' ); ?>
674
  </div>
675
  </div>
676
  <?php
lib/class-wp-smush.php CHANGED
@@ -15,7 +15,7 @@ if ( ! class_exists( 'WpSmush' ) ) {
15
  * Api server url to check api key validity
16
  *
17
  */
18
- var $api_server = 'https://premium.wpmudev.org/wdp-un.php?action=smushit_check';
19
 
20
  /**
21
  * Meta key to save smush result to db
@@ -83,9 +83,6 @@ if ( ! class_exists( 'WpSmush' ) ) {
83
  //Enqueue Scripts
84
  add_action( 'admin_init', array( $this, 'admin_init' ) );
85
 
86
- //Old Smush stats migration
87
- add_action( "admin_init", array( $this, "migrate" ) );
88
-
89
  //Load Translation files
90
  add_action( 'plugins_loaded', array( $this, 'i18n' ), 12 );
91
 
@@ -119,7 +116,13 @@ if ( ! class_exists( 'WpSmush' ) ) {
119
  }
120
 
121
  function admin_init() {
122
- wp_enqueue_script( 'common' );
 
 
 
 
 
 
123
  //Initialize variables
124
  $this->initialise();
125
  }
@@ -595,7 +598,7 @@ if ( ! class_exists( 'WpSmush' ) ) {
595
  'timeout' => WP_SMUSH_TIMEOUT,
596
  'user-agent' => WP_SMUSH_UA,
597
  );
598
- $result = wp_remote_post( $api_url, $args );
599
 
600
  //Close file connection
601
  fclose( $file );
@@ -768,7 +771,7 @@ if ( ! class_exists( 'WpSmush' ) ) {
768
  update_site_option( 'wp_smush_api_auth', $api_auth );
769
 
770
  // call api
771
- $url = $this->api_server . '&key=' . urlencode( $api_key );
772
 
773
  $request = wp_remote_get( $url, array(
774
  "user-agent" => WP_SMUSH_UA,
@@ -778,7 +781,7 @@ if ( ! class_exists( 'WpSmush' ) ) {
778
 
779
  if ( ! is_wp_error( $request ) && '200' == wp_remote_retrieve_response_code( $request ) ) {
780
  $result = json_decode( wp_remote_retrieve_body( $request ) );
781
- if ( $result && $result->success ) {
782
  $valid = 'valid';
783
  } else {
784
  $valid = 'invalid';
@@ -796,7 +799,7 @@ if ( ! class_exists( 'WpSmush' ) ) {
796
  $api_auth[ $api_key ] = array( 'validity' => $valid, 'timestamp' => $timestamp );
797
 
798
  //Update API validity
799
- update_site_option( 'wp_smush_api_auth', $api_auth );
800
 
801
  }
802
 
@@ -1372,7 +1375,7 @@ if ( ! class_exists( 'WpSmush' ) ) {
1372
  //Check if integration is Enabled or not
1373
  //Smush NextGen key
1374
  $opt_nextgen = WP_SMUSH_PREFIX . 'nextgen';
1375
- $opt_nextgen_val = get_option( $opt_nextgen, 1 );
1376
  if ( ! $opt_nextgen_val ) {
1377
  return;
1378
  }
@@ -1385,8 +1388,8 @@ if ( ! class_exists( 'WpSmush' ) ) {
1385
  global $wpsmushnextgen, $wpsmushnextgenadmin, $wpsmushnextgenstats;
1386
  //Initialize Nextgen support
1387
  $wpsmushnextgen = new WpSmushNextGen();
1388
- $wpsmushnextgenadmin = new WpSmushNextGenAdmin();
1389
  $wpsmushnextgenstats = new WpSmushNextGenStats();
 
1390
  new WPSmushNextGenBulk();
1391
  }
1392
 
@@ -1722,7 +1725,7 @@ if ( ! class_exists( 'WpSmush' ) ) {
1722
  }
1723
 
1724
  //If images are already smushed
1725
- if( $wpsmushit_admin->smushed_count() > 0 ) {
1726
  return false;
1727
  }
1728
 
@@ -1778,6 +1781,16 @@ if ( ! class_exists( 'WpSmush' ) ) {
1778
  }
1779
  }
1780
  }
 
 
 
 
 
 
 
 
 
 
1781
  }
1782
 
1783
  global $WpSmush;
15
  * Api server url to check api key validity
16
  *
17
  */
18
+ var $api_server = 'https://premium.wpmudev.org/api/smush/v1/check/';
19
 
20
  /**
21
  * Meta key to save smush result to db
83
  //Enqueue Scripts
84
  add_action( 'admin_init', array( $this, 'admin_init' ) );
85
 
 
 
 
86
  //Load Translation files
87
  add_action( 'plugins_loaded', array( $this, 'i18n' ), 12 );
88
 
116
  }
117
 
118
  function admin_init() {
119
+
120
+ //Handle Notice dismiss
121
+ $this->dismiss_smush_upgrade();
122
+
123
+ //Perform Migration if required
124
+ $this->migrate();
125
+
126
  //Initialize variables
127
  $this->initialise();
128
  }
598
  'timeout' => WP_SMUSH_TIMEOUT,
599
  'user-agent' => WP_SMUSH_UA,
600
  );
601
+ $result = wp_remote_get( $api_url, $args );
602
 
603
  //Close file connection
604
  fclose( $file );
771
  update_site_option( 'wp_smush_api_auth', $api_auth );
772
 
773
  // call api
774
+ $url = $this->api_server . $api_key;
775
 
776
  $request = wp_remote_get( $url, array(
777
  "user-agent" => WP_SMUSH_UA,
781
 
782
  if ( ! is_wp_error( $request ) && '200' == wp_remote_retrieve_response_code( $request ) ) {
783
  $result = json_decode( wp_remote_retrieve_body( $request ) );
784
+ if ( !empty( $result->success ) && $result->success ) {
785
  $valid = 'valid';
786
  } else {
787
  $valid = 'invalid';
799
  $api_auth[ $api_key ] = array( 'validity' => $valid, 'timestamp' => $timestamp );
800
 
801
  //Update API validity
802
+ // update_site_option( 'wp_smush_api_auth', $api_auth );
803
 
804
  }
805
 
1375
  //Check if integration is Enabled or not
1376
  //Smush NextGen key
1377
  $opt_nextgen = WP_SMUSH_PREFIX . 'nextgen';
1378
+ $opt_nextgen_val = get_option( $opt_nextgen, false );
1379
  if ( ! $opt_nextgen_val ) {
1380
  return;
1381
  }
1388
  global $wpsmushnextgen, $wpsmushnextgenadmin, $wpsmushnextgenstats;
1389
  //Initialize Nextgen support
1390
  $wpsmushnextgen = new WpSmushNextGen();
 
1391
  $wpsmushnextgenstats = new WpSmushNextGenStats();
1392
+ $wpsmushnextgenadmin = new WpSmushNextGenAdmin();
1393
  new WPSmushNextGenBulk();
1394
  }
1395
 
1725
  }
1726
 
1727
  //If images are already smushed
1728
+ if( $wpsmushit_admin->smushed_count( false ) > 0 ) {
1729
  return false;
1730
  }
1731
 
1781
  }
1782
  }
1783
  }
1784
+
1785
+ /**
1786
+ * Manually Dismiss Smush Upgrade notice
1787
+ */
1788
+ function dismiss_smush_upgrade() {
1789
+ if ( isset( $_GET['remove_smush_upgrade_notice'] ) && 1 == $_GET['remove_smush_upgrade_notice'] ) {
1790
+ global $wpsmushit_admin;
1791
+ $wpsmushit_admin->dismiss_upgrade_notice( false );
1792
+ }
1793
+ }
1794
  }
1795
 
1796
  global $WpSmush;
lib/nextgen-integration/class-wp-smush-nextgen-admin.php CHANGED
@@ -151,8 +151,6 @@ if ( ! class_exists( 'WpSmushNextGenAdmin' ) ) {
151
  function localize() {
152
  global $wpsmushnextgenstats;
153
 
154
- $this->setup_stats();
155
-
156
  $handle = 'wp-smushit-admin-js';
157
 
158
  $wp_smush_msgs = array(
@@ -167,6 +165,9 @@ if ( ! class_exists( 'WpSmushNextGenAdmin' ) ) {
167
 
168
  wp_localize_script( $handle, 'wp_smush_msgs', $wp_smush_msgs );
169
 
 
 
 
170
  //Get the unsmushed ids, used for localized stats as well as normal localization
171
  $unsmushed = $wpsmushnextgenstats->get_ngg_images( 'unsmushed' );
172
  $unsmushed = ( ! empty( $unsmushed ) && is_array( $unsmushed ) ) ? array_keys( $unsmushed ) : '';
@@ -441,8 +442,9 @@ if ( ! class_exists( 'WpSmushNextGenAdmin' ) ) {
441
  <i class="dev-icon">
442
  <img src="<?php echo WP_SMUSH_URL . 'assets/images/icon-gzip.svg'; ?>" width="14px">
443
  </i>
444
- <span
445
- class="wp-smush-notice-text"><?php printf( _n( "%s, you have %s%s%d%s image%s that need smushing!", "%s, you have %s%s%d%s images%s that need smushing!", $this->remaining_count, "wp-smushit" ), $wpsmushit_admin->get_user_name(), '<strong>', '<span class="wp-smush-remaining-count">', $this->remaining_count, '</span>', '</strong>' ); ?></span>
 
446
  </div>
447
  <hr class="wp-smush-sep">
448
  <div class="smush-final-log notice notice-warning inline hidden"></div>
@@ -525,14 +527,14 @@ if ( ! class_exists( 'WpSmushNextGenAdmin' ) ) {
525
  <hr>
526
  <div class="row smush-attachments">
527
  <span class="float-l wp-smush-stats-label">
528
- <strong><?php esc_html_e( "ATTACHMENTS SMUSHED", "wp-smushit" ); ?></strong>
529
- </span>
530
- <span class="float-r wp-smush-stats">
531
- <strong>
532
- <span
533
- class="smushed-count"><?php echo $smushed_count . '</span>/' . $this->total_count; ?>
534
- </strong>
535
- </span>
536
  </div><?php
537
  //Nonce Field for Ajax requests
538
  echo wp_nonce_field( 'save_wp_smush_options', 'wp_smush_options_nonce', '', false );
151
  function localize() {
152
  global $wpsmushnextgenstats;
153
 
 
 
154
  $handle = 'wp-smushit-admin-js';
155
 
156
  $wp_smush_msgs = array(
165
 
166
  wp_localize_script( $handle, 'wp_smush_msgs', $wp_smush_msgs );
167
 
168
+ //Initialize Stats
169
+ $this->setup_stats();
170
+
171
  //Get the unsmushed ids, used for localized stats as well as normal localization
172
  $unsmushed = $wpsmushnextgenstats->get_ngg_images( 'unsmushed' );
173
  $unsmushed = ( ! empty( $unsmushed ) && is_array( $unsmushed ) ) ? array_keys( $unsmushed ) : '';
442
  <i class="dev-icon">
443
  <img src="<?php echo WP_SMUSH_URL . 'assets/images/icon-gzip.svg'; ?>" width="14px">
444
  </i>
445
+ <span class="wp-smush-notice-text">
446
+ <?php printf( _n( "%s, you have %s%s%d%s image%s that needs smushing!", "%s, you have %s%s%d%s images%s that need smushing!", $this->remaining_count, "wp-smushit" ), $wpsmushit_admin->get_user_name(), '<strong>', '<span class="wp-smush-remaining-count">', $this->remaining_count, '</span>', '</strong>' ); ?>
447
+ </span>
448
  </div>
449
  <hr class="wp-smush-sep">
450
  <div class="smush-final-log notice notice-warning inline hidden"></div>
527
  <hr>
528
  <div class="row smush-attachments">
529
  <span class="float-l wp-smush-stats-label">
530
+ <strong><?php esc_html_e( "ATTACHMENTS SMUSHED", "wp-smushit" ); ?></strong>
531
+ </span>
532
+ <span class="float-r wp-smush-stats">
533
+ <strong>
534
+ <span
535
+ class="smushed-count"><?php echo $smushed_count . '</span>/' . $this->total_count; ?>
536
+ </strong>
537
+ </span>
538
  </div><?php
539
  //Nonce Field for Ajax requests
540
  echo wp_nonce_field( 'save_wp_smush_options', 'wp_smush_options_nonce', '', false );
lib/nextgen-integration/class-wp-smush-nextgen-bulk.php CHANGED
@@ -40,7 +40,7 @@ if ( ! class_exists( 'WPSmushNextGenBulk' ) ) {
40
  $error = $smush->get_error_message();
41
  //Check for timeout error and suggest to filter timeout
42
  if( strpos( $error, 'timed out') ) {
43
- $msg = esc_html__( "Smush request timed out, You can try setting a higher value ( > 60 ) for `WP_SMUSH_API_TIMEOUT`.", "wp-smushit" );
44
  }
45
  wp_send_json_error( array( 'stats' => $stats, 'error_msg' => $msg ) );
46
  } else {
40
  $error = $smush->get_error_message();
41
  //Check for timeout error and suggest to filter timeout
42
  if( strpos( $error, 'timed out') ) {
43
+ $msg = '<p class="wp-smush-error-message">' . esc_html__( "Smush request timed out, You can try setting a higher value ( > 60 ) for `WP_SMUSH_API_TIMEOUT`.", "wp-smushit" ) . '</p>';
44
  }
45
  wp_send_json_error( array( 'stats' => $stats, 'error_msg' => $msg ) );
46
  } else {
readme.txt CHANGED
@@ -1,26 +1,26 @@
1
- === WP Smush ===
2
- Plugin Name: WP Smush
3
- Version: 2.2
4
  Author: WPMU DEV
5
  Author URI: http://premium.wpmudev.org/
6
  Contributors: WPMUDEV, alexdunae
7
- Tags: Attachment,Attachments,Compress,Compress Image File,Compress Image Size,Compress JPG,Compressed JPG, Compression Image,Image,Images,JPG,Optimise,Optimize,Photo,Photos,Pictures,PNG,Reduce Image Size,Smush,Smush.it,Upload,WordPress Compression,WordPress Image Tool,Yahoo, Yahoo Smush.it
8
  Requires at least: 3.5
9
- Tested up to: 4.4.2
10
- Stable tag: 2.2
11
  License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
12
 
13
  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.
14
 
15
  == Description ==
16
 
17
- <strong>Optimize unlimited images</strong> with our <strong>incredibly powerful</strong> and <strong>100% free image Smusher</strong>, brought to you by the superheroes at WPMU DEV!
18
 
19
- We'll do all the heavy lifting with our superhero servers, your site will be loading quicker in no time at all, leaving you to concentrate on making your content great!
20
 
21
- WP Smush strips hidden, bulky information from your images, reducing the file size without losing quality. The faster your site loads, the more Google, Bing, Yahoo and other search engines will like it.
22
 
23
- [youtube https://www.youtube.com/watch?v=GCzH7z05s5U]
24
 
25
  Heavy image files may be slowing down your site without you even knowing it. WP Smush meticulously scans every image you upload – or have already added to your site – and cuts all the unnecessary data for you.
26
 
@@ -29,42 +29,50 @@ Heavy image files may be slowing down your site without you even knowing it. WP
29
  ★★★★★ <br>
30
  “I had no idea that my page load time was being dragged down by the images. The plugin nearly halved the time it took.” - <a href="http://profiles.wordpress.org/karlcw">karlcw</a>
31
 
32
- Install WP Smush and find out why it's the most popular image optimization plugin for WordPress available today with over 1 million downloads.
 
 
 
 
 
33
 
34
  <blockquote>
35
- <h4>If you like WP Smush, you'll love WP Smush Pro</h4>
36
  <br>
37
- <a href="https://premium.wpmudev.org/project/wp-smush-pro/?utm_source=wordpress.org&utm_medium=readme">WP Smush Pro</a> gives you everything you'll find in WP Smush and more:
38
  <ul>
39
- <li>"Super-Smush" your images with our intelligent multi-pass lossy compression. Get over 2x more compression than lossless with almost no noticeable quality loss!</li>
40
- <li>Get even better lossless compression. We try multiple methods to squeeze every last byte out of your images.</li>
41
- <li>Smush images up to 32MB (WP Smush is limited to 1MB)</li>
42
- <li>Bulk smush ALL your images with one click! No more rate limiting.</li>
43
- <li>Keep a backup of your original un-smushed images in case you want to restore later.</li>
44
- <li>24/7/365 support from <a href="https://premium.wpmudev.org/support/?utm_source=wordpress.org&utm_medium=readme">the best WordPress support team on the planet</a>.</li>
45
- <li><a href="https://premium.wpmudev.org/?utm_source=wordpress.org&utm_medium=readme">100+ other premium plugins and themes</a> included in your membership.</li>
46
  </ul>
47
 
48
- Upgrade to <a href="https://premium.wpmudev.org/project/wp-smush-pro/?utm_source=wordpress.org&utm_medium=readme">WP Smush Pro</a> and optimize more and larger image files faster to increase your site’s performance.
49
  </blockquote>
50
 
51
- Features available to both WP Smush and Pro users include:
 
 
52
  <ul>
53
- <li>Optimize your images using advanced lossless compression techniques.</li>
54
- <li>Process JPEG, GIF and PNG image files.</li>
55
- <li>Auto-Smush your attachments on upload.</li>
56
- <li>Manually smush your attachments individually in the media library, or in bulk 50 attachments at a time.</li>
57
- <li>Smush all images 1MB or smaller.</li>
58
- <li>Use of WPMU DEV's fast and reliable Smush API service.</li>
59
- <li>View advanced compression stats per-attachment and library totals.</li>
 
60
  </ul>
61
- Discover for yourself why WP Smush is the most popular free image optimization plugin with more than two million downloads.
62
 
63
 
64
  == Screenshots ==
65
 
66
- 1. See individual attachment savings from WP Smush in the Media Library.
67
- 2. See the total savings from WP Smush in the Media Library.
 
68
 
69
  == Installation ==
70
 
@@ -80,7 +88,14 @@ Yahoo's Smush.it API is gone forever. So WPMU DEV built our own free API that is
80
 
81
  == Changelog ==
82
 
83
- = 2.2 =
 
 
 
 
 
 
 
84
  * New: Option to resmush image if settings are changed after optimising images
85
  * New: Added an option to preserve EXIF
86
  * New: Remove Smush meta on image regeneration,
1
+ === WP Smush - Image Optimization ===
2
+ Plugin Name: WP Smush - Image Optimization
3
+ Version: 2.2.2
4
  Author: WPMU DEV
5
  Author URI: http://premium.wpmudev.org/
6
  Contributors: WPMUDEV, alexdunae
7
+ Tags: image optimization, image compression, attachment,Attachments,compress,Compress Image File,Compress Image Size,Compress JPG,Compressed JPG, Compression Image,Image,Images,JPG,Optimise,Optimize,Photo,Photos,Pictures,PNG,Reduce Image Size,Smush,Smush.it,Upload,WordPress Compression,WordPress Image Tool,Yahoo, Yahoo Smush.it
8
  Requires at least: 3.5
9
+ Tested up to: 4.5
10
+ Stable tag: 2.2.2
11
  License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
12
 
13
  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.
14
 
15
  == Description ==
16
 
17
+ <strong>Optimize all of your images</strong> with the <strong>incredibly powerful</strong> and <strong>100% free image smusher</strong>, brought to you by the superteam at WPMU DEV!
18
 
19
+ Our servers do all the heavy lifting. Strip hidden bulky information from your images and reduce file size without losing quality.
20
 
21
+ Large image files may be slowing down your site without you even knowing it. WP Smush uses WPMU DEV’s super servers to quickly smush every single one of your images and cuts all the unnecessary data without slowing down your site.
22
 
23
+ [youtube https://www.youtube.com/watch?v=Bb905kWPohU&feature=youtu.be]
24
 
25
  Heavy image files may be slowing down your site without you even knowing it. WP Smush meticulously scans every image you upload – or have already added to your site – and cuts all the unnecessary data for you.
26
 
29
  ★★★★★ <br>
30
  “I had no idea that my page load time was being dragged down by the images. The plugin nearly halved the time it took.” - <a href="http://profiles.wordpress.org/karlcw">karlcw</a>
31
 
32
+ ★★★★★ <br>
33
+ “I optimize my photos in Photoshop, but Smush makes it so easy – it does it automatically. I can just sit back and enjoy the speed.” - <a href="https://profiles.wordpress.org/helen432">helen432</a>
34
+
35
+ WP Smush is super easy to use – no confusing compression software settings! Smush images in your library one at a time or bulk smush up to 50 images at a time. Plus, Smush can help keep your site running fast. Use automatic smush and compress every new image upload without thinking about.
36
+
37
+ The faster your site loads, the more Google, Bing, Yahoo and other search engines will like it. Your site will load faster and rank higher.
38
 
39
  <blockquote>
40
+ <h4>Features available in WP Smush include:</h4>
41
  <br>
 
42
  <ul>
43
+ <li>Optimize your images using advanced lossless compression techniques.</li>
44
+ <li>Process JPEG, GIF and PNG image files.</li>
45
+ <li>Auto-smush your attachments on upload.</li>
46
+ <li>Manually smush your attachments individually in the media library, or in bulk 50 attachments at a time.</li>
47
+ <li>Smush all standard web-sized images 1MB or smaller. </li>
48
+ <li>Smush images with no slowdown using WPMU DEV's fast, reliable Smush API.</li>
49
+ <li>View advanced compression stats per-attachment and library totals.</li>
50
  </ul>
51
 
52
+ Install WP Smush now and find out why it's the most popular image optimization plugin for WordPress available today with over 2.7 million downloads.
53
  </blockquote>
54
 
55
+ <h4>If you like WP Smush, you'll love <a href="https://premium.wpmudev.org/project/wp-smush-pro/?utm_source=wordpress.org&utm_medium=readme">WP Smush Pro</a></h4>
56
+
57
+ WP Smush Pro gives you everything you'll find in WP Smush and more:
58
  <ul>
59
+ <li>Super smush your images with our intelligent multi-pass lossy compression. Get from 2x - 10x more compression than lossless with almost no noticeable quality loss!</li>
60
+ <li>Get even better lossless compression. We try multiple methods to squeeze every last byte out of your images.</li>
61
+ <li>Smush images up to 32MB. Now you can smush any image, even one’s that aren’t web optimized.</li>
62
+ <li>Bulk smush ALL your images with one click - no more rate limiting!</li>
63
+ <li>Keep a backup of original un-smushed images in case you want to restore later.</li>
64
+ <li>24/7/365 support from the best WordPress support team on the planet.</li>
65
+ <li>Includes Hummingbird pagespeed booster, Uptime monitoring and security hardening.</li>
66
+ <li>100+ other premium plugins, services and themes included in your membership.</li>
67
  </ul>
68
+ Upgrade to WP Smush Pro and optimize more and larger image files faster to increase your site’s performance.
69
 
70
 
71
  == Screenshots ==
72
 
73
+ 1. Watch as your image library is processed up to 50 images at a time.
74
+ 2. Set automatic smush and optomize every image as it is uploaded.
75
+ 3. Smush will find and optimize images for you.
76
 
77
  == Installation ==
78
 
88
 
89
  == Changelog ==
90
 
91
+ = 2.2.2 =
92
+
93
+ - Fixed: JS error causing issue with Editor on some installs, plugin conflict with CoursePress plugin, ACF ( Clear All Caches after plugin upgrade, Cloudflare as well )
94
+ - Fixed: ReSmush count for bulk smushing
95
+ - Fixed: Smush settings accessibility for Screen reader/Keyboard
96
+ - Fixed: WP Admin loading slow ( Load smush stats on required admin pages only )
97
+
98
+ = 2.2.1 =
99
  * New: Option to resmush image if settings are changed after optimising images
100
  * New: Added an option to preserve EXIF
101
  * New: Remove Smush meta on image regeneration,
wp-smush.php CHANGED
@@ -4,7 +4,7 @@ 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.2
8
  Author URI: http://premium.wpmudev.org/
9
  Textdomain: wp-smushit
10
  */
@@ -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.2-1';
39
 
40
  /**
41
  * Set the default timeout for API request and AJAX timeout
@@ -154,7 +154,6 @@ if ( is_admin() ) {
154
  'id' => 912164,
155
  'name' => 'WP Smush Pro',
156
  'screens' => array(
157
- 'media_page_wp-smush-bulk',
158
  'upload'
159
  )
160
  );
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.2.2
8
  Author URI: http://premium.wpmudev.org/
9
  Textdomain: wp-smushit
10
  */
35
  * Constants
36
  */
37
  $prefix = 'WP_SMUSH_';
38
+ $version = '2.2.2';
39
 
40
  /**
41
  * Set the default timeout for API request and AJAX timeout
154
  'id' => 912164,
155
  'name' => 'WP Smush Pro',
156
  'screens' => array(
 
157
  'upload'
158
  )
159
  );