Manual:Hooks/EditPageBeforeEditButtons

From MediaWiki.org
Jump to: navigation, search
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:
$wgHooks['EditPageBeforeEditButtons'][] = 'MyExtensionHooks::onEditPageBeforeEditButtons';
Called from: File(s): EditPage.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