Completed
Pull Request — develop (#1130)
by Zack
15:55
created
future/includes/class-gv-settings-addon.php 1 patch
Indentation   +121 added lines, -121 removed lines patch added patch discarded remove patch
@@ -134,28 +134,28 @@  discard block
 block discarded – undo
134 134
 	 */
135 135
 	public function add_network_menu() {
136 136
 
137
-	    if ( ! gravityview()->plugin->is_network_activated() ) {
137
+		if ( ! gravityview()->plugin->is_network_activated() ) {
138 138
 			return;
139 139
 		}
140 140
 
141
-        add_menu_page( __( 'Settings', 'gravityview' ), __( 'GravityView', 'gravityview' ), $this->_capabilities_app_settings, "{$this->_slug}_settings", array( $this, 'app_tab_page' ), 'none' );
141
+		add_menu_page( __( 'Settings', 'gravityview' ), __( 'GravityView', 'gravityview' ), $this->_capabilities_app_settings, "{$this->_slug}_settings", array( $this, 'app_tab_page' ), 'none' );
142 142
 	}
143 143
 
144 144
 	/**
145
-     * Uninstall all traces of GravityView
146
-     *
147
-     * Note: method is public because parent method is public
148
-     *
145
+	 * Uninstall all traces of GravityView
146
+	 *
147
+	 * Note: method is public because parent method is public
148
+	 *
149 149
 	 * @return bool
150 150
 	 */
151 151
 	public function uninstall() {
152 152
 		gravityview()->plugin->uninstall();
153 153
 
154 154
 		/**
155
-         * Set the path so that Gravity Forms can de-activate GravityView
156
-         * @see GFAddOn::uninstall_addon
157
-         * @uses deactivate_plugins()
158
-         */
155
+		 * Set the path so that Gravity Forms can de-activate GravityView
156
+		 * @see GFAddOn::uninstall_addon
157
+		 * @uses deactivate_plugins()
158
+		 */
159 159
 		$this->_path = GRAVITYVIEW_FILE;
160 160
 
161 161
 		return true;
@@ -185,42 +185,42 @@  discard block
 block discarded – undo
185 185
 	}
186 186
 
187 187
 	/**
188
-     * Get an array of reasons why the plugin might be uninstalled
189
-     *
190
-     * @since 1.17.5
191
-     *
188
+	 * Get an array of reasons why the plugin might be uninstalled
189
+	 *
190
+	 * @since 1.17.5
191
+	 *
192 192
 	 * @return array Array of reasons with the label and followup questions for each uninstall reason
193 193
 	 */
194 194
 	private function get_uninstall_reasons() {
195 195
 		$reasons = array(
196 196
 			'will-continue' => array(
197
-                'label' => esc_html__( 'I am going to continue using GravityView', 'gravityview' ),
198
-            ),
197
+				'label' => esc_html__( 'I am going to continue using GravityView', 'gravityview' ),
198
+			),
199 199
 			'no-longer-need' => array(
200
-                'label' => esc_html__( 'I no longer need GravityView', 'gravityview' ),
201
-            ),
200
+				'label' => esc_html__( 'I no longer need GravityView', 'gravityview' ),
201
+			),
202 202
 			'doesnt-work' => array(
203
-                'label' => esc_html__( 'The plugin doesn\'t work', 'gravityview' ),
204
-            ),
203
+				'label' => esc_html__( 'The plugin doesn\'t work', 'gravityview' ),
204
+			),
205 205
 			'found-other' => array(
206
-                'label' => esc_html__( 'I found a better plugin', 'gravityview' ),
207
-                'followup' => esc_attr__( 'What plugin you are using, and why?', 'gravityview' ),
208
-            ),
206
+				'label' => esc_html__( 'I found a better plugin', 'gravityview' ),
207
+				'followup' => esc_attr__( 'What plugin you are using, and why?', 'gravityview' ),
208
+			),
209 209
 			'other' => array(
210
-                'label' => esc_html__( 'Other', 'gravityview' ),
211
-            ),
210
+				'label' => esc_html__( 'Other', 'gravityview' ),
211
+			),
212 212
 		);
213 213
 
214 214
 		shuffle( $reasons );
215 215
 
216 216
 		return $reasons;
217
-    }
217
+	}
218 218
 
219 219
 	/**
220
-     * Display a feedback form when the plugin is uninstalled
221
-     *
222
-     * @since 1.17.5
223
-     *
220
+	 * Display a feedback form when the plugin is uninstalled
221
+	 *
222
+	 * @since 1.17.5
223
+	 *
224 224
 	 * @return string HTML of the uninstallation form
225 225
 	 */
226 226
 	public function uninstall_form() {
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
             <h2><?php esc_html_e( 'Why did you uninstall GravityView?', 'gravityview' ); ?></h2>
301 301
             <ul>
302 302
 				<?php
303
-                $reasons = $this->get_uninstall_reasons();
303
+				$reasons = $this->get_uninstall_reasons();
304 304
 				foreach ( $reasons as $reason ) {
305 305
 					printf( '<li><label><input name="reason" type="radio" value="other" data-followup="%s"> %s</label></li>', Utils::get( $reason, 'followup' ), Utils::get( $reason, 'label' ) );
306 306
 				}
@@ -394,12 +394,12 @@  discard block
 block discarded – undo
394 394
 	}
395 395
 
396 396
 	public function app_settings_tab() {
397
-	    parent::app_settings_tab();
397
+		parent::app_settings_tab();
398 398
 
399 399
 		if ( $this->maybe_uninstall() ) {
400
-            echo $this->uninstall_form();
400
+			echo $this->uninstall_form();
401 401
 		}
402
-    }
402
+	}
403 403
 
404 404
 	/**
405 405
 	 * The Settings title
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
 	 * @return array The settings.
485 485
 	 */
486 486
 	public function all() {
487
-	    return wp_parse_args( get_option( 'gravityformsaddon_' . $this->_slug . '_app_settings', array() ), $this->defaults() );
487
+		return wp_parse_args( get_option( 'gravityformsaddon_' . $this->_slug . '_app_settings', array() ), $this->defaults() );
488 488
 	}
489 489
 
490 490
 	/**
@@ -553,8 +553,8 @@  discard block
 block discarded – undo
553 553
                     type="' . $field['type'] . '"
554 554
                     name="' . esc_attr( $name ) . '"
555 555
                     value="' . $value . '" ' .
556
-		        implode( ' ', $attributes ) .
557
-		        ' />';
556
+				implode( ' ', $attributes ) .
557
+				' />';
558 558
 
559 559
 		if ( $echo ) {
560 560
 			echo $html;
@@ -572,12 +572,12 @@  discard block
 block discarded – undo
572 572
 	}
573 573
 
574 574
 	/**
575
-     * Check whether GravityView is being saved
576
-     *
577
-     * The generic is_save_postback() is true for all addons
578
-     *
579
-     * @since 2.0.8
580
-     *
575
+	 * Check whether GravityView is being saved
576
+	 *
577
+	 * The generic is_save_postback() is true for all addons
578
+	 *
579
+	 * @since 2.0.8
580
+	 *
581 581
 	 * @return bool
582 582
 	 */
583 583
 	public function is_save_postback() {
@@ -591,16 +591,16 @@  discard block
 block discarded – undo
591 591
 	 */
592 592
 	public function license_key_notice() {
593 593
 
594
-	    if( $this->is_save_postback() ) {
595
-		    $settings = $this->get_posted_settings();
596
-		    $license_key = \GV\Utils::get( $settings, 'license_key' );
597
-		    $license_status = \GV\Utils::get( $settings, 'license_key_status', 'inactive' );
598
-        } else {
599
-		    $license_status = $this->get( 'license_key_status', 'inactive' );
600
-		    $license_key    = $this->get( 'license_key' );
601
-	    }
594
+		if( $this->is_save_postback() ) {
595
+			$settings = $this->get_posted_settings();
596
+			$license_key = \GV\Utils::get( $settings, 'license_key' );
597
+			$license_status = \GV\Utils::get( $settings, 'license_key_status', 'inactive' );
598
+		} else {
599
+			$license_status = $this->get( 'license_key_status', 'inactive' );
600
+			$license_key    = $this->get( 'license_key' );
601
+		}
602 602
 
603
-	    $license_id = empty( $license_key ) ? 'license' : $license_key;
603
+		$license_id = empty( $license_key ) ? 'license' : $license_key;
604 604
 
605 605
 		$message = esc_html__( 'Your GravityView license %s. This means you&rsquo;re missing out on updates and support! %sActivate your license%s or %sget a license here%s.', 'gravityview' );
606 606
 
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
 		$update_below = false;
618 618
 		$primary_button_link = admin_url( 'edit.php?post_type=gravityview&amp;page=gravityview_settings' );
619 619
 
620
-        switch ( $license_status ) {
620
+		switch ( $license_status ) {
621 621
 			/** @since 1.17 */
622 622
 			case 'expired':
623 623
 				$title = __( 'Expired License', 'gravityview' );
@@ -655,13 +655,13 @@  discard block
 block discarded – undo
655 655
 			return;
656 656
 		}
657 657
 
658
-        \GravityView_Admin_Notices::add_notice( array(
659
-            'message' => $message,
660
-            'class'   => 'notice notice-warning',
661
-            'title'   => $title,
662
-            'cap'     => 'gravityview_edit_settings',
663
-            'dismiss' => sha1( $license_status . '_' . $license_id . '_' . date( 'z' ) ), // Show every day, instead of every 8 weeks (which is the default)
664
-        ) );
658
+		\GravityView_Admin_Notices::add_notice( array(
659
+			'message' => $message,
660
+			'class'   => 'notice notice-warning',
661
+			'title'   => $title,
662
+			'cap'     => 'gravityview_edit_settings',
663
+			'dismiss' => sha1( $license_status . '_' . $license_id . '_' . date( 'z' ) ), // Show every day, instead of every 8 weeks (which is the default)
664
+		) );
665 665
 	}
666 666
 
667 667
 	/**
@@ -675,12 +675,12 @@  discard block
 block discarded – undo
675 675
 	}
676 676
 
677 677
 	/**
678
-     * Add tooltip script to app settings page. Not enqueued by Gravity Forms for some reason.
679
-     *
680
-     * @since 1.21.5
681
-     *
682
-     * @see GFAddOn::scripts()
683
-     *
678
+	 * Add tooltip script to app settings page. Not enqueued by Gravity Forms for some reason.
679
+	 *
680
+	 * @since 1.21.5
681
+	 *
682
+	 * @see GFAddOn::scripts()
683
+	 *
684 684
 	 * @return array Array of scripts
685 685
 	 */
686 686
 	public function scripts() {
@@ -689,10 +689,10 @@  discard block
 block discarded – undo
689 689
 		$scripts[] = array(
690 690
 			'handle'  => 'gform_tooltip_init',
691 691
 			'enqueue' => array(
692
-                array(
693
-			        'admin_page' => array( 'app_settings' )
694
-                )
695
-            )
692
+				array(
693
+					'admin_page' => array( 'app_settings' )
694
+				)
695
+			)
696 696
 		);
697 697
 
698 698
 		return $scripts;
@@ -710,10 +710,10 @@  discard block
 block discarded – undo
710 710
 			'src'     => plugins_url( 'assets/css/admin-settings.css', GRAVITYVIEW_FILE ),
711 711
 			'version' => Plugin::$version,
712 712
 			'deps' => array(
713
-                'gform_admin',
713
+				'gform_admin',
714 714
 				'gaddon_form_settings_css',
715
-                'gform_tooltip',
716
-                'gform_font_awesome',
715
+				'gform_tooltip',
716
+				'gform_font_awesome',
717 717
 			),
718 718
 			'enqueue' => array(
719 719
 				array( 'admin_page' => array(
@@ -881,7 +881,7 @@  discard block
 block discarded – undo
881 881
 					array(
882 882
 						'label' => _x( 'Show me beta versions if they are available.', 'gravityview' ),
883 883
 						'value' => '1',
884
-                        'name'  => 'beta',
884
+						'name'  => 'beta',
885 885
 					),
886 886
 				),
887 887
 				'description'   => __( 'You will have early access to the latest GravityView features and improvements. There may be bugs! If you encounter an issue, help make GravityView better by reporting it!', 'gravityview' ),
@@ -919,38 +919,38 @@  discard block
 block discarded – undo
919 919
 
920 920
 			if ( empty( $field['disabled'] ) ) {
921 921
 				unset( $field['disabled'] );
922
-            }
922
+			}
923 923
 		}
924 924
 
925
-        $sections = array(
926
-            array(
927
-                'description' => sprintf( '<span class="version-info description">%s</span>', sprintf( __( 'You are running GravityView version %s', 'gravityview' ), Plugin::$version ) ),
928
-                'fields'      => $fields,
929
-            )
930
-        );
925
+		$sections = array(
926
+			array(
927
+				'description' => sprintf( '<span class="version-info description">%s</span>', sprintf( __( 'You are running GravityView version %s', 'gravityview' ), Plugin::$version ) ),
928
+				'fields'      => $fields,
929
+			)
930
+		);
931 931
 
932
-        // custom 'update settings' button
933
-        $button = array(
934
-            'class' => 'button button-primary button-hero',
935
-            'type' => 'save',
936
-        );
932
+		// custom 'update settings' button
933
+		$button = array(
934
+			'class' => 'button button-primary button-hero',
935
+			'type' => 'save',
936
+		);
937 937
 
938 938
 		if ( $disabled_attribute ) {
939 939
 			$button['disabled'] = $disabled_attribute;
940 940
 		}
941 941
 
942
-        /**
943
-         * @filter `gravityview/settings/extension/sections` Modify the GravityView settings page
944
-         * Extensions can tap in here to insert their own section and settings.
945
-         * <code>
946
-         *   $sections[] = array(
947
-         *      'title' => __( 'GravityView My Extension Settings', 'gravityview' ),
948
-         *      'fields' => $settings,
949
-         *   );
950
-         * </code>
951
-         * @param array $extension_settings Empty array, ready for extension settings!
952
-         */
953
-        $extension_sections = apply_filters( 'gravityview/settings/extension/sections', array() );
942
+		/**
943
+		 * @filter `gravityview/settings/extension/sections` Modify the GravityView settings page
944
+		 * Extensions can tap in here to insert their own section and settings.
945
+		 * <code>
946
+		 *   $sections[] = array(
947
+		 *      'title' => __( 'GravityView My Extension Settings', 'gravityview' ),
948
+		 *      'fields' => $settings,
949
+		 *   );
950
+		 * </code>
951
+		 * @param array $extension_settings Empty array, ready for extension settings!
952
+		 */
953
+		$extension_sections = apply_filters( 'gravityview/settings/extension/sections', array() );
954 954
 
955 955
 		// If there are extensions, add a section for them
956 956
 		if ( ! empty( $extension_sections ) ) {
@@ -963,13 +963,13 @@  discard block
 block discarded – undo
963 963
 				}
964 964
 			}
965 965
 
966
-            $k = count( $extension_sections ) - 1 ;
967
-            $extension_sections[ $k ]['fields'][] = $button;
966
+			$k = count( $extension_sections ) - 1 ;
967
+			$extension_sections[ $k ]['fields'][] = $button;
968 968
 			$sections = array_merge( $sections, $extension_sections );
969 969
 		} else {
970
-            // add the 'update settings' button to the general section
971
-            $sections[0]['fields'][] = $button;
972
-        }
970
+			// add the 'update settings' button to the general section
971
+			$sections[0]['fields'][] = $button;
972
+		}
973 973
 
974 974
 		return $sections;
975 975
 	}
@@ -1023,9 +1023,9 @@  discard block
 block discarded – undo
1023 1023
 	 */
1024 1024
 	protected function settings_edd_license( $field, $echo = true ) {
1025 1025
 
1026
-	    if ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ) {
1027
-		    $field['input_type'] = 'password';
1028
-        }
1026
+		if ( defined( 'GRAVITYVIEW_LICENSE_KEY' ) && GRAVITYVIEW_LICENSE_KEY ) {
1027
+			$field['input_type'] = 'password';
1028
+		}
1029 1029
 
1030 1030
 		$text = $this->settings_text( $field, false );
1031 1031
 
@@ -1042,9 +1042,9 @@  discard block
 block discarded – undo
1042 1042
 
1043 1043
 	/**
1044 1044
 	 * Allow pure HTML settings row
1045
-     *
1046
-     * @since 2.0.6
1047
-     *
1045
+	 *
1046
+	 * @since 2.0.6
1047
+	 *
1048 1048
 	 * @param array $field
1049 1049
 	 * @param bool $echo Whether to echo the
1050 1050
 	 *
@@ -1110,19 +1110,19 @@  discard block
 block discarded – undo
1110 1110
 	}
1111 1111
 
1112 1112
 	/**
1113
-     * Keep GravityView styling for `$field['description']`, even though Gravity Forms added support for it
1114
-     *
1115
-     * Converts `$field['description']` to `$field['gv_description']`
1116
-     * Converts `$field['subtitle']` to `$field['description']`
1117
-     *
1118
-     * @see \GV\Addon_Settings::single_setting_label Converts `gv_description` back to `description`
1119
-     * @see http://share.gravityview.co/P28uGp/2OIRKxog for image that shows subtitle vs description
1120
-     *
1121
-     * @since 1.21.5.2
1122
-     *
1113
+	 * Keep GravityView styling for `$field['description']`, even though Gravity Forms added support for it
1114
+	 *
1115
+	 * Converts `$field['description']` to `$field['gv_description']`
1116
+	 * Converts `$field['subtitle']` to `$field['description']`
1117
+	 *
1118
+	 * @see \GV\Addon_Settings::single_setting_label Converts `gv_description` back to `description`
1119
+	 * @see http://share.gravityview.co/P28uGp/2OIRKxog for image that shows subtitle vs description
1120
+	 *
1121
+	 * @since 1.21.5.2
1122
+	 *
1123 1123
 	 * @param array $field
1124
-     *
1125
-     * @return void
1124
+	 *
1125
+	 * @return void
1126 1126
 	 */
1127 1127
 	public function single_setting_row( $field ) {
1128 1128
 		$field['gv_description'] = Utils::get( $field, 'description' );
Please login to merge, or discard this patch.
includes/class-admin-installer.php 1 patch
Indentation   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 	}
106 106
 
107 107
 	/**
108
-     * When on the Installer page, show a different notice than on the Settings page
109
-     *
108
+	 * When on the Installer page, show a different notice than on the Settings page
109
+	 *
110 110
 	 * @param array $notice
111 111
 	 *
112 112
 	 * @return string License notice
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
 	public function maybe_modify_license_notice( $notice = '' ) {
115 115
 
116 116
 		if ( ! gravityview()->request->is_admin( '', 'downloads' ) ) {
117
-            return $notice;
118
-        }
117
+			return $notice;
118
+		}
119 119
 
120
-        return esc_html__( 'Your license %s. Do you want access to these plugins? %sActivate your license%s or %sget a license here%s.', 'gravityview' );
120
+		return esc_html__( 'Your license %s. Do you want access to these plugins? %sActivate your license%s or %sget a license here%s.', 'gravityview' );
121 121
 	}
122 122
 
123 123
 	/**
@@ -155,43 +155,43 @@  discard block
 block discarded – undo
155 155
 	 * Get downloads data from transient or from API; save transient after getting data from API
156 156
 	 *
157 157
 	 * @return array {
158
-     *   @type array  $info {
159
-     *       @type string $id int 17
160
-     *       @type string $slug Extension slug
161
-     *       @type string $title Extension title
162
-     *       @type string $create_date in '2018-07-19 20:03:10' format
163
-     *       @type string $modified_date
164
-     *       @type string $status
165
-     *       @type string $link URL to public plugin page
166
-     *       @type string $content
167
-     *       @type string $excerpt
168
-     *       @type string $thumbnail URL to thumbnail
169
-     *       @type array  $category Taxonomy details for the plugin's category {
170
-     *         @type int $term_id => int 30
171
-     *         @type string $name => string 'Plugins' (length=7)
172
-     *         @type string $slug => string 'plugins' (length=7)
173
-     *         @type int $term_group => int 0
174
-     *         @type int $term_taxonomy_id => int 30
175
-     *         @type string $taxonomy => string 'download_category' (length=17)
176
-     *         @type string $description => string '' (length=0)
177
-     *         @type int $parent => int 0
178
-     *         @type int $count => int 4
179
-     *         @type string $filter => string 'raw' (length=3)
180
-     *       }
181
-     *       @type array $tags {see $category above}
182
-     *       @type string $textdomain string 'gravityview' (length=11)
183
-     *   }
184
-     *   @type array $pricing array of `price_name_slugs` => '00.00' values, if price options exist
185
-     *   @type array $licensing {
186
-     *       @type bool   $enabled Is licensing enabled for the extension
187
-     *       @type string $version Version number
188
-     *       @type string $exp_unit Expiration unit ('years')
189
-     *       @type string $exp_length Expiration length ('1')
190
-     *   }
191
-     *   @type array $files Array of files. Empty if user has no access to the file. {
192
-     *       @type string $file string URL of the file download
193
-     *   }
194
-     * }
158
+	 *   @type array  $info {
159
+	 *       @type string $id int 17
160
+	 *       @type string $slug Extension slug
161
+	 *       @type string $title Extension title
162
+	 *       @type string $create_date in '2018-07-19 20:03:10' format
163
+	 *       @type string $modified_date
164
+	 *       @type string $status
165
+	 *       @type string $link URL to public plugin page
166
+	 *       @type string $content
167
+	 *       @type string $excerpt
168
+	 *       @type string $thumbnail URL to thumbnail
169
+	 *       @type array  $category Taxonomy details for the plugin's category {
170
+	 *         @type int $term_id => int 30
171
+	 *         @type string $name => string 'Plugins' (length=7)
172
+	 *         @type string $slug => string 'plugins' (length=7)
173
+	 *         @type int $term_group => int 0
174
+	 *         @type int $term_taxonomy_id => int 30
175
+	 *         @type string $taxonomy => string 'download_category' (length=17)
176
+	 *         @type string $description => string '' (length=0)
177
+	 *         @type int $parent => int 0
178
+	 *         @type int $count => int 4
179
+	 *         @type string $filter => string 'raw' (length=3)
180
+	 *       }
181
+	 *       @type array $tags {see $category above}
182
+	 *       @type string $textdomain string 'gravityview' (length=11)
183
+	 *   }
184
+	 *   @type array $pricing array of `price_name_slugs` => '00.00' values, if price options exist
185
+	 *   @type array $licensing {
186
+	 *       @type bool   $enabled Is licensing enabled for the extension
187
+	 *       @type string $version Version number
188
+	 *       @type string $exp_unit Expiration unit ('years')
189
+	 *       @type string $exp_length Expiration length ('1')
190
+	 *   }
191
+	 *   @type array $files Array of files. Empty if user has no access to the file. {
192
+	 *       @type string $file string URL of the file download
193
+	 *   }
194
+	 * }
195 195
 	 */
196 196
 	public function get_downloads_data() {
197 197
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 		) );
220 220
 
221 221
 		if ( is_wp_error( $response ) ) {
222
-		    gravityview()->log->error( "Extension data response is an error", array( 'data' => $response ) );
222
+			gravityview()->log->error( "Extension data response is an error", array( 'data' => $response ) );
223 223
 			return array();
224 224
 		}
225 225
 
@@ -326,9 +326,9 @@  discard block
 block discarded – undo
326 326
 	protected function render_download( $download, $wp_plugins ) {
327 327
 
328 328
 
329
-        $details = $this->get_download_display_details( $download, $wp_plugins );
329
+		$details = $this->get_download_display_details( $download, $wp_plugins );
330 330
 
331
-        $download_info = $details['download_info'];
331
+		$download_info = $details['download_info'];
332 332
 
333 333
 		?>
334 334
         <div class="item <?php echo esc_attr( $details['item_class'] ); ?>">
@@ -357,25 +357,25 @@  discard block
 block discarded – undo
357 357
 	}
358 358
 
359 359
 	/**
360
-     * Generates details array for the download to keep the render_download() method a bit tidier
361
-     *
360
+	 * Generates details array for the download to keep the render_download() method a bit tidier
361
+	 *
362 362
 	 * @param array $download Single download, as returned by {@see get_downloads_data}
363 363
 	 * @param array $wp_plugins All active plugins, as returned by {@see get_plugins()}
364 364
 	 *
365 365
 	 * @return array {
366
-     *   @type array $download_info
367
-     *   @type string $plugin_path
368
-     *   @type string $status License status returned by Easy Digital Downloads ("active", "inactive", "expired", "revoked", etc)
369
-     *   @type string $status_label
370
-     *   @type string $button_title Title attribute to show when hovering over the download's button
371
-     *   @type string $button_class CSS class to use for the button
372
-     *   @type string $button_label Text to use for the download's anchor link
373
-     *   @type string $href URL for the download's button
374
-     *   @type bool   $spinner Whether to show the spinner icon
375
-     *   @type string $item_class CSS class for the download container
376
-     *   @type string $required_license The name of the required license for the download ("Galactic" or "Interstellar")
377
-     *   @type bool   $is_active Is the current GravityView license (as entered in Settings) active?
378
-     * }
366
+	 *   @type array $download_info
367
+	 *   @type string $plugin_path
368
+	 *   @type string $status License status returned by Easy Digital Downloads ("active", "inactive", "expired", "revoked", etc)
369
+	 *   @type string $status_label
370
+	 *   @type string $button_title Title attribute to show when hovering over the download's button
371
+	 *   @type string $button_class CSS class to use for the button
372
+	 *   @type string $button_label Text to use for the download's anchor link
373
+	 *   @type string $href URL for the download's button
374
+	 *   @type bool   $spinner Whether to show the spinner icon
375
+	 *   @type string $item_class CSS class for the download container
376
+	 *   @type string $required_license The name of the required license for the download ("Galactic" or "Interstellar")
377
+	 *   @type bool   $is_active Is the current GravityView license (as entered in Settings) active?
378
+	 * }
379 379
 	 */
380 380
 	private function get_download_display_details( $download, $wp_plugins ) {
381 381
 
@@ -464,18 +464,18 @@  discard block
 block discarded – undo
464 464
 		}
465 465
 
466 466
 		return compact( 'download_info','plugin_path', 'status', 'status_label', 'button_title', 'button_class', 'button_label', 'href', 'spinner', 'item_class', 'required_license', 'is_active' );
467
-    }
467
+	}
468 468
 
469 469
 	/**
470
-     * Returns the base price for an extension
471
-     *
470
+	 * Returns the base price for an extension
471
+	 *
472 472
 	 * @param array $download
473 473
 	 *
474 474
 	 * @return float Base price for an extension. If not for sale separately, returns 0
475 475
 	 */
476 476
 	private function get_download_base_price( $download ) {
477 477
 
478
-	    $base_price = \GV\Utils::get( $download, 'pricing/amount', 0 );
478
+		$base_price = \GV\Utils::get( $download, 'pricing/amount', 0 );
479 479
 		$base_price = \GFCommon::to_number( $base_price );
480 480
 
481 481
 		unset( $download['pricing']['amount'] );
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 		}
487 487
 
488 488
 		return floatval( $base_price );
489
-    }
489
+	}
490 490
 
491 491
 	/**
492 492
 	 * Handle AJAX request to activate extension
@@ -528,9 +528,9 @@  discard block
 block discarded – undo
528 528
 		$plugin = plugin_basename( trim( $data['path'] ) ); /** @see deactivate_plugins() */
529 529
 
530 530
 		/**
531
-         * deactivate_plugins() has no return value, so instead, we hook into an action that runs on success
532
-         * We could have used `deactivate_plugin`, but this is more specific
533
-         */
531
+		 * deactivate_plugins() has no return value, so instead, we hook into an action that runs on success
532
+		 * We could have used `deactivate_plugin`, but this is more specific
533
+		 */
534 534
 		add_action( 'deactivate_' . $plugin, 'wp_send_json_success' );
535 535
 
536 536
 		deactivate_plugins( $data['path'] );
Please login to merge, or discard this patch.