MediaWiki  master
MediaWiki\Content\Hook\PlaceNewSectionHook Interface Reference

Stable to implement. 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. More...
 

Detailed Description

Stable to implement.

Definition at line 12 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: