Jump to content

Extension:AbuseFilter/Hooks/AbuseFilter-generateGenericVars

From mediawiki.org
AbuseFilterGenerateGenericVars
Available from version ??? (Gerrit change 80152)
Allows altering generic variables, i.e. independent from page and user
Define function:
public static function onAbuseFilterGenerateGenericVars( MediaWiki\Extension\AbuseFilter\Variables\VariableHolder $vars, ?RecentChange $rc ) { ... }
Attach hook:
$wgHooks['AbuseFilterGenerateGenericVars'][] = 'MyExtensionHooks::onAbuseFilterGenerateGenericVars';
Called from:File(s): AbuseFilter / VariableGenerator.php

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

Arguments

[edit]
  • $vars: Variable holder
  • $rc: If the variables should be generated for an RC entry, this is the entry. Null if it's for the current action being filtered.