← All changes
|
Libs/adminify-framework/fields/switcher/switcher.php
+4
-4
4.2.18
→
4.0.5.4
View file →
| @@ -20,20 +20,20 @@ | ||
| 20 | 20 | $text_on = ( ! empty( $this->field['text_on'] ) ) ? $this->field['text_on'] : esc_html__( 'On', 'adminify' ); |
| 21 | 21 | $text_off = ( ! empty( $this->field['text_off'] ) ) ? $this->field['text_off'] : esc_html__( 'Off', 'adminify' ); |
| 22 | 22 | $text_width = ( ! empty( $this->field['text_width'] ) ) ? ' style="width: '. esc_attr( $this->field['text_width'] ) .'px;"': ''; |
| 23 | 23 | |
| 24 | - echo wp_kses_post( $this->field_before() ); | |
| 24 | + echo $this->field_before(); | |
| 25 | 25 | |
| 26 | - echo '<div class="adminify--switcher'. esc_attr( $active ) .'"'. $text_width .'>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- attribute value pre-escaped with esc_attr() where built. | |
| 26 | + echo '<div class="adminify--switcher'. esc_attr( $active ) .'"'. $text_width .'>'; | |
| 27 | 27 | echo '<span class="adminify--on">'. esc_attr( $text_on ) .'</span>'; |
| 28 | 28 | echo '<span class="adminify--off">'. esc_attr( $text_off ) .'</span>'; |
| 29 | 29 | echo '<span class="adminify--ball"></span>'; |
| 30 | - echo '<input type="hidden" name="'. esc_attr( $this->field_name() ) .'" value="'. esc_attr( $this->value ) .'"'. $this->field_attributes() .' />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- field_attributes() escapes each attribute via esc_attr() | |
| 30 | + echo '<input type="hidden" name="'. esc_attr( $this->field_name() ) .'" value="'. esc_attr( $this->value ) .'"'. $this->field_attributes() .' />'; | |
| 31 | 31 | echo '</div>'; |
| 32 | 32 | |
| 33 | 33 | echo ( ! empty( $this->field['label'] ) ) ? '<span class="adminify--label">'. wp_kses_post( $this->field['label'] ) . '</span>' : ''; |
| 34 | 34 | |
| 35 | - echo wp_kses_post( $this->field_after() ); | |
| 35 | + echo $this->field_after(); | |
| 36 | 36 | |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | } |