PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.5
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.5
16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 All 506 releases
jetpack / extensions / blocks / podcast-player / templates / playlist-track.php

playlist-track.php in Jetpack – WP Security, Backup, Speed, & Growth 16.3-a.5, at extensions/blocks/podcast-player/templates/playlist-track.php

51 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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
11 namespace Automattic\Jetpack\Extensions\Podcast_Player;
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit( 0 );
15 }
16
17 /**
18 * Template variables.
19 *
20 * @var array $template_props
21 */
22
23 $track_title = $template_props['attachment']['title'];
24 $track_link = empty( $template_props['attachment']['link'] ) ? $template_props['attachment']['src'] : $template_props['attachment']['link'];
25 $track_duration = ! empty( $template_props['attachment']['duration'] ) ? $template_props['attachment']['duration'] : '';
26
27 $class = 'jetpack-podcast-player__track ' . $template_props['secondary_colors']['class'];
28 $style = $template_props['secondary_colors']['style'];
29 if ( $template_props['is_active'] ) {
30 $class = 'jetpack-podcast-player__track is-active ' . $template_props['primary_colors']['class'];
31 $style = $template_props['primary_colors']['style'];
32 }
33
34 ?>
35
36 <li
37 class="<?php echo esc_attr( trim( $class ) ); ?>"
38 style="<?php echo esc_attr( $style ); ?>"
39 >
40 <a
41 class="jetpack-podcast-player__track-link jetpack-podcast-player__link"
42 href="<?php echo esc_url( $track_link ); ?>"
43 role="button"
44 <?php echo $template_props['is_active'] ? 'aria-current="track"' : ''; ?>
45 >
46 <span class="jetpack-podcast-player__track-status-icon"></span>
47 <span class="jetpack-podcast-player__track-title"><?php echo esc_html( $track_title ); ?></span>
48 <time class="jetpack-podcast-player__track-duration"><?php echo esc_html( $track_duration ); ?></time>
49 </a>
50 </li>
51