Manual:Hooks/RequestContextCreateSkin

From MediaWiki.org
Jump to navigation Jump to search
RequestContextCreateSkin
Available from version 1.19.0
Called when creating a skin instance.
Define function:
public static function onRequestContextCreateSkin( IContextSource $context, Skin &$skin ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"RequestContextCreateSkin": "MyExtensionHooks::onRequestContextCreateSkin"
	}
}

For MediaWiki ≤1.25:

$wgHooks['RequestContextCreateSkin'][] = 'MyExtensionHooks::onRequestContextCreateSkin';
Called from:File(s): context/RequestContext.php
Function(s): getSkin

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:RequestContextCreateSkin extensions.

Details[edit]

  • $context: An IContextSource instance
  • &$skin: Skin object