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 ) { ... }

Attach hook:
$wgHooks['EditPageBeforeEditButtons'][] = 'MyExtensionHooks::onEditPageBeforeEditButtons';
Called from: EditPage.php

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


[edit] Details

  • $editpage: the current EditPage object
  • $buttons: the edit buttons found below the editing box ("Save", "Preview", "Live", and "Diff")

In Dec 2008 a third args was added: http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/EditPage.php?r1=44819&r2=44820&

Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox