Manual:Hooks/BeforeHttpsRedirect
From Linux Web Expert
File:OOjs UI icon alert-destructive.svg | <translate> This feature was removed completely in version <tvar name=ver>1.37.0</tvar> (after being deprecated in <tvar name=4>1.35.0</tvar>).</translate> |
BeforeHttpsRedirect | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 132952)</tvar></translate> <translate> Removed in <tvar name=1><translate> version <tvar (Gerrit change 675293)</tvar></translate> Called prior to forcing HTTP->HTTPS redirect. Use this hook to override how the redirect is output. | |
<translate> Define function:</translate> | public static function onBeforeHttpsRedirect( IContextSource $context, string &$redirect ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"BeforeHttpsRedirect": "MediaWiki\\Extension\\MyExtension\\Hooks::onBeforeHttpsRedirect"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> MediaWiki.php <translate> Function(s):</translate> maybeDoHttpsRedirect |
<translate> Interface:</translate> | BeforeHttpsRedirectHook.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:BeforeHttpsRedirect extensions</tvar>.</translate>
Details
- $context: An IContextSource instance
- &$redirect: A modifiable string URL