You appear to be a bot. Output may be restricted
Description
Returns the post thumbnail caption.
Usage
$string = get_the_post_thumbnail_caption( $post );
Parameters
- $post
- ( int|WP_Post ) optional – Optional. Post ID or WP_Post object. Default is global `$post`.
Returns
string Post thumbnail caption.
Source
File name: wordpress/wp-includes/post-thumbnail-template.php
Lines:
1 to 15 of 15
function get_the_post_thumbnail_caption( $post = null ) { $post_thumbnail_id = get_post_thumbnail_id( $post ); if ( ! $post_thumbnail_id ) { return ''; } $caption = wp_get_attachment_caption( $post_thumbnail_id ); if ( ! $caption ) { $caption = ''; } return $caption; }