I'm working on creating a shortcode to embed locally hosted Quicktime movies, but I can't seem to get the default attributes to stick. Here's what I'm working with, can anyone spot anything obviously wrong? The result gives me no value for an unspecified attribute at all (in this case height/width), rather than the desired defaults of 480 and 320. If specified, it works as intended.
<?php
function quicktime_embedder( $atts, $content = null ) {
extract( shortcode_atts( array(
'url' => '#',
'width' => '480',
'height' => '320'
), $atts ) );
return '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="300" width="500">
<param name="src" value="http://www.yoursite.com/video/video1.mov">
<param name="autoplay" value="false">
<param name="controller" value="true">
<param name="type" value="video/quicktime" height="'.$atts[height].'" width="'.$atts[width].'">
<embed src="'.$atts[url].'"
height="'.$atts[height].'" width="'.$atts[width].'" autoplay="false" type="video/quicktime"
pluginspage="http://www.apple.com/quicktime/download/">
</object>';
}
add_shortcode( 'quicktime', 'quicktime_embedder' );
?>