Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Forked from markjaquith/fix-twitter-https.php
Created January 22, 2014 16:40
Show Gist options
  • Save deckerweb/8562127 to your computer and use it in GitHub Desktop.
Save deckerweb/8562127 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'oembed_providers', 'oembed_fix_twitter', 10, 1 );
function oembed_fix_twitter( $providers ) {
$providers[ '#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i' ] = array( 'https://api.twitter.com/1/statuses/oembed.{format}', true );
return $providers;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment