Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress “过滤器不工作”;嵌入“嵌入html”;_Wordpress_Iframe_Filter_Youtube - Fatal编程技术网

Wordpress “过滤器不工作”;嵌入“嵌入html”;

Wordpress “过滤器不工作”;嵌入“嵌入html”;,wordpress,iframe,filter,youtube,Wordpress,Iframe,Filter,Youtube,我使用embed_oembed_html过滤器来锁定YouTube iframe并进行响应,但这不起作用。一些线索 我的职能: function embed_html_vanellope($html, $url, $attr){ return '<div class="video-container">' . $html . '</div>'; } add_filter('embed_oembed_html', 'embed_html_vanellope', 10

我使用embed_oembed_html过滤器来锁定YouTube iframe并进行响应,但这不起作用。一些线索

我的职能:

function embed_html_vanellope($html, $url, $attr){
    return '<div class="video-container">' . $html . '</div>';
}
add_filter('embed_oembed_html', 'embed_html_vanellope', 10, 3);
function embed\u html\u vanellope($html、$url、$attr){
返回“”。$html。“;
}
添加过滤器('embed_oembed_html','embed_html_vanellope',10,3);

谢谢

如果您正在使用Jetpack,它克服了这个短代码,您必须改用它

add_filter('video_embed_html', 'embed_html_vanellope');

如果你使用Jetpack,它会覆盖这个短代码,你必须使用它

add_filter('video_embed_html', 'embed_html_vanellope');

@克里斯蒂娜不工作!:(@Christina't work!:(如果您使用Jetpack:Goto/wp admin/admin.php?page=Jetpack_模块并禁用短代码模块如果您使用Jetpack:Goto/wp admin/admin.php?page=Jetpack_模块并禁用短代码模块