@@ -285,7 +285,7 @@ |
||
| 285 | 285 | 'type' => $field->type, |
| 286 | 286 | ); |
| 287 | 287 | |
| 288 | - $this->array_content[ $field->id ] = apply_filters( 'frm_field_shortcodes_for_default_html_email', $array, $field ); |
|
| 288 | + $this->array_content[$field->id] = apply_filters( 'frm_field_shortcodes_for_default_html_email', $array, $field ); |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | /** |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function set_upgrader( &$upgrader ) { |
| 23 | 23 | if ( is_object( $upgrader ) ) { |
| 24 | - $this->upgrader =& $upgrader; |
|
| 24 | + $this->upgrader = & $upgrader; |
|
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | public function validate( $args ) { |
| 37 | 37 | $errors = array(); |
| 38 | 38 | if ( $args['value'] != '' && ! is_email( $args['value'] ) ) { |
| 39 | - $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); |
|
| 39 | + $errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | return $errors; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | 'sep' => ', ', |
| 40 | 40 | 'html' => false, |
| 41 | 41 | ); |
| 42 | - $atts = wp_parse_args( $atts, $defaults ); |
|
| 42 | + $atts = wp_parse_args( $atts, $defaults ); |
|
| 43 | 43 | |
| 44 | 44 | if ( $atts['html'] ) { |
| 45 | 45 | $atts['sep'] = ' '; |
@@ -61,9 +61,9 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | // validate the url format |
| 63 | 63 | if ( ! empty( $value ) && ! preg_match( '/^http(s)?:\/\/(?:localhost|(?:[\da-z\.-]+\.[\da-z\.-]+))/i', $value ) ) { |
| 64 | - $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); |
|
| 64 | + $errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); |
|
| 65 | 65 | } elseif ( $this->field->required == '1' && empty( $value ) ) { |
| 66 | - $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'blank' ); |
|
| 66 | + $errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'blank' ); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | return $errors; |
@@ -146,7 +146,7 @@ |
||
| 146 | 146 | |
| 147 | 147 | $next_dir = ''; |
| 148 | 148 | foreach ( $dir_names as $dir ) { |
| 149 | - $next_dir .= '/' . $dir; |
|
| 149 | + $next_dir .= '/' . $dir; |
|
| 150 | 150 | $needed_dirs[] = $this->uploads['basedir'] . $next_dir; |
| 151 | 151 | } |
| 152 | 152 | |
@@ -59,8 +59,8 @@ |
||
| 59 | 59 | protected function init_saved_value( $entry ) { |
| 60 | 60 | if ( $this->field->type === 'html' ) { |
| 61 | 61 | $this->saved_value = $this->field->description; |
| 62 | - } elseif ( isset( $entry->metas[ $this->field->id ] ) ) { |
|
| 63 | - $this->saved_value = $entry->metas[ $this->field->id ]; |
|
| 62 | + } elseif ( isset( $entry->metas[$this->field->id] ) ) { |
|
| 63 | + $this->saved_value = $entry->metas[$this->field->id]; |
|
| 64 | 64 | } else { |
| 65 | 65 | $this->saved_value = ''; |
| 66 | 66 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $event_labels = FrmFormAction::trigger_labels(); |
| 37 | 37 | foreach ( $action_control->action_options['event'] as $event ) { |
| 38 | 38 | ?> |
| 39 | - <option value="<?php echo esc_attr( $event ); ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo esc_html( isset( $event_labels[ $event ] ) ? $event_labels[ $event ] : $event ); ?></option> |
|
| 39 | + <option value="<?php echo esc_attr( $event ); ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo esc_html( isset( $event_labels[$event] ) ? $event_labels[$event] : $event ); ?></option> |
|
| 40 | 40 | <?php } ?> |
| 41 | 41 | </select> |
| 42 | 42 | </p> |
@@ -61,8 +61,8 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | $with_tags = $args['conditional_check'] ? 3 : 2; |
| 64 | - if ( ! empty( $shortcodes[ $with_tags ][ $short_key ] ) ) { |
|
| 65 | - $tag = str_replace( '[' . $prefix, '', $shortcodes[0][ $short_key ] ); |
|
| 64 | + if ( ! empty( $shortcodes[$with_tags][$short_key] ) ) { |
|
| 65 | + $tag = str_replace( '[' . $prefix, '', $shortcodes[0][$short_key] ); |
|
| 66 | 66 | $tag = str_replace( ']', '', $tag ); |
| 67 | 67 | $tag = str_replace( chr( 194 ) . chr( 160 ), ' ', $tag ); |
| 68 | 68 | $tags = preg_split( '/\s+/', $tag, 2 ); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $tag = $tags[0]; |
| 71 | 71 | } |
| 72 | 72 | } else { |
| 73 | - $tag = $shortcodes[ $with_tags - 1 ][ $short_key ]; |
|
| 73 | + $tag = $shortcodes[$with_tags - 1][$short_key]; |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | return $tag; |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | $section['function'] = $original; |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | - $sections[ $key ] = $section; |
|
| 118 | + $sections[$key] = $section; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | return $sections; |
@@ -127,11 +127,11 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | $section = FrmAppHelper::get_post_param( 'tab', '', 'sanitize_text_field' ); |
| 129 | 129 | $sections = self::get_settings_tabs(); |
| 130 | - if ( ! isset( $sections[ $section ] ) ) { |
|
| 130 | + if ( ! isset( $sections[$section] ) ) { |
|
| 131 | 131 | wp_die(); |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | - $section = $sections[ $section ]; |
|
| 134 | + $section = $sections[$section]; |
|
| 135 | 135 | |
| 136 | 136 | if ( isset( $section['class'] ) ) { |
| 137 | 137 | call_user_func( array( $section['class'], $section['function'] ) ); |