function poll_teaser
7.x poll.module | poll_teaser($node) |
6.x poll.module | poll_teaser($node) |
Creates a simple teaser that lists all the choices.
This is primarily used for RSS.
1 call to poll_teaser()
- poll_node_form_submit in drupal-7.x/
modules/ poll/ poll.module - Form submit handler for node_form().
File
- drupal-7.x/
modules/ poll/ poll.module, line 694 - Enables your site to capture 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;
}