WordPress.org

Make WordPress Core

Changeset 23282


Ignore:
Timestamp:
01/04/2013 11:27:26 PM (5 years ago)
Author:
ryan
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
fixes #23102
for 3.5

Location:
branches/3.5
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/3.5

  • branches/3.5/wp-admin/includes/update-core.php

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/3.5/wp-includes/media.php

    r23273 r23282  
    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.