| @@ -10,14 +10,15 @@ | ||
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * Template variables: |
| 13 | 13 | * |
| 14 | - * @var $product_id int Current product id | |
| 15 | - * @var $button_text string Button text | |
| 16 | - * @var $icon_html string Icon for Add to Wishlist button | |
| 17 | - * @var $classes string Classed for Add to Wishlist button | |
| 18 | - * @var $left_text string Html allowed | |
| 19 | - * @var $right_text string Html allowed | |
| 14 | + * @var $product_id int | |
| 15 | + * @var $button_text string | |
| 16 | + * @var $icon_html string | |
| 17 | + * @var $classes string | |
| 18 | + * @var $left_text string | |
| 19 | + * @var $right_text string | |
| 20 | + * @var $has_button_text bool | |
| 20 | 21 | */ |
| 21 | 22 | |
| 22 | 23 | defined( 'ABSPATH' ) || die( 'Keep Silent' ); |
| 23 | 24 | |
| @@ -32,8 +33,14 @@ | ||
| 32 | 33 | <?php echo wp_kses( $left_text, Fns::get_kses_array() ); ?> |
| 33 | 34 | <?php Fns::print_html( $icon_html ); ?> |
| 34 | 35 | <?php echo wp_kses( $right_text, Fns::get_kses_array() ); ?> |
| 35 | 36 | </span> |
| 36 | - <span class="button-text"> | |
| 37 | - <?php echo esc_attr( $button_text ); ?> | |
| 38 | - </span> | |
| 37 | + <?php | |
| 38 | + if ( $has_button_text ) { | |
| 39 | + ?> | |
| 40 | + <span class="button-text"> | |
| 41 | + <?php echo esc_attr( $button_text ); ?> | |
| 42 | + </span> | |
| 43 | + <?php | |
| 44 | + } | |
| 45 | + ?> | |
| 39 | 46 | </a> |