Completed
Pull Request — master (#605)
by Zack
05:45
created
templates/fields/time.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,29 +11,29 @@
 block discarded – undo
11 11
 $gv_field = $gravityview_view->getCurrentField();
12 12
 
13 13
 /** @var string $value Raw time value */
14
-$value = rgget( 'value', $gv_field );
14
+$value = rgget('value', $gv_field);
15 15
 
16 16
 /** @var string $field_id ID of the field being displayed */
17
-$field_id = rgget( 'field_id', $gv_field );
17
+$field_id = rgget('field_id', $gv_field);
18 18
 
19 19
 $output = '';
20 20
 
21
-if( '' !== $value ) {
21
+if ('' !== $value) {
22 22
 
23 23
 	/** @var GF_Field_Time $field Gravity Forms Time field */
24
-	$field = rgget( 'field', $gv_field );
24
+	$field = rgget('field', $gv_field);
25 25
 
26
-	$format = $gravityview_view->getCurrentFieldSetting( 'date_display' );
26
+	$format = $gravityview_view->getCurrentFieldSetting('date_display');
27 27
 
28
-	if ( empty( $format ) ) {
28
+	if (empty($format)) {
29 29
 
30 30
 		$field->sanitize_settings();
31 31
 
32
-		$format = GravityView_Field_Time::date_format( $field->timeFormat, $field_id );
32
+		$format = GravityView_Field_Time::date_format($field->timeFormat, $field_id);
33 33
 	}
34 34
 
35 35
 	// If there is a custom PHP date format passed via the date_display setting, use PHP's date format
36
-	$output = date_i18n( $format, strtotime( $value ) );
36
+	$output = date_i18n($format, strtotime($value));
37 37
 }
38 38
 
39 39
 echo $output;
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Display the time field type
4
- *
5
- * @package GravityView
6
- * @subpackage GravityView/templates/fields
7
- */
3
+	 * Display the time field type
4
+	 *
5
+	 * @package GravityView
6
+	 * @subpackage GravityView/templates/fields
7
+	 */
8 8
 
9 9
 $gravityview_view = GravityView_View::getInstance();
10 10
 
Please login to merge, or discard this patch.
templates/fields/website.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,26 +8,26 @@
 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
-if( !empty( $value ) && function_exists( 'gravityview_format_link' ) ) {
13
+if (!empty($value) && function_exists('gravityview_format_link')) {
14 14
 
15 15
 	/** @since 1.8 */
16
-	$anchor_text = !empty( $field_settings['anchor_text'] ) ? trim( rtrim( $field_settings['anchor_text'] ) ) : false;
16
+	$anchor_text = !empty($field_settings['anchor_text']) ? trim(rtrim($field_settings['anchor_text'])) : false;
17 17
 
18 18
 	// Check empty again, just in case trim removed whitespace didn't work
19
-	if( !empty( $anchor_text ) ) {
19
+	if (!empty($anchor_text)) {
20 20
 
21 21
 		// Replace the variables
22
-		$anchor_text = GravityView_API::replace_variables( $anchor_text, $form, $entry );
22
+		$anchor_text = GravityView_API::replace_variables($anchor_text, $form, $entry);
23 23
 
24 24
 	} else {
25
-		$anchor_text = empty( $field_settings['truncatelink'] ) ? $value : gravityview_format_link( $value );
25
+		$anchor_text = empty($field_settings['truncatelink']) ? $value : gravityview_format_link($value);
26 26
 	}
27 27
 
28
-	$attributes = empty( $field_settings['open_same_window'] ) ? 'target=_blank' : '';
28
+	$attributes = empty($field_settings['open_same_window']) ? 'target=_blank' : '';
29 29
 
30
-	echo gravityview_get_link( $value, $anchor_text, $attributes );
30
+	echo gravityview_get_link($value, $anchor_text, $attributes);
31 31
 
32 32
 } else {
33 33
 	echo $display_value;
Please login to merge, or discard this patch.
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.