You are here

function template_preprocess_faqfield_simple_text_formatter in FAQ Field 8

Same name and namespace in other branches
  1. 2.0.x faqfield.module \template_preprocess_faqfield_simple_text_formatter()

Prepares variables for the simple text field formatter template.

Parameters

array $variables: An associative array containing:

  • question: Prefiltered question value by strip_tags.
  • answer: Answer value.
  • answer_format: Answer markup format.
  • delta: Delta of field element.

File

./faqfield.module, line 88
Defines a field for frequently asked questions.

Code

function template_preprocess_faqfield_simple_text_formatter(array &$variables) {
  $variables['question'] = Markup::create(trim(strip_tags($variables['question'])));
  $variables['answer'] = check_markup($variables['answer'], $variables['answer_format']);
}