You are here

function quicktabs_get_all_quicktabs in Quick Tabs 6.3

Same name and namespace in other branches
  1. 7.2 quicktabs.module \quicktabs_get_all_quicktabs()

Load all from defaults and database quicktabs.

4 calls to quicktabs_get_all_quicktabs()
quicktabs_block in ./quicktabs.module
Implementation of hook_block().
quicktabs_list in includes/admin.inc
Page callback for quicktabs admin landing page.
quicktabs_locale_refresh in ./quicktabs.module
Refresh locale strings.
_quicktabs_form in includes/admin.inc

File

./quicktabs.module, line 511

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] = (array) $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');
  while ($quicktab = db_fetch_array($result)) {
    $quicktabs[$quicktab['machine_name']] = _quicktabs_unpack($quicktab);
  }
  return $quicktabs;
}