Test Failed
Pull Request — master (#3170)
by Devin
06:19
created
includes/admin/settings/class-settings-advanced.php 1 patch
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
  * @since       1.8
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( ! defined('ABSPATH')) {
13 13
 	exit; // Exit if accessed directly
14 14
 }
15 15
 
16
-if ( ! class_exists( 'Give_Settings_Advanced' ) ) :
16
+if ( ! class_exists('Give_Settings_Advanced')) :
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_Advanced.
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
 		 */
28 28
 		public function __construct() {
29 29
 			$this->id    = 'advanced';
30
-			$this->label = __( 'Advanced', 'give' );
30
+			$this->label = __('Advanced', 'give');
31 31
 
32 32
 			$this->default_tab = 'advanced-options';
33 33
 
34
-			if ( $this->id === give_get_current_setting_tab() ) {
35
-				add_action( 'give_admin_field_remove_cache_button', array( $this, 'render_remove_cache_button' ), 10, 1 );
34
+			if ($this->id === give_get_current_setting_tab()) {
35
+				add_action('give_admin_field_remove_cache_button', array($this, 'render_remove_cache_button'), 10, 1);
36 36
 			}
37 37
 
38 38
 			parent::__construct();
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
 			$current_section = give_get_current_setting_section();
51 51
 
52
-			switch ( $current_section ) {
52
+			switch ($current_section) {
53 53
 				case 'advanced-options':
54 54
 					$settings = array(
55 55
 						array(
@@ -57,19 +57,19 @@  discard block
 block discarded – undo
57 57
 							'type' => 'title',
58 58
 						),
59 59
 						array(
60
-							'name'    => __( 'Remove Data on Uninstall', 'give' ),
61
-							'desc'    => __( 'When the plugin is deleted, completely remove all Give data. This includes all Give settings, forms, form meta, donor, donor data, donations. Everything.', 'give' ),
60
+							'name'    => __('Remove Data on Uninstall', 'give'),
61
+							'desc'    => __('When the plugin is deleted, completely remove all Give data. This includes all Give settings, forms, form meta, donor, donor data, donations. Everything.', 'give'),
62 62
 							'id'      => 'uninstall_on_delete',
63 63
 							'type'    => 'radio_inline',
64 64
 							'default' => 'disabled',
65 65
 							'options' => array(
66
-								'enabled'  => __( 'Yes, Remove all data', 'give' ),
67
-								'disabled' => __( 'No, keep my Give settings and donation data', 'give' ),
66
+								'enabled'  => __('Yes, Remove all data', 'give'),
67
+								'disabled' => __('No, keep my Give settings and donation data', 'give'),
68 68
 							),
69 69
 						),
70 70
 						array(
71
-							'name'    => __( 'Default User Role', 'give' ),
72
-							'desc'    => __( 'Assign default user roles for donors when donors opt to register as a WP User.', 'give' ),
71
+							'name'    => __('Default User Role', 'give'),
72
+							'desc'    => __('Assign default user roles for donors when donors opt to register as a WP User.', 'give'),
73 73
 							'id'      => 'donor_default_user_role',
74 74
 							'type'    => 'select',
75 75
 							'default' => 'give_donor',
@@ -77,51 +77,51 @@  discard block
 block discarded – undo
77 77
 						),
78 78
 						array(
79 79
 							/* translators: %s: the_content */
80
-							'name'    => sprintf( __( '%s filter', 'give' ), '<code>the_content</code>' ),
80
+							'name'    => sprintf(__('%s filter', 'give'), '<code>the_content</code>'),
81 81
 							/* translators: 1: https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content 2: the_content */
82
-							'desc'    => sprintf( __( 'If you are seeing extra social buttons, related posts, or other unwanted elements appearing within your forms then you can disable WordPress\' content filter. <a href="%1$s" target="_blank">Learn more</a> about %2$s filter.', 'give' ), esc_url( 'https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content' ), '<code>the_content</code>' ),
82
+							'desc'    => sprintf(__('If you are seeing extra social buttons, related posts, or other unwanted elements appearing within your forms then you can disable WordPress\' content filter. <a href="%1$s" target="_blank">Learn more</a> about %2$s filter.', 'give'), esc_url('https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content'), '<code>the_content</code>'),
83 83
 							'id'      => 'the_content_filter',
84 84
 							'default' => 'enabled',
85 85
 							'type'    => 'radio_inline',
86 86
 							'options' => array(
87
-								'enabled'  => __( 'Enabled', 'give' ),
88
-								'disabled' => __( 'Disabled', 'give' ),
87
+								'enabled'  => __('Enabled', 'give'),
88
+								'disabled' => __('Disabled', 'give'),
89 89
 							),
90 90
 						),
91 91
 						array(
92
-							'name'    => __( 'Script Loading Location', 'give' ),
93
-							'desc'    => __( 'This allows you to load your Give scripts either in the <code>&lt;head&gt;</code> or footer of your website.', 'give' ),
92
+							'name'    => __('Script Loading Location', 'give'),
93
+							'desc'    => __('This allows you to load your Give scripts either in the <code>&lt;head&gt;</code> or footer of your website.', 'give'),
94 94
 							'id'      => 'scripts_footer',
95 95
 							'type'    => 'radio_inline',
96 96
 							'default' => 'disabled',
97 97
 							'options' => array(
98
-								'disabled' => __( 'Head', 'give' ),
99
-								'enabled'  => __( 'Footer', 'give' ),
98
+								'disabled' => __('Head', 'give'),
99
+								'enabled'  => __('Footer', 'give'),
100 100
 							),
101 101
 						),
102 102
 						array(
103
-							'name'    => __( 'Akismet SPAM Protection', 'give' ),
104
-							'desc'    => __( 'Add a layer of SPAM protection to your donation submissions with Akismet. When enabled, donation submissions will be first sent to Akismet\'s API if you have the plugin activated and configured.', 'give' ),
103
+							'name'    => __('Akismet SPAM Protection', 'give'),
104
+							'desc'    => __('Add a layer of SPAM protection to your donation submissions with Akismet. When enabled, donation submissions will be first sent to Akismet\'s API if you have the plugin activated and configured.', 'give'),
105 105
 							'id'      => 'akismet_spam_protection',
106 106
 							'type'    => 'radio_inline',
107
-							'default' => ( give_check_akismet_key() ) ? 'enabled' : 'disabled',
107
+							'default' => (give_check_akismet_key()) ? 'enabled' : 'disabled',
108 108
 							'options' => array(
109
-								'enabled'  => __( 'Enabled', 'give' ),
110
-								'disabled' => __( 'Disabled', 'give' ),
109
+								'enabled'  => __('Enabled', 'give'),
110
+								'disabled' => __('Disabled', 'give'),
111 111
 							),
112 112
 						),
113 113
 						array(
114 114
 							'name'        => 'Give Cache',
115 115
 							'id'          => 'give-clear-cache',
116
-							'buttonTitle' => __( 'Clear Cache', 'give' ),
117
-							'desc'        => __( 'Click this button if you want to clear Give\'s cache. The plugin stores common settings and queries in cache to optimize performance. Clearing cache will remove and begin rebuilding these saved queries.', 'give' ),
116
+							'buttonTitle' => __('Clear Cache', 'give'),
117
+							'desc'        => __('Click this button if you want to clear Give\'s cache. The plugin stores common settings and queries in cache to optimize performance. Clearing cache will remove and begin rebuilding these saved queries.', 'give'),
118 118
 							'type'        => 'remove_cache_button'
119 119
 						),
120 120
 						array(
121
-							'name'  => __( 'Advanced Settings Docs Link', 'give' ),
121
+							'name'  => __('Advanced Settings Docs Link', 'give'),
122 122
 							'id'    => 'advanced_settings_docs_link',
123
-							'url'   => esc_url( 'http://docs.givewp.com/settings-advanced' ),
124
-							'title' => __( 'Advanced Settings', 'give' ),
123
+							'url'   => esc_url('http://docs.givewp.com/settings-advanced'),
124
+							'title' => __('Advanced Settings', 'give'),
125 125
 							'type'  => 'give_docs_link',
126 126
 						),
127 127
 						array(
@@ -137,20 +137,20 @@  discard block
 block discarded – undo
137 137
 			 *
138 138
 			 * @since 2.0
139 139
 			 */
140
-			if ( apply_filters( 'give_settings_advanced_show_cache_setting', false ) ) {
141
-				array_splice( $settings, 1, 0, array(
140
+			if (apply_filters('give_settings_advanced_show_cache_setting', false)) {
141
+				array_splice($settings, 1, 0, array(
142 142
 					array(
143
-						'name'    => __( 'Cache', 'give' ),
144
-						'desc'    => __( 'If caching is enabled the plugin will start caching custom post type related queries and reduce the overall load time.', 'give' ),
143
+						'name'    => __('Cache', 'give'),
144
+						'desc'    => __('If caching is enabled the plugin will start caching custom post type related queries and reduce the overall load time.', 'give'),
145 145
 						'id'      => 'cache',
146 146
 						'type'    => 'radio_inline',
147 147
 						'default' => 'enabled',
148 148
 						'options' => array(
149
-							'enabled'  => __( 'Enabled', 'give' ),
150
-							'disabled' => __( 'Disabled', 'give' ),
149
+							'enabled'  => __('Enabled', 'give'),
150
+							'disabled' => __('Disabled', 'give'),
151 151
 						),
152 152
 					)
153
-				) );
153
+				));
154 154
 			}
155 155
 
156 156
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 			 * Filter the advanced settings.
159 159
 			 * Backward compatibility: Please do not use this filter. This filter is deprecated in 1.8
160 160
 			 */
161
-			$settings = apply_filters( 'give_settings_advanced', $settings );
161
+			$settings = apply_filters('give_settings_advanced', $settings);
162 162
 
163 163
 			/**
164 164
 			 * Filter the settings.
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 			 *
168 168
 			 * @param  array $settings
169 169
 			 */
170
-			$settings = apply_filters( 'give_get_settings_' . $this->id, $settings );
170
+			$settings = apply_filters('give_get_settings_'.$this->id, $settings);
171 171
 
172 172
 			// Output.
173 173
 			return $settings;
@@ -181,10 +181,10 @@  discard block
 block discarded – undo
181 181
 		 */
182 182
 		public function get_sections() {
183 183
 			$sections = array(
184
-				'advanced-options' => __( 'Advanced Options', 'give' ),
184
+				'advanced-options' => __('Advanced Options', 'give'),
185 185
 			);
186 186
 
187
-			return apply_filters( 'give_get_sections_' . $this->id, $sections );
187
+			return apply_filters('give_get_sections_'.$this->id, $sections);
188 188
 		}
189 189
 
190 190
 
@@ -196,17 +196,17 @@  discard block
 block discarded – undo
196 196
 		 *
197 197
 		 * @param array $field
198 198
 		 */
199
-		public function render_remove_cache_button( $field ) {
199
+		public function render_remove_cache_button($field) {
200 200
 			?>
201
-			<tr valign="top" <?php echo ! empty( $field['wrapper_class'] ) ? 'class="' . $field['wrapper_class'] . '"' : '' ?>>
201
+			<tr valign="top" <?php echo ! empty($field['wrapper_class']) ? 'class="'.$field['wrapper_class'].'"' : '' ?>>
202 202
 				<th scope="row" class="titledesc">
203 203
 					<label
204
-						for="<?php echo esc_attr( $field['id'] ); ?>"><?php echo esc_html( $field['name'] ) ?></label>
204
+						for="<?php echo esc_attr($field['id']); ?>"><?php echo esc_html($field['name']) ?></label>
205 205
 				</th>
206 206
 				<td class="give-forminp">
207
-					<button type="button" id="<?php echo esc_attr( $field['id'] ); ?>"
208
-					        class="button button-secondary"><?php echo esc_html( $field['buttonTitle'] ) ?></button>
209
-					<?php echo Give_Admin_Settings::get_field_description( $field ); ?>
207
+					<button type="button" id="<?php echo esc_attr($field['id']); ?>"
208
+					        class="button button-secondary"><?php echo esc_html($field['buttonTitle']) ?></button>
209
+					<?php echo Give_Admin_Settings::get_field_description($field); ?>
210 210
 				</td>
211 211
 			</tr>
212 212
 			<?php
Please login to merge, or discard this patch.
includes/admin/settings/class-settings-general.php 1 patch
Spacing   +116 added lines, -116 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
  * @since       1.8
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( ! defined('ABSPATH')) {
13 13
 	exit; // Exit if accessed directly.
14 14
 }
15 15
 
16
-if ( ! class_exists( 'Give_Settings_General' ) ) :
16
+if ( ! class_exists('Give_Settings_General')) :
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_General.
@@ -27,14 +27,14 @@  discard block
 block discarded – undo
27 27
 		 */
28 28
 		public function __construct() {
29 29
 			$this->id    = 'general';
30
-			$this->label = __( 'General', 'give' );
30
+			$this->label = __('General', 'give');
31 31
 
32 32
 			$this->default_tab = 'general-settings';
33 33
 
34
-			if ( $this->id === give_get_current_setting_tab() ) {
35
-				add_action( 'give_save_settings_give_settings', array( $this, '__give_change_donation_stating_number' ), 10, 3 );
36
-				add_action( 'give_admin_field_give_sequential_donation_code_preview', array( $this, '__render_give_sequential_donation_code_preview' ), 10, 3 );
37
-				add_action( 'give_admin_field_give_unlock_all_settings', array( $this, '__render_give_unlock_all_settings' ), 10, 3 );
34
+			if ($this->id === give_get_current_setting_tab()) {
35
+				add_action('give_save_settings_give_settings', array($this, '__give_change_donation_stating_number'), 10, 3);
36
+				add_action('give_admin_field_give_sequential_donation_code_preview', array($this, '__render_give_sequential_donation_code_preview'), 10, 3);
37
+				add_action('give_admin_field_give_unlock_all_settings', array($this, '__render_give_unlock_all_settings'), 10, 3);
38 38
 			}
39 39
 
40 40
 			parent::__construct();
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 			$settings        = array();
51 51
 			$current_section = give_get_current_setting_section();
52 52
 
53
-			switch ( $current_section ) {
53
+			switch ($current_section) {
54 54
 				case 'access-control':
55 55
 					$settings = array(
56 56
 						// Section 3: Access control.
@@ -60,20 +60,20 @@  discard block
 block discarded – undo
60 60
 						),
61 61
 						array(
62 62
 							'id'      => 'session_lifetime',
63
-							'name'    => __( 'Session Lifetime', 'give' ),
64
-							'desc'    => __( 'The length of time a user\'s session is kept alive. Give starts a new session per user upon donation. Sessions allow donors to view their donation receipts without being logged in.', 'give' ),
63
+							'name'    => __('Session Lifetime', 'give'),
64
+							'desc'    => __('The length of time a user\'s session is kept alive. Give starts a new session per user upon donation. Sessions allow donors to view their donation receipts without being logged in.', 'give'),
65 65
 							'type'    => 'select',
66 66
 							'options' => array(
67
-								'86400'  => __( '24 Hours', 'give' ),
68
-								'172800' => __( '48 Hours', 'give' ),
69
-								'259200' => __( '72 Hours', 'give' ),
70
-								'604800' => __( '1 Week', 'give' ),
67
+								'86400'  => __('24 Hours', 'give'),
68
+								'172800' => __('48 Hours', 'give'),
69
+								'259200' => __('72 Hours', 'give'),
70
+								'604800' => __('1 Week', 'give'),
71 71
 							),
72 72
 						),
73 73
 						array(
74 74
 							'id'         => 'limit_display_donations',
75
-							'name'       => __( 'Limit Donations Displayed', 'give' ),
76
-							'desc'       => __( 'Adjusts the number of donations displayed to a non logged-in user when they attempt to access the Donation History page without an active session. For security reasons, it\'s best to leave this at 1-3 donations.', 'give' ),
75
+							'name'       => __('Limit Donations Displayed', 'give'),
76
+							'desc'       => __('Adjusts the number of donations displayed to a non logged-in user when they attempt to access the Donation History page without an active session. For security reasons, it\'s best to leave this at 1-3 donations.', 'give'),
77 77
 							'default'    => '1',
78 78
 							'type'       => 'number',
79 79
 							'css'        => 'width:50px;',
@@ -83,47 +83,47 @@  discard block
 block discarded – undo
83 83
 							),
84 84
 						),
85 85
 						array(
86
-							'name'    => __( 'Email Access', 'give' ),
87
-							'desc'    => __( 'Would you like your donors to be able to access their donation history using only email? Donors whose sessions have expired and do not have an account may still access their donation history via a temporary email access link.', 'give' ),
86
+							'name'    => __('Email Access', 'give'),
87
+							'desc'    => __('Would you like your donors to be able to access their donation history using only email? Donors whose sessions have expired and do not have an account may still access their donation history via a temporary email access link.', 'give'),
88 88
 							'id'      => 'email_access',
89 89
 							'type'    => 'radio_inline',
90 90
 							'default' => 'disabled',
91 91
 							'options' => array(
92
-								'enabled'  => __( 'Enabled', 'give' ),
93
-								'disabled' => __( 'Disabled', 'give' ),
92
+								'enabled'  => __('Enabled', 'give'),
93
+								'disabled' => __('Disabled', 'give'),
94 94
 							),
95 95
 						),
96 96
 						array(
97
-							'name'    => __( 'Enable reCAPTCHA', 'give' ),
98
-							'desc'    => __( 'Would you like to enable the reCAPTCHA feature?', 'give' ),
97
+							'name'    => __('Enable reCAPTCHA', 'give'),
98
+							'desc'    => __('Would you like to enable the reCAPTCHA feature?', 'give'),
99 99
 							'id'      => 'enable_recaptcha',
100 100
 							'type'    => 'radio_inline',
101 101
 							'default' => 'disabled',
102 102
 							'options' => array(
103
-								'enabled'  => __( 'Enabled', 'give' ),
104
-								'disabled' => __( 'Disabled', 'give' ),
103
+								'enabled'  => __('Enabled', 'give'),
104
+								'disabled' => __('Disabled', 'give'),
105 105
 							),
106 106
 						),
107 107
 						array(
108 108
 							'id'      => 'recaptcha_key',
109
-							'name'    => __( 'reCAPTCHA Site Key', 'give' ),
109
+							'name'    => __('reCAPTCHA Site Key', 'give'),
110 110
 							/* translators: %s: https://www.google.com/recaptcha/ */
111
-							'desc'    => sprintf( __( 'If you would like to prevent spam on the email access form navigate to <a href="%s" target="_blank">the reCAPTCHA website</a> and sign up for an API key and paste your reCAPTCHA site key here. The reCAPTCHA uses Google\'s user-friendly single click verification method.', 'give' ), esc_url( 'http://docs.givewp.com/recaptcha' ) ),
111
+							'desc'    => sprintf(__('If you would like to prevent spam on the email access form navigate to <a href="%s" target="_blank">the reCAPTCHA website</a> and sign up for an API key and paste your reCAPTCHA site key here. The reCAPTCHA uses Google\'s user-friendly single click verification method.', 'give'), esc_url('http://docs.givewp.com/recaptcha')),
112 112
 							'default' => '',
113 113
 							'type'    => 'text',
114 114
 						),
115 115
 						array(
116 116
 							'id'      => 'recaptcha_secret',
117
-							'name'    => __( 'reCAPTCHA Secret Key', 'give' ),
118
-							'desc'    => __( 'Please paste the reCAPTCHA secret key here from your  reCAPTCHA API Keys panel.', 'give' ),
117
+							'name'    => __('reCAPTCHA Secret Key', 'give'),
118
+							'desc'    => __('Please paste the reCAPTCHA secret key here from your  reCAPTCHA API Keys panel.', 'give'),
119 119
 							'default' => '',
120 120
 							'type'    => 'text',
121 121
 						),
122 122
 						array(
123
-							'name'  => __( 'Access Control Docs Link', 'give' ),
123
+							'name'  => __('Access Control Docs Link', 'give'),
124 124
 							'id'    => 'access_control_docs_link',
125
-							'url'   => esc_url( 'http://docs.givewp.com/settings-access-control' ),
126
-							'title' => __( 'Access Control', 'give' ),
125
+							'url'   => esc_url('http://docs.givewp.com/settings-access-control'),
126
+							'title' => __('Access Control', 'give'),
127 127
 							'type'  => 'give_docs_link',
128 128
 						),
129 129
 						array(
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
 					break;
135 135
 
136 136
 				case 'currency-settings' :
137
-					$currency_position_before = __( 'Before - %s&#x200e;10', 'give' );
138
-					$currency_position_after  = __( 'After - 10%s&#x200f;', 'give' );
137
+					$currency_position_before = __('Before - %s&#x200e;10', 'give');
138
+					$currency_position_after  = __('After - 10%s&#x200f;', 'give');
139 139
 
140 140
 					$settings = array(
141 141
 						// Section 2: Currency
@@ -144,14 +144,14 @@  discard block
 block discarded – undo
144 144
 							'id'   => 'give_title_general_settings_2',
145 145
 						),
146 146
 						array(
147
-							'name' => __( 'Currency Settings', 'give' ),
147
+							'name' => __('Currency Settings', 'give'),
148 148
 							'desc' => '',
149 149
 							'type' => 'give_title',
150 150
 							'id'   => 'give_title_general_settings_2',
151 151
 						),
152 152
 						array(
153
-							'name'    => __( 'Currency', 'give' ),
154
-							'desc'    => __( 'The donation currency. Note that some payment gateways have currency restrictions.', 'give' ),
153
+							'name'    => __('Currency', 'give'),
154
+							'desc'    => __('The donation currency. Note that some payment gateways have currency restrictions.', 'give'),
155 155
 							'id'      => 'currency',
156 156
 							'class'   => 'give-select-chosen',
157 157
 							'type'    => 'select',
@@ -159,51 +159,51 @@  discard block
 block discarded – undo
159 159
 							'default' => 'USD',
160 160
 						),
161 161
 						array(
162
-							'name'       => __( 'Currency Position', 'give' ),
163
-							'desc'       => __( 'The position of the currency symbol.', 'give' ),
162
+							'name'       => __('Currency Position', 'give'),
163
+							'desc'       => __('The position of the currency symbol.', 'give'),
164 164
 							'id'         => 'currency_position',
165 165
 							'type'       => 'select',
166 166
 							'options'    => array(
167 167
 								/* translators: %s: currency symbol */
168
-								'before' => sprintf( $currency_position_before, give_currency_symbol( give_get_currency() ) ),
168
+								'before' => sprintf($currency_position_before, give_currency_symbol(give_get_currency())),
169 169
 								/* translators: %s: currency symbol */
170
-								'after'  => sprintf( $currency_position_after, give_currency_symbol( give_get_currency() ) ),
170
+								'after'  => sprintf($currency_position_after, give_currency_symbol(give_get_currency())),
171 171
 							),
172 172
 							'default'    => 'before',
173 173
 							'attributes' => array(
174
-								'data-before-template' => sprintf( $currency_position_before, '{currency_pos}' ),
175
-								'data-after-template'  => sprintf( $currency_position_after, '{currency_pos}' ),
174
+								'data-before-template' => sprintf($currency_position_before, '{currency_pos}'),
175
+								'data-after-template'  => sprintf($currency_position_after, '{currency_pos}'),
176 176
 							),
177 177
 						),
178 178
 						array(
179
-							'name'    => __( 'Thousands Separator', 'give' ),
180
-							'desc'    => __( 'The symbol (typically , or .) to separate thousands.', 'give' ),
179
+							'name'    => __('Thousands Separator', 'give'),
180
+							'desc'    => __('The symbol (typically , or .) to separate thousands.', 'give'),
181 181
 							'id'      => 'thousands_separator',
182 182
 							'type'    => 'text',
183 183
 							'default' => ',',
184 184
 							'css'     => 'width:12em;',
185 185
 						),
186 186
 						array(
187
-							'name'    => __( 'Decimal Separator', 'give' ),
188
-							'desc'    => __( 'The symbol (usually , or .) to separate decimal points.', 'give' ),
187
+							'name'    => __('Decimal Separator', 'give'),
188
+							'desc'    => __('The symbol (usually , or .) to separate decimal points.', 'give'),
189 189
 							'id'      => 'decimal_separator',
190 190
 							'type'    => 'text',
191 191
 							'default' => '.',
192 192
 							'css'     => 'width:12em;',
193 193
 						),
194 194
 						array(
195
-							'name'    => __( 'Number of Decimals', 'give' ),
196
-							'desc'    => __( 'The number of decimal points displayed in amounts.', 'give' ),
195
+							'name'    => __('Number of Decimals', 'give'),
196
+							'desc'    => __('The number of decimal points displayed in amounts.', 'give'),
197 197
 							'id'      => 'number_decimals',
198 198
 							'type'    => 'text',
199 199
 							'default' => 2,
200 200
 							'css'     => 'width:12em;',
201 201
 						),
202 202
 						array(
203
-							'name'  => __( 'Currency Options Docs Link', 'give' ),
203
+							'name'  => __('Currency Options Docs Link', 'give'),
204 204
 							'id'    => 'currency_settings_docs_link',
205
-							'url'   => esc_url( 'http://docs.givewp.com/settings-currency' ),
206
-							'title' => __( 'Currency Settings', 'give' ),
205
+							'url'   => esc_url('http://docs.givewp.com/settings-currency'),
206
+							'title' => __('Currency Settings', 'give'),
207 207
 							'type'  => 'give_docs_link',
208 208
 						),
209 209
 						array(
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 					$country = give_get_country();
220 220
 
221 221
 					// get the list of the states of which default country is selected.
222
-					$states = give_get_states( $country );
222
+					$states = give_get_states($country);
223 223
 
224 224
 					// Get the country list that does not have any states init.
225 225
 					$no_states_country = give_no_states_country_list();
@@ -231,58 +231,58 @@  discard block
 block discarded – undo
231 231
 							'id'   => 'give_title_general_settings_1',
232 232
 						),
233 233
 						array(
234
-							'name' => __( 'General Settings', 'give' ),
234
+							'name' => __('General Settings', 'give'),
235 235
 							'desc' => '',
236 236
 							'type' => 'give_title',
237 237
 							'id'   => 'give_title_general_settings_1',
238 238
 						),
239 239
 						array(
240
-							'name'       => __( 'Success Page', 'give' ),
240
+							'name'       => __('Success Page', 'give'),
241 241
 							/* translators: %s: [give_receipt] */
242
-							'desc'       => sprintf( __( 'The page donors are sent to after completing their donations. The %s shortcode should be on this page.', 'give' ), '<code>[give_receipt]</code>' ),
242
+							'desc'       => sprintf(__('The page donors are sent to after completing their donations. The %s shortcode should be on this page.', 'give'), '<code>[give_receipt]</code>'),
243 243
 							'id'         => 'success_page',
244 244
 							'class'      => 'give-select give-select-chosen',
245 245
 							'type'       => 'select',
246
-							'options'    => give_cmb2_get_post_options( array(
246
+							'options'    => give_cmb2_get_post_options(array(
247 247
 								'post_type'   => 'page',
248 248
 								'numberposts' => 30,
249
-							) ),
249
+							)),
250 250
 							'attributes' => array(
251 251
 								'data-search-type' => 'pages'
252 252
 							)
253 253
 						),
254 254
 						array(
255
-							'name'       => __( 'Failed Donation Page', 'give' ),
256
-							'desc'       => __( 'The page donors are sent to if their donation is cancelled or fails.', 'give' ),
255
+							'name'       => __('Failed Donation Page', 'give'),
256
+							'desc'       => __('The page donors are sent to if their donation is cancelled or fails.', 'give'),
257 257
 							'class'      => 'give-select give-select-chosen',
258 258
 							'id'         => 'failure_page',
259 259
 							'type'       => 'select',
260
-							'options'    => give_cmb2_get_post_options( array(
260
+							'options'    => give_cmb2_get_post_options(array(
261 261
 								'post_type'   => 'page',
262 262
 								'numberposts' => 30,
263
-							) ),
263
+							)),
264 264
 							'attributes' => array(
265 265
 								'data-search-type' => 'pages'
266 266
 							)
267 267
 						),
268 268
 						array(
269
-							'name'       => __( 'Donation History Page', 'give' ),
269
+							'name'       => __('Donation History Page', 'give'),
270 270
 							/* translators: %s: [donation_history] */
271
-							'desc'       => sprintf( __( 'The page showing a complete donation history for the current user. The %s shortcode should be on this page.', 'give' ), '<code>[donation_history]</code>' ),
271
+							'desc'       => sprintf(__('The page showing a complete donation history for the current user. The %s shortcode should be on this page.', 'give'), '<code>[donation_history]</code>'),
272 272
 							'id'         => 'history_page',
273 273
 							'class'      => 'give-select give-select-chosen',
274 274
 							'type'       => 'select',
275
-							'options'    => give_cmb2_get_post_options( array(
275
+							'options'    => give_cmb2_get_post_options(array(
276 276
 								'post_type'   => 'page',
277 277
 								'numberposts' => 30,
278
-							) ),
278
+							)),
279 279
 							'attributes' => array(
280 280
 								'data-search-type' => 'pages'
281 281
 							)
282 282
 						),
283 283
 						array(
284
-							'name'    => __( 'Base Country', 'give' ),
285
-							'desc'    => __( 'The country your site operates from.', 'give' ),
284
+							'name'    => __('Base Country', 'give'),
285
+							'desc'    => __('The country your site operates from.', 'give'),
286 286
 							'id'      => 'base_country',
287 287
 							'type'    => 'select',
288 288
 							'options' => give_get_country_list(),
@@ -293,18 +293,18 @@  discard block
 block discarded – undo
293 293
 						 * @since 1.8.14
294 294
 						 */
295 295
 						array(
296
-							'wrapper_class' => ( array_key_exists( $country, $no_states_country ) ? 'give-hidden' : '' ),
297
-							'name'          => __( 'Base State/Province', 'give' ),
298
-							'desc'          => __( 'The state/province your site operates from.', 'give' ),
296
+							'wrapper_class' => (array_key_exists($country, $no_states_country) ? 'give-hidden' : ''),
297
+							'name'          => __('Base State/Province', 'give'),
298
+							'desc'          => __('The state/province your site operates from.', 'give'),
299 299
 							'id'            => 'base_state',
300
-							'type'          => ( empty( $states ) ? 'text' : 'select' ),
300
+							'type'          => (empty($states) ? 'text' : 'select'),
301 301
 							'options'       => $states,
302 302
 						),
303 303
 						array(
304
-							'name'  => __( 'General Options Docs Link', 'give' ),
304
+							'name'  => __('General Options Docs Link', 'give'),
305 305
 							'id'    => 'general_options_docs_link',
306
-							'url'   => esc_url( 'http://docs.givewp.com/settings-general' ),
307
-							'title' => __( 'General Options', 'give' ),
306
+							'url'   => esc_url('http://docs.givewp.com/settings-general'),
307
+							'title' => __('General Options', 'give'),
308 308
 							'type'  => 'give_docs_link',
309 309
 						),
310 310
 						array(
@@ -324,48 +324,48 @@  discard block
 block discarded – undo
324 324
 							'type' => 'title'
325 325
 						),
326 326
 						array(
327
-							'name'    => __( 'Sequential Ordering', 'give' ),
327
+							'name'    => __('Sequential Ordering', 'give'),
328 328
 							'id'      => "{$current_section}_status",
329
-							'desc'    => __( 'Custom donation numbering that increases sequentially to prevent gaps between donation IDs. If disabled, then donation numbers are generated from WordPress post IDs, which will result in gaps between numbers.', 'give' ),
329
+							'desc'    => __('Custom donation numbering that increases sequentially to prevent gaps between donation IDs. If disabled, then donation numbers are generated from WordPress post IDs, which will result in gaps between numbers.', 'give'),
330 330
 							'type'    => 'radio_inline',
331 331
 							'default' => 'disabled',
332 332
 							'options' => array(
333
-								'enabled'  => __( 'Enabled', 'give' ),
334
-								'disabled' => __( 'Disabled', 'give' )
333
+								'enabled'  => __('Enabled', 'give'),
334
+								'disabled' => __('Disabled', 'give')
335 335
 							)
336 336
 						),
337 337
 						array(
338
-							'name' => __( 'Next Donation Number', 'give' ),
338
+							'name' => __('Next Donation Number', 'give'),
339 339
 							'id'   => "{$current_section}_number",
340 340
 							'desc' => sprintf(
341
-								__( 'The number used to generate the next donation ID. This value must be greater than or equal to %s to avoid conflicts with existing donation IDs.', 'give' ),
342
-								'<code>' . Give()->seq_donation_number->get_next_number() . '</code>'
341
+								__('The number used to generate the next donation ID. This value must be greater than or equal to %s to avoid conflicts with existing donation IDs.', 'give'),
342
+								'<code>'.Give()->seq_donation_number->get_next_number().'</code>'
343 343
 							),
344 344
 							'type' => 'number',
345 345
 						),
346 346
 						array(
347
-							'name' => __( 'Number Prefix', 'give' ),
347
+							'name' => __('Number Prefix', 'give'),
348 348
 							'id'   => "{$current_section}_number_prefix",
349 349
 							'desc' => sprintf(
350
-								__( 'The prefix appended to all sequential donation numbers. Spaces are replaced by %s.', 'give' ),
350
+								__('The prefix appended to all sequential donation numbers. Spaces are replaced by %s.', 'give'),
351 351
 								'<code>-</code>'
352 352
 							),
353 353
 							'type' => 'text',
354 354
 						),
355 355
 						array(
356
-							'name' => __( 'Number Suffix', 'give' ),
356
+							'name' => __('Number Suffix', 'give'),
357 357
 							'id'   => "{$current_section}_number_suffix",
358 358
 							'desc' => sprintf(
359
-								__( 'The suffix appended to all sequential donation numbers. Spaces are replaced by %s.', 'give' ),
359
+								__('The suffix appended to all sequential donation numbers. Spaces are replaced by %s.', 'give'),
360 360
 								'<code>-</code>'
361 361
 							),
362 362
 							'type' => 'text',
363 363
 						),
364 364
 						array(
365
-							'name'    => __( 'Number Padding', 'give' ),
365
+							'name'    => __('Number Padding', 'give'),
366 366
 							'id'      => "{$current_section}_number_padding",
367 367
 							'desc'    => sprintf(
368
-								__( 'The minimum number of digits in the sequential donation number. Enter %s to display %s as %s.', 'give' ),
368
+								__('The minimum number of digits in the sequential donation number. Enter %s to display %s as %s.', 'give'),
369 369
 								'<code>4</code>',
370 370
 								'<code>1</code>',
371 371
 								'<code>0001</code>'
@@ -374,16 +374,16 @@  discard block
 block discarded – undo
374 374
 							'default' => '0',
375 375
 						),
376 376
 						array(
377
-							'name' => __( 'Donation ID Preview', 'give' ),
377
+							'name' => __('Donation ID Preview', 'give'),
378 378
 							'id'   => "{$current_section}_preview",
379 379
 							'type' => 'give_sequential_donation_code_preview',
380
-							'desc' => __( 'A preview of the next sequential donation ID. This preview cannot be edited directly as it is generated from the settings above.', 'give' ),
380
+							'desc' => __('A preview of the next sequential donation ID. This preview cannot be edited directly as it is generated from the settings above.', 'give'),
381 381
 						),
382 382
 						array(
383
-							'name'  => __( 'Sequential Ordering Docs Link', 'give' ),
383
+							'name'  => __('Sequential Ordering Docs Link', 'give'),
384 384
 							'id'    => "{$current_section}_doc link",
385
-							'url'   => esc_url( 'http://docs.givewp.com/settings-sequential-ordering' ),
386
-							'title' => __( 'Sequential Ordering', 'give' ),
385
+							'url'   => esc_url('http://docs.givewp.com/settings-sequential-ordering'),
386
+							'title' => __('Sequential Ordering', 'give'),
387 387
 							'type'  => 'give_docs_link',
388 388
 						),
389 389
 						array(
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 			 * Filter the general settings.
398 398
 			 * Backward compatibility: Please do not use this filter. This filter is deprecated in 1.8
399 399
 			 */
400
-			$settings = apply_filters( 'give_settings_general', $settings );
400
+			$settings = apply_filters('give_settings_general', $settings);
401 401
 
402 402
 			/**
403 403
 			 * Filter the settings.
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 			 *
407 407
 			 * @param  array $settings
408 408
 			 */
409
-			$settings = apply_filters( 'give_get_settings_' . $this->id, $settings );
409
+			$settings = apply_filters('give_get_settings_'.$this->id, $settings);
410 410
 
411 411
 			// Output.
412 412
 			return $settings;
@@ -420,13 +420,13 @@  discard block
 block discarded – undo
420 420
 		 */
421 421
 		public function get_sections() {
422 422
 			$sections = array(
423
-				'general-settings'    => __( 'General', 'give' ),
424
-				'currency-settings'   => __( 'Currency', 'give' ),
425
-				'access-control'      => __( 'Access Control', 'give' ),
426
-				'sequential-ordering' => __( 'Sequential Ordering', 'give' ),
423
+				'general-settings'    => __('General', 'give'),
424
+				'currency-settings'   => __('Currency', 'give'),
425
+				'access-control'      => __('Access Control', 'give'),
426
+				'sequential-ordering' => __('Sequential Ordering', 'give'),
427 427
 			);
428 428
 
429
-			return apply_filters( 'give_get_sections_' . $this->id, $sections );
429
+			return apply_filters('give_get_sections_'.$this->id, $sections);
430 430
 		}
431 431
 
432 432
 
@@ -442,23 +442,23 @@  discard block
 block discarded – undo
442 442
 		 *
443 443
 		 * @return bool
444 444
 		 */
445
-		public function __give_change_donation_stating_number( $update_options, $option_name, $old_options ) {
446
-			if ( ! isset( $_POST['sequential-ordering_number'] ) ) {
445
+		public function __give_change_donation_stating_number($update_options, $option_name, $old_options) {
446
+			if ( ! isset($_POST['sequential-ordering_number'])) {
447 447
 				return false;
448 448
 			}
449 449
 
450
-			if ( ( $next_number = Give()->seq_donation_number->get_next_number() ) > $update_options['sequential-ordering_number'] ) {
451
-				give_update_option( 'sequential-ordering_number', $next_number );
450
+			if (($next_number = Give()->seq_donation_number->get_next_number()) > $update_options['sequential-ordering_number']) {
451
+				give_update_option('sequential-ordering_number', $next_number);
452 452
 
453 453
 				Give_Admin_Settings::add_error(
454 454
 					'give-invalid-sequential-starting-number',
455 455
 					sprintf(
456
-						__( 'Next Donation Number must be equal to or larger than %s to avoid conflicts with existing donation IDs.', 'give' ),
456
+						__('Next Donation Number must be equal to or larger than %s to avoid conflicts with existing donation IDs.', 'give'),
457 457
 						$next_number
458 458
 					)
459 459
 				);
460
-			} elseif ( $update_options['sequential-ordering_number'] !== $old_options['sequential-ordering_number'] ) {
461
-				update_option( '_give_reset_sequential_number', 1 );
460
+			} elseif ($update_options['sequential-ordering_number'] !== $old_options['sequential-ordering_number']) {
461
+				update_option('_give_reset_sequential_number', 1);
462 462
 			}
463 463
 
464 464
 			return true;
@@ -473,16 +473,16 @@  discard block
 block discarded – undo
473 473
 		 *
474 474
 		 * @param $field
475 475
 		 */
476
-		public function __render_give_sequential_donation_code_preview( $field ) {
476
+		public function __render_give_sequential_donation_code_preview($field) {
477 477
 			?>
478
-			<tr valign="top" <?php echo ! empty( $field['wrapper_class'] ) ? 'class="' . $field['wrapper_class'] . '"' : '' ?>>
478
+			<tr valign="top" <?php echo ! empty($field['wrapper_class']) ? 'class="'.$field['wrapper_class'].'"' : '' ?>>
479 479
 				<th scope="row" class="titledesc">
480 480
 					<label
481
-						for="<?php echo esc_attr( $field['id'] ); ?>"><?php echo esc_html( $field['name'] ) ?></label>
481
+						for="<?php echo esc_attr($field['id']); ?>"><?php echo esc_html($field['name']) ?></label>
482 482
 				</th>
483 483
 				<td class="give-forminp">
484
-					<input id="<?php echo esc_attr( $field['id'] ); ?>" class="give-input-field" type="text" disabled>
485
-					<?php echo Give_Admin_Settings::get_field_description( $field ); ?>
484
+					<input id="<?php echo esc_attr($field['id']); ?>" class="give-input-field" type="text" disabled>
485
+					<?php echo Give_Admin_Settings::get_field_description($field); ?>
486 486
 				</td>
487 487
 			</tr>
488 488
 			<?php
@@ -497,16 +497,16 @@  discard block
 block discarded – undo
497 497
 		 *
498 498
 		 * @param $field
499 499
 		 */
500
-		public function __render_give_unlock_all_settings( $field ) {
500
+		public function __render_give_unlock_all_settings($field) {
501 501
 			?>
502
-			<tr valign="top" <?php echo ! empty( $field['wrapper_class'] ) ? 'class="' . $field['wrapper_class'] . '"' : '' ?>>
502
+			<tr valign="top" <?php echo ! empty($field['wrapper_class']) ? 'class="'.$field['wrapper_class'].'"' : '' ?>>
503 503
 				<th scope="row" class="titledesc">
504 504
 					<label
505
-						for="<?php echo esc_attr( $field['id'] ); ?>"><?php echo esc_html( $field['name'] ) ?></label>
505
+						for="<?php echo esc_attr($field['id']); ?>"><?php echo esc_html($field['name']) ?></label>
506 506
 				</th>
507 507
 				<td class="give-forminp">
508
-					<?php echo Give_Admin_Settings::get_field_description( $field ); ?>
509
-					<a href="" id="<?php echo $field['id']; ?>" data-message="<?php echo $field['confirmation_msg'] ?>"><?php echo __( 'Unlock all settings', 'give' ); ?></a>
508
+					<?php echo Give_Admin_Settings::get_field_description($field); ?>
509
+					<a href="" id="<?php echo $field['id']; ?>" data-message="<?php echo $field['confirmation_msg'] ?>"><?php echo __('Unlock all settings', 'give'); ?></a>
510 510
 				</td>
511 511
 			</tr>
512 512
 			<?php
Please login to merge, or discard this patch.
includes/admin/settings/class-settings-display.php 1 patch
Spacing   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
  * @since       1.8
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( ! defined('ABSPATH')) {
13 13
 	exit; // Exit if accessed directly
14 14
 }
15 15
 
16
-if ( ! class_exists( 'Give_Settings_Display' ) ) :
16
+if ( ! class_exists('Give_Settings_Display')) :
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_Display.
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 		 */
28 28
 		public function __construct() {
29 29
 			$this->id    = 'display';
30
-			$this->label = __( 'Display Options', 'give' );
30
+			$this->label = __('Display Options', 'give');
31 31
 
32 32
 			$this->default_tab = 'display-settings';
33 33
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 			$settings        = array();
45 45
 			$current_section = give_get_current_setting_section();
46 46
 
47
-			switch ( $current_section ) {
47
+			switch ($current_section) {
48 48
 				case 'display-settings' :
49 49
 					$settings = array(
50 50
 						// Section 1: Display
@@ -53,67 +53,67 @@  discard block
 block discarded – undo
53 53
 							'type' => 'title',
54 54
 						),
55 55
 						array(
56
-							'name'    => __( 'Default Give Styles', 'give' ),
57
-							'desc'    => __( 'You can disable Give\'s default styles for donation forms and other frontend elements.', 'give' ),
56
+							'name'    => __('Default Give Styles', 'give'),
57
+							'desc'    => __('You can disable Give\'s default styles for donation forms and other frontend elements.', 'give'),
58 58
 							'id'      => 'css',
59 59
 							'type'    => 'radio_inline',
60 60
 							'default' => 'enabled',
61 61
 							'options' => array(
62
-								'enabled'  => __( 'Enabled', 'give' ),
63
-								'disabled' => __( 'Disabled', 'give' ),
62
+								'enabled'  => __('Enabled', 'give'),
63
+								'disabled' => __('Disabled', 'give'),
64 64
 							),
65 65
 						),
66 66
 						array(
67
-							'name'    => __( 'Floating Labels', 'give' ),
67
+							'name'    => __('Floating Labels', 'give'),
68 68
 							/* translators: %s: http://docs.givewp.com/form-floating-labels */
69
-							'desc'    => sprintf( wp_kses( __( '<a href="%s" target="_blank">Floating labels</a> allows your labels to be inset within the form fields to provide a cleaner form appearance. Note that if the "Disable CSS" option is enabled, you will need to style the floating labels yourself.', 'give' ), array(
69
+							'desc'    => sprintf(wp_kses(__('<a href="%s" target="_blank">Floating labels</a> allows your labels to be inset within the form fields to provide a cleaner form appearance. Note that if the "Disable CSS" option is enabled, you will need to style the floating labels yourself.', 'give'), array(
70 70
 								'a' => array(
71 71
 									'href'   => array(),
72 72
 									'target' => array(),
73 73
 								),
74
-							) ), esc_url( 'http://docs.givewp.com/form-floating-labels' ) ),
74
+							)), esc_url('http://docs.givewp.com/form-floating-labels')),
75 75
 							'id'      => 'floatlabels',
76 76
 							'type'    => 'radio_inline',
77 77
 							'default' => 'disabled',
78 78
 							'options' => array(
79
-								'enabled'  => __( 'Enabled', 'give' ),
80
-								'disabled' => __( 'Disabled', 'give' ),
79
+								'enabled'  => __('Enabled', 'give'),
80
+								'disabled' => __('Disabled', 'give'),
81 81
 							),
82 82
 						),
83 83
 						array(
84
-							'name'    => __( 'Welcome Screen', 'give' ),
84
+							'name'    => __('Welcome Screen', 'give'),
85 85
 							/* translators: %s: about page URL */
86
-							'desc'    => sprintf( wp_kses( __( 'Enable this option if you would like to disable the <a href="%s" target="_blank">Give Welcome screen</a> that displays each time Give is activated or updated.', 'give' ), array(
86
+							'desc'    => sprintf(wp_kses(__('Enable this option if you would like to disable the <a href="%s" target="_blank">Give Welcome screen</a> that displays each time Give is activated or updated.', 'give'), array(
87 87
 								'a' => array(
88 88
 									'href'   => array(),
89 89
 									'target' => array(),
90 90
 								),
91
-							) ), esc_url( admin_url( 'index.php?page=give-about' ) ) ),
91
+							)), esc_url(admin_url('index.php?page=give-about'))),
92 92
 							'id'      => 'welcome',
93 93
 							'type'    => 'radio_inline',
94 94
 							'default' => 'enabled',
95 95
 							'options' => array(
96
-								'enabled'  => __( 'Enabled', 'give' ),
97
-								'disabled' => __( 'Disabled', 'give' ),
96
+								'enabled'  => __('Enabled', 'give'),
97
+								'disabled' => __('Disabled', 'give'),
98 98
 							),
99 99
 						),
100 100
 						array(
101
-							'name'    => __( 'Company Donations', 'give' ),
102
-							'desc'    => __( 'Do you want a Company field to appear after First Name and Last Name?', 'give' ),
101
+							'name'    => __('Company Donations', 'give'),
102
+							'desc'    => __('Do you want a Company field to appear after First Name and Last Name?', 'give'),
103 103
 							'id'      => 'company_field',
104 104
 							'type'    => 'radio_inline',
105 105
 							'default' => 'disabled',
106 106
 							'options' => array(
107
-								'disabled' => __( 'Disabled', 'give' ),
108
-								'required' => __( 'Required', 'give' ),
109
-								'optional' => __( 'Optional', 'give' ),
107
+								'disabled' => __('Disabled', 'give'),
108
+								'required' => __('Required', 'give'),
109
+								'optional' => __('Optional', 'give'),
110 110
 							),
111 111
 						),
112 112
 						array(
113
-							'name'  => __( 'Display Settings Docs Link', 'give' ),
113
+							'name'  => __('Display Settings Docs Link', 'give'),
114 114
 							'id'    => 'display_settings_docs_link',
115
-							'url'   => esc_url( 'http://docs.givewp.com/form-display-options' ),
116
-							'title' => __( 'Display Options Settings', 'give' ),
115
+							'url'   => esc_url('http://docs.givewp.com/form-display-options'),
116
+							'title' => __('Display Options Settings', 'give'),
117 117
 							'type'  => 'give_docs_link',
118 118
 						),
119 119
 						array(
@@ -130,78 +130,78 @@  discard block
 block discarded – undo
130 130
 							'type' => 'title',
131 131
 						),
132 132
 						array(
133
-							'name'    => __( 'Form Single Views', 'give' ),
134
-							'desc'    => __( 'By default, all donation form have single views enabled which creates a specific URL on your website for that form. This option disables the singular posts from being publicly viewable. Note: you will need to embed forms using a shortcode or widget if enabled.', 'give' ),
133
+							'name'    => __('Form Single Views', 'give'),
134
+							'desc'    => __('By default, all donation form have single views enabled which creates a specific URL on your website for that form. This option disables the singular posts from being publicly viewable. Note: you will need to embed forms using a shortcode or widget if enabled.', 'give'),
135 135
 							'id'      => 'forms_singular',
136 136
 							'type'    => 'radio_inline',
137 137
 							'default' => 'enabled',
138 138
 							'options' => array(
139
-								'enabled'  => __( 'Enabled', 'give' ),
140
-								'disabled' => __( 'Disabled', 'give' ),
139
+								'enabled'  => __('Enabled', 'give'),
140
+								'disabled' => __('Disabled', 'give'),
141 141
 							),
142 142
 						),
143 143
 						array(
144
-							'name'    => __( 'Form Archives', 'give' ),
145
-							'desc'    => sprintf( wp_kses( __( 'Archives pages list all the donation forms you have created. This option will disable only the form\'s archive page(s). The single form\'s view will remain in place. Note: you will need to <a href="%s">refresh your permalinks</a> after this option has been enabled.', 'give' ), array(
144
+							'name'    => __('Form Archives', 'give'),
145
+							'desc'    => sprintf(wp_kses(__('Archives pages list all the donation forms you have created. This option will disable only the form\'s archive page(s). The single form\'s view will remain in place. Note: you will need to <a href="%s">refresh your permalinks</a> after this option has been enabled.', 'give'), array(
146 146
 								'a' => array(
147 147
 									'href'   => array(),
148 148
 									'target' => array(),
149 149
 								),
150
-							) ), esc_url( admin_url( 'options-permalink.php' ) ) ),
150
+							)), esc_url(admin_url('options-permalink.php'))),
151 151
 							'id'      => 'forms_archives',
152 152
 							'type'    => 'radio_inline',
153 153
 							'default' => 'enabled',
154 154
 							'options' => array(
155
-								'enabled'  => __( 'Enabled', 'give' ),
156
-								'disabled' => __( 'Disabled', 'give' ),
155
+								'enabled'  => __('Enabled', 'give'),
156
+								'disabled' => __('Disabled', 'give'),
157 157
 							),
158 158
 						),
159 159
 						array(
160
-							'name'    => __( 'Form Excerpts', 'give' ),
161
-							'desc'    => __( 'The excerpt is an optional summary or description of a donation form; in short, a summary as to why the user should give.', 'give' ),
160
+							'name'    => __('Form Excerpts', 'give'),
161
+							'desc'    => __('The excerpt is an optional summary or description of a donation form; in short, a summary as to why the user should give.', 'give'),
162 162
 							'id'      => 'forms_excerpt',
163 163
 							'type'    => 'radio_inline',
164 164
 							'default' => 'enabled',
165 165
 							'options' => array(
166
-								'enabled'  => __( 'Enabled', 'give' ),
167
-								'disabled' => __( 'Disabled', 'give' ),
166
+								'enabled'  => __('Enabled', 'give'),
167
+								'disabled' => __('Disabled', 'give'),
168 168
 							),
169 169
 						),
170 170
 						array(
171
-							'name'    => __( 'Form Featured Image', 'give' ),
172
-							'desc'    => __( 'If you do not wish to use the featured image functionality you can disable it using this option and it will not be displayed for single donation forms.', 'give' ),
171
+							'name'    => __('Form Featured Image', 'give'),
172
+							'desc'    => __('If you do not wish to use the featured image functionality you can disable it using this option and it will not be displayed for single donation forms.', 'give'),
173 173
 							'id'      => 'form_featured_img',
174 174
 							'type'    => 'radio_inline',
175 175
 							'default' => 'enabled',
176 176
 							'options' => array(
177
-								'enabled'  => __( 'Enabled', 'give' ),
178
-								'disabled' => __( 'Disabled', 'give' ),
177
+								'enabled'  => __('Enabled', 'give'),
178
+								'disabled' => __('Disabled', 'give'),
179 179
 							),
180 180
 						),
181 181
 						array(
182
-							'name'    => __( 'Featured Image Size', 'give' ),
183
-							'desc'    => __( 'The Featured Image is an image that is chosen as the representative image for a donation form. Some themes may have custom featured image sizes. Please select the size you would like to display for your single donation form\'s featured image.', 'give' ),
182
+							'name'    => __('Featured Image Size', 'give'),
183
+							'desc'    => __('The Featured Image is an image that is chosen as the representative image for a donation form. Some themes may have custom featured image sizes. Please select the size you would like to display for your single donation form\'s featured image.', 'give'),
184 184
 							'id'      => 'featured_image_size',
185 185
 							'type'    => 'select',
186 186
 							'default' => 'large',
187 187
 							'options' => give_get_featured_image_sizes(),
188 188
 						),
189 189
 						array(
190
-							'name'    => __( 'Single Form Sidebar', 'give' ),
191
-							'desc'    => __( 'The sidebar allows you to add additional widgets to the Give single form view. If you don\'t plan on using the sidebar you may disable it with this option.', 'give' ),
190
+							'name'    => __('Single Form Sidebar', 'give'),
191
+							'desc'    => __('The sidebar allows you to add additional widgets to the Give single form view. If you don\'t plan on using the sidebar you may disable it with this option.', 'give'),
192 192
 							'id'      => 'form_sidebar',
193 193
 							'type'    => 'radio_inline',
194 194
 							'default' => 'enabled',
195 195
 							'options' => array(
196
-								'enabled'  => __( 'Enabled', 'give' ),
197
-								'disabled' => __( 'Disabled', 'give' ),
196
+								'enabled'  => __('Enabled', 'give'),
197
+								'disabled' => __('Disabled', 'give'),
198 198
 							),
199 199
 						),
200 200
 						array(
201
-							'name'  => __( 'Post Types Docs Link', 'give' ),
201
+							'name'  => __('Post Types Docs Link', 'give'),
202 202
 							'id'    => 'post_types_settings_docs_link',
203
-							'url'   => esc_url( 'http://docs.givewp.com/settings-post-types' ),
204
-							'title' => __( 'Post Types Settings', 'give' ),
203
+							'url'   => esc_url('http://docs.givewp.com/settings-post-types'),
204
+							'title' => __('Post Types Settings', 'give'),
205 205
 							'type'  => 'give_docs_link',
206 206
 						),
207 207
 						array(
@@ -218,32 +218,32 @@  discard block
 block discarded – undo
218 218
 							'type' => 'title',
219 219
 						),
220 220
 						array(
221
-							'name'    => __( 'Form Categories', 'give' ),
222
-							'desc'    => __( 'Enable Categories for all Give forms.', 'give' ),
221
+							'name'    => __('Form Categories', 'give'),
222
+							'desc'    => __('Enable Categories for all Give forms.', 'give'),
223 223
 							'id'      => 'categories',
224 224
 							'type'    => 'radio_inline',
225 225
 							'default' => 'disabled',
226 226
 							'options' => array(
227
-								'enabled'  => __( 'Enabled', 'give' ),
228
-								'disabled' => __( 'Disabled', 'give' ),
227
+								'enabled'  => __('Enabled', 'give'),
228
+								'disabled' => __('Disabled', 'give'),
229 229
 							),
230 230
 						),
231 231
 						array(
232
-							'name'    => __( 'Form Tags', 'give' ),
233
-							'desc'    => __( 'Enable Tags for all Give forms.', 'give' ),
232
+							'name'    => __('Form Tags', 'give'),
233
+							'desc'    => __('Enable Tags for all Give forms.', 'give'),
234 234
 							'id'      => 'tags',
235 235
 							'type'    => 'radio_inline',
236 236
 							'default' => 'disabled',
237 237
 							'options' => array(
238
-								'enabled'  => __( 'Enabled', 'give' ),
239
-								'disabled' => __( 'Disabled', 'give' ),
238
+								'enabled'  => __('Enabled', 'give'),
239
+								'disabled' => __('Disabled', 'give'),
240 240
 							),
241 241
 						),
242 242
 						array(
243
-							'name'  => __( 'Taxonomies Docs Link', 'give' ),
243
+							'name'  => __('Taxonomies Docs Link', 'give'),
244 244
 							'id'    => 'taxonomies_settings_docs_link',
245
-							'url'   => esc_url( 'http://docs.givewp.com/settings-taxonomies' ),
246
-							'title' => __( 'Taxonomies Settings', 'give' ),
245
+							'url'   => esc_url('http://docs.givewp.com/settings-taxonomies'),
246
+							'title' => __('Taxonomies Settings', 'give'),
247 247
 							'type'  => 'give_docs_link',
248 248
 						),
249 249
 						array(
@@ -260,36 +260,36 @@  discard block
 block discarded – undo
260 260
 							'type' => 'title',
261 261
 						),
262 262
 						array(
263
-							'name'    => __( 'Terms and Conditions', 'give' ),
264
-							'desc'    => __( 'Would you like donors to require that donors agree to your terms when donating? Note: You can enable/disable this option and customize the terms per form as well.', 'give' ),
263
+							'name'    => __('Terms and Conditions', 'give'),
264
+							'desc'    => __('Would you like donors to require that donors agree to your terms when donating? Note: You can enable/disable this option and customize the terms per form as well.', 'give'),
265 265
 							'id'      => 'terms',
266 266
 							'type'    => 'radio_inline',
267 267
 							'default' => 'disabled',
268 268
 							'options' => array(
269
-								'enabled'  => __( 'Enabled', 'give' ),
270
-								'disabled' => __( 'Disabled', 'give' ),
269
+								'enabled'  => __('Enabled', 'give'),
270
+								'disabled' => __('Disabled', 'give'),
271 271
 							),
272 272
 						),
273 273
 						array(
274
-							'name'       => __( 'Agree to Terms Label', 'give' ),
275
-							'desc'       => __( 'The label shown next to the agree to terms check box. Customize it here or leave blank to use the default placeholder text. Note: You can customize the label per form.', 'give' ),
274
+							'name'       => __('Agree to Terms Label', 'give'),
275
+							'desc'       => __('The label shown next to the agree to terms check box. Customize it here or leave blank to use the default placeholder text. Note: You can customize the label per form.', 'give'),
276 276
 							'id'         => 'agree_to_terms_label',
277 277
 							'attributes' => array(
278
-								'placeholder' => esc_attr__( 'Agree to Terms?', 'give' ),
278
+								'placeholder' => esc_attr__('Agree to Terms?', 'give'),
279 279
 							),
280 280
 							'type'       => 'text',
281 281
 						),
282 282
 						array(
283
-							'name' => __( 'Agreement Text', 'give' ),
284
-							'desc' => __( 'This is the actual text which the user will be asked to agree to in order to donate. Note: You can customize the content per form as needed.', 'give' ),
283
+							'name' => __('Agreement Text', 'give'),
284
+							'desc' => __('This is the actual text which the user will be asked to agree to in order to donate. Note: You can customize the content per form as needed.', 'give'),
285 285
 							'id'   => 'agreement_text',
286 286
 							'type' => 'wysiwyg',
287 287
 						),
288 288
 						array(
289
-							'name'  => __( 'Terms and Conditions Docs Link', 'give' ),
289
+							'name'  => __('Terms and Conditions Docs Link', 'give'),
290 290
 							'id'    => 'terms_settings_docs_link',
291
-							'url'   => esc_url( 'http://docs.givewp.com/settings-terms' ),
292
-							'title' => __( 'Terms and Conditions Settings', 'give' ),
291
+							'url'   => esc_url('http://docs.givewp.com/settings-terms'),
292
+							'title' => __('Terms and Conditions Settings', 'give'),
293 293
 							'type'  => 'give_docs_link',
294 294
 						),
295 295
 						array(
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 			 * Filter the display options settings.
305 305
 			 * Backward compatibility: Please do not use this filter. This filter is deprecated in 1.8
306 306
 			 */
307
-			$settings = apply_filters( 'give_settings_display', $settings );
307
+			$settings = apply_filters('give_settings_display', $settings);
308 308
 
309 309
 			/**
310 310
 			 * Filter the settings.
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 			 *
314 314
 			 * @param  array $settings
315 315
 			 */
316
-			$settings = apply_filters( 'give_get_settings_' . $this->id, $settings );
316
+			$settings = apply_filters('give_get_settings_'.$this->id, $settings);
317 317
 
318 318
 			// Output.
319 319
 			return $settings;
@@ -327,13 +327,13 @@  discard block
 block discarded – undo
327 327
 		 */
328 328
 		public function get_sections() {
329 329
 			$sections = array(
330
-				'display-settings'    => __( 'Display', 'give' ),
331
-				'post-types'          => __( 'Post Types', 'give' ),
332
-				'taxonomies'          => __( 'Taxonomies', 'give' ),
333
-				'term-and-conditions' => __( 'Terms and Conditions', 'give' ),
330
+				'display-settings'    => __('Display', 'give'),
331
+				'post-types'          => __('Post Types', 'give'),
332
+				'taxonomies'          => __('Taxonomies', 'give'),
333
+				'term-and-conditions' => __('Terms and Conditions', 'give'),
334 334
 			);
335 335
 
336
-			return apply_filters( 'give_get_sections_' . $this->id, $sections );
336
+			return apply_filters('give_get_sections_'.$this->id, $sections);
337 337
 		}
338 338
 	}
339 339
 
Please login to merge, or discard this patch.
includes/admin/settings/class-settings-email.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
  * @since       1.8
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( ! defined('ABSPATH')) {
13 13
 	exit; // Exit if accessed directly
14 14
 }
15 15
 
16
-if ( ! class_exists( 'Give_Settings_Email' ) ) :
16
+if ( ! class_exists('Give_Settings_Email')) :
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_Email.
@@ -27,13 +27,13 @@  discard block
 block discarded – undo
27 27
 		 */
28 28
 		public function __construct() {
29 29
 			$this->id    = 'emails';
30
-			$this->label = esc_html__( 'Emails', 'give' );
30
+			$this->label = esc_html__('Emails', 'give');
31 31
 
32 32
 			$this->default_tab = 'email-settings';
33 33
 
34 34
 			parent::__construct();
35 35
 
36
-			add_action( 'give_admin_field_email_notification', array( $this, 'email_notification_setting' ) );
36
+			add_action('give_admin_field_email_notification', array($this, 'email_notification_setting'));
37 37
 		}
38 38
 
39 39
 		/**
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
 			$settings        = array();
47 47
 			$current_section = give_get_current_setting_section();
48 48
 
49
-			switch ( $current_section ) {
49
+			switch ($current_section) {
50 50
 				case 'email-settings' :
51 51
 					$settings = array(
52 52
 
53 53
 						// Section 1: Email Notification Listing.
54 54
 						array(
55
-							'desc'       => __( 'Email notifications sent from Give are listed below. Click on an email to configure it.', 'give' ),
55
+							'desc'       => __('Email notifications sent from Give are listed below. Click on an email to configure it.', 'give'),
56 56
 							'type'       => 'title',
57 57
 							'id'         => 'give_email_notification_settings',
58 58
 							'table_html' => false,
@@ -67,42 +67,42 @@  discard block
 block discarded – undo
67 67
 
68 68
 						// Section 2: Email Sender Setting
69 69
 						array(
70
-							'title' => __( 'Email Sender Options', 'give' ),
70
+							'title' => __('Email Sender Options', 'give'),
71 71
 							'id'    => 'give_title_email_settings_1',
72 72
 							'type'  => 'title',
73 73
 						),
74 74
 						array(
75 75
 							'id'      => 'email_template',
76
-							'name'    => esc_html__( 'Email Template', 'give' ),
77
-							'desc'    => esc_html__( 'Choose your template from the available registered template types.', 'give' ),
76
+							'name'    => esc_html__('Email Template', 'give'),
77
+							'desc'    => esc_html__('Choose your template from the available registered template types.', 'give'),
78 78
 							'type'    => 'select',
79 79
 							'options' => give_get_email_templates(),
80 80
 						),
81 81
 						array(
82 82
 							'id'   => 'email_logo',
83
-							'name' => esc_html__( 'Logo', 'give' ),
84
-							'desc' => esc_html__( 'Upload or choose a logo to be displayed at the top of the donation receipt emails. Displayed on HTML emails only.', 'give' ),
83
+							'name' => esc_html__('Logo', 'give'),
84
+							'desc' => esc_html__('Upload or choose a logo to be displayed at the top of the donation receipt emails. Displayed on HTML emails only.', 'give'),
85 85
 							'type' => 'file',
86 86
 						),
87 87
 						array(
88 88
 							'id'      => 'from_name',
89
-							'name'    => esc_html__( 'From Name', 'give' ),
90
-							'desc'    => esc_html__( 'The name which appears in the "From" field in all Give donation emails.', 'give' ),
91
-							'default' => get_bloginfo( 'name' ),
89
+							'name'    => esc_html__('From Name', 'give'),
90
+							'desc'    => esc_html__('The name which appears in the "From" field in all Give donation emails.', 'give'),
91
+							'default' => get_bloginfo('name'),
92 92
 							'type'    => 'text',
93 93
 						),
94 94
 						array(
95 95
 							'id'      => 'from_email',
96
-							'name'    => esc_html__( 'From Email', 'give' ),
97
-							'desc'    => esc_html__( 'Email address from which all Give emails are sent from. This will act as the "from" and "reply-to" email address.', 'give' ),
98
-							'default' => get_bloginfo( 'admin_email' ),
96
+							'name'    => esc_html__('From Email', 'give'),
97
+							'desc'    => esc_html__('Email address from which all Give emails are sent from. This will act as the "from" and "reply-to" email address.', 'give'),
98
+							'default' => get_bloginfo('admin_email'),
99 99
 							'type'    => 'text',
100 100
 						),
101 101
 						array(
102
-							'name'  => esc_html__( 'Donation Notification Settings Docs Link', 'give' ),
102
+							'name'  => esc_html__('Donation Notification Settings Docs Link', 'give'),
103 103
 							'id'    => 'donation_notification_settings_docs_link',
104
-							'url'   => esc_url( 'http://docs.givewp.com/settings-donation-notification' ),
105
-							'title' => __( 'Donation Notification Settings', 'give' ),
104
+							'url'   => esc_url('http://docs.givewp.com/settings-donation-notification'),
105
+							'title' => __('Donation Notification Settings', 'give'),
106 106
 							'type'  => 'give_docs_link',
107 107
 						),
108 108
 						array(
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 			 * Filter the emails settings.
118 118
 			 * Backward compatibility: Please do not use this filter. This filter is deprecated in 1.8
119 119
 			 */
120
-			$settings = apply_filters( 'give_settings_emails', $settings );
120
+			$settings = apply_filters('give_settings_emails', $settings);
121 121
 
122 122
 			/**
123 123
 			 * Filter the settings.
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 			 *
127 127
 			 * @param  array $settings
128 128
 			 */
129
-			$settings = apply_filters( 'give_get_settings_' . $this->id, $settings );
129
+			$settings = apply_filters('give_get_settings_'.$this->id, $settings);
130 130
 
131 131
 			// Output.
132 132
 			return $settings;
@@ -140,10 +140,10 @@  discard block
 block discarded – undo
140 140
 		 */
141 141
 		public function get_sections() {
142 142
 			$sections = array(
143
-				'email-settings' => esc_html__( 'Email Settings', 'give' ),
143
+				'email-settings' => esc_html__('Email Settings', 'give'),
144 144
 			);
145 145
 
146
-			return apply_filters( 'give_get_sections_' . $this->id, $sections );
146
+			return apply_filters('give_get_sections_'.$this->id, $sections);
147 147
 		}
148 148
 
149 149
 		/**
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 		 */
155 155
 		public function email_notification_setting() {
156 156
 			// Load email notification table.
157
-			require_once GIVE_PLUGIN_DIR . 'includes/admin/emails/class-email-notification-table.php';
157
+			require_once GIVE_PLUGIN_DIR.'includes/admin/emails/class-email-notification-table.php';
158 158
 
159 159
 			// Init table.
160 160
 			$email_notifications_table = new Give_Email_Notification_Table();
@@ -173,13 +173,13 @@  discard block
 block discarded – undo
173 173
 		 * @return void
174 174
 		 */
175 175
 		public function output() {
176
-			if ( $this->enable_save ) {
177
-				$GLOBALS['give_hide_save_button'] = apply_filters( 'give_hide_save_button_on_email_admin_setting_page', false );
176
+			if ($this->enable_save) {
177
+				$GLOBALS['give_hide_save_button'] = apply_filters('give_hide_save_button_on_email_admin_setting_page', false);
178 178
 			}
179 179
 
180 180
 			$settings = $this->get_settings();
181 181
 
182
-			Give_Admin_Settings::output_fields( $settings, 'give_settings' );
182
+			Give_Admin_Settings::output_fields($settings, 'give_settings');
183 183
 		}
184 184
 	}
185 185
 
Please login to merge, or discard this patch.
includes/admin/settings/class-settings-gateways.php 1 patch
Spacing   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
  * @since       1.8
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( ! defined('ABSPATH')) {
13 13
 	exit; // Exit if accessed directly
14 14
 }
15 15
 
16
-if ( ! class_exists( 'Give_Settings_Gateways' ) ) :
16
+if ( ! class_exists('Give_Settings_Gateways')) :
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_Gateways.
@@ -27,15 +27,15 @@  discard block
 block discarded – undo
27 27
 		 */
28 28
 		public function __construct() {
29 29
 			$this->id    = 'gateways';
30
-			$this->label = esc_html__( 'Payment Gateways', 'give' );
30
+			$this->label = esc_html__('Payment Gateways', 'give');
31 31
 
32 32
 			$this->default_tab = 'gateways-settings';
33 33
 
34 34
 			parent::__construct();
35 35
 
36 36
 			// Do not use main form for this tab.
37
-			if ( give_get_current_setting_tab() === $this->id ) {
38
-				add_action( 'give_admin_field_enabled_gateways', array( $this, 'render_enabled_gateways' ), 10, 2 );
37
+			if (give_get_current_setting_tab() === $this->id) {
38
+				add_action('give_admin_field_enabled_gateways', array($this, 'render_enabled_gateways'), 10, 2);
39 39
 			}
40 40
 		}
41 41
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 			$settings        = array();
50 50
 			$current_section = give_get_current_setting_section();
51 51
 
52
-			switch ( $current_section ) {
52
+			switch ($current_section) {
53 53
 				case 'paypal-standard':
54 54
 					$settings = array(
55 55
 						// Section 2: PayPal Standard.
@@ -58,55 +58,55 @@  discard block
 block discarded – undo
58 58
 							'id'   => 'give_title_gateway_settings_2',
59 59
 						),
60 60
 						array(
61
-							'name' => __( 'PayPal Email', 'give' ),
62
-							'desc' => __( 'Enter your PayPal account\'s email.', 'give' ),
61
+							'name' => __('PayPal Email', 'give'),
62
+							'desc' => __('Enter your PayPal account\'s email.', 'give'),
63 63
 							'id'   => 'paypal_email',
64 64
 							'type' => 'email',
65 65
 						),
66 66
 						array(
67
-							'name' => __( 'PayPal Page Style', 'give' ),
68
-							'desc' => __( 'Enter the name of the PayPal page style to use, or leave blank to use the default.', 'give' ),
67
+							'name' => __('PayPal Page Style', 'give'),
68
+							'desc' => __('Enter the name of the PayPal page style to use, or leave blank to use the default.', 'give'),
69 69
 							'id'   => 'paypal_page_style',
70 70
 							'type' => 'text',
71 71
 						),
72 72
 						array(
73
-							'name'    => __( 'PayPal Transaction Type', 'give' ),
74
-							'desc'    => __( 'Nonprofits must verify their status to withdraw donations they receive via PayPal. PayPal users that are not verified nonprofits must demonstrate how their donations will be used, once they raise more than $10,000. By default, Give transactions are sent to PayPal as donations. You may change the transaction type using this option if you feel you may not meet PayPal\'s donation requirements.', 'give' ),
73
+							'name'    => __('PayPal Transaction Type', 'give'),
74
+							'desc'    => __('Nonprofits must verify their status to withdraw donations they receive via PayPal. PayPal users that are not verified nonprofits must demonstrate how their donations will be used, once they raise more than $10,000. By default, Give transactions are sent to PayPal as donations. You may change the transaction type using this option if you feel you may not meet PayPal\'s donation requirements.', 'give'),
75 75
 							'id'      => 'paypal_button_type',
76 76
 							'type'    => 'radio_inline',
77 77
 							'options' => array(
78
-								'donation' => __( 'Donation', 'give' ),
79
-								'standard' => __( 'Standard Transaction', 'give' )
78
+								'donation' => __('Donation', 'give'),
79
+								'standard' => __('Standard Transaction', 'give')
80 80
 							),
81 81
 							'default' => 'donation',
82 82
 						),
83 83
 						array(
84
-							'name'    => __( 'Billing Details', 'give' ),
85
-							'desc'    => __( 'This option will enable the billing details section for PayPal Standard which requires the donor\'s address to complete the donation. These fields are not required by PayPal to process the transaction, but you may have a need to collect the data.', 'give' ),
84
+							'name'    => __('Billing Details', 'give'),
85
+							'desc'    => __('This option will enable the billing details section for PayPal Standard which requires the donor\'s address to complete the donation. These fields are not required by PayPal to process the transaction, but you may have a need to collect the data.', 'give'),
86 86
 							'id'      => 'paypal_standard_billing_details',
87 87
 							'type'    => 'radio_inline',
88 88
 							'default' => 'disabled',
89 89
 							'options' => array(
90
-								'enabled'  => __( 'Enabled', 'give' ),
91
-								'disabled' => __( 'Disabled', 'give' ),
90
+								'enabled'  => __('Enabled', 'give'),
91
+								'disabled' => __('Disabled', 'give'),
92 92
 							)
93 93
 						),
94 94
 						array(
95
-							'name'    => __( 'PayPal IPN Verification', 'give' ),
96
-							'desc'    => __( 'If donations are not getting marked as complete, use a slightly less secure method of verifying donations.', 'give' ),
95
+							'name'    => __('PayPal IPN Verification', 'give'),
96
+							'desc'    => __('If donations are not getting marked as complete, use a slightly less secure method of verifying donations.', 'give'),
97 97
 							'id'      => 'paypal_verification',
98 98
 							'type'    => 'radio_inline',
99 99
 							'default' => 'enabled',
100 100
 							'options' => array(
101
-								'enabled'  => __( 'Enabled', 'give' ),
102
-								'disabled' => __( 'Disabled', 'give' ),
101
+								'enabled'  => __('Enabled', 'give'),
102
+								'disabled' => __('Disabled', 'give'),
103 103
 							)
104 104
 						),
105 105
 						array(
106
-							'name'  => __( 'PayPal Standard Gateway Settings Docs Link', 'give' ),
106
+							'name'  => __('PayPal Standard Gateway Settings Docs Link', 'give'),
107 107
 							'id'    => 'paypal_standard_gateway_settings_docs_link',
108
-							'url'   => esc_url( 'http://docs.givewp.com/settings-gateway-paypal-standard' ),
109
-							'title' => __( 'PayPal Standard Gateway Settings', 'give' ),
108
+							'url'   => esc_url('http://docs.givewp.com/settings-gateway-paypal-standard'),
109
+							'title' => __('PayPal Standard Gateway Settings', 'give'),
110 110
 							'type'  => 'give_docs_link',
111 111
 						),
112 112
 						array(
@@ -124,19 +124,19 @@  discard block
 block discarded – undo
124 124
 							'id'   => 'give_title_gateway_settings_3',
125 125
 						),
126 126
 						array(
127
-							'name'    => __( 'Collect Billing Details', 'give' ),
128
-							'desc'    => __( 'Enable to request billing details for offline donations. Will appear above offline donation instructions. Can be enabled/disabled per form.', 'give' ),
127
+							'name'    => __('Collect Billing Details', 'give'),
128
+							'desc'    => __('Enable to request billing details for offline donations. Will appear above offline donation instructions. Can be enabled/disabled per form.', 'give'),
129 129
 							'id'      => 'give_offline_donation_enable_billing_fields',
130 130
 							'type'    => 'radio_inline',
131 131
 							'default' => 'disabled',
132 132
 							'options' => array(
133
-								'enabled'  => __( 'Enabled', 'give' ),
134
-								'disabled' => __( 'Disabled', 'give' )
133
+								'enabled'  => __('Enabled', 'give'),
134
+								'disabled' => __('Disabled', 'give')
135 135
 							)
136 136
 						),
137 137
 						array(
138
-							'name'    => __( 'Offline Donation Instructions', 'give' ),
139
-							'desc'    => __( 'The following content will appear for all forms when the user selects the offline donation payment option. Note: You may customize the content per form as needed.', 'give' ),
138
+							'name'    => __('Offline Donation Instructions', 'give'),
139
+							'desc'    => __('The following content will appear for all forms when the user selects the offline donation payment option. Note: You may customize the content per form as needed.', 'give'),
140 140
 							'id'      => 'global_offline_donation_content',
141 141
 							'default' => give_get_default_offline_donation_content(),
142 142
 							'type'    => 'wysiwyg',
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
 							)
146 146
 						),
147 147
 						array(
148
-							'name'  => esc_html__( 'Offline Donations Settings Docs Link', 'give' ),
148
+							'name'  => esc_html__('Offline Donations Settings Docs Link', 'give'),
149 149
 							'id'    => 'offline_gateway_settings_docs_link',
150
-							'url'   => esc_url( 'http://docs.givewp.com/offlinegateway' ),
151
-							'title' => __( 'Offline Gateway Settings', 'give' ),
150
+							'url'   => esc_url('http://docs.givewp.com/offlinegateway'),
151
+							'title' => __('Offline Gateway Settings', 'give'),
152 152
 							'type'  => 'give_docs_link',
153 153
 						),
154 154
 						array(
@@ -166,19 +166,19 @@  discard block
 block discarded – undo
166 166
 							'type' => 'title'
167 167
 						),
168 168
 						array(
169
-							'name'    => __( 'Test Mode', 'give' ),
170
-							'desc'    => __( 'While in test mode no live donations are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing.', 'give' ),
169
+							'name'    => __('Test Mode', 'give'),
170
+							'desc'    => __('While in test mode no live donations are processed. To fully use test mode, you must have a sandbox (test) account for the payment gateway you are testing.', 'give'),
171 171
 							'id'      => 'test_mode',
172 172
 							'type'    => 'radio_inline',
173 173
 							'default' => 'disabled',
174 174
 							'options' => array(
175
-								'enabled'  => __( 'Enabled', 'give' ),
176
-								'disabled' => __( 'Disabled', 'give' ),
175
+								'enabled'  => __('Enabled', 'give'),
176
+								'disabled' => __('Disabled', 'give'),
177 177
 							)
178 178
 						),
179 179
 						array(
180
-							'name' => __( 'Enabled Gateways', 'give' ),
181
-							'desc' => __( 'Enable your payment gateway. Can be ordered by dragging.', 'give' ),
180
+							'name' => __('Enabled Gateways', 'give'),
181
+							'desc' => __('Enable your payment gateway. Can be ordered by dragging.', 'give'),
182 182
 							'id'   => 'gateways',
183 183
 							'type' => 'enabled_gateways'
184 184
 						),
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 						 * This setting will not render on admin setting screen but help internal code to recognize "gateways_label"  setting and add them to give setting when save.
191 191
 						 */
192 192
 						array(
193
-							'name' => __( 'Gateways Label', 'give' ),
193
+							'name' => __('Gateways Label', 'give'),
194 194
 							'desc' => '',
195 195
 							'id'   => 'gateways_label',
196 196
 							'type' => 'gateways_label_hidden'
@@ -203,17 +203,17 @@  discard block
 block discarded – undo
203 203
 						 * This setting will not render on admin setting screen but help internal code to recognize "default_gateway"  setting and add them to give setting when save.
204 204
 						 */
205 205
 						array(
206
-							'name' => __( 'Default Gateway', 'give' ),
207
-							'desc' => __( 'The gateway that will be selected by default.', 'give' ),
206
+							'name' => __('Default Gateway', 'give'),
207
+							'desc' => __('The gateway that will be selected by default.', 'give'),
208 208
 							'id'   => 'default_gateway',
209 209
 							'type' => 'default_gateway_hidden'
210 210
 						),
211 211
 
212 212
 						array(
213
-							'name'  => __( 'Gateways Docs Link', 'give' ),
213
+							'name'  => __('Gateways Docs Link', 'give'),
214 214
 							'id'    => 'gateway_settings_docs_link',
215
-							'url'   => esc_url( 'http://docs.givewp.com/settings-gateways' ),
216
-							'title' => __( 'Gateway Settings', 'give' ),
215
+							'url'   => esc_url('http://docs.givewp.com/settings-gateways'),
216
+							'title' => __('Gateway Settings', 'give'),
217 217
 							'type'  => 'give_docs_link',
218 218
 						),
219 219
 						array(
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 			 * Filter the payment gateways settings.
229 229
 			 * Backward compatibility: Please do not use this filter. This filter is deprecated in 1.8
230 230
 			 */
231
-			$settings = apply_filters( 'give_settings_gateways', $settings );
231
+			$settings = apply_filters('give_settings_gateways', $settings);
232 232
 
233 233
 			/**
234 234
 			 * Filter the settings.
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 			 *
238 238
 			 * @param  array $settings
239 239
 			 */
240
-			$settings = apply_filters( 'give_get_settings_' . $this->id, $settings );
240
+			$settings = apply_filters('give_get_settings_'.$this->id, $settings);
241 241
 
242 242
 			// Output.
243 243
 			return $settings;
@@ -251,12 +251,12 @@  discard block
 block discarded – undo
251 251
 		 */
252 252
 		public function get_sections() {
253 253
 			$sections = array(
254
-				'gateways-settings' => __( 'Gateways', 'give' ),
255
-				'paypal-standard'   => __( 'PayPal Standard', 'give' ),
256
-				'offline-donations' => __( 'Offline Donations', 'give' )
254
+				'gateways-settings' => __('Gateways', 'give'),
255
+				'paypal-standard'   => __('PayPal Standard', 'give'),
256
+				'offline-donations' => __('Offline Donations', 'give')
257 257
 			);
258 258
 
259
-			return apply_filters( 'give_get_sections_' . $this->id, $sections );
259
+			return apply_filters('give_get_sections_'.$this->id, $sections);
260 260
 		}
261 261
 
262 262
 
@@ -269,11 +269,11 @@  discard block
 block discarded – undo
269 269
 		 * @param $field
270 270
 		 * @param $settings
271 271
 		 */
272
-		public function render_enabled_gateways( $field, $settings ) {
272
+		public function render_enabled_gateways($field, $settings) {
273 273
 			$id              = $field['id'];
274
-			$gateways        = give_get_ordered_payment_gateways( give_get_payment_gateways() );
275
-			$gateways_label  = give_get_option( 'gateways_label', array() );
276
-			$default_gateway = give_get_option( 'default_gateway', current( array_keys( $gateways ) ) );
274
+			$gateways        = give_get_ordered_payment_gateways(give_get_payment_gateways());
275
+			$gateways_label  = give_get_option('gateways_label', array());
276
+			$default_gateway = give_get_option('default_gateway', current(array_keys($gateways)));
277 277
 
278 278
 			ob_start();
279 279
 
@@ -288,50 +288,50 @@  discard block
 block discarded – undo
288 288
 						<span>%3$s</span>
289 289
 						<span>%4$s</span>
290 290
 						',
291
-				__( 'Gateway', 'give' ),
292
-				__( 'Label', 'give' ),
293
-				__( 'Default', 'give' ),
294
-				__( 'Enabled', 'give' )
291
+				__('Gateway', 'give'),
292
+				__('Label', 'give'),
293
+				__('Default', 'give'),
294
+				__('Enabled', 'give')
295 295
 			);
296 296
 			echo '</div>';
297 297
 
298 298
 			echo '<ul class="give-checklist-fields give-payment-gatways-list">';
299
-			foreach ( $gateways as $key => $option ) :
299
+			foreach ($gateways as $key => $option) :
300 300
 				$enabled = null;
301
-				if ( is_array( $settings ) && array_key_exists( $key, $settings ) ) {
301
+				if (is_array($settings) && array_key_exists($key, $settings)) {
302 302
 					$enabled = '1';
303 303
 				}
304 304
 
305 305
 				echo '<li>';
306
-				printf( '<span class="give-drag-handle"><span class="dashicons dashicons-menu"></span></span>' );
307
-				printf( '<span class="admin-label">%s</span>', esc_html( $option['admin_label'] ) );
306
+				printf('<span class="give-drag-handle"><span class="dashicons dashicons-menu"></span></span>');
307
+				printf('<span class="admin-label">%s</span>', esc_html($option['admin_label']));
308 308
 
309 309
 				$label = '';
310
-				if ( ! empty( $gateways_label[ $key ] ) ) {
311
-					$label = $gateways_label[ $key ];
310
+				if ( ! empty($gateways_label[$key])) {
311
+					$label = $gateways_label[$key];
312 312
 				}
313 313
 
314 314
 				printf(
315 315
 					'<input class="checkout-label" type="text" id="%1$s[%2$s]" name="%1$s[%2$s]" value="%3$s" placeholder="%4$s"/>',
316 316
 					'gateways_label',
317
-					esc_attr( $key ),
318
-					esc_html( $label ),
319
-					esc_html( $option['checkout_label'] )
317
+					esc_attr($key),
318
+					esc_html($label),
319
+					esc_html($option['checkout_label'])
320 320
 				);
321 321
 
322 322
 				printf(
323 323
 					'<input class="gateways-radio" type="radio" name="%1$s" value="%2$s" %3$s>',
324 324
 					'default_gateway',
325 325
 					$key,
326
-					checked( $key, $default_gateway, false )
326
+					checked($key, $default_gateway, false)
327 327
 				);
328 328
 
329 329
 				printf(
330 330
 					'<input class="gateways-checkbox" name="%1$s[%2$s]" id="%1$s[%2$s]" type="checkbox" value="1" %3$s data-payment-gateway="%4$s"/>',
331
-					esc_attr( $id ),
332
-					esc_attr( $key ),
333
-					checked( '1', $enabled, false ),
334
-					esc_html( $option['admin_label'] )
331
+					esc_attr($id),
332
+					esc_attr($key),
333
+					checked('1', $enabled, false),
334
+					esc_html($option['admin_label'])
335 335
 				);
336 336
 				echo '</li>';
337 337
 			endforeach;
Please login to merge, or discard this patch.
includes/admin/welcome.php 1 patch
Spacing   +108 added lines, -108 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  */
12 12
 
13 13
 // Exit if accessed directly.
14
-if ( ! defined( 'ABSPATH' ) ) {
14
+if ( ! defined('ABSPATH')) {
15 15
 	exit;
16 16
 }
17 17
 
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
 	 * @since 1.0
36 36
 	 */
37 37
 	public function __construct() {
38
-		add_action( 'admin_menu', array( $this, 'admin_menus' ) );
39
-		add_action( 'admin_head', array( $this, 'admin_head' ) );
40
-		add_action( 'admin_init', array( $this, 'welcome' ) );
38
+		add_action('admin_menu', array($this, 'admin_menus'));
39
+		add_action('admin_head', array($this, 'admin_head'));
40
+		add_action('admin_init', array($this, 'welcome'));
41 41
 	}
42 42
 
43 43
 	/**
@@ -49,45 +49,45 @@  discard block
 block discarded – undo
49 49
 	 * @return void
50 50
 	 */
51 51
 	public function admin_menus() {
52
-		list( $display_version ) = explode( '-', GIVE_VERSION );
52
+		list($display_version) = explode('-', GIVE_VERSION);
53 53
 
54 54
 		// About Page
55 55
 		add_dashboard_page(
56 56
 		/* translators: %s: Give version */
57
-			sprintf( esc_html__( 'Welcome to Give %s', 'give' ), $display_version ),
58
-			esc_html__( 'Welcome to Give', 'give' ),
57
+			sprintf(esc_html__('Welcome to Give %s', 'give'), $display_version),
58
+			esc_html__('Welcome to Give', 'give'),
59 59
 			$this->minimum_capability,
60 60
 			'give-about',
61
-			array( $this, 'about_screen' )
61
+			array($this, 'about_screen')
62 62
 		);
63 63
 
64 64
 		// Changelog Page
65 65
 		add_dashboard_page(
66
-			esc_html__( 'Give Changelog', 'give' ),
67
-			esc_html__( 'Give Changelog', 'give' ),
66
+			esc_html__('Give Changelog', 'give'),
67
+			esc_html__('Give Changelog', 'give'),
68 68
 			$this->minimum_capability,
69 69
 			'give-changelog',
70
-			array( $this, 'changelog_screen' )
70
+			array($this, 'changelog_screen')
71 71
 		);
72 72
 
73 73
 		// Getting Started Page
74 74
 		add_dashboard_page(
75 75
 		/* translators: %s: Give version */
76
-			sprintf( esc_html__( 'Give %s - Getting Started Guide', 'give' ), $display_version ),
77
-			esc_html__( 'Getting started with Give', 'give' ),
76
+			sprintf(esc_html__('Give %s - Getting Started Guide', 'give'), $display_version),
77
+			esc_html__('Getting started with Give', 'give'),
78 78
 			$this->minimum_capability,
79 79
 			'give-getting-started',
80
-			array( $this, 'getting_started_screen' )
80
+			array($this, 'getting_started_screen')
81 81
 		);
82 82
 
83 83
 		// Credits Page
84 84
 		add_dashboard_page(
85 85
 		/* translators: %s: Give version */
86
-			sprintf( esc_html__( 'Give %s - Credits', 'give' ), $display_version ),
87
-			esc_html__( 'The people that build Give', 'give' ),
86
+			sprintf(esc_html__('Give %s - Credits', 'give'), $display_version),
87
+			esc_html__('The people that build Give', 'give'),
88 88
 			$this->minimum_capability,
89 89
 			'give-credits',
90
-			array( $this, 'credits_screen' )
90
+			array($this, 'credits_screen')
91 91
 		);
92 92
 	}
93 93
 
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
 	 */
101 101
 	public function admin_head() {
102 102
 
103
-		remove_submenu_page( 'index.php', 'give-about' );
104
-		remove_submenu_page( 'index.php', 'give-changelog' );
105
-		remove_submenu_page( 'index.php', 'give-getting-started' );
106
-		remove_submenu_page( 'index.php', 'give-credits' );
103
+		remove_submenu_page('index.php', 'give-about');
104
+		remove_submenu_page('index.php', 'give-changelog');
105
+		remove_submenu_page('index.php', 'give-getting-started');
106
+		remove_submenu_page('index.php', 'give-credits');
107 107
 
108 108
 	}
109 109
 
@@ -115,24 +115,24 @@  discard block
 block discarded – undo
115 115
 	 * @return void
116 116
 	 */
117 117
 	public function tabs() {
118
-		$selected = isset( $_GET['page'] ) ? $_GET['page'] : 'give-about';
118
+		$selected = isset($_GET['page']) ? $_GET['page'] : 'give-about';
119 119
 		?>
120 120
         <h2 class="nav-tab-wrapper">
121 121
             <a class="nav-tab <?php echo $selected == 'give-about' ? 'nav-tab-active' : ''; ?>"
122
-               href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'give-about' ), 'index.php' ) ) ); ?>">
123
-				<?php esc_html_e( 'About Give', 'give' ); ?>
122
+               href="<?php echo esc_url(admin_url(add_query_arg(array('page' => 'give-about'), 'index.php'))); ?>">
123
+				<?php esc_html_e('About Give', 'give'); ?>
124 124
             </a>
125 125
             <a class="nav-tab <?php echo $selected == 'give-getting-started' ? 'nav-tab-active' : ''; ?>"
126
-               href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'give-getting-started' ), 'index.php' ) ) ); ?>">
127
-				<?php esc_html_e( 'Getting Started', 'give' ); ?>
126
+               href="<?php echo esc_url(admin_url(add_query_arg(array('page' => 'give-getting-started'), 'index.php'))); ?>">
127
+				<?php esc_html_e('Getting Started', 'give'); ?>
128 128
             </a>
129 129
             <a class="nav-tab <?php echo $selected == 'give-credits' ? 'nav-tab-active' : ''; ?>"
130
-               href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'give-credits' ), 'index.php' ) ) ); ?>">
131
-				<?php esc_html_e( 'Credits', 'give' ); ?>
130
+               href="<?php echo esc_url(admin_url(add_query_arg(array('page' => 'give-credits'), 'index.php'))); ?>">
131
+				<?php esc_html_e('Credits', 'give'); ?>
132 132
             </a>
133 133
             <a class="nav-tab <?php echo $selected == 'give-add-ons' ? 'nav-tab-active' : ''; ?>"
134
-               href="<?php echo esc_url( admin_url( 'edit.php?post_type=give_forms&page=give-addons' ) ); ?>">
135
-				<?php esc_html_e( 'Add-ons', 'give' ); ?>
134
+               href="<?php echo esc_url(admin_url('edit.php?post_type=give_forms&page=give-addons')); ?>">
135
+				<?php esc_html_e('Add-ons', 'give'); ?>
136 136
             </a>
137 137
         </h2>
138 138
 		<?php
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 	 * @return void
147 147
 	 */
148 148
 	public function about_screen() {
149
-		list( $display_version ) = explode( '-', GIVE_VERSION );
149
+		list($display_version) = explode('-', GIVE_VERSION);
150 150
 		?>
151 151
         <div class="wrap about-wrap">
152 152
 
@@ -155,8 +155,8 @@  discard block
 block discarded – undo
155 155
             <p class="about-text"><?php
156 156
 				printf(
157 157
 				/* translators: %s: http://docs.givewp.com/docs */
158
-					__( 'Thank you for activating or updating to the latest version of Give! If you\'re a first time user, welcome! You\'re well on your way to empowering your cause. We encourage you to check out the <a href="%s" target="_blank">plugin documentation</a> and getting started guide below.', 'give' ),
159
-					esc_url( 'http://docs.givewp.com/docs' )
158
+					__('Thank you for activating or updating to the latest version of Give! If you\'re a first time user, welcome! You\'re well on your way to empowering your cause. We encourage you to check out the <a href="%s" target="_blank">plugin documentation</a> and getting started guide below.', 'give'),
159
+					esc_url('http://docs.givewp.com/docs')
160 160
 				);
161 161
 				?></p>
162 162
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             <div class="give-badge"><?php
166 166
 				printf(
167 167
 				/* translators: %s: Give version */
168
-					esc_html__( 'Version %s', 'give' ),
168
+					esc_html__('Version %s', 'give'),
169 169
 					$display_version
170 170
 				);
171 171
 				?></div>
@@ -175,17 +175,17 @@  discard block
 block discarded – undo
175 175
             <div class="feature-section clearfix introduction">
176 176
 
177 177
                 <div class="video feature-section-item">
178
-                    <img src="<?php echo GIVE_PLUGIN_URL . 'assets/dist/images/give-logo-photo-mashup.png' ?>"
179
-                         alt="<?php esc_attr_e( 'Give', 'give' ); ?>">
178
+                    <img src="<?php echo GIVE_PLUGIN_URL.'assets/dist/images/give-logo-photo-mashup.png' ?>"
179
+                         alt="<?php esc_attr_e('Give', 'give'); ?>">
180 180
                 </div>
181 181
 
182 182
                 <div class="content feature-section-item last-feature">
183 183
 
184
-                    <h3><?php esc_html_e( 'Give - Democratizing Generosity', 'give' ); ?></h3>
184
+                    <h3><?php esc_html_e('Give - Democratizing Generosity', 'give'); ?></h3>
185 185
 
186
-                    <p><?php esc_html_e( 'Give empowers you to easily accept donations and setup fundraising campaigns, directly within WordPress. We created Give to provide a better donation experience for you and your users. Robust, flexible, and intuitive, the plugin is built from the ground up to be the goto donation solution for WordPress. Create powerful donation forms, embed them throughout your website, start a campaign, and exceed your fundraising goals with Give. This plugin is actively developed and proudly supported by folks who are dedicated to helping you and your cause.', 'give' ); ?></p>
186
+                    <p><?php esc_html_e('Give empowers you to easily accept donations and setup fundraising campaigns, directly within WordPress. We created Give to provide a better donation experience for you and your users. Robust, flexible, and intuitive, the plugin is built from the ground up to be the goto donation solution for WordPress. Create powerful donation forms, embed them throughout your website, start a campaign, and exceed your fundraising goals with Give. This plugin is actively developed and proudly supported by folks who are dedicated to helping you and your cause.', 'give'); ?></p>
187 187
                     <a href="https://givewp.com" target="_blank" class="button-secondary">
188
-						<?php esc_html_e( 'Learn More', 'give' ); ?>
188
+						<?php esc_html_e('Learn More', 'give'); ?>
189 189
                         <span class="dashicons dashicons-external"></span>
190 190
                     </a>
191 191
 
@@ -198,22 +198,22 @@  discard block
 block discarded – undo
198 198
 
199 199
                 <div class="content feature-section-item">
200 200
 
201
-                    <h3><?php esc_html_e( 'Getting to Know Give', 'give' ); ?></h3>
201
+                    <h3><?php esc_html_e('Getting to Know Give', 'give'); ?></h3>
202 202
 
203
-                    <p><?php esc_html_e( 'Before you get started with Give we suggest you take a look at the online documentation. There you will find the getting started guide which will help you get up and running quickly. If you have a question, issue or bug with the Core plugin please submit an issue on the Give website. We also welcome your feedback and feature requests. Welcome to Give. We hope you much success with your cause.', 'give' ); ?></p>
203
+                    <p><?php esc_html_e('Before you get started with Give we suggest you take a look at the online documentation. There you will find the getting started guide which will help you get up and running quickly. If you have a question, issue or bug with the Core plugin please submit an issue on the Give website. We also welcome your feedback and feature requests. Welcome to Give. We hope you much success with your cause.', 'give'); ?></p>
204 204
 
205 205
                     <h4>Find Out More:</h4>
206 206
                     <ul class="ul-disc">
207
-                        <li><a href="https://givewp.com/" target="_blank"><?php esc_html_e( 'Visit the Give Website', 'give' ); ?></a></li>
208
-                        <li><a href="https://givewp.com/features/" target="_blank"><?php esc_html_e( 'View the Give Features', 'give' ); ?></a></li>
209
-                        <li><a href="https://givewp.com/documentation/" target="_blank"><?php esc_html_e( 'Read the Documentation', 'give' ); ?></a></li>
207
+                        <li><a href="https://givewp.com/" target="_blank"><?php esc_html_e('Visit the Give Website', 'give'); ?></a></li>
208
+                        <li><a href="https://givewp.com/features/" target="_blank"><?php esc_html_e('View the Give Features', 'give'); ?></a></li>
209
+                        <li><a href="https://givewp.com/documentation/" target="_blank"><?php esc_html_e('Read the Documentation', 'give'); ?></a></li>
210 210
                     </ul>
211 211
 
212 212
                 </div>
213 213
 
214 214
                 <div class="content  feature-section-item last-feature">
215
-                    <img src="<?php echo GIVE_PLUGIN_URL . '/assets/dist/images/admin/give-form-mockup.png' ?>"
216
-                         alt="<?php esc_attr_e( 'A Give donation form', 'give' ); ?>">
215
+                    <img src="<?php echo GIVE_PLUGIN_URL.'/assets/dist/images/admin/give-form-mockup.png' ?>"
216
+                         alt="<?php esc_attr_e('A Give donation form', 'give'); ?>">
217 217
                 </div>
218 218
 
219 219
             </div>
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 	 * @return void
233 233
 	 */
234 234
 	public function changelog_screen() {
235
-		list( $display_version ) = explode( '-', GIVE_VERSION );
235
+		list($display_version) = explode('-', GIVE_VERSION);
236 236
 		?>
237 237
         <div class="wrap about-wrap">
238 238
             <h1><?php echo get_admin_page_title(); ?></h1>
@@ -240,14 +240,14 @@  discard block
 block discarded – undo
240 240
             <p class="about-text"><?php
241 241
 				printf(
242 242
 				/* translators: %s: Give version */
243
-					esc_html__( 'Thank you for updating to the latest version! Give %s is ready to make your online store faster, safer, and better!', 'give' ),
243
+					esc_html__('Thank you for updating to the latest version! Give %s is ready to make your online store faster, safer, and better!', 'give'),
244 244
 					$display_version
245 245
 				);
246 246
 				?></p>
247 247
             <div class="give-badge"><?php
248 248
 				printf(
249 249
 				/* translators: %s: Give version */
250
-					esc_html__( 'Version %s', 'give' ),
250
+					esc_html__('Version %s', 'give'),
251 251
 					$display_version
252 252
 				);
253 253
 				?></div>
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 			<?php $this->tabs(); ?>
256 256
 
257 257
             <div class="changelog">
258
-                <h3><?php esc_html_e( 'Full Changelog', 'give' ); ?></h3>
258
+                <h3><?php esc_html_e('Full Changelog', 'give'); ?></h3>
259 259
 
260 260
                 <div class="feature-section">
261 261
 					<?php echo $this->parse_readme(); ?>
@@ -263,10 +263,10 @@  discard block
 block discarded – undo
263 263
             </div>
264 264
 
265 265
             <div class="return-to-dashboard">
266
-                <a href="<?php echo esc_url( admin_url( add_query_arg( array(
266
+                <a href="<?php echo esc_url(admin_url(add_query_arg(array(
267 267
 					'post_type' => 'give_forms',
268 268
 					'page'      => 'give-settings'
269
-				), 'edit.php' ) ) ); ?>"><?php esc_html_e( 'Give Settings', 'give' ); ?></a>
269
+				), 'edit.php'))); ?>"><?php esc_html_e('Give Settings', 'give'); ?></a>
270 270
             </div>
271 271
         </div>
272 272
 		<?php
@@ -280,36 +280,36 @@  discard block
 block discarded – undo
280 280
 	 * @return void
281 281
 	 */
282 282
 	public function getting_started_screen() {
283
-		list( $display_version ) = explode( '-', GIVE_VERSION );
283
+		list($display_version) = explode('-', GIVE_VERSION);
284 284
 		?>
285 285
         <div class="wrap about-wrap get-started">
286 286
 
287 287
 			<?php $this->get_welcome_header() ?>
288 288
 
289
-            <p class="about-text"><?php esc_html_e( 'Welcome to the getting started guide.', 'give' ); ?></p>
289
+            <p class="about-text"><?php esc_html_e('Welcome to the getting started guide.', 'give'); ?></p>
290 290
 
291 291
 			<?php give_get_newsletter(); ?>
292 292
 
293 293
             <div class="give-badge"><?php
294 294
 				printf(
295 295
 				/* translators: %s: Give version */
296
-					esc_html__( 'Version %s', 'give' ),
296
+					esc_html__('Version %s', 'give'),
297 297
 					$display_version
298 298
 				);
299 299
 				?></div>
300 300
 
301 301
 			<?php $this->tabs(); ?>
302 302
 
303
-            <p class="about-text"><?php printf( esc_html__( 'Getting started with Give is easy! We put together this quick start guide to help first time users of the plugin. Our goal is to get you up and running in no time. Let\'s begin!', 'give' ), $display_version ); ?></p>
303
+            <p class="about-text"><?php printf(esc_html__('Getting started with Give is easy! We put together this quick start guide to help first time users of the plugin. Our goal is to get you up and running in no time. Let\'s begin!', 'give'), $display_version); ?></p>
304 304
 
305 305
             <div class="feature-section clearfix">
306 306
 
307 307
                 <div class="content feature-section-item">
308
-                    <h3><?php esc_html_e( 'STEP 1: Create a New Form', 'give' ); ?></h3>
308
+                    <h3><?php esc_html_e('STEP 1: Create a New Form', 'give'); ?></h3>
309 309
 
310
-                    <p><?php esc_html_e( 'Give is driven by it\'s powerful donation form building features. However, it is much more than just a "donation form". From the "Add Form" page you\'ll be able to choose how and where you want to receive your donations. You will also be able to set the preferred donation amounts.', 'give' ); ?></p>
310
+                    <p><?php esc_html_e('Give is driven by it\'s powerful donation form building features. However, it is much more than just a "donation form". From the "Add Form" page you\'ll be able to choose how and where you want to receive your donations. You will also be able to set the preferred donation amounts.', 'give'); ?></p>
311 311
 
312
-                    <p><?php esc_html_e( 'All of these features begin by simply going to the menu and choosing "Donations > Add Form".', 'give' ); ?></p>
312
+                    <p><?php esc_html_e('All of these features begin by simply going to the menu and choosing "Donations > Add Form".', 'give'); ?></p>
313 313
                 </div>
314 314
 
315 315
                 <div class="content feature-section-item last-feature">
@@ -326,9 +326,9 @@  discard block
 block discarded – undo
326 326
                 </div>
327 327
 
328 328
                 <div class="content feature-section-item last-feature">
329
-                    <h3><?php esc_html_e( 'STEP 2: Customize Your Donation Forms', 'give' ); ?></h3>
329
+                    <h3><?php esc_html_e('STEP 2: Customize Your Donation Forms', 'give'); ?></h3>
330 330
 
331
-                    <p><?php esc_html_e( 'Each donation form you create can be customized to receive either a pre-determined set donation amount or have multiple suggested levels of giving. Choosing "Multi-level Donation" opens up the donation levels view where you can add as many levels as you\'d like with your own custom names and suggested amounts. As well, you can allow donors to give a custom amount and even set up donation goals.', 'give' ); ?></p>
331
+                    <p><?php esc_html_e('Each donation form you create can be customized to receive either a pre-determined set donation amount or have multiple suggested levels of giving. Choosing "Multi-level Donation" opens up the donation levels view where you can add as many levels as you\'d like with your own custom names and suggested amounts. As well, you can allow donors to give a custom amount and even set up donation goals.', 'give'); ?></p>
332 332
                 </div>
333 333
 
334 334
             </div>
@@ -337,11 +337,11 @@  discard block
 block discarded – undo
337 337
             <div class="feature-section clearfix">
338 338
 
339 339
                 <div class="content feature-section-item add-content">
340
-                    <h3><?php esc_html_e( 'STEP 3: Add Additional Content', 'give' ); ?></h3>
340
+                    <h3><?php esc_html_e('STEP 3: Add Additional Content', 'give'); ?></h3>
341 341
 
342
-                    <p><?php esc_html_e( 'Every donation form you create with Give can be used on its own stand-alone page, or it can be inserted into any other page or post throughout your site via a shortcode or widget.', 'give' ); ?></p>
342
+                    <p><?php esc_html_e('Every donation form you create with Give can be used on its own stand-alone page, or it can be inserted into any other page or post throughout your site via a shortcode or widget.', 'give'); ?></p>
343 343
 
344
-                    <p><?php esc_html_e( 'You can choose these different modes by going to the "Form Content" section. From there, you can choose to add content before or after the donation form on a page, or if you choose "None" perhaps you want to instead use the shortcode. You can find the shortcode in the top right column directly under the Publish/Save button. This feature gives you the most amount of flexibility with controlling your content on your website all within the same page.', 'give' ); ?></p>
344
+                    <p><?php esc_html_e('You can choose these different modes by going to the "Form Content" section. From there, you can choose to add content before or after the donation form on a page, or if you choose "None" perhaps you want to instead use the shortcode. You can find the shortcode in the top right column directly under the Publish/Save button. This feature gives you the most amount of flexibility with controlling your content on your website all within the same page.', 'give'); ?></p>
345 345
                 </div>
346 346
 
347 347
                 <div class="content feature-section-item last-feature">
@@ -358,9 +358,9 @@  discard block
 block discarded – undo
358 358
                 </div>
359 359
 
360 360
                 <div class="content feature-section-item last-feature">
361
-                    <h3><?php esc_html_e( 'STEP 4: Configure Your Display Options', 'give' ); ?></h3>
361
+                    <h3><?php esc_html_e('STEP 4: Configure Your Display Options', 'give'); ?></h3>
362 362
 
363
-                    <p><?php esc_html_e( 'Lastly, you can present the form in a number of different ways that each create their own unique donor experience. The "Modal" display mode opens the credit card fieldset within a popup window. The "Reveal" mode will slide into place the additional fields. If you\'re looking for a simple button, then "Button" more is the way to go. This allows you to create a customizable "Donate Now" button which will open the donation form upon clicking. There\'s tons of possibilities here, give it a try!', 'give' ); ?></p>
363
+                    <p><?php esc_html_e('Lastly, you can present the form in a number of different ways that each create their own unique donor experience. The "Modal" display mode opens the credit card fieldset within a popup window. The "Reveal" mode will slide into place the additional fields. If you\'re looking for a simple button, then "Button" more is the way to go. This allows you to create a customizable "Donate Now" button which will open the donation form upon clicking. There\'s tons of possibilities here, give it a try!', 'give'); ?></p>
364 364
                 </div>
365 365
 
366 366
 
@@ -380,20 +380,20 @@  discard block
 block discarded – undo
380 380
 	 * @return void
381 381
 	 */
382 382
 	public function credits_screen() {
383
-		list( $display_version ) = explode( '-', GIVE_VERSION );
383
+		list($display_version) = explode('-', GIVE_VERSION);
384 384
 		?>
385 385
         <div class="wrap about-wrap">
386 386
 
387 387
 			<?php $this->get_welcome_header() ?>
388 388
 
389
-            <p class="about-text"><?php esc_html_e( 'Thanks to all those who have contributed code directly or indirectly.', 'give' ); ?></p>
389
+            <p class="about-text"><?php esc_html_e('Thanks to all those who have contributed code directly or indirectly.', 'give'); ?></p>
390 390
 
391 391
 			<?php give_get_newsletter(); ?>
392 392
 
393 393
             <div class="give-badge"><?php
394 394
 				printf(
395 395
 				/* translators: %s: Give version */
396
-					esc_html__( 'Version %s', 'give' ),
396
+					esc_html__('Version %s', 'give'),
397 397
 					$display_version
398 398
 				);
399 399
 				?></div>
@@ -403,8 +403,8 @@  discard block
 block discarded – undo
403 403
             <p class="about-description"><?php
404 404
 				printf(
405 405
 				/* translators: %s: https://github.com/WordImpress/give */
406
-					__( 'Give is created by a dedicated team of developers. If you are interested in contributing please visit the <a href="%s" target="_blank">GitHub Repo</a>.', 'give' ),
407
-					esc_url( 'https://github.com/WordImpress/give' )
406
+					__('Give is created by a dedicated team of developers. If you are interested in contributing please visit the <a href="%s" target="_blank">GitHub Repo</a>.', 'give'),
407
+					esc_url('https://github.com/WordImpress/give')
408 408
 				);
409 409
 				?></p>
410 410
 
@@ -421,21 +421,21 @@  discard block
 block discarded – undo
421 421
 	 * @return string $readme HTML formatted readme file
422 422
 	 */
423 423
 	public function parse_readme() {
424
-		$file = file_exists( GIVE_PLUGIN_DIR . 'readme.txt' ) ? GIVE_PLUGIN_DIR . 'readme.txt' : null;
424
+		$file = file_exists(GIVE_PLUGIN_DIR.'readme.txt') ? GIVE_PLUGIN_DIR . 'readme.txt' : null;
425 425
 
426
-		if ( ! $file ) {
427
-			$readme = '<p>' . esc_html__( 'No valid changlog was found.', 'give' ) . '</p>';
426
+		if ( ! $file) {
427
+			$readme = '<p>'.esc_html__('No valid changlog was found.', 'give').'</p>';
428 428
 		} else {
429
-			$readme = file_get_contents( $file );
430
-			$readme = nl2br( esc_html( $readme ) );
431
-			$readme = explode( '== Changelog ==', $readme );
432
-			$readme = end( $readme );
433
-
434
-			$readme = preg_replace( '/`(.*?)`/', '<code>\\1</code>', $readme );
435
-			$readme = preg_replace( '/[\040]\*\*(.*?)\*\*/', ' <strong>\\1</strong>', $readme );
436
-			$readme = preg_replace( '/[\040]\*(.*?)\*/', ' <em>\\1</em>', $readme );
437
-			$readme = preg_replace( '/= (.*?) =/', '<h4>\\1</h4>', $readme );
438
-			$readme = preg_replace( '/\[(.*?)\]\((.*?)\)/', '<a href="\\2">\\1</a>', $readme );
429
+			$readme = file_get_contents($file);
430
+			$readme = nl2br(esc_html($readme));
431
+			$readme = explode('== Changelog ==', $readme);
432
+			$readme = end($readme);
433
+
434
+			$readme = preg_replace('/`(.*?)`/', '<code>\\1</code>', $readme);
435
+			$readme = preg_replace('/[\040]\*\*(.*?)\*\*/', ' <strong>\\1</strong>', $readme);
436
+			$readme = preg_replace('/[\040]\*(.*?)\*/', ' <em>\\1</em>', $readme);
437
+			$readme = preg_replace('/= (.*?) =/', '<h4>\\1</h4>', $readme);
438
+			$readme = preg_replace('/\[(.*?)\]\((.*?)\)/', '<a href="\\2">\\1</a>', $readme);
439 439
 		}
440 440
 
441 441
 		return $readme;
@@ -452,24 +452,24 @@  discard block
 block discarded – undo
452 452
 	public function contributors() {
453 453
 		$contributors = $this->get_contributors();
454 454
 
455
-		if ( empty( $contributors ) ) {
455
+		if (empty($contributors)) {
456 456
 			return '';
457 457
 		}
458 458
 
459 459
 		$contributor_list = '<ul class="wp-people-group">';
460 460
 
461
-		foreach ( $contributors as $contributor ) {
461
+		foreach ($contributors as $contributor) {
462 462
 			$contributor_list .= '<li class="wp-person">';
463 463
 			$contributor_list .= sprintf(
464 464
 				'<a href="%1$s" target="_blank"><img src="%2$s" width="64" height="64" class="gravatar" alt="%3$s" /></a>',
465
-				esc_url( 'https://github.com/' . $contributor->login ),
466
-				esc_url( $contributor->avatar_url ),
467
-				esc_attr( $contributor->login )
465
+				esc_url('https://github.com/'.$contributor->login),
466
+				esc_url($contributor->avatar_url),
467
+				esc_attr($contributor->login)
468 468
 			);
469 469
 			$contributor_list .= sprintf(
470 470
 				'<a class="web" target="_blank" href="%1$s">%2$s</a>',
471
-				esc_url( 'https://github.com/' . $contributor->login ),
472
-				esc_html( $contributor->login )
471
+				esc_url('https://github.com/'.$contributor->login),
472
+				esc_html($contributor->login)
473 473
 			);
474 474
 			$contributor_list .= '</li>';
475 475
 		}
@@ -487,25 +487,25 @@  discard block
 block discarded – undo
487 487
 	 * @return array $contributors List of contributors
488 488
 	 */
489 489
 	public function get_contributors() {
490
-		$contributors = Give_Cache::get( 'give_contributors', true );
490
+		$contributors = Give_Cache::get('give_contributors', true);
491 491
 
492
-		if ( false !== $contributors ) {
492
+		if (false !== $contributors) {
493 493
 			return $contributors;
494 494
 		}
495 495
 
496
-		$response = wp_remote_get( 'https://api.github.com/repos/WordImpress/Give/contributors', array( 'sslverify' => false ) );
496
+		$response = wp_remote_get('https://api.github.com/repos/WordImpress/Give/contributors', array('sslverify' => false));
497 497
 
498
-		if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) {
498
+		if (is_wp_error($response) || 200 != wp_remote_retrieve_response_code($response)) {
499 499
 			return array();
500 500
 		}
501 501
 
502
-		$contributors = json_decode( wp_remote_retrieve_body( $response ) );
502
+		$contributors = json_decode(wp_remote_retrieve_body($response));
503 503
 
504
-		if ( ! is_array( $contributors ) ) {
504
+		if ( ! is_array($contributors)) {
505 505
 			return array();
506 506
 		}
507 507
 
508
-		Give_Cache::set( 'give_contributors', $contributors, HOUR_IN_SECONDS, true );
508
+		Give_Cache::set('give_contributors', $contributors, HOUR_IN_SECONDS, true);
509 509
 
510 510
 		return $contributors;
511 511
 	}
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
 	 */
518 518
 	public function get_welcome_header() {
519 519
 		// Badge for welcome page
520
-		$badge_url = GIVE_PLUGIN_URL . 'assets/dist/images/give-badge.png';
520
+		$badge_url = GIVE_PLUGIN_URL.'assets/dist/images/give-badge.png';
521 521
 		?>
522 522
         <h1 class="welcome-h1"><?php echo get_admin_page_title(); ?></h1>
523 523
 		<?php $this->social_media_elements(); ?>
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
             <a href="https://twitter.com/givewp" class="twitter-follow-button" data-show-count="false"><?php
611 611
 				printf(
612 612
 				/* translators: %s: Give twitter user @givewp */
613
-					esc_html_e( 'Follow %s', 'give' ),
613
+					esc_html_e('Follow %s', 'give'),
614 614
 					'@givewp'
615 615
 				);
616 616
 				?></a>
@@ -644,27 +644,27 @@  discard block
 block discarded – undo
644 644
 	public function welcome() {
645 645
 
646 646
 		// Bail if no activation redirect
647
-		if ( ! Give_Cache::get( '_give_activation_redirect', true ) || wp_doing_ajax() ) {
647
+		if ( ! Give_Cache::get('_give_activation_redirect', true) || wp_doing_ajax()) {
648 648
 			return;
649 649
 		}
650 650
 
651 651
 		// Delete the redirect transient
652
-		Give_Cache::delete( Give_Cache::get_key( '_give_activation_redirect' ) );
652
+		Give_Cache::delete(Give_Cache::get_key('_give_activation_redirect'));
653 653
 
654 654
 		// Bail if activating from network, or bulk
655
-		if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
655
+		if (is_network_admin() || isset($_GET['activate-multi'])) {
656 656
 			return;
657 657
 		}
658 658
 
659
-		$upgrade = get_option( 'give_version_upgraded_from' );
659
+		$upgrade = get_option('give_version_upgraded_from');
660 660
 
661
-		if ( ! $upgrade ) { // First time install
662
-			wp_safe_redirect( admin_url( 'index.php?page=give-about' ) );
661
+		if ( ! $upgrade) { // First time install
662
+			wp_safe_redirect(admin_url('index.php?page=give-about'));
663 663
 			exit;
664
-		} elseif ( ! give_is_setting_enabled( give_get_option( 'welcome' ) ) ) { // Welcome is disabled in settings
664
+		} elseif ( ! give_is_setting_enabled(give_get_option('welcome'))) { // Welcome is disabled in settings
665 665
 
666 666
 		} else { // Welcome is NOT disabled in settings
667
-			wp_safe_redirect( admin_url( 'index.php?page=give-about' ) );
667
+			wp_safe_redirect(admin_url('index.php?page=give-about'));
668 668
 			exit;
669 669
 		}
670 670
 	}
Please login to merge, or discard this patch.
includes/admin/shortcodes/shortcode-give-totals.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  */
10 10
 
11 11
 // Exit if accessed directly.
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( ! defined('ABSPATH')) {
13 13
 	exit;
14 14
 }
15 15
 
@@ -23,10 +23,10 @@  discard block
 block discarded – undo
23 23
 	 */
24 24
 	public function __construct() {
25 25
 
26
-		$this->shortcode['title'] = __( 'Give Totals', 'give' );
27
-		$this->shortcode['label'] = __( 'Give Totals', 'give' );
26
+		$this->shortcode['title'] = __('Give Totals', 'give');
27
+		$this->shortcode['label'] = __('Give Totals', 'give');
28 28
 
29
-		parent::__construct( 'give_totals' );
29
+		parent::__construct('give_totals');
30 30
 	}
31 31
 
32 32
 	/**
@@ -39,66 +39,66 @@  discard block
 block discarded – undo
39 39
 
40 40
 		$category_options = array();
41 41
 		$category_lists   = array();
42
-		$categories       = get_terms( 'give_forms_category', apply_filters( 'give_forms_category_dropdown', array() ) );
43
-		if ( give_is_setting_enabled( give_get_option( 'categories' ) ) && ! is_wp_error( $categories ) ) {
44
-			foreach ( $categories as $category ) {
45
-				$category_options[ absint( $category->term_id ) ] = esc_html( $category->name );
42
+		$categories       = get_terms('give_forms_category', apply_filters('give_forms_category_dropdown', array()));
43
+		if (give_is_setting_enabled(give_get_option('categories')) && ! is_wp_error($categories)) {
44
+			foreach ($categories as $category) {
45
+				$category_options[absint($category->term_id)] = esc_html($category->name);
46 46
 			}
47 47
 
48 48
 			$category_lists['type']    = 'listbox';
49 49
 			$category_lists['name']    = 'cats';
50
-			$category_lists['label']   = __( 'Select a Donation Form Category:', 'give' );
51
-			$category_lists['tooltip'] = __( 'Select a Donation Form Category', 'give' );
50
+			$category_lists['label']   = __('Select a Donation Form Category:', 'give');
51
+			$category_lists['tooltip'] = __('Select a Donation Form Category', 'give');
52 52
 			$category_lists['options'] = $category_options;
53 53
 		}
54 54
 
55 55
 		$tag_options = array();
56 56
 		$tag_lists   = array();
57
-		$tags        = get_terms( 'give_forms_tag', apply_filters( 'give_forms_tag_dropdown', array() ) );
58
-		if ( give_is_setting_enabled( give_get_option( 'tags' ) ) && ! is_wp_error( $tags ) ) {
59
-			$tags = get_terms( 'give_forms_tag', apply_filters( 'give_forms_tag_dropdown', array() ) );
60
-			foreach ( $tags as $tag ) {
61
-				$tag_options[ absint( $tag->term_id ) ] = esc_html( $tag->name );
57
+		$tags        = get_terms('give_forms_tag', apply_filters('give_forms_tag_dropdown', array()));
58
+		if (give_is_setting_enabled(give_get_option('tags')) && ! is_wp_error($tags)) {
59
+			$tags = get_terms('give_forms_tag', apply_filters('give_forms_tag_dropdown', array()));
60
+			foreach ($tags as $tag) {
61
+				$tag_options[absint($tag->term_id)] = esc_html($tag->name);
62 62
 			}
63 63
 
64 64
 			$tag_lists['type']    = 'listbox';
65 65
 			$tag_lists['name']    = 'tags';
66
-			$tag_lists['label']   = __( 'Select a Donation Form Tag:', 'give' );
67
-			$tag_lists['tooltip'] = __( 'Select a Donation Form Tag', 'give' );
66
+			$tag_lists['label']   = __('Select a Donation Form Tag:', 'give');
67
+			$tag_lists['tooltip'] = __('Select a Donation Form Tag', 'give');
68 68
 			$tag_lists['options'] = $tag_options;
69 69
 		}
70 70
 
71 71
 		return array(
72 72
 			array(
73 73
 				'type' => 'container',
74
-				'html' => sprintf( '<p class="give-totals-shortcode-container-message">%s</p>',
75
-					 __( 'This shortcode shows the total amount raised towards a custom goal for one or several forms regardless of whether they have goals enabled or not.', 'give' )
74
+				'html' => sprintf('<p class="give-totals-shortcode-container-message">%s</p>',
75
+					 __('This shortcode shows the total amount raised towards a custom goal for one or several forms regardless of whether they have goals enabled or not.', 'give')
76 76
 				),
77 77
 			),
78 78
 			array(
79 79
 				'type' => 'container',
80
-				'html' => sprintf( '<p class="strong margin-top">%s</p>', __( 'Shortcode Configuration', 'give' ) ),
80
+				'html' => sprintf('<p class="strong margin-top">%s</p>', __('Shortcode Configuration', 'give')),
81 81
 			),
82 82
 			array(
83 83
 				'type'        => 'textbox',
84 84
 				'name'        => 'ids',
85
-				'label'       => __( 'Donation Form IDs:', 'give' ),
86
-				'tooltip'     => __( 'Enter the IDs separated by commas for the donation forms you would like to combine within the totals.', 'give' ),
85
+				'label'       => __('Donation Form IDs:', 'give'),
86
+				'tooltip'     => __('Enter the IDs separated by commas for the donation forms you would like to combine within the totals.', 'give'),
87 87
 			),
88 88
 			$category_lists,
89 89
 			$tag_lists,
90 90
 			array(
91 91
 				'type'    => 'textbox',
92 92
 				'name'    => 'total_goal',
93
-				'label'   => __( 'Total Goal:', 'give' ),
94
-				'tooltip' => __( 'Enter the total goal amount that you would like to display.', 'give' ),
93
+				'label'   => __('Total Goal:', 'give'),
94
+				'tooltip' => __('Enter the total goal amount that you would like to display.', 'give'),
95 95
 			),
96 96
 			array(
97 97
 				'type'      => 'textbox',
98 98
 				'name'      => 'message',
99
-				'label'     => __( 'Message:', 'give' ),
100
-				'tooltip'   => __( 'Enter a message to display encouraging donors to support the goal.', 'give' ),
101
-				'value'     => apply_filters( 'give_totals_message', __( 'Hey! We\'ve raised {total} of the {total_goal} we are trying to raise for this campaign!', 'give' ) ),
99
+				'label'     => __('Message:', 'give'),
100
+				'tooltip'   => __('Enter a message to display encouraging donors to support the goal.', 'give'),
101
+				'value'     => apply_filters('give_totals_message', __('Hey! We\'ve raised {total} of the {total_goal} we are trying to raise for this campaign!', 'give')),
102 102
 				'multiline' => true,
103 103
 				'minWidth'  => 300,
104 104
 				'minHeight' => 60,
@@ -106,24 +106,24 @@  discard block
 block discarded – undo
106 106
 			array(
107 107
 				'type'    => 'textbox',
108 108
 				'name'    => 'link',
109
-				'label'   => __( 'Link:', 'give' ),
110
-				'tooltip' => __( 'Enter a link to the main campaign donation form.', 'give' ),
109
+				'label'   => __('Link:', 'give'),
110
+				'tooltip' => __('Enter a link to the main campaign donation form.', 'give'),
111 111
 			),
112 112
 			array(
113 113
 				'type'    => 'textbox',
114 114
 				'name'    => 'link_text',
115
-				'label'   => __( 'Link Text:', 'give' ),
116
-				'tooltip' => __( 'Enter hyperlink text for the link to the main campaign donation form.', 'give' ),
117
-				'value'   => __( 'Donate!', 'give' ),
115
+				'label'   => __('Link Text:', 'give'),
116
+				'tooltip' => __('Enter hyperlink text for the link to the main campaign donation form.', 'give'),
117
+				'value'   => __('Donate!', 'give'),
118 118
 			),
119 119
 			array(
120 120
 				'type'    => 'listbox',
121 121
 				'name'    => 'progress_bar',
122
-				'label'   => __( 'Show Progress Bar:', 'give' ),
123
-				'tooltip' => __( 'Select whether you would like to show a goal progress bar.', 'give' ),
122
+				'label'   => __('Show Progress Bar:', 'give'),
123
+				'tooltip' => __('Select whether you would like to show a goal progress bar.', 'give'),
124 124
 				'options' => array(
125
-					'true'  => __( 'Show', 'give' ),
126
-					'false' => __( 'Hide', 'give' ),
125
+					'true'  => __('Show', 'give'),
126
+					'false' => __('Hide', 'give'),
127 127
 				),
128 128
 				'value'   => 'true',
129 129
 			),
Please login to merge, or discard this patch.
includes/admin/shortcodes/class-shortcode-button.php 1 patch
Spacing   +52 added lines, -52 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' ) ) {
15
+if ( ! defined('ABSPATH')) {
16 16
 	exit;
17 17
 }
18 18
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	 * Class constructor
33 33
 	 */
34 34
 	public function __construct() {
35
-		add_action( 'admin_init', array( $this, 'init'), 999 );
35
+		add_action('admin_init', array($this, 'init'), 999);
36 36
 	}
37 37
 
38 38
 	/**
@@ -41,17 +41,17 @@  discard block
 block discarded – undo
41 41
 	 * @since 2.1.0
42 42
 	 * @access public
43 43
 	 */
44
-	public function init(){
45
-		if ( $this->is_add_button() ) {
46
-			add_filter( 'mce_external_plugins', array( $this, 'mce_external_plugins' ), 15 );
44
+	public function init() {
45
+		if ($this->is_add_button()) {
46
+			add_filter('mce_external_plugins', array($this, 'mce_external_plugins'), 15);
47 47
 
48
-			add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_assets' ) );
49
-			add_action( 'admin_enqueue_scripts', array( $this, 'admin_localize_scripts' ), 13 );
50
-			add_action( 'media_buttons', array( $this, 'shortcode_button' ) );
48
+			add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_assets'));
49
+			add_action('admin_enqueue_scripts', array($this, 'admin_localize_scripts'), 13);
50
+			add_action('media_buttons', array($this, 'shortcode_button'));
51 51
 		}
52 52
 
53
-		add_action( "wp_ajax_give_shortcode", array( $this, 'shortcode_ajax' ) );
54
-		add_action( "wp_ajax_nopriv_give_shortcode", array( $this, 'shortcode_ajax' ) );
53
+		add_action("wp_ajax_give_shortcode", array($this, 'shortcode_ajax'));
54
+		add_action("wp_ajax_nopriv_give_shortcode", array($this, 'shortcode_ajax'));
55 55
 	}
56 56
 
57 57
 	/**
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 	 *
64 64
 	 * @since 1.0
65 65
 	 */
66
-	public function mce_external_plugins( $plugin_array ) {
66
+	public function mce_external_plugins($plugin_array) {
67 67
 
68
-		if ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) ) {
68
+		if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages')) {
69 69
 			return false;
70 70
 		}
71 71
 
72
-		$plugin_array['give_shortcode'] = GIVE_PLUGIN_URL . 'includes/admin/shortcodes/mce-plugin.js';
72
+		$plugin_array['give_shortcode'] = GIVE_PLUGIN_URL.'includes/admin/shortcodes/mce-plugin.js';
73 73
 
74 74
 		return $plugin_array;
75 75
 	}
@@ -82,19 +82,19 @@  discard block
 block discarded – undo
82 82
 	 * @since 1.0
83 83
 	 */
84 84
 	public function admin_enqueue_assets() {
85
-		$direction = ( is_rtl() || isset( $_GET['d'] ) && 'rtl' === $_GET['d'] ) ? '.rtl' : '';
85
+		$direction = (is_rtl() || isset($_GET['d']) && 'rtl' === $_GET['d']) ? '.rtl' : '';
86 86
 
87 87
 		wp_enqueue_script(
88 88
 			'give_shortcode',
89
-			GIVE_PLUGIN_URL . 'includes/admin/shortcodes/admin-shortcodes.js',
90
-			array( 'jquery' ),
89
+			GIVE_PLUGIN_URL.'includes/admin/shortcodes/admin-shortcodes.js',
90
+			array('jquery'),
91 91
 			GIVE_VERSION,
92 92
 			true
93 93
 		);
94 94
 
95 95
 		wp_enqueue_style(
96 96
 			'give-admin-shortcode-button-style',
97
-			GIVE_PLUGIN_URL . 'assets/dist/css/admin-shortcode-button' . $direction . '.css',
97
+			GIVE_PLUGIN_URL.'assets/dist/css/admin-shortcode-button'.$direction.'.css',
98 98
 			array(),
99 99
 			GIVE_VERSION
100 100
 		);
@@ -109,17 +109,17 @@  discard block
 block discarded – undo
109 109
 	 */
110 110
 	public function admin_localize_scripts() {
111 111
 
112
-		if ( ! empty( self::$shortcodes ) ) {
112
+		if ( ! empty(self::$shortcodes)) {
113 113
 
114 114
 			$variables = array();
115 115
 
116
-			foreach ( self::$shortcodes as $shortcode => $values ) {
117
-				if ( ! empty( $values['required'] ) ) {
118
-					$variables[ $shortcode ] = $values['required'];
116
+			foreach (self::$shortcodes as $shortcode => $values) {
117
+				if ( ! empty($values['required'])) {
118
+					$variables[$shortcode] = $values['required'];
119 119
 				}
120 120
 			}
121 121
 
122
-			wp_localize_script( 'give_shortcode', 'scShortcodes', $variables );
122
+			wp_localize_script('give_shortcode', 'scShortcodes', $variables);
123 123
 		}
124 124
 	}
125 125
 
@@ -134,16 +134,16 @@  discard block
 block discarded – undo
134 134
 
135 135
 		$shortcodes = array();
136 136
 
137
-		foreach ( self::$shortcodes as $shortcode => $values ) {
137
+		foreach (self::$shortcodes as $shortcode => $values) {
138 138
 
139 139
 			/**
140 140
 			 * Filters the condition for including the current shortcode
141 141
 			 *
142 142
 			 * @since 1.0
143 143
 			 */
144
-			if ( apply_filters( sanitize_title( $shortcode ) . '_condition', true ) ) {
144
+			if (apply_filters(sanitize_title($shortcode).'_condition', true)) {
145 145
 
146
-				$shortcodes[ $shortcode ] = sprintf(
146
+				$shortcodes[$shortcode] = sprintf(
147 147
 					'<div class="sc-shortcode mce-menu-item give-shortcode-item-%1$s" data-shortcode="%2$s">%3$s</div>',
148 148
 					$shortcode,
149 149
 					$shortcode,
@@ -152,37 +152,37 @@  discard block
 block discarded – undo
152 152
 			}
153 153
 		}
154 154
 
155
-		if ( ! empty( $shortcodes ) ) {
155
+		if ( ! empty($shortcodes)) {
156 156
 
157 157
 			// check current WP version
158
-			$img = ( version_compare( get_bloginfo( 'version' ), '3.5', '<' ) )
159
-				? '<img src="' . GIVE_PLUGIN_URL . 'assets/dist/images/give-media.png" />'
160
-				: '<span class="wp-media-buttons-icon" id="give-media-button" style="background-image: url(' . give_svg_icons( 'give_grey' ) . ');"></span>';
158
+			$img = (version_compare(get_bloginfo('version'), '3.5', '<'))
159
+				? '<img src="'.GIVE_PLUGIN_URL.'assets/dist/images/give-media.png" />'
160
+				: '<span class="wp-media-buttons-icon" id="give-media-button" style="background-image: url('.give_svg_icons('give_grey').');"></span>';
161 161
 
162
-			reset( $shortcodes );
162
+			reset($shortcodes);
163 163
 
164
-			if ( 1 === count( $shortcodes ) ) {
164
+			if (1 === count($shortcodes)) {
165 165
 
166
-				$shortcode = key( $shortcodes );
166
+				$shortcode = key($shortcodes);
167 167
 
168 168
 				printf(
169 169
 					'<button type="button" class="button sc-shortcode" data-shortcode="%s">%s</button>',
170 170
 					$shortcode,
171
-					sprintf( '%s %s %s',
171
+					sprintf('%s %s %s',
172 172
 						$img,
173
-						__( 'Insert', 'give' ),
174
-						self::$shortcodes[ $shortcode ]['label']
173
+						__('Insert', 'give'),
174
+						self::$shortcodes[$shortcode]['label']
175 175
 					)
176 176
 				);
177 177
 			} else {
178 178
 				printf(
179
-					'<div class="sc-wrap">' .
180
-					'<button class="button sc-button" type="button">%s %s</button>' .
181
-					'<div class="sc-menu mce-menu">%s</div>' .
179
+					'<div class="sc-wrap">'.
180
+					'<button class="button sc-button" type="button">%s %s</button>'.
181
+					'<div class="sc-menu mce-menu">%s</div>'.
182 182
 					'</div>',
183 183
 					$img,
184
-					__( 'Give Shortcodes', 'give' ),
185
-					implode( '', array_values( $shortcodes ) )
184
+					__('Give Shortcodes', 'give'),
185
+					implode('', array_values($shortcodes))
186 186
 				);
187 187
 			}
188 188
 		}
@@ -197,15 +197,15 @@  discard block
 block discarded – undo
197 197
 	 */
198 198
 	public function shortcode_ajax() {
199 199
 
200
-		$shortcode = isset( $_POST['shortcode'] ) ? $_POST['shortcode'] : false;
200
+		$shortcode = isset($_POST['shortcode']) ? $_POST['shortcode'] : false;
201 201
 		$response  = false;
202 202
 
203
-		if ( $shortcode && array_key_exists( $shortcode, self::$shortcodes ) ) {
203
+		if ($shortcode && array_key_exists($shortcode, self::$shortcodes)) {
204 204
 
205
-			$data = self::$shortcodes[ $shortcode ];
205
+			$data = self::$shortcodes[$shortcode];
206 206
 
207
-			if ( ! empty( $data['errors'] ) ) {
208
-				$data['btn_okay'] = array( esc_html__( 'Okay', 'give' ) );
207
+			if ( ! empty($data['errors'])) {
208
+				$data['btn_okay'] = array(esc_html__('Okay', 'give'));
209 209
 			}
210 210
 
211 211
 			$response = array(
@@ -217,10 +217,10 @@  discard block
 block discarded – undo
217 217
 			);
218 218
 		} else {
219 219
 			// todo: handle error
220
-			error_log( print_r( 'AJAX error!', 1 ) );
220
+			error_log(print_r('AJAX error!', 1));
221 221
 		}
222 222
 
223
-		wp_send_json( $response );
223
+		wp_send_json($response);
224 224
 	}
225 225
 
226 226
 
@@ -234,21 +234,21 @@  discard block
 block discarded – undo
234 234
 	private function is_add_button() {
235 235
 		global $pagenow;
236 236
 
237
-		$shortcode_button_pages = apply_filters( 'give_shortcode_button_pages', array(
237
+		$shortcode_button_pages = apply_filters('give_shortcode_button_pages', array(
238 238
 			'post.php',
239 239
 			'page.php',
240 240
 			'post-new.php',
241 241
 			'post-edit.php',
242 242
 			'edit.php',
243 243
 			'edit.php?post_type=page',
244
-		) );
244
+		));
245 245
 
246 246
 		// Only run in admin post/page creation and edit screens
247 247
 		if (
248 248
 			! is_admin()
249
-			|| ! in_array( $pagenow, $shortcode_button_pages )
250
-			|| ! apply_filters( 'give_shortcode_button_condition', true )
251
-			|| empty( self::$shortcodes )
249
+			|| ! in_array($pagenow, $shortcode_button_pages)
250
+			|| ! apply_filters('give_shortcode_button_condition', true)
251
+			|| empty(self::$shortcodes)
252 252
 		) {
253 253
 			return false;
254 254
 		}
Please login to merge, or discard this patch.
includes/admin/abstract-admin-settings-page.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
  * @since       1.8
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
12
+if ( ! defined('ABSPATH')) {
13 13
 	exit; // Exit if accessed directly
14 14
 }
15 15
 
16
-if ( ! class_exists( 'Give_Settings_Page' ) ) :
16
+if ( ! class_exists('Give_Settings_Page')) :
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_Page.
@@ -70,25 +70,25 @@  discard block
 block discarded – undo
70 70
 			// Get current setting page.
71 71
 			$this->current_setting_page = give_get_current_setting_page();
72 72
 
73
-			add_filter( "give_default_setting_tab_section_{$this->id}", array( $this, 'set_default_setting_tab' ), 10 );
74
-			add_filter( "{$this->current_setting_page}_tabs_array", array( $this, 'add_settings_page' ), 20 );
75
-			add_action( "{$this->current_setting_page}_settings_{$this->id}_page", array( $this, 'output' ) );
73
+			add_filter("give_default_setting_tab_section_{$this->id}", array($this, 'set_default_setting_tab'), 10);
74
+			add_filter("{$this->current_setting_page}_tabs_array", array($this, 'add_settings_page'), 20);
75
+			add_action("{$this->current_setting_page}_settings_{$this->id}_page", array($this, 'output'));
76 76
 
77 77
 			// Output section only if exist.
78 78
 			$sections = $this->get_sections();
79
-			if ( ! empty( $sections ) ) {
80
-				add_action( "{$this->current_setting_page}_sections_{$this->id}_page", array(
79
+			if ( ! empty($sections)) {
80
+				add_action("{$this->current_setting_page}_sections_{$this->id}_page", array(
81 81
 					$this,
82 82
 					'output_sections',
83
-				) );
83
+				));
84 84
 			}
85 85
 
86 86
 			// Save hide button by default.
87 87
 			$GLOBALS['give_hide_save_button'] = true;
88 88
 
89 89
 			// Enable saving feature.
90
-			if ( $this->enable_save ) {
91
-				add_action( "{$this->current_setting_page}_save_{$this->id}", array( $this, 'save' ) );
90
+			if ($this->enable_save) {
91
+				add_action("{$this->current_setting_page}_save_{$this->id}", array($this, 'save'));
92 92
 			}
93 93
 		}
94 94
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 		 *
114 114
 		 * @return string
115 115
 		 */
116
-		function set_default_setting_tab( $setting_tab ) {
116
+		function set_default_setting_tab($setting_tab) {
117 117
 			return $this->default_tab;
118 118
 		}
119 119
 
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 		 *
127 127
 		 * @return array
128 128
 		 */
129
-		public function add_settings_page( $pages ) {
130
-			$pages[ $this->id ] = $this->label;
129
+		public function add_settings_page($pages) {
130
+			$pages[$this->id] = $this->label;
131 131
 
132 132
 			return $pages;
133 133
 		}
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 			 *
147 147
 			 * @param  array $settings
148 148
 			 */
149
-			$settings = apply_filters( 'give_get_settings_' . $this->id, array() );
149
+			$settings = apply_filters('give_get_settings_'.$this->id, array());
150 150
 
151 151
 			// Output.
152 152
 			return $settings;
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 		 * @return array
160 160
 		 */
161 161
 		public function get_sections() {
162
-			return apply_filters( 'give_get_sections_' . $this->id, array() );
162
+			return apply_filters('give_get_sections_'.$this->id, array());
163 163
 		}
164 164
 
165 165
 		/**
@@ -176,40 +176,40 @@  discard block
 block discarded – undo
176 176
 			$sections = $this->get_sections();
177 177
 
178 178
 			// Bailout.
179
-			if ( empty( $sections ) ) {
179
+			if (empty($sections)) {
180 180
 				return;
181 181
 			}
182 182
 
183 183
 			// Show section settings only if setting section exist.
184
-			if ( $current_section && ! in_array( $current_section, array_keys( $sections ), true ) ) {
185
-				echo wp_kses_post( '<div class="error"><p>' . __( 'Oops, this settings page does not exist.', 'give' ) . '</p></div>' );
184
+			if ($current_section && ! in_array($current_section, array_keys($sections), true)) {
185
+				echo wp_kses_post('<div class="error"><p>'.__('Oops, this settings page does not exist.', 'give').'</p></div>');
186 186
 				$GLOBALS['give_hide_save_button'] = true;
187 187
 
188 188
 				return;
189 189
 			}
190 190
 
191
-			if ( is_null( $this->current_setting_page ) ) {
191
+			if (is_null($this->current_setting_page)) {
192 192
 				$this->current_setting_page = give_get_current_setting_page();
193 193
 			}
194 194
 
195 195
 			$section_list = array();
196
-			foreach ( $sections as $id => $label ) {
196
+			foreach ($sections as $id => $label) {
197 197
 				/**
198 198
 				 * Fire the filter to hide particular section on tab.
199 199
 				 *
200 200
 				 * @since 2.0
201 201
 				 */
202
-				if ( apply_filters( "give_hide_section_{$id}_on_{$this->id}_page", false, $sections, $this->id ) ) {
202
+				if (apply_filters("give_hide_section_{$id}_on_{$this->id}_page", false, $sections, $this->id)) {
203 203
 					continue;
204 204
 				}
205 205
 
206
-				$section_list[] = '<li><a href="' . admin_url( 'edit.php?post_type=give_forms&page=' . $this->current_setting_page . '&tab=' . $this->id . '&section=' . sanitize_title( $id ) ) . '" class="' . ( $current_section === $id ? 'current' : '' ) . '">' . $label . '</a>';
206
+				$section_list[] = '<li><a href="'.admin_url('edit.php?post_type=give_forms&page='.$this->current_setting_page.'&tab='.$this->id.'&section='.sanitize_title($id)).'" class="'.($current_section === $id ? 'current' : '').'">'.$label.'</a>';
207 207
 			}
208 208
 
209
-			echo wp_kses_post( sprintf(
209
+			echo wp_kses_post(sprintf(
210 210
 				'<ul class="subsubsub">%s</ul><br class="clear" /><hr>',
211
-				implode( ' | </li>', $section_list )
212
-			) );
211
+				implode(' | </li>', $section_list)
212
+			));
213 213
 		}
214 214
 
215 215
 		/**
@@ -221,13 +221,13 @@  discard block
 block discarded – undo
221 221
 		 * @return void
222 222
 		 */
223 223
 		public function output() {
224
-			if ( $this->enable_save ) {
224
+			if ($this->enable_save) {
225 225
 				$GLOBALS['give_hide_save_button'] = false;
226 226
 			}
227 227
 
228 228
 			$settings = $this->get_settings();
229 229
 
230
-			Give_Admin_Settings::output_fields( $settings, 'give_settings' );
230
+			Give_Admin_Settings::output_fields($settings, 'give_settings');
231 231
 		}
232 232
 
233 233
 		/**
@@ -245,8 +245,8 @@  discard block
 block discarded – undo
245 245
 			 *
246 246
 			 * @since 2.1
247 247
 			 */
248
-			if ( apply_filters( "give_save_options_{$this->id}_{$current_section}", true ) ) {
249
-				Give_Admin_Settings::save_fields( $settings, 'give_settings' );
248
+			if (apply_filters("give_save_options_{$this->id}_{$current_section}", true)) {
249
+				Give_Admin_Settings::save_fields($settings, 'give_settings');
250 250
 			}
251 251
 
252 252
 			/**
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 			 *
255 255
 			 * @since 1.8
256 256
 			 */
257
-			do_action( 'give_update_options_' . $this->id . '_' . $current_section );
257
+			do_action('give_update_options_'.$this->id.'_'.$current_section);
258 258
 		}
259 259
 
260 260
 		/**
@@ -271,11 +271,11 @@  discard block
 block discarded – undo
271 271
 			$section         = $this->get_sections();
272 272
 			$current_section = give_get_current_setting_section();
273 273
 
274
-			if ( array_key_exists( $current_section, $section ) ) {
275
-				$heading[] = $section[ $current_section ];
274
+			if (array_key_exists($current_section, $section)) {
275
+				$heading[] = $section[$current_section];
276 276
 			}
277 277
 
278
-			return array_unique( $heading );
278
+			return array_unique($heading);
279 279
 		}
280 280
 
281 281
 		/**
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 		public function get_heading_html() {
290 290
 			return sprintf(
291 291
 				'<h1 class="wp-heading-inline">%s</h1><hr class="wp-header-end">',
292
-				implode( ' <span class="give-settings-heading-sep dashicons dashicons-arrow-right-alt2"></span> ', $this->get_heading() )
292
+				implode(' <span class="give-settings-heading-sep dashicons dashicons-arrow-right-alt2"></span> ', $this->get_heading())
293 293
 			);
294 294
 		}
295 295
 	}
Please login to merge, or discard this patch.