Core Function
View Source on Trac ↗ wp_get_attachment_caption()
wp_get_attachment_caption( mixed $post_id = 0 ) Retrieves the caption for an attachment.
Parameters 0 required
| Name / Type | Description |
|---|---|
| $post_id int | Optional. Attachment ID. Default is the ID of the global `$post`. |
Return Value
((string)
| false) Attachment caption on success, false on failure.
Function Information
Since Version
4.6.0
Source File
wp-includes/post.php
Advertisement