Embed media using only URLs in WordPress 2.9

October 16, 2009 | No Comments Yet

Here’s another great feature coming up in WordPress 2.9: easy media embedding using just the URL of the photo or video you want to place in your blog posts.

The catch is the URLs must be enclosed in shortcodes, and that the media must come from one of the predefined media providers: YouTube, Blip.tv, Flickr, Hulu, Viddler, Qik.com, Revision3, Google Video, PollDaddy, DailyMotion.

Of course, there are methods for adding more providers: using (a) wp_oembed_addprovider() function for oEmbed-compatible website and (b) defining a handler/callback function that checks the URL and generates the necessary embed code in its place.

Finally, wp_expand_dimensions() lets you resize the media to the largest dimensions possible given an example width-height ratio.

Read more about these in Viper007Bond’s post.

Leave a Comment | Tags: , , , , , , , , , ,