Manual:Hooks/ResourceLoaderGetStartupModules
This feature was removed completely in version 1.24.0 (after being deprecated in 1.23.0). |
ResourceLoaderGetStartupModules | |
---|---|
Available from version 1.18.0 (r84401, codereview) Removed in version 1.24.0 Run once the startup module is being generated. | |
Define function: | public static function onResourceLoaderGetStartupModules( &$modules ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"ResourceLoaderGetStartupModules": "MediaWiki\\Extension\\MyExtension\\Hooks::onResourceLoaderGetStartupModules"
}
}
|
Called from: | File(s): ResourceLoaderStartUpModule.php |
Interface: | ResourceLoaderGetStartupModulesHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ResourceLoaderGetStartupModules extensions.
Details
editThis allows you to add modules to the startup module. This hook should be used sparingly since any module added here will be loaded on all pages. This hook is useful if you want to make code available to module loader scripts.
- &$modules Array of module names