Manual:Hooks/UserRetrieveNewTalks

From Linux Web Expert

UserRetrieveNewTalks
<translate> Available from <tvar name=1><translate> version <tvar (r13012, codereview)</tvar></translate>
<translate> Removed in <tvar name=1><translate> version <tvar (Gerrit change 683957)</tvar></translate>
called when retrieving "You have new messages!" message(s)
<translate> Define function:</translate>
public static function onUserRetrieveNewTalks( &$user, &$talks ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"UserRetrieveNewTalks": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserRetrieveNewTalks"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> User.php
<translate> Interface:</translate> UserRetrieveNewTalksHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:UserRetrieveNewTalks extensions</tvar>.</translate>

Details

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