function theme_panels_ajax_tab_tabs in Panels Ajax Tabs 7
Theme function that renders the panels ajax tabs.
1 theme call to theme_panels_ajax_tab_tabs()
- panels_ajax_tab_tabs_render in plugins/
content_types/ panels_ajax_tab_tabs.inc - Rendering function for the 'panels_ajax_tab_tabs' content type.
File
- ./
panels_ajax_tab.module, line 278 - Allows users to create and manage Panels Ajax Tabs.
Code
function theme_panels_ajax_tab_tabs($vars) {
foreach ($vars['tabs'] as $tab) {
$url_enabled = isset($tab['url_enabled']) ? $tab['url_enabled'] : 1;
$tabhtml = '<a href="' . $tab['href'] . '" class="panels-ajax-tab-tab" data-panel-name="' . $tab['mini_panel']->name . '" data-target-id="' . $vars['tab_container_id'] . '" data-entity-context="' . $vars['context_string'] . '" data-trigger="' . $tab['url_id'] . '" data-url-enabled="' . $url_enabled . '">' . $tab['title'] . '</a>';
// Add a hidden link for javascript enabled crawlers (but not normal web
// crawlers).
$tabhtml .= '<a href="/panels_ajax_tab/' . $tab['mini_panel']->name . '/' . $vars['context_string'] . '/' . $url_enabled . '" rel="nofollow" style="display:none" class="js-crawler-link"></a>';
$tabs[] = $tabhtml;
}
return theme('item_list', array(
'items' => $tabs,
'attributes' => array(
'class' => array(
'tabs',
'inline',
'panels-ajax-tab',
),
),
));
}