Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mattwiebe
Created June 14, 2012 15:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mattwiebe/2931104 to your computer and use it in GitHub Desktop.
Save mattwiebe/2931104 to your computer and use it in GitHub Desktop.
Disable Twitter Embeds
<?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