Manual:Hooks/BeforeDisplayNoArticleText

From MediaWiki.org
Jump to: navigation, search
BeforeDisplayNoArticleText
Available from version 1.19.0
Before displaying noarticletext or noarticletext-nopermission messages.
Define function:
public static function onBeforeDisplayNoArticleText( $article ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"BeforeDisplayNoArticleText": "MyExtensionHooks::onBeforeDisplayNoArticleText"
	}
}

For MediaWiki ≤1.25:

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

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

Details[edit]

  • $article: article object