PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.22.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.22.1
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/FrmFieldValueSelector.php +3 -16 6.26 → 6.22.1 View file →
@@ -85,10 +85,9 @@
85 85
86 86 /**
87 87 * FrmFieldValueSelector constructor
88 88 *
89 - * @param int|string $field_id Field ID.
90 - * @param array $args Arguments for configuring the value selector.
89 + * @param int|string $field_id
91 90 */
92 91 public function __construct( $field_id, $args ) {
93 92 $this->set_html_name( $args );
94 93 $this->set_value( $args );
@@ -95,9 +94,8 @@
95 94 $this->set_source( $args );
96 95 $this->set_truncate( $args );
97 96
98 97 $this->field_id = (int) $field_id;
99 -
100 98 if ( $this->field_id === 0 ) {
101 99 return;
102 100 }
103 101
@@ -280,9 +278,9 @@
280 278 echo '<select name="' . esc_attr( $this->html_name ) . '">';
281 279 echo '<option value="">' . esc_html( $this->blank_option_label ) . '</option>';
282 280
283 281 if ( ! empty( $this->options ) ) {
284 - $truncate = $this->truncate ?? 25;
282 + $truncate = isset( $this->truncate ) ? $this->truncate : 25;
285 283
286 284 foreach ( $this->options as $key => $value ) {
287 285 if ( $value == '' ) {
288 286 continue;
@@ -288,24 +286,13 @@
288 286 continue;
289 287 }
290 288
291 289 $option = $this->get_single_field_option( $key, $value );
292 - $option->print_single_option( $this->value, $truncate, $this->use_value_as_label_in_dropdown() );
290 + $option->print_single_option( $this->value, $truncate );
293 291 }
294 292 }
295 293
296 294 echo '</select>';
297 - }
298 -
299 - /**
300 - * Whether to use the field value as the option label in the dropdown when the label is empty.
301 - *
302 - * @since 6.25.1
303 - *
304 - * @return bool
305 - */
306 - protected function use_value_as_label_in_dropdown() {
307 - return false;
308 295 }
309 296
310 297 /**
311 298 * Get an instance of FrmFieldOption