|
14 | 14 | attribute-code="<?= $block->escapeHtmlAttr($swatchData['attribute_code']) ?>"
|
15 | 15 | attribute-id="<?= $block->escapeHtmlAttr($swatchData['attribute_id']) ?>">
|
16 | 16 | <div class="swatch-attribute-options clearfix">
|
17 |
| - <?php foreach ($swatchData['options'] as $option => $label) :?> |
| 17 | + <?php foreach ($swatchData['options'] as $option => $label): ?> |
18 | 18 | <a href="<?= $block->escapeUrl($label['link']) ?>" rel="nofollow"
|
19 | 19 | aria-label="<?= $block->escapeHtmlAttr($label['label']) ?>"
|
20 | 20 | class="swatch-option-link-layered">
|
21 |
| - <?php if (isset($swatchData['swatches'][$option]['type'])) :?> |
| 21 | + <?php if (isset($swatchData['swatches'][$option]['type'])): ?> |
22 | 22 | <?php switch ($swatchData['swatches'][$option]['type']) {
|
23 | 23 | case '3':
|
24 | 24 | ?>
|
|
34 | 34 | case '2':
|
35 | 35 | ?>
|
36 | 36 | <?php $swatchThumbPath = $block->getSwatchPath(
|
37 |
| - 'swatch_thumb', |
38 |
| - $swatchData['swatches'][$option]['value'] |
39 |
| - ); ?> |
| 37 | + 'swatch_thumb', |
| 38 | + $swatchData['swatches'][$option]['value'] |
| 39 | + ); ?> |
40 | 40 | <?php $swatchImagePath = $block->getSwatchPath(
|
41 |
| - 'swatch_image', |
42 |
| - $swatchData['swatches'][$option]['value'] |
| 41 | + 'swatch_image', |
| 42 | + $swatchData['swatches'][$option]['value'] |
43 | 43 | );
|
44 |
| - $escapedUrl = $block->escapeUrl($swatchImagePath); |
| 44 | + $escapedUrl = $block->escapeUrl($swatchImagePath); |
45 | 45 | ?>
|
46 | 46 | <div class="swatch-option image <?= $block->escapeHtmlAttr($label['custom_style']) ?>"
|
47 | 47 | tabindex="-1"
|
|
50 | 50 | option-label="<?= $block->escapeHtmlAttr($label['label']) ?>"
|
51 | 51 | option-tooltip-thumb="<?= $block->escapeUrl($swatchThumbPath) ?>"
|
52 | 52 | option-tooltip-value=""
|
53 |
| - style="background: url(<?= |
54 |
| - $escapedUrl |
| 53 | + style="background: url(<?= |
| 54 | + /* @noEscape */ $escapedUrl |
55 | 55 | ?>) no-repeat center; background-size: initial;">
|
56 | 56 | </div>
|
57 | 57 | <?php break;
|
|
64 | 64 | option-label="<?= $block->escapeHtmlAttr($label['label']) ?>"
|
65 | 65 | option-tooltip-thumb=""
|
66 | 66 | option-tooltip-value="<?= $block->escapeHtmlAttr(
|
67 |
| - $swatchData['swatches'][$option]['value'] |
68 |
| - ) ?>" |
| 67 | + $swatchData['swatches'][$option]['value'] |
| 68 | + ) ?>" |
69 | 69 | style="background: <?= $block->escapeHtmlAttr(
|
70 |
| - $swatchData['swatches'][$option]['value'] |
71 |
| - ) ?> no-repeat center; background-size: initial;"></div> |
| 70 | + $swatchData['swatches'][$option]['value'] |
| 71 | + ) ?> no-repeat center; background-size: initial;"></div> |
72 | 72 | <?php break;
|
73 | 73 | case '0':
|
74 | 74 | default:
|
|
0 commit comments