system_theme_data
modules/system/system.module, строка 806
- Версии
- 5 – 6
system_theme_data()
Собирает данные о всех ныне доступных темах.
Возвращаемое значение
Массив всех доступных тем и их данные.
Код
<?php
function system_theme_data() {
// Scan the installation theme .info files and their engines.
$themes = _system_theme_data();
// Extract current files from database.
system_get_files_database($themes, 'theme');
db_query("DELETE FROM {system} WHERE type = 'theme'");
foreach ($themes as $theme) {
if (!isset($theme->owner)) {
$theme->owner = '';
}
db_query("INSERT INTO {system} (name, owner, info, type, filename, status, throttle, bootstrap) VALUES ('%s', '%s', '%s', '%s', '%s', %d, %d, %d)", $theme->name, $theme->owner, serialize($theme->info), 'theme', $theme->filename, isset($theme->status) ? $theme->status : 0, 0, 0);
}
return $themes;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии