ResourceLoaderStartUpModule::getConfigSettings(). Use this to export static
configuration variables to JavaScript. Things that depend on the current page
or request state must be added through MakeGlobalVariablesScript instead.
+Skin is made available for skin specific config.
&$vars: [ variable name => value ]
+$skin: Skin
'ResourceLoaderJqueryMsgModuleMagicWords': Called in
ResourceLoaderJqueryMsgModule to allow adding magic words for jQueryMsg.
$oldCommentSchema = $conf->get( 'CommentTableSchemaMigrationStage' ) === MIGRATION_OLD;
// Build list of variables
+ $skin = $context->getSkin();
$vars = [
'wgLoadScript' => wfScript( 'load' ),
'debug' => $context->getDebug(),
- 'skin' => $context->getSkin(),
+ 'skin' => $skin,
'stylepath' => $conf->get( 'StylePath' ),
'wgUrlProtocols' => wfUrlProtocols(),
'wgArticlePath' => $conf->get( 'ArticlePath' ),
'wgCommentCodePointLimit' => $oldCommentSchema ? null : CommentStore::COMMENT_CHARACTER_LIMIT,
];
- Hooks::run( 'ResourceLoaderGetConfigVars', [ &$vars ] );
+ Hooks::run( 'ResourceLoaderGetConfigVars', [ &$vars, $skin ] );
return $vars;
}