- Code: Select all
$FUNCS->register_shortcode( 'soundcloud', 'soundcloud_handler' );
function soundcloud_handler( $params, $content=null ){
global $FUNCS;
extract( $FUNCS->get_named_vars(array(
'url' => '',
'height' => '166',
'width' => '100%',
'params' => 'color=0066cc',
), $params) );
$src = "$url" . "&" . "$params";
$html =<<<EOS
<iframe width="$width" height="$height" scrolling="no" frameborder="no" src="$src"></iframe>
EOS;
return $html;
}
Sorry, try this - I'm terrible at making small mistakes. The woes of coding, haha.