Thumbnail creation fix from mdawaffe. fixes #3588
git-svn-id: https://develop.svn.wordpress.org/trunk@4759 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6e5ddf34a0
commit
7e357f96c0
|
@ -2079,7 +2079,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
|
||||||
|
|
||||||
$max = apply_filters( 'wp_thumbnail_creation_size_limit', 3 * 1024 * 1024, $attachment_id, $file );
|
$max = apply_filters( 'wp_thumbnail_creation_size_limit', 3 * 1024 * 1024, $attachment_id, $file );
|
||||||
|
|
||||||
if ( $max > 0 && $metadata['width'] * $metadata['height'] < $max ) {
|
if ( $max < 0 || $metadata['width'] * $metadata['height'] < $max ) {
|
||||||
$max_side = apply_filters( 'wp_thumbnail_max_side_length', 128, $attachment_id, $file );
|
$max_side = apply_filters( 'wp_thumbnail_max_side_length', 128, $attachment_id, $file );
|
||||||
$thumb = wp_create_thumbnail( $file, $max_side );
|
$thumb = wp_create_thumbnail( $file, $max_side );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue