function at_get_setting

cis7 at_get_setting($setting_name, $theme = NULL)
cle7 at_get_setting($setting_name, $theme = NULL)
elmsmedia7 at_get_setting($setting_name, $theme = NULL)
icor7 at_get_setting($setting_name, $theme = NULL)
meedjum_blog7 at_get_setting($setting_name, $theme = NULL)
mooc7 at_get_setting($setting_name, $theme = NULL)

Retrieve a setting for the current theme or for a given theme.

AT's stripped down optimized version of theme_get_setting(). Why? Because it wayfasterbetter, emphasis on the faster which is really the only valid reason to do something as stupid as this, and it is faster, considerably faster. Doing this wiped 100ms off page generation time.



null $theme:

See also!

55 calls to at_get_setting()
adaptivetheme_breadcrumb in sites/all/themes/ulmus/adaptivetheme/at_core/inc/
Returns HTML for a breadcrumb trail.
adaptivetheme_css_alter in sites/all/themes/ulmus/adaptivetheme/at_core/inc/
adaptivetheme_field__image in sites/all/themes/ulmus/adaptivetheme/at_core/inc/
Returns HTML for an image field.
adaptivetheme_form_search_form_alter in sites/all/themes/ulmus/adaptivetheme/at_core/inc/
hook_form_FORM_ID_alter() Modify the Advanced Search Form
adaptivetheme_form_system_theme_settings_alter in sites/all/themes/ulmus/adaptivetheme/at_core/theme-settings.php
@file Implimentation of hook_form_system_theme_settings_alter()

... See full list


sites/all/themes/ulmus/adaptivetheme/at_core/inc/, line 21
Provides frequently used functions that get theme info, settings and other data.


function at_get_setting($setting_name, $theme = NULL) {
  $cache = &drupal_static(__FUNCTION__, array());

  // If no key is given, use the current theme if we can determine it.
  if (!isset($theme)) {
    $theme = !empty($GLOBALS['theme_key']) ? $GLOBALS['theme_key'] : '';

  if (empty($cache[$theme])) {

    // Get the values for the theme-specific settings from the .info files
    if ($theme) {
      $themes = list_themes();
      $theme_object = $themes[$theme];

      // Create a list which includes the current theme and all its base themes.
      if (isset($theme_object->base_themes)) {
        $theme_keys = array_keys($theme_object->base_themes);
        $theme_keys[] = $theme;
      else {
        $theme_keys = array($theme);

      foreach ($theme_keys as $theme_key) {
        if (!empty($themes[$theme_key]->info['settings'])) {
          $cache[$theme] = $themes[$theme_key]->info['settings'];

      // Get the saved theme-specific settings from the database.
      $cache[$theme] = array_merge($cache[$theme], variable_get('theme_' . $theme . '_settings', array()));

  return isset($cache[$theme][$setting_name]) ? $cache[$theme][$setting_name] : NULL;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.