Manual:Hooks/HistoryPageToolLinks

From MediaWiki.org
Jump to navigation Jump to search
HistoryPageToolLinks
Available from version 1.32.0 (Gerrit change 120811)
Allows adding links to the revision history page subtitle.
Define function:
public static function onHistoryPageToolLinks( IContextSource $context, \MediaWiki\Linker\LinkRenderer $linkRenderer, array &$links ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"HistoryPageToolLinks": "MyExtensionHooks::onHistoryPageToolLinks"
	}
}
Called from:File(s): actions/HistoryAction.php
Function(s): getDescription
Interface:HistoryPageToolLinksHook.php

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

Details[edit]

  • $context: IContextSource object
  • $linkRenderer: MediaWiki\Linker\LinkRenderer object
  • &$links: Array of links