CoreFiles by mySites.guru
excerpt-audio.php23 lines, 646 bytes, from wordpress-5.7.21.zip
Raw History Compare with 5.7.20
md5
8984a0fe16b227f6d1c09659b50b7014
sha1
413c79e2decaccd5e862ec8ddbc9abd93dbf5bc6
sha256
a9a923dc2144644db3bc3bf50dc14b883ee192853cdc2bc050200fb76fcd7cd3
<?php
/**
 * Show the appropriate content for the Audio 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/audio', $content ) ) {
	twenty_twenty_one_print_first_instance_of_block( 'core/audio', $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.