JSM's Adobe XMP / IPTC for WordPress
Plugin Name | JSM Adobe XMP / IPTC for WordPress |
---|---|
Summary | Provides Adobe XMP / IPTC information from Media Library or NextGEN Gallery images using a shortcode or PHP class method. |
Stable Version | 1.6.0 |
Requires PHP | 7.4.33 or newer |
Requires WordPress | 5.9 or newer |
Tested Up To WordPress | 6.7.1 |
Contributors | jsmoriss |
License | GPLv3 |
Tags / Keywords | photoshop, xmp, iptc, rdf, xml |
Retrieve the following Adobe XMP / IPTC information from images in the WordPress Media Library and NextGEN Galleries:
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.
$adobeXMP =& adobeXMPforWP::get_instance(); $xmp = $adobeXMP->get_xmp( $image_id ); echo '<p>Photograph by ' . $xmp[ 'Creator' ] . '</p>';
[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 > Photography > Field of View > Wide-Angle > 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"]