You are here

function _nodeformcols_get_element_title in Node form columns 7

1 call to _nodeformcols_get_element_title()
nodeformcols_update_placements in ./nodeformcols.admin.inc

File

./nodeformcols.admin.inc, line 107
Contains the admin functions for Node form columns

Code

function _nodeformcols_get_element_title($element) {
  if (!empty($element['#title'])) {
    return $element['#title'];
  }
  if (isset($element['#type']) && $element['#type'] == 'submit') {
    return $element['#value'];
  }
  if (isset($element['#type']) && $element['#type'] == 'vertical_tabs') {
    return t('Vertical tabs');
  }
  foreach (element_children($element) as $key) {
    if ($title = _nodeformcols_get_element_title($element[$key])) {
      return $title;
    }
  }
}