Vector
Vector is a skin for MediaWiki. Vector has been the default skin on all Wikimedia wikis since 2010.
|
Static Public Member Functions | |
static | getVectorResourceLoaderConfig (ResourceLoaderContext $context, Config $config) |
Passes config variables to Vector (modern) ResourceLoader module. More... | |
static | getVectorWvuiSearchResourceLoaderConfig (ResourceLoaderContext $context, Config $config) |
Generates config variables for skins.vector.search Resource Loader module (defined in skin.json). More... | |
static | onSkinPageReadyConfig (ResourceLoaderContext $context, array &$config) |
SkinPageReadyConfig hook handler. More... | |
static | makeIcon ( $name) |
Make an icon. | |
static | onSkinTemplateNavigation ( $sk, &$content_navigation) |
Upgrades Vector's watch action to a watchstar. More... | |
static | onGetPreferences (User $user, array &$prefs) |
Add Vector preferences to the user's Special:Preferences page directly underneath skins provided that $wgVectorSkinMigrationMode is not enabled. More... | |
static | onResourceLoaderSiteStylesModulePages (string $skin, array &$pages) |
Adds MediaWiki:Vector.css as the skin style that controls classic Vector. More... | |
static | onResourceLoaderSiteModulePages (string $skin, array &$pages) |
Adds MediaWiki:Vector.css as the skin style that controls classic Vector. More... | |
static | onPreferencesFormPreSave (array &$formData, HTMLForm $form, User $user, &$result, $oldPreferences) |
Hook executed on user's Special:Preferences form save. More... | |
static | onLocalUserCreated (User $user, $isAutoCreated) |
Called one time when initializing a users preferences for a newly created account. More... | |
static | onOutputPageBodyAttributes (OutputPage $out, Skin $sk, &$bodyAttrs) |
Called when OutputPage::headElement is creating the body tag to allow skins and extensions to add attributes they might need to the body of the page. More... | |
static | shouldDisableMaxWidth (array $options, Title $title, array $requestValues) |
Per the $options configuration (for use with $wgVectorMaxWidthOptions) determine whether max-width should be disabled on the page. More... | |
static | onMakeGlobalVariablesScript (&$vars, OutputPage $out) |
NOTE: Please use ResourceLoaderGetConfigVars hook instead if possible for adding config to the page. More... | |
|
static |
Passes config variables to Vector (modern) ResourceLoader module.
ResourceLoaderContext | $context | |
Config | $config |
|
static |
Generates config variables for skins.vector.search Resource Loader module (defined in skin.json).
ResourceLoaderContext | $context | |
Config | $config |
|
static |
Add Vector preferences to the user's Special:Preferences page directly underneath skins provided that $wgVectorSkinMigrationMode is not enabled.
User | $user | User whose preferences are being modified. |
array[] | &$prefs | Preferences description array, to be fed to a HTMLForm object. |
|
static |
Called one time when initializing a users preferences for a newly created account.
User | $user | Newly created user object. |
bool | $isAutoCreated |
|
static |
NOTE: Please use ResourceLoaderGetConfigVars hook instead if possible for adding config to the page.
Adds config variables to JS that depend on current page/request.
Adds a config flag that can disable saving the VectorSidebarVisible user preference when the sidebar menu icon is clicked.
array | &$vars | Array of variables to be added into the output. |
OutputPage | $out | OutputPage instance calling the hook |
|
static |
Called when OutputPage::headElement is creating the body tag to allow skins and extensions to add attributes they might need to the body of the page.
OutputPage | $out | |
Skin | $sk | |
string[] | &$bodyAttrs |
|
static |
Hook executed on user's Special:Preferences form save.
This is used to convert the boolean presentation of skin version to a version string. That is, a single preference change by the user may trigger two writes: a boolean followed by a string.
array | &$formData | Form data submitted by user |
HTMLForm | $form | A preferences form |
User | $user | Logged-in user |
bool | &$result | Variable defining is form save successful |
array | $oldPreferences |
|
static |
Adds MediaWiki:Vector.css as the skin style that controls classic Vector.
string | $skin | |
array | &$pages |
|
static |
Adds MediaWiki:Vector.css as the skin style that controls classic Vector.
string | $skin | |
array | &$pages |
|
static |
SkinPageReadyConfig hook handler.
Replace searchModule provided by skin.
ResourceLoaderContext | $context | |
mixed[] | &$config | Associative array of configurable options |
|
static |
Upgrades Vector's watch action to a watchstar.
This is invoked inside SkinVector, not via skin registration, as skin hooks are not guaranteed to run last. This can possibly be revised based on the outcome of T287622.
SkinTemplate | $sk | |
array | &$content_navigation |
|
static |
Per the $options configuration (for use with $wgVectorMaxWidthOptions) determine whether max-width should be disabled on the page.
For the main page: Check the value of $options['exclude']['mainpage'] For all other pages, the following will happen: