Vector
Vector is a skin for MediaWiki. Vector has been the default skin on all Wikimedia wikis since 2010.
Loading...
Searching...
No Matches
Vector Namespace Reference

Retrieve the skin version for the request and compare it with Constants::SKIN_VERSION_LATEST. More...

Classes

class  Constants
 A namespace for Vector constants for internal Vector usage only. More...
 
class  Hooks
 Presentation hook handlers for Vector skin. More...
 
class  SkinVersionLookup
 

Detailed Description

Retrieve the skin version for the request and compare it with Constants::SKIN_VERSION_LATEST.

Given initial dependencies, retrieve the current skin version.

This requirement is met if the two are equal.

Skin version is evaluated in the following order:

  • useskinversion URL query parameter override. See README.md.
  • User preference. The User object for new and existing accounts are updated by hook according to the VectorDefaultSkinVersionForNewAccounts and VectorDefaultSkinVersionForExistingAccounts config values. See the Vector\Hooks class and skin.json.

    If the skin version is evaluated prior to User preference hook invocations, an incorrect version may be returned as only query parameter and site configuration will be known.

  • Site configuration default. The default is controlled by the VectorDefaultSkinVersion config value. This is used for anonymous users and as a fallback configuration. See skin.json.

This majority of this class is taken from Stephen Niedzielski's Vector\SkinVersionLookup class, which was introduced in d1072d0fdfb1.

@unstable

\FeatureManagement\Requirements

This class does no parsing, just the lookup.

Skin version is evaluated in the following order:

  • useskinversion URL query parameter override. See readme.
  • User preference. The User object for new accounts is updated (persisted as a user preference) by hook according to VectorDefaultSkinVersionForNewAccounts. See Hooks and skin.json. The user may then change the preference at will.
  • Site configuration default. The default is controlled by VectorDefaultSkinVersion and VectorDefaultSkinVersionForExistingAccounts based on login state. The former is used for anonymous users and as a fallback configuration, the latter is logged in users (existing accounts). See skin.json.

@unstable