@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function add_default_field( $entry_default_fields, $form = array(), $zone = '' ) { |
58 | 58 | |
59 | - $entry_default_fields['custom'] = array( |
|
59 | + $entry_default_fields[ 'custom' ] = array( |
|
60 | 60 | 'label' => $this->label, |
61 | 61 | 'type' => $this->name, |
62 | 62 | 'desc' => $this->description, |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
71 | 71 | |
72 | - unset ( $field_options['search_filter'], $field_options['show_as_link'], $field_options['new_window'] ); |
|
72 | + unset ( $field_options[ 'search_filter' ], $field_options[ 'show_as_link' ], $field_options[ 'new_window' ] ); |
|
73 | 73 | |
74 | 74 | $new_fields = array( |
75 | 75 | 'content' => array( |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | ); |
113 | 113 | |
114 | 114 | if ( 'edit' === $context ) { |
115 | - unset( $field_options['custom_label'], $field_options['show_label'], $field_options['allow_edit_cap'], $new_fields['wpautop'], $new_fields['oembed'] ); |
|
115 | + unset( $field_options[ 'custom_label' ], $field_options[ 'show_label' ], $field_options[ 'allow_edit_cap' ], $new_fields[ 'wpautop' ], $new_fields[ 'oembed' ] ); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | return $new_fields + $field_options; |
@@ -142,11 +142,11 @@ discard block |
||
142 | 142 | $new_fields = array(); |
143 | 143 | $i = 0; |
144 | 144 | |
145 | - $entry = gravityview()->request->is_edit_entry( $form['id'] ); |
|
145 | + $entry = gravityview()->request->is_edit_entry( $form[ 'id' ] ); |
|
146 | 146 | |
147 | 147 | // Loop through the configured Edit Entry fields and add Custom Content fields if there are any |
148 | 148 | // TODO: Make this available to other custom GV field types |
149 | - foreach ( (array) $edit_fields as $id => $edit_field ) { |
|
149 | + foreach ( (array)$edit_fields as $id => $edit_field ) { |
|
150 | 150 | if ( 'custom' === \GV\Utils::get( $edit_field, 'id' ) ) { |
151 | 151 | $field_data = array( |
152 | 152 | 'custom_id' => $id, |
@@ -161,13 +161,13 @@ discard block |
||
161 | 161 | $field_data[ $key ] = GravityView_Merge_Tags::replace_variables( $field_datum, $form, $entry_data, false, false ); |
162 | 162 | } |
163 | 163 | |
164 | - $field_data['cssClass'] = \GV\Utils::get( $edit_field, 'custom_class' ); |
|
164 | + $field_data[ 'cssClass' ] = \GV\Utils::get( $edit_field, 'custom_class' ); |
|
165 | 165 | |
166 | - $new_fields[] = new GF_Field_HTML( $field_data ); |
|
166 | + $new_fields[ ] = new GF_Field_HTML( $field_data ); |
|
167 | 167 | |
168 | 168 | } else { |
169 | - if( isset( $fields[ $i ] ) ) { |
|
170 | - $new_fields[] = $fields[ $i ]; |
|
169 | + if ( isset( $fields[ $i ] ) ) { |
|
170 | + $new_fields[ ] = $fields[ $i ]; |
|
171 | 171 | } |
172 | 172 | $i++; |
173 | 173 | } |