function poll_teaser

Creates a simple teaser that lists all the choices.

This is primarily used for RSS.

Parameters

$node: The poll node object.

Return value

Poll choices in a simple teaser format.

1 call to poll_teaser()
poll_node_form_submit in drupal/core/modules/poll/poll.module
Entity builder for node_form().

File

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

Code

function poll_teaser($node) {
  $teaser = NULL;
  if (is_array($node->choice)) {
    foreach ($node->choice as $k => $choice) {
      if ($choice['chtext'] != '') {
        $teaser .= '* ' . check_plain($choice['chtext']) . "\n";
      }
    }
  }
  return $teaser;
}