Changeset 21772
- Timestamp:
- 09/06/2012 09:50:41 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r21769 r21772 1572 1572 ); 1573 1573 1574 if ( 'image' === $type ) {1574 if ( $meta && 'image' === $type ) { 1575 1575 $sizes = array(); 1576 1576 $base_url = str_replace( wp_basename( $attachment_url ), '', $attachment_url ); 1577 1577 1578 foreach ( $meta['sizes'] as $slug => $size ) { 1579 $sizes[ $slug ] = array( 1580 'height' => $size['height'], 1581 'width' => $size['width'], 1582 'url' => $base_url . $size['file'], 1583 'orientation' => $size['height'] > $size['width'] ? 'portrait' : 'landscape', 1584 ); 1578 if ( isset( $meta['sizes'] ) ) { 1579 foreach ( $meta['sizes'] as $slug => $size ) { 1580 $sizes[ $slug ] = array( 1581 'height' => $size['height'], 1582 'width' => $size['width'], 1583 'url' => $base_url . $size['file'], 1584 'orientation' => $size['height'] > $size['width'] ? 'portrait' : 'landscape', 1585 ); 1586 } 1585 1587 } 1586 1588
Note: See TracChangeset
for help on using the changeset viewer.