Last active
January 3, 2016 13:39
-
-
Save david-binda/8471299 to your computer and use it in GitHub Desktop.
Fix for a SSL update of Twitter oembed API for WordPress by Parade dev team ( http://www.parade.com ). Quick fix till we get an core update. See: https://core.trac.wordpress.org/changeset/26967 . Might require you to resave post in which oembed request failed previously as oembeds are being cached ( see: https://github.com/WordPress/WordPress/bl…
This file contains 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
add_filter( 'oembed_providers', 'oembed_fix_twitter', 10, 1 ); | |
function oembed_fix_twitter( $providers = array() ){ | |
$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