function _quicktabs_get_active_tab in Quick Tabs 6.2
Same name and namespace in other branches
- 6.3 quicktabs.module \_quicktabs_get_active_tab()
- 7.2 quicktabs.module \_quicktabs_get_active_tab()
Helper function to determine active tab from the url.
1 call to _quicktabs_get_active_tab()
- quicktabs_render in ./
quicktabs.module - Render quicktabs.
File
- ./
quicktabs.module, line 629
Code
function _quicktabs_get_active_tab($quicktabs) {
$active_tab = isset($quicktabs['default_tab']) && $quicktabs['default_tab'] !== false ? $quicktabs['default_tab'] : key($quicktabs['tabs']);
$active_tab = isset($_GET['quicktabs_' . $quicktabs['qtid']]) ? $_GET['quicktabs_' . $quicktabs['qtid']] : $active_tab;
if (isset($active_tab) && isset($quicktabs['tabs'][$active_tab])) {
return $active_tab;
}
return NULL;
}