Manual:Hooks/SpecialContributionsBeforeMainOutput
Appearance
SpecialContributionsBeforeMainOutput | |
---|---|
Available from version 1.5.0 Before the form on Special:Contributions | |
Define function: | public static function onSpecialContributionsBeforeMainOutput( int $id, User $user, SpecialPage $special ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"SpecialContributionsBeforeMainOutput": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialContributionsBeforeMainOutput"
}
}
|
Called from: | File(s): SpecialContributions.php |
Interface: | SpecialContributionsBeforeMainOutputHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:SpecialContributionsBeforeMainOutput extensions.
Details
[edit]$id
: User ID number, only provided for backwards-compatability$user
: User object contributions are being fetched for (1.23+, added in Gerrit change 103090)$special
: SpecialPage instance, provides context (1.23+, added in Gerrit change 103090)
Since 1.16, the return value is checked, returning false will stop normal output (bug 22051).