function poll_teaser in Drupal 4
Same name and namespace in other branches
- 5 modules/poll/poll.module \poll_teaser()
- 6 modules/poll/poll.module \poll_teaser()
- 7 modules/poll/poll.module \poll_teaser()
Creates a simple teaser that lists all the choices.
1 call to poll_teaser()
- poll_submit in modules/
poll.module - Implementation of hook_submit().
File
- modules/
poll.module, line 281 - 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;
}