@@ -38,7 +38,7 @@ |
||
38 | 38 | protected function is_option_on() { |
39 | 39 | $form = $this->get_form(); |
40 | 40 | $key = $this->get_option_key(); |
41 | - return ! empty( $form->options[ $key ] ) && 'off' !== $form->options[ $key ]; |
|
41 | + return ! empty( $form->options[$key] ) && 'off' !== $form->options[$key]; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -46,19 +46,19 @@ discard block |
||
46 | 46 | $result = array(); |
47 | 47 | |
48 | 48 | foreach ( $names as $name ) { |
49 | - if ( empty( $this->sub_fields[ $name ] ) ) { |
|
49 | + if ( empty( $this->sub_fields[$name] ) ) { |
|
50 | 50 | continue; |
51 | 51 | } |
52 | 52 | |
53 | - if ( ! isset( $this->sub_fields[ $name ]['wrapper_classes'] ) ) { |
|
54 | - $this->sub_fields[ $name ]['wrapper_classes'] = $col_class; |
|
55 | - } elseif ( is_array( $this->sub_fields[ $name ]['wrapper_classes'] ) ) { |
|
56 | - $this->sub_fields[ $name ]['wrapper_classes'] = implode( ' ', $this->sub_fields[ $name ]['wrapper_classes'] ) . ' ' . $col_class; |
|
53 | + if ( ! isset( $this->sub_fields[$name]['wrapper_classes'] ) ) { |
|
54 | + $this->sub_fields[$name]['wrapper_classes'] = $col_class; |
|
55 | + } elseif ( is_array( $this->sub_fields[$name]['wrapper_classes'] ) ) { |
|
56 | + $this->sub_fields[$name]['wrapper_classes'] = implode( ' ', $this->sub_fields[$name]['wrapper_classes'] ) . ' ' . $col_class; |
|
57 | 57 | } else { |
58 | - $this->sub_fields[ $name ]['wrapper_classes'] .= ' ' . $col_class; |
|
58 | + $this->sub_fields[$name]['wrapper_classes'] .= ' ' . $col_class; |
|
59 | 59 | } |
60 | 60 | |
61 | - $result[ $name ] = $this->sub_fields[ $name ]; |
|
61 | + $result[$name] = $this->sub_fields[$name]; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | return $result; |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | // Default desc. |
91 | 91 | foreach ( $this->sub_fields as $name => $sub_field ) { |
92 | - $extra_options[ $name . '_desc' ] = $sub_field['label']; |
|
92 | + $extra_options[$name . '_desc'] = $sub_field['label']; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | return $extra_options; |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $name_layout = $this->get_name_layout(); |
126 | 126 | |
127 | 127 | if ( ! empty( $atts['show'] ) ) { |
128 | - return isset( $value[ $atts['show'] ] ) ? $value[ $atts['show'] ] : ''; |
|
128 | + return isset( $value[$atts['show']] ) ? $value[$atts['show']] : ''; |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | $value = wp_parse_args( |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $args['sub_fields'] = $this->sub_fields; |
199 | 199 | |
200 | 200 | foreach ( $hidden_fields as $name => $hidden_field ) { |
201 | - $args['sub_fields'][ $name ]['wrapper_classes'] .= ' frm_hidden'; |
|
201 | + $args['sub_fields'][$name]['wrapper_classes'] .= ' frm_hidden'; |
|
202 | 202 | } |
203 | 203 | } |
204 | 204 | } |
@@ -30,7 +30,7 @@ |
||
30 | 30 | $grid_helper = new FrmFieldGridHelper(); |
31 | 31 | $values['count'] = 0; |
32 | 32 | foreach ( $values['fields'] as $field ) { |
33 | - $values['count']++; |
|
33 | + $values['count'] ++; |
|
34 | 34 | $grid_helper->set_field( $field ); |
35 | 35 | $grid_helper->maybe_begin_field_wrapper(); |
36 | 36 | FrmFieldsController::load_single_field( $field, $values ); |
@@ -86,7 +86,7 @@ |
||
86 | 86 | |
87 | 87 | foreach ( $forms as $form ) { |
88 | 88 | $form_title = '' === $form->name ? __( '(no title)', 'formidable' ) : FrmAppHelper::truncate( $form->name, 50 ); |
89 | - $options[ $form->id ] = esc_html( $form_title ); |
|
89 | + $options[$form->id] = esc_html( $form_title ); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | return $options; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | $_GET['page'] = 'formidable'; |
20 | 20 | |
21 | - $values = array( |
|
21 | + $values = array( |
|
22 | 22 | 'id' => FrmAppHelper::get_post_param( 'form_id', '', 'absint' ), |
23 | 23 | 'doing_ajax' => true, |
24 | 24 | ); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | ob_start(); |
43 | 43 | self::load_single_field( $field, $values ); |
44 | - $field_html[ absint( $field->id ) ] = ob_get_contents(); |
|
44 | + $field_html[absint( $field->id )] = ob_get_contents(); |
|
45 | 45 | ob_end_clean(); |
46 | 46 | } |
47 | 47 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | foreach ( $opts as $opt_key => $opt ) { |
257 | 257 | if ( strpos( $opt, '|' ) !== false ) { |
258 | 258 | $vals = explode( '|', $opt ); |
259 | - $opts[ $opt_key ] = array( |
|
259 | + $opts[$opt_key] = array( |
|
260 | 260 | 'label' => trim( $vals[0] ), |
261 | 261 | 'value' => trim( $vals[1] ), |
262 | 262 | ); |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | $other_array = array(); |
272 | 272 | foreach ( $field['options'] as $opt_key => $opt ) { |
273 | 273 | if ( FrmFieldsHelper::is_other_opt( $opt_key ) ) { |
274 | - $other_array[ $opt_key ] = $opt; |
|
274 | + $other_array[$opt_key] = $opt; |
|
275 | 275 | } |
276 | 276 | unset( $opt_key, $opt ); |
277 | 277 | } |
@@ -313,18 +313,18 @@ discard block |
||
313 | 313 | $disabled_fields = FrmAppHelper::pro_is_installed() ? array() : $pro_field_selection; |
314 | 314 | $frm_settings = FrmAppHelper::get_settings(); |
315 | 315 | |
316 | - if ( ! isset( $all_field_types[ $field['type'] ] ) ) { |
|
316 | + if ( ! isset( $all_field_types[$field['type']] ) ) { |
|
317 | 317 | // Add fallback for an add-on field type that has been deactivated. |
318 | - $all_field_types[ $field['type'] ] = array( |
|
318 | + $all_field_types[$field['type']] = array( |
|
319 | 319 | 'name' => ucfirst( $field['type'] ), |
320 | 320 | 'icon' => 'frm_icon_font frm_pencil_icon', |
321 | 321 | ); |
322 | - } elseif ( ! is_array( $all_field_types[ $field['type'] ] ) ) { |
|
322 | + } elseif ( ! is_array( $all_field_types[$field['type']] ) ) { |
|
323 | 323 | // Fallback for fields added in a more basic way. |
324 | - FrmFormsHelper::prepare_field_type( $all_field_types[ $field['type'] ] ); |
|
324 | + FrmFormsHelper::prepare_field_type( $all_field_types[$field['type']] ); |
|
325 | 325 | } |
326 | 326 | |
327 | - $type_name = $all_field_types[ $field['type'] ]['name']; |
|
327 | + $type_name = $all_field_types[$field['type']]['name']; |
|
328 | 328 | if ( $field['type'] === 'divider' && FrmField::is_option_true( $field, 'repeat' ) ) { |
329 | 329 | $type_name = $all_field_types['divider|repeat']['name']; |
330 | 330 | } |
@@ -387,13 +387,13 @@ discard block |
||
387 | 387 | $active = 'default_value'; |
388 | 388 | |
389 | 389 | foreach ( $settings as $type ) { |
390 | - if ( ! empty( $field[ $type ] ) ) { |
|
390 | + if ( ! empty( $field[$type] ) ) { |
|
391 | 391 | $active = $type; |
392 | 392 | } |
393 | 393 | } |
394 | 394 | |
395 | - $types[ $active ]['class'] .= ' current'; |
|
396 | - $types[ $active ]['current'] = true; |
|
395 | + $types[$active]['class'] .= ' current'; |
|
396 | + $types[$active]['current'] = true; |
|
397 | 397 | |
398 | 398 | return $types; |
399 | 399 | } |
@@ -407,8 +407,8 @@ discard block |
||
407 | 407 | 'website' => 'url', |
408 | 408 | 'image' => 'url', |
409 | 409 | ); |
410 | - if ( isset( $type_switch[ $type ] ) ) { |
|
411 | - $type = $type_switch[ $type ]; |
|
410 | + if ( isset( $type_switch[$type] ) ) { |
|
411 | + $type = $type_switch[$type]; |
|
412 | 412 | } |
413 | 413 | |
414 | 414 | $pro_fields = FrmField::pro_field_selection(); |
@@ -532,11 +532,11 @@ discard block |
||
532 | 532 | // include "col" for valid html |
533 | 533 | $unit = trim( preg_replace( '/[0-9]+/', '', $field['size'] ) ); |
534 | 534 | |
535 | - if ( ! isset( $calc[ $unit ] ) ) { |
|
535 | + if ( ! isset( $calc[$unit] ) ) { |
|
536 | 536 | return; |
537 | 537 | } |
538 | 538 | |
539 | - $size = (float) str_replace( $unit, '', $field['size'] ) / $calc[ $unit ]; |
|
539 | + $size = (float) str_replace( $unit, '', $field['size'] ) / $calc[$unit]; |
|
540 | 540 | |
541 | 541 | $add_html['cols'] = 'cols="' . absint( $size ) . '"'; |
542 | 542 | } |
@@ -729,11 +729,11 @@ discard block |
||
729 | 729 | private static function get_form_for_js_validation( $field ) { |
730 | 730 | global $frm_vars; |
731 | 731 | if ( ! empty( $frm_vars['js_validate_forms'] ) ) { |
732 | - if ( isset( $frm_vars['js_validate_forms'][ $field['form_id'] ] ) ) { |
|
733 | - return $frm_vars['js_validate_forms'][ $field['form_id'] ]; |
|
732 | + if ( isset( $frm_vars['js_validate_forms'][$field['form_id']] ) ) { |
|
733 | + return $frm_vars['js_validate_forms'][$field['form_id']]; |
|
734 | 734 | } |
735 | - if ( ! empty( $field['parent_form_id'] ) && isset( $frm_vars['js_validate_forms'][ $field['parent_form_id'] ] ) ) { |
|
736 | - return $frm_vars['js_validate_forms'][ $field['parent_form_id'] ]; |
|
735 | + if ( ! empty( $field['parent_form_id'] ) && isset( $frm_vars['js_validate_forms'][$field['parent_form_id']] ) ) { |
|
736 | + return $frm_vars['js_validate_forms'][$field['parent_form_id']]; |
|
737 | 737 | } |
738 | 738 | } |
739 | 739 | return false; |
@@ -804,10 +804,10 @@ discard block |
||
804 | 804 | |
805 | 805 | if ( is_numeric( $k ) && strpos( $v, '=' ) ) { |
806 | 806 | $add_html[] = $v; |
807 | - } elseif ( ! empty( $k ) && isset( $add_html[ $k ] ) ) { |
|
808 | - $add_html[ $k ] = str_replace( $k . '="', $k . '="' . $v, $add_html[ $k ] ); |
|
807 | + } elseif ( ! empty( $k ) && isset( $add_html[$k] ) ) { |
|
808 | + $add_html[$k] = str_replace( $k . '="', $k . '="' . $v, $add_html[$k] ); |
|
809 | 809 | } else { |
810 | - $add_html[ $k ] = $k . '="' . esc_attr( $v ) . '"'; |
|
810 | + $add_html[$k] = $k . '="' . esc_attr( $v ) . '"'; |
|
811 | 811 | } |
812 | 812 | |
813 | 813 | unset( $k, $v ); |
@@ -42,7 +42,8 @@ |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | // Only do this for single site installs. |
45 | - if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
45 | + if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) { |
|
46 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
46 | 47 | return; |
47 | 48 | } |
48 | 49 |
@@ -491,7 +491,8 @@ |
||
491 | 491 | |
492 | 492 | public static function process_entry( $errors = '', $ajax = false ) { |
493 | 493 | $form_id = FrmAppHelper::get_post_param( 'form_id', '', 'absint' ); |
494 | - if ( FrmAppHelper::is_admin() || empty( $_POST ) || empty( $form_id ) || ! isset( $_POST['item_key'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
494 | + if ( FrmAppHelper::is_admin() || empty( $_POST ) || empty( $form_id ) || ! isset( $_POST['item_key'] ) ) { |
|
495 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
495 | 496 | return; |
496 | 497 | } |
497 | 498 |
@@ -75,20 +75,20 @@ discard block |
||
75 | 75 | global $frm_vars; |
76 | 76 | $form_id = FrmForm::get_current_form_id(); |
77 | 77 | |
78 | - $columns[ $form_id . '_id' ] = 'ID'; |
|
79 | - $columns[ $form_id . '_item_key' ] = esc_html__( 'Entry Key', 'formidable' ); |
|
78 | + $columns[$form_id . '_id'] = 'ID'; |
|
79 | + $columns[$form_id . '_item_key'] = esc_html__( 'Entry Key', 'formidable' ); |
|
80 | 80 | |
81 | 81 | if ( $form_id ) { |
82 | 82 | self::get_columns_for_form( $form_id, $columns ); |
83 | 83 | } else { |
84 | - $columns[ $form_id . '_form_id' ] = esc_html__( 'Form', 'formidable' ); |
|
85 | - $columns[ $form_id . '_name' ] = esc_html__( 'Entry Name', 'formidable' ); |
|
86 | - $columns[ $form_id . '_user_id' ] = esc_html__( 'Created By', 'formidable' ); |
|
84 | + $columns[$form_id . '_form_id'] = esc_html__( 'Form', 'formidable' ); |
|
85 | + $columns[$form_id . '_name'] = esc_html__( 'Entry Name', 'formidable' ); |
|
86 | + $columns[$form_id . '_user_id'] = esc_html__( 'Created By', 'formidable' ); |
|
87 | 87 | } |
88 | 88 | |
89 | - $columns[ $form_id . '_is_draft' ] = esc_html__( 'Entry Status', 'formidable' ); |
|
90 | - $columns[ $form_id . '_created_at' ] = __( 'Entry creation date', 'formidable' ); |
|
91 | - $columns[ $form_id . '_updated_at' ] = __( 'Entry update date', 'formidable' ); |
|
89 | + $columns[$form_id . '_is_draft'] = esc_html__( 'Entry Status', 'formidable' ); |
|
90 | + $columns[$form_id . '_created_at'] = __( 'Entry creation date', 'formidable' ); |
|
91 | + $columns[$form_id . '_updated_at'] = __( 'Entry update date', 'formidable' ); |
|
92 | 92 | self::maybe_add_ip_col( $form_id, $columns ); |
93 | 93 | |
94 | 94 | $frm_vars['cols'] = $columns; |
@@ -146,10 +146,10 @@ discard block |
||
146 | 146 | |
147 | 147 | foreach ( $sub_form_cols as $k => $sub_form_col ) { |
148 | 148 | if ( FrmField::is_no_save_field( $sub_form_col->type ) ) { |
149 | - unset( $sub_form_cols[ $k ] ); |
|
149 | + unset( $sub_form_cols[$k] ); |
|
150 | 150 | continue; |
151 | 151 | } |
152 | - $columns[ $form_id . '_' . $sub_form_col->field_key . '-_-' . $field->id ] = FrmAppHelper::truncate( $sub_form_col->name, 35 ); |
|
152 | + $columns[$form_id . '_' . $sub_form_col->field_key . '-_-' . $field->id] = FrmAppHelper::truncate( $sub_form_col->name, 35 ); |
|
153 | 153 | unset( $sub_form_col ); |
154 | 154 | } |
155 | 155 | } |
@@ -166,15 +166,15 @@ discard block |
||
166 | 166 | $has_separate_value = ! FrmField::is_option_empty( $field, 'separate_value' ); |
167 | 167 | $is_post_status = FrmField::is_option_true( $field, 'post_field' ) && $field->field_options['post_field'] == 'post_status'; |
168 | 168 | if ( $has_separate_value && ! $is_post_status ) { |
169 | - $columns[ $form_id . '_frmsep_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 ); |
|
169 | + $columns[$form_id . '_frmsep_' . $col_id] = FrmAppHelper::truncate( $field->name, 35 ); |
|
170 | 170 | } |
171 | 171 | |
172 | - $columns[ $form_id . '_' . $col_id ] = FrmAppHelper::truncate( $field->name, 35 ); |
|
172 | + $columns[$form_id . '_' . $col_id] = FrmAppHelper::truncate( $field->name, 35 ); |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | private static function maybe_add_ip_col( $form_id, &$columns ) { |
176 | 176 | if ( FrmAppHelper::ips_saved() ) { |
177 | - $columns[ $form_id . '_ip' ] = 'IP'; |
|
177 | + $columns[$form_id . '_ip'] = 'IP'; |
|
178 | 178 | } |
179 | 179 | } |
180 | 180 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | foreach ( $meta_value as $mk => $mv ) { |
213 | 213 | // Remove blank values. |
214 | 214 | if ( empty( $mv ) ) { |
215 | - unset( $meta_value[ $mk ] ); |
|
215 | + unset( $meta_value[$mk] ); |
|
216 | 216 | } |
217 | 217 | } |
218 | 218 | |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | |
289 | 289 | foreach ( $fields as $field ) { |
290 | 290 | if ( self::field_supports_sorting( $field ) ) { |
291 | - $columns[ $form_id . '_' . $field->field_key ] = 'meta_' . $field->id; |
|
291 | + $columns[$form_id . '_' . $field->field_key] = 'meta_' . $field->id; |
|
292 | 292 | } |
293 | 293 | } |
294 | 294 | |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | $atts['form_id'] . '_item_key' => '', |
376 | 376 | $atts['form_id'] . '_id' => '', |
377 | 377 | ); |
378 | - $cols = $remove_first + array_reverse( $frm_vars['cols'], true ); |
|
378 | + $cols = $remove_first + array_reverse( $frm_vars['cols'], true ); |
|
379 | 379 | |
380 | 380 | $i = $atts['i']; |
381 | 381 | |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | |
387 | 387 | if ( empty( $result ) || ! in_array( $col_key, $result, true ) ) { |
388 | 388 | $result[] = $col_key; |
389 | - $i--; |
|
389 | + $i --; |
|
390 | 390 | } |
391 | 391 | |
392 | 392 | unset( $col_key, $col ); |
@@ -528,9 +528,9 @@ discard block |
||
528 | 528 | if ( ! isset( $frm_vars['form_params'] ) ) { |
529 | 529 | $frm_vars['form_params'] = array(); |
530 | 530 | } |
531 | - $frm_vars['form_params'][ $form->id ] = $params; |
|
531 | + $frm_vars['form_params'][$form->id] = $params; |
|
532 | 532 | |
533 | - if ( isset( $frm_vars['created_entries'][ $form_id ] ) ) { |
|
533 | + if ( isset( $frm_vars['created_entries'][$form_id] ) ) { |
|
534 | 534 | return; |
535 | 535 | } |
536 | 536 | |
@@ -546,16 +546,16 @@ discard block |
||
546 | 546 | */ |
547 | 547 | $errors = apply_filters( 'frm_entries_before_create', $errors, $form ); |
548 | 548 | |
549 | - $frm_vars['created_entries'][ $form_id ] = array( 'errors' => $errors ); |
|
549 | + $frm_vars['created_entries'][$form_id] = array( 'errors' => $errors ); |
|
550 | 550 | |
551 | 551 | if ( empty( $errors ) ) { |
552 | 552 | $_POST['frm_skip_cookie'] = 1; |
553 | 553 | $do_success = false; |
554 | 554 | if ( $params['action'] === 'create' ) { |
555 | - if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][ $form_id ]['entry_id'] ) ) { |
|
556 | - $frm_vars['created_entries'][ $form_id ]['entry_id'] = FrmEntry::create( $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
555 | + if ( apply_filters( 'frm_continue_to_create', true, $form_id ) && ! isset( $frm_vars['created_entries'][$form_id]['entry_id'] ) ) { |
|
556 | + $frm_vars['created_entries'][$form_id]['entry_id'] = FrmEntry::create( $_POST ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
557 | 557 | |
558 | - $params['id'] = $frm_vars['created_entries'][ $form_id ]['entry_id']; |
|
558 | + $params['id'] = $frm_vars['created_entries'][$form_id]['entry_id']; |
|
559 | 559 | $do_success = true; |
560 | 560 | } |
561 | 561 | } |
@@ -52,7 +52,7 @@ |
||
52 | 52 | protected function get_field_value( $args ) { |
53 | 53 | $user_ID = get_current_user_id(); |
54 | 54 | $user_ID = ( $user_ID ? $user_ID : '' ); |
55 | - $posted_value = ( FrmAppHelper::is_admin() && $_POST && isset( $_POST['item_meta'][ $this->field['id'] ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
55 | + $posted_value = ( FrmAppHelper::is_admin() && $_POST && isset( $_POST['item_meta'][$this->field['id']] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
56 | 56 | $action = ( isset( $args['action'] ) ? $args['action'] : ( isset( $args['form_action'] ) ? $args['form_action'] : '' ) ); |
57 | 57 | $updating = $action == 'update'; |
58 | 58 | return ( is_numeric( $this->field['value'] ) || $posted_value || $updating ) ? $this->field['value'] : $user_ID; |
@@ -235,8 +235,8 @@ discard block |
||
235 | 235 | return $this->get_pagenum(); |
236 | 236 | } |
237 | 237 | |
238 | - if ( isset( $this->_pagination_args[ $key ] ) ) { |
|
239 | - return $this->_pagination_args[ $key ]; |
|
238 | + if ( isset( $this->_pagination_args[$key] ) ) { |
|
239 | + return $this->_pagination_args[$key]; |
|
240 | 240 | } |
241 | 241 | } |
242 | 242 | |
@@ -284,8 +284,8 @@ discard block |
||
284 | 284 | } |
285 | 285 | |
286 | 286 | private function hidden_search_inputs( $param_name ) { |
287 | - if ( ! empty( $_REQUEST[ $param_name ] ) ) { |
|
288 | - $value = sanitize_text_field( wp_unslash( $_REQUEST[ $param_name ] ) ); |
|
287 | + if ( ! empty( $_REQUEST[$param_name] ) ) { |
|
288 | + $value = sanitize_text_field( wp_unslash( $_REQUEST[$param_name] ) ); |
|
289 | 289 | echo '<input type="hidden" name="' . esc_attr( $param_name ) . '" value="' . esc_attr( $value ) . '" />'; |
290 | 290 | } |
291 | 291 | } |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | |
330 | 330 | echo "<ul class='subsubsub'>\n"; |
331 | 331 | foreach ( $views as $class => $view ) { |
332 | - $views[ $class ] = "\t" . '<li class="' . esc_attr( $class ) . '">' . $view; |
|
332 | + $views[$class] = "\t" . '<li class="' . esc_attr( $class ) . '">' . $view; |
|
333 | 333 | } |
334 | 334 | echo implode( " |</li>\n", $views ) . "</li>\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
335 | 335 | echo '</ul>'; |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | 'next' => __( 'Next page', 'formidable' ), |
703 | 703 | ); |
704 | 704 | |
705 | - return $labels[ $link ]; |
|
705 | + return $labels[$link]; |
|
706 | 706 | } |
707 | 707 | |
708 | 708 | private function current_url() { |
@@ -795,7 +795,7 @@ discard block |
||
795 | 795 | |
796 | 796 | // If the primary column doesn't exist fall back to the |
797 | 797 | // first non-checkbox column. |
798 | - if ( ! isset( $columns[ $default ] ) ) { |
|
798 | + if ( ! isset( $columns[$default] ) ) { |
|
799 | 799 | $default = self::get_default_primary_column_name(); |
800 | 800 | } |
801 | 801 | |
@@ -809,7 +809,7 @@ discard block |
||
809 | 809 | */ |
810 | 810 | $column = apply_filters( 'list_table_primary_column', $default, $this->screen->id ); |
811 | 811 | |
812 | - if ( empty( $column ) || ! isset( $columns[ $column ] ) ) { |
|
812 | + if ( empty( $column ) || ! isset( $columns[$column] ) ) { |
|
813 | 813 | $column = $default; |
814 | 814 | } |
815 | 815 | |
@@ -831,7 +831,7 @@ discard block |
||
831 | 831 | // In 4.3, we added a fourth argument for primary column. |
832 | 832 | $column_headers = array( array(), array(), array(), $this->get_primary_column_name() ); |
833 | 833 | foreach ( $this->_column_headers as $key => $value ) { |
834 | - $column_headers[ $key ] = $value; |
|
834 | + $column_headers[$key] = $value; |
|
835 | 835 | } |
836 | 836 | |
837 | 837 | return $column_headers; |
@@ -864,7 +864,7 @@ discard block |
||
864 | 864 | $data[1] = false; |
865 | 865 | } |
866 | 866 | |
867 | - $sortable[ $id ] = $data; |
|
867 | + $sortable[$id] = $data; |
|
868 | 868 | } |
869 | 869 | |
870 | 870 | $primary = $this->get_primary_column_name(); |
@@ -941,8 +941,8 @@ discard block |
||
941 | 941 | $class[] = 'column-primary'; |
942 | 942 | } |
943 | 943 | |
944 | - if ( isset( $sortable[ $column_key ] ) ) { |
|
945 | - list( $orderby, $desc_first ) = $sortable[ $column_key ]; |
|
944 | + if ( isset( $sortable[$column_key] ) ) { |
|
945 | + list( $orderby, $desc_first ) = $sortable[$column_key]; |
|
946 | 946 | |
947 | 947 | if ( $current_orderby == $orderby ) { |
948 | 948 | $order = 'asc' == $current_order ? 'desc' : 'asc'; |