function mobile_switch_get_operating_mode in Mobile Switch 7.2
Helper function to get the Mobile Switch operating mode.
Return value
string Possible values: none, detectonly, redirect and themeswitch.
5 calls to mobile_switch_get_operating_mode()
- mobile_switch_administer_advanced in ./
mobile_switch.module - Access callback.
- mobile_switch_administer_development in ./
mobile_switch.module - Access callback.
- mobile_switch_advanced_settings_form in includes/
mobile_switch.admin.inc - Form constructor for the Advanced settings form.
- mobile_switch_boot in ./
mobile_switch.module - Implements hook_boot().
- mobile_switch_init in ./
mobile_switch.module - Implements hook_init().
File
- ./
mobile_switch.module, line 745 - Provides various functionalities to develop mobile ready websites.
Code
function mobile_switch_get_operating_mode() {
static $mode;
if (!isset($mode)) {
$mode = variable_get('mobile_switch_mobile_theme', 'none');
if ($mode != 'none' && $mode != 'detectonly' && $mode != 'redirect') {
$mode = 'themeswitch';
}
}
return $mode;
}