block.json
1 year ago
controller.php
1 year ago
index.asset.php
5 months ago
index.js
5 months ago
style-index-rtl.css
1 year ago
style-index.css
1 year ago
view.php
3 months ago
view.php
34 lines
| 1 | <a |
| 2 | data-wp-interactive='{ "namespace": "surecart/checkout" }' |
| 3 | <?php echo wp_kses_data( get_block_wrapper_attributes( [ 'class' => 'menu-link' ] ) ); ?> |
| 4 | <?php |
| 5 | echo wp_kses_data( |
| 6 | wp_interactivity_data_wp_context( |
| 7 | [ |
| 8 | 'formId' => intval( $form->ID ), |
| 9 | 'mode' => esc_attr( $form_mode ), |
| 10 | 'cartMenuAlwaysShown' => ! empty( $attributes['cart_menu_always_shown'] ) ? true : false, |
| 11 | ] |
| 12 | ) |
| 13 | ); |
| 14 | ?> |
| 15 | data-wp-on--click="surecart/cart::actions.toggle" |
| 16 | data-wp-on--keydown="surecart/cart::actions.toggle" |
| 17 | <?php if ( empty( $attributes['cart_menu_always_shown'] ) ) : ?> |
| 18 | data-wp-bind--hidden="!state.showCartMenuIcon" |
| 19 | <?php endif; ?> |
| 20 | tabindex="0" |
| 21 | role="button" |
| 22 | aria-label="<?php esc_attr_e( 'Open cart', 'surecart' ); ?>" |
| 23 | > |
| 24 | <div class="sc-cart-icon"> |
| 25 | <?php echo wp_kses( $icon, sc_allowed_svg_html() ); ?> |
| 26 | <span |
| 27 | class="sc-cart-count" |
| 28 | data-wp-text="state.itemsCount" |
| 29 | data-wp-bind--hidden="!state.hasItems" |
| 30 | data-wp-bind--aria-label="state.itemsCountAriaLabel" |
| 31 | hidden |
| 32 | ></span> |
| 33 | </div> |
| 34 | </a> |