Skip to content

Instantly share code, notes, and snippets.

@michael-simons
Created December 21, 2011 08:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michael-simons/1505265 to your computer and use it in GitHub Desktop.
Save michael-simons/1505265 to your computer and use it in GitHub Desktop.
Enables automatic embedding of twitter updates through oembed
<?php
/*
Plugin Name: Enable Twitter oEmbed
Description: Enables automatic embedding of twitter updates through oembed
Author: Michael Simons
Version: 1.0
Author URI: http://michael-simons.eu
*/
wp_oembed_add_provider('#https?://twitter.com/\#!/[a-z0-9_]{1,20}/status/\d+#i', 'https://api.twitter.com/1/statuses/oembed.json', true);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment