Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function youtube( $atts, $value = 'http://' ) {
- extract( shortcode_atts( array(
- "width" => '620',
- "height" => '350',
- "name"=> 'movie',
- "allowFullScreen" => 'true',
- "allowScriptAccess"=>'always',
- ), $atts ) );
- $output = '
- <object style="height: '
- . $height
- . 'px; width: '
- . $width
- . 'px"><param name="'
- . $name
- . '" value="'
- . $value
- . '"><param name="allowFullScreen" value="'
- . $allowFullScreen
- . '"></param><param name="allowScriptAccess" value="'
- . $allowScriptAccess
- . '"></param><embed src="'
- . $value
- . '" type="application/x-shockwave-flash" allowfullscreen="'
- . $allowFullScreen
- . '" allowScriptAccess="'
- . $allowScriptAccess
- . '" width="'
- . $width
- . '" height="'
- . $height
- . '"></embed></object>';
- return $output;
- }
- add_shortcode( 'yt', 'youtube' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement