You are here

mobile_switch.api.php in Mobile Switch 7.2

Same filename and directory in other branches
  1. 6 mobile_switch.api.php
  2. 7 mobile_switch.api.php

Hooks provided by the Mobile Switch module.

File

mobile_switch.api.php
View source
<?php

/**
 * @file
 * Hooks provided by the Mobile Switch module.
 */

/**
 * Alter various configuration settings and values.
 *
 * @param $conf
 *   The associative array contains the values to alter.
 * @param $get
 *   The associative array contains various parameters to help to alter.
 *
 * @ingroup hooks
 */
function hook_mobile_switch_boot_alter(&$conf, $get) {

  // Theme switch from URL.
  // Set users cookie.
  if (isset($_GET['mobile_switch'])) {
    _mobile_switch_block_set_cookie($_GET['mobile_switch']);
    $get['theme_cookie'] = $_GET['mobile_switch'];
  }

  // Provide cookie value.
  $get['theme_cookie'] = _mobile_switch_block_get_cookie();
}

Functions

Namesort descending Description
hook_mobile_switch_boot_alter Alter various configuration settings and values.