Manual:Hooks/PlaceNewSection
From MediaWiki.org
| PlaceNewSection | |
|---|---|
| Available from version 1.19.0 (r101096) Override placement of new sections. |
|
Define function: |
public static function onPlaceNewSection( $wikipage, $oldtext, $subject, &$text ) { ... }
|
Attach hook: |
$wgHooks['PlaceNewSection'][] = 'MyExtensionHooks::onPlaceNewSection'; |
| Called from: | WikiPage.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:PlaceNewSection extensions.
[edit] Details
Use this hook to override the placement of new sections. Return false and put the merged text into $text to override the default behavior.
- $wikipage : WikiPage object
- $oldtext : the text of the page before editing
- $subject : subject of the new section
- &$text : text of the new section (the contents of the edit form)
