Version Description
- FIX: Don't create metadata with empty size when original image is smaller than the target size.
Download this release
Release Info
Developer | junkcoder |
Plugin | AJAX Thumbnail Rebuild |
Version | 1.07 |
Comparing to | |
See all releases |
Code changes from version 1.06 to 1.07
- ajax-thumbnail-rebuild.php +6 -3
- readme.txt +8 -2
ajax-thumbnail-rebuild.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin URI: http://breiti.cc/wordpress/ajax-thumbnail-rebuild
|
4 |
Author: junkcoder
|
5 |
Author URI: http://breiti.cc
|
6 |
-
Version: 1.
|
7 |
Description: Rebuild all thumbnails
|
8 |
Max WP Version: 3.2.1
|
9 |
Text Domain: ajax-thumbnail-rebuild
|
@@ -264,9 +264,12 @@ function wp_generate_attachment_metadata_custom( $attachment_id, $file, $thumbna
|
|
264 |
|
265 |
foreach ($sizes as $size => $size_data ) {
|
266 |
if( isset( $thumbnails ) && !in_array( $size, $thumbnails ))
|
267 |
-
$
|
268 |
else
|
269 |
-
$
|
|
|
|
|
|
|
270 |
}
|
271 |
|
272 |
// fetch additional metadata from exif/iptc
|
3 |
Plugin URI: http://breiti.cc/wordpress/ajax-thumbnail-rebuild
|
4 |
Author: junkcoder
|
5 |
Author URI: http://breiti.cc
|
6 |
+
Version: 1.07
|
7 |
Description: Rebuild all thumbnails
|
8 |
Max WP Version: 3.2.1
|
9 |
Text Domain: ajax-thumbnail-rebuild
|
264 |
|
265 |
foreach ($sizes as $size => $size_data ) {
|
266 |
if( isset( $thumbnails ) && !in_array( $size, $thumbnails ))
|
267 |
+
$intermediate_size = image_get_intermediate_size( $attachment_id, $size_data['name'] );
|
268 |
else
|
269 |
+
$intermediate_size = image_make_intermediate_size( $file, $size_data['width'], $size_data['height'], $size_data['crop'] );
|
270 |
+
|
271 |
+
if ($intermediate_size)
|
272 |
+
$metadata['sizes'][$size] = $intermediate_size;
|
273 |
}
|
274 |
|
275 |
// fetch additional metadata from exif/iptc
|
readme.txt
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
=== AJAX Thumbnail Rebuild ===
|
2 |
Contributors: junkcoder
|
3 |
-
|
|
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 3.2.1
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
AJAX Thumbnail Rebuild allows you to rebuild all thumbnails at once without script timeouts on your server.
|
9 |
|
@@ -23,6 +24,11 @@ Upload the plugin to your blog, activate it, done. You can then rebuild all thum
|
|
23 |
|
24 |
== Changelog ==
|
25 |
|
|
|
|
|
|
|
|
|
|
|
26 |
= 1.06 =
|
27 |
|
28 |
* FIX: Don't forget metadata for sizes that aren't rebuilt.
|
1 |
=== AJAX Thumbnail Rebuild ===
|
2 |
Contributors: junkcoder
|
3 |
+
Donate link: http://breiti.cc/wordpress/ajax-thumbnail-rebuild/#donate
|
4 |
+
Tags: ajax, thumbnail, rebuild, regenerate, admin, image, photo
|
5 |
Requires at least: 2.8
|
6 |
Tested up to: 3.2.1
|
7 |
+
Stable tag: 1.07
|
8 |
|
9 |
AJAX Thumbnail Rebuild allows you to rebuild all thumbnails at once without script timeouts on your server.
|
10 |
|
24 |
|
25 |
== Changelog ==
|
26 |
|
27 |
+
= 1.07 =
|
28 |
+
|
29 |
+
* FIX: Don't create metadata with empty size when original image is smaller
|
30 |
+
than the target size.
|
31 |
+
|
32 |
= 1.06 =
|
33 |
|
34 |
* FIX: Don't forget metadata for sizes that aren't rebuilt.
|