This return value documentation was added to hooks.txt in May 2006 (f064b66c64) for EditFilter. In December 2007 (0693d79fb6) the sections were reordered, incorrectly placing this text in the EditPage::showEditForm:initial section. This error was carried forward to the present. Change-Id: I49c01ebfada493a42ef520984e77b4deffd52d34
31 lines
1 KiB
PHP
31 lines
1 KiB
PHP
<?php
|
|
|
|
namespace MediaWiki\Hook;
|
|
|
|
use MediaWiki\EditPage\EditPage;
|
|
|
|
/**
|
|
* This is a hook handler interface, see docs/Hooks.md.
|
|
* Use the hook name "EditFilter" to register handlers implementing this interface.
|
|
*
|
|
* @stable to implement
|
|
* @ingroup Hooks
|
|
*/
|
|
interface EditFilterHook {
|
|
/**
|
|
* Use this hook to perform checks on an edit.
|
|
*
|
|
* @since 1.35
|
|
*
|
|
* @param EditPage $editor Edit form (see includes/EditPage.php)
|
|
* @param string $text Contents of the edit box
|
|
* @param string $section Section being edited
|
|
* @param string &$error Error message to return
|
|
* @param string $summary Edit summary for page
|
|
* @return 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.
|
|
*/
|
|
public function onEditFilter( $editor, $text, $section, &$error, $summary );
|
|
}
|