< Extension:MobileFrontend < Hooks
| EnterMobileMode | |
|---|---|
| Available from version 1.22.0 (Gerrit change 57060) A hook that runs at the point the mobile site initializes. |
|
| Define function: | public static function onEnterMobileMode( MobileContext $mobileContext ) { ... }
|
| Attach hook: | $wgHooks['EnterMobileMode'][] = 'MyExtensionHooks::onEnterMobileMode';
|
| Called from: | File(s): MobileFrontend / includes/MobileContext.php Function(s): shouldDisplayMobileView |
For more information about attaching hooks, see Manual:Hooks.
For examples of other extensions using this hook, see Category:EnterMobileMode extensions.
Parameters
$mobileContext: An instance ofMobileContext, which represents an extended class ofContextSource. It allows you to check the mode of mobile ('beta'or'stable') by callingMobileContext::isBetaGroupMember().
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.