Localisation updates from https://translatewiki.net.
[mediawiki.git] / includes / content / Hook / PlaceNewSectionHook.php
blob091eff62c4a2ee81a7223db7c47e65801a9a9226
1 <?php
3 namespace MediaWiki\Content\Hook;
5 use MediaWiki\Content\Content;
6 use WikiPage;
8 /**
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
13 * @ingroup Hooks
15 interface PlaceNewSectionHook {
16 /**
17 * Use this hook to override placement of new sections.
19 * @since 1.35
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 );