Files

17 lines
654 B
PHP

<?php
/**
* Latest Podcast block render.
*
* @package CHRNX
*/
$chrnx_post_id = chrnx_get_latest_podcast_id();
if ( 0 === $chrnx_post_id ) {
return;
}
$chrnx_heading = chrnx_get_heading_level( $attributes['headingLevel'] ?? 2, 2 );
?>
<section <?php echo get_block_wrapper_attributes( array( 'class' => 'chrnx-latest-podcast' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> aria-label="<?php echo esc_attr__( 'Latest podcast', 'chrnx' ); ?>">
<?php echo chrnx_get_editorial_card_markup( $chrnx_post_id, $chrnx_heading, 'chrnx-podcast-card' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</section>