You are here

function poll_menu in Drupal 7

Same name and namespace in other branches
  1. 4 modules/poll.module \poll_menu()
  2. 5 modules/poll/poll.module \poll_menu()
  3. 6 modules/poll/poll.module \poll_menu()

Implements hook_menu().

File

modules/poll/poll.module, line 89
Enables your site to capture votes on different topics in the form of multiple choice questions.

Code

function poll_menu() {
  $items['poll'] = array(
    'title' => 'Polls',
    'page callback' => 'poll_page',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_SUGGESTED_ITEM,
    'file' => 'poll.pages.inc',
  );
  $items['node/%node/votes'] = array(
    'title' => 'Votes',
    'page callback' => 'poll_votes',
    'page arguments' => array(
      1,
    ),
    'access callback' => '_poll_menu_access',
    'access arguments' => array(
      1,
      'inspect all votes',
      FALSE,
    ),
    'weight' => 3,
    'type' => MENU_LOCAL_TASK,
    'file' => 'poll.pages.inc',
  );
  $items['node/%node/results'] = array(
    'title' => 'Results',
    'page callback' => 'poll_results',
    'page arguments' => array(
      1,
    ),
    'access callback' => '_poll_menu_access',
    'access arguments' => array(
      1,
      'access content',
      TRUE,
    ),
    'weight' => 3,
    'type' => MENU_LOCAL_TASK,
    'file' => 'poll.pages.inc',
  );
  return $items;
}