Completed
Pull Request — master (#822)
by Zack
23:55 queued 20:40
created
includes/class-gravityview-merge-tags.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	public static function process_modifiers( $value, $merge_tag, $modifier, $field, $raw_value ) {
46 46
 
47 47
 		// No modifier was set or the raw value was empty
48
-		if( 'all_fields' === $merge_tag || '' === $modifier || ! is_string( $raw_value ) || '' === $raw_value ) {
48
+		if ( 'all_fields' === $merge_tag || '' === $modifier || ! is_string( $raw_value ) || '' === $raw_value ) {
49 49
 			return $value;
50 50
 		}
51 51
 
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
 		foreach ( $gv_modifiers as $gv_modifier => $method ) {
62 62
 
63 63
 			// Only match the regex if it's the first modifer; this allows us to enforce our own modifier structure
64
-			preg_match( '/^' . $gv_modifier .'/ism', $modifier, $matches );
64
+			preg_match( '/^' . $gv_modifier . '/ism', $modifier, $matches );
65 65
 
66
-			if( ! empty( $matches ) ) {
66
+			if ( ! empty( $matches ) ) {
67 67
 				// The called method is passed the raw value and the full matches array
68 68
 				$return = self::$method( $raw_value, $matches );
69 69
 				break;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	private static function modifier_timestamp( $raw_value, $matches ) {
89 89
 
90
-		if( empty( $matches[0] ) ) {
90
+		if ( empty( $matches[ 0 ] ) ) {
91 91
 			return $raw_value;
92 92
 		}
93 93
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	private static function modifier_wpautop( $raw_value, $matches ) {
113 113
 
114
-		if( empty( $matches[0] ) || ! function_exists( 'wpautop' ) ) {
114
+		if ( empty( $matches[ 0 ] ) || ! function_exists( 'wpautop' ) ) {
115 115
 			return $raw_value;
116 116
 		}
117 117
 
@@ -135,11 +135,11 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	private static function modifier_maxwords( $raw_value, $matches ) {
137 137
 
138
-		if( ! is_string( $raw_value ) || empty( $matches[1] ) || ! function_exists( 'wp_trim_words' ) ) {
138
+		if ( ! is_string( $raw_value ) || empty( $matches[ 1 ] ) || ! function_exists( 'wp_trim_words' ) ) {
139 139
 			return $raw_value;
140 140
 		}
141 141
 
142
-		$max = intval( $matches[1] );
142
+		$max = intval( $matches[ 1 ] );
143 143
 
144 144
 		$more_placeholder = '[GVMORE]';
145 145
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 	 * @param  bool       $esc_html     Pass return value through `esc_html()`
172 172
 	 * @return string                  Text with variables maybe replaced
173 173
 	 */
174
-	public static function replace_variables($text, $form = array(), $entry = array(), $url_encode = false, $esc_html = true ) {
174
+	public static function replace_variables( $text, $form = array(), $entry = array(), $url_encode = false, $esc_html = true ) {
175 175
 
176 176
 		/**
177 177
 		 * @filter `gravityview_do_replace_variables` Turn off merge tag variable replacements.\n
@@ -195,9 +195,9 @@  discard block
 block discarded – undo
195 195
 		 * @internal Reported to GF Support on 12/3
196 196
 		 * @internal Fixed in Gravity Forms
197 197
 		 */
198
-		$form['title']  = isset( $form['title'] ) ? $form['title'] : '';
199
-		$form['id']     = isset( $form['id'] ) ? $form['id'] : '';
200
-		$form['fields'] = isset( $form['fields'] ) ? $form['fields'] : array();
198
+		$form[ 'title' ]  = isset( $form[ 'title' ] ) ? $form[ 'title' ] : '';
199
+		$form[ 'id' ]     = isset( $form[ 'id' ] ) ? $form[ 'id' ] : '';
200
+		$form[ 'fields' ] = isset( $form[ 'fields' ] ) ? $form[ 'fields' ] : array();
201 201
 
202 202
 		return GFCommon::replace_variables( $text, $form, $entry, $url_encode, $esc_html );
203 203
 	}
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 	 *
218 218
 	 * @return mixed
219 219
 	 */
220
-	public static function replace_gv_merge_tags(  $text, $form = array(), $entry = array(), $url_encode = false, $esc_html = false ) {
220
+	public static function replace_gv_merge_tags( $text, $form = array(), $entry = array(), $url_encode = false, $esc_html = false ) {
221 221
 
222 222
 		/**
223 223
 		 * This prevents the gform_replace_merge_tags filter from being called twice, as defined in:
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 		 * @see GFCommon::replace_variables_prepopulate()
226 226
 		 * @todo Remove eventually: Gravity Forms fixed this issue in 1.9.14
227 227
 		 */
228
-		if( false === $form ) {
228
+		if ( false === $form ) {
229 229
 			return $text;
230 230
 		}
231 231
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 			'diff' => in_array( 'diff', $exploded ), // {date_created:diff}
258 258
 			'raw' => in_array( 'raw', $exploded ), // {date_created:raw}
259 259
 			'timestamp' => in_array( 'timestamp', $exploded ), // {date_created:timestamp}
260
-			'time' => in_array( 'time', $exploded ),  // {date_created:time}
260
+			'time' => in_array( 'time', $exploded ), // {date_created:time}
261 261
 		);
262 262
 
263 263
 		$formatted_date = GVCommon::format_date( $date_created, $atts );
@@ -320,14 +320,14 @@  discard block
 block discarded – undo
320 320
 		preg_match_all( "/{get:(.*?)}/ism", $text, $matches, PREG_SET_ORDER );
321 321
 
322 322
 		// If there are no matches OR the Entry `created_by` isn't set or is 0 (no user)
323
-		if( empty( $matches ) ) {
323
+		if ( empty( $matches ) ) {
324 324
 			return $text;
325 325
 		}
326 326
 
327 327
 		foreach ( $matches as $match ) {
328 328
 
329
-			$full_tag = $match[0];
330
-			$property = $match[1];
329
+			$full_tag = $match[ 0 ];
330
+			$property = $match[ 1 ];
331 331
 
332 332
 			$value = stripslashes_deep( rgget( $property ) );
333 333
 
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 			 * @since 1.15
352 352
 			 * @param bool $esc_html Whether to esc_html() the value. Default: `true`
353 353
 			 */
354
-			$esc_html = apply_filters('gravityview/merge_tags/get/esc_html/' . $property, true );
354
+			$esc_html = apply_filters( 'gravityview/merge_tags/get/esc_html/' . $property, true );
355 355
 
356 356
 			$value = $esc_html ? esc_html( $value ) : $value;
357 357
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 			 * @param[in] array $form Gravity Forms form array
363 363
 			 * @param[in] array $entry Entry array
364 364
 			 */
365
-			$value = apply_filters('gravityview/merge_tags/get/value/' . $property, $value, $text, $form, $entry );
365
+			$value = apply_filters( 'gravityview/merge_tags/get/value/' . $property, $value, $text, $form, $entry );
366 366
 
367 367
 			$text = str_replace( $full_tag, $value, $text );
368 368
 		}
Please login to merge, or discard this patch.
includes/admin/class-gravityview-admin-no-conflict.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 	 */
19 19
 	public function __construct() {
20 20
 
21
-		if( ! is_admin() ) { return; }
21
+		if ( ! is_admin() ) { return; }
22 22
 		
23 23
 		$this->add_hooks();
24 24
 	}
@@ -32,13 +32,13 @@  discard block
 block discarded – undo
32 32
 	 */
33 33
 	private function add_hooks() {
34 34
 		//Hooks for no-conflict functionality
35
-		add_action( 'wp_print_scripts', array( $this, 'no_conflict_scripts' ), 1000);
36
-		add_action( 'admin_print_footer_scripts', array( $this, 'no_conflict_scripts' ), 9);
35
+		add_action( 'wp_print_scripts', array( $this, 'no_conflict_scripts' ), 1000 );
36
+		add_action( 'admin_print_footer_scripts', array( $this, 'no_conflict_scripts' ), 9 );
37 37
 
38
-		add_action( 'wp_print_styles', array( $this, 'no_conflict_styles' ), 1000);
39
-		add_action( 'admin_print_styles', array( $this, 'no_conflict_styles' ), 11);
40
-		add_action( 'admin_print_footer_scripts', array( $this, 'no_conflict_styles' ), 1);
41
-		add_action( 'admin_footer', array( $this, 'no_conflict_styles' ), 1);
38
+		add_action( 'wp_print_styles', array( $this, 'no_conflict_styles' ), 1000 );
39
+		add_action( 'admin_print_styles', array( $this, 'no_conflict_styles' ), 11 );
40
+		add_action( 'admin_print_footer_scripts', array( $this, 'no_conflict_styles' ), 1 );
41
+		add_action( 'admin_footer', array( $this, 'no_conflict_styles' ), 1 );
42 42
 	}
43 43
 
44 44
 	/**
@@ -51,13 +51,13 @@  discard block
 block discarded – undo
51 51
 	function no_conflict_scripts() {
52 52
 		global $wp_scripts;
53 53
 
54
-		if( ! gravityview_is_admin_page() ) {
54
+		if ( ! gravityview_is_admin_page() ) {
55 55
 			return;
56 56
 		}
57 57
 
58
-		$no_conflict_mode = GravityView_Settings::getSetting('no-conflict-mode');
58
+		$no_conflict_mode = GravityView_Settings::getSetting( 'no-conflict-mode' );
59 59
 
60
-		if( empty( $no_conflict_mode ) ) {
60
+		if ( empty( $no_conflict_mode ) ) {
61 61
 			return;
62 62
 		}
63 63
 
@@ -110,24 +110,24 @@  discard block
 block discarded – undo
110 110
 	function no_conflict_styles() {
111 111
 		global $wp_styles;
112 112
 
113
-		if( ! gravityview_is_admin_page() ) {
113
+		if ( ! gravityview_is_admin_page() ) {
114 114
 			return;
115 115
 		}
116 116
 
117 117
 		// Dequeue other jQuery styles even if no-conflict is off.
118 118
 		// Terrible-looking tabs help no one.
119
-		if( !empty( $wp_styles->registered ) )  {
120
-			foreach ($wp_styles->registered as $key => $style) {
121
-				if( preg_match( '/^(?:wp\-)?jquery/ism', $key ) ) {
119
+		if ( ! empty( $wp_styles->registered ) ) {
120
+			foreach ( $wp_styles->registered as $key => $style ) {
121
+				if ( preg_match( '/^(?:wp\-)?jquery/ism', $key ) ) {
122 122
 					wp_dequeue_style( $key );
123 123
 				}
124 124
 			}
125 125
 		}
126 126
 
127
-		$no_conflict_mode = GravityView_Settings::getSetting('no-conflict-mode');
127
+		$no_conflict_mode = GravityView_Settings::getSetting( 'no-conflict-mode' );
128 128
 
129 129
 		// If no conflict is off, jQuery will suffice.
130
-		if( empty( $no_conflict_mode ) ) {
130
+		if ( empty( $no_conflict_mode ) ) {
131 131
 			return;
132 132
 		}
133 133
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 		/**
155 155
 		 * @action `gravityview_remove_conflicts_after` Runs after no-conflict styles are removed. You can re-add styles here.
156 156
 		 */
157
-		do_action('gravityview_remove_conflicts_after');
157
+		do_action( 'gravityview_remove_conflicts_after' );
158 158
 	}
159 159
 
160 160
 	/**
@@ -178,9 +178,9 @@  discard block
 block discarded – undo
178 178
 
179 179
 		//reset queue
180 180
 		$queue = array();
181
-		foreach( $wp_objects->queue as $object ) {
182
-			if( in_array( $object, $required_objects ) || preg_match('/gravityview|gf_|gravityforms/ism', $object ) ) {
183
-				$queue[] = $object;
181
+		foreach ( $wp_objects->queue as $object ) {
182
+			if ( in_array( $object, $required_objects ) || preg_match( '/gravityview|gf_|gravityforms/ism', $object ) ) {
183
+				$queue[ ] = $object;
184 184
 			}
185 185
 		}
186 186
 		$wp_objects->queue = $queue;
@@ -189,8 +189,8 @@  discard block
 block discarded – undo
189 189
 
190 190
 		//unregistering scripts
191 191
 		$registered = array();
192
-		foreach( $wp_objects->registered as $handle => $script_registration ){
193
-			if( in_array( $handle, $required_objects ) ){
192
+		foreach ( $wp_objects->registered as $handle => $script_registration ) {
193
+			if ( in_array( $handle, $required_objects ) ) {
194 194
 				$registered[ $handle ] = $script_registration;
195 195
 			}
196 196
 		}
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 	 * @param array $registered [description]
206 206
 	 * @param array $scripts    [description]
207 207
 	 */
208
-	private function add_script_dependencies($registered, $scripts) {
208
+	private function add_script_dependencies( $registered, $scripts ) {
209 209
 
210 210
 		//gets all dependent scripts linked to the $scripts array passed
211 211
 		do {
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 				$deps = isset( $registered[ $script ] ) && is_array( $registered[ $script ]->deps ) ? $registered[ $script ]->deps : array();
215 215
 				foreach ( $deps as $dep ) {
216 216
 					if ( ! in_array( $dep, $scripts ) && ! in_array( $dep, $dependents ) ) {
217
-						$dependents[] = $dep;
217
+						$dependents[ ] = $dep;
218 218
 					}
219 219
 				}
220 220
 			}
Please login to merge, or discard this patch.
includes/admin/field-types/type_radio.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@
 block discarded – undo
19 19
 	}
20 20
 
21 21
 	function render_input( $override_input = null ) {
22
-		if( isset( $override_input ) ) {
22
+		if ( isset( $override_input ) ) {
23 23
 			echo $override_input;
24 24
 			return;
25 25
 		}
26 26
 
27
-		foreach( $this->field['options'] as $value => $label ) : ?>
27
+		foreach ( $this->field[ 'options' ] as $value => $label ) : ?>
28 28
 		<label class="<?php echo $this->get_label_class(); ?>">
29 29
 			<input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>-<?php echo esc_attr( $value ); ?>" type="radio" value="<?php echo esc_attr( $value ); ?>" <?php checked( $value, $this->value, true ); ?> />&nbsp;<?php echo esc_html( $label ); ?>
30 30
 		</label>
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-radio.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 	var $name = 'radio';
11 11
 
12
-	var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains');
12
+	var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains' );
13 13
 
14 14
 	var $_gf_field_class_name = 'GF_Field_Radio';
15 15
 
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 		// Set the $_field_id var
39 39
 		$field_options = parent::field_options( $field_options, $template_id, $field_id, $context, $input_type );
40 40
 		
41
-		if( $this->is_choice_value_enabled() ) {
42
-			$field_options['choice_display'] = array(
41
+		if ( $this->is_choice_value_enabled() ) {
42
+			$field_options[ 'choice_display' ] = array(
43 43
 				'type'    => 'radio',
44 44
 				'value'   => 'value',
45 45
 				'label'   => __( 'What should be displayed:', 'gravityview' ),
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-select.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@
 block discarded – undo
38 38
 		// Set the $_field_id var
39 39
 		$field_options = parent::field_options( $field_options, $template_id, $field_id, $context, $input_type );
40 40
 
41
-		if( $this->is_choice_value_enabled() ) {
42
-			$field_options['choice_display'] = array(
41
+		if ( $this->is_choice_value_enabled() ) {
42
+			$field_options[ 'choice_display' ] = array(
43 43
 				'type'    => 'radio',
44 44
 				'value'   => 'value',
45 45
 				'label'   => __( 'What should be displayed:', 'gravityview' ),
Please login to merge, or discard this patch.
plugin-and-theme-hooks/class-gravityview-plugin-hooks-gravityformsquiz.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,25 +48,25 @@
 block discarded – undo
48 48
 		
49 49
 		$quiz_fields = GFAPI::get_fields_by_type( $form, 'quiz' );
50 50
 		
51
-		if( ! empty( $quiz_fields ) ) {
51
+		if ( ! empty( $quiz_fields ) ) {
52 52
 			
53
-			$fields['gquiz_score']   = array(
53
+			$fields[ 'gquiz_score' ] = array(
54 54
 				'label' => __( 'Quiz Score Total', 'gravityview' ),
55 55
 				'type'  => 'quiz_score',
56 56
 				'desc'  => __( 'Displays the number of correct Quiz answers the user submitted.', 'gravityview' ),
57 57
 			);
58
-			$fields['gquiz_percent'] = array(
58
+			$fields[ 'gquiz_percent' ] = array(
59 59
 				'label' => __( 'Quiz Percentage Grade', 'gravityview' ),
60 60
 				'type'  => 'quiz_percent',
61 61
 				'desc'  => __( 'Displays the percentage of correct Quiz answers the user submitted.', 'gravityview' ),
62 62
 			);
63
-			$fields['gquiz_grade']   = array(
63
+			$fields[ 'gquiz_grade' ] = array(
64 64
 				/* translators: This is a field type used by the Gravity Forms Quiz Addon. "A" is 100-90, "B" is 89-80, "C" is 79-70, etc.  */
65 65
 				'label' => __( 'Quiz Letter Grade', 'gravityview' ),
66 66
 				'type'  => 'quiz_grade',
67 67
 				'desc'  => __( 'Displays the Grade the user achieved based on Letter Grading configured in the Quiz Settings.', 'gravityview' ),
68 68
 			);
69
-			$fields['gquiz_is_pass'] = array(
69
+			$fields[ 'gquiz_is_pass' ] = array(
70 70
 				'label' => __( 'Quiz Pass/Fail', 'gravityview' ),
71 71
 				'type'  => 'quiz_is_pass',
72 72
 				'desc'  => __( 'Displays either Passed or Failed based on the Pass/Fail settings configured in the Quiz Settings.', 'gravityview' ),
Please login to merge, or discard this patch.
includes/presets/default-edit/class-gravityview-default-template-edit.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 			'slug' => 'edit',
25 25
 			'type' => 'internal',
26 26
 			'label' =>  __( 'Edit Table', 'gravityview' ),
27
-			'description' => __('Display items in a table view.', 'gravityview'),
28
-			'logo' => plugins_url('includes/presets/default-table/logo-default-table.png', GRAVITYVIEW_FILE),
27
+			'description' => __( 'Display items in a table view.', 'gravityview' ),
28
+			'logo' => plugins_url( 'includes/presets/default-table/logo-default-table.png', GRAVITYVIEW_FILE ),
29 29
 			'css_source' => gravityview_css_url( 'table-view.css', GRAVITYVIEW_DIR . 'templates/css/' ),
30 30
 		);
31 31
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 				'1-1' => array(
43 43
 					array(
44 44
 						'areaid' => 'edit-fields',
45
-						'title' => __('Visible Edit Fields', 'gravityview' )
45
+						'title' => __( 'Visible Edit Fields', 'gravityview' )
46 46
 					)
47 47
 				)
48 48
 			)
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-list.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 		// Add the list columns
63 63
 		foreach ( $list_fields as $list_field ) {
64 64
 
65
-			if( empty( $list_field->enableColumns ) ) {
65
+			if ( empty( $list_field->enableColumns ) ) {
66 66
 				continue;
67 67
 			}
68 68
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 			}
84 84
 
85 85
 			// If there are columns, add them under the parent field
86
-			if( ! empty( $list_columns ) ) {
86
+			if ( ! empty( $list_columns ) ) {
87 87
 
88 88
 				$index = array_search( $list_field->id, array_keys( $fields ) ) + 1;
89 89
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 				 * Merge the $list_columns into the $fields array at $index
92 92
 				 * @see https://stackoverflow.com/a/1783125
93 93
 				 */
94
-				$fields = array_slice( $fields, 0, $index, true) + $list_columns + array_slice( $fields, $index, null, true);
94
+				$fields = array_slice( $fields, 0, $index, true ) + $list_columns + array_slice( $fields, $index, null, true );
95 95
 			}
96 96
 
97 97
 			unset( $list_columns, $index, $input_id );
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
 		$list_rows = maybe_unserialize( $field_value );
120 120
 
121
-		if( ! is_array( $list_rows ) ) {
121
+		if ( ! is_array( $list_rows ) ) {
122 122
 			do_action( 'gravityview_log_error', __METHOD__ . ' - $field_value did not unserialize', $field_value );
123 123
 			return null;
124 124
 		}
@@ -131,15 +131,15 @@  discard block
 block discarded – undo
131 131
 			foreach ( $list_row as $column_key => $column_value ) {
132 132
 
133 133
 				// If the label of the column matches $column_id, or the numeric key value matches, add the value
134
-				if( (string)$column_key === (string)$column_id || ( is_numeric( $column_id ) && (int)$column_id === $current_column ) ) {
135
-					$column_values[] = $column_value;
134
+				if ( (string)$column_key === (string)$column_id || ( is_numeric( $column_id ) && (int)$column_id === $current_column ) ) {
135
+					$column_values[ ] = $column_value;
136 136
 				}
137 137
 				$current_column++;
138 138
 			}
139 139
 		}
140 140
 
141 141
 		// Return the array of values
142
-		if( 'raw' === $format ) {
142
+		if ( 'raw' === $format ) {
143 143
 			return $column_values;
144 144
 		}
145 145
 		// Return the Gravity Forms Field output
@@ -162,22 +162,22 @@  discard block
 block discarded – undo
162 162
 	 */
163 163
 	public function _filter_field_label( $label, $field, $form, $entry ) {
164 164
 
165
-		$field_object = RGFormsModel::get_field( $form, $field['id'] );
165
+		$field_object = RGFormsModel::get_field( $form, $field[ 'id' ] );
166 166
 
167 167
 		// Not a list field
168
-		if( ! $field_object || 'list' !== $field_object->type ) {
168
+		if ( ! $field_object || 'list' !== $field_object->type ) {
169 169
 			return $label;
170 170
 		}
171 171
 
172 172
 		// Custom label is defined, so use it
173
-		if( ! empty( $field['custom_label'] ) ) {
173
+		if ( ! empty( $field[ 'custom_label' ] ) ) {
174 174
 			return $label;
175 175
 		}
176 176
 
177
-		$column_id = gravityview_get_input_id_from_id( $field['id'] );
177
+		$column_id = gravityview_get_input_id_from_id( $field[ 'id' ] );
178 178
 
179 179
 		// Parent field, not column field
180
-		if( false === $column_id ) {
180
+		if ( false === $column_id ) {
181 181
 			return $label;
182 182
 		}
183 183
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 	public static function get_column_label( GF_Field_List $field, $column_id, $backup_label = '' ) {
199 199
 
200 200
 		// Doesn't have columns enabled
201
-		if( ! isset( $field->choices ) || ! $field->enableColumns ) {
201
+		if ( ! isset( $field->choices ) || ! $field->enableColumns ) {
202 202
 			return $backup_label;
203 203
 		}
204 204
 
Please login to merge, or discard this patch.
includes/class-gravityview-gfformsmodel.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,18 +25,18 @@  discard block
 block discarded – undo
25 25
 
26 26
         $post_data = self::get_post_fields( $form, $entry );
27 27
 
28
-        $media = get_attached_media( 'image', $entry['post_id'] );
28
+        $media = get_attached_media( 'image', $entry[ 'post_id' ] );
29 29
 
30 30
         $post_images = array();
31 31
 
32 32
         foreach ( $media as $media_item ) {
33
-            foreach( (array) $post_data['images'] as $post_data_item ) {
34
-                if(
33
+            foreach ( (array)$post_data[ 'images' ] as $post_data_item ) {
34
+                if (
35 35
                     rgar( $post_data_item, 'title' ) === $media_item->post_title &&
36 36
                     rgar( $post_data_item, 'description' ) === $media_item->post_content &&
37 37
                     rgar( $post_data_item, 'caption' ) === $media_item->post_excerpt
38 38
                 ) {
39
-                    $post_images["{$post_data_item['field_id']}"] = $media_item->ID;
39
+                    $post_images[ "{$post_data_item[ 'field_id' ]}" ] = $media_item->ID;
40 40
                 }
41 41
             }
42 42
         }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
          * If the method changes to public, use Gravity Forms' method
65 65
          * @todo: If/when the method is public, remove the unneeded copied code.
66 66
          */
67
-        if( $reflection->isPublic() ) {
67
+        if ( $reflection->isPublic() ) {
68 68
             return parent::get_post_fields( $form, $entry );
69 69
         }
70 70
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
          * If the method changes to public, use Gravity Forms' method
92 92
          * @todo: If/when the method is public, remove the unneeded copied code.
93 93
          */
94
-        if( $reflection->isPublic() ) {
94
+        if ( $reflection->isPublic() ) {
95 95
             return parent::copy_post_image( $url, $post_id );
96 96
         }
97 97
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
          * If the method changes to public, use Gravity Forms' method
127 127
          * @todo: If/when the method is public, remove the unneeded copied code.
128 128
          */
129
-        if( $reflection->isPublic() ) {
129
+        if ( $reflection->isPublic() ) {
130 130
             return parent::media_handle_upload( $url, $post_id, $post_data );
131 131
         }
132 132
 
Please login to merge, or discard this patch.