Manual:Hooks/ArticleDeleteComplete

From Linux Web Expert

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

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ArticleDeleteComplete extensions</tvar>.</translate>

Details

  • $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