Manual:Hooks/FileUndeleteComplete
Appearance
FileUndeleteComplete | |
---|---|
Available from version 1.13.0 When a file is undeleted | |
Define function: | public static function onFileUndeleteComplete( $title, $fileVersions, $user, $reason ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"FileUndeleteComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onFileUndeleteComplete"
}
}
|
Called from: | File(s): specials/SpecialUndelete.php |
Interface: | FileUndeleteCompleteHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:FileUndeleteComplete extensions.
Details
[edit]- $title: title object to the file
- $fileVersions: array of undeleted versions. Empty if all versions were restored
- $user: user who performed the undeletion
- $reason: reason