wp_shrink_dimensions

Advertisement

Deprecated Deprecated

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

Summery Summery

Calculates the new dimensions for a downsampled image.

Syntax Syntax

wp_shrink_dimensions( int $width, int $height, int $wmax = 128, int $hmax = 96 )

Parameters Parameters

$width

(int) (Required) Current width of the image

$height

(int) (Required) Current height of the image

$wmax

(int) (Optional) Maximum wanted width

Default value: 128

$hmax

(int) (Optional) Maximum wanted height

Default value: 96

Return Return

(array) Shrunk dimensions (width, height).

Source Source

File: wp-admin/includes/deprecated.php


			

Advertisement

Changelog Changelog

Changelog
Version Description
3.0.0 Use wp_constrain_dimensions()
2.0.0 Introduced.

See also See also

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.