logo
  • Home
  • About
  • Plugins

Subscribe to Articles

Fun with Photo Data

WordPress 2.5 introduced an excellent feature: when you upload an image it captures and saves the EXIF data that comes with it (time, aperture, focal length etc). What it doesn’t do, to my knowledge, is provide a nice easy way to get that data out to display it. That is what this plugin does.

There are two ways to use this plugin.

The Shortcode

To display the data in a post for a specific photo that you have uploaded you can use the short code:

[photodata id=’optional’ url=’optional’ output_string=’optional’ fail=’optional’]

The ID is included for legacy purposes, you should use the URL.

The url is the full url to the image.

By default the data is presented in a list, but you can specify how it is presented, including html, and you can choose which data is shown, for example:

[photodata output_string=’<p class=”image_meta”>Shot with a ?camera? by ?credit? on ?created_timestamp?. (?focal_length?, ?shutter_speed? @ ?aperture?)</p>’]

The codes surrounded by question marks (?shutter_speed?) will be replaced by the relevent data.

Fail is the message to display if there is no data available.

If you don’t include any of the optional fields the code will assume you want the data for the first image attached to the post. Note this is not the first image in the post, but the first image in the upload gallery that you see when you upload images.

The automated method

If you have a photoblog this is likely to be of most use to you.

Under the settings menu you will find an option for EXIF Data. This lets you select a category, choose a title, set the default output string, and set the message for when there is no data (If you make this blank then the plugin won’t output the header either).

The photo data will now be automatically added to every post in that category. It will use the first image in the attached gallery. As above this is not the first image in the post, but in the gallery you see when uploading photos.

photo-data

Download

You can Download it here fun-with-photo-data

Recommended

WP Remix Banner

Archives

  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007

Tags

2.7 2.8 Admin Advertising Air Blogging blogs Cache Cliche Coding Comments Content Types CSS Curry Death development Disqus Features Habari image Interview Licensing Modes Monday Poll New Features Organisation Personal Platform Plugin Plugin-Practices plugins Plugin update Poll premium Readers Reviews Search Simplification Snippets Spam Themery Themes tools User Interface Widgets WLTC

Copyright 2009 Fun with WordPress - All Rights reserved.

Wordpress theme by: WPUnlimited