You are here

function mobile_tools_menu_link_access in Mobile Tools 6.2

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

Access function for the mobile tools menu links. It decides on which link to shown.

1 string reference to 'mobile_tools_menu_link_access'
mobile_tools_menu in ./mobile_tools.module
Implementation of hook_menu().

File

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

Code

function mobile_tools_menu_link_access($target_site) {
  if (preg_match('/admin\\/build\\/menu/', $_GET['q'])) {
    return TRUE;
  }
  $current_site = mobile_tools_site_type();

  // Only show the link if it's target is different then the current site
  if ($target_site == $current_site) {
    return FALSE;
  }
  else {
    return TRUE;
  }
}