@@ -41,8 +41,8 @@ discard block |
||
| 41 | 41 | * @param array $atts |
| 42 | 42 | */ |
| 43 | 43 | private function _set( $param, $atts ) { |
| 44 | - if ( isset( $atts[ $param ] ) ) { |
|
| 45 | - $this->{$param} = $atts[ $param ]; |
|
| 44 | + if ( isset( $atts[$param] ) ) { |
|
| 45 | + $this->{$param} = $atts[$param]; |
|
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | |
@@ -86,8 +86,8 @@ discard block |
||
| 86 | 86 | $exclude = array( 'field_obj', 'html' ); |
| 87 | 87 | |
| 88 | 88 | foreach ( $exclude as $ex ) { |
| 89 | - if ( isset( $atts[ $ex ] ) ) { |
|
| 90 | - unset( $this->pass_args[ $ex ] ); |
|
| 89 | + if ( isset( $atts[$ex] ) ) { |
|
| 90 | + unset( $this->pass_args[$ex] ); |
|
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | } |
@@ -99,8 +99,8 @@ discard block |
||
| 99 | 99 | * @param array $set |
| 100 | 100 | */ |
| 101 | 101 | private function set_from_field( $atts, $set ) { |
| 102 | - if ( isset( $atts[ $set['param'] ] ) ) { |
|
| 103 | - $this->{$set['param']} = $atts[ $set['param'] ]; |
|
| 102 | + if ( isset( $atts[$set['param']] ) ) { |
|
| 103 | + $this->{$set['param']} = $atts[$set['param']]; |
|
| 104 | 104 | } else { |
| 105 | 105 | $this->{$set['param']} = $this->field_obj->get_field_column( $set['default'] ); |
| 106 | 106 | } |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | * @since 3.0 |
| 208 | 208 | */ |
| 209 | 209 | private function replace_error_shortcode() { |
| 210 | - $error = isset( $this->pass_args['errors'][ 'field' . $this->field_id ] ) ? $this->pass_args['errors'][ 'field' . $this->field_id ] : false; |
|
| 210 | + $error = isset( $this->pass_args['errors']['field' . $this->field_id] ) ? $this->pass_args['errors']['field' . $this->field_id] : false; |
|
| 211 | 211 | FrmShortcodeHelper::remove_inline_conditions( ! empty( $error ), 'error', $error, $this->html ); |
| 212 | 212 | } |
| 213 | 213 | |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | preg_match_all( "/\[(input|deletelink)\b(.*?)(?:(\/))?\]/s", $this->html, $shortcodes, PREG_PATTERN_ORDER ); |
| 284 | 284 | |
| 285 | 285 | foreach ( $shortcodes[0] as $short_key => $tag ) { |
| 286 | - $shortcode_atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[2][ $short_key ] ); |
|
| 286 | + $shortcode_atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[2][$short_key] ); |
|
| 287 | 287 | $tag = FrmShortcodeHelper::get_shortcode_tag( $shortcodes, $short_key ); |
| 288 | 288 | |
| 289 | 289 | $replace_with = ''; |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | $replace_with = $this->replace_input_shortcode( $shortcode_atts ); |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | - $this->html = str_replace( $shortcodes[0][ $short_key ], $replace_with, $this->html ); |
|
| 297 | + $this->html = str_replace( $shortcodes[0][$short_key], $replace_with, $this->html ); |
|
| 298 | 298 | } |
| 299 | 299 | } |
| 300 | 300 | |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | */ |
| 316 | 316 | private function prepare_input_shortcode_atts( $shortcode_atts ) { |
| 317 | 317 | if ( isset( $shortcode_atts['opt'] ) ) { |
| 318 | - $shortcode_atts['opt']--; |
|
| 318 | + $shortcode_atts['opt'] --; |
|
| 319 | 319 | } |
| 320 | 320 | |
| 321 | 321 | $field_class = isset( $shortcode_atts['class'] ) ? $shortcode_atts['class'] : ''; |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | unset( $shortcode_atts['class'] ); |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | - if ( isset( $this->pass_args['errors'][ 'field' . $this->field_id ] ) ) { |
|
| 328 | + if ( isset( $this->pass_args['errors']['field' . $this->field_id] ) ) { |
|
| 329 | 329 | $shortcode_atts['aria-invalid'] = 'true'; |
| 330 | 330 | } |
| 331 | 331 | |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | */ |
| 384 | 384 | private function get_field_div_classes() { |
| 385 | 385 | // Add error class |
| 386 | - $classes = isset( $this->pass_args['errors'][ 'field' . $this->field_id ] ) ? ' frm_blank_field' : ''; |
|
| 386 | + $classes = isset( $this->pass_args['errors']['field' . $this->field_id] ) ? ' frm_blank_field' : ''; |
|
| 387 | 387 | |
| 388 | 388 | // Add label position class |
| 389 | 389 | $settings = $this->field_obj->display_field_settings(); |