'; if (isset($element['#description'])) { $output .= '
' . $element['#description'] . '
'; } $output .= ''; return $output; foreach (element_children($element) as $key) { $child = &$element[$key]; if (isset($child['#type']) && $child['#type'] == 'tabpage') { // Ensure the tab has content before rendering it. if ( (isset($child['#ajax_url']) && !empty($child['#ajax_url'])) || (isset($child['#content']) && !empty($child['#content'])) || (isset($child['#children']) && !empty($child['#children'])) ) { $output .= ''. $child['#title'] .''; } } } $output .= ''; if (isset($element['#children'])) { $output .= $element['#children']; } $output .= ''; return $output; } /** * Return rendered content of a tab. * * @themable */ function theme_tabpage($variables) { $element = $variables['element']; $output = ''; // Ensure the tab has content before rendering it. if (!empty($element['#ajax_url']) || !empty($element['#content']) || !empty($element['#children'])) { $output .= '
'; $output .= '

'. $element['#title'] .'

'; $output .= $element['#content'] . (!empty($element['#children']) ? $element['#children'] : ''); $output .='
'; } return $output; }