@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | * @return array |
| 359 | 359 | */ |
| 360 | 360 | public static function get_banner_tip() { |
| 361 | - $tips = array( |
|
| 361 | + $tips = array( |
|
| 362 | 362 | array( |
| 363 | 363 | 'link' => array( |
| 364 | 364 | 'medium' => 'banner', |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | ), |
| 386 | 386 | ); |
| 387 | 387 | $random = rand( 0, count( $tips ) - 1 ); |
| 388 | - $tip = $tips[ $random ]; |
|
| 388 | + $tip = $tips[$random]; |
|
| 389 | 389 | $tip['num'] = $random; |
| 390 | 390 | |
| 391 | 391 | return $tip; |
@@ -394,6 +394,6 @@ discard block |
||
| 394 | 394 | public static function get_random_tip( $tips ) { |
| 395 | 395 | $random = rand( 0, count( $tips ) - 1 ); |
| 396 | 396 | |
| 397 | - return $tips[ $random ]; |
|
| 397 | + return $tips[$random]; |
|
| 398 | 398 | } |
| 399 | 399 | } |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | return; |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | - $selected_xml = isset( $form['xml'] ) && isset( $form['xml'][ $selected_form ] ) ? $form['xml'][ $selected_form ] : ''; |
|
| 166 | + $selected_xml = isset( $form['xml'] ) && isset( $form['xml'][$selected_form] ) ? $form['xml'][$selected_form] : ''; |
|
| 167 | 167 | if ( empty( $selected_xml ) || strpos( $selected_xml, 'http' ) !== 0 ) { |
| 168 | 168 | return; |
| 169 | 169 | } |
@@ -178,8 +178,8 @@ discard block |
||
| 178 | 178 | * @param array $form |
| 179 | 179 | */ |
| 180 | 180 | private static function get_selected_in_form( $form, $value = 'form' ) { |
| 181 | - if ( ! empty( $form ) && isset( $form[ $value ] ) && ! empty( $form[ $value ] ) ) { |
|
| 182 | - return $form[ $value ]; |
|
| 181 | + if ( ! empty( $form ) && isset( $form[$value] ) && ! empty( $form[$value] ) ) { |
|
| 182 | + return $form[$value]; |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | return ''; |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | if ( $for === 'view' ) { |
| 211 | - $item_key = is_array( $view_keys ) ? $view_keys[ $form_key ] : $view_keys; |
|
| 211 | + $item_key = is_array( $view_keys ) ? $view_keys[$form_key] : $view_keys; |
|
| 212 | 212 | $shortcode = '[display-frm-data id=%1$s filter=limited]'; |
| 213 | 213 | } elseif ( $for === 'form' ) { |
| 214 | 214 | $item_key = $form_key; |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | continue; |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | - $page_ids[ $for ] = wp_insert_post( |
|
| 226 | + $page_ids[$for] = wp_insert_post( |
|
| 227 | 227 | array( |
| 228 | 228 | 'post_title' => $name, |
| 229 | 229 | 'post_type' => 'page', |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash |
| 378 | 378 | $file_type = sanitize_option( 'upload_path', $_FILES['frm_import_file']['name'] ); |
| 379 | 379 | $file_type = strtolower( pathinfo( $file_type, PATHINFO_EXTENSION ) ); |
| 380 | - if ( 'xml' !== $file_type && isset( $export_format[ $file_type ] ) ) { |
|
| 380 | + if ( 'xml' !== $file_type && isset( $export_format[$file_type] ) ) { |
|
| 381 | 381 | // allow other file types to be imported |
| 382 | 382 | do_action( 'frm_before_import_' . $file_type ); |
| 383 | 383 | |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | foreach ( $type as $tb_type ) { |
| 471 | 471 | $where = array(); |
| 472 | 472 | $join = ''; |
| 473 | - $table = $tables[ $tb_type ]; |
|
| 473 | + $table = $tables[$tb_type]; |
|
| 474 | 474 | |
| 475 | 475 | $select = $table . '.id'; |
| 476 | 476 | $query_vars = array(); |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | $table . '.parent_form_id' => $args['ids'], |
| 486 | 486 | ); |
| 487 | 487 | } else { |
| 488 | - $where[ $table . '.status !' ] = 'draft'; |
|
| 488 | + $where[$table . '.status !'] = 'draft'; |
|
| 489 | 489 | } |
| 490 | 490 | break; |
| 491 | 491 | case 'actions': |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | case 'items': |
| 499 | 499 | // $join = "INNER JOIN {$wpdb->prefix}frm_item_metas im ON ($table.id = im.item_id)"; |
| 500 | 500 | if ( $args['ids'] ) { |
| 501 | - $where[ $table . '.form_id' ] = $args['ids']; |
|
| 501 | + $where[$table . '.form_id'] = $args['ids']; |
|
| 502 | 502 | } |
| 503 | 503 | break; |
| 504 | 504 | case 'styles': |
@@ -539,7 +539,7 @@ discard block |
||
| 539 | 539 | } |
| 540 | 540 | } |
| 541 | 541 | |
| 542 | - $records[ $tb_type ] = FrmDb::get_col( $table . $join, $where, $select ); |
|
| 542 | + $records[$tb_type] = FrmDb::get_col( $table . $join, $where, $select ); |
|
| 543 | 543 | unset( $tb_type ); |
| 544 | 544 | } |
| 545 | 545 | |
@@ -710,7 +710,7 @@ discard block |
||
| 710 | 710 | $no_export_fields = FrmField::no_save_fields(); |
| 711 | 711 | foreach ( $csv_fields as $k => $f ) { |
| 712 | 712 | if ( in_array( $f->type, $no_export_fields, true ) ) { |
| 713 | - unset( $csv_fields[ $k ] ); |
|
| 713 | + unset( $csv_fields[$k] ); |
|
| 714 | 714 | } |
| 715 | 715 | } |
| 716 | 716 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | //validate the number format |
| 65 | 65 | if ( ! is_numeric( $args['value'] ) && '' !== $args['value'] ) { |
| 66 | - $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); |
|
| 66 | + $errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | // validate number settings |
@@ -75,9 +75,9 @@ discard block |
||
| 75 | 75 | if ( $frm_settings->use_html && $maxnum !== '' && $minnum !== '' ) { |
| 76 | 76 | $value = (float) $args['value']; |
| 77 | 77 | if ( $value < $minnum ) { |
| 78 | - $errors[ 'field' . $args['id'] ] = __( 'Please select a higher number', 'formidable' ); |
|
| 78 | + $errors['field' . $args['id']] = __( 'Please select a higher number', 'formidable' ); |
|
| 79 | 79 | } elseif ( $value > $maxnum ) { |
| 80 | - $errors[ 'field' . $args['id'] ] = __( 'Please select a lower number', 'formidable' ); |
|
| 80 | + $errors['field' . $args['id']] = __( 'Please select a lower number', 'formidable' ); |
|
| 81 | 81 | } |
| 82 | 82 | } |
| 83 | 83 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | * @return void |
| 99 | 99 | */ |
| 100 | 100 | private function validate_step( &$errors, $args ) { |
| 101 | - if ( isset( $errors[ 'field' . $args['id'] ] ) ) { |
|
| 101 | + if ( isset( $errors['field' . $args['id']] ) ) { |
|
| 102 | 102 | return; // Don't need to check if value is invalid before. |
| 103 | 103 | } |
| 104 | 104 | |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | return; |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - $errors[ 'field' . $args['id'] ] = sprintf( |
|
| 115 | + $errors['field' . $args['id']] = sprintf( |
|
| 116 | 116 | // Translators: %1$s: the first nearest value; %2$s: the second nearest value. |
| 117 | 117 | __( 'Please enter a valid value. Two nearest valid values are %1$s and %2$s', 'formidable' ), |
| 118 | 118 | floatval( $result[0] ), |
@@ -181,12 +181,12 @@ discard block |
||
| 181 | 181 | * @return array |
| 182 | 182 | */ |
| 183 | 183 | private function prepare_array_property( $index, $atts ) { |
| 184 | - if ( isset( $atts[ $index ] ) && ! empty( $atts[ $index ] ) ) { |
|
| 184 | + if ( isset( $atts[$index] ) && ! empty( $atts[$index] ) ) { |
|
| 185 | 185 | |
| 186 | - if ( is_array( $atts[ $index ] ) ) { |
|
| 187 | - $property = $atts[ $index ]; |
|
| 186 | + if ( is_array( $atts[$index] ) ) { |
|
| 187 | + $property = $atts[$index]; |
|
| 188 | 188 | } else { |
| 189 | - $property = explode( ',', $atts[ $index ] ); |
|
| 189 | + $property = explode( ',', $atts[$index] ); |
|
| 190 | 190 | } |
| 191 | 191 | } else { |
| 192 | 192 | $property = array(); |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | ); |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | - $ip = array( |
|
| 269 | + $ip = array( |
|
| 270 | 270 | 'label' => __( 'IP Address', 'formidable' ), |
| 271 | 271 | 'value' => $this->entry->ip, |
| 272 | 272 | ); |
@@ -356,6 +356,6 @@ discard block |
||
| 356 | 356 | * @return void |
| 357 | 357 | */ |
| 358 | 358 | protected function add_field_values( $field ) { |
| 359 | - $this->field_values[ $field->id ] = new FrmFieldValue( $field, $this->entry ); |
|
| 359 | + $this->field_values[$field->id] = new FrmFieldValue( $field, $this->entry ); |
|
| 360 | 360 | } |
| 361 | 361 | } |
@@ -80,12 +80,12 @@ discard block |
||
| 80 | 80 | $show_intervals = array( 50, 200, 500 ); |
| 81 | 81 | $asked = $this->review_status['asked']; |
| 82 | 82 | |
| 83 | - if ( ! isset( $show_intervals[ $asked ] ) ) { |
|
| 83 | + if ( ! isset( $show_intervals[$asked] ) ) { |
|
| 84 | 84 | return; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | $entries = FrmEntry::getRecordCount(); |
| 88 | - $count = $show_intervals[ $asked ]; |
|
| 88 | + $count = $show_intervals[$asked]; |
|
| 89 | 89 | $user = wp_get_current_user(); |
| 90 | 90 | |
| 91 | 91 | // Only show review request if the site has collected enough entries |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | $requests = $message->get_messages(); |
| 135 | 135 | $key = $this->inbox_key . ( $asked ? $asked : '' ); |
| 136 | 136 | |
| 137 | - if ( isset( $requests[ $key ] ) ) { |
|
| 137 | + if ( isset( $requests[$key] ) ) { |
|
| 138 | 138 | return; |
| 139 | 139 | } |
| 140 | 140 | |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | * @return bool |
| 174 | 174 | */ |
| 175 | 175 | private function has_later_request( $requests, $asked ) { |
| 176 | - return isset( $requests[ $this->inbox_key . ( $asked + 1 ) ] ) || isset( $requests[ $this->inbox_key . ( $asked + 2 ) ] ); |
|
| 176 | + return isset( $requests[$this->inbox_key . ( $asked + 1 )] ) || isset( $requests[$this->inbox_key . ( $asked + 2 )] ); |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | /** |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | return; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - if ( isset( self::$messages[ $message['key'] ] ) && ! isset( $message['force'] ) ) { |
|
| 108 | + if ( isset( self::$messages[$message['key']] ) && ! isset( $message['force'] ) ) { |
|
| 109 | 109 | // Don't replace messages unless required. |
| 110 | 110 | return; |
| 111 | 111 | } |
@@ -114,13 +114,13 @@ discard block |
||
| 114 | 114 | return; |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | - if ( isset( self::$messages[ $message['key'] ] ) ) { |
|
| 117 | + if ( isset( self::$messages[$message['key']] ) ) { |
|
| 118 | 118 | // Move up and mark as new. |
| 119 | - unset( self::$messages[ $message['key'] ] ); |
|
| 119 | + unset( self::$messages[$message['key']] ); |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | $this->fill_message( $message ); |
| 123 | - self::$messages[ $message['key'] ] = $message; |
|
| 123 | + self::$messages[$message['key']] = $message; |
|
| 124 | 124 | |
| 125 | 125 | $this->update_list(); |
| 126 | 126 | |
@@ -156,11 +156,11 @@ discard block |
||
| 156 | 156 | private function clean_messages() { |
| 157 | 157 | $removed = false; |
| 158 | 158 | foreach ( self::$messages as $t => $message ) { |
| 159 | - $read = isset( $message['read'] ) && ! empty( $message['read'] ) && isset( $message['read'][ get_current_user_id() ] ) && $message['read'][ get_current_user_id() ] < strtotime( '-1 month' ); |
|
| 160 | - $dismissed = isset( $message['dismissed'] ) && ! empty( $message['dismissed'] ) && isset( $message['dismissed'][ get_current_user_id() ] ) && $message['dismissed'][ get_current_user_id() ] < strtotime( '-1 week' ); |
|
| 159 | + $read = isset( $message['read'] ) && ! empty( $message['read'] ) && isset( $message['read'][get_current_user_id()] ) && $message['read'][get_current_user_id()] < strtotime( '-1 month' ); |
|
| 160 | + $dismissed = isset( $message['dismissed'] ) && ! empty( $message['dismissed'] ) && isset( $message['dismissed'][get_current_user_id()] ) && $message['dismissed'][get_current_user_id()] < strtotime( '-1 week' ); |
|
| 161 | 161 | $expired = $this->is_expired( $message ); |
| 162 | 162 | if ( $read || $expired || $dismissed ) { |
| 163 | - unset( self::$messages[ $t ] ); |
|
| 163 | + unset( self::$messages[$t] ); |
|
| 164 | 164 | $removed = true; |
| 165 | 165 | } |
| 166 | 166 | } |
@@ -176,11 +176,11 @@ discard block |
||
| 176 | 176 | private function filter_messages( &$messages ) { |
| 177 | 177 | $user_id = get_current_user_id(); |
| 178 | 178 | foreach ( $messages as $k => $message ) { |
| 179 | - $dismissed = isset( $message['dismissed'] ) && isset( $message['dismissed'][ $user_id ] ); |
|
| 179 | + $dismissed = isset( $message['dismissed'] ) && isset( $message['dismissed'][$user_id] ); |
|
| 180 | 180 | if ( empty( $k ) || $this->is_expired( $message ) || $dismissed ) { |
| 181 | - unset( $messages[ $k ] ); |
|
| 181 | + unset( $messages[$k] ); |
|
| 182 | 182 | } elseif ( ! $this->is_for_user( $message ) ) { |
| 183 | - unset( $messages[ $k ] ); |
|
| 183 | + unset( $messages[$k] ); |
|
| 184 | 184 | } |
| 185 | 185 | } |
| 186 | 186 | $messages = apply_filters( 'frm_filter_inbox', $messages ); |
@@ -226,14 +226,14 @@ discard block |
||
| 226 | 226 | * @return void |
| 227 | 227 | */ |
| 228 | 228 | public function mark_read( $key ) { |
| 229 | - if ( ! $key || ! isset( self::$messages[ $key ] ) ) { |
|
| 229 | + if ( ! $key || ! isset( self::$messages[$key] ) ) { |
|
| 230 | 230 | return; |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | - if ( ! isset( self::$messages[ $key ]['read'] ) ) { |
|
| 234 | - self::$messages[ $key ]['read'] = array(); |
|
| 233 | + if ( ! isset( self::$messages[$key]['read'] ) ) { |
|
| 234 | + self::$messages[$key]['read'] = array(); |
|
| 235 | 235 | } |
| 236 | - self::$messages[ $key ]['read'][ get_current_user_id() ] = time(); |
|
| 236 | + self::$messages[$key]['read'][get_current_user_id()] = time(); |
|
| 237 | 237 | |
| 238 | 238 | $this->update_list(); |
| 239 | 239 | } |
@@ -246,9 +246,9 @@ discard block |
||
| 246 | 246 | * @return void |
| 247 | 247 | */ |
| 248 | 248 | public function mark_unread( $key ) { |
| 249 | - $is_read = isset( self::$messages[ $key ] ) && isset( self::$messages[ $key ]['read'] ) && isset( self::$messages[ $key ]['read'][ get_current_user_id() ] ); |
|
| 249 | + $is_read = isset( self::$messages[$key] ) && isset( self::$messages[$key]['read'] ) && isset( self::$messages[$key]['read'][get_current_user_id()] ); |
|
| 250 | 250 | if ( $is_read ) { |
| 251 | - unset( self::$messages[ $key ]['read'][ get_current_user_id() ] ); |
|
| 251 | + unset( self::$messages[$key]['read'][get_current_user_id()] ); |
|
| 252 | 252 | $this->update_list(); |
| 253 | 253 | } |
| 254 | 254 | } |
@@ -264,14 +264,14 @@ discard block |
||
| 264 | 264 | return; |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | - if ( ! isset( self::$messages[ $key ] ) ) { |
|
| 267 | + if ( ! isset( self::$messages[$key] ) ) { |
|
| 268 | 268 | return; |
| 269 | 269 | } |
| 270 | 270 | |
| 271 | - if ( ! isset( self::$messages[ $key ]['dismissed'] ) ) { |
|
| 272 | - self::$messages[ $key ]['dismissed'] = array(); |
|
| 271 | + if ( ! isset( self::$messages[$key]['dismissed'] ) ) { |
|
| 272 | + self::$messages[$key]['dismissed'] = array(); |
|
| 273 | 273 | } |
| 274 | - self::$messages[ $key ]['dismissed'][ get_current_user_id() ] = time(); |
|
| 274 | + self::$messages[$key]['dismissed'][get_current_user_id()] = time(); |
|
| 275 | 275 | |
| 276 | 276 | $this->update_list(); |
| 277 | 277 | } |
@@ -285,11 +285,11 @@ discard block |
||
| 285 | 285 | $user_id = get_current_user_id(); |
| 286 | 286 | foreach ( self::$messages as $key => $message ) { |
| 287 | 287 | if ( ! isset( $message['dismissed'] ) ) { |
| 288 | - self::$messages[ $key ]['dismissed'] = array(); |
|
| 288 | + self::$messages[$key]['dismissed'] = array(); |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | - if ( ! isset( $message['dismissed'][ $user_id ] ) ) { |
|
| 292 | - self::$messages[ $key ]['dismissed'][ $user_id ] = time(); |
|
| 291 | + if ( ! isset( $message['dismissed'][$user_id] ) ) { |
|
| 292 | + self::$messages[$key]['dismissed'][$user_id] = time(); |
|
| 293 | 293 | } |
| 294 | 294 | } |
| 295 | 295 | $this->update_list(); |
@@ -299,8 +299,8 @@ discard block |
||
| 299 | 299 | $messages = $this->get_messages( 'filter' ); |
| 300 | 300 | $user_id = get_current_user_id(); |
| 301 | 301 | foreach ( $messages as $t => $message ) { |
| 302 | - if ( isset( $message['read'] ) && isset( $message['read'][ $user_id ] ) ) { |
|
| 303 | - unset( $messages[ $t ] ); |
|
| 302 | + if ( isset( $message['read'] ) && isset( $message['read'][$user_id] ) ) { |
|
| 303 | + unset( $messages[$t] ); |
|
| 304 | 304 | } |
| 305 | 305 | } |
| 306 | 306 | return $messages; |
@@ -328,8 +328,8 @@ discard block |
||
| 328 | 328 | * @return void |
| 329 | 329 | */ |
| 330 | 330 | public function remove( $key ) { |
| 331 | - if ( isset( self::$messages[ $key ] ) ) { |
|
| 332 | - unset( self::$messages[ $key ] ); |
|
| 331 | + if ( isset( self::$messages[$key] ) ) { |
|
| 332 | + unset( self::$messages[$key] ); |
|
| 333 | 333 | $this->update_list(); |
| 334 | 334 | } |
| 335 | 335 | } |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | * @return void |
| 87 | 87 | */ |
| 88 | 88 | private function init_style_settings( $atts ) { |
| 89 | - $style_settings = array( |
|
| 89 | + $style_settings = array( |
|
| 90 | 90 | 'border_color' => 'dddddd', |
| 91 | 91 | 'bg_color' => 'f7f7f7', |
| 92 | 92 | 'text_color' => '444444', |
@@ -97,12 +97,12 @@ discard block |
||
| 97 | 97 | $this->style_settings = apply_filters( 'frm_show_entry_styles', $style_settings ); |
| 98 | 98 | |
| 99 | 99 | foreach ( $this->style_settings as $key => $setting ) { |
| 100 | - if ( isset( $atts[ $key ] ) && $atts[ $key ] !== '' ) { |
|
| 101 | - $this->style_settings[ $key ] = $atts[ $key ]; |
|
| 100 | + if ( isset( $atts[$key] ) && $atts[$key] !== '' ) { |
|
| 101 | + $this->style_settings[$key] = $atts[$key]; |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | if ( $this->is_color_setting( $key ) ) { |
| 105 | - $this->style_settings[ $key ] = $this->get_color_markup( $this->style_settings[ $key ] ); |
|
| 105 | + $this->style_settings[$key] = $this->get_color_markup( $this->style_settings[$key] ); |
|
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | * @return void |
| 60 | 60 | */ |
| 61 | 61 | public function set( $key, $value ) { |
| 62 | - $this->state[ $key ] = $value; |
|
| 62 | + $this->state[$key] = $value; |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
@@ -75,8 +75,8 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | public function get( $key, $default ) { |
| 78 | - if ( isset( $this->state[ $key ] ) ) { |
|
| 79 | - return $this->state[ $key ]; |
|
| 78 | + if ( isset( $this->state[$key] ) ) { |
|
| 79 | + return $this->state[$key]; |
|
| 80 | 80 | } |
| 81 | 81 | return $default; |
| 82 | 82 | } |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | private function compressed_state() { |
| 172 | 172 | $compressed = array(); |
| 173 | 173 | foreach ( $this->state as $key => $value ) { |
| 174 | - $compressed[ self::compressed_key( $key ) ] = $value; |
|
| 174 | + $compressed[self::compressed_key( $key )] = $value; |
|
| 175 | 175 | } |
| 176 | 176 | return $compressed; |
| 177 | 177 | } |
@@ -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; |