Although it's true that Parsoid doesn't (yet) support this hook, and
the $parser object referenced in the hook is likely going to be changed,
this is a hook added in 1.35 (eb6c5f70d9)
to replace use of an even worse hook. So let's keep the lesser of the
evils, at least for now.
Bug: T236809
Change-Id: I8f866c3b9f1fc51848cfe9364635112371d18e3e
24 lines
596 B
PHP
24 lines
596 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Hook;
|
|
|
|
use Parser;
|
|
|
|
/**
|
|
* @stable
|
|
* @ingroup Hooks
|
|
*/
|
|
interface ParserPreSaveTransformCompleteHook {
|
|
/**
|
|
* This hook is called from Parser::preSaveTransform() after
|
|
* processing is complete, giving the extension a chance to further modify the
|
|
* wikitext.
|
|
*
|
|
* @since 1.35
|
|
*
|
|
* @param Parser $parser Calling Parser instance
|
|
* @param string &$text Transformed text, which can be modified by the hook
|
|
* @return bool|void True or no return value to continue or false to abort
|
|
*/
|
|
public function onParserPreSaveTransformComplete( $parser, &$text );
|
|
}
|