Ticket #23779: 23779.diff
| File 23779.diff, 1.4 KB (added by , 13 years ago) |
|---|
-
wp-includes/media.php
1609 1609 'url' => $downsize[0], 1610 1610 'orientation' => $downsize[2] > $downsize[1] ? 'portrait' : 'landscape', 1611 1611 ); 1612 } else if ( isset( $meta['sizes'][ $size ] ) ){1612 } else { 1613 1613 if ( ! isset( $base_url ) ) 1614 1614 $base_url = str_replace( wp_basename( $attachment_url ), '', $attachment_url ); 1615 1615 1616 // Nothing from the filter, so consult image metadata if we have it.1617 $size_meta = $meta['sizes'][ $size ];1616 // If image metadata for this size exists, use it, otherwise use original. 1617 $size_meta = ( isset( $meta['sizes'][ $size ] ) ) ? $meta['sizes'][ $size ] : $meta; 1618 1618 1619 1619 // We have the actual image size, but might need to further constrain it if content_width is narrower. 1620 1620 // Thumbnail, medium, and full sizes are also checked against the site's height/width options. 1621 1621 list( $width, $height ) = image_constrain_size_for_editor( $size_meta['width'], $size_meta['height'], $size, 'edit' ); 1622 1622 1623 // If dimensions have not changed from the original, skip this image size. 1624 if ( $width == $meta['width'] && $height == $meta['height'] ) 1625 continue; 1626 1623 1627 $sizes[ $size ] = array( 1624 1628 'height' => $height, 1625 1629 'width' => $width,
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)