function panels_tabs_panels_pane_content_alter in Panels Tabs 7
Same name and namespace in other branches
- 6 panels_tabs.module \panels_tabs_panels_pane_content_alter()
- 7.2 panels_tabs.module \panels_tabs_panels_pane_content_alter()
Implements hook_panels_pane_content_alter().
Hold the title of the pane for later use (i.e. show it as the tab's title), and remove it form the pane itself.
File
- ./
panels_tabs.module, line 23 - Show panel panes in a region as tabs.
Code
function panels_tabs_panels_pane_content_alter(&$content, $pane, $args, $context, $renderer, $display) {
// Get the regions that should be themed as tabs.
foreach ($display->panel_settings as $key => $values) {
if ($key == 'style_settings') {
continue;
}
if (!empty($values['style']) && $values['style'] == 'tabs' && $pane->panel == $key && !empty($content->title)) {
// Capture the title.
panels_tabs_pane_titles($display->did, $pane->pid, $content->title);
// Remove it form the pane.
$content->title = '';
}
}
}