get_udims()WP 2.0.0

Устарела с версии 3.5.0. Больше не поддерживается и может быть удалена. Используйте wp_constrain_dimensions().

Calculated the new dimensions for a downsampled image.

Хуков нет.

Возвращает

Массив. Shrunk dimensions (width, height).

Использование

get_udims( $width, $height );
$width(int) (обязательный)
Current width of the image
$height(int) (обязательный)
Current height of the image

Заметки

Список изменений

С версии 2.0.0 Введена.
Устарела с 3.5.0 Use wp_constrain_dimensions()

Код get_udims() WP 6.7.2

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