Manual:Hooks/RedirectSpecialArticleRedirectParams

From Linux Web Expert

RedirectSpecialArticleRedirectParams
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Lets you alter the set of parameter names such as "oldid" that are preserved when using redirecting special pages such as Special:MyPage and Special:MyTalk.
<translate> Define function:</translate>
public static function onRedirectSpecialArticleRedirectParams( &$redirectParams ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"RedirectSpecialArticleRedirectParams": "MediaWiki\\Extension\\MyExtension\\Hooks::onRedirectSpecialArticleRedirectParams"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> SpecialPage.php
<translate> Interface:</translate> RedirectSpecialArticleRedirectParamsHook.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:RedirectSpecialArticleRedirectParams extensions</tvar>.</translate>


Details

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