image_resize_dimensions
apply_filters( ‘image_resize_dimensions’, null|mixed $null , int $orig_w , int $orig_h , int $dest_w , int $dest_h , bool|array $crop )
过滤器::过滤是否抢占计算图像大小的维度。
Filter Hook: Filters whether to preempt calculating the image resize dimensions.
说明(Description)
将非空值传递给筛选器将有效地短路图像调整维度(),而返回该值。
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$null | (null | mixed) | 是否抢占大小调整维度的输出。 |
$orig_w | (int) | 原始宽度(像素)。 |
$orig_h | (int) | 原始高度(像素)。 |
$dest_w | (int) | 以像素为单位的新宽度。 |
$dest_h | (int) | 以像素为单位的新高度。 |
$crop | (bool | array) | 是将图像裁剪为指定的宽度和高度,还是调整大小。数组可以指定裁剪区域的位置。默认为false。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
3.4.0 | wp-includes/media.php:557 | 1 | 0 |
image_resize_dimensions 为WP2原创文章,链接:https://www.wp2.cn/hook/image_resize_dimensions-2/