Manual:Hooks/SiteNoticeBefore

From MediaWiki.org
Jump to: navigation, search
SiteNoticeBefore
Available from version 1.7.0
Used to modify the sitenotice before it has been created from $wgSiteNotice. Return false to suppress site notice.

Define function:
public static function onSiteNoticeBefore( &$siteNotice ) { ... }

Attach hook:
$wgHooks['SiteNoticeBefore'][] = 'MyExtensionHooks::onSiteNoticeBefore';
Called from: Skin.php

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


[edit] Details

  • $siteNotice: Empty string, ignored.
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox