Manual:Hooks/Article::MissingArticleConditions

From MediaWiki.org
Jump to navigation Jump to search
Article::MissingArticleConditions
Available from version 1.23.0
Before fetching deletion & move log entries to display a message of a non-existing page being deleted/moved, give extensions a chance to hide their (unrelated) log entries.
Define function:
public static function onArticle_MissingArticleConditions( &$conds, $logTypes ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"Article::MissingArticleConditions": "MyExtensionHooks::onArticleMissingArticleConditions"
	}
}

For MediaWiki ≤1.25:

$wgHooks['Article::MissingArticleConditions'][] = 'MyExtensionHooks::onArticleMissingArticleConditions';
Called from:File(s): page/Article.php

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

Details[edit]

  • &$conds: Array of query conditions (all of which have to be met; conditions will AND in the final query)
  • $logTypes: Array of log types being queried