Plugin / JSM's Adobe XMP / IPTC for WordPress

JS Morisset

Description

Description

Retrieve the following Adobe XMP / IPTC information from images in the WordPress Media Library and NextGEN Galleries:

  • Creator Email
  • Owner Name
  • Creation Date
  • Modification Date
  • Label
  • Credit
  • Source
  • Headline
  • City
  • State
  • Country
  • Country Code
  • Location
  • Title
  • Description
  • Creator
  • Keywords
  • Hierarchical Keywords

The extracted XMP / IPTC data is cached on disk to improve performance and is refreshed if / when the original image is modified.

You can use the plugin in one of two ways; calling a method in your theme template(s) or using the [xmp] shortcode in your content.

There are no plugin settings — simply install and activate the plugin.

Retrieve XMP Data as an Array

$adobeXMP =& adobeXMPforWP::get_instance();

/**
 * Some default class properties can be modified.
 */
$adobeXMP->use_cache = true;    // default
$adobeXMP->max_size = 512000;   // default
$adobeXMP->chunk_size = 65536;  // default

/**
 * The $id can be a WordPress Media Library image ID,
 * or NextGEN Gallery image ID in the form of ngg-##.
 */
$image_xmp = $adobeXMP->get_xmp( $id );

echo '<p>Photograph by '.$image_xmp['Creator'].'</p>';

You can also hook the ‘adobe_xmp_cache_dir’ filter to modify the default cache directory.

Include a Shortcode in your Post or Page

[xmp id="101,ngg-201"]

This shortcode prints all the XMP information for Media Library image ID “101” and NextGEN Gallery image ID “201”. The XMP information is printed as a definition list <dl> with a class name of xmp_shortcode that you can style for your needs. Each <dt> and <dd> element also has a style corresponding to it’s title – for example, the “Creator” list element has an xmp_creator class name. Here’s an example of the definition list HTML:

<dl class="xmp_shortcode">
<dt class="xmp_credit">Credit</dt>
<dd class="xmp_credit">JS Morisset</dd>
<dt class="xmp_source">Source</dt>
<dd class="xmp_source">Underwater Focus</dd>
<dt class="xmp_hierarchical_keywords">Hierarchical Keywords</dt>
<dd class="xmp_hierarchical_keywords">What &gt; Photography &gt; 
    Field of View &gt; Wide-Angle &gt; Fish-Eye</dd>
</dl>

The shortcode can also take a few additional arguments:

  • include (defaults to “all”)

Define which XMP elements to include, for example:

[xmp id="101" include="creator,creator email"]
  • exclude (defaults to none)

Exclude some XMP elements, for example to print all XMP elements, except for the “creator email”:

[xmp id="101" exclude="creator email"]
  • show_title (defaults to “yes”)

Include / exclude the <dt> definition titles.

[xmp id="101" show_title="no"]
  • show_empty (defaults to “no”)

Include / exclude empty <dd> definition values.

  • not_keyword (defaults to none)

Exclude a list of (case incensitive) keywords, for example:

[xmp id="101" not_keyword="who,what,where"]

To exclude a hierarchical keyword list, use hyphens between the keywords, for example:

[xmp id="101" not_keyword="who,what,where,who-people-unknown"]

Ratings

5
2 reviews

Rating breakdown

Details Information

Version

1.3.3

First Released

10 Apr, 2013

Total Downloads

5,169

Wordpress Version

3.9 or higher

Tested up to:

5.3

Require PHP Version:

5.6 or higher

Tags

Contributors

Languages

The plugin hasn't been transalated in any language other than English.

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.