Version Description
-
Added:
- WP All Import Compatibility
-
Fixed:
- Image not being updated to S3 after resmush ( *Only if remove files from server is kept off in S3 plugin settings )
- Added check for directory smush savings
- Call
wp_update_attachment_metadata
after smushing, to allow the optimised image to be used - Dir Smush: Images with special symbols doesn't gets optimised
- Dir Smush: Skip .bak files
- Retina Images @2x: Do not smush if auto smush is disabled
- Backup ( Pro ): Take backup of original untouched image, improved backup and restore.
-
Updated:
- Smush Limit ( 50 Images ), do not include images with error in count
Download this release
Release Info
Developer | UmeshSingla |
Plugin | Smush Image Compression and Optimization |
Version | 2.6.2 |
Comparing to | |
See all releases |
Code changes from version 2.6.1 to 2.6.2
- assets/css/wp-smushit-admin.css +16 -5
- assets/js/wp-smushit-admin.js +7 -7
- assets/shared-ui/font/WPMU DEV Dashboard.json +0 -0
- assets/shared-ui/img/spin-grey.gif +0 -0
- assets/shared-ui/img/spin.gif +0 -0
- assets/shared-ui/notice.css +0 -0
- assets/shared-ui/notice.js +0 -0
- assets/shared-ui/plugin-ui.php +0 -0
- assets/shared-ui/wdev-ui.css +0 -0
- assets/shared-ui/wdev-ui.js +0 -0
- languages/wp-smushit.pot +304 -124
- lib/class-wp-smush-admin.php +95 -30
- lib/class-wp-smush-backup.php +56 -68
- lib/class-wp-smush-dir.php +47 -15
- lib/class-wp-smush-resize.php +16 -74
- lib/class-wp-smush.php +18 -10
- lib/wp-async-task-smush.php +9 -3
- readme.txt +20 -3
- uninstall.php +7 -1
- wp-smush.php +2 -2
assets/css/wp-smushit-admin.css
CHANGED
@@ -813,10 +813,10 @@ table.wp-smush-stats-holder tr td:first-child {
|
|
813 |
}
|
814 |
|
815 |
/** Image Remaining **/
|
816 |
-
.wp-smush-remaining,
|
817 |
#wp-smush-invalid-member,
|
818 |
-
.wp-smush-dir-remaining,
|
819 |
-
.wp-smush-dir-limit {
|
820 |
background-color: #FFF5D5;
|
821 |
border: none;
|
822 |
color: #333333;
|
@@ -825,6 +825,10 @@ table.wp-smush-stats-holder tr td:first-child {
|
|
825 |
letter-spacing: -0.015em;
|
826 |
}
|
827 |
|
|
|
|
|
|
|
|
|
828 |
div.wp-smush-notice .dev-icon-tick:before,
|
829 |
div.wp-smush-all-done .dev-icon-tick:before,
|
830 |
div.wp-smush-dir-all-done .dev-icon-tick:before {
|
@@ -838,11 +842,14 @@ div.wp-smush-dir-all-done .dev-icon-tick:before {
|
|
838 |
text-decoration: underline;
|
839 |
}
|
840 |
|
841 |
-
div.wp-smush-dir-remaining .wdv-icon-exclamation-sign:before
|
842 |
-
div.wp-smush-dir-limit .wdv-icon-info-sign:before{
|
843 |
color: #FECF2F;
|
844 |
}
|
845 |
|
|
|
|
|
|
|
|
|
846 |
.wp-smush-resmush-wrap .wp-smush-remaining {
|
847 |
padding: 10px 50px;
|
848 |
}
|
@@ -995,6 +1002,10 @@ small.smush-setting-description {
|
|
995 |
margin-top: 10px;
|
996 |
}
|
997 |
|
|
|
|
|
|
|
|
|
998 |
/** Stats Container **/
|
999 |
.wpmud .dev-box.smush-stats-wrapper {
|
1000 |
color: #333333;
|
813 |
}
|
814 |
|
815 |
/** Image Remaining **/
|
816 |
+
div.wp-smush-remaining,
|
817 |
#wp-smush-invalid-member,
|
818 |
+
div.wp-smush-dir-remaining,
|
819 |
+
div.wp-smush-dir-limit {
|
820 |
background-color: #FFF5D5;
|
821 |
border: none;
|
822 |
color: #333333;
|
825 |
letter-spacing: -0.015em;
|
826 |
}
|
827 |
|
828 |
+
div.wp-smush-dir-limit {
|
829 |
+
background-color: #dff6fa;
|
830 |
+
}
|
831 |
+
|
832 |
div.wp-smush-notice .dev-icon-tick:before,
|
833 |
div.wp-smush-all-done .dev-icon-tick:before,
|
834 |
div.wp-smush-dir-all-done .dev-icon-tick:before {
|
842 |
text-decoration: underline;
|
843 |
}
|
844 |
|
845 |
+
div.wp-smush-dir-remaining .wdv-icon-exclamation-sign:before{
|
|
|
846 |
color: #FECF2F;
|
847 |
}
|
848 |
|
849 |
+
div.wp-smush-dir-limit .wdv-icon-info-sign:before {
|
850 |
+
color: #333;
|
851 |
+
}
|
852 |
+
|
853 |
.wp-smush-resmush-wrap .wp-smush-remaining {
|
854 |
padding: 10px 50px;
|
855 |
}
|
1002 |
margin-top: 10px;
|
1003 |
}
|
1004 |
|
1005 |
+
small.smush-setting-description strong {
|
1006 |
+
color: #5f5d5d
|
1007 |
+
}
|
1008 |
+
|
1009 |
/** Stats Container **/
|
1010 |
.wpmud .dev-box.smush-stats-wrapper {
|
1011 |
color: #333333;
|
assets/js/wp-smushit-admin.js
CHANGED
@@ -1096,8 +1096,8 @@ jQuery(function ($) {
|
|
1096 |
*
|
1097 |
*/
|
1098 |
var add_dir_browser_button = function () {
|
1099 |
-
//Get the content div length, if less than
|
1100 |
-
if( $('div.wp-smush-scan-result div.content').height() <
|
1101 |
return;
|
1102 |
}
|
1103 |
|
@@ -1107,8 +1107,8 @@ jQuery(function ($) {
|
|
1107 |
};
|
1108 |
|
1109 |
var add_smush_button = function() {
|
1110 |
-
//Get the content div length, if less than
|
1111 |
-
if( $('div.wp-smush-scan-result div.content').height() <
|
1112 |
return;
|
1113 |
}
|
1114 |
|
@@ -1127,8 +1127,8 @@ jQuery(function ($) {
|
|
1127 |
*
|
1128 |
*/
|
1129 |
var add_smush_dir_notice = function ( notice_type ) {
|
1130 |
-
//Get the content div length, if less than
|
1131 |
-
if( $('div.wp-smush-scan-result div.content').height() <
|
1132 |
return;
|
1133 |
}
|
1134 |
var notice = '';
|
@@ -1965,7 +1965,7 @@ jQuery(function ($) {
|
|
1965 |
/** All the Styling changes **/
|
1966 |
button.attr('disabled', 'disabled');
|
1967 |
parent.find('span.spinner').addClass('is-active');
|
1968 |
-
parent.find('button.wp-smush-pause').show().removeAttr('disabled');
|
1969 |
|
1970 |
//Disable Select Directory button
|
1971 |
$('button.wp-smush-browse').attr('disabled', 'disabled');
|
1096 |
*
|
1097 |
*/
|
1098 |
var add_dir_browser_button = function () {
|
1099 |
+
//Get the content div length, if less than 1500, Skip
|
1100 |
+
if( $('div.wp-smush-scan-result div.content').height() < 1500 || $('div.dir-smush-button-wrap.top').length >= 1 ) {
|
1101 |
return;
|
1102 |
}
|
1103 |
|
1107 |
};
|
1108 |
|
1109 |
var add_smush_button = function() {
|
1110 |
+
//Get the content div length, if less than 1500, Skip
|
1111 |
+
if( $('div.wp-smush-scan-result div.content').height() < 1500 || $('div.wp-smush-all-button-wrap.top').length >= 1 ) {
|
1112 |
return;
|
1113 |
}
|
1114 |
|
1127 |
*
|
1128 |
*/
|
1129 |
var add_smush_dir_notice = function ( notice_type ) {
|
1130 |
+
//Get the content div length, if less than 1500, Skip
|
1131 |
+
if( $('div.wp-smush-scan-result div.content').height() < 1500 || $('div.wp-smush-scan-result div.wp-smush-notice.top').length >= 1 ) {
|
1132 |
return;
|
1133 |
}
|
1134 |
var notice = '';
|
1965 |
/** All the Styling changes **/
|
1966 |
button.attr('disabled', 'disabled');
|
1967 |
parent.find('span.spinner').addClass('is-active');
|
1968 |
+
parent.find('button.wp-smush-pause').show().removeClass('disabled').removeAttr('disabled');
|
1969 |
|
1970 |
//Disable Select Directory button
|
1971 |
$('button.wp-smush-browse').attr('disabled', 'disabled');
|
assets/shared-ui/font/WPMU DEV Dashboard.json
CHANGED
File without changes
|
assets/shared-ui/img/spin-grey.gif
CHANGED
File without changes
|
assets/shared-ui/img/spin.gif
CHANGED
File without changes
|
assets/shared-ui/notice.css
CHANGED
File without changes
|
assets/shared-ui/notice.js
CHANGED
File without changes
|
assets/shared-ui/plugin-ui.php
CHANGED
File without changes
|
assets/shared-ui/wdev-ui.css
CHANGED
File without changes
|
assets/shared-ui/wdev-ui.js
CHANGED
File without changes
|
languages/wp-smushit.pot
CHANGED
@@ -1,16 +1,21 @@
|
|
1 |
-
|
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.6.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/wp-smushit\n"
|
7 |
-
"POT-Creation-Date: 2017-03-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"
|
12 |
-
"
|
13 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
#: assets/shared-ui/plugin-ui.php:49
|
16 |
msgid "Nothing found"
|
@@ -41,19 +46,29 @@ msgid "install"
|
|
41 |
msgstr ""
|
42 |
|
43 |
#: extras/dash-notice/wpmudev-dash-notification.php:230
|
44 |
-
|
|
|
|
|
|
|
45 |
msgstr ""
|
46 |
|
47 |
#: extras/dash-notice/wpmudev-dash-notification.php:232
|
48 |
-
|
|
|
|
|
|
|
49 |
msgstr ""
|
50 |
|
51 |
#: extras/dash-notice/wpmudev-dash-notification.php:236
|
52 |
-
msgid "
|
|
|
|
|
53 |
msgstr ""
|
54 |
|
55 |
#: extras/dash-notice/wpmudev-dash-notification.php:238
|
56 |
-
msgid "
|
|
|
|
|
57 |
msgstr ""
|
58 |
|
59 |
#: extras/dash-notice/wpmudev-dash-notification.php:244
|
@@ -70,19 +85,28 @@ msgid "activate"
|
|
70 |
msgstr ""
|
71 |
|
72 |
#: extras/dash-notice/wpmudev-dash-notification.php:271
|
73 |
-
|
|
|
|
|
|
|
74 |
msgstr ""
|
75 |
|
76 |
#: extras/dash-notice/wpmudev-dash-notification.php:273
|
77 |
-
|
|
|
|
|
78 |
msgstr ""
|
79 |
|
80 |
#: extras/dash-notice/wpmudev-dash-notification.php:277
|
81 |
-
msgid "
|
|
|
|
|
82 |
msgstr ""
|
83 |
|
84 |
#: extras/dash-notice/wpmudev-dash-notification.php:279
|
85 |
-
msgid "
|
|
|
|
|
86 |
msgstr ""
|
87 |
|
88 |
#: extras/dash-notice/wpmudev-dash-notification.php:285
|
@@ -94,6 +118,7 @@ msgid "We did not find any data for this plugin or theme..."
|
|
94 |
msgstr ""
|
95 |
|
96 |
#: extras/dash-notice/wpmudev-dash-notification.php:1131
|
|
|
97 |
msgid "%s changelog"
|
98 |
msgstr ""
|
99 |
|
@@ -106,6 +131,7 @@ msgid "New"
|
|
106 |
msgstr ""
|
107 |
|
108 |
#: extras/dash-notice/wpmudev-dash-notification.php:1184
|
|
|
109 |
msgid "Version %s"
|
110 |
msgstr ""
|
111 |
|
@@ -118,7 +144,12 @@ msgid "Hide details"
|
|
118 |
msgstr ""
|
119 |
|
120 |
#: extras/free-dashboard/module.php:377
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
122 |
msgstr ""
|
123 |
|
124 |
#: extras/free-dashboard/module.php:392 extras/free-dashboard/module.php:427
|
@@ -130,14 +161,20 @@ msgid "No thanks"
|
|
130 |
msgstr ""
|
131 |
|
132 |
#: extras/free-dashboard/module.php:412
|
133 |
-
|
|
|
|
|
|
|
134 |
msgstr ""
|
135 |
|
136 |
#: extras/free-dashboard/module.php:412
|
137 |
-
msgid "
|
|
|
|
|
138 |
msgstr ""
|
139 |
|
140 |
#: extras/free-dashboard/module.php:430
|
|
|
141 |
msgid "Rate %s"
|
142 |
msgstr ""
|
143 |
|
@@ -154,7 +191,9 @@ msgid "Automatically smush my images on upload"
|
|
154 |
msgstr ""
|
155 |
|
156 |
#: lib/class-wp-smush-admin.php:208
|
157 |
-
msgid "
|
|
|
|
|
158 |
msgstr ""
|
159 |
|
160 |
#: lib/class-wp-smush-admin.php:211
|
@@ -162,7 +201,10 @@ msgid "Preserve image EXIF data"
|
|
162 |
msgstr ""
|
163 |
|
164 |
#: lib/class-wp-smush-admin.php:212
|
165 |
-
msgid "
|
|
|
|
|
|
|
166 |
msgstr ""
|
167 |
|
168 |
#: lib/class-wp-smush-admin.php:215
|
@@ -170,7 +212,10 @@ msgid "Resize original images"
|
|
170 |
msgstr ""
|
171 |
|
172 |
#: lib/class-wp-smush-admin.php:216
|
173 |
-
msgid "
|
|
|
|
|
|
|
174 |
msgstr ""
|
175 |
|
176 |
#: lib/class-wp-smush-admin.php:219
|
@@ -178,7 +223,9 @@ msgid "Super-smush my images"
|
|
178 |
msgstr ""
|
179 |
|
180 |
#: lib/class-wp-smush-admin.php:220
|
181 |
-
msgid "
|
|
|
|
|
182 |
msgstr ""
|
183 |
|
184 |
#: lib/class-wp-smush-admin.php:223
|
@@ -186,7 +233,12 @@ msgid "Include my original full-size images"
|
|
186 |
msgstr ""
|
187 |
|
188 |
#: lib/class-wp-smush-admin.php:224
|
189 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
190 |
msgstr ""
|
191 |
|
192 |
#: lib/class-wp-smush-admin.php:227
|
@@ -194,7 +246,10 @@ msgid "Make a copy of my original images"
|
|
194 |
msgstr ""
|
195 |
|
196 |
#: lib/class-wp-smush-admin.php:228
|
197 |
-
msgid "
|
|
|
|
|
|
|
198 |
msgstr ""
|
199 |
|
200 |
#: lib/class-wp-smush-admin.php:231
|
@@ -202,7 +257,13 @@ msgid "Convert PNG to JPEG (lossy)"
|
|
202 |
msgstr ""
|
203 |
|
204 |
#: lib/class-wp-smush-admin.php:232
|
205 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
msgstr ""
|
207 |
|
208 |
#: lib/class-wp-smush-admin.php:239
|
@@ -213,6 +274,7 @@ msgstr ""
|
|
213 |
msgid "Allow smushing images directly through NextGen Gallery settings."
|
214 |
msgstr ""
|
215 |
|
|
|
216 |
#: lib/class-wp-smush-admin.php:262 lib/class-wp-smush-ui.php:817
|
217 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:70
|
218 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:89
|
@@ -220,7 +282,7 @@ msgstr ""
|
|
220 |
msgid "WP Smush"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: lib/class-wp-smush-admin.php:392 lib/class-wp-smush.php:
|
224 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:158
|
225 |
#: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:275
|
226 |
msgid "Super-Smush"
|
@@ -257,7 +319,9 @@ msgid "Checking images.."
|
|
257 |
msgstr ""
|
258 |
|
259 |
#: lib/class-wp-smush-admin.php:399
|
260 |
-
msgid "
|
|
|
|
|
261 |
msgstr ""
|
262 |
|
263 |
#: lib/class-wp-smush-admin.php:400
|
@@ -285,108 +349,123 @@ msgid "Ajax Error"
|
|
285 |
msgstr ""
|
286 |
|
287 |
#: lib/class-wp-smush-admin.php:407 lib/class-wp-smush-admin.php:408
|
288 |
-
#: lib/class-wp-smush-admin.php:
|
289 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:340
|
290 |
msgid "All Done!"
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: lib/class-wp-smush-admin.php:
|
294 |
-
msgid "
|
|
|
|
|
295 |
msgstr ""
|
296 |
|
297 |
-
#: lib/class-wp-smush-admin.php:
|
|
|
298 |
msgid "You've smushed %d images in total."
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: lib/class-wp-smush-admin.php:
|
302 |
msgid "You don't have permission to work with uploaded files."
|
303 |
msgstr ""
|
304 |
|
305 |
-
#: lib/class-wp-smush-admin.php:
|
306 |
msgid "No attachment ID was provided."
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: lib/class-wp-smush-admin.php:
|
310 |
msgid "Attachment Skipped - Check `wp_smush_image` filter."
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: lib/class-wp-smush-admin.php:
|
|
|
314 |
msgid "<strong>%d of %d images</strong> were sent for smushing:"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: lib/class-wp-smush-admin.php:
|
318 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:336
|
319 |
msgid "Bulk Smush Now"
|
320 |
msgstr ""
|
321 |
|
322 |
-
#: lib/class-wp-smush-admin.php:
|
323 |
msgid "Smushing in progress.."
|
324 |
msgstr ""
|
325 |
|
326 |
-
#: lib/class-wp-smush-admin.php:
|
327 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:255
|
328 |
msgid "Smush Now!"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: lib/class-wp-smush-admin.php:
|
332 |
msgid "Settings"
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: lib/class-wp-smush-admin.php:
|
336 |
msgid "Image not smushed, fields empty."
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: lib/class-wp-smush-admin.php:
|
340 |
-
msgid "
|
|
|
|
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: lib/class-wp-smush-admin.php:
|
344 |
msgid "Unable to smush image"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: lib/class-wp-smush-admin.php:
|
348 |
-
msgid "
|
|
|
|
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: lib/class-wp-smush-admin.php:
|
352 |
msgid "Yay! All images are optimised as per your current settings."
|
353 |
msgstr ""
|
354 |
|
355 |
-
#: lib/class-wp-smush-admin.php:
|
|
|
356 |
msgid "You have images that need smushing. %sBulk smush now!%s"
|
357 |
msgstr ""
|
358 |
|
359 |
-
#: lib/class-wp-smush-admin.php:
|
360 |
msgid "Review your setting now."
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: lib/class-wp-smush-admin.php:
|
364 |
#: lib/class-wp-smush-dir.php:264 lib/class-wp-smush-ui.php:680
|
365 |
#: lib/class-wp-smush-ui.php:817
|
366 |
msgid "WP Smush Pro"
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: lib/class-wp-smush-admin.php:
|
370 |
-
msgid "
|
|
|
|
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: lib/class-wp-smush-admin.php:
|
374 |
-
|
|
|
|
|
|
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: lib/class-wp-smush-admin.php:
|
|
|
378 |
msgid " %sFind out more here >>%s"
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: lib/class-wp-smush-backup.php:
|
382 |
msgid "Error in processing restore action, Fields empty."
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: lib/class-wp-smush-backup.php:
|
386 |
msgid "Image not restored, Nonce verification failed."
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: lib/class-wp-smush-backup.php:
|
390 |
msgid "Unable to restore image"
|
391 |
msgstr ""
|
392 |
|
@@ -407,7 +486,10 @@ msgid "DIRECTORY SMUSH"
|
|
407 |
msgstr ""
|
408 |
|
409 |
#: lib/class-wp-smush-dir.php:245
|
410 |
-
msgid "
|
|
|
|
|
|
|
411 |
msgstr ""
|
412 |
|
413 |
#: lib/class-wp-smush-dir.php:258 lib/class-wp-smush-ui.php:654
|
@@ -416,11 +498,17 @@ msgid "All images are smushed and up to date. Awesome!"
|
|
416 |
msgstr ""
|
417 |
|
418 |
#: lib/class-wp-smush-dir.php:261
|
419 |
-
|
|
|
|
|
|
|
420 |
msgstr ""
|
421 |
|
422 |
#: lib/class-wp-smush-dir.php:264
|
423 |
-
|
|
|
|
|
|
|
424 |
msgstr ""
|
425 |
|
426 |
#: lib/class-wp-smush-dir.php:268 lib/class-wp-smush-ui.php:90
|
@@ -449,7 +537,8 @@ msgid "Choose the folder you wish to smush."
|
|
449 |
msgstr ""
|
450 |
|
451 |
#: lib/class-wp-smush-dir.php:295
|
452 |
-
msgid "
|
|
|
453 |
msgstr ""
|
454 |
|
455 |
#: lib/class-wp-smush-dir.php:298
|
@@ -460,36 +549,41 @@ msgstr ""
|
|
460 |
msgid "Exclude directory from Smush List"
|
461 |
msgstr ""
|
462 |
|
463 |
-
#: lib/class-wp-smush-dir.php:
|
464 |
msgid "We could not find any images in the selected directory."
|
465 |
msgstr ""
|
466 |
|
467 |
-
#: lib/class-wp-smush-dir.php:
|
|
|
468 |
msgid "%d images"
|
469 |
msgstr ""
|
470 |
|
471 |
-
#: lib/class-wp-smush-dir.php:
|
472 |
msgid "Waiting.."
|
473 |
msgstr ""
|
474 |
|
475 |
-
#: lib/class-wp-smush-dir.php:
|
476 |
msgid "Incorrect image id"
|
477 |
msgstr ""
|
478 |
|
479 |
-
#: lib/class-wp-smush-dir.php:
|
480 |
msgid "Could not find image id in last scanned images"
|
481 |
msgstr ""
|
482 |
|
483 |
-
#: lib/class-wp-smush-dir.php:
|
484 |
msgid "Image couldn't be optimised"
|
485 |
msgstr ""
|
486 |
|
487 |
-
#: lib/class-wp-smush-dir.php:
|
488 |
-
msgid "
|
|
|
|
|
489 |
msgstr ""
|
490 |
|
491 |
#: lib/class-wp-smush-nextgen.php:326
|
492 |
-
msgid "
|
|
|
|
|
493 |
msgstr ""
|
494 |
|
495 |
#: lib/class-wp-smush-nextgen.php:561
|
@@ -497,15 +591,22 @@ msgid "We couldn't process the image, fields empty."
|
|
497 |
msgstr ""
|
498 |
|
499 |
#: lib/class-wp-smush-nextgen.php:585
|
|
|
500 |
msgid "Unable to smush image, %s"
|
501 |
msgstr ""
|
502 |
|
503 |
#: lib/class-wp-smush-share.php:25
|
504 |
-
|
|
|
|
|
|
|
505 |
msgstr ""
|
506 |
|
507 |
#: lib/class-wp-smush-share.php:26
|
508 |
-
|
|
|
|
|
|
|
509 |
msgstr ""
|
510 |
|
511 |
#: lib/class-wp-smush-share.php:34
|
@@ -533,10 +634,14 @@ msgid "OH YEAH, IT'S COMPRESSION TIME!"
|
|
533 |
msgstr ""
|
534 |
|
535 |
#: lib/class-wp-smush-ui.php:71
|
536 |
-
|
|
|
|
|
|
|
537 |
msgstr ""
|
538 |
|
539 |
#: lib/class-wp-smush-ui.php:85
|
|
|
540 |
msgid "Smush individual images via your %sMedia Library%s"
|
541 |
msgstr ""
|
542 |
|
@@ -550,7 +655,9 @@ msgstr ""
|
|
550 |
|
551 |
#: lib/class-wp-smush-ui.php:122
|
552 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:502
|
553 |
-
msgid "
|
|
|
|
|
554 |
msgstr ""
|
555 |
|
556 |
#: lib/class-wp-smush-ui.php:122
|
@@ -564,6 +671,7 @@ msgid "STATS"
|
|
564 |
msgstr ""
|
565 |
|
566 |
#: lib/class-wp-smush-ui.php:126
|
|
|
567 |
msgid "You've smushed %d images in total"
|
568 |
msgstr ""
|
569 |
|
@@ -583,6 +691,7 @@ msgid "ATTACHMENTS SUPER-SMUSHED"
|
|
583 |
msgstr ""
|
584 |
|
585 |
#: lib/class-wp-smush-ui.php:178 lib/class-wp-smush-ui.php:192
|
|
|
586 |
msgid "%sENABLE%s"
|
587 |
msgstr ""
|
588 |
|
@@ -595,6 +704,7 @@ msgid "PNG TO JPEG SAVINGS"
|
|
595 |
msgstr ""
|
596 |
|
597 |
#: lib/class-wp-smush-ui.php:237
|
|
|
598 |
msgid "%sTRY PRO FREE%s"
|
599 |
msgstr ""
|
600 |
|
@@ -607,6 +717,7 @@ msgid "PRO SAVINGS ESTIMATE"
|
|
607 |
msgstr ""
|
608 |
|
609 |
#: lib/class-wp-smush-ui.php:284
|
|
|
610 |
msgid "%sTRY PRO FEATURES FREE%s"
|
611 |
msgstr ""
|
612 |
|
@@ -627,15 +738,22 @@ msgid "Height"
|
|
627 |
msgstr ""
|
628 |
|
629 |
#: lib/class-wp-smush-ui.php:486
|
630 |
-
|
|
|
|
|
|
|
631 |
msgstr ""
|
632 |
|
633 |
#: lib/class-wp-smush-ui.php:487
|
634 |
-
msgid "
|
|
|
|
|
635 |
msgstr ""
|
636 |
|
637 |
#: lib/class-wp-smush-ui.php:488
|
638 |
-
msgid "
|
|
|
|
|
639 |
msgstr ""
|
640 |
|
641 |
#: lib/class-wp-smush-ui.php:617
|
@@ -648,7 +766,11 @@ msgid "No attachments found - Upload some images"
|
|
648 |
msgstr ""
|
649 |
|
650 |
#: lib/class-wp-smush-ui.php:646
|
651 |
-
|
|
|
|
|
|
|
|
|
652 |
msgstr ""
|
653 |
|
654 |
#: lib/class-wp-smush-ui.php:649
|
@@ -663,12 +785,14 @@ msgstr ""
|
|
663 |
|
664 |
#: lib/class-wp-smush-ui.php:678
|
665 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:446
|
|
|
666 |
msgid "%s, you have %s%s%d%s image%s that needs smushing!"
|
667 |
msgid_plural "%s, you have %s%s%d%s images%s that need smushing!"
|
668 |
msgstr[0] ""
|
669 |
msgstr[1] ""
|
670 |
|
671 |
#: lib/class-wp-smush-ui.php:680
|
|
|
672 |
msgid "%sUpgrade to Pro%s to bulk smush all your images with one click."
|
673 |
msgstr ""
|
674 |
|
@@ -677,18 +801,25 @@ msgid "Free users can smush 50 images with each click."
|
|
677 |
msgstr ""
|
678 |
|
679 |
#: lib/class-wp-smush-ui.php:690
|
680 |
-
msgid "
|
|
|
|
|
681 |
msgstr ""
|
682 |
|
683 |
#: lib/class-wp-smush-ui.php:713
|
684 |
-
|
|
|
|
|
|
|
685 |
msgstr ""
|
686 |
|
687 |
#: lib/class-wp-smush-ui.php:723
|
|
|
688 |
msgid "%s%d%s of %d attachments have been smushed."
|
689 |
msgstr ""
|
690 |
|
691 |
#: lib/class-wp-smush-ui.php:764
|
|
|
692 |
msgid "%s, you have %s%s%d%s image%s that needs re-compressing!"
|
693 |
msgid_plural "%s, you have %s%s%d%s images%s that need re-compressing!"
|
694 |
msgstr[0] ""
|
@@ -703,11 +834,17 @@ msgid "Your settings have been updated!"
|
|
703 |
msgstr ""
|
704 |
|
705 |
#: lib/class-wp-smush-ui.php:819
|
706 |
-
|
|
|
|
|
|
|
707 |
msgstr ""
|
708 |
|
709 |
#: lib/class-wp-smush-ui.php:819
|
710 |
-
|
|
|
|
|
|
|
711 |
msgstr ""
|
712 |
|
713 |
#: lib/class-wp-smush-ui.php:857
|
@@ -715,7 +852,9 @@ msgid "Thanks for installing Smush. We hope you like it!"
|
|
715 |
msgstr ""
|
716 |
|
717 |
#: lib/class-wp-smush-ui.php:858
|
718 |
-
msgid "
|
|
|
|
|
719 |
msgstr ""
|
720 |
|
721 |
#: lib/class-wp-smush-ui.php:859 lib/class-wp-smush-ui.php:863
|
@@ -723,15 +862,23 @@ msgid "Try Smush Pro for Free"
|
|
723 |
msgstr ""
|
724 |
|
725 |
#: lib/class-wp-smush-ui.php:861
|
726 |
-
msgid "
|
|
|
|
|
727 |
msgstr ""
|
728 |
|
729 |
#: lib/class-wp-smush-ui.php:862
|
730 |
-
msgid "
|
|
|
|
|
731 |
msgstr ""
|
732 |
|
733 |
#: lib/class-wp-smush-ui.php:911
|
734 |
-
|
|
|
|
|
|
|
|
|
735 |
msgstr ""
|
736 |
|
737 |
#: lib/class-wp-smush-ui.php:911
|
@@ -743,7 +890,11 @@ msgid "Validating.."
|
|
743 |
msgstr ""
|
744 |
|
745 |
#: lib/class-wp-smush-ui.php:936
|
746 |
-
|
|
|
|
|
|
|
|
|
747 |
msgstr ""
|
748 |
|
749 |
#: lib/class-wp-smush-ui.php:958
|
@@ -751,120 +902,138 @@ msgid "UPDATE SETTINGS"
|
|
751 |
msgstr ""
|
752 |
|
753 |
#: lib/class-wp-smush-ui.php:988
|
754 |
-
msgid "
|
|
|
|
|
755 |
msgstr ""
|
756 |
|
757 |
-
#: lib/class-wp-smush.php:
|
758 |
msgid "File path is empty"
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: lib/class-wp-smush.php:
|
|
|
762 |
msgid "Could not find %s"
|
763 |
msgstr ""
|
764 |
|
765 |
-
#: lib/class-wp-smush.php:
|
|
|
766 |
msgid "%s is not writable"
|
767 |
msgstr ""
|
768 |
|
769 |
-
#: lib/class-wp-smush.php:
|
|
|
770 |
msgid "Skipped (%s), image not found. Attachment: %s"
|
771 |
msgstr ""
|
772 |
|
773 |
-
#: lib/class-wp-smush.php:
|
|
|
774 |
msgid "Skipped (%s), size limit exceeded. Attachment: %s"
|
775 |
msgstr ""
|
776 |
|
777 |
-
#: lib/class-wp-smush.php:
|
778 |
msgid "Unknown API error"
|
779 |
msgstr ""
|
780 |
|
781 |
-
#: lib/class-wp-smush.php:
|
|
|
782 |
msgid "Error posting to API: %s"
|
783 |
msgstr ""
|
784 |
|
785 |
-
#: lib/class-wp-smush.php:
|
|
|
786 |
msgid "Error posting to API: %s %s"
|
787 |
msgstr ""
|
788 |
|
789 |
-
#: lib/class-wp-smush.php:
|
790 |
msgid "Smush data corrupted, try again."
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: lib/class-wp-smush.php:
|
794 |
msgid "Image couldn't be smushed"
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: lib/class-wp-smush.php:
|
798 |
#: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:193
|
799 |
#: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:196
|
800 |
msgid "Already Optimized"
|
801 |
msgstr ""
|
802 |
|
803 |
-
#: lib/class-wp-smush.php:
|
|
|
804 |
msgid "%d images reduced "
|
805 |
msgstr ""
|
806 |
|
807 |
-
#: lib/class-wp-smush.php:
|
808 |
msgid "Reduced "
|
809 |
msgstr ""
|
810 |
|
811 |
-
#: lib/class-wp-smush.php:
|
|
|
812 |
msgid "by %s %s"
|
813 |
msgstr ""
|
814 |
|
815 |
-
#: lib/class-wp-smush.php:
|
|
|
816 |
msgid "<br /> Image Size: %s"
|
817 |
msgstr ""
|
818 |
|
819 |
-
#: lib/class-wp-smush.php:
|
820 |
msgid "Detailed stats for all the image sizes"
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: lib/class-wp-smush.php:
|
824 |
#: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:236
|
825 |
msgid "Smush stats"
|
826 |
msgstr ""
|
827 |
|
828 |
-
#: lib/class-wp-smush.php:
|
829 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:249
|
830 |
msgid "Not processed"
|
831 |
msgstr ""
|
832 |
|
833 |
-
#: lib/class-wp-smush.php:
|
834 |
-
|
|
|
|
|
|
|
|
|
|
|
835 |
msgstr ""
|
836 |
|
837 |
-
#: lib/class-wp-smush.php:
|
838 |
-
msgid "
|
|
|
|
|
839 |
msgstr ""
|
840 |
|
841 |
-
#: lib/class-wp-smush.php:
|
842 |
msgid " Skipped"
|
843 |
msgstr ""
|
844 |
|
845 |
-
#: lib/class-wp-smush.php:
|
846 |
#: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:432
|
847 |
msgid "Image size"
|
848 |
msgstr ""
|
849 |
|
850 |
-
#: lib/class-wp-smush.php:
|
851 |
#: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:433
|
852 |
msgid "Savings"
|
853 |
msgstr ""
|
854 |
|
855 |
-
#: lib/class-wp-smush.php:
|
856 |
msgid "Restore original image."
|
857 |
msgstr ""
|
858 |
|
859 |
-
#: lib/class-wp-smush.php:
|
860 |
msgid "Restore image"
|
861 |
msgstr ""
|
862 |
|
863 |
-
#: lib/class-wp-smush.php:
|
864 |
msgid "Smush image including original file."
|
865 |
msgstr ""
|
866 |
|
867 |
-
#: lib/class-wp-smush.php:
|
868 |
msgid "Resmush image"
|
869 |
msgstr ""
|
870 |
|
@@ -873,14 +1042,21 @@ msgid "Bulk WP Smush"
|
|
873 |
msgstr ""
|
874 |
|
875 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:425
|
876 |
-
|
|
|
|
|
|
|
877 |
msgstr ""
|
878 |
|
879 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:462
|
880 |
-
|
|
|
|
|
|
|
881 |
msgstr ""
|
882 |
|
883 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:477
|
|
|
884 |
msgid "Smush individual images via your %sManage Galleries%s section"
|
885 |
msgstr ""
|
886 |
|
@@ -889,14 +1065,18 @@ msgid "Manage Galleries"
|
|
889 |
msgstr ""
|
890 |
|
891 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:561
|
|
|
892 |
msgid "%sDISABLED%s"
|
893 |
msgstr ""
|
894 |
|
895 |
#: lib/nextgen-integration/class-wp-smush-nextgen-bulk.php:31
|
896 |
-
msgid "
|
|
|
|
|
897 |
msgstr ""
|
898 |
|
899 |
#: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:205
|
|
|
900 |
msgid "Reduced by %s ( %01.1f%% )"
|
901 |
msgstr ""
|
902 |
|
@@ -907,16 +1087,16 @@ msgstr ""
|
|
907 |
#: wp-smush.php:200
|
908 |
msgid "WP Smush Free was deactivated. You have WP Smush Pro active!"
|
909 |
msgstr ""
|
910 |
-
#. Plugin Name of the plugin/theme
|
911 |
-
msgid "WP Smush"
|
912 |
-
msgstr ""
|
913 |
|
914 |
#. Plugin URI of the plugin/theme
|
915 |
msgid "http://wordpress.org/extend/plugins/wp-smushit/"
|
916 |
msgstr ""
|
917 |
|
918 |
#. Description of the plugin/theme
|
919 |
-
msgid "
|
|
|
|
|
|
|
920 |
msgstr ""
|
921 |
|
922 |
#. Author of the plugin/theme
|
1 |
+
#, fuzzy
|
|
|
2 |
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"
|
10 |
+
"X-Generator: Poedit 1.8.1\n"
|
11 |
+
"X-Poedit-Basepath: ..\n"
|
12 |
+
"X-Poedit-WPHeader: wp-smush.php\n"
|
13 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
14 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
15 |
+
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
16 |
+
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
19 |
|
20 |
#: assets/shared-ui/plugin-ui.php:49
|
21 |
msgid "Nothing found"
|
46 |
msgstr ""
|
47 |
|
48 |
#: extras/dash-notice/wpmudev-dash-notification.php:230
|
49 |
+
#, php-format
|
50 |
+
msgid ""
|
51 |
+
"Important updates are available for <strong>%s</strong>. Install the free "
|
52 |
+
"WPMU DEV Dashboard plugin now for updates and support!"
|
53 |
msgstr ""
|
54 |
|
55 |
#: extras/dash-notice/wpmudev-dash-notification.php:232
|
56 |
+
#, php-format
|
57 |
+
msgid ""
|
58 |
+
"<strong>%s</strong> is almost ready - install the free WPMU DEV Dashboard "
|
59 |
+
"plugin for updates and support!"
|
60 |
msgstr ""
|
61 |
|
62 |
#: extras/dash-notice/wpmudev-dash-notification.php:236
|
63 |
+
msgid ""
|
64 |
+
"Important updates are available for your WPMU DEV plugins/themes. Install "
|
65 |
+
"the free WPMU DEV Dashboard plugin now for updates and support!"
|
66 |
msgstr ""
|
67 |
|
68 |
#: extras/dash-notice/wpmudev-dash-notification.php:238
|
69 |
+
msgid ""
|
70 |
+
"Almost ready - install the free WPMU DEV Dashboard plugin for updates and "
|
71 |
+
"support!"
|
72 |
msgstr ""
|
73 |
|
74 |
#: extras/dash-notice/wpmudev-dash-notification.php:244
|
85 |
msgstr ""
|
86 |
|
87 |
#: extras/dash-notice/wpmudev-dash-notification.php:271
|
88 |
+
#, php-format
|
89 |
+
msgid ""
|
90 |
+
"Important updates are available for <strong>%s</strong>. Activate the WPMU "
|
91 |
+
"DEV Dashboard to update now!"
|
92 |
msgstr ""
|
93 |
|
94 |
#: extras/dash-notice/wpmudev-dash-notification.php:273
|
95 |
+
#, php-format
|
96 |
+
msgid ""
|
97 |
+
"Just one more step to enable updates and support for <strong>%s</strong>!"
|
98 |
msgstr ""
|
99 |
|
100 |
#: extras/dash-notice/wpmudev-dash-notification.php:277
|
101 |
+
msgid ""
|
102 |
+
"Important updates are available for your WPMU DEV plugins/themes. Activate "
|
103 |
+
"the WPMU DEV Dashboard to update now!"
|
104 |
msgstr ""
|
105 |
|
106 |
#: extras/dash-notice/wpmudev-dash-notification.php:279
|
107 |
+
msgid ""
|
108 |
+
"Just one more step - activate the WPMU DEV Dashboard plugin and you're all "
|
109 |
+
"done!"
|
110 |
msgstr ""
|
111 |
|
112 |
#: extras/dash-notice/wpmudev-dash-notification.php:285
|
118 |
msgstr ""
|
119 |
|
120 |
#: extras/dash-notice/wpmudev-dash-notification.php:1131
|
121 |
+
#, php-format
|
122 |
msgid "%s changelog"
|
123 |
msgstr ""
|
124 |
|
131 |
msgstr ""
|
132 |
|
133 |
#: extras/dash-notice/wpmudev-dash-notification.php:1184
|
134 |
+
#, php-format
|
135 |
msgid "Version %s"
|
136 |
msgstr ""
|
137 |
|
144 |
msgstr ""
|
145 |
|
146 |
#: extras/free-dashboard/module.php:377
|
147 |
+
#, php-format
|
148 |
+
msgid ""
|
149 |
+
"We're happy that you've chosen to install %s! Are you interested in how to "
|
150 |
+
"make the most of this plugin? How would you like a quick 5 day email crash "
|
151 |
+
"course with actionable advice on building your membership site? Only the "
|
152 |
+
"info you want, no subscription!"
|
153 |
msgstr ""
|
154 |
|
155 |
#: extras/free-dashboard/module.php:392 extras/free-dashboard/module.php:427
|
161 |
msgstr ""
|
162 |
|
163 |
#: extras/free-dashboard/module.php:412
|
164 |
+
#, php-format
|
165 |
+
msgid ""
|
166 |
+
"Hey %s, you've been using %s for a while now, and we hope you're happy with "
|
167 |
+
"it."
|
168 |
msgstr ""
|
169 |
|
170 |
#: extras/free-dashboard/module.php:412
|
171 |
+
msgid ""
|
172 |
+
"We've spent countless hours developing this free plugin for you, and we "
|
173 |
+
"would really appreciate it if you dropped us a quick rating!"
|
174 |
msgstr ""
|
175 |
|
176 |
#: extras/free-dashboard/module.php:430
|
177 |
+
#, php-format
|
178 |
msgid "Rate %s"
|
179 |
msgstr ""
|
180 |
|
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
|
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
|
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
|
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
|
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, "
|
239 |
+
"not your original full-size images. To save space on your server, activate "
|
240 |
+
"this setting to smush your original images, too. Note: This doesn’t usually "
|
241 |
+
"improve page speed."
|
242 |
msgstr ""
|
243 |
|
244 |
#: lib/class-wp-smush-admin.php:227
|
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
|
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
|
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
|
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"
|
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
|
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 ""
|
459 |
|
460 |
+
#: lib/class-wp-smush-backup.php:98 lib/class-wp-smush-nextgen.php:468
|
461 |
msgid "Error in processing restore action, Fields empty."
|
462 |
msgstr ""
|
463 |
|
464 |
+
#: lib/class-wp-smush-backup.php:105 lib/class-wp-smush-nextgen.php:475
|
465 |
msgid "Image not restored, Nonce verification failed."
|
466 |
msgstr ""
|
467 |
|
468 |
+
#: lib/class-wp-smush-backup.php:182 lib/class-wp-smush-nextgen.php:550
|
469 |
msgid "Unable to restore image"
|
470 |
msgstr ""
|
471 |
|
486 |
msgstr ""
|
487 |
|
488 |
#: lib/class-wp-smush-dir.php:245
|
489 |
+
msgid ""
|
490 |
+
"In addition to smushing your media uploads, you may want to also smush "
|
491 |
+
"images living outside your uploads directory. Simply add any directories you "
|
492 |
+
"wish to smush and bulk smush away!"
|
493 |
msgstr ""
|
494 |
|
495 |
#: lib/class-wp-smush-dir.php:258 lib/class-wp-smush-ui.php:654
|
498 |
msgstr ""
|
499 |
|
500 |
#: lib/class-wp-smush-dir.php:261
|
501 |
+
#, php-format
|
502 |
+
msgid ""
|
503 |
+
"%s/%s image(s) were successfully smushed, however %s image(s) could not be "
|
504 |
+
"smushed due to an error."
|
505 |
msgstr ""
|
506 |
|
507 |
#: lib/class-wp-smush-dir.php:264
|
508 |
+
#, php-format
|
509 |
+
msgid ""
|
510 |
+
" %sUpgrade to pro%s to bulk smush all your directory images with one click. "
|
511 |
+
"Free users can smush 50 images with each click."
|
512 |
msgstr ""
|
513 |
|
514 |
#: lib/class-wp-smush-dir.php:268 lib/class-wp-smush-ui.php:90
|
537 |
msgstr ""
|
538 |
|
539 |
#: lib/class-wp-smush-dir.php:295
|
540 |
+
msgid ""
|
541 |
+
"Smush will also include any images in sub folders of your selected folder."
|
542 |
msgstr ""
|
543 |
|
544 |
#: lib/class-wp-smush-dir.php:298
|
549 |
msgid "Exclude directory from Smush List"
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: lib/class-wp-smush-dir.php:595
|
553 |
msgid "We could not find any images in the selected directory."
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: lib/class-wp-smush-dir.php:905
|
557 |
+
#, php-format
|
558 |
msgid "%d images"
|
559 |
msgstr ""
|
560 |
|
561 |
+
#: lib/class-wp-smush-dir.php:934
|
562 |
msgid "Waiting.."
|
563 |
msgstr ""
|
564 |
|
565 |
+
#: lib/class-wp-smush-dir.php:1048
|
566 |
msgid "Incorrect image id"
|
567 |
msgstr ""
|
568 |
|
569 |
+
#: lib/class-wp-smush-dir.php:1078
|
570 |
msgid "Could not find image id in last scanned images"
|
571 |
msgstr ""
|
572 |
|
573 |
+
#: lib/class-wp-smush-dir.php:1091
|
574 |
msgid "Image couldn't be optimised"
|
575 |
msgstr ""
|
576 |
|
577 |
+
#: lib/class-wp-smush-dir.php:1191
|
578 |
+
msgid ""
|
579 |
+
"We were unable to retrieve the image list from last scan, please continue "
|
580 |
+
"with a latest scan"
|
581 |
msgstr ""
|
582 |
|
583 |
#: lib/class-wp-smush-nextgen.php:326
|
584 |
+
msgid ""
|
585 |
+
"We couldn't find the metadata for the image, possibly the image has been "
|
586 |
+
"deleted."
|
587 |
msgstr ""
|
588 |
|
589 |
#: lib/class-wp-smush-nextgen.php:561
|
591 |
msgstr ""
|
592 |
|
593 |
#: lib/class-wp-smush-nextgen.php:585
|
594 |
+
#, php-format
|
595 |
msgid "Unable to smush image, %s"
|
596 |
msgstr ""
|
597 |
|
598 |
#: lib/class-wp-smush-share.php:25
|
599 |
+
#, php-format
|
600 |
+
msgid ""
|
601 |
+
"%s, you've smushed %d images and saved %s in total. Help your friends save "
|
602 |
+
"bandwidth easily, and help me in my quest to Smush the internet!"
|
603 |
msgstr ""
|
604 |
|
605 |
#: lib/class-wp-smush-share.php:26
|
606 |
+
#, php-format
|
607 |
+
msgid ""
|
608 |
+
"I saved %s on my site with WP Smush ( %s ) - wanna make your website smaller "
|
609 |
+
"and faster?"
|
610 |
msgstr ""
|
611 |
|
612 |
#: lib/class-wp-smush-share.php:34
|
634 |
msgstr ""
|
635 |
|
636 |
#: lib/class-wp-smush-ui.php:71
|
637 |
+
#, php-format
|
638 |
+
msgid ""
|
639 |
+
"You've just installed %3$s, the most popular image compression plugin for "
|
640 |
+
"WordPress! %1$sChoose your desired settings%2$s and get smushing!"
|
641 |
msgstr ""
|
642 |
|
643 |
#: lib/class-wp-smush-ui.php:85
|
644 |
+
#, php-format
|
645 |
msgid "Smush individual images via your %sMedia Library%s"
|
646 |
msgstr ""
|
647 |
|
655 |
|
656 |
#: lib/class-wp-smush-ui.php:122
|
657 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:502
|
658 |
+
msgid ""
|
659 |
+
"Lets you check if any images can be further optimised. Useful after changing "
|
660 |
+
"settings."
|
661 |
msgstr ""
|
662 |
|
663 |
#: lib/class-wp-smush-ui.php:122
|
671 |
msgstr ""
|
672 |
|
673 |
#: lib/class-wp-smush-ui.php:126
|
674 |
+
#, php-format
|
675 |
msgid "You've smushed %d images in total"
|
676 |
msgstr ""
|
677 |
|
691 |
msgstr ""
|
692 |
|
693 |
#: lib/class-wp-smush-ui.php:178 lib/class-wp-smush-ui.php:192
|
694 |
+
#, php-format
|
695 |
msgid "%sENABLE%s"
|
696 |
msgstr ""
|
697 |
|
704 |
msgstr ""
|
705 |
|
706 |
#: lib/class-wp-smush-ui.php:237
|
707 |
+
#, php-format
|
708 |
msgid "%sTRY PRO FREE%s"
|
709 |
msgstr ""
|
710 |
|
717 |
msgstr ""
|
718 |
|
719 |
#: lib/class-wp-smush-ui.php:284
|
720 |
+
#, php-format
|
721 |
msgid "%sTRY PRO FEATURES FREE%s"
|
722 |
msgstr ""
|
723 |
|
738 |
msgstr ""
|
739 |
|
740 |
#: lib/class-wp-smush-ui.php:486
|
741 |
+
#, php-format
|
742 |
+
msgid ""
|
743 |
+
"Currently, your largest thumbnail size is set at %s%dpx wide x %dpx high%s. "
|
744 |
+
"Anything above 2048px in width or height is huge and not recommended."
|
745 |
msgstr ""
|
746 |
|
747 |
#: lib/class-wp-smush-ui.php:487
|
748 |
+
msgid ""
|
749 |
+
"Just to let you know, the width you've entered is less than your largest "
|
750 |
+
"thumbnail and may result in pixelation."
|
751 |
msgstr ""
|
752 |
|
753 |
#: lib/class-wp-smush-ui.php:488
|
754 |
+
msgid ""
|
755 |
+
"Just to let you know, the height you’ve entered is less than your largest "
|
756 |
+
"thumbnail and may result in pixelation."
|
757 |
msgstr ""
|
758 |
|
759 |
#: lib/class-wp-smush-ui.php:617
|
766 |
msgstr ""
|
767 |
|
768 |
#: lib/class-wp-smush-ui.php:646
|
769 |
+
#, php-format
|
770 |
+
msgid ""
|
771 |
+
"We haven’t found any images in your %smedia library%s yet so there’s no "
|
772 |
+
"smushing to be done! Once you upload images, reload this page and start "
|
773 |
+
"playing!"
|
774 |
msgstr ""
|
775 |
|
776 |
#: lib/class-wp-smush-ui.php:649
|
785 |
|
786 |
#: lib/class-wp-smush-ui.php:678
|
787 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:446
|
788 |
+
#, php-format
|
789 |
msgid "%s, you have %s%s%d%s image%s that needs smushing!"
|
790 |
msgid_plural "%s, you have %s%s%d%s images%s that need smushing!"
|
791 |
msgstr[0] ""
|
792 |
msgstr[1] ""
|
793 |
|
794 |
#: lib/class-wp-smush-ui.php:680
|
795 |
+
#, php-format
|
796 |
msgid "%sUpgrade to Pro%s to bulk smush all your images with one click."
|
797 |
msgstr ""
|
798 |
|
801 |
msgstr ""
|
802 |
|
803 |
#: lib/class-wp-smush-ui.php:690
|
804 |
+
msgid ""
|
805 |
+
"Enable Super-smush in the Settings area to get even more savings with almost "
|
806 |
+
"no noticeable quality loss."
|
807 |
msgstr ""
|
808 |
|
809 |
#: lib/class-wp-smush-ui.php:713
|
810 |
+
#, php-format
|
811 |
+
msgid ""
|
812 |
+
"%sBulk smush is currently running.%s You need to keep this page open for the "
|
813 |
+
"process to complete."
|
814 |
msgstr ""
|
815 |
|
816 |
#: lib/class-wp-smush-ui.php:723
|
817 |
+
#, php-format
|
818 |
msgid "%s%d%s of %d attachments have been smushed."
|
819 |
msgstr ""
|
820 |
|
821 |
#: lib/class-wp-smush-ui.php:764
|
822 |
+
#, php-format
|
823 |
msgid "%s, you have %s%s%d%s image%s that needs re-compressing!"
|
824 |
msgid_plural "%s, you have %s%s%d%s images%s that need re-compressing!"
|
825 |
msgstr[0] ""
|
834 |
msgstr ""
|
835 |
|
836 |
#: lib/class-wp-smush-ui.php:819
|
837 |
+
#, php-format
|
838 |
+
msgid ""
|
839 |
+
"Automatic smushing is %senabled%s. Newly uploaded images will be "
|
840 |
+
"automagically compressed."
|
841 |
msgstr ""
|
842 |
|
843 |
#: lib/class-wp-smush-ui.php:819
|
844 |
+
#, php-format
|
845 |
+
msgid ""
|
846 |
+
"Automatic smushing is %sdisabled%s. Newly uploaded images will need to be "
|
847 |
+
"manually smushed."
|
848 |
msgstr ""
|
849 |
|
850 |
#: lib/class-wp-smush-ui.php:857
|
852 |
msgstr ""
|
853 |
|
854 |
#: lib/class-wp-smush-ui.php:858
|
855 |
+
msgid ""
|
856 |
+
"And hey, if you do, you can now try out Smush Pro for double the smushy "
|
857 |
+
"goodness (benchmarked), entirely for free!"
|
858 |
msgstr ""
|
859 |
|
860 |
#: lib/class-wp-smush-ui.php:859 lib/class-wp-smush-ui.php:863
|
862 |
msgstr ""
|
863 |
|
864 |
#: lib/class-wp-smush-ui.php:861
|
865 |
+
msgid ""
|
866 |
+
"Thanks for updating Smush. Did you know that you can now try the Smush Pro "
|
867 |
+
"for FREE?!"
|
868 |
msgstr ""
|
869 |
|
870 |
#: lib/class-wp-smush-ui.php:862
|
871 |
+
msgid ""
|
872 |
+
"Yep, Super Smush your images for double the savings, save originals and "
|
873 |
+
"batch Smush thousands of images all at once.... no charge!"
|
874 |
msgstr ""
|
875 |
|
876 |
#: lib/class-wp-smush-ui.php:911
|
877 |
+
#, php-format
|
878 |
+
msgid ""
|
879 |
+
"Did you know WP Smush Pro delivers up to 2x better compression, allows you "
|
880 |
+
"to smush your originals and removes any bulk smushing limits? – %sTry it "
|
881 |
+
"absolutely FREE%s"
|
882 |
msgstr ""
|
883 |
|
884 |
#: lib/class-wp-smush-ui.php:911
|
890 |
msgstr ""
|
891 |
|
892 |
#: lib/class-wp-smush-ui.php:936
|
893 |
+
#, php-format
|
894 |
+
msgid ""
|
895 |
+
"It looks like Smush couldn’t verify your WPMU DEV membership so Pro features "
|
896 |
+
"like Super-Smush may not work correctly. If you think this is an error, run "
|
897 |
+
"a %sre-check%s or get in touch with our %ssupport team%s."
|
898 |
msgstr ""
|
899 |
|
900 |
#: lib/class-wp-smush-ui.php:958
|
902 |
msgstr ""
|
903 |
|
904 |
#: lib/class-wp-smush-ui.php:988
|
905 |
+
msgid ""
|
906 |
+
"Smush settings were updated, performing a quick scan to check if any of the "
|
907 |
+
"images need to be Smushed again."
|
908 |
msgstr ""
|
909 |
|
910 |
+
#: lib/class-wp-smush.php:193
|
911 |
msgid "File path is empty"
|
912 |
msgstr ""
|
913 |
|
914 |
+
#: lib/class-wp-smush.php:196
|
915 |
+
#, php-format
|
916 |
msgid "Could not find %s"
|
917 |
msgstr ""
|
918 |
|
919 |
+
#: lib/class-wp-smush.php:199
|
920 |
+
#, php-format
|
921 |
msgid "%s is not writable"
|
922 |
msgstr ""
|
923 |
|
924 |
+
#: lib/class-wp-smush.php:209
|
925 |
+
#, php-format
|
926 |
msgid "Skipped (%s), image not found. Attachment: %s"
|
927 |
msgstr ""
|
928 |
|
929 |
+
#: lib/class-wp-smush.php:212
|
930 |
+
#, php-format
|
931 |
msgid "Skipped (%s), size limit exceeded. Attachment: %s"
|
932 |
msgstr ""
|
933 |
|
934 |
+
#: lib/class-wp-smush.php:230
|
935 |
msgid "Unknown API error"
|
936 |
msgstr ""
|
937 |
|
938 |
+
#: lib/class-wp-smush.php:696
|
939 |
+
#, php-format
|
940 |
msgid "Error posting to API: %s"
|
941 |
msgstr ""
|
942 |
|
943 |
+
#: lib/class-wp-smush.php:702
|
944 |
+
#, php-format
|
945 |
msgid "Error posting to API: %s %s"
|
946 |
msgstr ""
|
947 |
|
948 |
+
#: lib/class-wp-smush.php:719
|
949 |
msgid "Smush data corrupted, try again."
|
950 |
msgstr ""
|
951 |
|
952 |
+
#: lib/class-wp-smush.php:739
|
953 |
msgid "Image couldn't be smushed"
|
954 |
msgstr ""
|
955 |
|
956 |
+
#: lib/class-wp-smush.php:959 lib/class-wp-smush.php:963
|
957 |
#: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:193
|
958 |
#: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:196
|
959 |
msgid "Already Optimized"
|
960 |
msgstr ""
|
961 |
|
962 |
+
#: lib/class-wp-smush.php:972
|
963 |
+
#, php-format
|
964 |
msgid "%d images reduced "
|
965 |
msgstr ""
|
966 |
|
967 |
+
#: lib/class-wp-smush.php:972
|
968 |
msgid "Reduced "
|
969 |
msgstr ""
|
970 |
|
971 |
+
#: lib/class-wp-smush.php:976
|
972 |
+
#, php-format
|
973 |
msgid "by %s %s"
|
974 |
msgstr ""
|
975 |
|
976 |
+
#: lib/class-wp-smush.php:982
|
977 |
+
#, php-format
|
978 |
msgid "<br /> Image Size: %s"
|
979 |
msgstr ""
|
980 |
|
981 |
+
#: lib/class-wp-smush.php:1018
|
982 |
msgid "Detailed stats for all the image sizes"
|
983 |
msgstr ""
|
984 |
|
985 |
+
#: lib/class-wp-smush.php:1018
|
986 |
#: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:236
|
987 |
msgid "Smush stats"
|
988 |
msgstr ""
|
989 |
|
990 |
+
#: lib/class-wp-smush.php:1062
|
991 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:249
|
992 |
msgid "Not processed"
|
993 |
msgstr ""
|
994 |
|
995 |
+
#: lib/class-wp-smush.php:1376
|
996 |
+
#, php-format
|
997 |
+
msgid ""
|
998 |
+
"When you upload an image to WordPress it automatically creates %s thumbnail "
|
999 |
+
"sizes that are commonly used in your pages. WordPress also stores the "
|
1000 |
+
"original full-size image, but because these are not usually embedded on your "
|
1001 |
+
"site we don’t Smush them. Pro users can override this."
|
1002 |
msgstr ""
|
1003 |
|
1004 |
+
#: lib/class-wp-smush.php:1379
|
1005 |
+
msgid ""
|
1006 |
+
"Image couldn't be smushed as it exceeded the 1Mb size limit, Pro users can "
|
1007 |
+
"smush images with size upto 32Mb."
|
1008 |
msgstr ""
|
1009 |
|
1010 |
+
#: lib/class-wp-smush.php:1381
|
1011 |
msgid " Skipped"
|
1012 |
msgstr ""
|
1013 |
|
1014 |
+
#: lib/class-wp-smush.php:1403
|
1015 |
#: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:432
|
1016 |
msgid "Image size"
|
1017 |
msgstr ""
|
1018 |
|
1019 |
+
#: lib/class-wp-smush.php:1404
|
1020 |
#: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:433
|
1021 |
msgid "Savings"
|
1022 |
msgstr ""
|
1023 |
|
1024 |
+
#: lib/class-wp-smush.php:1611
|
1025 |
msgid "Restore original image."
|
1026 |
msgstr ""
|
1027 |
|
1028 |
+
#: lib/class-wp-smush.php:1611
|
1029 |
msgid "Restore image"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
+
#: lib/class-wp-smush.php:1659
|
1033 |
msgid "Smush image including original file."
|
1034 |
msgstr ""
|
1035 |
|
1036 |
+
#: lib/class-wp-smush.php:1659
|
1037 |
msgid "Resmush image"
|
1038 |
msgstr ""
|
1039 |
|
1042 |
msgstr ""
|
1043 |
|
1044 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:425
|
1045 |
+
#, php-format
|
1046 |
+
msgid ""
|
1047 |
+
"We haven’t found any images in your %sgallery%s yet, so there’s no smushing "
|
1048 |
+
"to be done! Once you upload images, reload this page and start playing!"
|
1049 |
msgstr ""
|
1050 |
|
1051 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:462
|
1052 |
+
#, php-format
|
1053 |
+
msgid ""
|
1054 |
+
"Enable Super-smush in the %sSettings%s area to get even more savings with "
|
1055 |
+
"almost no noticeable quality loss."
|
1056 |
msgstr ""
|
1057 |
|
1058 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:477
|
1059 |
+
#, php-format
|
1060 |
msgid "Smush individual images via your %sManage Galleries%s section"
|
1061 |
msgstr ""
|
1062 |
|
1065 |
msgstr ""
|
1066 |
|
1067 |
#: lib/nextgen-integration/class-wp-smush-nextgen-admin.php:561
|
1068 |
+
#, php-format
|
1069 |
msgid "%sDISABLED%s"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
#: lib/nextgen-integration/class-wp-smush-nextgen-bulk.php:31
|
1073 |
+
msgid ""
|
1074 |
+
"Smush request timed out, You can try setting a higher value ( > 60 ) for "
|
1075 |
+
"`WP_SMUSH_API_TIMEOUT`."
|
1076 |
msgstr ""
|
1077 |
|
1078 |
#: lib/nextgen-integration/class-wp-smush-nextgen-stats.php:205
|
1079 |
+
#, php-format
|
1080 |
msgid "Reduced by %s ( %01.1f%% )"
|
1081 |
msgstr ""
|
1082 |
|
1087 |
#: wp-smush.php:200
|
1088 |
msgid "WP Smush Free was deactivated. You have WP Smush Pro active!"
|
1089 |
msgstr ""
|
|
|
|
|
|
|
1090 |
|
1091 |
#. Plugin URI of the plugin/theme
|
1092 |
msgid "http://wordpress.org/extend/plugins/wp-smushit/"
|
1093 |
msgstr ""
|
1094 |
|
1095 |
#. Description of the plugin/theme
|
1096 |
+
msgid ""
|
1097 |
+
"Reduce image file sizes, improve performance and boost your SEO using the "
|
1098 |
+
"free <a href=\"https://premium.wpmudev.org/\">WPMU DEV</a> WordPress Smush "
|
1099 |
+
"API."
|
1100 |
msgstr ""
|
1101 |
|
1102 |
#. Author of the plugin/theme
|
lib/class-wp-smush-admin.php
CHANGED
@@ -229,7 +229,7 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
|
|
229 |
),
|
230 |
'png_to_jpg' => array(
|
231 |
'label' => esc_html__( 'Convert PNG to JPEG (lossy)', 'wp-smushit' ),
|
232 |
-
'desc' => sprintf( esc_html__( "When you compress a PNG file, Smush will check if converting the file to JPEG will further reduce its size. %s Note: PNGs with transparency will be ignored and Smush will only convert the file format if it results in a smaller file size. This will change the file’s name and extension, and any hard-coded URLs will need to be updated
|
233 |
)
|
234 |
);
|
235 |
|
@@ -566,9 +566,16 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
|
|
566 |
*/
|
567 |
if ( ! apply_filters( 'wp_smush_image', true, $attachment_id ) ) {
|
568 |
$send_error = true;
|
569 |
-
$error = esc_html__( "Attachment $attachment_id was skipped.", "wp-smushit" );
|
570 |
}
|
571 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
572 |
if ( ! $send_error ) {
|
573 |
//Proceed only if Smushing Transient is not set for the given attachment id
|
574 |
if ( ! get_transient( 'smush-in-progress-' . $attachment_id ) ) {
|
@@ -629,6 +636,7 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
|
|
629 |
$this->update_resmush_list( $attachment_id );
|
630 |
}
|
631 |
}
|
|
|
632 |
$resmush_count = empty( $this->resmush_ids ) ? count( $this->resmush_ids = get_option( "wp-smush-resmush-list" ) ) : count( $this->resmush_ids );
|
633 |
|
634 |
$stats['smushed'] = ! empty( $this->resmush_ids ) ? $this->smushed_count - $resmush_count : $this->smushed_count;
|
@@ -639,8 +647,19 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
|
|
639 |
|
640 |
$stats['tooltip_text'] = ! empty( $stats['total_images'] ) ? sprintf( __( "You've smushed %d images in total.", "wp-smushit" ), $stats['total_images'] ) : '';
|
641 |
|
|
|
|
|
|
|
|
|
|
|
|
|
642 |
//Wrap the error message in div
|
643 |
-
$error = !empty( $error ) ? '<p class="wp-smush-error-message">'
|
|
|
|
|
|
|
|
|
|
|
644 |
|
645 |
//Send ajax response
|
646 |
$send_error ? wp_send_json_error( array(
|
@@ -682,8 +701,9 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
|
|
682 |
*
|
683 |
*/
|
684 |
if ( ! apply_filters( 'wp_smush_image', true, $attachemnt_id ) ) {
|
|
|
685 |
wp_send_json_error( array(
|
686 |
-
'error_msg' => '<p class="wp-smush-error-message">'
|
687 |
'show_warning' => intval( $this->show_warning() )
|
688 |
) );
|
689 |
}
|
@@ -720,7 +740,17 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
|
|
720 |
|
721 |
$attachment_id = absint( (int) ( $attachment_id ) );
|
722 |
|
723 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
724 |
|
725 |
//Send image for resizing, if enabled resize first before any other operation
|
726 |
$updated_meta = $this->resize_image( $attachment_id, $original_meta );
|
@@ -730,15 +760,16 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
|
|
730 |
|
731 |
$original_meta = ! empty( $updated_meta ) ? $updated_meta : $original_meta;
|
732 |
|
733 |
-
//Update the details, as soon as we are done with resizing
|
734 |
-
wp_update_attachment_metadata( $attachment_id, $original_meta );
|
735 |
-
|
736 |
//Smush the image
|
737 |
$smush = $WpSmush->resize_from_meta_data( $original_meta, $attachment_id );
|
738 |
|
|
|
|
|
|
|
739 |
//Get the button status
|
740 |
$status = $WpSmush->set_status( $attachment_id, false, true );
|
741 |
|
|
|
742 |
delete_transient( 'smush-in-progress-' . $attachment_id );
|
743 |
|
744 |
//Send Json response if we are not suppose to return the results
|
@@ -765,6 +796,7 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
|
|
765 |
* Check bulk sent count, whether to allow further smushing or not
|
766 |
*
|
767 |
* @param bool $reset To hard reset the transient
|
|
|
768 |
* @param string $key Transient Key - bulk_sent_count/dir_sent_count
|
769 |
*
|
770 |
* @return bool
|
@@ -773,38 +805,50 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
|
|
773 |
|
774 |
$transient_name = WP_SMUSH_PREFIX . $key;
|
775 |
|
776 |
-
|
777 |
-
if ( ! $reset ) {
|
778 |
-
$bulk_sent_count = get_transient( $transient_name );
|
779 |
|
780 |
-
|
781 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
782 |
|
783 |
-
|
784 |
-
|
|
|
|
|
785 |
|
786 |
-
|
|
|
787 |
|
788 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
789 |
|
790 |
-
|
791 |
-
set_transient( $transient_name, $bulk_sent_count + 1, 200 );
|
792 |
|
793 |
-
|
794 |
|
795 |
-
|
|
|
796 |
|
797 |
-
|
|
|
798 |
|
799 |
-
|
800 |
-
}
|
801 |
|
802 |
-
|
803 |
-
|
804 |
-
//clear it and return false to stop the process
|
805 |
-
set_transient( $transient_name, 0, 60 );
|
806 |
|
807 |
-
return false;
|
808 |
}
|
809 |
}
|
810 |
|
@@ -2080,8 +2124,29 @@ if ( ! class_exists( 'WpSmushitAdmin' ) ) {
|
|
2080 |
$wpsmush_settings->update_setting( WP_SMUSH_PREFIX . 'last_settings', $c_settings );
|
2081 |
}
|
2082 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2083 |
}
|
2084 |
|
2085 |
global $wpsmushit_admin;
|
2086 |
$wpsmushit_admin = new WpSmushitAdmin();
|
2087 |
-
}
|
229 |
),
|
230 |
'png_to_jpg' => array(
|
231 |
'label' => esc_html__( 'Convert PNG to JPEG (lossy)', 'wp-smushit' ),
|
232 |
+
'desc' => sprintf( esc_html__( "When you compress a PNG file, Smush will check if converting the file to JPEG will further reduce its size. %s Note: PNGs with transparency will be ignored and Smush will only convert the file format if it results in a smaller file size. This will change the file’s name and extension, and any hard-coded URLs will need to be updated.%s", 'wp-smushit' ), "<br /><strong>", "</strong>" )
|
233 |
)
|
234 |
);
|
235 |
|
566 |
*/
|
567 |
if ( ! apply_filters( 'wp_smush_image', true, $attachment_id ) ) {
|
568 |
$send_error = true;
|
569 |
+
$error = $this->filter_error( esc_html__( "Attachment $attachment_id was skipped.", "wp-smushit" ), $attachment_id );
|
570 |
}
|
571 |
|
572 |
+
//Get the file path for backup
|
573 |
+
$attachment_file_path = get_attached_file( $attachment_id );
|
574 |
+
|
575 |
+
//Take Backup
|
576 |
+
global $wpsmush_backup;
|
577 |
+
$wpsmush_backup->create_backup( $attachment_file_path );
|
578 |
+
|
579 |
if ( ! $send_error ) {
|
580 |
//Proceed only if Smushing Transient is not set for the given attachment id
|
581 |
if ( ! get_transient( 'smush-in-progress-' . $attachment_id ) ) {
|
636 |
$this->update_resmush_list( $attachment_id );
|
637 |
}
|
638 |
}
|
639 |
+
|
640 |
$resmush_count = empty( $this->resmush_ids ) ? count( $this->resmush_ids = get_option( "wp-smush-resmush-list" ) ) : count( $this->resmush_ids );
|
641 |
|
642 |
$stats['smushed'] = ! empty( $this->resmush_ids ) ? $this->smushed_count - $resmush_count : $this->smushed_count;
|
647 |
|
648 |
$stats['tooltip_text'] = ! empty( $stats['total_images'] ) ? sprintf( __( "You've smushed %d images in total.", "wp-smushit" ), $stats['total_images'] ) : '';
|
649 |
|
650 |
+
/**
|
651 |
+
* Used internally to modify the error message
|
652 |
+
*
|
653 |
+
*/
|
654 |
+
$error = $this->filter_error( $error, $attachment_id );
|
655 |
+
|
656 |
//Wrap the error message in div
|
657 |
+
$error = !empty( $error ) ? sprintf( '<p class="wp-smush-error-message">%s</p>', $error ) : $error;
|
658 |
+
|
659 |
+
if ( ! $send_error ) {
|
660 |
+
//Update the bulk Limit count
|
661 |
+
$this->update_smush_count();
|
662 |
+
}
|
663 |
|
664 |
//Send ajax response
|
665 |
$send_error ? wp_send_json_error( array(
|
701 |
*
|
702 |
*/
|
703 |
if ( ! apply_filters( 'wp_smush_image', true, $attachemnt_id ) ) {
|
704 |
+
$error = $this->filter_error( esc_html__( "Attachment Skipped - Check `wp_smush_image` filter.", "wp-smushit" ), $attachemnt_id );
|
705 |
wp_send_json_error( array(
|
706 |
+
'error_msg' => sprintf( '<p class="wp-smush-error-message">%s</p>', $error ),
|
707 |
'show_warning' => intval( $this->show_warning() )
|
708 |
) );
|
709 |
}
|
740 |
|
741 |
$attachment_id = absint( (int) ( $attachment_id ) );
|
742 |
|
743 |
+
//Get the file path for backup
|
744 |
+
$attachment_file_path = get_attached_file( $attachment_id );
|
745 |
+
|
746 |
+
//Take Backup
|
747 |
+
global $wpsmush_backup;
|
748 |
+
$wpsmush_backup->create_backup( $attachment_file_path );
|
749 |
+
|
750 |
+
//Get the image metadata from $_POST
|
751 |
+
$original_meta = !empty( $_POST['metadata'] ) ? $_POST['metadata'] : '';
|
752 |
+
|
753 |
+
$original_meta = empty( $original_meta ) ? wp_get_attachment_metadata( $attachment_id ) : $original_meta;
|
754 |
|
755 |
//Send image for resizing, if enabled resize first before any other operation
|
756 |
$updated_meta = $this->resize_image( $attachment_id, $original_meta );
|
760 |
|
761 |
$original_meta = ! empty( $updated_meta ) ? $updated_meta : $original_meta;
|
762 |
|
|
|
|
|
|
|
763 |
//Smush the image
|
764 |
$smush = $WpSmush->resize_from_meta_data( $original_meta, $attachment_id );
|
765 |
|
766 |
+
//Update the details, after smushing, so that latest image is used in hook
|
767 |
+
wp_update_attachment_metadata( $attachment_id, $original_meta );
|
768 |
+
|
769 |
//Get the button status
|
770 |
$status = $WpSmush->set_status( $attachment_id, false, true );
|
771 |
|
772 |
+
//Delete the transient after attachment meta is updated
|
773 |
delete_transient( 'smush-in-progress-' . $attachment_id );
|
774 |
|
775 |
//Send Json response if we are not suppose to return the results
|
796 |
* Check bulk sent count, whether to allow further smushing or not
|
797 |
*
|
798 |
* @param bool $reset To hard reset the transient
|
799 |
+
*
|
800 |
* @param string $key Transient Key - bulk_sent_count/dir_sent_count
|
801 |
*
|
802 |
* @return bool
|
805 |
|
806 |
$transient_name = WP_SMUSH_PREFIX . $key;
|
807 |
|
808 |
+
$bulk_sent_count = get_transient( $transient_name );
|
|
|
|
|
809 |
|
810 |
+
//Check if bulk smush limit is less than limit
|
811 |
+
if ( ! $bulk_sent_count || $bulk_sent_count < $this->max_free_bulk ) {
|
812 |
+
$continue = true;
|
813 |
+
} elseif ( $bulk_sent_count == $this->max_free_bulk ) {
|
814 |
+
//If user has reached the limit, reset the transient
|
815 |
+
$continue = false;
|
816 |
+
$reset = true;
|
817 |
+
} else {
|
818 |
+
$continue = false;
|
819 |
+
}
|
820 |
|
821 |
+
//If we need to reset the transient
|
822 |
+
if ( $reset ) {
|
823 |
+
set_transient( $transient_name, 0, 60 );
|
824 |
+
}
|
825 |
|
826 |
+
return $continue;
|
827 |
+
}
|
828 |
|
829 |
+
/**
|
830 |
+
* Update the image smushed count in transient
|
831 |
+
*
|
832 |
+
* @param string $key
|
833 |
+
*
|
834 |
+
*/
|
835 |
+
function update_smush_count( $key = 'bulk_sent_count' ) {
|
836 |
|
837 |
+
$transient_name = WP_SMUSH_PREFIX . $key;
|
|
|
838 |
|
839 |
+
$bulk_sent_count = get_transient( $transient_name );
|
840 |
|
841 |
+
//If bulk sent count is not set
|
842 |
+
if ( false === $bulk_sent_count ) {
|
843 |
|
844 |
+
//start transient at 0
|
845 |
+
set_transient( $transient_name, 1, 200 );
|
846 |
|
847 |
+
} else if ( $bulk_sent_count < $this->max_free_bulk ) {
|
|
|
848 |
|
849 |
+
//If lte $this->max_free_bulk images are sent, increment
|
850 |
+
set_transient( $transient_name, $bulk_sent_count + 1, 200 );
|
|
|
|
|
851 |
|
|
|
852 |
}
|
853 |
}
|
854 |
|
2124 |
$wpsmush_settings->update_setting( WP_SMUSH_PREFIX . 'last_settings', $c_settings );
|
2125 |
}
|
2126 |
|
2127 |
+
/**
|
2128 |
+
* Allows to filter the error message sent to the user
|
2129 |
+
*
|
2130 |
+
* @param string $error
|
2131 |
+
* @param string $attachment_id
|
2132 |
+
*
|
2133 |
+
* @return mixed|null|string|void
|
2134 |
+
*/
|
2135 |
+
function filter_error( $error = '', $attachment_id = '' ) {
|
2136 |
+
if ( empty( $error ) ) {
|
2137 |
+
return null;
|
2138 |
+
}
|
2139 |
+
/**
|
2140 |
+
* Used internally to modify the error message
|
2141 |
+
*
|
2142 |
+
*/
|
2143 |
+
$error = apply_filters( 'wp_smush_error', $error, $attachment_id );
|
2144 |
+
|
2145 |
+
return $error;
|
2146 |
+
}
|
2147 |
+
|
2148 |
}
|
2149 |
|
2150 |
global $wpsmushit_admin;
|
2151 |
$wpsmushit_admin = new WpSmushitAdmin();
|
2152 |
+
}
|
lib/class-wp-smush-backup.php
CHANGED
@@ -35,6 +35,16 @@ if ( ! class_exists( 'WpSmushBackup' ) ) {
|
|
35 |
$this->backup_enabled = $wpsmush_settings->get_setting( WP_SMUSH_PREFIX . 'backup' );
|
36 |
}
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
function create_backup( $file_path = '', $backup_path = '' ) {
|
39 |
global $WpSmush, $wpsmush_pngjpg;
|
40 |
|
@@ -63,7 +73,7 @@ if ( ! class_exists( 'WpSmushBackup' ) ) {
|
|
63 |
}
|
64 |
|
65 |
//Check for backup from other plugins, like nextgen, if it doesn't exists, create our own
|
66 |
-
if ( ! file_exists( $
|
67 |
@copy( $file_path, $backup_path );
|
68 |
}
|
69 |
|
@@ -72,6 +82,10 @@ if ( ! class_exists( 'WpSmushBackup' ) ) {
|
|
72 |
/**
|
73 |
* Restore the image and its sizes from backup
|
74 |
*
|
|
|
|
|
|
|
|
|
75 |
*/
|
76 |
function restore_image( $attachment = '', $resp = true ) {
|
77 |
global $WpSmush;
|
@@ -93,8 +107,8 @@ if ( ! class_exists( 'WpSmushBackup' ) ) {
|
|
93 |
}
|
94 |
}
|
95 |
|
96 |
-
//Store the restore success/failure for
|
97 |
-
$restored =
|
98 |
|
99 |
//Process Now
|
100 |
$image_id = empty( $attachment ) ? absint( (int) $_POST['attachment_id'] ) : $attachment;
|
@@ -116,52 +130,35 @@ if ( ! class_exists( 'WpSmushBackup' ) ) {
|
|
116 |
|
117 |
if ( !empty( $original_file) && file_exists( $original_file_path ) ) {
|
118 |
//restore PNG full size and all other image sizes
|
119 |
-
$restored
|
120 |
-
$restore_png = true;
|
121 |
} elseif ( file_exists( $backup_name ) ) {
|
122 |
//If file exists, corresponding to our backup path
|
123 |
//Restore
|
124 |
-
$restored
|
125 |
|
126 |
//Delete the backup
|
127 |
@unlink( $backup_name );
|
128 |
} elseif ( file_exists( $file_path . '_backup' ) ) {
|
129 |
//Restore from other backups
|
130 |
-
$restored
|
131 |
}
|
132 |
|
133 |
-
//
|
134 |
-
|
135 |
-
$attachment_data = wp_get_attachment_metadata( $image_id );
|
136 |
-
|
137 |
-
//Get the sizes
|
138 |
-
$sizes = ! empty( $attachment_data['sizes'] ) ? $attachment_data['sizes'] : '';
|
139 |
|
140 |
-
//
|
141 |
-
|
142 |
-
//Get the file path
|
143 |
-
if ( empty( $size['file'] ) ) {
|
144 |
-
continue;
|
145 |
-
}
|
146 |
|
147 |
-
|
148 |
-
|
149 |
-
$image_bckup_path = $WpSmush->get_image_backup_path( $image_size_path );
|
150 |
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
} elseif ( file_exists( $image_bckup_path ) ) {
|
155 |
-
$restored[] = @copy( $image_bckup_path, $image_size_path );
|
156 |
-
//Delete the backup
|
157 |
-
@unlink( $image_bckup_path );
|
158 |
-
} elseif ( file_exists( $image_size_path . '_backup' ) ) {
|
159 |
-
$restored[] = @copy( $image_size_path . '_backup', $image_size_path );
|
160 |
-
}
|
161 |
}
|
162 |
|
163 |
//If any of the image is restored, we count it as success
|
164 |
-
if (
|
165 |
|
166 |
//Remove the Meta, And send json success
|
167 |
delete_post_meta( $image_id, $WpSmush->smushed_meta_key );
|
@@ -189,7 +186,15 @@ if ( ! class_exists( 'WpSmushBackup' ) ) {
|
|
189 |
}
|
190 |
|
191 |
|
192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
|
194 |
global $WpSmush, $wpsmush_pngjpg;
|
195 |
|
@@ -213,42 +218,25 @@ if ( ! class_exists( 'WpSmushBackup' ) ) {
|
|
213 |
$original_file = get_post_meta( $image_id, WP_SMUSH_PREFIX . 'original_file', true );
|
214 |
}
|
215 |
$original_file_path = $WpSmush->original_file( $original_file );
|
216 |
-
if (
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
@unlink( $file_path );
|
223 |
-
}
|
224 |
-
/**
|
225 |
-
* Perform a action after the image URL is updated in post content
|
226 |
-
*/
|
227 |
-
do_action( 'wp_smush_image_url_updated', $image_id, $file_path, $original_file, $size );
|
228 |
}
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
* 4. And done!
|
236 |
-
* 5. Add a action after updating the URLs, that'd allow the users to perform a additional search, replace action
|
237 |
-
**/
|
238 |
-
//Get the file path for the specific size
|
239 |
-
$n_file = dirname( $original_file_path ) . '/' . basename( $file_path );
|
240 |
-
$n_file_path = pathinfo( $n_file, PATHINFO_FILENAME ) . '.png';
|
241 |
-
if ( file_exists( $n_file ) ) {
|
242 |
-
//Update the path details in meta and attached file, replace the image
|
243 |
-
$meta = $wpsmush_pngjpg->update_image_path( $image_id, $file_path, $n_file_path, $meta, $size, 'restore' );
|
244 |
-
if ( ! empty( $meta['sizes'] ) && ! empty( $meta['sizes'][ $size ] ) && ! empty( $meta['sizes'][ $size ]['file'] ) && $n_file_path != $meta['sizes'][ $size ]['file'] ) {
|
245 |
-
@unlink( $file_path );
|
246 |
-
}
|
247 |
-
/**
|
248 |
-
* Perform a action after the image URL is updated in post content
|
249 |
-
*/
|
250 |
-
do_action( 'wp_smush_image_url_updated', $image_id, $file_path, $n_file, $size );
|
251 |
}
|
|
|
|
|
|
|
|
|
|
|
252 |
}
|
253 |
//Update Meta
|
254 |
if ( ! empty( $meta ) ) {
|
35 |
$this->backup_enabled = $wpsmush_settings->get_setting( WP_SMUSH_PREFIX . 'backup' );
|
36 |
}
|
37 |
|
38 |
+
/**
|
39 |
+
* Creates a backup of file for the given attachment path
|
40 |
+
*
|
41 |
+
* Checks if there is a existing backup, else create one
|
42 |
+
*
|
43 |
+
* @param string $file_path
|
44 |
+
* @param string $backup_path
|
45 |
+
*
|
46 |
+
* @return string
|
47 |
+
*/
|
48 |
function create_backup( $file_path = '', $backup_path = '' ) {
|
49 |
global $WpSmush, $wpsmush_pngjpg;
|
50 |
|
73 |
}
|
74 |
|
75 |
//Check for backup from other plugins, like nextgen, if it doesn't exists, create our own
|
76 |
+
if ( ! file_exists( $backup_path ) ) {
|
77 |
@copy( $file_path, $backup_path );
|
78 |
}
|
79 |
|
82 |
/**
|
83 |
* Restore the image and its sizes from backup
|
84 |
*
|
85 |
+
* @param string $attachment
|
86 |
+
* @param bool $resp
|
87 |
+
*
|
88 |
+
* @return bool
|
89 |
*/
|
90 |
function restore_image( $attachment = '', $resp = true ) {
|
91 |
global $WpSmush;
|
107 |
}
|
108 |
}
|
109 |
|
110 |
+
//Store the restore success/failure for Full size image
|
111 |
+
$restored = false;
|
112 |
|
113 |
//Process Now
|
114 |
$image_id = empty( $attachment ) ? absint( (int) $_POST['attachment_id'] ) : $attachment;
|
130 |
|
131 |
if ( !empty( $original_file) && file_exists( $original_file_path ) ) {
|
132 |
//restore PNG full size and all other image sizes
|
133 |
+
$restored = $this->restore_png( $image_id, $original_file, $file_path );
|
|
|
134 |
} elseif ( file_exists( $backup_name ) ) {
|
135 |
//If file exists, corresponding to our backup path
|
136 |
//Restore
|
137 |
+
$restored = @copy( $backup_name, $file_path );
|
138 |
|
139 |
//Delete the backup
|
140 |
@unlink( $backup_name );
|
141 |
} elseif ( file_exists( $file_path . '_backup' ) ) {
|
142 |
//Restore from other backups
|
143 |
+
$restored = @copy( $file_path . '_backup', $file_path );
|
144 |
}
|
145 |
|
146 |
+
//Set a transient to avoid the smush-restore-smush loop
|
147 |
+
set_transient("wp-smush-restore-$image_id", true, 90 );
|
|
|
|
|
|
|
|
|
148 |
|
149 |
+
//Generate all other image size, and update attachment metadata
|
150 |
+
$metadata = wp_generate_attachment_metadata( $image_id, $file_path );
|
|
|
|
|
|
|
|
|
151 |
|
152 |
+
//Remove the transient
|
153 |
+
delete_transient( "wp-smush-restore-$image_id");
|
|
|
154 |
|
155 |
+
//Update metadata to db if it was successfully generated
|
156 |
+
if ( ! empty( $metadata ) && ! is_wp_error( $metadata ) ) {
|
157 |
+
wp_update_attachment_metadata( $image_id, $metadata );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
}
|
159 |
|
160 |
//If any of the image is restored, we count it as success
|
161 |
+
if ( $restored ) {
|
162 |
|
163 |
//Remove the Meta, And send json success
|
164 |
delete_post_meta( $image_id, $WpSmush->smushed_meta_key );
|
186 |
}
|
187 |
|
188 |
|
189 |
+
/**
|
190 |
+
*
|
191 |
+
* @param string $image_id
|
192 |
+
* @param string $original_file
|
193 |
+
* @param string $file_path
|
194 |
+
*
|
195 |
+
* @return bool
|
196 |
+
*/
|
197 |
+
function restore_png( $image_id = '', $original_file = '', $file_path = '' ) {
|
198 |
|
199 |
global $WpSmush, $wpsmush_pngjpg;
|
200 |
|
218 |
$original_file = get_post_meta( $image_id, WP_SMUSH_PREFIX . 'original_file', true );
|
219 |
}
|
220 |
$original_file_path = $WpSmush->original_file( $original_file );
|
221 |
+
if ( file_exists( $original_file_path ) ) {
|
222 |
+
//Update the path details in meta and attached file, replace the image
|
223 |
+
$meta = $wpsmush_pngjpg->update_image_path( $image_id, $file_path, $original_file_path, $meta, $size, 'restore' );
|
224 |
+
//@todo: Add a check in meta if file was updated or not, before unlinking jpg
|
225 |
+
if ( ! empty( $meta['file'] ) && $original_file == $meta['file'] ) {
|
226 |
+
@unlink( $file_path );
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
}
|
228 |
+
//Generate all other image size, and update attachment metadata
|
229 |
+
$metadata = wp_generate_attachment_metadata( $image_id, $original_file_path );
|
230 |
+
|
231 |
+
//Update metadata to db if it was successfully generated
|
232 |
+
if ( ! empty( $metadata ) && ! is_wp_error( $metadata ) ) {
|
233 |
+
wp_update_attachment_metadata( $image_id, $metadata );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Perform a action after the image URL is updated in post content
|
238 |
+
*/
|
239 |
+
do_action( 'wp_smush_image_url_updated', $image_id, $file_path, $original_file, $size );
|
240 |
}
|
241 |
//Update Meta
|
242 |
if ( ! empty( $meta ) ) {
|
lib/class-wp-smush-dir.php
CHANGED
@@ -478,7 +478,7 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
|
|
478 |
$base_dir = realpath( $base_dir );
|
479 |
|
480 |
//Store the path in option
|
481 |
-
update_option( '
|
482 |
|
483 |
//Directory Iterator, Exclude . and ..
|
484 |
$dirIterator = new RecursiveDirectoryIterator(
|
@@ -499,6 +499,7 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
|
|
499 |
$images = array();
|
500 |
$count = 0;
|
501 |
$timestamp = gmdate( 'Y-m-d H:i:s' );
|
|
|
502 |
foreach ( $iterator as $path ) {
|
503 |
|
504 |
//Used in place of Skip Dots, For php 5.2 compatability
|
@@ -509,7 +510,7 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
|
|
509 |
$file_path = $path->getPathname();
|
510 |
$file_name = $path->getFilename();
|
511 |
|
512 |
-
if ( $this->is_image( $file_path ) && ! $this->is_media_library_file( $file_path ) ) {
|
513 |
|
514 |
/** To generate Markup **/
|
515 |
$dir_name = dirname( $file_path );
|
@@ -524,27 +525,30 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
|
|
524 |
//Get the file modification time
|
525 |
$file_time = @filectime( $file_path );
|
526 |
|
527 |
-
/** To be stored in DB, Part of code
|
528 |
$image_size = $path->getSize();
|
529 |
-
$images[]
|
|
|
|
|
|
|
|
|
530 |
$count ++;
|
531 |
}
|
532 |
}
|
|
|
533 |
//Store the Images in db at an interval of 5k
|
534 |
if ( $count >= 5000 ) {
|
535 |
$count = 0;
|
536 |
-
$query =
|
537 |
-
$
|
538 |
-
$wpdb->query( $sql );
|
539 |
$images = array();
|
540 |
}
|
541 |
}
|
542 |
|
543 |
//Update rest of the images
|
544 |
if ( ! empty( $images ) && $count > 0 ) {
|
545 |
-
$query =
|
546 |
-
$
|
547 |
-
$wpdb->query( $sql );
|
548 |
}
|
549 |
|
550 |
//remove scanne dimages from cache
|
@@ -559,6 +563,31 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
|
|
559 |
return array( 'files_arr' => $files_arr, 'base_dir' => $base_dir, 'image_items' => $images );
|
560 |
}
|
561 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
562 |
/**
|
563 |
* Sends a Ajax response if no images are found in selected directory
|
564 |
*/
|
@@ -586,9 +615,6 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
|
|
586 |
wp_send_json_error( "Empth Directory Path" );
|
587 |
}
|
588 |
|
589 |
-
//Remove the transient
|
590 |
-
delete_transient( 'wp_smush_dir_curr_id' );
|
591 |
-
|
592 |
//Get the File list
|
593 |
$files = $this->get_image_list( $_GET['smush_path'] );
|
594 |
|
@@ -608,6 +634,8 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
|
|
608 |
/**
|
609 |
* Check whether the given path is a image or not
|
610 |
*
|
|
|
|
|
611 |
* @param $path
|
612 |
*
|
613 |
* @return bool
|
@@ -954,7 +982,7 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
|
|
954 |
|
955 |
//Get the savings in bytes and percent
|
956 |
if ( ! empty( $this->stats ) ) {
|
957 |
-
$this->stats['bytes'] = $this->stats['orig_size'] - $this->stats['image_size'];
|
958 |
$this->stats['percent'] = number_format_i18n( ( ( $this->stats['bytes'] / $this->stats['orig_size'] ) * 100 ), 1 );
|
959 |
//Convert to human readable form
|
960 |
$this->stats['human'] = size_format( $this->stats['bytes'], 1 );
|
@@ -1111,6 +1139,10 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
|
|
1111 |
'total' => $total,
|
1112 |
'latest_scan' => $last_scan
|
1113 |
);
|
|
|
|
|
|
|
|
|
1114 |
wp_send_json_success( $data );
|
1115 |
}
|
1116 |
|
@@ -1152,7 +1184,7 @@ if ( ! class_exists( 'WpSmushDir' ) ) {
|
|
1152 |
*
|
1153 |
*/
|
1154 |
function resume_scan() {
|
1155 |
-
$dir_path = get_option( '
|
1156 |
|
1157 |
//If we don't get an error path, return an error message
|
1158 |
if ( empty( $dir_path ) ) {
|
478 |
$base_dir = realpath( $base_dir );
|
479 |
|
480 |
//Store the path in option
|
481 |
+
update_option( 'wp-smush-dir_path', $base_dir );
|
482 |
|
483 |
//Directory Iterator, Exclude . and ..
|
484 |
$dirIterator = new RecursiveDirectoryIterator(
|
499 |
$images = array();
|
500 |
$count = 0;
|
501 |
$timestamp = gmdate( 'Y-m-d H:i:s' );
|
502 |
+
$values = array();
|
503 |
foreach ( $iterator as $path ) {
|
504 |
|
505 |
//Used in place of Skip Dots, For php 5.2 compatability
|
510 |
$file_path = $path->getPathname();
|
511 |
$file_name = $path->getFilename();
|
512 |
|
513 |
+
if ( $this->is_image( $file_path ) && ! $this->is_media_library_file( $file_path ) && strpos( $path, '.bak' ) === false ) {
|
514 |
|
515 |
/** To generate Markup **/
|
516 |
$dir_name = dirname( $file_path );
|
525 |
//Get the file modification time
|
526 |
$file_time = @filectime( $file_path );
|
527 |
|
528 |
+
/** To be stored in DB, Part of code inspired from Ewwww Optimiser */
|
529 |
$image_size = $path->getSize();
|
530 |
+
$images [] = $file_path;
|
531 |
+
$images [] = $image_size;
|
532 |
+
$images [] = $file_time;
|
533 |
+
$images [] = $timestamp;
|
534 |
+
$values[] = '(%s, %d, %d, %s)';
|
535 |
$count ++;
|
536 |
}
|
537 |
}
|
538 |
+
|
539 |
//Store the Images in db at an interval of 5k
|
540 |
if ( $count >= 5000 ) {
|
541 |
$count = 0;
|
542 |
+
$query = $this->build_query( $values, $images );
|
543 |
+
$wpdb->query( $query );
|
|
|
544 |
$images = array();
|
545 |
}
|
546 |
}
|
547 |
|
548 |
//Update rest of the images
|
549 |
if ( ! empty( $images ) && $count > 0 ) {
|
550 |
+
$query = $this->build_query( $values, $images );
|
551 |
+
$wpdb->query( $query );
|
|
|
552 |
}
|
553 |
|
554 |
//remove scanne dimages from cache
|
563 |
return array( 'files_arr' => $files_arr, 'base_dir' => $base_dir, 'image_items' => $images );
|
564 |
}
|
565 |
|
566 |
+
/**
|
567 |
+
* Build and prepare query from the given values and image array
|
568 |
+
*
|
569 |
+
* @param $values
|
570 |
+
* @param $images
|
571 |
+
*
|
572 |
+
* @return bool|string|void
|
573 |
+
*/
|
574 |
+
function build_query( $values, $images ) {
|
575 |
+
|
576 |
+
if ( empty( $images ) || empty( $values ) ) {
|
577 |
+
return false;
|
578 |
+
}
|
579 |
+
|
580 |
+
global $wpdb;
|
581 |
+
$values = implode( ',', $values );
|
582 |
+
|
583 |
+
//Replace with image path and respective parameters
|
584 |
+
$query = "INSERT INTO {$wpdb->prefix}smush_dir_images (path,orig_size,file_time,last_scan) VALUES $values ON DUPLICATE KEY UPDATE image_size = IF( file_time < VALUES(file_time), NULL, image_size ), file_time = IF( file_time < VALUES(file_time), VALUES(file_time), file_time ), last_scan = VALUES( last_scan )";
|
585 |
+
$query = $wpdb->prepare( $query, $images );
|
586 |
+
|
587 |
+
return $query;
|
588 |
+
|
589 |
+
}
|
590 |
+
|
591 |
/**
|
592 |
* Sends a Ajax response if no images are found in selected directory
|
593 |
*/
|
615 |
wp_send_json_error( "Empth Directory Path" );
|
616 |
}
|
617 |
|
|
|
|
|
|
|
618 |
//Get the File list
|
619 |
$files = $this->get_image_list( $_GET['smush_path'] );
|
620 |
|
634 |
/**
|
635 |
* Check whether the given path is a image or not
|
636 |
*
|
637 |
+
* Do not include backup files
|
638 |
+
*
|
639 |
* @param $path
|
640 |
*
|
641 |
* @return bool
|
982 |
|
983 |
//Get the savings in bytes and percent
|
984 |
if ( ! empty( $this->stats ) ) {
|
985 |
+
$this->stats['bytes'] = ( $this->stats['orig_size'] > $this->stats['image_size'] ) ? $this->stats['orig_size'] - $this->stats['image_size'] : 0;
|
986 |
$this->stats['percent'] = number_format_i18n( ( ( $this->stats['bytes'] / $this->stats['orig_size'] ) * 100 ), 1 );
|
987 |
//Convert to human readable form
|
988 |
$this->stats['human'] = size_format( $this->stats['bytes'], 1 );
|
1139 |
'total' => $total,
|
1140 |
'latest_scan' => $last_scan
|
1141 |
);
|
1142 |
+
|
1143 |
+
//Update Bulk Limit Transient
|
1144 |
+
$wpsmushit_admin->update_smush_count( 'dir_sent_count' );
|
1145 |
+
|
1146 |
wp_send_json_success( $data );
|
1147 |
}
|
1148 |
|
1184 |
*
|
1185 |
*/
|
1186 |
function resume_scan() {
|
1187 |
+
$dir_path = get_option( 'wp-smush-dir_path' );
|
1188 |
|
1189 |
//If we don't get an error path, return an error message
|
1190 |
if ( empty( $dir_path ) ) {
|
lib/class-wp-smush-resize.php
CHANGED
@@ -71,12 +71,12 @@ if ( ! class_exists( 'WpSmushResize' ) ) {
|
|
71 |
}
|
72 |
|
73 |
/**
|
74 |
-
*
|
|
|
|
|
75 |
*
|
76 |
-
* @
|
77 |
-
* @param string $action
|
78 |
*
|
79 |
-
* @return bool
|
80 |
*/
|
81 |
public function should_resize( $id = '', $meta = '' ) {
|
82 |
|
@@ -143,10 +143,10 @@ if ( ! class_exists( 'WpSmushResize' ) ) {
|
|
143 |
/**
|
144 |
* Handles the Auto resizing of new uploaded images
|
145 |
*
|
146 |
-
* @param
|
147 |
-
* @param
|
148 |
*
|
149 |
-
* @return
|
150 |
*/
|
151 |
function auto_resize( $id, $meta ) {
|
152 |
|
@@ -235,8 +235,12 @@ if ( ! class_exists( 'WpSmushResize' ) ) {
|
|
235 |
* Checks if the size of generated image is greater,
|
236 |
*
|
237 |
* @param $file_path Original File path
|
|
|
|
|
|
|
|
|
238 |
*
|
239 |
-
* @return bool
|
240 |
*/
|
241 |
function perform_resize( $file_path, $original_file_size, $id, $meta = '', $unlink = true ) {
|
242 |
|
@@ -302,16 +306,14 @@ if ( ! class_exists( 'WpSmushResize' ) ) {
|
|
302 |
/**
|
303 |
* Replace the original file with resized file
|
304 |
*
|
305 |
-
* @param $
|
306 |
-
*
|
307 |
* @param $resized
|
|
|
|
|
308 |
*
|
|
|
309 |
*/
|
310 |
function replcae_original_image( $file_path, $resized, $attachment_id = '', $meta = '' ) {
|
311 |
-
$replaced = false;
|
312 |
-
|
313 |
-
//Take Backup, if we have to, off by default
|
314 |
-
$this->backup_image( $file_path, $attachment_id, $meta );
|
315 |
|
316 |
$replaced = @copy( $resized['file_path'], $file_path );
|
317 |
$this->maybe_unlink( $resized['file_path'], $meta );
|
@@ -319,66 +321,6 @@ if ( ! class_exists( 'WpSmushResize' ) ) {
|
|
319 |
return $replaced;
|
320 |
}
|
321 |
|
322 |
-
/**
|
323 |
-
* Creates a WordPress backup of original image, Disabled by default
|
324 |
-
*
|
325 |
-
* @param $upload
|
326 |
-
*
|
327 |
-
* @param $attachment_id
|
328 |
-
*
|
329 |
-
* @param $meta
|
330 |
-
*/
|
331 |
-
function backup_image( $path, $attachment_id, $meta ) {
|
332 |
-
|
333 |
-
/**
|
334 |
-
* Allows to turn on the backup for resized image
|
335 |
-
*/
|
336 |
-
$backup = apply_filters( 'wp_smush_resize_create_backup', false );
|
337 |
-
|
338 |
-
//If we don't have a attachment id, return
|
339 |
-
if ( empty( $attachment_id ) || ! $backup ) {
|
340 |
-
return;
|
341 |
-
}
|
342 |
-
|
343 |
-
//Creating Backup
|
344 |
-
$backup_sizes = get_post_meta( $attachment_id, '_wp_attachment_backup_sizes', true );
|
345 |
-
|
346 |
-
if ( ! is_array( $backup_sizes ) ) {
|
347 |
-
$backup_sizes = array();
|
348 |
-
}
|
349 |
-
|
350 |
-
//There is alrready a backup, no need to create one
|
351 |
-
if ( ! empty( $backup_sizes['full-orig'] ) ) {
|
352 |
-
return;
|
353 |
-
}
|
354 |
-
|
355 |
-
//Create a copy of original
|
356 |
-
if ( empty( $path ) ) {
|
357 |
-
$path = get_attached_file( $attachment_id );
|
358 |
-
}
|
359 |
-
|
360 |
-
$path_parts = pathinfo( $path );
|
361 |
-
$filename = $path_parts['filename'];
|
362 |
-
$filename .= '-orig';
|
363 |
-
|
364 |
-
//Backup Path
|
365 |
-
$backup_path = path_join( $path_parts['dirname'], $filename ) . ".{$path_parts['extension']}";
|
366 |
-
|
367 |
-
//Create a copy
|
368 |
-
if ( file_exists( $path ) ) {
|
369 |
-
$copy_created = @copy( $path, $backup_path );
|
370 |
-
if ( $copy_created ) {
|
371 |
-
$backup_sizes['full-orig'] = array(
|
372 |
-
'file' => basename( $backup_path ),
|
373 |
-
'width' => $meta['width'],
|
374 |
-
'height' => $meta['height']
|
375 |
-
);
|
376 |
-
//Save in Attachment meta
|
377 |
-
update_post_meta( $attachment_id, '_wp_attachment_backup_sizes', $backup_sizes );
|
378 |
-
}
|
379 |
-
}
|
380 |
-
}
|
381 |
-
|
382 |
/**
|
383 |
* @param $filename
|
384 |
*
|
71 |
}
|
72 |
|
73 |
/**
|
74 |
+
* Check whether Image should be resized or not
|
75 |
+
* @param string $id Attachment ID
|
76 |
+
* @param string $meta Attachment Metadata
|
77 |
*
|
78 |
+
* @return bool Should resize or not
|
|
|
79 |
*
|
|
|
80 |
*/
|
81 |
public function should_resize( $id = '', $meta = '' ) {
|
82 |
|
143 |
/**
|
144 |
* Handles the Auto resizing of new uploaded images
|
145 |
*
|
146 |
+
* @param $id Attachment ID
|
147 |
+
* @param $meta Attachment Metadata
|
148 |
*
|
149 |
+
* @return mixed Updated/Original Metadata if image was resized or not
|
150 |
*/
|
151 |
function auto_resize( $id, $meta ) {
|
152 |
|
235 |
* Checks if the size of generated image is greater,
|
236 |
*
|
237 |
* @param $file_path Original File path
|
238 |
+
* @param $original_file_size File size before optimisation
|
239 |
+
* @param $id Attachment ID
|
240 |
+
* @param string $meta Attachment Metadata
|
241 |
+
* @param bool $unlink Whether to unlink the original image or not
|
242 |
*
|
243 |
+
* @return array|bool|false If the image generation was successful
|
244 |
*/
|
245 |
function perform_resize( $file_path, $original_file_size, $id, $meta = '', $unlink = true ) {
|
246 |
|
306 |
/**
|
307 |
* Replace the original file with resized file
|
308 |
*
|
309 |
+
* @param $file_path
|
|
|
310 |
* @param $resized
|
311 |
+
* @param string $attachment_id
|
312 |
+
* @param string $meta
|
313 |
*
|
314 |
+
* @return bool
|
315 |
*/
|
316 |
function replcae_original_image( $file_path, $resized, $attachment_id = '', $meta = '' ) {
|
|
|
|
|
|
|
|
|
317 |
|
318 |
$replaced = @copy( $resized['file_path'], $file_path );
|
319 |
$this->maybe_unlink( $resized['file_path'], $meta );
|
321 |
return $replaced;
|
322 |
}
|
323 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
/**
|
325 |
* @param $filename
|
326 |
*
|
lib/class-wp-smush.php
CHANGED
@@ -179,12 +179,10 @@ if ( ! class_exists( 'WpSmush' ) ) {
|
|
179 |
/**
|
180 |
* Process an image with Smush.
|
181 |
*
|
182 |
-
*
|
183 |
*
|
184 |
-
* @
|
185 |
-
* @param string $file_url Optional full URL to the image file
|
186 |
*
|
187 |
-
* @returns array
|
188 |
*/
|
189 |
function do_smushit( $file_path = '' ) {
|
190 |
$errors = new WP_Error();
|
@@ -247,10 +245,6 @@ if ( ! class_exists( 'WpSmush' ) ) {
|
|
247 |
//Add the file as tmp
|
248 |
file_put_contents( $tempfile, $response['data']->image );
|
249 |
|
250 |
-
//Take Backup
|
251 |
-
global $wpsmush_backup;
|
252 |
-
$wpsmush_backup->create_backup( $file_path );
|
253 |
-
|
254 |
//replace the file
|
255 |
$success = @rename( $tempfile, $file_path );
|
256 |
|
@@ -576,6 +570,11 @@ if ( ! class_exists( 'WpSmush' ) ) {
|
|
576 |
return $meta;
|
577 |
}
|
578 |
|
|
|
|
|
|
|
|
|
|
|
579 |
/**
|
580 |
* Filter: wp_smush_image
|
581 |
*
|
@@ -746,7 +745,6 @@ if ( ! class_exists( 'WpSmush' ) ) {
|
|
746 |
return $data;
|
747 |
}
|
748 |
|
749 |
-
|
750 |
/**
|
751 |
* Print column header for Smush results in the media library using
|
752 |
* the `manage_media_columns` hook.
|
@@ -1274,6 +1272,11 @@ if ( ! class_exists( 'WpSmush' ) ) {
|
|
1274 |
return;
|
1275 |
}
|
1276 |
|
|
|
|
|
|
|
|
|
|
|
1277 |
/**
|
1278 |
* Allows to skip a image from smushing
|
1279 |
*
|
@@ -2124,6 +2127,11 @@ if ( ! class_exists( 'WpSmush' ) ) {
|
|
2124 |
return;
|
2125 |
}
|
2126 |
|
|
|
|
|
|
|
|
|
|
|
2127 |
/**
|
2128 |
* Filter: wp_smush_image
|
2129 |
*
|
@@ -2183,7 +2191,7 @@ if ( ! class_exists( 'WpSmush' ) ) {
|
|
2183 |
$res = $this->do_smushit( $post_data['filepath'] );
|
2184 |
|
2185 |
//Exit if smushing wasn't successful
|
2186 |
-
if ( empty( $res['success'] ) || ! $res['success'] ) {
|
2187 |
return;
|
2188 |
}
|
2189 |
|
179 |
/**
|
180 |
* Process an image with Smush.
|
181 |
*
|
182 |
+
* @param string $file_path Absolute path to the image
|
183 |
*
|
184 |
+
* @return array|bool
|
|
|
185 |
*
|
|
|
186 |
*/
|
187 |
function do_smushit( $file_path = '' ) {
|
188 |
$errors = new WP_Error();
|
245 |
//Add the file as tmp
|
246 |
file_put_contents( $tempfile, $response['data']->image );
|
247 |
|
|
|
|
|
|
|
|
|
248 |
//replace the file
|
249 |
$success = @rename( $tempfile, $file_path );
|
250 |
|
570 |
return $meta;
|
571 |
}
|
572 |
|
573 |
+
//Check if we're restoring the image
|
574 |
+
if ( get_transient( "wp-smush-restore-$ID" ) ) {
|
575 |
+
return $meta;
|
576 |
+
}
|
577 |
+
|
578 |
/**
|
579 |
* Filter: wp_smush_image
|
580 |
*
|
745 |
return $data;
|
746 |
}
|
747 |
|
|
|
748 |
/**
|
749 |
* Print column header for Smush results in the media library using
|
750 |
* the `manage_media_columns` hook.
|
1272 |
return;
|
1273 |
}
|
1274 |
|
1275 |
+
//Do not smush if auto smush is turned off
|
1276 |
+
if ( ! $this->is_auto_smush_enabled() ) {
|
1277 |
+
return;
|
1278 |
+
}
|
1279 |
+
|
1280 |
/**
|
1281 |
* Allows to skip a image from smushing
|
1282 |
*
|
2127 |
return;
|
2128 |
}
|
2129 |
|
2130 |
+
//Check if we're restoring the image
|
2131 |
+
if ( get_transient( "wp-smush-restore-$id" ) ) {
|
2132 |
+
return;
|
2133 |
+
}
|
2134 |
+
|
2135 |
/**
|
2136 |
* Filter: wp_smush_image
|
2137 |
*
|
2191 |
$res = $this->do_smushit( $post_data['filepath'] );
|
2192 |
|
2193 |
//Exit if smushing wasn't successful
|
2194 |
+
if ( is_wp_error( $res) || empty( $res['success'] ) || ! $res['success'] ) {
|
2195 |
return;
|
2196 |
}
|
2197 |
|
lib/wp-async-task-smush.php
CHANGED
@@ -95,6 +95,7 @@ if ( ! class_exists( 'WP_Async_Task_Smush' ) ) {
|
|
95 |
try {
|
96 |
$data = $this->prepare_data( $data );
|
97 |
} catch ( Exception $e ) {
|
|
|
98 |
return;
|
99 |
}
|
100 |
|
@@ -103,8 +104,13 @@ if ( ! class_exists( 'WP_Async_Task_Smush' ) ) {
|
|
103 |
|
104 |
$this->_body_data = $data;
|
105 |
|
106 |
-
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
108 |
}
|
109 |
|
110 |
//If we have image metadata return it
|
@@ -128,7 +134,7 @@ if ( ! class_exists( 'WP_Async_Task_Smush' ) ) {
|
|
128 |
* @uses admin_url()
|
129 |
* @uses wp_remote_post()
|
130 |
*/
|
131 |
-
public function
|
132 |
if ( ! empty( $this->_body_data ) ) {
|
133 |
$cookies = array();
|
134 |
foreach ( $_COOKIE as $name => $value ) {
|
95 |
try {
|
96 |
$data = $this->prepare_data( $data );
|
97 |
} catch ( Exception $e ) {
|
98 |
+
error_log( sprintf( "Async Smush: Error in prepare_data function in %s at line %s: %s", __FILE__, __LINE__, $e->getMessage() ) );
|
99 |
return;
|
100 |
}
|
101 |
|
104 |
|
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 |
|
116 |
//If we have image metadata return it
|
134 |
* @uses admin_url()
|
135 |
* @uses wp_remote_post()
|
136 |
*/
|
137 |
+
public function process_request() {
|
138 |
if ( ! empty( $this->_body_data ) ) {
|
139 |
$cookies = array();
|
140 |
foreach ( $_COOKIE as $name => $value ) {
|
readme.txt
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
=== Smush Image Compression and Optimization ===
|
2 |
Plugin Name: Smush Image Compression and Optimization
|
3 |
-
Version: 2.6.
|
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.
|
10 |
-
Stable tag: 2.6.
|
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.
|
@@ -132,6 +132,23 @@ 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.1 =
|
136 |
|
137 |
* Fixed:
|
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.
|
132 |
|
133 |
== Changelog ==
|
134 |
|
135 |
+
= 2.6.2 =
|
136 |
+
|
137 |
+
* Added:
|
138 |
+
* WP All Import Compatibility
|
139 |
+
|
140 |
+
* Fixed:
|
141 |
+
* Image not being updated to S3 after resmush ( *Only if remove files from server is kept off in S3 plugin settings )
|
142 |
+
* Added check for directory smush savings
|
143 |
+
* Call `wp_update_attachment_metadata` after smushing, to allow the optimised image to be used
|
144 |
+
* Dir Smush: Images with special symbols doesn't gets optimised
|
145 |
+
* Dir Smush: Skip .bak files
|
146 |
+
* Retina Images @2x: Do not smush if auto smush is disabled
|
147 |
+
* Backup ( Pro ): Take backup of original untouched image, improved backup and restore.
|
148 |
+
|
149 |
+
* Updated:
|
150 |
+
* Smush Limit ( 50 Images ), do not include images with error in count
|
151 |
+
|
152 |
= 2.6.1 =
|
153 |
|
154 |
* Fixed:
|
uninstall.php
CHANGED
@@ -39,7 +39,9 @@ $smushit_keys = array(
|
|
39 |
'lossy-updated',
|
40 |
'version',
|
41 |
'networkwide',
|
42 |
-
'dir_path'
|
|
|
|
|
43 |
);
|
44 |
|
45 |
//Cache Keys
|
@@ -84,6 +86,10 @@ if ( ! is_multisite() ) {
|
|
84 |
|
85 |
//Delete Directory Smush stats
|
86 |
delete_option( 'dir_smush_stats' );
|
|
|
|
|
|
|
|
|
87 |
|
88 |
//Delete Post meta
|
89 |
$meta_type = 'post';
|
39 |
'lossy-updated',
|
40 |
'version',
|
41 |
'networkwide',
|
42 |
+
'dir_path',
|
43 |
+
'scan',
|
44 |
+
'last_settings'
|
45 |
);
|
46 |
|
47 |
//Cache Keys
|
86 |
|
87 |
//Delete Directory Smush stats
|
88 |
delete_option( 'dir_smush_stats' );
|
89 |
+
delete_option( 'wp_smush_scan' );
|
90 |
+
delete_option( 'wp_smush_api_auth' );
|
91 |
+
delete_option( 'wp_smush_dir_path' );
|
92 |
+
delete_site_option( 'wp_smush_api_auth' );
|
93 |
|
94 |
//Delete Post meta
|
95 |
$meta_type = 'post';
|
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.
|
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.
|
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.2
|
8 |
Author URI: http://premium.wpmudev.org/
|
9 |
Text Domain: wp-smushit
|
10 |
*/
|
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' );
|