Wordpress 钩子:wp_calculate_image_srcset
文章目录
过滤图像的’srcset’来源。
原型
apply_filters( 'wp_calculate_image_srcset', array $sources, array $size_array, string $image_src, array $image_meta, int $attachment_id )
参数
$sources
(array)
要包含在’srcset’中的一个或多个源数据数组。 “宽度”(阵列) ‘url’(字符串)图像源的URL。 ‘descriptor’(字符串)图像候选字符串中使用的描述符类型,“w”或“x”。 ‘value’(int)如果与’w’描述符配对,则源宽度,或者如果与’x’描述符配对,则为像素密度值。
源文件
路径:``
其他
英文文档:https://developer.wordpress.org/reference/hooks/wp_calculate_image_srcset/
文章作者 iBllex
上次更新 2019-02-12