Jump to content

Manual:Hooks/UserClearNewTalkNotification

From mediawiki.org
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
UserClearNewTalkNotification
Available from version 1.5.7 (r13012, codereview)
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": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserClearNewTalkNotification"
	}
}
Called from: File(s): User.php
Interface: UserClearNewTalkNotificationHook.php

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

Details

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