function timezone_detect_menu in Timezone Detect 7
Same name and namespace in other branches
- 6 timezone_detect.module \timezone_detect_menu()
Implements hook_menu().
File
- ./
timezone_detect.module, line 15 - Module provides automatic timezone detection via javascript.
Code
function timezone_detect_menu() {
// Admin settings.
$items['admin/config/regional/timezone_detect'] = array(
'title' => 'Timezone Detect',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'timezone_detect_admin_form',
),
'access arguments' => array(
'administer site configuration',
),
'description' => 'Configure timezone detection settings.',
'file' => 'timezone_detect.admin.inc',
);
$items['admin/config/regional/timezone_detect/admin'] = array(
'title' => 'Timezone Detect',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
// Ajax callback function to set current user's timezone.
$items['timezone-detect/ajax/set-timezone'] = array(
'title' => 'Update session timezone',
'page callback' => 'timezone_detect_set_timezone',
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
return $items;
}