Manual:$wgSpecialPages/zh

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
<translate> Extensions</translate>: $wgSpecialPages
A list of custom special pages.
<translate> Introduced in version:</translate>1.7.0 (r15031)
<translate> Removed in version:</translate><translate> still in use</translate>
<translate> Allowed values:</translate>参见下方
<translate> Default value:</translate>[]

Details

$wgSpecialPages stores a list of custom special pages defined for a MediaWiki installation. The array is keyed by a non-localized id for the special page. The value assigned to each key is an ObjectFactory specifier (MediaWiki 1.34+), or one of the following:

  • string: a string containing the name of a subclass of SpecialPage .
  • array: an array where the first element is the name of the subclass and all remaining elements are parameters that should be passed to the constructor of that subclass. (This format was deprecated in MW 1.18 and is no longer recognized as of MW 1.32.)
  • callback: since MW 1.24, Gerrit change 152755 expected to return a SpecialPage instance. Useful for full control over the special page's construction parameters.
  • an actual SpecialPage object. <translate> (deprecated in <tvar name=2>1.34</tvar>)</translate>

A special page can also be disabled by using:

$wgSpecialPages['Name'] = DisabledSpecialPage::getCallback( 'Name', 'message' );

For more information, please see SpecialPage.php