Manual:Hooks/SpecialWatchlistFilters
From Linux Web Expert
File:OOjs UI icon alert-destructive.svg | <translate> This feature was removed from MediaWiki core in version <tvar name=ver>1.32.0</tvar> (after being deprecated in <tvar name=4>1.23.0</tvar>).</translate> <translate> Please see <tvar name=page>ChangesListSpecialPageStructuredFilters</tvar> for an alternative way to use this feature.</translate> |
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.