Manual:Hooks/ShowMissingArticle

From MediaWiki.org
Jump to: navigation, search
ShowMissingArticle
Available from version 1.16.0
Called when generating the output for a non-existent page.
Define function:
public static function onShowMissingArticle( $article ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ShowMissingArticle": "MyExtensionHooks::onShowMissingArticle"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ShowMissingArticle'][] = 'MyExtensionHooks::onShowMissingArticle';
Called from: File(s): Article.php

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

Details[edit]

  • $article: The article object corresponding to the page