get_udims

The timeline below displays how wordpress function get_udims has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.6

/**
 * Calculated the new dimensions for a downsampled image.
 *
 * @since 2.0.0
 * @deprecated 3.5.0 Use wp_constrain_dimensions()
 * @see wp_constrain_dimensions()
 *
 * @param int $width Current width of the image
 * @param int $height Current height of the image
 * @return array Shrunk dimensions (width, height).
 */
function get_udims($width, $height)
{
    _deprecated_function(__FUNCTION__, '3.5.0', 'wp_constrain_dimensions()');
    return wp_constrain_dimensions($width, $height, 128, 96);
}

WordPress Version: 4.4

/**
 * Calculated the new dimensions for a downsampled image.
 *
 * @since 2.0.0
 * @deprecated 3.5.0 Use wp_constrain_dimensions()
 * @see wp_constrain_dimensions()
 *
 * @param int $width Current width of the image
 * @param int $height Current height of the image
 * @return array Shrunk dimensions (width, height).
 */
function get_udims($width, $height)
{
    _deprecated_function(__FUNCTION__, '3.5', 'wp_constrain_dimensions()');
    return wp_constrain_dimensions($width, $height, 128, 96);
}

WordPress Version: 3.7

/**
 * Calculated the new dimensions for a downsampled image.
 *
 * @since 2.0.0
 * @deprecated 3.5.0
 * @deprecated Use wp_constrain_dimensions()
 * @see wp_constrain_dimensions()
 *
 * @param int $width Current width of the image
 * @param int $height Current height of the image
 * @return array Shrunk dimensions (width, height).
 */
function get_udims($width, $height)
{
    _deprecated_function(__FUNCTION__, '3.5', 'wp_constrain_dimensions()');
    return wp_constrain_dimensions($width, $height, 128, 96);
}