1. 首页
  2. WordPress 函数手册

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)

另见函数 wp_get_attachment_link()


参数(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/