< Manual:Hooks
AbortAutoblock | |
---|---|
Available from version 1.13.0 Allow extension to cancel an autoblock. | |
Define function: | public static function onAbortAutoblock( string $autoblockIP, DatabaseBlock $block ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"AbortAutoblock": "MyExtensionHooks::onAbortAutoblock"
}
}
|
Called from: | File(s): block/DatabaseBlock.php Function(s): doAutoblock |
Interface: | AbortAutoblockHook.php |
For more information about attaching hooks, see Manual:Hooks
For examples of extensions using this hook, see Category:AbortAutoblock extensions.
Details
$autoblockIP
: The IP that is going to be autoblocked.$block
: An instance ofMediaWiki\Block\DatabaseBlock
, representing the block from which the autoblock is coming.
Notes
- Return
false
to cancel an autoblock.
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.