wp_expand_dimensions

SummerySummery

Based on a supplied width/height example, return the biggest possible dimensions based on the max width/height.

Syntax

wp_expand_dimensions( int $example_width, int $example_height, int $max_width, int $max_height )

ParametersParameters

$example_width

(int) (Required) The width of an example embed.

$example_height

(int) (Required) The height of an example embed.

$max_width

(int) (Required) The maximum allowed width.

$max_height

(int) (Required) The maximum allowed height.

ReturnReturn

(int[]) An array of maximum width and height values.

  • (int) The maximum width in pixels.
  • '1'
    (int) The maximum height in pixels.

SourceSource

File: wp-includes/media.php


			

ChangelogChangelog

Changelog
Version Description
2.9.0 Introduced.

See alsoSee also

Scroll to Top