W3cubDocs

/WordPress

apply_filters( 'attachment_link', string $link, int $post_id )

Filters the permalink for an attachment.

Parameters

$link

(string) The attachment's permalink.

$post_id

(int) Attachment ID.

Source

File: wp-includes/link-template.php

View on Trac

Changelog

Version Description
2.0.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/attachment_link