| @@ -1,17 +1,27 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if ( ! defined('WPINC') ) { | |
| 4 | - wp_die(); | |
| 3 | +if ( ! defined('ABSPATH') ) { | |
| 4 | + exit; | |
| 5 | 5 | } |
| 6 | - | |
| 7 | -?><td class="wpc-filter-label-td"><?php | |
| 6 | +$pro_class = ''; | |
| 7 | +if( isset( $attributes['pro_label'] ) && $attributes['pro_label'] ){ | |
| 8 | + $pro_class = ' wpc-pro-badge-text'; | |
| 9 | +} | |
| 10 | +?><td class="wpc-filter-label-td<?php echo $pro_class; ?>"><?php | |
| 8 | 11 | $label = esc_html( $attributes['label'] ); |
| 12 | + $pro_class = ''; | |
| 13 | + if( isset( $attributes['pro_label'] ) && $attributes['pro_label'] ){ | |
| 14 | + $pro_class = ' wpc-filter-label-in-pro'; | |
| 15 | + } | |
| 9 | 16 | if( $label ) : |
| 10 | - ?><label for="<?php echo esc_attr( $attributes['id'] ); ?>" class="wpc-filter-label"><?php | |
| 11 | - echo $label; | |
| 17 | + ?><label <?php if( isset( $attributes['id'] ) && $attributes['type'] !== 'Radio' ){ echo 'for="'. esc_attr( $attributes['id'] ).'"'; } ?> class="wpc-filter-label<?php echo $pro_class; ?>"><?php | |
| 18 | + echo '<span class="wpc-label-text">'.$label.'</span>'; | |
| 12 | 19 | if( isset( $attributes['required'] ) && $attributes['required'] ){ |
| 13 | 20 | echo '<span class="wpc-field-required">*</span>'."\n"; |
| 21 | + } | |
| 22 | + if( isset( $attributes['pro_label'] ) && $attributes['pro_label'] ){ | |
| 23 | + echo '<span>' . $attributes['pro_label'] . '</span>'; | |
| 14 | 24 | } |
| 15 | 25 | ?></label> |
| 16 | 26 | <?php echo flrt_field_instructions($attributes); // Already escaped in function ?> |
| 17 | 27 | <?php echo flrt_tooltip($attributes); ?> |