MediaWiki master
MediaWiki\Hook\EditFilterHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onEditFilter ( $editor, $text, $section, &$error, $summary)
 Use this hook to perform checks on an edit.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 14 of file EditFilterHook.php.

Member Function Documentation

◆ onEditFilter()

MediaWiki\Hook\EditFilterHook::onEditFilter ( $editor,
$text,
$section,
& $error,
$summary )

Use this hook to perform checks on an edit.

Since
1.35
Parameters
EditPage$editorEdit form (see includes/EditPage.php)
string$textContents of the edit box
string$sectionSection being edited
string&$errorError message to return
string$summaryEdit summary for page
Returns
bool|void True or no return value without altering $error to allow the edit to continue. Modifying $error and returning true will cause the contents of $error to be echoed at the top of the edit form as wikitext. Return false to halt editing; you'll need to handle error messages, etc. yourself.

Implemented in MediaWiki\HookContainer\HookRunner.


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