WordPress.org

Make WordPress Core

Changeset 4751


Ignore:
Timestamp:
01/16/07 18:34:31 (7 years ago)
Author:
ryan
Message:

Thumbnail creation fixes from mdawaffe. fixes #3588

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-functions.php

    r4712 r4751  
    20782078        $metadata['file'] = $file; 
    20792079 
    2080         if ( $metadata['width'] * $metadata['height'] < 3 * 1024 * 1024 ) { 
    2081             if ( $metadata['width'] > 128 && $metadata['width'] >= $metadata['height'] * 4 / 3 ) 
    2082                 $thumb = wp_create_thumbnail($file, 128); 
    2083             elseif ( $metadata['height'] > 96 ) 
    2084                 $thumb = wp_create_thumbnail($file, 96); 
     2080        $max = apply_filters( 'wp_thumbnail_creation_size_limit', 3 * 1024 * 1024, $attachment_id, $file ); 
     2081 
     2082        if ( $max > 0 && $metadata['width'] * $metadata['height'] < $max ) { 
     2083            $max_side = apply_filters( 'wp_thumbnail_max_side_length', 128, $attachment_id, $file ); 
     2084            $thumb = wp_create_thumbnail( $file, $max_side ); 
    20852085 
    20862086            if ( @file_exists($thumb) ) 
Note: See TracChangeset for help on using the changeset viewer.