PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.21.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.21.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/FrmFormAction.php +28 -5 6.256.21.1 View file →
@@ -434,9 +434,9 @@
434 434
435 435 foreach ( $settings as $number => $new_instance ) {
436 436 $this->_set( $number );
437 437
438 - $old_instance = $all_instances[ $number ] ?? array();
438 + $old_instance = isset( $all_instances[ $number ] ) ? $all_instances[ $number ] : array();
439 439
440 440 if ( ! isset( $new_instance['post_status'] ) ) {
441 441 $new_instance['post_status'] = 'draft';
442 442 }
@@ -451,9 +451,9 @@
451 451
452 452 $new_instance['post_type'] = FrmFormActionsController::$action_post_type;
453 453 $new_instance['post_name'] = $this->form_id . '_' . $this->id_base . '_' . $this->number;
454 454 $new_instance['menu_order'] = $this->form_id;
455 - $new_instance['post_date'] = $old_instance->post_date ?? '';
455 + $new_instance['post_date'] = isset( $old_instance->post_date ) ? $old_instance->post_date : '';
456 456 $instance = $this->update( $new_instance, $old_instance );
457 457
458 458 /**
459 459 * Filter an action's settings before saving.
@@ -539,11 +539,8 @@
539 539 return array();
540 540 }
541 541
542 542 if ( 'all' !== $type ) {
543 - if ( is_array( $action_controls ) ) {
544 - return array();
545 - }
546 543 return $action_controls->get_all( $form_id, $atts );
547 544 }
548 545
549 546 self::prepare_get_action( $atts );
@@ -867,8 +864,34 @@
867 864 }
868 865
869 866 $stop = false;
870 867 return $stop;
868 + }
869 +
870 + /**
871 + * Prepare the logic value for comparison against the entered value
872 + *
873 + * @since 2.01.02
874 + *
875 + * @param array|string $logic_value
876 + *
877 + * @return void
878 + */
879 + private static function prepare_logic_value( &$logic_value, $action, $entry ) {
880 + if ( is_array( $logic_value ) ) {
881 + $logic_value = reset( $logic_value );
882 + }
883 +
884 + if ( $logic_value === 'current_user' ) {
885 + $logic_value = get_current_user_id();
886 + }
887 +
888 + $logic_value = apply_filters( 'frm_content', $logic_value, $action->menu_order, $entry );
889 +
890 + /**
891 + * @since 4.04.05
892 + */
893 + $logic_value = apply_filters( 'frm_action_logic_value', $logic_value );
871 894 }
872 895
873 896 /**
874 897 * Get the value from a specific field and entry