Manual:Hooks/SpecialWatchlistFilters

From Linux Web Expert

SpecialWatchlistFilters
<translate> Available from <tvar name=1><translate> version <tvar (r88633, codereview)</tvar></translate>
<translate> Removed in <tvar name=1><translate> version <tvar (Gerrit change 460085)</tvar></translate>
Called after building form options for Special:Watchlist.
<translate> Define function:</translate>
public static function onSpecialWatchlistFilters( $special, &$filters ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"SpecialWatchlistFilters": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialWatchlistFilters"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> specials/SpecialWatchlist.php
<translate> Interface:</translate> SpecialWatchlistFiltersHook.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:SpecialWatchlistFilters extensions</tvar>.</translate>


Details

  • $special: the special page object
  • &$filters: associative array of filter definitions. The keys are the HTML name/URL parameters. Each key maps to an associative array with a 'msg' (message key) and a 'default' value.