CoreFiles by mySites.guru
excerpt-video.php23 lines, 646 bytes, from wordpress-6.2.zip
Raw History Compare with 6.1.17
md5
876e1268abed658c53be2ca9a6b48c21
sha1
7c0362cbc7f7ed4672846285a2a0c38a01bca62d
sha256
34f4eca147c7e3a7f0a8e44de68d874d70a4a044ef6a44ea810d274fff6112eb
<?php
/**
 * Show the appropriate content for the Video post format.
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package WordPress
 * @subpackage Twenty_Twenty_One
 * @since Twenty Twenty-One 1.0
 */

$content = get_the_content();

if ( has_block( 'core/video', $content ) ) {
	twenty_twenty_one_print_first_instance_of_block( 'core/video', $content );
} elseif ( has_block( 'core/embed', $content ) ) {
	twenty_twenty_one_print_first_instance_of_block( 'core/embed', $content );
} else {
	twenty_twenty_one_print_first_instance_of_block( 'core-embed/*', $content );
}

// Add the excerpt.
the_excerpt();

The same content is in 239 releases, WordPress 5.6.1-RC1 to 6.4-RC4. See them all, or every version of this file.