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

For more information about attaching hooks, see $1.
For examples of extensions using this hook, see Category:SpecialContributionsBeforeMainOutput extensions.


  • $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)

  Note: Since 1.16, the return value is checked, returning false will stop normal output (bug 22051).