wpseek.com
A WordPress-centric search engine for devs and theme authors



get_udims › WordPress Function

Since2.0.0
Deprecated3.5.0
get_udims ( $width, $height )
Parameters: (2)
  • (int) $width Current width of the image
    Required: Yes
  • (int) $height Current height of the image
    Required: Yes
See:
Returns:
  • (array) Shrunk dimensions (width, height).
Defined at:
Codex:

Calculated the new dimensions for a downsampled image.



Source

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