the_attachment_link( int|WP_Post $id, bool $fullsize = false, bool $deprecated = false, bool $permalink = false )
Display an attachment page link using an image or icon.
Parameters
- $id
-
(Optional) Post ID or post object.
- $fullsize
-
(Optional) Whether to use full size.
Default value: false
- $deprecated
-
(Optional) Deprecated. Not used.
Default value: false
- $permalink
-
(Optional) Whether to include permalink.
Default value: false
Source
File: wp-includes/post-template.php
function the_attachment_link( $id = 0, $fullsize = false, $deprecated = false, $permalink = false ) {
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, 'WP-2.5.0' );
if ( $fullsize )
echo wp_get_attachment_link($id, 'full', $permalink);
else
echo wp_get_attachment_link($id, 'thumbnail', $permalink);
}
Changelog
Version | Description |
---|---|
WP-2.0.0 | Introduced. |