Manual:Hooks/ResourceLoaderSiteModulePages

From Linux Web Expert

ResourceLoaderSiteModulePages
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 547643)</tvar></translate>
Allows to change which wiki pages comprise the 'site' module in given skin.
<translate> Define function:</translate>
public static function onResourceLoaderSiteModulePages( string $skin, array &$pages ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"ResourceLoaderSiteModulePages": "MediaWiki\\Extension\\MyExtension\\Hooks::onResourceLoaderSiteModulePages"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> resourceloader/ResourceLoaderSiteModule.php
<translate> Function(s):</translate> getPages
<translate> Interface:</translate> ResourceLoaderSiteModulePagesHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ResourceLoaderSiteModulePages extensions</tvar>.</translate>


Parameters

  • $skin: A string representing the current skin key
  • &$pages: A modifiable array representing a map of pages to their type