@@ -274,7 +274,7 @@ |
||
| 274 | 274 | return ''; |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | - return $item_meta[ $field_id ] ?? ''; |
|
| 277 | + return $item_meta[$field_id] ?? ''; |
|
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | /** |
@@ -40,6 +40,6 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | public function get_video( $type = 'welcome' ) { |
| 42 | 42 | $videos = $this->get_api_info(); |
| 43 | - return $videos[ $type ] ?? array(); |
|
| 43 | + return $videos[$type] ?? array(); |
|
| 44 | 44 | } |
| 45 | 45 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | wp_enqueue_script( 'formidable_settings' ); |
| 29 | 29 | return FrmAppHelper::clip( |
| 30 | 30 | // @phpstan-ignore-next-line |
| 31 | - function () use ( $id, $name, $args ) { |
|
| 31 | + function() use ( $id, $name, $args ) { |
|
| 32 | 32 | require FrmAppHelper::plugin_path() . '/classes/views/shared/toggle.php'; |
| 33 | 33 | }, |
| 34 | 34 | $args['echo'] ?? false |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - $input_number_attrs = array_merge( |
|
| 100 | + $input_number_attrs = array_merge( |
|
| 101 | 101 | $args['input_number_attrs'], |
| 102 | 102 | array( |
| 103 | 103 | 'type' => ! empty( $selected_unit ) ? 'number' : 'text', |
@@ -1334,11 +1334,11 @@ discard block |
||
| 1334 | 1334 | wp_set_script_translations( 's11-floating-links-config', 's11-' ); |
| 1335 | 1335 | } |
| 1336 | 1336 | |
| 1337 | - $upgrade_utm = array( |
|
| 1337 | + $upgrade_utm = array( |
|
| 1338 | 1338 | 'campaign' => 'floating-links', |
| 1339 | 1339 | 'content' => 'floating-links-upgrade', |
| 1340 | 1340 | ); |
| 1341 | - $docs_utm = array( |
|
| 1341 | + $docs_utm = array( |
|
| 1342 | 1342 | 'campaign' => 'floating-links', |
| 1343 | 1343 | 'content' => 'floating-links-docs', |
| 1344 | 1344 | ); |
@@ -1412,15 +1412,15 @@ discard block |
||
| 1412 | 1412 | global $wp_filter; |
| 1413 | 1413 | |
| 1414 | 1414 | foreach ( $actions as $action ) { |
| 1415 | - if ( empty( $wp_filter[ $action ]->callbacks ) ) { |
|
| 1415 | + if ( empty( $wp_filter[$action]->callbacks ) ) { |
|
| 1416 | 1416 | continue; |
| 1417 | 1417 | } |
| 1418 | - foreach ( $wp_filter[ $action ]->callbacks as $priority => $callbacks ) { |
|
| 1418 | + foreach ( $wp_filter[$action]->callbacks as $priority => $callbacks ) { |
|
| 1419 | 1419 | foreach ( $callbacks as $callback_name => $callback ) { |
| 1420 | 1420 | if ( self::is_our_callback_string( $callback_name ) || self::is_our_callback_array( $callback ) ) { |
| 1421 | 1421 | continue; |
| 1422 | 1422 | } |
| 1423 | - unset( $wp_filter[ $action ]->callbacks[ $priority ][ $callback_name ] ); |
|
| 1423 | + unset( $wp_filter[$action]->callbacks[$priority][$callback_name] ); |
|
| 1424 | 1424 | } |
| 1425 | 1425 | } |
| 1426 | 1426 | } |
@@ -1458,8 +1458,8 @@ discard block |
||
| 1458 | 1458 | $current_sort = $previous_meta; |
| 1459 | 1459 | $form_id = $is_entry_list ? FrmAppHelper::simple_get( 'form', 'absint' ) : 0; |
| 1460 | 1460 | |
| 1461 | - if ( is_array( $current_sort ) && $form_id && is_int( $form_id ) && isset( $current_sort[ $form_id ] ) ) { |
|
| 1462 | - $current_sort = $current_sort[ $form_id ]; |
|
| 1461 | + if ( is_array( $current_sort ) && $form_id && is_int( $form_id ) && isset( $current_sort[$form_id] ) ) { |
|
| 1462 | + $current_sort = $current_sort[$form_id]; |
|
| 1463 | 1463 | } |
| 1464 | 1464 | |
| 1465 | 1465 | if ( $new_sort !== $current_sort ) { |
@@ -1468,7 +1468,7 @@ discard block |
||
| 1468 | 1468 | if ( $is_entry_list && $form_id && is_int( $form_id ) ) { |
| 1469 | 1469 | // Index meta by form ID. |
| 1470 | 1470 | $temp_meta = is_array( $previous_meta ) ? $previous_meta : array(); |
| 1471 | - $temp_meta[ $form_id ] = $new_meta; |
|
| 1471 | + $temp_meta[$form_id] = $new_meta; |
|
| 1472 | 1472 | $new_meta = $temp_meta; |
| 1473 | 1473 | unset( $temp_meta ); |
| 1474 | 1474 | } |
@@ -1496,8 +1496,8 @@ discard block |
||
| 1496 | 1496 | $preferred_list_sort = get_user_meta( $user_id, $meta_key, true ); |
| 1497 | 1497 | $form_id = FrmAppHelper::simple_get( 'form', 'absint' ); |
| 1498 | 1498 | |
| 1499 | - if ( is_array( $preferred_list_sort ) && $form_id && is_int( $form_id ) && isset( $preferred_list_sort[ $form_id ] ) ) { |
|
| 1500 | - $preferred_list_sort = $preferred_list_sort[ $form_id ]; |
|
| 1499 | + if ( is_array( $preferred_list_sort ) && $form_id && is_int( $form_id ) && isset( $preferred_list_sort[$form_id] ) ) { |
|
| 1500 | + $preferred_list_sort = $preferred_list_sort[$form_id]; |
|
| 1501 | 1501 | } |
| 1502 | 1502 | |
| 1503 | 1503 | if ( is_array( $preferred_list_sort ) && ! empty( $preferred_list_sort['orderby'] ) ) { |
@@ -14,7 +14,10 @@ |
||
| 14 | 14 | ); |
| 15 | 15 | ?> |
| 16 | 16 | Please <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( $utm, 'account/downloads/' ) ); ?>">renew now</a> to get the latest version. |
| 17 | - <?php else : ?> |
|
| 18 | - Please <a href="<?php echo esc_url( admin_url( 'plugins.php?s=formidable%20forms%20pro' ) ); ?>">update now</a>. |
|
| 17 | + <?php else { |
|
| 18 | + : ?> |
|
| 19 | + Please <a href="<?php echo esc_url( admin_url( 'plugins.php?s=formidable%20forms%20pro' ) ); |
|
| 20 | +} |
|
| 21 | +?>">update now</a>. |
|
| 19 | 22 | <?php endif; ?> |
| 20 | 23 | </div> |
@@ -28,8 +28,11 @@ |
||
| 28 | 28 | <div class="<?php echo esc_attr( $classes ); ?>"> |
| 29 | 29 | <?php if ( $is_active ) : ?> |
| 30 | 30 | <?php echo esc_html( $details['label'] ); ?> |
| 31 | - <?php else : ?> |
|
| 32 | - <a href="<?php echo esc_url( $details['url'] ); ?>"> |
|
| 31 | + <?php else { |
|
| 32 | + : ?> |
|
| 33 | + <a href="<?php echo esc_url( $details['url'] ); |
|
| 34 | +} |
|
| 35 | +?>"> |
|
| 33 | 36 | <?php echo esc_html( $details['label'] ); ?> |
| 34 | 37 | </a> |
| 35 | 38 | <?php endif; ?> |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | $active_step = 0; |
| 119 | 119 | |
| 120 | 120 | foreach ( $step_keys as $index => $step_key ) { |
| 121 | - $completed_step = isset( self::$checklist['completed_steps'][ $step_key ] ); |
|
| 121 | + $completed_step = isset( self::$checklist['completed_steps'][$step_key] ); |
|
| 122 | 122 | |
| 123 | 123 | if ( false === $completed_step ) { |
| 124 | 124 | switch ( $step_key ) { |
@@ -132,15 +132,15 @@ discard block |
||
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | if ( $completed_step ) { |
| 135 | - self::$checklist['completed_steps'][ $step_key ] = true; |
|
| 135 | + self::$checklist['completed_steps'][$step_key] = true; |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | // Count completed steps from start until gap found. |
| 139 | 139 | if ( $completed_step && $index === $active_step ) { |
| 140 | - $active_step++; |
|
| 140 | + $active_step ++; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | - self::$steps['steps'][ $index ]['completed'] = $completed_step; |
|
| 143 | + self::$steps['steps'][$index]['completed'] = $completed_step; |
|
| 144 | 144 | }//end foreach |
| 145 | 145 | |
| 146 | 146 | self::$checklist['active_step'] = $active_step; |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | self::$checklist['done'] = true; |
| 150 | 150 | self::$checklist['active_step_key'] = 'completed'; |
| 151 | 151 | } else { |
| 152 | - self::$checklist['active_step_key'] = $step_keys[ $active_step ]; |
|
| 152 | + self::$checklist['active_step_key'] = $step_keys[$active_step]; |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | self::save_checklist(); |
@@ -199,8 +199,8 @@ discard block |
||
| 199 | 199 | */ |
| 200 | 200 | private static function fill_step_completed_data( $steps, $steps_keys ) { |
| 201 | 201 | return array_map( |
| 202 | - function ( $step, $step_key ) { |
|
| 203 | - $step['completed'] = isset( self::$checklist['completed_steps'][ $step_key ] ); |
|
| 202 | + function( $step, $step_key ) { |
|
| 203 | + $step['completed'] = isset( self::$checklist['completed_steps'][$step_key] ); |
|
| 204 | 204 | return $step; |
| 205 | 205 | }, |
| 206 | 206 | $steps, |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | 'target' => '#frm_style_sidebar .frm-style-card > div', |
| 235 | 235 | 'left-position' => 'end', |
| 236 | 236 | 'offset' => array( |
| 237 | - 'top' => -22, |
|
| 237 | + 'top' => - 22, |
|
| 238 | 238 | 'left' => 16, |
| 239 | 239 | ), |
| 240 | 240 | ); |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | break; |
| 251 | 251 | }//end switch |
| 252 | 252 | |
| 253 | - return array_merge( self::$steps['steps'][ self::$checklist['active_step'] ], $spotlight_data ); |
|
| 253 | + return array_merge( self::$steps['steps'][self::$checklist['active_step']], $spotlight_data ); |
|
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | /** |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | } |
| 378 | 378 | |
| 379 | 379 | self::$checklist = self::get_checklist(); |
| 380 | - self::$checklist['completed_steps'][ $step_key ] = true; |
|
| 380 | + self::$checklist['completed_steps'][$step_key] = true; |
|
| 381 | 381 | self::save_checklist(); |
| 382 | 382 | |
| 383 | 383 | wp_send_json_success(); |
@@ -591,7 +591,7 @@ discard block |
||
| 591 | 591 | $steps = self::get_steps(); |
| 592 | 592 | |
| 593 | 593 | foreach ( $steps as $key => $step ) { |
| 594 | - $usage_data[ 'completed_step_' . $key ] = empty( $option['completed_steps'][ $key ] ) ? 0 : 1; |
|
| 594 | + $usage_data['completed_step_' . $key] = empty( $option['completed_steps'][$key] ) ? 0 : 1; |
|
| 595 | 595 | } |
| 596 | 596 | |
| 597 | 597 | $usage_data['done'] = empty( $option['done'] ) ? 0 : 1; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | 'payments' => $frm_payment->get_count(), |
| 124 | 124 | 'subscriptions' => $frm_sub->get_count(), |
| 125 | 125 | ); |
| 126 | - $type = FrmAppHelper::get_simple_request( |
|
| 126 | + $type = FrmAppHelper::get_simple_request( |
|
| 127 | 127 | array( |
| 128 | 128 | 'param' => 'trans_type', |
| 129 | 129 | 'type' => 'request', |
@@ -138,10 +138,10 @@ discard block |
||
| 138 | 138 | $class = ''; |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | - if ( $counts[ $status ] || 'published' === $status ) { |
|
| 142 | - $links[ $status ] = '<a href="' . esc_url( '?page=formidable-payments&trans_type=' . $status ) . '" ' . $class . '>' |
|
| 141 | + if ( $counts[$status] || 'published' === $status ) { |
|
| 142 | + $links[$status] = '<a href="' . esc_url( '?page=formidable-payments&trans_type=' . $status ) . '" ' . $class . '>' |
|
| 143 | 143 | // translators: %1$s: Transaction type (Payments or Subscriptions), %2$s: Span start tag, %3$s: Count, %4$s: Span close tag. |
| 144 | - . sprintf( esc_html__( '%1$s %2$s(%3$s)%4$s', 'formidable' ), esc_html( $name ), '<span class="count">', number_format_i18n( $counts[ $status ] ), '</span>' ) |
|
| 144 | + . sprintf( esc_html__( '%1$s %2$s(%3$s)%4$s', 'formidable' ), esc_html( $name ), '<span class="count">', number_format_i18n( $counts[$status] ), '</span>' ) |
|
| 145 | 145 | . '</a>'; |
| 146 | 146 | } |
| 147 | 147 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | * |
| 181 | 181 | * @return array |
| 182 | 182 | */ |
| 183 | - public function get_bulk_actions(){ |
|
| 183 | + public function get_bulk_actions() { |
|
| 184 | 184 | $actions = array(); |
| 185 | 185 | if ( $this->payments_addon_list_helper_exists() ) { |
| 186 | 186 | $actions['bulk_delete'] = __( 'Delete', 'formidable' ); |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | echo '<tr id="payment-' . esc_attr( $item->id ) . '" '; |
| 233 | 233 | |
| 234 | 234 | $is_alternate = 0 === $alt % 2; |
| 235 | - ++$alt; |
|
| 235 | + ++ $alt; |
|
| 236 | 236 | |
| 237 | 237 | if ( $is_alternate ) { |
| 238 | 238 | echo 'class="alternate"'; |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | |
| 339 | 339 | $form_ids = array(); |
| 340 | 340 | foreach ( $forms as $form ) { |
| 341 | - $form_ids[ $form->id ] = $form; |
|
| 341 | + $form_ids[$form->id] = $form; |
|
| 342 | 342 | unset( $form ); |
| 343 | 343 | } |
| 344 | 344 | |
@@ -491,8 +491,8 @@ discard block |
||
| 491 | 491 | * @return mixed |
| 492 | 492 | */ |
| 493 | 493 | private function get_form_id_column( $item, $atts ) { |
| 494 | - if ( isset( $atts['form_ids'][ $item->item_id ] ) ) { |
|
| 495 | - $form_link = FrmFormsHelper::edit_form_link( $atts['form_ids'][ $item->item_id ]->form_id ); |
|
| 494 | + if ( isset( $atts['form_ids'][$item->item_id] ) ) { |
|
| 495 | + $form_link = FrmFormsHelper::edit_form_link( $atts['form_ids'][$item->item_id]->form_id ); |
|
| 496 | 496 | return $form_link; |
| 497 | 497 | } |
| 498 | 498 | |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | */ |
| 568 | 568 | private function get_processing_tooltip() { |
| 569 | 569 | return FrmAppHelper::clip( |
| 570 | - function () { |
|
| 570 | + function() { |
|
| 571 | 571 | FrmAppHelper::tooltip_icon( __( 'This payment method may take between 4-5 business days to process.', 'formidable' ) ); |
| 572 | 572 | } |
| 573 | 573 | ); |
@@ -180,7 +180,7 @@ |
||
| 180 | 180 | * |
| 181 | 181 | * @return array |
| 182 | 182 | */ |
| 183 | - public function get_bulk_actions(){ |
|
| 183 | + public function get_bulk_actions() { |
|
| 184 | 184 | $actions = array(); |
| 185 | 185 | if ( $this->payments_addon_list_helper_exists() ) { |
| 186 | 186 | $actions['bulk_delete'] = __( 'Delete', 'formidable' ); |
@@ -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 | ?> |
@@ -70,9 +70,9 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | // Don't show individual field errors when there is a combo field error. |
| 73 | - if ( ! empty( $errors ) && isset( $errors[ 'field' . $field_id . '-' . $name ] ) && ! isset( $errors[ 'field' . $field_id ] ) ) { |
|
| 73 | + if ( ! empty( $errors ) && isset( $errors['field' . $field_id . '-' . $name] ) && ! isset( $errors['field' . $field_id] ) ) { |
|
| 74 | 74 | ?> |
| 75 | - <div class="frm_error" role="alert"><?php echo esc_html( $errors[ 'field' . $field_id . '-' . $name ] ); ?></div> |
|
| 75 | + <div class="frm_error" role="alert"><?php echo esc_html( $errors['field' . $field_id . '-' . $name] ); ?></div> |
|
| 76 | 76 | <?php } ?> |
| 77 | 77 | </div> |
| 78 | 78 | <?php |