parts
3 weeks ago
scss
2 years ago
fallback.php
3 weeks ago
single-presto-media.php
3 weeks ago
unauthorized.php
3 weeks ago
video.php
2 weeks ago
single-presto-media.php
64 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Template Name: single-pp_video_block |
| 5 | * Description: custom template for media hub item. |
| 6 | * Template Post Type: pp_video_block |
| 7 | */ |
| 8 | |
| 9 | use PrestoPlayer\Models\ReusableVideo; |
| 10 | |
| 11 | if ( ! defined( 'ABSPATH' ) ) { |
| 12 | exit; // Exit if accessed directly. |
| 13 | } |
| 14 | ?> |
| 15 | <!DOCTYPE html> |
| 16 | <html <?php language_attributes(); ?>> |
| 17 | <head> |
| 18 | <meta charset="<?php bloginfo('charset'); ?>" /> |
| 19 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 20 | <?php wp_head(); ?> |
| 21 | </head> |
| 22 | <body <?php body_class(); ?>> |
| 23 | <?php wp_body_open(); ?> |
| 24 | <?php |
| 25 | $media_hub = new ReusableVideo(); |
| 26 | $poster_url = $media_hub->getPosterFromBlock(); |
| 27 | $style = $poster_url ? "background-image: url(" . esc_url($poster_url) . ");" : ""; |
| 28 | $video_width_style = "width: " . $media_hub->getInstantVideoWidth(); |
| 29 | ?> |
| 30 | <div class="pp-content" style="<?php echo esc_attr($style); ?>"> |
| 31 | <header class="pp-header" style="<?php echo esc_attr($style); ?>"> |
| 32 | <!-- <div class="pp-header__back-icon"> |
| 33 | <?php /* if (!empty(wp_get_referer())) : */ ?> |
| 34 | <a id="pp-back-btn" href="<?php echo esc_url(wp_get_referer()); ?>" class="pp-header__header-icon"> |
| 35 | <svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 36 | <path d="M10.625 12.75L6.375 8.5L10.625 4.25" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /> |
| 37 | </svg> |
| 38 | </a> |
| 39 | <?php /* endif; */ ?> |
| 40 | </div> --> |
| 41 | <h1 class="pp-header__title"> |
| 42 | <span class="pp-header__title-text"> |
| 43 | <?php the_title(); ?> |
| 44 | </span> |
| 45 | <?php if (empty($media_hub->instantVideoPageEnabled())) : ?> |
| 46 | <span class="pp-status-tag"><?php esc_html_e('Unpublished', 'presto-player'); ?></span> |
| 47 | <?php endif; ?> |
| 48 | </h1> |
| 49 | <!-- <div class="pp-header__home-icon"> |
| 50 | <a href="<?php /* echo esc_url(get_home_url()); */ ?>" id="pp-home-btn" class="pp-header__header-icon"> |
| 51 | <svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| 52 | <path d="M2.125 6.37502L8.5 1.41669L14.875 6.37502V14.1667C14.875 14.5424 14.7257 14.9027 14.4601 15.1684C14.1944 15.4341 13.8341 15.5834 13.4583 15.5834H3.54167C3.16594 15.5834 2.80561 15.4341 2.53993 15.1684C2.27426 14.9027 2.125 14.5424 2.125 14.1667V6.37502Z" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /> |
| 53 | <path d="M6.375 15.5833V8.5H10.625V15.5833" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /> |
| 54 | </svg> |
| 55 | </a> |
| 56 | </div> --> |
| 57 | </header> |
| 58 | <main class="pp-video" id="post-<?php the_ID(); ?>" style="<?php echo esc_attr($video_width_style) ?>"> |
| 59 | <?php the_content(); ?> |
| 60 | </main> |
| 61 | </div> |
| 62 | <?php wp_footer(); ?> |
| 63 | </body> |
| 64 | </html> |