Completed
Push — develop ( fb88e2...553e0f )
by Zack
16:51 queued 02:24
created
includes/class-admin-approve-entries.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -266,7 +266,7 @@
 block discarded – undo
266 266
 	 *
267 267
 	 * @uses  GravityView_frontend::get_search_criteria() Convert the $_POST search request into a properly formatted request.
268 268
 	 * @access public
269
-	 * @return void|boolean
269
+	 * @return false|null
270 270
 	 */
271 271
 	public function process_bulk_action() {
272 272
 
Please login to merge, or discard this patch.
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -346,14 +346,14 @@  discard block
 block discarded – undo
346 346
 	/**
347 347
 	 * update_approved function.
348 348
 	 *
349
-     * @since 1.18 Moved to GravityView_Entry_Approval::update_approved
349
+	 * @since 1.18 Moved to GravityView_Entry_Approval::update_approved
350 350
 	 * @see GravityView_Entry_Approval::update_approved
351
-     *
351
+	 *
352 352
 	 * @param int $entry_id (default: 0)
353 353
 	 * @param int $approved (default: 0)
354 354
 	 * @param int $form_id (default: 0)
355 355
 	 * @param int $approvedcolumn (default: 0)
356
-     *
356
+	 *
357 357
 	 * @return boolean True: It worked; False: it failed
358 358
 	 */
359 359
 	public static function update_approved( $entry_id = 0, $approved = 0, $form_id = 0, $approvedcolumn = 0) {
@@ -363,9 +363,9 @@  discard block
 block discarded – undo
363 363
 	/**
364 364
 	 * Calculate the approve field.input id
365 365
 	 *
366
-     * @since 1.18 Moved to GravityView_Entry_Approval::get_approved_column
367
-     * @see GravityView_Entry_Approval::get_approved_column
368
-     *
366
+	 * @since 1.18 Moved to GravityView_Entry_Approval::get_approved_column
367
+	 * @see GravityView_Entry_Approval::get_approved_column
368
+	 *
369 369
 	 * @param mixed $form GF Form or Form ID
370 370
 	 * @return false|null|string Returns the input ID of the approved field. Returns NULL if no approved fields were found. Returns false if $form_id wasn't set.
371 371
 	 */
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 			'bulk_actions' => $this->get_bulk_actions( $form_id ),
487 487
 			'bulk_message' => $this->bulk_update_message,
488 488
 			'unapprove_title' => GravityView_Entry_Approval_Status::get_title_attr('unapproved'),
489
-            'approve_title' => GravityView_Entry_Approval_Status::get_title_attr('disapproved'),
489
+			'approve_title' => GravityView_Entry_Approval_Status::get_title_attr('disapproved'),
490 490
 			'disapprove_title' => GravityView_Entry_Approval_Status::get_title_attr('approved'),
491 491
 			'column_title' => __( 'Show entry in directory view?', 'gravityview'),
492 492
 			'column_link' => esc_url( $this->get_sort_link() ),
@@ -495,26 +495,26 @@  discard block
 block discarded – undo
495 495
 	}
496 496
 
497 497
 	/**
498
-     * Generate a link to sort by approval status
499
-     *
500
-     * Note: Sorting by approval will never be great because it's not possible currently to declare the sorting as
501
-     * numeric, but it does group the approved entries together.
502
-     *
503
-     * @since 2.0.14 Remove need for approval field for sorting by approval status
504
-     *
498
+	 * Generate a link to sort by approval status
499
+	 *
500
+	 * Note: Sorting by approval will never be great because it's not possible currently to declare the sorting as
501
+	 * numeric, but it does group the approved entries together.
502
+	 *
503
+	 * @since 2.0.14 Remove need for approval field for sorting by approval status
504
+	 *
505 505
 	 * @param int $form_id [NO LONGER USED]
506 506
 	 *
507 507
 	 * @return string Sorting link
508 508
 	 */
509 509
 	private function get_sort_link( $form_id = 0 ) {
510 510
 
511
-	    $args = array(
512
-		    'orderby' => 'is_approved',
513
-            'order' => ( 'desc' === \GV\Utils::_GET( 'order' ) ) ? 'asc' : 'desc',
514
-        );
511
+		$args = array(
512
+			'orderby' => 'is_approved',
513
+			'order' => ( 'desc' === \GV\Utils::_GET( 'order' ) ) ? 'asc' : 'desc',
514
+		);
515 515
 
516 516
 		return add_query_arg( $args );
517
-    }
517
+	}
518 518
 
519 519
 	/**
520 520
 	 * Get an array of options to be added to the Gravity Forms "Bulk action" dropdown in a "GravityView" option group
@@ -556,9 +556,9 @@  discard block
 block discarded – undo
556 556
 		// Sanitize the values, just to be sure.
557 557
 		foreach ( $bulk_actions as $key => $group ) {
558 558
 
559
-		    if( empty( $group ) ) {
560
-		        continue;
561
-		    }
559
+			if( empty( $group ) ) {
560
+				continue;
561
+			}
562 562
 
563 563
 			foreach ( $group as $i => $action ) {
564 564
 				$bulk_actions[ $key ][ $i ]['label'] = esc_html( $bulk_actions[ $key ][ $i ]['label'] );
Please login to merge, or discard this patch.
Spacing   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 		/** gf_entries page - entries table screen */
45 45
 
46 46
 		// capture bulk actions
47
-		add_action( 'gform_loaded', array( $this, 'process_bulk_action') );
47
+		add_action( 'gform_loaded', array( $this, 'process_bulk_action' ) );
48 48
 
49 49
 		// add hidden field with approve status
50 50
 		add_action( 'gform_entries_first_column_actions', array( $this, 'add_entry_approved_hidden_input' ), 1, 5 );
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		add_filter( 'gravityview/metaboxes/tooltips', array( $this, 'tooltips' ) );
53 53
 
54 54
 		// adding styles and scripts
55
-		add_action( 'admin_enqueue_scripts', array( $this, 'add_scripts_and_styles') );
55
+		add_action( 'admin_enqueue_scripts', array( $this, 'add_scripts_and_styles' ) );
56 56
 		// bypass Gravity Forms no-conflict mode
57 57
 		add_filter( 'gform_noconflict_scripts', array( $this, 'register_gform_noconflict_script' ) );
58 58
 		add_filter( 'gform_noconflict_styles', array( $this, 'register_gform_noconflict_style' ) );
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 		 * @param bool $show_filter_links True: show the "approved"/"disapproved" filter links. False: hide them.
82 82
 		 * @param array $form GF Form object of current form
83 83
 		 */
84
-		if( false === apply_filters( 'gravityview/approve_entries/show_filter_links_entry_list', true, $form ) ) {
84
+		if ( false === apply_filters( 'gravityview/approve_entries/show_filter_links_entry_list', true, $form ) ) {
85 85
 			return $filter_links;
86 86
 		}
87 87
 
@@ -102,19 +102,19 @@  discard block
 block discarded – undo
102 102
 		$approved_count = $disapproved_count = 0;
103 103
 
104 104
 		// Only count if necessary
105
-		if( $include_counts ) {
106
-			$approved_count = count( gravityview_get_entry_ids( $form['id'], array( 'status' => 'active', 'field_filters' => $field_filters_approved ) ) );
107
-			$disapproved_count = count( gravityview_get_entry_ids( $form['id'], array( 'status' => 'active', 'field_filters' => $field_filters_disapproved ) ) );
105
+		if ( $include_counts ) {
106
+			$approved_count = count( gravityview_get_entry_ids( $form[ 'id' ], array( 'status' => 'active', 'field_filters' => $field_filters_approved ) ) );
107
+			$disapproved_count = count( gravityview_get_entry_ids( $form[ 'id' ], array( 'status' => 'active', 'field_filters' => $field_filters_disapproved ) ) );
108 108
 		}
109 109
 
110
-		$filter_links[] = array(
110
+		$filter_links[ ] = array(
111 111
 			'id'            => 'gv_approved',
112 112
 			'field_filters' => $field_filters_approved,
113 113
 			'count'         => $approved_count,
114 114
 			'label'         => GravityView_Entry_Approval_Status::get_label( GravityView_Entry_Approval_Status::APPROVED ),
115 115
 		);
116 116
 
117
-		$filter_links[] = array(
117
+		$filter_links[ ] = array(
118 118
 			'id'            => 'gv_disapproved',
119 119
 			'field_filters' => $field_filters_disapproved,
120 120
 			'count'         => $disapproved_count,
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
 	 */
134 134
 	function tooltips( $tooltips ) {
135 135
 
136
-		$tooltips['form_gravityview_fields'] = array(
137
-			'title' => __('GravityView Fields', 'gravityview'),
138
-			'value' => __( 'Allow administrators to approve or reject entries and users to opt-in or opt-out of their entries being displayed.', 'gravityview'),
136
+		$tooltips[ 'form_gravityview_fields' ] = array(
137
+			'title' => __( 'GravityView Fields', 'gravityview' ),
138
+			'value' => __( 'Allow administrators to approve or reject entries and users to opt-in or opt-out of their entries being displayed.', 'gravityview' ),
139 139
 		);
140 140
 
141 141
 		return $tooltips;
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 
247 247
 		$gv_bulk_action = false;
248 248
 
249
-		if( version_compare( GFForms::$version, '2.0', '>=' ) ) {
249
+		if ( version_compare( GFForms::$version, '2.0', '>=' ) ) {
250 250
 			$bulk_action = ( '-1' !== \GV\Utils::_POST( 'action' ) ) ? \GV\Utils::_POST( 'action' ) : \GV\Utils::_POST( 'action2' );
251 251
 		} else {
252 252
 			// GF 1.9.x - Bulk action 2 is the bottom bulk action select form.
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 		}
255 255
 
256 256
 		// Check the $bulk_action value against GV actions, see if they're the same. I hate strpos().
257
-		if( ! empty( $bulk_action ) && preg_match( '/^('. implode( '|', $this->bulk_action_prefixes ) .')/ism', $bulk_action ) ) {
257
+		if ( ! empty( $bulk_action ) && preg_match( '/^(' . implode( '|', $this->bulk_action_prefixes ) . ')/ism', $bulk_action ) ) {
258 258
 			$gv_bulk_action = $bulk_action;
259 259
 		}
260 260
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 		
280 280
 		// gforms_entry_list is the nonce that confirms we're on the right page
281 281
 		// gforms_update_note is sent when bulk editing entry notes. We don't want to process then.
282
-		if ( $bulk_action && \GV\Utils::_POST( 'gforms_entry_list' ) && empty( $_POST['gforms_update_note'] ) ) {
282
+		if ( $bulk_action && \GV\Utils::_POST( 'gforms_entry_list' ) && empty( $_POST[ 'gforms_update_note' ] ) ) {
283 283
 
284 284
 			check_admin_referer( 'gforms_entry_list', 'gforms_entry_list' );
285 285
 
@@ -297,13 +297,13 @@  discard block
 block discarded – undo
297 297
 			}
298 298
 
299 299
 			// All entries are set to be updated, not just the visible ones
300
-			if ( ! empty( $_POST['all_entries'] ) ) {
300
+			if ( ! empty( $_POST[ 'all_entries' ] ) ) {
301 301
 
302 302
 				// Convert the current entry search into GF-formatted search criteria
303 303
 				$search = array(
304
-					'search_field' => isset( $_POST['f'] ) ? $_POST['f'][0] : 0,
305
-					'search_value' => isset( $_POST['v'][0] ) ? $_POST['v'][0] : '',
306
-					'search_operator' => isset( $_POST['o'][0] ) ? $_POST['o'][0] : 'contains',
304
+					'search_field' => isset( $_POST[ 'f' ] ) ? $_POST[ 'f' ][ 0 ] : 0,
305
+					'search_value' => isset( $_POST[ 'v' ][ 0 ] ) ? $_POST[ 'v' ][ 0 ] : '',
306
+					'search_operator' => isset( $_POST[ 'o' ][ 0 ] ) ? $_POST[ 'o' ][ 0 ] : 'contains',
307 307
 				);
308 308
 
309 309
 				$search_criteria = GravityView_frontend::get_search_criteria( $search, $form_id );
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 			} else {
315 315
 
316 316
 				// Changed from 'lead' to 'entry' in 2.0
317
-				$entries = isset( $_POST['lead'] ) ? $_POST['lead'] : $_POST['entry'];
317
+				$entries = isset( $_POST[ 'lead' ] ) ? $_POST[ 'lead' ] : $_POST[ 'entry' ];
318 318
 
319 319
 			}
320 320
 
@@ -326,15 +326,15 @@  discard block
 block discarded – undo
326 326
 			$entry_count = count( $entries ) > 1 ? sprintf( __( '%d entries', 'gravityview' ), count( $entries ) ) : __( '1 entry', 'gravityview' );
327 327
 
328 328
 			switch ( $approved_status ) {
329
-				case $this->bulk_action_prefixes['approve']:
329
+				case $this->bulk_action_prefixes[ 'approve' ]:
330 330
 					GravityView_Entry_Approval::update_bulk( $entries, GravityView_Entry_Approval_Status::APPROVED, $form_id );
331 331
 					$this->bulk_update_message = sprintf( __( '%s approved.', 'gravityview' ), $entry_count );
332 332
 					break;
333
-				case $this->bulk_action_prefixes['unapprove']:
333
+				case $this->bulk_action_prefixes[ 'unapprove' ]:
334 334
 					GravityView_Entry_Approval::update_bulk( $entries, GravityView_Entry_Approval_Status::UNAPPROVED, $form_id );
335 335
 					$this->bulk_update_message = sprintf( __( '%s unapproved.', 'gravityview' ), $entry_count );
336 336
 					break;
337
-				case $this->bulk_action_prefixes['disapprove']:
337
+				case $this->bulk_action_prefixes[ 'disapprove' ]:
338 338
 					GravityView_Entry_Approval::update_bulk( $entries, GravityView_Entry_Approval_Status::DISAPPROVED, $form_id );
339 339
 					$this->bulk_update_message = sprintf( __( '%s disapproved.', 'gravityview' ), $entry_count );
340 340
 					break;
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
      *
357 357
 	 * @return boolean True: It worked; False: it failed
358 358
 	 */
359
-	public static function update_approved( $entry_id = 0, $approved = 0, $form_id = 0, $approvedcolumn = 0) {
359
+	public static function update_approved( $entry_id = 0, $approved = 0, $form_id = 0, $approvedcolumn = 0 ) {
360 360
 		return GravityView_Entry_Approval::update_approved( $entry_id, $approved, $form_id, $approvedcolumn );
361 361
 	}
362 362
 
@@ -386,20 +386,20 @@  discard block
 block discarded – undo
386 386
 	 *
387 387
 	 * @return void
388 388
 	 */
389
-	static public function add_entry_approved_hidden_input(  $form_id, $field_id, $value, $entry, $query_string ) {
389
+	static public function add_entry_approved_hidden_input( $form_id, $field_id, $value, $entry, $query_string ) {
390 390
 
391
-		if( ! GVCommon::has_cap( 'gravityview_moderate_entries', $entry['id'] ) ) {
391
+		if ( ! GVCommon::has_cap( 'gravityview_moderate_entries', $entry[ 'id' ] ) ) {
392 392
 			return;
393 393
 		}
394 394
 
395
-		if( empty( $entry['id'] ) ) {
395
+		if ( empty( $entry[ 'id' ] ) ) {
396 396
 			return;
397 397
 		}
398 398
 
399 399
 		$status_value = GravityView_Entry_Approval::get_entry_status( $entry, 'value' );
400 400
 
401
-		if( $status_value ) {
402
-			echo '<input type="hidden" class="entry_approval" id="entry_approved_'. $entry['id'] .'" value="' . esc_attr( $status_value ) . '" />';
401
+		if ( $status_value ) {
402
+			echo '<input type="hidden" class="entry_approval" id="entry_approved_' . $entry[ 'id' ] . '" value="' . esc_attr( $status_value ) . '" />';
403 403
 		}
404 404
 	}
405 405
 
@@ -412,10 +412,10 @@  discard block
 block discarded – undo
412 412
 	 */
413 413
 	private function get_form_id() {
414 414
 
415
-		$form_id = GFForms::get('id');
415
+		$form_id = GFForms::get( 'id' );
416 416
 
417 417
 		// If there are no forms identified, use the first form. That's how GF does it.
418
-		if( empty( $form_id ) && class_exists('RGFormsModel') ) {
418
+		if ( empty( $form_id ) && class_exists( 'RGFormsModel' ) ) {
419 419
 			$form_id = $this->get_first_form_id();
420 420
 		}
421 421
 
@@ -435,14 +435,14 @@  discard block
 block discarded – undo
435 435
 
436 436
 		$forms = RGFormsModel::get_forms( null, 'title' );
437 437
 
438
-		if( ! isset( $forms[0] ) ) {
438
+		if ( ! isset( $forms[ 0 ] ) ) {
439 439
 			gravityview()->log->error( 'No forms were found' );
440 440
 			return 0;
441 441
 		}
442 442
 
443
-		$first_form = $forms[0];
443
+		$first_form = $forms[ 0 ];
444 444
 
445
-		$form_id = is_object( $forms[0] ) ? $first_form->id : $first_form['id'];
445
+		$form_id = is_object( $forms[ 0 ] ) ? $first_form->id : $first_form[ 'id' ];
446 446
 
447 447
 		return intval( $form_id );
448 448
 	}
@@ -450,33 +450,33 @@  discard block
 block discarded – undo
450 450
 
451 451
 	function add_scripts_and_styles( $hook ) {
452 452
 
453
-		if( ! class_exists( 'GFForms' ) ) {
453
+		if ( ! class_exists( 'GFForms' ) ) {
454 454
 			gravityview()->log->error( 'GFForms does not exist.' );
455 455
 			return;
456 456
 		}
457 457
 
458 458
 		// enqueue styles & scripts gf_entries
459 459
 		// But only if we're on the main Entries page, not on reports pages
460
-		if( GFForms::get_page() !== 'entry_list' ) {
460
+		if ( GFForms::get_page() !== 'entry_list' ) {
461 461
 			return;
462 462
 		}
463 463
 
464 464
 		$form_id = $this->get_form_id();
465 465
 
466 466
 		// Things are broken; no forms were found
467
-		if( empty( $form_id ) ) {
467
+		if ( empty( $form_id ) ) {
468 468
 			return;
469 469
 		}
470 470
 
471
-		wp_enqueue_style( 'gravityview_entries_list', plugins_url('assets/css/admin-entries-list.css', GRAVITYVIEW_FILE), array(), GravityView_Plugin::version );
471
+		wp_enqueue_style( 'gravityview_entries_list', plugins_url( 'assets/css/admin-entries-list.css', GRAVITYVIEW_FILE ), array(), GravityView_Plugin::version );
472 472
 
473
-		$script_debug = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min';
473
+		$script_debug = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
474 474
 
475
-		wp_enqueue_script( 'gravityview_gf_entries_scripts', plugins_url('assets/js/admin-entries-list'.$script_debug.'.js', GRAVITYVIEW_FILE), array( 'jquery' ), GravityView_Plugin::version );
475
+		wp_enqueue_script( 'gravityview_gf_entries_scripts', plugins_url( 'assets/js/admin-entries-list' . $script_debug . '.js', GRAVITYVIEW_FILE ), array( 'jquery' ), GravityView_Plugin::version );
476 476
 
477 477
 		wp_localize_script( 'gravityview_gf_entries_scripts', 'gvGlobals', array(
478
-			'nonce' => wp_create_nonce( 'gravityview_entry_approval'),
479
-			'admin_nonce' => wp_create_nonce( 'gravityview_admin_entry_approval'),
478
+			'nonce' => wp_create_nonce( 'gravityview_entry_approval' ),
479
+			'admin_nonce' => wp_create_nonce( 'gravityview_admin_entry_approval' ),
480 480
 			'form_id' => $form_id,
481 481
 			'show_column' => (int)$this->show_approve_entry_column( $form_id ),
482 482
 			'add_bulk_action' => (int)GVCommon::has_cap( 'gravityview_moderate_entries' ),
@@ -485,10 +485,10 @@  discard block
 block discarded – undo
485 485
 			'status_unapproved' => GravityView_Entry_Approval_Status::UNAPPROVED,
486 486
 			'bulk_actions' => $this->get_bulk_actions( $form_id ),
487 487
 			'bulk_message' => $this->bulk_update_message,
488
-			'unapprove_title' => GravityView_Entry_Approval_Status::get_title_attr('unapproved'),
489
-            'approve_title' => GravityView_Entry_Approval_Status::get_title_attr('disapproved'),
490
-			'disapprove_title' => GravityView_Entry_Approval_Status::get_title_attr('approved'),
491
-			'column_title' => __( 'Show entry in directory view?', 'gravityview'),
488
+			'unapprove_title' => GravityView_Entry_Approval_Status::get_title_attr( 'unapproved' ),
489
+            'approve_title' => GravityView_Entry_Approval_Status::get_title_attr( 'disapproved' ),
490
+			'disapprove_title' => GravityView_Entry_Approval_Status::get_title_attr( 'approved' ),
491
+			'column_title' => __( 'Show entry in directory view?', 'gravityview' ),
492 492
 			'column_link' => esc_url( $this->get_sort_link() ),
493 493
 		) );
494 494
 
@@ -530,16 +530,16 @@  discard block
 block discarded – undo
530 530
 		$bulk_actions = array(
531 531
 			'GravityView' => array(
532 532
 				array(
533
-					'label' => GravityView_Entry_Approval_Status::get_string('approved', 'action'),
534
-					'value' => sprintf( '%s-%d', $this->bulk_action_prefixes['approve'], $form_id ),
533
+					'label' => GravityView_Entry_Approval_Status::get_string( 'approved', 'action' ),
534
+					'value' => sprintf( '%s-%d', $this->bulk_action_prefixes[ 'approve' ], $form_id ),
535 535
 				),
536 536
 				array(
537
-					'label' => GravityView_Entry_Approval_Status::get_string('disapproved', 'action'),
538
-					'value' => sprintf( '%s-%d', $this->bulk_action_prefixes['disapprove'], $form_id ),
537
+					'label' => GravityView_Entry_Approval_Status::get_string( 'disapproved', 'action' ),
538
+					'value' => sprintf( '%s-%d', $this->bulk_action_prefixes[ 'disapprove' ], $form_id ),
539 539
 				),
540 540
 				array(
541
-					'label' => GravityView_Entry_Approval_Status::get_string('unapproved', 'action'),
542
-					'value' => sprintf( '%s-%d', $this->bulk_action_prefixes['unapprove'], $form_id ),
541
+					'label' => GravityView_Entry_Approval_Status::get_string( 'unapproved', 'action' ),
542
+					'value' => sprintf( '%s-%d', $this->bulk_action_prefixes[ 'unapprove' ], $form_id ),
543 543
 				),
544 544
 			),
545 545
 		);
@@ -556,13 +556,13 @@  discard block
 block discarded – undo
556 556
 		// Sanitize the values, just to be sure.
557 557
 		foreach ( $bulk_actions as $key => $group ) {
558 558
 
559
-		    if( empty( $group ) ) {
559
+		    if ( empty( $group ) ) {
560 560
 		        continue;
561 561
 		    }
562 562
 
563 563
 			foreach ( $group as $i => $action ) {
564
-				$bulk_actions[ $key ][ $i ]['label'] = esc_html( $bulk_actions[ $key ][ $i ]['label'] );
565
-				$bulk_actions[ $key ][ $i ]['value'] = esc_attr( $bulk_actions[ $key ][ $i ]['value'] );
564
+				$bulk_actions[ $key ][ $i ][ 'label' ] = esc_html( $bulk_actions[ $key ][ $i ][ 'label' ] );
565
+				$bulk_actions[ $key ][ $i ][ 'value' ] = esc_attr( $bulk_actions[ $key ][ $i ][ 'value' ] );
566 566
 			}
567 567
 		}
568 568
 
@@ -587,13 +587,13 @@  discard block
 block discarded – undo
587 587
 		 * @since 1.7.2
588 588
 		 * @param boolean $hide_if_no_connections
589 589
 		 */
590
-		$hide_if_no_connections = apply_filters('gravityview/approve_entries/hide-if-no-connections', false );
590
+		$hide_if_no_connections = apply_filters( 'gravityview/approve_entries/hide-if-no-connections', false );
591 591
 
592
-		if( $hide_if_no_connections ) {
592
+		if ( $hide_if_no_connections ) {
593 593
 
594 594
 			$connected_views = gravityview_get_connected_views( $form_id );
595 595
 
596
-			if( empty( $connected_views ) ) {
596
+			if ( empty( $connected_views ) ) {
597 597
 				$show_approve_column = false;
598 598
 			}
599 599
 		}
@@ -603,18 +603,18 @@  discard block
 block discarded – undo
603 603
 		 * @param boolean $show_approve_column Whether the column will be shown
604 604
 		 * @param int $form_id The ID of the Gravity Forms form for which entries are being shown
605 605
 		 */
606
-		$show_approve_column = apply_filters('gravityview/approve_entries/show-column', $show_approve_column, $form_id );
606
+		$show_approve_column = apply_filters( 'gravityview/approve_entries/show-column', $show_approve_column, $form_id );
607 607
 
608 608
 		return $show_approve_column;
609 609
 	}
610 610
 
611 611
 	function register_gform_noconflict_script( $scripts ) {
612
-		$scripts[] = 'gravityview_gf_entries_scripts';
612
+		$scripts[ ] = 'gravityview_gf_entries_scripts';
613 613
 		return $scripts;
614 614
 	}
615 615
 
616 616
 	function register_gform_noconflict_style( $styles ) {
617
-		$styles[] = 'gravityview_entries_list';
617
+		$styles[ ] = 'gravityview_entries_list';
618 618
 		return $styles;
619 619
 	}
620 620
 
Please login to merge, or discard this patch.