Function __global->store_exif

Definitions

sources/exif.php

  • Save metadata into content type's custom fields, by looking for fields named after the EXIF/EXIF-emulated metadata (specifically in English).Spaces may be added to the names to make them prettier, but otherwise they must be the same.Designed to be used by headless-importers, e.g. bulk importing of media files, to make the process a bit smarter.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$content_type ID_TEXT No No required parameter N/A N/A The content type
$content_id ID_TEXT No No required parameter N/A N/A The content ID
$exif array No No required parameter N/A N/A The EXIF data
$map array No No [] N/A N/A Extra metadata to store, against explicit field IDs

Preview

Code (PHP)

/**
 * Save metadata into content type's custom fields, by looking for fields named after the EXIF/EXIF-emulated metadata (specifically in English).Spaces may be added to the names to make them prettier, but otherwise they must be the same.Designed to be used by headless-importers, e.g. bulk importing of media files, to make the process a bit smarter.
 *
 * @param  ID_TEXT $content_type The content type
 * @param  ID_TEXT $content_id The content ID
 * @param  array $exif The EXIF data
 * @param  array $map Extra metadata to store, against explicit field IDs
 */

function store_exif(string $content_type, string $content_id, array $exif, array $map = [])