get_udims

Advertisement

Deprecated Deprecated

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

Summery Summery

Calculated the new dimensions for a downsampled image.

Syntax Syntax

get_udims( int $width, int $height )

Parameters Parameters

$width

(Required) Current width of the image

$height

(Required) Current height of the image

Return Return

(array) Shrunk dimensions (width, height).

Source Source

File: wp-admin/includes/deprecated.php

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

Advertisement

Changelog Changelog

Changelog
Version Description
3.5.0 Use wp_constrain_dimensions()
2.0.0 Introduced.

See also See also

Advertisement

Leave a Reply