Manual:Hooks/SecondaryDataUpdates
Jump to navigation
Jump to search
![]() | This deprecated feature should no longer be used, but is still available for reasons of backwards compatibility. This feature was deprecated in version 1.32.0. Please see RevisionDataUpdates for an alternative way to use this feature. |
SecondaryDataUpdates | |
---|---|
Available from version 1.25.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": "MyExtensionHooks::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