WordPress 视频插件-WordPress 视频插件(Smartideo)绿色免费版【附代码】手游最新版本

WordPress 视频插件-WordPress 视频插件(Smartideo)绿色免费版【附代码】手游最新版本

大小:547.8M 语言: 中文

类型:健康医疗 系统:macOS

备案号:备案号:浙1O-201641363-30H
简介 相关 评论(6)
热门游戏 竞技游戏 枪战游戏 枪械游戏大全

WordPress视频播放插件Smartideo怎么安装

WordPress视频播放插件(Smartideo)安装方法

你可以在后台插件管理页面中直接搜索Smartideo并安装.

或者上传文件夹smartideo至/wp-content/plugins/目录.

在插件管理页面中激活Smartideo.

WordPress视频播放插件(Smartideo)怎么用

Smartideo插件使用方法

你可以直接粘贴视频播放也完整的URL到编辑器(单独一行),就可以加载视频播放器。

URL地址格式如下

http://v.youku.com/v_show/id_XMTYzNTgxNTMy.html

http://www.tudou.com/programs/view/YBdHhxJqrLY/

http://www.56.com/u35/v_MTEwMjM5NDcy.html

http://v.qq.com/page/o/9/f/o0142tt1m9f.html

http://v.qq.com/cover/t/tyeqdw6rof7t5ow/p0015kjlai9.html

http://my.tv.sohu.com/us/94469256/77228432.shtml

http://www.wasu.cn/Play/show/id/5079941

http://v.yinyuetai.com/video/2207109

http://v.ku6.com/show/P0Ib_pTne6-FBSa1AbtKUQ...html

http://www.letv.com/ptv/vplay/20932037.html

在wordpress上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。放置塔大亨手游下载-放置塔大亨(Idle Tower Tycoon)0.9.8 安卓版

WordPress视频播放插件Smartideo插件代码预览

<?php

/*

PluginName:Smartideo

PluginURI:http://www.fengziliu.com/

Description:Smartideo是为WordPress添加对在线视频支持的一款插件(支持手机、平板等设备HTML5播放)。目前支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等网站。

Version:1.2

Author:FensLiu

AuthorURI:http://www.fengziliu.com/smartideo-for-wordpress.html

*/

define('SMARTIDEO_VERSION','1.0');

define('SMARTIDEO_URL',plugins_url('',__FILE__));

define('SMARTIDEO_PATH',dirname(__FILE__));

$smartideo=newsmartideo();

classsmartideo{

private$width='100%';

private$height='500';

private$mobile_width='100%';

private$mobile_height='250';

publicfunction__construct(){

if(is_admin()){

add_action('admin_menu',array($this,'admin_menu'));

}

$option=get_option('smartideo_option');

if(!empty($option)){

$option=json_decode($option,true);

}else{

$option=array();

}

extract($option);

if(!empty($width)){

$this->width=$width;

}

if(!empty($height)){

$this->height=$height;

}

if(!empty($mobile_width)){

$this->mobile_width=$mobile_width;

}

if(!empty($mobile_height)){

$this->mobile_height=$mobile_height;

}

wp_embed_register_handler('smartideo_tudou',

'#https?://(?:www.)?tudou.com/(?:programs/view|listplay/(?<list_id>[a-z0-9_=-]+))/(?<video_id>[a-z0-9_=-]+)#i',

array($this,'smartideo_embed_handler_tudou'));

wp_embed_register_handler('smartideo_56',

'#https?://(?:www.)?56.com/[a-z0-9]+/(?:play_album-aid-[0-9]+_vid-(?<video_id1>[a-z0-9_=-]+)|v_(?<video_id2>[a-z0-9_=-]+))#i',

array($this,'smartideo_embed_handler_56'));

wp_embed_register_handler('smartideo_youku',

'#https?://v.youku.com/v_show/id_(?<video_id>[a-z0-9_=-]+)#i',

array($this,'smartideo_embed_handler_youku'));

wp_embed_register_handler('smartideo_qq',

'#https?://v.qq.com/(?:cover/g/[a-z0-9_.]+?vid=(?<video_id1>[a-z0-9_=-]+)|(?:[a-z0-9/]+)/(?<video_id2>[a-z0-9_=-]+))#i',

array($this,'smartideo_embed_handler_qq'));

wp_embed_register_handler('smartideo_sohu',

'#https?://my.tv.sohu.com/us/(?:d+)/(?<video_id>d+)#i',

array($this,'smartideo_embed_handler_sohu'));

wp_embed_register_handler('smartideo_wasu',

'#https?://www.wasu.cn/play/show/id/(?<video_id>d+)#i',

array($this,'smartideo_embed_handler_wasu'));

wp_embed_register_handler('smartideo_yinyuetai',

'#https?://v.yinyuetai.com/video/(?<video_id>d+)#i',

array($this,'smartideo_embed_handler_yinyuetai'));

wp_embed_register_handler('smartideo_ku6',

'#https?://v.ku6.com/show/(?<video_id>[a-z0-9-_.]+).html#i',

array($this,'smartideo_embed_handler_ku6'));

wp_embed_register_handler('smartideo_letv',

'#https?://www.letv.com/ptv/vplay/(?<video_id>d+)#i',

array($this,'smartideo_embed_handler_letv'));

}

publicfunctionsmartideo_embed_handler_tudou($matches,$attr,$url,$rawattr){

if(wp_is_mobile()){

$embed=$this->get_iframe("http://www.tudou.com/programs/view/html5embed.action?type=0&code={$matches['video_id']}");

}else{

$embed=$this->get_embed("http://www.tudou.com/v/{$matches['video_id']}/&resourceId=0_05_05_99&bid=05/v.swf");

}

returnapply_filters('embed_tudou',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_56($matches,$attr,$url,$rawattr){

$matches['video_id']=$matches['video_id1']==''?$matches['video_id2']:$matches['video_id1'];

if(wp_is_mobile()){

$embed=$this->get_iframe("http://www.56.com/iframe/{$matches['video_id']}");

}else{

$embed=$this->get_embed("http://player.56.com/v_{$matches['video_id']}.swf");

}

returnapply_filters('embed_56',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_youku($matches,$attr,$url,$rawattr){

if(wp_is_mobile()){

$embed=$this->get_iframe("http://player.youku.com/embed/{$matches['video_id']}");

}else{

$embed=$this->get_embed("http://player.youku.com/player.php/sid/{$matches['video_id']}/v.swf");

}

returnapply_filters('embed_youku',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_qq($matches,$attr,$url,$rawattr){

$matches['video_id']=$matches['video_id1']==''?$matches['video_id2']:$matches['video_id1'];

if(wp_is_mobile()){

$embed=$this->get_iframe("http://v.qq.com/iframe/player.html?vid={$matches['video_id']}");

}else{

$embed=$this->get_embed("http://static.video.qq.com/TPout.swf?vid={$matches['video_id']}");

}

returnapply_filters('embed_qq',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_sohu($matches,$attr,$url,$rawattr){

if(wp_is_mobile()){

$embed=$this->get_iframe("http://tv.sohu.com/upload/static/share/share_play.html#{$matches['video_id']}_0_0_9001_0");

}else{

$embed=$this->get_embed("http://share.vrs.sohu.com/my/v.swf&topBar=1&id={$matches['video_id']}&autoplay=false&xuid=&from=page");

}

returnapply_filters('embed_sohu',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_wasu($matches,$attr,$url,$rawattr){

if(wp_is_mobile()){

$embed=$this->get_iframe("http://www.wasu.cn/Play/iframe/id/{$matches['video_id']}");

}else{

$embed=$this->get_embed("http://s.wasu.cn/portal/player/20141216/WsPlayer.swf?mode=3&vid={$matches['video_id']}&auto=0&ad=4228");

}

returnapply_filters('embed_wasu',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_yinyuetai($matches,$attr,$url,$rawattr){

$embed=$this->get_embed("http://player.yinyuetai.com/video/player/{$matches['video_id']}/v_0.swf");

returnapply_filters('embed_yinyuetai',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_ku6($matches,$attr,$url,$rawattr){

$embed=$this->get_embed("http://player.ku6.com/refer/{$matches['video_id']}/v.swf");

returnapply_filters('embed_ku6',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_letv($matches,$attr,$url,$rawattr){

$embed=$this->get_embed("http://i7.imgs.letv.com/player/swfPlayer.swf?id={$matches['video_id']}&autoplay=0");

returnapply_filters('embed_letv',$embed,$matches,$attr,$url,$rawattr);

}

privatefunctionget_embed($url){

$embed=sprintf(

'<embedsrc="%1$s"allowFullScreen="true"quality="high"width="%2$s"height="%3$s"allowScriptAccess="always"type="application/x-shockwave-flash"></embed>',

$url,$this->width,$this->height);

return$embed;

}

privatefunctionget_iframe($url){

$iframe=sprintf(

'<iframesrc="%1$s"width="%2$s"height="%3$s"frameborder="0"allowfullscreen="true"></iframe>',

$url,$this->mobile_width,$this->mobile_height);

return$iframe;

}

publicfunctionadmin_menu(){

add_plugins_page('Smartideo设置','Smartideo设置','manage_options','smartideo_settings',array($this,'admin_settings'));

}

publicfunctionadmin_settings(){

if($_POST['smartideo_submit']=='保存'){

$param=array('width','height','mobile_width','mobile_height');

$json=array();

foreach($_POSTas$key=>$val){

if(in_array($key,$param)){

$json[$key]=$val;

}

}

$json=json_encode($json);

update_option('smartideo_option',$json);

}

$option=get_option('smartideo_option');

if(!empty($option)){

$option=json_decode($option,true);

}

if(empty($option['width'])){

$option['width']='100%';

}

if(empty($option['height'])){

$option['height']='500';

}

if(empty($option['mobile_width'])){

$option['mobile_width']='100%';

}

if(empty($option['mobile_height'])){

$option['mobile_height']='250';

}

echo'<h2>Smartideo设置</h2>';

echo'<formaction=""method="post">

      <tableclass="form-table">

<trvalign="top">

          <thscope="row">播放器宽度</th>

          <td>

            <label><inputtype="text"class="regular-textcode"name="width"value="'.$option['width'].'"></label>

            <br/>

            <pclass="description">默认宽度为100%</p>

          </td>

</tr>

<trvalign="top">

          <thscope="row">播放器高度</th>

          <td>

            <label><inputtype="text"class="regular-textcode"name="height"value="'.$option['height'].'"></label>

            <br/>

            <pclass="description">默认高度为500px</p>

          </td>

</tr>

        <trvalign="top">

          <thscope="row">移动设备播放器宽度</th>

          <td>

            <label><inputtype="text"class="regular-textcode"name="mobile_width"value="'.$option['mobile_width'].'"></label>

            <br/>

            <pclass="description">手机、平板等设备访问时,默认宽度为100%</p>

          </td>

</tr>

<trvalign="top">

          <thscope="row">移动设备播放器高度</th>

          <td>

            <label><inputtype="text"class="regular-textcode"name="mobile_height"value="'.$option['mobile_height'].'"></label>

            <br/>

            <pclass="description">手机、平板等设备访问时,默认高度为250px</p>

          </td>

</tr>

      </table>

      <pclass="submit"><inputtype="submit"name="smartideo_submit"id="submit"class="button-primary"value="保存"></p>

    </form>';

}

}

WordPress插件安装方法

[WordPress插件怎样安装WordPress插件安装方法]

2元3d走势图 彩乐盆景园 亚博全站网址 博彩存送网站 头头 博彩
展开全部
应用信息
用户评论 跟帖评论

热门评论

最新评论

2025/11/02 10:28
如果你在找简洁强大的看小说阅读软件的话,那么推荐你下载起源书阁app,这款软件可以让你随时随地在线看小说。很多小说都是经典热门的,还有最新作者书籍在线阅读,你喜...

支持( 77 ) 盖楼(回复)

2025/10/26 15:49
带你体验在城市中运输宠物的感觉,城市自行车宠物运输游戏(citybikepetanimalTransporter),一款好玩的模拟运输游戏,有猫,狗,珍稀物种的...

支持( 130 ) 盖楼(回复)

2025/10/31 17:42
AutodeskMaya2014官方版,是一款顶级三维动画软件,它包括一般三维和视觉效果制作的功能,与最先进的建模、数字化布料模拟、毛发渲染、运动匹配技术相结合...

支持( 180 ) 盖楼(回复)

2025/11/11 20:46
非人哉动漫同名正版授权手游非人哉摸鱼神仙真是个hi上线,作为一个名副其实的打工人,我们每个人上班的过程中都可能经历一件事:摸鱼;游戏中有着不同的角色,他们的摸鱼...

支持( 124 ) 盖楼(回复)

2025/10/26 05:43
一恋永恒宫廷换装恋爱攻略游戏就等你来!宫廷游戏一恋永恒换肤,一恋永恒游戏在哪下载?直接点击立即下载就可以带走游戏了,这里是2020最新版本的一恋永恒古装游戏下载...

支持( 101 ) 盖楼(回复)

2025/10/29 06:28
2017高考考神附体表情包让每一个考生都是可以得到考神附体的,让你考出更好的分数,喜欢在自己的QQ空间以及朋友圈上面发布的的话就可以来免费的下载!2017高考考...

支持( 128 ) 盖楼(回复)

2025/10/29 16:53
蛮荒传奇九游版本是目前福利最多的渠道服版本,大家需要的礼包码这些,实际上都可以免费在游戏内领取,官方账号,九游账号等都可以登录和读取,热血攻沙,时装变身,百倍爆...

支持( 70 ) 盖楼(回复)

2025/11/16 17:55
i必过手机版app是一款网络学习教育平台,用户可以在上面学习知识点讲解,练习题目,考前划重点,名师在线答疑等等,还有模拟考试测试。软件介绍i必过APP是一款在线...

支持( 158 ) 盖楼(回复)

2025/10/27 06:37
PoliticalAnimals中文版是一款非常好玩的精选模拟游戏,游戏背景为架空世界,在游戏中你将扮演一名政治家,会同流合污,还是正直,你的选择会有不同的结果...

支持( 21 ) 盖楼(回复)

2025/11/16 04:15
民用无人驾驶航空器综合管理平台的手机app,就叫uom软件,是官方推出的一款无人机登记,执照发型,签注功能等的综合平台,如果你手上有无人机,可以看下这个app里...

支持( 155 ) 盖楼(回复)

2025/11/14 06:03
东天猫口罩监控是一款抢购买口罩的提示软件,可自行添加京东和天猫的商品ID,设置间隔和线程数开始工作!京东天猫口罩到货监控工具使用方法可以使用微信推送,登录将SC...

支持( 158 ) 盖楼(回复)

2025/11/08 09:25
每个人都有属于自己的舞台,自己的专长,只要你肯努力。今天东坡小编为大家带来的是一份图文完整的人教版小学五年级语文上册我的舞台ppt课件,欢迎前来下载!《我的舞台...

支持( 127 ) 盖楼(回复)

2025/10/28 17:22
叮当来啦商家版app是一款商家用来接单的软件,商家可以通过app快速接单,处理订单,订单配饰等功能,非常实用!商家必备!叮当来啦商家版介绍叮当来啦商家版是加盟叮...

支持( 24 ) 盖楼(回复)

2025/11/06 13:55
剑侠小青手机助手全方面的为端游剑侠世界准备的手游助手,可以在手机上面为你实现一些简单的操作,而且功能还是非常的多的,建议大家可以免费下载体验下!剑侠小青手机助手...

支持( 142 ) 盖楼(回复)

2025/11/16 11:05
双生幻想魔法大陆手游是款二次元冒险类的游戏,游戏上线就是十连抽,海量养成体验,多样战斗来挑战,奇趣的冒险世界等你来体验。双生幻想魔法大陆手游介绍1、游戏画面质感...

支持( 101 ) 盖楼(回复)