You are here

function timezone_detect_menu in Timezone Detect 6

Same name and namespace in other branches
  1. 7 timezone_detect.module \timezone_detect_menu()

Implements hook_menu().

File

./timezone_detect.module, line 22
Module provides automatic timezone detection via javascript.

Code

function timezone_detect_menu() {

  // Admin settings.
  $items['admin/settings/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',
  );

  // Ajax callback function to set current user's timezone.
  $items['timezone-detect/set-timezone'] = array(
    'title' => 'Update session timezone',
    'page callback' => 'timezone_detect_set_timezone',
    'access callback' => 'timezone_detect_set_timezone_access',
    'type' => MENU_CALLBACK,
  );
  return $items;
}