Manual:Hooks/SpecialPage initList

Use cases
MediaWiki installations hook when they want to add to or remove pages from the special page list. They can use this to:


 * dynamically add special pages from a database or other resource
 * remove undesirable built-in special pages from the default list
 * enable context dependent list of special pages lists that depend on current server load user method (local VPN public internet)
 * replace the default class associated with a special page with a custom subclass
 * limit access to special pages based on user identity even in cases where the special page is not permissions aware out

Background
MediaWiki article. Instead of being loaded from a file or database like a normal MediaWiki page, its content is generated on the fly using code.

By default, MediaWiki builds the list of special pages from two sources: a list of built-in special pages hardcoded into the MediaWiki core and the configuration variable. As a final step, MediaWiki passes the default list to all the functions attached

Usage
Functions attached to this hook add and remove elements from This array has the same structure as.

The hook function should so as not to interfere with other functions that might be attached to this hook.