Manual:Hooks/UserClearNewTalkNotification

From MediaWiki.org
Jump to navigation Jump to search
UserClearNewTalkNotification
Available from version 1.5.7 (r13012)
called when clearing the "You have new messages!" message, return false to not delete it
Define function:
public static function onUserClearNewTalkNotification( $user ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UserClearNewTalkNotification": "MyExtensionHooks::onUserClearNewTalkNotification"
	}
}

For MediaWiki ≤1.25:

$wgHooks['UserClearNewTalkNotification'][] = 'MyExtensionHooks::onUserClearNewTalkNotification';
Called from:File(s): User.php

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

Details[edit]

$user: User (object) that'll clear the message