Core Function
View Source on Trac ↗ wp_get_attachment_url()
wp_get_attachment_url( mixed $attachment_id = 0 ) Retrieves the URL for an attachment.
Parameters 0 required
| Name / Type | Description |
|---|---|
| $attachment_id int | Optional. Attachment post ID. Defaults to global $post. |
Return Value
((string)
| false) Attachment URL, otherwise false.
Function Information
Since Version
2.1.0
Source File
wp-includes/post.php
Advertisement