wphooks.info - attachment_link

attachment_link

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-includes/link-template.php:
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
		$link = home_url( '/?attachment_id=' . $post->ID );

	/**
	 * Filters the permalink for an attachment.
	 *
	 * @since 2.0.0
	 *
	 * @param string $link    The attachment's permalink.
	 * @param int    $post_id Attachment ID.
	 */
	return apply_filters( 'attachment_link', $link, $post->ID );
}

/**
 * Retrieves the permalink for the year archives.
 *
 * @since 1.5.0
 *
 * @global WP_Rewrite $wp_rewrite
 *