Manual:Hooks/ArticleConfirmDelete

From MediaWiki.org
Jump to: navigation, search
ArticleConfirmDelete
Available from version 1.16.0
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": [
			"MyExtensionHooks::onArticleConfirmDelete"
		]
	}
}

For MediaWiki ≤1.25:

$wgHooks['ArticleConfirmDelete'][] = 'MyExtensionHooks::onArticleConfirmDelete';
Called from: File(s): Article.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