Manual:Hooks/ChangesListSpecialPageFilters

From MediaWiki.org
Jump to navigation Jump to search
ChangesListSpecialPageFilters
Available from version 1.23.0 (Gerrit change 106279)
Called after building form options on pages inheriting from ChangesListSpecialPage (in core: RecentChanges, RecentChangesLinked and Watchlist).
Define function:
public static function onChangesListSpecialPageFilters( $special, &$filters ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ChangesListSpecialPageFilters": "MyExtensionHooks::onChangesListSpecialPageFilters"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ChangesListSpecialPageFilters'][] = 'MyExtensionHooks::onChangesListSpecialPageFilters';
Called from:File(s): specialpage/ChangesListSpecialPage.php

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

Details[edit]

  • $special: ChangesListSpecialPage instance
  • &$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.