function theme_panels_rounded_corners_style_render_region in Panels 7.3
Same name and namespace in other branches
- 6.3 plugins/styles/corners/rounded_corners.inc \theme_panels_rounded_corners_style_render_region()
Render callback.
File
- plugins/
styles/ corners/ rounded_corners.inc, line 29 - Definition of the 'rounded_corners' panel style.
Code
function theme_panels_rounded_corners_style_render_region($vars) {
$display = $vars['display'];
$region_id = $vars['region_id'];
$panes = $vars['panes'];
$settings = $vars['settings'];
$output = '';
// Determine where to put the box. If empty or 'pane' around each pane. If
// 'panel' then just around the whole panel.
$where = empty($settings['corner_location']) ? 'pane' : $settings['corner_location'];
$print_separator = FALSE;
foreach ($panes as $pane_id => $pane) {
// Add the separator if we've already displayed a pane.
if ($print_separator) {
$output .= '<div class="panel-separator"> </div>';
}
if ($where == 'pane') {
$output .= theme('panels_rounded_corners_box', array(
'content' => $pane,
));
}
else {
$output .= $pane;
$print_separator = TRUE;
}
}
if ($where == 'panel') {
$output = theme('panels_rounded_corners_box', array(
'content' => $output,
));
}
panels_add_rounded_corners_css($display, $where);
return $output;
}