Helper function for determining access to a theme.
drupal_theme_access()
function _drupal_theme_access($theme) { $admin_theme = variable_get('admin_theme'); return !empty($theme->status) || $admin_theme && $theme->name == $admin_theme; }