Jump to content

Extension:AbuseFilter/Hooks/AbuseFilter-filterAction

From mediawiki.org
AbuseFilter-filterAction
Available from version 1.19.0
Allows overwriting of variables in AbuseFilter::filterAction() just before they're checked against filters.
Define function:
public static function onAbuseFilter_filterAction( MediaWiki\Extension\AbuseFilter\Variables\VariableHolder $vars, MediaWiki\Title\Title $title ) { ... }
Attach hook:
$wgHooks['AbuseFilter-filterAction'][] = 'MyExtensionHooks::onAbuseFilter_filterAction';
Called from:File(s): AbuseFilter / includes/AbuseFilterRunner.php
Function(s): init

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

Note that you may specify custom variables in a saner way using other hooks:

Parameters

[edit]
  • $vars: AbuseFilterVariableHolder with variables
  • $title: Title object