Manual:Hooks/SiteNoticeAfter

From Linux Web Expert

SiteNoticeAfter
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Used to modify the site notice after it has been created from $wgSiteNotice or interface messages.
<translate> Define function:</translate>
public static function onSiteNoticeAfter( &$siteNotice, $skin ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"SiteNoticeAfter": "MediaWiki\\Extension\\MyExtension\\Hooks::onSiteNoticeAfter"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> Skin.php
<translate> Interface:</translate> SiteNoticeAfterHook.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:SiteNoticeAfter extensions</tvar>.</translate>


Details

  • $siteNotice: String with HTML for sitenotice.
  • $skin: Skin object MW 1.18+

See also