Improve featured video

The `$p->video` should return the video link only, to get the video ID we can use get_video_id(); and call it from the theme.
This commit is contained in:
danpros 2021-03-26 09:07:27 +07:00
commit 84f4e565e6
13 changed files with 15 additions and 136 deletions

View file

@ -39,7 +39,7 @@
<?php } ?>
<?php if (!empty($p->video)) { ?>
<div class="featured featured-video embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/<?php echo $p->video; ?>" frameborder="0" allowfullscreen></iframe>
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/<?php echo get_video_id($p->video); ?>" frameborder="0" allowfullscreen></iframe>
</div>
<?php } ?>
<?php if (!empty($p->audio)) { ?>

View file

@ -14,7 +14,7 @@
<?php } ?>
<?php if (!empty($p->video)) { ?>
<div class="featured featured-video embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/<?php echo $p->video; ?>" frameborder="0" allowfullscreen></iframe>
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/<?php echo get_video_id($p->video); ?>" frameborder="0" allowfullscreen></iframe>
</div>
<?php } ?>
<?php if (!empty($p->audio)) { ?>