_theme_load_registry
includes/theme.inc, строка 216
- Версии
- 6
_theme_load_registry($theme, $base_theme = NULL, $theme_engine = NULL)
Загружает регистр темизации из кеша; если кеш не установлен, перестраивает регистр заново.
Параметры
$theme
Загруженный объект темы.
$base_theme
Загуреженные объекты родительских тем в порядке "старший-первый".
$theme_engine
Название движка темизации.
Код
<?php
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);
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии