Changeset 21808
- Timestamp:
- 09/11/2012 01:38:26 AM (13 years ago)
- Location:
- trunk/wp-admin/includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/deprecated.php
r21800 r21808 53 53 _deprecated_function( __FUNCTION__, '3.0', 'wp_constrain_dimensions()' ); 54 54 return wp_constrain_dimensions( $width, $height, $wmax, $hmax ); 55 } 56 57 /** 58 * Calculated the new dimensions for a downsampled image. 59 * 60 * @since 2.0.0 61 * @deprecated 3.5.0 62 * @see wp_constrain_dimensions() 63 * 64 * @param int $width Current width of the image 65 * @param int $height Current height of the image 66 * @return mixed Array(height,width) of shrunk dimensions. 67 */ 68 function get_udims( $width, $height ) { 69 _deprecated_function( __FUNCTION__, '3.5', 'wp_constrain_dimensions()' ); 70 return wp_constrain_dimensions( $width, $height, 128, 96 ); 55 71 } 56 72 -
trunk/wp-admin/includes/image-edit.php
r20384 r21808 415 415 $meta['width'] = $data['width']; 416 416 $meta['height'] = $data['height']; 417 list ( $uwidth, $uheight ) = wp_constrain_dimensions($meta['width'], $meta['height'], 128, 96);418 $meta['hwstring_small'] = "height='$uheight' width='$uwidth'";419 417 } 420 418 … … 560 558 $meta['height'] = imagesy($img); 561 559 562 list ( $uwidth, $uheight ) = wp_constrain_dimensions($meta['width'], $meta['height'], 128, 96);563 $meta['hwstring_small'] = "height='$uheight' width='$uwidth'";564 565 560 if ( $success && ('nothumb' == $target || 'all' == $target) ) { 566 561 $sizes = get_intermediate_image_sizes(); -
trunk/wp-admin/includes/image.php
r21039 r21808 118 118 $metadata['width'] = $imagesize[0]; 119 119 $metadata['height'] = $imagesize[1]; 120 list($uwidth, $uheight) = wp_constrain_dimensions($metadata['width'], $metadata['height'], 128, 96);121 $metadata['hwstring_small'] = "height='$uheight' width='$uwidth'";122 120 123 121 // Make the file path relative to the upload dir … … 159 157 160 158 return apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id ); 161 }162 163 /**164 * Calculated the new dimensions for a downsampled image.165 *166 * @since 2.0.0167 * @see wp_constrain_dimensions()168 *169 * @param int $width Current width of the image170 * @param int $height Current height of the image171 * @return mixed Array(height,width) of shrunk dimensions.172 */173 function get_udims( $width, $height) {174 return wp_constrain_dimensions( $width, $height, 128, 96 );175 159 } 176 160
Note: See TracChangeset
for help on using the changeset viewer.