poll_teaser

Versions
4.6 – 7
poll_teaser($node)

Creates a simple teaser that lists all the choices.

Code

modules/poll/poll.module, line 354

<?php
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;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.