WordPress Version: 5.4
//
// Attachments.
//
/**
* Display an attachment page link using an image or icon.
*
* @since 2.0.0
*
* @param int|WP_Post $id Optional. Post ID or post object.
* @param bool $fullsize Optional, default is false. Whether to use full size.
* @param bool $deprecated Deprecated. Not used.
* @param bool $permalink Optional, default is false. Whether to include permalink.
*/
function the_attachment_link($id = 0, $fullsize = false, $deprecated = false, $permalink = false)
{
if (!empty($deprecated)) {
_deprecated_argument(__FUNCTION__, '2.5.0');
}
if ($fullsize) {
echo wp_get_attachment_link($id, 'full', $permalink);
} else {
echo wp_get_attachment_link($id, 'thumbnail', $permalink);
}
}