Open main menu

Manual:Hooks/UserRetrieveNewTalks

UserRetrieveNewTalks
Available from version 1.5.7 (r13012)
called when retrieving "You have new messages!" message(s)
Define function:
public static function onUserRetrieveNewTalks( &$user, &$talks ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"UserRetrieveNewTalks": "MyExtensionHooks::onUserRetrieveNewTalks"
	}
}

For MediaWiki ≤1.25:

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

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

DetailsEdit

  • &$user: user retrieving new talks messages
  • &$talks: reference to array of new talks page(s)