Created
January 22, 2016 15:20
-
-
Save sidonaldson/ed2a5b76114abd7d42b4 to your computer and use it in GitHub Desktop.
Add this to functions.php to remove the auto-embed feature of WP >=4
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
| remove_shortcode( 'embed' ); | |
| remove_filter( 'the_content', [ $GLOBALS['wp_embed'], 'autoembed' ], 8 ); | |
| remove_filter( 'the_content', [ $GLOBALS['wp_embed'], 'run_shortcode' ], 8 ); | |
| remove_action( 'edit_form_advanced', [ $GLOBALS['wp_embed'], 'maybe_run_ajax_cache' ] ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment