Manual:Hooks/PageUndelete
PageUndelete | |
---|---|
Available from version 1.37.0 Run before page undeletion | |
Define function: | public static function onPageUndelete( ProperPageIdentity $page, Authority $performer, string $reason, bool $unsuppress, array $timestamps, array $fileVersions, StatusValue $status ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"PageUndelete": "MediaWiki\\Extension\\MyExtension\\Hooks::onPageUndelete"
}
}
|
Called from: | File(s): page/UndeletePage.php |
Interface: | PageUndeleteHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:PageUndelete extensions.
This hook is fired by UndeletePage before performing any undeletion, and allows callers to perform additional actions or abort the operation.