Core Function
View Source on Trac ↗ wp_expand_dimensions()
wp_expand_dimensions( mixed $example_width, mixed $example_height, mixed $max_width, mixed $max_height ) Based on a supplied width/height example, returns the biggest possible dimensions based on the max width/height.
Parameters 4 required
| Name / Type | Description |
|---|---|
| $example_width int | The width of an example embed. Required |
| $example_height int | The height of an example embed. Required |
| $max_width int | The maximum allowed width. Required |
| $max_height int | The maximum allowed height. Required |
Return Value
(int[])
int[] {
An array of maximum width and height values.
Function Information
Since Version
2.9.0
Source File
wp-includes/media.php
Advertisement