poll_menu

Versions
4.6 – 5
poll_menu($may_cache)
6 – 7
poll_menu()

Implementation of hook_menu().

Code

modules/poll/poll.module, line 76

<?php
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',
  );

  $items['poll/js'] = array(
    'title' => 'Javascript Choice Form',
    'page callback' => 'poll_choice_js',
    'access arguments' => array('access content'),
    'type' => MENU_CALLBACK,
  );

  return $items;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.