Jump to content

Manual:Hooks/UserToolLinksEdit

From mediawiki.org
UserToolLinksEdit
Available from version 1.19.0
Called when generating a list of user tool links, eg "Foobar (Talk | Contribs | Block)"
Define function:
public static function onUserToolLinksEdit( $userId, $userText, &$items ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"UserToolLinksEdit": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserToolLinksEdit"
	}
}
Called from: File(s): Linker.php
Interface: UserToolLinksEditHook.php

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


Details

[edit]
  • $userId: User id of the current user
  • $userText: User name of the current user
  • &$items: Array of user tool links as HTML fragments