PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.13
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.13
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 +2 -40 6.266.13 View file →
@@ -74,30 +74,18 @@
74 74 */
75 75 protected $db_row;
76 76
77 77 /**
78 - * Field dropdowns will truncate at 25 characters by default.
79 - *
80 - * @var int|null
81 - *
82 - * @since 6.16.2
83 - */
84 - protected $truncate;
85 -
86 - /**
87 78 * FrmFieldValueSelector constructor
88 79 *
89 - * @param int|string $field_id Field ID.
90 - * @param array $args Arguments for configuring the value selector.
80 + * @param int|string $field_id
91 81 */
92 82 public function __construct( $field_id, $args ) {
93 83 $this->set_html_name( $args );
94 84 $this->set_value( $args );
95 85 $this->set_source( $args );
96 - $this->set_truncate( $args );
97 86
98 87 $this->field_id = (int) $field_id;
99 -
100 88 if ( $this->field_id === 0 ) {
101 89 return;
102 90 }
103 91
@@ -208,21 +196,8 @@
208 196 }
209 197 }
210 198
211 199 /**
212 - * @since 6.16.2
213 - *
214 - * @param array $args
215 - *
216 - * @return void
217 - */
218 - protected function set_truncate( $args ) {
219 - if ( isset( $args['truncate'] ) && is_numeric( $args['truncate'] ) ) {
220 - $this->truncate = (int) $args['truncate'];
221 - }
222 - }
223 -
224 - /**
225 200 * Check if object has any options
226 201 *
227 202 * @since 2.03.05
228 203 *
@@ -280,10 +255,8 @@
280 255 echo '<select name="' . esc_attr( $this->html_name ) . '">';
281 256 echo '<option value="">' . esc_html( $this->blank_option_label ) . '</option>';
282 257
283 258 if ( ! empty( $this->options ) ) {
284 - $truncate = $this->truncate ?? 25;
285 -
286 259 foreach ( $this->options as $key => $value ) {
287 260 if ( $value == '' ) {
288 261 continue;
289 262 }
@@ -288,24 +261,13 @@
288 261 continue;
289 262 }
290 263
291 264 $option = $this->get_single_field_option( $key, $value );
292 - $option->print_single_option( $this->value, $truncate, $this->use_value_as_label_in_dropdown() );
265 + $option->print_single_option( $this->value, 25 );
293 266 }
294 267 }
295 268
296 269 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 270 }
309 271
310 272 /**
311 273 * Get an instance of FrmFieldOption