You are here

function spartan_system_themes_page_alter in OpenPublic 7

Implements hook_system_themes_page_alter().

Unset the Alpha/Omega themes from the appearance page We don't want anyone enabling them directly

Needs moved to module since theme isn't used for admin, but keeping here for reference

File

themes/spartan/template.php, line 15
Code for the spartan theme.

Code

function spartan_system_themes_page_alter(&$theme_groups) {
  $hidden = array(
    'alpha',
    'omega',
  );
  foreach ($theme_groups as $state => &$group) {
    if ($state == 'disabled') {
      foreach ($theme_groups[$state] as $id => &$theme) {
        if (in_array($theme, $hidden)) {
          unset($theme_groups[$state][$id]);
        }
      }
    }
  }
}