Load all from defaults and database quicktabs.

2 calls to quicktabs_get_all_quicktabs()
quicktabs_block_info in ./quicktabs.module
Implements hook_block_info().
quicktabs_list in includes/admin.inc
Page callback to list quicktabs in the system.

File

./quicktabs.module, line 163

Code

function quicktabs_get_all_quicktabs() {
    $quicktabs = array();
    // Load quicktabs via ctools if present.
    if (module_exists('ctools')) {
        ctools_include('export');
        $loaded = ctools_export_load_object('quicktabs', 'all');
        foreach ($loaded as $qt_name => $quicktab) {
            $quicktabs[$qt_name] = $quicktab;
        }
        return $quicktabs;
    }
    // Otherwise, load from DB
    $result = db_query('SELECT machine_name, title, tabs, ajax, hide_empty_tabs, default_tab, style FROM {quicktabs} ORDER BY title');
    foreach ($result as $quicktab) {
        $quicktabs[$quicktab->machine_name] = _quicktabs_unpack($quicktab);
    }
    return $quicktabs;
}