Manual:Hooks/UploadFormSourceDescriptors

From MediaWiki.org
Jump to navigation Jump to search
UploadFormSourceDescriptors
Available from version 1.16.0
Occurs after the standard source inputs have been added to the descriptor.
Define function:
public static function onUploadFormSourceDescriptors( $descriptor ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UploadFormSourceDescriptors": "MyExtensionHooks::onUploadFormSourceDescriptors"
	}
}

For MediaWiki ≤1.25:

$wgHooks['UploadFormSourceDescriptors'][] = 'MyExtensionHooks::onUploadFormSourceDescriptors';
Called from:File(s): SpecialUpload.php

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

Details[edit]

  • $descriptor: the HTMLForm descriptor