Manual:Hooks/ArticleConfirmDelete

ArticleConfirmDelete
Available from version 1.16.0 (r55573, codereview)
Occurs before writing the confirmation form for article deletion.
Define function:
public static function onArticleConfirmDelete( $article, $output, &$reason ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ArticleConfirmDelete": "MediaWiki\\Extension\\MyExtension\\Hooks::onArticleConfirmDelete"
	}
}
Called from: File(s): page/Article.php
Interface: ArticleConfirmDeleteHook.php

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


Details

edit
  • $article: the article (object) being deleted
  • $output: the OutputPage object ($wgOut)
  • &$reason: the reason (string) the article is being deleted