function _quicktabs_prepare_views_args in Quick Tabs 6.3
Same name and namespace in other branches
- 6.2 quicktabs.module \_quicktabs_prepare_views_args()
- 7.2 quicktabs.module \_quicktabs_prepare_views_args()
Helper function to use view arguments from the URL.
1 call to _quicktabs_prepare_views_args()
- quicktabs_render in ./
quicktabs.module - Render quicktabs.
File
- ./
quicktabs.module, line 755
Code
function _quicktabs_prepare_views_args($tabs) {
foreach ($tabs as $key => $tab) {
if ($tab['type'] == 'view') {
$url_args = arg();
$args = $tab['args'];
foreach ($url_args as $id => $arg) {
$args = str_replace("%{$id}", $arg, $args);
}
$args = preg_replace(',/?(%\\d),', '', $args);
$args = $args ? explode('/', $args) : array();
$tab['args'] = $args;
$tabs[$key] = $tab;
}
}
return $tabs;
}