Manual:Hooks/ArticleDeleteComplete

ArticleDeleteComplete
Available from version 1.4.0
Occurs after the delete article request has been processed
Define function:
public static function onArticleDeleteComplete( &$article, User &$user, $reason, $id, $content, LogEntry $logEntry, $archivedRevisionCount ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ArticleDeleteComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onArticleDeleteComplete"
	}
}
Called from: File(s): page/WikiPage.php
Interface: ArticleDeleteCompleteHook.php

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

Details edit

  • $article: the article that was deleted (WikiPage object) - 1.18+
  • $user: the user that deleted the article
  • $reason: the reason the article was deleted
  • $id: id of the article that was deleted 1.13+
  • $content: the content of the deleted article, or null in case of an error 1.21+
  • $logEntry: the log entry used to record the deletion 1.21+
  • $archivedRevisionCount: the number of revisions archived during the page delete 1.28+

See also edit