wpseek.com
A WordPress-centric search engine for devs and theme authors



attachment_link › WordPress Filter Hooks

Since5.6.0
Deprecatedn/a
apply_filters( 'attachment_link', $link, $post->ID )
Parameters: (2)
  • (string) $link The attachment's permalink.
    Required: Yes
  • (int) $post_id Attachment ID.
    Required: Yes
Defined at:
Codex:

Filters the permalink for an attachment.





Source

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