function socialbase_preprocess_textarea in Open Social 8.2
Same name and namespace in other branches
- 8.9 themes/socialbase/includes/input.inc \socialbase_preprocess_textarea()
- 8 themes/socialbase/includes/input.inc \socialbase_preprocess_textarea()
- 8.3 themes/socialbase/includes/input.inc \socialbase_preprocess_textarea()
- 8.4 themes/socialbase/includes/input.inc \socialbase_preprocess_textarea()
- 8.5 themes/socialbase/includes/input.inc \socialbase_preprocess_textarea()
- 8.6 themes/socialbase/includes/input.inc \socialbase_preprocess_textarea()
- 8.7 themes/socialbase/includes/input.inc \socialbase_preprocess_textarea()
- 8.8 themes/socialbase/includes/input.inc \socialbase_preprocess_textarea()
Implements hook_preprocess_textarea().
File
- themes/
socialbase/ includes/ input.inc, line 102 - The input inc file for the Social base theme.
Code
function socialbase_preprocess_textarea(&$variables) {
if (isset($variables['element']['#array_parents'])) {
$context = $variables['element']['#array_parents'];
// Identify text areas that need to get autogrow behaviour.
$autogrow_areas = [
'field_post',
'field_comment_body',
'message',
];
$c = array_intersect($context, $autogrow_areas);
if (count($c) > 0) {
$variables['autogrow'] = 'true';
}
}
}