Manual:Hooks/UploadForm:initial

From MediaWiki.org
Jump to: navigation, search
UploadForm:initial
Available from version 1.9.0
Called just before the upload form is generated
Define function:
public static function onUploadForm_initial( $uploadFormObj ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UploadForm:initial": [
			"MyExtensionHooks::onUploadForminitial"
		]
	}
}

For MediaWiki ≤1.25:

$wgHooks['UploadForm:initial'][] = 'MyExtensionHooks::onUploadForminitial';
Called from: File(s): SpecialUpload.php

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

Details[edit]

  • $uploadFormObj: current UploadForm object