[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentytwentyone/template-parts/excerpt/ -> excerpt-audio.php (source)

   1  <?php
   2  /**
   3   * Show the appropriate content for the Audio 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  $content = get_the_content();
  13  
  14  if ( has_block( 'core/audio', $content ) ) {
  15      twenty_twenty_one_print_first_instance_of_block( 'core/audio', $content );
  16  } elseif ( has_block( 'core/embed', $content ) ) {
  17      twenty_twenty_one_print_first_instance_of_block( 'core/embed', $content );
  18  } else {
  19      twenty_twenty_one_print_first_instance_of_block( 'core-embed/*', $content );
  20  }
  21  
  22  // Add the excerpt.
  23  the_excerpt();


Generated: Sun Nov 24 01:00:02 2024 Cross-referenced by PHPXref 0.7.1