You are here

function getlocations_fields_menu in Get Locations 7

Same name and namespace in other branches
  1. 7.2 modules/getlocations_fields/getlocations_fields.module \getlocations_fields_menu()

Implements hook_menu().

File

modules/getlocations_fields/getlocations_fields.module, line 40
getlocations_fields.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_fields_menu() {
  $items = array();
  $items[GETLOCATIONS_ADMIN_PATH . '/fields'] = array(
    'title' => 'Fields',
    'description' => 'Configure Getlocations fields',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'getlocations_fields_settings_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'getlocations_fields.admin.inc',
    'weight' => 2,
  );

  #  // ajax callback to fetch country code from full name

  #  $items['getlocations_fields/countryinfo'] = array(

  #    'page callback' => 'getlocations_fields_countryinfo',

  #    'access arguments' => array('access content'),

  #    'type' => MENU_CALLBACK,

  #  );

  // autocomplete paths
  $items['getlocations_fields/country_autocomplete'] = array(
    'page callback' => 'getlocations_fields_country_autocomplete',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['getlocations_fields/province_autocomplete'] = array(
    'page callback' => 'getlocations_fields_province_autocomplete',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['getlocations_fields/city_autocomplete'] = array(
    'page callback' => 'getlocations_fields_city_autocomplete',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  if (module_exists('smart_ip')) {
    $items['getlocations_fields/smart_ip'] = array(
      'page callback' => 'getlocations_fields_smart_ip',
      'access arguments' => array(
        'access content',
      ),
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}