Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if ( $video = get_post_meta( $post->ID, 'cf_video', true ) ) { ?>
- <?php
- $parse = parse_url( $video );
- if ( $parse ) {
- parse_str( $parse['query'], $video );
- if ( $video['v'] ) {
- ?>
- <div class="video" style="background: #9fbe4b"><a class="youtube" href="http://www.youtube.com/embed/<?php echo $video['v']; ?>?&wmode=transparent">Video</a></div>
- <?php
- }
- }
- }
- ?>
- <script type="text/javascript">
- jQuery(document).ready(function($) {
- $(".youtube").colorbox({ iframe:true, innerWidth:425, innerHeight:344 });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement