get_the_attachment_link()
get_the_attachment_link( int $id, bool $fullsize = false, array $max_dims = false, bool $permalink = false )
使用链接检索附件图像的HTML内容。
Retrieve HTML content of attachment image with link.
说明(Description)
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$id | (int) | 可选 | 邮政编码。 |
$fullsize | (bool) | 可选 | 是否使用全尺寸图像。 |
$max_dims | (array) | 可选 | 最大图像尺寸。 |
$permalink | (bool) | 可选 | 是否包含到图像的永久对齐。 |
返回(Return)
(string)
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.5.0 | wp-includes/deprecated.php:1843 | 0 | 7 |
get_the_attachment_link() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_the_attachment_link/