<?php
-/**
- * @file
- * Contains \Drupal\bootstrap\Plugin\Alter\ThemeRegistry.
- */
-// Name of the base theme must be lowercase for it to be autoload discoverable.
namespace Drupal\bootstrap\Plugin\Alter;
-use Drupal\bootstrap\Annotation\BootstrapAlter;
use Drupal\bootstrap\Bootstrap;
use Drupal\bootstrap\Plugin\PreprocessManager;
use Drupal\Core\Theme\Registry;
foreach ($this->currentTheme->getAncestry() as $ancestor) {
$current_theme = $ancestor->getName() === $this->currentTheme->getName();
$theme_path = $ancestor->getPath();
- foreach ($ancestor->fileScan('/\.html\.twig$/', 'templates') as $file) {
+ // Scan entire theme root path.
+ // @see https://www.drupal.org/project/bootstrap/issues/2951575
+ foreach ($ancestor->fileScan('/\.html\.twig$/') as $file) {
$hook = str_replace('-', '_', str_replace('.html.twig', '', $file->filename));
$path = dirname($file->uri);
$incomplete = !isset($cache[$hook]) || strrpos($hook, '__');