PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.24.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.24.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/helpers/FrmFormsHelper.php +12 -12 6.256.24.1 View file →
@@ -361,10 +361,10 @@
361 361 if ( empty( $post_values ) ) {
362 362 $post_values = wp_unslash( $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
363 363 }
364 364
365 - $values['form_key'] = $post_values['form_key'] ?? $record->form_key;
366 - $values['is_template'] = $post_values['is_template'] ?? $record->is_template;
365 + $values['form_key'] = isset( $post_values['form_key'] ) ? $post_values['form_key'] : $record->form_key;
366 + $values['is_template'] = isset( $post_values['is_template'] ) ? $post_values['is_template'] : $record->is_template;
367 367 $values['status'] = $record->status;
368 368
369 369 $values = self::fill_default_opts( $values, $record, $post_values );
370 370
@@ -437,9 +437,9 @@
437 437 */
438 438 public static function fill_form_options( &$options, $values ) {
439 439 $defaults = self::get_default_opts();
440 440 foreach ( $defaults as $var => $default ) {
441 - $options[ $var ] = $values['options'][ $var ] ?? $default;
441 + $options[ $var ] = isset( $values['options'][ $var ] ) ? $values['options'][ $var ] : $default;
442 442 unset( $var, $default );
443 443 }
444 444 }
445 445
@@ -612,11 +612,11 @@
612 612 * @param array $args
613 613 * @return void
614 614 */
615 615 public static function insert_opt_html( $args ) {
616 - $class = $args['class'] ?? '';
616 + $class = isset( $args['class'] ) ? $args['class'] : '';
617 617 $fields = self::get_field_type_data_for_insert_opt_html();
618 - $field = $fields[ $args['type'] ] ?? array();
618 + $field = isset( $fields[ $args['type'] ] ) ? $fields[ $args['type'] ] : array();
619 619
620 620 self::prepare_field_type( $field );
621 621
622 622 if ( ! isset( $field['icon'] ) ) {
@@ -650,9 +650,9 @@
650 650 <?php
651 651 echo FrmAppHelper::kses_icon( $icon ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
652 652 echo esc_html( $truncated_name );
653 653 ?>
654 - <span>[<?php echo esc_attr( $args['id_label'] ?? $args['id'] ); ?>]</span>
654 + <span>[<?php echo esc_attr( isset( $args['id_label'] ) ? $args['id_label'] : $args['id'] ); ?>]</span>
655 655 </a>
656 656 <a href="javascript:void(0)" class="frmkeys frm_insert_code frm_hidden" data-code="<?php echo esc_attr( $args['key'] ); ?>">
657 657 <?php
658 658 echo FrmAppHelper::kses_icon( $icon ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
@@ -657,9 +657,9 @@
657 657 <?php
658 658 echo FrmAppHelper::kses_icon( $icon ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
659 659 echo esc_html( $truncated_name );
660 660 ?>
661 - <span>[<?php echo esc_attr( FrmAppHelper::truncate( $args['key_label'] ?? $args['key'], 7 ) ); ?>]</span>
661 + <span>[<?php echo esc_attr( FrmAppHelper::truncate( isset( $args['key_label'] ) ? $args['key_label'] : $args['key'], 7 ) ); ?>]</span>
662 662 </a>
663 663 </li>
664 664 <?php
665 665 }
@@ -974,9 +974,9 @@
974 974
975 975 // Start from the fields closest to the submit button.
976 976 $fields = array_reverse( $fields );
977 977 foreach ( $fields as $field ) {
978 - $type = $field['original_type'] ?? $field['type'];
978 + $type = isset( $field['original_type'] ) ? $field['original_type'] : $field['type'];
979 979 $has_input = FrmFieldFactory::field_has_property( $type, 'has_input' );
980 980 if ( $has_input ) {
981 981 return self::field_has_top_label( $field, $form );
982 982 }
@@ -1220,9 +1220,9 @@
1220 1220 } elseif ( isset( $link_details['confirm'] ) ) {
1221 1221 $link .= ' onclick="return confirm(\'' . esc_attr( $link_details['confirm'] ) . '\')"';
1222 1222 }
1223 1223
1224 - $label = ( $link_details[ $length ] ?? $link_details['label'] );
1224 + $label = ( isset( $link_details[ $length ] ) ? $link_details[ $length ] : $link_details['label'] );
1225 1225 if ( $length === 'icon' && isset( $link_details[ $length ] ) ) {
1226 1226 $label = '<span class="' . $label . '" title="' . esc_attr( $link_details['label'] ) . '" aria-hidden="true"></span>';
1227 1227 $link .= ' aria-label="' . esc_attr( $link_details['label'] ) . '"';
1228 1228 }
@@ -1432,9 +1432,9 @@
1432 1432 // Determine the icon to be used.
1433 1433 $icon = $icons[''];
1434 1434 if ( count( $categories ) === 1 ) {
1435 1435 $category = reset( $categories );
1436 - $icon = $icons[ $category ] ?? $icon;
1436 + $icon = isset( $icons[ $category ] ) ? $icons[ $category ] : $icon;
1437 1437 } elseif ( ! empty( $categories ) ) {
1438 1438 $icons = array_intersect_key( $icons, array_flip( $categories ) );
1439 1439 $icon = reset( $icons );
1440 1440 }
@@ -1440,9 +1440,9 @@
1440 1440 }
1441 1441
1442 1442 // Prepare variables for output.
1443 1443 $icon_name = $icon[0];
1444 - $bg_color = $icon[1] ?? '';
1444 + $bg_color = isset( $icon[1] ) ? $icon[1] : '';
1445 1445
1446 1446 // Render the icon.
1447 1447 echo '<span class="frm-category-icon frm-icon-wrapper"';
1448 1448 if ( $bg_color && $atts['bg'] ) {
@@ -1976,9 +1976,9 @@
1976 1976 return;
1977 1977 }
1978 1978
1979 1979 $status = $atts['status'];
1980 - $form_id = $atts['id'] ?? FrmAppHelper::get_param( 'id', 0, 'get', 'absint' );
1980 + $form_id = isset( $atts['id'] ) ? $atts['id'] : FrmAppHelper::get_param( 'id', 0, 'get', 'absint' );
1981 1981 $trash_link = self::delete_trash_info( $form_id, $status );
1982 1982 $links = self::get_action_links( $form_id, $status );
1983 1983 include FrmAppHelper::plugin_path() . '/classes/views/frm-forms/actions-dropdown.php';
1984 1984 }