attachment_link

过滤钩子


apply_filters( 'attachment_link', $link, $post->ID )
参数
  • (string)
    $link
    The attachment’s permalink.
    Required:
  • (int)
    $post_id
    Attachment ID.
    Required:
定义位置
  • wp-includes/link-template.php
    , line 530
引入
5.6.0
弃用

过滤附件的固定链接。

return apply_filters( 'attachment_link', $link, $post->ID );