@@ -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 | |
| 87 | 87 | $exclude = array( 'field_obj', 'html' ); |
| 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 | } |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | */ |
| 226 | 226 | private function replace_error_shortcode() { |
| 227 | 227 | $this->maybe_add_error_id(); |
| 228 | - $error = isset( $this->pass_args['errors'][ 'field' . $this->field_id ] ) ? $this->pass_args['errors'][ 'field' . $this->field_id ] : false; |
|
| 228 | + $error = isset( $this->pass_args['errors']['field' . $this->field_id] ) ? $this->pass_args['errors']['field' . $this->field_id] : false; |
|
| 229 | 229 | FrmShortcodeHelper::remove_inline_conditions( ! empty( $error ), 'error', $error, $this->html ); |
| 230 | 230 | } |
| 231 | 231 | |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | * @since 3.06.02 |
| 237 | 237 | */ |
| 238 | 238 | private function maybe_add_error_id() { |
| 239 | - if ( ! isset( $this->pass_args['errors'][ 'field' . $this->field_id ] ) ) { |
|
| 239 | + if ( ! isset( $this->pass_args['errors']['field' . $this->field_id] ) ) { |
|
| 240 | 240 | return; |
| 241 | 241 | } |
| 242 | 242 | |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | preg_match_all( "/\[(input|deletelink)\b(.*?)(?:(\/))?\]/s", $this->html, $shortcodes, PREG_PATTERN_ORDER ); |
| 317 | 317 | |
| 318 | 318 | foreach ( $shortcodes[0] as $short_key => $tag ) { |
| 319 | - $shortcode_atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[2][ $short_key ] ); |
|
| 319 | + $shortcode_atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[2][$short_key] ); |
|
| 320 | 320 | $tag = FrmShortcodeHelper::get_shortcode_tag( $shortcodes, $short_key ); |
| 321 | 321 | |
| 322 | 322 | $replace_with = ''; |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | $replace_with = $this->replace_input_shortcode( $shortcode_atts ); |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | - $this->html = str_replace( $shortcodes[0][ $short_key ], $replace_with, $this->html ); |
|
| 330 | + $this->html = str_replace( $shortcodes[0][$short_key], $replace_with, $this->html ); |
|
| 331 | 331 | } |
| 332 | 332 | } |
| 333 | 333 | |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | unset( $shortcode_atts['class'] ); |
| 360 | 360 | } |
| 361 | 361 | |
| 362 | - $shortcode_atts['aria-invalid'] = isset( $this->pass_args['errors'][ 'field' . $this->field_id ] ) ? 'true' : 'false'; |
|
| 362 | + $shortcode_atts['aria-invalid'] = isset( $this->pass_args['errors']['field' . $this->field_id] ) ? 'true' : 'false'; |
|
| 363 | 363 | |
| 364 | 364 | $this->field_obj->set_field_column( 'shortcodes', $shortcode_atts ); |
| 365 | 365 | |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | */ |
| 415 | 415 | private function get_field_div_classes() { |
| 416 | 416 | // Add error class |
| 417 | - $classes = isset( $this->pass_args['errors'][ 'field' . $this->field_id ] ) ? ' frm_blank_field' : ''; |
|
| 417 | + $classes = isset( $this->pass_args['errors']['field' . $this->field_id] ) ? ' frm_blank_field' : ''; |
|
| 418 | 418 | |
| 419 | 419 | // Add label position class |
| 420 | 420 | $settings = $this->field_obj->display_field_settings(); |