Translations:Extension:Highlight Links in Category/17/en

Right after MediaWiki determines which linked pages exist (to make redlinks), it runs the  hook (see LinkHolderArray.php). As we have a list of all of the page ids which are linked on that page, we can run one database query to see which of these links are in the set of categories we want to highlight. Because the query only happens on an index of the  table, it's reasonably fast. Then CSS classes are assigned based on the result, using the configuration values the user sets in.