| @@ -39,14 +39,15 @@ | ||
| 39 | 39 | * @since 1.0.0 |
| 40 | 40 | * @access public |
| 41 | 41 | */ |
| 42 | 42 | public function content_template() { |
| 43 | + $control_uid = $this->get_control_uid(); | |
| 43 | 44 | ?> |
| 44 | 45 | <div class="elementor-control-field"> |
| 45 | - <label for="<?php $this->print_control_uid(); ?>" class="elementor-control-title">{{{ data.label }}}</label> | |
| 46 | + <label for="<?php echo $control_uid; ?>" class="elementor-control-title">{{{ data.label }}}</label> | |
| 46 | 47 | <div class="elementor-control-input-wrapper"> |
| 47 | 48 | <label class="elementor-switch elementor-control-unit-2"> |
| 48 | - <input id="<?php $this->print_control_uid(); ?>" type="checkbox" data-setting="{{ data.name }}" class="elementor-switch-input" value="{{ data.return_value }}"> | |
| 49 | + <input id="<?php echo $control_uid; ?>" type="checkbox" data-setting="{{ data.name }}" class="elementor-switch-input" value="{{ data.return_value }}"> | |
| 49 | 50 | <span class="elementor-switch-label" data-on="{{ data.label_on }}" data-off="{{ data.label_off }}"></span> |
| 50 | 51 | <span class="elementor-switch-handle"></span> |
| 51 | 52 | </label> |
| 52 | 53 | </div> |
| @@ -69,10 +70,10 @@ | ||
| 69 | 70 | * @return array Control default settings. |
| 70 | 71 | */ |
| 71 | 72 | protected function get_default_settings() { |
| 72 | 73 | return [ |
| 73 | - 'label_off' => esc_html__( 'No', 'elementor' ), | |
| 74 | - 'label_on' => esc_html__( 'Yes', 'elementor' ), | |
| 74 | + 'label_off' => __( 'No', 'elementor' ), | |
| 75 | + 'label_on' => __( 'Yes', 'elementor' ), | |
| 75 | 76 | 'return_value' => 'yes', |
| 76 | 77 | ]; |
| 77 | 78 | } |
| 78 | 79 | } |