实现方法:
下载 vplayer.swf 播放器:http://www.simplehost2.com/images/vplayer.swf
把播放器放到 当前使用主题目录 即 wp-content/theme/****;
在主题的 functions.php 中添加如下代码即可;
/**FLV player */ function vplayer($atts, $content=null){ extract(shortcode_atts(array("width"=>'570',"height"=>'450'),$atts)); return '<embed width="'.$width.'" height="'.$height.'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" allowfullscreen="true" src="'.get_bloginfo("template_url").'/vplayer.swf?url='.$content.'"> ';} add_shortcode('flv','vplayer');
以后写文章的时候,调用使用:
标签,当然可以传出尺寸的参数 即
[flv]http://www.simplehost2.com/images/simplehost.flv[/flv]