Manual:Hooks/wgQueryPages

From Linux Web Expert

wgQueryPages
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Runs for every Special page that extends the QueryPage class (fired when including the file QueryPage.php). It is only useful in maintenance/updateSpecialPages.php and in QueryPage Api.
<translate> Define function:</translate>
public static function onwgQueryPages( &$wgQueryPages ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"wgQueryPages": "MediaWiki\\Extension\\MyExtension\\Hooks::onwgQueryPages"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> specialpage/QueryPage.php
<translate> Interface:</translate> WgQueryPagesHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:wgQueryPages extensions</tvar>.</translate>


Details

$wgQueryPages is an array of 2-element arrays. The first element of each array is the class name of the query page. The second element of each array is the name registered in your special page's constructor.