Manual:Hooks/ContributionsToolLinks

From MediaWiki.org
Jump to: navigation, search
ContributionsToolLinks
Available from version 1.11.0
Change tool links above Special:Contributions
Define function:
public static function onContributionsToolLinks( $id, $title, &$tools, $sp ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ContributionsToolLinks": [
			"MyExtensionHooks::onContributionsToolLinks"
		]
	}
}

For MediaWiki ≤1.25:

$wgHooks['ContributionsToolLinks'][] = 'MyExtensionHooks::onContributionsToolLinks';
Called from: File(s): SpecialContributions.php

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

Details[edit]

  • $id - User identifier
  • $title - User page title
  • $tools - Array of tool links
  • $sp - The SpecialPage object