You are here

function smart_ip_menu in Smart IP 6

Same name and namespace in other branches
  1. 6.2 smart_ip.module \smart_ip_menu()
  2. 7.2 smart_ip.module \smart_ip_menu()
  3. 7 smart_ip.module \smart_ip_menu()

Implements hook_menu().

Called when Drupal is building menus. Cache parameter lets module know if Drupal intends to cache menu or not - different results may be returned for either case.

Return value

An array with the menu path, callback, and parameters.

File

./smart_ip.module, line 173
Determines country, geo location (longitude/latitude), region, city and postal code of the user, based on IP address

Code

function smart_ip_menu() {
  $items = array();
  $items['admin/settings/smart_ip'] = array(
    'title' => 'Smart IP',
    'description' => 'Configure the Smart IP settings',
    'access arguments' => array(
      'administer smart_ip',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'smart_ip_admin_settings',
    ),
    'file' => 'includes/smart_ip.admin.inc',
  );

  // Default page for Smart IP batch operations during cron run.
  $items['smart_ip_batch'] = array(
    'page callback' => 'smart_ip_run_batch',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  return $items;
}