wordpress snippets last updated   : October 6, 2014
we now have 641 snippets

Enable oEmbed in Text/HTML Widgets

wordpress snippet

Adding this PHP snippet to the functions.php of your wordpress theme will enable oembed for widgets.

snippet :  PHPcopy
add_filter( 'widget_text', array( $wp_embed, 'run_shortcode' ), 8 );
add_filter( 'widget_text', array( $wp_embed, 'autoembed'), 8 );

Did you like this post? If so please share it with your friends. Thanks!

jqsnipp.com | we just launched jquery snippets website