summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Carver2018-03-11 18:10:46 (GMT)
committerMark Carver2018-03-11 18:10:46 (GMT)
commitbe175e66d0f985758d6823125bf54019314e70b7 (patch)
tree128eb6ceb3d4b678a516b4c57a627836dd97c162
parent916b2b2a1934720374983cc835899d1d7ed288c5 (diff)
Issue #2951575 by markcarver, eelkeblok: Templates limited to "templates" directory of sub-theme
Signed-off-by: Mark Carver <mark.carver@me.com>
-rw-r--r--src/Plugin/Alter/ThemeRegistry.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Plugin/Alter/ThemeRegistry.php b/src/Plugin/Alter/ThemeRegistry.php
index 283cfd2..36f64b5 100644
--- a/src/Plugin/Alter/ThemeRegistry.php
+++ b/src/Plugin/Alter/ThemeRegistry.php
@@ -77,7 +77,9 @@ class ThemeRegistry extends Registry implements AlterInterface {
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, '__');