summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/extensions/blocks/podcast-player/templates/podcast-title.php')
-rw-r--r--plugins/jetpack/extensions/blocks/podcast-player/templates/podcast-title.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/plugins/jetpack/extensions/blocks/podcast-player/templates/podcast-title.php b/plugins/jetpack/extensions/blocks/podcast-player/templates/podcast-title.php
new file mode 100644
index 00000000..ce5b59ca
--- /dev/null
+++ b/plugins/jetpack/extensions/blocks/podcast-player/templates/podcast-title.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Podcast Title template.
+ *
+ * @package automattic/jetpack
+ */
+
+namespace Automattic\Jetpack\Extensions\Podcast_Player;
+
+/**
+ * Template variables.
+ *
+ * @var string $template_props
+ */
+
+if ( empty( $template_props['title'] ) ) {
+ return;
+}
+
+?>
+<span class="jetpack-podcast-player__podcast-title">
+ <?php if ( ! empty( $template_props['link'] ) ) : ?>
+ <a
+ class="jetpack-podcast-player__link"
+ href="<?php echo esc_url( $template_props['link'] ); ?>"
+ target="_blank"
+ rel="noopener noreferrer nofollow"
+ >
+ <?php echo esc_html( $template_props['title'] ); ?>
+ </a>
+ <?php
+ else :
+ echo esc_html( $template_props['title'] );
+ endif;
+ ?>
+</span>