< Manual:Hooks
ResourceLoaderGetLessVars
Available from version 1.25.0 (Gerrit change 187986)
Removed in version 1.31.0
Allows to add context-based Less variables.
Define function:
public static function onResourceLoaderGetLessVars( array &$lessVars ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ResourceLoaderGetLessVars": "MyExtensionHooks::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

  • &$lessVars: An array of already added variables, which can be extended

See also

  • $wgResourceLoaderLESSVars (now also removed)
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.