| 1 |
<?php |
| 2 |
/** |
| 3 |
* Add to compare list template |
| 4 |
* |
| 5 |
* @author RadiusTheme |
| 6 |
* @package RTSB_ABSPATH\Templates\Compare\Button |
| 7 |
* @version 1.0.0 |
| 8 |
*/ |
| 9 |
|
| 10 |
|
| 11 |
/** |
| 12 |
* Template variables: |
| 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 $icon_html string Icon for Add to Compare button |
| 19 |
* @var $classes array Classed for Add to Compare button |
| 20 |
* @var $left_text string Html allowed |
| 21 |
* @var $right_text string Html allowed |
| 22 |
*/ |
| 23 |
|
| 24 |
defined( 'ABSPATH' ) || die( 'Keep Silent' ); |
| 25 |
|
| 26 |
use RadiusTheme\SB\Helpers\Fns; |
| 27 |
|
| 28 |
?> |
| 29 |
|
| 30 |
<a class="rtsb-compare-btn tipsy <?php echo esc_attr( implode( ' ', $classes ) ) ?>" rel="nofollow" |
| 31 |
data-product_id="<?php echo esc_attr( $product_id ); ?>" |
| 32 |
title="<?php echo esc_attr( $button_text ); ?>" |
| 33 |
data-title="<?php echo esc_attr( $button_text ); ?>" |
| 34 |
data-original-product_id="<?php echo esc_attr( $parent_product_id ); ?>" href="#"> |
| 35 |
<span class="icon"> |
| 36 |
<?php echo wp_kses( $left_text, Fns::get_kses_array() ); ?> |
| 37 |
<?php Fns::print_html( $icon_html ); ?> |
| 38 |
<?php echo wp_kses( $right_text, Fns::get_kses_array() ); ?> |
| 39 |
</span> |
| 40 |
</a> |
| 41 |
|