You are here

function template_preprocess_faq_ask_unanswered_block in FAQ_Ask 7

Same name and namespace in other branches
  1. 8 faq_ask.module \template_preprocess_faq_ask_unanswered_block()

Create list of unanswered questions for display in block

Parameters

&$variables: Array reference of arguments given to the theme() function.

File

./faq_ask.unanswered.inc, line 13
Theming preparation unanswered list functions for the FAQ-Ask module.

Code

function template_preprocess_faq_ask_unanswered_block(&$variables) {
  $data = $variables['data'];
  $mode = $variables['mode'];
  $more_link = $variables['more_link'];
  $items = array();
  foreach ($data as $nid) {
    $items[] = _faq_ask_answerlink($nid, $mode);
  }
  $variables['items'] = $items;
  if ($more_link) {
    $variables['links'] = l(t('more...'), 'faq_ask/unanswered', array(
      'attributes' => array(
        'class' => array(
          'faq_ask_more_link',
        ),
      ),
    ));
  }
  $variables['message'] = '<p class="faq_ask_expert_advice">' . filter_xss_admin(variable_get('faq_ask_asker_advice', _faq_ask_advice_default('asker'))) . '</p>';
}