| @@ -10,17 +10,17 @@ | ||
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * Template variables: |
| 13 | 13 | * |
| 14 | - * @var $exists bool Whether current product is already in Compare list | |
| 15 | - * @var $product_id int Current product id | |
| 16 | - * @var $parent_product_id int Parent product id | |
| 17 | - * @var $button_text string Button text | |
| 18 | - * @var $show_button_text string Button text | |
| 19 | - * @var $icon_html string Icon for Add to Compare button | |
| 20 | - * @var $classes array Classed for Add to Compare button | |
| 21 | - * @var $left_text string Html allowed | |
| 22 | - * @var $right_text string Html allowed | |
| 14 | + * @var $exists bool | |
| 15 | + * @var $product_id int | |
| 16 | + * @var $parent_product_id int | |
| 17 | + * @var $button_text string | |
| 18 | + * @var $show_button_text string | |
| 19 | + * @var $icon_html string | |
| 20 | + * @var $classes array | |
| 21 | + * @var $left_text string | |
| 22 | + * @var $right_text string | |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | 25 | defined( 'ABSPATH' ) || die( 'Keep Silent' ); |
| 26 | 26 | |
| @@ -27,20 +27,24 @@ | ||
| 27 | 27 | use RadiusTheme\SB\Helpers\Fns; |
| 28 | 28 | |
| 29 | 29 | ?> |
| 30 | 30 | |
| 31 | -<a class="rtsb-compare-btn tipsy <?php echo esc_attr( implode( ' ', $classes ) ) ?>" rel="nofollow" | |
| 31 | +<a class="rtsb-compare-btn tipsy <?php echo esc_attr( implode( ' ', $classes ) ); ?>" rel="nofollow" | |
| 32 | 32 | data-product_id="<?php echo esc_attr( $product_id ); ?>" |
| 33 | 33 | title="<?php echo esc_attr( $button_text ); ?>" |
| 34 | 34 | data-title="<?php echo esc_attr( $button_text ); ?>" |
| 35 | - data-original-product_id="<?php echo esc_attr( $parent_product_id ); ?>" href="#" aria-label="<?php echo esc_attr__('Compare', 'shopbuilder');?>"> | |
| 35 | + data-original-product_id="<?php echo esc_attr( $parent_product_id ); ?>" href="#" aria-label="<?php echo esc_attr__( 'Compare', 'shopbuilder' ); ?>"> | |
| 36 | 36 | <span class="icon"> |
| 37 | 37 | <?php echo wp_kses( $left_text, Fns::get_kses_array() ); ?> |
| 38 | 38 | <?php Fns::print_html( $icon_html ); ?> |
| 39 | 39 | <?php echo wp_kses( $right_text, Fns::get_kses_array() ); ?> |
| 40 | 40 | </span> |
| 41 | - <?php if ( $show_button_text ) { ?> | |
| 42 | - <span class="icon-with-text button-text"> | |
| 43 | - <?php Fns::print_html( $button_text, true ); ?> | |
| 44 | - </span> | |
| 45 | - <?php } ?> | |
| 41 | + <?php | |
| 42 | + if ( $show_button_text ) { | |
| 43 | + ?> | |
| 44 | + <span class="icon-with-text button-text"> | |
| 45 | + <?php Fns::print_html( $button_text, true ); ?> | |
| 46 | + </span> | |
| 47 | + <?php | |
| 48 | + } | |
| 49 | + ?> | |
| 46 | 50 | </a> |