Deprecate wp_shrink_dimension(), add wp-admin/includes/deprecated.php. Props filosofo. fixes #11967

git-svn-id: https://develop.svn.wordpress.org/trunk@12823 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-01-25 18:50:01 +00:00
parent 56c9c4c527
commit c01fb90ff1
5 changed files with 30 additions and 23 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
/**
* Calculates the new dimentions for a downsampled image.
*
* @since 2.0.0
* @deprecated 3.0.0
* @deprecated Use wp_constrain_dimensions()
*
* @param int $width Current width of the image
* @param int $height Current height of the image
* @param int $wmax Maximum wanted width
* @param int $hmax Maximum wanted height
* @return mixed Array(height,width) of shrunk dimensions.
*/
function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) {
_deprecated_function( __FUNCTION__, '3.0', 'wp_constrain_dimensions()' );
return wp_constrain_dimensions( $width, $height, $wmax, $hmax );
}
?>