On this page
function poll_teaser
poll_teaser($node)
Creates a simple teaser that lists all the choices.
This is primarily used for RSS.
File
- modules/poll/poll.module, line 688
- 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 $choice) {
if ($choice['chtext'] != '') {
$teaser .= '* ' . check_plain($choice['chtext']) . "\n";
}
}
}
return $teaser;
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!poll!poll.module/function/poll_teaser/7.x