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

Filters the permalink for an attachment.


Parameters

$link

The attachment's permalink.

$post_id

Attachment ID.


Source

File: wp-includes/link-template.php

View on GitHub



Changelog

Changelog
Version Description
5.6.0 Providing an empty string will now disable the view attachment page link on the media modal.
2.0.0 Introduced.