You are here

function mobile_tools_preprocess_page in Mobile Tools 6.2

Same name and namespace in other branches
  1. 6.3 mobile_tools.module \mobile_tools_preprocess_page()

Implementation of template_preprocess_page().

File

./mobile_tools.module, line 586
Primarily Drupal hooks.

Code

function mobile_tools_preprocess_page(&$variables) {

  // Determine the current site type
  $site = mobile_tools_site_type();

  // Add the mobile device meta tags only if they are enabled and the site
  // visitor is viewing the mobile site
  if (variable_get('mobile_tools_add_header', 1) && $site == 'mobile') {

    // Add mobile device meta tags
    drupal_set_html_head('<meta name="viewport" content="user-scalable=no, width=device-width, maximum-scale=1.0" />');
    drupal_set_html_head('<meta name="apple-mobile-web-app-capable" content="yes" />');
    drupal_set_html_head('<meta name="HandheldFriendly" content="true" />');
    $variables['head'] = drupal_get_html_head();
  }
}