• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress a2z

WordPress a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / Files / template-parts/excerpt/excerpt-audio.php


Lines:

1 to 25 of 25
<?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();
 

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      1 to 1 of 1
      • twenty_twenty_one_print_first_instance_of_block() – Print the first instance of a block in the content, and then break away.

      Call hooks

      File name: template-parts/excerpt/excerpt-audio.php
      Plugin ref: Twenty Twenty-One
      Version: 1.7
      Deprecated?: No
      API Letters: A,E,P,T

      Published: 9th December 2020 | Last updated: 26th January 2022

      Primary Sidebar

      Information

      File name: template-parts/excerpt/excerpt-audio.php
      Plugin ref: Twenty Twenty-One
      Version: 1.7
      Deprecated?: No
      API Letters: A,E,P,T

      template-parts/excerpt

      Footer

      WordPress a2z
      WordPress a2z
      WordPress Dynamic API Reference
      WordPress 6.1.1. PHP: 8.0.28
      WordPress a2z
      WordPress core a2z
      Genesis Theme Framework a2z
      Jetpack a2z
      WordPress develop tests
      Easy Digital Downloads a2z
      WooCommerce a2z
      Yoast SEO a2z
      WordPress Blocks

      Site:  wp-a2z.org
      © Copyright WordPress a2z 2014-2023. All rights reserved.


      Website designed and developed by Herb Miller
      Proudly powered by WordPress and oik plugins

      • Home
      • Blog
      • Sitemap
      • Sites