@@ -85,7 +85,7 @@ |
||
85 | 85 | foreach ( $errors as $field => $error ) { |
86 | 86 | $field_id = str_replace( 'field', '', $field ); |
87 | 87 | $error = self::maybe_modify_ajax_error( $error, $field_id, $form, $errors ); |
88 | - $obj[ $field_id ] = $error; |
|
88 | + $obj[$field_id] = $error; |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | $response['errors'] = $obj; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $metas = FrmEntryMeta::get_entry_meta_info( $entry_exist ); |
81 | 81 | $field_metas = array(); |
82 | 82 | foreach ( $metas as $meta ) { |
83 | - $field_metas[ $meta->field_id ] = $meta->meta_value; |
|
83 | + $field_metas[$meta->field_id] = $meta->meta_value; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | $filtered_vals = array_filter( $values['item_meta'] ); |
@@ -136,10 +136,10 @@ discard block |
||
136 | 136 | $reduced = array(); |
137 | 137 | foreach ( $filter_vals as $field_id => $value ) { |
138 | 138 | $field = FrmFieldFactory::get_field_object( $field_id ); |
139 | - $reduced[ $field_id ] = $field->get_value_to_save( $value, array( 'entry_id' => $entry_id ) ); |
|
140 | - $reduced[ $field_id ] = $field->set_value_before_save( $reduced[ $field_id ] ); |
|
141 | - if ( '' === $reduced[ $field_id ] || ( is_array( $reduced[ $field_id ] ) && 0 === count( $reduced[ $field_id ] ) ) ) { |
|
142 | - unset( $reduced[ $field_id ] ); |
|
139 | + $reduced[$field_id] = $field->get_value_to_save( $value, array( 'entry_id' => $entry_id ) ); |
|
140 | + $reduced[$field_id] = $field->set_value_before_save( $reduced[$field_id] ); |
|
141 | + if ( '' === $reduced[$field_id] || ( is_array( $reduced[$field_id] ) && 0 === count( $reduced[$field_id] ) ) ) { |
|
142 | + unset( $reduced[$field_id] ); |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | return $reduced; |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | $query = "SELECT it.*, fr.name as form_name, fr.form_key as form_key FROM {$wpdb->prefix}frm_items it |
355 | 355 | LEFT OUTER JOIN {$wpdb->prefix}frm_forms fr ON it.form_id=fr.id WHERE "; |
356 | 356 | |
357 | - $query .= is_numeric( $id ) ? 'it.id=%d' : 'it.item_key=%s'; |
|
357 | + $query .= is_numeric( $id ) ? 'it.id=%d' : 'it.item_key=%s'; |
|
358 | 358 | $query_args = array( $id ); |
359 | 359 | $query = $wpdb->prepare( $query, $query_args ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared |
360 | 360 | |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | private static function prepare_entries( &$entries ) { |
400 | 400 | foreach ( $entries as $k => $entry ) { |
401 | 401 | self::prepare_entry( $entry ); |
402 | - $entries[ $k ] = $entry; |
|
402 | + $entries[$k] = $entry; |
|
403 | 403 | } |
404 | 404 | } |
405 | 405 | |
@@ -425,19 +425,19 @@ discard block |
||
425 | 425 | FrmFieldsHelper::prepare_field_value( $meta_val->meta_value, $meta_val->type ); |
426 | 426 | |
427 | 427 | if ( $meta_val->item_id == $entry->id ) { |
428 | - $entry->metas[ $meta_val->field_id ] = $meta_val->meta_value; |
|
428 | + $entry->metas[$meta_val->field_id] = $meta_val->meta_value; |
|
429 | 429 | if ( $include_key ) { |
430 | - $entry->metas[ $meta_val->field_key ] = $entry->metas[ $meta_val->field_id ]; |
|
430 | + $entry->metas[$meta_val->field_key] = $entry->metas[$meta_val->field_id]; |
|
431 | 431 | } |
432 | 432 | continue; |
433 | 433 | } |
434 | 434 | |
435 | 435 | // include sub entries in an array |
436 | - if ( ! isset( $entry->metas[ $meta_val->field_id ] ) ) { |
|
437 | - $entry->metas[ $meta_val->field_id ] = array(); |
|
436 | + if ( ! isset( $entry->metas[$meta_val->field_id] ) ) { |
|
437 | + $entry->metas[$meta_val->field_id] = array(); |
|
438 | 438 | } |
439 | 439 | |
440 | - $entry->metas[ $meta_val->field_id ][] = $meta_val->meta_value; |
|
440 | + $entry->metas[$meta_val->field_id][] = $meta_val->meta_value; |
|
441 | 441 | |
442 | 442 | unset( $meta_val ); |
443 | 443 | } |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | |
485 | 485 | if ( $inc_form ) { |
486 | 486 | $fields = 'it.*, fr.name as form_name,fr.form_key as form_key'; |
487 | - $table .= 'LEFT OUTER JOIN ' . $wpdb->prefix . 'frm_forms fr ON it.form_id=fr.id '; |
|
487 | + $table .= 'LEFT OUTER JOIN ' . $wpdb->prefix . 'frm_forms fr ON it.form_id=fr.id '; |
|
488 | 488 | } |
489 | 489 | |
490 | 490 | if ( preg_match( '/ meta_([0-9]+)/', $order_by, $order_matches ) ) { |
@@ -532,16 +532,16 @@ discard block |
||
532 | 532 | } |
533 | 533 | |
534 | 534 | foreach ( $metas as $m_key => $meta_val ) { |
535 | - if ( ! isset( $entries[ $meta_val->item_id ] ) ) { |
|
535 | + if ( ! isset( $entries[$meta_val->item_id] ) ) { |
|
536 | 536 | continue; |
537 | 537 | } |
538 | 538 | |
539 | - if ( ! isset( $entries[ $meta_val->item_id ]->metas ) ) { |
|
540 | - $entries[ $meta_val->item_id ]->metas = array(); |
|
539 | + if ( ! isset( $entries[$meta_val->item_id]->metas ) ) { |
|
540 | + $entries[$meta_val->item_id]->metas = array(); |
|
541 | 541 | } |
542 | 542 | |
543 | 543 | FrmFieldsHelper::prepare_field_value( $meta_val->meta_value, $meta_val->type ); |
544 | - $entries[ $meta_val->item_id ]->metas[ $meta_val->field_id ] = $meta_val->meta_value; |
|
544 | + $entries[$meta_val->item_id]->metas[$meta_val->field_id] = $meta_val->meta_value; |
|
545 | 545 | unset( $m_key, $meta_val ); |
546 | 546 | } |
547 | 547 | |
@@ -719,7 +719,7 @@ discard block |
||
719 | 719 | } |
720 | 720 | |
721 | 721 | private static function get_entry_value( $values, $name, $default ) { |
722 | - return isset( $values[ $name ] ) ? $values[ $name ] : $default; |
|
722 | + return isset( $values[$name] ) ? $values[$name] : $default; |
|
723 | 723 | } |
724 | 724 | |
725 | 725 | /** |
@@ -900,7 +900,7 @@ discard block |
||
900 | 900 | private static function maybe_add_captcha_meta( $form_id, $entry_id ) { |
901 | 901 | global $frm_vars; |
902 | 902 | if ( array_key_exists( 'captcha_scores', $frm_vars ) && array_key_exists( $form_id, $frm_vars['captcha_scores'] ) ) { |
903 | - $captcha_score_meta = array( 'captcha_score' => $frm_vars['captcha_scores'][ $form_id ] ); |
|
903 | + $captcha_score_meta = array( 'captcha_score' => $frm_vars['captcha_scores'][$form_id] ); |
|
904 | 904 | FrmEntryMeta::add_entry_meta( $entry_id, 0, '', maybe_serialize( $captcha_score_meta ) ); |
905 | 905 | } |
906 | 906 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | while ( $count > 0 && ! is_null( $one = $this->read_one() ) ) { |
80 | 80 | $value .= $one; |
81 | - --$count; |
|
81 | + -- $count; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | return $this->strip_quotes( $value ); |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | private function read_one() { |
94 | 94 | if ( $this->pos <= $this->max ) { |
95 | - $value = $this->string[ $this->pos ]; |
|
95 | + $value = $this->string[$this->pos]; |
|
96 | 96 | $this->pos += 1; |
97 | 97 | } else { |
98 | 98 | $value = null; |
@@ -65,12 +65,12 @@ |
||
65 | 65 | $string->read( 1 ); |
66 | 66 | |
67 | 67 | $val = array(); |
68 | - for ( $i = 0; $i < $count; $i++ ) { |
|
68 | + for ( $i = 0; $i < $count; $i ++ ) { |
|
69 | 69 | $array_key = $this->do_parse( $string ); |
70 | 70 | $array_value = $this->do_parse( $string ); |
71 | 71 | |
72 | 72 | if ( ! is_array( $array_key ) ) { |
73 | - $val[ $array_key ] = $array_value; |
|
73 | + $val[$array_key] = $array_value; |
|
74 | 74 | } |
75 | 75 | } |
76 | 76 |
@@ -240,26 +240,26 @@ discard block |
||
240 | 240 | public static function populate_on_submit_data( &$form_options, $action = null, $event = 'create' ) { |
241 | 241 | $opt = 'update' === $event ? 'edit_' : 'success_'; |
242 | 242 | if ( ! $action || ! is_object( $action ) ) { |
243 | - $form_options[ $opt . 'action' ] = self::get_default_action_type(); |
|
244 | - $form_options[ $opt . 'msg' ] = self::get_default_msg(); |
|
243 | + $form_options[$opt . 'action'] = self::get_default_action_type(); |
|
244 | + $form_options[$opt . 'msg'] = self::get_default_msg(); |
|
245 | 245 | |
246 | 246 | return; |
247 | 247 | } |
248 | 248 | |
249 | - $form_options[ $opt . 'action' ] = isset( $action->post_content['success_action'] ) ? $action->post_content['success_action'] : 'message'; |
|
249 | + $form_options[$opt . 'action'] = isset( $action->post_content['success_action'] ) ? $action->post_content['success_action'] : 'message'; |
|
250 | 250 | |
251 | - switch ( $form_options[ $opt . 'action' ] ) { |
|
251 | + switch ( $form_options[$opt . 'action'] ) { |
|
252 | 252 | case 'redirect': |
253 | - $form_options[ $opt . 'url' ] = isset( $action->post_content['success_url'] ) ? $action->post_content['success_url'] : ''; |
|
253 | + $form_options[$opt . 'url'] = isset( $action->post_content['success_url'] ) ? $action->post_content['success_url'] : ''; |
|
254 | 254 | $form_options['open_in_new_tab'] = ! empty( $action->post_content['open_in_new_tab'] ); |
255 | 255 | break; |
256 | 256 | |
257 | 257 | case 'page': |
258 | - $form_options[ $opt . 'page_id' ] = isset( $action->post_content['success_page_id'] ) ? $action->post_content['success_page_id'] : ''; |
|
258 | + $form_options[$opt . 'page_id'] = isset( $action->post_content['success_page_id'] ) ? $action->post_content['success_page_id'] : ''; |
|
259 | 259 | break; |
260 | 260 | |
261 | 261 | default: |
262 | - $form_options[ $opt . 'msg' ] = ! empty( $action->post_content['success_msg'] ) ? $action->post_content['success_msg'] : self::get_default_msg(); |
|
262 | + $form_options[$opt . 'msg'] = ! empty( $action->post_content['success_msg'] ) ? $action->post_content['success_msg'] : self::get_default_msg(); |
|
263 | 263 | $form_options['show_form'] = ! empty( $action->post_content['show_form'] ); |
264 | 264 | } |
265 | 265 | } |
@@ -348,20 +348,20 @@ discard block |
||
348 | 348 | private static function get_on_submit_action_data_from_form_options( $form_options, $event = 'create' ) { |
349 | 349 | $opt = 'update' === $event ? 'edit_' : 'success_'; |
350 | 350 | $data = array( |
351 | - 'success_action' => isset( $form_options[ $opt . 'action' ] ) ? $form_options[ $opt . 'action' ] : self::get_default_action_type(), |
|
351 | + 'success_action' => isset( $form_options[$opt . 'action'] ) ? $form_options[$opt . 'action'] : self::get_default_action_type(), |
|
352 | 352 | ); |
353 | 353 | |
354 | 354 | switch ( $data['success_action'] ) { |
355 | 355 | case 'redirect': |
356 | - $data['success_url'] = isset( $form_options[ $opt . 'url' ] ) ? $form_options[ $opt . 'url' ] : ''; |
|
356 | + $data['success_url'] = isset( $form_options[$opt . 'url'] ) ? $form_options[$opt . 'url'] : ''; |
|
357 | 357 | break; |
358 | 358 | |
359 | 359 | case 'page': |
360 | - $data['success_page_id'] = isset( $form_options[ $opt . 'page_id' ] ) ? $form_options[ $opt . 'page_id' ] : ''; |
|
360 | + $data['success_page_id'] = isset( $form_options[$opt . 'page_id'] ) ? $form_options[$opt . 'page_id'] : ''; |
|
361 | 361 | break; |
362 | 362 | |
363 | 363 | default: |
364 | - $data['success_msg'] = isset( $form_options[ $opt . 'msg' ] ) ? $form_options[ $opt . 'msg' ] : self::get_default_msg(); |
|
364 | + $data['success_msg'] = isset( $form_options[$opt . 'msg'] ) ? $form_options[$opt . 'msg'] : self::get_default_msg(); |
|
365 | 365 | $data['show_form'] = ! empty( $form_options['show_form'] ); |
366 | 366 | } |
367 | 367 |
@@ -76,7 +76,7 @@ |
||
76 | 76 | return false; |
77 | 77 | } |
78 | 78 | |
79 | - return $addons[ $addon_id ]; |
|
79 | + return $addons[$addon_id]; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -187,8 +187,8 @@ discard block |
||
187 | 187 | } |
188 | 188 | |
189 | 189 | foreach ( $settings as $setting => $default ) { |
190 | - if ( isset( $params[ 'frm_' . $setting ] ) ) { |
|
191 | - $this->{$setting} = $params[ 'frm_' . $setting ]; |
|
190 | + if ( isset( $params['frm_' . $setting] ) ) { |
|
191 | + $this->{$setting} = $params['frm_' . $setting]; |
|
192 | 192 | } elseif ( ! isset( $this->{$setting} ) ) { |
193 | 193 | $this->{$setting} = $default; |
194 | 194 | } |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | |
357 | 357 | $checkboxes = array( 'mu_menu', 're_multi', 'use_html', 'jquery_css', 'accordion_js', 'fade_form', 'no_ips', 'custom_header_ip', 'tracking', 'admin_bar', 'summary_emails' ); |
358 | 358 | foreach ( $checkboxes as $set ) { |
359 | - $this->$set = isset( $params[ 'frm_' . $set ] ) ? absint( $params[ 'frm_' . $set ] ) : 0; |
|
359 | + $this->$set = isset( $params['frm_' . $set] ) ? absint( $params['frm_' . $set] ) : 0; |
|
360 | 360 | } |
361 | 361 | } |
362 | 362 | |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | $frm_roles = FrmAppHelper::frm_capabilities(); |
370 | 370 | $roles = get_editable_roles(); |
371 | 371 | foreach ( $frm_roles as $frm_role => $frm_role_description ) { |
372 | - $this->$frm_role = (array) ( isset( $params[ $frm_role ] ) ? $params[ $frm_role ] : 'administrator' ); |
|
372 | + $this->$frm_role = (array) ( isset( $params[$frm_role] ) ? $params[$frm_role] : 'administrator' ); |
|
373 | 373 | |
374 | 374 | // Make sure administrators always have permissions |
375 | 375 | if ( ! in_array( 'administrator', $this->$frm_role ) ) { |
@@ -108,7 +108,7 @@ |
||
108 | 108 | 'credit_card' => 'FrmFieldCreditCard', |
109 | 109 | ); |
110 | 110 | |
111 | - $class = isset( $type_classes[ $field_type ] ) ? $type_classes[ $field_type ] : ''; |
|
111 | + $class = isset( $type_classes[$field_type] ) ? $type_classes[$field_type] : ''; |
|
112 | 112 | |
113 | 113 | return apply_filters( 'frm_get_field_type_class', $class, $field_type ); |
114 | 114 | } |
@@ -493,7 +493,8 @@ discard block |
||
493 | 493 | |
494 | 494 | if ( $src === 'get' ) { |
495 | 495 | $value = isset( $_POST[ $param ] ) ? wp_unslash( $_POST[ $param ] ) : ( isset( $_GET[ $param ] ) ? wp_unslash( $_GET[ $param ] ) : $default ); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
496 | - if ( ! isset( $_POST[ $param ] ) && isset( $_GET[ $param ] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
496 | + if ( ! isset( $_POST[ $param ] ) && isset( $_GET[ $param ] ) && ! is_array( $value ) ) { |
|
497 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
497 | 498 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
498 | 499 | $value = htmlspecialchars_decode( wp_unslash( $_GET[ $param ] ) ); |
499 | 500 | } |
@@ -581,7 +582,8 @@ discard block |
||
581 | 582 | $value = wp_unslash( $_GET[ $args['param'] ] ); |
582 | 583 | } |
583 | 584 | } elseif ( $args['type'] === 'post' ) { |
584 | - if ( isset( $_POST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
585 | + if ( isset( $_POST[ $args['param'] ] ) ) { |
|
586 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
585 | 587 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
586 | 588 | $value = wp_unslash( $_POST[ $args['param'] ] ); |
587 | 589 | if ( $args['serialized'] === true && is_serialized_string( $value ) && is_serialized( $value ) ) { |
@@ -589,7 +591,8 @@ discard block |
||
589 | 591 | } |
590 | 592 | } |
591 | 593 | } else { |
592 | - if ( isset( $_REQUEST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
594 | + if ( isset( $_REQUEST[ $args['param'] ] ) ) { |
|
595 | +// phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
593 | 596 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
594 | 597 | $value = wp_unslash( $_REQUEST[ $args['param'] ] ); |
595 | 598 | } |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | 'fill' => '#4d4d4d', |
199 | 199 | 'orange' => '#f05a24', |
200 | 200 | ); |
201 | - $atts = array_merge( $defaults, $atts ); |
|
201 | + $atts = array_merge( $defaults, $atts ); |
|
202 | 202 | |
203 | 203 | return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 599.68 601.37" width="' . esc_attr( $atts['width'] ) . '" height="' . esc_attr( $atts['height'] ) . '"> |
204 | 204 | <path fill="' . esc_attr( $atts['orange'] ) . '" d="M289.6 384h140v76h-140z"/> |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | * @return string |
406 | 406 | */ |
407 | 407 | public static function get_server_value( $value ) { |
408 | - return isset( $_SERVER[ $value ] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[ $value ] ) ) : ''; |
|
408 | + return isset( $_SERVER[$value] ) ? wp_strip_all_tags( wp_unslash( $_SERVER[$value] ) ) : ''; |
|
409 | 409 | } |
410 | 410 | |
411 | 411 | /** |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | $ip = ''; |
440 | 440 | |
441 | 441 | foreach ( $ip_options as $key ) { |
442 | - if ( ! isset( $_SERVER[ $key ] ) ) { |
|
442 | + if ( ! isset( $_SERVER[$key] ) ) { |
|
443 | 443 | continue; |
444 | 444 | } |
445 | 445 | |
@@ -508,10 +508,10 @@ discard block |
||
508 | 508 | } |
509 | 509 | |
510 | 510 | if ( $src === 'get' ) { |
511 | - $value = isset( $_POST[ $param ] ) ? wp_unslash( $_POST[ $param ] ) : ( isset( $_GET[ $param ] ) ? wp_unslash( $_GET[ $param ] ) : $default ); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
|
512 | - if ( ! isset( $_POST[ $param ] ) && isset( $_GET[ $param ] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
511 | + $value = isset( $_POST[$param] ) ? wp_unslash( $_POST[$param] ) : ( isset( $_GET[$param] ) ? wp_unslash( $_GET[$param] ) : $default ); // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
|
512 | + if ( ! isset( $_POST[$param] ) && isset( $_GET[$param] ) && ! is_array( $value ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
513 | 513 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
514 | - $value = htmlspecialchars_decode( wp_unslash( $_GET[ $param ] ) ); |
|
514 | + $value = htmlspecialchars_decode( wp_unslash( $_GET[$param] ) ); |
|
515 | 515 | } |
516 | 516 | self::sanitize_value( $sanitize, $value ); |
517 | 517 | } else { |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | } |
533 | 533 | |
534 | 534 | $p = trim( $p, ']' ); |
535 | - $value = isset( $value[ $p ] ) ? $value[ $p ] : $default; |
|
535 | + $value = isset( $value[$p] ) ? $value[$p] : $default; |
|
536 | 536 | } |
537 | 537 | } |
538 | 538 | |
@@ -588,26 +588,26 @@ discard block |
||
588 | 588 | 'sanitize' => 'sanitize_text_field', |
589 | 589 | 'serialized' => false, |
590 | 590 | ); |
591 | - $args = wp_parse_args( $args, $defaults ); |
|
591 | + $args = wp_parse_args( $args, $defaults ); |
|
592 | 592 | |
593 | 593 | $value = $args['default']; |
594 | 594 | if ( $args['type'] === 'get' ) { |
595 | - if ( $_GET && isset( $_GET[ $args['param'] ] ) ) { |
|
595 | + if ( $_GET && isset( $_GET[$args['param']] ) ) { |
|
596 | 596 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
597 | - $value = wp_unslash( $_GET[ $args['param'] ] ); |
|
597 | + $value = wp_unslash( $_GET[$args['param']] ); |
|
598 | 598 | } |
599 | 599 | } elseif ( $args['type'] === 'post' ) { |
600 | - if ( isset( $_POST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
600 | + if ( isset( $_POST[$args['param']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
601 | 601 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing |
602 | - $value = wp_unslash( $_POST[ $args['param'] ] ); |
|
602 | + $value = wp_unslash( $_POST[$args['param']] ); |
|
603 | 603 | if ( $args['serialized'] === true && is_serialized_string( $value ) && is_serialized( $value ) ) { |
604 | 604 | self::unserialize_or_decode( $value ); |
605 | 605 | } |
606 | 606 | } |
607 | 607 | } else { |
608 | - if ( isset( $_REQUEST[ $args['param'] ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
608 | + if ( isset( $_REQUEST[$args['param']] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing |
|
609 | 609 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
610 | - $value = wp_unslash( $_REQUEST[ $args['param'] ] ); |
|
610 | + $value = wp_unslash( $_REQUEST[$args['param']] ); |
|
611 | 611 | } |
612 | 612 | } |
613 | 613 | |
@@ -639,7 +639,7 @@ discard block |
||
639 | 639 | if ( is_array( $value ) ) { |
640 | 640 | $temp_values = $value; |
641 | 641 | foreach ( $temp_values as $k => $v ) { |
642 | - self::sanitize_value( $sanitize, $value[ $k ] ); |
|
642 | + self::sanitize_value( $sanitize, $value[$k] ); |
|
643 | 643 | } |
644 | 644 | } else { |
645 | 645 | $value = call_user_func( $sanitize, $value ); |
@@ -650,8 +650,8 @@ discard block |
||
650 | 650 | public static function sanitize_request( $sanitize_method, &$values ) { |
651 | 651 | $temp_values = $values; |
652 | 652 | foreach ( $temp_values as $k => $val ) { |
653 | - if ( isset( $sanitize_method[ $k ] ) ) { |
|
654 | - $values[ $k ] = call_user_func( $sanitize_method[ $k ], $val ); |
|
653 | + if ( isset( $sanitize_method[$k] ) ) { |
|
654 | + $values[$k] = call_user_func( $sanitize_method[$k], $val ); |
|
655 | 655 | } |
656 | 656 | } |
657 | 657 | } |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | if ( is_array( $value ) ) { |
675 | 675 | $temp_values = $value; |
676 | 676 | foreach ( $temp_values as $k => $v ) { |
677 | - self::decode_specialchars( $value[ $k ] ); |
|
677 | + self::decode_specialchars( $value[$k] ); |
|
678 | 678 | } |
679 | 679 | } else { |
680 | 680 | self::decode_amp( $value ); |
@@ -796,7 +796,7 @@ discard block |
||
796 | 796 | * @return array |
797 | 797 | */ |
798 | 798 | public static function add_allowed_submit_button_tags( $allowed_html ) { |
799 | - $allowed_html['input'] = array( |
|
799 | + $allowed_html['input'] = array( |
|
800 | 800 | 'type' => true, |
801 | 801 | 'value' => true, |
802 | 802 | 'formnovalidate' => true, |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | $allowed_html = $html; |
820 | 820 | } elseif ( ! empty( $allowed ) ) { |
821 | 821 | foreach ( (array) $allowed as $a ) { |
822 | - $allowed_html[ $a ] = isset( $html[ $a ] ) ? $html[ $a ] : array(); |
|
822 | + $allowed_html[$a] = isset( $html[$a] ) ? $html[$a] : array(); |
|
823 | 823 | } |
824 | 824 | } |
825 | 825 | |
@@ -998,8 +998,8 @@ discard block |
||
998 | 998 | } |
999 | 999 | |
1000 | 1000 | global $wp_query; |
1001 | - if ( isset( $wp_query->query_vars[ $param ] ) ) { |
|
1002 | - $value = $wp_query->query_vars[ $param ]; |
|
1001 | + if ( isset( $wp_query->query_vars[$param] ) ) { |
|
1002 | + $value = $wp_query->query_vars[$param]; |
|
1003 | 1003 | } |
1004 | 1004 | |
1005 | 1005 | return $value; |
@@ -1028,9 +1028,9 @@ discard block |
||
1028 | 1028 | 'frm_keyalt_icon' => 'frm_key_icon', |
1029 | 1029 | 'frm_keyalt_solid_icon' => 'frm_key_solid_icon', |
1030 | 1030 | ); |
1031 | - if ( isset( $deprecated[ $icon ] ) ) { |
|
1032 | - $icon = $deprecated[ $icon ]; |
|
1033 | - $class = str_replace( $icon, $deprecated[ $icon ], $class ); |
|
1031 | + if ( isset( $deprecated[$icon] ) ) { |
|
1032 | + $icon = $deprecated[$icon]; |
|
1033 | + $class = str_replace( $icon, $deprecated[$icon], $class ); |
|
1034 | 1034 | } |
1035 | 1035 | |
1036 | 1036 | if ( $icon === $class ) { |
@@ -1363,7 +1363,7 @@ discard block |
||
1363 | 1363 | 'new_file_path' => self::plugin_path() . '/js', |
1364 | 1364 | ) |
1365 | 1365 | ); |
1366 | - $new_file = new FrmCreateFile( $file_atts ); |
|
1366 | + $new_file = new FrmCreateFile( $file_atts ); |
|
1367 | 1367 | |
1368 | 1368 | $files = array( |
1369 | 1369 | self::plugin_path() . '/js/formidable.min.js', |
@@ -1382,7 +1382,7 @@ discard block |
||
1382 | 1382 | 'new_file_path' => self::plugin_path() . '/js', |
1383 | 1383 | ) |
1384 | 1384 | ); |
1385 | - $new_file = new FrmCreateFile( $file_atts ); |
|
1385 | + $new_file = new FrmCreateFile( $file_atts ); |
|
1386 | 1386 | $files = array( |
1387 | 1387 | FrmStrpLiteAppHelper::plugin_path() . 'js/frmstrp.min.js', |
1388 | 1388 | ); |
@@ -1873,8 +1873,8 @@ discard block |
||
1873 | 1873 | return $error; |
1874 | 1874 | } |
1875 | 1875 | |
1876 | - $nonce_value = ( $_REQUEST && isset( $_REQUEST[ $nonce_name ] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST[ $nonce_name ] ) ) : ''; |
|
1877 | - if ( $_REQUEST && ( ! isset( $_REQUEST[ $nonce_name ] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) { |
|
1876 | + $nonce_value = ( $_REQUEST && isset( $_REQUEST[$nonce_name] ) ) ? sanitize_text_field( wp_unslash( $_REQUEST[$nonce_name] ) ) : ''; |
|
1877 | + if ( $_REQUEST && ( ! isset( $_REQUEST[$nonce_name] ) || ! wp_verify_nonce( $nonce_value, $nonce ) ) ) { |
|
1878 | 1878 | $frm_settings = self::get_settings(); |
1879 | 1879 | $error = $frm_settings->admin_permission; |
1880 | 1880 | } |
@@ -1909,7 +1909,7 @@ discard block |
||
1909 | 1909 | } else { |
1910 | 1910 | foreach ( $value as $k => $v ) { |
1911 | 1911 | if ( ! is_array( $v ) ) { |
1912 | - $value[ $k ] = call_user_func( $original_function, $v ); |
|
1912 | + $value[$k] = call_user_func( $original_function, $v ); |
|
1913 | 1913 | } |
1914 | 1914 | } |
1915 | 1915 | } |
@@ -1934,7 +1934,7 @@ discard block |
||
1934 | 1934 | $return = array_merge( $return, self::array_flatten( $value, $keys ) ); |
1935 | 1935 | } else { |
1936 | 1936 | if ( $keys === 'keep' ) { |
1937 | - $return[ $key ] = $value; |
|
1937 | + $return[$key] = $value; |
|
1938 | 1938 | } else { |
1939 | 1939 | $return[] = $value; |
1940 | 1940 | } |
@@ -1987,11 +1987,11 @@ discard block |
||
1987 | 1987 | } |
1988 | 1988 | |
1989 | 1989 | $ver = $default; |
1990 | - if ( ! isset( $wp_scripts->registered[ $handle ] ) ) { |
|
1990 | + if ( ! isset( $wp_scripts->registered[$handle] ) ) { |
|
1991 | 1991 | return $ver; |
1992 | 1992 | } |
1993 | 1993 | |
1994 | - $query = $wp_scripts->registered[ $handle ]; |
|
1994 | + $query = $wp_scripts->registered[$handle]; |
|
1995 | 1995 | if ( is_object( $query ) && ! empty( $query->ver ) ) { |
1996 | 1996 | $ver = $query->ver; |
1997 | 1997 | } |
@@ -2097,7 +2097,7 @@ discard block |
||
2097 | 2097 | $suffix = 2; |
2098 | 2098 | do { |
2099 | 2099 | $key_check = $key . $separator . $suffix; |
2100 | - ++$suffix; |
|
2100 | + ++ $suffix; |
|
2101 | 2101 | } while ( in_array( $key_check, $similar_keys, true ) ); |
2102 | 2102 | |
2103 | 2103 | $key = $key_check; |
@@ -2205,7 +2205,7 @@ discard block |
||
2205 | 2205 | |
2206 | 2206 | foreach ( array( 'name', 'description' ) as $var ) { |
2207 | 2207 | $default_val = isset( $record->{$var} ) ? $record->{$var} : ''; |
2208 | - $values[ $var ] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' ); |
|
2208 | + $values[$var] = self::get_param( $var, $default_val, 'get', 'wp_kses_post' ); |
|
2209 | 2209 | unset( $var, $default_val ); |
2210 | 2210 | } |
2211 | 2211 | |
@@ -2263,9 +2263,9 @@ discard block |
||
2263 | 2263 | } |
2264 | 2264 | }//end if |
2265 | 2265 | |
2266 | - $field_type = isset( $post_values['field_options'][ 'type_' . $field->id ] ) ? $post_values['field_options'][ 'type_' . $field->id ] : $field->type; |
|
2267 | - if ( isset( $post_values['item_meta'][ $field->id ] ) ) { |
|
2268 | - $new_value = $post_values['item_meta'][ $field->id ]; |
|
2266 | + $field_type = isset( $post_values['field_options']['type_' . $field->id] ) ? $post_values['field_options']['type_' . $field->id] : $field->type; |
|
2267 | + if ( isset( $post_values['item_meta'][$field->id] ) ) { |
|
2268 | + $new_value = $post_values['item_meta'][$field->id]; |
|
2269 | 2269 | self::unserialize_or_decode( $new_value ); |
2270 | 2270 | } else { |
2271 | 2271 | $new_value = $meta_value; |
@@ -2286,7 +2286,7 @@ discard block |
||
2286 | 2286 | |
2287 | 2287 | $field_array = array_merge( (array) $field->field_options, $field_array ); |
2288 | 2288 | |
2289 | - $values['fields'][ $field->id ] = $field_array; |
|
2289 | + $values['fields'][$field->id] = $field_array; |
|
2290 | 2290 | } |
2291 | 2291 | |
2292 | 2292 | /** |
@@ -2336,11 +2336,11 @@ discard block |
||
2336 | 2336 | } |
2337 | 2337 | |
2338 | 2338 | foreach ( $form->options as $opt => $value ) { |
2339 | - if ( isset( $post_values[ $opt ] ) ) { |
|
2340 | - $values[ $opt ] = $post_values[ $opt ]; |
|
2341 | - self::unserialize_or_decode( $values[ $opt ] ); |
|
2339 | + if ( isset( $post_values[$opt] ) ) { |
|
2340 | + $values[$opt] = $post_values[$opt]; |
|
2341 | + self::unserialize_or_decode( $values[$opt] ); |
|
2342 | 2342 | } else { |
2343 | - $values[ $opt ] = $value; |
|
2343 | + $values[$opt] = $value; |
|
2344 | 2344 | } |
2345 | 2345 | } |
2346 | 2346 | |
@@ -2354,8 +2354,8 @@ discard block |
||
2354 | 2354 | $form_defaults = FrmFormsHelper::get_default_opts(); |
2355 | 2355 | |
2356 | 2356 | foreach ( $form_defaults as $opt => $default ) { |
2357 | - if ( ! isset( $values[ $opt ] ) || $values[ $opt ] == '' ) { |
|
2358 | - $values[ $opt ] = ( $post_values && isset( $post_values['options'][ $opt ] ) ) ? $post_values['options'][ $opt ] : $default; |
|
2357 | + if ( ! isset( $values[$opt] ) || $values[$opt] == '' ) { |
|
2358 | + $values[$opt] = ( $post_values && isset( $post_values['options'][$opt] ) ) ? $post_values['options'][$opt] : $default; |
|
2359 | 2359 | } |
2360 | 2360 | |
2361 | 2361 | unset( $opt, $default ); |
@@ -2366,8 +2366,8 @@ discard block |
||
2366 | 2366 | } |
2367 | 2367 | |
2368 | 2368 | foreach ( array( 'before', 'after', 'submit' ) as $h ) { |
2369 | - if ( ! isset( $values[ $h . '_html' ] ) ) { |
|
2370 | - $values[ $h . '_html' ] = ( isset( $post_values['options'][ $h . '_html' ] ) ? $post_values['options'][ $h . '_html' ] : FrmFormsHelper::get_default_html( $h ) ); |
|
2369 | + if ( ! isset( $values[$h . '_html'] ) ) { |
|
2370 | + $values[$h . '_html'] = ( isset( $post_values['options'][$h . '_html'] ) ? $post_values['options'][$h . '_html'] : FrmFormsHelper::get_default_html( $h ) ); |
|
2371 | 2371 | } |
2372 | 2372 | unset( $h ); |
2373 | 2373 | } |
@@ -2545,25 +2545,25 @@ discard block |
||
2545 | 2545 | if ( ! is_numeric( $levels ) ) { |
2546 | 2546 | // Show time in specified unit. |
2547 | 2547 | $levels = self::get_unit( $levels ); |
2548 | - if ( isset( $time_strings[ $levels ] ) ) { |
|
2548 | + if ( isset( $time_strings[$levels] ) ) { |
|
2549 | 2549 | $diff = array( |
2550 | 2550 | $levels => self::time_format( $levels, $diff ), |
2551 | 2551 | ); |
2552 | 2552 | $time_strings = array( |
2553 | - $levels => $time_strings[ $levels ], |
|
2553 | + $levels => $time_strings[$levels], |
|
2554 | 2554 | ); |
2555 | 2555 | } |
2556 | 2556 | $levels = 1; |
2557 | 2557 | } |
2558 | 2558 | |
2559 | 2559 | foreach ( $time_strings as $k => $v ) { |
2560 | - if ( isset( $diff[ $k ] ) && $diff[ $k ] ) { |
|
2561 | - $time_strings[ $k ] = $diff[ $k ] . ' ' . ( $diff[ $k ] > 1 ? $v[1] : $v[0] ); |
|
2562 | - } elseif ( isset( $diff[ $k ] ) && count( $time_strings ) === 1 ) { |
|
2560 | + if ( isset( $diff[$k] ) && $diff[$k] ) { |
|
2561 | + $time_strings[$k] = $diff[$k] . ' ' . ( $diff[$k] > 1 ? $v[1] : $v[0] ); |
|
2562 | + } elseif ( isset( $diff[$k] ) && count( $time_strings ) === 1 ) { |
|
2563 | 2563 | // Account for 0. |
2564 | - $time_strings[ $k ] = $diff[ $k ] . ' ' . $v[1]; |
|
2564 | + $time_strings[$k] = $diff[$k] . ' ' . $v[1]; |
|
2565 | 2565 | } else { |
2566 | - unset( $time_strings[ $k ] ); |
|
2566 | + unset( $time_strings[$k] ); |
|
2567 | 2567 | } |
2568 | 2568 | } |
2569 | 2569 | |
@@ -2582,8 +2582,8 @@ discard block |
||
2582 | 2582 | 'y' => 'y', |
2583 | 2583 | 'd' => 'days', |
2584 | 2584 | ); |
2585 | - if ( isset( $return[ $unit ] ) ) { |
|
2586 | - return $diff[ $return[ $unit ] ]; |
|
2585 | + if ( isset( $return[$unit] ) ) { |
|
2586 | + return $diff[$return[$unit]]; |
|
2587 | 2587 | } |
2588 | 2588 | |
2589 | 2589 | $total = $diff['days'] * self::convert_time( 'd', $unit ); |
@@ -2591,11 +2591,11 @@ discard block |
||
2591 | 2591 | $times = array( 'h', 'i', 's' ); |
2592 | 2592 | |
2593 | 2593 | foreach ( $times as $time ) { |
2594 | - if ( ! isset( $diff[ $time ] ) ) { |
|
2594 | + if ( ! isset( $diff[$time] ) ) { |
|
2595 | 2595 | continue; |
2596 | 2596 | } |
2597 | 2597 | |
2598 | - $total += $diff[ $time ] * self::convert_time( $time, $unit ); |
|
2598 | + $total += $diff[$time] * self::convert_time( $time, $unit ); |
|
2599 | 2599 | } |
2600 | 2600 | |
2601 | 2601 | return floor( $total ); |
@@ -2615,7 +2615,7 @@ discard block |
||
2615 | 2615 | 'y' => DAY_IN_SECONDS * 365.25, |
2616 | 2616 | ); |
2617 | 2617 | |
2618 | - return $convert[ $from ] / $convert[ $to ]; |
|
2618 | + return $convert[$from] / $convert[$to]; |
|
2619 | 2619 | } |
2620 | 2620 | |
2621 | 2621 | /** |
@@ -2623,7 +2623,7 @@ discard block |
||
2623 | 2623 | */ |
2624 | 2624 | private static function get_unit( $unit ) { |
2625 | 2625 | $units = self::get_time_strings(); |
2626 | - if ( isset( $units[ $unit ] ) || is_numeric( $unit ) ) { |
|
2626 | + if ( isset( $units[$unit] ) || is_numeric( $unit ) ) { |
|
2627 | 2627 | return $unit; |
2628 | 2628 | } |
2629 | 2629 | |
@@ -2740,17 +2740,17 @@ discard block |
||
2740 | 2740 | |
2741 | 2741 | case 1: |
2742 | 2742 | $l2 = $name; |
2743 | - self::add_value_to_array( $name, $l2, $this_val, $vars[ $l1 ] ); |
|
2743 | + self::add_value_to_array( $name, $l2, $this_val, $vars[$l1] ); |
|
2744 | 2744 | break; |
2745 | 2745 | |
2746 | 2746 | case 2: |
2747 | 2747 | $l3 = $name; |
2748 | - self::add_value_to_array( $name, $l3, $this_val, $vars[ $l1 ][ $l2 ] ); |
|
2748 | + self::add_value_to_array( $name, $l3, $this_val, $vars[$l1][$l2] ); |
|
2749 | 2749 | break; |
2750 | 2750 | |
2751 | 2751 | case 3: |
2752 | 2752 | $l4 = $name; |
2753 | - self::add_value_to_array( $name, $l4, $this_val, $vars[ $l1 ][ $l2 ][ $l3 ] ); |
|
2753 | + self::add_value_to_array( $name, $l4, $this_val, $vars[$l1][$l2][$l3] ); |
|
2754 | 2754 | } |
2755 | 2755 | |
2756 | 2756 | unset( $this_val, $n ); |
@@ -2769,8 +2769,8 @@ discard block |
||
2769 | 2769 | public static function add_value_to_array( $name, $l1, $val, &$vars ) { |
2770 | 2770 | if ( $name == '' ) { |
2771 | 2771 | $vars[] = $val; |
2772 | - } elseif ( ! isset( $vars[ $l1 ] ) ) { |
|
2773 | - $vars[ $l1 ] = $val; |
|
2772 | + } elseif ( ! isset( $vars[$l1] ) ) { |
|
2773 | + $vars[$l1] = $val; |
|
2774 | 2774 | } |
2775 | 2775 | } |
2776 | 2776 | |
@@ -2787,7 +2787,7 @@ discard block |
||
2787 | 2787 | 'new_tab' => __( 'This option will open the link in a new browser tab. Please note that some popup blockers may prevent this from happening, in which case the link will be displayed.', 'formidable' ), |
2788 | 2788 | ); |
2789 | 2789 | |
2790 | - if ( ! isset( $tooltips[ $name ] ) ) { |
|
2790 | + if ( ! isset( $tooltips[$name] ) ) { |
|
2791 | 2791 | return; |
2792 | 2792 | } |
2793 | 2793 | |
@@ -2797,7 +2797,7 @@ discard block |
||
2797 | 2797 | echo ' class="frm_help"'; |
2798 | 2798 | } |
2799 | 2799 | |
2800 | - echo ' title="' . esc_attr( $tooltips[ $name ] ); |
|
2800 | + echo ' title="' . esc_attr( $tooltips[$name] ); |
|
2801 | 2801 | |
2802 | 2802 | if ( 'open' != $class ) { |
2803 | 2803 | echo '"'; |
@@ -2856,13 +2856,13 @@ discard block |
||
2856 | 2856 | } |
2857 | 2857 | |
2858 | 2858 | private static function prepare_action_slashes( $val, $key, &$post_content ) { |
2859 | - if ( ! isset( $post_content[ $key ] ) || is_numeric( $val ) ) { |
|
2859 | + if ( ! isset( $post_content[$key] ) || is_numeric( $val ) ) { |
|
2860 | 2860 | return; |
2861 | 2861 | } |
2862 | 2862 | |
2863 | 2863 | if ( is_array( $val ) ) { |
2864 | 2864 | foreach ( $val as $k1 => $v1 ) { |
2865 | - self::prepare_action_slashes( $v1, $k1, $post_content[ $key ] ); |
|
2865 | + self::prepare_action_slashes( $v1, $k1, $post_content[$key] ); |
|
2866 | 2866 | unset( $k1, $v1 ); |
2867 | 2867 | } |
2868 | 2868 | } else { |
@@ -2870,7 +2870,7 @@ discard block |
||
2870 | 2870 | $val = stripslashes( $val ); |
2871 | 2871 | |
2872 | 2872 | // Add backslashes before double quotes and forward slashes only |
2873 | - $post_content[ $key ] = addcslashes( $val, '"\\/' ); |
|
2873 | + $post_content[$key] = addcslashes( $val, '"\\/' ); |
|
2874 | 2874 | } |
2875 | 2875 | } |
2876 | 2876 | |
@@ -2991,14 +2991,14 @@ discard block |
||
2991 | 2991 | continue; |
2992 | 2992 | } |
2993 | 2993 | $key = $input['name']; |
2994 | - if ( isset( $formatted[ $key ] ) ) { |
|
2995 | - if ( is_array( $formatted[ $key ] ) ) { |
|
2996 | - $formatted[ $key ][] = $input['value']; |
|
2994 | + if ( isset( $formatted[$key] ) ) { |
|
2995 | + if ( is_array( $formatted[$key] ) ) { |
|
2996 | + $formatted[$key][] = $input['value']; |
|
2997 | 2997 | } else { |
2998 | - $formatted[ $key ] = array( $formatted[ $key ], $input['value'] ); |
|
2998 | + $formatted[$key] = array( $formatted[$key], $input['value'] ); |
|
2999 | 2999 | } |
3000 | 3000 | } else { |
3001 | - $formatted[ $key ] = $input['value']; |
|
3001 | + $formatted[$key] = $input['value']; |
|
3002 | 3002 | } |
3003 | 3003 | } |
3004 | 3004 | |
@@ -3695,8 +3695,8 @@ discard block |
||
3695 | 3695 | } |
3696 | 3696 | |
3697 | 3697 | foreach ( $keys as $key ) { |
3698 | - if ( isset( $values[ $key ] ) ) { |
|
3699 | - $values[ $key ] = self::kses( $values[ $key ], 'all' ); |
|
3698 | + if ( isset( $values[$key] ) ) { |
|
3699 | + $values[$key] = self::kses( $values[$key], 'all' ); |
|
3700 | 3700 | } |
3701 | 3701 | } |
3702 | 3702 | |
@@ -3855,7 +3855,7 @@ discard block |
||
3855 | 3855 | return 0; |
3856 | 3856 | } |
3857 | 3857 | |
3858 | - return strlen( $parts[ count( $parts ) - 1 ] ); |
|
3858 | + return strlen( $parts[count( $parts ) - 1] ); |
|
3859 | 3859 | } |
3860 | 3860 | |
3861 | 3861 | /** |