Available from version 1.21.0 (Gerrit change 34330)
Called before a variable is set in AFComputedVariable::compute to be able to set it before the core code runs. Return false to make the function return right after.
Define function:
public static function onAbuseFilter_interceptVariable( string $method, MediaWiki\Extension\AbuseFilter\Variables\VariableHolder $vars, array $parameters, mixed &$result ) { ... }
Attach hook:
$wgHooks['AbuseFilter-interceptVariable'][] = 'MyExtensionHooks::onAbuseFilter_interceptVariable';
Called from:File(s): AbuseFilter / includes/AFComputedVariable.php
Function(s): compute

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


  • $method: Method to generate the variable
  • $vars: AbuseFilterVariableHolder
  • $parameters: Parameters with data to compute the value
  • &$result: Result of the computation