mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 20:58:55 +00:00
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:
@@ -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 );
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user