diff --git a/src/TwigExtension/ExtensionLoader.php b/src/TwigExtension/ExtensionLoader.php index dfc3ef3..88aadd8 100644 --- a/src/TwigExtension/ExtensionLoader.php +++ b/src/TwigExtension/ExtensionLoader.php @@ -44,8 +44,7 @@ static public function get($type) { * The type to load all plugins for. */ static protected function loadAll($type) { - $theme = \Drupal::config('system.theme')->get('default'); - $themeLocation = drupal_get_path('theme', $theme); + $themeLocation = \Drupal::service('theme.manager')->getActiveTheme()->getPath(); $themePath = DRUPAL_ROOT . '/' . $themeLocation . '/'; $extensionPaths = glob($themePath . '*/_twig-components/');