MediaWiki master
MediaWiki\Skin\Hook\SiteNoticeBeforeHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onSiteNoticeBefore (&$siteNotice, $skin)
 Replace or disable the sitenotice.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "SiteNoticeBefore" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 14 of file SiteNoticeBeforeHook.php.

Member Function Documentation

◆ onSiteNoticeBefore()

MediaWiki\Skin\Hook\SiteNoticeBeforeHook::onSiteNoticeBefore ( & $siteNotice,
$skin )

Replace or disable the sitenotice.

The default sitenotice considers the sitenotice, anonnotice, namespacenotice, and confirmemail-notice messages, as well as $wgSiteNotice feature.

To replace the sitenotice, set the $siteNotice arg to an HTML string and return false.

To disable the sitenotice, set the $siteNotice arg to the empty string and return false.

Since
1.35
Parameters
string&$siteNoticeHTML returned as the sitenotice
Skin$skin
Returns
bool|void True or no return value to continue as normal, or false to prevent applying the default behavior.

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: