Manual:Hooks/UndeletePageToolLinks

From MediaWiki.org
Jump to navigation Jump to search
UndeletePageToolLinks
Available from version 1.34.0 (Gerrit change 531764)
Add one or more links to edit page subtitle when a page has been previously deleted.
Define function:
public static function onUndeletePageToolLinks( IContextSource $context, MediaWiki\Linker\LinkRenderer $linkRenderer, array &$links ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UndeletePageToolLinks": "MyExtensionHooks::onUndeletePageToolLinks"
	}
}

For MediaWiki ≤1.25:

$wgHooks['UndeletePageToolLinks'][] = 'MyExtensionHooks::onUndeletePageToolLinks';
Called from:File(s): skins/Skin.php
Function(s): getUndeleteLink

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

Details[edit]

  • $context: IContextSource instance
  • $linkRenderer: MediaWiki\Linker\LinkRenderer instance
  • &$links: Array of HTML strings