wp_get_attachment_caption filter-hook . WP 4.6.0
Filters the attachment caption.
Usage
add_filter( 'wp_get_attachment_caption', 'filter_function_name_7299', 10, 2 ); function filter_function_name_7299( $caption, $post_id ){ // filter... return $caption; }
- $caption(string)
- Caption for the given attachment.
- $post_id(int)
- Attachment ID.
Changelog
Since 4.6.0 | Introduced. |
Where the hook is called
wp_get_attachment_caption
wp-includes/post.php 6260
return apply_filters( 'wp_get_attachment_caption', $caption, $post->ID );