Manual:Hooks/SpecialTrackingCategories::generateCatLink

From MediaWiki.org
Jump to navigation Jump to search
SpecialTrackingCategories::generateCatLink
Available from version 1.29.0 (Gerrit change 321224)
Called for each category link on Special:TrackingCategories
Define function:
public static function onSpecialTrackingCategories_generateCatLink( SpecialTrackingCategories $page, Title $catTitle, string &$html ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"SpecialTrackingCategories::generateCatLink": "MyExtensionHooks::onSpecialTrackingCategoriesgenerateCatLink"
	}
}

For MediaWiki ≤1.25:

$wgHooks['SpecialTrackingCategories::generateCatLink'][] = 'MyExtensionHooks::onSpecialTrackingCategoriesgenerateCatLink';
Called from:File(s): specials/SpecialTrackingCategories.php
Function(s): execute

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

Details[edit]

  • $specialPage: The SpecialTrackingCategories object
  • $catTitle: The Title object of the linked category
  • &$html: The resulting HTML