Manual:Hooks/SpecialBlockModifyFormFields

From MediaWiki.org
Jump to navigation Jump to search
SpecialBlockModifyFormFields
Available from version 1.24.0
Add or modify block fields of Special:Block
Define function:
public static function onSpecialBlockModifyFormFields( $sp, $fields ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"SpecialBlockModifyFormFields": "MyExtensionHooks::onSpecialBlockModifyFormFields"
	}
}

For MediaWiki ≤1.25:

$wgHooks['SpecialBlockModifyFormFields'][] = 'MyExtensionHooks::onSpecialBlockModifyFormFields';
Called from:File(s): SpecialBlock.php

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

Details[edit]

  • $sp: SpecialPage object, for context0
  • &$fields: Current HTMLForm fields

Notes[edit]

Added in MediaWiki 1.24 .