Extension:AbuseFilter/Hooks/AbuseFilter-generateTitleVars

From Linux Web Expert

Revision as of 21:02, 1 December 2023 by imported>SamanthaNguyen (+types)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

AbuseFilter-generateTitleVars
Available from version 1.21.0 (Gerrit change 39781)
Allows altering the variables generated for a title
Define function:
public static function onAbuseFilter_generateTitleVars( MediaWiki\Extension\AbuseFilter\Variables\VariableHolder $vars, MediaWiki\Title\Title $title, string $prefix, ?RecentChange $rc ) { ... }
Attach hook:
$wgHooks['AbuseFilter-generateTitleVars'][] = 'MyExtensionHooks::onAbuseFilter_generateTitleVars';
Called from:File(s): AbuseFilter / includes/VariableGenerator/VariableGenerator.php
Function(s): addTitleVars

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

Details

  • $vars: AbuseFilterVariableHolder
  • $title: Title object
  • $prefix: Variable name prefix
  • $rc: RecentChange|null If the variables should be generated for an RC entry, this is the entry. Null if it's for the current action being filtered.