Created
October 22, 2011 04:11
-
-
Save whyisjake/1305609 to your computer and use it in GitHub Desktop.
Simple YouTube Embederator
This file contains 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
<?php | |
function make_youtube_embed($width,$height) { | |
global $wp_query; | |
$big_video = get_post_custom_values('Big Video'); | |
?> | |
<object width="<?php echo $width; ?>" height="<?php echo $height; ?>"> | |
<param name="movie" value="http://www.youtube-nocookie.com/v/<?php echo $big_video[0]; ?>?showinfo=1&version=3&hl=en_US&hd=1"></param> | |
<param name="allowFullScreen" value="true"></param> | |
<param name="allowscriptaccess" value="always"></param> | |
<param name="wmode" value="transparent" /> | |
<embed | |
src="http://www.youtube-nocookie.com/v/<?php echo $big_video[0]; ?>?showinfo=1&version=3&hl=en_US&hd=1" | |
type="application/x-shockwave-flash" | |
width="<?php echo $width; ?>" | |
height="<?php echo $height; ?>" | |
allowscriptaccess="always" | |
wmode="transparent" | |
allowfullscreen="true"> | |
</embed> | |
</object> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment