| @@ -62,9 +62,9 @@ | ||
| 62 | 62 | $default_value = ( ! empty( $this->field['default'] ) ) ? wp_parse_args( $this->field['default'], $default_value ) : $default_value; |
| 63 | 63 | |
| 64 | 64 | $value = wp_parse_args( $this->value, $default_value ); |
| 65 | 65 | |
| 66 | - echo wp_kses_post( $this->field_before() ); | |
| 66 | + echo $this->field_before(); | |
| 67 | 67 | |
| 68 | 68 | echo '<div class="adminify--inputs" data-depend-id="'. esc_attr( $this->field['id'] ) .'">'; |
| 69 | 69 | |
| 70 | 70 | if ( ! empty( $args['all'] ) ) { |
| @@ -71,10 +71,10 @@ | ||
| 71 | 71 | |
| 72 | 72 | $placeholder = ( ! empty( $args['all_placeholder'] ) ) ? ' placeholder="'. esc_attr( $args['all_placeholder'] ) .'"' : ''; |
| 73 | 73 | |
| 74 | 74 | echo '<div class="adminify--input">'; |
| 75 | - echo ( ! empty( $args['all_icon'] ) ) ? '<span class="adminify--label adminify--icon">'. wp_kses_post( $args['all_icon'] ) .'</span>' : ''; | |
| 76 | - echo '<input type="number" name="'. esc_attr( $this->field_name( '[all]' ) ) .'" value="'. esc_attr( $value['all'] ) .'"'. $placeholder .' class="adminify-input-number adminify--is-unit" step="any" />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- attribute value pre-escaped with esc_attr() where built. | |
| 75 | + echo ( ! empty( $args['all_icon'] ) ) ? '<span class="adminify--label adminify--icon">'. $args['all_icon'] .'</span>' : ''; | |
| 76 | + echo '<input type="number" name="'. esc_attr( $this->field_name( '[all]' ) ) .'" value="'. esc_attr( $value['all'] ) .'"'. $placeholder .' class="adminify-input-number adminify--is-unit" step="any" />'; | |
| 77 | 77 | echo ( ! empty( $args['unit'] ) ) ? '<span class="adminify--label adminify--unit">'. esc_attr( $args['unit'] ) .'</span>' : ''; |
| 78 | 78 | echo '</div>'; |
| 79 | 79 | |
| 80 | 80 | } else { |
| @@ -93,10 +93,10 @@ | ||
| 93 | 93 | |
| 94 | 94 | $placeholder = ( ! empty( $args[$property.'_placeholder'] ) ) ? ' placeholder="'. esc_attr( $args[$property.'_placeholder'] ) .'"' : ''; |
| 95 | 95 | |
| 96 | 96 | echo '<div class="adminify--input">'; |
| 97 | - echo ( ! empty( $args[$property.'_icon'] ) ) ? '<span class="adminify--label adminify--icon">'. wp_kses_post( $args[$property.'_icon'] ) .'</span>' : ''; | |
| 98 | - echo '<input type="number" name="'. esc_attr( $this->field_name( '['. $property .']' ) ) .'" value="'. esc_attr( $value[$property] ) .'"'. $placeholder .' class="adminify-input-number adminify--is-unit" step="any" />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- attribute value pre-escaped with esc_attr() where built. | |
| 97 | + echo ( ! empty( $args[$property.'_icon'] ) ) ? '<span class="adminify--label adminify--icon">'. $args[$property.'_icon'] .'</span>' : ''; | |
| 98 | + echo '<input type="number" name="'. esc_attr( $this->field_name( '['. $property .']' ) ) .'" value="'. esc_attr( $value[$property] ) .'"'. $placeholder .' class="adminify-input-number adminify--is-unit" step="any" />'; | |
| 99 | 99 | echo ( ! empty( $args['unit'] ) ) ? '<span class="adminify--label adminify--unit">'. esc_attr( $args['unit'] ) .'</span>' : ''; |
| 100 | 100 | echo '</div>'; |
| 101 | 101 | |
| 102 | 102 | } |
| @@ -119,14 +119,14 @@ | ||
| 119 | 119 | if ( ! empty( $args['color'] ) ) { |
| 120 | 120 | $default_color_attr = ( ! empty( $default_value['color'] ) ) ? ' data-default-color="'. esc_attr( $default_value['color'] ) .'"' : ''; |
| 121 | 121 | echo '<div class="adminify--color">'; |
| 122 | 122 | echo '<div class="adminify-field-color">'; |
| 123 | - echo '<input type="text" name="'. esc_attr( $this->field_name( '[color]' ) ) .'" value="'. esc_attr( $value['color'] ) .'" class="adminify-color"'. $default_color_attr .' />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- attribute value pre-escaped with esc_attr() where built. | |
| 123 | + echo '<input type="text" name="'. esc_attr( $this->field_name( '[color]' ) ) .'" value="'. esc_attr( $value['color'] ) .'" class="adminify-color"'. $default_color_attr .' />'; | |
| 124 | 124 | echo '</div>'; |
| 125 | 125 | echo '</div>'; |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - echo wp_kses_post( $this->field_after() ); | |
| 128 | + echo $this->field_after(); | |
| 129 | 129 | |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | public function output() { |