CoreFiles by mySites.guru
excerpt-video.php23 lines, 630 bytes, from wordpress-5.6-beta1.zip
Raw History Compare with 5.5-beta4
md5
d6e7ad8acc0141da80a176f52d133949
sha1
7805ef15f922f9db83da9a14956150e827af2aed
sha256
2495ca9fd8fee6fef18ea3cf6c88fc1e1027dfc48de2a8745949fbaac474b0c1
<?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 1.0.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 10 releases, WordPress 5.6-beta1 to 5.6. See them all, or every version of this file.