On this page
apply_filters( 'attachment_link', string $link, int $post_id )
Filters the permalink for an attachment.
Parameters
$linkstring-
The attachment's permalink.
$post_idint-
Attachment ID.
Source
File: wp-includes/link-template.php. View all references
return apply_filters( 'attachment_link', $link, $post->ID );
Related
Used By
| Used By | Description |
|---|---|
| get_attachment_link() wp-includes/link-template.php | Retrieves the permalink for an attachment. |
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/attachment_link