Manual:Hooks/RedirectSpecialArticleRedirectParams

From MediaWiki.org
Jump to navigation Jump to search
RedirectSpecialArticleRedirectParams
Available from version 1.20.0
Lets you alter the set of parameter names such as "oldid" that are preserved when using.
Define function:
public static function onRedirectSpecialArticleRedirectParams( &$redirectParams ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"RedirectSpecialArticleRedirectParams": "MyExtensionHooks::onRedirectSpecialArticleRedirectParams"
	}
}

For MediaWiki ≤1.25:

$wgHooks['RedirectSpecialArticleRedirectParams'][] = 'MyExtensionHooks::onRedirectSpecialArticleRedirectParams';
Called from:File(s): SpecialPage.php

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

Details[edit]

  • &$redirectParams: An array of parameters preserved by redirecting special pages.