Plugin Readme files now support video

February 23, 2010 | No Comments Yet

A new feature that will benefit WordPress plugin authors and plugin users alike: you can now add video in the readme.txt file of a plugin. This information will be displayed in the WordPress Just like WordPress posts & pages support shortcodes and oEmbed, so do plugin readme files now. There are two ways of doing this: oEmbed, by entering the URL of the video in its own line, and shortcodes, by entering the type of video and the URL in between square brackets, e.g.:

  • [youtube http://www.youtube.com/watch?v=7EiKx_WSesk]
  • [vimeo http://vimeo.com/173714]
  • [wpvideo OO4thna8]

The feature currently supports three video providers: YouTube, Vimeo, and VideoPress. It must also be noted that object embed codes (the usual way of embedding videos on websites) is not supported, just the two methods above. View the test example here.

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

New in WP 2.9: Transform URLs to embed codes

January 28, 2010 | No Comments Yet

A very useful new feature in WordPress 2.9 is oEmbed support, which lets you display video and other embed objects with less hassle: all you need to do paste the URL and you’re all set.

First, make sure this feature is enabled under Settings > Media > Attempt to automatically embed all plain text URLs. There’s also an option to set a maximum width and height for the embed objects. Next, create or edit posts like you normally would, and enter the URL in its own line. Save your post and hit the Preview button to check if it’s working.

For example, pasting a YouTube URL (http://www.youtube.com/watch?v=mKtdTJP_GUI) automatically generates this:

If you don’t want WordPress to create embed codes from URLs automatically, use the shortcode.

WordPress has a list of sites you can do this with, which includes sites like YouTube, Flickr, and WordPress.tv. More information about adding support can be found at the Codex page.

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

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: , , , , , , , , , ,