Completed
Push — develop ( d5f081...3b31c7 )
by Zack
04:04
created
uninstall.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Fired when the plugin is uninstalled.
4
- *
5
- * @package   GravityView
6
- * @author    Zack Katz <[email protected]>
7
- * @license   ToBeDefined
8
- * @link      http://gravityview.co
9
- * @copyright Copyright 2015, Katz Web Services, Inc.
10
- */
3
+			 * Fired when the plugin is uninstalled.
4
+			 *
5
+			 * @package   GravityView
6
+			 * @author    Zack Katz <[email protected]>
7
+			 * @license   ToBeDefined
8
+			 * @link      http://gravityview.co
9
+			 * @copyright Copyright 2015, Katz Web Services, Inc.
10
+			 */
11 11
 
12 12
 // If uninstall not called from WordPress, then exit
13 13
 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
Please login to merge, or discard this 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/fields/post-category.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@
 block discarded – undo
7 7
 
8 8
 	var $name = 'post_tags';
9 9
 
10
-	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
10
+	function field_options($field_options, $template_id, $field_id, $context, $input_type) {
11 11
 
12
-		if( 'edit' === $context ) {
12
+		if ('edit' === $context) {
13 13
 			return $field_options;
14 14
 		}
15 15
 
16
-		$this->add_field_support('dynamic_data', $field_options );
17
-		$this->add_field_support('link_to_term', $field_options );
16
+		$this->add_field_support('dynamic_data', $field_options);
17
+		$this->add_field_support('link_to_term', $field_options);
18 18
 
19 19
 		return $field_options;
20 20
 	}
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.