Manual:Hooks/SkinCopyrightFooter

From MediaWiki.org
Jump to navigation Jump to search
SkinCopyrightFooter
Available from version 1.16.0 (r52361)
Allow for site and per-namespace customization of copyright notice.
Define function:
public static function onSkinCopyrightFooter( $title, $type, &$msg, &$link, &$forContent ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"SkinCopyrightFooter": "MyExtensionHooks::onSkinCopyrightFooter"
	}
}

For MediaWiki ≤1.25:

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

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

Details[edit]

  • $title: displayed page title
  • $type: 'normal' or 'history' for old/diff views
  • &$msg: overridable message; usually 'copyright' or 'history_copyright'. This message must be in HTML format, not wikitext!
  • &$link: overridable HTML link to be passed into the message as $1
  • &$forContent: overridable flag if copyright footer is shown in content language.