Manual:Hooks/GetExtendedMetadata

From Linux Web Expert

GetExtendedMetadata
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 78926)</tvar></translate>
Allows including additional file metadata information in the extmetadata field of the imageinfo API
<translate> Define function:</translate>
public static function onGetExtendedMetadata( array &$combinedMeta, File $file, RequestContext $context, bool $single, int &$maxCacheTime ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"GetExtendedMetadata": "MediaWiki\\Extension\\MyExtension\\Hooks::onGetExtendedMetadata"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> media/FormatMetadata.php
<translate> Interface:</translate> GetExtendedMetadataHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:GetExtendedMetadata extensions</tvar>.</translate>