WPDev.one
Core Function
View Source on Trac ↗

get_the_attachment_link()

get_the_attachment_link( mixed $id = 0, mixed $fullsize = false, mixed $max_dims = false, mixed $permalink = false )

Retrieve HTML content of attachment image with link.

Parameters 0 required

Name / Type Description
$id
int

Optional. Post ID.

$fullsize
bool

Optional. Whether to use full size image. Default false.

$max_dims
array

Optional. Max image dimensions.

$permalink
bool

Optional. Whether to include permalink to image. Default false.

Return Value

(string)
string

Function Information

Since Version
2.0.0
Source File
wp-includes/deprecated.php
Advertisement