Manual:Hooks/PageUndelete

Category:MediaWiki hooks#PageUndelete Category:Hooks added in MediaWiki 1.37.0#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.phpCategory:MediaWiki hooks included in UndeletePage.php#PageUndelete
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.

Category:Hooks added in MediaWiki 1.37.0 Category:MediaWiki hooks Category:MediaWiki hooks included in UndeletePage.php