过滤图像标题的宽度。
原型
apply_filters( 'img_caption_shortcode_width', int $width, array $atts, string $content )
描述
默认情况下,标题比图像的宽度大10个像素,以防止帖子内容针对浮动图像运行。
参考:
- img_caption_shortcode()
参数
$width
(int)
标题的宽度(以像素为单位)。要删除此内联样式,请返回零。
$atts
(array)
标题短代码的属性。
$content
(string)
图像元素,可能包含在超链接中。
源文件
路径:wp-includes/media.php
其他
英文文档:https://developer.wordpress.org/reference/hooks/img_caption_shortcode_width/