Manual:Hooks/ArticleEditUpdates

From mediawiki.org
ArticleEditUpdates
Available from version 1.14.0
Removed in version 1.37.0 (Gerrit change 705775)
Executes when edit updates (mainly link tracking) are made after an article has been changed
Define function:
public static function onArticleEditUpdates( WikiPage &$wikiPage, \MediaWiki\Edit\PreparedEdit &$editInfo, bool $changed ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ArticleEditUpdates": "MediaWiki\\Extension\\MyExtension\\Hooks::onArticleEditUpdates"
	}
}
Called from: File(s): Storage/DerivedPageDataUpdater.php
Function(s): doUpdates
Interface: ArticleEditUpdatesHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ArticleEditUpdates extensions.


Details[edit]

  • &$wikiPage: WikiPage object 1.18+
  • &$editInfo: MediaWiki\Edit\PreparedEdit object, data holder that includes the parser output for the page being changed
  • $changed: flag indicating that page was changed (boolean)