array( 'title' => t('Transparent Corners'), 'description' => t('Presents the panes or panels with transparent corners around them'), 'render panel' => 'panels_corner_trans_style_render_panel', 'settings form' => 'panels_corner_trans_style_settings_form', ), ); } // --------------------------------------------------------------------------- // Panels style plugin callbacks. /** * Render callback. * * @ingroup themeable */ function theme_panels_corner_trans_style_render_panel($display, $panel_id, $panes, $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']; foreach ($panes as $pane_id => $pane) { $pane->title = theme('corner_trans_title', $pane->title); $text = theme('panels_pane', $pane, $display->content[$pane_id], $display); if ($text) { $output .= ($where == 'pane') ? theme('corner_trans_box', $text) : $text; } } $output = theme('corner_trans_box', $output); static $displays_used = array(); if (empty($displays_used[$display->name])) { theme('corner_trans_css', $display, $where); $displays_used[$display->name] = TRUE; } return $output; } // --------------------------------------------------------------------------- // Themeing callbacks. /** * @ingroup themable * @{ */ /** * Generates the dynamic CSS. * * @param $display * A Panels display object. * @param $where * String indicating where the rounded allourquilts should be applied, either * 'pane' or 'panel'. */ function theme_corner_trans_css($display, $where = 'pane') { $idstr = empty($display->css_id) ? '.corner_trans' : "#$display->css_id"; $url = panels_get_path('styles/corners', TRUE); $css = <<\n$css\n"); } /** * Create the HTML for our rounded corner box. * * @param $text * The content of this rounded corner box. * @return * The created HTML. */ function theme_corner_trans_title($content) { return <<

$content

EOF; } function theme_corner_trans_box($content) { return << $content
EOF; } /** * @} End of "ingroup themeable". */