@@ -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 | /** |
@@ -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 | } |
@@ -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, |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $this->beta = ! empty( $this->api_data['beta'] ) ? true : false; |
45 | 45 | $this->cache_key = md5( serialize( $this->slug . $this->version . $this->api_data['license'] . $this->beta ) ); |
46 | 46 | |
47 | - $frm_edd_plugin_data[ $this->slug ] = $this->api_data; |
|
47 | + $frm_edd_plugin_data[$this->slug] = $this->api_data; |
|
48 | 48 | |
49 | 49 | /** |
50 | 50 | * Fires after the $frm_edd_plugin_data is setup. |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $_transient_data = new stdClass(); |
94 | 94 | } |
95 | 95 | |
96 | - if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) { |
|
96 | + if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[$this->name] ) && false === $this->wp_override ) { |
|
97 | 97 | return $_transient_data; |
98 | 98 | } |
99 | 99 | |
@@ -120,12 +120,12 @@ discard block |
||
120 | 120 | $version_info->plugin = $this->name; |
121 | 121 | } |
122 | 122 | |
123 | - $_transient_data->response[ $this->name ] = $version_info; |
|
123 | + $_transient_data->response[$this->name] = $version_info; |
|
124 | 124 | |
125 | 125 | } |
126 | 126 | |
127 | 127 | $_transient_data->last_checked = time(); |
128 | - $_transient_data->checked[ $this->name ] = $this->version; |
|
128 | + $_transient_data->checked[$this->name] = $this->version; |
|
129 | 129 | |
130 | 130 | } |
131 | 131 | |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) { |
190 | 190 | $new_sections = array(); |
191 | 191 | foreach ( $_data->sections as $key => $value ) { |
192 | - $new_sections[ $key ] = $value; |
|
192 | + $new_sections[$key] = $value; |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | $_data->sections = $new_sections; |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) { |
200 | 200 | $new_banners = array(); |
201 | 201 | foreach ( $_data->banners as $key => $value ) { |
202 | - $new_banners[ $key ] = $value; |
|
202 | + $new_banners[$key] = $value; |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | $_data->banners = $new_banners; |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | } |
317 | 317 | |
318 | 318 | $slug = sanitize_text_field( $_REQUEST['slug'] ); // WPCS: CSRF ok. |
319 | - $data = $frm_edd_plugin_data[ $slug ]; |
|
319 | + $data = $frm_edd_plugin_data[$slug]; |
|
320 | 320 | $beta = ! empty( $data['beta'] ) ? true : false; |
321 | 321 | $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' ); // WPCS: CSRF ok. |
322 | 322 | $version_info = $this->get_cached_version_info( $cache_key ); |
@@ -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; |