Manual:Hooks/AbortTalkPageEmailNotification/pl
Appearance
Deprecated: Ta funkcja jest przestarzała i nie powinna być już dłużej używana, ale jest nadal dostępna ze względu na kompatybilność wsteczną. Ta funkcja została zdeprecjonowana w wersji 1.44.0. Proszę zobaczyć na MediaWiki's notification system jako alternatywny sposób na użycie tej funkcji. |
| AbortTalkPageEmailNotification | |
|---|---|
| Dostępne od wersji version 1.22.0 (Gerrit change 67901) Disable email notifications of edits to users' talk pages. | |
| Zdefiniuj funkcję: | public static function onAbortTalkPageEmailNotification( User $targetUser, Title $title ) { ... }
|
| Dołącz hak: | W extension.json:
{
"Hooks": {
"AbortTalkPageEmailNotification": "MediaWiki\\Extension\\MyExtension\\Hooks::onAbortTalkPageEmailNotification"
}
}
|
| Called from: | Plik(i): RecentChanges/RecentChangeNotifier.php Function(s): canSendUserTalkEmail |
| Interface: | AbortTalkPageEmailNotificationHook.php |
For more information about attaching hooks, see Podręcznik:Haki.
For examples of extensions using this hook, see Category:AbortTalkPageEmailNotification extensions/pl.
This hook allows extensions to disable the regular talk page email notifications.
For example, Extension:Echo does this because it creates a new system of notifications (including to send an email, if the user desires, which would otherwise result in more than one email notification).
Parametry
Handlers of this hook receive two parameters:
- User
$targetUserThe user who's talk page is being edited, to whom the notification will be sent.
This is equivalent to$targetUser = User::newFromName( $title->getText() ); - Title
$titleThe Title of the talk page.
Return values
Handlers of this hook should return:
falseto disable the built-in email notification; ortrueto enable it.