This tweet is being displayed using oEmbed between WordPress and Twitter. This capability was added a few minutes ago after I pasted Otto’s code snippet into my theme’s functions.php file:
So can an oEmbed'ed tweet also embed the Youtube video?http://t.co/IbyDjsdf
— Jan Dembowski (@jan_dembowski) December 21, 2011
That’s pretty remarkable. I’ve embedded a tweet that has an embedded Youtube video in it. I didn’t even bother to wrap the URL in the [ embed] … [ /embed] shortcode, I just pasted in the link to that tweet.
That’s very cool! It shouldn’t be long before this is put into a plugin; I put it into my theme’s functions.php because I’m used to poking in there.
Interestingly enough, when the Twitter Blackbird Pie plugin is activated it overrides the oEmbed output and puts the tweet into that nice format that they use. For now I’ll use the oEmbed option.
Otto says:
If you want to use it in a plugin, add this in front of it and put it in it’s own PHP file in the plugins directory:
Voila, you have a plugin. Magic. Safer than using the theme's function's php file.
December 21, 2011 — 12:07 am
Jan Dembowski says:
Thanks, I’ve just done exactly that and now it’s enabled as a plugin.
Considering how often I muck around with that functions.php file, that’s much safer!
December 21, 2011 — 5:52 am