Extension:AbuseFilter/Hooks/AbuseFilterShouldFilterAction

From MediaWiki.org
Jump to navigation Jump to search
AbuseFilterShouldFilterAction
Available from version 1.34 (Gerrit change 526183)
Used to tell whether the current action should be filtered
Define function:
public static function onAbuseFilterShouldFilterAction( AbuseFilterVariableHolder $vars, Title $title, User $user, array &$skipReasons ) { ... }
Attach hook:
$wgHooks['AbuseFilterShouldFilterAction'][] = 'MyExtensionHooks::onAbuseFilterShouldFilterAction';
Called from:File(s):

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

Details[edit]

  • The handler should return false to avoid filtering the current action, and add an useful message to $skipReasons to explain why.