mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 23:58:03 +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:
@@ -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) ) {
|
||||
|
||||
Reference in New Issue
Block a user