Created
March 16, 2016 09:47
-
-
Save websupporter/cb1b11c19cb54d832b0e to your computer and use it in GitHub Desktop.
oEmbed in WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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