Wordpress 钩子: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 )
描述
将非空值传递给过滤器将有效地使image_resize_dimensions()短路,从而返回该值。
参数
$null
(null|mixed)
是否抢占调整大小尺寸的输出。
$orig_w
(int)
原始宽度(像素)。
$orig_h
(int)
原始高度(像素)。
$dest_w
(int)
新的像素宽度。
$dest_h
(int)
新的像素高度。
$crop
(bool|array)
是否将图像裁剪为指定的宽度和高度或调整大小。数组可以指定裁剪区域的位置。默认为false。
源文件
路径:wp-includes/media.php
其他
英文文档:https://developer.wordpress.org/reference/hooks/image_resize_dimensions/
文章作者 iBllex
上次更新 2019-02-14