Extension:AbuseFilter/Hooks/AbuseFilterCustomActions

From Linux Web Expert

AbuseFilterCustomActions
Available from version ???
Allows specifying custom actions
Define function:
public static function onAbuseFilterCustomActions( array &$actions ) { ... }
Attach hook:
$wgHooks['AbuseFilterCustomActions'][] = 'MyExtensionHooks::onAbuseFilterCustomActions';
Called from:File(s): AbuseFilter /

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

Callers should append to $actions, using the action name as (string) key.

Arguments

  • &$actions: This argument is a map of the action name (as a string key) to callable values with the function signature of the following:
    function (
       MediaWiki\Extension\AbuseFilter\Consequences\Parameters $parameters,
       array $array
    ): MediaWiki\Extension\AbuseFilter\Consequences\Consequence\Consequence