Smush Image Compression and Optimization - Version 2.6.3

Version Description

  • Fixed:

    • Compatibility issue with WP Defender
    • Image dimensions not updated after resizing in Grid view
  • Added:

    • Added a check to preserve smush stats on plugin deletion, You can add define('WP_SMUSH_PRESERVE_STATS', true ); in wp-config.php
Download this release

Release Info

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

Code changes from version 2.6.2 to 2.6.3

assets/shared-ui/wdev-ui.js CHANGED
@@ -648,6 +648,19 @@ WDP.wpmuSelect = function(el) {
648
  wrap.addClass(jq.attr("class"));
649
  }
650
 
 
 
 
 
 
 
 
 
 
 
 
 
 
651
  // Add all the options to the new DOM elements.
652
  function populateList() {
653
  items.empty();
@@ -737,6 +750,7 @@ WDP.wpmuSelect = function(el) {
737
 
738
  setupElement();
739
  populateList();
 
740
  items.find("li").not('.optgroup-label').on("click", function onItemClick(ev) {
741
  var opt = jQuery(ev.target);
742
  selectItem(opt, false);
648
  wrap.addClass(jq.attr("class"));
649
  }
650
 
651
+ // When changing selection using JS, you need to trigger a 'wpmu:change' event
652
+ // eg: jQuery('select').val('4').trigger('wpmu:change')
653
+ function handleSelectionChange() {
654
+ jq.on('wpmu:change',function(){
655
+ //We need to re-populateList to handle dynamic select options added via JS/ajax
656
+ populateList();
657
+ items.find("li").not('.optgroup-label').on("click", function onItemClick(ev) {
658
+ var opt = jQuery(ev.target);
659
+ selectItem(opt, false);
660
+ });
661
+ });
662
+ }
663
+
664
  // Add all the options to the new DOM elements.
665
  function populateList() {
666
  items.empty();
750
 
751
  setupElement();
752
  populateList();
753
+ handleSelectionChange();
754
  items.find("li").not('.optgroup-label').on("click", function onItemClick(ev) {
755
  var opt = jQuery(ev.target);
756
  selectItem(opt, false);
languages/wp-smushit.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
  msgstr ""
4
  "Project-Id-Version: WP Smush 2.6.2\n"
5
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/wp-smushit\n"
6
- "POT-Creation-Date: 2017-03-30 17:22:58+00:00\n"
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
@@ -178,61 +178,61 @@ msgstr ""
178
  msgid "Rate %s"
179
  msgstr ""
180
 
181
- #: lib/class-wp-smush-admin.php:203
182
  msgid "Enable Network wide settings"
183
  msgstr ""
184
 
185
- #: lib/class-wp-smush-admin.php:204
186
  msgid "If disabled sub sites can override the individual Smush settings."
187
  msgstr ""
188
 
189
- #: lib/class-wp-smush-admin.php:207
190
  msgid "Automatically smush my images on upload"
191
  msgstr ""
192
 
193
- #: lib/class-wp-smush-admin.php:208
194
  msgid ""
195
  "When you upload images to the media library, we’ll automatically optimize "
196
  "them."
197
  msgstr ""
198
 
199
- #: lib/class-wp-smush-admin.php:211
200
  msgid "Preserve image EXIF data"
201
  msgstr ""
202
 
203
- #: lib/class-wp-smush-admin.php:212
204
  msgid ""
205
  "EXIF data stores camera settings, focal length, date, time and location "
206
  "information in image files. EXIF data makes image files larger but if you "
207
  "are a photographer you may want to preserve this information."
208
  msgstr ""
209
 
210
- #: lib/class-wp-smush-admin.php:215
211
  msgid "Resize original images"
212
  msgstr ""
213
 
214
- #: lib/class-wp-smush-admin.php:216
215
  msgid ""
216
  "Save a ton of space by not storing over-sized images on your server. Set "
217
  "image maximum width and height and large images will be automatically scaled "
218
  "before being added to the media library."
219
  msgstr ""
220
 
221
- #: lib/class-wp-smush-admin.php:219
222
  msgid "Super-smush my images"
223
  msgstr ""
224
 
225
- #: lib/class-wp-smush-admin.php:220
226
  msgid ""
227
  "Compress images up to 2x more than regular smush with almost no visible drop "
228
  "in quality."
229
  msgstr ""
230
 
231
- #: lib/class-wp-smush-admin.php:223
232
  msgid "Include my original full-size images"
233
  msgstr ""
234
 
235
- #: lib/class-wp-smush-admin.php:224
236
  msgid ""
237
  "WordPress crops and resizes every image you upload for embedding on your "
238
  "site. By default, Smush only compresses these cropped and resized images, "
@@ -241,218 +241,218 @@ msgid ""
241
  "improve page speed."
242
  msgstr ""
243
 
244
- #: lib/class-wp-smush-admin.php:227
245
  msgid "Make a copy of my original images"
246
  msgstr ""
247
 
248
- #: lib/class-wp-smush-admin.php:228
249
  msgid ""
250
  "Save your original full-size images so you can restore them at any point. "
251
  "Note: Activating this setting will significantly increase the size of your "
252
  "uploads folder by nearly twice as much."
253
  msgstr ""
254
 
255
- #: lib/class-wp-smush-admin.php:231
256
  msgid "Convert PNG to JPEG (lossy)"
257
  msgstr ""
258
 
259
- #: lib/class-wp-smush-admin.php:232
260
  #, php-format
261
  msgid ""
262
  "When you compress a PNG file, Smush will check if converting the file to "
263
  "JPEG will further reduce its size. %s Note: PNGs with transparency will be "
264
  "ignored and Smush will only convert the file format if it results in a "
265
  "smaller file size. This will change the file’s name and extension, and any "
266
- "hard-coded URLs will need to be updated."
267
  msgstr ""
268
 
269
- #: lib/class-wp-smush-admin.php:239
270
  msgid "Enable NextGen Gallery integration"
271
  msgstr ""
272
 
273
- #: lib/class-wp-smush-admin.php:240
274
  msgid "Allow smushing images directly through NextGen Gallery settings."
275
  msgstr ""
276
 
277
  #. Plugin Name of the plugin/theme
278
- #: lib/class-wp-smush-admin.php:262 lib/class-wp-smush-ui.php:817
279
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:70
280
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:89
281
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:91
282
  msgid "WP Smush"
283
  msgstr ""
284
 
285
- #: lib/class-wp-smush-admin.php:392 lib/class-wp-smush.php:1043
286
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:158
287
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:275
288
  msgid "Super-Smush"
289
  msgstr ""
290
 
291
- #: lib/class-wp-smush-admin.php:393
292
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:159
293
  msgid "Smush Now"
294
  msgstr ""
295
 
296
- #: lib/class-wp-smush-admin.php:394
297
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:160
298
  msgid "{{errors}} image(s) were skipped due to an error."
299
  msgstr ""
300
 
301
- #: lib/class-wp-smush-admin.php:395
302
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:161
303
  msgid "All images are fully optimised."
304
  msgstr ""
305
 
306
- #: lib/class-wp-smush-admin.php:396
307
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:162
308
  msgid "Restoring image.."
309
  msgstr ""
310
 
311
- #: lib/class-wp-smush-admin.php:397
312
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:163
313
  msgid "Smushing image.."
314
  msgstr ""
315
 
316
- #: lib/class-wp-smush-admin.php:398
317
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:164
318
  msgid "Checking images.."
319
  msgstr ""
320
 
321
- #: lib/class-wp-smush-admin.php:399
322
  msgid ""
323
  "We successfully verified your membership, all the Pro features should work "
324
  "completely. "
325
  msgstr ""
326
 
327
- #: lib/class-wp-smush-admin.php:400
328
  msgid "Your membership couldn't be verified."
329
  msgstr ""
330
 
331
- #: lib/class-wp-smush-admin.php:401
332
  msgid "Missing file path."
333
  msgstr ""
334
 
335
- #: lib/class-wp-smush-admin.php:403
336
  msgid "image could not be smushed."
337
  msgstr ""
338
 
339
- #: lib/class-wp-smush-admin.php:404
340
  msgid "images could not be smushed."
341
  msgstr ""
342
 
343
- #: lib/class-wp-smush-admin.php:405
344
  msgid "Already Optimised"
345
  msgstr ""
346
 
347
- #: lib/class-wp-smush-admin.php:406
348
  msgid "Ajax Error"
349
  msgstr ""
350
 
351
- #: lib/class-wp-smush-admin.php:407 lib/class-wp-smush-admin.php:408
352
- #: lib/class-wp-smush-admin.php:1184
353
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:340
354
  msgid "All Done!"
355
  msgstr ""
356
 
357
- #: lib/class-wp-smush-admin.php:631
358
  msgid ""
359
  "Smush request timed out, You can try setting a higher value for "
360
  "`WP_SMUSH_API_TIMEOUT`."
361
  msgstr ""
362
 
363
- #: lib/class-wp-smush-admin.php:648 lib/class-wp-smush-dir.php:1251
364
  #, php-format
365
  msgid "You've smushed %d images in total."
366
  msgstr ""
367
 
368
- #: lib/class-wp-smush-admin.php:688 lib/class-wp-smush-nextgen.php:381
369
  msgid "You don't have permission to work with uploaded files."
370
  msgstr ""
371
 
372
- #: lib/class-wp-smush-admin.php:692 lib/class-wp-smush-nextgen.php:385
373
  msgid "No attachment ID was provided."
374
  msgstr ""
375
 
376
- #: lib/class-wp-smush-admin.php:704
377
  msgid "Attachment Skipped - Check `wp_smush_image` filter."
378
  msgstr ""
379
 
380
- #: lib/class-wp-smush-admin.php:881
381
  #, php-format
382
  msgid "<strong>%d of %d images</strong> were sent for smushing:"
383
  msgstr ""
384
 
385
- #: lib/class-wp-smush-admin.php:1177 lib/class-wp-smush-admin.php:1190
386
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:336
387
  msgid "Bulk Smush Now"
388
  msgstr ""
389
 
390
- #: lib/class-wp-smush-admin.php:1212 lib/class-wp-smush.php:1049
391
  msgid "Smushing in progress.."
392
  msgstr ""
393
 
394
- #: lib/class-wp-smush-admin.php:1218 lib/class-wp-smush.php:1068
395
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:255
396
  msgid "Smush Now!"
397
  msgstr ""
398
 
399
- #: lib/class-wp-smush-admin.php:1239
400
  msgid "Settings"
401
  msgstr ""
402
 
403
- #: lib/class-wp-smush-admin.php:1385
404
  msgid "Image not smushed, fields empty."
405
  msgstr ""
406
 
407
- #: lib/class-wp-smush-admin.php:1392 lib/class-wp-smush-nextgen.php:568
408
  msgid ""
409
  "Image couldn't be smushed as the nonce verification failed, try reloading "
410
  "the page."
411
  msgstr ""
412
 
413
- #: lib/class-wp-smush-admin.php:1409
414
  msgid "Unable to smush image"
415
  msgstr ""
416
 
417
- #: lib/class-wp-smush-admin.php:1434
418
  msgid ""
419
  "We haven’t found any images in your media library yet so there’s no smushing "
420
  "to be done!"
421
  msgstr ""
422
 
423
- #: lib/class-wp-smush-admin.php:1450
424
  msgid "Yay! All images are optimised as per your current settings."
425
  msgstr ""
426
 
427
- #: lib/class-wp-smush-admin.php:1622 lib/class-wp-smush-ui.php:792
428
  #, php-format
429
  msgid "You have images that need smushing. %sBulk smush now!%s"
430
  msgstr ""
431
 
432
- #: lib/class-wp-smush-admin.php:1973
433
  msgid "Review your setting now."
434
  msgstr ""
435
 
436
- #: lib/class-wp-smush-admin.php:1974 lib/class-wp-smush-dir.php:238
437
  #: lib/class-wp-smush-dir.php:264 lib/class-wp-smush-ui.php:680
438
  #: lib/class-wp-smush-ui.php:817
439
  msgid "WP Smush Pro"
440
  msgstr ""
441
 
442
- #: lib/class-wp-smush-admin.php:1975
443
  msgid ""
444
  "Welcome to the newest version of WP Smush! In this update we've added the "
445
  "ability to bulk smush images in directories outside your uploads folder."
446
  msgstr ""
447
 
448
- #: lib/class-wp-smush-admin.php:1978
449
  #, php-format
450
  msgid ""
451
  " And as a multisite user, you can manage %sSmush settings%s globally across "
452
  "all sites!"
453
  msgstr ""
454
 
455
- #: lib/class-wp-smush-admin.php:1981
456
  #, php-format
457
  msgid " %sFind out more here >>%s"
458
  msgstr ""
3
  msgstr ""
4
  "Project-Id-Version: WP Smush 2.6.2\n"
5
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/wp-smushit\n"
6
+ "POT-Creation-Date: 2017-04-18 17:22:58+00:00\n"
7
  "MIME-Version: 1.0\n"
8
  "Content-Type: text/plain; charset=UTF-8\n"
9
  "Content-Transfer-Encoding: 8bit\n"
178
  msgid "Rate %s"
179
  msgstr ""
180
 
181
+ #: lib/class-wp-smush-admin.php:210
182
  msgid "Enable Network wide settings"
183
  msgstr ""
184
 
185
+ #: lib/class-wp-smush-admin.php:211
186
  msgid "If disabled sub sites can override the individual Smush settings."
187
  msgstr ""
188
 
189
+ #: lib/class-wp-smush-admin.php:214
190
  msgid "Automatically smush my images on upload"
191
  msgstr ""
192
 
193
+ #: lib/class-wp-smush-admin.php:215
194
  msgid ""
195
  "When you upload images to the media library, we’ll automatically optimize "
196
  "them."
197
  msgstr ""
198
 
199
+ #: lib/class-wp-smush-admin.php:218
200
  msgid "Preserve image EXIF data"
201
  msgstr ""
202
 
203
+ #: lib/class-wp-smush-admin.php:219
204
  msgid ""
205
  "EXIF data stores camera settings, focal length, date, time and location "
206
  "information in image files. EXIF data makes image files larger but if you "
207
  "are a photographer you may want to preserve this information."
208
  msgstr ""
209
 
210
+ #: lib/class-wp-smush-admin.php:222
211
  msgid "Resize original images"
212
  msgstr ""
213
 
214
+ #: lib/class-wp-smush-admin.php:223
215
  msgid ""
216
  "Save a ton of space by not storing over-sized images on your server. Set "
217
  "image maximum width and height and large images will be automatically scaled "
218
  "before being added to the media library."
219
  msgstr ""
220
 
221
+ #: lib/class-wp-smush-admin.php:226
222
  msgid "Super-smush my images"
223
  msgstr ""
224
 
225
+ #: lib/class-wp-smush-admin.php:227
226
  msgid ""
227
  "Compress images up to 2x more than regular smush with almost no visible drop "
228
  "in quality."
229
  msgstr ""
230
 
231
+ #: lib/class-wp-smush-admin.php:230
232
  msgid "Include my original full-size images"
233
  msgstr ""
234
 
235
+ #: lib/class-wp-smush-admin.php:231
236
  msgid ""
237
  "WordPress crops and resizes every image you upload for embedding on your "
238
  "site. By default, Smush only compresses these cropped and resized images, "
241
  "improve page speed."
242
  msgstr ""
243
 
244
+ #: lib/class-wp-smush-admin.php:234
245
  msgid "Make a copy of my original images"
246
  msgstr ""
247
 
248
+ #: lib/class-wp-smush-admin.php:235
249
  msgid ""
250
  "Save your original full-size images so you can restore them at any point. "
251
  "Note: Activating this setting will significantly increase the size of your "
252
  "uploads folder by nearly twice as much."
253
  msgstr ""
254
 
255
+ #: lib/class-wp-smush-admin.php:238
256
  msgid "Convert PNG to JPEG (lossy)"
257
  msgstr ""
258
 
259
+ #: lib/class-wp-smush-admin.php:239
260
  #, php-format
261
  msgid ""
262
  "When you compress a PNG file, Smush will check if converting the file to "
263
  "JPEG will further reduce its size. %s Note: PNGs with transparency will be "
264
  "ignored and Smush will only convert the file format if it results in a "
265
  "smaller file size. This will change the file’s name and extension, and any "
266
+ "hard-coded URLs will need to be updated.%s"
267
  msgstr ""
268
 
269
+ #: lib/class-wp-smush-admin.php:246
270
  msgid "Enable NextGen Gallery integration"
271
  msgstr ""
272
 
273
+ #: lib/class-wp-smush-admin.php:247
274
  msgid "Allow smushing images directly through NextGen Gallery settings."
275
  msgstr ""
276
 
277
  #. Plugin Name of the plugin/theme
278
+ #: lib/class-wp-smush-admin.php:269 lib/class-wp-smush-ui.php:817
279
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:70
280
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:89
281
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:91
282
  msgid "WP Smush"
283
  msgstr ""
284
 
285
+ #: lib/class-wp-smush-admin.php:399 lib/class-wp-smush.php:1043
286
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:158
287
  #: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:275
288
  msgid "Super-Smush"
289
  msgstr ""
290
 
291
+ #: lib/class-wp-smush-admin.php:400
292
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:159
293
  msgid "Smush Now"
294
  msgstr ""
295
 
296
+ #: lib/class-wp-smush-admin.php:401
297
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:160
298
  msgid "{{errors}} image(s) were skipped due to an error."
299
  msgstr ""
300
 
301
+ #: lib/class-wp-smush-admin.php:402
302
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:161
303
  msgid "All images are fully optimised."
304
  msgstr ""
305
 
306
+ #: lib/class-wp-smush-admin.php:403
307
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:162
308
  msgid "Restoring image.."
309
  msgstr ""
310
 
311
+ #: lib/class-wp-smush-admin.php:404
312
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:163
313
  msgid "Smushing image.."
314
  msgstr ""
315
 
316
+ #: lib/class-wp-smush-admin.php:405
317
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:164
318
  msgid "Checking images.."
319
  msgstr ""
320
 
321
+ #: lib/class-wp-smush-admin.php:406
322
  msgid ""
323
  "We successfully verified your membership, all the Pro features should work "
324
  "completely. "
325
  msgstr ""
326
 
327
+ #: lib/class-wp-smush-admin.php:407
328
  msgid "Your membership couldn't be verified."
329
  msgstr ""
330
 
331
+ #: lib/class-wp-smush-admin.php:408
332
  msgid "Missing file path."
333
  msgstr ""
334
 
335
+ #: lib/class-wp-smush-admin.php:410
336
  msgid "image could not be smushed."
337
  msgstr ""
338
 
339
+ #: lib/class-wp-smush-admin.php:411
340
  msgid "images could not be smushed."
341
  msgstr ""
342
 
343
+ #: lib/class-wp-smush-admin.php:412
344
  msgid "Already Optimised"
345
  msgstr ""
346
 
347
+ #: lib/class-wp-smush-admin.php:413
348
  msgid "Ajax Error"
349
  msgstr ""
350
 
351
+ #: lib/class-wp-smush-admin.php:414 lib/class-wp-smush-admin.php:415
352
+ #: lib/class-wp-smush-admin.php:1191
353
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:340
354
  msgid "All Done!"
355
  msgstr ""
356
 
357
+ #: lib/class-wp-smush-admin.php:638
358
  msgid ""
359
  "Smush request timed out, You can try setting a higher value for "
360
  "`WP_SMUSH_API_TIMEOUT`."
361
  msgstr ""
362
 
363
+ #: lib/class-wp-smush-admin.php:655 lib/class-wp-smush-dir.php:1251
364
  #, php-format
365
  msgid "You've smushed %d images in total."
366
  msgstr ""
367
 
368
+ #: lib/class-wp-smush-admin.php:695 lib/class-wp-smush-nextgen.php:381
369
  msgid "You don't have permission to work with uploaded files."
370
  msgstr ""
371
 
372
+ #: lib/class-wp-smush-admin.php:699 lib/class-wp-smush-nextgen.php:385
373
  msgid "No attachment ID was provided."
374
  msgstr ""
375
 
376
+ #: lib/class-wp-smush-admin.php:711
377
  msgid "Attachment Skipped - Check `wp_smush_image` filter."
378
  msgstr ""
379
 
380
+ #: lib/class-wp-smush-admin.php:888
381
  #, php-format
382
  msgid "<strong>%d of %d images</strong> were sent for smushing:"
383
  msgstr ""
384
 
385
+ #: lib/class-wp-smush-admin.php:1184 lib/class-wp-smush-admin.php:1197
386
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:336
387
  msgid "Bulk Smush Now"
388
  msgstr ""
389
 
390
+ #: lib/class-wp-smush-admin.php:1219 lib/class-wp-smush.php:1049
391
  msgid "Smushing in progress.."
392
  msgstr ""
393
 
394
+ #: lib/class-wp-smush-admin.php:1225 lib/class-wp-smush.php:1068
395
  #: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:255
396
  msgid "Smush Now!"
397
  msgstr ""
398
 
399
+ #: lib/class-wp-smush-admin.php:1246
400
  msgid "Settings"
401
  msgstr ""
402
 
403
+ #: lib/class-wp-smush-admin.php:1392
404
  msgid "Image not smushed, fields empty."
405
  msgstr ""
406
 
407
+ #: lib/class-wp-smush-admin.php:1399 lib/class-wp-smush-nextgen.php:568
408
  msgid ""
409
  "Image couldn't be smushed as the nonce verification failed, try reloading "
410
  "the page."
411
  msgstr ""
412
 
413
+ #: lib/class-wp-smush-admin.php:1416
414
  msgid "Unable to smush image"
415
  msgstr ""
416
 
417
+ #: lib/class-wp-smush-admin.php:1441
418
  msgid ""
419
  "We haven’t found any images in your media library yet so there’s no smushing "
420
  "to be done!"
421
  msgstr ""
422
 
423
+ #: lib/class-wp-smush-admin.php:1457
424
  msgid "Yay! All images are optimised as per your current settings."
425
  msgstr ""
426
 
427
+ #: lib/class-wp-smush-admin.php:1629 lib/class-wp-smush-ui.php:792
428
  #, php-format
429
  msgid "You have images that need smushing. %sBulk smush now!%s"
430
  msgstr ""
431
 
432
+ #: lib/class-wp-smush-admin.php:1970
433
  msgid "Review your setting now."
434
  msgstr ""
435
 
436
+ #: lib/class-wp-smush-admin.php:1971 lib/class-wp-smush-dir.php:238
437
  #: lib/class-wp-smush-dir.php:264 lib/class-wp-smush-ui.php:680
438
  #: lib/class-wp-smush-ui.php:817
439
  msgid "WP Smush Pro"
440
  msgstr ""
441
 
442
+ #: lib/class-wp-smush-admin.php:1972
443
  msgid ""
444
  "Welcome to the newest version of WP Smush! In this update we've added the "
445
  "ability to bulk smush images in directories outside your uploads folder."
446
  msgstr ""
447
 
448
+ #: lib/class-wp-smush-admin.php:1975
449
  #, php-format
450
  msgid ""
451
  " And as a multisite user, you can manage %sSmush settings%s globally across "
452
  "all sites!"
453
  msgstr ""
454
 
455
+ #: lib/class-wp-smush-admin.php:1978
456
  #, php-format
457
  msgid " %sFind out more here >>%s"
458
  msgstr ""
lib/class-wp-smush-admin.php CHANGED
@@ -124,6 +124,13 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
124
  'media_page_wp-smush-all'
125
  );
126
 
 
 
 
 
 
 
 
127
  /**
128
  * Constructor
129
  */
@@ -1816,20 +1823,10 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
1816
  //If class method exists, load shared UI
1817
  if ( class_exists( 'WDEV_Plugin_Ui' ) ) {
1818
 
1819
- if ( method_exists( 'WDEV_Plugin_Ui', 'load' ) ) {
1820
 
1821
  //Load Shared UI
1822
  WDEV_Plugin_Ui::load( WP_SMUSH_URL . 'assets/shared-ui/', false );
1823
-
1824
- if ( ( 'settings_page_wp-smush-network' != $current_page && 'media_page_wp-smush-bulk' != $current_page && 'gallery_page_wp-smush-nextgen-bulk' != $current_page && 'media_page_wp-smush-all' != $current_page) ) {
1825
-
1826
- //Don't add thhe WPMUD class to body to other admin pages
1827
- remove_filter(
1828
- 'admin_body_class',
1829
- array( 'WDEV_Plugin_Ui', 'admin_body_class' )
1830
- );
1831
-
1832
- }
1833
  }
1834
  }
1835
  }
124
  'media_page_wp-smush-all'
125
  );
126
 
127
+ public $plugin_pages = array(
128
+ 'gallery_page_wp-smush-nextgen-bulk',
129
+ 'settings_page_wp-smush-network',
130
+ 'media_page_wp-smush-bulk',
131
+ 'media_page_wp-smush-all'
132
+ );
133
+
134
  /**
135
  * Constructor
136
  */
1823
  //If class method exists, load shared UI
1824
  if ( class_exists( 'WDEV_Plugin_Ui' ) ) {
1825
 
1826
+ if ( method_exists( 'WDEV_Plugin_Ui', 'load' ) && in_array( $current_page, $this->plugin_pages ) ) {
1827
 
1828
  //Load Shared UI
1829
  WDEV_Plugin_Ui::load( WP_SMUSH_URL . 'assets/shared-ui/', false );
 
 
 
 
 
 
 
 
 
 
1830
  }
1831
  }
1832
  }
lib/wp-async-task-smush.php CHANGED
@@ -105,11 +105,15 @@ if ( ! class_exists( 'WP_Async_Task_Smush' ) ) {
105
  $this->_body_data = $data;
106
 
107
  $shutdown_action = has_action( 'shutdown', array( $this, 'process_request' ) );
 
108
  //Do not use this, as in case of importing, only the last image gets processed
109
- if ( ! empty( $_POST ) && isset( $_POST['post_id'] ) && ! $shutdown_action ) {
 
 
110
  add_action( 'shutdown', array( $this, 'process_request' ) );
111
  } else {
112
- //Send a ajax request to process image and return image metadata
 
113
  $this->process_request();
114
  }
115
 
105
  $this->_body_data = $data;
106
 
107
  $shutdown_action = has_action( 'shutdown', array( $this, 'process_request' ) );
108
+
109
  //Do not use this, as in case of importing, only the last image gets processed
110
+ //It's very important that all the Media uploads, are handled via shutdown action, else, sometimes the image meta updated
111
+ // by smush is earlier, and then original meta update causes discrepancy
112
+ if ( ( 'upload-attachment' == $_POST['action'] || ( ! empty( $_POST ) && isset( $_POST['post_id'] ) ) ) && ! $shutdown_action ) {
113
  add_action( 'shutdown', array( $this, 'process_request' ) );
114
  } else {
115
+ //Send a ajax request to process image and return image metadata, added for compatibility with plugins like
116
+ // WP All Import, and RSS aggregator, which upload multiple images at once
117
  $this->process_request();
118
  }
119
 
readme.txt CHANGED
@@ -1,22 +1,25 @@
1
  === Smush Image Compression and Optimization ===
2
  Plugin Name: Smush Image Compression and Optimization
3
- Version: 2.6.2
4
  Author: WPMU DEV
5
  Author URI: http://premium.wpmudev.org/
6
  Contributors: WPMUDEV, alexdunae
7
  Tags: image, resize, optimize, compress, performance, lossless, lossy, photo, pictures, optimize JPG, compress PNG, Smush WordPress Compression, Smush.it
8
  Requires at least: 3.5
9
  Tested up to: 4.7.3
10
- Stable tag: 2.6.2
11
  License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
12
 
13
  Compress and optimize image files, improve performance and boost your SEO rank using Smush WordPress image compression and optimization.
14
 
15
  == Description ==
16
 
17
- <strong>Resize, optimize and compress all of your images</strong> with the <strong>incredibly powerful</strong> and <strong>100% free WordPress image smusher</strong>, brought to you by the superteam at WPMU DEV!
18
 
19
- <strong>Now with image resizing!</strong> Set a max width and height and large images will scale down as they are being compressed.
 
 
 
20
 
21
  Our servers do all the heavy lifting. Strip hidden bulky information from your images and reduce file size without losing quality.
22
 
@@ -63,21 +66,9 @@ The faster your site loads, the more Google, Bing, Yahoo and other search engine
63
  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.
64
  </blockquote>
65
 
66
- = 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> =
67
 
68
- WP Smush Pro gives you everything you'll find in WP Smush and more:
69
- <ul>
70
- <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>
71
- <li>Get even better lossless compression. We try multiple methods to squeeze every last byte out of your images.</li>
72
- <li>Smush images up to 32MB. Now you can smush any image, even one’s that aren’t web optimized.</li>
73
- <li>Bulk smush ALL your images with one click - no more rate limiting!</li>
74
- <li>Automatically convert PNG files to lossy JPEG if extra savings are found.</li>
75
- <li>Keep a backup of original un-smushed images in case you want to restore later.</li>
76
- <li>24/7/365 support from the best WordPress support team on the planet.</li>
77
- <li>Includes Hummingbird pagespeed booster, Uptime monitoring and security hardening.</li>
78
- <li>100+ other premium plugins, services and themes included in your membership.</li>
79
- </ul>
80
- Upgrade to WP Smush Pro and optimize more and larger image files faster to increase your site’s performance.
81
 
82
 
83
  == Frequently Asked Questions ==
@@ -111,6 +102,17 @@ Yes! EXIF data stores camera settings, focal length, date, time and location inf
111
 
112
  First, check to see if you're receiving any server errors. If your images seem to be processing correctly check the file size of the images being skipped. Images over 1mb will be skipped. To compress images up to 32mb get <a href="https://premium.wpmudev.org/project/wp-smush-pro/?utm_source=wordpress.org&utm_medium=readme">WP Smush Pro</a>.
113
 
 
 
 
 
 
 
 
 
 
 
 
114
 
115
  == Screenshots ==
116
 
@@ -132,6 +134,17 @@ Yahoo's Smush.it API is gone forever. So WPMU DEV built our own free API that is
132
 
133
  == Changelog ==
134
 
 
 
 
 
 
 
 
 
 
 
 
135
  = 2.6.2 =
136
 
137
  * Added:
1
  === Smush Image Compression and Optimization ===
2
  Plugin Name: Smush Image Compression and Optimization
3
+ Version: 2.6.3
4
  Author: WPMU DEV
5
  Author URI: http://premium.wpmudev.org/
6
  Contributors: WPMUDEV, alexdunae
7
  Tags: image, resize, optimize, compress, performance, lossless, lossy, photo, pictures, optimize JPG, compress PNG, Smush WordPress Compression, Smush.it
8
  Requires at least: 3.5
9
  Tested up to: 4.7.3
10
+ Stable tag: 2.6.3
11
  License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
12
 
13
  Compress and optimize image files, improve performance and boost your SEO rank using Smush WordPress image compression and optimization.
14
 
15
  == Description ==
16
 
17
+ <strong>Resize, optimize and compress all of your images with the, incredibly powerful and 100% free WordPress image smusher, brought to you by the superteam at WPMU DEV!</strong>
18
 
19
+ = Award Winning Image Optimization =
20
+ Smush has been benchmarked and tested number one for speed and quality and is the <a href="https://torquemag.io/2017/04/wp-smush-defeats-wordfence-wins-plugin-madness-2017/">award winning</a> proven crowd favorite image optimization plugin for WordPress.
21
+
22
+ Now with image resizing! Set a max width and height and large images will scale down as they are being compressed.
23
 
24
  Our servers do all the heavy lifting. Strip hidden bulky information from your images and reduce file size without losing quality.
25
 
66
  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.
67
  </blockquote>
68
 
69
+ Smush can take care of all your image compression needs, for free!
70
 
71
+ However, if you'd like to Super Smush lossy compression, the ability to optimize image up to 32MB, and bulk smush optimization for all your images in just one-click, you can always take the next step with <a href="https://premium.wpmudev.org/project/wp-smush-pro/?utm_source=wordpress.org&utm_medium=readme">WP Smush Pro</a>.
 
 
 
 
 
 
 
 
 
 
 
 
72
 
73
 
74
  == Frequently Asked Questions ==
102
 
103
  First, check to see if you're receiving any server errors. If your images seem to be processing correctly check the file size of the images being skipped. Images over 1mb will be skipped. To compress images up to 32mb get <a href="https://premium.wpmudev.org/project/wp-smush-pro/?utm_source=wordpress.org&utm_medium=readme">WP Smush Pro</a>.
104
 
105
+ = I activated Smush and I don’t see any difference in image quality. How am I supposed to know if Smush is working? =
106
+
107
+ Great question! It is important to understand Smush is an optimization tool that uses lossless image compression to save disk storage space and speed up your site. Smush squeezes data from your image files that will save space, resize huge images, and improve speed without changing quality.
108
+
109
+ You can track file size changes in your media library, individual image savings, directory savings, and Smush total savings with Smush stats. If you want to see some additional magic, run before-and-after page-speed tests with WP Checkup or Google PageSpeed Insights. Every little bit of resource savings is important when it comes to page-speed!
110
+
111
+ = Can't I just use Photoshop or another image editing application to optimize my images? =
112
+
113
+ Optimizing all the image sizes generated by WordPress, images being imported from plugins and themes, and images from other web sites is a painful and time consuming process.
114
+
115
+ Smush automatically handles optimizing all your images no matter where they come from and can be used as a standalone tool or alongside Photoshop.
116
 
117
  == Screenshots ==
118
 
134
 
135
  == Changelog ==
136
 
137
+ = 2.6.3 =
138
+
139
+ * Fixed:
140
+
141
+ * Compatibility issue with WP Defender
142
+ * Image dimensions not updated after resizing in Grid view
143
+
144
+ * Added:
145
+
146
+ * Added a check to preserve smush stats on plugin deletion, You can add `define('WP_SMUSH_PRESERVE_STATS', true );` in wp-config.php
147
+
148
  = 2.6.2 =
149
 
150
  * Added:
uninstall.php CHANGED
@@ -10,6 +10,12 @@
10
  if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
11
  exit();
12
  }
 
 
 
 
 
 
13
  global $wpdb;
14
 
15
  $smushit_keys = array(
10
  if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
11
  exit();
12
  }
13
+
14
+ //Check if someone want to keep the stats and settings
15
+ if( defined('WP_SMUSH_PRESERVE_STATS') && WP_SMUSH_PRESERVE_STATS ) {
16
+ return;
17
+ }
18
+
19
  global $wpdb;
20
 
21
  $smushit_keys = array(
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.6.2
8
  Author URI: http://premium.wpmudev.org/
9
  Text Domain: 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.6.2';
39
 
40
  //Deactivate the .org version, if pro version is active
41
  add_action( 'admin_init', 'deactivate_smush_org' );
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.6.3
8
  Author URI: http://premium.wpmudev.org/
9
  Text Domain: wp-smushit
10
  */
35
  * Constants
36
  */
37
  $prefix = 'WP_SMUSH_';
38
+ $version = '2.6.3';
39
 
40
  //Deactivate the .org version, if pro version is active
41
  add_action( 'admin_init', 'deactivate_smush_org' );