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/FrmFormActionsController.php +48 -147 6.276.23 View file →
@@ -3,12 +3,8 @@
3 3 die( 'You are not allowed to call this page directly.' );
4 4 }
5 5
6 6 class FrmFormActionsController {
7 -
8 - /**
9 - * @var string
10 - */
11 7 public static $action_post_type = 'frm_form_actions';
12 8
13 9 /**
14 10 * @var array|null
@@ -67,9 +63,8 @@
67 63 'constantcontact' => 'FrmDefConstContactAction',
68 64 'getresponse' => 'FrmDefGetResponseAction',
69 65 'hubspot' => 'FrmDefHubspotAction',
70 66 'zapier' => 'FrmDefZapierAction',
71 - 'n8n' => 'FrmDefN8NAction',
72 67 'twilio' => 'FrmDefTwilioAction',
73 68 'highrise' => 'FrmDefHighriseAction',
74 69 'mailpoet' => 'FrmDefMailpoetAction',
75 70 'aweber' => 'FrmDefAweberAction',
@@ -76,12 +71,8 @@
76 71 'convertkit' => 'FrmDefConvertKitAction',
77 72 'googlespreadsheet' => 'FrmDefGoogleSpreadsheetAction',
78 73 );
79 74
80 - if ( ! FrmAppHelper::show_new_feature( 'n8n' ) ) {
81 - unset( $action_classes['n8n'] );
82 - }
83 -
84 75 $action_classes = apply_filters( 'frm_registered_form_actions', $action_classes );
85 76 $action_classes = self::maybe_unset_highrise( $action_classes );
86 77
87 78 include_once FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/email_action.php';
@@ -97,9 +88,8 @@
97 88 *
98 89 * @since 6.23
99 90 *
100 91 * @param array $action_classes
101 - *
102 92 * @return array
103 93 */
104 94 private static function maybe_unset_highrise( $action_classes ) {
105 95 if ( 'FrmDefHighriseAction' === ( $action_classes['highrise'] ?? '' ) ) {
@@ -113,10 +103,11 @@
113 103 *
114 104 * @param array $values
115 105 */
116 106 public static function email_settings( $values ) {
117 - $form = FrmForm::getOne( $values['id'] );
118 - $groups = self::form_action_groups();
107 + $form = FrmForm::getOne( $values['id'] );
108 + $groups = self::form_action_groups();
109 +
119 110 $action_controls = self::get_form_actions();
120 111 self::maybe_add_action_to_group( $action_controls, $groups );
121 112
122 113 $allowed = self::active_actions( $action_controls );
@@ -127,17 +118,11 @@
127 118 /**
128 119 * Add unknown actions to a group.
129 120 *
130 121 * @since 4.0
131 - *
132 - * @param array $action_controls
133 - * @param array $groups
134 - *
135 - * @return void
136 122 */
137 123 private static function maybe_add_action_to_group( $action_controls, &$groups ) {
138 124 $grouped = array();
139 -
140 125 foreach ( $groups as $group ) {
141 126 if ( isset( $group['actions'] ) ) {
142 127 $grouped = array_merge( $grouped, $group['actions'] );
143 128 }
@@ -143,14 +128,13 @@
143 128 }
144 129 }
145 130
146 131 foreach ( $action_controls as $action ) {
147 - if ( isset( $groups[ $action->id_base ] ) || in_array( $action->id_base, $grouped, true ) ) {
132 + if ( isset( $groups[ $action->id_base ] ) || in_array( $action->id_base, $grouped ) ) {
148 133 continue;
149 134 }
150 135
151 136 $this_group = $action->action_options['group'];
152 -
153 137 if ( ! isset( $groups[ $this_group ] ) ) {
154 138 $this_group = 'misc';
155 139 }
156 140
@@ -171,9 +155,9 @@
171 155 public static function form_action_groups() {
172 156 $groups = array(
173 157 'misc' => array(
174 158 'name' => '',
175 - 'icon' => 'frmfont frm_shuffle_icon',
159 + 'icon' => 'frm_icon_font frm_shuffle_icon',
176 160 'actions' => array(
177 161 'email',
178 162 'wppost',
179 163 'register',
@@ -183,9 +167,9 @@
183 167 ),
184 168 ),
185 169 'payment' => array(
186 170 'name' => __( 'eCommerce', 'formidable' ),
187 - 'icon' => 'frmfont frm_credit_card_alt_icon',
171 + 'icon' => 'frm_icon_font frm_credit_card_alt_icon',
188 172 'actions' => array(
189 173 'paypal',
190 174 'payment',
191 175 ),
@@ -191,9 +175,9 @@
191 175 ),
192 176 ),
193 177 'marketing' => array(
194 178 'name' => __( 'Email Marketing', 'formidable' ),
195 - 'icon' => 'frmfont frm_mail_bulk_icon',
179 + 'icon' => 'frm_icon_font frm_mail_bulk_icon',
196 180 'actions' => array(
197 181 'mailchimp',
198 182 'activecampaign',
199 183 'constantcontact',
@@ -199,14 +183,13 @@
199 183 'constantcontact',
200 184 'getresponse',
201 185 'aweber',
202 186 'mailpoet',
203 - 'convertkit',
204 187 ),
205 188 ),
206 189 'crm' => array(
207 190 'name' => __( 'CRM', 'formidable' ),
208 - 'icon' => 'frmfont frm_address_card_icon',
191 + 'icon' => 'frm_icon_font frm_address_card_icon',
209 192 'actions' => self::get_crm_actions(),
210 193 ),
211 194 );
212 195
@@ -239,21 +222,17 @@
239 222 * Get the number of currently active form actions.
240 223 *
241 224 * @since 4.0
242 225 *
243 - * @param array $action_controls
244 - *
245 226 * @return array
246 227 */
247 228 private static function active_actions( $action_controls ) {
248 229 $allowed = array();
249 -
250 230 foreach ( $action_controls as $action_control ) {
251 - if ( ! empty( $action_control->action_options['active'] ) ) {
231 + if ( isset( $action_control->action_options['active'] ) && $action_control->action_options['active'] ) {
252 232 $allowed[] = $action_control->id_base;
253 233 }
254 234 }
255 -
256 235 return $allowed;
257 236 }
258 237
259 238 /**
@@ -259,15 +238,15 @@
259 238 /**
260 239 * For each add-on, add an li, class, and javascript function. If active, add an additional class.
261 240 *
262 241 * @since 4.0
263 - *
264 242 * @param object $action_control
265 243 * @param array $allowed
266 244 */
267 245 public static function show_action_icon_link( $action_control, $allowed ) {
268 - $data = array();
269 - $classes = ' frm_' . $action_control->id_base . '_action frm_single_action';
246 + $data = array();
247 + $classes = ' frm_' . $action_control->id_base . '_action frm_single_action';
248 +
270 249 $group_class = ' frm-group-' . $action_control->action_options['group'];
271 250
272 251 /* translators: %s: Name of form action */
273 252 $upgrade_label = sprintf( esc_html__( '%s form actions', 'formidable' ), $action_control->action_options['tooltip'] );
@@ -273,16 +252,15 @@
273 252 $upgrade_label = sprintf( esc_html__( '%s form actions', 'formidable' ), $action_control->action_options['tooltip'] );
274 253
275 254 $default_shown = array( 'wppost', 'register', 'payment', 'quiz', 'hubspot' );
276 255 $default_shown = array_values( array_diff( $default_shown, $allowed ) );
277 - $default_position = array_search( $action_control->id_base, $default_shown, true );
256 + $default_position = array_search( $action_control->id_base, $default_shown );
278 257 $allowed_count = count( $allowed );
279 258
280 - if ( ! empty( $action_control->action_options['active'] ) ) {
259 + if ( isset( $action_control->action_options['active'] ) && $action_control->action_options['active'] ) {
281 260 $classes .= ' frm_active_action';
282 261 } else {
283 262 $classes .= ' frm_inactive_action';
284 -
285 263 if ( $default_position !== false && ( $allowed_count + $default_position ) < 6 ) {
286 264 $group_class .= ' frm-default-show';
287 265 }
288 266
@@ -289,9 +267,8 @@
289 267 $data['data-upgrade'] = $upgrade_label;
290 268 $data['data-medium'] = 'settings-' . $action_control->id_base;
291 269
292 270 $upgrading = FrmAddonsController::install_link( $action_control->action_options['plugin'] );
293 -
294 271 if ( isset( $upgrading['url'] ) ) {
295 272 $data['data-oneclick'] = json_encode( $upgrading );
296 273 }
297 274
@@ -299,9 +276,8 @@
299 276 $data['data-message'] = $action_control->action_options['message'];
300 277 }
301 278
302 279 $requires = FrmFormsHelper::get_plan_required( $upgrading );
303 -
304 280 if ( $requires && 'free' !== $requires ) {
305 281 $data['data-requires'] = $requires;
306 282 }
307 283 }//end if
@@ -307,9 +283,8 @@
307 283 }//end if
308 284
309 285 // HTML to include on the icon.
310 286 $icon_atts = array();
311 -
312 287 if ( $action_control->action_options['color'] !== 'var(--primary-700)' ) {
313 288 $icon_atts = array(
314 289 'style' => '--primary-700:' . $action_control->action_options['color'],
315 290 );
@@ -319,15 +294,13 @@
319 294 }
320 295
321 296 /**
322 297 * @param string $action
323 - *
324 298 * @return array|FrmFormAction A single form action is returned when a specific $action value is requested.
325 299 */
326 300 public static function get_form_actions( $action = 'all' ) {
327 301 $temp_actions = self::$registered_actions;
328 -
329 - if ( ! $temp_actions ) {
302 + if ( empty( $temp_actions ) ) {
330 303 self::actions_init();
331 304 $temp_actions = self::$registered_actions->actions;
332 305 } else {
333 306 $temp_actions = $temp_actions->actions;
@@ -335,9 +308,9 @@
335 308
336 309 $actions = array();
337 310
338 311 foreach ( $temp_actions as $a ) {
339 - if ( 'all' !== $action && $a->id_base === $action ) {
312 + if ( 'all' !== $action && $a->id_base == $action ) {
340 313 return $a;
341 314 }
342 315
343 316 $actions[ $a->id_base ] = $a;
@@ -347,16 +320,11 @@
347 320 }
348 321
349 322 /**
350 323 * @since 2.0
351 - *
352 - * @param object $form
353 - * @param array $values
354 - *
355 - * @return void
356 324 */
357 325 public static function list_actions( $form, $values ) {
358 - if ( ! $form ) {
326 + if ( empty( $form ) ) {
359 327 return;
360 328 }
361 329
362 330 /**
@@ -401,20 +369,17 @@
401 369 * @since 6.17
402 370 *
403 371 * @param int|string $form_id
404 372 * @param array $form_actions
405 - *
406 373 * @return void
407 374 */
408 375 private static function maybe_show_limit_warning( $form_id, $form_actions ) {
409 376 $count = count( $form_actions );
410 -
411 377 if ( $count < 99 ) {
412 378 return;
413 379 }
414 380
415 381 $limit = FrmFormAction::get_action_limit( $form_id );
416 -
417 382 if ( $limit < 99 || $count < $limit ) {
418 383 return;
419 384 }
420 385
@@ -420,9 +385,9 @@
420 385
421 386 $documentation_url = 'https://formidableforms.com/knowledgebase/frm_form_action_limit/#kb-increase-limit-of-form-actions';
422 387
423 388 echo '<div class="frm_warning_style">';
424 - FrmAppHelper::icon_by_class( 'frmfont frm_alert_icon' );
389 + FrmAppHelper::icon_by_class( 'frm_icon_font frm_alert_icon' );
425 390 echo '&nbsp;';
426 391 printf(
427 392 // translators: %s: URL to documentation
428 393 esc_html__( 'You have reached your form action limit. To increase this limit, you will require additional code. Visit our documentation at %s.', 'formidable' ),
@@ -430,17 +395,8 @@
430 395 );
431 396 echo '</div>';
432 397 }
433 398
434 - /**
435 - * @param WP_Post $form_action
436 - * @param object $form
437 - * @param int $action_key Action ID.
438 - * @param FrmFormAction $action_control
439 - * @param array $values
440 - *
441 - * @return void
442 - */
443 399 public static function action_control( $form_action, $form, $action_key, $action_control, $values ) {
444 400 $action_control->_set( $action_key );
445 401
446 402 $use_logging = self::should_show_log_message( $form_action->post_excerpt );
@@ -462,14 +418,16 @@
462 418 */
463 419 $action_control = self::get_form_actions( $action_type );
464 420 $action_control->_set( $action_key );
465 421
466 - $form_id = FrmAppHelper::get_param( 'form_id', '', 'post', 'absint' );
422 + $form_id = FrmAppHelper::get_param( 'form_id', '', 'post', 'absint' );
423 +
467 424 $form_action = $action_control->prepare_new( $form_id );
468 425 $use_logging = self::should_show_log_message( $action_type );
469 - $values = array();
470 - $form = self::fields_to_values( $form_id, $values );
471 426
427 + $values = array();
428 + $form = self::fields_to_values( $form_id, $values );
429 +
472 430 include FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/form_action.php';
473 431 wp_die();
474 432 }
475 433
@@ -476,19 +434,21 @@
476 434 public static function fill_action() {
477 435 FrmAppHelper::permission_check( 'frm_edit_forms' );
478 436 check_ajax_referer( 'frm_ajax', 'nonce' );
479 437
480 - $action_key = FrmAppHelper::get_param( 'action_id', '', 'post', 'absint' );
481 - $action_type = FrmAppHelper::get_param( 'action_type', '', 'post', 'sanitize_text_field' );
438 + $action_key = FrmAppHelper::get_param( 'action_id', '', 'post', 'absint' );
439 + $action_type = FrmAppHelper::get_param( 'action_type', '', 'post', 'sanitize_text_field' );
440 +
482 441 $action_control = self::get_form_actions( $action_type );
483 -
484 - if ( ! $action_control ) {
442 + if ( empty( $action_control ) ) {
485 443 wp_die();
486 444 }
487 445
488 446 $form_action = $action_control->get_single_action( $action_key );
489 - $values = array();
490 - $form = self::fields_to_values( $form_action->menu_order, $values );
447 +
448 + $values = array();
449 + $form = self::fields_to_values( $form_action->menu_order, $values );
450 +
491 451 $use_logging = self::should_show_log_message( $action_type );
492 452
493 453 include FrmAppHelper::plugin_path() . '/classes/views/frm-form-actions/_action_inside.php';
494 454 wp_die();
@@ -495,11 +455,8 @@
495 455 }
496 456
497 457 /**
498 458 * @since 3.06.04
499 - *
500 - * @param string $action_type
501 - *
502 459 * @return bool
503 460 */
504 461 private static function should_show_log_message( $action_type ) {
505 462 $logging = array( 'api', 'salesforce', 'constantcontact', 'activecampaign' );
@@ -505,14 +462,8 @@
505 462 $logging = array( 'api', 'salesforce', 'constantcontact', 'activecampaign' );
506 463 return in_array( $action_type, $logging, true ) && ! function_exists( 'frm_log_autoloader' );
507 464 }
508 465
509 - /**
510 - * @param int|string $form_id
511 - * @param array $values
512 - *
513 - * @return object
514 - */
515 466 private static function fields_to_values( $form_id, array &$values ) {
516 467 $form = FrmForm::getOne( $form_id );
517 468
518 469 $values = array(
@@ -520,14 +471,12 @@
520 471 'id' => $form->id,
521 472 );
522 473
523 474 $fields = FrmField::get_all_for_form( $form->id );
524 -
525 475 foreach ( $fields as $k => $f ) {
526 476 $f = (array) $f;
527 477 $opts = (array) $f['field_options'];
528 478 $f = array_merge( $opts, $f );
529 -
530 479 if ( ! isset( $f['post_field'] ) ) {
531 480 $f['post_field'] = '';
532 481 }
533 482 $values['fields'][] = $f;
@@ -538,15 +487,13 @@
538 487 }
539 488
540 489 /**
541 490 * @param int $form_id
542 - *
543 491 * @return void
544 492 */
545 493 public static function update_settings( $form_id ) {
546 494 FrmAppHelper::permission_check( 'frm_edit_forms' );
547 495 $process_form = FrmAppHelper::get_post_param( 'process_form', '', 'sanitize_text_field' );
548 -
549 496 if ( ! wp_verify_nonce( $process_form, 'process_form_nonce' ) ) {
550 497 $frm_settings = FrmAppHelper::get_settings();
551 498 $error_args = array(
552 499 'title' => __( 'Verification failed', 'formidable' ),
@@ -579,19 +526,17 @@
579 526 $new_actions = array();
580 527
581 528 foreach ( $registered_actions as $registered_action ) {
582 529 $action_ids = $registered_action->update_callback( $form_id );
583 -
584 - if ( $action_ids ) {
530 + if ( ! empty( $action_ids ) ) {
585 531 $new_actions[] = $action_ids;
586 532 }
587 533 }
588 534
589 535 // Only use array_merge if there are new actions.
590 - if ( $new_actions ) {
536 + if ( ! empty( $new_actions ) ) {
591 537 $new_actions = call_user_func_array( 'array_merge', $new_actions );
592 538 }
593 -
594 539 $old_actions = array_diff( $old_actions, $new_actions );
595 540
596 541 self::delete_missing_actions( $old_actions );
597 542
@@ -597,15 +542,10 @@
597 542
598 543 FrmOnSubmitHelper::save_on_submit_settings( $form_id );
599 544 }
600 545
601 - /**
602 - * @param array $old_actions
603 - *
604 - * @return void
605 - */
606 546 public static function delete_missing_actions( $old_actions ) {
607 - if ( $old_actions ) {
547 + if ( ! empty( $old_actions ) ) {
608 548 foreach ( $old_actions as $old_id ) {
609 549 wp_delete_post( $old_id );
610 550 }
611 551 FrmDb::cache_delete_group( 'frm_actions' );
@@ -611,15 +551,8 @@
611 551 FrmDb::cache_delete_group( 'frm_actions' );
612 552 }
613 553 }
614 554
615 - /**
616 - * @param int|string $entry_id
617 - * @param int|string $form_id
618 - * @param array $args
619 - *
620 - * @return void
621 - */
622 555 public static function trigger_create_actions( $entry_id, $form_id, $args = array() ) {
623 556 $filter_args = $args;
624 557 $filter_args['entry_id'] = $entry_id;
625 558 $filter_args['form_id'] = $form_id;
@@ -636,34 +569,26 @@
636 569 self::trigger_actions( $event, $form_id, $entry_id, 'all', $args );
637 570 }
638 571
639 572 /**
640 - * @param string $event
641 - * @param int|object|string $form
642 - * @param int|string $entry
643 - * @param string $type
644 - * @param array $args
645 - *
646 - * @return void
573 + * @param string $event
647 574 */
648 - public static function trigger_actions( $event, $form, $entry, $type = 'all', $args = array() ) { // phpcs:ignore SlevomatCodingStandard.Complexity.Cognitive.ComplexityTooHigh
575 + public static function trigger_actions( $event, $form, $entry, $type = 'all', $args = array() ) {
649 576 $action_status = array(
650 577 'post_status' => 'publish',
651 578 );
652 579 $form_actions = FrmFormAction::get_action_for_form( ( is_object( $form ) ? $form->id : $form ), $type, $action_status );
653 580
654 - if ( ! $form_actions ) {
581 + if ( empty( $form_actions ) ) {
655 582 return;
656 583 }
657 584
658 585 FrmForm::maybe_get_form( $form );
659 -
660 586 if ( ! is_object( $form ) ) {
661 587 return;
662 588 }
663 589
664 590 $link_settings = self::get_form_actions( $type );
665 -
666 591 if ( 'all' !== $type ) {
667 592 $link_settings = array( $type => $link_settings );
668 593 }
669 594
@@ -676,11 +601,11 @@
676 601 $this_event = $event;
677 602 }
678 603
679 604 foreach ( $form_actions as $action ) {
605 +
680 606 $skip_this_action = ! in_array( $this_event, $action->post_content['event'], true ) || FrmOnSubmitAction::$slug === $action->post_excerpt;
681 607 $skip_this_action = apply_filters( 'frm_skip_form_action', $skip_this_action, compact( 'action', 'entry', 'form', 'event' ) );
682 -
683 608 if ( $skip_this_action ) {
684 609 continue;
685 610 }
686 611
@@ -687,18 +612,17 @@
687 612 if ( ! is_object( $entry ) ) {
688 613 $entry = FrmEntry::getOne( $entry, true );
689 614 }
690 615
691 - if ( ! $entry || ( FrmEntriesHelper::DRAFT_ENTRY_STATUS === (int) $entry->is_draft && 'draft' !== $event ) ) {
616 + if ( empty( $entry ) || ( FrmEntriesHelper::DRAFT_ENTRY_STATUS === (int) $entry->is_draft && 'draft' !== $event ) ) {
692 617 continue;
693 618 }
694 619
695 - $child_entry = ( is_numeric( $form->parent_form_id ) && $form->parent_form_id ) || ( $entry && ( (int) $entry->form_id !== (int) $form->id || $entry->parent_item_id ) ) || ! empty( $args['is_child'] ); // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
620 + $child_entry = ( is_numeric( $form->parent_form_id ) && $form->parent_form_id ) || ( $entry && ( $entry->form_id != $form->id || $entry->parent_item_id ) ) || ! empty( $args['is_child'] );
696 621
697 622 if ( $child_entry ) {
698 623 // maybe trigger actions for sub forms
699 624 $trigger_children = apply_filters( 'frm_use_embedded_form_actions', false, compact( 'form', 'entry' ) );
700 -
701 625 if ( ! $trigger_children ) {
702 626 continue;
703 627 }
704 628 }
@@ -704,9 +628,8 @@
704 628 }
705 629
706 630 // Check conditional logic.
707 631 $stop = FrmFormAction::action_conditions_met( $action, $entry );
708 -
709 632 if ( $stop ) {
710 633 continue;
711 634 }
712 635
@@ -716,9 +639,9 @@
716 639
717 640 unset( $action );
718 641 }//end foreach
719 642
720 - if ( $stored_actions ) {
643 + if ( ! empty( $stored_actions ) ) {
721 644 asort( $action_priority );
722 645
723 646 // Make sure hooks are loaded.
724 647 new FrmNotification();
@@ -749,15 +672,8 @@
749 672 }//end foreach
750 673 }//end if
751 674 }
752 675
753 - /**
754 - * @param int|string $form_id
755 - * @param array $values
756 - * @param array $args
757 - *
758 - * @return void
759 - */
760 676 public static function duplicate_form_actions( $form_id, $values, $args = array() ) {
761 677 if ( empty( $args['old_id'] ) ) {
762 678 // Continue if we know which actions to copy.
763 679 return;
@@ -773,13 +689,8 @@
773 689 unset( $action_control );
774 690 }
775 691 }
776 692
777 - /**
778 - * @param string $where
779 - *
780 - * @return string
781 - */
782 693 public static function limit_by_type( $where ) {
783 694 global $frm_vars, $wpdb;
784 695
785 696 if ( ! isset( $frm_vars['action_type'] ) ) {
@@ -785,9 +696,11 @@
785 696 if ( ! isset( $frm_vars['action_type'] ) ) {
786 697 return $where;
787 698 }
788 699
789 - return $where . $wpdb->prepare( ' AND post_excerpt = %s ', $frm_vars['action_type'] );
700 + $where .= $wpdb->prepare( ' AND post_excerpt = %s ', $frm_vars['action_type'] );
701 +
702 + return $where;
790 703 }
791 704
792 705 /**
793 706 * Prevent WPML from filtering form actions based on the active language.
@@ -795,21 +708,19 @@
795 708 * @since 6.20
796 709 *
797 710 * @param bool|null $null
798 711 * @param string $post_type
799 - *
800 712 * @return bool|null
801 713 */
802 714 public static function prevent_wpml_translations( $null, $post_type ) {
803 - return self::$action_post_type === $post_type ? false : $null;
715 + if ( self::$action_post_type === $post_type ) {
716 + return false;
717 + }
718 + return $null;
804 719 }
805 720 }
806 721
807 722 class Frm_Form_Action_Factory {
808 -
809 - /**
810 - * @var array
811 - */
812 723 public $actions = array();
813 724
814 725 public function __construct() {
815 726 add_action( 'frm_form_actions_init', array( $this, '_register_actions' ), 100 );
@@ -814,22 +725,12 @@
814 725 public function __construct() {
815 726 add_action( 'frm_form_actions_init', array( $this, '_register_actions' ), 100 );
816 727 }
817 728
818 - /**
819 - * @param string $action_class
820 - *
821 - * @return void
822 - */
823 729 public function register( $action_class ) {
824 730 $this->actions[ $action_class ] = new $action_class();
825 731 }
826 732
827 - /**
828 - * @param string $action_class
829 - *
830 - * @return void
831 - */
832 733 public function unregister( $action_class ) {
833 734 if ( isset( $this->actions[ $action_class ] ) ) {
834 735 unset( $this->actions[ $action_class ] );
835 736 }