WordPress.org

Make WordPress Core

Changeset 23264


Ignore:
Timestamp:
01/04/13 08:52:18 (16 months ago)
Author:
nacin
Message:

Media: Pass thumbnail and medium sizes to image_constrain_size_for_editor() to force constraints based on the current DB options for those sizes. History: see #22598, #22738.

props jond3r.
see #23102.
for trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r23262 r23264  
    13921392 
    13931393                // We have the actual image size, but might need to further constrain it if content_width is narrower. 
    1394                 // This is not necessary for thumbnails and medium size. 
    1395                 if ( 'thumbnail' == $size || 'medium' == $size ) { 
    1396                     $width = $size_meta['width']; 
    1397                     $height = $size_meta['height']; 
    1398                 } else { 
    1399                     list( $width, $height ) = image_constrain_size_for_editor( $size_meta['width'], $size_meta['height'], $size, 'edit' ); 
    1400                 } 
     1394                // Thumbnail, medium, and full sizes are also checked against the site's height/width options. 
     1395                list( $width, $height ) = image_constrain_size_for_editor( $size_meta['width'], $size_meta['height'], $size, 'edit' ); 
    14011396 
    14021397                $sizes[ $size ] = array( 
Note: See TracChangeset for help on using the changeset viewer.