PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.4
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.4
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/FrmFormActionsController.php +30 -38 6.35.4 View file →
@@ -38,40 +38,35 @@
38 38 self::register_actions();
39 39 do_action( 'frm_form_actions_init' );
40 40 }
41 41
42 - /**
43 - * @return void
44 - */
45 42 public static function register_actions() {
46 43 $action_classes = array(
47 - 'on_submit' => 'FrmOnSubmitAction',
48 - 'email' => 'FrmEmailAction',
49 - 'wppost' => 'FrmDefPostAction',
50 - 'register' => 'FrmDefRegAction',
51 - 'paypal' => 'FrmDefPayPalAction',
52 - 'payment' => 'FrmDefHrsAction',
53 - 'quiz' => 'FrmDefQuizAction',
54 - 'quiz_outcome' => 'FrmDefQuizOutcomeAction',
55 - 'mailchimp' => 'FrmDefMlcmpAction',
56 - 'api' => 'FrmDefApiAction',
57 - 'salesforce' => 'FrmDefSalesforceAction',
58 - 'activecampaign' => 'FrmDefActiveCampaignAction',
59 - 'constantcontact' => 'FrmDefConstContactAction',
60 - 'getresponse' => 'FrmDefGetResponseAction',
61 - 'hubspot' => 'FrmDefHubspotAction',
62 - 'zapier' => 'FrmDefZapierAction',
63 - 'twilio' => 'FrmDefTwilioAction',
64 - 'highrise' => 'FrmDefHighriseAction',
65 - 'mailpoet' => 'FrmDefMailpoetAction',
66 - 'aweber' => 'FrmDefAweberAction',
67 - 'googlespreadsheet' => 'FrmDefGoogleSpreadsheetAction',
44 + 'email' => 'FrmEmailAction',
45 + 'wppost' => 'FrmDefPostAction',
46 + 'register' => 'FrmDefRegAction',
47 + 'paypal' => 'FrmDefPayPalAction',
48 + 'payment' => 'FrmDefHrsAction',
49 + 'quiz' => 'FrmDefQuizAction',
50 + 'mailchimp' => 'FrmDefMlcmpAction',
51 + 'api' => 'FrmDefApiAction',
52 +
53 + 'salesforce' => 'FrmDefSalesforceAction',
54 + 'activecampaign' => 'FrmDefActiveCampaignAction',
55 + 'constantcontact' => 'FrmDefConstContactAction',
56 + 'getresponse' => 'FrmDefGetResponseAction',
57 + 'hubspot' => 'FrmDefHubspotAction',
58 + 'zapier' => 'FrmDefZapierAction',
59 + 'twilio' => 'FrmDefTwilioAction',
60 + 'highrise' => 'FrmDefHighriseAction',
61 + 'mailpoet' => 'FrmDefMailpoetAction',
62 + 'aweber' => 'FrmDefAweberAction',
68 63 );
69 64
70 65 $action_classes = apply_filters( 'frm_registered_form_actions', $action_classes );
71 66
72 - include_once FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/email_action.php';
73 - include_once FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/default_actions.php';
67 + include_once( FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/email_action.php' );
68 + include_once( FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/default_actions.php' );
74 69
75 70 foreach ( $action_classes as $action_class ) {
76 71 self::$registered_actions->register( $action_class );
77 72 }
@@ -90,9 +85,9 @@
90 85 self::maybe_add_action_to_group( $action_controls, $groups );
91 86
92 87 $allowed = self::active_actions( $action_controls );
93 88
94 - include FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/settings.php';
89 + include( FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/settings.php' );
95 90 }
96 91
97 92 /**
98 93 * Add unknown actions to a group.
@@ -132,9 +127,9 @@
132 127 * @return array
133 128 */
134 129 public static function form_action_groups() {
135 130 $groups = array(
136 - 'misc' => array(
131 + 'misc' => array(
137 132 'name' => '',
138 133 'icon' => 'frm_icon_font frm_shuffle_icon',
139 134 'actions' => array(
140 135 'email',
@@ -140,9 +135,8 @@
140 135 'email',
141 136 'wppost',
142 137 'register',
143 138 'quiz',
144 - 'quiz_outcome',
145 139 'twilio',
146 140 ),
147 141 ),
148 142 'payment' => array(
@@ -244,11 +238,11 @@
244 238 }
245 239
246 240 // HTML to include on the icon.
247 241 $icon_atts = array();
248 - if ( $action_control->action_options['color'] !== 'var(--primary-700)' ) {
242 + if ( $action_control->action_options['color'] !== 'var(--primary-hover)' ) {
249 243 $icon_atts = array(
250 - 'style' => '--primary-700:' . $action_control->action_options['color'],
244 + 'style' => '--primary-hover:' . $action_control->action_options['color'],
251 245 );
252 246 }
253 247
254 248 include FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/_action_icon.php';
@@ -318,9 +312,9 @@
318 312 $action_control->_set( $action_key );
319 313
320 314 $use_logging = self::should_show_log_message( $form_action->post_excerpt );
321 315
322 - include FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/form_action.php';
316 + include( FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/form_action.php' );
323 317 }
324 318
325 319 public static function add_form_action() {
326 320 FrmAppHelper::permission_check( 'frm_edit_forms' );
@@ -341,9 +335,9 @@
341 335
342 336 $values = array();
343 337 $form = self::fields_to_values( $form_id, $values );
344 338
345 - include FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/form_action.php';
339 + include( FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/form_action.php' );
346 340 wp_die();
347 341 }
348 342
349 343 public static function fill_action() {
@@ -364,9 +358,9 @@
364 358 $form = self::fields_to_values( $form_action->menu_order, $values );
365 359
366 360 $use_logging = self::should_show_log_message( $action_type );
367 361
368 - include FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/_action_inside.php';
362 + include( FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/_action_inside.php' );
369 363 wp_die();
370 364 }
371 365
372 366 /**
@@ -440,10 +434,8 @@
440 434 }
441 435 $old_actions = array_diff( $old_actions, $new_actions );
442 436
443 437 self::delete_missing_actions( $old_actions );
444 -
445 - FrmOnSubmitHelper::save_on_submit_settings( $form_id );
446 438 }
447 439
448 440 public static function delete_missing_actions( $old_actions ) {
449 441 if ( ! empty( $old_actions ) ) {
@@ -470,9 +462,9 @@
470 462 public static function trigger_actions( $event, $form, $entry, $type = 'all', $args = array() ) {
471 463 $action_status = array(
472 464 'post_status' => 'publish',
473 465 );
474 - $form_actions = FrmFormAction::get_action_for_form( ( is_object( $form ) ? $form->id : $form ), $type, $action_status );
466 + $form_actions = FrmFormAction::get_action_for_form( ( is_object( $form ) ? $form->id : $form ), $type, $action_status );
475 467
476 468 if ( empty( $form_actions ) ) {
477 469 return;
478 470 }
@@ -494,9 +486,9 @@
494 486 }
495 487
496 488 foreach ( $form_actions as $action ) {
497 489
498 - $skip_this_action = ! in_array( $this_event, $action->post_content['event'], true ) || FrmOnSubmitAction::$slug === $action->post_excerpt;
490 + $skip_this_action = ( ! in_array( $this_event, $action->post_content['event'] ) );
499 491 $skip_this_action = apply_filters( 'frm_skip_form_action', $skip_this_action, compact( 'action', 'entry', 'form', 'event' ) );
500 492 if ( $skip_this_action ) {
501 493 continue;
502 494 }