Manual:Hooks/EditPageBeforeEditButtons

EditPageBeforeEditButtons
Available from version 1.12.0
Used to modify the edit buttons on the edit form
Define function:
public static function onEditPageBeforeEditButtons( &$editpage, &$buttons, &$tabindex ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"EditPageBeforeEditButtons": "MediaWiki\\Extension\\MyExtension\\Hooks::onEditPageBeforeEditButtons"
	}
}
Called from: File(s): EditPage.php
Interface: EditPageBeforeEditButtonsHook.php

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

Details edit

  • $editpage: the current EditPage object
  • $buttons: the edit buttons found below the editing box ("Save", "Preview" and "Diff")
  • $tabindex: HTML tabindex of the last edit check/button