Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Fix Twitter embeds in WordPress < 3.8.1
add_filter( 'oembed_providers', 'oembed_fix_twitter', 10, 1 );
function oembed_fix_twitter( $providers ) {
$providers[ '#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i' ] = array( '{format}', true );
return $providers;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.