开发者 | jsmoriss |
---|---|
更新时间 | 2024年10月28日 22:37 |
PHP版本: | 7.4.33 及以上 |
版权: | GPLv3 |
版权网址: | 版权信息 |
[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")exclude
(defaults to none)show_title
(defaults to "yes")show_empty
(defaults to "no")not_keyword
(defaults to none){major}.{minor}.{bugfix}[-{stage}.{level}]