get_udims()
Deprecated since 3.5.0. It is no longer supported and may be removed in future releases. Use wp_constrain_dimensions() instead.
Calculates the new dimensions for a downsampled image.
No Hooks.
Returns
Array. Shrunk dimensions (width, height).
Usage
get_udims( $width, $height );
- $width(int) (required)
- Current width of the image.
- $height(int) (required)
- Current height of the image.
Notes
Changelog
| Since 2.0.0 | Introduced. |
| Deprecated since 3.5.0 | Use wp_constrain_dimensions() |
get_udims() get udims code WP 7.0
function get_udims( $width, $height ) {
_deprecated_function( __FUNCTION__, '3.5.0', 'wp_constrain_dimensions()' );
return wp_constrain_dimensions( $width, $height, 128, 96 );
}