| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Theme: Classic. |
| 5 |
* |
| 6 |
* @link https://plugins360.com |
| 7 |
* @since 1.0.0 |
| 8 |
* |
| 9 |
* @package Automatic_YouTube_Gallery |
| 10 |
*/ |
| 11 |
|
| 12 |
$data_params = array( |
| 13 |
'autoplay' => (int) $attributes['autoplay'], |
| 14 |
'loop' => (int) $attributes['loop'], |
| 15 |
'controls' => (int) $attributes['controls'], |
| 16 |
'modestbranding' => (int) $attributes['modestbranding'], |
| 17 |
'cc_load_policy' => (int) $attributes['cc_load_policy'], |
| 18 |
'iv_load_policy' => (int) $attributes['iv_load_policy'], |
| 19 |
'hl' => sanitize_text_field( $attributes['hl'] ), |
| 20 |
'cc_lang_pref' => sanitize_text_field( $attributes['cc_lang_pref'] ), |
| 21 |
'autoadvance' => (int) $attributes['autoadvance'], |
| 22 |
'player_title' => (int) $attributes['player_title'], |
| 23 |
'player_description' => (int) $attributes['player_description'] |
| 24 |
); |
| 25 |
|
| 26 |
$featured_video = $videos[0]; // Featured Video |
| 27 |
$featured_video_title = ayg_get_player_title( $featured_video, $attributes ); // Featured Video Title |
| 28 |
$featured_video_description = ayg_get_player_description( $featured_video, $attributes ); // Featured Video Description |
| 29 |
?> |
| 30 |
|
| 31 |
<div class="ayg ayg-theme-classic" data-params='<?php echo wp_json_encode( $data_params ); ?>'> |
| 32 |
<!-- Player --> |
| 33 |
<div class="ayg-player"> |
| 34 |
<?php the_ayg_player( $featured_video, $attributes ); ?> |
| 35 |
|
| 36 |
<?php if ( ! empty( $featured_video_title ) || ! empty( $featured_video_description ) ) : ?> |
| 37 |
<div class="ayg-player-caption"> |
| 38 |
<?php if ( ! empty( $featured_video_title ) ) : ?> |
| 39 |
<h2 class="ayg-player-title"><?php echo esc_html( $featured_video_title ); ?></h2> |
| 40 |
<?php endif; ?> |
| 41 |
|
| 42 |
<?php if ( ! empty( $featured_video_description ) ) : ?> |
| 43 |
<div class="ayg-player-description"><?php echo wp_kses_post( make_clickable( $featured_video_description ) ); ?></div> |
| 44 |
<?php endif; ?> |
| 45 |
</div> |
| 46 |
<?php endif; ?> |
| 47 |
</div> |
| 48 |
|
| 49 |
<!-- Gallery --> |
| 50 |
<div class="ayg-gallery ayg-row"> |
| 51 |
<?php the_ayg_gallery( $videos, $attributes, $featured_video->id ); ?> |
| 52 |
</div> |
| 53 |
|
| 54 |
<!-- Pagination --> |
| 55 |
<?php the_ayg_pagination( $attributes ); ?> |
| 56 |
</div> |
| 57 |
|