Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 12
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2/**
3 * Podcast Title template.
4 *
5 * @html-template Automattic\Jetpack\Extensions\Podcast_Player\render
6 * @package automattic/jetpack
7 */
8
9// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- HTML template, let Phan handle it.
10
11namespace Automattic\Jetpack\Extensions\Podcast_Player;
12
13/**
14 * Template variables.
15 *
16 * @var string $template_props
17 */
18
19if ( empty( $template_props['title'] ) ) {
20    return;
21}
22
23?>
24<span class="jetpack-podcast-player__podcast-title">
25    <?php if ( ! empty( $template_props['link'] ) ) : ?>
26        <a
27            class="jetpack-podcast-player__link"
28            href="<?php echo esc_url( $template_props['link'] ); ?>"
29            target="_blank"
30            rel="noopener noreferrer nofollow"
31        >
32            <?php echo esc_html( $template_props['title'] ); ?>
33        </a>
34        <?php
35        else :
36            echo esc_html( $template_props['title'] );
37        endif;
38        ?>
39</span>