Manual:Hooks/SpecialVersionExtensionTypes

Use cases
MediaWiki installations use the  hook to achieve more fine grained control over the list of extension types displayed on the Special:Version page. With this hook they can


 * change the labels used to identify each extension type
 * change the way extensions are split into groups by type

Background
The Special:Version page lists the current version of MediaWiki and all extensions installed. The listing categories the extensions based on the type provided to $wgExtensionCredits.

By default, extensions are grouped into five categories: specialpage, parserhook, variable, media, and other. This hook can be used to add or remove types and/or change the label associated with each type.

Usage
Functions attached to this hook add and remove extension types to. The array is keyed by typeid and its values are the display labels associated with each type. typeid is a locale-independent type id used as the value for the 'type' element of $wgExtensionCredits.

Functions attached to this hook should return  so that other functions attached to this hook may run.