function template_preprocess_poll_results

cis7 poll.module template_preprocess_poll_results(&$variables)
cle7 poll.module template_preprocess_poll_results(&$variables)
elmsmedia7 poll.module template_preprocess_poll_results(&$variables)
icor7 poll.module template_preprocess_poll_results(&$variables)
meedjum_blog7 poll.module template_preprocess_poll_results(&$variables)
mooc7 poll.module template_preprocess_poll_results(&$variables)

Preprocess the poll_results theme hook.

Inputs: $raw_title, $results, $votes, $raw_links, $block, $nid, $vote. The $raw_* inputs to this are naturally unsafe; often safe versions are made to simply overwrite the raw version, but in this case it seems likely that the title and the links may be overridden by the theme layer, so they are left in with a different name for that purpose.

See also

poll-results.tpl.php

poll-results--block.tpl.php

File

modules/poll/poll.module, line 908
Enables your site to capture votes on different topics in the form of multiple choice questions.

Code

function template_preprocess_poll_results(&$variables) {
  $variables['links'] = theme('links__poll_results', array('links' => $variables['raw_links']));
  if (isset($variables['vote']) && $variables['vote'] > -1 && user_access('cancel own vote')) {
    $elements = drupal_get_form('poll_cancel_form', $variables['nid']);
    $variables['cancel_form'] = drupal_render($elements);
  }
  $variables['title'] = check_plain($variables['raw_title']);

  if ($variables['block']) {
    $variables['theme_hook_suggestions'][] = 'poll_results__block';
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.