Manual:Hooks/GetLinkColours

From MediaWiki.org
Jump to: navigation, search
GetLinkColours
Available from version 1.12.0
modify the CSS class of an array of page links

*Define function:
function fnMyHook( $linkcolour_ids, &$colours ) { ... }

*Attach hook:
$wgHooks['GetLinkColours'][] = 'MyExtensionHooks::someExample';
Called from: Parser.php

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


[edit] Details

  • $linkcolour_ids: array of prefixed DB keys of the pages linked to, indexed by page_id.
  • &$colours: (output) array of CSS classes, indexed by prefixed DB keys

[edit] Notes

This hook is only called for each link where a target page exists.

Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox