wp-includes/post-thumbnail-template.php:297Returns the post thumbnail caption.
$postint|WP_Post|nulloptionalnullstringfunction 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;}Introduced in 4.6.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
$post retyped from int|WP_Post to int|WP_Post|null.verified against sourcesrc/wp-includes/post-thumbnail-template.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.