Created
June 14, 2012 15:50
-
-
Save mattwiebe/2931104 to your computer and use it in GitHub Desktop.
Disable Twitter Embeds
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 | |
/* | |
Plugin Name: Disable Twitter Embeds | |
Description: Disables the Twitter embeds introduced in WordPress 3.4 | |
Version: 1.0 | |
Author: Matt Wiebe | |
Author URI: http://mattwiebe.wordpress.com/ | |
*/ | |
add_action( 'init', 'mw_remove_twitter_embeds' ); | |
function mw_remove_twitter_embeds() { | |
wp_embed_unregister_handler( '#https?://(www\.)?twitter.com/.+?/status(es)?/.*#i' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment