Completed
Push — develop ( 31c9ca...168da6 )
by Zack
38:08 queued 17:59
created
future/includes/class-gv-field-internal.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@
 block discarded – undo
29 29
 	 */
30 30
 	public static function from_configuration( $configuration ) {
31 31
 
32
-		if ( empty( $configuration['id'] ) || ! is_string( $configuration['id'] ) ) {
32
+		if ( empty( $configuration[ 'id' ] ) || ! is_string( $configuration[ 'id' ] ) ) {
33 33
 			gravityview()->log->error( 'Invalid configuration[id] supplied.' );
34 34
 			return null;
35 35
 		}
36 36
 
37
-		$field = self::by_id( $configuration['id'] );
37
+		$field = self::by_id( $configuration[ 'id' ] );
38 38
 
39 39
 		$field->update_configuration( $configuration );
40 40
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-list.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	public function remove_columns_from_searchable_fields( $fields ) {
61 61
 
62 62
 		foreach ( $fields as $key => $field ) {
63
-			if ( isset( $field['parent'] ) && $field['parent'] instanceof \GF_Field_List ) {
63
+			if ( isset( $field[ 'parent' ] ) && $field[ 'parent' ] instanceof \GF_Field_List ) {
64 64
 				unset( $fields[ $key ] );
65 65
 			}
66 66
 		}
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 		// Add the list columns
87 87
 		foreach ( $list_fields as $list_field ) {
88 88
 
89
-			if( empty( $list_field->enableColumns ) ) {
89
+			if ( empty( $list_field->enableColumns ) ) {
90 90
 				continue;
91 91
 			}
92 92
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 			}
108 108
 
109 109
 			// If there are columns, add them under the parent field
110
-			if( ! empty( $list_columns ) ) {
110
+			if ( ! empty( $list_columns ) ) {
111 111
 
112 112
 				$index = array_search( $list_field->id, array_keys( $fields ) ) + 1;
113 113
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 				 * Merge the $list_columns into the $fields array at $index
116 116
 				 * @see https://stackoverflow.com/a/1783125
117 117
 				 */
118
-				$fields = array_slice( $fields, 0, $index, true) + $list_columns + array_slice( $fields, $index, null, true);
118
+				$fields = array_slice( $fields, 0, $index, true ) + $list_columns + array_slice( $fields, $index, null, true );
119 119
 			}
120 120
 
121 121
 			unset( $list_columns, $index, $input_id );
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
 		$list_rows = maybe_unserialize( $field_value );
144 144
 
145
-		if( ! is_array( $list_rows ) ) {
145
+		if ( ! is_array( $list_rows ) ) {
146 146
 			gravityview()->log->error( '$field_value did not unserialize', array( 'data' => $field_value ) );
147 147
 			return null;
148 148
 		}
@@ -152,18 +152,18 @@  discard block
 block discarded – undo
152 152
 		// Each list row
153 153
 		foreach ( $list_rows as $list_row ) {
154 154
 			$current_column = 0;
155
-			foreach ( (array) $list_row as $column_key => $column_value ) {
155
+			foreach ( (array)$list_row as $column_key => $column_value ) {
156 156
 
157 157
 				// If the label of the column matches $column_id, or the numeric key value matches, add the value
158
-				if( (string)$column_key === (string)$column_id || ( is_numeric( $column_id ) && (int)$column_id === $current_column ) ) {
159
-					$column_values[] = $column_value;
158
+				if ( (string)$column_key === (string)$column_id || ( is_numeric( $column_id ) && (int)$column_id === $current_column ) ) {
159
+					$column_values[ ] = $column_value;
160 160
 				}
161 161
 				$current_column++;
162 162
 			}
163 163
 		}
164 164
 
165 165
 		// Return the array of values
166
-		if( 'raw' === $format ) {
166
+		if ( 'raw' === $format ) {
167 167
 			return $column_values;
168 168
 		}
169 169
 		// Return the Gravity Forms Field output
@@ -186,22 +186,22 @@  discard block
 block discarded – undo
186 186
 	 */
187 187
 	public function _filter_field_label( $label, $field, $form, $entry ) {
188 188
 
189
-		$field_object = RGFormsModel::get_field( $form, $field['id'] );
189
+		$field_object = RGFormsModel::get_field( $form, $field[ 'id' ] );
190 190
 
191 191
 		// Not a list field
192
-		if( ! $field_object || 'list' !== $field_object->type ) {
192
+		if ( ! $field_object || 'list' !== $field_object->type ) {
193 193
 			return $label;
194 194
 		}
195 195
 
196 196
 		// Custom label is defined, so use it
197
-		if( ! empty( $field['custom_label'] ) ) {
197
+		if ( ! empty( $field[ 'custom_label' ] ) ) {
198 198
 			return $label;
199 199
 		}
200 200
 
201
-		$column_id = gravityview_get_input_id_from_id( $field['id'] );
201
+		$column_id = gravityview_get_input_id_from_id( $field[ 'id' ] );
202 202
 
203 203
 		// Parent field, not column field
204
-		if( false === $column_id ) {
204
+		if ( false === $column_id ) {
205 205
 			return $label;
206 206
 		}
207 207
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 	public static function get_column_label( GF_Field_List $field, $column_id, $backup_label = '' ) {
223 223
 
224 224
 		// Doesn't have columns enabled
225
-		if( ! isset( $field->choices ) || ! $field->enableColumns ) {
225
+		if ( ! isset( $field->choices ) || ! $field->enableColumns ) {
226 226
 			return $backup_label;
227 227
 		}
228 228
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-workflow_final_status.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	 */
42 42
 	function modify_entry_value_workflow_final_status( $output, $entry, $field_settings, $field ) {
43 43
 
44
-		if( ! empty( $output ) ) {
44
+		if ( ! empty( $output ) ) {
45 45
 			$output = gravity_flow()->translate_status_label( $output );
46 46
 		}
47 47
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
 		foreach ( $search_fields as & $search_field ) {
66 66
 			if ( $this->name === \GV\Utils::get( $search_field, 'key' ) ) {
67
-				$search_field['choices'] = GravityView_Plugin_Hooks_Gravity_Flow::get_status_options();
67
+				$search_field[ 'choices' ] = GravityView_Plugin_Hooks_Gravity_Flow::get_status_options();
68 68
 			}
69 69
 		}
70 70
 
Please login to merge, or discard this patch.
future/includes/class-gv-form-gravityforms.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		$self = new self();
56 56
 		$self->form = $form;
57 57
 
58
-		$self->ID = intval( $self->form['id'] );
58
+		$self->ID = intval( $self->form[ 'id' ] );
59 59
 
60 60
 		return $self;
61 61
 	}
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
 	 * @return \GV\GF_Form|null An instance of this form or null if not found.
71 71
 	 */
72 72
 	public static function from_form( $form ) {
73
-		if ( empty( $form['id'] ) ) {
73
+		if ( empty( $form[ 'id' ] ) ) {
74 74
 			return null;
75 75
 		}
76 76
 
77 77
 		$self = new self();
78 78
 		$self->form = $form;
79
-		$self->ID = $self->form['id'];
79
+		$self->ID = $self->form[ 'id' ];
80 80
 
81 81
 		return $self;
82 82
 	}
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
 
120 120
 			/** The offset and limit */
121 121
 			if ( ! empty( $offset->limit ) ) {
122
-				$paging['page_size'] = $offset->limit;
122
+				$paging[ 'page_size' ] = $offset->limit;
123 123
 			}
124 124
 
125 125
 			if ( ! empty( $offset->offset ) ) {
126
-				$paging['offset'] = $offset->offset;
126
+				$paging[ 'offset' ] = $offset->offset;
127 127
 			}
128 128
 
129 129
 			foreach ( \GFAPI::get_entries( $form->ID, $search_criteria, $sorting, $paging ) as $entry ) {
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
 	 */
181 181
 	public function get_fields() {
182 182
 		$fields = array();
183
-		foreach ( $this['fields'] as $field ) {
184
-			foreach ( empty( $field['inputs'] ) ? array( $field['id'] ) : wp_list_pluck( $field['inputs'], 'id' ) as $id ) {
183
+		foreach ( $this[ 'fields' ] as $field ) {
184
+			foreach ( empty( $field[ 'inputs' ] ) ? array( $field[ 'id' ] ) : wp_list_pluck( $field[ 'inputs' ], 'id' ) as $id ) {
185 185
 				if ( is_numeric( $id ) ) {
186 186
 					$fields[ $id ] = self::get_field( $this, $id );
187 187
 				} else {
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 	 * @return bool Whether the offset exists or not.
219 219
 	 */
220 220
 	public function offsetExists( $offset ) {
221
-		return isset( $this->form[$offset] );
221
+		return isset( $this->form[ $offset ] );
222 222
 	}
223 223
 
224 224
 	/**
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 	 * @return mixed The value of the requested form data.
234 234
 	 */
235 235
 	public function offsetGet( $offset ) {
236
-		return $this->form[$offset];
236
+		return $this->form[ $offset ];
237 237
 	}
238 238
 
239 239
 	/**
Please login to merge, or discard this patch.
includes/class-gravityview-migrate.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
 		$disapproved_result = $wpdb->query( $wpdb->prepare( $sql, GravityView_Entry_Approval_Status::DISAPPROVED, '0' ) );
74 74
 
75
-		if( false === $approved_result || false === $disapproved_result ) {
75
+		if ( false === $approved_result || false === $disapproved_result ) {
76 76
 			gravityview()->log->error( 'There was an error processing the query. {error}', array( 'error' => $wpdb->last_error ) );
77 77
 		} else {
78 78
 			// All done: Meta values are migrated
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
 		$redux_settings = $this->get_redux_settings();
106 106
 
107 107
 		// No need to process
108
-		if( false === $redux_settings ) {
108
+		if ( false === $redux_settings ) {
109 109
 			return;
110 110
 		}
111 111
 
112
-		if( empty(  $redux_settings['license_key_status'] ) ) {
112
+		if ( empty( $redux_settings[ 'license_key_status' ] ) ) {
113 113
 			$redux_settings = $this->get_redux_license_status( $redux_settings );
114 114
 		}
115 115
 
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
 		gravityview()->plugin->settings->update( $updated_settings );
124 124
 
125 125
 		// And now remove the previous option, so this is a one-time thing.
126
-		delete_option('gravityview_settings');
127
-		delete_option('gravityview_settings-transients');
126
+		delete_option( 'gravityview_settings' );
127
+		delete_option( 'gravityview_settings-transients' );
128 128
 	}
129 129
 
130 130
 	/**
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
 
148 148
 		$license_call = \GV\License_Handler::get()->license_call( $data );
149 149
 
150
-		if( is_object( $license_call ) && isset( $license_call->license ) ) {
151
-			$redux_settings['license_key_status'] = $license_call->license;
152
-			$redux_settings['license_key_response'] = json_encode( $license_call );
150
+		if ( is_object( $license_call ) && isset( $license_call->license ) ) {
151
+			$redux_settings[ 'license_key_status' ] = $license_call->license;
152
+			$redux_settings[ 'license_key_response' ] = json_encode( $license_call );
153 153
 		}
154 154
 
155 155
 		return $redux_settings;
@@ -163,10 +163,10 @@  discard block
 block discarded – undo
163 163
 	function get_redux_settings() {
164 164
 
165 165
 		// Previous settings set by Redux
166
-		$redux_option = get_option('gravityview_settings');
166
+		$redux_option = get_option( 'gravityview_settings' );
167 167
 
168 168
 		// No Redux settings? Don't proceed.
169
-		if( false === $redux_option ) {
169
+		if ( false === $redux_option ) {
170 170
 			return false;
171 171
 		}
172 172
 
@@ -178,19 +178,19 @@  discard block
 block discarded – undo
178 178
 
179 179
 		if ( $license_array = \GV\Utils::get( $redux_option, 'license' ) ) {
180 180
 
181
-			$redux_settings['license_key'] = $license_key = \GV\Utils::get( $license_array, 'license' );
181
+			$redux_settings[ 'license_key' ] = $license_key = \GV\Utils::get( $license_array, 'license' );
182 182
 
183
-			$redux_last_changed_values = get_option('gravityview_settings-transients');
183
+			$redux_last_changed_values = get_option( 'gravityview_settings-transients' );
184 184
 
185 185
 			// This contains the last response for license validation
186
-			if( !empty( $redux_last_changed_values ) && $saved_values = \GV\Utils::get( $redux_last_changed_values, 'changed_values' ) ) {
186
+			if ( ! empty( $redux_last_changed_values ) && $saved_values = \GV\Utils::get( $redux_last_changed_values, 'changed_values' ) ) {
187 187
 
188 188
 				$saved_license = \GV\Utils::get( $saved_values, 'license' );
189 189
 
190 190
 				// Only use the last-saved values if they are for the same license
191
-				if( $saved_license && \GV\Utils::get( $saved_license, 'license' ) === $license_key ) {
192
-					$redux_settings['license_key_status'] = \GV\Utils::get( $saved_license, 'status' );
193
-					$redux_settings['license_key_response'] = \GV\Utils::get( $saved_license, 'response' );
191
+				if ( $saved_license && \GV\Utils::get( $saved_license, 'license' ) === $license_key ) {
192
+					$redux_settings[ 'license_key_status' ] = \GV\Utils::get( $saved_license, 'status' );
193
+					$redux_settings[ 'license_key_response' ] = \GV\Utils::get( $saved_license, 'response' );
194 194
 				}
195 195
 			}
196 196
 		}
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
 	/** ----  Migrate from old search widget to new search widget  ---- */
203 203
 	function update_search_on_views() {
204 204
 
205
-		if( !class_exists('GravityView_Widget_Search') ) {
206
-			include_once( GRAVITYVIEW_DIR .'includes/extensions/search-widget/class-search-widget.php' );
205
+		if ( ! class_exists( 'GravityView_Widget_Search' ) ) {
206
+			include_once( GRAVITYVIEW_DIR . 'includes/extensions/search-widget/class-search-widget.php' );
207 207
 		}
208 208
 
209 209
 		// Loop through all the views
@@ -215,20 +215,20 @@  discard block
 block discarded – undo
215 215
 
216 216
 		$views = get_posts( $query_args );
217 217
 
218
-		foreach( $views as $view ) {
218
+		foreach ( $views as $view ) {
219 219
 
220 220
 			$widgets = gravityview_get_directory_widgets( $view->ID );
221 221
 			$search_fields = null;
222 222
 
223
-			if( empty( $widgets ) || !is_array( $widgets ) ) { continue; }
223
+			if ( empty( $widgets ) || ! is_array( $widgets ) ) { continue; }
224 224
 
225 225
 			gravityview()->log->debug( '[GravityView_Migrate/update_search_on_views] Loading View ID: {view_id}', array( 'view_id' => $view->ID ) );
226 226
 
227
-			foreach( $widgets as $area => $ws ) {
228
-				foreach( $ws as $k => $widget ) {
229
-					if( $widget['id'] !== 'search_bar' ) { continue; }
227
+			foreach ( $widgets as $area => $ws ) {
228
+				foreach ( $ws as $k => $widget ) {
229
+					if ( $widget[ 'id' ] !== 'search_bar' ) { continue; }
230 230
 
231
-					if( is_null( $search_fields ) ) {
231
+					if ( is_null( $search_fields ) ) {
232 232
 						$search_fields = $this->get_search_fields( $view->ID );
233 233
 					}
234 234
 
@@ -236,24 +236,24 @@  discard block
 block discarded – undo
236 236
 					//  [search_free] => 1
237 237
 			        //  [search_date] => 1
238 238
 			        $search_generic = array();
239
-					if( !empty( $widget['search_free'] ) ) {
240
-						$search_generic[] = array( 'field' => 'search_all', 'input' => 'input_text' );
239
+					if ( ! empty( $widget[ 'search_free' ] ) ) {
240
+						$search_generic[ ] = array( 'field' => 'search_all', 'input' => 'input_text' );
241 241
 					}
242
-					if( !empty( $widget['search_date'] ) ) {
243
-						$search_generic[] = array( 'field' => 'entry_date', 'input' => 'date' );
242
+					if ( ! empty( $widget[ 'search_date' ] ) ) {
243
+						$search_generic[ ] = array( 'field' => 'entry_date', 'input' => 'date' );
244 244
 					}
245 245
 
246 246
 					$search_config = array_merge( $search_generic, $search_fields );
247 247
 
248 248
 					// don't throw '[]' when json_encode an empty array
249
-					if( empty( $search_config ) ) {
249
+					if ( empty( $search_config ) ) {
250 250
 						$search_config = '';
251 251
 					} else {
252 252
 						$search_config = json_encode( $search_config );
253 253
 					}
254 254
 
255
-					$widgets[ $area ][ $k ]['search_fields'] = $search_config;
256
-					$widgets[ $area ][ $k ]['search_layout'] = 'horizontal';
255
+					$widgets[ $area ][ $k ][ 'search_fields' ] = $search_config;
256
+					$widgets[ $area ][ $k ][ 'search_layout' ] = 'horizontal';
257 257
 
258 258
 					gravityview()->log->debug( '[GravityView_Migrate/update_search_on_views] Updated Widget: ', array( 'data' => $widgets[ $area ][ $k ] ) );
259 259
 				}
@@ -281,26 +281,26 @@  discard block
 block discarded – undo
281 281
 		// check view fields' settings
282 282
 		$fields = gravityview_get_directory_fields( $view_id, false );
283 283
 
284
-		if( !empty( $fields ) && is_array( $fields ) ) {
284
+		if ( ! empty( $fields ) && is_array( $fields ) ) {
285 285
 
286
-			foreach( $fields as $t => $fs ) {
286
+			foreach ( $fields as $t => $fs ) {
287 287
 
288
-				foreach( $fs as $k => $field ) {
288
+				foreach ( $fs as $k => $field ) {
289 289
 					// is field a search_filter ?
290
-					if( empty( $field['search_filter'] ) ) { continue; }
290
+					if ( empty( $field[ 'search_filter' ] ) ) { continue; }
291 291
 
292 292
 					// get field type & calculate the input type (by default)
293
-					$form_field = gravityview_get_field( $form, $field['id'] );
293
+					$form_field = gravityview_get_field( $form, $field[ 'id' ] );
294 294
 
295
-					if( empty( $form_field['type'] ) ) {
295
+					if ( empty( $form_field[ 'type' ] ) ) {
296 296
 						continue;
297 297
 					}
298 298
 
299 299
 					// depending on the field type assign a group of possible search field types
300
-					$type = GravityView_Widget_Search::get_search_input_types( $field['id'], $form_field['type'] );
300
+					$type = GravityView_Widget_Search::get_search_input_types( $field[ 'id' ], $form_field[ 'type' ] );
301 301
 
302 302
 					// add field to config
303
-					$search_fields[] = array( 'field' => $field['id'], 'input' => $type );
303
+					$search_fields[ ] = array( 'field' => $field[ 'id' ], 'input' => $type );
304 304
 
305 305
 				}
306 306
 			}
Please login to merge, or discard this patch.
includes/class-admin.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@  discard block
 block discarded – undo
4 4
 
5 5
 	function __construct() {
6 6
 
7
-		if( ! is_admin() ) { return; }
7
+		if ( ! is_admin() ) { return; }
8 8
 
9 9
 		// If Gravity Forms isn't active or compatibile, stop loading
10
-		if( false === GravityView_Compatibility::is_valid() ) {
10
+		if ( false === GravityView_Compatibility::is_valid() ) {
11 11
 			return;
12 12
 		}
13 13
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 		add_filter( 'post_updated_messages', array( $this, 'post_updated_messages' ) );
49 49
 		add_filter( 'bulk_post_updated_messages', array( $this, 'post_updated_messages' ) );
50 50
 
51
-		add_filter( 'plugin_action_links_'. plugin_basename( GRAVITYVIEW_FILE ) , array( $this, 'plugin_action_links' ) );
51
+		add_filter( 'plugin_action_links_' . plugin_basename( GRAVITYVIEW_FILE ), array( $this, 'plugin_action_links' ) );
52 52
 
53 53
 		add_action( 'plugins_loaded', array( $this, 'backend_actions' ), 100 );
54 54
 
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
 	 */
65 65
 	public static function no_views_text() {
66 66
 
67
-		if ( isset( $_REQUEST['post_status'] ) && 'trash' === $_REQUEST['post_status'] ) {
67
+		if ( isset( $_REQUEST[ 'post_status' ] ) && 'trash' === $_REQUEST[ 'post_status' ] ) {
68 68
 			return __( 'No Views found in Trash', 'gravityview' );
69
-		} elseif( ! empty( $_GET['s'] ) ) {
69
+		} elseif ( ! empty( $_GET[ 's' ] ) ) {
70 70
 			return __( 'No Views found.', 'gravityview' );
71 71
 		}
72 72
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 			$error .= ' ' . esc_html__( 'or select another form.', 'gravityview' );
111 111
 		}
112 112
 
113
-		if( $error ) {
113
+		if ( $error ) {
114 114
 			?>
115 115
 			<div class="wp-dialog notice-warning inline error wp-clearfix">
116 116
 				<?php echo gravityview_get_floaty(); ?>
@@ -129,23 +129,23 @@  discard block
 block discarded – undo
129 129
 	public function backend_actions() {
130 130
 
131 131
 		/** @define "GRAVITYVIEW_DIR" "../" */
132
-		include_once( GRAVITYVIEW_DIR .'includes/admin/class.field.type.php' );
133
-		include_once( GRAVITYVIEW_DIR .'includes/admin/class.render.settings.php' );
134
-		include_once( GRAVITYVIEW_DIR .'includes/admin/class-gravityview-admin-view-item.php' );
135
-		include_once( GRAVITYVIEW_DIR .'includes/admin/class-gravityview-admin-view-field.php' );
136
-		include_once( GRAVITYVIEW_DIR .'includes/admin/class-gravityview-admin-view-widget.php' );
137
-		include_once( GRAVITYVIEW_DIR .'includes/class-admin-views.php' );
138
-		include_once( GRAVITYVIEW_DIR .'includes/class-admin-welcome.php' );
139
-		include_once( GRAVITYVIEW_DIR .'includes/class-admin-installer.php' );
140
-		include_once( GRAVITYVIEW_DIR .'includes/class-admin-add-shortcode.php' );
141
-		include_once( GRAVITYVIEW_DIR .'includes/class-admin-approve-entries.php' );
132
+		include_once( GRAVITYVIEW_DIR . 'includes/admin/class.field.type.php' );
133
+		include_once( GRAVITYVIEW_DIR . 'includes/admin/class.render.settings.php' );
134
+		include_once( GRAVITYVIEW_DIR . 'includes/admin/class-gravityview-admin-view-item.php' );
135
+		include_once( GRAVITYVIEW_DIR . 'includes/admin/class-gravityview-admin-view-field.php' );
136
+		include_once( GRAVITYVIEW_DIR . 'includes/admin/class-gravityview-admin-view-widget.php' );
137
+		include_once( GRAVITYVIEW_DIR . 'includes/class-admin-views.php' );
138
+		include_once( GRAVITYVIEW_DIR . 'includes/class-admin-welcome.php' );
139
+		include_once( GRAVITYVIEW_DIR . 'includes/class-admin-installer.php' );
140
+		include_once( GRAVITYVIEW_DIR . 'includes/class-admin-add-shortcode.php' );
141
+		include_once( GRAVITYVIEW_DIR . 'includes/class-admin-approve-entries.php' );
142 142
 
143 143
 		/**
144 144
 		 * @action `gravityview_include_backend_actions` Triggered after all GravityView admin files are loaded
145 145
 		 *
146 146
 		 * Nice place to insert extensions' backend stuff
147 147
 		 */
148
-		do_action('gravityview_include_backend_actions');
148
+		do_action( 'gravityview_include_backend_actions' );
149 149
 	}
150 150
 
151 151
 	/**
@@ -161,12 +161,12 @@  discard block
 block discarded – undo
161 161
 
162 162
 		$actions = array();
163 163
 
164
-		if( GVCommon::has_cap( 'gravityview_view_settings' ) ) {
165
-			$actions[] = sprintf( '<a href="%s">%s</a>', admin_url( 'edit.php?post_type=gravityview&page=gravityview_settings' ), esc_html__( 'Settings', 'gravityview' ) );
164
+		if ( GVCommon::has_cap( 'gravityview_view_settings' ) ) {
165
+			$actions[ ] = sprintf( '<a href="%s">%s</a>', admin_url( 'edit.php?post_type=gravityview&page=gravityview_settings' ), esc_html__( 'Settings', 'gravityview' ) );
166 166
 		}
167 167
 
168
-		if( GVCommon::has_cap( 'gravityview_support_port' ) ) {
169
-			$actions[] = '<a href="https://docs.gravityview.co">' . esc_html__( 'Support', 'gravityview' ) . '</a>';
168
+		if ( GVCommon::has_cap( 'gravityview_support_port' ) ) {
169
+			$actions[ ] = '<a href="https://docs.gravityview.co">' . esc_html__( 'Support', 'gravityview' ) . '</a>';
170 170
 		}
171 171
 
172 172
 		return array_merge( $actions, $links );
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 		// By default, there will only be one item being modified.
195 195
 		// When in the `bulk_post_updated_messages` filter, there will be passed a number
196 196
 		// of modified items that will override this array.
197
-		$bulk_counts = is_null( $bulk_counts ) ? array( 'updated' => 1 , 'locked' => 1 , 'deleted' => 1 , 'trashed' => 1, 'untrashed' => 1 ) : $bulk_counts;
197
+		$bulk_counts = is_null( $bulk_counts ) ? array( 'updated' => 1, 'locked' => 1, 'deleted' => 1, 'trashed' => 1, 'untrashed' => 1 ) : $bulk_counts;
198 198
 
199 199
 		// If we're starting fresh, a new form was created.
200 200
 		// We should let the user know this is the case.
@@ -202,60 +202,60 @@  discard block
 block discarded – undo
202 202
 
203 203
 		$new_form_text = '';
204 204
 
205
-		if( !empty( $start_fresh ) ) {
205
+		if ( ! empty( $start_fresh ) ) {
206 206
 
207 207
 			// Get the form that was created
208 208
 			$connected_form = gravityview_get_form_id( $post_id );
209 209
 
210
-			if( !empty( $connected_form ) ) {
210
+			if ( ! empty( $connected_form ) ) {
211 211
 				$form = gravityview_get_form( $connected_form );
212
-				$form_name = esc_attr( $form['title'] );
212
+				$form_name = esc_attr( $form[ 'title' ] );
213 213
 				$image = self::get_floaty();
214
-				$new_form_text .= '<h3>'.$image.sprintf( __( 'A new form was created for this View: "%s"', 'gravityview' ), $form_name ).'</h3>';
215
-				$new_form_text .=  sprintf( __( '%sThere are no entries for the new form, so the View will also be empty.%s To start collecting entries, you can add submissions through %sthe preview form%s and also embed the form on a post or page using this code: %s
214
+				$new_form_text .= '<h3>' . $image . sprintf( __( 'A new form was created for this View: "%s"', 'gravityview' ), $form_name ) . '</h3>';
215
+				$new_form_text .= sprintf( __( '%sThere are no entries for the new form, so the View will also be empty.%s To start collecting entries, you can add submissions through %sthe preview form%s and also embed the form on a post or page using this code: %s
216 216
 
217 217
 					You can %sedit the form%s in Gravity Forms and the updated fields will be available here. Don&rsquo;t forget to %scustomize the form settings%s.
218
-					', 'gravityview' ), '<strong>', '</strong>', '<a href="'.site_url( '?gf_page=preview&amp;id='.$connected_form ).'">', '</a>', '<code>[gravityform id="'.$connected_form.'" name="'.$form_name.'"]</code>', '<a href="'.admin_url( 'admin.php?page=gf_edit_forms&amp;id='.$connected_form ).'">', '</a>', '<a href="'.admin_url( 'admin.php?page=gf_edit_forms&amp;view=settings&amp;id='.$connected_form ).'">', '</a>');
218
+					', 'gravityview' ), '<strong>', '</strong>', '<a href="' . site_url( '?gf_page=preview&amp;id=' . $connected_form ) . '">', '</a>', '<code>[gravityform id="' . $connected_form . '" name="' . $form_name . '"]</code>', '<a href="' . admin_url( 'admin.php?page=gf_edit_forms&amp;id=' . $connected_form ) . '">', '</a>', '<a href="' . admin_url( 'admin.php?page=gf_edit_forms&amp;view=settings&amp;id=' . $connected_form ) . '">', '</a>' );
219 219
 				$new_form_text = wpautop( $new_form_text );
220 220
 
221 221
 				delete_post_meta( $post_id, '_gravityview_start_fresh' );
222 222
 			}
223 223
 		}
224 224
 
225
-		$messages['gravityview'] = array(
225
+		$messages[ 'gravityview' ] = array(
226 226
 			0  => '', // Unused. Messages start at index 1.
227 227
 			/* translators: %s and %s are HTML tags linking to the View on the website */
228
-			1  => sprintf(__( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>'),
228
+			1  => sprintf( __( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ),
229 229
 			/* translators: %s and %s are HTML tags linking to the View on the website */
230
-			2  => sprintf(__( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>'),
230
+			2  => sprintf( __( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ),
231 231
 			3  => __( 'View deleted.', 'gravityview' ),
232 232
 			/* translators: %s and %s are HTML tags linking to the View on the website */
233
-			4  => sprintf(__( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>'),
233
+			4  => sprintf( __( 'View updated. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ),
234 234
 			/* translators: %s: date and time of the revision */
235
-			5  => isset( $_GET['revision'] ) ? sprintf( __( 'View restored to revision from %s', 'gravityview' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
235
+			5  => isset( $_GET[ 'revision' ] ) ? sprintf( __( 'View restored to revision from %s', 'gravityview' ), wp_post_revision_title( (int)$_GET[ 'revision' ], false ) ) : false,
236 236
 			/* translators: %s and %s are HTML tags linking to the View on the website */
237
-			6  => sprintf(__( 'View published. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>') . $new_form_text,
237
+			6  => sprintf( __( 'View published. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ) . $new_form_text,
238 238
 			/* translators: %s and %s are HTML tags linking to the View on the website */
239
-			7  => sprintf(__( 'View saved. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>') . $new_form_text,
239
+			7  => sprintf( __( 'View saved. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ) . $new_form_text,
240 240
 			8  => __( 'View submitted.', 'gravityview' ),
241 241
 			9  => sprintf(
242 242
 		        /* translators: Date and time the View is scheduled to be published */
243 243
 				__( 'View scheduled for: %1$s.', 'gravityview' ),
244 244
 				// translators: Publish box date format, see http://php.net/date
245
-				date_i18n( __( 'M j, Y @ G:i', 'gravityview' ), strtotime( ( isset( $post->post_date ) ? $post->post_date : NULL )  ) )
245
+				date_i18n( __( 'M j, Y @ G:i', 'gravityview' ), strtotime( ( isset( $post->post_date ) ? $post->post_date : NULL ) ) )
246 246
 			) . $new_form_text,
247 247
 			/* translators: %s and %s are HTML tags linking to the View on the website */
248
-			10  => sprintf(__( 'View draft updated. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>') . $new_form_text,
248
+			10  => sprintf( __( 'View draft updated. %sView on website.%s', 'gravityview' ), '<a href="' . get_permalink( $post_id ) . '">', '</a>' ) . $new_form_text,
249 249
 
250 250
 			/**
251 251
 			 * These apply to `bulk_post_updated_messages`
252 252
 			 * @file wp-admin/edit.php
253 253
 			 */
254
-			'updated'   => _n( '%s View updated.', '%s Views updated.', $bulk_counts['updated'], 'gravityview' ),
255
-			'locked'    => _n( '%s View not updated, somebody is editing it.', '%s Views not updated, somebody is editing them.', $bulk_counts['locked'], 'gravityview' ),
256
-			'deleted'   => _n( '%s View permanently deleted.', '%s Views permanently deleted.', $bulk_counts['deleted'], 'gravityview' ),
257
-			'trashed'   => _n( '%s View moved to the Trash.', '%s Views moved to the Trash.', $bulk_counts['trashed'], 'gravityview' ),
258
-			'untrashed' => _n( '%s View restored from the Trash.', '%s Views restored from the Trash.', $bulk_counts['untrashed'], 'gravityview' ),
254
+			'updated'   => _n( '%s View updated.', '%s Views updated.', $bulk_counts[ 'updated' ], 'gravityview' ),
255
+			'locked'    => _n( '%s View not updated, somebody is editing it.', '%s Views not updated, somebody is editing them.', $bulk_counts[ 'locked' ], 'gravityview' ),
256
+			'deleted'   => _n( '%s View permanently deleted.', '%s Views permanently deleted.', $bulk_counts[ 'deleted' ], 'gravityview' ),
257
+			'trashed'   => _n( '%s View moved to the Trash.', '%s Views moved to the Trash.', $bulk_counts[ 'trashed' ], 'gravityview' ),
258
+			'untrashed' => _n( '%s View restored from the Trash.', '%s Views restored from the Trash.', $bulk_counts[ 'untrashed' ], 'gravityview' ),
259 259
 		);
260 260
 
261 261
 		return $messages;
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-search_all.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@
 block discarded – undo
7 7
 
8 8
 $gravityview_view = GravityView_View::getInstance();
9 9
 $view_id = $gravityview_view->getViewId();
10
-$value = $gravityview_view->search_field['value'];
11
-$label = $gravityview_view->search_field['label'];
10
+$value = $gravityview_view->search_field[ 'value' ];
11
+$label = $gravityview_view->search_field[ 'label' ];
12 12
 
13 13
 $html_input_type = RGFormsModel::is_html5_enabled() ? 'search' : 'text';
14 14
 ?>
15 15
 
16 16
 <div class="gv-search-box gv-search-field-text gv-search-field-search_all">
17 17
 	<div class="gv-search">
18
-	<?php if( ! gv_empty( $label, false, false ) ) { ?>
18
+	<?php if ( ! gv_empty( $label, false, false ) ) { ?>
19 19
 		<label for="gv_search_<?php echo $view_id; ?>"><?php echo esc_html( $label ); ?></label>
20 20
 	<?php } ?>
21 21
 		<p><input type="<?php echo $html_input_type; ?>" name="gv_search" id="gv_search_<?php echo $view_id; ?>" value="<?php echo esc_attr( $value ); ?>" /></p>
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-entry_id.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
 
8 8
 $gravityview_view = GravityView_View::getInstance();
9 9
 $view_id = $gravityview_view->getViewId();
10
-$value = $gravityview_view->search_field['value'];
11
-$label = $gravityview_view->search_field['label'];
10
+$value = $gravityview_view->search_field[ 'value' ];
11
+$label = $gravityview_view->search_field[ 'label' ];
12 12
 ?>
13 13
 
14 14
 <div class="gv-search-box gv-search-field-entry_id">
15 15
 	<div class="gv-search">
16
-		<?php if( ! gv_empty( $label, false, false ) ) { ?>
16
+		<?php if ( ! gv_empty( $label, false, false ) ) { ?>
17 17
 		<label for="gv_entry_id_<?php echo $view_id; ?>"><?php echo esc_html( $label ); ?></label>
18 18
 		<?php } ?>
19 19
 		<p><input type="text" name="gv_id" id="gv_entry_id_<?php echo $view_id; ?>" value="<?php echo esc_attr( $value ); ?>" /></p>
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-entry_date.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@
 block discarded – undo
7 7
 
8 8
 $gravityview_view = GravityView_View::getInstance();
9 9
 $view_id = $gravityview_view->getViewId();
10
-$value = $gravityview_view->search_field['value'];
11
-$label = $gravityview_view->search_field['label'];
10
+$value = $gravityview_view->search_field[ 'value' ];
11
+$label = $gravityview_view->search_field[ 'label' ];
12 12
 
13 13
 ?>
14 14
 
15 15
 <div class="gv-search-box gv-search-date gv-search-date-range gv-search-field-entry_date">
16
-	<?php if( ! gv_empty( $label, false, false ) ) { ?>
16
+	<?php if ( ! gv_empty( $label, false, false ) ) { ?>
17 17
 	<label for="gv_start_date_<?php echo $view_id; ?>"><?php echo esc_html( $label ); ?></label>
18 18
 	<?php } ?>
19 19
 	<p>
20
-		<input name="gv_start" id="gv_start_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_attr( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e('Start date', 'gravityview' ); ?>" value="<?php echo $value['start']; ?>">
21
-		<input name="gv_end" id="gv_end_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_attr( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e('End date', 'gravityview' ); ?>" value="<?php echo $value['end']; ?>">
20
+		<input name="gv_start" id="gv_start_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_attr( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e( 'Start date', 'gravityview' ); ?>" value="<?php echo $value[ 'start' ]; ?>">
21
+		<input name="gv_end" id="gv_end_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_attr( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e( 'End date', 'gravityview' ); ?>" value="<?php echo $value[ 'end' ]; ?>">
22 22
 	</p>
23 23
 </div>
24 24
\ No newline at end of file
Please login to merge, or discard this patch.