You are here

function site_verify_menu in Site verification 6

Same name and namespace in other branches
  1. 7.2 site_verify.module \site_verify_menu()
  2. 7 site_verify.module \site_verify_menu()

Implements hook_menu().

File

./site_verify.module, line 6

Code

function site_verify_menu() {
  $items['admin/build/site-verify'] = array(
    'title' => 'Site verifications',
    'description' => 'Add, change or remove verifications for your site.',
    'page callback' => 'site_verify_list',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'site_verify.admin.inc',
  );
  $items['admin/build/site-verify/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/build/site-verify/add'] = array(
    'title' => 'Add verification',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'site_verify_edit_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'site_verify.admin.inc',
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/build/site-verify/add/%site_verify_engine'] = array(
    'title' => 'Add',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'site_verify_edit_form',
      array(),
      4,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'site_verify.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['admin/build/site-verify/%site_verify/edit'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'site_verify_edit_form',
      3,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'site_verify.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['admin/build/site-verify/%site_verify/delete'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'site_verify_delete_form',
      3,
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'site_verify.admin.inc',
    'type' => MENU_CALLBACK,
  );

  // Add the verification paths.
  $query = db_query("SELECT svid, file FROM {site_verify} WHERE file <> ''");
  while ($engine = db_fetch_object($query)) {
    $items[$engine->file] = array(
      'page callback' => 'site_verify_output',
      'page arguments' => array(
        (string) $engine->svid,
      ),
      'access callback' => TRUE,
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}