From MediaWiki.org
Jump to navigation Jump to search
Available from version 1.22.0
A hook that runs at the point the mobile site initializes.
Define function:
public static function onEnterMobileMode( $MobileContext ) { ... }
Attach hook:
$wgHooks['EnterMobileMode'][] = 'MyExtensionHooks::onEnterMobileMode';
Called from:File(s): MobileFrontend / MobileContext.php

For more information about attaching hooks, see $1.
For examples of other extensions using this hook, see Category:EnterMobileMode extensions.


  • $MobileContext - an extension of ContextSource that allows you to check the mode of mobile (e.g. alpha, beta or stable) using isBetaGroupMember() and isAlphaGroupMember() methods.