Completed
Push — develop ( 50ff57...a18596 )
by Zack
34:19 queued 14:15
created
plugin-and-theme-hooks/abstract-gravityview-plugin-and-theme-hooks.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
 	private function maybe_add_hooks() {
111 111
 		$class_exists = $this->class_name && class_exists( $this->class_name );
112 112
 		$function_exists = $this->function_name && function_exists( $this->function_name );
113
-		$constant_defined = $this->constant_name && defined("{$this->constant_name}");
113
+		$constant_defined = $this->constant_name && defined( "{$this->constant_name}" );
114 114
 
115
-		if( $class_exists || $function_exists || $constant_defined ) {
115
+		if ( $class_exists || $function_exists || $constant_defined ) {
116 116
 			$this->add_hooks();
117 117
 		}
118 118
 	}
@@ -124,23 +124,23 @@  discard block
 block discarded – undo
124 124
 	 */
125 125
 	protected function add_hooks() {
126 126
 
127
-		if( $this->meta_keys ) {
127
+		if ( $this->meta_keys ) {
128 128
 			add_filter( 'gravityview/data/parse/meta_keys', array( $this, 'merge_meta_keys' ), 10, 2 );
129 129
 		}
130 130
 
131
-		if( $this->content_meta_keys ) {
131
+		if ( $this->content_meta_keys ) {
132 132
 			add_filter( 'gravityview/view_collection/from_post/meta_keys', array( $this, 'merge_content_meta_keys' ), 10, 3 );
133 133
 		}
134 134
 
135
-		if( $this->script_handles ) {
135
+		if ( $this->script_handles ) {
136 136
 			add_filter( 'gravityview_noconflict_scripts', array( $this, 'merge_noconflict_scripts' ) );
137 137
 		}
138 138
 
139
-		if( $this->style_handles ) {
139
+		if ( $this->style_handles ) {
140 140
 			add_filter( 'gravityview_noconflict_styles', array( $this, 'merge_noconflict_styles' ) );
141 141
 		}
142 142
 
143
-		if( $this->post_type_support ) {
143
+		if ( $this->post_type_support ) {
144 144
 			add_filter( 'gravityview_post_type_support', array( $this, 'merge_post_type_support' ), 10, 2 );
145 145
 		}
146 146
 	}
Please login to merge, or discard this patch.
plugin-and-theme-hooks/class-gravityview-theme-hooks-siteorigin.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,19 +39,19 @@  discard block
 block discarded – undo
39 39
 	 */
40 40
 	function merge_content_meta_keys( $meta_keys = array(), $post = null, & $views = null ) {
41 41
 
42
-		if( empty( $post->panels_data ) || empty( $post->panels_data['widgets'] ) ) {
42
+		if ( empty( $post->panels_data ) || empty( $post->panels_data[ 'widgets' ] ) ) {
43 43
 			return $meta_keys;
44 44
 		}
45 45
 
46
-		foreach ( (array) $post->panels_data['widgets'] as $widget ) {
46
+		foreach ( (array)$post->panels_data[ 'widgets' ] as $widget ) {
47 47
 
48 48
 			$views->merge( \GV\View_Collection::from_content( \GV\Utils::get( $widget, 'text' ) ) );
49 49
 
50
-			if ( empty( $widget['tabs'] ) || ! is_array( $widget['tabs'] ) ) {
50
+			if ( empty( $widget[ 'tabs' ] ) || ! is_array( $widget[ 'tabs' ] ) ) {
51 51
 				continue;
52 52
 			}
53 53
 
54
-			foreach ( $widget['tabs'] as $tab ) {
54
+			foreach ( $widget[ 'tabs' ] as $tab ) {
55 55
 
56 56
 				// Livemesh Tabs
57 57
 				$backup = \GV\Utils::get( $tab, 'tab_content' );
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 				// SiteOrigin Tabs
60 60
 				$content = \GV\Utils::get( $tab, 'content_text', $backup );
61 61
 
62
-				if( $content ) {
62
+				if ( $content ) {
63 63
 					$views->merge( \GV\View_Collection::from_content( $content ) );
64 64
 				}
65 65
 			}
Please login to merge, or discard this patch.
includes/plugin-and-theme-hooks/class-gravityview-plugin-hooks-acf.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
 		$acf_keys = get_field_objects( $post->ID, array( 'load_value' => false ) );
57 57
 
58
-		if( $acf_keys ) {
58
+		if ( $acf_keys ) {
59 59
 			return array_merge( array_keys( $acf_keys ), $meta_keys );
60 60
 		}
61 61
 
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
 	 * @return void
71 71
 	 */
72 72
 	private function fix_posted_fields() {
73
-		if( is_admin() && isset( $_POST['action'] ) && isset( $_POST['post_type'] ) ) {
74
-			if( 'editpost' === $_POST['action'] && 'gravityview' === $_POST['post_type'] ) {
75
-				$_POST['fields'] = _gravityview_process_posted_fields();
73
+		if ( is_admin() && isset( $_POST[ 'action' ] ) && isset( $_POST[ 'post_type' ] ) ) {
74
+			if ( 'editpost' === $_POST[ 'action' ] && 'gravityview' === $_POST[ 'post_type' ] ) {
75
+				$_POST[ 'fields' ] = _gravityview_process_posted_fields();
76 76
 			}
77 77
 		}
78 78
 	}
Please login to merge, or discard this patch.
future/includes/class-gv-shortcode-gventry.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -44,16 +44,16 @@  discard block
 block discarded – undo
44 44
 		 */
45 45
 		$atts = apply_filters( 'gravityview/shortcodes/gventry/atts', $atts );
46 46
 
47
-		$view = \GV\View::by_id( $atts['view_id'] );
47
+		$view = \GV\View::by_id( $atts[ 'view_id' ] );
48 48
 
49 49
 		if ( ! $view ) {
50
-			gravityview()->log->error( 'View does not exist #{view_id}', array( 'view_id' => $atts['view_id'] ) );
50
+			gravityview()->log->error( 'View does not exist #{view_id}', array( 'view_id' => $atts[ 'view_id' ] ) );
51 51
 			return apply_filters( 'gravityview/shortcodes/gventry/output', '', null, null, $atts );
52 52
 		}
53 53
 
54
-		$entry_id = ! empty( $atts['entry_id'] ) ? $atts['entry_id'] : $atts['id'];
54
+		$entry_id = ! empty( $atts[ 'entry_id' ] ) ? $atts[ 'entry_id' ] : $atts[ 'id' ];
55 55
 
56
-		switch( $entry_id ):
56
+		switch ( $entry_id ):
57 57
 			case 'last':
58 58
 				if ( class_exists( '\GF_Query' ) ) {
59 59
 					/**
@@ -62,17 +62,17 @@  discard block
 block discarded – undo
62 62
 					 * Since we're using \GF_Query shorthand initialization we have to reverse the order parameters here.
63 63
 					 */
64 64
 					add_filter( 'gravityview_get_entries', $filter = function( $parameters, $args, $form_id ) {
65
-						if ( ! empty( $parameters['sorting'] ) ) {
65
+						if ( ! empty( $parameters[ 'sorting' ] ) ) {
66 66
 							/**
67 67
 							 * Reverse existing sorts.
68 68
 							 */
69
-							$sort = &$parameters['sorting'];
70
-							$sort['direction'] = $sort['direction'] == 'RAND' ? : ( $sort['direction'] == 'ASC' ? 'DESC' : 'ASC' );
69
+							$sort = &$parameters[ 'sorting' ];
70
+							$sort[ 'direction' ] = $sort[ 'direction' ] == 'RAND' ?: ( $sort[ 'direction' ] == 'ASC' ? 'DESC' : 'ASC' );
71 71
 						} else {
72 72
 							/**
73 73
 							 * Otherwise, sort by date_created.
74 74
 							 */
75
-							$parameters['sorting'] = array(
75
+							$parameters[ 'sorting' ] = array(
76 76
 								'key' => 'id',
77 77
 								'direction' => 'ASC',
78 78
 								'is_numeric' => true
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
 					/** If a sort already exists, reverse it. */
89 89
 					if ( $sort = end( $entries->sorts ) ) {
90
-						$entries = $entries->sort( new \GV\Entry_Sort( $sort->field, $sort->direction == \GV\Entry_Sort::RAND ? : ( $sort->direction == \GV\Entry_Sort::ASC ? \GV\Entry_Sort::DESC : \GV\Entry_Sort::ASC ) ), $sort->mode );
90
+						$entries = $entries->sort( new \GV\Entry_Sort( $sort->field, $sort->direction == \GV\Entry_Sort::RAND ?: ( $sort->direction == \GV\Entry_Sort::ASC ? \GV\Entry_Sort::DESC : \GV\Entry_Sort::ASC ) ), $sort->mode );
91 91
 					} else {
92 92
 						/** Otherwise, sort by date_created */
93 93
 						$entries = $entries->sort( new \GV\Entry_Sort( \GV\Internal_Field::by_id( 'id' ), \GV\Entry_Sort::ASC ), \GV\Entry_Sort::NUMERIC );
@@ -105,12 +105,12 @@  discard block
 block discarded – undo
105 105
 				break;
106 106
 			default:
107 107
 				if ( ! $entry = \GV\GF_Entry::by_id( $entry_id ) ) {
108
-					gravityview()->log->error( 'Entry #{entry_id} not found', array( 'view_id' => $atts['view_id'] ) );
108
+					gravityview()->log->error( 'Entry #{entry_id} not found', array( 'view_id' => $atts[ 'view_id' ] ) );
109 109
 					return apply_filters( 'gravityview/shortcodes/gventry/output', '', $view, null, $atts );
110 110
 				}
111 111
 		endswitch;
112 112
 
113
-		if ( $view->form->ID != $entry['form_id'] ) {
113
+		if ( $view->form->ID != $entry[ 'form_id' ] ) {
114 114
 			gravityview()->log->error( 'Entry does not belong to view (form mismatch)' );
115 115
 			return apply_filters( 'gravityview/shortcodes/gventry/output', '', $view, $entry, $atts );
116 116
 		}
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 			return apply_filters( 'gravityview/shortcodes/gventry/output', get_the_password_form( $view->ID ), $view, $entry, $atts );
121 121
 		}
122 122
 
123
-		if ( ! $view->form  ) {
123
+		if ( ! $view->form ) {
124 124
 			gravityview()->log->notice( 'View #{id} has no form attached to it.', array( 'id' => $view->ID ) );
125 125
 
126 126
 			/**
@@ -143,15 +143,15 @@  discard block
 block discarded – undo
143 143
 		}
144 144
 
145 145
 		/** Unapproved entries. */
146
-		if ( $entry['status'] != 'active' ) {
146
+		if ( $entry[ 'status' ] != 'active' ) {
147 147
 			gravityview()->log->notice( 'Entry ID #{entry_id} is not active', array( 'entry_id' => $entry->ID ) );
148 148
 			return apply_filters( 'gravityview/shortcodes/gventry/output', '', $view, $entry, $atts );
149 149
 		}
150 150
 
151
-		$is_admin_and_can_view = $view->settings->get( 'admin_show_all_statuses' ) && \GVCommon::has_cap('gravityview_moderate_entries', $view->ID );
151
+		$is_admin_and_can_view = $view->settings->get( 'admin_show_all_statuses' ) && \GVCommon::has_cap( 'gravityview_moderate_entries', $view->ID );
152 152
 
153 153
 		if ( $view->settings->get( 'show_only_approved' ) && ! $is_admin_and_can_view ) {
154
-			if ( ! \GravityView_Entry_Approval_Status::is_approved( gform_get_meta( $entry->ID, \GravityView_Entry_Approval::meta_key ) )  ) {
154
+			if ( ! \GravityView_Entry_Approval_Status::is_approved( gform_get_meta( $entry->ID, \GravityView_Entry_Approval::meta_key ) ) ) {
155 155
 				gravityview()->log->error( 'Entry ID #{entry_id} is not approved for viewing', array( 'entry_id' => $entry->ID ) );
156 156
 				return apply_filters( 'gravityview/shortcodes/gventry/output', '', $view, $entry, $atts );
157 157
 			}
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 		$renderer = new \GV\Entry_Renderer();
164 164
 
165 165
 		$request = new \GV\Mock_Request();
166
-		$request->returns['is_entry'] = $entry;
166
+		$request->returns[ 'is_entry' ] = $entry;
167 167
 
168 168
 		$output = $renderer->render( $entry, $view, $request );
169 169
 
Please login to merge, or discard this patch.
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-custom.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
 	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
42 42
 
43
-		unset ( $field_options['search_filter'], $field_options['show_as_link'] );
43
+		unset ( $field_options[ 'search_filter' ], $field_options[ 'show_as_link' ] );
44 44
 
45 45
 		$new_fields = array(
46 46
 			'content' => array(
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		);
69 69
 
70 70
 		if ( 'edit' === $context ) {
71
-			unset( $field_options['custom_label'], $field_options['show_label'], $field_options['allow_edit_cap'], $new_fields['wpautop'], $new_fields['oembed'] );
71
+			unset( $field_options[ 'custom_label' ], $field_options[ 'show_label' ], $field_options[ 'allow_edit_cap' ], $new_fields[ 'wpautop' ], $new_fields[ 'oembed' ] );
72 72
 		}
73 73
 
74 74
 		return $new_fields + $field_options;
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
 
103 103
 		// Loop through the configured Edit Entry fields and add Custom Content fields if there are any
104 104
 		// TODO: Make this available to other custom GV field types
105
-		foreach ( (array) $edit_fields as $edit_field ) {
105
+		foreach ( (array)$edit_fields as $edit_field ) {
106 106
 
107
-			if( 'custom' === \GV\Utils::get( $edit_field, 'id') ) {
107
+			if ( 'custom' === \GV\Utils::get( $edit_field, 'id' ) ) {
108 108
 
109 109
 				$field_data = array(
110 110
 					'label' => \GV\Utils::get( $edit_field, 'custom_label' ),
@@ -117,13 +117,13 @@  discard block
 block discarded – undo
117 117
 					$field_data[ $key ] = GravityView_Merge_Tags::replace_variables( $field_datum, $form, $entry->as_entry(), false, false );
118 118
 				}
119 119
 
120
-				$field_data['cssClass'] = \GV\Utils::get( $edit_field, 'custom_class' );
120
+				$field_data[ 'cssClass' ] = \GV\Utils::get( $edit_field, 'custom_class' );
121 121
 
122
-				$new_fields[] = new GF_Field_HTML( $field_data );
122
+				$new_fields[ ] = new GF_Field_HTML( $field_data );
123 123
 
124 124
 			} else {
125
-				if( isset( $fields[ $i ] ) ) {
126
-					$new_fields[] =  $fields[ $i ];
125
+				if ( isset( $fields[ $i ] ) ) {
126
+					$new_fields[ ] = $fields[ $i ];
127 127
 				}
128 128
 				$i++;
129 129
 			}
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.
includes/extensions/edit-entry/class-edit-entry.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         self::$file = plugin_dir_path( __FILE__ );
38 38
 
39
-        if( is_admin() ) {
39
+        if ( is_admin() ) {
40 40
             $this->load_components( 'admin' );
41 41
         }
42 42
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     static function getInstance() {
57 57
 
58
-        if( empty( self::$instance ) ) {
58
+        if ( empty( self::$instance ) ) {
59 59
             self::$instance = new GravityView_Edit_Entry;
60 60
         }
61 61
 
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
     private function add_hooks() {
82 82
 
83 83
         // Add front-end access to Gravity Forms delete file action
84
-        add_action( 'wp_ajax_nopriv_rg_delete_file', array( 'GFForms', 'delete_file') );
84
+        add_action( 'wp_ajax_nopriv_rg_delete_file', array( 'GFForms', 'delete_file' ) );
85 85
 
86 86
         // Make sure this hook is run for non-admins
87
-        add_action( 'wp_ajax_rg_delete_file', array( 'GFForms', 'delete_file') );
87
+        add_action( 'wp_ajax_rg_delete_file', array( 'GFForms', 'delete_file' ) );
88 88
 
89 89
         add_filter( 'gravityview_blacklist_field_types', array( $this, 'modify_field_blacklist' ), 10, 2 );
90 90
 
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 	 */
100 100
 	private function addon_specific_hooks() {
101 101
 
102
-		if( class_exists( 'GFSignature' ) && is_callable( array( 'GFSignature', 'get_instance' ) ) ) {
103
-			add_filter('gform_admin_pre_render', array( GFSignature::get_instance(), 'edit_lead_script'));
102
+		if ( class_exists( 'GFSignature' ) && is_callable( array( 'GFSignature', 'get_instance' ) ) ) {
103
+			add_filter( 'gform_admin_pre_render', array( GFSignature::get_instance(), 'edit_lead_script' ) );
104 104
 		}
105 105
 
106 106
 	}
@@ -146,15 +146,15 @@  discard block
 block discarded – undo
146 146
      */
147 147
     public static function get_edit_link( $entry, $view_id, $post_id = null, $field_values = '' ) {
148 148
 
149
-        $nonce_key = self::get_nonce_key( $view_id, $entry['form_id'], $entry['id']  );
149
+        $nonce_key = self::get_nonce_key( $view_id, $entry[ 'form_id' ], $entry[ 'id' ] );
150 150
 
151
-        $base = gv_entry_link( $entry, $post_id ? : $view_id  );
151
+        $base = gv_entry_link( $entry, $post_id ?: $view_id );
152 152
 
153 153
         $url = add_query_arg( array(
154 154
             'edit' => wp_create_nonce( $nonce_key )
155 155
         ), $base );
156 156
 
157
-        if( $post_id ) {
157
+        if ( $post_id ) {
158 158
 	        $url = add_query_arg( array( 'gvid' => $view_id ), $url );
159 159
         }
160 160
 
@@ -162,9 +162,9 @@  discard block
 block discarded – undo
162 162
 	     * Allow passing params to dynamically populate entry with values
163 163
 	     * @since 1.9.2
164 164
 	     */
165
-	    if( !empty( $field_values ) ) {
165
+	    if ( ! empty( $field_values ) ) {
166 166
 
167
-		    if( is_array( $field_values ) ) {
167
+		    if ( is_array( $field_values ) ) {
168 168
 			    // If already an array, no parse_str() needed
169 169
 			    $params = $field_values;
170 170
 		    } else {
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 	 */
186 186
 	public function modify_field_blacklist( $fields = array(), $context = NULL ) {
187 187
 
188
-		if( empty( $context ) || $context !== 'edit' ) {
188
+		if ( empty( $context ) || $context !== 'edit' ) {
189 189
 			return $fields;
190 190
 		}
191 191
 
@@ -246,25 +246,25 @@  discard block
 block discarded – undo
246 246
         // If they can edit any entries (as defined in Gravity Forms)
247 247
         // Or if they can edit other people's entries
248 248
         // Then we're good.
249
-        if( GVCommon::has_cap( array( 'gravityforms_edit_entries', 'gravityview_edit_others_entries' ), $entry['id'] ) ) {
249
+        if ( GVCommon::has_cap( array( 'gravityforms_edit_entries', 'gravityview_edit_others_entries' ), $entry[ 'id' ] ) ) {
250 250
 
251 251
             gravityview()->log->debug( 'User has ability to edit all entries.' );
252 252
 
253 253
             $user_can_edit = true;
254 254
 
255
-        } else if( !isset( $entry['created_by'] ) ) {
255
+        } else if ( ! isset( $entry[ 'created_by' ] ) ) {
256 256
 
257
-            gravityview()->log->error( 'Entry `created_by` doesn\'t exist.');
257
+            gravityview()->log->error( 'Entry `created_by` doesn\'t exist.' );
258 258
 
259 259
             $user_can_edit = false;
260 260
 
261 261
         } else {
262 262
 
263 263
             // get user_edit setting
264
-            if( empty( $view_id ) || $view_id == GravityView_View::getInstance()->getViewId() ) {
264
+            if ( empty( $view_id ) || $view_id == GravityView_View::getInstance()->getViewId() ) {
265 265
                 // if View ID not specified or is the current view
266 266
 				// @deprecated path
267
-                $user_edit = GravityView_View::getInstance()->getAtts('user_edit');
267
+                $user_edit = GravityView_View::getInstance()->getAtts( 'user_edit' );
268 268
             } else {
269 269
                 // in case is specified and not the current view
270 270
                 $user_edit = GVCommon::get_template_setting( $view_id, 'user_edit' );
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
             $current_user = wp_get_current_user();
274 274
 
275 275
             // User edit is disabled
276
-            if( empty( $user_edit ) ) {
276
+            if ( empty( $user_edit ) ) {
277 277
 
278 278
                 gravityview()->log->debug( 'User Edit is disabled. Returning false.' );
279 279
 
@@ -281,13 +281,13 @@  discard block
 block discarded – undo
281 281
             }
282 282
 
283 283
             // User edit is enabled and the logged-in user is the same as the user who created the entry. We're good.
284
-            else if( is_user_logged_in() && intval( $current_user->ID ) === intval( $entry['created_by'] ) ) {
284
+            else if ( is_user_logged_in() && intval( $current_user->ID ) === intval( $entry[ 'created_by' ] ) ) {
285 285
 
286 286
                 gravityview()->log->debug( 'User {user_id} created the entry.', array( 'user_id', $current_user->ID ) );
287 287
 
288 288
                 $user_can_edit = true;
289 289
 
290
-            } else if( ! is_user_logged_in() ) {
290
+            } else if ( ! is_user_logged_in() ) {
291 291
 
292 292
                 gravityview()->log->debug( 'No user defined; edit entry requires logged in user' );
293 293
             }
Please login to merge, or discard this patch.