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