Ext.: https://www.xhsay.com/wp-iframe-handler-youku-tudou.html
Although WordPress can directly insert Youku, potato Video but can not be viewed on the mobile side, so stupid began to all kinds of toss finally found the right solution
In addition, say a support mobile-adaptive Oh.
function code
function in the theme functions file . Add the following code inside PHP to ensure the last one? > it's all right.
//YoukufunctionWp_iframe_handler_youku ($matches,$attr,$url,$rawattr) {if(Wp_is_mobile ()) {$height= 200;} Else {$height= 485;}$iframe= ' <iframe width=100% height= '. Esc_attr ($height) . ' px src= ' http://player.youku.com/embed/'. Esc_attr ($matches[1]). ' "Frameborder=0 allowfullscreen></iframe> ';returnApply_filters (' Iframe_youku ',$iframe,$matches,$attr,$url,$ramattr);} Wp_embed_register_handler (' Youku_iframe ', ' #http://v.youku.com/v_show/id_ (. *?). Html#i ', ' Wp_iframe_handler_youku ');//TudoufunctionWp_iframe_handler_tudou ($matches,$attr,$url,$rawattr) {if(Wp_is_mobile ()) {$height= 200;} Else {$height= 485;}$iframe= ' <iframe width=100% height= '. Esc_attr ($height) . ' px src= ' http://www.tudou.com/programs/view/html5embed.action?code= '. Esc_attr ($matches[1]). ' "Frameborder=0 allowfullscreen></iframe> ';returnApply_filters (' Iframe_tudou ',$iframe,$matches,$attr,$url,$ramattr);} Wp_embed_register_handler (' Tudou_iframe ', ' #http://www.tudou.com/programs/view/(. *?) /#i ', ' Wp_iframe_handler_tudou ');//Remove ZH_CN Default HandlerWp_embed_unregister_handler (' Youku '); Wp_embed_unregister_handler (' Tudou ');
How to add video
You should know that, but let's just say it. Add links directly under visualizations OK
Http://v.youku.com/v_show/id_XMTQzOTU2NDg1Mg==.html
WordPress solves Youku, potato video Mobile viewing problems and self-adapting