Manual:Hooks/AbortTalkPageEmailNotification/pl

This page is a translated version of the page Manual:Hooks/AbortTalkPageEmailNotification and the translation is 8% complete.
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): includes/mail/EmailNotification.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 $targetUser The 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 $title The Title of the talk page.

Return values

Handlers of this hook should return:

  • false to disable the built-in email notification; or
  • true to enable it.