@@ -16,10 +16,10 @@ |
||
| 16 | 16 | public static function get_currency( $currency ) { |
| 17 | 17 | $currency = strtoupper( $currency ); |
| 18 | 18 | $currencies = self::get_currencies(); |
| 19 | - if ( isset( $currencies[ $currency ] ) ) { |
|
| 20 | - $currency = $currencies[ $currency ]; |
|
| 21 | - } elseif ( isset( $currencies[ strtolower( $currency ) ] ) ) { |
|
| 22 | - $currency = $currencies[ strtolower( $currency ) ]; |
|
| 19 | + if ( isset( $currencies[$currency] ) ) { |
|
| 20 | + $currency = $currencies[$currency]; |
|
| 21 | + } elseif ( isset( $currencies[strtolower( $currency )] ) ) { |
|
| 22 | + $currency = $currencies[strtolower( $currency )]; |
|
| 23 | 23 | } else { |
| 24 | 24 | $currency = $currencies['USD']; |
| 25 | 25 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | 'page' => '', |
| 46 | 46 | 'class' => 'frm-mt-0', |
| 47 | 47 | ); |
| 48 | - $tip = array_merge( $defaults, $tip ); |
|
| 48 | + $tip = array_merge( $defaults, $tip ); |
|
| 49 | 49 | |
| 50 | 50 | if ( isset( $tip['link'] ) && ! isset( $tip['link']['medium'] ) ) { |
| 51 | 51 | $tip['link']['medium'] = 'tip'; |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | * @return array |
| 373 | 373 | */ |
| 374 | 374 | public static function get_banner_tip() { |
| 375 | - $tips = array( |
|
| 375 | + $tips = array( |
|
| 376 | 376 | array( |
| 377 | 377 | 'link' => array( |
| 378 | 378 | 'medium' => 'banner', |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | ), |
| 400 | 400 | ); |
| 401 | 401 | $random = rand( 0, count( $tips ) - 1 ); |
| 402 | - $tip = $tips[ $random ]; |
|
| 402 | + $tip = $tips[$random]; |
|
| 403 | 403 | $tip['num'] = $random; |
| 404 | 404 | |
| 405 | 405 | return $tip; |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | public static function get_random_tip( $tips ) { |
| 409 | 409 | $random = rand( 0, count( $tips ) - 1 ); |
| 410 | 410 | |
| 411 | - return $tips[ $random ]; |
|
| 411 | + return $tips[$random]; |
|
| 412 | 412 | } |
| 413 | 413 | |
| 414 | 414 | /** |
@@ -126,11 +126,11 @@ |
||
| 126 | 126 | foreach ( $payments as $payment ) { |
| 127 | 127 | list( $amount, $currency ) = FrmTransLiteAppHelper::get_amount_and_currency_from_payment( $payment ); |
| 128 | 128 | |
| 129 | - if ( ! isset( $data[ $currency ] ) ) { |
|
| 130 | - $data[ $currency ] = 0; |
|
| 129 | + if ( ! isset( $data[$currency] ) ) { |
|
| 130 | + $data[$currency] = 0; |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | - $data[ $currency ] += floatval( $amount ); |
|
| 133 | + $data[$currency] += floatval( $amount ); |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | return $data; |
@@ -236,11 +236,11 @@ discard block |
||
| 236 | 236 | */ |
| 237 | 237 | public static function get_last_sent_date( $type ) { |
| 238 | 238 | $options = self::get_options(); |
| 239 | - if ( empty( $options[ 'last_' . $type ] ) ) { |
|
| 239 | + if ( empty( $options['last_' . $type] ) ) { |
|
| 240 | 240 | return false; |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | - return $options[ 'last_' . $type ]; |
|
| 243 | + return $options['last_' . $type]; |
|
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | /** |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | public static function set_last_sent_date( $type, $value = null ) { |
| 253 | 253 | $options = self::get_options(); |
| 254 | 254 | |
| 255 | - $options[ 'last_' . $type ] = null === $value ? self::get_date_from_today() : ''; |
|
| 255 | + $options['last_' . $type] = null === $value ? self::get_date_from_today() : ''; |
|
| 256 | 256 | self::save_options( $options ); |
| 257 | 257 | } |
| 258 | 258 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | 'user_id' => get_current_user_id(), |
| 109 | 109 | 'frm_strp_connect_mode' => $mode, |
| 110 | 110 | ); |
| 111 | - $data = self::post_to_connect_server( 'initialize', $additional_body ); |
|
| 111 | + $data = self::post_to_connect_server( 'initialize', $additional_body ); |
|
| 112 | 112 | |
| 113 | 113 | if ( is_string( $data ) ) { |
| 114 | 114 | return $data; |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | * @return object|string |
| 144 | 144 | */ |
| 145 | 145 | private static function post_to_connect_server( $action, $additional_body = array() ) { |
| 146 | - $body = array( |
|
| 146 | + $body = array( |
|
| 147 | 147 | 'frm_strp_connect_action' => $action, |
| 148 | 148 | 'frm_strp_connect_mode' => FrmStrpLiteAppHelper::active_mode(), |
| 149 | 149 | ); |
@@ -87,6 +87,6 @@ |
||
| 87 | 87 | |
| 88 | 88 | ?></div> |
| 89 | 89 | <?php |
| 90 | - ++$option_index; |
|
| 90 | + ++ $option_index; |
|
| 91 | 91 | }//end foreach |
| 92 | 92 | }//end if |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $sub_field_class = "frm_form_field form-field frm_form_subfield-{$name} {$sub_field['wrapper_classes']}"; |
| 42 | 42 | $sub_field_desc = FrmField::get_option( $field, $name . '_desc' ); |
| 43 | 43 | |
| 44 | - if ( isset( $errors[ 'field' . $field_id . '-' . $name ] ) ) { |
|
| 44 | + if ( isset( $errors['field' . $field_id . '-' . $name] ) ) { |
|
| 45 | 45 | $sub_field_class .= ' frm_blank_field'; |
| 46 | 46 | } |
| 47 | 47 | ?> |
@@ -61,10 +61,10 @@ discard block |
||
| 61 | 61 | <input |
| 62 | 62 | type="<?php echo esc_attr( $sub_field['type'] ); ?>" |
| 63 | 63 | id="<?php echo esc_attr( $html_id . '_' . $name ); ?>" |
| 64 | - value="<?php echo esc_attr( isset( $field_value[ $name ] ) ? $field_value[ $name ] : '' ); ?>" |
|
| 64 | + value="<?php echo esc_attr( isset( $field_value[$name] ) ? $field_value[$name] : '' ); ?>" |
|
| 65 | 65 | <?php |
| 66 | - if ( ! empty( $field_value[ $name ] ) ) { |
|
| 67 | - echo 'data-frmval="' . esc_attr( $field_value[ $name ] ) . '" '; |
|
| 66 | + if ( ! empty( $field_value[$name] ) ) { |
|
| 67 | + echo 'data-frmval="' . esc_attr( $field_value[$name] ) . '" '; |
|
| 68 | 68 | } |
| 69 | 69 | if ( empty( $args['remove_names'] ) ) { |
| 70 | 70 | echo 'name="' . esc_attr( $field_name ) . '[' . esc_attr( $name ) . ']" '; |
@@ -81,9 +81,9 @@ discard block |
||
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | // Don't show individual field errors when there is a combo field error. |
| 84 | - if ( ! empty( $errors ) && isset( $errors[ 'field' . $field_id . '-' . $name ] ) && ! isset( $errors[ 'field' . $field_id ] ) ) { |
|
| 84 | + if ( ! empty( $errors ) && isset( $errors['field' . $field_id . '-' . $name] ) && ! isset( $errors['field' . $field_id] ) ) { |
|
| 85 | 85 | ?> |
| 86 | - <div class="frm_error" role="alert"><?php echo esc_html( $errors[ 'field' . $field_id . '-' . $name ] ); ?></div> |
|
| 86 | + <div class="frm_error" role="alert"><?php echo esc_html( $errors['field' . $field_id . '-' . $name] ); ?></div> |
|
| 87 | 87 | <?php } ?> |
| 88 | 88 | </div> |
| 89 | 89 | <?php |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $section['function'] = $original; |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - $sections[ $key ] = $section; |
|
| 161 | + $sections[$key] = $section; |
|
| 162 | 162 | }//end foreach |
| 163 | 163 | |
| 164 | 164 | return $sections; |
@@ -170,11 +170,11 @@ discard block |
||
| 170 | 170 | |
| 171 | 171 | $section = FrmAppHelper::get_post_param( 'tab', '', 'sanitize_text_field' ); |
| 172 | 172 | $sections = self::get_settings_tabs(); |
| 173 | - if ( ! isset( $sections[ $section ] ) ) { |
|
| 173 | + if ( ! isset( $sections[$section] ) ) { |
|
| 174 | 174 | wp_die(); |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - $section = $sections[ $section ]; |
|
| 177 | + $section = $sections[$section]; |
|
| 178 | 178 | |
| 179 | 179 | if ( isset( $section['class'] ) ) { |
| 180 | 180 | call_user_func( array( $section['class'], $section['function'] ) ); |
@@ -1616,7 +1616,8 @@ discard block |
||
| 1616 | 1616 | $vars = array(); |
| 1617 | 1617 | FrmAppHelper::include_svg(); |
| 1618 | 1618 | |
| 1619 | - if ( isset( $_POST['frm_compact_fields'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1619 | + if ( isset( $_POST['frm_compact_fields'] ) ) { |
|
| 1620 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 1620 | 1621 | FrmAppHelper::permission_check( 'frm_edit_forms' ); |
| 1621 | 1622 | |
| 1622 | 1623 | // Javascript needs to be allowed in some field settings. |
@@ -2046,7 +2047,8 @@ discard block |
||
| 2046 | 2047 | private static function get_saved_errors( $form, $params ) { |
| 2047 | 2048 | global $frm_vars; |
| 2048 | 2049 | |
| 2049 | - if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 2050 | + if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) { |
|
| 2051 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 2050 | 2052 | $errors = $frm_vars['created_entries'][ $form->id ]['errors']; |
| 2051 | 2053 | } else { |
| 2052 | 2054 | $errors = array(); |
@@ -637,7 +637,7 @@ discard block |
||
| 637 | 637 | * @param string|null $src |
| 638 | 638 | * @return string |
| 639 | 639 | */ |
| 640 | - function ( $src ) { |
|
| 640 | + function( $src ) { |
|
| 641 | 641 | if ( is_null( $src ) ) { |
| 642 | 642 | $src = ''; |
| 643 | 643 | } |
@@ -702,11 +702,11 @@ discard block |
||
| 702 | 702 | ), |
| 703 | 703 | ); |
| 704 | 704 | |
| 705 | - if ( ! isset( $available_status[ $status ] ) ) { |
|
| 705 | + if ( ! isset( $available_status[$status] ) ) { |
|
| 706 | 706 | return; |
| 707 | 707 | } |
| 708 | 708 | |
| 709 | - FrmAppHelper::permission_check( $available_status[ $status ]['permission'] ); |
|
| 709 | + FrmAppHelper::permission_check( $available_status[$status]['permission'] ); |
|
| 710 | 710 | |
| 711 | 711 | $params = FrmForm::list_page_params(); |
| 712 | 712 | |
@@ -714,8 +714,8 @@ discard block |
||
| 714 | 714 | check_admin_referer( $status . '_form_' . $params['id'] ); |
| 715 | 715 | |
| 716 | 716 | $count = 0; |
| 717 | - if ( FrmForm::set_status( $params['id'], $available_status[ $status ]['new_status'] ) ) { |
|
| 718 | - ++$count; |
|
| 717 | + if ( FrmForm::set_status( $params['id'], $available_status[$status]['new_status'] ) ) { |
|
| 718 | + ++ $count; |
|
| 719 | 719 | } |
| 720 | 720 | |
| 721 | 721 | $form_type = FrmAppHelper::get_simple_request( |
@@ -731,7 +731,7 @@ discard block |
||
| 731 | 731 | /* translators: %1$s: Number of forms, %2$s: Start link HTML, %3$s: End link HTML */ |
| 732 | 732 | $available_status['trash']['message'] = sprintf( _n( '%1$s form moved to the Trash. %2$sUndo%3$s', '%1$s forms moved to the Trash. %2$sUndo%3$s', $count, 'formidable' ), $count, '<a href="' . esc_url( wp_nonce_url( '?page=formidable&frm_action=untrash&form_type=' . $form_type . '&id=' . $params['id'], 'untrash_form_' . $params['id'] ) ) . '">', '</a>' ); |
| 733 | 733 | |
| 734 | - $message = $available_status[ $status ]['message']; |
|
| 734 | + $message = $available_status[$status]['message']; |
|
| 735 | 735 | |
| 736 | 736 | self::display_forms_list( $params, $message ); |
| 737 | 737 | } |
@@ -746,7 +746,7 @@ discard block |
||
| 746 | 746 | $count = 0; |
| 747 | 747 | foreach ( $ids as $id ) { |
| 748 | 748 | if ( FrmForm::trash( $id ) ) { |
| 749 | - ++$count; |
|
| 749 | + ++ $count; |
|
| 750 | 750 | } |
| 751 | 751 | } |
| 752 | 752 | |
@@ -756,7 +756,7 @@ discard block |
||
| 756 | 756 | 'type' => 'request', |
| 757 | 757 | ) |
| 758 | 758 | ); |
| 759 | - $message = sprintf( |
|
| 759 | + $message = sprintf( |
|
| 760 | 760 | /* translators: %1$s: Number of forms, %2$s: Start link HTML, %3$s: End link HTML */ |
| 761 | 761 | _n( '%1$s form moved to the Trash. %2$sUndo%3$s', '%1$s forms moved to the Trash. %2$sUndo%3$s', $count, 'formidable' ), |
| 762 | 762 | $count, |
@@ -777,7 +777,7 @@ discard block |
||
| 777 | 777 | |
| 778 | 778 | $count = 0; |
| 779 | 779 | if ( FrmForm::destroy( $params['id'] ) ) { |
| 780 | - ++$count; |
|
| 780 | + ++ $count; |
|
| 781 | 781 | } |
| 782 | 782 | |
| 783 | 783 | /* translators: %1$s: Number of forms */ |
@@ -797,7 +797,7 @@ discard block |
||
| 797 | 797 | foreach ( $ids as $id ) { |
| 798 | 798 | $d = FrmForm::destroy( $id ); |
| 799 | 799 | if ( $d ) { |
| 800 | - ++$count; |
|
| 800 | + ++ $count; |
|
| 801 | 801 | } |
| 802 | 802 | } |
| 803 | 803 | |
@@ -1286,7 +1286,7 @@ discard block |
||
| 1286 | 1286 | |
| 1287 | 1287 | add_action( |
| 1288 | 1288 | 'wp_enqueue_editor', |
| 1289 | - function () { |
|
| 1289 | + function() { |
|
| 1290 | 1290 | wp_print_media_templates(); |
| 1291 | 1291 | } |
| 1292 | 1292 | ); |
@@ -1391,7 +1391,7 @@ discard block |
||
| 1391 | 1391 | |
| 1392 | 1392 | foreach ( array( 'landing', 'chat', 'abandonment' ) as $feature ) { |
| 1393 | 1393 | if ( ! FrmAppHelper::show_new_feature( $feature ) ) { |
| 1394 | - unset( $sections[ $feature ] ); |
|
| 1394 | + unset( $sections[$feature] ); |
|
| 1395 | 1395 | } |
| 1396 | 1396 | } |
| 1397 | 1397 | |
@@ -1419,7 +1419,7 @@ discard block |
||
| 1419 | 1419 | $section['id'] = $section['anchor']; |
| 1420 | 1420 | } |
| 1421 | 1421 | |
| 1422 | - $sections[ $key ] = $section; |
|
| 1422 | + $sections[$key] = $section; |
|
| 1423 | 1423 | }//end foreach |
| 1424 | 1424 | |
| 1425 | 1425 | return $sections; |
@@ -1542,7 +1542,7 @@ discard block |
||
| 1542 | 1542 | if ( $user_fields ) { |
| 1543 | 1543 | $user_helpers = array(); |
| 1544 | 1544 | foreach ( $user_fields as $uk => $uf ) { |
| 1545 | - $user_helpers[ '|user_id| show="' . $uk . '"' ] = $uf; |
|
| 1545 | + $user_helpers['|user_id| show="' . $uk . '"'] = $uf; |
|
| 1546 | 1546 | unset( $uk, $uf ); |
| 1547 | 1547 | } |
| 1548 | 1548 | |
@@ -1681,7 +1681,7 @@ discard block |
||
| 1681 | 1681 | if ( ! isset( $frm_vars['js_validate_forms'] ) ) { |
| 1682 | 1682 | $frm_vars['js_validate_forms'] = array(); |
| 1683 | 1683 | } |
| 1684 | - $frm_vars['js_validate_forms'][ $form->id ] = $form; |
|
| 1684 | + $frm_vars['js_validate_forms'][$form->id] = $form; |
|
| 1685 | 1685 | } |
| 1686 | 1686 | |
| 1687 | 1687 | public static function get_email_html() { |
@@ -1844,7 +1844,7 @@ discard block |
||
| 1844 | 1844 | add_filter( 'frm_validate_form', 'FrmFormsController::json_error' ); |
| 1845 | 1845 | } else { |
| 1846 | 1846 | $vars = FrmAppHelper::json_to_array( $json_vars ); |
| 1847 | - $action = $vars[ $action ]; |
|
| 1847 | + $action = $vars[$action]; |
|
| 1848 | 1848 | unset( $_REQUEST['frm_compact_fields'], $_POST['frm_compact_fields'] ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
| 1849 | 1849 | $_REQUEST = array_merge( $_REQUEST, $vars ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
| 1850 | 1850 | $_POST = array_merge( $_POST, $_REQUEST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
@@ -2010,7 +2010,7 @@ discard block |
||
| 2010 | 2010 | $actions = array(); |
| 2011 | 2011 | foreach ( $frm_vars['forms_loaded'] as $form ) { |
| 2012 | 2012 | if ( is_object( $form ) ) { |
| 2013 | - $actions[ $form->id ] = $form->name; |
|
| 2013 | + $actions[$form->id] = $form->name; |
|
| 2014 | 2014 | } |
| 2015 | 2015 | unset( $form ); |
| 2016 | 2016 | } |
@@ -2255,8 +2255,8 @@ discard block |
||
| 2255 | 2255 | private static function get_saved_errors( $form, $params ) { |
| 2256 | 2256 | global $frm_vars; |
| 2257 | 2257 | |
| 2258 | - if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][ $form->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 2259 | - $errors = $frm_vars['created_entries'][ $form->id ]['errors']; |
|
| 2258 | + if ( $params['posted_form_id'] == $form->id && $_POST && isset( $frm_vars['created_entries'][$form->id] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
| 2259 | + $errors = $frm_vars['created_entries'][$form->id]['errors']; |
|
| 2260 | 2260 | } else { |
| 2261 | 2261 | $errors = array(); |
| 2262 | 2262 | } |
@@ -2278,7 +2278,7 @@ discard block |
||
| 2278 | 2278 | public static function just_created_entry( $form_id ) { |
| 2279 | 2279 | global $frm_vars; |
| 2280 | 2280 | |
| 2281 | - return isset( $frm_vars['created_entries'] ) && isset( $frm_vars['created_entries'][ $form_id ] ) && isset( $frm_vars['created_entries'][ $form_id ]['entry_id'] ) ? $frm_vars['created_entries'][ $form_id ]['entry_id'] : 0; |
|
| 2281 | + return isset( $frm_vars['created_entries'] ) && isset( $frm_vars['created_entries'][$form_id] ) && isset( $frm_vars['created_entries'][$form_id]['entry_id'] ) ? $frm_vars['created_entries'][$form_id]['entry_id'] : 0; |
|
| 2282 | 2282 | } |
| 2283 | 2283 | |
| 2284 | 2284 | /** |
@@ -2298,7 +2298,7 @@ discard block |
||
| 2298 | 2298 | private static function get_confirmation_method( $atts ) { |
| 2299 | 2299 | $action = FrmOnSubmitHelper::current_event( $atts ); |
| 2300 | 2300 | $opt = 'update' === $action ? 'edit_action' : 'success_action'; |
| 2301 | - $method = ! empty( $atts['form']->options[ $opt ] ) ? $atts['form']->options[ $opt ] : 'message'; |
|
| 2301 | + $method = ! empty( $atts['form']->options[$opt] ) ? $atts['form']->options[$opt] : 'message'; |
|
| 2302 | 2302 | |
| 2303 | 2303 | if ( ! empty( $atts['entry_id'] ) ) { |
| 2304 | 2304 | $met_actions = self::get_met_on_submit_actions( $atts, $action ); |
@@ -2319,7 +2319,7 @@ discard block |
||
| 2319 | 2319 | public static function maybe_trigger_redirect( $form, $params, $args ) { |
| 2320 | 2320 | if ( ! isset( $params['id'] ) ) { |
| 2321 | 2321 | global $frm_vars; |
| 2322 | - $params['id'] = $frm_vars['created_entries'][ $form->id ]['entry_id']; |
|
| 2322 | + $params['id'] = $frm_vars['created_entries'][$form->id]['entry_id']; |
|
| 2323 | 2323 | } |
| 2324 | 2324 | |
| 2325 | 2325 | $conf_method = self::get_confirmation_method( |
@@ -2401,7 +2401,7 @@ discard block |
||
| 2401 | 2401 | $args['success_opt'] = $opt; |
| 2402 | 2402 | $args['ajax'] = ! empty( $frm_vars['ajax'] ); |
| 2403 | 2403 | |
| 2404 | - if ( $args['conf_method'] === 'page' && is_numeric( $args['form']->options[ $opt . '_page_id' ] ) ) { |
|
| 2404 | + if ( $args['conf_method'] === 'page' && is_numeric( $args['form']->options[$opt . '_page_id'] ) ) { |
|
| 2405 | 2405 | self::load_page_after_submit( $args ); |
| 2406 | 2406 | } elseif ( $args['conf_method'] === 'redirect' ) { |
| 2407 | 2407 | self::redirect_after_submit( $args ); |
@@ -2425,7 +2425,7 @@ discard block |
||
| 2425 | 2425 | } |
| 2426 | 2426 | |
| 2427 | 2427 | // If a redirect action has already opened the URL in a new tab, we show the default message in the currect tab. |
| 2428 | - if ( ! empty( self::$redirected_in_new_tab[ $args['form']->id ] ) ) { |
|
| 2428 | + if ( ! empty( self::$redirected_in_new_tab[$args['form']->id] ) ) { |
|
| 2429 | 2429 | return array( FrmOnSubmitHelper::get_fallback_action_after_open_in_new_tab( $event ) ); |
| 2430 | 2430 | } |
| 2431 | 2431 | |
@@ -2613,7 +2613,7 @@ discard block |
||
| 2613 | 2613 | |
| 2614 | 2614 | $opt = 'update' === $args['action'] ? 'edit_' : 'success_'; |
| 2615 | 2615 | |
| 2616 | - $new_args['conf_method'] = $new_args['form']->options[ $opt . 'action' ]; |
|
| 2616 | + $new_args['conf_method'] = $new_args['form']->options[$opt . 'action']; |
|
| 2617 | 2617 | |
| 2618 | 2618 | /** |
| 2619 | 2619 | * Filters the run success action args. |
@@ -2633,8 +2633,8 @@ discard block |
||
| 2633 | 2633 | private static function load_page_after_submit( $args ) { |
| 2634 | 2634 | global $post; |
| 2635 | 2635 | $opt = $args['success_opt']; |
| 2636 | - if ( ! $post || $args['form']->options[ $opt . '_page_id' ] != $post->ID ) { |
|
| 2637 | - $page = get_post( $args['form']->options[ $opt . '_page_id' ] ); |
|
| 2636 | + if ( ! $post || $args['form']->options[$opt . '_page_id'] != $post->ID ) { |
|
| 2637 | + $page = get_post( $args['form']->options[$opt . '_page_id'] ); |
|
| 2638 | 2638 | $old_post = $post; |
| 2639 | 2639 | $post = $page; |
| 2640 | 2640 | $content = apply_filters( 'frm_content', $page->post_content, $args['form'], $args['entry_id'] ); |
@@ -2664,7 +2664,7 @@ discard block |
||
| 2664 | 2664 | add_filter( 'frm_use_wpautop', '__return_false' ); |
| 2665 | 2665 | |
| 2666 | 2666 | $opt = $args['success_opt']; |
| 2667 | - $success_url = trim( $args['form']->options[ $opt . '_url' ] ); |
|
| 2667 | + $success_url = trim( $args['form']->options[$opt . '_url'] ); |
|
| 2668 | 2668 | $success_url = apply_filters( 'frm_content', $success_url, $args['form'], $args['entry_id'] ); |
| 2669 | 2669 | $success_url = do_shortcode( $success_url ); |
| 2670 | 2670 | |
@@ -2686,7 +2686,7 @@ discard block |
||
| 2686 | 2686 | // Not AJAX submit, no headers sent, and there is just one Redirect action runs. |
| 2687 | 2687 | if ( ! empty( $args['form']->options['open_in_new_tab'] ) ) { |
| 2688 | 2688 | self::print_open_in_new_tab_js_with_fallback_handler( $success_url, $args ); |
| 2689 | - self::$redirected_in_new_tab[ $args['form']->id ] = 1; |
|
| 2689 | + self::$redirected_in_new_tab[$args['form']->id] = 1; |
|
| 2690 | 2690 | return; |
| 2691 | 2691 | } |
| 2692 | 2692 | |
@@ -2946,7 +2946,7 @@ discard block |
||
| 2946 | 2946 | 'description' => false, |
| 2947 | 2947 | 'reset' => false, |
| 2948 | 2948 | ); |
| 2949 | - $args = wp_parse_args( $args, $defaults ); |
|
| 2949 | + $args = wp_parse_args( $args, $defaults ); |
|
| 2950 | 2950 | } |
| 2951 | 2951 | |
| 2952 | 2952 | /** |
@@ -2984,7 +2984,7 @@ discard block |
||
| 2984 | 2984 | $opt = isset( $args['success_opt'] ) ? $args['success_opt'] : 'success'; |
| 2985 | 2985 | |
| 2986 | 2986 | if ( $entry_id && is_numeric( $entry_id ) ) { |
| 2987 | - $message = isset( $form->options[ $opt . '_msg' ] ) ? $form->options[ $opt . '_msg' ] : $frm_settings->success_msg; |
|
| 2987 | + $message = isset( $form->options[$opt . '_msg'] ) ? $form->options[$opt . '_msg'] : $frm_settings->success_msg; |
|
| 2988 | 2988 | $class = 'frm_message'; |
| 2989 | 2989 | } else { |
| 2990 | 2990 | $message = $frm_settings->failed_msg; |
@@ -3207,8 +3207,8 @@ discard block |
||
| 3207 | 3207 | |
| 3208 | 3208 | check_ajax_referer( 'frm_ajax', 'nonce' ); |
| 3209 | 3209 | |
| 3210 | - $html = FrmAppHelper::clip( |
|
| 3211 | - function () { |
|
| 3210 | + $html = FrmAppHelper::clip( |
|
| 3211 | + function() { |
|
| 3212 | 3212 | FrmAppHelper::maybe_autocomplete_pages_options( |
| 3213 | 3213 | array( |
| 3214 | 3214 | 'field_name' => 'frm_page_dropdown', |