解决方案:
第一步:
在所用主题function.php文件中加入如下代码:
//播放器 function all_dpvideo($atts, $content=null){ return '<p style="text-align: center;"><iframe allowFullscreen="true" scrolling="no" align="middle" frameborder="0" width="100%" marginwidth="0" marginheight="0" height="460"src="https://api.moviemichu.com/m3u8/index.php?url='.$content.'"></iframe> </p>'; } add_shortcode('dpvideo','all_dpvideo');
第二步:
发表文章时添加短代码:
[dpvideo][/dpvideo]
例如:
[dpvideo]https://tudou.com-l-tudou.com/20180625/11443_f5190aaa/index.m3u8[/dpvideo]
方案来自:http://api.moviemichu.com