Change $result and return false to give a definitive answer, otherwise
the built-in rate limiting checks are used, if enabled.
+'PlaceNewSection': Override placement of new sections.
+$wikipage : WikiPage object
+$oldtext : the text of the article before editing
+$subject : subject of the new section
+&$text : text of the new section
+Return false and put the merged text into $text to override the default behavior.
+
'PrefixSearchBackend': Override the title prefix search used for OpenSearch and
AJAX search suggestions. Put results into &$results outparam and return false.
$ns : array of int namespace keys to search in
if ( $section == 'new' ) {
# Inserting a new section
$subject = $summary ? wfMsgForContent( 'newsectionheaderdefaultlevel', $summary ) . "\n\n" : '';
- $text = strlen( trim( $oldtext ) ) > 0
+ if ( wfRunHooks( 'PlaceNewSection', array( $this, $oldtext, $subject, &$text ) ) ) {
+ $text = strlen( trim( $oldtext ) ) > 0
? "{$oldtext}\n\n{$subject}{$text}"
: "{$subject}{$text}";
+ }
} else {
# Replacing an existing section; roll out the big guns
global $wgParser;