| @@ -24,9 +24,9 @@ | ||
| 24 | 24 | 'button_title' => esc_html__( 'Upload', 'adminify' ), |
| 25 | 25 | 'remove_title' => esc_html__( 'Remove', 'adminify' ), |
| 26 | 26 | ) ); |
| 27 | 27 | |
| 28 | - echo wp_kses_post( $this->field_before() ); | |
| 28 | + echo $this->field_before(); | |
| 29 | 29 | |
| 30 | 30 | $library = ( is_array( $args['library'] ) ) ? $args['library'] : array_filter( (array) $args['library'] ); |
| 31 | 31 | $library = ( ! empty( $library ) ) ? implode(',', $library ) : ''; |
| 32 | 32 | $hidden = ( empty( $this->value ) ) ? ' hidden' : ''; |
| @@ -40,9 +40,9 @@ | ||
| 40 | 40 | $preview_style = ( ! empty( $preview_width ) || ! empty( $preview_height ) ) ? ' style="'. esc_attr( $preview_width . $preview_height ) .'"': ''; |
| 41 | 41 | $preview_hidden = ( empty( $preview_src ) ) ? ' hidden' : ''; |
| 42 | 42 | |
| 43 | 43 | echo '<div class="adminify--preview'. esc_attr( $preview_hidden ) .'">'; |
| 44 | - echo '<div class="adminify-image-preview"'. $preview_style .'>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- attribute value pre-escaped with esc_attr() where built. | |
| 44 | + echo '<div class="adminify-image-preview"'. $preview_style .'>'; | |
| 45 | 45 | echo '<i class="adminify--remove fas fa-times"></i><span><img src="'. esc_url( $preview_src ) .'" class="adminify--src" /></span>'; |
| 46 | 46 | echo '</div>'; |
| 47 | 47 | echo '</div>'; |
| 48 | 48 | |
| @@ -48,14 +48,14 @@ | ||
| 48 | 48 | |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | echo '<div class="adminify--wrap">'; |
| 52 | - echo '<input type="text" 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() | |
| 53 | - echo '<a href="#" class="button button-primary adminify--button" data-library="'. esc_attr( $library ) .'">'. esc_html( $args['button_title'] ) .'</a>'; | |
| 54 | - echo '<a href="#" class="button button-secondary adminify-warning-primary adminify--remove'. esc_attr( $hidden ) .'">'. esc_html( $args['remove_title'] ) .'</a>'; | |
| 52 | + echo '<input type="text" name="'. esc_attr( $this->field_name() ) .'" value="'. esc_attr( $this->value ) .'"'. $this->field_attributes() .'/>'; | |
| 53 | + echo '<a href="#" class="button button-primary adminify--button" data-library="'. esc_attr( $library ) .'">'. $args['button_title'] .'</a>'; | |
| 54 | + echo '<a href="#" class="button button-secondary adminify-warning-primary adminify--remove'. esc_attr( $hidden ) .'">'. $args['remove_title'] .'</a>'; | |
| 55 | 55 | echo '</div>'; |
| 56 | 56 | |
| 57 | - echo wp_kses_post( $this->field_after() ); | |
| 57 | + echo $this->field_after(); | |
| 58 | 58 | |
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | } |