Skip to content

Commit fc231ec

Browse files
author
Gabriele Maira
committed
Fixing change requests #270
1 parent 19a9c36 commit fc231ec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Definition/PatternDefinition.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ public function __construct(array $definition = []) {
6565
$this->id = $this->definition['id'];
6666
$this->setFields($this->definition['fields']);
6767
$this->setVariants($this->definition['variants']);
68-
// 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);
68+
// As we now allow hyphens in pattern IDs we need to turn them into
69+
// underscores when setting the theme hook.
70+
$hook_friendly_id = str_replace('-', '_', $this->id());
71+
$this->setThemeHook(self::PATTERN_PREFIX . $hook_friendly_id);
7272

7373
if (!empty($definition['theme hook'])) {
7474
$this->setThemeHook($definition['theme hook']);

0 commit comments

Comments
 (0)