You are here

function _field_paragraphs_table_remove_title in Paragraphs table 7

Custom function _field_paragraphs_table_remove_title().

1 call to _field_paragraphs_table_remove_title()
theme_paragraphs_table_multiple_value_fields in theme/theme.inc
Replacement for theme_field_multiple_value_form().

File

theme/theme.inc, line 211
Theme defined for Paragraph table module.

Code

function _field_paragraphs_table_remove_title(&$field) {
  if (isset($field['#language']) && isset($field[$field['#language']])) {
    $language = $field['#language'];
    if (isset($field[$language]['#title'])) {
      $field[$language]['#title_display'] = 'none';
    }
    elseif (isset($field[$language][0]['#title'])) {
      $field[$language][0]['#title_display'] = 'none';
    }
    if (!empty($field[$language]['select']['#title'])) {
      $field[$language]['select']['#title_display'] = 'none';
    }
    if (!empty($field[$language][0]["value"]["date"])) {
      $field[$language][0]["value"]["date"]['#title_display'] = 'none';
      $field[$language][0]['#title_display'] = 'none';
    }
  }
  elseif (isset($field['#title'])) {
    $field['#title_display'] = 'none';
  }
  elseif (isset($field['#value'])) {
    $field['#value'] = '';
  }
}