Changeset 12823
- Timestamp:
- 01/25/2010 06:50:01 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/admin.php
r12633 r12823 52 52 require_once(ABSPATH . WPINC . '/registration.php'); 53 53 54 /** WordPress Deprecated Administration API */ 55 require_once(ABSPATH . 'wp-admin/includes/deprecated.php'); 56 54 57 /** WordPress Multi-Site support API */ 55 58 if ( is_multisite() ) -
trunk/wp-admin/includes/image-edit.php
r12789 r12823 454 454 $meta['width'] = $data['width']; 455 455 $meta['height'] = $data['height']; 456 list ( $uwidth, $uheight ) = wp_ shrink_dimensions($meta['width'], $meta['height']);456 list ( $uwidth, $uheight ) = wp_constrain_dimensions($meta['width'], $meta['height'], 128, 96); 457 457 $meta['hwstring_small'] = "height='$uheight' width='$uwidth'"; 458 458 } … … 599 599 $meta['height'] = imagesy($img); 600 600 601 list ( $uwidth, $uheight ) = wp_ shrink_dimensions($meta['width'], $meta['height']);601 list ( $uwidth, $uheight ) = wp_constrain_dimensions($meta['width'], $meta['height'], 128, 96); 602 602 $meta['hwstring_small'] = "height='$uheight' width='$uwidth'"; 603 603 -
trunk/wp-admin/includes/image.php
r12680 r12823 95 95 $metadata['width'] = $imagesize[0]; 96 96 $metadata['height'] = $imagesize[1]; 97 list($uwidth, $uheight) = wp_ shrink_dimensions($metadata['width'], $metadata['height']);97 list($uwidth, $uheight) = wp_constrain_dimensions($metadata['width'], $metadata['height'], 128, 96); 98 98 $metadata['hwstring_small'] = "height='$uheight' width='$uwidth'"; 99 99 … … 170 170 * 171 171 * @since 2.0.0 172 * @see wp_ shrink_dimensions()172 * @see wp_constrain_dimensions() 173 173 * 174 174 * @param int $width Current width of the image … … 177 177 */ 178 178 function get_udims( $width, $height) { 179 return wp_shrink_dimensions( $width, $height ); 180 } 181 182 /** 183 * Calculates the new dimentions for a downsampled image. 184 * 185 * @since 2.0.0 186 * @see wp_constrain_dimensions() 187 * 188 * @param int $width Current width of the image 189 * @param int $height Current height of the image 190 * @param int $wmax Maximum wanted width 191 * @param int $hmax Maximum wanted height 192 * @return mixed Array(height,width) of shrunk dimensions. 193 */ 194 function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) { 195 return wp_constrain_dimensions( $width, $height, $wmax, $hmax ); 179 return wp_constrain_dimensions( $width, $height, 128, 96 ); 196 180 } 197 181 -
trunk/wp-includes/media.php
r12733 r12823 234 234 * Calculates the new dimentions for a downsampled image. 235 235 * 236 * Same as {@link wp_shrink_dimensions()}, except the max parameters are 237 * optional. If either width or height are empty, no constraint is applied on 236 * If either width or height are empty, no constraint is applied on 238 237 * that dimension. 239 238 *
Note: See TracChangeset
for help on using the changeset viewer.