| @@ -14,11 +14,9 @@ | ||
| 14 | 14 | */ |
| 15 | 15 | protected $holds_email_values = true; |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | - * @param string $type | |
| 19 | - * | |
| 20 | - * @return void | |
| 18 | + * @param $type string | |
| 21 | 19 | */ |
| 22 | 20 | protected function set_type( $type ) { |
| 23 | 21 | if ( empty( $type ) ) { |
| 24 | 22 | $type = 'text'; |
| @@ -25,11 +23,8 @@ | ||
| 25 | 23 | } |
| 26 | 24 | parent::set_type( $type ); |
| 27 | 25 | } |
| 28 | 26 | |
| 29 | - /** | |
| 30 | - * @return void | |
| 31 | - */ | |
| 32 | 27 | public function show_on_form_builder( $name = '' ) { |
| 33 | 28 | $field = FrmFieldsHelper::setup_edit_vars( $this->field ); |
| 34 | 29 | |
| 35 | 30 | ob_start(); |
| @@ -38,18 +33,14 @@ | ||
| 38 | 33 | $input_html = ob_get_contents(); |
| 39 | 34 | ob_end_clean(); |
| 40 | 35 | |
| 41 | 36 | if ( empty( $input_html ) ) { |
| 42 | - echo $this->builder_text_field( $name ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 37 | + echo $this->builder_text_field( $name ); // WPCS: XSS ok. | |
| 43 | 38 | } else { |
| 44 | - echo $input_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 39 | + echo $input_html; // WPCS: XSS ok. | |
| 45 | 40 | } |
| 46 | 41 | } |
| 47 | 42 | |
| 48 | - /** | |
| 49 | - * @param array $args | |
| 50 | - * @return string | |
| 51 | - */ | |
| 52 | 43 | public function front_field_input( $args, $shortcode_atts ) { |
| 53 | 44 | $pass_args = array( |
| 54 | 45 | 'errors' => $args['errors'], |
| 55 | 46 | 'html_id' => $args['html_id'], |
| @@ -59,7 +50,7 @@ | ||
| 59 | 50 | do_action( 'frm_form_field_' . $this->type, $this->field, $args['field_name'], $pass_args ); |
| 60 | 51 | $input_html = ob_get_contents(); |
| 61 | 52 | ob_end_clean(); |
| 62 | 53 | |
| 63 | - return is_string( $input_html ) ? $input_html : ''; | |
| 54 | + return $input_html; | |
| 64 | 55 | } |
| 65 | 56 | } |