@@ -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 | /** |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | 'captcha' => 'FrmFieldCaptcha', |
| 87 | 87 | ); |
| 88 | 88 | |
| 89 | - $class = isset( $type_classes[ $field_type ] ) ? $type_classes[ $field_type ] : ''; |
|
| 89 | + $class = isset( $type_classes[$field_type] ) ? $type_classes[$field_type] : ''; |
|
| 90 | 90 | return apply_filters( 'frm_get_field_type_class', $class, $field_type ); |
| 91 | 91 | } |
| 92 | 92 | |
@@ -7,17 +7,17 @@ discard block |
||
| 7 | 7 | <?php |
| 8 | 8 | foreach ( $type as $tb_type ) { |
| 9 | 9 | |
| 10 | - if ( ! isset( $tables[ $tb_type ] ) ) { |
|
| 10 | + if ( ! isset( $tables[$tb_type] ) ) { |
|
| 11 | 11 | do_action( 'frm_xml_import_' . $tb_type, $args ); |
| 12 | 12 | continue; |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | //no records |
| 16 | - if ( ! isset( $records[ $tb_type ] ) ) { |
|
| 16 | + if ( ! isset( $records[$tb_type] ) ) { |
|
| 17 | 17 | continue; |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | - $item_ids = $records[ $tb_type ]; |
|
| 20 | + $item_ids = $records[$tb_type]; |
|
| 21 | 21 | if ( in_array( $tb_type, array( 'styles', 'actions' ), true ) ) { |
| 22 | 22 | include( dirname( __FILE__ ) . '/posts_xml.php' ); |
| 23 | 23 | } elseif ( file_exists( dirname( __FILE__ ) . '/' . $tb_type . '_xml.php' ) ) { |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | include( FrmProAppHelper::plugin_path() . '/classes/views/xml/' . $tb_type . '_xml.php' ); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - unset( $item_ids, $records[ $tb_type ], $tb_type ); |
|
| 29 | + unset( $item_ids, $records[$tb_type], $tb_type ); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | ?> |
@@ -136,12 +136,12 @@ discard block |
||
| 136 | 136 | * @return array |
| 137 | 137 | */ |
| 138 | 138 | private function prepare_array_property( $index, $atts ) { |
| 139 | - if ( isset( $atts[ $index ] ) && ! empty( $atts[ $index ] ) ) { |
|
| 139 | + if ( isset( $atts[$index] ) && ! empty( $atts[$index] ) ) { |
|
| 140 | 140 | |
| 141 | - if ( is_array( $atts[ $index ] ) ) { |
|
| 142 | - $property = $atts[ $index ]; |
|
| 141 | + if ( is_array( $atts[$index] ) ) { |
|
| 142 | + $property = $atts[$index]; |
|
| 143 | 143 | } else { |
| 144 | - $property = explode( ',', $atts[ $index ] ); |
|
| 144 | + $property = explode( ',', $atts[$index] ); |
|
| 145 | 145 | } |
| 146 | 146 | } else { |
| 147 | 147 | $property = array(); |
@@ -274,6 +274,6 @@ discard block |
||
| 274 | 274 | * @param stdClass $field |
| 275 | 275 | */ |
| 276 | 276 | protected function add_field_values( $field ) { |
| 277 | - $this->field_values[ $field->id ] = new FrmFieldValue( $field, $this->entry ); |
|
| 277 | + $this->field_values[$field->id] = new FrmFieldValue( $field, $this->entry ); |
|
| 278 | 278 | } |
| 279 | 279 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | //validate the number format |
| 45 | 45 | if ( ! is_numeric( $args['value'] ) && '' !== $args['value'] ) { |
| 46 | - $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); |
|
| 46 | + $errors['field' . $args['id']] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | // validate number settings |
@@ -55,9 +55,9 @@ discard block |
||
| 55 | 55 | if ( $frm_settings->use_html && $maxnum !== '' && $minnum !== '' ) { |
| 56 | 56 | $value = (float) $args['value']; |
| 57 | 57 | if ( $value < $minnum ) { |
| 58 | - $errors[ 'field' . $args['id'] ] = __( 'Please select a higher number', 'formidable' ); |
|
| 58 | + $errors['field' . $args['id']] = __( 'Please select a higher number', 'formidable' ); |
|
| 59 | 59 | } elseif ( $value > $maxnum ) { |
| 60 | - $errors[ 'field' . $args['id'] ] = __( 'Please select a lower number', 'formidable' ); |
|
| 60 | + $errors['field' . $args['id']] = __( 'Please select a lower number', 'formidable' ); |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | continue; |
| 327 | 327 | } |
| 328 | 328 | |
| 329 | - $this->maybe_convert_migrated_size( $widgets[ $k ]['size'] ); |
|
| 329 | + $this->maybe_convert_migrated_size( $widgets[$k]['size'] ); |
|
| 330 | 330 | } |
| 331 | 331 | update_option( 'widget_frm_show_form', $widgets ); |
| 332 | 332 | } |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | if ( ! is_array( $widget ) || ! isset( $widget['size'] ) ) { |
| 423 | 423 | continue; |
| 424 | 424 | } |
| 425 | - $this->convert_character_to_px( $widgets[ $k ]['size'] ); |
|
| 425 | + $this->convert_character_to_px( $widgets[$k]['size'] ); |
|
| 426 | 426 | } |
| 427 | 427 | update_option( 'widget_frm_show_form', $widgets ); |
| 428 | 428 | } |
@@ -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 | |
@@ -98,15 +98,15 @@ discard block |
||
| 98 | 98 | self::prepare_field_output( $atts, $val ); |
| 99 | 99 | |
| 100 | 100 | if ( $atts['format'] != 'text' ) { |
| 101 | - $values[ $f->field_key ] = $val; |
|
| 101 | + $values[$f->field_key] = $val; |
|
| 102 | 102 | if ( $atts['entry'] && $f->type != 'textarea' ) { |
| 103 | - $prev_val = maybe_unserialize( $atts['entry']->metas[ $f->id ] ); |
|
| 103 | + $prev_val = maybe_unserialize( $atts['entry']->metas[$f->id] ); |
|
| 104 | 104 | if ( $prev_val != $val ) { |
| 105 | - $values[ $f->field_key . '-value' ] = $prev_val; |
|
| 105 | + $values[$f->field_key . '-value'] = $prev_val; |
|
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | } else { |
| 109 | - $values[ $f->id ] = array( |
|
| 109 | + $values[$f->id] = array( |
|
| 110 | 110 | 'label' => $f->name, |
| 111 | 111 | 'val' => $val, |
| 112 | 112 | 'type' => $f->type, |
@@ -120,9 +120,9 @@ discard block |
||
| 120 | 120 | private static function fill_missing_fields( $atts, &$values ) { |
| 121 | 121 | _deprecated_function( __FUNCTION__, '2.04', 'instance of FrmEntryValues or FrmProEntryValues' ); |
| 122 | 122 | |
| 123 | - if ( $atts['entry'] && ! isset( $atts['entry']->metas[ $atts['field']->id ] ) ) { |
|
| 123 | + if ( $atts['entry'] && ! isset( $atts['entry']->metas[$atts['field']->id] ) ) { |
|
| 124 | 124 | // In case include_blank is set |
| 125 | - $atts['entry']->metas[ $atts['field']->id ] = ''; |
|
| 125 | + $atts['entry']->metas[$atts['field']->id] = ''; |
|
| 126 | 126 | $atts['entry'] = apply_filters( 'frm_prepare_entry_content', $atts['entry'], array( 'field' => $atts['field'] ) ); |
| 127 | 127 | self::fill_values_from_entry( $atts, $values ); |
| 128 | 128 | } |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | 'type' => $f->type, |
| 151 | 151 | ); |
| 152 | 152 | |
| 153 | - $values[ $f->id ] = apply_filters( 'frm_field_shortcodes_for_default_html_email', $field_shortcodes, $f ); |
|
| 153 | + $values[$f->id] = apply_filters( 'frm_field_shortcodes_for_default_html_email', $field_shortcodes, $f ); |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | /** |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | |
| 162 | 162 | $f = $atts['field']; |
| 163 | 163 | if ( $atts['entry'] ) { |
| 164 | - $prev_val = maybe_unserialize( $atts['entry']->metas[ $f->id ] ); |
|
| 164 | + $prev_val = maybe_unserialize( $atts['entry']->metas[$f->id] ); |
|
| 165 | 165 | $meta = array( |
| 166 | 166 | 'item_id' => $atts['id'], |
| 167 | 167 | 'field_id' => $f->id, |
@@ -235,7 +235,7 @@ |
||
| 235 | 235 | if ( is_array( $upsell ) ) { |
| 236 | 236 | foreach ( $upsell as $k => $plugin ) { |
| 237 | 237 | if ( strpos( $plugin['slug'], 'wpforms' ) !== false ) { |
| 238 | - unset( $upsell[ $k ] ); |
|
| 238 | + unset( $upsell[$k] ); |
|
| 239 | 239 | } |
| 240 | 240 | } |
| 241 | 241 | } |