We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent edb9ae0 commit 19a9c36Copy full SHA for 19a9c36
src/Definition/PatternDefinition.php
@@ -65,7 +65,10 @@ public function __construct(array $definition = []) {
65
$this->id = $this->definition['id'];
66
$this->setFields($this->definition['fields']);
67
$this->setVariants($this->definition['variants']);
68
- $this->setThemeHook(self::PATTERN_PREFIX . $this->id());
+ // As we know allow hyphens the pattern ID, we need to sanitise it when
69
+ // setting pattern theme hook.
70
+ $hookFriendlyId = str_replace('-', '_', $this->id());
71
+ $this->setThemeHook(self::PATTERN_PREFIX . $hookFriendlyId);
72
73
if (!empty($definition['theme hook'])) {
74
$this->setThemeHook($definition['theme hook']);
0 commit comments