function _quicktabs_construct_link_options in Quick Tabs 6.2
Same name and namespace in other branches
- 6.3 quicktabs.module \_quicktabs_construct_link_options()
- 7.2 quicktabs.module \_quicktabs_construct_link_options()
Helper function to construct link options for tab links.
1 call to _quicktabs_construct_link_options()
- theme_quicktabs_tabs in ./
quicktabs.module - Theme function for output of the tabs. Use this to ADD extra classes. The general structure 'ul.quicktabs_tabs li a' needs to be maintained for the jQuery to work.
File
- ./
quicktabs.module, line 351
Code
function _quicktabs_construct_link_options($quicktabs, $tabkey) {
$qtid = $quicktabs['qtid'];
$ajax = $quicktabs['ajax'];
$tab = $quicktabs['tabs'][$tabkey];
$id = 'quicktabs-tab-' . implode('-', array(
$qtid,
$tabkey,
));
// Need to construct the correct query for the tab links.
$query = $_GET;
unset($query['quicktabs_' . $qtid]);
unset($query['q']);
unset($query['page']);
$query['quicktabs_' . $qtid] = $tabkey;
if ($ajax) {
$class = 'qt_ajax_tab';
}
else {
$class = 'qt_tab';
}
$link_options = array(
'attributes' => array(
'id' => $id,
'class' => $class,
),
'query' => $query,
'fragment' => 'quicktabs-' . $qtid,
);
return $link_options;
}