Determines if a theme is available to use.
$theme: Either the name of a theme or a full theme object.
Boolean TRUE if the theme is enabled or is the site administration theme; FALSE otherwise.
function drupal_theme_access($theme) {
if (is_object($theme)) {
return _drupal_theme_access($theme);
}
else {
$themes = list_themes();
return isset($themes[$theme]) && _drupal_theme_access($themes[$theme]);
}
}