Manual:Hooks/ArticleDelete
From MediaWiki.org
< Manual:Hooks(Redirected from Manual:MediaWiki hooks/ArticleDelete)
| ArticleDelete | |
|---|---|
| Available from version 1.4.0 Occurs whenever the software receives a request to delete an article |
|
*Define function: |
function fnMyHook( &$article, &$user, &$reason, &$error ) { ... }
|
*Attach hook: |
$wgHooks['ArticleDelete'][] = 'fnMyHook'; |
| Called from: | Article.php |
*For more information about attaching hooks, see Manual:Hooks.
*For examples of extensions using this hook, see Category:ArticleDelete extensions.
[edit] Details
- $article: the article (object) being deleted
- $user: the user (object) deleting the article
- $reason: the reason (string) the article is being deleted
- $error: if the requested article deletion was prohibited, the (raw HTML) error message to display (added in 1.13)