Completed
Push — master ( 3ac4b1...21157a )
by Zack
05:18
created
templates/list-body.php 2 patches
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -14,10 +14,10 @@  discard block
 block discarded – undo
14 14
  * @action `gravityview_list_body_before` Tap in before the entry loop has been displayed
15 15
  * @param GravityView_View $this The GravityView_View instance
16 16
  */
17
-do_action( 'gravityview_list_body_before', $this );
17
+do_action('gravityview_list_body_before', $this);
18 18
 
19 19
 // There are no entries.
20
-if( ! $this->getTotalEntries() ) {
20
+if (!$this->getTotalEntries()) {
21 21
 
22 22
 	?>
23 23
 	<div class="gv-list-view gv-no-results">
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 } else {
31 31
 
32 32
 	// There are entries. Loop through them.
33
-	foreach ( $this->getEntries() as $entry ) {
33
+	foreach ($this->getEntries() as $entry) {
34 34
 
35
-		$this->setCurrentEntry( $entry );
35
+		$this->setCurrentEntry($entry);
36 36
 
37 37
 	?>
38 38
 
39
-		<div id="gv_list_<?php echo $entry['id']; ?>" class="<?php echo esc_attr( apply_filters( 'gravityview_entry_class', 'gv-list-view', $entry, $this ) ); ?>">
39
+		<div id="gv_list_<?php echo $entry['id']; ?>" class="<?php echo esc_attr(apply_filters('gravityview_entry_class', 'gv-list-view', $entry, $this)); ?>">
40 40
 
41 41
 		<?php
42 42
 
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 		 * @param array $entry Gravity Forms Entry array
46 46
 		 * @param GravityView_View $this The GravityView_View instance
47 47
 		 */
48
-		do_action( 'gravityview_entry_before', $entry, $this );
48
+		do_action('gravityview_entry_before', $entry, $this);
49 49
 
50 50
 		?>
51 51
 
52
-		<?php if ( $this->getField('directory_list-title') || $this->getField('directory_list-subtitle') ) { ?>
52
+		<?php if ($this->getField('directory_list-title') || $this->getField('directory_list-subtitle')) { ?>
53 53
 
54 54
 			<?php
55 55
 
@@ -58,33 +58,33 @@  discard block
 block discarded – undo
58 58
 			 * @param array $entry Gravity Forms Entry array
59 59
 			 * @param GravityView_View $this The GravityView_View instance
60 60
 			 */
61
-			do_action( 'gravityview_entry_title_before', $entry, $this );
61
+			do_action('gravityview_entry_title_before', $entry, $this);
62 62
 
63 63
 			?>
64 64
 			<div class="gv-list-view-title">
65 65
 
66
-				<?php if ( $this->getField('directory_list-title') ) {
66
+				<?php if ($this->getField('directory_list-title')) {
67 67
 					$i          = 0;
68 68
 					$title_args = array(
69 69
 						'entry'      => $entry,
70 70
 						'form'       => $this->getForm(),
71
-						'hide_empty' => $this->getAtts( 'hide_empty' ),
71
+						'hide_empty' => $this->getAtts('hide_empty'),
72 72
 					);
73 73
 
74
-					foreach ( $this->getField( 'directory_list-title' ) as $field ) {
74
+					foreach ($this->getField('directory_list-title') as $field) {
75 75
 						$title_args['field'] = $field;
76 76
 
77 77
 						// The first field in the title zone is the main
78
-						if ( $i == 0 ) {
78
+						if ($i == 0) {
79 79
 							$title_args['markup'] = '<h3 id="{{ field_id }}" class="{{class}}">{{label}}{{value}}</h3>';
80
-							echo gravityview_field_output( $title_args );
81
-							unset( $title_args['markup'] );
80
+							echo gravityview_field_output($title_args);
81
+							unset($title_args['markup']);
82 82
 						} else {
83 83
 							$title_args['wpautop'] = true;
84
-							echo gravityview_field_output( $title_args );
84
+							echo gravityview_field_output($title_args);
85 85
 						}
86 86
 
87
-						$i ++;
87
+						$i++;
88 88
 					}
89 89
 				}
90 90
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 			 * @param array $entry Gravity Forms Entry array
103 103
 			 * @param GravityView_View $this The GravityView_View instance
104 104
 			 */
105
-			do_action( 'gravityview_entry_title_after', $entry, $this );
105
+			do_action('gravityview_entry_title_after', $entry, $this);
106 106
 
107 107
 			?>
108 108
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 				 * @param array $entry Gravity Forms Entry array
118 118
 				 * @param GravityView_View $this The GravityView_View instance
119 119
 				 */
120
-				do_action( 'gravityview_entry_content_before', $entry, $this );
120
+				do_action('gravityview_entry_content_before', $entry, $this);
121 121
 
122 122
 				$this->renderZone('image', 'wrapper_class="gv-grid-col-1-3 gv-list-view-content-image"');
123 123
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 				 * @param array $entry Gravity Forms Entry array
138 138
 				 * @param GravityView_View $this The GravityView_View instance
139 139
 				 */
140
-				do_action( 'gravityview_entry_content_after', $entry, $this );
140
+				do_action('gravityview_entry_content_after', $entry, $this);
141 141
 
142 142
 			?>
143 143
 
@@ -146,14 +146,14 @@  discard block
 block discarded – undo
146 146
 		<?php
147 147
 
148 148
 		// Is the footer configured?
149
-		if ( $this->getField('directory_list-footer-left') || $this->getField('directory_list-footer-right') ) {
149
+		if ($this->getField('directory_list-footer-left') || $this->getField('directory_list-footer-right')) {
150 150
 
151 151
 			/**
152 152
 			 * @action `gravityview_entry_footer_before` Tap in before the footer wrapper
153 153
 			 * @param array $entry Gravity Forms Entry array
154 154
 			 * @param GravityView_View $this The GravityView_View instance
155 155
 			 */
156
-			do_action( 'gravityview_entry_footer_before', $entry, $this );
156
+			do_action('gravityview_entry_footer_before', $entry, $this);
157 157
 
158 158
 			?>
159 159
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 			 * @param array $entry Gravity Forms Entry array
175 175
 			 * @param GravityView_View $this The GravityView_View instance
176 176
 			 */
177
-			do_action( 'gravityview_entry_footer_after', $entry, $this );
177
+			do_action('gravityview_entry_footer_after', $entry, $this);
178 178
 
179 179
 		} // End if footer is configured
180 180
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 		 * @param array $entry Gravity Forms Entry array
185 185
 		 * @param GravityView_View $this The GravityView_View instance
186 186
 		 */
187
-		do_action( 'gravityview_entry_after', $entry, $this );
187
+		do_action('gravityview_entry_after', $entry, $this);
188 188
 
189 189
 		?>
190 190
 
@@ -198,4 +198,4 @@  discard block
 block discarded – undo
198 198
  * @action `gravityview_list_body_after` Tap in after the entry loop has been displayed
199 199
  * @param GravityView_View $this The GravityView_View instance
200 200
  */
201
-do_action( 'gravityview_list_body_after', $this );
201
+do_action('gravityview_list_body_after', $this);
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * @file templates/list-body.php
4
- *
5
- * Display the entries loop when using a list layout
6
- *
7
- * @package GravityView
8
- * @subpackage GravityView/templates
9
- *
10
- * @global GravityView_View $this
11
- */
3
+			 * @file templates/list-body.php
4
+			 *
5
+			 * Display the entries loop when using a list layout
6
+			 *
7
+			 * @package GravityView
8
+			 * @subpackage GravityView/templates
9
+			 *
10
+			 * @global GravityView_View $this
11
+			 */
12 12
 
13 13
 /**
14 14
  * @action `gravityview_list_body_before` Tap in before the entry loop has been displayed
Please login to merge, or discard this patch.
templates/list-single.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -12,31 +12,31 @@  discard block
 block discarded – undo
12 12
 
13 13
 <div class="gv-container gv-list-single-container gv-list-container">
14 14
 	<p class="gv-back-link"><?php echo gravityview_back_link(); ?></p>
15
-	<?php foreach ( $this->getEntries() as $entry ) {
16
-		$this->setCurrentEntry( $entry );
15
+	<?php foreach ($this->getEntries() as $entry) {
16
+		$this->setCurrentEntry($entry);
17 17
 	?>
18 18
 
19 19
 		<div id="gv_list_<?php echo $entry['id']; ?>" class="gv-list-view">
20 20
 	<?php
21 21
 
22
-	if ( $this->getFields( 'single_list-title' ) || $this->getFields( 'single_list-subtitle' ) ) { ?>
22
+	if ($this->getFields('single_list-title') || $this->getFields('single_list-subtitle')) { ?>
23 23
 		<div class="gv-list-view-title">
24 24
 		<?php
25
-		if ( $fields = $this->getFields( 'single_list-title' ) ) {
25
+		if ($fields = $this->getFields('single_list-title')) {
26 26
 			$i = 0;
27 27
 			$title_args = array(
28 28
 				'entry' => $entry,
29 29
 				'form' => $this->form,
30 30
 				'hide_empty' => $this->atts['hide_empty'],
31 31
 			);
32
-			foreach ( $fields as $field ) {
32
+			foreach ($fields as $field) {
33 33
 				$title_args['field'] = $field;
34
-				if ( 0 === $i ) {
34
+				if (0 === $i) {
35 35
 					$title_args['markup'] = '<h3 id="{{ field_id }}" class="{{class}}">{{label}}{{value}}</h3>';
36
-					echo gravityview_field_output( $title_args );
36
+					echo gravityview_field_output($title_args);
37 37
 				} else {
38 38
 					$title_args['wpautop'] = true;
39
-					echo gravityview_field_output( $title_args );
39
+					echo gravityview_field_output($title_args);
40 40
 				}
41 41
 				$i++;
42 42
 			}
@@ -75,14 +75,14 @@  discard block
 block discarded – undo
75 75
 			?>
76 76
 		</div>
77 77
 
78
-		<?php if ( $this->getFields( 'single_list-footer-left' ) || $this->getFields( 'single_list-footer-right' ) ) { ?>
78
+		<?php if ($this->getFields('single_list-footer-left') || $this->getFields('single_list-footer-right')) { ?>
79 79
 			<div class="gv-grid gv-list-view-footer">
80 80
 				<div class="gv-grid-col-1-2 gv-left">
81
-					<?php $this->renderZone( 'footer-left' ); ?>
81
+					<?php $this->renderZone('footer-left'); ?>
82 82
 				</div>
83 83
 
84 84
 				<div class="gv-grid-col-1-2 gv-right">
85
-					<?php $this->renderZone( 'footer-right' ); ?>
85
+					<?php $this->renderZone('footer-right'); ?>
86 86
 				</div>
87 87
 			</div>
88 88
 		<?php } ?>
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Display a single entry when using a list template
4
- *
5
- * @package GravityView
6
- * @subpackage GravityView/templates
7
- *
8
- * @global GravityView_View $this
9
- */
3
+	 * Display a single entry when using a list template
4
+	 *
5
+	 * @package GravityView
6
+	 * @subpackage GravityView/templates
7
+	 *
8
+	 * @global GravityView_View $this
9
+	 */
10 10
 ?>
11 11
 <?php gravityview_before(); ?>
12 12
 
Please login to merge, or discard this patch.
templates/table-body.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -11,28 +11,28 @@  discard block
 block discarded – undo
11 11
 	<tbody>
12 12
 		<?php
13 13
 
14
-		do_action('gravityview_table_body_before', $this );
14
+		do_action('gravityview_table_body_before', $this);
15 15
 
16
-		if( 0 === $this->getTotalEntries() ) {
16
+		if (0 === $this->getTotalEntries()) {
17 17
 
18 18
 			$directory_table_columns = $this->getFields('directory_table-columns');
19 19
 			?>
20 20
 			<tr>
21
-				<?php do_action('gravityview_table_tr_before', $this ); ?>
22
-				<td colspan="<?php echo $directory_table_columns ? sizeof( $directory_table_columns ) : ''; ?>" class="gv-no-results">
21
+				<?php do_action('gravityview_table_tr_before', $this); ?>
22
+				<td colspan="<?php echo $directory_table_columns ? sizeof($directory_table_columns) : ''; ?>" class="gv-no-results">
23 23
 					<?php echo gv_no_results(); ?>
24 24
 				</td>
25
-				<?php do_action('gravityview_table_tr_after', $this ); ?>
25
+				<?php do_action('gravityview_table_tr_after', $this); ?>
26 26
 			</tr>
27 27
 		<?php
28 28
 		} else {
29 29
 
30
-			foreach( $this->getEntries() as $entry ) :
30
+			foreach ($this->getEntries() as $entry) :
31 31
 
32
-				$this->setCurrentEntry( $entry );
32
+				$this->setCurrentEntry($entry);
33 33
 
34 34
 				// Add `alt` class to alternate rows
35
-				$alt = empty( $alt ) ? 'alt' : '';
35
+				$alt = empty($alt) ? 'alt' : '';
36 36
 
37 37
 				/**
38 38
 				 * @filter `gravityview_entry_class` Modify the class applied to the entry row
@@ -40,18 +40,18 @@  discard block
 block discarded – undo
40 40
 				 * @param array $entry Current entry being displayed
41 41
 				 * @param GravityView_View $this Current GravityView_View object
42 42
 				 */
43
-				$class = apply_filters( 'gravityview_entry_class', $alt, $entry, $this );
43
+				$class = apply_filters('gravityview_entry_class', $alt, $entry, $this);
44 44
 		?>
45
-				<tr<?php echo ' class="'.esc_attr( $class ).'"'; ?>>
45
+				<tr<?php echo ' class="'.esc_attr($class).'"'; ?>>
46 46
 		<?php
47
-					do_action('gravityview_table_cells_before', $this );
47
+					do_action('gravityview_table_cells_before', $this);
48 48
 
49
-					$this->renderZone( 'columns', array(
49
+					$this->renderZone('columns', array(
50 50
 						'markup' => '<td id="{{ field_id }}" class="{{class}}">{{value}}</td>',
51 51
 						'hide_empty' => false, // Always show <td>
52 52
 					));
53 53
 
54
-					do_action('gravityview_table_cells_after', $this );
54
+					do_action('gravityview_table_cells_after', $this);
55 55
 		?>
56 56
 				</tr>
57 57
 			<?php
@@ -59,6 +59,6 @@  discard block
 block discarded – undo
59 59
 
60 60
 		}
61 61
 
62
-		do_action('gravityview_table_body_after', $this );
62
+		do_action('gravityview_table_body_after', $this);
63 63
 	?>
64 64
 	</tbody>
Please login to merge, or discard this patch.
templates/table-footer.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 		<tr>
13 13
 			<?php
14 14
 
15
-			$this->renderZone( 'columns', array(
15
+			$this->renderZone('columns', array(
16 16
 				'markup' => '<th id="{{ field_id }}" class="{{class}}">{{label}}</th>',
17 17
 				'hide_empty' => false, // Always show <th>
18 18
 			));
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Display below the entries loop when using a table layout
4
- *
5
- * @package GravityView
6
- * @subpackage GravityView/templates
7
- *
8
- * @global GravityView_View $this
9
- */
3
+			 * Display below the entries loop when using a table layout
4
+			 *
5
+			 * @package GravityView
6
+			 * @subpackage GravityView/templates
7
+			 *
8
+			 * @global GravityView_View $this
9
+			 */
10 10
 ?>
11 11
 	<tfoot>
12 12
 		<tr>
Please login to merge, or discard this patch.
templates/table-header.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 				// Make sure this wasn't overridden by search
20 20
 				$this->setTemplatePartSlug('table');
21 21
 
22
-				$this->renderZone( 'columns', array(
22
+				$this->renderZone('columns', array(
23 23
 					'markup' => '<th id="{{ field_id }}" class="{{class}}" style="{{width:style}}">{{label}}</th>',
24 24
 					'hide_empty' => false, // Always show <th>
25 25
 				));
Please login to merge, or discard this patch.
templates/table-single.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 <div class="gv-table-view gv-container gv-table-single-container">
16 16
 	<table class="gv-table-view-content">
17
-		<?php if( $this->getFields('single_table-columns') ) { ?>
17
+		<?php if ($this->getFields('single_table-columns')) { ?>
18 18
 			<thead>
19 19
 				<?php gravityview_header(); ?>
20 20
 			</thead>
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 							<td>{{value}}</td>
28 28
 						</tr>';
29 29
 
30
-					$this->renderZone( 'columns', array(
30
+					$this->renderZone('columns', array(
31 31
 						'markup' => $markup,
32 32
 					));
33 33
 			?>
Please login to merge, or discard this patch.
uninstall.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // If uninstall not called from WordPress, then exit
13
-if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
13
+if (!defined('WP_UNINSTALL_PLUGIN')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -25,16 +25,16 @@  discard block
 block discarded – undo
25 25
 	public function __construct() {
26 26
 
27 27
 		/** @define "$file_path" "./" */
28
-		$file_path = plugin_dir_path( __FILE__ );
28
+		$file_path = plugin_dir_path(__FILE__);
29 29
 
30
-		include_once $file_path . 'includes/class-gravityview-roles-capabilities.php';
30
+		include_once $file_path.'includes/class-gravityview-roles-capabilities.php';
31 31
 
32 32
 		/**
33 33
 		 * Only delete content and settings if "Delete on Uninstall?" setting is "Permanently Delete"
34 34
 		 */
35 35
 		$delete = $this->get_delete_setting();
36 36
 
37
-		if( GravityView_Roles_Capabilities::has_cap( 'gravityview_uninstall' ) && 'delete' === $delete ) {
37
+		if (GravityView_Roles_Capabilities::has_cap('gravityview_uninstall') && 'delete' === $delete) {
38 38
 			$this->fire_everything();
39 39
 		}
40 40
 	}
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	 */
49 49
 	private function get_delete_setting() {
50 50
 
51
-		$settings = get_option( $this->settings_name, array() );
51
+		$settings = get_option($this->settings_name, array());
52 52
 
53
-		return isset( $settings[ 'delete-on-uninstall' ] ) ? $settings[ 'delete-on-uninstall' ] : null;
53
+		return isset($settings['delete-on-uninstall']) ? $settings['delete-on-uninstall'] : null;
54 54
 	}
55 55
 
56 56
 	/**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	private function delete_entry_meta() {
76 76
 		global $wpdb;
77 77
 
78
-		$meta_table = class_exists( 'GFFormsModel' ) ? GFFormsModel::get_lead_meta_table_name() : $wpdb->prefix . 'rg_lead_meta';
78
+		$meta_table = class_exists('GFFormsModel') ? GFFormsModel::get_lead_meta_table_name() : $wpdb->prefix.'rg_lead_meta';
79 79
 
80 80
 		$sql = "
81 81
 			DELETE FROM $meta_table
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 			);
85 85
 		";
86 86
 
87
-		$wpdb->query( $sql );
87
+		$wpdb->query($sql);
88 88
 	}
89 89
 
90 90
 	/**
@@ -95,21 +95,21 @@  discard block
 block discarded – undo
95 95
 	private function delete_entry_notes() {
96 96
 		global $wpdb;
97 97
 
98
-		$notes_table = class_exists( 'GFFormsModel' ) ? GFFormsModel::get_lead_notes_table_name() : $wpdb->prefix . 'rg_lead_notes';
98
+		$notes_table = class_exists('GFFormsModel') ? GFFormsModel::get_lead_notes_table_name() : $wpdb->prefix.'rg_lead_notes';
99 99
 
100 100
 		$disapproved = __('Disapproved the Entry for GravityView', 'gravityview');
101 101
 		$approved = __('Approved the Entry for GravityView', 'gravityview');
102 102
 
103
-		$sql = $wpdb->prepare( "
103
+		$sql = $wpdb->prepare("
104 104
 			DELETE FROM $notes_table
105 105
             WHERE (
106 106
                 `note_type` = 'gravityview' OR
107 107
 				`value` = %s OR
108 108
 				`value` = %s
109 109
             );
110
-        ", $approved, $disapproved );
110
+        ", $approved, $disapproved);
111 111
 
112
-		$wpdb->query( $sql );
112
+		$wpdb->query($sql);
113 113
 	}
114 114
 
115 115
 	/**
@@ -128,16 +128,16 @@  discard block
 block discarded – undo
128 128
 	 */
129 129
 	private function delete_posts() {
130 130
 
131
-		$items = get_posts( array(
131
+		$items = get_posts(array(
132 132
 			'post_type' => 'gravityview',
133 133
 			'post_status' => 'any',
134 134
 			'numberposts' => -1,
135 135
 			'fields' => 'ids'
136
-		) );
136
+		));
137 137
 
138
-		if ( $items ) {
139
-			foreach ( $items as $item ) {
140
-				wp_delete_post( $item, true );
138
+		if ($items) {
139
+			foreach ($items as $item) {
140
+				wp_delete_post($item, true);
141 141
 			}
142 142
 		}
143 143
 	}
@@ -149,15 +149,15 @@  discard block
 block discarded – undo
149 149
 	 */
150 150
 	private function delete_options() {
151 151
 
152
-		delete_option( 'gravityformsaddon_gravityview_app_settings' );
153
-		delete_option( 'gravityformsaddon_gravityview_version' );
154
-		delete_option( 'gravityview_cache_blacklist' );
152
+		delete_option('gravityformsaddon_gravityview_app_settings');
153
+		delete_option('gravityformsaddon_gravityview_version');
154
+		delete_option('gravityview_cache_blacklist');
155 155
 
156
-		delete_transient( 'gravityview_edd-activate_valid' );
157
-		delete_transient( 'gravityview_edd-deactivate_valid' );
158
-		delete_transient( 'gravityview_dismissed_notices' );
156
+		delete_transient('gravityview_edd-activate_valid');
157
+		delete_transient('gravityview_edd-deactivate_valid');
158
+		delete_transient('gravityview_dismissed_notices');
159 159
 
160
-		delete_site_transient( 'gravityview_related_plugins' );
160
+		delete_site_transient('gravityview_related_plugins');
161 161
 	}
162 162
 }
163 163
 
Please login to merge, or discard this patch.
includes/class-admin-welcome.php 3 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,9 @@
 block discarded – undo
4 4
 //set_site_transient( 'update_plugins', null );
5 5
 
6 6
 // Exit if accessed directly
7
-if ( ! defined( 'ABSPATH' ) ) exit;
7
+if ( ! defined( 'ABSPATH' ) ) {
8
+	exit;
9
+}
8 10
 
9 11
 /**
10 12
  * Allows plugins to use their own update API.
Please login to merge, or discard this patch.
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  */
13 13
 
14 14
 // Exit if accessed directly
15
-if ( ! defined( 'ABSPATH' ) ) exit;
15
+if (!defined('ABSPATH')) exit;
16 16
 
17 17
 /**
18 18
  * GravityView_Welcome Class
@@ -34,10 +34,10 @@  discard block
 block discarded – undo
34 34
 	 * @since 1.0
35 35
 	 */
36 36
 	public function __construct() {
37
-		add_action( 'admin_menu', array( $this, 'admin_menus'), 200 );
38
-		add_action( 'admin_head', array( $this, 'admin_head' ) );
39
-		add_action( 'admin_init', array( $this, 'welcome'    ) );
40
-		add_filter( 'gravityview_is_admin_page', array( $this, 'is_dashboard_page'), 10, 2 );
37
+		add_action('admin_menu', array($this, 'admin_menus'), 200);
38
+		add_action('admin_head', array($this, 'admin_head'));
39
+		add_action('admin_init', array($this, 'welcome'));
40
+		add_filter('gravityview_is_admin_page', array($this, 'is_dashboard_page'), 10, 2);
41 41
 	}
42 42
 
43 43
 	/**
@@ -57,27 +57,27 @@  discard block
 block discarded – undo
57 57
 			__('Getting Started', 'gravityview'),
58 58
 			$this->minimum_capability,
59 59
 			'gv-getting-started',
60
-			array( $this, 'getting_started_screen' )
60
+			array($this, 'getting_started_screen')
61 61
 		);
62 62
 
63 63
 		// Changelog Page
64 64
 		add_submenu_page(
65 65
 			'edit.php?post_type=gravityview',
66
-			__( 'Changelog', 'gravityview' ),
67
-			__( 'Changelog', 'gravityview' ),
66
+			__('Changelog', 'gravityview'),
67
+			__('Changelog', 'gravityview'),
68 68
 			$this->minimum_capability,
69 69
 			'gv-changelog',
70
-			array( $this, 'changelog_screen' )
70
+			array($this, 'changelog_screen')
71 71
 		);
72 72
 
73 73
 		// Credits Page
74 74
 		add_submenu_page(
75 75
 			'edit.php?post_type=gravityview',
76
-			__( 'Credits', 'gravityview' ),
77
-			__( 'Credits', 'gravityview' ),
76
+			__('Credits', 'gravityview'),
77
+			__('Credits', 'gravityview'),
78 78
 			$this->minimum_capability,
79 79
 			'gv-credits',
80
-			array( $this, 'credits_screen' )
80
+			array($this, 'credits_screen')
81 81
 		);
82 82
 
83 83
 	}
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
 	public function is_dashboard_page($is_page = false, $hook = NULL) {
91 91
 		global $plugin_page;
92 92
 
93
-		if($is_page) { return $is_page; }
93
+		if ($is_page) { return $is_page; }
94 94
 
95
-		return in_array( $plugin_page, array( 'gv-about', 'gv-credits', 'gv-getting-started' ) );
95
+		return in_array($plugin_page, array('gv-about', 'gv-credits', 'gv-getting-started'));
96 96
 	}
97 97
 
98 98
 	/**
@@ -105,10 +105,10 @@  discard block
 block discarded – undo
105 105
 	public function admin_head() {
106 106
 		global $plugin_page;
107 107
 
108
-		remove_submenu_page( 'edit.php?post_type=gravityview', 'gv-credits' );
109
-		remove_submenu_page( 'edit.php?post_type=gravityview', 'gv-changelog' );
108
+		remove_submenu_page('edit.php?post_type=gravityview', 'gv-credits');
109
+		remove_submenu_page('edit.php?post_type=gravityview', 'gv-changelog');
110 110
 
111
-		if( !$this->is_dashboard_page() ) { return; }
111
+		if (!$this->is_dashboard_page()) { return; }
112 112
 
113 113
 		?>
114 114
 		<style type="text/css" media="screen">
@@ -139,23 +139,23 @@  discard block
 block discarded – undo
139 139
 		global $plugin_page;
140 140
 
141 141
 		// Don't fetch -beta, etc.
142
-		list( $display_version ) = explode( '-', GravityView_Plugin::version );
142
+		list($display_version) = explode('-', GravityView_Plugin::version);
143 143
 
144
-		$selected = !empty( $plugin_page ) ? $plugin_page : 'gv-getting-started';
144
+		$selected = !empty($plugin_page) ? $plugin_page : 'gv-getting-started';
145 145
 		?>
146 146
 
147
-		<h1><img class="alignleft" src="<?php echo plugins_url( 'assets/images/astronaut-200x263.png', GRAVITYVIEW_FILE ); ?>" width="100" height="132" /><?php printf( esc_html__( 'Welcome to GravityView %s', 'gravityview' ), $display_version ); ?></h1>
148
-		<div class="about-text"><?php esc_html_e( 'Thank you for installing GravityView. Beautifully display your Gravity Forms entries.', 'gravityview' ); ?></div>
147
+		<h1><img class="alignleft" src="<?php echo plugins_url('assets/images/astronaut-200x263.png', GRAVITYVIEW_FILE); ?>" width="100" height="132" /><?php printf(esc_html__('Welcome to GravityView %s', 'gravityview'), $display_version); ?></h1>
148
+		<div class="about-text"><?php esc_html_e('Thank you for installing GravityView. Beautifully display your Gravity Forms entries.', 'gravityview'); ?></div>
149 149
 
150 150
 		<h2 class="nav-tab-wrapper clear">
151
-			<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' ) ) ); ?>">
152
-				<?php _e( "Getting Started", 'gravityview' ); ?>
151
+			<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'))); ?>">
152
+				<?php _e("Getting Started", 'gravityview'); ?>
153 153
 			</a>
154
-			<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' ) ) ); ?>">
155
-				<?php _e( "List of Changes", 'gravityview' ); ?>
154
+			<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'))); ?>">
155
+				<?php _e("List of Changes", 'gravityview'); ?>
156 156
 			</a>
157
-			<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' ) ) ); ?>">
158
-				<?php _e( 'Credits', 'gravityview' ); ?>
157
+			<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'))); ?>">
158
+				<?php _e('Credits', 'gravityview'); ?>
159 159
 			</a>
160 160
 		</h2>
161 161
 		<?php
@@ -205,14 +205,14 @@  discard block
 block discarded – undo
205 205
 
206 206
 				<div class="last-feature">
207 207
 				<h2>Embed Views in Posts &amp; Pages</h2>
208
-					<p><img src="<?php echo plugins_url( 'assets/images/screenshots/add-view-button.png', GRAVITYVIEW_FILE ); ?>" class="gv-welcome-screenshots" height="35" width="97" />Views don&rsquo;t need to be embedded in a post or page, but you can if you want. Embed Views using the "Add View" button above your content editor.</p>
208
+					<p><img src="<?php echo plugins_url('assets/images/screenshots/add-view-button.png', GRAVITYVIEW_FILE); ?>" class="gv-welcome-screenshots" height="35" width="97" />Views don&rsquo;t need to be embedded in a post or page, but you can if you want. Embed Views using the "Add View" button above your content editor.</p>
209 209
 				</div>
210 210
 
211 211
 			</div>
212 212
 
213 213
 			<div class="feature-section clear">
214 214
 				<h2>Configure Multiple Entry, Single Entry, and Edit Entry Layouts</h2>
215
-				<p><img src="<?php echo plugins_url( 'assets/images/screenshots/add-field.png', GRAVITYVIEW_FILE ); ?>" alt="Add a field dialog box" class="gv-welcome-screenshots" />You can configure what fields are displayed in <strong>Multiple Entry</strong>, <strong>Single Entry</strong>, and <strong>Edit Entry</strong> modes. These can be configured by clicking on the tabs in "View Configuration."</p>
215
+				<p><img src="<?php echo plugins_url('assets/images/screenshots/add-field.png', GRAVITYVIEW_FILE); ?>" alt="Add a field dialog box" class="gv-welcome-screenshots" />You can configure what fields are displayed in <strong>Multiple Entry</strong>, <strong>Single Entry</strong>, and <strong>Edit Entry</strong> modes. These can be configured by clicking on the tabs in "View Configuration."</p>
216 216
 
217 217
 				<ul class="ul-disc">
218 218
 					<li>Click "+ Add Field" to add a field to a zone</li>
@@ -256,13 +256,13 @@  discard block
 block discarded – undo
256 256
 
257 257
 				<div class="feature-section col two-col" style="margin:0; padding: 0;">
258 258
 					<div class="col col-1">
259
-						<div class="media-container" style="min-height:81px; border: none;"><img src="<?php echo plugins_url( 'assets/images/screenshots/pricing-merge-tags.jpg', GRAVITYVIEW_FILE ); ?>" alt="Pricing merge tags"></div>
259
+						<div class="media-container" style="min-height:81px; border: none;"><img src="<?php echo plugins_url('assets/images/screenshots/pricing-merge-tags.jpg', GRAVITYVIEW_FILE); ?>" alt="Pricing merge tags"></div>
260 260
 						<h4 class="higher">Pricing Merge Tags</h4>
261 261
 						<p>GravityView now offers better support for pricing Merge Tags to show details about orers. <a href="http://docs.gravityview.co/article/76-merge-tags">Read more about the Merge Tags</a>.</p>
262 262
 					</div>
263 263
 
264 264
 					<div class="col col-2 last-feature">
265
-						<div class="media-container" style="margin-top: 2em; min-height:80px;"><img src="<?php echo plugins_url( 'assets/images/screenshots/developing-future.jpg', GRAVITYVIEW_FILE ); ?>" alt="Developing the Future"></div>
265
+						<div class="media-container" style="margin-top: 2em; min-height:80px;"><img src="<?php echo plugins_url('assets/images/screenshots/developing-future.jpg', GRAVITYVIEW_FILE); ?>" alt="Developing the Future"></div>
266 266
 						<h4 class="higher">Laying the Groundwork</h4>
267 267
 						<p>We&rsquo;re working on a great new View Builder to make it easier than ever to configure View layouts. This release includes lots of behind-the-scenes&nbsp;changes.</p>
268 268
 					</div>
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
 
479 479
 			<?php $this->tabs(); ?>
480 480
 
481
-			<p class="about-description"><?php _e( 'GravityView is brought to you by:', 'gravityview' ); ?></p>
481
+			<p class="about-description"><?php _e('GravityView is brought to you by:', 'gravityview'); ?></p>
482 482
 
483 483
 			<div class="feature-section col two-col">
484 484
 
@@ -486,14 +486,14 @@  discard block
 block discarded – undo
486 486
 					<h2>Zack Katz</h2>
487 487
 					<h4 style="font-weight:0; margin-top:0">Project Lead &amp; Developer</h4>
488 488
 					<p></p>
489
-					<p><img style="float:left; margin: 0 15px 10px 0;" src="<?php echo plugins_url( 'assets/images/zack.jpg', GRAVITYVIEW_FILE ); ?>" width="94" height="94" />Zack has been developing integrations with Gravity Forms since 2009. He is the President of Katz Web Services and lives with his wife (and cat) in Denver, Colorado.</p>
489
+					<p><img style="float:left; margin: 0 15px 10px 0;" src="<?php echo plugins_url('assets/images/zack.jpg', GRAVITYVIEW_FILE); ?>" width="94" height="94" />Zack has been developing integrations with Gravity Forms since 2009. He is the President of Katz Web Services and lives with his wife (and cat) in Denver, Colorado.</p>
490 490
 					<p><a href="https://katz.co">View Zack&rsquo;s website</a></p>
491 491
 				</div>
492 492
 
493 493
 				<div class="col last-feature">
494 494
 					<h2>Luis Godinho</h2>
495 495
 					<h4 style="font-weight:0; margin-top:0">Developer &amp; Support</h4>
496
-					<p><img style="margin: 0 15px 10px 0;"  class="alignleft avatar" src="<?php echo plugins_url( 'assets/images/luis.jpg', GRAVITYVIEW_FILE ); ?>" width="94" height="94" />Luis is a WordPress developer passionate about WordPress. He is a co-founder and partner of GOMO, a digital agency located in Lisbon, Portugal.</p>
496
+					<p><img style="margin: 0 15px 10px 0;"  class="alignleft avatar" src="<?php echo plugins_url('assets/images/luis.jpg', GRAVITYVIEW_FILE); ?>" width="94" height="94" />Luis is a WordPress developer passionate about WordPress. He is a co-founder and partner of GOMO, a digital agency located in Lisbon, Portugal.</p>
497 497
 					<p><a href="http://tinygod.pt">View Luis&rsquo;s website</a></p>
498 498
 				</div>
499 499
 
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 
504 504
 			<div class="feature-section">
505 505
 				<div>
506
-					<h2><?php esc_attr_e( 'Contributors', 'gravityview' ); ?></h2>
506
+					<h2><?php esc_attr_e('Contributors', 'gravityview'); ?></h2>
507 507
 
508 508
 					<ul class="wp-people-group">
509 509
 						<li class="wp-person">Bengali translation by <a href="https://www.transifex.com/accounts/profile/tareqhi/">@tareqhi</a></li>
@@ -524,8 +524,8 @@  discard block
 block discarded – undo
524 524
 						<li class="wp-person">Code contributions by <a href="https://github.com/ryanduff">@ryanduff</a> and <a href="https://github.com/dmlinn">@dmlinn</a></li>
525 525
 					</ul>
526 526
 
527
-					<h4><?php esc_attr_e( 'Want to contribute?', 'gravityview' ); ?></h4>
528
-					<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/katzwebservices/GravityView">', '</a>' ); ?></p>
527
+					<h4><?php esc_attr_e('Want to contribute?', 'gravityview'); ?></h4>
528
+					<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/katzwebservices/GravityView">', '</a>'); ?></p>
529 529
 				</div>
530 530
 			</div>
531 531
 
@@ -565,34 +565,34 @@  discard block
 block discarded – undo
565 565
 		global $plugin_page;
566 566
 
567 567
 		// Bail if we're just editing the plugin
568
-		if( $plugin_page === 'plugin-editor.php' ) { return; }
568
+		if ($plugin_page === 'plugin-editor.php') { return; }
569 569
 
570 570
 		// Bail if no activation redirect
571
-		if ( ! get_transient( '_gv_activation_redirect' ) ) { return; }
571
+		if (!get_transient('_gv_activation_redirect')) { return; }
572 572
 
573 573
 		// Delete the redirect transient
574
-		delete_transient( '_gv_activation_redirect' );
574
+		delete_transient('_gv_activation_redirect');
575 575
 
576
-		$upgrade = get_option( 'gv_version_upgraded_from' );
576
+		$upgrade = get_option('gv_version_upgraded_from');
577 577
 
578 578
 		// Don't do anything if they've already seen the new version info
579
-		if( $upgrade === GravityView_Plugin::version ) {
579
+		if ($upgrade === GravityView_Plugin::version) {
580 580
 			return;
581 581
 		}
582 582
 
583 583
 		// Add "Upgraded From" Option
584
-		update_option( 'gv_version_upgraded_from', GravityView_Plugin::version );
584
+		update_option('gv_version_upgraded_from', GravityView_Plugin::version);
585 585
 
586 586
 		// Bail if activating from network, or bulk
587
-		if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) { return; }
587
+		if (is_network_admin() || isset($_GET['activate-multi'])) { return; }
588 588
 
589 589
 		// First time install
590
-		if( ! $upgrade ) {
591
-			wp_safe_redirect( admin_url( 'edit.php?post_type=gravityview&page=gv-getting-started' ) ); exit;
590
+		if (!$upgrade) {
591
+			wp_safe_redirect(admin_url('edit.php?post_type=gravityview&page=gv-getting-started')); exit;
592 592
 		}
593 593
 		// Update
594 594
 		else {
595
-			wp_safe_redirect( admin_url( 'edit.php?post_type=gravityview&page=gv-changelog' ) ); exit;
595
+			wp_safe_redirect(admin_url('edit.php?post_type=gravityview&page=gv-changelog')); exit;
596 596
 		}
597 597
 	}
598 598
 }
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Welcome Page Class
4
- *
5
- * @package   GravityView
6
- * @author    Zack Katz <[email protected]>
7
- * @license   ToBeDefined
8
- * @link      http://www.katzwebservices.com
9
- * @copyright Copyright 2014, Katz Web Services, Inc.
10
- *
11
- * @since 1.0.0
12
- */
3
+	 * Welcome Page Class
4
+	 *
5
+	 * @package   GravityView
6
+	 * @author    Zack Katz <[email protected]>
7
+	 * @license   ToBeDefined
8
+	 * @link      http://www.katzwebservices.com
9
+	 * @copyright Copyright 2014, Katz Web Services, Inc.
10
+	 *
11
+	 * @since 1.0.0
12
+	 */
13 13
 
14 14
 // Exit if accessed directly
15 15
 if ( ! defined( 'ABSPATH' ) ) exit;
Please login to merge, or discard this patch.
templates/fields/calculation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,6 +8,6 @@
 block discarded – undo
8 8
 
9 9
 $gravityview_view = GravityView_View::getInstance();
10 10
 
11
-extract( $gravityview_view->getCurrentField() );
11
+extract($gravityview_view->getCurrentField());
12 12
 
13
-echo gravityview_get_field_value( $entry, $field_id, $display_value );
13
+echo gravityview_get_field_value($entry, $field_id, $display_value);
Please login to merge, or discard this patch.