@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * |
39 | 39 | * @param array $keys |
40 | 40 | */ |
41 | - self::$keys = apply_filters( |
|
41 | + self::$keys = apply_filters( |
|
42 | 42 | 'frm_application_data_keys', |
43 | 43 | array( 'key', 'name', 'description', 'link', 'categories', 'views', 'forms' ) |
44 | 44 | ); |
@@ -100,17 +100,17 @@ discard block |
||
100 | 100 | public function as_js_object() { |
101 | 101 | $application = array(); |
102 | 102 | foreach ( self::$keys as $key ) { |
103 | - if ( ! isset( $this->api_data[ $key ] ) ) { |
|
103 | + if ( ! isset( $this->api_data[$key] ) ) { |
|
104 | 104 | continue; |
105 | 105 | } |
106 | 106 | |
107 | - $value = $this->api_data[ $key ]; |
|
107 | + $value = $this->api_data[$key]; |
|
108 | 108 | |
109 | 109 | if ( 'icon' === $key ) { |
110 | 110 | // Icon is an array. The first array item is the image URL. |
111 | - $application[ $key ] = reset( $value ); |
|
111 | + $application[$key] = reset( $value ); |
|
112 | 112 | } elseif ( 'categories' === $key ) { |
113 | - $application[ $key ] = array_values( |
|
113 | + $application[$key] = array_values( |
|
114 | 114 | array_filter( |
115 | 115 | $value, |
116 | 116 | function( $category ) { |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | // Strip off the " Template" text at the end of the name as it takes up space. |
130 | 130 | $value = substr( $value, 0, -9 ); |
131 | 131 | } |
132 | - $application[ $key ] = $value; |
|
132 | + $application[$key] = $value; |
|
133 | 133 | } |
134 | 134 | } |
135 | 135 |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | } |
210 | 210 | |
211 | 211 | if ( $new_val !== $value ) { |
212 | - $new_values[ $key ] = $new_val; |
|
212 | + $new_values[$key] = $new_val; |
|
213 | 213 | } |
214 | 214 | } |
215 | 215 | |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | |
241 | 241 | foreach ( $values as $value_key => $value ) { |
242 | 242 | if ( $value_key && in_array( $value_key, $form_fields ) ) { |
243 | - $new_values[ $value_key ] = $value; |
|
243 | + $new_values[$value_key] = $value; |
|
244 | 244 | } |
245 | 245 | } |
246 | 246 | |
@@ -328,15 +328,15 @@ discard block |
||
328 | 328 | $existing_keys = array_keys( $values['item_meta'] ); |
329 | 329 | foreach ( $all_fields as $fid ) { |
330 | 330 | if ( ! in_array( $fid->id, $existing_keys ) && ( isset( $values['frm_fields_submitted'] ) && in_array( $fid->id, $values['frm_fields_submitted'] ) ) || isset( $values['options'] ) ) { |
331 | - $values['item_meta'][ $fid->id ] = ''; |
|
331 | + $values['item_meta'][$fid->id] = ''; |
|
332 | 332 | } |
333 | - $field_array[ $fid->id ] = $fid; |
|
333 | + $field_array[$fid->id] = $fid; |
|
334 | 334 | } |
335 | 335 | unset( $all_fields ); |
336 | 336 | |
337 | 337 | foreach ( $values['item_meta'] as $field_id => $default_value ) { |
338 | - if ( isset( $field_array[ $field_id ] ) ) { |
|
339 | - $field = $field_array[ $field_id ]; |
|
338 | + if ( isset( $field_array[$field_id] ) ) { |
|
339 | + $field = $field_array[$field_id]; |
|
340 | 340 | } else { |
341 | 341 | $field = FrmField::getOne( $field_id ); |
342 | 342 | } |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | continue; |
346 | 346 | } |
347 | 347 | |
348 | - $is_settings_page = ( isset( $values['options'] ) || isset( $values['field_options'][ 'custom_html_' . $field_id ] ) ); |
|
348 | + $is_settings_page = ( isset( $values['options'] ) || isset( $values['field_options']['custom_html_' . $field_id] ) ); |
|
349 | 349 | if ( $is_settings_page ) { |
350 | 350 | self::get_settings_page_html( $values, $field ); |
351 | 351 | |
@@ -360,15 +360,15 @@ discard block |
||
360 | 360 | $update_options = apply_filters( 'frm_field_options_to_update', $update_options ); |
361 | 361 | |
362 | 362 | foreach ( $update_options as $opt => $default ) { |
363 | - $field->field_options[ $opt ] = isset( $values['field_options'][ $opt . '_' . $field_id ] ) ? $values['field_options'][ $opt . '_' . $field_id ] : $default; |
|
364 | - self::sanitize_field_opt( $opt, $field->field_options[ $opt ] ); |
|
363 | + $field->field_options[$opt] = isset( $values['field_options'][$opt . '_' . $field_id] ) ? $values['field_options'][$opt . '_' . $field_id] : $default; |
|
364 | + self::sanitize_field_opt( $opt, $field->field_options[$opt] ); |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | $field->field_options = apply_filters( 'frm_update_field_options', $field->field_options, $field, $values ); |
368 | 368 | |
369 | 369 | $new_field = array( |
370 | 370 | 'field_options' => $field->field_options, |
371 | - 'default_value' => isset( $values[ 'default_value_' . $field_id ] ) ? FrmAppHelper::maybe_json_encode( $values[ 'default_value_' . $field_id ] ) : '', |
|
371 | + 'default_value' => isset( $values['default_value_' . $field_id] ) ? FrmAppHelper::maybe_json_encode( $values['default_value_' . $field_id] ) : '', |
|
372 | 372 | ); |
373 | 373 | |
374 | 374 | self::prepare_field_update_values( $field, $values, $new_field ); |
@@ -430,11 +430,11 @@ discard block |
||
430 | 430 | * Updating the settings page |
431 | 431 | */ |
432 | 432 | private static function get_settings_page_html( $values, &$field ) { |
433 | - if ( isset( $values['field_options'][ 'custom_html_' . $field->id ] ) ) { |
|
433 | + if ( isset( $values['field_options']['custom_html_' . $field->id] ) ) { |
|
434 | 434 | $prev_opts = array(); |
435 | 435 | $fallback_html = isset( $field->field_options['custom_html'] ) ? $field->field_options['custom_html'] : FrmFieldsHelper::get_default_html( $field->type ); |
436 | 436 | |
437 | - $field->field_options['custom_html'] = isset( $values['field_options'][ 'custom_html_' . $field->id ] ) ? $values['field_options'][ 'custom_html_' . $field->id ] : $fallback_html; |
|
437 | + $field->field_options['custom_html'] = isset( $values['field_options']['custom_html_' . $field->id] ) ? $values['field_options']['custom_html_' . $field->id] : $fallback_html; |
|
438 | 438 | } elseif ( $field->type == 'hidden' || $field->type == 'user_id' ) { |
439 | 439 | $prev_opts = $field->field_options; |
440 | 440 | } |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | foreach ( $field_cols as $col => $default ) { |
461 | 461 | $default = ( $default === '' ) ? $field->{$col} : $default; |
462 | 462 | |
463 | - $new_field[ $col ] = isset( $values['field_options'][ $col . '_' . $field->id ] ) ? $values['field_options'][ $col . '_' . $field->id ] : $default; |
|
463 | + $new_field[$col] = isset( $values['field_options'][$col . '_' . $field->id] ) ? $values['field_options'][$col . '_' . $field->id] : $default; |
|
464 | 464 | } |
465 | 465 | |
466 | 466 | // Don't save the template option. |
@@ -874,8 +874,8 @@ discard block |
||
874 | 874 | self::maybe_get_form( $form ); |
875 | 875 | } |
876 | 876 | |
877 | - if ( isset( $frm_vars['form_params'] ) && is_array( $frm_vars['form_params'] ) && isset( $frm_vars['form_params'][ $form->id ] ) ) { |
|
878 | - return $frm_vars['form_params'][ $form->id ]; |
|
877 | + if ( isset( $frm_vars['form_params'] ) && is_array( $frm_vars['form_params'] ) && isset( $frm_vars['form_params'][$form->id] ) ) { |
|
878 | + return $frm_vars['form_params'][$form->id]; |
|
879 | 879 | } |
880 | 880 | |
881 | 881 | $action_var = isset( $_REQUEST['frm_action'] ) ? 'frm_action' : 'action'; // phpcs:ignore WordPress.Security.NonceVerification.Missing |
@@ -904,15 +904,15 @@ discard block |
||
904 | 904 | //if there are two forms on the same page, make sure not to submit both |
905 | 905 | foreach ( $default_values as $var => $default ) { |
906 | 906 | if ( $var == 'action' ) { |
907 | - $values[ $var ] = FrmAppHelper::get_param( $action_var, $default, 'get', 'sanitize_title' ); |
|
907 | + $values[$var] = FrmAppHelper::get_param( $action_var, $default, 'get', 'sanitize_title' ); |
|
908 | 908 | } else { |
909 | - $values[ $var ] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' ); |
|
909 | + $values[$var] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' ); |
|
910 | 910 | } |
911 | 911 | unset( $var, $default ); |
912 | 912 | } |
913 | 913 | } else { |
914 | 914 | foreach ( $default_values as $var => $default ) { |
915 | - $values[ $var ] = $default; |
|
915 | + $values[$var] = $default; |
|
916 | 916 | unset( $var, $default ); |
917 | 917 | } |
918 | 918 | } |
@@ -938,7 +938,7 @@ discard block |
||
938 | 938 | 'sdir' => '', |
939 | 939 | ); |
940 | 940 | foreach ( $defaults as $var => $default ) { |
941 | - $values[ $var ] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' ); |
|
941 | + $values[$var] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' ); |
|
942 | 942 | } |
943 | 943 | |
944 | 944 | return $values; |
@@ -966,7 +966,7 @@ discard block |
||
966 | 966 | 'keep_post' => '', |
967 | 967 | ); |
968 | 968 | foreach ( $defaults as $var => $default ) { |
969 | - $values[ $var ] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' ); |
|
969 | + $values[$var] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' ); |
|
970 | 970 | } |
971 | 971 | |
972 | 972 | return $values; |
@@ -1069,7 +1069,7 @@ discard block |
||
1069 | 1069 | $form = $atts['form']; |
1070 | 1070 | $default = isset( $atts['default'] ) ? $atts['default'] : ''; |
1071 | 1071 | |
1072 | - return isset( $form->options[ $atts['option'] ] ) ? $form->options[ $atts['option'] ] : $default; |
|
1072 | + return isset( $form->options[$atts['option']] ) ? $form->options[$atts['option']] : $default; |
|
1073 | 1073 | } |
1074 | 1074 | |
1075 | 1075 | /** |
@@ -132,8 +132,8 @@ discard block |
||
132 | 132 | $field_val = ''; |
133 | 133 | if ( is_object( $this->field ) ) { |
134 | 134 | $field_val = $this->field->{$column}; |
135 | - } elseif ( is_array( $this->field ) && isset( $this->field[ $column ] ) ) { |
|
136 | - $field_val = $this->field[ $column ]; |
|
135 | + } elseif ( is_array( $this->field ) && isset( $this->field[$column] ) ) { |
|
136 | + $field_val = $this->field[$column]; |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | return $field_val; |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | if ( is_object( $this->field ) ) { |
148 | 148 | $this->field->{$column} = $value; |
149 | 149 | } elseif ( is_array( $this->field ) ) { |
150 | - $this->field[ $column ] = $value; |
|
150 | + $this->field[$column] = $value; |
|
151 | 151 | } |
152 | 152 | } |
153 | 153 | |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | printf( |
470 | 470 | /* translators: %s: Field type */ |
471 | 471 | esc_html__( '%s Options', 'formidable' ), |
472 | - esc_html( $all_field_types[ $args['display']['type'] ]['name'] ) |
|
472 | + esc_html( $all_field_types[$args['display']['type']]['name'] ) |
|
473 | 473 | ); |
474 | 474 | ?> |
475 | 475 | <i class="frm_icon_font frm_arrowdown6_icon"></i> |
@@ -592,8 +592,8 @@ discard block |
||
592 | 592 | $fields = FrmField::field_selection(); |
593 | 593 | $fields = array_merge( $fields, FrmField::pro_field_selection() ); |
594 | 594 | |
595 | - if ( isset( $fields[ $this->type ] ) ) { |
|
596 | - $name = is_array( $fields[ $this->type ] ) ? $fields[ $this->type ]['name'] : $fields[ $this->type ]; |
|
595 | + if ( isset( $fields[$this->type] ) ) { |
|
596 | + $name = is_array( $fields[$this->type] ) ? $fields[$this->type]['name'] : $fields[$this->type]; |
|
597 | 597 | } |
598 | 598 | |
599 | 599 | return $name; |
@@ -604,7 +604,7 @@ discard block |
||
604 | 604 | } |
605 | 605 | |
606 | 606 | public function get_default_field_options() { |
607 | - $opts = array( |
|
607 | + $opts = array( |
|
608 | 608 | 'size' => '', |
609 | 609 | 'max' => '', |
610 | 610 | 'label' => '', |
@@ -946,7 +946,7 @@ discard block |
||
946 | 946 | } |
947 | 947 | } else { |
948 | 948 | $args['save_array'] = $this->is_readonly_array(); |
949 | - $hidden .= $this->show_single_hidden( $selected_value, $args ); |
|
949 | + $hidden .= $this->show_single_hidden( $selected_value, $args ); |
|
950 | 950 | } |
951 | 951 | |
952 | 952 | return $hidden; |
@@ -955,7 +955,7 @@ discard block |
||
955 | 955 | protected function show_single_hidden( $selected, $args ) { |
956 | 956 | if ( $args['save_array'] ) { |
957 | 957 | $args['field_name'] .= '[]'; |
958 | - $id = ''; |
|
958 | + $id = ''; |
|
959 | 959 | } else { |
960 | 960 | $id = ' id="' . esc_attr( $args['html_id'] ) . '"'; |
961 | 961 | } |
@@ -971,8 +971,8 @@ discard block |
||
971 | 971 | $selected = $values['field_value']; |
972 | 972 | |
973 | 973 | if ( isset( $values['combo_name'] ) ) { |
974 | - $options = $options[ $values['combo_name'] ]; |
|
975 | - $selected = ( is_array( $selected ) && isset( $selected[ $values['combo_name'] ] ) ) ? $selected[ $values['combo_name'] ] : ''; |
|
974 | + $options = $options[$values['combo_name']]; |
|
975 | + $selected = ( is_array( $selected ) && isset( $selected[$values['combo_name']] ) ) ? $selected[$values['combo_name']] : ''; |
|
976 | 976 | } |
977 | 977 | |
978 | 978 | $input = $this->select_tag( $values ); |
@@ -1023,7 +1023,7 @@ discard block |
||
1023 | 1023 | } |
1024 | 1024 | |
1025 | 1025 | protected function fill_display_field_values( $args = array() ) { |
1026 | - $defaults = array( |
|
1026 | + $defaults = array( |
|
1027 | 1027 | 'field_name' => 'item_meta[' . $this->get_field_column( 'id' ) . ']', |
1028 | 1028 | 'field_id' => $this->get_field_column( 'id' ), |
1029 | 1029 | 'field_plus_id' => '', |
@@ -1074,7 +1074,7 @@ discard block |
||
1074 | 1074 | } |
1075 | 1075 | } |
1076 | 1076 | |
1077 | - if ( isset( $args['errors'][ 'field' . $args['field_id'] ] ) && ! $custom_error_fields ) { |
|
1077 | + if ( isset( $args['errors']['field' . $args['field_id']] ) && ! $custom_error_fields ) { |
|
1078 | 1078 | if ( $error_comes_first ) { |
1079 | 1079 | array_unshift( $describedby, 'frm_error_' . $args['html_id'] ); |
1080 | 1080 | } else { |
@@ -1149,11 +1149,11 @@ discard block |
||
1149 | 1149 | |
1150 | 1150 | $field_id = $this->get_field_column( 'id' ); |
1151 | 1151 | if ( ! array_key_exists( $field_id, $frm_validated_unique_values ) ) { |
1152 | - $frm_validated_unique_values[ $field_id ] = array(); |
|
1152 | + $frm_validated_unique_values[$field_id] = array(); |
|
1153 | 1153 | return false; |
1154 | 1154 | } |
1155 | 1155 | |
1156 | - $already_validated_this_value = in_array( $value, $frm_validated_unique_values[ $field_id ], true ); |
|
1156 | + $already_validated_this_value = in_array( $value, $frm_validated_unique_values[$field_id], true ); |
|
1157 | 1157 | return $already_validated_this_value; |
1158 | 1158 | } |
1159 | 1159 | |
@@ -1178,7 +1178,7 @@ discard block |
||
1178 | 1178 | private function value_validated_as_unique( $value ) { |
1179 | 1179 | global $frm_validated_unique_values; |
1180 | 1180 | $field_id = $this->get_field_column( 'id' ); |
1181 | - $frm_validated_unique_values[ $field_id ][] = $value; |
|
1181 | + $frm_validated_unique_values[$field_id][] = $value; |
|
1182 | 1182 | } |
1183 | 1183 | |
1184 | 1184 | public function get_value_to_save( $value, $atts ) { |
@@ -1210,8 +1210,8 @@ discard block |
||
1210 | 1210 | $value = $this->prepare_display_value( $value, $atts ); |
1211 | 1211 | |
1212 | 1212 | if ( is_array( $value ) ) { |
1213 | - if ( isset( $atts['show'] ) && $atts['show'] && isset( $value[ $atts['show'] ] ) ) { |
|
1214 | - $value = $value[ $atts['show'] ]; |
|
1213 | + if ( isset( $atts['show'] ) && $atts['show'] && isset( $value[$atts['show']] ) ) { |
|
1214 | + $value = $value[$atts['show']]; |
|
1215 | 1215 | } elseif ( ! isset( $atts['return_array'] ) || ! $atts['return_array'] ) { |
1216 | 1216 | $sep = isset( $atts['sep'] ) ? $atts['sep'] : ', '; |
1217 | 1217 | $value = implode( $sep, $value ); |
@@ -1280,8 +1280,8 @@ discard block |
||
1280 | 1280 | $saved_entries = $atts['ids']; |
1281 | 1281 | $new_value = array(); |
1282 | 1282 | foreach ( (array) $value as $old_child_id ) { |
1283 | - if ( isset( $saved_entries[ $old_child_id ] ) ) { |
|
1284 | - $new_value[] = $saved_entries[ $old_child_id ]; |
|
1283 | + if ( isset( $saved_entries[$old_child_id] ) ) { |
|
1284 | + $new_value[] = $saved_entries[$old_child_id]; |
|
1285 | 1285 | } |
1286 | 1286 | } |
1287 | 1287 |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $max_length = intval( FrmField::get_option( $this->field, 'max' ) ); |
35 | 35 | |
36 | 36 | if ( $max_length && strlen( $args['value'] ) > $max_length ) { |
37 | - $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); |
|
37 | + $errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | return $errors; |
@@ -173,12 +173,12 @@ discard block |
||
173 | 173 | * @return array |
174 | 174 | */ |
175 | 175 | private function prepare_array_property( $index, $atts ) { |
176 | - if ( isset( $atts[ $index ] ) && ! empty( $atts[ $index ] ) ) { |
|
176 | + if ( isset( $atts[$index] ) && ! empty( $atts[$index] ) ) { |
|
177 | 177 | |
178 | - if ( is_array( $atts[ $index ] ) ) { |
|
179 | - $property = $atts[ $index ]; |
|
178 | + if ( is_array( $atts[$index] ) ) { |
|
179 | + $property = $atts[$index]; |
|
180 | 180 | } else { |
181 | - $property = explode( ',', $atts[ $index ] ); |
|
181 | + $property = explode( ',', $atts[$index] ); |
|
182 | 182 | } |
183 | 183 | } else { |
184 | 184 | $property = array(); |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | ); |
253 | 253 | } |
254 | 254 | |
255 | - $ip = array( |
|
255 | + $ip = array( |
|
256 | 256 | 'label' => __( 'IP Address', 'formidable' ), |
257 | 257 | 'value' => $this->entry->ip, |
258 | 258 | ); |
@@ -330,6 +330,6 @@ discard block |
||
330 | 330 | * @param stdClass $field |
331 | 331 | */ |
332 | 332 | protected function add_field_values( $field ) { |
333 | - $this->field_values[ $field->id ] = new FrmFieldValue( $field, $this->entry ); |
|
333 | + $this->field_values[$field->id] = new FrmFieldValue( $field, $this->entry ); |
|
334 | 334 | } |
335 | 335 | } |
@@ -75,20 +75,20 @@ discard block |
||
75 | 75 | 'name' => sprintf( |
76 | 76 | /* translators: Formidable addon name */ |
77 | 77 | esc_html_x( 'Formidable %s', 'Formidable Addon Name', 'formidable' ), |
78 | - $addon_list[ $matching_addon ]['name'] |
|
78 | + $addon_list[$matching_addon]['name'] |
|
79 | 79 | ), |
80 | - 'addon' => $addon_list[ $matching_addon ]['slug'], |
|
81 | - 'short_description' => $addon_list[ $matching_addon ]['excerpt'], |
|
80 | + 'addon' => $addon_list[$matching_addon]['slug'], |
|
81 | + 'short_description' => $addon_list[$matching_addon]['excerpt'], |
|
82 | 82 | 'slug' => self::$slug, |
83 | - 'version' => $addon_list[ $matching_addon ]['version'], |
|
83 | + 'version' => $addon_list[$matching_addon]['version'], |
|
84 | 84 | ); |
85 | 85 | |
86 | - if ( ! empty( $addon_list[ $matching_addon ]['external'] ) ) { |
|
86 | + if ( ! empty( $addon_list[$matching_addon]['external'] ) ) { |
|
87 | 87 | unset( $overrides['name'] ); |
88 | 88 | } |
89 | 89 | |
90 | 90 | // Splice in the base addon data. |
91 | - $inject = array_merge( $inject, $addon_list[ $matching_addon ], $overrides ); |
|
91 | + $inject = array_merge( $inject, $addon_list[$matching_addon], $overrides ); |
|
92 | 92 | |
93 | 93 | // Add it to the top of the list. |
94 | 94 | array_unshift( $result->plugins, $inject ); |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | */ |
340 | 340 | protected function is_installed( $plugin ) { |
341 | 341 | $all_plugins = FrmAppHelper::get_plugins(); |
342 | - return isset( $all_plugins[ $plugin ] ); |
|
342 | + return isset( $all_plugins[$plugin] ); |
|
343 | 343 | } |
344 | 344 | |
345 | 345 | /** |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | } else { |
93 | 93 | foreach ( $addons as $k => $addon ) { |
94 | 94 | if ( empty( $addon['excerpt'] ) && $k !== 'error' ) { |
95 | - unset( $addons[ $k ] ); |
|
95 | + unset( $addons[$k] ); |
|
96 | 96 | } |
97 | 97 | } |
98 | 98 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | |
194 | 194 | foreach ( $list as $k => $info ) { |
195 | 195 | $info['slug'] = $k; |
196 | - $list[ $k ] = array_merge( $defaults, $info ); |
|
196 | + $list[$k] = array_merge( $defaults, $info ); |
|
197 | 197 | } |
198 | 198 | return $list; |
199 | 199 | } |
@@ -338,16 +338,16 @@ discard block |
||
338 | 338 | continue; |
339 | 339 | } |
340 | 340 | |
341 | - $wp_plugin = isset( $wp_plugins[ $folder ] ) ? $wp_plugins[ $folder ] : array(); |
|
341 | + $wp_plugin = isset( $wp_plugins[$folder] ) ? $wp_plugins[$folder] : array(); |
|
342 | 342 | $wp_version = isset( $wp_plugin['Version'] ) ? $wp_plugin['Version'] : '1.0'; |
343 | 343 | |
344 | 344 | if ( version_compare( $wp_version, $plugin->new_version, '<' ) ) { |
345 | 345 | $slug = explode( '/', $folder ); |
346 | 346 | $plugin->slug = $slug[0]; |
347 | - $transient->response[ $folder ] = $plugin; |
|
347 | + $transient->response[$folder] = $plugin; |
|
348 | 348 | } |
349 | 349 | |
350 | - $transient->checked[ $folder ] = $wp_version; |
|
350 | + $transient->checked[$folder] = $wp_version; |
|
351 | 351 | |
352 | 352 | } |
353 | 353 | |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | */ |
381 | 381 | protected static function is_installed( $plugin ) { |
382 | 382 | $all_plugins = self::get_plugins(); |
383 | - return isset( $all_plugins[ $plugin ] ); |
|
383 | + return isset( $all_plugins[$plugin] ); |
|
384 | 384 | } |
385 | 385 | |
386 | 386 | /** |
@@ -419,13 +419,13 @@ discard block |
||
419 | 419 | } |
420 | 420 | |
421 | 421 | $download_id = isset( $plugin['id'] ) ? $plugin['id'] : 0; |
422 | - if ( ! empty( $download_id ) && ! isset( $version_info[ $download_id ]['package'] ) ) { |
|
422 | + if ( ! empty( $download_id ) && ! isset( $version_info[$download_id]['package'] ) ) { |
|
423 | 423 | // if this addon is using its own license, get the update url |
424 | 424 | $addon_info = $api->get_api_info(); |
425 | 425 | |
426 | - $version_info[ $download_id ] = $addon_info[ $download_id ]; |
|
426 | + $version_info[$download_id] = $addon_info[$download_id]; |
|
427 | 427 | if ( isset( $addon_info['error'] ) ) { |
428 | - $version_info[ $download_id ]['error'] = array( |
|
428 | + $version_info[$download_id]['error'] = array( |
|
429 | 429 | 'message' => $addon_info['error']['message'], |
430 | 430 | 'code' => $addon_info['error']['code'], |
431 | 431 | ); |
@@ -524,8 +524,8 @@ discard block |
||
524 | 524 | return $addon; |
525 | 525 | } |
526 | 526 | } |
527 | - } elseif ( isset( $addons[ $download_id ] ) ) { |
|
528 | - $plugin = $addons[ $download_id ]; |
|
527 | + } elseif ( isset( $addons[$download_id] ) ) { |
|
528 | + $plugin = $addons[$download_id]; |
|
529 | 529 | } |
530 | 530 | |
531 | 531 | return $plugin; |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | self::prepare_addon_link( $addon['link'] ); |
587 | 587 | |
588 | 588 | self::set_addon_status( $addon ); |
589 | - $addons[ $id ] = $addon; |
|
589 | + $addons[$id] = $addon; |
|
590 | 590 | } |
591 | 591 | } |
592 | 592 | |
@@ -622,7 +622,7 @@ discard block |
||
622 | 622 | 'utm_medium' => 'addons', |
623 | 623 | 'utm_campaign' => 'liteplugin', |
624 | 624 | ); |
625 | - $link = add_query_arg( $query_args, $link ); |
|
625 | + $link = add_query_arg( $query_args, $link ); |
|
626 | 626 | } |
627 | 627 | |
628 | 628 | /** |
@@ -201,8 +201,8 @@ discard block |
||
201 | 201 | |
202 | 202 | if ( is_wp_error( $resp ) ) { |
203 | 203 | $error_string = $resp->get_error_message(); |
204 | - $errors[ 'field' . $args['id'] ] = __( 'There was a problem verifying your captcha', 'formidable' ); |
|
205 | - $errors[ 'field' . $args['id'] ] .= ' ' . $error_string; |
|
204 | + $errors['field' . $args['id']] = __( 'There was a problem verifying your captcha', 'formidable' ); |
|
205 | + $errors['field' . $args['id']] .= ' ' . $error_string; |
|
206 | 206 | return $errors; |
207 | 207 | } |
208 | 208 | |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | if ( $invalid_message === __( 'The reCAPTCHA was not entered correctly', 'formidable' ) ) { |
230 | 230 | $invalid_message = ''; |
231 | 231 | } |
232 | - $errors[ 'field' . $args['id'] ] = ( $invalid_message === '' ? $frm_settings->re_msg : $invalid_message ); |
|
232 | + $errors['field' . $args['id']] = ( $invalid_message === '' ? $frm_settings->re_msg : $invalid_message ); |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | return $errors; |
@@ -245,8 +245,8 @@ discard block |
||
245 | 245 | $frm_vars['captcha_scores'] = array(); |
246 | 246 | } |
247 | 247 | $form_id = is_object( $this->field ) ? $this->field->form_id : $this->field['form_id']; |
248 | - if ( ! isset( $frm_vars['captcha_scores'][ $form_id ] ) ) { |
|
249 | - $frm_vars['captcha_scores'][ $form_id ] = $score; |
|
248 | + if ( ! isset( $frm_vars['captcha_scores'][$form_id] ) ) { |
|
249 | + $frm_vars['captcha_scores'][$form_id] = $score; |
|
250 | 250 | } |
251 | 251 | } |
252 | 252 |
@@ -106,8 +106,8 @@ |
||
106 | 106 | function load_formidable_pro() { |
107 | 107 | } |
108 | 108 | /** |
109 | - * @return WPMailSMTP\Core |
|
110 | - */ |
|
109 | + * @return WPMailSMTP\Core |
|
110 | + */ |
|
111 | 111 | function wp_mail_smtp() { |
112 | 112 | } |
113 | 113 | /** |