system_theme_data
- Versions
- 4.6 – 6
system_theme_data()
Collect data about all currently available themes.
Return value
Array of all available themes and their data.
Code
modules/system/system.module, line 807
<?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;
}
?>Login or register to post comments 