function form_pre_render_vertical_tabs

Prepares a vertical_tabs element for rendering.

Parameters

array $element: An associative array containing the properties and children of the vertical tabs element.

Return value

array The modified element.

Related topics

1 string reference to 'form_pre_render_vertical_tabs'
system_element_info in drupal/core/modules/system/system.module
Implements hook_element_info().

File

drupal/core/includes/form.inc, line 4053
Functions for form and batch generation and processing.

Code

function form_pre_render_vertical_tabs($element) {

  // Do not render the vertical tabs element if it is empty.
  $group = implode('][', $element['#parents']);
  if (!element_get_visible_children($element['group']['#groups'][$group])) {
    $element['#printed'] = TRUE;
  }
  return $element;
}