function _mobile_switch_block_url in Mobile Switch Block 6
Same name and namespace in other branches
- 7.2 mobile_switch_block.module \_mobile_switch_block_url()
 - 7 mobile_switch_block.module \_mobile_switch_block_url()
 
Get the mobile switch URL.
Parameters
$mode: A string with the possible values:
- standard
 - mobile
 
$manual: A boolean value.
See also
theme_mobile_switch_block()
1 call to _mobile_switch_block_url()
- template_preprocess_mobile_switch_block_switch_content in ./
mobile_switch_block.module  - Processes variables for mobile-switch-block-switch-content.tpl.php.
 
File
- ./
mobile_switch_block.module, line 345  - Extends the Mobile Switch module with an theme switch block.
 
Code
function _mobile_switch_block_url($mode, $manual = FALSE) {
  $options['query']['mobile_switch'] = $manual ? $mode : 0;
  $options['absolute'] = TRUE;
  $current_path = $path = isset($_GET['q']) ? $_GET['q'] : '<front>';
  return url($current_path, $options);
}