| @@ -10,23 +10,22 @@ | ||
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * Template variables: |
| 13 | 13 | * |
| 14 | - * @var $exists bool Whether current product is already in wishlist | |
| 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 Wishlist button | |
| 19 | - * @var $show_button_text string Icon for Add to Wishlist button | |
| 20 | - * @var $classes string Classed for Add to Wishlist 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 $icon_html string | |
| 19 | + * @var $show_button_text bool | |
| 20 | + * @var $classes string | |
| 21 | + * @var $left_text string | |
| 22 | + * @var $right_text string | |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | 25 | use RadiusTheme\SB\Helpers\Fns; |
| 26 | 26 | |
| 27 | 27 | defined( 'ABSPATH' ) || die( 'Keep Silent' ); |
| 28 | - | |
| 29 | 28 | ?> |
| 30 | 29 | |
| 31 | 30 | <a class="rtsb-wishlist-btn tipsy <?php echo esc_attr( implode( ' ', $classes ) ); ?>" rel="nofollow" |
| 32 | 31 | data-product_id="<?php echo esc_attr( $product_id ); ?>" |
| @@ -39,9 +38,14 @@ | ||
| 39 | 38 | <?php echo wp_kses( $left_text, Fns::get_kses_array() ); ?> |
| 40 | 39 | <?php Fns::print_html( $icon_html, true ); ?> |
| 41 | 40 | <?php echo wp_kses( $right_text, Fns::get_kses_array() ); ?> |
| 42 | 41 | </span> |
| 43 | - <span class="button-text"> | |
| 44 | - <?php echo esc_attr( $button_text ); ?> | |
| 45 | - </span> | |
| 46 | - | |
| 42 | + <?php | |
| 43 | + if ( $show_button_text ) { | |
| 44 | + ?> | |
| 45 | + <span class="button-text"> | |
| 46 | + <?php echo esc_attr( $button_text ); ?> | |
| 47 | + </span> | |
| 48 | + <?php | |
| 49 | + } | |
| 50 | + ?> | |
| 47 | 51 | </a> |