Extension:MobileFrontend/GetMobileUrl
GetMobileUrl | |
---|---|
Available from version master (Gerrit change 4377) Take a URL and return a copy that conforms to the mobile URL template | |
Define function: | public static function onGetMobileUrl( string $url, bool $forceHttps=false ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"GetMobileUrl": "MediaWiki\\Extension\\MyExtension\\Hooks::onGetMobileUrl"
}
}
|
Called from: | File(s): MobileFrontend extension/MobileContext.php |
Interface: | GetMobileUrlHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:GetMobileUrl extensions.
Details edit
$url
: Contains the address.$forceHttps
: Predefined asfalse
.