PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/fields/FrmFieldDefault.php +6 -8 6.26 → trunk View file →
@@ -20,9 +20,9 @@
20 20 *
21 21 * @return void
22 22 */
23 23 protected function set_type( $type ) {
24 - if ( empty( $type ) ) {
24 + if ( ! $type ) {
25 25 $type = 'text';
26 26 }
27 27 parent::set_type( $type );
28 28 }
@@ -37,15 +37,14 @@
37 37
38 38 ob_start();
39 39 do_action( 'frm_display_added_fields', $field );
40 40 do_action( 'frm_display_added_' . $this->type . '_field', $field );
41 - $input_html = ob_get_contents();
42 - ob_end_clean();
41 + $input_html = ob_get_clean();
43 42
44 - if ( empty( $input_html ) ) {
43 + if ( $input_html ) {
44 + echo $input_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
45 + } else {
45 46 echo $this->builder_text_field( $name ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
46 - } else {
47 - echo $input_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
48 47 }
49 48 }
50 49
51 50 /**
@@ -61,10 +60,9 @@
61 60 );
62 61 ob_start();
63 62 do_action( 'frm_form_fields', $this->field, $args['field_name'], $pass_args );
64 63 do_action( 'frm_form_field_' . $this->type, $this->field, $args['field_name'], $pass_args );
65 - $input_html = ob_get_contents();
66 - ob_end_clean();
64 + $input_html = ob_get_clean();
67 65
68 66 return is_string( $input_html ) ? $input_html : '';
69 67 }
70 68 }