function socialbase_form_social_post_entity_form_alter in Open Social 8.7
Same name and namespace in other branches
- 8.9 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()
- 8 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()
- 8.2 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()
- 8.3 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()
- 8.4 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()
- 8.5 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()
- 8.6 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()
- 8.8 themes/socialbase/includes/form.inc \socialbase_form_social_post_entity_form_alter()
Implements hook_form_FORM_ID_alter().
File
- themes/
socialbase/ includes/ form.inc, line 135 - The form inc file for the Social base theme.
Code
function socialbase_form_social_post_entity_form_alter(&$form, FormStateInterface $form_state, $form_id) {
$form['actions']['#inline'] = TRUE;
$form['field_visibility']['#inline'] = TRUE;
// Give the `delete` button correct classes.
if (isset($form['actions']['delete']['#type']) && $form['actions']['delete']['#type'] == 'link') {
$form['actions']['delete']['#attributes']['class'][] = 'btn btn-flat';
}
}