Manual:Hooks/SpecialStatsAddExtra

Category:MediaWiki hooks#SpecialStatsAddExtra Category:Hooks added in MediaWiki 1.16.0#SpecialStatsAddExtra
SpecialStatsAddExtra
Available from version 1.16.0 (r54516, CodeReview archive)
Can be used to add extra statistic at the end of Special:Statistics.
Define function:
public static function onSpecialStatsAddExtra( &$extraStats, IContextSource $context ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"SpecialStatsAddExtra": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialStatsAddExtra"
	}
}
Called from: File(s): SpecialStatistics.phpCategory:MediaWiki hooks included in SpecialStatistics.php#SpecialStatsAddExtra
Interface: SpecialStatsAddExtraHook.php

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

Details

  • &$extraStats: Array to save the new stats ( $extraStats['<name of statistic>'] => <value>; )
Category:Hooks added in MediaWiki 1.16.0 Category:MediaWiki hooks Category:MediaWiki hooks included in SpecialStatistics.php