ru-se.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

excerpt-image.php (520B)


      1 <?php
      2 /**
      3  * Show the appropriate content for the Image post format.
      4  *
      5  * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
      6  *
      7  * @package WordPress
      8  * @subpackage Twenty_Twenty_One
      9  * @since Twenty Twenty-One 1.0
     10  */
     11 
     12 // If there is no featured-image, print the first image block found.
     13 if (
     14 	! twenty_twenty_one_can_show_post_thumbnail() &&
     15 	has_block( 'core/image', get_the_content() )
     16 ) {
     17 
     18 	twenty_twenty_one_print_first_instance_of_block( 'core/image', get_the_content() );
     19 }
     20 
     21 the_excerpt();