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/factories/FrmFieldFactory.php +7 -3 6.27 → trunk View file →
@@ -25,9 +25,9 @@
25 25 $selector = apply_filters( 'frm_create_field_value_selector', $selector, $field_id, $args );
26 26 }
27 27
28 28 if ( ! is_object( $selector ) ) {
29 - $selector = new FrmFieldValueSelector( $field_id, $args );
29 + return new FrmFieldValueSelector( $field_id, $args );
30 30 }
31 31
32 32 return $selector;
33 33 }
@@ -73,9 +73,9 @@
73 73 * @return FrmFieldType
74 74 */
75 75 public static function get_field_type( $field_type, $field = 0 ) {
76 76 $class = self::get_field_type_class( $field_type );
77 - return empty( $class ) ? new FrmFieldDefault( $field, $field_type ) : new $class( $field, $field_type );
77 + return $class ? new $class( $field, $field_type ) : new FrmFieldDefault( $field, $field_type );
78 78 }
79 79
80 80 /**
81 81 * @since 3.0
@@ -101,11 +101,15 @@
101 101 'hidden' => 'FrmFieldHidden',
102 102 'captcha' => 'FrmFieldCaptcha',
103 103 'name' => 'FrmFieldName',
104 104 'credit_card' => 'FrmFieldCreditCard',
105 + 'address' => 'FrmFieldAddress',
105 106 // Submit button field.
106 107 FrmSubmitHelper::FIELD_TYPE => 'FrmFieldSubmit',
107 108 FrmFieldGdprHelper::FIELD_TYPE => FrmFieldGdprHelper::get_gdpr_field_class( $field_type ),
109 + 'product' => 'FrmFieldProduct',
110 + 'quantity' => 'FrmFieldQuantity',
111 + 'total' => 'FrmFieldTotal',
108 112 );
109 113
110 114 $class = $type_classes[ $field_type ] ?? '';
111 115
@@ -121,9 +125,9 @@
121 125 */
122 126 public static function field_has_html( $type ) {
123 127 $has_html = self::field_has_property( $type, 'has_html' );
124 128
125 - // this hook is here for reverse compatibility since 3.0
129 + // This hook is here for reverse compatibility since 3.0
126 130 return apply_filters( 'frm_show_custom_html', $has_html, $type );
127 131 }
128 132
129 133 /**