Changeset 35250 for trunk/src/wp-includes/media.php
- Timestamp:
- 10/17/2015 10:11:28 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r35210 r35250 1004 1004 */ 1005 1005 function wp_get_attachment_image_sizes( $attachment_id, $size = 'medium', $args = null ) { 1006 1006 $img_width = 0; 1007 1007 // Try to get the image width from $args. 1008 1008 if ( is_array( $args ) && ! empty( $args['width'] ) ) { 1009 1009 $img_width = (int) $args['width']; 1010 1010 } elseif ( $img = image_get_intermediate_size( $attachment_id, $size ) ) { 1011 list( $img_width , $img_height) = image_constrain_size_for_editor( $img['width'], $img['height'], $size );1011 list( $img_width ) = image_constrain_size_for_editor( $img['width'], $img['height'], $size ); 1012 1012 } 1013 1013
Note: See TracChangeset
for help on using the changeset viewer.