Manual:Hooks/AbortTalkPageEmailNotification/pl
From Linux Web Expert
AbortTalkPageEmailNotification | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 67901)</tvar></translate> Disable email notifications of edits to users' talk pages. | |
<translate> Define function:</translate> | public static function onAbortTalkPageEmailNotification( User $targetUser, Title $title ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"AbortTalkPageEmailNotification": "MediaWiki\\Extension\\MyExtension\\Hooks::onAbortTalkPageEmailNotification"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> includes/mail/EmailNotification.php <translate> Function(s):</translate> canSendUserTalkEmail |
<translate> Interface:</translate> | AbortTalkPageEmailNotificationHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Podręcznik:Haki </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:AbortTalkPageEmailNotification extensions/pl</tvar>.</translate>
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; ortrue
to enable it.