Manual:Hooks/SecondaryDataUpdates
Appearance
This feature was removed from MediaWiki core in version 1.37.0 (after being deprecated in 1.32.0). Please see RevisionDataUpdates for an alternative way to use this feature. |
SecondaryDataUpdates | |
---|---|
Available from version 1.25.0 Removed in version 1.37.0 Allows modification of the list of DataUpdates to perform when page content is modified. | |
Define function: | public static function onSecondaryDataUpdates( Title $title, Content $oldContent, bool $recursive, ParserOutput $parserOutput, &$updates ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"SecondaryDataUpdates": "MediaWiki\\Extension\\MyExtension\\Hooks::onSecondaryDataUpdates"
}
}
|
Called from: | File(s): content/AbstractContent.php Function(s): AbstractContent::getSecondaryDataUpdates() |
Interface: | SecondaryDataUpdatesHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:SecondaryDataUpdates extensions.
Details
[edit]$title
: Title of the page that is being edited.$content
: Content object representing the page's content before the edit.$recursive
: bool indicating whether DataUpdates should trigger recursive updates (relevant mostly for LinksUpdate).$parserOutput
: ParserOutput representing the rendered version of the page after the edit$updates
: a list of DataUpdate objects, to be modified or replaced by the hook handler