< Manual:Hooks
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": "MyExtensionHooks::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
$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).
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.