@@ -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' => '', |
@@ -942,7 +942,7 @@ discard block |
||
942 | 942 | } |
943 | 943 | } else { |
944 | 944 | $args['save_array'] = $this->is_readonly_array(); |
945 | - $hidden .= $this->show_single_hidden( $selected_value, $args ); |
|
945 | + $hidden .= $this->show_single_hidden( $selected_value, $args ); |
|
946 | 946 | } |
947 | 947 | |
948 | 948 | return $hidden; |
@@ -951,7 +951,7 @@ discard block |
||
951 | 951 | protected function show_single_hidden( $selected, $args ) { |
952 | 952 | if ( $args['save_array'] ) { |
953 | 953 | $args['field_name'] .= '[]'; |
954 | - $id = ''; |
|
954 | + $id = ''; |
|
955 | 955 | } else { |
956 | 956 | $id = ' id="' . esc_attr( $args['html_id'] ) . '"'; |
957 | 957 | } |
@@ -967,8 +967,8 @@ discard block |
||
967 | 967 | $selected = $values['field_value']; |
968 | 968 | |
969 | 969 | if ( isset( $values['combo_name'] ) ) { |
970 | - $options = $options[ $values['combo_name'] ]; |
|
971 | - $selected = ( is_array( $selected ) && isset( $selected[ $values['combo_name'] ] ) ) ? $selected[ $values['combo_name'] ] : ''; |
|
970 | + $options = $options[$values['combo_name']]; |
|
971 | + $selected = ( is_array( $selected ) && isset( $selected[$values['combo_name']] ) ) ? $selected[$values['combo_name']] : ''; |
|
972 | 972 | } |
973 | 973 | |
974 | 974 | $input = $this->select_tag( $values ); |
@@ -1019,7 +1019,7 @@ discard block |
||
1019 | 1019 | } |
1020 | 1020 | |
1021 | 1021 | protected function fill_display_field_values( $args = array() ) { |
1022 | - $defaults = array( |
|
1022 | + $defaults = array( |
|
1023 | 1023 | 'field_name' => 'item_meta[' . $this->get_field_column( 'id' ) . ']', |
1024 | 1024 | 'field_id' => $this->get_field_column( 'id' ), |
1025 | 1025 | 'field_plus_id' => '', |
@@ -1057,7 +1057,7 @@ discard block |
||
1057 | 1057 | $describedby = 'frm_desc_' . $args['html_id']; |
1058 | 1058 | } |
1059 | 1059 | |
1060 | - if ( isset( $args['errors'][ 'field' . $args['field_id'] ] ) ) { |
|
1060 | + if ( isset( $args['errors']['field' . $args['field_id']] ) ) { |
|
1061 | 1061 | $describedby .= ' frm_error_' . $args['html_id']; |
1062 | 1062 | } |
1063 | 1063 | |
@@ -1116,11 +1116,11 @@ discard block |
||
1116 | 1116 | |
1117 | 1117 | $field_id = $this->get_field_column( 'id' ); |
1118 | 1118 | if ( ! array_key_exists( $field_id, $frm_validated_unique_values ) ) { |
1119 | - $frm_validated_unique_values[ $field_id ] = array(); |
|
1119 | + $frm_validated_unique_values[$field_id] = array(); |
|
1120 | 1120 | return false; |
1121 | 1121 | } |
1122 | 1122 | |
1123 | - $already_validated_this_value = in_array( $value, $frm_validated_unique_values[ $field_id ], true ); |
|
1123 | + $already_validated_this_value = in_array( $value, $frm_validated_unique_values[$field_id], true ); |
|
1124 | 1124 | return $already_validated_this_value; |
1125 | 1125 | } |
1126 | 1126 | |
@@ -1145,7 +1145,7 @@ discard block |
||
1145 | 1145 | private function value_validated_as_unique( $value ) { |
1146 | 1146 | global $frm_validated_unique_values; |
1147 | 1147 | $field_id = $this->get_field_column( 'id' ); |
1148 | - $frm_validated_unique_values[ $field_id ][] = $value; |
|
1148 | + $frm_validated_unique_values[$field_id][] = $value; |
|
1149 | 1149 | } |
1150 | 1150 | |
1151 | 1151 | public function get_value_to_save( $value, $atts ) { |
@@ -1177,8 +1177,8 @@ discard block |
||
1177 | 1177 | $value = $this->prepare_display_value( $value, $atts ); |
1178 | 1178 | |
1179 | 1179 | if ( is_array( $value ) ) { |
1180 | - if ( isset( $atts['show'] ) && $atts['show'] && isset( $value[ $atts['show'] ] ) ) { |
|
1181 | - $value = $value[ $atts['show'] ]; |
|
1180 | + if ( isset( $atts['show'] ) && $atts['show'] && isset( $value[$atts['show']] ) ) { |
|
1181 | + $value = $value[$atts['show']]; |
|
1182 | 1182 | } elseif ( ! isset( $atts['return_array'] ) || ! $atts['return_array'] ) { |
1183 | 1183 | $sep = isset( $atts['sep'] ) ? $atts['sep'] : ', '; |
1184 | 1184 | $value = implode( $sep, $value ); |
@@ -1247,8 +1247,8 @@ discard block |
||
1247 | 1247 | $saved_entries = $atts['ids']; |
1248 | 1248 | $new_value = array(); |
1249 | 1249 | foreach ( (array) $value as $old_child_id ) { |
1250 | - if ( isset( $saved_entries[ $old_child_id ] ) ) { |
|
1251 | - $new_value[] = $saved_entries[ $old_child_id ]; |
|
1250 | + if ( isset( $saved_entries[$old_child_id] ) ) { |
|
1251 | + $new_value[] = $saved_entries[$old_child_id]; |
|
1252 | 1252 | } |
1253 | 1253 | } |
1254 | 1254 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | 'class' => '', |
29 | 29 | 'inc_children' => 'exclude', |
30 | 30 | ); |
31 | - $args = wp_parse_args( $args, $defaults ); |
|
31 | + $args = wp_parse_args( $args, $defaults ); |
|
32 | 32 | |
33 | 33 | if ( ! $args['field_id'] ) { |
34 | 34 | $args['field_id'] = $field_name; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public static function add_html_attr( $class, $param, &$add_html ) { |
72 | 72 | if ( ! empty( $class ) ) { |
73 | - $add_html[ $param ] = sanitize_title( $param ) . '="' . esc_attr( trim( sanitize_text_field( $class ) ) ) . '"'; |
|
73 | + $add_html[$param] = sanitize_title( $param ) . '="' . esc_attr( trim( sanitize_text_field( $class ) ) ) . '"'; |
|
74 | 74 | } |
75 | 75 | } |
76 | 76 | |
@@ -276,8 +276,8 @@ discard block |
||
276 | 276 | 'description' => '', |
277 | 277 | ); |
278 | 278 | foreach ( $defaults as $var => $default ) { |
279 | - if ( ! isset( $values[ $var ] ) ) { |
|
280 | - $values[ $var ] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' ); |
|
279 | + if ( ! isset( $values[$var] ) ) { |
|
280 | + $values[$var] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' ); |
|
281 | 281 | } |
282 | 282 | } |
283 | 283 | |
@@ -292,8 +292,8 @@ discard block |
||
292 | 292 | 'parent_form_id' => 0, |
293 | 293 | ); |
294 | 294 | foreach ( $defaults as $var => $default ) { |
295 | - if ( ! isset( $values[ $var ] ) ) { |
|
296 | - $values[ $var ] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' ); |
|
295 | + if ( ! isset( $values[$var] ) ) { |
|
296 | + $values[$var] = FrmAppHelper::get_param( $var, $default, 'get', 'sanitize_text_field' ); |
|
297 | 297 | } |
298 | 298 | } |
299 | 299 | unset( $defaults ); |
@@ -330,16 +330,16 @@ discard block |
||
330 | 330 | $defaults = self::get_default_opts(); |
331 | 331 | foreach ( $defaults as $var => $default ) { |
332 | 332 | if ( is_array( $default ) ) { |
333 | - if ( ! isset( $values[ $var ] ) ) { |
|
334 | - $values[ $var ] = ( $record && isset( $record->options[ $var ] ) ) ? $record->options[ $var ] : array(); |
|
333 | + if ( ! isset( $values[$var] ) ) { |
|
334 | + $values[$var] = ( $record && isset( $record->options[$var] ) ) ? $record->options[$var] : array(); |
|
335 | 335 | } |
336 | 336 | |
337 | 337 | foreach ( $default as $k => $v ) { |
338 | - $values[ $var ][ $k ] = ( $post_values && isset( $post_values[ $var ][ $k ] ) ) ? $post_values[ $var ][ $k ] : ( ( $record && isset( $record->options[ $var ] ) && isset( $record->options[ $var ][ $k ] ) ) ? $record->options[ $var ][ $k ] : $v ); |
|
338 | + $values[$var][$k] = ( $post_values && isset( $post_values[$var][$k] ) ) ? $post_values[$var][$k] : ( ( $record && isset( $record->options[$var] ) && isset( $record->options[$var][$k] ) ) ? $record->options[$var][$k] : $v ); |
|
339 | 339 | |
340 | 340 | if ( is_array( $v ) ) { |
341 | 341 | foreach ( $v as $k1 => $v1 ) { |
342 | - $values[ $var ][ $k ][ $k1 ] = ( $post_values && isset( $post_values[ $var ][ $k ][ $k1 ] ) ) ? $post_values[ $var ][ $k ][ $k1 ] : ( ( $record && isset( $record->options[ $var ] ) && isset( $record->options[ $var ][ $k ] ) && isset( $record->options[ $var ][ $k ][ $k1 ] ) ) ? $record->options[ $var ][ $k ][ $k1 ] : $v1 ); |
|
342 | + $values[$var][$k][$k1] = ( $post_values && isset( $post_values[$var][$k][$k1] ) ) ? $post_values[$var][$k][$k1] : ( ( $record && isset( $record->options[$var] ) && isset( $record->options[$var][$k] ) && isset( $record->options[$var][$k][$k1] ) ) ? $record->options[$var][$k][$k1] : $v1 ); |
|
343 | 343 | unset( $k1, $v1 ); |
344 | 344 | } |
345 | 345 | } |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | unset( $k, $v ); |
348 | 348 | } |
349 | 349 | } else { |
350 | - $values[ $var ] = ( $post_values && isset( $post_values['options'][ $var ] ) ) ? $post_values['options'][ $var ] : ( ( $record && isset( $record->options[ $var ] ) ) ? $record->options[ $var ] : $default ); |
|
350 | + $values[$var] = ( $post_values && isset( $post_values['options'][$var] ) ) ? $post_values['options'][$var] : ( ( $record && isset( $record->options[$var] ) ) ? $record->options[$var] : $default ); |
|
351 | 351 | } |
352 | 352 | |
353 | 353 | unset( $var, $default ); |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | public static function fill_form_options( &$options, $values ) { |
386 | 386 | $defaults = self::get_default_opts(); |
387 | 387 | foreach ( $defaults as $var => $default ) { |
388 | - $options[ $var ] = isset( $values['options'][ $var ] ) ? $values['options'][ $var ] : $default; |
|
388 | + $options[$var] = isset( $values['options'][$var] ) ? $values['options'][$var] : $default; |
|
389 | 389 | unset( $var, $default ); |
390 | 390 | } |
391 | 391 | } |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | public static function insert_opt_html( $args ) { |
542 | 542 | $class = isset( $args['class'] ) ? $args['class'] : ''; |
543 | 543 | $fields = FrmField::all_field_selection(); |
544 | - $field = isset( $fields[ $args['type'] ] ) ? $fields[ $args['type'] ] : array(); |
|
544 | + $field = isset( $fields[$args['type']] ) ? $fields[$args['type']] : array(); |
|
545 | 545 | |
546 | 546 | self::prepare_field_type( $field ); |
547 | 547 | |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | FrmField::update( $field->id, array( 'field_order' => $field->field_order + 2 ) ); |
694 | 694 | } |
695 | 695 | |
696 | - $add_order += 2; |
|
696 | + $add_order += 2; |
|
697 | 697 | $open = false; |
698 | 698 | $reset_fields = true; |
699 | 699 | } |
@@ -1045,10 +1045,10 @@ discard block |
||
1045 | 1045 | $link .= ' onclick="return confirm(\'' . esc_attr( $link_details['confirm'] ) . '\')"'; |
1046 | 1046 | } |
1047 | 1047 | |
1048 | - $label = ( isset( $link_details[ $length ] ) ? $link_details[ $length ] : $link_details['label'] ); |
|
1049 | - if ( $length == 'icon' && isset( $link_details[ $length ] ) ) { |
|
1048 | + $label = ( isset( $link_details[$length] ) ? $link_details[$length] : $link_details['label'] ); |
|
1049 | + if ( $length == 'icon' && isset( $link_details[$length] ) ) { |
|
1050 | 1050 | $label = '<span class="' . $label . '" title="' . esc_attr( $link_details['label'] ) . '" aria-hidden="true"></span>'; |
1051 | - $link .= ' aria-label="' . esc_attr( $link_details['label'] ) . '"'; |
|
1051 | + $link .= ' aria-label="' . esc_attr( $link_details['label'] ) . '"'; |
|
1052 | 1052 | } |
1053 | 1053 | |
1054 | 1054 | $link .= '>' . $label . '</a>'; |
@@ -1204,7 +1204,7 @@ discard block |
||
1204 | 1204 | $status = 'publish'; |
1205 | 1205 | } |
1206 | 1206 | |
1207 | - $name = $nice_names[ $status ]; |
|
1207 | + $name = $nice_names[$status]; |
|
1208 | 1208 | |
1209 | 1209 | return $name; |
1210 | 1210 | } |
@@ -1237,17 +1237,17 @@ discard block |
||
1237 | 1237 | '' => array( 'align_right' ), |
1238 | 1238 | ); |
1239 | 1239 | |
1240 | - $icons[ __( 'My Templates', 'formidable' ) ] = array( 'user', 'var(--orange)' ); |
|
1240 | + $icons[__( 'My Templates', 'formidable' )] = array( 'user', 'var(--orange)' ); |
|
1241 | 1241 | |
1242 | 1242 | $icon = $icons['']; |
1243 | 1243 | |
1244 | 1244 | if ( count( $categories ) === 1 ) { |
1245 | 1245 | $category = reset( $categories ); |
1246 | - $icon = isset( $icons[ $category ] ) ? $icons[ $category ] : $icon; |
|
1246 | + $icon = isset( $icons[$category] ) ? $icons[$category] : $icon; |
|
1247 | 1247 | } elseif ( ! empty( $categories ) ) { |
1248 | 1248 | foreach ( $icons as $cat => $icon ) { |
1249 | 1249 | if ( ! in_array( $cat, $categories ) ) { |
1250 | - unset( $icons[ $cat ] ); |
|
1250 | + unset( $icons[$cat] ); |
|
1251 | 1251 | } |
1252 | 1252 | } |
1253 | 1253 | $icon = reset( $icons ); |
@@ -1373,7 +1373,7 @@ discard block |
||
1373 | 1373 | |
1374 | 1374 | foreach ( $item['categories'] as $k => $category ) { |
1375 | 1375 | if ( in_array( $category, $plans, true ) ) { |
1376 | - unset( $item['categories'][ $k ] ); |
|
1376 | + unset( $item['categories'][$k] ); |
|
1377 | 1377 | |
1378 | 1378 | if ( $category === 'Personal' ) { |
1379 | 1379 | // Show the current package name. |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | } else { |
75 | 75 | foreach ( $addons as $k => $addon ) { |
76 | 76 | if ( empty( $addon['excerpt'] ) && $k !== 'error' ) { |
77 | - unset( $addons[ $k ] ); |
|
77 | + unset( $addons[$k] ); |
|
78 | 78 | } |
79 | 79 | } |
80 | 80 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | foreach ( $list as $k => $info ) { |
172 | 172 | $info['slug'] = $k; |
173 | - $list[ $k ] = array_merge( $defaults, $info ); |
|
173 | + $list[$k] = array_merge( $defaults, $info ); |
|
174 | 174 | } |
175 | 175 | return $list; |
176 | 176 | } |
@@ -349,16 +349,16 @@ discard block |
||
349 | 349 | continue; |
350 | 350 | } |
351 | 351 | |
352 | - $wp_plugin = isset( $wp_plugins[ $folder ] ) ? $wp_plugins[ $folder ] : array(); |
|
352 | + $wp_plugin = isset( $wp_plugins[$folder] ) ? $wp_plugins[$folder] : array(); |
|
353 | 353 | $wp_version = isset( $wp_plugin['Version'] ) ? $wp_plugin['Version'] : '1.0'; |
354 | 354 | |
355 | 355 | if ( version_compare( $wp_version, $plugin->new_version, '<' ) ) { |
356 | 356 | $slug = explode( '/', $folder ); |
357 | 357 | $plugin->slug = $slug[0]; |
358 | - $transient->response[ $folder ] = $plugin; |
|
358 | + $transient->response[$folder] = $plugin; |
|
359 | 359 | } |
360 | 360 | |
361 | - $transient->checked[ $folder ] = $wp_version; |
|
361 | + $transient->checked[$folder] = $wp_version; |
|
362 | 362 | |
363 | 363 | } |
364 | 364 | |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | |
382 | 382 | $all_plugins = get_plugins(); |
383 | 383 | |
384 | - return isset( $all_plugins[ $plugin ] ); |
|
384 | + return isset( $all_plugins[$plugin] ); |
|
385 | 385 | } |
386 | 386 | |
387 | 387 | /** |
@@ -420,13 +420,13 @@ discard block |
||
420 | 420 | } |
421 | 421 | |
422 | 422 | $download_id = isset( $plugin['id'] ) ? $plugin['id'] : 0; |
423 | - if ( ! empty( $download_id ) && ! isset( $version_info[ $download_id ]['package'] ) ) { |
|
423 | + if ( ! empty( $download_id ) && ! isset( $version_info[$download_id]['package'] ) ) { |
|
424 | 424 | // if this addon is using its own license, get the update url |
425 | 425 | $addon_info = $api->get_api_info(); |
426 | 426 | |
427 | - $version_info[ $download_id ] = $addon_info[ $download_id ]; |
|
427 | + $version_info[$download_id] = $addon_info[$download_id]; |
|
428 | 428 | if ( isset( $addon_info['error'] ) ) { |
429 | - $version_info[ $download_id ]['error'] = array( |
|
429 | + $version_info[$download_id]['error'] = array( |
|
430 | 430 | 'message' => $addon_info['error']['message'], |
431 | 431 | 'code' => $addon_info['error']['code'], |
432 | 432 | ); |
@@ -520,8 +520,8 @@ discard block |
||
520 | 520 | return $addon; |
521 | 521 | } |
522 | 522 | } |
523 | - } elseif ( isset( $addons[ $download_id ] ) ) { |
|
524 | - $plugin = $addons[ $download_id ]; |
|
523 | + } elseif ( isset( $addons[$download_id] ) ) { |
|
524 | + $plugin = $addons[$download_id]; |
|
525 | 525 | } |
526 | 526 | |
527 | 527 | return $plugin; |
@@ -575,7 +575,7 @@ discard block |
||
575 | 575 | self::prepare_addon_link( $addon['link'] ); |
576 | 576 | |
577 | 577 | self::set_addon_status( $addon ); |
578 | - $addons[ $id ] = $addon; |
|
578 | + $addons[$id] = $addon; |
|
579 | 579 | } |
580 | 580 | } |
581 | 581 | |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | 'utm_medium' => 'addons', |
594 | 594 | 'utm_campaign' => 'liteplugin', |
595 | 595 | ); |
596 | - $link = add_query_arg( $query_args, $link ); |
|
596 | + $link = add_query_arg( $query_args, $link ); |
|
597 | 597 | } |
598 | 598 | |
599 | 599 | /** |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $s_query['it.form_id'] = $form_id; |
26 | 26 | $join_form_in_query = false; |
27 | 27 | } else { |
28 | - $s_query[] = array( |
|
28 | + $s_query[] = array( |
|
29 | 29 | 'or' => 1, |
30 | 30 | 'parent_form_id' => null, |
31 | 31 | 'parent_form_id <' => 1, |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | if ( strpos( $orderby, 'meta' ) !== false ) { |
58 | 58 | $order_field_type = FrmField::get_type( str_replace( 'meta_', '', $orderby ) ); |
59 | - $orderby .= in_array( $order_field_type, array( 'number', 'scale', 'star' ) ) ? '+0' : ''; |
|
59 | + $orderby .= in_array( $order_field_type, array( 'number', 'scale', 'star' ) ) ? '+0' : ''; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | $order = self::get_param( |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | |
190 | 190 | $r = "<tr id='item-action-{$item->id}'$style>"; |
191 | 191 | |
192 | - list( $columns, $hidden, , $primary ) = $this->get_column_info(); |
|
192 | + list( $columns, $hidden,, $primary ) = $this->get_column_info(); |
|
193 | 193 | $action_col = false; |
194 | 194 | $action_columns = $this->get_action_columns(); |
195 | 195 |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | |
6 | 6 | class FrmFormTemplateApi extends FrmFormApi { |
7 | 7 | |
8 | - protected static $code_option_name = 'frm_free_license_code'; |
|
8 | + protected static $code_option_name = 'frm_free_license_code'; |
|
9 | 9 | |
10 | 10 | private static $base_api_url = 'https://formidableforms.com/wp-json/form-templates/v1/'; |
11 | 11 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | $templates = $this->get_api_info(); |
78 | 78 | $contact_form = 20872734; |
79 | - return isset( $templates[ $contact_form ] ) && ! empty( $templates[ $contact_form ]['url'] ); |
|
79 | + return isset( $templates[$contact_form] ) && ! empty( $templates[$contact_form]['url'] ); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -137,15 +137,15 @@ discard block |
||
137 | 137 | continue; |
138 | 138 | } |
139 | 139 | |
140 | - $data['urlByKey'][ $template['key'] ] = $template['url']; |
|
140 | + $data['urlByKey'][$template['key']] = $template['url']; |
|
141 | 141 | } |
142 | 142 | |
143 | - if ( ! isset( $data['urlByKey'][ $key ] ) ) { |
|
143 | + if ( ! isset( $data['urlByKey'][$key] ) ) { |
|
144 | 144 | $error = new WP_Error( 400, 'We were unable to retrieve the template' ); |
145 | 145 | wp_send_json_error( $error ); |
146 | 146 | } |
147 | 147 | |
148 | - $data['url'] = $data['urlByKey'][ $key ]; |
|
148 | + $data['url'] = $data['urlByKey'][$key]; |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | wp_send_json_success( $data ); |
@@ -5,15 +5,15 @@ discard block |
||
5 | 5 | |
6 | 6 | class FrmFormAction { |
7 | 7 | |
8 | - public $id_base; // Root id for all actions of this type. |
|
9 | - public $name; // Name for this action type. |
|
8 | + public $id_base; // Root id for all actions of this type. |
|
9 | + public $name; // Name for this action type. |
|
10 | 10 | public $option_name; |
11 | - public $action_options; // Option array passed to wp_register_sidebar_widget() |
|
11 | + public $action_options; // Option array passed to wp_register_sidebar_widget() |
|
12 | 12 | public $control_options; // Option array passed to wp_register_widget_control() |
13 | 13 | |
14 | - public $form_id; // The ID of the form to evaluate |
|
15 | - public $number = false; // Unique ID number of the current instance. |
|
16 | - public $id = ''; // Unique ID string of the current instance (id_base-number) |
|
14 | + public $form_id; // The ID of the form to evaluate |
|
15 | + public $number = false; // Unique ID number of the current instance. |
|
16 | + public $id = ''; // Unique ID string of the current instance (id_base-number) |
|
17 | 17 | public $updated = false; // Set true when we update the data after a POST submit - makes sure we don't do it twice. |
18 | 18 | |
19 | 19 | // Member functions that you must over-ride. |
@@ -141,9 +141,9 @@ discard block |
||
141 | 141 | $groups = FrmFormActionsController::form_action_groups(); |
142 | 142 | $group = 'misc'; |
143 | 143 | |
144 | - if ( isset( $action_options['group'] ) && isset( $groups[ $action_options['group'] ] ) ) { |
|
144 | + if ( isset( $action_options['group'] ) && isset( $groups[$action_options['group']] ) ) { |
|
145 | 145 | $group = $action_options['group']; |
146 | - } elseif ( isset( $groups[ $this->id_base ] ) ) { |
|
146 | + } elseif ( isset( $groups[$this->id_base] ) ) { |
|
147 | 147 | $group = $this->id_base; |
148 | 148 | } else { |
149 | 149 | foreach ( $groups as $name => $check_group ) { |
@@ -154,8 +154,8 @@ discard block |
||
154 | 154 | } |
155 | 155 | } |
156 | 156 | |
157 | - $groups[ $group ]['id'] = $group; |
|
158 | - return $groups[ $group ]; |
|
157 | + $groups[$group]['id'] = $group; |
|
158 | + return $groups[$group]; |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | /** |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | * @return integer $post_id |
258 | 258 | */ |
259 | 259 | public function maybe_create_action( $action, $forms ) { |
260 | - if ( isset( $action['ID'] ) && is_numeric( $action['ID'] ) && isset( $forms[ $action['menu_order'] ] ) && $forms[ $action['menu_order'] ] == 'updated' ) { |
|
260 | + if ( isset( $action['ID'] ) && is_numeric( $action['ID'] ) && isset( $forms[$action['menu_order']] ) && $forms[$action['menu_order']] == 'updated' ) { |
|
261 | 261 | // Update action only |
262 | 262 | $action['post_content'] = FrmAppHelper::maybe_json_decode( $action['post_content'] ); |
263 | 263 | $post_id = $this->save_settings( $action ); |
@@ -277,18 +277,18 @@ discard block |
||
277 | 277 | $switch = $this->get_global_switch_fields(); |
278 | 278 | |
279 | 279 | foreach ( (array) $action->post_content as $key => $val ) { |
280 | - if ( is_numeric( $val ) && isset( $frm_duplicate_ids[ $val ] ) ) { |
|
281 | - $action->post_content[ $key ] = $frm_duplicate_ids[ $val ]; |
|
280 | + if ( is_numeric( $val ) && isset( $frm_duplicate_ids[$val] ) ) { |
|
281 | + $action->post_content[$key] = $frm_duplicate_ids[$val]; |
|
282 | 282 | } elseif ( ! is_array( $val ) ) { |
283 | - $action->post_content[ $key ] = FrmFieldsHelper::switch_field_ids( $val ); |
|
284 | - } elseif ( isset( $switch[ $key ] ) && is_array( $switch[ $key ] ) ) { |
|
283 | + $action->post_content[$key] = FrmFieldsHelper::switch_field_ids( $val ); |
|
284 | + } elseif ( isset( $switch[$key] ) && is_array( $switch[$key] ) ) { |
|
285 | 285 | // loop through each value if empty |
286 | - if ( empty( $switch[ $key ] ) ) { |
|
287 | - $switch[ $key ] = array_keys( $val ); |
|
286 | + if ( empty( $switch[$key] ) ) { |
|
287 | + $switch[$key] = array_keys( $val ); |
|
288 | 288 | } |
289 | 289 | |
290 | - foreach ( $switch[ $key ] as $subkey ) { |
|
291 | - $action->post_content[ $key ] = $this->duplicate_array_walk( $action->post_content[ $key ], $subkey, $val ); |
|
290 | + foreach ( $switch[$key] as $subkey ) { |
|
291 | + $action->post_content[$key] = $this->duplicate_array_walk( $action->post_content[$key], $subkey, $val ); |
|
292 | 292 | } |
293 | 293 | } |
294 | 294 | |
@@ -306,20 +306,20 @@ discard block |
||
306 | 306 | foreach ( $subkey as $subkey2 ) { |
307 | 307 | foreach ( (array) $val as $ck => $cv ) { |
308 | 308 | if ( is_array( $cv ) ) { |
309 | - $action[ $ck ] = $this->duplicate_array_walk( $action[ $ck ], $subkey2, $cv ); |
|
310 | - } elseif ( isset( $cv[ $subkey ] ) && is_numeric( $cv[ $subkey ] ) && isset( $frm_duplicate_ids[ $cv[ $subkey ] ] ) ) { |
|
311 | - $action[ $ck ][ $subkey ] = $frm_duplicate_ids[ $cv[ $subkey ] ]; |
|
309 | + $action[$ck] = $this->duplicate_array_walk( $action[$ck], $subkey2, $cv ); |
|
310 | + } elseif ( isset( $cv[$subkey] ) && is_numeric( $cv[$subkey] ) && isset( $frm_duplicate_ids[$cv[$subkey]] ) ) { |
|
311 | + $action[$ck][$subkey] = $frm_duplicate_ids[$cv[$subkey]]; |
|
312 | 312 | } |
313 | 313 | } |
314 | 314 | } |
315 | 315 | } else { |
316 | 316 | foreach ( (array) $val as $ck => $cv ) { |
317 | 317 | if ( is_array( $cv ) ) { |
318 | - $action[ $ck ] = $this->duplicate_array_walk( $action[ $ck ], $subkey, $cv ); |
|
319 | - } elseif ( $ck == $subkey && isset( $frm_duplicate_ids[ $cv ] ) ) { |
|
320 | - $action[ $ck ] = $frm_duplicate_ids[ $cv ]; |
|
318 | + $action[$ck] = $this->duplicate_array_walk( $action[$ck], $subkey, $cv ); |
|
319 | + } elseif ( $ck == $subkey && isset( $frm_duplicate_ids[$cv] ) ) { |
|
320 | + $action[$ck] = $frm_duplicate_ids[$cv]; |
|
321 | 321 | } elseif ( $ck == $subkey ) { |
322 | - $action[ $ck ] = $this->maybe_switch_field_ids( $action[ $ck ] ); |
|
322 | + $action[$ck] = $this->maybe_switch_field_ids( $action[$ck] ); |
|
323 | 323 | } |
324 | 324 | } |
325 | 325 | } |
@@ -342,10 +342,10 @@ discard block |
||
342 | 342 | return; |
343 | 343 | } |
344 | 344 | |
345 | - if ( isset( $_POST[ $this->option_name ] ) && is_array( $_POST[ $this->option_name ] ) ) { |
|
345 | + if ( isset( $_POST[$this->option_name] ) && is_array( $_POST[$this->option_name] ) ) { |
|
346 | 346 | // Sanitizing removes scripts and <email> type of values. |
347 | 347 | // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
348 | - $settings = wp_unslash( $_POST[ $this->option_name ] ); |
|
348 | + $settings = wp_unslash( $_POST[$this->option_name] ); |
|
349 | 349 | } else { |
350 | 350 | return; |
351 | 351 | } |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | foreach ( $settings as $number => $new_instance ) { |
356 | 356 | $this->_set( $number ); |
357 | 357 | |
358 | - $old_instance = isset( $all_instances[ $number ] ) ? $all_instances[ $number ] : array(); |
|
358 | + $old_instance = isset( $all_instances[$number] ) ? $all_instances[$number] : array(); |
|
359 | 359 | |
360 | 360 | if ( ! isset( $new_instance['post_status'] ) ) { |
361 | 361 | $new_instance['post_status'] = 'draft'; |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | $instance['post_content'] = apply_filters( 'frm_before_save_' . $this->id_base . '_action', $new_instance['post_content'], $instance, $new_instance, $old_instance, $this ); |
396 | 396 | |
397 | 397 | if ( false !== $instance ) { |
398 | - $all_instances[ $number ] = $instance; |
|
398 | + $all_instances[$number] = $instance; |
|
399 | 399 | } |
400 | 400 | |
401 | 401 | $action_ids[] = $this->save_settings( $instance ); |
@@ -471,12 +471,12 @@ discard block |
||
471 | 471 | // some plugins/themes are formatting the post_excerpt |
472 | 472 | $action->post_excerpt = sanitize_title( $action->post_excerpt ); |
473 | 473 | |
474 | - if ( ! isset( $action_controls[ $action->post_excerpt ] ) ) { |
|
474 | + if ( ! isset( $action_controls[$action->post_excerpt] ) ) { |
|
475 | 475 | continue; |
476 | 476 | } |
477 | 477 | |
478 | - $action = $action_controls[ $action->post_excerpt ]->prepare_action( $action ); |
|
479 | - $settings[ $action->ID ] = $action; |
|
478 | + $action = $action_controls[$action->post_excerpt]->prepare_action( $action ); |
|
479 | + $settings[$action->ID] = $action; |
|
480 | 480 | |
481 | 481 | if ( count( $settings ) >= $limit ) { |
482 | 482 | break; |
@@ -506,7 +506,7 @@ discard block |
||
506 | 506 | 'limit' => 99, |
507 | 507 | 'post_status' => $default_status, |
508 | 508 | ); |
509 | - $args = wp_parse_args( $args, $defaults ); |
|
509 | + $args = wp_parse_args( $args, $defaults ); |
|
510 | 510 | } |
511 | 511 | |
512 | 512 | /** |
@@ -567,7 +567,7 @@ discard block |
||
567 | 567 | |
568 | 568 | $action = $this->prepare_action( $action ); |
569 | 569 | |
570 | - $settings[ $action->ID ] = $action; |
|
570 | + $settings[$action->ID] = $action; |
|
571 | 571 | } |
572 | 572 | |
573 | 573 | if ( 1 === $limit ) { |
@@ -604,10 +604,10 @@ discard block |
||
604 | 604 | |
605 | 605 | foreach ( $default_values as $k => $vals ) { |
606 | 606 | if ( is_array( $vals ) && ! empty( $vals ) ) { |
607 | - if ( 'event' == $k && ! $this->action_options['force_event'] && ! empty( $action->post_content[ $k ] ) ) { |
|
607 | + if ( 'event' == $k && ! $this->action_options['force_event'] && ! empty( $action->post_content[$k] ) ) { |
|
608 | 608 | continue; |
609 | 609 | } |
610 | - $action->post_content[ $k ] = wp_parse_args( $action->post_content[ $k ], $vals ); |
|
610 | + $action->post_content[$k] = wp_parse_args( $action->post_content[$k], $vals ); |
|
611 | 611 | } |
612 | 612 | } |
613 | 613 | |
@@ -682,14 +682,14 @@ discard block |
||
682 | 682 | * Migrate settings from form->options into new action. |
683 | 683 | */ |
684 | 684 | public function migrate_to_2( $form, $update = 'update' ) { |
685 | - $action = $this->prepare_new( $form->id ); |
|
685 | + $action = $this->prepare_new( $form->id ); |
|
686 | 686 | FrmAppHelper::unserialize_or_decode( $form->options ); |
687 | 687 | |
688 | 688 | // fill with existing options |
689 | 689 | foreach ( $action->post_content as $name => $val ) { |
690 | - if ( isset( $form->options[ $name ] ) ) { |
|
691 | - $action->post_content[ $name ] = $form->options[ $name ]; |
|
692 | - unset( $form->options[ $name ] ); |
|
690 | + if ( isset( $form->options[$name] ) ) { |
|
691 | + $action->post_content[$name] = $form->options[$name]; |
|
692 | + unset( $form->options[$name] ); |
|
693 | 693 | } |
694 | 694 | } |
695 | 695 | |
@@ -755,7 +755,7 @@ discard block |
||
755 | 755 | $stop = $stop ? false : true; |
756 | 756 | } |
757 | 757 | |
758 | - $met[ $stop ] = $stop; |
|
758 | + $met[$stop] = $stop; |
|
759 | 759 | } |
760 | 760 | |
761 | 761 | if ( $notification['conditions']['any_all'] == 'all' && ! empty( $met ) && isset( $met[0] ) && isset( $met[1] ) ) { |
@@ -806,8 +806,8 @@ discard block |
||
806 | 806 | private static function get_value_from_entry( $entry, $field_id ) { |
807 | 807 | $observed_value = ''; |
808 | 808 | |
809 | - if ( isset( $entry->metas[ $field_id ] ) ) { |
|
810 | - $observed_value = $entry->metas[ $field_id ]; |
|
809 | + if ( isset( $entry->metas[$field_id] ) ) { |
|
810 | + $observed_value = $entry->metas[$field_id]; |
|
811 | 811 | } elseif ( $entry->post_id && FrmAppHelper::pro_is_installed() ) { |
812 | 812 | $field = FrmField::getOne( $field_id ); |
813 | 813 | $observed_value = FrmProEntryMetaHelper::get_post_or_meta_value( |
@@ -125,7 +125,8 @@ |
||
125 | 125 | } |
126 | 126 | |
127 | 127 | // Only do this for single site installs. |
128 | - if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) { // WPCS: CSRF ok. |
|
128 | + if ( isset( $_GET['activate-multi'] ) || is_network_admin() ) { |
|
129 | +// WPCS: CSRF ok. |
|
129 | 130 | return; |
130 | 131 | } |
131 | 132 |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | return; |
85 | 85 | } |
86 | 86 | |
87 | - if ( isset( $this->messages[ $message['key'] ] ) && ! isset( $message['force'] ) ) { |
|
87 | + if ( isset( $this->messages[$message['key']] ) && ! isset( $message['force'] ) ) { |
|
88 | 88 | // Don't replace messages unless required. |
89 | 89 | return; |
90 | 90 | } |
@@ -93,13 +93,13 @@ discard block |
||
93 | 93 | return; |
94 | 94 | } |
95 | 95 | |
96 | - if ( isset( $this->messages[ $message['key'] ] ) ) { |
|
96 | + if ( isset( $this->messages[$message['key']] ) ) { |
|
97 | 97 | // Move up and mark as new. |
98 | - unset( $this->messages[ $message['key'] ] ); |
|
98 | + unset( $this->messages[$message['key']] ); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | $this->fill_message( $message ); |
102 | - $this->messages[ $message['key'] ] = $message; |
|
102 | + $this->messages[$message['key']] = $message; |
|
103 | 103 | |
104 | 104 | $this->update_list(); |
105 | 105 | |
@@ -127,11 +127,11 @@ discard block |
||
127 | 127 | private function clean_messages() { |
128 | 128 | $removed = false; |
129 | 129 | foreach ( $this->messages as $t => $message ) { |
130 | - $read = isset( $message['read'] ) && ! empty( $message['read'] ) && isset( $message['read'][ get_current_user_id() ] ) && $message['read'][ get_current_user_id() ] < strtotime( '-1 month' ); |
|
131 | - $dismissed = isset( $message['dismissed'] ) && ! empty( $message['dismissed'] ) && isset( $message['dismissed'][ get_current_user_id() ] ) && $message['dismissed'][ get_current_user_id() ] < strtotime( '-1 week' ); |
|
130 | + $read = isset( $message['read'] ) && ! empty( $message['read'] ) && isset( $message['read'][get_current_user_id()] ) && $message['read'][get_current_user_id()] < strtotime( '-1 month' ); |
|
131 | + $dismissed = isset( $message['dismissed'] ) && ! empty( $message['dismissed'] ) && isset( $message['dismissed'][get_current_user_id()] ) && $message['dismissed'][get_current_user_id()] < strtotime( '-1 week' ); |
|
132 | 132 | $expired = $this->is_expired( $message ); |
133 | 133 | if ( $read || $expired || $dismissed ) { |
134 | - unset( $this->messages[ $t ] ); |
|
134 | + unset( $this->messages[$t] ); |
|
135 | 135 | $removed = true; |
136 | 136 | } |
137 | 137 | } |
@@ -144,11 +144,11 @@ discard block |
||
144 | 144 | private function filter_messages( &$messages ) { |
145 | 145 | $user_id = get_current_user_id(); |
146 | 146 | foreach ( $messages as $k => $message ) { |
147 | - $dismissed = isset( $message['dismissed'] ) && isset( $message['dismissed'][ $user_id ] ); |
|
147 | + $dismissed = isset( $message['dismissed'] ) && isset( $message['dismissed'][$user_id] ); |
|
148 | 148 | if ( empty( $k ) || $this->is_expired( $message ) || $dismissed ) { |
149 | - unset( $messages[ $k ] ); |
|
149 | + unset( $messages[$k] ); |
|
150 | 150 | } elseif ( ! $this->is_for_user( $message ) ) { |
151 | - unset( $messages[ $k ] ); |
|
151 | + unset( $messages[$k] ); |
|
152 | 152 | } |
153 | 153 | } |
154 | 154 | $messages = apply_filters( 'frm_filter_inbox', $messages ); |
@@ -181,14 +181,14 @@ discard block |
||
181 | 181 | * @param string $key |
182 | 182 | */ |
183 | 183 | public function mark_read( $key ) { |
184 | - if ( ! $key || ! isset( $this->messages[ $key ] ) ) { |
|
184 | + if ( ! $key || ! isset( $this->messages[$key] ) ) { |
|
185 | 185 | return; |
186 | 186 | } |
187 | 187 | |
188 | - if ( ! isset( $this->messages[ $key ]['read'] ) ) { |
|
189 | - $this->messages[ $key ]['read'] = array(); |
|
188 | + if ( ! isset( $this->messages[$key]['read'] ) ) { |
|
189 | + $this->messages[$key]['read'] = array(); |
|
190 | 190 | } |
191 | - $this->messages[ $key ]['read'][ get_current_user_id() ] = time(); |
|
191 | + $this->messages[$key]['read'][get_current_user_id()] = time(); |
|
192 | 192 | |
193 | 193 | $this->update_list(); |
194 | 194 | } |
@@ -199,9 +199,9 @@ discard block |
||
199 | 199 | * @since 4.05.02 |
200 | 200 | */ |
201 | 201 | public function mark_unread( $key ) { |
202 | - $is_read = isset( $this->messages[ $key ] ) && isset( $this->messages[ $key ]['read'] ) && isset( $this->messages[ $key ]['read'][ get_current_user_id() ] ); |
|
202 | + $is_read = isset( $this->messages[$key] ) && isset( $this->messages[$key]['read'] ) && isset( $this->messages[$key]['read'][get_current_user_id()] ); |
|
203 | 203 | if ( $is_read ) { |
204 | - unset( $this->messages[ $key ]['read'][ get_current_user_id() ] ); |
|
204 | + unset( $this->messages[$key]['read'][get_current_user_id()] ); |
|
205 | 205 | $this->update_list(); |
206 | 206 | } |
207 | 207 | } |
@@ -215,14 +215,14 @@ discard block |
||
215 | 215 | return; |
216 | 216 | } |
217 | 217 | |
218 | - if ( ! isset( $this->messages[ $key ] ) ) { |
|
218 | + if ( ! isset( $this->messages[$key] ) ) { |
|
219 | 219 | return; |
220 | 220 | } |
221 | 221 | |
222 | - if ( ! isset( $this->messages[ $key ]['dismissed'] ) ) { |
|
223 | - $this->messages[ $key ]['dismissed'] = array(); |
|
222 | + if ( ! isset( $this->messages[$key]['dismissed'] ) ) { |
|
223 | + $this->messages[$key]['dismissed'] = array(); |
|
224 | 224 | } |
225 | - $this->messages[ $key ]['dismissed'][ get_current_user_id() ] = time(); |
|
225 | + $this->messages[$key]['dismissed'][get_current_user_id()] = time(); |
|
226 | 226 | |
227 | 227 | $this->update_list(); |
228 | 228 | } |
@@ -234,11 +234,11 @@ discard block |
||
234 | 234 | $user_id = get_current_user_id(); |
235 | 235 | foreach ( $this->messages as $key => $message ) { |
236 | 236 | if ( ! isset( $message['dismissed'] ) ) { |
237 | - $this->messages[ $key ]['dismissed'] = array(); |
|
237 | + $this->messages[$key]['dismissed'] = array(); |
|
238 | 238 | } |
239 | 239 | |
240 | - if ( ! isset( $message['dismissed'][ $user_id ] ) ) { |
|
241 | - $this->messages[ $key ]['dismissed'][ $user_id ] = time(); |
|
240 | + if ( ! isset( $message['dismissed'][$user_id] ) ) { |
|
241 | + $this->messages[$key]['dismissed'][$user_id] = time(); |
|
242 | 242 | } |
243 | 243 | } |
244 | 244 | $this->update_list(); |
@@ -248,8 +248,8 @@ discard block |
||
248 | 248 | $messages = $this->get_messages( 'filter' ); |
249 | 249 | $user_id = get_current_user_id(); |
250 | 250 | foreach ( $messages as $t => $message ) { |
251 | - if ( isset( $message['read'] ) && isset( $message['read'][ $user_id ] ) ) { |
|
252 | - unset( $messages[ $t ] ); |
|
251 | + if ( isset( $message['read'] ) && isset( $message['read'][$user_id] ) ) { |
|
252 | + unset( $messages[$t] ); |
|
253 | 253 | } |
254 | 254 | } |
255 | 255 | return $messages; |
@@ -273,8 +273,8 @@ discard block |
||
273 | 273 | * @since 4.05.02 |
274 | 274 | */ |
275 | 275 | public function remove( $key ) { |
276 | - if ( isset( $this->messages[ $key ] ) ) { |
|
277 | - unset( $this->messages[ $key ] ); |
|
276 | + if ( isset( $this->messages[$key] ) ) { |
|
277 | + unset( $this->messages[$key] ); |
|
278 | 278 | $this->update_list(); |
279 | 279 | } |
280 | 280 | } |
@@ -102,7 +102,7 @@ |
||
102 | 102 | 'name' => 'FrmFieldName', |
103 | 103 | ); |
104 | 104 | |
105 | - $class = isset( $type_classes[ $field_type ] ) ? $type_classes[ $field_type ] : ''; |
|
105 | + $class = isset( $type_classes[$field_type] ) ? $type_classes[$field_type] : ''; |
|
106 | 106 | |
107 | 107 | return apply_filters( 'frm_get_field_type_class', $class, $field_type ); |
108 | 108 | } |