Manual:Hooks/SpecialContributionsBeforeMainOutput
Appearance
From mediawiki.org
| SpecialContributionsBeforeMainOutput | |
|---|---|
| Available from version 1.5.0 Before the form on Special:Contributions | |
| Define function: | public static function onSpecialContributionsBeforeMainOutput( int $id, MediaWiki\User\User $user, MediaWiki\SpecialPage\ContributionsSpecialPage $specialPage ) { ... } |
| Attach hook: | In extension.json:
{ "Hooks":{ "SpecialContributionsBeforeMainOutput":"MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialContributionsBeforeMainOutput" } } |
| Called from: | File(s): specialpage/ContributionsSpecialPage.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: ContributionsSpecialPage 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).