block.json
1 year ago
controller.php
1 year ago
index.asset.php
1 year ago
index.js
1 year ago
style-index-rtl.css
1 year ago
style-index.css
1 year ago
view.php
3 weeks ago
view.php
25 lines
| 1 | <div |
| 2 | <?php |
| 3 | echo wp_kses_data( get_block_wrapper_attributes( array( 'class' => 'sc-choice ' ) ) ); |
| 4 | echo wp_kses_data( wp_interactivity_data_wp_context( array( 'price' => \SureCart\Support\PublicCatalogData::price( $price ) ) ) ); |
| 5 | ?> |
| 6 | data-wp-on--click="callbacks.setPrice" |
| 7 | data-wp-class--sc-choice--checked="state.isPriceSelected" |
| 8 | data-wp-bind--aria-checked="state.isPriceSelected" |
| 9 | tabindex="0" |
| 10 | role="radio" |
| 11 | data-wp-on--keydown="callbacks.setPrice" |
| 12 | > |
| 13 | <?php echo $content; // phpcs:ignore WordPress.Security.EscapeOutput ?> |
| 14 | </div> |
| 15 | |
| 16 | <?php |
| 17 | if ( isset( $attributes['highlight_border'] ) && ! empty( $attributes['highlight_border'] ) ) { |
| 18 | printf( |
| 19 | '<style class="price-choice-custom-css">div.sc-choice--checked{border-color:%s!important;box-shadow: 0 0 0 1px %s;}</style>', |
| 20 | esc_attr( $attributes['highlight_border'] ?? '' ), |
| 21 | esc_attr( $attributes['highlight_border'] ?? '' ) |
| 22 | ); |
| 23 | } |
| 24 | ?> |
| 25 |