Manual:Hooks/UndeleteForm::undelete

From MediaWiki.org
Jump to navigation Jump to search
UndeleteForm::undelete
Available from version 1.18.0 (r88235)
Called un UndeleteForm::undelete, after checking that the site is not in read-only mode, that the Title object is not null and after a PageArchive object has been constructed but before performing any further processing.
Define function:
public static function onUndeleteForm_undelete( &$archive, $title ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UndeleteForm::undelete": "MyExtensionHooks::onUndeleteFormundelete"
	}
}

For MediaWiki ≤1.25:

$wgHooks['UndeleteForm::undelete'][] = 'MyExtensionHooks::onUndeleteFormundelete';
Called from:File(s): SpecialUndelete.php

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

Details[edit]

  • &$archive: PageArchive object
  • $title: Title object of the page that we're viewing