get_the_post_thumbnail_caption

Advertisement

Summery Summery

Returns the post thumbnail caption.

Syntax Syntax

get_the_post_thumbnail_caption( int|WP_Post $post = null )

Parameters Parameters

$post

(Optional) Post ID or WP_Post object. Default is global $post.

Default value: null

Return Return

(string) Post thumbnail caption.

Source Source

File: wp-includes/post-thumbnail-template.php

	if ( $url ) {
		echo esc_url( $url );
	}
}

/**
 * Returns the post thumbnail caption.
 *
 * @since 4.6.0
 *
 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
 * @return string Post thumbnail caption.
 */

Advertisement

Changelog Changelog

Changelog
Version Description
4.6.0 Introduced.

Advertisement

Leave a Reply