|
3 | 3 | * Copyright © Magento, Inc. All rights reserved.
|
4 | 4 | * See COPYING.txt for license details.
|
5 | 5 | */
|
6 |
| - |
7 |
| -// @codingStandardsIgnoreFile |
8 | 6 | ?>
|
9 | 7 | <?php
|
10 | 8 | /**
|
|
14 | 12 | */
|
15 | 13 | ?>
|
16 | 14 |
|
17 |
| -<?php if ($block->canShowBlock()): ?> |
18 |
| - <div class="block filter" id="layered-filter-block" data-mage-init='{"collapsible":{"openedState": "active", "collapsible": true, "active": false, "collateral": { "openedState": "filter-active", "element": "body" } }}'> |
| 15 | +<?php if ($block->canShowBlock()) : ?> |
| 16 | + <div class="block filter" id="layered-filter-block" data-mage-init=' |
| 17 | + { |
| 18 | + "collapsible": |
| 19 | + { |
| 20 | + "openedState": "active", |
| 21 | + "collapsible": true, |
| 22 | + "active": false, |
| 23 | + "collateral": |
| 24 | + { |
| 25 | + "openedState": "filter-active", |
| 26 | + "element": "body" |
| 27 | + } |
| 28 | + } |
| 29 | + }'> |
19 | 30 | <?php $filtered = count($block->getLayer()->getState()->getFilters()) ?>
|
20 |
| - <div class="block-title filter-title" data-count="<?= /* @escapeNotVerified */ $filtered ?>"> |
21 |
| - <strong data-role="title"><?= /* @escapeNotVerified */ __('Shop By') ?></strong> |
| 31 | + <div class="block-title filter-title" data-count="<?= /* @noEscape */ $filtered ?>"> |
| 32 | + <strong data-role="title"><?= $block->escapeHtml(__('Shop By')); ?></strong> |
22 | 33 | </div>
|
23 | 34 | <div class="block-content filter-content">
|
24 | 35 | <?= $block->getChildHtml('state') ?>
|
25 | 36 |
|
26 |
| - <?php if ($block->getLayer()->getState()->getFilters()): ?> |
| 37 | + <?php if ($block->getLayer()->getState()->getFilters()) : ?> |
27 | 38 | <div class="block-actions filter-actions">
|
28 |
| - <a href="<?= /* @escapeNotVerified */ $block->getClearUrl() ?>" class="action clear filter-clear"><span><?= /* @escapeNotVerified */ __('Clear All') ?></span></a> |
| 39 | + <a href="<?= $block->escapeUrl($block->getClearUrl()) ?>" class="action clear filter-clear"> |
| 40 | + <span><?= $block->escapeHtml(__('Clear All')) ?></span> |
| 41 | + </a> |
29 | 42 | </div>
|
30 | 43 | <?php endif; ?>
|
31 | 44 | <?php $wrapOptions = false; ?>
|
32 |
| - <?php foreach ($block->getFilters() as $filter): ?> |
33 |
| - <?php if ($filter->getItemsCount()): ?> |
34 |
| - <?php if (!$wrapOptions): ?> |
35 |
| - <strong role="heading" aria-level="2" class="block-subtitle filter-subtitle"><?= /* @escapeNotVerified */ __('Shopping Options') ?></strong> |
36 |
| - <div class="filter-options" id="narrow-by-list" data-role="content" data-mage-init='{"accordion":{"openedState": "active", "collapsible": true, "active": false, "multipleCollapsible": false}}'> |
37 |
| - <?php $wrapOptions = true; endif; ?> |
| 45 | + <?php foreach ($block->getFilters() as $filter) : ?> |
| 46 | + <?php if ($filter->getItemsCount()) : ?> |
| 47 | + <?php if (!$wrapOptions) : ?> |
| 48 | + <strong role="heading" aria-level="2" class="block-subtitle filter-subtitle"><?= $block->escapeHtml(__('Shopping Options')) ?></strong> |
| 49 | + <div class="filter-options" id="narrow-by-list" data-role="content" data-mage-init=' |
| 50 | + { |
| 51 | + "accordion": |
| 52 | + { |
| 53 | + "openedState": "active", |
| 54 | + "collapsible": true, |
| 55 | + "active": false, |
| 56 | + "multipleCollapsible": false |
| 57 | + } |
| 58 | + }'> |
| 59 | + <?php $wrapOptions = true; |
| 60 | + endif; ?> |
38 | 61 | <div data-role="collapsible" class="filter-options-item">
|
39 |
| - <div data-role="title" class="filter-options-title"><?= /* @escapeNotVerified */ __($filter->getName()) ?></div> |
40 |
| - <div data-role="content" class="filter-options-content"><?= /* @escapeNotVerified */ $block->getChildBlock('renderer')->render($filter) ?></div> |
| 62 | + <div data-role="title" class="filter-options-title"><?= $block->escapeHtml(__($filter->getName())) ?></div> |
| 63 | + <div data-role="content" class="filter-options-content"><?= /* @noEscape */ $block->getChildBlock('renderer')->render($filter) ?></div> |
41 | 64 | </div>
|
42 | 65 | <?php endif; ?>
|
43 | 66 | <?php endforeach; ?>
|
44 |
| - <?php if ($wrapOptions): ?> |
| 67 | + <?php if ($wrapOptions) : ?> |
45 | 68 | </div>
|
46 |
| - <?php else: ?> |
| 69 | + <?php else : ?> |
47 | 70 | <script>
|
48 | 71 | require([
|
49 | 72 | 'jquery'
|
|
0 commit comments