Last active
September 14, 2017 12:39
-
-
Save jasonglisson/268fd5d1c0bace312ca4 to your computer and use it in GitHub Desktop.
Video Modal WIndow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="featured-video-wrap" style="display:none;"> | |
<div class="close-video">Close</div> | |
<?php if (strpos($video_url, 'vimeo') !== FALSE) { | |
$id = substr($video_url, strrpos($video_url, '/') + 1);?> | |
<iframe src="https://player.vimeo.com/video/<?php print $id; ?>" width="560" height="315" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> | |
<?php } elseif(strpos($video_url, 'watch') !== FALSE) { | |
$id = substr($video_url, strrpos($video_url, '=') + 1);?> | |
<iframe width="560" height="315" src="https://www.youtube.com/embed/<?php print $id; ?>" frameborder="0" allowfullscreen></iframe> | |
<?php } elseif(strpos($video_url, 'youtu.be') !== FALSE) { | |
$id = substr($video_url, strrpos($video_url, '/') + 1);?> | |
<iframe width="560" height="315" src="https://www.youtube.com/embed/<?php print $id; ?>" frameborder="0" allowfullscreen></iframe> | |
<?php } ?> | |
</div> | |
<div class="video-lightbox" style="display:none;"></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment