Completed
Push — develop ( 0f62fb...a567e4 )
by Zack
17:40 queued 12s
created
includes/class-admin-installer.php 1 patch
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 */
54 54
 	public function register_noconflict( $items ) {
55 55
 
56
-		$items[] = 'gravityview-admin-installer';
56
+		$items[ ] = 'gravityview-admin-installer';
57 57
 
58 58
 		return $items;
59 59
 	}
@@ -68,21 +68,21 @@  discard block
 block discarded – undo
68 68
 
69 69
 	    $downloads_data = get_site_transient( self::DOWNLOADS_DATA_TRANSIENT );
70 70
 
71
-	    if ( ! $downloads_data && ! isset( $_GET['cache'] ) ) {
71
+	    if ( ! $downloads_data && ! isset( $_GET[ 'cache' ] ) ) {
72 72
 			return;
73 73
 		}
74 74
 
75
-		add_filter( 'plugins_api', function ( $data, $action, $args ) use ( $downloads_data ) {
75
+		add_filter( 'plugins_api', function( $data, $action, $args ) use ( $downloads_data ) {
76 76
 			foreach ( $downloads_data as $extension ) {
77
-				if ( empty( $extension['info'] ) || empty( $args->slug ) || $args->slug !== $extension['info']['slug'] ) {
77
+				if ( empty( $extension[ 'info' ] ) || empty( $args->slug ) || $args->slug !== $extension[ 'info' ][ 'slug' ] ) {
78 78
 					continue;
79 79
 				}
80 80
 
81
-				return (object) array(
82
-					'slug'          => $extension['info']['slug'],
83
-					'name'          => $extension['info']['title'],
84
-					'version'       => $extension['licensing']['version'],
85
-					'download_link' => $extension['files'][0]['file'],
81
+				return (object)array(
82
+					'slug'          => $extension[ 'info' ][ 'slug' ],
83
+					'name'          => $extension[ 'info' ][ 'title' ],
84
+					'version'       => $extension[ 'licensing' ][ 'version' ],
85
+					'download_link' => $extension[ 'files' ][ 0 ][ 'file' ],
86 86
 				);
87 87
 			}
88 88
 
@@ -149,13 +149,13 @@  discard block
 block discarded – undo
149 149
 
150 150
 		foreach ( $all_plugins as $path => $plugin ) {
151 151
 
152
-			if ( empty( $plugin['TextDomain'] ) ) {
152
+			if ( empty( $plugin[ 'TextDomain' ] ) ) {
153 153
 				continue;
154 154
 			}
155 155
 
156
-			$wp_plugins[ $plugin['TextDomain'] ] = array(
156
+			$wp_plugins[ $plugin[ 'TextDomain' ] ] = array(
157 157
 				'path'      => $path,
158
-				'version'   => $plugin['Version'],
158
+				'version'   => $plugin[ 'Version' ],
159 159
 				'activated' => is_plugin_active( $path )
160 160
 			);
161 161
 		}
@@ -209,11 +209,11 @@  discard block
 block discarded – undo
209 209
 
210 210
 		$downloads_data = get_site_transient( self::DOWNLOADS_DATA_TRANSIENT );
211 211
 
212
-		if ( $downloads_data && ! isset( $_GET['cache'] ) ) {
212
+		if ( $downloads_data && ! isset( $_GET[ 'cache' ] ) ) {
213 213
 			return $downloads_data;
214 214
 		}
215 215
 
216
-		if( \GV\Plugin::is_network_activated() ) {
216
+		if ( \GV\Plugin::is_network_activated() ) {
217 217
 			$home_url = network_home_url();
218 218
 		} else {
219 219
 			$home_url = home_url();
@@ -241,13 +241,13 @@  discard block
 block discarded – undo
241 241
 
242 242
 		$downloads_data = json_decode( wp_remote_retrieve_body( $response ), true );
243 243
 
244
-		if ( empty( $downloads_data['products'] ) ) {
244
+		if ( empty( $downloads_data[ 'products' ] ) ) {
245 245
 			return array();
246 246
 		}
247 247
 
248
-		$this->set_downloads_data( $downloads_data['products'] );
248
+		$this->set_downloads_data( $downloads_data[ 'products' ] );
249 249
 
250
-		return $downloads_data['products'];
250
+		return $downloads_data[ 'products' ];
251 251
 	}
252 252
 
253 253
 	/**
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 
308 308
             <h2><?php esc_html_e( 'The following plugins extend GravityView and Gravity Forms functionality:', 'gravityview' ); ?></h2>
309 309
 
310
-			<a class="button button-secondary gv-admin-installer-refresh-link" href="<?php echo add_query_arg(array( 'cache' => 1 ) ); ?>"><i class="dashicons dashicons-update" style="margin-top: .2em"></i> <?php esc_html_e( 'Refresh', 'gravityview' ); ?></a>
310
+			<a class="button button-secondary gv-admin-installer-refresh-link" href="<?php echo add_query_arg( array( 'cache' => 1 ) ); ?>"><i class="dashicons dashicons-update" style="margin-top: .2em"></i> <?php esc_html_e( 'Refresh', 'gravityview' ); ?></a>
311 311
 
312 312
 			<hr class="wp-header-end" />
313 313
 
@@ -324,11 +324,11 @@  discard block
 block discarded – undo
324 324
 
325 325
 				$this->render_section( 'extensions', esc_html__( 'GravityView Extensions', 'gravityview' ), $downloads_data, $wp_plugins );
326 326
 
327
-				$this->render_section(  'plugins', esc_html__( 'Gravity Forms Add-Ons', 'gravityview' ), $downloads_data, $wp_plugins );
327
+				$this->render_section( 'plugins', esc_html__( 'Gravity Forms Add-Ons', 'gravityview' ), $downloads_data, $wp_plugins );
328 328
 
329
-				$this->render_section(  'labs', esc_html__( 'GravityView Labs', 'gravityview' ), $downloads_data, $wp_plugins );
329
+				$this->render_section( 'labs', esc_html__( 'GravityView Labs', 'gravityview' ), $downloads_data, $wp_plugins );
330 330
 
331
-				$this->render_section(  'friends', esc_html__( 'Friends of GravityView', 'gravityview' ), $downloads_data, $wp_plugins );
331
+				$this->render_section( 'friends', esc_html__( 'Friends of GravityView', 'gravityview' ), $downloads_data, $wp_plugins );
332 332
 				?>
333 333
             </div>
334 334
         </div>
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
 				continue;
356 356
 			}
357 357
 
358
-			if ( empty( $download['info'] ) ) {
358
+			if ( empty( $download[ 'info' ] ) ) {
359 359
 				continue;
360 360
 			}
361 361
 
@@ -383,31 +383,31 @@  discard block
 block discarded – undo
383 383
 
384 384
         $details = $this->get_download_display_details( $download, $wp_plugins );
385 385
 
386
-        $download_info = $details['download_info'];
386
+        $download_info = $details[ 'download_info' ];
387 387
 
388 388
 		?>
389
-        <div class="item <?php echo esc_attr( $details['item_class'] ); ?>">
389
+        <div class="item <?php echo esc_attr( $details[ 'item_class' ] ); ?>">
390 390
             <div class="addon-inner">
391
-                <a href="<?php echo esc_url( $download_info['link'] ); ?>" rel="external noreferrer noopener" title="<?php esc_html_e( 'Visit the plugin page', 'gravityview' ); ?>"><img class="thumbnail" src="<?php echo esc_attr( $download_info['thumbnail'] ); ?>" alt="" /></a>
392
-                <h3><?php echo esc_html( \GV\Utils::get( $download_info, 'installer_title', $download_info['title'] ) ); ?></h3>
391
+                <a href="<?php echo esc_url( $download_info[ 'link' ] ); ?>" rel="external noreferrer noopener" title="<?php esc_html_e( 'Visit the plugin page', 'gravityview' ); ?>"><img class="thumbnail" src="<?php echo esc_attr( $download_info[ 'thumbnail' ] ); ?>" alt="" /></a>
392
+                <h3><?php echo esc_html( \GV\Utils::get( $download_info, 'installer_title', $download_info[ 'title' ] ) ); ?></h3>
393 393
                 <div>
394
-                    <?php if( ! empty( $details['status_label'] ) ) { ?>
395
-                    <div class="status <?php echo esc_attr( $details['status'] ); ?>" title="<?php printf( esc_attr__( 'Plugin status: %s', 'gravityview' ), esc_html( $details['status_label'] ) ); ?>">
396
-                        <span class="dashicons dashicons-admin-plugins"></span> <span class="status-label"><?php echo esc_html( $details['status_label'] ); ?></span>
394
+                    <?php if ( ! empty( $details[ 'status_label' ] ) ) { ?>
395
+                    <div class="status <?php echo esc_attr( $details[ 'status' ] ); ?>" title="<?php printf( esc_attr__( 'Plugin status: %s', 'gravityview' ), esc_html( $details[ 'status_label' ] ) ); ?>">
396
+                        <span class="dashicons dashicons-admin-plugins"></span> <span class="status-label"><?php echo esc_html( $details[ 'status_label' ] ); ?></span>
397 397
                     </div>
398 398
 			        <?php } ?>
399 399
 
400
-					<?php if ( 'gravityview' !== $download_info['slug'] ) { ?>
401
-                    <a data-status="<?php echo esc_attr( $details['status'] ); ?>" data-plugin-path="<?php echo esc_attr( $details['plugin_path'] ); ?>" href="<?php echo esc_url( $details['href'] ); ?>" class="button <?php echo esc_attr( $details['button_class'] ); ?>" title="<?php echo esc_attr( $details['button_title'] ); ?>">
402
-                        <span class="title"><?php echo esc_html( $details['button_label'] ); ?></span>
403
-                        <?php if( $details['spinner'] ) { ?><span class="spinner"></span><?php } ?>
400
+					<?php if ( 'gravityview' !== $download_info[ 'slug' ] ) { ?>
401
+                    <a data-status="<?php echo esc_attr( $details[ 'status' ] ); ?>" data-plugin-path="<?php echo esc_attr( $details[ 'plugin_path' ] ); ?>" href="<?php echo esc_url( $details[ 'href' ] ); ?>" class="button <?php echo esc_attr( $details[ 'button_class' ] ); ?>" title="<?php echo esc_attr( $details[ 'button_title' ] ); ?>">
402
+                        <span class="title"><?php echo esc_html( $details[ 'button_label' ] ); ?></span>
403
+                        <?php if ( $details[ 'spinner' ] ) { ?><span class="spinner"></span><?php } ?>
404 404
                     </a>
405 405
 					<?php } ?>
406 406
                 </div>
407 407
 
408 408
                 <div class="addon-excerpt"><?php
409 409
 
410
-                    $excerpt = \GV\Utils::get( $download_info, 'installer_excerpt', $download_info['excerpt'] );
410
+                    $excerpt = \GV\Utils::get( $download_info, 'installer_excerpt', $download_info[ 'excerpt' ] );
411 411
 
412 412
                     // Allow some pure HTML tags, but remove everything else from the excerpt.
413 413
                     $tags = array( '<strong>', '</strong>', '<em>', '</em>', '<code>', '</code>' );
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
 	 */
450 450
 	private function get_download_display_details( $download, $wp_plugins ) {
451 451
 
452
-		$download_info = wp_parse_args( (array) $download['info'], array(
452
+		$download_info = wp_parse_args( (array)$download[ 'info' ], array(
453 453
 			'thumbnail' => '',
454 454
 			'title' => '',
455 455
 			'textdomain' => '',
@@ -461,9 +461,9 @@  discard block
 block discarded – undo
461 461
 			'installer_excerpt' => null, // May not be defined
462 462
 		) );
463 463
 
464
-		$wp_plugin = \GV\Utils::get( $wp_plugins, $download_info['textdomain'], false );
464
+		$wp_plugin = \GV\Utils::get( $wp_plugins, $download_info[ 'textdomain' ], false );
465 465
 
466
-		$has_access = ! empty( $download['files'] );
466
+		$has_access = ! empty( $download[ 'files' ] );
467 467
 		$spinner = true;
468 468
 		$href = $plugin_path = '#';
469 469
 		$status = $item_class = $button_title = $button_class = '';
@@ -473,11 +473,11 @@  discard block
 block discarded – undo
473 473
 		$required_license = $galactic_only ? __( 'All Access', 'gravityview' ) : __( 'Core + Extensions', 'gravityview' );
474 474
 
475 475
 		// The license is not active - no matter what level, this should not work
476
-		if( ! $is_active  && empty( $base_price ) ) {
476
+		if ( ! $is_active && empty( $base_price ) ) {
477 477
 			$spinner      = false;
478 478
 			$status_label = '';
479 479
 			$button_label = sprintf( __( 'Active %s License is Required.', 'gravityview' ), $required_license );
480
-			$href         = $download_info['link'];
480
+			$href         = $download_info[ 'link' ];
481 481
 			$button_class = 'button-primary';
482 482
 		}
483 483
 
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
 			$status_label = '';
488 488
 			$button_label = sprintf( __( 'Purchase Now for %s', 'gravityview' ), '$' . $base_price );
489 489
 			$button_class = 'button-primary button-large';
490
-			$href         = $download_info['link'];
490
+			$href         = $download_info[ 'link' ];
491 491
 			$item_class   = 'featured';
492 492
 		}
493 493
 
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 			$href         = 'https://gravityview.co/pricing/?utm_source=admin-installer&utm_medium=admin&utm_campaign=Admin%20Notice&utm_content=' . $required_license;
501 501
 		}
502 502
 
503
-        elseif ( ! empty( $download_info['coming_soon'] ) ) {
503
+        elseif ( ! empty( $download_info[ 'coming_soon' ] ) ) {
504 504
 	        $spinner      = false;
505 505
 	        $status       = 'notinstalled';
506 506
 	        $status_label = __( 'Coming Soon', 'gravityview' );
@@ -515,8 +515,8 @@  discard block
 block discarded – undo
515 515
 			$href = add_query_arg(
516 516
 				array(
517 517
 					'action'   => 'install-plugin',
518
-					'plugin'   => $download_info['slug'],
519
-					'_wpnonce' => wp_create_nonce( 'install-plugin_' . $download_info['slug'] ),
518
+					'plugin'   => $download_info[ 'slug' ],
519
+					'_wpnonce' => wp_create_nonce( 'install-plugin_' . $download_info[ 'slug' ] ),
520 520
 				),
521 521
 				self_admin_url( 'update.php' )
522 522
 			);
@@ -532,12 +532,12 @@  discard block
 block discarded – undo
532 532
 			$status = 'inactive';
533 533
 			$status_label = __( 'Inactive', 'gravityview' );
534 534
 			$button_label = __( 'Activate', 'gravityview' );
535
-			$plugin_path = $wp_plugin['path'];
535
+			$plugin_path = $wp_plugin[ 'path' ];
536 536
 			$button_class = 'button-secondary';
537 537
 		}
538 538
 		// The plugin is installed and active
539
-		elseif ( ! empty( $wp_plugin['path'] ) ) {
540
-			$plugin_path = $wp_plugin['path'];
539
+		elseif ( ! empty( $wp_plugin[ 'path' ] ) ) {
540
+			$plugin_path = $wp_plugin[ 'path' ];
541 541
 			$status = 'active';
542 542
 			$status_label = __( 'Active', 'gravityview' );
543 543
 			$button_label = __( 'Deactivate', 'gravityview' );
@@ -550,9 +550,9 @@  discard block
 block discarded – undo
550 550
 			$href = add_query_arg( array( 'license_key' => $license_key ), $href );
551 551
 		}
552 552
 
553
-		$download_info['link'] = add_query_arg( array( 'license_key' => $license_key ), $download_info['link'] );
553
+		$download_info[ 'link' ] = add_query_arg( array( 'license_key' => $license_key ), $download_info[ 'link' ] );
554 554
 
555
-		return compact( 'download_info','plugin_path', 'status', 'status_label', 'button_title', 'button_class', 'button_label', 'href', 'spinner', 'item_class', 'required_license', 'is_active' );
555
+		return compact( 'download_info', 'plugin_path', 'status', 'status_label', 'button_title', 'button_class', 'button_label', 'href', 'spinner', 'item_class', 'required_license', 'is_active' );
556 556
     }
557 557
 
558 558
 	/**
@@ -567,11 +567,11 @@  discard block
 block discarded – undo
567 567
 	    $base_price = \GV\Utils::get( $download, 'pricing/amount', 0 );
568 568
 		$base_price = \GFCommon::to_number( $base_price );
569 569
 
570
-		unset( $download['pricing']['amount'] );
570
+		unset( $download[ 'pricing' ][ 'amount' ] );
571 571
 
572 572
 		// Price options array, not single price
573
-		if ( ! $base_price && ! empty( $download['pricing'] ) ) {
574
-			$base_price = array_shift( $download['pricing'] );
573
+		if ( ! $base_price && ! empty( $download[ 'pricing' ] ) ) {
574
+			$base_price = array_shift( $download[ 'pricing' ] );
575 575
 		}
576 576
 
577 577
 		return floatval( $base_price );
@@ -585,13 +585,13 @@  discard block
 block discarded – undo
585 585
 	public function activate_download() {
586 586
 		$data = \GV\Utils::_POST( 'data', array() );
587 587
 
588
-		if ( empty( $data['path'] ) ) {
588
+		if ( empty( $data[ 'path' ] ) ) {
589 589
 			return;
590 590
 		}
591 591
 
592
-		$result = activate_plugin( $data['path'] );
592
+		$result = activate_plugin( $data[ 'path' ] );
593 593
 
594
-		if ( is_wp_error( $result ) || ! is_plugin_active( $data['path'] ) ) {
594
+		if ( is_wp_error( $result ) || ! is_plugin_active( $data[ 'path' ] ) ) {
595 595
 			wp_send_json_error( array(
596 596
                 'error' => sprintf( __( 'Plugin activation failed: %s', 'gravityview' ), $result->get_error_message() )
597 597
             ) );
@@ -608,13 +608,13 @@  discard block
 block discarded – undo
608 608
 	public function deactivate_download() {
609 609
 		$data = \GV\Utils::_POST( 'data', array() );
610 610
 
611
-		if ( empty( $data['path'] ) ) {
611
+		if ( empty( $data[ 'path' ] ) ) {
612 612
 			return;
613 613
 		}
614 614
 
615
-		deactivate_plugins( $data['path'] );
615
+		deactivate_plugins( $data[ 'path' ] );
616 616
 
617
-		if( is_plugin_active( $data['path'] ) ) {
617
+		if ( is_plugin_active( $data[ 'path' ] ) ) {
618 618
             wp_send_json_error( array(
619 619
                 'error' => sprintf( __( 'Plugin deactivation failed.', 'gravityview' ) )
620 620
             ) );
Please login to merge, or discard this patch.
future/includes/class-gv-shortcode-gvlogic.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
 		$value    = $this->get_value( $atts );
62 62
 
63 63
 		if ( false === $operator && is_null( $value ) ) {
64
-			if ( false !== $atts['if'] ) { // Only-if test
65
-				$match = $authed && ! in_array( strtolower( $atts['if'] ), array( '', '0', 'false', 'no' ) );
64
+			if ( false !== $atts[ 'if' ] ) { // Only-if test
65
+				$match = $authed && ! in_array( strtolower( $atts[ 'if' ] ), array( '', '0', 'false', 'no' ) );
66 66
 			} else {
67 67
 				$match = $authed; // Just login test
68 68
 			}
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
 				// Need to match all AND
83 83
 				foreach ( $and_values as $and_value ) {
84
-					$match = $authed && \GVCommon::matches_operation( $atts['if'], $and_value, $operator );
84
+					$match = $authed && \GVCommon::matches_operation( $atts[ 'if' ], $and_value, $operator );
85 85
 					if ( ! $match ) {
86 86
 						break;
87 87
 					}
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 				// Only need to match a single OR
93 93
 				foreach ( $or_values as $or_value ) {
94 94
 
95
-					$match = \GVCommon::matches_operation( $atts['if'], $or_value, $operator );
95
+					$match = \GVCommon::matches_operation( $atts[ 'if' ], $or_value, $operator );
96 96
 
97 97
 					// Negate the negative operators
98 98
 					if ( ( $authed && $match ) || ( $authed && ( ! $match && in_array( $operator, array( 'isnot', 'not_contains', 'not_in' ) ) ) ) ) {
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 				}
102 102
 
103 103
 			} else {
104
-				$match = $authed && \GVCommon::matches_operation( $atts['if'], $value, $operator );
104
+				$match = $authed && \GVCommon::matches_operation( $atts[ 'if' ], $value, $operator );
105 105
 			}
106 106
 
107 107
 			$output = $this->get_output( $match, $atts, $output );
@@ -189,8 +189,8 @@  discard block
 block discarded – undo
189 189
 	 * @return string The output.
190 190
 	 */
191 191
 	private function get_output( $match, $atts, $content ) {
192
-		if ( ! $match && ! empty( $atts['else'] ) ) {
193
-			return $atts['else']; // Attributized else is easy :)
192
+		if ( ! $match && ! empty( $atts[ 'else' ] ) ) {
193
+			return $atts[ 'else' ]; // Attributized else is easy :)
194 194
 		}
195 195
 
196 196
 		$if = '';
@@ -317,18 +317,18 @@  discard block
 block discarded – undo
317 317
 		$atts = array_intersect_key( $supplied_atts, $atts );
318 318
 
319 319
 		// Strip whitespace if it's not default false
320
-		if ( isset( $atts['if'] ) && is_string( $atts['if'] ) ) {
321
-			$atts['if'] = trim( $atts['if'] );
320
+		if ( isset( $atts[ 'if' ] ) && is_string( $atts[ 'if' ] ) ) {
321
+			$atts[ 'if' ] = trim( $atts[ 'if' ] );
322 322
 		} else {
323
-			$atts['if'] = false;
323
+			$atts[ 'if' ] = false;
324 324
 		}
325 325
 
326
-		if ( isset( $atts['logged_in'] ) ) {
326
+		if ( isset( $atts[ 'logged_in' ] ) ) {
327 327
 			// Truthy
328
-			if ( in_array( strtolower( $atts['logged_in'] ), array( '0', 'false', 'no' ) ) ) {
329
-				$atts['logged_in'] = false;
328
+			if ( in_array( strtolower( $atts[ 'logged_in' ] ), array( '0', 'false', 'no' ) ) ) {
329
+				$atts[ 'logged_in' ] = false;
330 330
 			} else {
331
-				$atts['logged_in'] = true;
331
+				$atts[ 'logged_in' ] = true;
332 332
 			}
333 333
 		}
334 334
 
Please login to merge, or discard this patch.
includes/extensions/lightbox/class-gravityview-lightbox-provider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 		add_filter( 'gravityview/fields/fileupload/link_atts', array( $this, 'fileupload_link_atts' ), 10, 4 );
24 24
 		add_filter( 'gravityview/get_link/allowed_atts', array( $this, 'allowed_atts' ) );
25 25
 
26
-		add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts') );
27
-		add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles') );
26
+		add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
27
+		add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
28 28
 
29 29
 		add_action( 'gravityview/template/after', array( $this, 'print_scripts' ) );
30 30
 
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
 		remove_filter( 'gravityview/fields/fileupload/link_atts', array( $this, 'fileupload_link_atts' ), 10 );
93 93
 		remove_filter( 'gravityview/get_link/allowed_atts', array( $this, 'allowed_atts' ) );
94 94
 
95
-		remove_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts') );
96
-		remove_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles') );
95
+		remove_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
96
+		remove_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
97 97
 
98 98
 		remove_action( 'wp_footer', array( $this, 'output_footer' ) );
99 99
 	}
Please login to merge, or discard this patch.
includes/admin/entry-list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 		add_action( 'gform_entries_first_column_actions', array( $this, 'add_edit_link' ), 10, 5 );
12 12
 
13 13
 		// Add script to enable edit link
14
-		add_action( 'admin_head', array( $this, 'add_edit_script') );
14
+		add_action( 'admin_head', array( $this, 'add_edit_script' ) );
15 15
 	}
16 16
 
17 17
 	/**
@@ -60,14 +60,14 @@  discard block
 block discarded – undo
60 60
 			'page' => 'gf_entries',
61 61
 			'view' => 'entry',
62 62
 			'id'	=> (int)$form_id,
63
-			'lid'	=>	(int)$lead["id"],
63
+			'lid'	=>	(int)$lead[ "id" ],
64 64
 			'screen_mode'	=> 'edit',
65 65
 		);
66 66
 		?>
67 67
 
68 68
 		<span class="edit edit_entry">
69 69
 			|
70
-		    <a title="<?php esc_attr_e( 'Edit this entry', 'gravityview'); ?>" href="<?php echo esc_url( add_query_arg( $params, admin_url( 'admin.php?page='.$query_string ) ) ); ?>"><?php esc_html_e( 'Edit', 'gravityview' ); ?></a>
70
+		    <a title="<?php esc_attr_e( 'Edit this entry', 'gravityview' ); ?>" href="<?php echo esc_url( add_query_arg( $params, admin_url( 'admin.php?page=' . $query_string ) ) ); ?>"><?php esc_html_e( 'Edit', 'gravityview' ); ?></a>
71 71
 		</span>
72 72
 		<?php
73 73
 	}
Please login to merge, or discard this patch.
includes/presets/register-default-templates.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
 		'GravityView_DataTables_Template' => array(
60 60
 			'slug' => 'dt_placeholder',
61 61
 			'label' =>  __( 'DataTables Table', 'gv-datatables', 'gravityview' ),
62
-			'description' => __('Display items in a dynamic table powered by DataTables.', 'gravityview'),
63
-			'logo' => plugins_url('assets/images/templates/logo-datatables.png', GRAVITYVIEW_FILE ),
62
+			'description' => __( 'Display items in a dynamic table powered by DataTables.', 'gravityview' ),
63
+			'logo' => plugins_url( 'assets/images/templates/logo-datatables.png', GRAVITYVIEW_FILE ),
64 64
 			'buy_source' => 'https://gravityview.co/pricing/?utm_source=plugin&utm_medium=buy_now&utm_campaign=view_type&utm_term=datatables',
65 65
 			'preview' => 'https://try.gravityview.co/demo/view/datatables/?utm_source=plugin&utm_medium=try_demo&utm_campaign=view_type&utm_term=datatables',
66 66
 			'license' => esc_html__( 'All Access', 'gravityview' ),
@@ -102,13 +102,13 @@  discard block
 block discarded – undo
102 102
 				continue;
103 103
 			}
104 104
 
105
-			$license_price_id = (int) \GV\Utils::get( $license, 'price_id', 0 );
106
-			$placeholder_price_id = (int) \GV\Utils::get( $placeholder, 'price_id' );
105
+			$license_price_id = (int)\GV\Utils::get( $license, 'price_id', 0 );
106
+			$placeholder_price_id = (int)\GV\Utils::get( $placeholder, 'price_id' );
107 107
 
108
-			$placeholder['type']     = 'custom';
109
-			$placeholder['included'] = ( $license_price_id >= $placeholder_price_id );
108
+			$placeholder[ 'type' ]     = 'custom';
109
+			$placeholder[ 'included' ] = ( $license_price_id >= $placeholder_price_id );
110 110
 
111
-			new GravityView_Placeholder_Template( $placeholder['slug'], $placeholder );
111
+			new GravityView_Placeholder_Template( $placeholder[ 'slug' ], $placeholder );
112 112
 		}
113 113
 
114 114
 	} catch ( Exception $exception ) {
Please login to merge, or discard this patch.
includes/extensions/edit-entry/class-edit-entry-admin.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
     function load() {
26 26
 
27
-        if( !is_admin() ) {
27
+        if ( ! is_admin() ) {
28 28
             return;
29 29
         }
30 30
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         add_filter( 'gravityview_template_edit_link_options', array( $this, 'edit_link_field_options' ), 10, 5 );
39 39
 
40 40
         // add tooltips
41
-        add_filter( 'gravityview/metaboxes/tooltips', array( $this, 'tooltips') );
41
+        add_filter( 'gravityview/metaboxes/tooltips', array( $this, 'tooltips' ) );
42 42
 
43 43
         // custom fields' options for zone EDIT
44 44
         add_filter( 'gravityview_template_field_options', array( $this, 'field_options' ), 10, 6 );
@@ -77,12 +77,12 @@  discard block
 block discarded – undo
77 77
      */
78 78
     function add_default_field( $entry_default_fields, $form = array(), $zone = '' ) {
79 79
 
80
-        if( $zone !== 'edit' ) {
80
+        if ( $zone !== 'edit' ) {
81 81
 
82
-            $entry_default_fields['edit_link'] = array(
83
-                'label' => __('Link to Edit Entry', 'gravityview'),
82
+            $entry_default_fields[ 'edit_link' ] = array(
83
+                'label' => __( 'Link to Edit Entry', 'gravityview' ),
84 84
                 'type' => 'edit_link',
85
-                'desc'	=> __('A link to edit the entry. Visible based on View settings.', 'gravityview'),
85
+                'desc'	=> __( 'A link to edit the entry. Visible based on View settings.', 'gravityview' ),
86 86
                 'icon' => 'dashicons-welcome-write-blog',
87 87
             );
88 88
 
@@ -107,12 +107,12 @@  discard block
 block discarded – undo
107 107
         $caps = $visibility_caps;
108 108
 
109 109
         // If we're configuring fields in the edit context, we want a limited selection
110
-        if( $context === 'edit' ) {
110
+        if ( $context === 'edit' ) {
111 111
 
112 112
             // Remove other built-in caps.
113
-            unset( $caps['publish_posts'], $caps['gravityforms_view_entries'], $caps['delete_others_posts'] );
113
+            unset( $caps[ 'publish_posts' ], $caps[ 'gravityforms_view_entries' ], $caps[ 'delete_others_posts' ] );
114 114
 
115
-            $caps['read'] = _x('Entry Creator','User capability', 'gravityview');
115
+            $caps[ 'read' ] = _x( 'Entry Creator', 'User capability', 'gravityview' );
116 116
         }
117 117
 
118 118
         return $caps;
@@ -132,20 +132,20 @@  discard block
 block discarded – undo
132 132
     function edit_link_field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
133 133
 
134 134
         // Always a link, never a filter
135
-        unset( $field_options['show_as_link'], $field_options['search_filter'] );
135
+        unset( $field_options[ 'show_as_link' ], $field_options[ 'search_filter' ] );
136 136
 
137 137
         // Edit Entry link should only appear to visitors capable of editing entries
138
-        unset( $field_options['only_loggedin'], $field_options['only_loggedin_cap'] );
138
+        unset( $field_options[ 'only_loggedin' ], $field_options[ 'only_loggedin_cap' ] );
139 139
 
140
-        $add_option['edit_link'] = array(
140
+        $add_option[ 'edit_link' ] = array(
141 141
             'type' => 'text',
142 142
             'label' => __( 'Edit Link Text', 'gravityview' ),
143 143
             'desc' => NULL,
144
-            'value' => __('Edit Entry', 'gravityview'),
144
+            'value' => __( 'Edit Entry', 'gravityview' ),
145 145
             'merge_tags' => true,
146 146
         );
147 147
 
148
-	    $add_option['new_window'] = array(
148
+	    $add_option[ 'new_window' ] = array(
149 149
 		    'type' => 'checkbox',
150 150
 		    'label' => __( 'Open link in a new tab or window?', 'gravityview' ),
151 151
 		    'value' => false,
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
 
166 166
         $return = $tooltips;
167 167
 
168
-        $return['allow_edit_cap'] = array(
169
-            'title' => __('Limiting Edit Access', 'gravityview'),
170
-            'value' => __('Change this setting if you don\'t want the user who created the entry to be able to edit this field.', 'gravityview'),
168
+        $return[ 'allow_edit_cap' ] = array(
169
+            'title' => __( 'Limiting Edit Access', 'gravityview' ),
170
+            'value' => __( 'Change this setting if you don\'t want the user who created the entry to be able to edit this field.', 'gravityview' ),
171 171
         );
172 172
 
173 173
         return $return;
@@ -188,12 +188,12 @@  discard block
 block discarded – undo
188 188
 	public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) {
189 189
 
190 190
         // We only want to modify the settings for the edit context
191
-        if( 'edit' !== $context ) {
191
+        if ( 'edit' !== $context ) {
192 192
             return $field_options;
193 193
         }
194 194
 
195 195
         //  Entry field is only for logged in users
196
-        unset( $field_options['only_loggedin'], $field_options['only_loggedin_cap'] );
196
+        unset( $field_options[ 'only_loggedin' ], $field_options[ 'only_loggedin_cap' ] );
197 197
 
198 198
         $add_options = array(
199 199
             'allow_edit_cap' => array(
Please login to merge, or discard this patch.
includes/class-data.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 		if ( ! empty( $passed_post ) ) {
22 22
 			$id_or_id_array = $this->maybe_get_view_id( $passed_post );
23
-			foreach( is_array( $id_or_id_array ) ? $id_or_id_array : array( $id_or_id_array ) as $view_id ) {
23
+			foreach ( is_array( $id_or_id_array ) ? $id_or_id_array : array( $id_or_id_array ) as $view_id ) {
24 24
 				if ( \GV\View::exists( $view_id ) && ! $this->views->contains( $view_id ) ) {
25 25
 					$this->views->add( \GV\View::by_id( $view_id ) );
26 26
 				}
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 			foreach ( $passed_post as &$post ) {
79 79
 				$views = \GV\View_Collection::from_post( $post );
80 80
 				foreach ( $views->all() as $view ) {
81
-					$ids []= $view->ID;
81
+					$ids [ ] = $view->ID;
82 82
 
83 83
 					/** And as a side-effect... add each view to the global scope. */
84 84
 					if ( ! $this->views->contains( $view->ID ) ) {
@@ -92,18 +92,18 @@  discard block
 block discarded – undo
92 92
 			if ( is_string( $passed_post ) ) {
93 93
 				$shortcodes = \GV\Shortcode::parse( $passed_post );
94 94
 				foreach ( $shortcodes as $shortcode ) {
95
-					if ( $shortcode->name == 'gravityview' && !empty( $shortcode->atts['id'] ) ) {
96
-						$ids []= $shortcode->atts['id'];
95
+					if ( $shortcode->name == 'gravityview' && ! empty( $shortcode->atts[ 'id' ] ) ) {
96
+						$ids [ ] = $shortcode->atts[ 'id' ];
97 97
 
98 98
 						/** And as a side-effect... add each view to the global scope. */
99
-						if ( ! $this->views->contains( $shortcode->atts['id'] ) && \GV\View::exists( $shortcode->atts['id'] ) ) {
100
-							$this->views->add( $shortcode->atts['id'] );
99
+						if ( ! $this->views->contains( $shortcode->atts[ 'id' ] ) && \GV\View::exists( $shortcode->atts[ 'id' ] ) ) {
100
+							$this->views->add( $shortcode->atts[ 'id' ] );
101 101
 						}
102 102
 					}
103 103
 				}
104 104
 			} else {
105 105
 				$id = $this->get_id_from_atts( $passed_post );
106
-				$ids[] = intval( $id );
106
+				$ids[ ] = intval( $id );
107 107
 			}
108 108
 		}
109 109
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
 		// If it's just one ID, return that.
115 115
 		// Otherwise, return array of IDs
116
-		return ( count( $ids ) === 1 ) ? $ids[0] : $ids;
116
+		return ( count( $ids ) === 1 ) ? $ids[ 0 ] : $ids;
117 117
 	}
118 118
 
119 119
 	/**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public static function getInstance( $passed_post = NULL ) {
123 123
 
124
-		if( empty( self::$instance ) ) {
124
+		if ( empty( self::$instance ) ) {
125 125
 			self::$instance = new GravityView_View_Data( $passed_post );
126 126
 		}
127 127
 
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
 			return array();
138 138
 		}
139 139
 		return array_combine(
140
-			array_map( function ( $view ) { return $view->ID; }, $this->views->all() ),
141
-			array_map( function ( $view ) { return $view->as_data(); }, $this->views->all() )
140
+			array_map( function( $view ) { return $view->ID; }, $this->views->all() ),
141
+			array_map( function( $view ) { return $view->as_data(); }, $this->views->all() )
142 142
 		);
143 143
 	}
144 144
 
@@ -252,22 +252,22 @@  discard block
 block discarded – undo
252 252
 	public function parse_post_content( $content ) {
253 253
 		$ids = array();
254 254
 		foreach ( \GV\Shortcode::parse( $content ) as $shortcode ) {
255
-			if ( $shortcode->name == 'gravityview' && is_numeric( $shortcode->atts['id'] ) ) {
256
-				if ( \GV\View::exists( $shortcode->atts['id'] ) && ! $this->views->contains( $shortcode->atts['id'] ) ) {
257
-					$this->views->add( \GV\View::by_id( $shortcode->atts['id'] ) );
255
+			if ( $shortcode->name == 'gravityview' && is_numeric( $shortcode->atts[ 'id' ] ) ) {
256
+				if ( \GV\View::exists( $shortcode->atts[ 'id' ] ) && ! $this->views->contains( $shortcode->atts[ 'id' ] ) ) {
257
+					$this->views->add( \GV\View::by_id( $shortcode->atts[ 'id' ] ) );
258 258
 				}
259 259
 				/**
260 260
 				 * The original function outputs the ID even though it wasn't added by ::add_view()
261 261
 				 * Wether this is a bug or not remains a mystery. But we need to emulate this behavior
262 262
 				 * until better times.
263 263
 				 */
264
-				$ids []= $shortcode->atts['id'];
264
+				$ids [ ] = $shortcode->atts[ 'id' ];
265 265
 			}
266 266
 		}
267 267
 		if ( empty ( $ids ) ) {
268 268
 			return null;
269 269
 		}
270
-		return ( sizeof( $ids ) === 1 ) ? $ids[0] : $ids;
270
+		return ( sizeof( $ids ) === 1 ) ? $ids[ 0 ] : $ids;
271 271
 	}
272 272
 
273 273
 	/**
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 		// Not invalid if not set!
291 291
 		if ( empty( $post_id ) || empty( $view_id ) ) {
292 292
 
293
-			if( $empty_is_valid ) {
293
+			if ( $empty_is_valid ) {
294 294
 				return true;
295 295
 			}
296 296
 
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 			$view_ids_in_post = array_map( function( $view ) { return $view->ID; }, $views->all() );
324 324
 
325 325
 			// The post or page specified does not contain the shortcode.
326
-			if ( false === in_array( $view_id, (array) $view_ids_in_post ) ) {
326
+			if ( false === in_array( $view_id, (array)$view_ids_in_post ) ) {
327 327
 				$message = sprintf( esc_html__( 'The Post ID entered is not valid. You may have entered a post or page that does not contain the selected View. Make sure the post contains the following shortcode: %s', 'gravityview' ), '<br /><code>[gravityview id="' . intval( $view_id ) . '"]</code>' );
328 328
 			}
329 329
 		}
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 		if ( ! $message ) {
332 332
 			// It's a View
333 333
 			if ( \GV\View::exists( $post_id ) ) {
334
-				$message = esc_html__( 'The ID is already a View.', 'gravityview' );;
334
+				$message = esc_html__( 'The ID is already a View.', 'gravityview' ); ;
335 335
 			}
336 336
 		}
337 337
 
Please login to merge, or discard this patch.
includes/class-admin-welcome.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
 	 * @since 1.0
34 34
 	 */
35 35
 	public function __construct() {
36
-		add_action( 'admin_menu', array( $this, 'admin_menus'), 200 );
36
+		add_action( 'admin_menu', array( $this, 'admin_menus' ), 200 );
37 37
 		add_action( 'admin_head', array( $this, 'admin_head' ) );
38
-		add_action( 'admin_init', array( $this, 'welcome'    ) );
39
-		add_filter( 'gravityview_is_admin_page', array( $this, 'is_dashboard_page'), 10, 2 );
38
+		add_action( 'admin_init', array( $this, 'welcome' ) );
39
+		add_filter( 'gravityview_is_admin_page', array( $this, 'is_dashboard_page' ), 10, 2 );
40 40
 	}
41 41
 
42 42
 	/**
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
 		// Add help page to GravityView menu
52 52
 		add_submenu_page(
53 53
 			'edit.php?post_type=gravityview',
54
-			__('GravityView: Getting Started', 'gravityview'),
55
-			__('Getting Started', 'gravityview'),
54
+			__( 'GravityView: Getting Started', 'gravityview' ),
55
+			__( 'Getting Started', 'gravityview' ),
56 56
 			$this->minimum_capability,
57 57
 			'gv-getting-started',
58 58
 			array( $this, 'getting_started_screen' )
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
 	 *
86 86
 	 * @return boolean  $is_page   True: yep; false: nope
87 87
 	 */
88
-	public function is_dashboard_page($is_page = false, $hook = NULL) {
88
+	public function is_dashboard_page( $is_page = false, $hook = NULL ) {
89 89
 		global $plugin_page;
90 90
 
91
-		if($is_page) { return $is_page; }
91
+		if ( $is_page ) { return $is_page; }
92 92
 
93 93
 		return in_array( $plugin_page, array( 'gv-about', 'gv-credits', 'gv-getting-started' ) );
94 94
 	}
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 		remove_submenu_page( 'edit.php?post_type=gravityview', 'gv-credits' );
106 106
 		remove_submenu_page( 'edit.php?post_type=gravityview', 'gv-changelog' );
107 107
 
108
-		if( !$this->is_dashboard_page() ) { return; }
108
+		if ( ! $this->is_dashboard_page() ) { return; }
109 109
 
110 110
 		?>
111 111
 		<style type="text/css" media="screen" xmlns="http://www.w3.org/1999/html">
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 		// Don't fetch -beta, etc.
129 129
 		list( $display_version ) = explode( '-', GravityView_Plugin::version );
130 130
 
131
-		$selected = !empty( $plugin_page ) ? $plugin_page : 'gv-getting-started';
131
+		$selected = ! empty( $plugin_page ) ? $plugin_page : 'gv-getting-started';
132 132
 
133 133
 		echo gravityview_get_floaty( 132 );
134 134
 		?>
@@ -137,13 +137,13 @@  discard block
 block discarded – undo
137 137
 		<div class="about-text"><?php esc_html_e( 'Thank you for installing GravityView. Beautifully display your Gravity Forms entries.', 'gravityview' ); ?></div>
138 138
 
139 139
 		<h2 class="nav-tab-wrapper clear">
140
-			<a class="nav-tab <?php echo $selected == 'gv-getting-started' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'gv-getting-started', 'post_type' => 'gravityview'), 'edit.php' ) ) ); ?>">
140
+			<a class="nav-tab <?php echo $selected == 'gv-getting-started' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'gv-getting-started', 'post_type' => 'gravityview' ), 'edit.php' ) ) ); ?>">
141 141
 				<?php _e( "Getting Started", 'gravityview' ); ?>
142 142
 			</a>
143
-			<a class="nav-tab <?php echo $selected == 'gv-changelog' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'gv-changelog', 'post_type' => 'gravityview'), 'edit.php' ) ) ); ?>">
143
+			<a class="nav-tab <?php echo $selected == 'gv-changelog' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'gv-changelog', 'post_type' => 'gravityview' ), 'edit.php' ) ) ); ?>">
144 144
 				<?php _e( "List of Changes", 'gravityview' ); ?>
145 145
 			</a>
146
-			<a class="nav-tab <?php echo $selected == 'gv-credits' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'gv-credits', 'post_type' => 'gravityview'), 'edit.php' ) ) ); ?>">
146
+			<a class="nav-tab <?php echo $selected == 'gv-credits' ? 'nav-tab-active' : ''; ?>" href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'gv-credits', 'post_type' => 'gravityview' ), 'edit.php' ) ) ); ?>">
147 147
 				<?php _e( 'Credits', 'gravityview' ); ?>
148 148
 			</a>
149 149
 		</h2>
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 					<h3>Create a View</h3>
178 178
 
179 179
 					<ol class="ol-decimal">
180
-						<li>Go to <a href="<?php echo admin_url('post-new.php?post_type=gravityview'); ?>">Views &gt; New View</a></li>
180
+						<li>Go to <a href="<?php echo admin_url( 'post-new.php?post_type=gravityview' ); ?>">Views &gt; New View</a></li>
181 181
 						<li>If you want to <strong>create a new form</strong>, click the "Use a Form Preset" button</li>
182 182
 						<li>If you want to <strong>use an existing form&rsquo;s entries</strong>, select from the dropdown.</li>
183 183
 						<li>Select the type of View you would like to create. There are two core types of Views: <strong>Table</strong> and <strong>Listing</strong>.
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
 					</ul>
632 632
 
633 633
 					<h4><?php esc_attr_e( 'Want to contribute?', 'gravityview' ); ?></h4>
634
-					<p><?php echo sprintf( esc_attr__( 'If you want to contribute to the code, %syou can on Github%s. If your contributions are accepted, you will be thanked here.', 'gravityview'), '<a href="https://github.com/gravityview/GravityView">', '</a>' ); ?></p>
634
+					<p><?php echo sprintf( esc_attr__( 'If you want to contribute to the code, %syou can on Github%s. If your contributions are accepted, you will be thanked here.', 'gravityview' ), '<a href="https://github.com/gravityview/GravityView">', '</a>' ); ?></p>
635 635
 				</div>
636 636
 			</div>
637 637
 
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
 		global $plugin_page;
674 674
 
675 675
 		// Bail if we're just editing the plugin
676
-		if( $plugin_page === 'plugin-editor.php' ) { return; }
676
+		if ( $plugin_page === 'plugin-editor.php' ) { return; }
677 677
 
678 678
 		// Bail if no activation redirect
679 679
 		if ( ! get_transient( '_gv_activation_redirect' ) ) { return; }
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
 		$upgrade = get_option( 'gv_version_upgraded_from' );
685 685
 
686 686
 		// Don't do anything if they've already seen the new version info
687
-		if( $upgrade === GravityView_Plugin::version ) {
687
+		if ( $upgrade === GravityView_Plugin::version ) {
688 688
 			return;
689 689
 		}
690 690
 
@@ -692,10 +692,10 @@  discard block
 block discarded – undo
692 692
 		update_option( 'gv_version_upgraded_from', GravityView_Plugin::version );
693 693
 
694 694
 		// Bail if activating from network, or bulk
695
-		if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) { return; }
695
+		if ( is_network_admin() || isset( $_GET[ 'activate-multi' ] ) ) { return; }
696 696
 
697 697
 		// First time install
698
-		if( ! $upgrade ) {
698
+		if ( ! $upgrade ) {
699 699
 			wp_safe_redirect( admin_url( 'edit.php?post_type=gravityview&page=gv-getting-started' ) ); exit;
700 700
 		}
701 701
 		// Update
Please login to merge, or discard this patch.
future/includes/class-gv-settings-view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 		if ( ! $detailed ) {
556 556
 			$defaults = array();
557 557
 			foreach ( $default_settings as $key => $value ) {
558
-				$defaults[ $key ] = $value['value'];
558
+				$defaults[ $key ] = $value[ 'value' ];
559 559
 			}
560 560
 			return $defaults;
561 561
 
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
 				// If the $group argument is set for the method,
567 567
 				// ignore any settings that aren't in that group.
568 568
 				if ( ! empty( $group ) && is_string( $group ) ) {
569
-					if ( empty( $value['group'] ) || $value['group'] !== $group ) {
569
+					if ( empty( $value[ 'group' ] ) || $value[ 'group' ] !== $group ) {
570 570
 						unset( $default_settings[ $key ] );
571 571
 					}
572 572
 				}
Please login to merge, or discard this patch.