@@ -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 | } |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | $field_val = ''; |
145 | 145 | if ( is_object( $this->field ) ) { |
146 | 146 | $field_val = $this->field->{$column}; |
147 | - } elseif ( is_array( $this->field ) && isset( $this->field[ $column ] ) ) { |
|
148 | - $field_val = $this->field[ $column ]; |
|
147 | + } elseif ( is_array( $this->field ) && isset( $this->field[$column] ) ) { |
|
148 | + $field_val = $this->field[$column]; |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | return $field_val; |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | if ( is_object( $this->field ) ) { |
160 | 160 | $this->field->{$column} = $value; |
161 | 161 | } elseif ( is_array( $this->field ) ) { |
162 | - $this->field[ $column ] = $value; |
|
162 | + $this->field[$column] = $value; |
|
163 | 163 | } |
164 | 164 | } |
165 | 165 | |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | printf( |
549 | 549 | /* translators: %s: Field type */ |
550 | 550 | esc_html__( '%s Options', 'formidable' ), |
551 | - esc_html( $all_field_types[ $args['display']['type'] ]['name'] ) |
|
551 | + esc_html( $all_field_types[$args['display']['type']]['name'] ) |
|
552 | 552 | ); |
553 | 553 | FrmAppHelper::icon_by_class( 'frmfont frm_arrowdown6_icon', array( 'aria-hidden' => 'true' ) ); |
554 | 554 | ?> |
@@ -681,8 +681,8 @@ discard block |
||
681 | 681 | |
682 | 682 | $fields = array_merge( $fields, $pro_fields ); |
683 | 683 | |
684 | - if ( isset( $fields[ $this->type ] ) ) { |
|
685 | - $name = is_array( $fields[ $this->type ] ) ? $fields[ $this->type ]['name'] : $fields[ $this->type ]; |
|
684 | + if ( isset( $fields[$this->type] ) ) { |
|
685 | + $name = is_array( $fields[$this->type] ) ? $fields[$this->type]['name'] : $fields[$this->type]; |
|
686 | 686 | } |
687 | 687 | |
688 | 688 | return $name; |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | * @return array |
700 | 700 | */ |
701 | 701 | public function get_default_field_options() { |
702 | - $opts = array( |
|
702 | + $opts = array( |
|
703 | 703 | 'size' => '', |
704 | 704 | 'max' => '', |
705 | 705 | 'label' => '', |
@@ -1066,7 +1066,7 @@ discard block |
||
1066 | 1066 | } |
1067 | 1067 | } else { |
1068 | 1068 | $args['save_array'] = $this->is_readonly_array(); |
1069 | - $hidden .= $this->show_single_hidden( $selected_value, $args ); |
|
1069 | + $hidden .= $this->show_single_hidden( $selected_value, $args ); |
|
1070 | 1070 | } |
1071 | 1071 | |
1072 | 1072 | return $hidden; |
@@ -1075,7 +1075,7 @@ discard block |
||
1075 | 1075 | protected function show_single_hidden( $selected, $args ) { |
1076 | 1076 | if ( $args['save_array'] ) { |
1077 | 1077 | $args['field_name'] .= '[]'; |
1078 | - $id = ''; |
|
1078 | + $id = ''; |
|
1079 | 1079 | } else { |
1080 | 1080 | $id = ' id="' . esc_attr( $args['html_id'] ) . '"'; |
1081 | 1081 | } |
@@ -1091,8 +1091,8 @@ discard block |
||
1091 | 1091 | $selected = $values['field_value']; |
1092 | 1092 | |
1093 | 1093 | if ( isset( $values['combo_name'] ) ) { |
1094 | - $options = $options[ $values['combo_name'] ]; |
|
1095 | - $selected = ( is_array( $selected ) && isset( $selected[ $values['combo_name'] ] ) ) ? $selected[ $values['combo_name'] ] : ''; |
|
1094 | + $options = $options[$values['combo_name']]; |
|
1095 | + $selected = ( is_array( $selected ) && isset( $selected[$values['combo_name']] ) ) ? $selected[$values['combo_name']] : ''; |
|
1096 | 1096 | } |
1097 | 1097 | |
1098 | 1098 | $input = $this->select_tag( $values ); |
@@ -1143,7 +1143,7 @@ discard block |
||
1143 | 1143 | } |
1144 | 1144 | |
1145 | 1145 | protected function fill_display_field_values( $args = array() ) { |
1146 | - $defaults = array( |
|
1146 | + $defaults = array( |
|
1147 | 1147 | 'field_name' => 'item_meta[' . $this->get_field_column( 'id' ) . ']', |
1148 | 1148 | 'field_id' => $this->get_field_column( 'id' ), |
1149 | 1149 | 'field_plus_id' => '', |
@@ -1196,7 +1196,7 @@ discard block |
||
1196 | 1196 | } |
1197 | 1197 | } |
1198 | 1198 | |
1199 | - if ( isset( $args['errors'][ 'field' . $args['field_id'] ] ) && ! $custom_error_fields ) { |
|
1199 | + if ( isset( $args['errors']['field' . $args['field_id']] ) && ! $custom_error_fields ) { |
|
1200 | 1200 | if ( $error_comes_first ) { |
1201 | 1201 | array_unshift( $describedby, 'frm_error_' . $args['html_id'] ); |
1202 | 1202 | } else { |
@@ -1275,11 +1275,11 @@ discard block |
||
1275 | 1275 | |
1276 | 1276 | $field_id = $this->get_field_column( 'id' ); |
1277 | 1277 | if ( ! array_key_exists( $field_id, $frm_validated_unique_values ) ) { |
1278 | - $frm_validated_unique_values[ $field_id ] = array(); |
|
1278 | + $frm_validated_unique_values[$field_id] = array(); |
|
1279 | 1279 | return false; |
1280 | 1280 | } |
1281 | 1281 | |
1282 | - $already_validated_this_value = in_array( $value, $frm_validated_unique_values[ $field_id ], true ); |
|
1282 | + $already_validated_this_value = in_array( $value, $frm_validated_unique_values[$field_id], true ); |
|
1283 | 1283 | return $already_validated_this_value; |
1284 | 1284 | } |
1285 | 1285 | |
@@ -1304,7 +1304,7 @@ discard block |
||
1304 | 1304 | private function value_validated_as_unique( $value ) { |
1305 | 1305 | global $frm_validated_unique_values; |
1306 | 1306 | $field_id = $this->get_field_column( 'id' ); |
1307 | - $frm_validated_unique_values[ $field_id ][] = $value; |
|
1307 | + $frm_validated_unique_values[$field_id][] = $value; |
|
1308 | 1308 | } |
1309 | 1309 | |
1310 | 1310 | public function get_value_to_save( $value, $atts ) { |
@@ -1336,8 +1336,8 @@ discard block |
||
1336 | 1336 | $value = $this->prepare_display_value( $value, $atts ); |
1337 | 1337 | |
1338 | 1338 | if ( is_array( $value ) ) { |
1339 | - if ( isset( $atts['show'] ) && $atts['show'] && isset( $value[ $atts['show'] ] ) ) { |
|
1340 | - $value = $value[ $atts['show'] ]; |
|
1339 | + if ( isset( $atts['show'] ) && $atts['show'] && isset( $value[$atts['show']] ) ) { |
|
1340 | + $value = $value[$atts['show']]; |
|
1341 | 1341 | } elseif ( ! isset( $atts['return_array'] ) || ! $atts['return_array'] ) { |
1342 | 1342 | $sep = isset( $atts['sep'] ) ? $atts['sep'] : ', '; |
1343 | 1343 | $value = implode( $sep, $value ); |
@@ -1406,8 +1406,8 @@ discard block |
||
1406 | 1406 | $saved_entries = $atts['ids']; |
1407 | 1407 | $new_value = array(); |
1408 | 1408 | foreach ( (array) $value as $old_child_id ) { |
1409 | - if ( isset( $saved_entries[ $old_child_id ] ) ) { |
|
1410 | - $new_value[] = $saved_entries[ $old_child_id ]; |
|
1409 | + if ( isset( $saved_entries[$old_child_id] ) ) { |
|
1410 | + $new_value[] = $saved_entries[$old_child_id]; |
|
1411 | 1411 | } |
1412 | 1412 | } |
1413 | 1413 |