Manual:Hooks/UndeleteShowRevision

From MediaWiki.org
Jump to navigation Jump to search
UndeleteShowRevision
Available from version 1.9.0
called when showing a revision in Special:Undelete
Define function:
public static function onUndeleteShowRevision( $title, $row ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UndeleteShowRevision": "MyExtensionHooks::onUndeleteShowRevision"
	}
}

For MediaWiki ≤1.25:

$wgHooks['UndeleteShowRevision'][] = 'MyExtensionHooks::onUndeleteShowRevision';
Called from:File(s): SpecialUndelete.php

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

Details[edit]

  • $title: title object related to the revision
  • $rev: revision (object) that will be viewed