Add EXIF and IPTC meta data to Attachment Post

外掛說明

WordPress extracts some image meta data from a file when it is uploaded and adds it to the newly created Attachment Post. This Plugin extracts and saves a much wider range of EXIF and IPTC information.

This Plugin currently supports JPEG and WEBP files.

The Plugin does not add any information to Attachment Posts which have already been uploaded. (The Plugin does update the stored meta data when a new image is uploaded to an existing Attachment Post, for example when the Enable Media Replace Plugin is used.)

The information is not visible in the Media editor, but is available to developers when using the wp_get_attachment_metadata function. The data is stored in a subset of the array returned by this function, within the array key shp_additional_metadata.

e.g.

<?php
$attachment_metadata = wp_get_attachment_metadata($attachment_id);
var_dump($attachment_metadata['shp_additional_metadata']);

Hooks

The data array can be manipulated using add_filter once it has been retrieved from the file, using the following hooks.

All additional data

All IPTC data which is added by the plugin.

<?php
apply_filters('shp_additional_metadata/iptc', $exif['iptc'], $source_path);

IPTC data

All data which is added by the plugin.

<?php
apply_filters('shp_additional_metadata/all_exif', $exif, $source_path);

安裝方式

  1. Install from the WordPress Plugin Directory or upload the shp_additional_metadata folder to the installation’s plugins directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈Add EXIF and IPTC meta data to Attachment Post〉的開發相關工作。

參與者

Add EXIF and IPTC meta data to Attachment Post 外掛目前已有 1 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Add EXIF and IPTC meta data to Attachment Post〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.1.0

  • Add WEBP support
  • Confirm functionality in WordPress 5.9.

1.0.1

  • Fix EXIF checks

1.0.0

  • Initial release.