WordPress at a glance
filter is not described

attachment_link filter-hook . WP 2.0.0

Filters the permalink for an attachment.


add_filter( 'attachment_link', 'filter_function_name_5323', 10, 2 );
function filter_function_name_5323( $link, $post_id ){
	// filter...

	return $link;
The attachment's permalink.
Attachment ID.

Where the hook is called

wp-includes/link-template.php 436
return apply_filters( 'attachment_link', $link, $post->ID );

Where the hook is used (in WP core)

Does not used.