Filters dimensions to constrain down-sampled images to.
Parameters
$dimensions
int[]- An array of width and height values.
0
intThe width in pixels.1
intThe height in pixels.
$current_width
int- The current width of the image.
$current_height
int- The current height of the image.
$max_width
int- The maximum width permitted.
$max_height
int- The maximum height permitted.
Source
return apply_filters( 'wp_constrain_dimensions', array( $w, $h ), $current_width, $current_height, $max_width, $max_height );
Changelog
Version | Description |
---|---|
4.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.