Manual:Hooks/SkinGetPoweredBy

From MediaWiki.org
Jump to navigation Jump to search
SkinGetPoweredBy
Available from version 1.17.0
Called when generating the code used to display the "Powered by MediaWiki" icon.
Define function:
public static function onSkinGetPoweredBy( &$text, $skin ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"SkinGetPoweredBy": "MyExtensionHooks::onSkinGetPoweredBy"
	}
}

For MediaWiki ≤1.25:

$wgHooks['SkinGetPoweredBy'][] = 'MyExtensionHooks::onSkinGetPoweredBy';
Called from:File(s): Skin.php

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

Details[edit]

  • &$text: additional 'powered by' icons in HTML.
  • $skin: Skin object

Note: Modern skin does not use the MediaWiki icon but plain text instead