Manual:Hooks/GetExtendedMetadata

From MediaWiki.org
Jump to: navigation, search
GetExtendedMetadata
Available from version 1.23.0 (Gerrit change 78926)
Allows including additional file metadata information in the extmetadata field of the imageinfo API
Define function:
public static function onGetExtendedMetadata( array &$combinedMeta, File $file, RequestContext $context, bool $single, int &$maxCacheTime ) { ... }
Attach hook:
$wgHooks['GetExtendedMetadata'][] = 'MyExtensionHooks::onGetExtendedMetadata';
Called from: File(s): FormatMetadata.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:GetExtendedMetadata extensions.