Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
oEmbed in WordPress
<?php
/**
* Remove the autoemed functionality in WordPres
*
* By using this filter, URLs from Youtube, Twitter etc. won't transform into embeded contents
**/
add_action( 'init', 'fwe_remove_auto_embed' );
function fwe_remove_auto_embed(){
remove_filter(
'the_content',
array( $GLOBALS['wp_embed'], 'autoembed' ),
8
);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment