PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.23
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.23
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/controllers/FrmFieldsController.php +17 -21 6.256.23 View file →
@@ -183,9 +183,9 @@
183 183 return;
184 184 }
185 185
186 186 if ( ! isset( $field ) && is_object( $field_object ) ) {
187 - $field_object->parent_form_id = $values['id'] ?? $field_object->form_id;
187 + $field_object->parent_form_id = isset( $values['id'] ) ? $values['id'] : $field_object->form_id;
188 188 $field = FrmFieldsHelper::setup_edit_vars( $field_object );
189 189 }
190 190
191 191 /**
@@ -390,32 +390,30 @@
390 390 $types = array(
391 391 'default_value' => array(
392 392 'class' => '',
393 393 'icon' => 'frm_icon_font frm_text2_icon',
394 - 'title' => __( 'Default Value', 'formidable' ),
394 + 'title' => __( 'Default Value (Text)', 'formidable' ),
395 395 'data' => array(
396 396 'frmshow' => '#default-value-for-',
397 397 ),
398 398 ),
399 399 'calc' => array(
400 - 'class' => 'frm_show_upgrade frm_noallow',
401 - 'title' => __( 'Calculate Value', 'formidable' ),
402 - 'icon' => 'frm_icon_font frm_calculator_icon',
403 - 'data' => array(
400 + 'class' => 'frm_show_upgrade frm_noallow',
401 + 'title' => __( 'Default Value (Calculation)', 'formidable' ),
402 + 'icon' => 'frm_icon_font frm_calculator_icon',
403 + 'data' => array(
404 404 'medium' => 'calculations',
405 405 'upgrade' => __( 'Calculator forms', 'formidable' ),
406 406 ),
407 - 'tooltip' => __( 'Automatically calculate the value of this field based on values from other fields.', 'formidable' ),
408 407 ),
409 408 'get_values_field' => array(
410 - 'class' => 'frm_show_upgrade frm_noallow',
411 - 'title' => __( 'Lookup', 'formidable' ),
412 - 'icon' => 'frm_icon_font frm_search_icon',
413 - 'data' => array(
409 + 'class' => 'frm_show_upgrade frm_noallow',
410 + 'title' => __( 'Default Value (Lookup)', 'formidable' ),
411 + 'icon' => 'frm_icon_font frm_search_icon',
412 + 'data' => array(
414 413 'medium' => 'lookup',
415 414 'upgrade' => __( 'Lookup fields', 'formidable' ),
416 415 ),
417 - 'tooltip' => __( 'Dynamically retrieve the value of this field from a lookup field.', 'formidable' ),
418 416 ),
419 417 );
420 418
421 419 $types = apply_filters( 'frm_default_value_types', $types, $atts );
@@ -423,13 +421,11 @@
423 421 // Set active class.
424 422 $settings = array_keys( $types );
425 423 $active = 'default_value';
426 424
427 - if ( FrmAppHelper::pro_is_connected() ) {
428 - foreach ( $settings as $type ) {
429 - if ( ! empty( $field[ $type ] ) ) {
430 - $active = $type;
431 - }
425 + foreach ( $settings as $type ) {
426 + if ( ! empty( $field[ $type ] ) ) {
427 + $active = $type;
432 428 }
433 429 }
434 430
435 431 $types[ $active ]['class'] .= ' current';
@@ -674,9 +670,9 @@
674 670 * @param array $field Field array.
675 671 * @return string
676 672 */
677 673 private static function prepare_placeholder( $field ) {
678 - $placeholder = $field['placeholder'] ?? '';
674 + $placeholder = isset( $field['placeholder'] ) ? $field['placeholder'] : '';
679 675
680 676 return $placeholder;
681 677 }
682 678
@@ -998,11 +994,11 @@
998 994
999 995 public static function check_value( $opt, $opt_key, $field ) {
1000 996 if ( is_array( $opt ) ) {
1001 997 if ( FrmField::is_option_true( $field, 'separate_value' ) ) {
1002 - $opt = $opt['value'] ?? $opt['label'] ?? reset( $opt );
998 + $opt = isset( $opt['value'] ) ? $opt['value'] : ( isset( $opt['label'] ) ? $opt['label'] : reset( $opt ) );
1003 999 } else {
1004 - $opt = $opt['label'] ?? reset( $opt );
1000 + $opt = isset( $opt['label'] ) ? $opt['label'] : reset( $opt );
1005 1001 }
1006 1002 }
1007 1003
1008 1004 return $opt;
@@ -1009,9 +1005,9 @@
1009 1005 }
1010 1006
1011 1007 public static function check_label( $opt ) {
1012 1008 if ( is_array( $opt ) ) {
1013 - $opt = $opt['label'] ?? reset( $opt );
1009 + $opt = isset( $opt['label'] ) ? $opt['label'] : reset( $opt );
1014 1010 }
1015 1011
1016 1012 return $opt;
1017 1013 }