Open main menu

Extension:MobileFrontend/EnableMobileModules

< Extension:MobileFrontend
EnableMobileModules
Available from version ??? (Gerrit change 56887)
Allow other extensions to add modules depending on the MobileFrontend mode
Define function:
public static function onEnableMobileModules( $out, $mode ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"EnableMobileModules": "MyExtensionHooks::onEnableMobileModules"
	}
}

For MediaWiki ≤1.25:

$wgHooks['EnableMobileModules'][] = 'MyExtensionHooks::onEnableMobileModules';
Called from:File(s): MobileFrontend extension/SkinMobile.php

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

DetailsEdit

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