< Manual:Hooks 
 
      | GetMetadataVersion | |
|---|---|
| Available from version 1.18.0 (r86169, codereview) Allows to modify the image metadata version currently in use. | |
| Define function: | public static function onGetMetadataVersion( &$version ) { ... }
 | 
| Attach hook: | In extension.json: {
	"Hooks": {
		"GetMetadataVersion": "MyExtensionHooks::onGetMetadataVersion"
	}
}
 | 
| Called from: | File(s): media/MediaHandler.php | 
| Interface: | GetMetadataVersionHook.php | 
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:GetMetadataVersion extensions.
Details
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
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.