Manual:Hooks/GetMetadataVersion

From MediaWiki.org
Jump to: navigation, search
GetMetadataVersion
Available from version 1.18.0 (r86169)
Allows to modify the image metadata version currently in use.

Define function:
public static function onGetMetadataVersion( &$version ) { ... }

Attach hook:
$wgHooks['GetMetadataVersion'][] = 'MyExtensionHooks::onGetMetadataVersion';
Called from: Generic.php

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


Details [edit]

This is used when requesting image metadata from a ForiegnApiRepo. Media handlers that need to have versioned metadata should add an element to the end of the version array of the form 'handler_name=version'. Most media handlers won't need to do this unless they broke backwards compatibility with a previous version of the media handler metadata output.

  • &$version: Array of version strings