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
+2 -2
View File
@@ -453,7 +453,7 @@ function wp_restore_image($post_id) {
$meta['file'] = _wp_relative_upload_path( $restored_file );
$meta['width'] = $data['width'];
$meta['height'] = $data['height'];
list ( $uwidth, $uheight ) = wp_shrink_dimensions($meta['width'], $meta['height']);
list ( $uwidth, $uheight ) = wp_constrain_dimensions($meta['width'], $meta['height'], 128, 96);
$meta['hwstring_small'] = "height='$uheight' width='$uwidth'";
}
@@ -598,7 +598,7 @@ function wp_save_image($post_id) {
$meta['width'] = imagesx($img);
$meta['height'] = imagesy($img);
list ( $uwidth, $uheight ) = wp_shrink_dimensions($meta['width'], $meta['height']);
list ( $uwidth, $uheight ) = wp_constrain_dimensions($meta['width'], $meta['height'], 128, 96);
$meta['hwstring_small'] = "height='$uheight' width='$uwidth'";
if ( $success && ('nothumb' == $target || 'all' == $target) ) {