Manual:Hooks/SecondaryDataUpdates

Category:MediaWiki hooks#SecondaryDataUpdates Category:Hooks added in MediaWiki 1.25.0#SecondaryDataUpdates Category:MediaWiki deprecated or obsolete features#SecondaryDataUpdates Category:Hooks removed in MediaWiki 1.37.0#SecondaryDataUpdates Category:Hooks deprecated in MediaWiki 1.32.0#SecondaryDataUpdates
SecondaryDataUpdates
Available from version 1.25.0
Removed in version 1.37.0Category:Removed hooks#SecondaryDataUpdates
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.phpCategory:MediaWiki hooks included in AbstractContent.php#SecondaryDataUpdates
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

  • $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
Category:Hooks added in MediaWiki 1.25.0 Category:Hooks deprecated in MediaWiki 1.32.0 Category:Hooks removed in MediaWiki 1.37.0 Category:MediaWiki deprecated or obsolete features Category:MediaWiki hooks Category:MediaWiki hooks included in AbstractContent.php Category:Removed hooks