过滤检索到的附件页面链接。
原型
apply_filters( 'wp_get_attachment_link', string $link_html, int $id, string|array $size, bool $permalink, bool $icon, string|bool $text )
参数
$link_html
(string)
页面链接HTML输出。
$id
(int)
帖子ID。
$size
(string|array)
图像的大小。图像大小或宽度和高度值数组(按此顺序)。默认’缩略图’。
$permalink
(bool)
是否为图像添加永久链接。默认为false。
$icon
(bool)
是否包含图标。默认为false。
$text
(string|bool)
如果是string,将是链接文本。默认为false。
源文件
路径:wp-includes/post-template.php
其他
英文文档:https://developer.wordpress.org/reference/hooks/wp_get_attachment_link/