kollapsminoriteten/wp-content/plugins/jetpack/extensions/blocks/podcast-player/templates/podcast-title.php

39 lines
819 B
PHP
Raw Normal View History

2020-05-06 17:20:49 +02:00
<?php
/**
* Podcast Title template.
*
2021-04-27 08:32:47 +02:00
* @package automattic/jetpack
2020-05-06 17:20:49 +02:00
*/
2022-04-02 10:26:41 +02:00
// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- This file expects $template_props set outside the file.
2020-05-06 17:20:49 +02:00
namespace Automattic\Jetpack\Extensions\Podcast_Player;
/**
* Template variables.
*
2022-04-02 10:26:41 +02:00
* @var string $template_props
2020-05-06 17:20:49 +02:00
*/
2022-04-02 10:26:41 +02:00
if ( empty( $template_props['title'] ) ) {
2020-05-06 17:20:49 +02:00
return;
}
?>
<span class="jetpack-podcast-player__podcast-title">
2022-04-02 10:26:41 +02:00
<?php if ( ! empty( $template_props['link'] ) ) : ?>
2020-05-06 17:20:49 +02:00
<a
class="jetpack-podcast-player__link"
2022-04-02 10:26:41 +02:00
href="<?php echo esc_url( $template_props['link'] ); ?>"
2020-05-06 17:20:49 +02:00
target="_blank"
rel="noopener noreferrer nofollow"
>
2022-04-02 10:26:41 +02:00
<?php echo esc_html( $template_props['title'] ); ?>
2020-05-06 17:20:49 +02:00
</a>
<?php
2022-04-02 10:26:41 +02:00
else :
echo esc_html( $template_props['title'] );
endif;
?>
2020-05-06 17:20:49 +02:00
</span>