(Translated by https://www.hiragana.jp/)
Manual:Hooks/ArticleRevisionUndeleted - MediaWiki Jump to content

Manual:Hooks/ArticleRevisionUndeleted

From mediawiki.org
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
ArticleRevisionUndeleted
Available from version 1.12.0
Removed in version 1.37.0 (Gerrit change 678414)
Called after an article revision is restored
Define function:
public static function onArticleRevisionUndeleted( $title, $revision, $oldPageID ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ArticleRevisionUndeleted": "MediaWiki\\Extension\\MyExtension\\Hooks::onArticleRevisionUndeleted"
	}
}
Called from: File(s): page/PageArchive.php
Interface: ArticleRevisionUndeletedHook.php

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

Details

  • $title: the article title
  • $revision: the revision object of the restored article revision
  • $oldPageID: the page ID of the revision when archived (may be null, may be number in string form)