Manual:Hooks/ResourceLoaderGetLessVars
Appearance
This feature was removed completely in version 1.31.0 (after being deprecated in 1.30.0).
This hook was removed due to concerns about allowing unmaintainable cross-dependencies. Custom ResourceLoaderModule subclasses can override the getLessVars() method instead. |
ResourceLoaderGetLessVars | |
---|---|
Available from version 1.25.0 (Gerrit change 187986) Removed in version 1.31.0 (Gerrit change 425273) Allows to add context-based Less variables. | |
Define function: | public static function onResourceLoaderGetLessVars( array &$lessVars ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"ResourceLoaderGetLessVars": "MediaWiki\\Extension\\MyExtension\\Hooks::onResourceLoaderGetLessVars"
}
}
|
Called from: | File(s): resourceloader/ResourceLoader.php |
Interface: | ResourceLoaderGetLessVarsHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ResourceLoaderGetLessVars extensions.
Details
[edit]&$lessVars
: An array of already added variables, which can be extended
See also
[edit]- $wgResourceLoaderLESSVars (now also removed)