过滤尺寸以将下采样图像约束为。
原型
apply_filters( 'wp_constrain_dimensions', array $dimensions, int $current_width, int $current_height, int $max_width, int $max_height )
参数
$dimensions
(array)
图像宽度和高度。
$current_width
(int)
图像的当前宽度。
$current_height
(int)
图像的当前高度。
$max_width
(int)
允许的最大宽度。
$max_height
(int)
允许的最大高度。
源文件
路径:wp-includes/media.php
其他
英文文档:https://developer.wordpress.org/reference/hooks/wp_constrain_dimensions/