Manual:Hooks/SpecialPage initList

Use cases
MediaWiki installations use the  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 - e.g. lists that depend on current server load, user's access method (local host, VPN, public internet)
 * limit access to special pages based on user identity even in cases where the special page is not permissions aware

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

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

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

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