Manual:Hooks/EditFormInitialText

Category:MediaWiki hooks#EditFormInitialText Category:Hooks added in MediaWiki 1.16.0#EditFormInitialText
EditFormInitialText
Available from version 1.16.0 (r62740, CodeReview archive)
Allows modifying the edit form when editing existing pages
Define function:
public static function onEditFormInitialText( MediaWiki\EditPage\EditPage $editPage ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"EditFormInitialText": "MediaWiki\\Extension\\MyExtension\\Hooks::onEditFormInitialText"
	}
}
Called from: File(s): EditPage.phpCategory:MediaWiki hooks included in EditPage.php#EditFormInitialText
Interface: EditFormInitialTextHook.php

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

Details

  • $editPage: The EditPage object
Category:Hooks added in MediaWiki 1.16.0 Category:MediaWiki hooks Category:MediaWiki hooks included in EditPage.php