This function has been deprecated. Use wp_constrain_dimensions() instead.

get_udims( int $width, int $height )

Calculated the new dimensions for a downsampled image.


Description

See also


Parameters

$width

(Required) Current width of the image

$height

(Required) Current height of the image


Return

(array) Shrunk dimensions (width, height).


Source

File: wp-admin/includes/deprecated.php

function get_udims( $width, $height ) {
	_deprecated_function( __FUNCTION__, 'WP-3.5.0', 'wp_constrain_dimensions()' );
	return wp_constrain_dimensions( $width, $height, 128, 96 );
}


Changelog

Changelog
Version Description
WP-3.5.0 Use wp_constrain_dimensions()
WP-2.0.0 Introduced. This function has been deprecated. Use wp_constrain_dimensions() instead.