Completed
Push — develop ( 8e4334...1567ab )
by Zack
19:18
created
class-gravityview-plugin-hooks-gravityformspartialentries.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
 		$partial_entries_addon = GF_Partial_Entries::get_instance();
55 55
 
56
-		$feed_settings = $partial_entries_addon->get_feed_settings( $form['id'] );
56
+		$feed_settings = $partial_entries_addon->get_feed_settings( $form[ 'id' ] );
57 57
 
58 58
 		$is_enabled = \GV\Utils::get( $feed_settings, 'enable', 0 );
59 59
 
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
 		}
71 71
 
72 72
 		// Set the expected $_POST key for the Add-On to use
73
-		$_POST['partial_entry_id'] = $partial_entry_id;
73
+		$_POST[ 'partial_entry_id' ] = $partial_entry_id;
74 74
 
75 75
 		gravityview()->log->debug( 'Saving partial entry (ID #{partial_entry_id}) for Entry #{entry_id}', array(
76 76
 			'partial_entry_id' => $partial_entry_id,
77 77
 			'entry_id'         => $entry_id
78 78
 		) );
79 79
 
80
-		$partial_entries_addon->maybe_save_partial_entry( $form['id'] );
80
+		$partial_entries_addon->maybe_save_partial_entry( $form[ 'id' ] );
81 81
 	}
82 82
 }
83 83
 
Please login to merge, or discard this patch.
includes/admin/class.render.settings.php 3 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -308,7 +308,7 @@
 block discarded – undo
308 308
 			{{field_settings}}
309 309
 			{{hidden_fields}}
310 310
 		</div>
311
-EOD;
311
+eod;
312 312
 
313 313
 		$output = $template;
314 314
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -284,7 +284,7 @@
 block discarded – undo
284 284
 					<div class="gv-field-detail gv-field-detail--field">
285 285
 						<span class="gv-field-detail--label">' . esc_html__( 'Field ID', 'gravityview' ) .'</span><span class="gv-field-detail--value">#{{field_id}}</span>
286 286
 					</div>';
287
-			    }
287
+				}
288 288
 
289 289
 				$item_details .= '
290 290
 					<div class="gv-field-detail gv-field-detail--type">
Please login to merge, or discard this patch.
Spacing   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 		$is_table_layout = preg_match( '/table/ism', $template_id );
32 32
 
33
-		if( 'field' === $field_type ) {
33
+		if ( 'field' === $field_type ) {
34 34
 
35 35
 			// Default options - fields
36 36
 			$field_options = array(
@@ -77,11 +77,11 @@  discard block
 block discarded – undo
77 77
 			);
78 78
 
79 79
 			// Match Table as well as DataTables
80
-			if( $is_table_layout && 'directory' === $context ) {
81
-				$field_options['width'] = array(
80
+			if ( $is_table_layout && 'directory' === $context ) {
81
+				$field_options[ 'width' ] = array(
82 82
 					'type' => 'number',
83
-					'label' => __('Percent Width', 'gravityview'),
84
-					'desc' => __( 'Leave blank for column width to be based on the field content.', 'gravityview'),
83
+					'label' => __( 'Percent Width', 'gravityview' ),
84
+					'desc' => __( 'Leave blank for column width to be based on the field content.', 'gravityview' ),
85 85
 					'class' => 'code widefat',
86 86
 					'value' => '',
87 87
 					'priority' => 200,
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
 		// Remove suffix ":" from the labels to standardize style. Using trim() instead of rtrim() for i18n.
94 94
 		foreach ( $field_options as $key => $field_option ) {
95
-			$field_options[ $key ]['label'] = trim( $field_options[ $key ]['label'], ':' );
95
+			$field_options[ $key ][ 'label' ] = trim( $field_options[ $key ][ 'label' ], ':' );
96 96
 		}
97 97
 
98 98
 		/**
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 			return 0;
143 143
 		}
144 144
 
145
-		return ( $a_priority < $b_priority ) ? - 1 : 1;
145
+		return ( $a_priority < $b_priority ) ? -1 : 1;
146 146
 	}
147 147
 
148 148
 	/**
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
 			'manage_options' => __( 'Administrator', 'gravityview' ),
168 168
 		);
169 169
 
170
-		if( is_multisite() ) {
171
-			$select_cap_choices['manage_network'] = __('Multisite Super Admin', 'gravityview' );
170
+		if ( is_multisite() ) {
171
+			$select_cap_choices[ 'manage_network' ] = __( 'Multisite Super Admin', 'gravityview' );
172 172
 		}
173 173
 
174 174
 		/**
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 		 * @param  string $context     Optional. What context are we in? Example: `single` or `directory`
182 182
 		 * @param  string $input_type  Optional. (textarea, list, select, etc.)
183 183
 		 */
184
-		$select_cap_choices = apply_filters('gravityview_field_visibility_caps', $select_cap_choices, $template_id, $field_id, $context, $input_type );
184
+		$select_cap_choices = apply_filters( 'gravityview_field_visibility_caps', $select_cap_choices, $template_id, $field_id, $context, $input_type );
185 185
 
186 186
 		return $select_cap_choices;
187 187
 	}
@@ -208,104 +208,104 @@  discard block
 block discarded – undo
208 208
 	 */
209 209
 	public static function render_field_options( $form_id, $field_type, $template_id, $field_id, $field_label, $area, $input_type = NULL, $uniqid = '', $current = '', $context = 'single', $item = array() ) {
210 210
 
211
-		if( empty( $uniqid ) ) {
211
+		if ( empty( $uniqid ) ) {
212 212
 			//generate a unique field id
213
-			$uniqid = uniqid('', false);
213
+			$uniqid = uniqid( '', false );
214 214
 		}
215 215
 
216 216
 		// get field/widget options
217 217
 		$options = self::get_default_field_options( $field_type, $template_id, $field_id, $context, $input_type, $form_id );
218 218
 
219 219
 		// two different post arrays, depending of the field type
220
-		$name_prefix = $field_type .'s' .'['. $area .']['. $uniqid .']';
220
+		$name_prefix = $field_type . 's' . '[' . $area . '][' . $uniqid . ']';
221 221
 
222 222
 		// build output
223
-		$hidden_fields  = '<input type="hidden" class="field-key" name="'. $name_prefix .'[id]" value="'. esc_attr( $field_id ) .'">';
224
-		$hidden_fields .= '<input type="hidden" class="field-label" name="'. $name_prefix .'[label]" value="'. esc_attr( $field_label ) .'">';
223
+		$hidden_fields  = '<input type="hidden" class="field-key" name="' . $name_prefix . '[id]" value="' . esc_attr( $field_id ) . '">';
224
+		$hidden_fields .= '<input type="hidden" class="field-label" name="' . $name_prefix . '[label]" value="' . esc_attr( $field_label ) . '">';
225 225
 
226 226
 		$form_title = '';
227 227
 		if ( $form_id ) {
228
-			$hidden_fields .= '<input type="hidden" class="field-form-id" name="'. $name_prefix .'[form_id]" value="'. esc_attr( $form_id ) .'">';
228
+			$hidden_fields .= '<input type="hidden" class="field-form-id" name="' . $name_prefix . '[form_id]" value="' . esc_attr( $form_id ) . '">';
229 229
 			$form = GVCommon::get_form( $form_id );
230
-			$form_title = $form['title'];
230
+			$form_title = $form[ 'title' ];
231 231
 		}
232 232
 
233 233
 		// If there are no options, return what we got.
234
-		if(empty($options)) {
234
+		if ( empty( $options ) ) {
235 235
 			return $hidden_fields . '<!-- No Options -->'; // The HTML comment is here for checking if the output is empty in render_label()
236 236
 		}
237 237
 
238
-		$settings_title = esc_attr( sprintf( __( '%s Settings', 'gravityview' ) , strip_tags( html_entity_decode( $field_label ) ) ) );
238
+		$settings_title = esc_attr( sprintf( __( '%s Settings', 'gravityview' ), strip_tags( html_entity_decode( $field_label ) ) ) );
239 239
 
240 240
 		$field_details = '';
241 241
 
242 242
 		// Get the pretty name for the input type
243 243
 		$gv_field = GravityView_Fields::get( $input_type );
244 244
 
245
-		if( $gv_field ) {
245
+		if ( $gv_field ) {
246 246
 			$input_type_label = $gv_field->label;
247 247
 		} else {
248 248
 			$input_type_label = $input_type;
249 249
 		}
250 250
 
251 251
 		$field_settings = '';
252
-		foreach( $options as $key => $option ) {
252
+		foreach ( $options as $key => $option ) {
253 253
 
254 254
 			$value = isset( $current[ $key ] ) ? $current[ $key ] : NULL;
255 255
 
256
-			$field_output = self::render_field_option( $name_prefix . '['. $key .']' , $option, $value);
256
+			$field_output = self::render_field_option( $name_prefix . '[' . $key . ']', $option, $value );
257 257
 
258 258
 			// The setting is empty
259
-			if( empty( $field_output ) ) {
259
+			if ( empty( $field_output ) ) {
260 260
 				continue;
261 261
 			}
262 262
 
263 263
 			$show_if = '';
264
-			if( ! empty( $option['requires'] ) ) {
265
-				$show_if .= sprintf( ' data-requires="%s"', $option['requires'] );
264
+			if ( ! empty( $option[ 'requires' ] ) ) {
265
+				$show_if .= sprintf( ' data-requires="%s"', $option[ 'requires' ] );
266 266
 			}
267 267
 
268
-			if( ! empty( $option['requires_not'] ) ) {
269
-				$show_if .= sprintf( ' data-requires-not="%s"', $option['requires_not'] );
268
+			if ( ! empty( $option[ 'requires_not' ] ) ) {
269
+				$show_if .= sprintf( ' data-requires-not="%s"', $option[ 'requires_not' ] );
270 270
 			}
271 271
 
272
-			switch( $option['type'] ) {
272
+			switch ( $option[ 'type' ] ) {
273 273
 				// Hide hidden fields
274 274
 				case 'hidden':
275
-					$field_settings .= '<div class="gv-setting-container gv-setting-container-'. esc_attr( $key ) . ' screen-reader-text">'. $field_output . '</div>';
275
+					$field_settings .= '<div class="gv-setting-container gv-setting-container-' . esc_attr( $key ) . ' screen-reader-text">' . $field_output . '</div>';
276 276
 					break;
277 277
 				default:
278
-					$field_settings .= '<div class="gv-setting-container gv-setting-container-'. esc_attr( $key ) . '" ' . $show_if . '>'. $field_output .'</div>';
278
+					$field_settings .= '<div class="gv-setting-container gv-setting-container-' . esc_attr( $key ) . '" ' . $show_if . '>' . $field_output . '</div>';
279 279
 			}
280 280
 		}
281 281
 
282 282
 		$item_details = '';
283 283
 		$subtitle = '';
284 284
 
285
-		if( 'field' === $field_type ) {
286
-			$subtitle = ! empty( $item['subtitle'] ) ? '<div class="subtitle">' . $item['subtitle'] . '</div>' : '';
285
+		if ( 'field' === $field_type ) {
286
+			$subtitle = ! empty( $item[ 'subtitle' ] ) ? '<div class="subtitle">' . $item[ 'subtitle' ] . '</div>' : '';
287 287
 
288 288
 			$item_details .= '
289 289
 			<div class="gv-field-details--container">
290
-				<label class="gv-field-details--toggle">' . esc_html__( 'Field Details', 'gravityview' ) .' <i class="dashicons dashicons-arrow-down"></i></label>
290
+				<label class="gv-field-details--toggle">' . esc_html__( 'Field Details', 'gravityview' ) . ' <i class="dashicons dashicons-arrow-down"></i></label>
291 291
 				<section class="gv-field-details gv-field-details--closed">';
292 292
 
293 293
 				if ( $field_id && is_numeric( $field_id ) ) {
294 294
 				$item_details .= '
295 295
 					<div class="gv-field-detail gv-field-detail--field">
296
-						<span class="gv-field-detail--label">' . esc_html__( 'Field ID', 'gravityview' ) .'</span><span class="gv-field-detail--value">#{{field_id}}</span>
296
+						<span class="gv-field-detail--label">' . esc_html__( 'Field ID', 'gravityview' ) . '</span><span class="gv-field-detail--value">#{{field_id}}</span>
297 297
 					</div>';
298 298
 			    }
299 299
 
300 300
 				$item_details .= '
301 301
 					<div class="gv-field-detail gv-field-detail--type">
302
-						<span class="gv-field-detail--label">' . esc_html_x( 'Type', 'The type of field being configured (eg: "Single Line Text")', 'gravityview' ) .'</span><span class="gv-field-detail--value">{{input_type_label}}</span>
302
+						<span class="gv-field-detail--label">' . esc_html_x( 'Type', 'The type of field being configured (eg: "Single Line Text")', 'gravityview' ) . '</span><span class="gv-field-detail--value">{{input_type_label}}</span>
303 303
 					</div>';
304 304
 
305
-				if( $form_id ) {
305
+				if ( $form_id ) {
306 306
 					$item_details .= '
307 307
 					<div class="gv-field-detail gv-field-detail--form">
308
-						<span class="gv-field-detail--label">' . esc_html__( 'Form', 'gravityview' ) .'</span><span class="gv-field-detail--value">{{form_title}} (#{{form_id}})</span>
308
+						<span class="gv-field-detail--label">' . esc_html__( 'Form', 'gravityview' ) . '</span><span class="gv-field-detail--value">{{form_title}} (#{{form_id}})</span>
309 309
 					</div>';
310 310
 				}
311 311
 				$item_details .= '
@@ -313,8 +313,8 @@  discard block
 block discarded – undo
313 313
 			</div>';
314 314
 		} else {
315 315
 			$widget_details_content = rgar( $item, 'description', '' );
316
-			if ( ! empty( $item['subtitle'] ) ) {
317
-				$widget_details_content .= ( '' !== $widget_details_content ) ? "\n\n" . $item['subtitle'] : $item['subtitle'];
316
+			if ( ! empty( $item[ 'subtitle' ] ) ) {
317
+				$widget_details_content .= ( '' !== $widget_details_content ) ? "\n\n" . $item[ 'subtitle' ] : $item[ 'subtitle' ];
318 318
 			}
319 319
 
320 320
 			// Intentionally not escaping to allow HTML.
@@ -370,17 +370,17 @@  discard block
 block discarded – undo
370 370
 		 * @deprecated setting index 'default' was replaced by 'value'
371 371
 		 * @see GravityView_FieldType::get_field_defaults
372 372
 		 */
373
-		if( !empty( $option['default'] ) && empty( $option['value'] ) ) {
374
-			$option['value'] = $option['default'];
375
-			_deprecated_function( 'GravityView_FieldType::get_field_defaults', '1.1.7', '[value] instead of [default] when defining the setting '. $name .' details' );
373
+		if ( ! empty( $option[ 'default' ] ) && empty( $option[ 'value' ] ) ) {
374
+			$option[ 'value' ] = $option[ 'default' ];
375
+			_deprecated_function( 'GravityView_FieldType::get_field_defaults', '1.1.7', '[value] instead of [default] when defining the setting ' . $name . ' details' );
376 376
 		}
377 377
 
378 378
 		// prepare to render option field type
379
-		if( isset( $option['type'] ) ) {
379
+		if ( isset( $option[ 'type' ] ) ) {
380 380
 
381 381
 			$type_class = self::load_type_class( $option );
382 382
 
383
-			if( class_exists( $type_class ) ) {
383
+			if ( class_exists( $type_class ) ) {
384 384
 
385 385
 				/** @type GravityView_FieldType $render_type */
386 386
 				$render_type = new $type_class( $name, $option, $curr_value );
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 				 * @param[in,out] string $output field class name
398 398
 				 * @param[in] array $option  option field data
399 399
 				 */
400
-				$output = apply_filters( "gravityview/option/output/{$option['type']}" , $output, $option );
400
+				$output = apply_filters( "gravityview/option/output/{$option[ 'type' ]}", $output, $option );
401 401
 			}
402 402
 
403 403
 		} // isset option[type]
@@ -432,27 +432,27 @@  discard block
 block discarded – undo
432 432
 		 * @deprecated setting index 'name' was replaced by 'label'
433 433
 		 * @see GravityView_FieldType::get_field_defaults
434 434
 		 */
435
-		if( isset( $setting['name'] ) && empty( $setting['label'] ) ) {
436
-			$setting['label'] = $setting['name'];
437
-			_deprecated_function( 'GravityView_FieldType::get_field_defaults', '1.1.7', '[label] instead of [name] when defining the setting '. $key .' details' );
435
+		if ( isset( $setting[ 'name' ] ) && empty( $setting[ 'label' ] ) ) {
436
+			$setting[ 'label' ] = $setting[ 'name' ];
437
+			_deprecated_function( 'GravityView_FieldType::get_field_defaults', '1.1.7', '[label] instead of [name] when defining the setting ' . $key . ' details' );
438 438
 		}
439 439
 
440 440
 		$name = esc_attr( sprintf( $name, $key ) );
441
-		$setting['id'] = esc_attr( sprintf( $id, $key ) );
442
-		$setting['tooltip'] = 'gv_' . $key;
441
+		$setting[ 'id' ] = esc_attr( sprintf( $id, $key ) );
442
+		$setting[ 'tooltip' ] = 'gv_' . $key;
443 443
 
444 444
 		// Use default if current setting isn't set.
445
-		$curr_value = isset( $current_settings[ $key ] ) ? $current_settings[ $key ] : $setting['value'];
445
+		$curr_value = isset( $current_settings[ $key ] ) ? $current_settings[ $key ] : $setting[ 'value' ];
446 446
 
447 447
 		// default setting type = text
448
-		$setting['type'] = empty( $setting['type'] ) ? 'text' : $setting['type'];
448
+		$setting[ 'type' ] = empty( $setting[ 'type' ] ) ? 'text' : $setting[ 'type' ];
449 449
 
450 450
 		// merge tags
451
-		if( !isset( $setting['merge_tags'] ) ) {
452
-			if( $setting['type'] === 'text' ) {
453
-				$setting['merge_tags'] = true;
451
+		if ( ! isset( $setting[ 'merge_tags' ] ) ) {
452
+			if ( $setting[ 'type' ] === 'text' ) {
453
+				$setting[ 'merge_tags' ] = true;
454 454
 			} else {
455
-				$setting['merge_tags'] = false;
455
+				$setting[ 'merge_tags' ] = false;
456 456
 			}
457 457
 		}
458 458
 
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 
461 461
 		// render the setting
462 462
 		$type_class = self::load_type_class( $setting );
463
-		if( class_exists( $type_class ) ) {
463
+		if ( class_exists( $type_class ) ) {
464 464
 			/** @type GravityView_FieldType $render_type */
465 465
 			$render_type = new $type_class( $name, $setting, $curr_value );
466 466
 			ob_start();
@@ -469,25 +469,25 @@  discard block
 block discarded – undo
469 469
 		}
470 470
 
471 471
 		// Check if setting is specific for a template
472
-		if( !empty( $setting['show_in_template'] ) ) {
473
-			if( !is_array( $setting['show_in_template'] ) ) {
474
-				$setting['show_in_template'] = array( $setting['show_in_template'] );
472
+		if ( ! empty( $setting[ 'show_in_template' ] ) ) {
473
+			if ( ! is_array( $setting[ 'show_in_template' ] ) ) {
474
+				$setting[ 'show_in_template' ] = array( $setting[ 'show_in_template' ] );
475 475
 			}
476
-			$show_if = ' data-show-if="'. implode( ' ', $setting['show_in_template'] ).'"';
476
+			$show_if = ' data-show-if="' . implode( ' ', $setting[ 'show_in_template' ] ) . '"';
477 477
 		} else {
478 478
 			$show_if = '';
479 479
 		}
480 480
 
481
-		if( ! empty( $setting['requires'] ) ) {
482
-			$show_if .= sprintf( ' data-requires="%s"', $setting['requires'] );
481
+		if ( ! empty( $setting[ 'requires' ] ) ) {
482
+			$show_if .= sprintf( ' data-requires="%s"', $setting[ 'requires' ] );
483 483
 		}
484 484
 
485
-		if( ! empty( $setting['requires_not'] ) ) {
486
-			$show_if .= sprintf( ' data-requires-not="%s"', $setting['requires_not'] );
485
+		if ( ! empty( $setting[ 'requires_not' ] ) ) {
486
+			$show_if .= sprintf( ' data-requires-not="%s"', $setting[ 'requires_not' ] );
487 487
 		}
488 488
 
489 489
 		// output
490
-		echo '<tr style="vertical-align: top;" '. $show_if .'>' . $output . '</tr>';
490
+		echo '<tr style="vertical-align: top;" ' . $show_if . '>' . $output . '</tr>';
491 491
 
492 492
 	}
493 493
 
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 	 */
500 500
 	public static function load_type_class( $field = NULL ) {
501 501
 
502
-		if( empty( $field['type'] ) ) {
502
+		if ( empty( $field[ 'type' ] ) ) {
503 503
 			return NULL;
504 504
 		}
505 505
 
@@ -508,9 +508,9 @@  discard block
 block discarded – undo
508 508
 		 * @param string $class_suffix  field class suffix; `GravityView_FieldType_{$class_suffix}`
509 509
 		 * @param array $field   field data
510 510
 		 */
511
-		$type_class = apply_filters( "gravityview/setting/class/{$field['type']}", 'GravityView_FieldType_' . $field['type'], $field );
511
+		$type_class = apply_filters( "gravityview/setting/class/{$field[ 'type' ]}", 'GravityView_FieldType_' . $field[ 'type' ], $field );
512 512
 
513
-		if( class_exists( $type_class ) ) {
513
+		if ( class_exists( $type_class ) ) {
514 514
 			return $type_class;
515 515
 		}
516 516
 
@@ -519,9 +519,9 @@  discard block
 block discarded – undo
519 519
 		 * @param string  $field_type_include_path field class file path
520 520
 		 * @param array $field  field data
521 521
 		 */
522
-		$class_file = apply_filters( "gravityview/setting/class_file/{$field['type']}", GRAVITYVIEW_DIR . "includes/admin/field-types/type_{$field['type']}.php", $field );
522
+		$class_file = apply_filters( "gravityview/setting/class_file/{$field[ 'type' ]}", GRAVITYVIEW_DIR . "includes/admin/field-types/type_{$field[ 'type' ]}.php", $field );
523 523
 
524
-		if( $class_file && file_exists( $class_file ) ) {
524
+		if ( $class_file && file_exists( $class_file ) ) {
525 525
 			require_once( $class_file );
526 526
 		}
527 527
 
@@ -543,8 +543,8 @@  discard block
 block discarded – undo
543 543
 
544 544
 		_deprecated_function( __METHOD__, '1.2', 'GravityView_FieldType_checkbox::render_input' );
545 545
 
546
-		$output  = '<input name="'. esc_attr( $name ) .'" type="hidden" value="0">';
547
-		$output .= '<input name="'. esc_attr( $name ) .'" id="'. esc_attr( $id ) .'" type="checkbox" value="1" '. checked( $current, '1', false ) .' >';
546
+		$output  = '<input name="' . esc_attr( $name ) . '" type="hidden" value="0">';
547
+		$output .= '<input name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" type="checkbox" value="1" ' . checked( $current, '1', false ) . ' >';
548 548
 
549 549
 		return $output;
550 550
 	}
@@ -564,22 +564,22 @@  discard block
 block discarded – undo
564 564
 		_deprecated_function( __METHOD__, '1.2', 'GravityView_FieldType_text::render_input' );
565 565
 
566 566
 		// Show the merge tags if the field is a list view
567
-		$is_list = ( preg_match( '/_list-/ism', $name ));
567
+		$is_list = ( preg_match( '/_list-/ism', $name ) );
568 568
 
569 569
 		// Or is a single entry view
570
-		$is_single = ( preg_match( '/single_/ism', $name ));
570
+		$is_single = ( preg_match( '/single_/ism', $name ) );
571 571
 		$show = ( $is_single || $is_list );
572 572
 
573 573
 		$class = '';
574 574
 		// and $add_merge_tags is not false
575
-		if( $show && $add_merge_tags !== false || $add_merge_tags === 'force' ) {
575
+		if ( $show && $add_merge_tags !== false || $add_merge_tags === 'force' ) {
576 576
 			$class = 'merge-tag-support mt-position-right mt-hide_all_fields ';
577 577
 		}
578 578
 
579
-		$class .= !empty( $args['class'] ) ? $args['class'] : 'widefat';
580
-		$type = !empty( $args['type'] ) ? $args['type'] : 'text';
579
+		$class .= ! empty( $args[ 'class' ] ) ? $args[ 'class' ] : 'widefat';
580
+		$type = ! empty( $args[ 'type' ] ) ? $args[ 'type' ] : 'text';
581 581
 
582
-		return '<input name="'. esc_attr( $name ) .'" id="'. esc_attr( $id ) .'" type="'.esc_attr($type).'" value="'. esc_attr( $current ) .'" class="'.esc_attr( $class ).'">';
582
+		return '<input name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" type="' . esc_attr( $type ) . '" value="' . esc_attr( $current ) . '" class="' . esc_attr( $class ) . '">';
583 583
 	}
584 584
 
585 585
 	/**
@@ -596,21 +596,21 @@  discard block
 block discarded – undo
596 596
 		_deprecated_function( __METHOD__, '1.2', 'GravityView_FieldType_textarea::render_input' );
597 597
 
598 598
 		// Show the merge tags if the field is a list view
599
-		$is_list = ( preg_match( '/_list-/ism', $name ));
599
+		$is_list = ( preg_match( '/_list-/ism', $name ) );
600 600
 
601 601
 		// Or is a single entry view
602
-		$is_single = ( preg_match( '/single_/ism', $name ));
602
+		$is_single = ( preg_match( '/single_/ism', $name ) );
603 603
 		$show = ( $is_single || $is_list );
604 604
 
605 605
 		$class = '';
606 606
 		// and $add_merge_tags is not false
607
-		if( $show && $add_merge_tags !== false || $add_merge_tags === 'force' ) {
607
+		if ( $show && $add_merge_tags !== false || $add_merge_tags === 'force' ) {
608 608
 			$class = 'merge-tag-support mt-position-right mt-hide_all_fields ';
609 609
 		}
610 610
 
611
-		$class .= !empty( $args['class'] ) ? 'widefat '.$args['class'] : 'widefat';
611
+		$class .= ! empty( $args[ 'class' ] ) ? 'widefat ' . $args[ 'class' ] : 'widefat';
612 612
 
613
-		return '<textarea name="'. esc_attr( $name ) .'" id="'. esc_attr( $id ) .'" class="'.esc_attr( $class ).'">'. esc_textarea( $current ) .'</textarea>';
613
+		return '<textarea name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" class="' . esc_attr( $class ) . '">' . esc_textarea( $current ) . '</textarea>';
614 614
 	}
615 615
 
616 616
 	/**
@@ -626,9 +626,9 @@  discard block
 block discarded – undo
626 626
 
627 627
 		_deprecated_function( __METHOD__, '1.2', 'GravityView_FieldType_select::render_input' );
628 628
 
629
-		$output = '<select name="'. $name .'" id="'. $id .'">';
630
-		foreach( $choices as $value => $label ) {
631
-			$output .= '<option value="'. esc_attr( $value ) .'" '. selected( $value, $current, false ) .'>'. esc_html( $label ) .'</option>';
629
+		$output = '<select name="' . $name . '" id="' . $id . '">';
630
+		foreach ( $choices as $value => $label ) {
631
+			$output .= '<option value="' . esc_attr( $value ) . '" ' . selected( $value, $current, false ) . '>' . esc_html( $label ) . '</option>';
632 632
 		}
633 633
 		$output .= '</select>';
634 634
 
Please login to merge, or discard this patch.
includes/fields/class-gravityview-fields.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 	 * @return GravityView_Field | bool
43 43
 	 */
44 44
 	public static function create( $properties ) {
45
-		$type = isset( $properties['type'] ) ? $properties['type'] : '';
46
-		$type = empty( $properties['inputType'] ) ? $type : $properties['inputType'];
45
+		$type = isset( $properties[ 'type' ] ) ? $properties[ 'type' ] : '';
46
+		$type = empty( $properties[ 'inputType' ] ) ? $type : $properties[ 'inputType' ];
47 47
 		if ( empty( $type ) || ! isset( self::$_fields[ $type ] ) ) {
48 48
 			return new GravityView_Field( $properties );
49 49
 		}
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	 * @return bool True: yes, it exists; False: nope
63 63
 	 */
64 64
 	public static function exists( $field_name ) {
65
-		return isset( self::$_fields["{$field_name}"] );
65
+		return isset( self::$_fields[ "{$field_name}" ] );
66 66
 	}
67 67
 
68 68
 	/**
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
 
97 97
 		$field_type = is_a( $gf_field, 'GF_Field' ) ? get_class( $gf_field ) : $gf_field;
98 98
 
99
-		foreach( self::$_fields as $field ) {
100
-			if( $field_type === $field->_gf_field_class_name ) {
99
+		foreach ( self::$_fields as $field ) {
100
+			if ( $field_type === $field->_gf_field_class_name ) {
101 101
 				return $field;
102 102
 			}
103 103
 		}
@@ -116,13 +116,13 @@  discard block
 block discarded – undo
116 116
 	 */
117 117
 	public static function get_all( $groups = '' ) {
118 118
 
119
-		if( '' !== $groups ) {
119
+		if ( '' !== $groups ) {
120 120
 			$return_fields = self::$_fields;
121 121
 
122
-			$groups = (array) $groups;
122
+			$groups = (array)$groups;
123 123
 
124 124
 			foreach ( $return_fields as $key => $field ) {
125
-				if( ! in_array( $field->group, $groups, true ) ) {
125
+				if ( ! in_array( $field->group, $groups, true ) ) {
126 126
 					unset( $return_fields[ $key ] );
127 127
 				}
128 128
 			}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-ip.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
 	public function __construct() {
24 24
 		$this->label = __('User IP', 'gravityview');
25
-	    $this->description = __('The IP Address of the user who created the entry.', 'gravityview');
25
+		$this->description = __('The IP Address of the user who created the entry.', 'gravityview');
26 26
 		parent::__construct();
27 27
 	}
28 28
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
 	var $is_numeric = true;
22 22
 
23 23
 	public function __construct() {
24
-		$this->label = __('User IP', 'gravityview');
25
-	    $this->description = __('The IP Address of the user who created the entry.', 'gravityview');
24
+		$this->label = __( 'User IP', 'gravityview' );
25
+	    $this->description = __( 'The IP Address of the user who created the entry.', 'gravityview' );
26 26
 		parent::__construct();
27 27
 	}
28 28
 }
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-id.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
 	public function __construct() {
24 24
 		$this->label = esc_html__( 'Entry ID', 'gravityview' );
25
-	    $this->description = __('The unique ID of the entry.', 'gravityview');
25
+		$this->description = __('The unique ID of the entry.', 'gravityview');
26 26
 		parent::__construct();
27 27
 	}
28 28
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 
23 23
 	public function __construct() {
24 24
 		$this->label = esc_html__( 'Entry ID', 'gravityview' );
25
-	    $this->description = __('The unique ID of the entry.', 'gravityview');
25
+	    $this->description = __( 'The unique ID of the entry.', 'gravityview' );
26 26
 		parent::__construct();
27 27
 	}
28 28
 }
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-created-by.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 	public function __construct() {
23 23
 		$this->label = esc_html__( 'Created By (User)', 'gravityview' );
24
-		$this->description = __('Details of the logged-in user who created the entry (if any).', 'gravityview');
24
+		$this->description = __( 'Details of the logged-in user who created the entry (if any).', 'gravityview' );
25 25
 		$this->default_search_label = __( 'Submitted by:', 'gravityview' );
26 26
 		parent::__construct();
27 27
 	}
@@ -40,23 +40,23 @@  discard block
 block discarded – undo
40 40
 
41 41
 		$merge_tags = array(
42 42
 			array(
43
-				'label' => __('Entry Creator: Display Name', 'gravityview'),
43
+				'label' => __( 'Entry Creator: Display Name', 'gravityview' ),
44 44
 				'tag' => '{created_by:display_name}'
45 45
 			),
46 46
 			array(
47
-				'label' => __('Entry Creator: Email', 'gravityview'),
47
+				'label' => __( 'Entry Creator: Email', 'gravityview' ),
48 48
 				'tag' => '{created_by:user_email}'
49 49
 			),
50 50
 			array(
51
-				'label' => __('Entry Creator: Username', 'gravityview'),
51
+				'label' => __( 'Entry Creator: Username', 'gravityview' ),
52 52
 				'tag' => '{created_by:user_login}'
53 53
 			),
54 54
 			array(
55
-				'label' => __('Entry Creator: User ID', 'gravityview'),
55
+				'label' => __( 'Entry Creator: User ID', 'gravityview' ),
56 56
 				'tag' => '{created_by:ID}'
57 57
 			),
58 58
 			array(
59
-				'label' => __('Entry Creator: Roles', 'gravityview'),
59
+				'label' => __( 'Entry Creator: Roles', 'gravityview' ),
60 60
 				'tag' => '{created_by:roles}'
61 61
 			),
62 62
 		);
@@ -84,19 +84,19 @@  discard block
 block discarded – undo
84 84
 	public function replace_merge_tag( $matches = array(), $text = '', $form = array(), $entry = array(), $url_encode = false, $esc_html = false ) {
85 85
 
86 86
 		// If there are no matches OR the Entry `created_by` isn't set or is 0 (no user)
87
-		if( empty( $matches ) || empty( $entry['created_by'] ) ) {
87
+		if ( empty( $matches ) || empty( $entry[ 'created_by' ] ) ) {
88 88
 			return $text;
89 89
 		}
90 90
 
91 91
 		// Get the creator of the entry
92
-		$entry_creator = new WP_User( $entry['created_by'] );
92
+		$entry_creator = new WP_User( $entry[ 'created_by' ] );
93 93
 
94 94
 		foreach ( $matches as $match ) {
95 95
 
96
-			$full_tag = $match[0];
97
-			$property = $match[1];
96
+			$full_tag = $match[ 0 ];
97
+			$property = $match[ 1 ];
98 98
 
99
-			switch( $property ) {
99
+			switch ( $property ) {
100 100
 				case '':
101 101
 					$value = $entry_creator->ID;
102 102
 					break;
@@ -122,11 +122,11 @@  discard block
 block discarded – undo
122 122
 
123 123
 	public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) {
124 124
 
125
-		if( 'edit' === $context ) {
125
+		if ( 'edit' === $context ) {
126 126
 			return $field_options;
127 127
 		}
128 128
 
129
-		$field_options['name_display'] = array(
129
+		$field_options[ 'name_display' ] = array(
130 130
 			'type' => 'select',
131 131
 			'label' => __( 'User Format', 'gravityview' ),
132 132
 			'desc' => __( 'How should the User information be displayed?', 'gravityview' ),
Please login to merge, or discard this patch.
includes/admin/field-types/type_textarea.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@  discard block
 block discarded – undo
28 28
 
29 29
 		$show_mt = $this->show_merge_tags();
30 30
 
31
-        if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) {
32
-            $class .= ' merge-tag-support mt-position-right ';
31
+		if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) {
32
+			$class .= ' merge-tag-support mt-position-right ';
33 33
 
34
-            if( empty( $this->field['show_all_fields'] ) ) {
35
-            	$class .= ' mt-hide_all_fields ';
36
-            }
37
-        }
34
+			if( empty( $this->field['show_all_fields'] ) ) {
35
+				$class .= ' mt-hide_all_fields ';
36
+			}
37
+		}
38 38
 
39 39
 		$class .= rgar( $this->field, 'class' );
40 40
 		$placeholder = rgar( $this->field, 'placeholder' );
@@ -55,20 +55,20 @@  discard block
 block discarded – undo
55 55
 
56 56
 	function codemirror( $field_id = '' ) {
57 57
 
58
-        // Enqueue code editor and settings for manipulating HTML.
59
-        $settings = wp_enqueue_code_editor( array( 'type' => 'text/html' ) );
58
+		// Enqueue code editor and settings for manipulating HTML.
59
+		$settings = wp_enqueue_code_editor( array( 'type' => 'text/html' ) );
60 60
 
61
-        // Bail if user disabled CodeMirror.
62
-        if ( false === $settings ) {
63
-            return;
64
-        }
61
+		// Bail if user disabled CodeMirror.
62
+		if ( false === $settings ) {
63
+			return;
64
+		}
65 65
 
66
-        ?>
66
+		?>
67 67
 
68 68
         <script>
69 69
 	        wp.codeEditor.initialize( "<?php echo $field_id;?>", {});
70 70
         </script>
71 71
     <?php
72
-    }
72
+	}
73 73
 
74 74
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 		?>
10 10
 		<label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>"><?php
11 11
 
12
-			echo '<span class="gv-label">'.$this->get_field_label().'</span>';
12
+			echo '<span class="gv-label">' . $this->get_field_label() . '</span>';
13 13
 			echo $this->get_tooltip() . $this->get_field_desc();
14 14
 		?><div>
15 15
 				<?php $this->render_input(); ?>
@@ -19,7 +19,7 @@  discard block
 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
 		}
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
 
29 29
 		$show_mt = $this->show_merge_tags();
30 30
 
31
-        if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) {
31
+        if ( $show_mt && $this->field[ 'merge_tags' ] !== false || $this->field[ 'merge_tags' ] === 'force' ) {
32 32
             $class .= ' merge-tag-support mt-position-right ';
33 33
 
34
-            if( empty( $this->field['show_all_fields'] ) ) {
34
+            if ( empty( $this->field[ 'show_all_fields' ] ) ) {
35 35
             	$class .= ' mt-hide_all_fields ';
36 36
             }
37 37
         }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 #		$this->codemirror( $this->get_field_id() );
50 50
 
51 51
 		?>
52
-		<textarea name="<?php echo esc_attr( $this->name ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>" id="<?php echo $this->get_field_id(); ?>" class="<?php echo gravityview_sanitize_html_class( $class ); ?>" rows="<?php echo absint( $rows ); ?>"><?php echo esc_textarea(  $this->value ); ?></textarea>
52
+		<textarea name="<?php echo esc_attr( $this->name ); ?>" placeholder="<?php echo esc_attr( $placeholder ); ?>" id="<?php echo $this->get_field_id(); ?>" class="<?php echo gravityview_sanitize_html_class( $class ); ?>" rows="<?php echo absint( $rows ); ?>"><?php echo esc_textarea( $this->value ); ?></textarea>
53 53
        	<?php
54 54
 	}
55 55
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         ?>
67 67
 
68 68
         <script>
69
-	        wp.codeEditor.initialize( "<?php echo $field_id;?>", {});
69
+	        wp.codeEditor.initialize( "<?php echo $field_id; ?>", {});
70 70
         </script>
71 71
     <?php
72 72
     }
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-entry-link.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,25 +32,25 @@
 block discarded – undo
32 32
 
33 33
 	public function __construct() {
34 34
 		$this->label = esc_html__( 'Link to Single Entry', 'gravityview' );
35
-		$this->description = esc_html__('A dedicated link to the single entry with customizable text.', 'gravityview');
35
+		$this->description = esc_html__( 'A dedicated link to the single entry with customizable text.', 'gravityview' );
36 36
 		parent::__construct();
37 37
 	}
38 38
 
39 39
 	public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) {
40 40
 
41 41
 		// Always a link!
42
-		unset( $field_options['show_as_link'], $field_options['search_filter'] );
42
+		unset( $field_options[ 'show_as_link' ], $field_options[ 'search_filter' ] );
43 43
 
44
-		if( 'edit' === $context ) {
44
+		if ( 'edit' === $context ) {
45 45
 			return $field_options;
46 46
 		}
47 47
 
48 48
 		$add_options = array();
49
-		$add_options['entry_link_text'] = array(
49
+		$add_options[ 'entry_link_text' ] = array(
50 50
 			'type' => 'text',
51 51
 			'label' => __( 'Link Text:', 'gravityview' ),
52 52
 			'desc' => NULL,
53
-			'value' => __('View Details', 'gravityview'),
53
+			'value' => __( 'View Details', 'gravityview' ),
54 54
 			'merge_tags' => true,
55 55
 		);
56 56
 
Please login to merge, or discard this patch.
includes/class-gravityview-change-entry-creator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -354,7 +354,7 @@
 block discarded – undo
354 354
 	 *
355 355
 	 * @param array $assets
356 356
 	 *
357
-	 * @return array
357
+	 * @return string[]
358 358
 	 */
359 359
 	function register_gform_noconflict( $assets ) {
360 360
 		$assets[] = 'gravityview_selectwoo';
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 			array(
82 82
 				'ajaxurl'  => admin_url( 'admin-ajax.php' ),
83 83
 				'action'   => 'entry_creator_get_users',
84
-				'gf25'    => (bool) gravityview()->plugin->is_GF_25(),
84
+				'gf25'    => (bool)gravityview()->plugin->is_GF_25(),
85 85
 				'language' => array(
86 86
 					'search_placeholder' => esc_html__( 'Search by ID, login, email, or name.', 'gravityview' ),
87 87
 				),
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
 			)
106 106
 		);
107 107
 
108
-		if ( ! wp_verify_nonce( $post_var['gv_nonce'], 'gv_entry_creator' ) ) {
108
+		if ( ! wp_verify_nonce( $post_var[ 'gv_nonce' ], 'gv_entry_creator' ) ) {
109 109
 			die();
110 110
 		}
111 111
 
112
-		$search_string = $post_var['q'];
112
+		$search_string = $post_var[ 'q' ];
113 113
 
114 114
 		if ( is_numeric( $search_string ) ) {
115 115
 			$user_args = array(
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 		}
157 157
 
158 158
 		// Update the entry. The `false` prevents checking Akismet; `true` disables the user updated hook from firing
159
-		$result = RGFormsModel::update_entry_property( (int) $entry['id'], 'created_by', (int) $user_id, false, true );
159
+		$result = RGFormsModel::update_entry_property( (int)$entry[ 'id' ], 'created_by', (int)$user_id, false, true );
160 160
 
161 161
 		if ( false === $result ) {
162 162
 			$status = __( 'Error', 'gravityview' );
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 			return;
179 179
 		}
180 180
 
181
-		GravityView_Entry_Notes::add_note( $entry['id'], - 1, 'GravityView', $note, 'gravityview' );
181
+		GravityView_Entry_Notes::add_note( $entry[ 'id' ], - 1, 'GravityView', $note, 'gravityview' );
182 182
 
183 183
 	}
184 184
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 		}
214 214
 
215 215
 		// If screen mode isn't set, then we're in the wrong place.
216
-		if ( empty( $_REQUEST['screen_mode'] ) ) {
216
+		if ( empty( $_REQUEST[ 'screen_mode' ] ) ) {
217 217
 			return;
218 218
 		}
219 219
 
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 
240 240
 		// If $_GET['screen_mode'] is set to edit, set $_POST value
241 241
 		if ( \GV\Utils::_GET( 'screen_mode' ) === 'edit' ) {
242
-			$_POST["screen_mode"] = 'edit';
242
+			$_POST[ "screen_mode" ] = 'edit';
243 243
 		}
244 244
 
245 245
 	}
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 		$entry_creator_user_id = \GV\Utils::get( $entry, 'created_by' );
315 315
 
316 316
 		$entry_creator_user = GVCommon::get_users( 'change_entry_creator', array( 'include' => $entry_creator_user_id ) );
317
-		$entry_creator_user = isset( $entry_creator_user[0] ) ? $entry_creator_user[0] : array();
317
+		$entry_creator_user = isset( $entry_creator_user[ 0 ] ) ? $entry_creator_user[ 0 ] : array();
318 318
 
319 319
 		if ( empty( $entry_creator_user ) ) {
320 320
 			$output .= '<option value="0"> &mdash; ' . esc_attr_x( 'No User', 'No user assigned to the entry', 'gravityview' ) . ' &mdash; </option>';
@@ -332,18 +332,18 @@  discard block
 block discarded – undo
332 332
 		}
333 333
 
334 334
 		$user_count      = count_users();
335
-		$user_count      = $user_count['total_users'];
335
+		$user_count      = $user_count[ 'total_users' ];
336 336
 		$users_displayed = self::DEFAULT_NUMBER_OF_USERS + ( ! empty( $entry_creator_user ) ? 1 : 0 );
337 337
 		if ( $user_count > $users_displayed ) {
338 338
 			$remaining_users = $user_count - $users_displayed;
339
-			$user_users = _n( esc_html__('user', 'gravityview' ), esc_html__('users', 'gravityview' ), $remaining_users );
339
+			$user_users = _n( esc_html__( 'user', 'gravityview' ), esc_html__( 'users', 'gravityview' ), $remaining_users );
340 340
 			$message = esc_html_x( 'Use the input above to search the remaining %d %s.', '%d is replaced with user count %s is replaced with "user" or "users"', 'gravityview' );
341 341
 			$message = sprintf( $message, $remaining_users, $user_users );
342
-			$output  .= '<option value="_user_count" disabled="disabled">' . esc_html( $message ) . '</option>';
342
+			$output .= '<option value="_user_count" disabled="disabled">' . esc_html( $message ) . '</option>';
343 343
 		}
344 344
 
345 345
 		$output .= '</select>';
346
-		$output .= '<input name="originally_created_by" value="' . esc_attr( $entry['created_by'] ) . '" type="hidden" />';
346
+		$output .= '<input name="originally_created_by" value="' . esc_attr( $entry[ 'created_by' ] ) . '" type="hidden" />';
347 347
 		$output .= wp_nonce_field( 'gv_entry_creator', 'gv_entry_creator_nonce', false, false );
348 348
 
349 349
 		echo $output;
@@ -357,8 +357,8 @@  discard block
 block discarded – undo
357 357
 	 * @return array
358 358
 	 */
359 359
 	function register_gform_noconflict( $assets ) {
360
-		$assets[] = 'gravityview_selectwoo';
361
-		$assets[] = 'gravityview_entry_creator';
360
+		$assets[ ] = 'gravityview_selectwoo';
361
+		$assets[ ] = 'gravityview_entry_creator';
362 362
 
363 363
 		return $assets;
364 364
 	}
Please login to merge, or discard this patch.