You are here

function designkit_get_info in DesignKit 7

Same name and namespace in other branches
  1. 6 designkit.module \designkit_get_info()

Retrieve raw designkit info for the site's default theme.

4 calls to designkit_get_info()
designkit_get_image_info in ./designkit.module
Retrieve designkit image info for the site's default theme.
designkit_image_default_styles in ./designkit.module
Implements hook_image_default_styles().
_designkit_form_alter in ./designkit.admin.inc
Implementation of hook_form_alter() for spaces_features_form, system_theme_settings.
_designkit_preprocess in ./designkit.module
Helper function to turn design choices into theme variables.

File

./designkit.module, line 136

Code

function designkit_get_info($reset = FALSE) {
  static $info;
  if (!isset($info) || $reset) {
    global $theme_key, $theme_info;
    if (isset($theme_info, $theme_key) && $theme_key == variable_get('theme_default', 'bartik')) {
      $info = $theme_info->info;
    }
    else {
      $default = variable_get('theme_default', 'bartik');
      $info = db_select('system', 's')
        ->fields('s', array(
        'info',
      ))
        ->condition('type', 'theme')
        ->condition('name', $default)
        ->execute()
        ->fetchField();
      $info = unserialize($info);
    }
  }
  return isset($info) ? $info : FALSE;
}