Test Failed
Pull Request — master (#2814)
by Devin
05:29
created
includes/admin/class-give-settings.php 2 patches
Spacing   +372 added lines, -372 removed lines patch added patch discarded remove patch
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
 	public function __construct() {
44 44
 
45 45
 		// Custom CMB2 Settings Fields
46
-		add_action( 'cmb2_render_give_title', 'give_title_callback', 10, 5 );
47
-		add_action( 'cmb2_render_give_description', 'give_description_callback', 10, 5 );
48
-		add_action( 'cmb2_render_enabled_gateways', 'give_enabled_gateways_callback', 10, 5 );
49
-		add_action( 'cmb2_render_default_gateway', 'give_default_gateway_callback', 10, 5 );
50
-		add_action( 'cmb2_render_email_preview_buttons', 'give_email_preview_buttons_callback', 10, 5 );
51
-		add_action( 'cmb2_render_system_info', 'give_system_info_callback', 10, 5 );
52
-		add_action( 'cmb2_render_api', 'give_api_callback', 10, 5 );
53
-		add_action( 'cmb2_render_license_key', 'give_license_key_callback', 10, 5 );
46
+		add_action('cmb2_render_give_title', 'give_title_callback', 10, 5);
47
+		add_action('cmb2_render_give_description', 'give_description_callback', 10, 5);
48
+		add_action('cmb2_render_enabled_gateways', 'give_enabled_gateways_callback', 10, 5);
49
+		add_action('cmb2_render_default_gateway', 'give_default_gateway_callback', 10, 5);
50
+		add_action('cmb2_render_email_preview_buttons', 'give_email_preview_buttons_callback', 10, 5);
51
+		add_action('cmb2_render_system_info', 'give_system_info_callback', 10, 5);
52
+		add_action('cmb2_render_api', 'give_api_callback', 10, 5);
53
+		add_action('cmb2_render_license_key', 'give_license_key_callback', 10, 5);
54 54
 	}
55 55
 
56 56
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 * @since  1.0
61 61
 	 */
62 62
 	public function init() {
63
-		register_setting( $this->key, $this->key );
63
+		register_setting($this->key, $this->key);
64 64
 
65 65
 	}
66 66
 
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
 	 *
75 75
 	 * @return mixed
76 76
 	 */
77
-	public function give_update_cmb_meta_box_url( $url ) {
77
+	public function give_update_cmb_meta_box_url($url) {
78 78
 		// Path to Give's CMB
79
-		return GIVE_PLUGIN_URL . '/includes/libraries/cmb2';
79
+		return GIVE_PLUGIN_URL.'/includes/libraries/cmb2';
80 80
 	}
81 81
 
82 82
 
@@ -88,27 +88,27 @@  discard block
 block discarded – undo
88 88
 	 */
89 89
 	public function give_get_settings_tabs() {
90 90
 
91
-		$settings = $this->give_settings( null );
91
+		$settings = $this->give_settings(null);
92 92
 
93 93
 		$tabs             = array();
94
-		$tabs['general']  = __( 'General', 'give' );
95
-		$tabs['gateways'] = __( 'Payment Gateways', 'give' );
96
-		$tabs['display']  = __( 'Display Options', 'give' );
97
-		$tabs['emails']   = __( 'Emails', 'give' );
94
+		$tabs['general']  = __('General', 'give');
95
+		$tabs['gateways'] = __('Payment Gateways', 'give');
96
+		$tabs['display']  = __('Display Options', 'give');
97
+		$tabs['emails']   = __('Emails', 'give');
98 98
 
99
-		if ( ! empty( $settings['addons']['fields'] ) ) {
100
-			$tabs['addons'] = __( 'Add-ons', 'give' );
99
+		if ( ! empty($settings['addons']['fields'])) {
100
+			$tabs['addons'] = __('Add-ons', 'give');
101 101
 		}
102 102
 
103
-		if ( ! empty( $settings['licenses']['fields'] ) ) {
104
-			$tabs['licenses'] = __( 'Licenses', 'give' );
103
+		if ( ! empty($settings['licenses']['fields'])) {
104
+			$tabs['licenses'] = __('Licenses', 'give');
105 105
 		}
106 106
 
107
-		$tabs['advanced']    = __( 'Advanced', 'give' );
108
-		$tabs['api']         = __( 'API', 'give' );
109
-		$tabs['system_info'] = __( 'System Info', 'give' );
107
+		$tabs['advanced']    = __('Advanced', 'give');
108
+		$tabs['api']         = __('API', 'give');
109
+		$tabs['system_info'] = __('System Info', 'give');
110 110
 
111
-		return apply_filters( 'give_settings_tabs', $tabs );
111
+		return apply_filters('give_settings_tabs', $tabs);
112 112
 	}
113 113
 
114 114
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 */
120 120
 	public function admin_page_display() {
121 121
 
122
-		$active_tab = isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $this->give_get_settings_tabs() ) ? $_GET['tab'] : 'general';
122
+		$active_tab = isset($_GET['tab']) && array_key_exists($_GET['tab'], $this->give_get_settings_tabs()) ? $_GET['tab'] : 'general';
123 123
 
124 124
 		?>
125 125
 
@@ -129,22 +129,22 @@  discard block
 block discarded – undo
129 129
 
130 130
 			<h2 class="nav-tab-wrapper">
131 131
 				<?php
132
-				foreach ( $this->give_get_settings_tabs() as $tab_id => $tab_name ) {
132
+				foreach ($this->give_get_settings_tabs() as $tab_id => $tab_name) {
133 133
 
134
-					$tab_url = esc_url( add_query_arg( array(
134
+					$tab_url = esc_url(add_query_arg(array(
135 135
 						'settings-updated' => false,
136 136
 						'tab'              => $tab_id,
137
-					) ) );
137
+					)));
138 138
 
139 139
 					$active = $active_tab == $tab_id ? ' nav-tab-active' : '';
140 140
 
141
-					echo '<a href="' . esc_url( $tab_url ) . '" class="nav-tab' . $active . '" id="tab-' . $tab_id . '">' . esc_html( $tab_name ) . '</a>';
141
+					echo '<a href="'.esc_url($tab_url).'" class="nav-tab'.$active.'" id="tab-'.$tab_id.'">'.esc_html($tab_name).'</a>';
142 142
 
143 143
 				}
144 144
 				?>
145 145
 			</h2>
146 146
 
147
-			<?php cmb2_metabox_form( $this->give_settings( $active_tab ), $this->key ); ?>
147
+			<?php cmb2_metabox_form($this->give_settings($active_tab), $this->key); ?>
148 148
 
149 149
 		</div><!-- .wrap -->
150 150
 
@@ -166,12 +166,12 @@  discard block
 block discarded – undo
166 166
 	 *
167 167
 	 * @return string
168 168
 	 */
169
-	function give_modify_cmb2_form_output( $form_format, $object_id, $cmb ) {
169
+	function give_modify_cmb2_form_output($form_format, $object_id, $cmb) {
170 170
 
171 171
 		// only modify the give settings form
172
-		if ( 'give_settings' == $object_id ) {
172
+		if ('give_settings' == $object_id) {
173 173
 
174
-			return '<form class="cmb-form" method="post" id="%1$s" enctype="multipart/form-data" encoding="multipart/form-data"><input type="hidden" name="give_settings_saved" value="true"><input type="hidden" name="object_id" value="%2$s">%3$s<div class="give-submit-wrap"><input type="submit" name="submit-cmb" value="' . esc_attr__( 'Save Settings', 'give' ) . '" class="button-primary"></div></form>';
174
+			return '<form class="cmb-form" method="post" id="%1$s" enctype="multipart/form-data" encoding="multipart/form-data"><input type="hidden" name="give_settings_saved" value="true"><input type="hidden" name="object_id" value="%2$s">%3$s<div class="give-submit-wrap"><input type="submit" name="submit-cmb" value="'.esc_attr__('Save Settings', 'give').'" class="button-primary"></div></form>';
175 175
 
176 176
 		}
177 177
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 	 *
189 189
 	 * @return array
190 190
 	 */
191
-	public function give_settings( $active_tab ) {
191
+	public function give_settings($active_tab) {
192 192
 
193 193
 		$give_settings = array(
194 194
 			/**
@@ -196,99 +196,99 @@  discard block
 block discarded – undo
196 196
 			 */
197 197
 			'general'     => array(
198 198
 				'id'         => 'general_settings',
199
-				'give_title' => __( 'General Settings', 'give' ),
200
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key ) ),
201
-				'fields'     => apply_filters( 'give_settings_general', array(
199
+				'give_title' => __('General Settings', 'give'),
200
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key)),
201
+				'fields'     => apply_filters('give_settings_general', array(
202 202
 						array(
203
-							'name' => __( 'General Settings', 'give' ),
203
+							'name' => __('General Settings', 'give'),
204 204
 							'desc' => '',
205 205
 							'type' => 'give_title',
206 206
 							'id'   => 'give_title_general_settings_1',
207 207
 						),
208 208
 						array(
209
-							'name'    => __( 'Success Page', 'give' ),
209
+							'name'    => __('Success Page', 'give'),
210 210
 							/* translators: %s: [give_receipt] */
211
-							'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>' ),
211
+							'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>'),
212 212
 							'id'      => 'success_page',
213 213
 							'type'    => 'select',
214
-							'options' => give_cmb2_get_post_options( array(
214
+							'options' => give_cmb2_get_post_options(array(
215 215
 								'post_type'   => 'page',
216 216
 								'numberposts' => 999,
217
-							) ),
217
+							)),
218 218
 						),
219 219
 						array(
220
-							'name'    => __( 'Failed Donation Page', 'give' ),
221
-							'desc'    => __( 'The page donors are sent to if their donation is cancelled or fails.', 'give' ),
220
+							'name'    => __('Failed Donation Page', 'give'),
221
+							'desc'    => __('The page donors are sent to if their donation is cancelled or fails.', 'give'),
222 222
 							'id'      => 'failure_page',
223 223
 							'type'    => 'select',
224
-							'options' => give_cmb2_get_post_options( array(
224
+							'options' => give_cmb2_get_post_options(array(
225 225
 								'post_type'   => 'page',
226 226
 								'numberposts' => 999,
227
-							) ),
227
+							)),
228 228
 						),
229 229
 						array(
230
-							'name'    => __( 'Donation History Page', 'give' ),
230
+							'name'    => __('Donation History Page', 'give'),
231 231
 							/* translators: %s: [donation_history] */
232
-							'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>' ),
232
+							'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>'),
233 233
 							'id'      => 'history_page',
234 234
 							'type'    => 'select',
235
-							'options' => give_cmb2_get_post_options( array(
235
+							'options' => give_cmb2_get_post_options(array(
236 236
 								'post_type'   => 'page',
237 237
 								'numberposts' => 999,
238
-							) ),
238
+							)),
239 239
 						),
240 240
 						array(
241
-							'name'    => __( 'Base Country', 'give' ),
242
-							'desc'    => __( 'The country your site operates from.', 'give' ),
241
+							'name'    => __('Base Country', 'give'),
242
+							'desc'    => __('The country your site operates from.', 'give'),
243 243
 							'id'      => 'base_country',
244 244
 							'type'    => 'select',
245 245
 							'options' => give_get_country_list(),
246 246
 						),
247 247
 						array(
248
-							'name' => __( 'Currency Settings', 'give' ),
248
+							'name' => __('Currency Settings', 'give'),
249 249
 							'desc' => '',
250 250
 							'type' => 'give_title',
251 251
 							'id'   => 'give_title_general_settings_2',
252 252
 						),
253 253
 						array(
254
-							'name'    => __( 'Currency', 'give' ),
255
-							'desc'    => __( 'The donation currency. Note that some payment gateways have currency restrictions.', 'give' ),
254
+							'name'    => __('Currency', 'give'),
255
+							'desc'    => __('The donation currency. Note that some payment gateways have currency restrictions.', 'give'),
256 256
 							'id'      => 'currency',
257 257
 							'type'    => 'select',
258 258
 							'options' => give_get_currencies(),
259 259
 							'default' => 'USD',
260 260
 						),
261 261
 						array(
262
-							'name'    => __( 'Currency Position', 'give' ),
263
-							'desc'    => __( 'The position of the currency symbol.', 'give' ),
262
+							'name'    => __('Currency Position', 'give'),
263
+							'desc'    => __('The position of the currency symbol.', 'give'),
264 264
 							'id'      => 'currency_position',
265 265
 							'type'    => 'select',
266 266
 							'options' => array(
267 267
 								/* translators: %s: currency symbol */
268
-								'before' => sprintf( __( 'Before - %s&#x200e;10', 'give' ), give_currency_symbol( give_get_currency() ) ),
268
+								'before' => sprintf(__('Before - %s&#x200e;10', 'give'), give_currency_symbol(give_get_currency())),
269 269
 								/* translators: %s: currency symbol */
270
-								'after'  => sprintf( __( 'After - 10%s&#x200f;', 'give' ), give_currency_symbol( give_get_currency() ) ),
270
+								'after'  => sprintf(__('After - 10%s&#x200f;', 'give'), give_currency_symbol(give_get_currency())),
271 271
 							),
272 272
 							'default' => 'before',
273 273
 						),
274 274
 						array(
275
-							'name'            => __( 'Thousands Separator', 'give' ),
276
-							'desc'            => __( 'The symbol (usually , or .) to separate thousands.', 'give' ),
275
+							'name'            => __('Thousands Separator', 'give'),
276
+							'desc'            => __('The symbol (usually , or .) to separate thousands.', 'give'),
277 277
 							'id'              => 'thousands_separator',
278 278
 							'type'            => 'text_small',
279 279
 							'sanitization_cb' => 'give_sanitize_thousand_separator',
280 280
 							'default'         => ',',
281 281
 						),
282 282
 						array(
283
-							'name'    => __( 'Decimal Separator', 'give' ),
284
-							'desc'    => __( 'The symbol (usually , or .) to separate decimal points.', 'give' ),
283
+							'name'    => __('Decimal Separator', 'give'),
284
+							'desc'    => __('The symbol (usually , or .) to separate decimal points.', 'give'),
285 285
 							'id'      => 'decimal_separator',
286 286
 							'type'    => 'text_small',
287 287
 							'default' => '.',
288 288
 						),
289 289
 						array(
290
-							'name'            => __( 'Number of Decimals', 'give' ),
291
-							'desc'            => __( 'The number of decimal points displayed in amounts.', 'give' ),
290
+							'name'            => __('Number of Decimals', 'give'),
291
+							'desc'            => __('The number of decimal points displayed in amounts.', 'give'),
292 292
 							'id'              => 'number_decimals',
293 293
 							'type'            => 'text_small',
294 294
 							'default'         => 2,
@@ -302,83 +302,83 @@  discard block
 block discarded – undo
302 302
 			 */
303 303
 			'gateways'    => array(
304 304
 				'id'         => 'payment_gateways',
305
-				'give_title' => __( 'Payment Gateways', 'give' ),
306
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key ) ),
307
-				'fields'     => apply_filters( 'give_settings_gateways', array(
305
+				'give_title' => __('Payment Gateways', 'give'),
306
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key)),
307
+				'fields'     => apply_filters('give_settings_gateways', array(
308 308
 						array(
309
-							'name' => __( 'Gateways Settings', 'give' ),
309
+							'name' => __('Gateways Settings', 'give'),
310 310
 							'desc' => '',
311 311
 							'id'   => 'give_title_gateway_settings_1',
312 312
 							'type' => 'give_title',
313 313
 						),
314 314
 						array(
315
-							'name' => __( 'Test Mode', 'give' ),
316
-							'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' ),
315
+							'name' => __('Test Mode', 'give'),
316
+							'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'),
317 317
 							'id'   => 'test_mode',
318 318
 							'type' => 'checkbox',
319 319
 						),
320 320
 						array(
321
-							'name' => __( 'Enabled Gateways', 'give' ),
322
-							'desc' => __( 'Enable your payment gateway. Can be ordered by dragging.', 'give' ),
321
+							'name' => __('Enabled Gateways', 'give'),
322
+							'desc' => __('Enable your payment gateway. Can be ordered by dragging.', 'give'),
323 323
 							'id'   => 'gateways',
324 324
 							'type' => 'enabled_gateways',
325 325
 						),
326 326
 						array(
327
-							'name' => __( 'Default Gateway', 'give' ),
328
-							'desc' => __( 'The gateway that will be selected by default.', 'give' ),
327
+							'name' => __('Default Gateway', 'give'),
328
+							'desc' => __('The gateway that will be selected by default.', 'give'),
329 329
 							'id'   => 'default_gateway',
330 330
 							'type' => 'default_gateway',
331 331
 						),
332 332
 						array(
333
-							'name' => __( 'PayPal Standard', 'give' ),
333
+							'name' => __('PayPal Standard', 'give'),
334 334
 							'desc' => '',
335 335
 							'type' => 'give_title',
336 336
 							'id'   => 'give_title_gateway_settings_2',
337 337
 						),
338 338
 						array(
339
-							'name' => __( 'PayPal Email', 'give' ),
340
-							'desc' => __( 'Enter your PayPal account\'s email.', 'give' ),
339
+							'name' => __('PayPal Email', 'give'),
340
+							'desc' => __('Enter your PayPal account\'s email.', 'give'),
341 341
 							'id'   => 'paypal_email',
342 342
 							'type' => 'text_email',
343 343
 						),
344 344
 						array(
345
-							'name' => __( 'PayPal Page Style', 'give' ),
346
-							'desc' => __( 'Enter the name of the page style to use, or leave blank to use the default.', 'give' ),
345
+							'name' => __('PayPal Page Style', 'give'),
346
+							'desc' => __('Enter the name of the page style to use, or leave blank to use the default.', 'give'),
347 347
 							'id'   => 'paypal_page_style',
348 348
 							'type' => 'text',
349 349
 						),
350 350
 						array(
351
-							'name'    => __( 'PayPal Transaction Type', 'give' ),
352
-							'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' ),
351
+							'name'    => __('PayPal Transaction Type', 'give'),
352
+							'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'),
353 353
 							'id'      => 'paypal_button_type',
354 354
 							'type'    => 'radio_inline',
355 355
 							'options' => array(
356
-								'donation' => __( 'Donation', 'give' ),
357
-								'standard' => __( 'Standard Transaction', 'give' ),
356
+								'donation' => __('Donation', 'give'),
357
+								'standard' => __('Standard Transaction', 'give'),
358 358
 							),
359 359
 							'default' => 'donation',
360 360
 						),
361 361
 						array(
362
-							'name' => __( 'Disable PayPal IPN Verification', 'give' ),
363
-							'desc' => __( 'If donations are not getting marked as complete, use a slightly less secure method of verifying donations.', 'give' ),
362
+							'name' => __('Disable PayPal IPN Verification', 'give'),
363
+							'desc' => __('If donations are not getting marked as complete, use a slightly less secure method of verifying donations.', 'give'),
364 364
 							'id'   => 'disable_paypal_verification',
365 365
 							'type' => 'checkbox',
366 366
 						),
367 367
 						array(
368
-							'name' => __( 'Offline Donations', 'give' ),
368
+							'name' => __('Offline Donations', 'give'),
369 369
 							'desc' => '',
370 370
 							'type' => 'give_title',
371 371
 							'id'   => 'give_title_gateway_settings_3',
372 372
 						),
373 373
 						array(
374
-							'name' => __( 'Collect Billing Details', 'give' ),
375
-							'desc' => __( 'Enable to request billing details for offline donations. Will appear above offline donation instructions. Can be enabled/disabled per form.', 'give' ),
374
+							'name' => __('Collect Billing Details', 'give'),
375
+							'desc' => __('Enable to request billing details for offline donations. Will appear above offline donation instructions. Can be enabled/disabled per form.', 'give'),
376 376
 							'id'   => 'give_offline_donation_enable_billing_fields',
377 377
 							'type' => 'checkbox',
378 378
 						),
379 379
 						array(
380
-							'name'    => __( 'Offline Donation Instructions', 'give' ),
381
-							'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' ),
380
+							'name'    => __('Offline Donation Instructions', 'give'),
381
+							'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'),
382 382
 							'id'      => 'global_offline_donation_content',
383 383
 							'default' => give_get_default_offline_donation_content(),
384 384
 							'type'    => 'wysiwyg',
@@ -387,15 +387,15 @@  discard block
 block discarded – undo
387 387
 							),
388 388
 						),
389 389
 						array(
390
-							'name'    => __( 'Offline Donation Email Instructions Subject', 'give' ),
391
-							'desc'    => __( 'Enter the subject line for the donation receipt email.', 'give' ),
390
+							'name'    => __('Offline Donation Email Instructions Subject', 'give'),
391
+							'desc'    => __('Enter the subject line for the donation receipt email.', 'give'),
392 392
 							'id'      => 'offline_donation_subject',
393
-							'default' => esc_attr__( '{donation} - Offline Donation Instructions', 'give' ),
393
+							'default' => esc_attr__('{donation} - Offline Donation Instructions', 'give'),
394 394
 							'type'    => 'text',
395 395
 						),
396 396
 						array(
397
-							'name'    => __( 'Offline Donation Email Instructions', 'give' ),
398
-							'desc'    => __( 'Enter the instructions you want emailed to the donor after they have submitted the donation form. Most likely this would include important information like mailing address and who to make the check out to.', 'give' ),
397
+							'name'    => __('Offline Donation Email Instructions', 'give'),
398
+							'desc'    => __('Enter the instructions you want emailed to the donor after they have submitted the donation form. Most likely this would include important information like mailing address and who to make the check out to.', 'give'),
399 399
 							'id'      => 'global_offline_donation_email',
400 400
 							'default' => give_get_default_offline_donation_email_content(),
401 401
 							'type'    => 'wysiwyg',
@@ -409,104 +409,104 @@  discard block
 block discarded – undo
409 409
 			/** Display Settings */
410 410
 			'display'     => array(
411 411
 				'id'         => 'display_settings',
412
-				'give_title' => __( 'Display Settings', 'give' ),
413
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key ) ),
414
-				'fields'     => apply_filters( 'give_settings_display', array(
412
+				'give_title' => __('Display Settings', 'give'),
413
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key)),
414
+				'fields'     => apply_filters('give_settings_display', array(
415 415
 						array(
416
-							'name' => __( 'Display Settings', 'give' ),
416
+							'name' => __('Display Settings', 'give'),
417 417
 							'desc' => '',
418 418
 							'id'   => 'give_title_display_settings_1',
419 419
 							'type' => 'give_title',
420 420
 						),
421 421
 						array(
422
-							'name' => __( 'Disable CSS', 'give' ),
423
-							'desc' => __( 'Enable this option if you would like to disable all of Give\'s included CSS stylesheets.', 'give' ),
422
+							'name' => __('Disable CSS', 'give'),
423
+							'desc' => __('Enable this option if you would like to disable all of Give\'s included CSS stylesheets.', 'give'),
424 424
 							'id'   => 'disable_css',
425 425
 							'type' => 'checkbox',
426 426
 						),
427 427
 						array(
428
-							'name' => __( 'Enable Floating Labels', 'give' ),
428
+							'name' => __('Enable Floating Labels', 'give'),
429 429
 							/* translators: %s: http://docs.givewp.com/form-floating-labels */
430
-							'desc' => sprintf( wp_kses( __( 'Enable <a href="%s" target="_blank">floating labels</a> in Give\'s donation forms. Note that if the "Disable CSS" option is enabled, you will need to style the floating labels yourself.', 'give' ), array(
430
+							'desc' => sprintf(wp_kses(__('Enable <a href="%s" target="_blank">floating labels</a> in Give\'s donation forms. Note that if the "Disable CSS" option is enabled, you will need to style the floating labels yourself.', 'give'), array(
431 431
 								'a' => array(
432 432
 									'href'   => array(),
433 433
 									'target' => array(),
434 434
 								),
435
-							) ), esc_url( 'http://docs.givewp.com/form-floating-labels' ) ),
435
+							)), esc_url('http://docs.givewp.com/form-floating-labels')),
436 436
 							'id'   => 'floatlabels',
437 437
 							'type' => 'checkbox',
438 438
 						),
439 439
 						array(
440
-							'name' => __( 'Disable Welcome Screen', 'give' ),
440
+							'name' => __('Disable Welcome Screen', 'give'),
441 441
 							/* translators: %s: about page URL */
442
-							'desc' => sprintf( wp_kses( __( 'Enable this option if you would like to disable the <a href="%s" target="_blank">Give Welcome screen</a> every time Give is activated and/or updated.', 'give' ), array(
442
+							'desc' => sprintf(wp_kses(__('Enable this option if you would like to disable the <a href="%s" target="_blank">Give Welcome screen</a> every time Give is activated and/or updated.', 'give'), array(
443 443
 								'a' => array(
444 444
 									'href'   => array(),
445 445
 									'target' => array(),
446 446
 								),
447
-							) ), esc_url( admin_url( 'index.php?page=give-about' ) ) ),
447
+							)), esc_url(admin_url('index.php?page=give-about'))),
448 448
 							'id'   => 'disable_welcome',
449 449
 							'type' => 'checkbox',
450 450
 						),
451 451
 						array(
452
-							'name' => __( 'Post Types', 'give' ),
452
+							'name' => __('Post Types', 'give'),
453 453
 							'desc' => '',
454 454
 							'id'   => 'give_title_display_settings_2',
455 455
 							'type' => 'give_title',
456 456
 						),
457 457
 						array(
458
-							'name' => __( 'Disable Form Single Views', 'give' ),
459
-							'desc' => __( 'By default, all forms have single views enabled which create a specific URL on your website for that form. This option disables the singular and archive views from being publicly viewable. Note: you will need to embed forms using a shortcode or widget if enabled.', 'give' ),
458
+							'name' => __('Disable Form Single Views', 'give'),
459
+							'desc' => __('By default, all forms have single views enabled which create a specific URL on your website for that form. This option disables the singular and archive views from being publicly viewable. Note: you will need to embed forms using a shortcode or widget if enabled.', 'give'),
460 460
 							'id'   => 'disable_forms_singular',
461 461
 							'type' => 'checkbox',
462 462
 						),
463 463
 						array(
464
-							'name' => __( 'Disable Form Archives', 'give' ),
465
-							'desc' => __( 'Archives pages list all the 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 refresh your permalinks after this option has been enabled.', 'give' ),
464
+							'name' => __('Disable Form Archives', 'give'),
465
+							'desc' => __('Archives pages list all the 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 refresh your permalinks after this option has been enabled.', 'give'),
466 466
 							'id'   => 'disable_forms_archives',
467 467
 							'type' => 'checkbox',
468 468
 						),
469 469
 						array(
470
-							'name' => __( 'Disable Form Excerpts', 'give' ),
471
-							'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' ),
470
+							'name' => __('Disable Form Excerpts', 'give'),
471
+							'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'),
472 472
 							'id'   => 'disable_forms_excerpt',
473 473
 							'type' => 'checkbox',
474 474
 						),
475 475
 						array(
476
-							'name'    => __( 'Featured Image Size', 'give' ),
477
-							'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' ),
476
+							'name'    => __('Featured Image Size', 'give'),
477
+							'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'),
478 478
 							'id'      => 'featured_image_size',
479 479
 							'type'    => 'select',
480 480
 							'default' => 'large',
481 481
 							'options' => give_get_featured_image_sizes(),
482 482
 						),
483 483
 						array(
484
-							'name' => __( 'Disable Form Featured Image', 'give' ),
485
-							'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' ),
484
+							'name' => __('Disable Form Featured Image', 'give'),
485
+							'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'),
486 486
 							'id'   => 'disable_form_featured_img',
487 487
 							'type' => 'checkbox',
488 488
 						),
489 489
 						array(
490
-							'name' => __( 'Disable Single Form Sidebar', 'give' ),
491
-							'desc' => __( 'The sidebar allows you to add additional widget to the Give single form view. If you don\'t plan on using the sidebar you may disable it with this option.', 'give' ),
490
+							'name' => __('Disable Single Form Sidebar', 'give'),
491
+							'desc' => __('The sidebar allows you to add additional widget to the Give single form view. If you don\'t plan on using the sidebar you may disable it with this option.', 'give'),
492 492
 							'id'   => 'disable_form_sidebar',
493 493
 							'type' => 'checkbox',
494 494
 						),
495 495
 						array(
496
-							'name' => __( 'Taxonomies', 'give' ),
496
+							'name' => __('Taxonomies', 'give'),
497 497
 							'desc' => '',
498 498
 							'id'   => 'give_title_display_settings_3',
499 499
 							'type' => 'give_title',
500 500
 						),
501 501
 						array(
502
-							'name' => __( 'Enable Form Categories', 'give' ),
503
-							'desc' => __( 'Enables the "Category" taxonomy for all Give forms.', 'give' ),
502
+							'name' => __('Enable Form Categories', 'give'),
503
+							'desc' => __('Enables the "Category" taxonomy for all Give forms.', 'give'),
504 504
 							'id'   => 'categories',
505 505
 							'type' => 'checkbox',
506 506
 						),
507 507
 						array(
508
-							'name' => __( 'Enable Form Tags', 'give' ),
509
-							'desc' => __( 'Enables the "Tag" taxonomy for all Give forms.', 'give' ),
508
+							'name' => __('Enable Form Tags', 'give'),
509
+							'desc' => __('Enables the "Tag" taxonomy for all Give forms.', 'give'),
510 510
 							'id'   => 'tags',
511 511
 							'type' => 'checkbox',
512 512
 						),
@@ -519,101 +519,101 @@  discard block
 block discarded – undo
519 519
 			 */
520 520
 			'emails'      => array(
521 521
 				'id'         => 'email_settings',
522
-				'give_title' => __( 'Email Settings', 'give' ),
523
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key ) ),
524
-				'fields'     => apply_filters( 'give_settings_emails', array(
522
+				'give_title' => __('Email Settings', 'give'),
523
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key)),
524
+				'fields'     => apply_filters('give_settings_emails', array(
525 525
 						array(
526
-							'name' => __( 'Email Settings', 'give' ),
526
+							'name' => __('Email Settings', 'give'),
527 527
 							'desc' => '',
528 528
 							'id'   => 'give_title_email_settings_1',
529 529
 							'type' => 'give_title',
530 530
 						),
531 531
 						array(
532 532
 							'id'      => 'email_template',
533
-							'name'    => __( 'Email Template', 'give' ),
534
-							'desc'    => __( 'Choose a template. Click "Save Changes" then "Preview Donation Receipt" to see the new template.', 'give' ),
533
+							'name'    => __('Email Template', 'give'),
534
+							'desc'    => __('Choose a template. Click "Save Changes" then "Preview Donation Receipt" to see the new template.', 'give'),
535 535
 							'type'    => 'select',
536 536
 							'options' => give_get_email_templates(),
537 537
 						),
538 538
 						array(
539 539
 							'id'   => 'email_logo',
540
-							'name' => __( 'Logo', 'give' ),
541
-							'desc' => __( 'Upload or choose a logo to be displayed at the top of the donation receipt emails. Displayed on HTML emails only.', 'give' ),
540
+							'name' => __('Logo', 'give'),
541
+							'desc' => __('Upload or choose a logo to be displayed at the top of the donation receipt emails. Displayed on HTML emails only.', 'give'),
542 542
 							'type' => 'file',
543 543
 						),
544 544
 						array(
545 545
 							'id'      => 'from_name',
546
-							'name'    => __( 'From Name', 'give' ),
547
-							'desc'    => __( 'The name that appears in the "From" field in donation receipt emails.', 'give' ),
548
-							'default' => get_bloginfo( 'name' ),
546
+							'name'    => __('From Name', 'give'),
547
+							'desc'    => __('The name that appears in the "From" field in donation receipt emails.', 'give'),
548
+							'default' => get_bloginfo('name'),
549 549
 							'type'    => 'text',
550 550
 						),
551 551
 						array(
552 552
 							'id'      => 'from_email',
553
-							'name'    => __( 'From Email', 'give' ),
554
-							'desc'    => __( 'Email to send donation receipts from. This will act as the "from" and "reply-to" address.', 'give' ),
555
-							'default' => get_bloginfo( 'admin_email' ),
553
+							'name'    => __('From Email', 'give'),
554
+							'desc'    => __('Email to send donation receipts from. This will act as the "from" and "reply-to" address.', 'give'),
555
+							'default' => get_bloginfo('admin_email'),
556 556
 							'type'    => 'text',
557 557
 						),
558 558
 						array(
559
-							'name' => __( 'Donation Receipt', 'give' ),
559
+							'name' => __('Donation Receipt', 'give'),
560 560
 							'desc' => '',
561 561
 							'id'   => 'give_title_email_settings_2',
562 562
 							'type' => 'give_title',
563 563
 						),
564 564
 						array(
565 565
 							'id'      => 'donation_subject',
566
-							'name'    => __( 'Donation Email Subject', 'give' ),
567
-							'desc'    => __( 'Enter the subject line for the donation receipt email.', 'give' ),
568
-							'default' => esc_attr__( 'Donation Receipt', 'give' ),
566
+							'name'    => __('Donation Email Subject', 'give'),
567
+							'desc'    => __('Enter the subject line for the donation receipt email.', 'give'),
568
+							'default' => esc_attr__('Donation Receipt', 'give'),
569 569
 							'type'    => 'text',
570 570
 						),
571 571
 						array(
572 572
 							'id'      => 'donation_receipt',
573
-							'name'    => __( 'Donation Receipt', 'give' ),
573
+							'name'    => __('Donation Receipt', 'give'),
574 574
 							'desc'    => sprintf(
575 575
 							/* translators: %s: emails tags list */
576
-								__( 'Enter the email that is sent to users after completing a successful donation. HTML is accepted. Available template tags: %s', 'give' ),
577
-								'<br/>' . give_get_emails_tags_list()
576
+								__('Enter the email that is sent to users after completing a successful donation. HTML is accepted. Available template tags: %s', 'give'),
577
+								'<br/>'.give_get_emails_tags_list()
578 578
 							),
579 579
 							'type'    => 'wysiwyg',
580 580
 							'default' => give_get_default_donation_receipt_email(),
581 581
 						),
582 582
 						array(
583
-							'name' => __( 'New Donation Notification', 'give' ),
583
+							'name' => __('New Donation Notification', 'give'),
584 584
 							'desc' => '',
585 585
 							'id'   => 'give_title_email_settings_3',
586 586
 							'type' => 'give_title',
587 587
 						),
588 588
 						array(
589 589
 							'id'      => 'donation_notification_subject',
590
-							'name'    => __( 'Donation Notification Subject', 'give' ),
591
-							'desc'    => __( 'Enter the subject line for the donation notification email.', 'give' ),
590
+							'name'    => __('Donation Notification Subject', 'give'),
591
+							'desc'    => __('Enter the subject line for the donation notification email.', 'give'),
592 592
 							'type'    => 'text',
593
-							'default' => esc_attr__( 'New Donation - #{payment_id}', 'give' ),
593
+							'default' => esc_attr__('New Donation - #{payment_id}', 'give'),
594 594
 						),
595 595
 						array(
596 596
 							'id'      => 'donation_notification',
597
-							'name'    => __( 'Donation Notification', 'give' ),
597
+							'name'    => __('Donation Notification', 'give'),
598 598
 							'desc'    => sprintf(
599 599
 							/* translators: %s: emails tags list */
600
-								__( 'Enter the email that is sent to donation notification emails after completion of a donation. HTML is accepted. Available template tags: %s', 'give' ),
601
-								'<br/>' . give_get_emails_tags_list()
600
+								__('Enter the email that is sent to donation notification emails after completion of a donation. HTML is accepted. Available template tags: %s', 'give'),
601
+								'<br/>'.give_get_emails_tags_list()
602 602
 							),
603 603
 							'type'    => 'wysiwyg',
604 604
 							'default' => give_get_default_donation_notification_email(),
605 605
 						),
606 606
 						array(
607 607
 							'id'      => 'admin_notice_emails',
608
-							'name'    => __( 'Donation Notification Emails', 'give' ),
609
-							'desc'    => __( 'Enter the email address(es) that should receive a notification anytime a donation is made, please only enter <span class="give-underline">one email address per line</span> and <strong>not separated by commas</strong>.', 'give' ),
608
+							'name'    => __('Donation Notification Emails', 'give'),
609
+							'desc'    => __('Enter the email address(es) that should receive a notification anytime a donation is made, please only enter <span class="give-underline">one email address per line</span> and <strong>not separated by commas</strong>.', 'give'),
610 610
 							'type'    => 'textarea',
611
-							'default' => get_bloginfo( 'admin_email' ),
611
+							'default' => get_bloginfo('admin_email'),
612 612
 						),
613 613
 						array(
614 614
 							'id'   => 'disable_admin_notices',
615
-							'name' => __( 'Disable Admin Notifications', 'give' ),
616
-							'desc' => __( 'Check this box if you do not want to receive emails when new donations are made.', 'give' ),
615
+							'name' => __('Disable Admin Notifications', 'give'),
616
+							'desc' => __('Check this box if you do not want to receive emails when new donations are made.', 'give'),
617 617
 							'type' => 'checkbox',
618 618
 						),
619 619
 					)
@@ -622,99 +622,99 @@  discard block
 block discarded – undo
622 622
 			/** Extension Settings */
623 623
 			'addons'      => array(
624 624
 				'id'         => 'addons',
625
-				'give_title' => __( 'Give Add-ons Settings', 'give' ),
626
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key ) ),
627
-				'fields'     => apply_filters( 'give_settings_addons', array()
625
+				'give_title' => __('Give Add-ons Settings', 'give'),
626
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key)),
627
+				'fields'     => apply_filters('give_settings_addons', array()
628 628
 				),
629 629
 			),
630 630
 			/** Licenses Settings */
631 631
 			'licenses'    => array(
632 632
 				'id'         => 'licenses',
633
-				'give_title' => __( 'Give Licenses', 'give' ),
634
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key ) ),
635
-				'fields'     => apply_filters( 'give_settings_licenses', array()
633
+				'give_title' => __('Give Licenses', 'give'),
634
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key)),
635
+				'fields'     => apply_filters('give_settings_licenses', array()
636 636
 				),
637 637
 			),
638 638
 			/** Advanced Options */
639 639
 			'advanced'    => array(
640 640
 				'id'         => 'advanced_options',
641
-				'give_title' => __( 'Advanced Options', 'give' ),
642
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key ) ),
643
-				'fields'     => apply_filters( 'give_settings_advanced', array(
641
+				'give_title' => __('Advanced Options', 'give'),
642
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key)),
643
+				'fields'     => apply_filters('give_settings_advanced', array(
644 644
 						array(
645
-							'name' => __( 'Access Control', 'give' ),
645
+							'name' => __('Access Control', 'give'),
646 646
 							'desc' => '',
647 647
 							'id'   => 'give_title_session_control_1',
648 648
 							'type' => 'give_title',
649 649
 						),
650 650
 						array(
651 651
 							'id'      => 'session_lifetime',
652
-							'name'    => __( 'Session Lifetime', 'give' ),
653
-							'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' ),
652
+							'name'    => __('Session Lifetime', 'give'),
653
+							'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'),
654 654
 							'type'    => 'select',
655 655
 							'options' => array(
656
-								'86400'  => __( '24 Hours', 'give' ),
657
-								'172800' => __( '48 Hours', 'give' ),
658
-								'259200' => __( '72 Hours', 'give' ),
659
-								'604800' => __( '1 Week', 'give' ),
656
+								'86400'  => __('24 Hours', 'give'),
657
+								'172800' => __('48 Hours', 'give'),
658
+								'259200' => __('72 Hours', 'give'),
659
+								'604800' => __('1 Week', 'give'),
660 660
 							),
661 661
 						),
662 662
 						array(
663
-							'name' => __( 'Email Access', 'give' ),
664
-							'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' ),
663
+							'name' => __('Email Access', 'give'),
664
+							'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'),
665 665
 							'id'   => 'email_access',
666 666
 							'type' => 'checkbox',
667 667
 						),
668 668
 						array(
669 669
 							'id'      => 'recaptcha_key',
670
-							'name'    => __( 'reCAPTCHA Site Key', 'give' ),
670
+							'name'    => __('reCAPTCHA Site Key', 'give'),
671 671
 							/* translators: %s: https://www.google.com/recaptcha/ */
672
-							'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. The reCAPTCHA uses Google\'s user-friendly single click verification method.', 'give' ), esc_url( 'https://www.google.com/recaptcha/' ) ),
672
+							'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. The reCAPTCHA uses Google\'s user-friendly single click verification method.', 'give'), esc_url('https://www.google.com/recaptcha/')),
673 673
 							'default' => '',
674 674
 							'type'    => 'text',
675 675
 						),
676 676
 						array(
677 677
 							'id'      => 'recaptcha_secret',
678
-							'name'    => __( 'reCAPTCHA Secret Key', 'give' ),
679
-							'desc'    => __( 'Please paste the reCAPTCHA secret key here from your manage reCAPTCHA API Keys panel.', 'give' ),
678
+							'name'    => __('reCAPTCHA Secret Key', 'give'),
679
+							'desc'    => __('Please paste the reCAPTCHA secret key here from your manage reCAPTCHA API Keys panel.', 'give'),
680 680
 							'default' => '',
681 681
 							'type'    => 'text',
682 682
 						),
683 683
 						array(
684
-							'name' => __( 'Data Control', 'give' ),
684
+							'name' => __('Data Control', 'give'),
685 685
 							'desc' => '',
686 686
 							'id'   => 'give_title_data_control_2',
687 687
 							'type' => 'give_title',
688 688
 						),
689 689
 						array(
690
-							'name' => __( 'Remove All Data on Uninstall?', 'give' ),
691
-							'desc' => __( 'When the plugin is deleted, completely remove all Give data.', 'give' ),
690
+							'name' => __('Remove All Data on Uninstall?', 'give'),
691
+							'desc' => __('When the plugin is deleted, completely remove all Give data.', 'give'),
692 692
 							'id'   => 'uninstall_on_delete',
693 693
 							'type' => 'checkbox',
694 694
 						),
695 695
 						array(
696
-							'name' => __( 'Filter Control', 'give' ),
696
+							'name' => __('Filter Control', 'give'),
697 697
 							'desc' => '',
698 698
 							'id'   => 'give_title_filter_control',
699 699
 							'type' => 'give_title',
700 700
 						),
701 701
 						array(
702 702
 							/* translators: %s: the_content */
703
-							'name' => sprintf( __( 'Disable %s filter', 'give' ), '<code>the_content</code>' ),
703
+							'name' => sprintf(__('Disable %s filter', 'give'), '<code>the_content</code>'),
704 704
 							/* translators: 1: https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content 2: the_content */
705
-							'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>' ),
705
+							'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>'),
706 706
 							'id'   => 'disable_the_content_filter',
707 707
 							'type' => 'checkbox',
708 708
 						),
709 709
 						array(
710
-							'name' => __( 'Script Loading', 'give' ),
710
+							'name' => __('Script Loading', 'give'),
711 711
 							'desc' => '',
712 712
 							'id'   => 'give_title_script_control',
713 713
 							'type' => 'give_title',
714 714
 						),
715 715
 						array(
716
-							'name' => __( 'Load Scripts in Footer?', 'give' ),
717
-							'desc' => __( 'Check this box if you would like Give to load all frontend JavaScript files in the footer.', 'give' ),
716
+							'name' => __('Load Scripts in Footer?', 'give'),
717
+							'desc' => __('Check this box if you would like Give to load all frontend JavaScript files in the footer.', 'give'),
718 718
 							'id'   => 'scripts_footer',
719 719
 							'type' => 'checkbox',
720 720
 						),
@@ -724,13 +724,13 @@  discard block
 block discarded – undo
724 724
 			/** API Settings */
725 725
 			'api'         => array(
726 726
 				'id'         => 'api',
727
-				'give_title' => __( 'API', 'give' ),
728
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key ) ),
727
+				'give_title' => __('API', 'give'),
728
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key)),
729 729
 				'show_names' => false, // Hide field names on the left
730
-				'fields'     => apply_filters( 'give_settings_system', array(
730
+				'fields'     => apply_filters('give_settings_system', array(
731 731
 						array(
732 732
 							'id'   => 'api',
733
-							'name' => __( 'API', 'give' ),
733
+							'name' => __('API', 'give'),
734 734
 							'type' => 'api',
735 735
 						),
736 736
 					)
@@ -739,13 +739,13 @@  discard block
 block discarded – undo
739 739
 			/** Licenses Settings */
740 740
 			'system_info' => array(
741 741
 				'id'         => 'system_info',
742
-				'give_title' => __( 'System Info', 'give' ),
743
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key ) ),
744
-				'fields'     => apply_filters( 'give_settings_system', array(
742
+				'give_title' => __('System Info', 'give'),
743
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key)),
744
+				'fields'     => apply_filters('give_settings_system', array(
745 745
 						array(
746 746
 							'id'   => 'system-info-textarea',
747
-							'name' => __( 'System Info', 'give' ),
748
-							'desc' => __( 'Please copy and paste this information in your ticket when contacting support.', 'give' ),
747
+							'name' => __('System Info', 'give'),
748
+							'desc' => __('Please copy and paste this information in your ticket when contacting support.', 'give'),
749 749
 							'type' => 'system_info',
750 750
 						),
751 751
 					)
@@ -753,15 +753,15 @@  discard block
 block discarded – undo
753 753
 			),
754 754
 		);
755 755
 
756
-		$give_settings = apply_filters( 'give_registered_settings', $give_settings );
756
+		$give_settings = apply_filters('give_registered_settings', $give_settings);
757 757
 
758 758
 		// Return all settings array if no active tab
759
-		if ( empty( $active_tab ) || ! isset( $give_settings[ $active_tab ] ) ) {
759
+		if (empty($active_tab) || ! isset($give_settings[$active_tab])) {
760 760
 			return $give_settings;
761 761
 		}
762 762
 
763 763
 		// Add other tabs and settings fields as needed
764
-		return $give_settings[ $active_tab ];
764
+		return $give_settings[$active_tab];
765 765
 
766 766
 	}
767 767
 
@@ -770,11 +770,11 @@  discard block
 block discarded – undo
770 770
 	 */
771 771
 	public function settings_notices() {
772 772
 
773
-		if ( ! isset( $_POST['give_settings_saved'] ) ) {
773
+		if ( ! isset($_POST['give_settings_saved'])) {
774 774
 			return;
775 775
 		}
776 776
 
777
-		add_settings_error( 'give-notices', 'global-settings-updated', __( 'Settings updated.', 'give' ), 'updated' );
777
+		add_settings_error('give-notices', 'global-settings-updated', __('Settings updated.', 'give'), 'updated');
778 778
 
779 779
 	}
780 780
 
@@ -789,14 +789,14 @@  discard block
 block discarded – undo
789 789
 	 * @return mixed         Field value or exception is thrown.
790 790
 	 * @throws Exception     Throws an exception if the field is invalid.
791 791
 	 */
792
-	public function __get( $field ) {
792
+	public function __get($field) {
793 793
 
794 794
 		// Allowed fields to retrieve
795
-		if ( in_array( $field, array( 'key', 'fields', 'give_title', 'options_page' ), true ) ) {
795
+		if (in_array($field, array('key', 'fields', 'give_title', 'options_page'), true)) {
796 796
 			return $this->{$field};
797 797
 		}
798 798
 
799
-		throw new Exception( sprintf( __( 'Invalid property: %s', 'give' ), $field ) );
799
+		throw new Exception(sprintf(__('Invalid property: %s', 'give'), $field));
800 800
 	}
801 801
 
802 802
 
@@ -815,12 +815,12 @@  discard block
 block discarded – undo
815 815
  *
816 816
  * @return mixed        Option value
817 817
  */
818
-function give_get_option( $key = '', $default = false ) {
818
+function give_get_option($key = '', $default = false) {
819 819
 	$give_options = give_get_settings();
820
-	$value        = ! empty( $give_options[ $key ] ) ? $give_options[ $key ] : $default;
821
-	$value        = apply_filters( 'give_get_option', $value, $key, $default );
820
+	$value        = ! empty($give_options[$key]) ? $give_options[$key] : $default;
821
+	$value        = apply_filters('give_get_option', $value, $key, $default);
822 822
 
823
-	return apply_filters( "give_get_option_{$key}", $value, $key, $default );
823
+	return apply_filters("give_get_option_{$key}", $value, $key, $default);
824 824
 }
825 825
 
826 826
 
@@ -838,33 +838,33 @@  discard block
 block discarded – undo
838 838
  *
839 839
  * @return boolean True if updated, false if not.
840 840
  */
841
-function give_update_option( $key = '', $value = false ) {
841
+function give_update_option($key = '', $value = false) {
842 842
 
843 843
 	// If no key, exit
844
-	if ( empty( $key ) ) {
844
+	if (empty($key)) {
845 845
 		return false;
846 846
 	}
847 847
 
848
-	if ( empty( $value ) ) {
849
-		$remove_option = give_delete_option( $key );
848
+	if (empty($value)) {
849
+		$remove_option = give_delete_option($key);
850 850
 
851 851
 		return $remove_option;
852 852
 	}
853 853
 
854 854
 	// First let's grab the current settings
855
-	$options = get_option( 'give_settings' );
855
+	$options = get_option('give_settings');
856 856
 
857 857
 	// Let's let devs alter that value coming in
858
-	$value = apply_filters( 'give_update_option', $value, $key );
858
+	$value = apply_filters('give_update_option', $value, $key);
859 859
 
860 860
 	// Next let's try to update the value
861
-	$options[ $key ] = $value;
862
-	$did_update      = update_option( 'give_settings', $options );
861
+	$options[$key] = $value;
862
+	$did_update      = update_option('give_settings', $options);
863 863
 
864 864
 	// If it updated, let's update the global variable
865
-	if ( $did_update ) {
865
+	if ($did_update) {
866 866
 		global $give_options;
867
-		$give_options[ $key ] = $value;
867
+		$give_options[$key] = $value;
868 868
 	}
869 869
 
870 870
 	return $did_update;
@@ -883,25 +883,25 @@  discard block
 block discarded – undo
883 883
  *
884 884
  * @return boolean True if updated, false if not.
885 885
  */
886
-function give_delete_option( $key = '' ) {
886
+function give_delete_option($key = '') {
887 887
 
888 888
 	// If no key, exit
889
-	if ( empty( $key ) ) {
889
+	if (empty($key)) {
890 890
 		return false;
891 891
 	}
892 892
 
893 893
 	// First let's grab the current settings
894
-	$options = get_option( 'give_settings' );
894
+	$options = get_option('give_settings');
895 895
 
896 896
 	// Next let's try to update the value
897
-	if ( isset( $options[ $key ] ) ) {
898
-		unset( $options[ $key ] );
897
+	if (isset($options[$key])) {
898
+		unset($options[$key]);
899 899
 	}
900 900
 
901
-	$did_update = update_option( 'give_settings', $options );
901
+	$did_update = update_option('give_settings', $options);
902 902
 
903 903
 	// If it updated, let's update the global variable
904
-	if ( $did_update ) {
904
+	if ($did_update) {
905 905
 		global $give_options;
906 906
 		$give_options = $options;
907 907
 	}
@@ -920,9 +920,9 @@  discard block
 block discarded – undo
920 920
  */
921 921
 function give_get_settings() {
922 922
 
923
-	$settings = get_option( 'give_settings' );
923
+	$settings = get_option('give_settings');
924 924
 
925
-	return (array) apply_filters( 'give_get_settings', $settings );
925
+	return (array) apply_filters('give_get_settings', $settings);
926 926
 
927 927
 }
928 928
 
@@ -940,25 +940,25 @@  discard block
 block discarded – undo
940 940
  *
941 941
  * @return array
942 942
  */
943
-function give_settings_array_insert( $array, $position, $insert ) {
944
-	if ( is_int( $position ) ) {
945
-		array_splice( $array, $position, 0, $insert );
943
+function give_settings_array_insert($array, $position, $insert) {
944
+	if (is_int($position)) {
945
+		array_splice($array, $position, 0, $insert);
946 946
 	} else {
947 947
 
948
-		foreach ( $array as $index => $subarray ) {
949
-			if ( isset( $subarray['id'] ) && $subarray['id'] == $position ) {
948
+		foreach ($array as $index => $subarray) {
949
+			if (isset($subarray['id']) && $subarray['id'] == $position) {
950 950
 				$pos = $index;
951 951
 			}
952 952
 		}
953 953
 
954
-		if ( ! isset( $pos ) ) {
954
+		if ( ! isset($pos)) {
955 955
 			return $array;
956 956
 		}
957 957
 
958 958
 		$array = array_merge(
959
-			array_slice( $array, 0, $pos ),
959
+			array_slice($array, 0, $pos),
960 960
 			$insert,
961
-			array_slice( $array, $pos )
961
+			array_slice($array, $pos)
962 962
 		);
963 963
 	}
964 964
 
@@ -978,23 +978,23 @@  discard block
 block discarded – undo
978 978
  *
979 979
  * @return void
980 980
  */
981
-function give_enabled_gateways_callback( $field_arr, $saved_values = array() ) {
981
+function give_enabled_gateways_callback($field_arr, $saved_values = array()) {
982 982
 
983 983
 	$id       = $field_arr['id'];
984
-	$gateways = give_get_ordered_payment_gateways( give_get_payment_gateways() );
984
+	$gateways = give_get_ordered_payment_gateways(give_get_payment_gateways());
985 985
 
986 986
 	echo '<ul class="give-checklist-fields give-payment-gatways-list">';
987 987
 
988
-	foreach ( $gateways as $key => $option ) :
988
+	foreach ($gateways as $key => $option) :
989 989
 
990
-		if ( is_array( $saved_values ) && array_key_exists( $key, $saved_values ) ) {
990
+		if (is_array($saved_values) && array_key_exists($key, $saved_values)) {
991 991
 			$enabled = '1';
992 992
 		} else {
993 993
 			$enabled = null;
994 994
 		}
995 995
 
996
-		echo '<li><span class="give-drag-handle"><span class="dashicons dashicons-menu"></span></span><input name="' . $id . '[' . $key . ']" id="' . $id . '[' . $key . ']" type="checkbox" value="1" ' . checked( '1', $enabled, false ) . '/>&nbsp;';
997
-		echo '<label for="' . $id . '[' . $key . ']">' . $option['admin_label'] . '</label></li>';
996
+		echo '<li><span class="give-drag-handle"><span class="dashicons dashicons-menu"></span></span><input name="'.$id.'['.$key.']" id="'.$id.'['.$key.']" type="checkbox" value="1" '.checked('1', $enabled, false).'/>&nbsp;';
997
+		echo '<label for="'.$id.'['.$key.']">'.$option['admin_label'].'</label></li>';
998 998
 
999 999
 	endforeach;
1000 1000
 
@@ -1013,16 +1013,16 @@  discard block
 block discarded – undo
1013 1013
  *
1014 1014
  * @return void
1015 1015
  */
1016
-function give_default_gateway_callback( $field_arr, $saved_value ) {
1016
+function give_default_gateway_callback($field_arr, $saved_value) {
1017 1017
 	$id          = $field_arr['id'];
1018 1018
 	$gateways    = give_get_enabled_payment_gateways();
1019
-	$saved_value = give_get_default_gateway( null );
1019
+	$saved_value = give_get_default_gateway(null);
1020 1020
 
1021
-	echo '<select class="give-select" name="' . $id . '" id="' . $id . '">';
1021
+	echo '<select class="give-select" name="'.$id.'" id="'.$id.'">';
1022 1022
 
1023
-	foreach ( $gateways as $key => $option ) :
1024
-		$selected = isset( $saved_value ) ? selected( $key, $saved_value, false ) : '';
1025
-		echo '<option value="' . esc_attr( $key ) . '"' . $selected . '>' . esc_html( $option['admin_label'] ) . '</option>';
1023
+	foreach ($gateways as $key => $option) :
1024
+		$selected = isset($saved_value) ? selected($key, $saved_value, false) : '';
1025
+		echo '<option value="'.esc_attr($key).'"'.$selected.'>'.esc_html($option['admin_label']).'</option>';
1026 1026
 	endforeach;
1027 1027
 
1028 1028
 	echo '</select>';
@@ -1040,13 +1040,13 @@  discard block
 block discarded – undo
1040 1040
  *
1041 1041
  * @return void
1042 1042
  */
1043
-function give_title_callback( $field_object, $escaped_value, $object_id, $object_type, $field_type_object ) {
1043
+function give_title_callback($field_object, $escaped_value, $object_id, $object_type, $field_type_object) {
1044 1044
 
1045 1045
 	$id                = $field_type_object->field->args['id'];
1046 1046
 	$title             = $field_type_object->field->args['name'];
1047 1047
 	$field_description = $field_type_object->field->args['desc'];
1048 1048
 
1049
-	echo '<hr>' . $field_description;
1049
+	echo '<hr>'.$field_description;
1050 1050
 
1051 1051
 }
1052 1052
 
@@ -1061,7 +1061,7 @@  discard block
 block discarded – undo
1061 1061
  *
1062 1062
  * @return void
1063 1063
  */
1064
-function give_description_callback( $field_object, $escaped_value, $object_id, $object_type, $field_type_object ) {
1064
+function give_description_callback($field_object, $escaped_value, $object_id, $object_type, $field_type_object) {
1065 1065
 
1066 1066
 	$id                = $field_type_object->field->args['id'];
1067 1067
 	$title             = $field_type_object->field->args['name'];
@@ -1080,25 +1080,25 @@  discard block
 block discarded – undo
1080 1080
  * @see: https://github.com/WebDevStudios/CMB2/wiki/Adding-your-own-field-types
1081 1081
  * @return array An array of options that matches the CMB2 options array
1082 1082
  */
1083
-function give_cmb2_get_post_options( $query_args, $force = false ) {
1083
+function give_cmb2_get_post_options($query_args, $force = false) {
1084 1084
 
1085
-	$post_options = array( '' => '' ); // Blank option
1085
+	$post_options = array('' => ''); // Blank option
1086 1086
 
1087
-	if ( ( ! isset( $_GET['page'] ) || 'give-settings' != $_GET['page'] ) && ! $force ) {
1087
+	if (( ! isset($_GET['page']) || 'give-settings' != $_GET['page']) && ! $force) {
1088 1088
 		return $post_options;
1089 1089
 	}
1090 1090
 
1091
-	$args = wp_parse_args( $query_args, array(
1091
+	$args = wp_parse_args($query_args, array(
1092 1092
 		'post_type'   => 'page',
1093 1093
 		'numberposts' => 10,
1094
-	) );
1094
+	));
1095 1095
 
1096
-	$posts = get_posts( $args );
1096
+	$posts = get_posts($args);
1097 1097
 
1098
-	if ( $posts ) {
1099
-		foreach ( $posts as $post ) {
1098
+	if ($posts) {
1099
+		foreach ($posts as $post) {
1100 1100
 
1101
-			$post_options[ $post->ID ] = $post->post_title;
1101
+			$post_options[$post->ID] = $post->post_title;
1102 1102
 
1103 1103
 		}
1104 1104
 	}
@@ -1123,33 +1123,33 @@  discard block
 block discarded – undo
1123 1123
 
1124 1124
 	$sizes            = array();
1125 1125
 	$get_sizes        = get_intermediate_image_sizes();
1126
-	$core_image_sizes = array( 'thumbnail', 'medium', 'medium_large', 'large' );
1126
+	$core_image_sizes = array('thumbnail', 'medium', 'medium_large', 'large');
1127 1127
 
1128 1128
 
1129 1129
 	// This will help us to filter special characters from a string
1130
-	$filter_slug_items = array( '_', '-' );
1130
+	$filter_slug_items = array('_', '-');
1131 1131
 
1132
-	foreach ( $get_sizes as $_size ) {
1132
+	foreach ($get_sizes as $_size) {
1133 1133
 
1134 1134
 		// Converting image size slug to title case
1135
-		$sizes[ $_size ] = give_slug_to_title( $_size, $filter_slug_items );
1135
+		$sizes[$_size] = give_slug_to_title($_size, $filter_slug_items);
1136 1136
 
1137
-		if ( in_array( $_size, $core_image_sizes ) ) {
1138
-			$sizes[ $_size ] .= ' (' . get_option( "{$_size}_size_w" ) . 'x' . get_option( "{$_size}_size_h" );
1139
-		} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {
1140
-			$sizes[ $_size ] .= " ({$_wp_additional_image_sizes[ $_size ]['width']} x {$_wp_additional_image_sizes[ $_size ]['height']}";
1137
+		if (in_array($_size, $core_image_sizes)) {
1138
+			$sizes[$_size] .= ' ('.get_option("{$_size}_size_w").'x'.get_option("{$_size}_size_h");
1139
+		} elseif (isset($_wp_additional_image_sizes[$_size])) {
1140
+			$sizes[$_size] .= " ({$_wp_additional_image_sizes[$_size]['width']} x {$_wp_additional_image_sizes[$_size]['height']}";
1141 1141
 		}
1142 1142
 
1143 1143
 		// Based on the above image height check, label the respective resolution as responsive
1144
-		if ( ( array_key_exists( $_size, $_wp_additional_image_sizes ) && ! $_wp_additional_image_sizes[ $_size ]['crop'] ) || ( in_array( $_size, $core_image_sizes ) && ! get_option( "{$_size}_crop" ) ) ) {
1145
-			$sizes[ $_size ] .= ' - responsive';
1144
+		if ((array_key_exists($_size, $_wp_additional_image_sizes) && ! $_wp_additional_image_sizes[$_size]['crop']) || (in_array($_size, $core_image_sizes) && ! get_option("{$_size}_crop"))) {
1145
+			$sizes[$_size] .= ' - responsive';
1146 1146
 		}
1147 1147
 
1148
-		$sizes[ $_size ] .= ')';
1148
+		$sizes[$_size] .= ')';
1149 1149
 
1150 1150
 	}
1151 1151
 
1152
-	return apply_filters( 'give_get_featured_image_sizes', $sizes );
1152
+	return apply_filters('give_get_featured_image_sizes', $sizes);
1153 1153
 }
1154 1154
 
1155 1155
 
@@ -1165,14 +1165,14 @@  discard block
 block discarded – undo
1165 1165
  *
1166 1166
  * @return text $string
1167 1167
  */
1168
-function give_slug_to_title( $string, $filters = array() ) {
1168
+function give_slug_to_title($string, $filters = array()) {
1169 1169
 
1170
-	foreach ( $filters as $filter_item ) {
1171
-		$string = str_replace( $filter_item, ' ', $string );
1170
+	foreach ($filters as $filter_item) {
1171
+		$string = str_replace($filter_item, ' ', $string);
1172 1172
 	}
1173 1173
 
1174 1174
 	// Return updated string after converting it to title case
1175
-	return ucwords( $string );
1175
+	return ucwords($string);
1176 1176
 
1177 1177
 }
1178 1178
 
@@ -1188,18 +1188,18 @@  discard block
 block discarded – undo
1188 1188
  *
1189 1189
  * @return void
1190 1190
  */
1191
-function give_license_key_callback( $field_object, $escaped_value, $object_id, $object_type, $field_type_object ) {
1191
+function give_license_key_callback($field_object, $escaped_value, $object_id, $object_type, $field_type_object) {
1192 1192
 	/* @var CMB2_Types $field_type_object */
1193 1193
 
1194 1194
 	$id                 = $field_type_object->field->args['id'];
1195 1195
 	$field_description  = $field_type_object->field->args['desc'];
1196 1196
 	$license            = $field_type_object->field->args['options']['license'];
1197 1197
 	$license_key        = $escaped_value;
1198
-	$is_license_key     = apply_filters( 'give_is_license_key', ( is_object( $license ) && ! empty( $license ) ) );
1199
-	$is_valid_license   = apply_filters( 'give_is_valid_license', ( $is_license_key && property_exists( $license, 'license' ) && 'valid' === $license->license ) );
1198
+	$is_license_key     = apply_filters('give_is_license_key', (is_object($license) && ! empty($license)));
1199
+	$is_valid_license   = apply_filters('give_is_valid_license', ($is_license_key && property_exists($license, 'license') && 'valid' === $license->license));
1200 1200
 	$shortname          = $field_type_object->field->args['options']['shortname'];
1201 1201
 	$field_classes      = 'regular-text give-license-field';
1202
-	$type               = empty( $escaped_value ) || ! $is_valid_license ? 'text' : 'password';
1202
+	$type               = empty($escaped_value) || ! $is_valid_license ? 'text' : 'password';
1203 1203
 	$custom_html        = '';
1204 1204
 	$messages           = array();
1205 1205
 	$class              = '';
@@ -1211,83 +1211,83 @@  discard block
 block discarded – undo
1211 1211
 
1212 1212
 	// By default query on edd api url will return license object which contain status and message property, this can break below functionality.
1213 1213
 	// To combat that check if status is set to error or not, if yes then set $is_license_key to false.
1214
-	if ( $is_license_key && property_exists( $license, 'status' ) && 'error' === $license->status ) {
1214
+	if ($is_license_key && property_exists($license, 'status') && 'error' === $license->status) {
1215 1215
 		$is_license_key = false;
1216 1216
 	}
1217 1217
 
1218 1218
 	// Check if current license is part of subscription or not.
1219
-	$subscriptions = get_option( 'give_subscriptions' );
1219
+	$subscriptions = get_option('give_subscriptions');
1220 1220
 
1221
-	if ( $is_license_key && $subscriptions ) {
1222
-		foreach ( $subscriptions as $subscription ) {
1223
-			if ( in_array( $license_key, $subscription['licenses'] ) ) {
1221
+	if ($is_license_key && $subscriptions) {
1222
+		foreach ($subscriptions as $subscription) {
1223
+			if (in_array($license_key, $subscription['licenses'])) {
1224 1224
 				$is_in_subscription = $subscription['id'];
1225 1225
 				break;
1226 1226
 			}
1227 1227
 		}
1228 1228
 	}
1229 1229
 
1230
-	if ( $is_license_key ) {
1230
+	if ($is_license_key) {
1231 1231
 
1232
-		if ( empty( $license->success ) && property_exists( $license, 'error' ) ) {
1232
+		if (empty($license->success) && property_exists($license, 'error')) {
1233 1233
 
1234 1234
 			// activate_license 'invalid' on anything other than valid, so if there was an error capture it
1235
-			switch ( $license->error ) {
1235
+			switch ($license->error) {
1236 1236
 				case 'expired' :
1237 1237
 					$class          = $license->error;
1238 1238
 					$messages[]     = sprintf(
1239
-						__( 'Your license key expired on %1$s. Please <a href="%2$s" target="_blank" title="Renew your license key">renew your license key</a>.', 'give' ),
1240
-						date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ),
1241
-						$checkout_page_link . '?edd_license_key=' . $license_key . '&utm_campaign=admin&utm_source=licenses&utm_medium=expired'
1239
+						__('Your license key expired on %1$s. Please <a href="%2$s" target="_blank" title="Renew your license key">renew your license key</a>.', 'give'),
1240
+						date_i18n(get_option('date_format'), strtotime($license->expires, current_time('timestamp'))),
1241
+						$checkout_page_link.'?edd_license_key='.$license_key.'&utm_campaign=admin&utm_source=licenses&utm_medium=expired'
1242 1242
 					);
1243
-					$license_status = 'license-' . $class;
1243
+					$license_status = 'license-'.$class;
1244 1244
 					break;
1245 1245
 
1246 1246
 				case 'missing' :
1247 1247
 					$class          = $license->error;
1248 1248
 					$messages[]     = sprintf(
1249
-						__( 'Invalid license. Please <a href="%s" target="_blank" title="Visit account page">visit your account page</a> and verify it.', 'give' ),
1250
-						$account_page_link . '?utm_campaign=admin&utm_source=licenses&utm_medium=missing'
1249
+						__('Invalid license. Please <a href="%s" target="_blank" title="Visit account page">visit your account page</a> and verify it.', 'give'),
1250
+						$account_page_link.'?utm_campaign=admin&utm_source=licenses&utm_medium=missing'
1251 1251
 					);
1252
-					$license_status = 'license-' . $class;
1252
+					$license_status = 'license-'.$class;
1253 1253
 					break;
1254 1254
 
1255 1255
 				case 'invalid' :
1256 1256
 					$class          = $license->error;
1257 1257
 					$messages[]     = sprintf(
1258
-						__( 'Your %1$s is not active for this URL. Please <a href="%2$s" target="_blank" title="Visit account page">visit your account page</a> to manage your license key URLs.', 'give' ),
1258
+						__('Your %1$s is not active for this URL. Please <a href="%2$s" target="_blank" title="Visit account page">visit your account page</a> to manage your license key URLs.', 'give'),
1259 1259
 						$addon_name,
1260
-						$account_page_link . '?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'
1260
+						$account_page_link.'?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'
1261 1261
 					);
1262
-					$license_status = 'license-' . $class;
1262
+					$license_status = 'license-'.$class;
1263 1263
 					break;
1264 1264
 
1265 1265
 				case 'site_inactive' :
1266 1266
 					$class          = $license->error;
1267 1267
 					$messages[]     = sprintf(
1268
-						__( 'Your %1$s is not active for this URL. Please <a href="%2$s" target="_blank" title="Visit account page">visit your account page</a> to manage your license key URLs.', 'give' ),
1268
+						__('Your %1$s is not active for this URL. Please <a href="%2$s" target="_blank" title="Visit account page">visit your account page</a> to manage your license key URLs.', 'give'),
1269 1269
 						$addon_name,
1270
-						$account_page_link . '?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'
1270
+						$account_page_link.'?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'
1271 1271
 					);
1272
-					$license_status = 'license-' . $class;
1272
+					$license_status = 'license-'.$class;
1273 1273
 					break;
1274 1274
 
1275 1275
 				case 'item_name_mismatch' :
1276 1276
 					$class          = $license->error;
1277
-					$messages[]     = sprintf( __( 'This license %1$s does not belong to %2$s.', 'give' ), $license_key, $addon_name );
1278
-					$license_status = 'license-' . $class;
1277
+					$messages[]     = sprintf(__('This license %1$s does not belong to %2$s.', 'give'), $license_key, $addon_name);
1278
+					$license_status = 'license-'.$class;
1279 1279
 					break;
1280 1280
 
1281 1281
 				case 'no_activations_left':
1282 1282
 					$class          = $license->error;
1283
-					$messages[]     = sprintf( __( 'Your license key has reached it\'s activation limit. <a href="%s">View possible upgrades</a> now.', 'give' ), $account_page_link );
1284
-					$license_status = 'license-' . $class;
1283
+					$messages[]     = sprintf(__('Your license key has reached it\'s activation limit. <a href="%s">View possible upgrades</a> now.', 'give'), $account_page_link);
1284
+					$license_status = 'license-'.$class;
1285 1285
 					break;
1286 1286
 
1287 1287
 				default:
1288 1288
 					$class          = $license->error;
1289 1289
 					$messages[]     = sprintf(
1290
-						__( 'Your license is not activated. Please <a href="%3$s" target="_blank" title="Visit account page">visit your account page</a> to manage your license key URLs. %2$sError Code: %1$s.', 'give' ),
1290
+						__('Your license is not activated. Please <a href="%3$s" target="_blank" title="Visit account page">visit your account page</a> to manage your license key URLs. %2$sError Code: %1$s.', 'give'),
1291 1291
 						$license->error,
1292 1292
 						'<br/>',
1293 1293
 						"{$account_page_link}?utm_campaign=admin&utm_source=licenses&utm_medium={$license->error}"
@@ -1296,74 +1296,74 @@  discard block
 block discarded – undo
1296 1296
 					break;
1297 1297
 			}
1298 1298
 
1299
-		} elseif ( $is_in_subscription ) {
1299
+		} elseif ($is_in_subscription) {
1300 1300
 
1301
-			$subscription_expires = strtotime( $subscriptions[ $is_in_subscription ]['expires'] );
1302
-			$subscription_status  = __( 'renew', 'give' );
1301
+			$subscription_expires = strtotime($subscriptions[$is_in_subscription]['expires']);
1302
+			$subscription_status  = __('renew', 'give');
1303 1303
 
1304
-			if ( ( 'active' !== $subscriptions[ $is_in_subscription ]['status'] ) ) {
1305
-				$subscription_status = __( 'expire', 'give' );
1304
+			if (('active' !== $subscriptions[$is_in_subscription]['status'])) {
1305
+				$subscription_status = __('expire', 'give');
1306 1306
 			}
1307 1307
 
1308
-			if ( $subscription_expires < current_time( 'timestamp', 1 ) ) {
1309
-				$messages[]     = sprintf(
1310
-					__( 'Your subscription (<a href="%1$s" target="_blank">#%2$d</a>) expired. Please <a href="%3$s" target="_blank" title="Renew your license key">renew your license key</a>', 'give' ),
1311
-					urldecode( $subscriptions[ $is_in_subscription ]['invoice_url'] ),
1312
-					$subscriptions[ $is_in_subscription ]['payment_id'],
1313
-					$checkout_page_link . '?edd_license_key=' . $subscriptions[ $is_in_subscription ]['license_key'] . '&utm_campaign=admin&utm_source=licenses&utm_medium=expired'
1308
+			if ($subscription_expires < current_time('timestamp', 1)) {
1309
+				$messages[] = sprintf(
1310
+					__('Your subscription (<a href="%1$s" target="_blank">#%2$d</a>) expired. Please <a href="%3$s" target="_blank" title="Renew your license key">renew your license key</a>', 'give'),
1311
+					urldecode($subscriptions[$is_in_subscription]['invoice_url']),
1312
+					$subscriptions[$is_in_subscription]['payment_id'],
1313
+					$checkout_page_link.'?edd_license_key='.$subscriptions[$is_in_subscription]['license_key'].'&utm_campaign=admin&utm_source=licenses&utm_medium=expired'
1314 1314
 				);
1315 1315
 				$license_status = 'license-expired';
1316
-			} elseif ( strtotime( '- 7 days', $subscription_expires ) < current_time( 'timestamp', 1 ) ) {
1316
+			} elseif (strtotime('- 7 days', $subscription_expires) < current_time('timestamp', 1)) {
1317 1317
 				$messages[]     = sprintf(
1318
-					__( 'Your subscription (<a href="%1$s" target="_blank">#%2$d</a>) will %3$s in %4$s.', 'give' ),
1319
-					urldecode( $subscriptions[ $is_in_subscription ]['invoice_url'] ),
1320
-					$subscriptions[ $is_in_subscription ]['payment_id'],
1318
+					__('Your subscription (<a href="%1$s" target="_blank">#%2$d</a>) will %3$s in %4$s.', 'give'),
1319
+					urldecode($subscriptions[$is_in_subscription]['invoice_url']),
1320
+					$subscriptions[$is_in_subscription]['payment_id'],
1321 1321
 					$subscription_status,
1322
-					human_time_diff( current_time( 'timestamp', 1 ), strtotime( $subscriptions[ $is_in_subscription ]['expires'] ) )
1322
+					human_time_diff(current_time('timestamp', 1), strtotime($subscriptions[$is_in_subscription]['expires']))
1323 1323
 				);
1324 1324
 				$license_status = 'license-expires-soon';
1325 1325
 			} else {
1326 1326
 				$messages[]     = sprintf(
1327
-					__( 'Your subscription (<a href="%1$s" target="_blank">#%2$d</a>) will %3$s on %4$s.', 'give' ),
1328
-					urldecode( $subscriptions[ $is_in_subscription ]['invoice_url'] ),
1329
-					$subscriptions[ $is_in_subscription ]['payment_id'],
1327
+					__('Your subscription (<a href="%1$s" target="_blank">#%2$d</a>) will %3$s on %4$s.', 'give'),
1328
+					urldecode($subscriptions[$is_in_subscription]['invoice_url']),
1329
+					$subscriptions[$is_in_subscription]['payment_id'],
1330 1330
 					$subscription_status,
1331
-					date_i18n( get_option( 'date_format' ), strtotime( $subscriptions[ $is_in_subscription ]['expires'], current_time( 'timestamp' ) ) )
1331
+					date_i18n(get_option('date_format'), strtotime($subscriptions[$is_in_subscription]['expires'], current_time('timestamp')))
1332 1332
 				);
1333 1333
 				$license_status = 'license-expiration-date';
1334 1334
 			}
1335 1335
 
1336
-		} elseif ( empty( $license->success ) ) {
1336
+		} elseif (empty($license->success)) {
1337 1337
 			$class          = 'invalid';
1338 1338
 			$messages[]     = sprintf(
1339
-				__( 'Your %1$s is not active for this URL. Please <a href="%2$s" target="_blank" title="Visit account page">visit your account page</a> to manage your license key URLs.', 'give' ),
1339
+				__('Your %1$s is not active for this URL. Please <a href="%2$s" target="_blank" title="Visit account page">visit your account page</a> to manage your license key URLs.', 'give'),
1340 1340
 				$addon_name,
1341
-				$account_page_link . '?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'
1341
+				$account_page_link.'?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'
1342 1342
 			);
1343
-			$license_status = 'license-' . $class;
1343
+			$license_status = 'license-'.$class;
1344 1344
 
1345 1345
 		} else {
1346
-			switch ( $license->license ) {
1346
+			switch ($license->license) {
1347 1347
 				case 'valid' :
1348 1348
 				default:
1349 1349
 					$class      = 'valid';
1350
-					$now        = current_time( 'timestamp' );
1351
-					$expiration = strtotime( $license->expires, current_time( 'timestamp' ) );
1350
+					$now        = current_time('timestamp');
1351
+					$expiration = strtotime($license->expires, current_time('timestamp'));
1352 1352
 
1353
-					if ( 'lifetime' === $license->expires ) {
1354
-						$messages[]     = __( 'License key never expires.', 'give' );
1353
+					if ('lifetime' === $license->expires) {
1354
+						$messages[]     = __('License key never expires.', 'give');
1355 1355
 						$license_status = 'license-lifetime-notice';
1356
-					} elseif ( $expiration > $now && $expiration - $now < ( DAY_IN_SECONDS * 30 ) ) {
1356
+					} elseif ($expiration > $now && $expiration - $now < (DAY_IN_SECONDS * 30)) {
1357 1357
 						$messages[]     = sprintf(
1358
-							__( 'Your license key expires soon! It expires on %1$s. <a href="%2$s" target="_blank" title="Renew license">Renew your license key</a>.', 'give' ),
1359
-							date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ),
1360
-							$checkout_page_link . '?edd_license_key=' . $license_key . '&utm_campaign=admin&utm_source=licenses&utm_medium=renew'
1358
+							__('Your license key expires soon! It expires on %1$s. <a href="%2$s" target="_blank" title="Renew license">Renew your license key</a>.', 'give'),
1359
+							date_i18n(get_option('date_format'), strtotime($license->expires, current_time('timestamp'))),
1360
+							$checkout_page_link.'?edd_license_key='.$license_key.'&utm_campaign=admin&utm_source=licenses&utm_medium=renew'
1361 1361
 						);
1362 1362
 						$license_status = 'license-expires-soon';
1363 1363
 					} else {
1364 1364
 						$messages[]     = sprintf(
1365
-							__( 'Your license key expires on %s.', 'give' ),
1366
-							date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) )
1365
+							__('Your license key expires on %s.', 'give'),
1366
+							date_i18n(get_option('date_format'), strtotime($license->expires, current_time('timestamp')))
1367 1367
 						);
1368 1368
 						$license_status = 'license-expiration-date';
1369 1369
 					}
@@ -1371,15 +1371,15 @@  discard block
 block discarded – undo
1371 1371
 			}
1372 1372
 		}
1373 1373
 	} else {
1374
-		$messages[]     = sprintf(
1375
-			__( 'To receive updates, please enter your valid %s license key.', 'give' ),
1374
+		$messages[] = sprintf(
1375
+			__('To receive updates, please enter your valid %s license key.', 'give'),
1376 1376
 			$addon_name
1377 1377
 		);
1378 1378
 		$license_status = 'inactive';
1379 1379
 	}
1380 1380
 
1381 1381
 	// Add class for input field if license is active.
1382
-	if ( $is_valid_license ) {
1382
+	if ($is_valid_license) {
1383 1383
 		$field_classes .= ' give-license-active';
1384 1384
 	}
1385 1385
 
@@ -1387,33 +1387,33 @@  discard block
 block discarded – undo
1387 1387
 	$input_field_html = "<input type=\"{$type}\" name=\"{$id}\" class=\"{$field_classes}\" value=\"{$license_key}\">";
1388 1388
 
1389 1389
 	// If license is active so show deactivate button.
1390
-	if ( $is_valid_license ) {
1390
+	if ($is_valid_license) {
1391 1391
 		// Get input field html.
1392 1392
 		$input_field_html = "<input type=\"{$type}\" name=\"{$id}\" class=\"{$field_classes}\" value=\"{$license_key}\" readonly=\"readonly\">";
1393 1393
 
1394
-		$custom_html = '<input type="submit" class="button button-small give-license-deactivate" name="' . $id . '_deactivate" value="' . esc_attr__( 'Deactivate License', 'give' ) . '"/>';
1394
+		$custom_html = '<input type="submit" class="button button-small give-license-deactivate" name="'.$id.'_deactivate" value="'.esc_attr__('Deactivate License', 'give').'"/>';
1395 1395
 
1396 1396
 	}
1397 1397
 
1398 1398
 	// Field description.
1399
-	$custom_html .= '<label for="give_settings[' . $id . ']"> ' . $field_description . '</label>';
1399
+	$custom_html .= '<label for="give_settings['.$id.']"> '.$field_description.'</label>';
1400 1400
 
1401 1401
 	// If no messages found then inform user that to get updated in future register yourself.
1402
-	if ( empty( $messages ) ) {
1403
-		$messages[] = apply_filters( "{$shortname}_default_addon_notice", __( 'To receive updates, please enter your valid license key.', 'give' ) );
1402
+	if (empty($messages)) {
1403
+		$messages[] = apply_filters("{$shortname}_default_addon_notice", __('To receive updates, please enter your valid license key.', 'give'));
1404 1404
 	}
1405 1405
 
1406
-	foreach ( $messages as $message ) {
1407
-		$custom_html .= '<div class="give-license-status-notice give-' . $license_status . '">';
1408
-		$custom_html .= '<p>' . $message . '</p>';
1406
+	foreach ($messages as $message) {
1407
+		$custom_html .= '<div class="give-license-status-notice give-'.$license_status.'">';
1408
+		$custom_html .= '<p>'.$message.'</p>';
1409 1409
 		$custom_html .= '</div>';
1410 1410
 	}
1411 1411
 
1412 1412
 	// Field html.
1413
-	$custom_html = apply_filters( 'give_license_key_field_html', $input_field_html . $custom_html, $field_type_object );
1413
+	$custom_html = apply_filters('give_license_key_field_html', $input_field_html.$custom_html, $field_type_object);
1414 1414
 
1415 1415
 	// Nonce.
1416
-	wp_nonce_field( $id . '-nonce', $id . '-nonce' );
1416
+	wp_nonce_field($id.'-nonce', $id.'-nonce');
1417 1417
 
1418 1418
 	// Print field html.
1419 1419
 	echo "<div class=\"give-license-key\"><label for=\"{$id}\">{$addon_name }</label></div><div class=\"give-license-block\">{$custom_html}</div>";
@@ -1428,7 +1428,7 @@  discard block
 block discarded – undo
1428 1428
  */
1429 1429
 function give_api_callback() {
1430 1430
 
1431
-	if ( ! current_user_can( 'manage_give_settings' ) ) {
1431
+	if ( ! current_user_can('manage_give_settings')) {
1432 1432
 		return;
1433 1433
 	}
1434 1434
 
@@ -1437,9 +1437,9 @@  discard block
 block discarded – undo
1437 1437
 	 *
1438 1438
 	 * @since 1.0
1439 1439
 	 */
1440
-	do_action( 'give_tools_api_keys_before' );
1440
+	do_action('give_tools_api_keys_before');
1441 1441
 
1442
-	require_once GIVE_PLUGIN_DIR . 'includes/admin/class-api-keys-table.php';
1442
+	require_once GIVE_PLUGIN_DIR.'includes/admin/class-api-keys-table.php';
1443 1443
 
1444 1444
 	$api_keys_table = new Give_API_Keys_Table();
1445 1445
 	$api_keys_table->prepare_items();
@@ -1448,9 +1448,9 @@  discard block
 block discarded – undo
1448 1448
 	<span class="cmb2-metabox-description api-description">
1449 1449
 		<?php echo sprintf(
1450 1450
 		/* translators: 1: http://docs.givewp.com/api 2: http://docs.givewp.com/addon-zapier */
1451
-			__( 'You can create API keys for individual users within their profile edit screen. API keys allow users to use the <a href="%1$s" target="_blank">Give REST API</a> to retrieve donation data in JSON or XML for external applications or devices, such as <a href="%2$s" target="_blank">Zapier</a>.', 'give' ),
1452
-			esc_url( 'http://docs.givewp.com/api' ),
1453
-			esc_url( 'http://docs.givewp.com/addon-zapier' )
1451
+			__('You can create API keys for individual users within their profile edit screen. API keys allow users to use the <a href="%1$s" target="_blank">Give REST API</a> to retrieve donation data in JSON or XML for external applications or devices, such as <a href="%2$s" target="_blank">Zapier</a>.', 'give'),
1452
+			esc_url('http://docs.givewp.com/api'),
1453
+			esc_url('http://docs.givewp.com/addon-zapier')
1454 1454
 		); ?>
1455 1455
 	</span>
1456 1456
 	<?php
@@ -1460,10 +1460,10 @@  discard block
 block discarded – undo
1460 1460
 	 *
1461 1461
 	 * @since 1.0
1462 1462
 	 */
1463
-	do_action( 'give_tools_api_keys_after' );
1463
+	do_action('give_tools_api_keys_after');
1464 1464
 }
1465 1465
 
1466
-add_action( 'give_settings_tab_api_keys', 'give_api_callback' );
1466
+add_action('give_settings_tab_api_keys', 'give_api_callback');
1467 1467
 
1468 1468
 /**
1469 1469
  * Hook Callback
@@ -1476,7 +1476,7 @@  discard block
 block discarded – undo
1476 1476
  *
1477 1477
  * @return void
1478 1478
  */
1479
-function give_hook_callback( $args ) {
1479
+function give_hook_callback($args) {
1480 1480
 
1481 1481
 	$id = $args['id'];
1482 1482
 
@@ -1485,7 +1485,7 @@  discard block
 block discarded – undo
1485 1485
 	 *
1486 1486
 	 * @since 1.0
1487 1487
 	 */
1488
-	do_action( "give_{$id}" );
1488
+	do_action("give_{$id}");
1489 1489
 
1490 1490
 }
1491 1491
 
@@ -1500,19 +1500,19 @@  discard block
 block discarded – undo
1500 1500
  *
1501 1501
  * @return bool
1502 1502
  */
1503
-function give_is_setting_enabled( $value, $compare_with = null ) {
1504
-	if ( ! is_null( $compare_with ) ) {
1503
+function give_is_setting_enabled($value, $compare_with = null) {
1504
+	if ( ! is_null($compare_with)) {
1505 1505
 
1506
-		if ( is_array( $compare_with ) ) {
1506
+		if (is_array($compare_with)) {
1507 1507
 			// Output.
1508
-			return in_array( $value, $compare_with );
1508
+			return in_array($value, $compare_with);
1509 1509
 		}
1510 1510
 
1511 1511
 		// Output.
1512
-		return ( $value === $compare_with );
1512
+		return ($value === $compare_with);
1513 1513
 	}
1514 1514
 
1515 1515
 	// Backward compatibility: From version 1.8 most of setting is modified to enabled/disabled
1516 1516
 	// Output.
1517
-	return ( in_array( $value, array( 'enabled', 'on', 'yes' ) ) ? true : false );
1517
+	return (in_array($value, array('enabled', 'on', 'yes')) ? true : false);
1518 1518
 }
1519 1519
\ No newline at end of file
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	 *
73 73
 	 * @param $url
74 74
 	 *
75
-	 * @return mixed
75
+	 * @return string
76 76
 	 */
77 77
 	public function give_update_cmb_meta_box_url( $url ) {
78 78
 		// Path to Give's CMB
@@ -974,7 +974,7 @@  discard block
 block discarded – undo
974 974
  * @since 1.0
975 975
  *
976 976
  * @param array $field_arr
977
- * @param array $saved_values
977
+ * @param string|boolean $saved_values
978 978
  *
979 979
  * @return void
980 980
  */
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
  * @since  1.0
1010 1010
  *
1011 1011
  * @param  array $field_arr
1012
- * @param  array $saved_value
1012
+ * @param  string|boolean $saved_value
1013 1013
  *
1014 1014
  * @return void
1015 1015
  */
@@ -1163,7 +1163,7 @@  discard block
 block discarded – undo
1163 1163
  * @params $string text
1164 1164
  * @params $filter array
1165 1165
  *
1166
- * @return text $string
1166
+ * @return string $string
1167 1167
  */
1168 1168
 function give_slug_to_title( $string, $filters = array() ) {
1169 1169
 
Please login to merge, or discard this patch.
includes/admin/admin-filters.php 1 patch
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 // Exit if accessed directly.
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -27,30 +27,30 @@  discard block
 block discarded – undo
27 27
  *
28 28
  * @return  mixed
29 29
  */
30
-function __give_sanitize_number_decimals_setting_field( $value ) {
30
+function __give_sanitize_number_decimals_setting_field($value) {
31 31
 	$value_changed = false;
32 32
 	$old_value     = $value;
33 33
 
34
-	if ( isset( $_POST['decimal_separator'] ) ) {
35
-		$value         = ! empty( $_POST['decimal_separator'] ) ? $value : 0;
34
+	if (isset($_POST['decimal_separator'])) {
35
+		$value         = ! empty($_POST['decimal_separator']) ? $value : 0;
36 36
 		$value_changed = true;
37 37
 	}
38 38
 
39
-	if ( $value_changed && ( $old_value != $value ) ) {
40
-		Give_Admin_Settings::add_error( 'give-number-decimal', __( 'The \'Number of Decimals\' option has been automatically set to zero because the \'Decimal Separator\' is not set.', 'give' ) );
39
+	if ($value_changed && ($old_value != $value)) {
40
+		Give_Admin_Settings::add_error('give-number-decimal', __('The \'Number of Decimals\' option has been automatically set to zero because the \'Decimal Separator\' is not set.', 'give'));
41 41
 	}
42 42
 
43
-	$value = absint( $value );
43
+	$value = absint($value);
44 44
 
45
-	if( 6 <= $value ) {
45
+	if (6 <= $value) {
46 46
 		$value = 5;
47
-		Give_Admin_Settings::add_error( 'give-number-decimal', __( 'The \'Number of Decimals\' option has been automatically set to 5 because you entered a number higher than the maximum allowed.', 'give' ) );
47
+		Give_Admin_Settings::add_error('give-number-decimal', __('The \'Number of Decimals\' option has been automatically set to 5 because you entered a number higher than the maximum allowed.', 'give'));
48 48
 	}
49 49
 
50
-	return absint( $value );
50
+	return absint($value);
51 51
 }
52 52
 
53
-add_filter( 'give_admin_settings_sanitize_option_number_decimals', '__give_sanitize_number_decimals_setting_field', 10 );
53
+add_filter('give_admin_settings_sanitize_option_number_decimals', '__give_sanitize_number_decimals_setting_field', 10);
54 54
 
55 55
 
56 56
 /**
@@ -66,20 +66,20 @@  discard block
 block discarded – undo
66 66
  *
67 67
  * @return  mixed
68 68
  */
69
-function __give_validate_decimal_separator_setting_field( $value ) {
70
-	$thousand_separator = give_clean( $_POST['thousands_separator'] );
71
-	$decimal_separator  = give_clean( $_POST['decimal_separator'] );
69
+function __give_validate_decimal_separator_setting_field($value) {
70
+	$thousand_separator = give_clean($_POST['thousands_separator']);
71
+	$decimal_separator  = give_clean($_POST['decimal_separator']);
72 72
 
73
-	if ( $decimal_separator === $thousand_separator ) {
73
+	if ($decimal_separator === $thousand_separator) {
74 74
 		$value                    = '';
75 75
 		$_POST['number_decimals'] = 0;
76
-		Give_Admin_Settings::add_error( 'give-decimal-separator', __( 'The \'Decimal Separator\' option has automatically been set to empty because it can not be equal to the \'Thousand Separator\'', 'give' ) );
76
+		Give_Admin_Settings::add_error('give-decimal-separator', __('The \'Decimal Separator\' option has automatically been set to empty because it can not be equal to the \'Thousand Separator\'', 'give'));
77 77
 	}
78 78
 
79 79
 	return $value;
80 80
 }
81 81
 
82
-add_filter( 'give_admin_settings_sanitize_option_decimal_separator', '__give_validate_decimal_separator_setting_field', 10 );
82
+add_filter('give_admin_settings_sanitize_option_decimal_separator', '__give_validate_decimal_separator_setting_field', 10);
83 83
 
84 84
 /**
85 85
  * Change $delimiter text to symbol.
@@ -90,16 +90,16 @@  discard block
 block discarded – undo
90 90
  *
91 91
  * @return string $delimiter.
92 92
  */
93
-function __give_import_delimiter_set_callback( $delimiter ) {
93
+function __give_import_delimiter_set_callback($delimiter) {
94 94
 	$delimite_type = array(
95 95
 		'csv'                  => ",",
96 96
 		'tab-separated-values' => "\t",
97 97
 	);
98 98
 
99
-	return ( array_key_exists( $delimiter, $delimite_type ) ? $delimite_type[ $delimiter ] : "," );
99
+	return (array_key_exists($delimiter, $delimite_type) ? $delimite_type[$delimiter] : ",");
100 100
 }
101 101
 
102
-add_filter( 'give_import_delimiter_set', '__give_import_delimiter_set_callback', 10 );
102
+add_filter('give_import_delimiter_set', '__give_import_delimiter_set_callback', 10);
103 103
 
104 104
 /**
105 105
  * Give unset the page id from the core setting data from the json files.
@@ -111,17 +111,17 @@  discard block
 block discarded – undo
111 111
  *
112 112
  * @return array $json_to_array
113 113
  */
114
-function give_import_core_settings_merge_pages( $json_to_array, $type ) {
115
-	if ( 'merge' === $type ) {
116
-		unset( $json_to_array['success_page'] );
117
-		unset( $json_to_array['failure_page'] );
118
-		unset( $json_to_array['history_page'] );
114
+function give_import_core_settings_merge_pages($json_to_array, $type) {
115
+	if ('merge' === $type) {
116
+		unset($json_to_array['success_page']);
117
+		unset($json_to_array['failure_page']);
118
+		unset($json_to_array['history_page']);
119 119
 	}
120 120
 
121 121
 	return $json_to_array;
122 122
 }
123 123
 
124
-add_filter( 'give_import_core_settings_data', 'give_import_core_settings_merge_pages', 11, 2 );
124
+add_filter('give_import_core_settings_data', 'give_import_core_settings_merge_pages', 11, 2);
125 125
 
126 126
 /**
127 127
  * Give check the image size from the core setting data from the json files.
@@ -133,14 +133,14 @@  discard block
 block discarded – undo
133 133
  *
134 134
  * @return array $json_to_array
135 135
  */
136
-function give_import_core_settings_merge_image_size( $json_to_array, $type ) {
137
-	if ( 'merge' === $type ) {
136
+function give_import_core_settings_merge_image_size($json_to_array, $type) {
137
+	if ('merge' === $type) {
138 138
 		// Featured image sizes import under Display Options > Post Types > Featured Image Size.
139
-		if ( 'enabled' === $json_to_array['form_featured_img'] ) {
139
+		if ('enabled' === $json_to_array['form_featured_img']) {
140 140
 			$images_sizes = get_intermediate_image_sizes();
141 141
 
142
-			if ( ! in_array( $json_to_array['featured_image_size'], $images_sizes ) ) {
143
-				unset( $json_to_array['featured_image_size'] );
142
+			if ( ! in_array($json_to_array['featured_image_size'], $images_sizes)) {
143
+				unset($json_to_array['featured_image_size']);
144 144
 			}
145 145
 		}
146 146
 	}
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	return $json_to_array;
149 149
 }
150 150
 
151
-add_filter( 'give_import_core_settings_data', 'give_import_core_settings_merge_image_size', 12, 2 );
151
+add_filter('give_import_core_settings_data', 'give_import_core_settings_merge_image_size', 12, 2);
152 152
 
153 153
 /**
154 154
  * Give upload the image logo from the core setting data from the json files.
@@ -160,24 +160,24 @@  discard block
 block discarded – undo
160 160
  *
161 161
  * @return array $json_to_array
162 162
  */
163
-function give_import_core_settings_merge_upload_image( $json_to_array, $type ) {
164
-	if ( 'merge' === $type ) {
163
+function give_import_core_settings_merge_upload_image($json_to_array, $type) {
164
+	if ('merge' === $type) {
165 165
 		// Emails > Email Settings > Logo.
166
-		if ( ! empty( $json_to_array['email_logo'] ) ) {
166
+		if ( ! empty($json_to_array['email_logo'])) {
167 167
 
168 168
 			// Need to require these files.
169
-			if ( ! function_exists( 'media_handle_upload' ) ) {
170
-				require_once( ABSPATH . 'wp-admin/includes/image.php' );
171
-				require_once( ABSPATH . 'wp-admin/includes/file.php' );
172
-				require_once( ABSPATH . 'wp-admin/includes/media.php' );
169
+			if ( ! function_exists('media_handle_upload')) {
170
+				require_once(ABSPATH.'wp-admin/includes/image.php');
171
+				require_once(ABSPATH.'wp-admin/includes/file.php');
172
+				require_once(ABSPATH.'wp-admin/includes/media.php');
173 173
 			}
174 174
 
175 175
 			$url     = $json_to_array['email_logo'];
176
-			$new_url = media_sideload_image( $url, 0, null, 'src' );
177
-			if ( ! is_wp_error( $new_url ) ) {
176
+			$new_url = media_sideload_image($url, 0, null, 'src');
177
+			if ( ! is_wp_error($new_url)) {
178 178
 				$json_to_array['email_logo'] = $new_url;
179 179
 			} else {
180
-				unset( $json_to_array['email_logo'] );
180
+				unset($json_to_array['email_logo']);
181 181
 			}
182 182
 		}
183 183
 	}
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 	return $json_to_array;
186 186
 }
187 187
 
188
-add_filter( 'give_import_core_settings_data', 'give_import_core_settings_merge_upload_image', 13, 2 );
188
+add_filter('give_import_core_settings_data', 'give_import_core_settings_merge_upload_image', 13, 2);
189 189
 
190 190
 /**
191 191
  * Give unset the license key from the core setting data from the json files.
@@ -197,12 +197,12 @@  discard block
 block discarded – undo
197 197
  *
198 198
  * @return array $json_to_array
199 199
  */
200
-function give_import_core_settings_merge_license_key( $json_to_array, $type ) {
201
-	if ( 'merge' === $type ) {
202
-		foreach ( $json_to_array as $key => $value ) {
203
-			$is_license_key = strpos( '_license_key', $key );
204
-			if ( ! empty( $is_license_key ) ) {
205
-				unset( $json_to_array[ $key ] );
200
+function give_import_core_settings_merge_license_key($json_to_array, $type) {
201
+	if ('merge' === $type) {
202
+		foreach ($json_to_array as $key => $value) {
203
+			$is_license_key = strpos('_license_key', $key);
204
+			if ( ! empty($is_license_key)) {
205
+				unset($json_to_array[$key]);
206 206
 			}
207 207
 		}
208 208
 	}
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 	return $json_to_array;
211 211
 }
212 212
 
213
-add_filter( 'give_import_core_settings_data', 'give_import_core_settings_merge_license_key', 14, 2 );
213
+add_filter('give_import_core_settings_data', 'give_import_core_settings_merge_license_key', 14, 2);
214 214
 
215 215
 /**
216 216
  * Give merge the json data and setting data.
@@ -223,16 +223,16 @@  discard block
 block discarded – undo
223 223
  *
224 224
  * @return array $json_to_array
225 225
  */
226
-function give_import_core_settings_merge_data( $json_to_array, $type, $host_give_options ) {
227
-	if ( 'merge' === $type ) {
228
-		$json_to_array_merge = array_merge( $host_give_options, $json_to_array );
226
+function give_import_core_settings_merge_data($json_to_array, $type, $host_give_options) {
227
+	if ('merge' === $type) {
228
+		$json_to_array_merge = array_merge($host_give_options, $json_to_array);
229 229
 		$json_to_array       = $json_to_array_merge;
230 230
 	}
231 231
 
232 232
 	return $json_to_array;
233 233
 }
234 234
 
235
-add_filter( 'give_import_core_settings_data', 'give_import_core_settings_merge_data', 1000, 3 );
235
+add_filter('give_import_core_settings_data', 'give_import_core_settings_merge_data', 1000, 3);
236 236
 
237 237
 /**
238 238
  * Backward Compatibility - Cleanup User Roles.
@@ -243,11 +243,11 @@  discard block
 block discarded – undo
243 243
  *
244 244
  * @return mixed
245 245
  */
246
-function give_bc_1817_cleanup_user_roles( $caps ){
246
+function give_bc_1817_cleanup_user_roles($caps) {
247 247
 
248 248
 	if (
249
-		! give_has_upgrade_completed( 'v1817_cleanup_user_roles' ) &&
250
-		! isset( $caps['view_give_payments'] )
249
+		! give_has_upgrade_completed('v1817_cleanup_user_roles') &&
250
+		! isset($caps['view_give_payments'])
251 251
 	) {
252 252
 		give_v1817_process_cleanup_user_roles();
253 253
 	}
@@ -255,4 +255,4 @@  discard block
 block discarded – undo
255 255
 	return $caps;
256 256
 }
257 257
 
258
-add_filter( 'user_has_cap', 'give_bc_1817_cleanup_user_roles' );
259 258
\ No newline at end of file
259
+add_filter('user_has_cap', 'give_bc_1817_cleanup_user_roles');
260 260
\ No newline at end of file
Please login to merge, or discard this patch.
includes/admin/tools/class-settings-export.php 1 patch
Spacing   +11 added lines, -11 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_Export' ) ) :
16
+if ( ! class_exists('Give_Settings_Export')) :
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_Export.
@@ -34,16 +34,16 @@  discard block
 block discarded – undo
34 34
 		 */
35 35
 		public function __construct() {
36 36
 			$this->id    = 'export';
37
-			$this->label = __( 'Export', 'give' );
37
+			$this->label = __('Export', 'give');
38 38
 
39 39
 			parent::__construct();
40 40
 
41
-			add_action( 'give_admin_field_tools_export', array( $this, 'render_export_field' ), 10, 2 );
41
+			add_action('give_admin_field_tools_export', array($this, 'render_export_field'), 10, 2);
42 42
 
43 43
 			// Do not use main donor for this tab.
44
-			if( give_get_current_setting_tab() === $this->id ) {
45
-				add_action( 'give-tools_open_form', '__return_empty_string' );
46
-				add_action( 'give-tools_close_form', '__return_empty_string' );
44
+			if (give_get_current_setting_tab() === $this->id) {
45
+				add_action('give-tools_open_form', '__return_empty_string');
46
+				add_action('give-tools_close_form', '__return_empty_string');
47 47
 			}
48 48
 		}
49 49
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 			 * @param  array $settings
62 62
 			 */
63 63
 			$settings = apply_filters(
64
-				'give_get_settings_' . $this->id,
64
+				'give_get_settings_'.$this->id,
65 65
 				array(
66 66
 					array(
67 67
 						'id'   => 'give_tools_export',
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 					),
71 71
 					array(
72 72
 						'id'   => 'export',
73
-						'name' => __( 'Export', 'give' ),
73
+						'name' => __('Export', 'give'),
74 74
 						'type' => 'tools_export',
75 75
 					),
76 76
 					array(
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
 		 * @param $field
95 95
 		 * @param $option_value
96 96
 		 */
97
-		public function render_export_field( $field, $option_value ) {
98
-			include_once( 'views/html-admin-page-exports.php' );
97
+		public function render_export_field($field, $option_value) {
98
+			include_once('views/html-admin-page-exports.php');
99 99
 		}
100 100
 	}
101 101
 
Please login to merge, or discard this patch.
includes/admin/tools/export/export-actions.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  * @license     https://opensource.org/licenses/gpl-license GNU Public License
11 11
  */
12 12
 
13
-if ( ! defined( 'ABSPATH' ) ) {
13
+if ( ! defined('ABSPATH')) {
14 14
 	exit;
15 15
 }
16 16
 
@@ -22,13 +22,13 @@  discard block
 block discarded – undo
22 22
  */
23 23
 function give_process_batch_export_form() {
24 24
 
25
-	if ( ! wp_verify_nonce( $_REQUEST['nonce'], 'give-batch-export' ) ) {
26
-		wp_die( esc_html__( 'Nonce verification failed.', 'give' ), esc_html__( 'Error', 'give' ), array(
25
+	if ( ! wp_verify_nonce($_REQUEST['nonce'], 'give-batch-export')) {
26
+		wp_die(esc_html__('Nonce verification failed.', 'give'), esc_html__('Error', 'give'), array(
27 27
 			'response' => 403,
28
-		) );
28
+		));
29 29
 	}
30 30
 
31
-	require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/class-batch-export.php';
31
+	require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/class-batch-export.php';
32 32
 
33 33
 	/**
34 34
 	 * Fires before batch export.
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
 	 *
38 38
 	 * @param string $class Export class.
39 39
 	 */
40
-	do_action( 'give_batch_export_class_include', $_REQUEST['class'] );
40
+	do_action('give_batch_export_class_include', $_REQUEST['class']);
41 41
 
42 42
 	$export = new $_REQUEST['class'];
43 43
 	$export->export();
44 44
 
45 45
 }
46 46
 
47
-add_action( 'give_form_batch_export', 'give_process_batch_export_form' );
47
+add_action('give_form_batch_export', 'give_process_batch_export_form');
48 48
 
49 49
 /**
50 50
  * Exports earnings for a specified time period.
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
  * @return void
56 56
  */
57 57
 function give_export_earnings() {
58
-	require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/class-export-earnings.php';
58
+	require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/class-export-earnings.php';
59 59
 
60 60
 	$earnings_export = new Give_Earnings_Export();
61 61
 
62 62
 	$earnings_export->export();
63 63
 }
64 64
 
65
-add_action( 'give_earnings_export', 'give_export_earnings' );
65
+add_action('give_earnings_export', 'give_export_earnings');
66 66
 
67 67
 /**
68 68
  * Exports Give's core settings.
@@ -73,14 +73,14 @@  discard block
 block discarded – undo
73 73
  * @return void
74 74
  */
75 75
 function give_core_settings_export() {
76
-	require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/class-core-settings-export.php';
76
+	require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/class-core-settings-export.php';
77 77
 
78 78
 	$core_settings = new Give_Core_Settings_Export();
79 79
 
80 80
 	$core_settings->export();
81 81
 }
82 82
 
83
-add_action( 'give_core_settings_export', 'give_core_settings_export' );
83
+add_action('give_core_settings_export', 'give_core_settings_export');
84 84
 
85 85
 
86 86
 /**
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
  * @return void
91 91
  */
92 92
 function give_register_batch_exporters() {
93
-	if ( is_admin() ) {
93
+	if (is_admin()) {
94 94
 		/**
95 95
 		 * Fires in the admin, while plugins loaded.
96 96
 		 *
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
 		 *
101 101
 		 * @param string $class Export class.
102 102
 		 */
103
-		do_action( 'give_register_batch_exporter' );
103
+		do_action('give_register_batch_exporter');
104 104
 	}
105 105
 }
106 106
 
107
-add_action( 'plugins_loaded', 'give_register_batch_exporters' );
107
+add_action('plugins_loaded', 'give_register_batch_exporters');
108 108
 
109 109
 /**
110 110
  * Register the payments batch exporter
@@ -112,10 +112,10 @@  discard block
 block discarded – undo
112 112
  * @since  1.5
113 113
  */
114 114
 function give_register_payments_batch_export() {
115
-	add_action( 'give_batch_export_class_include', 'give_include_payments_batch_processor', 10, 1 );
115
+	add_action('give_batch_export_class_include', 'give_include_payments_batch_processor', 10, 1);
116 116
 }
117 117
 
118
-add_action( 'give_register_batch_exporter', 'give_register_payments_batch_export', 10 );
118
+add_action('give_register_batch_exporter', 'give_register_payments_batch_export', 10);
119 119
 
120 120
 /**
121 121
  * Loads the payments batch process if needed
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
  *
127 127
  * @return void
128 128
  */
129
-function give_include_payments_batch_processor( $class ) {
129
+function give_include_payments_batch_processor($class) {
130 130
 
131
-	if ( 'Give_Batch_Payments_Export' === $class ) {
132
-		require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/class-batch-export-payments.php';
131
+	if ('Give_Batch_Payments_Export' === $class) {
132
+		require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/class-batch-export-payments.php';
133 133
 	}
134 134
 
135 135
 }
@@ -140,10 +140,10 @@  discard block
 block discarded – undo
140 140
  * @since  1.5.2
141 141
  */
142 142
 function give_register_donors_batch_export() {
143
-	add_action( 'give_batch_export_class_include', 'give_include_donors_batch_processor', 10, 1 );
143
+	add_action('give_batch_export_class_include', 'give_include_donors_batch_processor', 10, 1);
144 144
 }
145 145
 
146
-add_action( 'give_register_batch_exporter', 'give_register_donors_batch_export', 10 );
146
+add_action('give_register_batch_exporter', 'give_register_donors_batch_export', 10);
147 147
 
148 148
 /**
149 149
  * Loads the donors batch process if needed.
@@ -154,10 +154,10 @@  discard block
 block discarded – undo
154 154
  *
155 155
  * @return void
156 156
  */
157
-function give_include_donors_batch_processor( $class ) {
157
+function give_include_donors_batch_processor($class) {
158 158
 
159
-	if ( 'Give_Batch_Donors_Export' === $class ) {
160
-		require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/class-batch-export-donors.php';
159
+	if ('Give_Batch_Donors_Export' === $class) {
160
+		require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/class-batch-export-donors.php';
161 161
 	}
162 162
 
163 163
 }
@@ -168,10 +168,10 @@  discard block
 block discarded – undo
168 168
  * @since  1.5
169 169
  */
170 170
 function give_register_forms_batch_export() {
171
-	add_action( 'give_batch_export_class_include', 'give_include_forms_batch_processor', 10, 1 );
171
+	add_action('give_batch_export_class_include', 'give_include_forms_batch_processor', 10, 1);
172 172
 }
173 173
 
174
-add_action( 'give_register_batch_exporter', 'give_register_forms_batch_export', 10 );
174
+add_action('give_register_batch_exporter', 'give_register_forms_batch_export', 10);
175 175
 
176 176
 /**
177 177
  * Loads the file downloads batch process if needed
@@ -182,10 +182,10 @@  discard block
 block discarded – undo
182 182
  *
183 183
  * @return void
184 184
  */
185
-function give_include_forms_batch_processor( $class ) {
185
+function give_include_forms_batch_processor($class) {
186 186
 
187
-	if ( 'Give_Batch_Forms_Export' === $class ) {
188
-		require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/class-batch-export-forms.php';
187
+	if ('Give_Batch_Forms_Export' === $class) {
188
+		require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/class-batch-export-forms.php';
189 189
 	}
190 190
 
191 191
 }
Please login to merge, or discard this patch.
includes/admin/tools/class-settings-api.php 1 patch
Spacing   +6 added lines, -6 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_API' ) ) :
16
+if ( ! class_exists('Give_Settings_API')) :
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_API.
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 		 */
35 35
 		public function __construct() {
36 36
 			$this->id    = 'api';
37
-			$this->label = esc_html__( 'API', 'give' );
37
+			$this->label = esc_html__('API', 'give');
38 38
 
39 39
 			parent::__construct();
40 40
 		}
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 		 */
48 48
 		public function get_settings() {
49 49
 			// Get settings.
50
-			$settings = apply_filters( 'give_settings_api', array(
50
+			$settings = apply_filters('give_settings_api', array(
51 51
 				array(
52 52
 					'id'   => 'give_tools_api',
53 53
 					'type' => 'title',
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 				),
56 56
 				array(
57 57
 					'id'   => 'api',
58
-					'name' => esc_html__( 'API', 'give' ),
58
+					'name' => esc_html__('API', 'give'),
59 59
 					'type' => 'api',
60 60
 				),
61 61
 				array(
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 			 * @since  1.8
72 72
 			 * @param  array $settings
73 73
 			 */
74
-			$settings = apply_filters( 'give_get_settings_' . $this->id, $settings );
74
+			$settings = apply_filters('give_get_settings_'.$this->id, $settings);
75 75
 
76 76
 			// Output.
77 77
 			return $settings;
Please login to merge, or discard this patch.
includes/admin/tools/class-settings-data.php 1 patch
Spacing   +9 added lines, -9 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_Data' ) ) :
16
+if ( ! class_exists('Give_Settings_Data')) :
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_Data.
@@ -35,14 +35,14 @@  discard block
 block discarded – undo
35 35
 		 */
36 36
 		public function __construct() {
37 37
 			$this->id    = 'data';
38
-			$this->label = esc_html__( 'Data', 'give' );
38
+			$this->label = esc_html__('Data', 'give');
39 39
 
40 40
 			parent::__construct();
41 41
 
42 42
 			// Do not use main form for this tab.
43
-			if( give_get_current_setting_tab() === $this->id ) {
44
-				add_action( "give-tools_open_form", '__return_empty_string' );
45
-				add_action( "give-tools_close_form", '__return_empty_string' );
43
+			if (give_get_current_setting_tab() === $this->id) {
44
+				add_action("give-tools_open_form", '__return_empty_string');
45
+				add_action("give-tools_close_form", '__return_empty_string');
46 46
 			}
47 47
 		}
48 48
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		 */
55 55
 		public function get_settings() {
56 56
 			// Get settings.
57
-			$settings = apply_filters( 'give_settings_data', array(
57
+			$settings = apply_filters('give_settings_data', array(
58 58
 				array(
59 59
 					'id'   => 'give_tools_tools',
60 60
 					'type' => 'title',
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 				),
63 63
 				array(
64 64
 					'id'   => 'api',
65
-					'name' => esc_html__( 'Tools', 'give' ),
65
+					'name' => esc_html__('Tools', 'give'),
66 66
 					'type' => 'data',
67 67
 				),
68 68
 				array(
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 			 * @since  1.8
79 79
 			 * @param  array $settings
80 80
 			 */
81
-			$settings = apply_filters( 'give_get_settings_' . $this->id, $settings );
81
+			$settings = apply_filters('give_get_settings_'.$this->id, $settings);
82 82
 
83 83
 			// Output.
84 84
 			return $settings;
Please login to merge, or discard this patch.
includes/admin/tools/class-settings-import.php 1 patch
Spacing   +17 added lines, -17 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_Import' ) ) {
16
+if ( ! class_exists('Give_Settings_Import')) {
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_Import.
@@ -45,23 +45,23 @@  discard block
 block discarded – undo
45 45
 		 */
46 46
 		public function __construct() {
47 47
 			$this->id    = 'import';
48
-			$this->label = __( 'Import', 'give' );
48
+			$this->label = __('Import', 'give');
49 49
 
50 50
 			parent::__construct();
51 51
 
52 52
 			// Will display html of the import donation.
53
-			add_action( 'give_admin_field_tools_import', array(
53
+			add_action('give_admin_field_tools_import', array(
54 54
 				'Give_Settings_Import',
55 55
 				'render_import_field',
56
-			), 10, 2 );
56
+			), 10, 2);
57 57
 
58 58
 			// Do not use main form for this tab.
59
-			if ( give_get_current_setting_tab() === $this->id ) {
60
-				add_action( "give-tools_open_form", '__return_empty_string' );
61
-				add_action( "give-tools_close_form", '__return_empty_string' );
59
+			if (give_get_current_setting_tab() === $this->id) {
60
+				add_action("give-tools_open_form", '__return_empty_string');
61
+				add_action("give-tools_close_form", '__return_empty_string');
62 62
 
63
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/import/class-give-import-donations.php';
64
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/import/class-give-import-core-settings.php';
63
+				require_once GIVE_PLUGIN_DIR.'includes/admin/tools/import/class-give-import-donations.php';
64
+				require_once GIVE_PLUGIN_DIR.'includes/admin/tools/import/class-give-import-core-settings.php';
65 65
 			}
66 66
 		}
67 67
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 			 * @param  array $settings
81 81
 			 */
82 82
 			$settings = apply_filters(
83
-				'give_get_settings_' . $this->id,
83
+				'give_get_settings_'.$this->id,
84 84
 				array(
85 85
 					array(
86 86
 						'id'         => 'give_tools_import',
@@ -89,14 +89,14 @@  discard block
 block discarded – undo
89 89
 					),
90 90
 					array(
91 91
 						'id'   => 'import',
92
-						'name' => __( 'Import', 'give' ),
92
+						'name' => __('Import', 'give'),
93 93
 						'type' => 'tools_import',
94 94
 					),
95 95
 					array(
96
-						'name'  => esc_html__( 'Import Docs Link', 'give' ),
96
+						'name'  => esc_html__('Import Docs Link', 'give'),
97 97
 						'id'    => 'import_docs_link',
98
-						'url'   => esc_url( 'http://docs.givewp.com/tools-importer' ),
99
-						'title' => __( 'Import Tab', 'give' ),
98
+						'url'   => esc_url('http://docs.givewp.com/tools-importer'),
99
+						'title' => __('Import Tab', 'give'),
100 100
 						'type'  => 'give_docs_link',
101 101
 					),
102 102
 					array(
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
 		 * @param $field
121 121
 		 * @param $option_value
122 122
 		 */
123
-		public static function render_import_field( $field, $option_value ) {
124
-			include_once GIVE_PLUGIN_DIR . 'includes/admin/tools/views/html-admin-page-imports.php';
123
+		public static function render_import_field($field, $option_value) {
124
+			include_once GIVE_PLUGIN_DIR.'includes/admin/tools/views/html-admin-page-imports.php';
125 125
 		}
126 126
 	}
127 127
 }
Please login to merge, or discard this patch.
includes/admin/tools/views/html-admin-page-import-donations.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -3,11 +3,11 @@  discard block
 block discarded – undo
3 3
  * Admin View: Import Donations
4 4
  */
5 5
 
6
-if ( ! defined( 'ABSPATH' ) ) {
6
+if ( ! defined('ABSPATH')) {
7 7
 	exit;
8 8
 }
9 9
 
10
-if ( ! current_user_can( 'manage_give_settings' ) ) {
10
+if ( ! current_user_can('manage_give_settings')) {
11 11
 	return;
12 12
 }
13 13
 
@@ -16,11 +16,11 @@  discard block
 block discarded – undo
16 16
  *
17 17
  * @since 1.8.13
18 18
  */
19
-do_action( 'give_tools_import_donations_main_before' );
19
+do_action('give_tools_import_donations_main_before');
20 20
 ?>
21 21
     <div id="poststuff">
22 22
         <div class="postbox">
23
-            <h1 class="give-importer-h1" align="center"><?php esc_html_e( 'Import Donations', 'give' ); ?></h1>
23
+            <h1 class="give-importer-h1" align="center"><?php esc_html_e('Import Donations', 'give'); ?></h1>
24 24
             <div class="inside give-tools-setting-page-import give-import-donations">
25 25
 				<?php
26 26
 				/**
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 				 *
29 29
 				 * @since 1.8.14
30 30
 				 */
31
-				do_action( 'give_tools_import_donations_form_before_start' );
31
+				do_action('give_tools_import_donations_form_before_start');
32 32
 				?>
33 33
                 <form method="post" id="give-import-donations-form" class="give-import-form tools-setting-page-import tools-setting-page-import">
34 34
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 					 *
39 39
 					 * @since 1.8.14
40 40
 					 */
41
-					do_action( 'give_tools_import_donations_form_start' );
41
+					do_action('give_tools_import_donations_form_start');
42 42
 					?>
43 43
 
44 44
 					<?php
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 					 *
48 48
 					 * @since 1.8.14
49 49
 					 */
50
-					do_action( 'give_tools_import_donations_form_end' );
50
+					do_action('give_tools_import_donations_form_end');
51 51
 					?>
52 52
                 </form>
53 53
 				<?php
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 				 *
57 57
 				 * @since 1.8.14
58 58
 				 */
59
-				do_action( 'give_tools_import_donations_form_after_end' );
59
+				do_action('give_tools_import_donations_form_after_end');
60 60
 				?>
61 61
             </div><!-- .inside -->
62 62
         </div><!-- .postbox -->
@@ -67,4 +67,4 @@  discard block
 block discarded – undo
67 67
  *
68 68
  * @since 1.8.13
69 69
  */
70
-do_action( 'give_tools_import_donations_main_after' );
70
+do_action('give_tools_import_donations_main_after');
Please login to merge, or discard this patch.
includes/admin/tools/views/html-admin-page-exports.php 1 patch
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * Admin View: Exports
4 4
  */
5 5
 
6
-if ( ! defined( 'ABSPATH' ) ) {
6
+if ( ! defined('ABSPATH')) {
7 7
 	exit;
8 8
 } ?>
9 9
 
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
18 18
 				 *
19 19
 				 * @since 1.0
20 20
 				 */
21
-				do_action( 'give_tools_tab_export_content_top' );
21
+				do_action('give_tools_tab_export_content_top');
22 22
 				?>
23 23
 
24 24
 				<table class="widefat export-options-table give-table striped">
25 25
 					<thead>
26 26
 						<tr>
27
-							<th scope="col"><?php esc_html_e( 'Export Type', 'give' ); ?></th>
28
-							<th scope="col"><?php esc_html_e( 'Export Options', 'give' ); ?></th>
27
+							<th scope="col"><?php esc_html_e('Export Type', 'give'); ?></th>
28
+							<th scope="col"><?php esc_html_e('Export Options', 'give'); ?></th>
29 29
 						</tr>
30 30
 					</thead>
31 31
 					<tbody>
@@ -38,42 +38,42 @@  discard block
 block discarded – undo
38 38
 						 *
39 39
 						 * @since 1.0
40 40
 						 */
41
-						do_action( 'give_tools_tab_export_table_top' );
41
+						do_action('give_tools_tab_export_table_top');
42 42
 						?>
43 43
 						<tr class="give-export-pdf-sales-earnings">
44 44
 							<td scope="row" class="row-title">
45 45
 								<h3>
46
-									<span><?php esc_html_e( 'Export PDF of Donations and Income', 'give' ); ?></span>
46
+									<span><?php esc_html_e('Export PDF of Donations and Income', 'give'); ?></span>
47 47
 								</h3>
48
-								<p><?php esc_html_e( 'Download a PDF of Donations and Income reports for all forms for the current year.', 'give' ); ?></p>
48
+								<p><?php esc_html_e('Download a PDF of Donations and Income reports for all forms for the current year.', 'give'); ?></p>
49 49
 							</td>
50 50
 							<td>
51
-								<a class="button" href="<?php echo wp_nonce_url( add_query_arg( array( 'give-action' => 'generate_pdf' ) ), 'give_generate_pdf' ); ?>">
52
-									<?php esc_html_e( 'Generate PDF', 'give' ); ?>
51
+								<a class="button" href="<?php echo wp_nonce_url(add_query_arg(array('give-action' => 'generate_pdf')), 'give_generate_pdf'); ?>">
52
+									<?php esc_html_e('Generate PDF', 'give'); ?>
53 53
 								</a>
54 54
 							</td>
55 55
 						</tr>
56 56
 						<tr class="give-export-sales-earnings">
57 57
 							<td scope="row" class="row-title">
58 58
 								<h3>
59
-									<span><?php esc_html_e( 'Export Income and Donation Stats', 'give' ); ?></span>
59
+									<span><?php esc_html_e('Export Income and Donation Stats', 'give'); ?></span>
60 60
 								</h3>
61
-								<p><?php esc_html_e( 'Download a CSV of income and donations over time.', 'give' ); ?></p>
61
+								<p><?php esc_html_e('Download a CSV of income and donations over time.', 'give'); ?></p>
62 62
 							</td>
63 63
 							<td>
64 64
 								<form method="post">
65 65
 									<?php
66 66
 									printf(
67 67
 									/* translators: 1: start date dropdown 2: end date dropdown */
68
-										esc_html__( '%1$s to %2$s', 'give' ),
69
-										Give()->html->year_dropdown( 'start_year' ) . ' ' . Give()->html->month_dropdown( 'start_month' ),
70
-										Give()->html->year_dropdown( 'end_year' ) . ' ' . Give()->html->month_dropdown( 'end_month' )
68
+										esc_html__('%1$s to %2$s', 'give'),
69
+										Give()->html->year_dropdown('start_year').' '.Give()->html->month_dropdown('start_month'),
70
+										Give()->html->year_dropdown('end_year').' '.Give()->html->month_dropdown('end_month')
71 71
 									);
72 72
 									?>
73 73
 									<input type="hidden" name="give-action"
74 74
 										   value="earnings_export"/>
75 75
 									<input type="submit"
76
-										   value="<?php esc_attr_e( 'Generate CSV', 'give' ); ?>"
76
+										   value="<?php esc_attr_e('Generate CSV', 'give'); ?>"
77 77
 										   class="button-secondary"/>
78 78
 								</form>
79 79
 							</td>
@@ -81,37 +81,37 @@  discard block
 block discarded – undo
81 81
 						<tr class="give-export-payment-history">
82 82
 							<td scope="row" class="row-title">
83 83
 								<h3>
84
-									<span><?php esc_html_e( 'Export Donation History', 'give' ); ?></span>
84
+									<span><?php esc_html_e('Export Donation History', 'give'); ?></span>
85 85
 								</h3>
86
-								<p><?php esc_html_e( 'Download a CSV of all donations recorded.', 'give' ); ?></p>
86
+								<p><?php esc_html_e('Download a CSV of all donations recorded.', 'give'); ?></p>
87 87
 							</td>
88 88
 							<td>
89 89
 								<form id="give-export-payments"
90 90
 									  class="give-export-form" method="post">
91 91
 									<?php
92
-									echo Give()->html->date_field( array(
92
+									echo Give()->html->date_field(array(
93 93
 										'id'          => 'give-payment-export-start',
94 94
 										'name'        => 'start',
95
-										'placeholder' => esc_attr__( 'Start date', 'give' ),
96
-									) );
95
+										'placeholder' => esc_attr__('Start date', 'give'),
96
+									));
97 97
 
98
-									echo Give()->html->date_field( array(
98
+									echo Give()->html->date_field(array(
99 99
 										'id'          => 'give-payment-export-end',
100 100
 										'name'        => 'end',
101
-										'placeholder' => esc_attr__( 'End date', 'give' ),
102
-									) );
101
+										'placeholder' => esc_attr__('End date', 'give'),
102
+									));
103 103
 									?>
104 104
 									<select name="status">
105
-										<option value="any"><?php esc_html_e( 'All Statuses', 'give' ); ?></option>
105
+										<option value="any"><?php esc_html_e('All Statuses', 'give'); ?></option>
106 106
 										<?php
107 107
 										$statuses = give_get_payment_statuses();
108
-										foreach ( $statuses as $status => $label ) {
109
-											echo '<option value="' . $status . '">' . $label . '</option>';
108
+										foreach ($statuses as $status => $label) {
109
+											echo '<option value="'.$status.'">'.$label.'</option>';
110 110
 										}
111 111
 										?>
112 112
 									</select>
113 113
 									<?php
114
-									if ( give_is_setting_enabled( give_get_option( 'categories' ) ) ) {
114
+									if (give_is_setting_enabled(give_get_option('categories'))) {
115 115
 										echo Give()->html->category_dropdown(
116 116
 											'give_forms_categories[]',
117 117
 											0,
@@ -121,12 +121,12 @@  discard block
 block discarded – undo
121 121
 												'multiple'        => true,
122 122
 												'selected'        => array(),
123 123
 												'show_option_all' => false,
124
-												'placeholder'     => __( 'Choose one or more from categories', 'give' ),
124
+												'placeholder'     => __('Choose one or more from categories', 'give'),
125 125
 											)
126 126
 										);
127 127
 									}
128 128
 
129
-									if ( give_is_setting_enabled( give_get_option( 'tags' ) ) ) {
129
+									if (give_is_setting_enabled(give_get_option('tags'))) {
130 130
 										echo Give()->html->tags_dropdown(
131 131
 											'give_forms_tags[]',
132 132
 											0,
@@ -136,18 +136,18 @@  discard block
 block discarded – undo
136 136
 												'multiple'        => true,
137 137
 												'selected'        => array(),
138 138
 												'show_option_all' => false,
139
-												'placeholder'     => __( 'Choose one or more from tags', 'give' ),
139
+												'placeholder'     => __('Choose one or more from tags', 'give'),
140 140
 											)
141 141
 										);
142 142
 									}
143 143
 
144
-									wp_nonce_field( 'give_ajax_export', 'give_ajax_export' );
144
+									wp_nonce_field('give_ajax_export', 'give_ajax_export');
145 145
 									?>
146 146
 									<input type="hidden" name="give-export-class"
147 147
 										   value="Give_Batch_Payments_Export"/>
148 148
 									<span>
149 149
 									<input type="submit"
150
-										   value="<?php esc_attr_e( 'Generate CSV', 'give' ); ?>"
150
+										   value="<?php esc_attr_e('Generate CSV', 'give'); ?>"
151 151
 										   class="button-secondary"/>
152 152
 									<span class="spinner"></span>
153 153
 								</span>
@@ -157,9 +157,9 @@  discard block
 block discarded – undo
157 157
 						<tr class="give-export-donors">
158 158
 							<td scope="row" class="row-title">
159 159
 								<h3>
160
-									<span><?php esc_html_e( 'Export Donors in CSV', 'give' ); ?></span>
160
+									<span><?php esc_html_e('Export Donors in CSV', 'give'); ?></span>
161 161
 								</h3>
162
-								<p><?php esc_html_e( 'Download an export of donors for all donation forms or only those who have given to a particular form.', 'give' ); ?></p>
162
+								<p><?php esc_html_e('Download an export of donors for all donation forms or only those who have given to a particular form.', 'give'); ?></p>
163 163
 							</td>
164 164
 							<td>
165 165
 								<form method="post" id="give_donor_export"
@@ -167,93 +167,93 @@  discard block
 block discarded – undo
167 167
 
168 168
 									<?php
169 169
 									// Start Date form field for donors
170
-									echo Give()->html->date_field( array(
170
+									echo Give()->html->date_field(array(
171 171
 										'id'          => 'give_donor_export_start_date',
172 172
 										'name'        => 'donor_export_start_date',
173
-										'placeholder' => esc_attr__( 'Start date', 'give' ),
174
-									) );
173
+										'placeholder' => esc_attr__('Start date', 'give'),
174
+									));
175 175
 
176 176
 									// End Date form field for donors
177
-									echo Give()->html->date_field( array(
177
+									echo Give()->html->date_field(array(
178 178
 										'id'          => 'give_donor_export_end_date',
179 179
 										'name'        => 'donor_export_end_date',
180
-										'placeholder' => esc_attr__( 'End date', 'give' ),
181
-									) );
180
+										'placeholder' => esc_attr__('End date', 'give'),
181
+									));
182 182
 
183 183
 									// Donation forms dropdown for donors export
184
-									echo Give()->html->forms_dropdown( array(
184
+									echo Give()->html->forms_dropdown(array(
185 185
 										'name'   => 'forms',
186 186
 										'id'     => 'give_donor_export_form',
187 187
 										'chosen' => true,
188
-									) );
188
+									));
189 189
 									?>
190
-									<input type="submit" value="<?php esc_attr_e( 'Generate CSV', 'give' ); ?>" class="button-secondary"/>
190
+									<input type="submit" value="<?php esc_attr_e('Generate CSV', 'give'); ?>" class="button-secondary"/>
191 191
 
192 192
 								<div id="export-donor-options-wrap"
193 193
 								     class="give-clearfix">
194
-									<p><?php esc_html_e( 'Export Columns:', 'give' ); ?></p>
194
+									<p><?php esc_html_e('Export Columns:', 'give'); ?></p>
195 195
 									<ul id="give-export-option-ul">
196 196
 										<li>
197 197
 											<label for="give-export-fullname">
198 198
 												<input type="checkbox" checked
199 199
 												       name="give_export_option[full_name]"
200
-												       id="give-export-fullname"><?php esc_html_e( 'Name', 'give' ); ?>
200
+												       id="give-export-fullname"><?php esc_html_e('Name', 'give'); ?>
201 201
 											</label>
202 202
 										</li>
203 203
 										<li>
204 204
 											<label for="give-export-email">
205 205
 												<input type="checkbox" checked
206 206
 												       name="give_export_option[email]"
207
-												       id="give-export-email"><?php esc_html_e( 'Email', 'give' ); ?>
207
+												       id="give-export-email"><?php esc_html_e('Email', 'give'); ?>
208 208
 											</label>
209 209
 										</li>
210 210
 										<li>
211 211
 											<label for="give-export-address">
212 212
 												<input type="checkbox" checked
213 213
 												       name="give_export_option[address]"
214
-												       id="give-export-address"><?php esc_html_e( 'Address', 'give' ); ?>
214
+												       id="give-export-address"><?php esc_html_e('Address', 'give'); ?>
215 215
 											</label>
216 216
 										</li>
217 217
 										<li>
218 218
 											<label for="give-export-userid">
219 219
 												<input type="checkbox" checked
220 220
 												       name="give_export_option[userid]"
221
-												       id="give-export-userid"><?php esc_html_e( 'User ID', 'give' ); ?>
221
+												       id="give-export-userid"><?php esc_html_e('User ID', 'give'); ?>
222 222
 											</label>
223 223
 										</li>
224 224
 										<li>
225 225
 											<label for="give-export-donation-form">
226 226
 												<input type="checkbox" checked
227 227
 												       name="give_export_option[donation_form]"
228
-												       id="give-export-donation-form"><?php esc_html_e( 'Donation Form', 'give' ); ?>
228
+												       id="give-export-donation-form"><?php esc_html_e('Donation Form', 'give'); ?>
229 229
 											</label>
230 230
 										</li>
231 231
 										<li>
232 232
 											<label for="give-export-first-donation-date">
233 233
 												<input type="checkbox" checked
234 234
 												       name="give_export_option[date_first_donated]"
235
-												       id="give-export-first-donation-date"><?php esc_html_e( 'First Donation Date', 'give' ); ?>
235
+												       id="give-export-first-donation-date"><?php esc_html_e('First Donation Date', 'give'); ?>
236 236
 											</label>
237 237
 										</li>
238 238
 										<li>
239 239
 											<label for="give-export-donation-number">
240 240
 												<input type="checkbox" checked
241 241
 												       name="give_export_option[donations]"
242
-												       id="give-export-donation-number"><?php esc_html_e( 'Number of Donations', 'give' ); ?>
242
+												       id="give-export-donation-number"><?php esc_html_e('Number of Donations', 'give'); ?>
243 243
 											</label>
244 244
 										</li>
245 245
 										<li>
246 246
 											<label for="give-export-donation-sum">
247 247
 												<input type="checkbox" checked
248 248
 												       name="give_export_option[donation_sum]"
249
-												       id="give-export-donation-sum"><?php esc_html_e( 'Total Donated', 'give' ); ?>
249
+												       id="give-export-donation-sum"><?php esc_html_e('Total Donated', 'give'); ?>
250 250
 											</label>
251 251
 										</li>
252 252
 									</ul>
253 253
 								</div>
254
-								<?php wp_nonce_field( 'give_ajax_export', 'give_ajax_export' ); ?>
254
+								<?php wp_nonce_field('give_ajax_export', 'give_ajax_export'); ?>
255 255
 								<input type="hidden" name="give-export-class" value="Give_Batch_Donors_Export"/>
256
-								<input type="hidden" name="give_export_option[query_id]" value="<?php echo uniqid( 'give_' ); ?>"/>
256
+								<input type="hidden" name="give_export_option[query_id]" value="<?php echo uniqid('give_'); ?>"/>
257 257
 							</form>
258 258
 						</td>
259 259
 					</tr>
@@ -261,14 +261,14 @@  discard block
 block discarded – undo
261 261
 					<tr class="give-export-core-settings">
262 262
 						<td scope="row" class="row-title">
263 263
 							<h3>
264
-								<span><?php esc_html_e( 'Export Give Settings', 'give' ); ?></span>
264
+								<span><?php esc_html_e('Export Give Settings', 'give'); ?></span>
265 265
 							</h3>
266
-							<p><?php esc_html_e( 'Download an export of Give\'s settings and import it in a new WordPress installation.', 'give' ); ?></p>
266
+							<p><?php esc_html_e('Download an export of Give\'s settings and import it in a new WordPress installation.', 'give'); ?></p>
267 267
 						</td>
268 268
 						<td>
269 269
 							<form method="post">
270 270
 								<input type="hidden" name="give-action" value="core_settings_export"/>
271
-								<input type="submit" value="<?php esc_attr_e( 'Export JSON', 'give' ); ?>" class="button-secondary"/>
271
+								<input type="submit" value="<?php esc_attr_e('Export JSON', 'give'); ?>" class="button-secondary"/>
272 272
 							</form>
273 273
 						</td>
274 274
 					</tr>
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 					 *
282 282
 					 * @since 1.0
283 283
 					 */
284
-					do_action( 'give_tools_tab_export_table_bottom' );
284
+					do_action('give_tools_tab_export_table_bottom');
285 285
 					?>
286 286
 					</tbody>
287 287
 				</table>
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 				 *
293 293
 				 * @since 1.0
294 294
 				 */
295
-				do_action( 'give_tools_tab_export_content_bottom' );
295
+				do_action('give_tools_tab_export_content_bottom');
296 296
 				?>
297 297
 
298 298
 			</div>
Please login to merge, or discard this patch.