Manual:Hooks/ContributionsToolLinks

From Linux Web Expert

ContributionsToolLinks
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Change tool links above Special:Contributions
<translate> Define function:</translate>
public static function onContributionsToolLinks( $id, $title, &$tools, $sp ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"ContributionsToolLinks": "MediaWiki\\Extension\\MyExtension\\Hooks::onContributionsToolLinks"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> specials/SpecialContributions.php
<translate> Interface:</translate> ContributionsToolLinksHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ContributionsToolLinks extensions</tvar>.</translate>

Details

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