Manual:Hooks/EditPage::showEditForm:initial
From MediaWiki.org
| EditPage::showEditForm:initial | |
|---|---|
| Available from version 1.6.0 Called just before the preview and edit form are rendered |
|
*Define function: |
function fnMyHook($editpage) { ... }
|
*Attach hook: |
$wgHooks['EditPage::showEditForm:initial'][] = 'fnMyHook'; |
| Called from: | EditPage.php: showEditForm() |
*For more information about attaching hooks, see Manual:Hooks.
*For examples of extensions using this hook, see Category:EditPage::showEditForm:initial extensions.
[edit] Details
- $editpage: the current EditPage object.
[edit] Notes
You can do something like:
if( $editpage->formtype == 'preview' ) { // performing a preview. }
to only take action on certain types of edits.

