Extension:MobileFrontend/EnableMobileModules

From Linux Web Expert

EnableMobileModules
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 56887)</tvar></translate>
Allow other extensions to add modules depending on the MobileFrontend mode
<translate> Define function:</translate>
public static function onEnableMobileModules( $out, $mode ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"EnableMobileModules": "MediaWiki\\Extension\\MyExtension\\Hooks::onEnableMobileModules"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> MobileFrontend extension/SkinMobile.php
<translate> Interface:</translate> EnableMobileModulesHook.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:EnableMobileModules extensions</tvar>.</translate>


Details

  • $out: OutputPage
  • $mode: String, such as 'alpha', 'beta', 'stable'