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

In extension.json:

	"Hooks": {
		"RequestContextCreateSkin": [

For MediaWiki ≤1.25:

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

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


Called when creating a skin instance. Can be used by an extension override what skin is used in certain contexts.

  • $context: The RequestContext object the skin is being created for.
  • &$skin: A variable reference you may set a Skin instance or string key on to override the skin that will be used for the context.