| @@ -48,9 +48,9 @@ | ||
| 48 | 48 | 'email' => 'FrmEmailAction', |
| 49 | 49 | 'wppost' => 'FrmDefPostAction', |
| 50 | 50 | 'register' => 'FrmDefRegAction', |
| 51 | 51 | 'paypal' => 'FrmDefPayPalAction', |
| 52 | - 'payment' => 'FrmDefHrsAction', | |
| 52 | + 'payment' => 'FrmTransLiteAction', | |
| 53 | 53 | 'quiz' => 'FrmDefQuizAction', |
| 54 | 54 | 'quiz_outcome' => 'FrmDefQuizOutcomeAction', |
| 55 | 55 | 'mailchimp' => 'FrmDefMlcmpAction', |
| 56 | 56 | 'api' => 'FrmDefApiAction', |
| @@ -240,9 +240,9 @@ | ||
| 240 | 240 | $requires = FrmFormsHelper::get_plan_required( $upgrading ); |
| 241 | 241 | if ( $requires && 'free' !== $requires ) { |
| 242 | 242 | $data['data-requires'] = $requires; |
| 243 | 243 | } |
| 244 | - } | |
| 244 | + }//end if | |
| 245 | 245 | |
| 246 | 246 | // HTML to include on the icon. |
| 247 | 247 | $icon_atts = array(); |
| 248 | 248 | if ( $action_control->action_options['color'] !== 'var(--primary-700)' ) { |
| @@ -409,9 +409,22 @@ | ||
| 409 | 409 | FrmAppHelper::permission_check( 'frm_edit_forms' ); |
| 410 | 410 | $process_form = FrmAppHelper::get_post_param( 'process_form', '', 'sanitize_text_field' ); |
| 411 | 411 | if ( ! wp_verify_nonce( $process_form, 'process_form_nonce' ) ) { |
| 412 | 412 | $frm_settings = FrmAppHelper::get_settings(); |
| 413 | - wp_die( esc_html( $frm_settings->admin_permission ) ); | |
| 413 | + $error_args = array( | |
| 414 | + 'title' => __( 'Verification failed', 'formidable' ), | |
| 415 | + 'body' => $frm_settings->admin_permission, | |
| 416 | + 'cancel_url' => add_query_arg( | |
| 417 | + array( | |
| 418 | + 'page' => 'formidable', | |
| 419 | + 'frm_action' => 'settings', | |
| 420 | + 'id' => $form_id, | |
| 421 | + ), | |
| 422 | + admin_url( 'admin.php?' ) | |
| 423 | + ), | |
| 424 | + ); | |
| 425 | + FrmAppController::show_error_modal( $error_args ); | |
| 426 | + return; | |
| 414 | 427 | } |
| 415 | 428 | |
| 416 | 429 | global $wpdb; |
| 417 | 430 | |
| @@ -486,9 +499,9 @@ | ||
| 486 | 499 | |
| 487 | 500 | $stored_actions = array(); |
| 488 | 501 | $action_priority = array(); |
| 489 | 502 | |
| 490 | - if ( in_array( $event, array( 'create', 'update' ) ) && defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { | |
| 503 | + if ( in_array( $event, array( 'create', 'update' ), true ) && defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { | |
| 491 | 504 | $this_event = 'import'; |
| 492 | 505 | } else { |
| 493 | 506 | $this_event = $event; |
| 494 | 507 | } |
| @@ -529,9 +542,9 @@ | ||
| 529 | 542 | $stored_actions[ $action->ID ] = $action; |
| 530 | 543 | $action_priority[ $action->ID ] = $link_settings[ $action->post_excerpt ]->action_options['priority']; |
| 531 | 544 | |
| 532 | 545 | unset( $action ); |
| 533 | - } | |
| 546 | + }//end foreach | |
| 534 | 547 | |
| 535 | 548 | if ( ! empty( $stored_actions ) ) { |
| 536 | 549 | asort( $action_priority ); |
| 537 | 550 | |
| @@ -543,9 +556,9 @@ | ||
| 543 | 556 | do_action( 'frm_trigger_' . $action->post_excerpt . '_action', $action, $entry, $form, $event ); |
| 544 | 557 | do_action( 'frm_trigger_' . $action->post_excerpt . '_' . $event . '_action', $action, $entry, $form ); |
| 545 | 558 | |
| 546 | 559 | // If post is created, get updated $entry object. |
| 547 | - if ( $action->post_excerpt == 'wppost' && $event == 'create' ) { | |
| 560 | + if ( $action->post_excerpt === 'wppost' && $event === 'create' ) { | |
| 548 | 561 | $entry = FrmEntry::getOne( $entry->id, true ); |
| 549 | 562 | } |
| 550 | 563 | } |
| 551 | 564 | } |
| @@ -551,9 +564,9 @@ | ||
| 551 | 564 | } |
| 552 | 565 | } |
| 553 | 566 | |
| 554 | 567 | public static function duplicate_form_actions( $form_id, $values, $args = array() ) { |
| 555 | - if ( ! isset( $args['old_id'] ) || empty( $args['old_id'] ) ) { | |
| 568 | + if ( empty( $args['old_id'] ) ) { | |
| 556 | 569 | // Continue if we know which actions to copy. |
| 557 | 570 | return; |
| 558 | 571 | } |
| 559 | 572 | |