Manual:Hooks/AbortEmailNotification

From MediaWiki.org
Jump to navigation Jump to search
AbortEmailNotification
Available from version 1.20.0
Can be used to cancel email notifications for an edit.
Define function:
public static function onAbortEmailNotification( $editor, $title, $rc ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"AbortEmailNotification": "MyExtensionHooks::onAbortEmailNotification"
	}
}

For MediaWiki ≤1.25:

$wgHooks['AbortEmailNotification'][] = 'MyExtensionHooks::onAbortEmailNotification';
Called from:File(s): RecentChange.php

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

Details[edit]

Return 'true to send email notification, false to forget about it.

  • $editor: The User who made the change.
  • $title: The Title of the page that was edited.
  • $rc: The current RecentChange object. (1.24+)

See also[edit]