For MediaWiki (recent comments | status changes | tags | authors | states | release notes | statistics)
Index: trunk/phase3/docs/hooks.txt =================================================================== --- trunk/phase3/docs/hooks.txt (revision 20951) +++ trunk/phase3/docs/hooks.txt (revision 20952) @@ -338,6 +338,11 @@ &$text: Text to preload with &$title: Title object representing the page being created +'EditPage::showEditForm:fields': allows injection of form field into edit form +&$editor: the EditPage instance for reference +&$out: an OutputPage instance to write to +return value is ignored (should always return true) + 'EditFilter': Perform checks on an edit $editor: Edit form (see includes/EditPage.php) $text: Contents of the edit box Index: trunk/phase3/includes/EditPage.php =================================================================== --- trunk/phase3/includes/EditPage.php (revision 20951) +++ trunk/phase3/includes/EditPage.php (revision 20952) @@ -1167,6 +1167,8 @@ call_user_func_array( $formCallback, array( &$wgOut ) ); } + wfRunHooks( 'EditPage::showEditForm:fields', array( &$this, &$wgOut ) ); + // Put these up at the top to ensure they aren't lost on early form submission $wgOut->addHTML( " <input type='hidden' value=\"" . htmlspecialchars( $this->section ) . "\" name=\"wpSection\" />