< Manual:Hooks
UploadForm:BeforeProcessing | |
---|---|
Available from version 1.9.0 Called just before the upload data, like wpUploadDescription, are processed, so extensions get a chance to manipulate them. | |
Define function: | public static function onUploadForm_BeforeProcessing( SpecialUpload $uploadFormObj ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"UploadForm:BeforeProcessing": "MyExtensionHooks::onUploadFormBeforeProcessing"
}
}
|
Called from: | File(s): specials/SpecialUpload.php |
Interface: | UploadForm_BeforeProcessingHook.php |
For more information about attaching hooks, see Manual:Hooks
For examples of extensions using this hook, see Category:UploadForm:BeforeProcessing extensions.
Details
- $uploadFormObj: current SpecialUpload object
The hook function must return true (or at least something which doesn't evaluate as false). Otherwise, nothing happens, without any message to the user (unless the hook function itself takes care of that).
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.