Roots Discourse

How to remove the embed wrap filter in Soil?


#1

I have Soil clean-up enabled on our site. I want to use all of the features except the embed_wrap filter.

It should be as simple as remove_filter('embed_oembed_html', __NAMESPACE__ . '\\embed_wrap');, but I can’t figure out the hook/priority combo to get it to actually be removed.

I’ve tried after_theme_setup and init, along with a variety of priorities, with no success.

I know this isn’t that hard, but any pointers would be appreciated.


#2

Hi Kevin, ik used the wp action.

add_action('wp', function(){
    remove_filter('embed_oembed_html', 'Roots\Soil\CleanUp\embed_wrap');
});