Jump to content

Manual:Hooks/GetExtendedMetadata

From mediawiki.org
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: In extension.json:
{
	"Hooks": {
		"GetExtendedMetadata": "MediaWiki\\Extension\\MyExtension\\Hooks::onGetExtendedMetadata"
	}
}
Called from: File(s): media/FormatMetadata.php
Interface: GetExtendedMetadataHook.php

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