Skip to content

Commit

Permalink
Change KalathemeGetter to check for base theme first
Browse files Browse the repository at this point in the history
  • Loading branch information
John Ouellet committed Jun 10, 2016
1 parent 1379a07 commit 33f53c1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Utility/KalathemeFrameworkGetter.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,15 @@ final public static function initialize() {
// If not statitically set, then grab the active theme.
if (!isset(static::$active_theme)) {
// Initialize the active theme.
static::$active_theme = \Drupal::theme()->getActiveTheme()->getName();
// Make sure we are getting the base theme.
$base = \Drupal::theme()->getActiveTheme()->getBaseThemes();
if (count($base) > 0) {
static::$active_theme = reset($base);
}
// If for some reason we are on the base theme, grab it.
else {
static::$active_theme = \Drupal::theme()->getActiveTheme()->getName();
}
}

// If not statitically set, then grab the current framework.
Expand Down

0 comments on commit 33f53c1

Please sign in to comment.