CoreFiles by mySites.guru
featured-image.php43 lines, 870 bytes, from wordpress-5.3.21.zip
Raw History Compare with 5.3.20
md5
02bcb965e2bf26f139c347aa31b919c1
sha1
fc71cb7fec776227dde9f231666f0f889571d0bd
sha256
2e570bcf7e37710331f91a9c6e4d45c89d7aa26c8cd587012fea95be099712c4
<?php
/**
 * Displays the featured image
 *
 * @package WordPress
 * @subpackage Twenty_Twenty
 * @since 1.0.0
 */

if ( has_post_thumbnail() && ! post_password_required() ) {

	$featured_media_inner_classes = '';

	// Make the featured media thinner on archive pages.
	if ( ! is_singular() ) {
		$featured_media_inner_classes .= ' medium';
	}
	?>

	<figure class="featured-media">

		<div class="featured-media-inner section-inner<?php echo $featured_media_inner_classes; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?>">

			<?php
			the_post_thumbnail();

			$caption = get_the_post_thumbnail_caption();

			if ( $caption ) {
				?>

				<figcaption class="wp-caption-text"><?php echo esc_html( $caption ); ?></figcaption>

				<?php
			}
			?>

		</div><!-- .featured-media-inner -->

	</figure><!-- .featured-media -->

	<?php
}

The same content is in 38 releases, WordPress 5.3-beta3 to 5.3.28. See them all, or every version of this file.