< Manual:Hooks
OutputPageMakeCategoryLinks | |
---|---|
Available from version 1.13.0 (r36944, codereview) Called when links are about to be generated for the page's categories. | |
Define function: | public static function onOutputPageMakeCategoryLinks( &$out, $categories, &$links ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"OutputPageMakeCategoryLinks": "MyExtensionHooks::onOutputPageMakeCategoryLinks"
}
}
|
Called from: | File(s): OutputPage.php |
Interface: | OutputPageMakeCategoryLinksHook.php |
For more information about attaching hooks, see Manual:Hooks
For examples of extensions using this hook, see Category:OutputPageMakeCategoryLinks extensions.
Details
Implementations should return false if they generate the category links, so the default link generation is skipped.
- &$out: OutputPage instance (object)
- $categories: associative array, keys are category names, values are category types ("normal" or "hidden")
- &$links: array, intended to hold the result. Must be an associative array with category types as keys and arrays of HTML links as values.
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.