Filters dimensions to constrain down-sampled images to.
$dimensionsint[]$0int
$1int
$current_widthint$current_heightint$max_widthint$max_heightintwp-includes/media.php:518wp_constrain_dimensions() * } * @param int $current_width The current width of the image. * @param int $current_height The current height of the image. * @param int $max_width The maximum width permitted. * @param int $max_height The maximum height permitted. */ return apply_filters( 'wp_constrain_dimensions', array( $w, $h ), $current_width, $current_height, $max_width, $max_height );} /** * Retrieves calculated resize dimensions for use in WP_Image_Editor. * * Calculates dimensions and coordinates for a resized image that fitsIntroduced in 4.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.