3 namespace MediaWiki\Content\Hook
;
5 use MediaWiki\Content\Content
;
9 * This is a hook handler interface, see docs/Hooks.md.
10 * Use the hook name "PlaceNewSection" to register handlers implementing this interface.
12 * @stable to implement
15 interface PlaceNewSectionHook
{
17 * Use this hook to override placement of new sections.
21 * @param WikiPage|Content $content Formerly a WikiPage, but accidentally a
22 * Content object since approximately 1.21
23 * @param string $oldtext Text of the article before editing
24 * @param string $subject Subject of the new section
25 * @param string &$text Text of the new section
26 * @return bool|void True or no return value to continue, or false and put the
27 * merged text into $text to override the default behavior
29 public function onPlaceNewSection( $content, $oldtext, $subject, &$text );