Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -338,6 +338,11 @@ |
339 | 339 | &$text: Text to preload with |
340 | 340 | &$title: Title object representing the page being created |
341 | 341 | |
| 342 | +'EditPage::showEditForm:fields': allows injection of form field into edit form |
| 343 | +&$editor: the EditPage instance for reference |
| 344 | +&$out: an OutputPage instance to write to |
| 345 | +return value is ignored (should always return true) |
| 346 | + |
342 | 347 | 'EditFilter': Perform checks on an edit |
343 | 348 | $editor: Edit form (see includes/EditPage.php) |
344 | 349 | $text: Contents of the edit box |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1167,6 +1167,8 @@ |
1168 | 1168 | call_user_func_array( $formCallback, array( &$wgOut ) ); |
1169 | 1169 | } |
1170 | 1170 | |
| 1171 | + wfRunHooks( 'EditPage::showEditForm:fields', array( &$this, &$wgOut ) ); |
| 1172 | + |
1171 | 1173 | // Put these up at the top to ensure they aren't lost on early form submission |
1172 | 1174 | $wgOut->addHTML( " |
1173 | 1175 | <input type='hidden' value=\"" . htmlspecialchars( $this->section ) . "\" name=\"wpSection\" /> |