function _theme_load_registry

Same name and namespace in other branches
  1. 7.x drupal-7.x/includes/theme.inc \_theme_load_registry()

Get the theme_registry cache from the database; if it doesn't exist, build it.

Parameters

$theme: The loaded $theme object.

$base_theme: An array of loaded $theme objects representing the ancestor themes in oldest first order.

theme_engine: The name of the theme engine.

1 string reference to '_theme_load_registry'
_init_theme in drupal-6.x/includes/theme.inc
Initialize the theme system given already loaded information. This function is useful to initialize a theme when no database is present.

Archivo

drupal-6.x/includes/theme.inc, line 229
The theme system, which controls the output of Drupal.

Código

function _theme_load_registry($theme, $base_theme = NULL, $theme_engine = NULL) {
  // Check the theme registry cache; if it exists, use it.
  $cache = cache_get("theme_registry:$theme->name", 'cache');
  if (isset($cache->data)) {
    $registry = $cache->data;
  }
  else {
    // If not, build one and cache it.
    $registry = _theme_build_registry($theme, $base_theme, $theme_engine);
    _theme_save_registry($theme, $registry);
  }
  _theme_set_registry($registry);
}