Manual:Hooks/ArticleDeleteAfterSuccess

From MediaWiki.org
Jump to navigation Jump to search
ArticleDeleteAfterSuccess
Available from version 1.25.0 (Gerrit change 170530)
Output after an article has been deleted
Define function:
public static function onArticleDeleteAfterSuccess( Title $title, OutputPage $output ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ArticleDeleteAfterSuccess": "MyExtensionHooks::onArticleDeleteAfterSuccess"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ArticleDeleteAfterSuccess'][] = 'MyExtensionHooks::onArticleDeleteAfterSuccess';
Called from:File(s): page/Article.php
Function(s): doDelete

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

Details[edit]

  • $title: Title object of the article that has been deleted.
  • $outputPage: OutputPage object that can be used to append the output.