Jump to navigation Jump to search

Other languages:
English • ‎español • ‎français • ‎polski • ‎日本語
Skins: $wgValidSkinNames
List of valid skin names. Skins can optionally use this variable to tell MediaWiki that they are available.
Introduced in version:1.7.0 (r15226)
Removed in version:still in use
Allowed values:(array)
Default value:[]


Array with information on valid skin names. Optionally can be used by skins to tell MediaWiki that they are available.

This variable can be used to register a skin, but it doesn't have to be. Skins can also be registered differently, that is using the methods of the SkinFactory, namely SkinFactory::getDefaultInstance()->register(). This means there is no guarantee that $wgValidSkinNames actually is a complete list of the installed skins!
  • The key should be the skin's id in all lower case. Generally this should be the same as the name of the base folder inside skins/ that contains the skins css, resources, etc...
  • The value should be an identifier which when prefixed with "Skin" becomes the class name of the class implemented by your skin. i.e. If your skin's class name is "SkinFooBar" the value in the array should be $wgValidSkinNames['foobar'] = 'FooBar';
  • Prior to MediaWiki 1.18 the value was a fallback display name and the class name was determined by running ucfirst on the lowercase skin id. i.e. For $wgValidSkinNames['foobar'] = 'FooBar'; it would try to load the "SkinFoobar" class. This caused issues with our AutoLoader being case-sensitive despite PHP class names being case-insensitive.

The default skins will be added later, by Skin::getSkinNames(). Use Skin::getSkinNames() as an accessor if you wish to have access to the full list.