wp_get_attachment_caption WordPress Filter Hook
The wp_get_attachment_caption hook is used to get the caption for an attachment. This is useful for displaying the caption for an image or other media attachment.
apply_filters( 'wp_get_attachment_caption', string $caption , int $post_id ) #
Filters the attachment caption.
Parameters
- $caption
(string)Caption for the given attachment.
- $post_id
(int)Attachment ID.
Source
File: wp-includes/post.php
Changelog
Version | Description |
---|---|
4.6.0 | Introduced. |