MediaWiki REL1_39
MediaWiki\Content\Hook\PlaceNewSectionHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inheritance diagram for MediaWiki\Content\Hook\PlaceNewSectionHook:

Public Member Functions

 onPlaceNewSection ( $content, $oldtext, $subject, &$text)
 Use this hook to override placement of new sections.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "PlaceNewSection" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 15 of file PlaceNewSectionHook.php.

Member Function Documentation

◆ onPlaceNewSection()

MediaWiki\Content\Hook\PlaceNewSectionHook::onPlaceNewSection ( $content,
$oldtext,
$subject,
& $text )

Use this hook to override placement of new sections.

Since
1.35
Parameters
WikiPage | Content$contentFormerly a WikiPage, but accidentally a Content object since approximately 1.21
string$oldtextText of the article before editing
string$subjectSubject of the new section
string&$textText of the new section
Returns
bool|void True or no return value to continue, or false and put the merged text into $text to override the default behavior

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: