function theme_advpoll_block_latest_poll in Advanced Poll 5
Same name and namespace in other branches
- 6.3 advpoll.module \theme_advpoll_block_latest_poll()
- 6 advpoll.module \theme_advpoll_block_latest_poll()
- 6.2 advpoll.module \theme_advpoll_block_latest_poll()
Content of the block, as returned by advpoll_block('view').
1 theme call to theme_advpoll_block_latest_poll()
- advpoll_block in ./
advpoll.module - Implementation of hook_block().
File
- ./
advpoll.module, line 217 - Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.
Code
function theme_advpoll_block_latest_poll() {
$node = advpoll_latest_poll();
$output = '';
if ($node) {
$output .= '<h3>' . check_plain($node->title) . '</h3>';
$output .= drupal_render($node->content);
if ($node->voted) {
$output .= '<p>' . l(t('Older polls'), 'polls', array(
'class' => 'old-polls',
'title' => t('View the list of polls on this site.'),
)) . '</p>';
}
}
return $output;
}