Extension:AbuseFilter/Hooks/AbuseFilterAlterVariables

AbuseFilterAlterVariables
Available from version 1.34.0 (Gerrit change 486802)
Allows overwriting of abusefilter variables just before they're checked against filters.
Define function:
public static function onAbuseFilterAlterVariables( $vars, $title, $user ) { ... }
Attach hook:
$wgHooks['AbuseFilterAlterVariables'][] = 'MyExtensionHooks::onAbuseFilterAlterVariables';
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:AbuseFilterAlterVariables extensions.

DetailsEdit

Note that you may specify custom variables in a saner way using other hooks: AbuseFilter-generateTitleVars , AbuseFilter-generateUserVars and AbuseFilter-generateGenericVars .

  • $vars: AbuseFilterVariableHolder with variables
  • $title: Title object target of the action
  • $user: User object performer of the action