function _poll_menu_access

Access callback: Determines if a node is acceptable for poll menu items.

Parameters

$node: The poll node object.

$perm: A permission the user must have to view the page.

$inspect_allowvotes: TRUE if the user can view votes, and FALSE if the user cannot view votes.

1 string reference to '_poll_menu_access'
poll_menu in drupal/core/modules/poll/poll.module
Implements hook_menu().

File

drupal/core/modules/poll/poll.module, line 117
Collects votes on different topics in the form of multiple choice questions.

Code

function _poll_menu_access($node, $perm, $inspect_allowvotes) {
  return user_access($perm) && $node->type == 'poll' && ($node->allowvotes || !$inspect_allowvotes);
}