| @@ -16,13 +16,13 @@ | ||
| 16 | 16 | |
| 17 | 17 | public function render() { |
| 18 | 18 | |
| 19 | 19 | $args = wp_parse_args( $this->field, array( |
| 20 | - 'button_title' => esc_html__( 'Add', 'adminify' ), | |
| 21 | - 'remove_title' => esc_html__( 'Remove', 'adminify' ), | |
| 20 | + 'button_title' => esc_html__( 'Add Icon', 'adminify' ), | |
| 21 | + 'remove_title' => esc_html__( 'Remove Icon', 'adminify' ), | |
| 22 | 22 | ) ); |
| 23 | 23 | |
| 24 | - echo wp_kses_post( $this->field_before() ); | |
| 24 | + echo $this->field_before(); | |
| 25 | 25 | |
| 26 | 26 | $nonce = wp_create_nonce( 'adminify_icon_nonce' ); |
| 27 | 27 | $hidden = ( empty( $this->value ) ) ? ' hidden' : ''; |
| 28 | 28 | |
| @@ -27,14 +27,14 @@ | ||
| 27 | 27 | $hidden = ( empty( $this->value ) ) ? ' hidden' : ''; |
| 28 | 28 | |
| 29 | 29 | echo '<div class="adminify-icon-select">'; |
| 30 | 30 | echo '<span class="adminify-icon-preview'. esc_attr( $hidden ) .'"><i class="'. esc_attr( $this->value ) .'"></i></span>'; |
| 31 | - echo '<a href="#" class="button button-primary adminify-icon-add" data-nonce="'. esc_attr( $nonce ) .'">'. esc_html( $args['button_title'] ) .'</a>'; | |
| 32 | - echo '<a href="#" class="button adminify-warning-primary adminify-icon-remove'. esc_attr( $hidden ) .'">'. esc_html( $args['remove_title'] ) .'</a>'; | |
| 33 | - echo '<input type="hidden" name="'. esc_attr( $this->field_name() ) .'" value="'. esc_attr( $this->value ) .'" class="adminify-icon-value"'. $this->field_attributes() .' />'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- field_attributes() escapes each attribute via esc_attr() | |
| 31 | + echo '<a href="#" class="button button-primary adminify-icon-add" data-nonce="'. esc_attr( $nonce ) .'">'. $args['button_title'] .'</a>'; | |
| 32 | + echo '<a href="#" class="button adminify-warning-primary adminify-icon-remove'. esc_attr( $hidden ) .'">'. $args['remove_title'] .'</a>'; | |
| 33 | + echo '<input type="hidden" name="'. esc_attr( $this->field_name() ) .'" value="'. esc_attr( $this->value ) .'" class="adminify-icon-value"'. $this->field_attributes() .' />'; | |
| 34 | 34 | echo '</div>'; |
| 35 | 35 | |
| 36 | - echo wp_kses_post( $this->field_after() ); | |
| 36 | + echo $this->field_after(); | |
| 37 | 37 | |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | public function enqueue() { |