function template_preprocess_faqfield_details_formatter in FAQ Field 8
Same name and namespace in other branches
- 2.0.x faqfield.module \template_preprocess_faqfield_details_formatter()
Prepares variables for the details field formatter template.
Parameters
array $variables: An associative array containing:
- question: fields.
- question: Prefiltered question value by strip_tags.
- answer: Answer value.
- answer_format: Answer markup format.
- delta: Delta of field element.
File
- ./
faqfield.module, line 104 - Defines a field for frequently asked questions.
Code
function template_preprocess_faqfield_details_formatter(array &$variables) {
$variables['question'] = Markup::create(trim(strip_tags($variables['question'])));
$variables['answer'] = check_markup($variables['answer'], $variables['answer_format']);
}