Completed
Push — master ( 316c10...cbdcdc )
by Devin
19:15
created
includes/emails/class-give-email-tags.php 2 patches
Spacing   +105 added lines, -105 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
  */
24 24
 
25 25
 // Exit if accessed directly.
26
-if ( ! defined( 'ABSPATH' ) ) {
26
+if ( ! defined('ABSPATH')) {
27 27
 	exit;
28 28
 }
29 29
 
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
 	 * @param string   $description Email tag description text
56 56
 	 * @param callable $func        Hook to run when email tag is found
57 57
 	 */
58
-	public function add( $tag, $description, $func ) {
59
-		if ( is_callable( $func ) ) {
60
-			$this->tags[ $tag ] = array(
58
+	public function add($tag, $description, $func) {
59
+		if (is_callable($func)) {
60
+			$this->tags[$tag] = array(
61 61
 				'tag'         => $tag,
62 62
 				'description' => $description,
63 63
 				'func'        => $func
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
 	 *
73 73
 	 * @param string $tag Email tag to remove hook from
74 74
 	 */
75
-	public function remove( $tag ) {
76
-		unset( $this->tags[ $tag ] );
75
+	public function remove($tag) {
76
+		unset($this->tags[$tag]);
77 77
 	}
78 78
 
79 79
 	/**
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 	 *
86 86
 	 * @return bool
87 87
 	 */
88
-	public function email_tag_exists( $tag ) {
89
-		return array_key_exists( $tag, $this->tags );
88
+	public function email_tag_exists($tag) {
89
+		return array_key_exists($tag, $this->tags);
90 90
 	}
91 91
 
92 92
 	/**
@@ -110,16 +110,16 @@  discard block
 block discarded – undo
110 110
 	 *
111 111
 	 * @return string Content with email tags filtered out.
112 112
 	 */
113
-	public function do_tags( $content, $payment_id ) {
113
+	public function do_tags($content, $payment_id) {
114 114
 
115 115
 		// Check if there is at least one tag added.
116
-		if ( empty( $this->tags ) || ! is_array( $this->tags ) ) {
116
+		if (empty($this->tags) || ! is_array($this->tags)) {
117 117
 			return $content;
118 118
 		}
119 119
 
120 120
 		$this->payment_id = $payment_id;
121 121
 
122
-		$new_content = preg_replace_callback( "/{([A-z0-9\-\_]+)}/s", array( $this, 'do_tag' ), $content );
122
+		$new_content = preg_replace_callback("/{([A-z0-9\-\_]+)}/s", array($this, 'do_tag'), $content);
123 123
 
124 124
 		$this->payment_id = null;
125 125
 
@@ -135,17 +135,17 @@  discard block
 block discarded – undo
135 135
 	 *
136 136
 	 * @return mixed
137 137
 	 */
138
-	public function do_tag( $m ) {
138
+	public function do_tag($m) {
139 139
 
140 140
 		// Get tag
141 141
 		$tag = $m[1];
142 142
 
143 143
 		// Return tag if tag not set
144
-		if ( ! $this->email_tag_exists( $tag ) ) {
144
+		if ( ! $this->email_tag_exists($tag)) {
145 145
 			return $m[0];
146 146
 		}
147 147
 
148
-		return call_user_func( $this->tags[ $tag ]['func'], $this->payment_id, $tag );
148
+		return call_user_func($this->tags[$tag]['func'], $this->payment_id, $tag);
149 149
 	}
150 150
 
151 151
 }
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
  * @param string   $description Description of the email tag added
160 160
  * @param callable $func        Hook to run when email tag is found
161 161
  */
162
-function give_add_email_tag( $tag, $description, $func ) {
163
-	Give()->email_tags->add( $tag, $description, $func );
162
+function give_add_email_tag($tag, $description, $func) {
163
+	Give()->email_tags->add($tag, $description, $func);
164 164
 }
165 165
 
166 166
 /**
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
  *
171 171
  * @param string $tag Email tag to remove hook from
172 172
  */
173
-function give_remove_email_tag( $tag ) {
174
-	Give()->email_tags->remove( $tag );
173
+function give_remove_email_tag($tag) {
174
+	Give()->email_tags->remove($tag);
175 175
 }
176 176
 
177 177
 /**
@@ -183,8 +183,8 @@  discard block
 block discarded – undo
183 183
  *
184 184
  * @return bool
185 185
  */
186
-function give_email_tag_exists( $tag ) {
187
-	return Give()->email_tags->email_tag_exists( $tag );
186
+function give_email_tag_exists($tag) {
187
+	return Give()->email_tags->email_tag_exists($tag);
188 188
 }
189 189
 
190 190
 /**
@@ -211,9 +211,9 @@  discard block
 block discarded – undo
211 211
 	$email_tags = give_get_email_tags();
212 212
 
213 213
 	ob_start();
214
-	if ( count( $email_tags ) > 0 ) : ?>
214
+	if (count($email_tags) > 0) : ?>
215 215
 		<div class="give-email-tags-wrap">
216
-			<?php foreach ( $email_tags as $email_tag ) : ?>
216
+			<?php foreach ($email_tags as $email_tag) : ?>
217 217
 				<span class="give_<?php echo $email_tag['tag']; ?>_tag">
218 218
 					<code>{<?php echo $email_tag['tag']; ?>}</code> - <?php echo $email_tag['description']; ?>
219 219
 				</span>
@@ -235,12 +235,12 @@  discard block
 block discarded – undo
235 235
  *
236 236
  * @return string Content with email tags filtered out.
237 237
  */
238
-function give_do_email_tags( $content, $payment_id ) {
238
+function give_do_email_tags($content, $payment_id) {
239 239
 
240 240
 	// Replace all tags
241
-	$content = Give()->email_tags->do_tags( $content, $payment_id );
241
+	$content = Give()->email_tags->do_tags($content, $payment_id);
242 242
 
243
-	$content = apply_filters( 'give_email_template_tags', $content, give_get_payment_meta( $payment_id ), $payment_id );
243
+	$content = apply_filters('give_email_template_tags', $content, give_get_payment_meta($payment_id), $payment_id);
244 244
 
245 245
 	// Return content
246 246
 	return $content;
@@ -259,10 +259,10 @@  discard block
 block discarded – undo
259 259
 	 *
260 260
 	 * @since 1.0
261 261
 	 */
262
-	do_action( 'give_add_email_tags' );
262
+	do_action('give_add_email_tags');
263 263
 }
264 264
 
265
-add_action( 'init', 'give_load_email_tags', - 999 );
265
+add_action('init', 'give_load_email_tags', - 999);
266 266
 
267 267
 /**
268 268
  * Add default Give email template tags.
@@ -275,97 +275,97 @@  discard block
 block discarded – undo
275 275
 	$email_tags = array(
276 276
 		array(
277 277
 			'tag'         => 'donation',
278
-			'description' => esc_html__( 'The donation form name, and the donation level (if applicable).', 'give' ),
278
+			'description' => esc_html__('The donation form name, and the donation level (if applicable).', 'give'),
279 279
 			'function'    => 'give_email_tag_donation'
280 280
 		),
281 281
 		array(
282 282
 			'tag'         => 'form_title',
283
-			'description' => esc_html__( 'The donation form name.', 'give' ),
283
+			'description' => esc_html__('The donation form name.', 'give'),
284 284
 			'function'    => 'give_email_tag_form_title'
285 285
 		),
286 286
 		array(
287 287
 			'tag'         => 'amount',
288
-			'description' => esc_html__( 'The total donation amount with currency sign.', 'give' ),
288
+			'description' => esc_html__('The total donation amount with currency sign.', 'give'),
289 289
 			'function'    => 'give_email_tag_amount'
290 290
 		),
291 291
 		array(
292 292
 			'tag'         => 'price',
293
-			'description' => esc_html__( 'The total donation amount with currency sign.', 'give' ),
293
+			'description' => esc_html__('The total donation amount with currency sign.', 'give'),
294 294
 			'function'    => 'give_email_tag_price'
295 295
 		),
296 296
 		array(
297 297
 			'tag'         => 'name',
298
-			'description' => esc_html__( 'The donor\'s first name.', 'give' ),
298
+			'description' => esc_html__('The donor\'s first name.', 'give'),
299 299
 			'function'    => 'give_email_tag_first_name'
300 300
 		),
301 301
 		array(
302 302
 			'tag'         => 'fullname',
303
-			'description' => esc_html__( 'The donor\'s full name, first and last.', 'give' ),
303
+			'description' => esc_html__('The donor\'s full name, first and last.', 'give'),
304 304
 			'function'    => 'give_email_tag_fullname'
305 305
 		),
306 306
 		array(
307 307
 			'tag'         => 'username',
308
-			'description' => esc_html__( 'The donor\'s user name on the site, if they registered an account.', 'give' ),
308
+			'description' => esc_html__('The donor\'s user name on the site, if they registered an account.', 'give'),
309 309
 			'function'    => 'give_email_tag_username'
310 310
 		),
311 311
 		array(
312 312
 			'tag'         => 'user_email',
313
-			'description' => esc_html__( 'The donor\'s email address.', 'give' ),
313
+			'description' => esc_html__('The donor\'s email address.', 'give'),
314 314
 			'function'    => 'give_email_tag_user_email'
315 315
 		),
316 316
 		array(
317 317
 			'tag'         => 'billing_address',
318
-			'description' => esc_html__( 'The donor\'s billing address.', 'give' ),
318
+			'description' => esc_html__('The donor\'s billing address.', 'give'),
319 319
 			'function'    => 'give_email_tag_billing_address'
320 320
 		),
321 321
 		array(
322 322
 			'tag'         => 'date',
323
-			'description' => esc_html__( 'The date of the donation.', 'give' ),
323
+			'description' => esc_html__('The date of the donation.', 'give'),
324 324
 			'function'    => 'give_email_tag_date'
325 325
 		),
326 326
 		array(
327 327
 			'tag'         => 'payment_id',
328
-			'description' => esc_html__( 'The unique ID number for this donation.', 'give' ),
328
+			'description' => esc_html__('The unique ID number for this donation.', 'give'),
329 329
 			'function'    => 'give_email_tag_payment_id'
330 330
 		),
331 331
 		array(
332 332
 			'tag'         => 'receipt_id',
333
-			'description' => esc_html__( 'The unique ID number for this donation receipt.', 'give' ),
333
+			'description' => esc_html__('The unique ID number for this donation receipt.', 'give'),
334 334
 			'function'    => 'give_email_tag_receipt_id'
335 335
 		),
336 336
 		array(
337 337
 			'tag'         => 'payment_method',
338
-			'description' => esc_html__( 'The method of payment used for this donation.', 'give' ),
338
+			'description' => esc_html__('The method of payment used for this donation.', 'give'),
339 339
 			'function'    => 'give_email_tag_payment_method'
340 340
 		),
341 341
 		array(
342 342
 			'tag'         => 'sitename',
343
-			'description' => esc_html__( 'The name of your site.', 'give' ),
343
+			'description' => esc_html__('The name of your site.', 'give'),
344 344
 			'function'    => 'give_email_tag_sitename'
345 345
 		),
346 346
 		array(
347 347
 			'tag'         => 'receipt_link',
348
-			'description' => esc_html__( 'The donation receipt direct link, to view the receipt on the website.', 'give' ),
348
+			'description' => esc_html__('The donation receipt direct link, to view the receipt on the website.', 'give'),
349 349
 			'function'    => 'give_email_tag_receipt_link'
350 350
 		),
351 351
 		array(
352 352
 			'tag'         => 'receipt_link_url',
353
-			'description' => esc_html__( 'The donation receipt direct URL, to view the receipt on the website.', 'give' ),
353
+			'description' => esc_html__('The donation receipt direct URL, to view the receipt on the website.', 'give'),
354 354
 			'function'    => 'give_email_tag_receipt_link_url'
355 355
 		),
356 356
 	);
357 357
 
358 358
 	// Apply give_email_tags filter
359
-	$email_tags = apply_filters( 'give_email_tags', $email_tags );
359
+	$email_tags = apply_filters('give_email_tags', $email_tags);
360 360
 
361 361
 	// Add email tags
362
-	foreach ( $email_tags as $email_tag ) {
363
-		give_add_email_tag( $email_tag['tag'], $email_tag['description'], $email_tag['function'] );
362
+	foreach ($email_tags as $email_tag) {
363
+		give_add_email_tag($email_tag['tag'], $email_tag['description'], $email_tag['function']);
364 364
 	}
365 365
 
366 366
 }
367 367
 
368
-add_action( 'give_add_email_tags', 'give_setup_email_tags' );
368
+add_action('give_add_email_tags', 'give_setup_email_tags');
369 369
 
370 370
 
371 371
 /**
@@ -377,15 +377,15 @@  discard block
 block discarded – undo
377 377
  *
378 378
  * @return string name
379 379
  */
380
-function give_email_tag_first_name( $payment_id ) {
381
-	$payment   = new Give_Payment( $payment_id );
380
+function give_email_tag_first_name($payment_id) {
381
+	$payment   = new Give_Payment($payment_id);
382 382
 	$user_info = $payment->user_info;
383 383
 
384
-	if ( empty( $user_info ) ) {
384
+	if (empty($user_info)) {
385 385
 		return '';
386 386
 	}
387 387
 
388
-	$email_name = give_get_email_names( $user_info );
388
+	$email_name = give_get_email_names($user_info);
389 389
 
390 390
 	return $email_name['name'];
391 391
 }
@@ -399,15 +399,15 @@  discard block
 block discarded – undo
399 399
  *
400 400
  * @return string fullname
401 401
  */
402
-function give_email_tag_fullname( $payment_id ) {
403
-	$payment   = new Give_Payment( $payment_id );
402
+function give_email_tag_fullname($payment_id) {
403
+	$payment   = new Give_Payment($payment_id);
404 404
 	$user_info = $payment->user_info;
405 405
 
406
-	if ( empty( $user_info ) ) {
406
+	if (empty($user_info)) {
407 407
 		return '';
408 408
 	}
409 409
 
410
-	$email_name = give_get_email_names( $user_info );
410
+	$email_name = give_get_email_names($user_info);
411 411
 
412 412
 	return $email_name['fullname'];
413 413
 }
@@ -421,15 +421,15 @@  discard block
 block discarded – undo
421 421
  *
422 422
  * @return string username.
423 423
  */
424
-function give_email_tag_username( $payment_id ) {
425
-	$payment   = new Give_Payment( $payment_id );
424
+function give_email_tag_username($payment_id) {
425
+	$payment   = new Give_Payment($payment_id);
426 426
 	$user_info = $payment->user_info;
427 427
 
428
-	if ( empty( $user_info ) ) {
428
+	if (empty($user_info)) {
429 429
 		return '';
430 430
 	}
431 431
 
432
-	$email_name = give_get_email_names( $user_info );
432
+	$email_name = give_get_email_names($user_info);
433 433
 
434 434
 	return $email_name['username'];
435 435
 }
@@ -443,8 +443,8 @@  discard block
 block discarded – undo
443 443
  *
444 444
  * @return string user_email
445 445
  */
446
-function give_email_tag_user_email( $payment_id ) {
447
-	$payment = new Give_Payment( $payment_id );
446
+function give_email_tag_user_email($payment_id) {
447
+	$payment = new Give_Payment($payment_id);
448 448
 
449 449
 	return $payment->email;
450 450
 }
@@ -458,9 +458,9 @@  discard block
 block discarded – undo
458 458
  *
459 459
  * @return string billing_address
460 460
  */
461
-function give_email_tag_billing_address( $payment_id ) {
462
-	$user_info    = give_get_payment_meta_user_info( $payment_id );
463
-	$user_address = ! empty( $user_info['address'] ) ? $user_info['address'] : array(
461
+function give_email_tag_billing_address($payment_id) {
462
+	$user_info    = give_get_payment_meta_user_info($payment_id);
463
+	$user_address = ! empty($user_info['address']) ? $user_info['address'] : array(
464 464
 		'line1'   => '',
465 465
 		'line2'   => '',
466 466
 		'city'    => '',
@@ -469,11 +469,11 @@  discard block
 block discarded – undo
469 469
 		'zip'     => ''
470 470
 	);
471 471
 
472
-	$return = $user_address['line1'] . "\n";
473
-	if ( ! empty( $user_address['line2'] ) ) {
474
-		$return .= $user_address['line2'] . "\n";
472
+	$return = $user_address['line1']."\n";
473
+	if ( ! empty($user_address['line2'])) {
474
+		$return .= $user_address['line2']."\n";
475 475
 	}
476
-	$return .= $user_address['city'] . ' ' . $user_address['zip'] . ' ' . $user_address['state'] . "\n";
476
+	$return .= $user_address['city'].' '.$user_address['zip'].' '.$user_address['state']."\n";
477 477
 	$return .= $user_address['country'];
478 478
 
479 479
 	return $return;
@@ -488,10 +488,10 @@  discard block
 block discarded – undo
488 488
  *
489 489
  * @return string date
490 490
  */
491
-function give_email_tag_date( $payment_id ) {
492
-	$payment = new Give_Payment( $payment_id );
491
+function give_email_tag_date($payment_id) {
492
+	$payment = new Give_Payment($payment_id);
493 493
 
494
-	return date_i18n( give_date_format(), strtotime( $payment->date ) );
494
+	return date_i18n(give_date_format(), strtotime($payment->date));
495 495
 }
496 496
 
497 497
 /**
@@ -503,11 +503,11 @@  discard block
 block discarded – undo
503 503
  *
504 504
  * @return string amount
505 505
  */
506
-function give_email_tag_amount( $payment_id ) {
507
-	$payment     = new Give_Payment( $payment_id );
508
-	$give_amount = give_currency_filter( give_format_amount( $payment->total ), $payment->currency );
506
+function give_email_tag_amount($payment_id) {
507
+	$payment     = new Give_Payment($payment_id);
508
+	$give_amount = give_currency_filter(give_format_amount($payment->total), $payment->currency);
509 509
 
510
-	return html_entity_decode( $give_amount, ENT_COMPAT, 'UTF-8' );
510
+	return html_entity_decode($give_amount, ENT_COMPAT, 'UTF-8');
511 511
 }
512 512
 
513 513
 /**
@@ -519,8 +519,8 @@  discard block
 block discarded – undo
519 519
  *
520 520
  * @return string price
521 521
  */
522
-function give_email_tag_price( $payment_id ) {
523
-	return give_email_tag_amount( $payment_id );
522
+function give_email_tag_price($payment_id) {
523
+	return give_email_tag_amount($payment_id);
524 524
 }
525 525
 
526 526
 /**
@@ -532,8 +532,8 @@  discard block
 block discarded – undo
532 532
  *
533 533
  * @return int payment_id
534 534
  */
535
-function give_email_tag_payment_id( $payment_id ) {
536
-	$payment = new Give_Payment( $payment_id );
535
+function give_email_tag_payment_id($payment_id) {
536
+	$payment = new Give_Payment($payment_id);
537 537
 
538 538
 	return $payment->number;
539 539
 }
@@ -547,8 +547,8 @@  discard block
 block discarded – undo
547 547
  *
548 548
  * @return string receipt_id
549 549
  */
550
-function give_email_tag_receipt_id( $payment_id ) {
551
-	$payment = new Give_Payment( $payment_id );
550
+function give_email_tag_receipt_id($payment_id) {
551
+	$payment = new Give_Payment($payment_id);
552 552
 
553 553
 	return $payment->key;
554 554
 }
@@ -562,14 +562,14 @@  discard block
 block discarded – undo
562 562
  *
563 563
  * @return string $form_title
564 564
  */
565
-function give_email_tag_donation( $payment_id ) {
566
-	$payment      = new Give_Payment( $payment_id );
565
+function give_email_tag_donation($payment_id) {
566
+	$payment      = new Give_Payment($payment_id);
567 567
 	$payment_meta = $payment->payment_meta;
568
-	$level_title  = give_has_variable_prices( $payment->form_id );
568
+	$level_title  = give_has_variable_prices($payment->form_id);
569 569
 	$separator    = $level_title ? '-' : '';
570
-	$form_title   = strip_tags( give_get_payment_form_title( $payment_meta, false, $separator ) );
570
+	$form_title   = strip_tags(give_get_payment_form_title($payment_meta, false, $separator));
571 571
 
572
-	return ! empty( $form_title ) ? $form_title : '';
572
+	return ! empty($form_title) ? $form_title : '';
573 573
 
574 574
 }
575 575
 
@@ -582,11 +582,11 @@  discard block
 block discarded – undo
582 582
  *
583 583
  * @return string $form_title
584 584
  */
585
-function give_email_tag_form_title( $payment_id ) {
586
-	$payment      = new Give_Payment( $payment_id );
585
+function give_email_tag_form_title($payment_id) {
586
+	$payment      = new Give_Payment($payment_id);
587 587
 	$payment_meta = $payment->payment_meta;
588 588
 
589
-	return isset( $payment_meta['form_title'] ) ? strip_tags( $payment_meta['form_title'] ) : '';
589
+	return isset($payment_meta['form_title']) ? strip_tags($payment_meta['form_title']) : '';
590 590
 
591 591
 }
592 592
 
@@ -599,10 +599,10 @@  discard block
 block discarded – undo
599 599
  *
600 600
  * @return string gateway
601 601
  */
602
-function give_email_tag_payment_method( $payment_id ) {
603
-	$payment = new Give_Payment( $payment_id );
602
+function give_email_tag_payment_method($payment_id) {
603
+	$payment = new Give_Payment($payment_id);
604 604
 
605
-	return give_get_gateway_checkout_label( $payment->gateway );
605
+	return give_get_gateway_checkout_label($payment->gateway);
606 606
 }
607 607
 
608 608
 /**
@@ -614,8 +614,8 @@  discard block
 block discarded – undo
614 614
  *
615 615
  * @return string sitename
616 616
  */
617
-function give_email_tag_sitename( $payment_id ) {
618
-	return wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );
617
+function give_email_tag_sitename($payment_id) {
618
+	return wp_specialchars_decode(get_bloginfo('name'), ENT_QUOTES);
619 619
 }
620 620
 
621 621
 /**
@@ -627,19 +627,19 @@  discard block
 block discarded – undo
627 627
  *
628 628
  * @return string receipt_link
629 629
  */
630
-function give_email_tag_receipt_link( $payment_id ) {
630
+function give_email_tag_receipt_link($payment_id) {
631 631
 
632
-	$receipt_url = esc_url( add_query_arg( array(
633
-		'payment_key' => give_get_payment_key( $payment_id ),
632
+	$receipt_url = esc_url(add_query_arg(array(
633
+		'payment_key' => give_get_payment_key($payment_id),
634 634
 		'give_action' => 'view_receipt'
635
-	), home_url() ) );
636
-	$formatted   = sprintf(
635
+	), home_url()));
636
+	$formatted = sprintf(
637 637
 		'<a href="%1$s">%2$s</a>',
638 638
 		$receipt_url,
639
-		esc_html__( 'View it in your browser', 'give' )
639
+		esc_html__('View it in your browser', 'give')
640 640
 	);
641 641
 
642
-	if ( give_get_option( 'email_template' ) !== 'none' ) {
642
+	if (give_get_option('email_template') !== 'none') {
643 643
 		return $formatted;
644 644
 	} else {
645 645
 		return $receipt_url;
@@ -658,12 +658,12 @@  discard block
 block discarded – undo
658 658
  *
659 659
  * @return string receipt_url
660 660
  */
661
-function give_email_tag_receipt_link_url( $payment_id ) {
661
+function give_email_tag_receipt_link_url($payment_id) {
662 662
 
663
-	$receipt_url = esc_url( add_query_arg( array(
664
-		'payment_key' => give_get_payment_key( $payment_id ),
663
+	$receipt_url = esc_url(add_query_arg(array(
664
+		'payment_key' => give_get_payment_key($payment_id),
665 665
 		'give_action' => 'view_receipt'
666
-	), home_url() ) );
666
+	), home_url()));
667 667
 
668 668
 	return $receipt_url;
669 669
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -530,7 +530,7 @@
 block discarded – undo
530 530
  *
531 531
  * @param int $payment_id
532 532
  *
533
- * @return int payment_id
533
+ * @return string payment_id
534 534
  */
535 535
 function give_email_tag_payment_id( $payment_id ) {
536 536
 	$payment = new Give_Payment( $payment_id );
Please login to merge, or discard this patch.
includes/forms/template.php 3 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
 
593 593
 	if( 'button' === $display_option ) {
594 594
 		$display_option = 'modal';
595
-	}elseif ( $display_option === 'onpage' ) {
595
+	} elseif ( $display_option === 'onpage' ) {
596 596
 		return '';
597 597
 	}
598 598
 
@@ -1033,9 +1033,12 @@  discard block
 block discarded – undo
1033 1033
 					}
1034 1034
 					?>
1035 1035
 				</select>
1036
-			<?php else : ?>
1036
+			<?php else {
1037
+	: ?>
1037 1038
 				<input type="text" size="6" name="card_state" id="card_state" class="card_state give-input"
1038
-				       placeholder="<?php esc_attr_e( 'State / Province', 'give' ); ?>"/>
1039
+				       placeholder="<?php esc_attr_e( 'State / Province', 'give' );
1040
+}
1041
+?>"/>
1039 1042
 			<?php endif; ?>
1040 1043
 		</p>
1041 1044
 		<?php
Please login to merge, or discard this patch.
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  *
22 22
  * @param  array $args An array of form arguments.
23 23
  *
24
- * @return string Donation form.
24
+ * @return false|null Donation form.
25 25
  */
26 26
 function give_get_donation_form( $args = array() ) {
27 27
 
@@ -1468,7 +1468,7 @@  discard block
 block discarded – undo
1468 1468
  *
1469 1469
  * @param  int $form_id The form ID.
1470 1470
  *
1471
- * @return bool
1471
+ * @return false|null
1472 1472
  */
1473 1473
 function give_terms_agreement( $form_id ) {
1474 1474
 	$form_option = get_post_meta( $form_id, '_give_terms_option', true );
@@ -1677,7 +1677,7 @@  discard block
 block discarded – undo
1677 1677
  * @param  int   $form_id The form ID.
1678 1678
  * @param  array $args    An array of form arguments.
1679 1679
  *
1680
- * @return mixed
1680
+ * @return boolean
1681 1681
  */
1682 1682
 function give_show_goal_progress( $form_id, $args ) {
1683 1683
 
@@ -1696,7 +1696,7 @@  discard block
 block discarded – undo
1696 1696
  * Get form content position.
1697 1697
  *
1698 1698
  * @since  1.8
1699
- * @param  $form_id
1699
+ * @param  integer $form_id
1700 1700
  * @param  $args
1701 1701
  * @return mixed|string
1702 1702
  */
@@ -1731,7 +1731,7 @@  discard block
 block discarded – undo
1731 1731
  * @param  int   $form_id The form ID.
1732 1732
  * @param  array $args    An array of form arguments.
1733 1733
  *
1734
- * @return void|bool
1734
+ * @return false|null
1735 1735
  */
1736 1736
 function give_form_content( $form_id, $args ) {
1737 1737
 
Please login to merge, or discard this patch.
Spacing   +406 added lines, -406 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
 
@@ -23,50 +23,50 @@  discard block
 block discarded – undo
23 23
  *
24 24
  * @return string Donation form.
25 25
  */
26
-function give_get_donation_form( $args = array() ) {
26
+function give_get_donation_form($args = array()) {
27 27
 
28 28
 	global $post;
29 29
 
30
-	$form_id = is_object( $post ) ? $post->ID : 0;
30
+	$form_id = is_object($post) ? $post->ID : 0;
31 31
 
32
-	if ( isset( $args['id'] ) ) {
32
+	if (isset($args['id'])) {
33 33
 		$form_id = $args['id'];
34 34
 	}
35 35
 
36
-	$defaults = apply_filters( 'give_form_args_defaults', array(
36
+	$defaults = apply_filters('give_form_args_defaults', array(
37 37
 		'form_id' => $form_id,
38
-	) );
38
+	));
39 39
 
40
-	$args = wp_parse_args( $args, $defaults );
40
+	$args = wp_parse_args($args, $defaults);
41 41
 
42
-	$form = new Give_Donate_Form( $args['form_id'] );
42
+	$form = new Give_Donate_Form($args['form_id']);
43 43
 
44 44
 	//bail if no form ID.
45
-	if ( empty( $form->ID ) ) {
45
+	if (empty($form->ID)) {
46 46
 		return false;
47 47
 	}
48 48
 
49
-	$payment_mode = give_get_chosen_gateway( $form->ID );
49
+	$payment_mode = give_get_chosen_gateway($form->ID);
50 50
 
51
-	$form_action = add_query_arg( apply_filters( 'give_form_action_args', array(
51
+	$form_action = add_query_arg(apply_filters('give_form_action_args', array(
52 52
 		'payment-mode' => $payment_mode,
53
-	) ),
53
+	)),
54 54
 		give_get_current_page_url()
55 55
 	);
56 56
 
57 57
 	//Sanity Check: Donation form not published or user doesn't have permission to view drafts.
58 58
 	if (
59
-		( 'publish' !== $form->post_status && ! current_user_can( 'edit_give_forms', $form->ID ) )
60
-		|| ( 'trash' === $form->post_status )
59
+		('publish' !== $form->post_status && ! current_user_can('edit_give_forms', $form->ID))
60
+		|| ('trash' === $form->post_status)
61 61
 	) {
62 62
 		return false;
63 63
 	}
64 64
 
65 65
 	//Get the form wrap CSS classes.
66
-	$form_wrap_classes = $form->get_form_wrap_classes( $args );
66
+	$form_wrap_classes = $form->get_form_wrap_classes($args);
67 67
 
68 68
 	//Get the <form> tag wrap CSS classes.
69
-	$form_classes = $form->get_form_classes( $args );
69
+	$form_classes = $form->get_form_classes($args);
70 70
 
71 71
 	ob_start();
72 72
 
@@ -78,19 +78,19 @@  discard block
 block discarded – undo
78 78
 	 * @param int   $form_id The form ID.
79 79
 	 * @param array $args    An array of form arguments.
80 80
 	 */
81
-	do_action( 'give_pre_form_output', $form->ID, $args );
81
+	do_action('give_pre_form_output', $form->ID, $args);
82 82
 
83 83
 	?>
84 84
 	<div id="give-form-<?php echo $form->ID; ?>-wrap" class="<?php echo $form_wrap_classes; ?>">
85 85
 
86
-		<?php if ( $form->is_close_donation_form() ) {
86
+		<?php if ($form->is_close_donation_form()) {
87 87
 
88 88
 			//Get Goal thank you message.
89
-			$display_thankyou_message = get_post_meta( $form->ID, '_give_form_goal_achieved_message', true );
90
-			$display_thankyou_message = ! empty( $display_thankyou_message ) ? $display_thankyou_message : esc_html__( 'Thank you to all our donors, we have met our fundraising goal.', 'give' );
89
+			$display_thankyou_message = get_post_meta($form->ID, '_give_form_goal_achieved_message', true);
90
+			$display_thankyou_message = ! empty($display_thankyou_message) ? $display_thankyou_message : esc_html__('Thank you to all our donors, we have met our fundraising goal.', 'give');
91 91
 
92 92
 			//Print thank you message.
93
-			echo apply_filters( 'give_goal_closed_output', give_output_error( $display_thankyou_message, false, 'success' ), $form->ID );
93
+			echo apply_filters('give_goal_closed_output', give_output_error($display_thankyou_message, false, 'success'), $form->ID);
94 94
 
95 95
 		} else {
96 96
 			/**
@@ -98,10 +98,10 @@  discard block
 block discarded – undo
98 98
 			 * 1. if show_title params set to true
99 99
 			 * 2. if admin set form display_style to button
100 100
 			 */
101
-			$form_title = apply_filters( 'give_form_title', '<h2 class="give-form-title">' . get_the_title( $form_id ) . '</h2>' );
101
+			$form_title = apply_filters('give_form_title', '<h2 class="give-form-title">'.get_the_title($form_id).'</h2>');
102 102
 			if (
103
-				( isset( $args['show_title'] ) && $args['show_title'] == true )
104
-				&& ! doing_action( 'give_single_form_summary' )
103
+				(isset($args['show_title']) && $args['show_title'] == true)
104
+				&& ! doing_action('give_single_form_summary')
105 105
 			) {
106 106
 				echo $form_title;
107 107
 			}
@@ -114,19 +114,19 @@  discard block
 block discarded – undo
114 114
 			 * @param int   $form_id The form ID.
115 115
 			 * @param array $args    An array of form arguments.
116 116
 			 */
117
-			do_action( 'give_pre_form', $form->ID, $args );
117
+			do_action('give_pre_form', $form->ID, $args);
118 118
 			?>
119 119
 
120 120
 			<form id="give-form-<?php echo $form_id; ?>" class="<?php echo $form_classes; ?>"
121
-			      action="<?php echo esc_url_raw( $form_action ); ?>" method="post">
121
+			      action="<?php echo esc_url_raw($form_action); ?>" method="post">
122 122
 				<input type="hidden" name="give-form-id" value="<?php echo $form->ID; ?>"/>
123
-				<input type="hidden" name="give-form-title" value="<?php echo htmlentities( $form->post_title ); ?>"/>
123
+				<input type="hidden" name="give-form-title" value="<?php echo htmlentities($form->post_title); ?>"/>
124 124
 				<input type="hidden" name="give-current-url"
125
-				       value="<?php echo htmlspecialchars( give_get_current_page_url() ); ?>"/>
125
+				       value="<?php echo htmlspecialchars(give_get_current_page_url()); ?>"/>
126 126
 				<input type="hidden" name="give-form-url"
127
-				       value="<?php echo htmlspecialchars( give_get_current_page_url() ); ?>"/>
127
+				       value="<?php echo htmlspecialchars(give_get_current_page_url()); ?>"/>
128 128
 				<input type="hidden" name="give-form-minimum"
129
-				       value="<?php echo give_format_amount( give_get_form_minimum_price( $form->ID ) ); ?>"/>
129
+				       value="<?php echo give_format_amount(give_get_form_minimum_price($form->ID)); ?>"/>
130 130
 
131 131
 				<!-- The following field is for robots only, invisible to humans: -->
132 132
 				<span class="give-hidden" style="display: none !important;">
@@ -138,13 +138,13 @@  discard block
 block discarded – undo
138 138
 				<?php
139 139
 
140 140
 				//Price ID hidden field for variable (mult-level) donation forms.
141
-				if ( give_has_variable_prices( $form_id ) ) {
141
+				if (give_has_variable_prices($form_id)) {
142 142
 					//get default selected price ID.
143
-					$prices   = apply_filters( 'give_form_variable_prices', give_get_variable_prices( $form_id ), $form_id );
143
+					$prices   = apply_filters('give_form_variable_prices', give_get_variable_prices($form_id), $form_id);
144 144
 					$price_id = 0;
145 145
 					//loop through prices.
146
-					foreach ( $prices as $price ) {
147
-						if ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) {
146
+					foreach ($prices as $price) {
147
+						if (isset($price['_give_default']) && $price['_give_default'] === 'default') {
148 148
 							$price_id = $price['_give_id']['level_id'];
149 149
 						};
150 150
 					}
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 				 * @param int   $form_id The form ID.
161 161
 				 * @param array $args    An array of form arguments.
162 162
 				 */
163
-				do_action( 'give_checkout_form_top', $form->ID, $args );
163
+				do_action('give_checkout_form_top', $form->ID, $args);
164 164
 
165 165
 				/**
166 166
 				 * Fires while outputing donation form, for payment gatways fields.
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 				 * @param int   $form_id The form ID.
171 171
 				 * @param array $args    An array of form arguments.
172 172
 				 */
173
-				do_action( 'give_payment_mode_select', $form->ID, $args );
173
+				do_action('give_payment_mode_select', $form->ID, $args);
174 174
 
175 175
 				/**
176 176
 				 * Fires while outputing donation form, after all other fields.
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 				 * @param int   $form_id The form ID.
181 181
 				 * @param array $args    An array of form arguments.
182 182
 				 */
183
-				do_action( 'give_checkout_form_bottom', $form->ID, $args );
183
+				do_action('give_checkout_form_bottom', $form->ID, $args);
184 184
 
185 185
 				?>
186 186
 			</form>
@@ -194,12 +194,12 @@  discard block
 block discarded – undo
194 194
 			 * @param int   $form_id The form ID.
195 195
 			 * @param array $args    An array of form arguments.
196 196
 			 */
197
-			do_action( 'give_post_form', $form->ID, $args );
197
+			do_action('give_post_form', $form->ID, $args);
198 198
 
199 199
 		}
200 200
 		?>
201 201
 
202
-	</div><!--end #give-form-<?php echo absint( $form->ID ); ?>-->
202
+	</div><!--end #give-form-<?php echo absint($form->ID); ?>-->
203 203
 	<?php
204 204
 
205 205
 	/**
@@ -210,11 +210,11 @@  discard block
 block discarded – undo
210 210
 	 * @param int   $form_id The form ID.
211 211
 	 * @param array $args    An array of form arguments.
212 212
 	 */
213
-	do_action( 'give_post_form_output', $form->ID, $args );
213
+	do_action('give_post_form_output', $form->ID, $args);
214 214
 
215 215
 	$final_output = ob_get_clean();
216 216
 
217
-	echo apply_filters( 'give_donate_form', $final_output, $args );
217
+	echo apply_filters('give_donate_form', $final_output, $args);
218 218
 }
219 219
 
220 220
 /**
@@ -231,11 +231,11 @@  discard block
 block discarded – undo
231 231
  *
232 232
  * @return string
233 233
  */
234
-function give_show_purchase_form( $form_id ) {
234
+function give_show_purchase_form($form_id) {
235 235
 
236
-	$payment_mode = give_get_chosen_gateway( $form_id );
236
+	$payment_mode = give_get_chosen_gateway($form_id);
237 237
 
238
-	if ( ! isset( $form_id ) && isset( $_POST['give_form_id'] ) ) {
238
+	if ( ! isset($form_id) && isset($_POST['give_form_id'])) {
239 239
 		$form_id = $_POST['give_form_id'];
240 240
 	}
241 241
 
@@ -244,33 +244,33 @@  discard block
 block discarded – undo
244 244
 	 *
245 245
 	 * @since 1.7
246 246
 	 */
247
-	do_action( 'give_donation_form_top', $form_id );
247
+	do_action('give_donation_form_top', $form_id);
248 248
 
249
-	if ( give_can_checkout() && isset( $form_id ) ) {
249
+	if (give_can_checkout() && isset($form_id)) {
250 250
 
251 251
 		/**
252 252
 		 * Fires while displaying donation form, before registration login.
253 253
 		 *
254 254
 		 * @since 1.7
255 255
 		 */
256
-		do_action( 'give_donation_form_before_register_login', $form_id );
256
+		do_action('give_donation_form_before_register_login', $form_id);
257 257
 
258 258
 		/**
259 259
 		 * Fire when register/login form fields render.
260 260
 		 *
261 261
 		 * @since 1.7
262 262
 		 */
263
-		do_action( 'give_donation_form_register_login_fields', $form_id );
263
+		do_action('give_donation_form_register_login_fields', $form_id);
264 264
 
265 265
 		/**
266 266
 		 * Fire when credit card form fields render.
267 267
 		 *
268 268
 		 * @since 1.7
269 269
 		 */
270
-		do_action( 'give_donation_form_before_cc_form', $form_id );
270
+		do_action('give_donation_form_before_cc_form', $form_id);
271 271
 
272 272
 		// Load the credit card form and allow gateways to load their own if they wish.
273
-		if ( has_action( 'give_' . $payment_mode . '_cc_form' ) ) {
273
+		if (has_action('give_'.$payment_mode.'_cc_form')) {
274 274
 			/**
275 275
 			 * Fires while displaying donation form, credit card form fields for a given gateway.
276 276
 			 *
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 			 *
279 279
 			 * @param int $form_id The form ID.
280 280
 			 */
281
-			do_action( "give_{$payment_mode}_cc_form", $form_id );
281
+			do_action("give_{$payment_mode}_cc_form", $form_id);
282 282
 		} else {
283 283
 			/**
284 284
 			 * Fires while displaying donation form, credit card form fields.
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 			 *
288 288
 			 * @param int $form_id The form ID.
289 289
 			 */
290
-			do_action( 'give_cc_form', $form_id );
290
+			do_action('give_cc_form', $form_id);
291 291
 		}
292 292
 
293 293
 		/**
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 		 *
296 296
 		 * @since 1.7
297 297
 		 */
298
-		do_action( 'give_donation_form_after_cc_form', $form_id );
298
+		do_action('give_donation_form_after_cc_form', $form_id);
299 299
 
300 300
 	} else {
301 301
 		/**
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 		 *
304 304
 		 * @since 1.7
305 305
 		 */
306
-		do_action( 'give_donation_form_no_access', $form_id );
306
+		do_action('give_donation_form_no_access', $form_id);
307 307
 
308 308
 	}
309 309
 
@@ -312,10 +312,10 @@  discard block
 block discarded – undo
312 312
 	 *
313 313
 	 * @since 1.7
314 314
 	 */
315
-	do_action( 'give_donation_form_bottom', $form_id );
315
+	do_action('give_donation_form_bottom', $form_id);
316 316
 }
317 317
 
318
-add_action( 'give_donation_form', 'give_show_purchase_form' );
318
+add_action('give_donation_form', 'give_show_purchase_form');
319 319
 
320 320
 /**
321 321
  * Give Show Login/Register Form Fields.
@@ -326,11 +326,11 @@  discard block
 block discarded – undo
326 326
  *
327 327
  * @return void
328 328
  */
329
-function give_show_register_login_fields( $form_id ) {
329
+function give_show_register_login_fields($form_id) {
330 330
 
331
-	$show_register_form = give_show_login_register_option( $form_id );
331
+	$show_register_form = give_show_login_register_option($form_id);
332 332
 
333
-	if ( ( $show_register_form === 'registration' || ( $show_register_form === 'both' && ! isset( $_GET['login'] ) ) ) && ! is_user_logged_in() ) :
333
+	if (($show_register_form === 'registration' || ($show_register_form === 'both' && ! isset($_GET['login']))) && ! is_user_logged_in()) :
334 334
 		?>
335 335
 		<div id="give-checkout-login-register-<?php echo $form_id; ?>">
336 336
 			<?php
@@ -339,11 +339,11 @@  discard block
 block discarded – undo
339 339
 			 *
340 340
 			 * @since 1.7
341 341
 			 */
342
-			do_action( 'give_donation_form_register_fields', $form_id );
342
+			do_action('give_donation_form_register_fields', $form_id);
343 343
 			?>
344 344
 		</div>
345 345
 		<?php
346
-	elseif ( ( $show_register_form === 'login' || ( $show_register_form === 'both' && isset( $_GET['login'] ) ) ) && ! is_user_logged_in() ) :
346
+	elseif (($show_register_form === 'login' || ($show_register_form === 'both' && isset($_GET['login']))) && ! is_user_logged_in()) :
347 347
 		?>
348 348
 		<div id="give-checkout-login-register-<?php echo $form_id; ?>">
349 349
 			<?php
@@ -352,23 +352,23 @@  discard block
 block discarded – undo
352 352
 			 *
353 353
 			 * @since 1.7
354 354
 			 */
355
-			do_action( 'give_donation_form_login_fields', $form_id );
355
+			do_action('give_donation_form_login_fields', $form_id);
356 356
 			?>
357 357
 		</div>
358 358
 		<?php
359 359
 	endif;
360 360
 
361
-	if ( ( ! isset( $_GET['login'] ) && is_user_logged_in() ) || ! isset( $show_register_form ) || 'none' === $show_register_form || 'login' === $show_register_form ) {
361
+	if (( ! isset($_GET['login']) && is_user_logged_in()) || ! isset($show_register_form) || 'none' === $show_register_form || 'login' === $show_register_form) {
362 362
 		/**
363 363
 		 * Fire when user info render.
364 364
 		 *
365 365
 		 * @since 1.7
366 366
 		 */
367
-		do_action( 'give_donation_form_after_user_info', $form_id );
367
+		do_action('give_donation_form_after_user_info', $form_id);
368 368
 	}
369 369
 }
370 370
 
371
-add_action( 'give_donation_form_register_login_fields', 'give_show_register_login_fields' );
371
+add_action('give_donation_form_register_login_fields', 'give_show_register_login_fields');
372 372
 
373 373
 /**
374 374
  * Donation Amount Field.
@@ -382,16 +382,16 @@  discard block
 block discarded – undo
382 382
  *
383 383
  * @return void
384 384
  */
385
-function give_output_donation_amount_top( $form_id = 0, $args = array() ) {
385
+function give_output_donation_amount_top($form_id = 0, $args = array()) {
386 386
 
387 387
 	$give_options        = give_get_settings();
388
-	$variable_pricing    = give_has_variable_prices( $form_id );
389
-	$allow_custom_amount = get_post_meta( $form_id, '_give_custom_amount', true );
390
-	$currency_position   = isset( $give_options['currency_position'] ) ? $give_options['currency_position'] : 'before';
391
-	$symbol              = give_currency_symbol( give_get_currency() );
392
-	$currency_output     = '<span class="give-currency-symbol give-currency-position-' . $currency_position . '">' . $symbol . '</span>';
393
-	$default_amount      = give_format_amount( give_get_default_form_amount( $form_id ) );
394
-	$custom_amount_text  = get_post_meta( $form_id, '_give_custom_amount_text', true );
388
+	$variable_pricing    = give_has_variable_prices($form_id);
389
+	$allow_custom_amount = get_post_meta($form_id, '_give_custom_amount', true);
390
+	$currency_position   = isset($give_options['currency_position']) ? $give_options['currency_position'] : 'before';
391
+	$symbol              = give_currency_symbol(give_get_currency());
392
+	$currency_output     = '<span class="give-currency-symbol give-currency-position-'.$currency_position.'">'.$symbol.'</span>';
393
+	$default_amount      = give_format_amount(give_get_default_form_amount($form_id));
394
+	$custom_amount_text  = get_post_meta($form_id, '_give_custom_amount_text', true);
395 395
 
396 396
 	/**
397 397
 	 * Fires while displaying donation form, before donation level fields.
@@ -401,20 +401,20 @@  discard block
 block discarded – undo
401 401
 	 * @param int   $form_id The form ID.
402 402
 	 * @param array $args    An array of form arguments.
403 403
 	 */
404
-	do_action( 'give_before_donation_levels', $form_id, $args );
404
+	do_action('give_before_donation_levels', $form_id, $args);
405 405
 
406 406
 	//Set Price, No Custom Amount Allowed means hidden price field
407
-	if ( ! give_is_setting_enabled( $allow_custom_amount ) ) {
407
+	if ( ! give_is_setting_enabled($allow_custom_amount)) {
408 408
 		?>
409
-		<label class="give-hidden" for="give-amount-hidden"><?php esc_html_e( 'Donation Amount:', 'give' ); ?></label>
409
+		<label class="give-hidden" for="give-amount-hidden"><?php esc_html_e('Donation Amount:', 'give'); ?></label>
410 410
 		<input id="give-amount" class="give-amount-hidden" type="hidden" name="give-amount"
411 411
 		       value="<?php echo $default_amount; ?>" required aria-required="true"/>
412 412
 		<div class="set-price give-donation-amount form-row-wide">
413
-			<?php if ( $currency_position == 'before' ) {
413
+			<?php if ($currency_position == 'before') {
414 414
 				echo $currency_output;
415 415
 			} ?>
416 416
 			<span id="give-amount-text" class="give-text-input give-amount-top"><?php echo $default_amount; ?></span>
417
-			<?php if ( $currency_position == 'after' ) {
417
+			<?php if ($currency_position == 'after') {
418 418
 				echo $currency_output;
419 419
 			} ?>
420 420
 		</div>
@@ -424,13 +424,13 @@  discard block
 block discarded – undo
424 424
 		?>
425 425
 		<div class="give-total-wrap">
426 426
 			<div class="give-donation-amount form-row-wide">
427
-				<?php if ( $currency_position == 'before' ) {
427
+				<?php if ($currency_position == 'before') {
428 428
 					echo $currency_output;
429 429
 				} ?>
430
-				<label class="give-hidden" for="give-amount"><?php esc_html_e( 'Donation Amount:', 'give' ); ?></label>
430
+				<label class="give-hidden" for="give-amount"><?php esc_html_e('Donation Amount:', 'give'); ?></label>
431 431
 				<input class="give-text-input give-amount-top" id="give-amount" name="give-amount" type="tel"
432 432
 				       placeholder="" value="<?php echo $default_amount; ?>" autocomplete="off">
433
-				<?php if ( $currency_position == 'after' ) {
433
+				<?php if ($currency_position == 'after') {
434 434
 					echo $currency_output;
435 435
 				} ?>
436 436
 			</div>
@@ -445,16 +445,16 @@  discard block
 block discarded – undo
445 445
 	 * @param int   $form_id The form ID.
446 446
 	 * @param array $args    An array of form arguments.
447 447
 	 */
448
-	do_action( 'give_after_donation_amount', $form_id, $args );
448
+	do_action('give_after_donation_amount', $form_id, $args);
449 449
 
450 450
 	//Custom Amount Text
451
-	if ( ! $variable_pricing &&  give_is_setting_enabled( $allow_custom_amount ) && ! empty( $custom_amount_text ) ) { ?>
451
+	if ( ! $variable_pricing && give_is_setting_enabled($allow_custom_amount) && ! empty($custom_amount_text)) { ?>
452 452
 		<p class="give-custom-amount-text"><?php echo $custom_amount_text; ?></p>
453 453
 	<?php }
454 454
 
455 455
 	//Output Variable Pricing Levels.
456
-	if ( $variable_pricing ) {
457
-		give_output_levels( $form_id );
456
+	if ($variable_pricing) {
457
+		give_output_levels($form_id);
458 458
 	}
459 459
 
460 460
 	/**
@@ -465,10 +465,10 @@  discard block
 block discarded – undo
465 465
 	 * @param int   $form_id The form ID.
466 466
 	 * @param array $args    An array of form arguments.
467 467
 	 */
468
-	do_action( 'give_after_donation_levels', $form_id, $args );
468
+	do_action('give_after_donation_levels', $form_id, $args);
469 469
 }
470 470
 
471
-add_action( 'give_checkout_form_top', 'give_output_donation_amount_top', 10, 2 );
471
+add_action('give_checkout_form_top', 'give_output_donation_amount_top', 10, 2);
472 472
 
473 473
 /**
474 474
  * Outputs the Donation Levels in various formats such as dropdown, radios, and buttons.
@@ -479,32 +479,32 @@  discard block
 block discarded – undo
479 479
  *
480 480
  * @return string Donation levels.
481 481
  */
482
-function give_output_levels( $form_id ) {
482
+function give_output_levels($form_id) {
483 483
 
484 484
 	//Get variable pricing.
485
-	$prices             = apply_filters( 'give_form_variable_prices', give_get_variable_prices( $form_id ), $form_id );
486
-	$display_style      = get_post_meta( $form_id, '_give_display_style', true );
487
-	$custom_amount      = get_post_meta( $form_id, '_give_custom_amount', true );
488
-	$custom_amount_text = get_post_meta( $form_id, '_give_custom_amount_text', true );
489
-	if ( empty( $custom_amount_text ) ) {
490
-		$custom_amount_text = esc_html__( 'Give a Custom Amount', 'give' );
485
+	$prices             = apply_filters('give_form_variable_prices', give_get_variable_prices($form_id), $form_id);
486
+	$display_style      = get_post_meta($form_id, '_give_display_style', true);
487
+	$custom_amount      = get_post_meta($form_id, '_give_custom_amount', true);
488
+	$custom_amount_text = get_post_meta($form_id, '_give_custom_amount_text', true);
489
+	if (empty($custom_amount_text)) {
490
+		$custom_amount_text = esc_html__('Give a Custom Amount', 'give');
491 491
 	}
492 492
 
493 493
 	$output  = '';
494 494
 	$counter = 0;
495 495
 
496
-	switch ( $display_style ) {
496
+	switch ($display_style) {
497 497
 		case 'buttons':
498 498
 
499 499
 			$output .= '<ul id="give-donation-level-button-wrap" class="give-donation-levels-wrap give-list-inline">';
500 500
 
501
-			foreach ( $prices as $price ) {
502
-				$counter ++;
503
-				$level_text    = apply_filters( 'give_form_level_text', ! empty( $price['_give_text'] ) ? $price['_give_text'] : give_currency_filter( give_format_amount( $price['_give_amount'] ) ), $form_id, $price );
504
-				$level_classes = apply_filters( 'give_form_level_classes', 'give-donation-level-btn give-btn give-btn-level-' . $counter . ' ' . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? 'give-default-level' : '' ), $form_id, $price );
501
+			foreach ($prices as $price) {
502
+				$counter++;
503
+				$level_text    = apply_filters('give_form_level_text', ! empty($price['_give_text']) ? $price['_give_text'] : give_currency_filter(give_format_amount($price['_give_amount'])), $form_id, $price);
504
+				$level_classes = apply_filters('give_form_level_classes', 'give-donation-level-btn give-btn give-btn-level-'.$counter.' '.((isset($price['_give_default']) && $price['_give_default'] === 'default') ? 'give-default-level' : ''), $form_id, $price);
505 505
 
506 506
 				$output .= '<li>';
507
-				$output .= '<button type="button" data-price-id="' . $price['_give_id']['level_id'] . '" class=" ' . $level_classes . '" value="' . give_format_amount( $price['_give_amount'] ) . '">';
507
+				$output .= '<button type="button" data-price-id="'.$price['_give_id']['level_id'].'" class=" '.$level_classes.'" value="'.give_format_amount($price['_give_amount']).'">';
508 508
 				$output .= $level_text;
509 509
 				$output .= '</button>';
510 510
 				$output .= '</li>';
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
 			}
513 513
 
514 514
 			//Custom Amount.
515
-			if ( give_is_setting_enabled( $custom_amount ) && ! empty( $custom_amount_text ) ) {
515
+			if (give_is_setting_enabled($custom_amount) && ! empty($custom_amount_text)) {
516 516
 				$output .= '<li>';
517 517
 				$output .= '<button type="button" data-price-id="custom" class="give-donation-level-btn give-btn give-btn-level-custom" value="custom">';
518 518
 				$output .= $custom_amount_text;
@@ -528,23 +528,23 @@  discard block
 block discarded – undo
528 528
 
529 529
 			$output .= '<ul id="give-donation-level-radio-list" class="give-donation-levels-wrap">';
530 530
 
531
-			foreach ( $prices as $price ) {
532
-				$counter ++;
533
-				$level_text    = apply_filters( 'give_form_level_text', ! empty( $price['_give_text'] ) ? $price['_give_text'] : give_currency_filter( give_format_amount( $price['_give_amount'] ) ), $form_id, $price );
534
-				$level_classes = apply_filters( 'give_form_level_classes', 'give-radio-input give-radio-input-level give-radio-level-' . $counter . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? ' give-default-level' : '' ), $form_id, $price );
531
+			foreach ($prices as $price) {
532
+				$counter++;
533
+				$level_text    = apply_filters('give_form_level_text', ! empty($price['_give_text']) ? $price['_give_text'] : give_currency_filter(give_format_amount($price['_give_amount'])), $form_id, $price);
534
+				$level_classes = apply_filters('give_form_level_classes', 'give-radio-input give-radio-input-level give-radio-level-'.$counter.((isset($price['_give_default']) && $price['_give_default'] === 'default') ? ' give-default-level' : ''), $form_id, $price);
535 535
 
536 536
 				$output .= '<li>';
537
-				$output .= '<input type="radio" data-price-id="' . $price['_give_id']['level_id'] . '" class="' . $level_classes . '" name="give-radio-donation-level" id="give-radio-level-' . $counter . '" ' . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? 'checked="checked"' : '' ) . ' value="' . give_format_amount( $price['_give_amount'] ) . '">';
538
-				$output .= '<label for="give-radio-level-' . $counter . '">' . $level_text . '</label>';
537
+				$output .= '<input type="radio" data-price-id="'.$price['_give_id']['level_id'].'" class="'.$level_classes.'" name="give-radio-donation-level" id="give-radio-level-'.$counter.'" '.((isset($price['_give_default']) && $price['_give_default'] === 'default') ? 'checked="checked"' : '').' value="'.give_format_amount($price['_give_amount']).'">';
538
+				$output .= '<label for="give-radio-level-'.$counter.'">'.$level_text.'</label>';
539 539
 				$output .= '</li>';
540 540
 
541 541
 			}
542 542
 
543 543
 			//Custom Amount.
544
-			if ( give_is_setting_enabled( $custom_amount ) && ! empty( $custom_amount_text ) ) {
544
+			if (give_is_setting_enabled($custom_amount) && ! empty($custom_amount_text)) {
545 545
 				$output .= '<li>';
546 546
 				$output .= '<input type="radio" data-price-id="custom" class="give-radio-input give-radio-input-level give-radio-level-custom" name="give-radio-donation-level" id="give-radio-level-custom" value="custom">';
547
-				$output .= '<label for="give-radio-level-custom">' . $custom_amount_text . '</label>';
547
+				$output .= '<label for="give-radio-level-custom">'.$custom_amount_text.'</label>';
548 548
 				$output .= '</li>';
549 549
 			}
550 550
 
@@ -554,23 +554,23 @@  discard block
 block discarded – undo
554 554
 
555 555
 		case 'dropdown':
556 556
 
557
-			$output .= '<label for="give-donation-level" class="give-hidden">' . esc_html__( 'Choose Your Donation Amount', 'give' ) . ':</label>';
558
-			$output .= '<select id="give-donation-level-' . $form_id . '" class="give-select give-select-level give-donation-levels-wrap">';
557
+			$output .= '<label for="give-donation-level" class="give-hidden">'.esc_html__('Choose Your Donation Amount', 'give').':</label>';
558
+			$output .= '<select id="give-donation-level-'.$form_id.'" class="give-select give-select-level give-donation-levels-wrap">';
559 559
 
560 560
 			//first loop through prices.
561
-			foreach ( $prices as $price ) {
562
-				$level_text    = apply_filters( 'give_form_level_text', ! empty( $price['_give_text'] ) ? $price['_give_text'] : give_currency_filter( give_format_amount( $price['_give_amount'] ) ), $form_id, $price );
563
-				$level_classes = apply_filters( 'give_form_level_classes', 'give-donation-level-' . $form_id . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? ' give-default-level' : '' ), $form_id, $price );
561
+			foreach ($prices as $price) {
562
+				$level_text    = apply_filters('give_form_level_text', ! empty($price['_give_text']) ? $price['_give_text'] : give_currency_filter(give_format_amount($price['_give_amount'])), $form_id, $price);
563
+				$level_classes = apply_filters('give_form_level_classes', 'give-donation-level-'.$form_id.((isset($price['_give_default']) && $price['_give_default'] === 'default') ? ' give-default-level' : ''), $form_id, $price);
564 564
 
565
-				$output .= '<option data-price-id="' . $price['_give_id']['level_id'] . '" class="' . $level_classes . '" ' . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? 'selected="selected"' : '' ) . ' value="' . give_format_amount( $price['_give_amount'] ) . '">';
565
+				$output .= '<option data-price-id="'.$price['_give_id']['level_id'].'" class="'.$level_classes.'" '.((isset($price['_give_default']) && $price['_give_default'] === 'default') ? 'selected="selected"' : '').' value="'.give_format_amount($price['_give_amount']).'">';
566 566
 				$output .= $level_text;
567 567
 				$output .= '</option>';
568 568
 
569 569
 			}
570 570
 
571 571
 			//Custom Amount.
572
-			if ( give_is_setting_enabled( $custom_amount ) && ! empty( $custom_amount_text ) ) {
573
-				$output .= '<option data-price-id="custom" class="give-donation-level-custom" value="custom">' . $custom_amount_text . '</option>';
572
+			if (give_is_setting_enabled($custom_amount) && ! empty($custom_amount_text)) {
573
+				$output .= '<option data-price-id="custom" class="give-donation-level-custom" value="custom">'.$custom_amount_text.'</option>';
574 574
 			}
575 575
 
576 576
 			$output .= '</select>';
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
 			break;
579 579
 	}
580 580
 
581
-	echo apply_filters( 'give_form_level_output', $output, $form_id );
581
+	echo apply_filters('give_form_level_output', $output, $form_id);
582 582
 }
583 583
 
584 584
 /**
@@ -593,27 +593,27 @@  discard block
 block discarded – undo
593 593
  *
594 594
  * @return string Checkout button.
595 595
  */
596
-function give_display_checkout_button( $form_id, $args ) {
596
+function give_display_checkout_button($form_id, $args) {
597 597
 
598
-	$display_option = ( isset( $args['display_style'] ) && ! empty( $args['display_style'] ) )
598
+	$display_option = (isset($args['display_style']) && ! empty($args['display_style']))
599 599
 		? $args['display_style']
600
-		: get_post_meta( $form_id, '_give_payment_display', true );
600
+		: get_post_meta($form_id, '_give_payment_display', true);
601 601
 
602
-	if( 'button' === $display_option ) {
602
+	if ('button' === $display_option) {
603 603
 		$display_option = 'modal';
604
-	}elseif ( $display_option === 'onpage' ) {
604
+	}elseif ($display_option === 'onpage') {
605 605
 		return '';
606 606
 	}
607 607
 
608
-	$display_label_field = get_post_meta( $form_id, '_give_reveal_label', true );
609
-	$display_label       = ( ! empty( $display_label_field ) ? $display_label_field : esc_html__( 'Donate Now', 'give' ) );
608
+	$display_label_field = get_post_meta($form_id, '_give_reveal_label', true);
609
+	$display_label       = ( ! empty($display_label_field) ? $display_label_field : esc_html__('Donate Now', 'give'));
610 610
 
611
-	$output = '<button type="button" class="give-btn give-btn-' . $display_option . '">' . $display_label . '</button>';
611
+	$output = '<button type="button" class="give-btn give-btn-'.$display_option.'">'.$display_label.'</button>';
612 612
 
613
-	echo apply_filters( 'give_display_checkout_button', $output );
613
+	echo apply_filters('give_display_checkout_button', $output);
614 614
 }
615 615
 
616
-add_action( 'give_after_donation_levels', 'give_display_checkout_button', 10, 2 );
616
+add_action('give_after_donation_levels', 'give_display_checkout_button', 10, 2);
617 617
 
618 618
 /**
619 619
  * Shows the User Info fields in the Personal Info box, more fields can be added via the hooks provided.
@@ -624,57 +624,57 @@  discard block
 block discarded – undo
624 624
  *
625 625
  * @return void
626 626
  */
627
-function give_user_info_fields( $form_id ) {
627
+function give_user_info_fields($form_id) {
628 628
 	// Get user info.
629
-	$give_user_info = _give_get_prefill_form_field_values( $form_id );
629
+	$give_user_info = _give_get_prefill_form_field_values($form_id);
630 630
 
631 631
 	/**
632 632
 	 * Fire before user personal information fields
633 633
 	 *
634 634
 	 * @since 1.7
635 635
 	 */
636
-	do_action( 'give_donation_form_before_personal_info', $form_id );
636
+	do_action('give_donation_form_before_personal_info', $form_id);
637 637
 	?>
638 638
 	<fieldset id="give_checkout_user_info">
639
-		<legend><?php echo apply_filters( 'give_checkout_personal_info_text', esc_html__( 'Personal Info', 'give' ) ); ?></legend>
639
+		<legend><?php echo apply_filters('give_checkout_personal_info_text', esc_html__('Personal Info', 'give')); ?></legend>
640 640
 		<p id="give-first-name-wrap" class="form-row form-row-first form-row-responsive">
641 641
 			<label class="give-label" for="give-first">
642
-				<?php esc_html_e( 'First Name', 'give' ); ?>
643
-				<?php if ( give_field_is_required( 'give_first', $form_id ) ) : ?>
642
+				<?php esc_html_e('First Name', 'give'); ?>
643
+				<?php if (give_field_is_required('give_first', $form_id)) : ?>
644 644
 					<span class="give-required-indicator">*</span>
645 645
 				<?php endif ?>
646 646
 				<span class="give-tooltip give-icon give-icon-question"
647
-				      data-tooltip="<?php esc_attr_e( 'We will use this to personalize your account experience.', 'give' ); ?>"></span>
647
+				      data-tooltip="<?php esc_attr_e('We will use this to personalize your account experience.', 'give'); ?>"></span>
648 648
 			</label>
649 649
 			<input
650 650
 				class="give-input required"
651 651
 				type="text"
652 652
 				name="give_first"
653
-				placeholder="<?php esc_attr_e( 'First Name', 'give' ); ?>"
653
+				placeholder="<?php esc_attr_e('First Name', 'give'); ?>"
654 654
 				id="give-first"
655
-				value="<?php echo isset( $give_user_info['give_first'] ) ? $give_user_info['give_first'] : ''; ?>"
656
-				<?php echo( give_field_is_required( 'give_first', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
655
+				value="<?php echo isset($give_user_info['give_first']) ? $give_user_info['give_first'] : ''; ?>"
656
+				<?php echo(give_field_is_required('give_first', $form_id) ? ' required aria-required="true" ' : ''); ?>
657 657
 			/>
658 658
 		</p>
659 659
 
660 660
 		<p id="give-last-name-wrap" class="form-row form-row-last form-row-responsive">
661 661
 			<label class="give-label" for="give-last">
662
-				<?php esc_html_e( 'Last Name', 'give' ); ?>
663
-				<?php if ( give_field_is_required( 'give_last', $form_id ) ) : ?>
662
+				<?php esc_html_e('Last Name', 'give'); ?>
663
+				<?php if (give_field_is_required('give_last', $form_id)) : ?>
664 664
 					<span class="give-required-indicator">*</span>
665 665
 				<?php endif ?>
666 666
 				<span class="give-tooltip give-icon give-icon-question"
667
-				      data-tooltip="<?php esc_attr_e( 'We will use this as well to personalize your account experience.', 'give' ); ?>"></span>
667
+				      data-tooltip="<?php esc_attr_e('We will use this as well to personalize your account experience.', 'give'); ?>"></span>
668 668
 			</label>
669 669
 
670 670
 			<input
671
-				class="give-input<?php echo( give_field_is_required( 'give_last', $form_id ) ? ' required' : '' ); ?>"
671
+				class="give-input<?php echo(give_field_is_required('give_last', $form_id) ? ' required' : ''); ?>"
672 672
 				type="text"
673 673
 				name="give_last"
674 674
 				id="give-last"
675
-				placeholder="<?php esc_attr_e( 'Last Name', 'give' ); ?>"
676
-				value="<?php echo isset( $give_user_info['give_last'] ) ? $give_user_info['give_last'] : ''; ?>"
677
-				<?php echo( give_field_is_required( 'give_last', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
675
+				placeholder="<?php esc_attr_e('Last Name', 'give'); ?>"
676
+				value="<?php echo isset($give_user_info['give_last']) ? $give_user_info['give_last'] : ''; ?>"
677
+				<?php echo(give_field_is_required('give_last', $form_id) ? ' required aria-required="true" ' : ''); ?>
678 678
 			/>
679 679
 		</p>
680 680
 
@@ -684,26 +684,26 @@  discard block
 block discarded – undo
684 684
 		 *
685 685
 		 * @since 1.7
686 686
 		 */
687
-		do_action( 'give_donation_form_before_email', $form_id );
687
+		do_action('give_donation_form_before_email', $form_id);
688 688
 		?>
689 689
 		<p id="give-email-wrap" class="form-row form-row-wide">
690 690
 			<label class="give-label" for="give-email">
691
-				<?php esc_html_e( 'Email Address', 'give' ); ?>
692
-				<?php if ( give_field_is_required( 'give_email', $form_id ) ) { ?>
691
+				<?php esc_html_e('Email Address', 'give'); ?>
692
+				<?php if (give_field_is_required('give_email', $form_id)) { ?>
693 693
 					<span class="give-required-indicator">*</span>
694 694
 				<?php } ?>
695 695
 				<span class="give-tooltip give-icon give-icon-question"
696
-				      data-tooltip="<?php esc_attr_e( 'We will send the donation receipt to this address.', 'give' ); ?>"></span>
696
+				      data-tooltip="<?php esc_attr_e('We will send the donation receipt to this address.', 'give'); ?>"></span>
697 697
 			</label>
698 698
 
699 699
 			<input
700 700
 				class="give-input required"
701 701
 				type="email"
702 702
 				name="give_email"
703
-				placeholder="<?php esc_attr_e( 'Email Address', 'give' ); ?>"
703
+				placeholder="<?php esc_attr_e('Email Address', 'give'); ?>"
704 704
 				id="give-email"
705
-				value="<?php echo isset( $give_user_info['give_email'] ) ? $give_user_info['give_email'] : ''; ?>"
706
-				<?php echo( give_field_is_required( 'give_email', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
705
+				value="<?php echo isset($give_user_info['give_email']) ? $give_user_info['give_email'] : ''; ?>"
706
+				<?php echo(give_field_is_required('give_email', $form_id) ? ' required aria-required="true" ' : ''); ?>
707 707
 			/>
708 708
 
709 709
 		</p>
@@ -713,14 +713,14 @@  discard block
 block discarded – undo
713 713
 		 *
714 714
 		 * @since 1.7
715 715
 		 */
716
-		do_action( 'give_donation_form_after_email', $form_id );
716
+		do_action('give_donation_form_after_email', $form_id);
717 717
 
718 718
 		/**
719 719
 		 * Fire after personal email field
720 720
 		 *
721 721
 		 * @since 1.7
722 722
 		 */
723
-		do_action( 'give_donation_form_user_info', $form_id );
723
+		do_action('give_donation_form_user_info', $form_id);
724 724
 		?>
725 725
 	</fieldset>
726 726
 	<?php
@@ -729,11 +729,11 @@  discard block
 block discarded – undo
729 729
 	 *
730 730
 	 * @since 1.7
731 731
 	 */
732
-	do_action( 'give_donation_form_after_personal_info', $form_id );
732
+	do_action('give_donation_form_after_personal_info', $form_id);
733 733
 }
734 734
 
735
-add_action( 'give_donation_form_after_user_info', 'give_user_info_fields' );
736
-add_action( 'give_register_fields_before', 'give_user_info_fields' );
735
+add_action('give_donation_form_after_user_info', 'give_user_info_fields');
736
+add_action('give_register_fields_before', 'give_user_info_fields');
737 737
 
738 738
 /**
739 739
  * Renders the credit card info form.
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
  *
745 745
  * @return void
746 746
  */
747
-function give_get_cc_form( $form_id ) {
747
+function give_get_cc_form($form_id) {
748 748
 
749 749
 	ob_start();
750 750
 
@@ -755,53 +755,53 @@  discard block
 block discarded – undo
755 755
 	 *
756 756
 	 * @param int $form_id The form ID.
757 757
 	 */
758
-	do_action( 'give_before_cc_fields', $form_id );
758
+	do_action('give_before_cc_fields', $form_id);
759 759
 	?>
760 760
 	<fieldset id="give_cc_fields-<?php echo $form_id ?>" class="give-do-validate">
761
-		<legend><?php echo apply_filters( 'give_credit_card_fieldset_heading', esc_html__( 'Credit Card Info', 'give' ) ); ?></legend>
762
-		<?php if ( is_ssl() ) : ?>
761
+		<legend><?php echo apply_filters('give_credit_card_fieldset_heading', esc_html__('Credit Card Info', 'give')); ?></legend>
762
+		<?php if (is_ssl()) : ?>
763 763
 			<div id="give_secure_site_wrapper-<?php echo $form_id ?>">
764 764
 				<span class="give-icon padlock"></span>
765
-				<span><?php esc_html_e( 'This is a secure SSL encrypted payment.', 'give' ); ?></span>
765
+				<span><?php esc_html_e('This is a secure SSL encrypted payment.', 'give'); ?></span>
766 766
 			</div>
767 767
 		<?php endif; ?>
768 768
 		<p id="give-card-number-wrap-<?php echo $form_id ?>" class="form-row form-row-two-thirds form-row-responsive">
769 769
 			<label for="card_number-<?php echo $form_id ?>" class="give-label">
770
-				<?php esc_html_e( 'Card Number', 'give' ); ?>
770
+				<?php esc_html_e('Card Number', 'give'); ?>
771 771
 				<span class="give-required-indicator">*</span>
772 772
 				<span class="give-tooltip give-icon give-icon-question"
773
-				      data-tooltip="<?php esc_attr_e( 'The (typically) 16 digits on the front of your credit card.', 'give' ); ?>"></span>
773
+				      data-tooltip="<?php esc_attr_e('The (typically) 16 digits on the front of your credit card.', 'give'); ?>"></span>
774 774
 				<span class="card-type"></span>
775 775
 			</label>
776 776
 
777 777
 			<input type="tel" autocomplete="off" name="card_number" id="card_number-<?php echo $form_id ?>"
778
-			       class="card-number give-input required" placeholder="<?php esc_attr_e( 'Card number', 'give' ); ?>"
778
+			       class="card-number give-input required" placeholder="<?php esc_attr_e('Card number', 'give'); ?>"
779 779
 			       required aria-required="true"/>
780 780
 		</p>
781 781
 
782 782
 		<p id="give-card-cvc-wrap-<?php echo $form_id ?>" class="form-row form-row-one-third form-row-responsive">
783 783
 			<label for="card_cvc-<?php echo $form_id ?>" class="give-label">
784
-				<?php esc_html_e( 'CVC', 'give' ); ?>
784
+				<?php esc_html_e('CVC', 'give'); ?>
785 785
 				<span class="give-required-indicator">*</span>
786 786
 				<span class="give-tooltip give-icon give-icon-question"
787
-				      data-tooltip="<?php esc_attr_e( 'The 3 digit (back) or 4 digit (front) value on your card.', 'give' ); ?>"></span>
787
+				      data-tooltip="<?php esc_attr_e('The 3 digit (back) or 4 digit (front) value on your card.', 'give'); ?>"></span>
788 788
 			</label>
789 789
 
790 790
 			<input type="tel" size="4" autocomplete="off" name="card_cvc" id="card_cvc-<?php echo $form_id ?>"
791
-			       class="card-cvc give-input required" placeholder="<?php esc_attr_e( 'Security code', 'give' ); ?>"
791
+			       class="card-cvc give-input required" placeholder="<?php esc_attr_e('Security code', 'give'); ?>"
792 792
 			       required aria-required="true"/>
793 793
 		</p>
794 794
 
795 795
 		<p id="give-card-name-wrap-<?php echo $form_id ?>" class="form-row form-row-two-thirds form-row-responsive">
796 796
 			<label for="card_name-<?php echo $form_id ?>" class="give-label">
797
-				<?php esc_html_e( 'Name on the Card', 'give' ); ?>
797
+				<?php esc_html_e('Name on the Card', 'give'); ?>
798 798
 				<span class="give-required-indicator">*</span>
799 799
 				<span class="give-tooltip give-icon give-icon-question"
800
-				      data-tooltip="<?php esc_attr_e( 'The name printed on the front of your credit card.', 'give' ); ?>"></span>
800
+				      data-tooltip="<?php esc_attr_e('The name printed on the front of your credit card.', 'give'); ?>"></span>
801 801
 			</label>
802 802
 
803 803
 			<input type="text" autocomplete="off" name="card_name" id="card_name-<?php echo $form_id ?>"
804
-			       class="card-name give-input required" placeholder="<?php esc_attr_e( 'Card name', 'give' ); ?>"
804
+			       class="card-name give-input required" placeholder="<?php esc_attr_e('Card name', 'give'); ?>"
805 805
 			       required aria-required="true"/>
806 806
 		</p>
807 807
 		<?php
@@ -812,14 +812,14 @@  discard block
 block discarded – undo
812 812
 		 *
813 813
 		 * @param int $form_id The form ID.
814 814
 		 */
815
-		do_action( 'give_before_cc_expiration' );
815
+		do_action('give_before_cc_expiration');
816 816
 		?>
817 817
 		<p class="card-expiration form-row form-row-one-third form-row-responsive">
818 818
 			<label for="card_expiry-<?php echo $form_id ?>" class="give-label">
819
-				<?php esc_html_e( 'Expiration', 'give' ); ?>
819
+				<?php esc_html_e('Expiration', 'give'); ?>
820 820
 				<span class="give-required-indicator">*</span>
821 821
 				<span class="give-tooltip give-icon give-icon-question"
822
-				      data-tooltip="<?php esc_attr_e( 'The date your credit card expires, typically on the front of the card.', 'give' ); ?>"></span>
822
+				      data-tooltip="<?php esc_attr_e('The date your credit card expires, typically on the front of the card.', 'give'); ?>"></span>
823 823
 			</label>
824 824
 
825 825
 			<input type="hidden" id="card_exp_month-<?php echo $form_id ?>" name="card_exp_month"
@@ -828,7 +828,7 @@  discard block
 block discarded – undo
828 828
 			       class="card-expiry-year"/>
829 829
 
830 830
 			<input type="tel" autocomplete="off" name="card_expiry" id="card_expiry-<?php echo $form_id ?>"
831
-			       class="card-expiry give-input required" placeholder="<?php esc_attr_e( 'MM / YY', 'give' ); ?>"
831
+			       class="card-expiry give-input required" placeholder="<?php esc_attr_e('MM / YY', 'give'); ?>"
832 832
 			       required aria-required="true"/>
833 833
 		</p>
834 834
 		<?php
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
 		 *
840 840
 		 * @param int $form_id The form ID.
841 841
 		 */
842
-		do_action( 'give_after_cc_expiration', $form_id );
842
+		do_action('give_after_cc_expiration', $form_id);
843 843
 		?>
844 844
 	</fieldset>
845 845
 	<?php
@@ -850,12 +850,12 @@  discard block
 block discarded – undo
850 850
 	 *
851 851
 	 * @param int $form_id The form ID.
852 852
 	 */
853
-	do_action( 'give_after_cc_fields', $form_id );
853
+	do_action('give_after_cc_fields', $form_id);
854 854
 
855 855
 	echo ob_get_clean();
856 856
 }
857 857
 
858
-add_action( 'give_cc_form', 'give_get_cc_form' );
858
+add_action('give_cc_form', 'give_get_cc_form');
859 859
 
860 860
 /**
861 861
  * Outputs the default credit card address fields.
@@ -866,24 +866,24 @@  discard block
 block discarded – undo
866 866
  *
867 867
  * @return void
868 868
  */
869
-function give_default_cc_address_fields( $form_id ) {
869
+function give_default_cc_address_fields($form_id) {
870 870
 	// Get user info.
871
-	$give_user_info = _give_get_prefill_form_field_values( $form_id );
871
+	$give_user_info = _give_get_prefill_form_field_values($form_id);
872 872
 
873 873
 	$logged_in = is_user_logged_in();
874 874
 
875
-	if ( $logged_in ) {
876
-		$user_address = get_user_meta( get_current_user_id(), '_give_user_address', true );
875
+	if ($logged_in) {
876
+		$user_address = get_user_meta(get_current_user_id(), '_give_user_address', true);
877 877
 	}
878
-	$line1 = $logged_in && ! empty( $user_address['line1'] ) ? $user_address['line1'] : '';
879
-	$line2 = $logged_in && ! empty( $user_address['line2'] ) ? $user_address['line2'] : '';
880
-	$city  = $logged_in && ! empty( $user_address['city'] ) ? $user_address['city'] : '';
881
-	$zip   = $logged_in && ! empty( $user_address['zip'] ) ? $user_address['zip'] : '';
878
+	$line1 = $logged_in && ! empty($user_address['line1']) ? $user_address['line1'] : '';
879
+	$line2 = $logged_in && ! empty($user_address['line2']) ? $user_address['line2'] : '';
880
+	$city  = $logged_in && ! empty($user_address['city']) ? $user_address['city'] : '';
881
+	$zip   = $logged_in && ! empty($user_address['zip']) ? $user_address['zip'] : '';
882 882
 
883 883
 	ob_start();
884 884
 	?>
885 885
 	<fieldset id="give_cc_address" class="cc-address">
886
-		<legend><?php echo apply_filters( 'give_billing_details_fieldset_heading', esc_html__( 'Billing Details', 'give' ) ); ?></legend>
886
+		<legend><?php echo apply_filters('give_billing_details_fieldset_heading', esc_html__('Billing Details', 'give')); ?></legend>
887 887
 		<?php
888 888
 		/**
889 889
 		 * Fires while rendering credit card billing form, before address fields.
@@ -892,79 +892,79 @@  discard block
 block discarded – undo
892 892
 		 *
893 893
 		 * @param int $form_id The form ID.
894 894
 		 */
895
-		do_action( 'give_cc_billing_top' );
895
+		do_action('give_cc_billing_top');
896 896
 		?>
897 897
 		<p id="give-card-address-wrap" class="form-row form-row-wide">
898 898
 			<label for="card_address" class="give-label">
899
-				<?php esc_html_e( 'Address 1', 'give' ); ?>
899
+				<?php esc_html_e('Address 1', 'give'); ?>
900 900
 				<?php
901
-				if ( give_field_is_required( 'card_address', $form_id ) ) : ?>
901
+				if (give_field_is_required('card_address', $form_id)) : ?>
902 902
 					<span class="give-required-indicator">*</span>
903 903
 				<?php endif; ?>
904 904
 				<span class="give-tooltip give-icon give-icon-question"
905
-				      data-tooltip="<?php esc_attr_e( 'The primary billing address for your credit card.', 'give' ); ?>"></span>
905
+				      data-tooltip="<?php esc_attr_e('The primary billing address for your credit card.', 'give'); ?>"></span>
906 906
 			</label>
907 907
 
908 908
 			<input
909 909
 				type="text"
910 910
 				id="card_address"
911 911
 				name="card_address"
912
-				class="card-address give-input<?php echo( give_field_is_required( 'card_address', $form_id ) ? ' required' : '' ); ?>"
913
-				placeholder="<?php esc_attr_e( 'Address line 1', 'give' ); ?>"
914
-				value="<?php echo isset( $give_user_info['card_address'] ) ? $give_user_info['card_address'] : ''; ?>"
915
-				<?php echo( give_field_is_required( 'card_address', $form_id ) ? '  required aria-required="true" ' : '' ); ?>
912
+				class="card-address give-input<?php echo(give_field_is_required('card_address', $form_id) ? ' required' : ''); ?>"
913
+				placeholder="<?php esc_attr_e('Address line 1', 'give'); ?>"
914
+				value="<?php echo isset($give_user_info['card_address']) ? $give_user_info['card_address'] : ''; ?>"
915
+				<?php echo(give_field_is_required('card_address', $form_id) ? '  required aria-required="true" ' : ''); ?>
916 916
 			/>
917 917
 		</p>
918 918
 
919 919
 		<p id="give-card-address-2-wrap" class="form-row form-row-wide">
920 920
 			<label for="card_address_2" class="give-label">
921
-				<?php esc_html_e( 'Address 2', 'give' ); ?>
922
-				<?php if ( give_field_is_required( 'card_address_2', $form_id ) ) : ?>
921
+				<?php esc_html_e('Address 2', 'give'); ?>
922
+				<?php if (give_field_is_required('card_address_2', $form_id)) : ?>
923 923
 					<span class="give-required-indicator">*</span>
924 924
 				<?php endif; ?>
925 925
 				<span class="give-tooltip give-icon give-icon-question"
926
-				      data-tooltip="<?php esc_attr_e( '(optional) The suite, apt no, PO box, etc, associated with your billing address.', 'give' ); ?>"></span>
926
+				      data-tooltip="<?php esc_attr_e('(optional) The suite, apt no, PO box, etc, associated with your billing address.', 'give'); ?>"></span>
927 927
 			</label>
928 928
 
929 929
 			<input
930 930
 				type="text"
931 931
 				id="card_address_2"
932 932
 				name="card_address_2"
933
-				class="card-address-2 give-input<?php echo( give_field_is_required( 'card_address_2', $form_id ) ? ' required' : '' ); ?>"
934
-				placeholder="<?php esc_attr_e( 'Address line 2', 'give' ); ?>"
935
-				value="<?php echo isset( $give_user_info['card_address_2'] ) ? $give_user_info['card_address_2'] : ''; ?>"
936
-				<?php echo( give_field_is_required( 'card_address_2', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
933
+				class="card-address-2 give-input<?php echo(give_field_is_required('card_address_2', $form_id) ? ' required' : ''); ?>"
934
+				placeholder="<?php esc_attr_e('Address line 2', 'give'); ?>"
935
+				value="<?php echo isset($give_user_info['card_address_2']) ? $give_user_info['card_address_2'] : ''; ?>"
936
+				<?php echo(give_field_is_required('card_address_2', $form_id) ? ' required aria-required="true" ' : ''); ?>
937 937
 			/>
938 938
 		</p>
939 939
 
940 940
 		<p id="give-card-city-wrap" class="form-row form-row-first form-row-responsive">
941 941
 			<label for="card_city" class="give-label">
942
-				<?php esc_html_e( 'City', 'give' ); ?>
943
-				<?php if ( give_field_is_required( 'card_city', $form_id ) ) : ?>
942
+				<?php esc_html_e('City', 'give'); ?>
943
+				<?php if (give_field_is_required('card_city', $form_id)) : ?>
944 944
 					<span class="give-required-indicator">*</span>
945 945
 				<?php endif; ?>
946 946
 				<span class="give-tooltip give-icon give-icon-question"
947
-				      data-tooltip="<?php esc_attr_e( 'The city for your billing address.', 'give' ); ?>"></span>
947
+				      data-tooltip="<?php esc_attr_e('The city for your billing address.', 'give'); ?>"></span>
948 948
 			</label>
949 949
 			<input
950 950
 				type="text"
951 951
 				id="card_city"
952 952
 				name="card_city"
953
-				class="card-city give-input<?php echo( give_field_is_required( 'card_city', $form_id ) ? ' required' : '' ); ?>"
954
-				placeholder="<?php esc_attr_e( 'City', 'give' ); ?>"
955
-				value="<?php echo isset( $give_user_info['card_city'] ) ? $give_user_info['card_city'] : ''; ?>"
956
-				<?php echo( give_field_is_required( 'card_city', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
953
+				class="card-city give-input<?php echo(give_field_is_required('card_city', $form_id) ? ' required' : ''); ?>"
954
+				placeholder="<?php esc_attr_e('City', 'give'); ?>"
955
+				value="<?php echo isset($give_user_info['card_city']) ? $give_user_info['card_city'] : ''; ?>"
956
+				<?php echo(give_field_is_required('card_city', $form_id) ? ' required aria-required="true" ' : ''); ?>
957 957
 			/>
958 958
 		</p>
959 959
 
960 960
 		<p id="give-card-zip-wrap" class="form-row form-row-last form-row-responsive">
961 961
 			<label for="card_zip" class="give-label">
962
-				<?php esc_html_e( 'Zip / Postal Code', 'give' ); ?>
963
-				<?php if ( give_field_is_required( 'card_zip', $form_id ) ) : ?>
962
+				<?php esc_html_e('Zip / Postal Code', 'give'); ?>
963
+				<?php if (give_field_is_required('card_zip', $form_id)) : ?>
964 964
 					<span class="give-required-indicator">*</span>
965 965
 				<?php endif; ?>
966 966
 				<span class="give-tooltip give-icon give-icon-question"
967
-				      data-tooltip="<?php esc_attr_e( 'The zip or postal code for your billing address.', 'give' ); ?>"></span>
967
+				      data-tooltip="<?php esc_attr_e('The zip or postal code for your billing address.', 'give'); ?>"></span>
968 968
 			</label>
969 969
 
970 970
 			<input
@@ -972,40 +972,40 @@  discard block
 block discarded – undo
972 972
 				size="4"
973 973
 				id="card_zip"
974 974
 				name="card_zip"
975
-				class="card-zip give-input<?php echo( give_field_is_required( 'card_zip', $form_id ) ? ' required' : '' ); ?>"
976
-				placeholder="<?php esc_attr_e( 'Zip / Postal Code', 'give' ); ?>"
977
-				value="<?php echo isset( $give_user_info['card_zip'] ) ? $give_user_info['card_zip'] : ''; ?>"
978
-				<?php echo( give_field_is_required( 'card_zip', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
975
+				class="card-zip give-input<?php echo(give_field_is_required('card_zip', $form_id) ? ' required' : ''); ?>"
976
+				placeholder="<?php esc_attr_e('Zip / Postal Code', 'give'); ?>"
977
+				value="<?php echo isset($give_user_info['card_zip']) ? $give_user_info['card_zip'] : ''; ?>"
978
+				<?php echo(give_field_is_required('card_zip', $form_id) ? ' required aria-required="true" ' : ''); ?>
979 979
 			/>
980 980
 		</p>
981 981
 
982 982
 		<p id="give-card-country-wrap" class="form-row form-row-first form-row-responsive">
983 983
 			<label for="billing_country" class="give-label">
984
-				<?php esc_html_e( 'Country', 'give' ); ?>
985
-				<?php if ( give_field_is_required( 'billing_country', $form_id ) ) : ?>
984
+				<?php esc_html_e('Country', 'give'); ?>
985
+				<?php if (give_field_is_required('billing_country', $form_id)) : ?>
986 986
 					<span class="give-required-indicator">*</span>
987 987
 				<?php endif; ?>
988 988
 				<span class="give-tooltip give-icon give-icon-question"
989
-				      data-tooltip="<?php esc_attr_e( 'The country for your billing address.', 'give' ); ?>"></span>
989
+				      data-tooltip="<?php esc_attr_e('The country for your billing address.', 'give'); ?>"></span>
990 990
 			</label>
991 991
 
992 992
 			<select
993 993
 				name="billing_country"
994 994
 				id="billing_country"
995
-				class="billing-country billing_country give-select<?php echo( give_field_is_required( 'billing_country', $form_id ) ? ' required' : '' ); ?>"
996
-				<?php echo( give_field_is_required( 'billing_country', $form_id ) ? ' required aria-required="true" ' : '' ); ?>
995
+				class="billing-country billing_country give-select<?php echo(give_field_is_required('billing_country', $form_id) ? ' required' : ''); ?>"
996
+				<?php echo(give_field_is_required('billing_country', $form_id) ? ' required aria-required="true" ' : ''); ?>
997 997
 			>
998 998
 				<?php
999 999
 
1000 1000
 				$selected_country = give_get_country();
1001 1001
 
1002
-				if ( ! empty( $give_user_info['billing_country'] ) && '*' !== $give_user_info['billing_country'] ) {
1002
+				if ( ! empty($give_user_info['billing_country']) && '*' !== $give_user_info['billing_country']) {
1003 1003
 					$selected_country = $give_user_info['billing_country'];
1004 1004
 				}
1005 1005
 
1006 1006
 				$countries = give_get_country_list();
1007
-				foreach ( $countries as $country_code => $country ) {
1008
-					echo '<option value="' . esc_attr( $country_code ) . '"' . selected( $country_code, $selected_country, false ) . '>' . $country . '</option>';
1007
+				foreach ($countries as $country_code => $country) {
1008
+					echo '<option value="'.esc_attr($country_code).'"'.selected($country_code, $selected_country, false).'>'.$country.'</option>';
1009 1009
 				}
1010 1010
 				?>
1011 1011
 			</select>
@@ -1013,37 +1013,37 @@  discard block
 block discarded – undo
1013 1013
 
1014 1014
 		<p id="give-card-state-wrap" class="form-row form-row-last form-row-responsive">
1015 1015
 			<label for="card_state" class="give-label">
1016
-				<?php esc_html_e( 'State / Province', 'give' ); ?>
1017
-				<?php if ( give_field_is_required( 'card_state', $form_id ) ) : ?>
1016
+				<?php esc_html_e('State / Province', 'give'); ?>
1017
+				<?php if (give_field_is_required('card_state', $form_id)) : ?>
1018 1018
 					<span class="give-required-indicator">*</span>
1019 1019
 				<?php endif; ?>
1020 1020
 				<span class="give-tooltip give-icon give-icon-question"
1021
-				      data-tooltip="<?php esc_attr_e( 'The state or province for your billing address.', 'give' ); ?>"></span>
1021
+				      data-tooltip="<?php esc_attr_e('The state or province for your billing address.', 'give'); ?>"></span>
1022 1022
 			</label>
1023 1023
 
1024 1024
 			<?php
1025 1025
 			$selected_state = give_get_state();
1026
-			$states         = give_get_states( $selected_country );
1026
+			$states         = give_get_states($selected_country);
1027 1027
 
1028
-			if ( ! empty( $give_user_info['card_state'] ) ) {
1028
+			if ( ! empty($give_user_info['card_state'])) {
1029 1029
 				$selected_state = $give_user_info['card_state'];
1030 1030
 			}
1031 1031
 
1032
-			if ( ! empty( $states ) ) : ?>
1032
+			if ( ! empty($states)) : ?>
1033 1033
 				<select
1034 1034
 					name="card_state"
1035 1035
 					id="card_state"
1036
-					class="card_state give-select<?php echo( give_field_is_required( 'card_state', $form_id ) ? ' required' : '' ); ?>"
1037
-					<?php echo( give_field_is_required( 'card_state', $form_id ) ? ' required aria-required="true" ' : '' ); ?>>
1036
+					class="card_state give-select<?php echo(give_field_is_required('card_state', $form_id) ? ' required' : ''); ?>"
1037
+					<?php echo(give_field_is_required('card_state', $form_id) ? ' required aria-required="true" ' : ''); ?>>
1038 1038
 					<?php
1039
-					foreach ( $states as $state_code => $state ) {
1040
-						echo '<option value="' . $state_code . '"' . selected( $state_code, $selected_state, false ) . '>' . $state . '</option>';
1039
+					foreach ($states as $state_code => $state) {
1040
+						echo '<option value="'.$state_code.'"'.selected($state_code, $selected_state, false).'>'.$state.'</option>';
1041 1041
 					}
1042 1042
 					?>
1043 1043
 				</select>
1044 1044
 			<?php else : ?>
1045 1045
 				<input type="text" size="6" name="card_state" id="card_state" class="card_state give-input"
1046
-				       placeholder="<?php esc_attr_e( 'State / Province', 'give' ); ?>"/>
1046
+				       placeholder="<?php esc_attr_e('State / Province', 'give'); ?>"/>
1047 1047
 			<?php endif; ?>
1048 1048
 		</p>
1049 1049
 		<?php
@@ -1054,14 +1054,14 @@  discard block
 block discarded – undo
1054 1054
 		 *
1055 1055
 		 * @param int $form_id The form ID.
1056 1056
 		 */
1057
-		do_action( 'give_cc_billing_bottom' );
1057
+		do_action('give_cc_billing_bottom');
1058 1058
 		?>
1059 1059
 	</fieldset>
1060 1060
 	<?php
1061 1061
 	echo ob_get_clean();
1062 1062
 }
1063 1063
 
1064
-add_action( 'give_after_cc_fields', 'give_default_cc_address_fields' );
1064
+add_action('give_after_cc_fields', 'give_default_cc_address_fields');
1065 1065
 
1066 1066
 
1067 1067
 /**
@@ -1073,24 +1073,24 @@  discard block
 block discarded – undo
1073 1073
  *
1074 1074
  * @return string
1075 1075
  */
1076
-function give_get_register_fields( $form_id ) {
1076
+function give_get_register_fields($form_id) {
1077 1077
 
1078 1078
 	global $user_ID;
1079 1079
 
1080
-	if ( is_user_logged_in() ) {
1081
-		$user_data = get_userdata( $user_ID );
1080
+	if (is_user_logged_in()) {
1081
+		$user_data = get_userdata($user_ID);
1082 1082
 	}
1083 1083
 
1084
-	$show_register_form = give_show_login_register_option( $form_id );
1084
+	$show_register_form = give_show_login_register_option($form_id);
1085 1085
 
1086 1086
 	ob_start(); ?>
1087 1087
 	<fieldset id="give-register-fields-<?php echo $form_id; ?>">
1088 1088
 
1089
-		<?php if ( $show_register_form == 'both' ) { ?>
1089
+		<?php if ($show_register_form == 'both') { ?>
1090 1090
 			<div class="give-login-account-wrap">
1091
-				<p class="give-login-message"><?php esc_html_e( 'Already have an account?', 'give' ); ?>&nbsp;
1092
-					<a href="<?php echo esc_url( add_query_arg( 'login', 1 ) ); ?>" class="give-checkout-login"
1093
-					   data-action="give_checkout_login"><?php esc_html_e( 'Login', 'give' ); ?></a>
1091
+				<p class="give-login-message"><?php esc_html_e('Already have an account?', 'give'); ?>&nbsp;
1092
+					<a href="<?php echo esc_url(add_query_arg('login', 1)); ?>" class="give-checkout-login"
1093
+					   data-action="give_checkout_login"><?php esc_html_e('Login', 'give'); ?></a>
1094 1094
 				</p>
1095 1095
 				<p class="give-loading-text">
1096 1096
 					<span class="give-loading-animation"></span>
@@ -1106,15 +1106,15 @@  discard block
 block discarded – undo
1106 1106
 		 *
1107 1107
 		 * @param int $form_id The form ID.
1108 1108
 		 */
1109
-		do_action( 'give_register_fields_before', $form_id );
1109
+		do_action('give_register_fields_before', $form_id);
1110 1110
 		?>
1111 1111
 
1112 1112
 		<fieldset id="give-register-account-fields-<?php echo $form_id; ?>">
1113 1113
 			<legend>
1114 1114
 				<?php
1115
-				echo apply_filters( 'give_create_account_fieldset_heading', esc_html__( 'Create an account', 'give' ) );
1116
-				if ( ! give_logged_in_only( $form_id ) ) {
1117
-					echo ' <span class="sub-text">' . esc_html__( '(optional)', 'give' ) . '</span>';
1115
+				echo apply_filters('give_create_account_fieldset_heading', esc_html__('Create an account', 'give'));
1116
+				if ( ! give_logged_in_only($form_id)) {
1117
+					echo ' <span class="sub-text">'.esc_html__('(optional)', 'give').'</span>';
1118 1118
 				}
1119 1119
 				?>
1120 1120
 			</legend>
@@ -1126,52 +1126,52 @@  discard block
 block discarded – undo
1126 1126
 			 *
1127 1127
 			 * @param int $form_id The form ID.
1128 1128
 			 */
1129
-			do_action( 'give_register_account_fields_before', $form_id );
1129
+			do_action('give_register_account_fields_before', $form_id);
1130 1130
 			?>
1131 1131
 			<div id="give-user-login-wrap-<?php echo $form_id; ?>" class="form-row form-row-one-third form-row-first form-row-responsive">
1132 1132
 				<label for="give-user-login-<?php echo $form_id; ?>">
1133
-					<?php esc_html_e( 'Username', 'give' ); ?>
1134
-					<?php if ( give_logged_in_only( $form_id ) ) { ?>
1133
+					<?php esc_html_e('Username', 'give'); ?>
1134
+					<?php if (give_logged_in_only($form_id)) { ?>
1135 1135
 						<span class="give-required-indicator">*</span>
1136 1136
 					<?php } ?>
1137 1137
 					<span class="give-tooltip give-icon give-icon-question"
1138
-					      data-tooltip="<?php esc_attr_e( 'The username you will use to log into your account.', 'give' ); ?>"></span>
1138
+					      data-tooltip="<?php esc_attr_e('The username you will use to log into your account.', 'give'); ?>"></span>
1139 1139
 				</label>
1140 1140
 
1141 1141
 				<input name="give_user_login" id="give-user-login-<?php echo $form_id; ?>" class="give-input"
1142 1142
 				       type="text"
1143
-				       placeholder="<?php esc_attr_e( 'Username', 'give' ); ?>"<?php echo ( give_logged_in_only( $form_id ) ) ? ' required aria-required="true" ' : ''; ?>/>
1143
+				       placeholder="<?php esc_attr_e('Username', 'give'); ?>"<?php echo (give_logged_in_only($form_id)) ? ' required aria-required="true" ' : ''; ?>/>
1144 1144
 			</div>
1145 1145
 
1146 1146
 			<div id="give-user-pass-wrap-<?php echo $form_id; ?>" class="form-row form-row-one-third form-row-responsive">
1147 1147
 				<label for="give-user-pass-<?php echo $form_id; ?>">
1148
-					<?php esc_html_e( 'Password', 'give' ); ?>
1149
-					<?php if ( give_logged_in_only( $form_id ) ) { ?>
1148
+					<?php esc_html_e('Password', 'give'); ?>
1149
+					<?php if (give_logged_in_only($form_id)) { ?>
1150 1150
 						<span class="give-required-indicator">*</span>
1151 1151
 					<?php } ?>
1152 1152
 					<span class="give-tooltip give-icon give-icon-question"
1153
-					      data-tooltip="<?php esc_attr_e( 'The password used to access your account.', 'give' ); ?>"></span>
1153
+					      data-tooltip="<?php esc_attr_e('The password used to access your account.', 'give'); ?>"></span>
1154 1154
 				</label>
1155 1155
 
1156 1156
 				<input name="give_user_pass" id="give-user-pass-<?php echo $form_id; ?>" class="give-input"
1157
-				       placeholder="<?php esc_attr_e( 'Password', 'give' ); ?>"
1158
-				       type="password"<?php echo ( give_logged_in_only( $form_id ) ) ? ' required aria-required="true" ' : ''; ?>/>
1157
+				       placeholder="<?php esc_attr_e('Password', 'give'); ?>"
1158
+				       type="password"<?php echo (give_logged_in_only($form_id)) ? ' required aria-required="true" ' : ''; ?>/>
1159 1159
 			</div>
1160 1160
 
1161 1161
 			<div id="give-user-pass-confirm-wrap-<?php echo $form_id; ?>"
1162 1162
 			     class="give-register-password form-row form-row-one-third form-row-responsive">
1163 1163
 				<label for="give-user-pass-confirm-<?php echo $form_id; ?>">
1164
-					<?php esc_html_e( 'Confirm PW', 'give' ); ?>
1165
-					<?php if ( give_logged_in_only( $form_id ) ) { ?>
1164
+					<?php esc_html_e('Confirm PW', 'give'); ?>
1165
+					<?php if (give_logged_in_only($form_id)) { ?>
1166 1166
 						<span class="give-required-indicator">*</span>
1167 1167
 					<?php } ?>
1168 1168
 					<span class="give-tooltip give-icon give-icon-question"
1169
-					      data-tooltip="<?php esc_attr_e( 'Please retype your password to confirm.', 'give' ); ?>"></span>
1169
+					      data-tooltip="<?php esc_attr_e('Please retype your password to confirm.', 'give'); ?>"></span>
1170 1170
 				</label>
1171 1171
 
1172 1172
 				<input name="give_user_pass_confirm" id="give-user-pass-confirm-<?php echo $form_id; ?>"
1173
-				       class="give-input" placeholder="<?php esc_attr_e( 'Confirm password', 'give' ); ?>"
1174
-				       type="password"<?php echo ( give_logged_in_only( $form_id ) ) ? ' required aria-required="true" ' : ''; ?>/>
1173
+				       class="give-input" placeholder="<?php esc_attr_e('Confirm password', 'give'); ?>"
1174
+				       type="password"<?php echo (give_logged_in_only($form_id)) ? ' required aria-required="true" ' : ''; ?>/>
1175 1175
 			</div>
1176 1176
 			<?php
1177 1177
 			/**
@@ -1181,7 +1181,7 @@  discard block
 block discarded – undo
1181 1181
 			 *
1182 1182
 			 * @param int $form_id The form ID.
1183 1183
 			 */
1184
-			do_action( 'give_register_account_fields_after', $form_id );
1184
+			do_action('give_register_account_fields_after', $form_id);
1185 1185
 			?>
1186 1186
 		</fieldset>
1187 1187
 
@@ -1193,7 +1193,7 @@  discard block
 block discarded – undo
1193 1193
 		 *
1194 1194
 		 * @param int $form_id The form ID.
1195 1195
 		 */
1196
-		do_action( 'give_register_fields_after', $form_id );
1196
+		do_action('give_register_fields_after', $form_id);
1197 1197
 		?>
1198 1198
 
1199 1199
 		<input type="hidden" name="give-purchase-var" value="needs-to-register"/>
@@ -1204,7 +1204,7 @@  discard block
 block discarded – undo
1204 1204
 		 *
1205 1205
 		 * @since 1.7
1206 1206
 		 */
1207
-		do_action( 'give_donation_form_user_info', $form_id );
1207
+		do_action('give_donation_form_user_info', $form_id);
1208 1208
 		?>
1209 1209
 
1210 1210
 	</fieldset>
@@ -1212,7 +1212,7 @@  discard block
 block discarded – undo
1212 1212
 	echo ob_get_clean();
1213 1213
 }
1214 1214
 
1215
-add_action( 'give_donation_form_register_fields', 'give_get_register_fields' );
1215
+add_action('give_donation_form_register_fields', 'give_get_register_fields');
1216 1216
 
1217 1217
 /**
1218 1218
  * Gets the login fields for the login form on the checkout. This function hooks
@@ -1225,27 +1225,27 @@  discard block
 block discarded – undo
1225 1225
  *
1226 1226
  * @return string
1227 1227
  */
1228
-function give_get_login_fields( $form_id ) {
1228
+function give_get_login_fields($form_id) {
1229 1229
 
1230
-	$form_id            = isset( $_POST['form_id'] ) ? $_POST['form_id'] : $form_id;
1231
-	$show_register_form = give_show_login_register_option( $form_id );
1230
+	$form_id            = isset($_POST['form_id']) ? $_POST['form_id'] : $form_id;
1231
+	$show_register_form = give_show_login_register_option($form_id);
1232 1232
 
1233 1233
 	ob_start();
1234 1234
 	?>
1235 1235
 	<fieldset id="give-login-fields-<?php echo $form_id; ?>">
1236
-		<legend><?php echo apply_filters( 'give_account_login_fieldset_heading', esc_html__( 'Login to Your Account', 'give' ) );
1237
-			if ( ! give_logged_in_only( $form_id ) ) {
1238
-				echo ' <span class="sub-text">' . esc_html__( '(optional)', 'give' ) . '</span>';
1236
+		<legend><?php echo apply_filters('give_account_login_fieldset_heading', esc_html__('Login to Your Account', 'give'));
1237
+			if ( ! give_logged_in_only($form_id)) {
1238
+				echo ' <span class="sub-text">'.esc_html__('(optional)', 'give').'</span>';
1239 1239
 			} ?>
1240 1240
 		</legend>
1241
-		<?php if ( $show_register_form == 'both' ) { ?>
1241
+		<?php if ($show_register_form == 'both') { ?>
1242 1242
 			<p class="give-new-account-link">
1243
-				<?php esc_html_e( 'Need to create an account?', 'give' ); ?>&nbsp;
1244
-				<a href="<?php echo remove_query_arg( 'login' ); ?>" class="give-checkout-register-cancel"
1243
+				<?php esc_html_e('Need to create an account?', 'give'); ?>&nbsp;
1244
+				<a href="<?php echo remove_query_arg('login'); ?>" class="give-checkout-register-cancel"
1245 1245
 				   data-action="give_checkout_register">
1246
-					<?php esc_html_e( 'Register', 'give' );
1247
-					if ( ! give_logged_in_only( $form_id ) ) {
1248
-						echo ' ' . esc_html__( 'or checkout as a guest &raquo;', 'give' );
1246
+					<?php esc_html_e('Register', 'give');
1247
+					if ( ! give_logged_in_only($form_id)) {
1248
+						echo ' '.esc_html__('or checkout as a guest &raquo;', 'give');
1249 1249
 					} ?>
1250 1250
 				</a>
1251 1251
 			</p>
@@ -1261,48 +1261,48 @@  discard block
 block discarded – undo
1261 1261
 		 *
1262 1262
 		 * @param int $form_id The form ID.
1263 1263
 		 */
1264
-		do_action( 'give_checkout_login_fields_before', $form_id );
1264
+		do_action('give_checkout_login_fields_before', $form_id);
1265 1265
 		?>
1266 1266
 		<div id="give-user-login-wrap-<?php echo $form_id; ?>" class="form-row form-row-first form-row-responsive">
1267 1267
 			<label class="give-label" for="give-user-login-<?php echo $form_id; ?>">
1268
-				<?php esc_html_e( 'Username', 'give' ); ?>
1269
-				<?php if ( give_logged_in_only( $form_id ) ) { ?>
1268
+				<?php esc_html_e('Username', 'give'); ?>
1269
+				<?php if (give_logged_in_only($form_id)) { ?>
1270 1270
 					<span class="give-required-indicator">*</span>
1271 1271
 				<?php } ?>
1272 1272
 			</label>
1273 1273
 
1274
-			<input class="give-input<?php echo ( give_logged_in_only( $form_id ) ) ? ' required' : ''; ?>" type="text"
1274
+			<input class="give-input<?php echo (give_logged_in_only($form_id)) ? ' required' : ''; ?>" type="text"
1275 1275
 			       name="give_user_login" id="give-user-login-<?php echo $form_id; ?>" value=""
1276
-			       placeholder="<?php esc_attr_e( 'Your username', 'give' ); ?>"<?php echo ( give_logged_in_only( $form_id ) ) ? ' required aria-required="true" ' : ''; ?>/>
1276
+			       placeholder="<?php esc_attr_e('Your username', 'give'); ?>"<?php echo (give_logged_in_only($form_id)) ? ' required aria-required="true" ' : ''; ?>/>
1277 1277
 		</div>
1278 1278
 
1279 1279
 		<div id="give-user-pass-wrap-<?php echo $form_id; ?>" class="give_login_password form-row form-row-last form-row-responsive">
1280 1280
 			<label class="give-label" for="give-user-pass-<?php echo $form_id; ?>">
1281
-				<?php esc_html_e( 'Password', 'give' ); ?>
1282
-				<?php if ( give_logged_in_only( $form_id ) ) { ?>
1281
+				<?php esc_html_e('Password', 'give'); ?>
1282
+				<?php if (give_logged_in_only($form_id)) { ?>
1283 1283
 					<span class="give-required-indicator">*</span>
1284 1284
 				<?php } ?>
1285 1285
 			</label>
1286
-			<input class="give-input<?php echo ( give_logged_in_only( $form_id ) ) ? ' required' : ''; ?>"
1286
+			<input class="give-input<?php echo (give_logged_in_only($form_id)) ? ' required' : ''; ?>"
1287 1287
 			       type="password" name="give_user_pass" id="give-user-pass-<?php echo $form_id; ?>"
1288
-			       placeholder="<?php esc_attr_e( 'Your password', 'give' ); ?>"<?php echo ( give_logged_in_only( $form_id ) ) ? ' required aria-required="true" ' : ''; ?>/>
1288
+			       placeholder="<?php esc_attr_e('Your password', 'give'); ?>"<?php echo (give_logged_in_only($form_id)) ? ' required aria-required="true" ' : ''; ?>/>
1289 1289
 			<input type="hidden" name="give-purchase-var" value="needs-to-login"/>
1290 1290
 		</div>
1291 1291
 
1292 1292
 		<div id="give-forgot-password-wrap-<?php echo $form_id; ?>" class="give_login_forgot_password">
1293 1293
 			 <span class="give-forgot-password ">
1294 1294
 				 <a href="<?php echo wp_lostpassword_url() ?>"
1295
-				    target="_blank"><?php esc_html_e( 'Reset Password', 'give' ) ?></a>
1295
+				    target="_blank"><?php esc_html_e('Reset Password', 'give') ?></a>
1296 1296
 			 </span>
1297 1297
 		</div>
1298 1298
 
1299 1299
 		<div id="give-user-login-submit-<?php echo $form_id; ?>" class="give-clearfix">
1300 1300
 			<input type="submit" class="give-submit give-btn button" name="give_login_submit"
1301
-			       value="<?php esc_attr_e( 'Login', 'give' ); ?>"/>
1302
-			<?php if ( $show_register_form !== 'login' ) { ?>
1301
+			       value="<?php esc_attr_e('Login', 'give'); ?>"/>
1302
+			<?php if ($show_register_form !== 'login') { ?>
1303 1303
 				<input type="button" data-action="give_cancel_login"
1304 1304
 				       class="give-cancel-login give-checkout-register-cancel give-btn button" name="give_login_cancel"
1305
-				       value="<?php esc_attr_e( 'Cancel', 'give' ); ?>"/>
1305
+				       value="<?php esc_attr_e('Cancel', 'give'); ?>"/>
1306 1306
 			<?php } ?>
1307 1307
 			<span class="give-loading-animation"></span>
1308 1308
 		</div>
@@ -1314,14 +1314,14 @@  discard block
 block discarded – undo
1314 1314
 		 *
1315 1315
 		 * @param int $form_id The form ID.
1316 1316
 		 */
1317
-		do_action( 'give_checkout_login_fields_after', $form_id );
1317
+		do_action('give_checkout_login_fields_after', $form_id);
1318 1318
 		?>
1319 1319
 	</fieldset><!--end #give-login-fields-->
1320 1320
 	<?php
1321 1321
 	echo ob_get_clean();
1322 1322
 }
1323 1323
 
1324
-add_action( 'give_donation_form_login_fields', 'give_get_login_fields', 10, 1 );
1324
+add_action('give_donation_form_login_fields', 'give_get_login_fields', 10, 1);
1325 1325
 
1326 1326
 /**
1327 1327
  * Payment Mode Select.
@@ -1337,9 +1337,9 @@  discard block
 block discarded – undo
1337 1337
  *
1338 1338
  * @return void
1339 1339
  */
1340
-function give_payment_mode_select( $form_id ) {
1340
+function give_payment_mode_select($form_id) {
1341 1341
 
1342
-	$gateways = give_get_enabled_payment_gateways( $form_id );
1342
+	$gateways = give_get_enabled_payment_gateways($form_id);
1343 1343
 
1344 1344
 	/**
1345 1345
 	 * Fires while selecting payment gateways, before the fields.
@@ -1348,10 +1348,10 @@  discard block
 block discarded – undo
1348 1348
 	 *
1349 1349
 	 * @param int $form_id The form ID.
1350 1350
 	 */
1351
-	do_action( 'give_payment_mode_top', $form_id );
1351
+	do_action('give_payment_mode_top', $form_id);
1352 1352
 	?>
1353 1353
 
1354
-	<fieldset id="give-payment-mode-select" <?php if ( count( $gateways ) <= 1 ) {
1354
+	<fieldset id="give-payment-mode-select" <?php if (count($gateways) <= 1) {
1355 1355
 		echo 'style="display: none;"';
1356 1356
 	} ?>>
1357 1357
 		<?php
@@ -1362,10 +1362,10 @@  discard block
 block discarded – undo
1362 1362
 		 *
1363 1363
 		 * @param int $form_id The form ID.
1364 1364
 		 */
1365
-		do_action( 'give_payment_mode_before_gateways_wrap' );
1365
+		do_action('give_payment_mode_before_gateways_wrap');
1366 1366
 		?>
1367 1367
 		<legend
1368
-			class="give-payment-mode-label"><?php echo apply_filters( 'give_checkout_payment_method_text', esc_html__( 'Select Payment Method', 'give' ) ); ?>
1368
+			class="give-payment-mode-label"><?php echo apply_filters('give_checkout_payment_method_text', esc_html__('Select Payment Method', 'give')); ?>
1369 1369
             <span class="give-loading-text"><span
1370 1370
                         class="give-loading-animation"></span>
1371 1371
             </span>
@@ -1378,26 +1378,26 @@  discard block
 block discarded – undo
1378 1378
 			 *
1379 1379
 			 * @since 1.7
1380 1380
 			 */
1381
-			do_action( 'give_payment_mode_before_gateways' )
1381
+			do_action('give_payment_mode_before_gateways')
1382 1382
 			?>
1383 1383
 			<ul id="give-gateway-radio-list">
1384 1384
 				<?php
1385 1385
 				/**
1386 1386
 				 * Loop through the active payment gateways.
1387 1387
 				 */
1388
-				$selected_gateway = give_get_chosen_gateway( $form_id );
1388
+				$selected_gateway = give_get_chosen_gateway($form_id);
1389 1389
 
1390
-				foreach ( $gateways as $gateway_id => $gateway ) :
1390
+				foreach ($gateways as $gateway_id => $gateway) :
1391 1391
 					//Determine the default gateway.
1392
-					$checked       = checked( $gateway_id, $selected_gateway, false );
1392
+					$checked       = checked($gateway_id, $selected_gateway, false);
1393 1393
 					$checked_class = $checked ? ' class="give-gateway-option-selected"' : ''; ?>
1394 1394
 					<li<?php echo $checked_class?>>
1395 1395
 						<input type="radio" name="payment-mode" class="give-gateway"
1396
-						       id="give-gateway-<?php echo esc_attr( $gateway_id ) . '-' . $form_id; ?>"
1397
-						       value="<?php echo esc_attr( $gateway_id ); ?>"<?php echo $checked; ?>>
1398
-						<label for="give-gateway-<?php echo esc_attr( $gateway_id ) . '-' . $form_id; ?>"
1396
+						       id="give-gateway-<?php echo esc_attr($gateway_id).'-'.$form_id; ?>"
1397
+						       value="<?php echo esc_attr($gateway_id); ?>"<?php echo $checked; ?>>
1398
+						<label for="give-gateway-<?php echo esc_attr($gateway_id).'-'.$form_id; ?>"
1399 1399
 						       class="give-gateway-option"
1400
-						       id="give-gateway-option-<?php echo esc_attr( $gateway_id ); ?>"> <?php echo esc_html( $gateway['checkout_label'] ); ?></label>
1400
+						       id="give-gateway-option-<?php echo esc_attr($gateway_id); ?>"> <?php echo esc_html($gateway['checkout_label']); ?></label>
1401 1401
 					</li>
1402 1402
 					<?php
1403 1403
 				endforeach;
@@ -1409,7 +1409,7 @@  discard block
 block discarded – undo
1409 1409
 			 *
1410 1410
 			 * @since 1.7
1411 1411
 			 */
1412
-			do_action( 'give_payment_mode_after_gateways' );
1412
+			do_action('give_payment_mode_after_gateways');
1413 1413
 			?>
1414 1414
 		</div>
1415 1415
 		<?php
@@ -1420,7 +1420,7 @@  discard block
 block discarded – undo
1420 1420
 		 *
1421 1421
 		 * @param int $form_id The form ID.
1422 1422
 		 */
1423
-		do_action( 'give_payment_mode_after_gateways_wrap' );
1423
+		do_action('give_payment_mode_after_gateways_wrap');
1424 1424
 		?>
1425 1425
 	</fieldset>
1426 1426
 
@@ -1432,7 +1432,7 @@  discard block
 block discarded – undo
1432 1432
 	 *
1433 1433
 	 * @param int $form_id The form ID.
1434 1434
 	 */
1435
-	do_action( 'give_payment_mode_bottom', $form_id );
1435
+	do_action('give_payment_mode_bottom', $form_id);
1436 1436
 	?>
1437 1437
 
1438 1438
 	<div id="give_purchase_form_wrap">
@@ -1443,7 +1443,7 @@  discard block
 block discarded – undo
1443 1443
 		 *
1444 1444
 		 * @since 1.7
1445 1445
 		 */
1446
-		do_action( 'give_donation_form', $form_id );
1446
+		do_action('give_donation_form', $form_id);
1447 1447
 		?>
1448 1448
 
1449 1449
 	</div>
@@ -1454,10 +1454,10 @@  discard block
 block discarded – undo
1454 1454
 	 *
1455 1455
 	 * @since 1.7
1456 1456
 	 */
1457
-	do_action( 'give_donation_form_wrap_bottom', $form_id );
1457
+	do_action('give_donation_form_wrap_bottom', $form_id);
1458 1458
 }
1459 1459
 
1460
-add_action( 'give_payment_mode_select', 'give_payment_mode_select' );
1460
+add_action('give_payment_mode_select', 'give_payment_mode_select');
1461 1461
 
1462 1462
 /**
1463 1463
  * Renders the Checkout Agree to Terms, this displays a checkbox for users to
@@ -1470,31 +1470,31 @@  discard block
 block discarded – undo
1470 1470
  *
1471 1471
  * @return bool
1472 1472
  */
1473
-function give_terms_agreement( $form_id ) {
1474
-	$form_option = get_post_meta( $form_id, '_give_terms_option', true );
1473
+function give_terms_agreement($form_id) {
1474
+	$form_option = get_post_meta($form_id, '_give_terms_option', true);
1475 1475
 
1476 1476
 	// Bailout if per form and global term and conditions is not setup.
1477 1477
 	if (
1478
-		give_is_setting_enabled( $form_option, 'global' )
1479
-		&& give_is_setting_enabled( give_get_option( 'terms' ) )
1478
+		give_is_setting_enabled($form_option, 'global')
1479
+		&& give_is_setting_enabled(give_get_option('terms'))
1480 1480
 	) {
1481
-		$label         = give_get_option( 'agree_to_terms_label', esc_html__( 'Agree to Terms?', 'give' ) );
1482
-		$terms         = $terms = give_get_option( 'agreement_text', '' );
1483
-		$edit_term_url = admin_url( 'edit.php?post_type=give_forms&page=give-settings&tab=display&section=term-and-conditions' );
1481
+		$label         = give_get_option('agree_to_terms_label', esc_html__('Agree to Terms?', 'give'));
1482
+		$terms         = $terms = give_get_option('agreement_text', '');
1483
+		$edit_term_url = admin_url('edit.php?post_type=give_forms&page=give-settings&tab=display&section=term-and-conditions');
1484 1484
 
1485
-	} elseif ( give_is_setting_enabled( $form_option ) ) {
1486
-		$label         = ( $label = get_post_meta( $form_id, '_give_agree_label', true ) ) ? stripslashes( $label ) : esc_html__( 'Agree to Terms?', 'give' );
1487
-		$terms         = get_post_meta( $form_id, '_give_agree_text', true );
1488
-		$edit_term_url = admin_url( 'post.php?post=' . $form_id . '&action=edit#form_terms_options' );
1485
+	} elseif (give_is_setting_enabled($form_option)) {
1486
+		$label         = ($label = get_post_meta($form_id, '_give_agree_label', true)) ? stripslashes($label) : esc_html__('Agree to Terms?', 'give');
1487
+		$terms         = get_post_meta($form_id, '_give_agree_text', true);
1488
+		$edit_term_url = admin_url('post.php?post='.$form_id.'&action=edit#form_terms_options');
1489 1489
 
1490 1490
 	} else {
1491 1491
 		return false;
1492 1492
 	}
1493 1493
 
1494 1494
 	// Bailout: Check if term and conditions text is empty or not.
1495
-	if ( empty( $terms ) ) {
1496
-		if ( is_user_logged_in() && current_user_can( 'edit_give_forms' ) ) {
1497
-			echo sprintf( __( 'Please enter valid terms and conditions in <a href="%s">this form\'s settings</a>.', 'give' ), $edit_term_url );
1495
+	if (empty($terms)) {
1496
+		if (is_user_logged_in() && current_user_can('edit_give_forms')) {
1497
+			echo sprintf(__('Please enter valid terms and conditions in <a href="%s">this form\'s settings</a>.', 'give'), $edit_term_url);
1498 1498
 		}
1499 1499
 
1500 1500
 		return false;
@@ -1502,7 +1502,7 @@  discard block
 block discarded – undo
1502 1502
 
1503 1503
 	?>
1504 1504
 	<fieldset id="give_terms_agreement">
1505
-		<legend><?php echo apply_filters( 'give_terms_agreement_text', esc_html__( 'Terms', 'give' ) ); ?></legend>
1505
+		<legend><?php echo apply_filters('give_terms_agreement_text', esc_html__('Terms', 'give')); ?></legend>
1506 1506
 		<div id="give_terms" class="give_terms-<?php echo $form_id; ?>" style="display:none;">
1507 1507
 			<?php
1508 1508
 			/**
@@ -1510,22 +1510,22 @@  discard block
 block discarded – undo
1510 1510
 			 *
1511 1511
 			 * @since 1.0
1512 1512
 			 */
1513
-			do_action( 'give_before_terms' );
1513
+			do_action('give_before_terms');
1514 1514
 
1515
-			echo wpautop( stripslashes( $terms ) );
1515
+			echo wpautop(stripslashes($terms));
1516 1516
 			/**
1517 1517
 			 * Fires while rendering terms of agreement, after the fields.
1518 1518
 			 *
1519 1519
 			 * @since 1.0
1520 1520
 			 */
1521
-			do_action( 'give_after_terms' );
1521
+			do_action('give_after_terms');
1522 1522
 			?>
1523 1523
 		</div>
1524 1524
 		<div id="give_show_terms">
1525 1525
 			<a href="#" class="give_terms_links give_terms_links-<?php echo $form_id; ?>" role="button"
1526
-			   aria-controls="give_terms"><?php esc_html_e( 'Show Terms', 'give' ); ?></a>
1526
+			   aria-controls="give_terms"><?php esc_html_e('Show Terms', 'give'); ?></a>
1527 1527
 			<a href="#" class="give_terms_links give_terms_links-<?php echo $form_id; ?>" role="button"
1528
-			   aria-controls="give_terms" style="display:none;"><?php esc_html_e( 'Hide Terms', 'give' ); ?></a>
1528
+			   aria-controls="give_terms" style="display:none;"><?php esc_html_e('Hide Terms', 'give'); ?></a>
1529 1529
 		</div>
1530 1530
 
1531 1531
 		<input name="give_agree_to_terms" class="required" type="checkbox" id="give_agree_to_terms-<?php echo $form_id; ?>" value="1" required aria-required="true" />
@@ -1535,7 +1535,7 @@  discard block
 block discarded – undo
1535 1535
 	<?php
1536 1536
 }
1537 1537
 
1538
-add_action( 'give_donation_form_after_cc_form', 'give_terms_agreement', 8888, 1 );
1538
+add_action('give_donation_form_after_cc_form', 'give_terms_agreement', 8888, 1);
1539 1539
 
1540 1540
 /**
1541 1541
  * Checkout Final Total.
@@ -1548,29 +1548,29 @@  discard block
 block discarded – undo
1548 1548
  *
1549 1549
  * @return void
1550 1550
  */
1551
-function give_checkout_final_total( $form_id ) {
1551
+function give_checkout_final_total($form_id) {
1552 1552
 
1553
-	if ( isset( $_POST['give_total'] ) ) {
1554
-		$total = apply_filters( 'give_donation_total', $_POST['give_total'] );
1553
+	if (isset($_POST['give_total'])) {
1554
+		$total = apply_filters('give_donation_total', $_POST['give_total']);
1555 1555
 	} else {
1556 1556
 		//default total.
1557
-		$total = give_get_default_form_amount( $form_id );
1557
+		$total = give_get_default_form_amount($form_id);
1558 1558
 	}
1559 1559
 	//Only proceed if give_total available.
1560
-	if ( empty( $total ) ) {
1560
+	if (empty($total)) {
1561 1561
 		return;
1562 1562
 	}
1563 1563
 	?>
1564 1564
 	<p id="give-final-total-wrap" class="form-wrap ">
1565 1565
 		<span
1566
-			class="give-donation-total-label"><?php echo apply_filters( 'give_donation_total_label', esc_html__( 'Donation Total:', 'give' ) ); ?></span>
1566
+			class="give-donation-total-label"><?php echo apply_filters('give_donation_total_label', esc_html__('Donation Total:', 'give')); ?></span>
1567 1567
 		<span class="give-final-total-amount"
1568
-		      data-total="<?php echo give_format_amount( $total ); ?>"><?php echo give_currency_filter( give_format_amount( $total ) ); ?></span>
1568
+		      data-total="<?php echo give_format_amount($total); ?>"><?php echo give_currency_filter(give_format_amount($total)); ?></span>
1569 1569
 	</p>
1570 1570
 	<?php
1571 1571
 }
1572 1572
 
1573
-add_action( 'give_donation_form_before_submit', 'give_checkout_final_total', 999 );
1573
+add_action('give_donation_form_before_submit', 'give_checkout_final_total', 999);
1574 1574
 
1575 1575
 /**
1576 1576
  * Renders the Checkout Submit section.
@@ -1581,7 +1581,7 @@  discard block
 block discarded – undo
1581 1581
  *
1582 1582
  * @return void
1583 1583
  */
1584
-function give_checkout_submit( $form_id ) {
1584
+function give_checkout_submit($form_id) {
1585 1585
 	?>
1586 1586
 	<fieldset id="give_purchase_submit">
1587 1587
 		<?php
@@ -1590,24 +1590,24 @@  discard block
 block discarded – undo
1590 1590
 		 *
1591 1591
 		 * @since 1.7
1592 1592
 		 */
1593
-		do_action( 'give_donation_form_before_submit', $form_id );
1593
+		do_action('give_donation_form_before_submit', $form_id);
1594 1594
 
1595
-		give_checkout_hidden_fields( $form_id );
1595
+		give_checkout_hidden_fields($form_id);
1596 1596
 
1597
-		echo give_checkout_button_purchase( $form_id );
1597
+		echo give_checkout_button_purchase($form_id);
1598 1598
 
1599 1599
 		/**
1600 1600
 		 * Fire after donation form submit.
1601 1601
 		 *
1602 1602
 		 * @since 1.7
1603 1603
 		 */
1604
-		do_action( 'give_donation_form_after_submit', $form_id );
1604
+		do_action('give_donation_form_after_submit', $form_id);
1605 1605
 		?>
1606 1606
 	</fieldset>
1607 1607
 	<?php
1608 1608
 }
1609 1609
 
1610
-add_action( 'give_donation_form_after_cc_form', 'give_checkout_submit', 9999 );
1610
+add_action('give_donation_form_after_cc_form', 'give_checkout_submit', 9999);
1611 1611
 
1612 1612
 /**
1613 1613
  * Give Checkout Button.
@@ -1620,10 +1620,10 @@  discard block
 block discarded – undo
1620 1620
  *
1621 1621
  * @return string
1622 1622
  */
1623
-function give_checkout_button_purchase( $form_id ) {
1623
+function give_checkout_button_purchase($form_id) {
1624 1624
 
1625
-	$display_label_field = get_post_meta( $form_id, '_give_checkout_label', true );
1626
-	$display_label       = ( ! empty( $display_label_field ) ? $display_label_field : esc_html__( 'Donate Now', 'give' ) );
1625
+	$display_label_field = get_post_meta($form_id, '_give_checkout_label', true);
1626
+	$display_label       = ( ! empty($display_label_field) ? $display_label_field : esc_html__('Donate Now', 'give'));
1627 1627
 	ob_start(); ?>
1628 1628
 	<div class="give-submit-button-wrap give-clearfix">
1629 1629
 		<input type="submit" class="give-submit give-btn" id="give-purchase-button" name="give-purchase"
@@ -1631,7 +1631,7 @@  discard block
 block discarded – undo
1631 1631
 		<span class="give-loading-animation"></span>
1632 1632
 	</div>
1633 1633
 	<?php
1634
-	return apply_filters( 'give_checkout_button_purchase', ob_get_clean(), $form_id );
1634
+	return apply_filters('give_checkout_button_purchase', ob_get_clean(), $form_id);
1635 1635
 }
1636 1636
 
1637 1637
 /**
@@ -1645,18 +1645,18 @@  discard block
 block discarded – undo
1645 1645
  *
1646 1646
  * @return void
1647 1647
  */
1648
-function give_agree_to_terms_js( $form_id ) {
1648
+function give_agree_to_terms_js($form_id) {
1649 1649
 
1650
-	$form_option = get_post_meta( $form_id, '_give_terms_option', true );
1650
+	$form_option = get_post_meta($form_id, '_give_terms_option', true);
1651 1651
 
1652
-	if ( give_is_setting_enabled( $form_option, array( 'enabled', 'global' ) ) ) {
1652
+	if (give_is_setting_enabled($form_option, array('enabled', 'global'))) {
1653 1653
 		?>
1654 1654
 		<script type="text/javascript">
1655 1655
 			jQuery(document).ready(function ($) {
1656
-				$('body').on('click', '.give_terms_links-<?php echo $form_id;?>', function (e) {
1656
+				$('body').on('click', '.give_terms_links-<?php echo $form_id; ?>', function (e) {
1657 1657
 					e.preventDefault();
1658
-					$('.give_terms-<?php echo $form_id;?>').slideToggle();
1659
-					$('.give_terms_links-<?php echo $form_id;?>').toggle();
1658
+					$('.give_terms-<?php echo $form_id; ?>').slideToggle();
1659
+					$('.give_terms_links-<?php echo $form_id; ?>').toggle();
1660 1660
 					return false;
1661 1661
 				});
1662 1662
 			});
@@ -1665,7 +1665,7 @@  discard block
 block discarded – undo
1665 1665
 	}
1666 1666
 }
1667 1667
 
1668
-add_action( 'give_checkout_form_top', 'give_agree_to_terms_js', 10, 2 );
1668
+add_action('give_checkout_form_top', 'give_agree_to_terms_js', 10, 2);
1669 1669
 
1670 1670
 /**
1671 1671
  * Show Give Goals.
@@ -1679,17 +1679,17 @@  discard block
 block discarded – undo
1679 1679
  *
1680 1680
  * @return mixed
1681 1681
  */
1682
-function give_show_goal_progress( $form_id, $args ) {
1682
+function give_show_goal_progress($form_id, $args) {
1683 1683
 
1684 1684
 	ob_start();
1685
-	give_get_template( 'shortcode-goal', array( 'form_id' => $form_id, 'args' => $args ) );
1685
+	give_get_template('shortcode-goal', array('form_id' => $form_id, 'args' => $args));
1686 1686
 
1687
-	echo apply_filters( 'give_goal_output', ob_get_clean() );
1687
+	echo apply_filters('give_goal_output', ob_get_clean());
1688 1688
 
1689 1689
 	return true;
1690 1690
 }
1691 1691
 
1692
-add_action( 'give_pre_form', 'give_show_goal_progress', 10, 2 );
1692
+add_action('give_pre_form', 'give_show_goal_progress', 10, 2);
1693 1693
 
1694 1694
 
1695 1695
 /**
@@ -1700,10 +1700,10 @@  discard block
 block discarded – undo
1700 1700
  * @param  $args
1701 1701
  * @return mixed|string
1702 1702
  */
1703
-function give_get_form_content_placement( $form_id, $args ) {
1703
+function give_get_form_content_placement($form_id, $args) {
1704 1704
 	$show_content = '';
1705 1705
 
1706
-	if ( isset( $args['show_content'] ) && ! empty( $args['show_content'] ) ) {
1706
+	if (isset($args['show_content']) && ! empty($args['show_content'])) {
1707 1707
 		// Content positions.
1708 1708
 		$content_placement = array(
1709 1709
 			'above' => 'give_pre_form',
@@ -1711,18 +1711,18 @@  discard block
 block discarded – undo
1711 1711
 		);
1712 1712
 
1713 1713
 		// Check if content position already decoded.
1714
-		if ( in_array( $args['show_content'], $content_placement ) ) {
1714
+		if (in_array($args['show_content'], $content_placement)) {
1715 1715
 			return $args['show_content'];
1716 1716
 		}
1717 1717
 
1718
-		$show_content = ( 'none' !== $args['show_content'] ? $content_placement[ $args['show_content'] ] : '' );
1718
+		$show_content = ('none' !== $args['show_content'] ? $content_placement[$args['show_content']] : '');
1719 1719
 
1720
-	} elseif ( give_is_setting_enabled( get_post_meta( $form_id, '_give_display_content', true ) ) ) {
1721
-		$show_content = get_post_meta( $form_id, '_give_content_placement', true );
1720
+	} elseif (give_is_setting_enabled(get_post_meta($form_id, '_give_display_content', true))) {
1721
+		$show_content = get_post_meta($form_id, '_give_content_placement', true);
1722 1722
 
1723
-	} elseif ( 'none' !== get_post_meta( $form_id, '_give_content_option', true ) ) {
1723
+	} elseif ('none' !== get_post_meta($form_id, '_give_content_option', true)) {
1724 1724
 		// Backward compatibility for _give_content_option for v18.
1725
-		$show_content = get_post_meta( $form_id, '_give_content_option', true );
1725
+		$show_content = get_post_meta($form_id, '_give_content_option', true);
1726 1726
 	}
1727 1727
 
1728 1728
 	return $show_content;
@@ -1738,20 +1738,20 @@  discard block
 block discarded – undo
1738 1738
  *
1739 1739
  * @return void|bool
1740 1740
  */
1741
-function give_form_content( $form_id, $args ) {
1741
+function give_form_content($form_id, $args) {
1742 1742
 
1743
-	$show_content = give_get_form_content_placement( $form_id, $args );
1743
+	$show_content = give_get_form_content_placement($form_id, $args);
1744 1744
 
1745 1745
 	// Bailout.
1746
-	if( empty( $show_content ) ) {
1746
+	if (empty($show_content)) {
1747 1747
 		return false;
1748 1748
 	}
1749 1749
 
1750 1750
 	// Add action according to value.
1751
-	add_action( $show_content, 'give_form_display_content', 10, 2 );
1751
+	add_action($show_content, 'give_form_display_content', 10, 2);
1752 1752
 }
1753 1753
 
1754
-add_action( 'give_pre_form_output', 'give_form_content', 10, 2 );
1754
+add_action('give_pre_form_output', 'give_form_content', 10, 2);
1755 1755
 
1756 1756
 /**
1757 1757
  * Renders Post Form Content.
@@ -1765,22 +1765,22 @@  discard block
 block discarded – undo
1765 1765
  *
1766 1766
  * @return void
1767 1767
  */
1768
-function give_form_display_content( $form_id, $args ) {
1768
+function give_form_display_content($form_id, $args) {
1769 1769
 
1770
-	$content      = wpautop( get_post_meta( $form_id, '_give_form_content', true ) );
1771
-	$show_content = give_get_form_content_placement( $form_id, $args );
1770
+	$content      = wpautop(get_post_meta($form_id, '_give_form_content', true));
1771
+	$show_content = give_get_form_content_placement($form_id, $args);
1772 1772
 
1773
-	if ( give_is_setting_enabled( give_get_option( 'the_content_filter' ) ) ) {
1774
-		$content = apply_filters( 'the_content', $content );
1773
+	if (give_is_setting_enabled(give_get_option('the_content_filter'))) {
1774
+		$content = apply_filters('the_content', $content);
1775 1775
 	}
1776 1776
 
1777
-	$output = '<div id="give-form-content-' . $form_id . '" class="give-form-content-wrap ' . $show_content . '-content">' . $content . '</div>';
1777
+	$output = '<div id="give-form-content-'.$form_id.'" class="give-form-content-wrap '.$show_content.'-content">'.$content.'</div>';
1778 1778
 
1779
-	echo apply_filters( 'give_form_content_output', $output );
1779
+	echo apply_filters('give_form_content_output', $output);
1780 1780
 
1781 1781
 	//remove action to prevent content output on addition forms on page.
1782 1782
 	//@see: https://github.com/WordImpress/Give/issues/634.
1783
-	remove_action( $show_content, 'give_form_display_content' );
1783
+	remove_action($show_content, 'give_form_display_content');
1784 1784
 }
1785 1785
 
1786 1786
 /**
@@ -1792,7 +1792,7 @@  discard block
 block discarded – undo
1792 1792
  *
1793 1793
  * @return void
1794 1794
  */
1795
-function give_checkout_hidden_fields( $form_id ) {
1795
+function give_checkout_hidden_fields($form_id) {
1796 1796
 
1797 1797
 	/**
1798 1798
 	 * Fires while rendering hidden checkout fields, before the fields.
@@ -1801,13 +1801,13 @@  discard block
 block discarded – undo
1801 1801
 	 *
1802 1802
 	 * @param int $form_id The form ID.
1803 1803
 	 */
1804
-	do_action( 'give_hidden_fields_before', $form_id );
1804
+	do_action('give_hidden_fields_before', $form_id);
1805 1805
 
1806
-	if ( is_user_logged_in() ) { ?>
1806
+	if (is_user_logged_in()) { ?>
1807 1807
 		<input type="hidden" name="give-user-id" value="<?php echo get_current_user_id(); ?>"/>
1808 1808
 	<?php } ?>
1809 1809
 	<input type="hidden" name="give_action" value="purchase"/>
1810
-	<input type="hidden" name="give-gateway" value="<?php echo give_get_chosen_gateway( $form_id ); ?>"/>
1810
+	<input type="hidden" name="give-gateway" value="<?php echo give_get_chosen_gateway($form_id); ?>"/>
1811 1811
 	<?php
1812 1812
 	/**
1813 1813
 	 * Fires while rendering hidden checkout fields, after the fields.
@@ -1816,7 +1816,7 @@  discard block
 block discarded – undo
1816 1816
 	 *
1817 1817
 	 * @param int $form_id The form ID.
1818 1818
 	 */
1819
-	do_action( 'give_hidden_fields_after', $form_id );
1819
+	do_action('give_hidden_fields_after', $form_id);
1820 1820
 
1821 1821
 }
1822 1822
 
@@ -1831,20 +1831,20 @@  discard block
 block discarded – undo
1831 1831
  *
1832 1832
  * @return string $content Filtered content.
1833 1833
  */
1834
-function give_filter_success_page_content( $content ) {
1834
+function give_filter_success_page_content($content) {
1835 1835
 
1836 1836
 	$give_options = give_get_settings();
1837 1837
 
1838
-	if ( isset( $give_options['success_page'] ) && isset( $_GET['payment-confirmation'] ) && is_page( $give_options['success_page'] ) ) {
1839
-		if ( has_filter( 'give_payment_confirm_' . $_GET['payment-confirmation'] ) ) {
1840
-			$content = apply_filters( 'give_payment_confirm_' . $_GET['payment-confirmation'], $content );
1838
+	if (isset($give_options['success_page']) && isset($_GET['payment-confirmation']) && is_page($give_options['success_page'])) {
1839
+		if (has_filter('give_payment_confirm_'.$_GET['payment-confirmation'])) {
1840
+			$content = apply_filters('give_payment_confirm_'.$_GET['payment-confirmation'], $content);
1841 1841
 		}
1842 1842
 	}
1843 1843
 
1844 1844
 	return $content;
1845 1845
 }
1846 1846
 
1847
-add_filter( 'the_content', 'give_filter_success_page_content' );
1847
+add_filter('the_content', 'give_filter_success_page_content');
1848 1848
 
1849 1849
 /**
1850 1850
  * Test Mode Frontend Warning.
@@ -1855,12 +1855,12 @@  discard block
 block discarded – undo
1855 1855
  */
1856 1856
 function give_test_mode_frontend_warning() {
1857 1857
 
1858
-	if ( give_is_test_mode() ) {
1859
-		echo '<div class="give_error give_warning" id="give_error_test_mode"><p><strong>' . esc_html__( 'Notice:', 'give' ) . '</strong> ' . esc_html__( 'Test mode is enabled. While in test mode no live donations are processed.', 'give' ) . '</p></div>';
1858
+	if (give_is_test_mode()) {
1859
+		echo '<div class="give_error give_warning" id="give_error_test_mode"><p><strong>'.esc_html__('Notice:', 'give').'</strong> '.esc_html__('Test mode is enabled. While in test mode no live donations are processed.', 'give').'</p></div>';
1860 1860
 	}
1861 1861
 }
1862 1862
 
1863
-add_action( 'give_pre_form', 'give_test_mode_frontend_warning', 10 );
1863
+add_action('give_pre_form', 'give_test_mode_frontend_warning', 10);
1864 1864
 
1865 1865
 /**
1866 1866
  * Members-only Form.
@@ -1874,21 +1874,21 @@  discard block
 block discarded – undo
1874 1874
  *
1875 1875
  * @return string
1876 1876
  */
1877
-function give_members_only_form( $final_output, $args ) {
1877
+function give_members_only_form($final_output, $args) {
1878 1878
 
1879
-	$form_id = isset( $args['form_id'] ) ? $args['form_id'] : 0;
1879
+	$form_id = isset($args['form_id']) ? $args['form_id'] : 0;
1880 1880
 
1881 1881
 	//Sanity Check: Must have form_id & not be logged in.
1882
-	if ( empty( $form_id ) || is_user_logged_in() ) {
1882
+	if (empty($form_id) || is_user_logged_in()) {
1883 1883
 		return $final_output;
1884 1884
 	}
1885 1885
 
1886 1886
 	//Logged in only and Register / Login set to none.
1887
-	if ( give_logged_in_only( $form_id ) && give_show_login_register_option( $form_id ) == 'none' ) {
1887
+	if (give_logged_in_only($form_id) && give_show_login_register_option($form_id) == 'none') {
1888 1888
 
1889
-		$final_output = give_output_error( esc_html__( 'Please log in in order to complete your donation.', 'give' ), false );
1889
+		$final_output = give_output_error(esc_html__('Please log in in order to complete your donation.', 'give'), false);
1890 1890
 
1891
-		return apply_filters( 'give_members_only_output', $final_output, $form_id );
1891
+		return apply_filters('give_members_only_output', $final_output, $form_id);
1892 1892
 
1893 1893
 	}
1894 1894
 
@@ -1896,4 +1896,4 @@  discard block
 block discarded – undo
1896 1896
 
1897 1897
 }
1898 1898
 
1899
-add_filter( 'give_donate_form', 'give_members_only_form', 10, 2 );
1899
+add_filter('give_donate_form', 'give_members_only_form', 10, 2);
Please login to merge, or discard this patch.
includes/payments/class-payments-query.php 1 patch
Spacing   +115 added lines, -115 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
 
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
 	 *
57 57
 	 * @param  $args array The array of arguments that can be passed in and used for setting up this payment query.
58 58
 	 */
59
-	public function __construct( $args = array() ) {
59
+	public function __construct($args = array()) {
60 60
 		$defaults = array(
61 61
 			'output'          => 'payments', // Use 'posts' to get standard post objects
62
-			'post_type'       => array( 'give_payment' ),
62
+			'post_type'       => array('give_payment'),
63 63
 			'start_date'      => false,
64 64
 			'end_date'        => false,
65 65
 			'number'          => 20,
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 			'give_forms'      => null,
80 80
 		);
81 81
 
82
-		$this->args = wp_parse_args( $args, $defaults );
82
+		$this->args = wp_parse_args($args, $defaults);
83 83
 
84 84
 		$this->init();
85 85
 	}
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
 	 * @param $query_var
94 94
 	 * @param $value
95 95
 	 */
96
-	public function __set( $query_var, $value ) {
97
-		if ( in_array( $query_var, array( 'meta_query', 'tax_query' ) ) ) {
98
-			$this->args[ $query_var ][] = $value;
96
+	public function __set($query_var, $value) {
97
+		if (in_array($query_var, array('meta_query', 'tax_query'))) {
98
+			$this->args[$query_var][] = $value;
99 99
 		} else {
100
-			$this->args[ $query_var ] = $value;
100
+			$this->args[$query_var] = $value;
101 101
 		}
102 102
 	}
103 103
 
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
 	 *
110 110
 	 * @param $query_var
111 111
 	 */
112
-	public function __unset( $query_var ) {
113
-		unset( $this->args[ $query_var ] );
112
+	public function __unset($query_var) {
113
+		unset($this->args[$query_var]);
114 114
 	}
115 115
 
116 116
 	/**
@@ -123,20 +123,20 @@  discard block
 block discarded – undo
123 123
 	 */
124 124
 	public function init() {
125 125
 
126
-		add_action( 'give_pre_get_payments', array( $this, 'date_filter_pre' ) );
127
-		add_action( 'give_post_get_payments', array( $this, 'date_filter_post' ) );
128
-
129
-		add_action( 'give_pre_get_payments', array( $this, 'orderby' ) );
130
-		add_filter( 'posts_orderby', array( $this, 'custom_orderby' ), 10, 2 );
131
-		add_action( 'give_pre_get_payments', array( $this, 'status' ) );
132
-		add_action( 'give_pre_get_payments', array( $this, 'month' ) );
133
-		add_action( 'give_pre_get_payments', array( $this, 'per_page' ) );
134
-		add_action( 'give_pre_get_payments', array( $this, 'page' ) );
135
-		add_action( 'give_pre_get_payments', array( $this, 'user' ) );
136
-		add_action( 'give_pre_get_payments', array( $this, 'search' ) );
137
-		add_action( 'give_pre_get_payments', array( $this, 'mode' ) );
138
-		add_action( 'give_pre_get_payments', array( $this, 'children' ) );
139
-		add_action( 'give_pre_get_payments', array( $this, 'give_forms' ) );
126
+		add_action('give_pre_get_payments', array($this, 'date_filter_pre'));
127
+		add_action('give_post_get_payments', array($this, 'date_filter_post'));
128
+
129
+		add_action('give_pre_get_payments', array($this, 'orderby'));
130
+		add_filter('posts_orderby', array($this, 'custom_orderby'), 10, 2);
131
+		add_action('give_pre_get_payments', array($this, 'status'));
132
+		add_action('give_pre_get_payments', array($this, 'month'));
133
+		add_action('give_pre_get_payments', array($this, 'per_page'));
134
+		add_action('give_pre_get_payments', array($this, 'page'));
135
+		add_action('give_pre_get_payments', array($this, 'user'));
136
+		add_action('give_pre_get_payments', array($this, 'search'));
137
+		add_action('give_pre_get_payments', array($this, 'mode'));
138
+		add_action('give_pre_get_payments', array($this, 'children'));
139
+		add_action('give_pre_get_payments', array($this, 'give_forms'));
140 140
 	}
141 141
 
142 142
 	/**
@@ -160,27 +160,27 @@  discard block
 block discarded – undo
160 160
 		 *
161 161
 		 * @param Give_Payments_Query $this Payments query object.
162 162
 		 */
163
-		do_action( 'give_pre_get_payments', $this );
163
+		do_action('give_pre_get_payments', $this);
164 164
 
165
-		$query = new WP_Query( $this->args );
165
+		$query = new WP_Query($this->args);
166 166
 
167 167
 		$custom_output = array(
168 168
 			'payments',
169 169
 			'give_payments',
170 170
 		);
171 171
 
172
-		if ( ! in_array( $this->args['output'], $custom_output ) ) {
172
+		if ( ! in_array($this->args['output'], $custom_output)) {
173 173
 			return $query->posts;
174 174
 		}
175 175
 
176
-		if ( $query->have_posts() ) {
177
-			while ( $query->have_posts() ) {
176
+		if ($query->have_posts()) {
177
+			while ($query->have_posts()) {
178 178
 				$query->the_post();
179 179
 
180 180
 				$payment_id = get_post()->ID;
181
-				$payment    = new Give_Payment( $payment_id );
181
+				$payment    = new Give_Payment($payment_id);
182 182
 
183
-				$this->payments[] = apply_filters( 'give_payment', $payment, $payment_id, $this );
183
+				$this->payments[] = apply_filters('give_payment', $payment, $payment_id, $this);
184 184
 			}
185 185
 
186 186
 			wp_reset_postdata();
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 		 *
194 194
 		 * @param Give_Payments_Query $this Payments query object.
195 195
 		 */
196
-		do_action( 'give_post_get_payments', $this );
196
+		do_action('give_post_get_payments', $this);
197 197
 
198 198
 		return $this->payments;
199 199
 	}
@@ -207,13 +207,13 @@  discard block
 block discarded – undo
207 207
 	 * @return void
208 208
 	 */
209 209
 	public function date_filter_pre() {
210
-		if ( ! ( $this->args['start_date'] || $this->args['end_date'] ) ) {
210
+		if ( ! ($this->args['start_date'] || $this->args['end_date'])) {
211 211
 			return;
212 212
 		}
213 213
 
214
-		$this->setup_dates( $this->args['start_date'], $this->args['end_date'] );
214
+		$this->setup_dates($this->args['start_date'], $this->args['end_date']);
215 215
 
216
-		add_filter( 'posts_where', array( $this, 'payments_where' ) );
216
+		add_filter('posts_where', array($this, 'payments_where'));
217 217
 	}
218 218
 
219 219
 	/**
@@ -226,11 +226,11 @@  discard block
 block discarded – undo
226 226
 	 * @return void
227 227
 	 */
228 228
 	public function date_filter_post() {
229
-		if ( ! ( $this->args['start_date'] || $this->args['end_date'] ) ) {
229
+		if ( ! ($this->args['start_date'] || $this->args['end_date'])) {
230 230
 			return;
231 231
 		}
232 232
 
233
-		remove_filter( 'posts_where', array( $this, 'payments_where' ) );
233
+		remove_filter('posts_where', array($this, 'payments_where'));
234 234
 	}
235 235
 
236 236
 	/**
@@ -242,12 +242,12 @@  discard block
 block discarded – undo
242 242
 	 * @return void
243 243
 	 */
244 244
 	public function status() {
245
-		if ( ! isset ( $this->args['status'] ) ) {
245
+		if ( ! isset ($this->args['status'])) {
246 246
 			return;
247 247
 		}
248 248
 
249
-		$this->__set( 'post_status', $this->args['status'] );
250
-		$this->__unset( 'status' );
249
+		$this->__set('post_status', $this->args['status']);
250
+		$this->__unset('status');
251 251
 	}
252 252
 
253 253
 	/**
@@ -259,12 +259,12 @@  discard block
 block discarded – undo
259 259
 	 * @return void
260 260
 	 */
261 261
 	public function page() {
262
-		if ( ! isset ( $this->args['page'] ) ) {
262
+		if ( ! isset ($this->args['page'])) {
263 263
 			return;
264 264
 		}
265 265
 
266
-		$this->__set( 'paged', $this->args['page'] );
267
-		$this->__unset( 'page' );
266
+		$this->__set('paged', $this->args['page']);
267
+		$this->__unset('page');
268 268
 	}
269 269
 
270 270
 	/**
@@ -277,17 +277,17 @@  discard block
 block discarded – undo
277 277
 	 */
278 278
 	public function per_page() {
279 279
 
280
-		if ( ! isset( $this->args['number'] ) ) {
280
+		if ( ! isset($this->args['number'])) {
281 281
 			return;
282 282
 		}
283 283
 
284
-		if ( $this->args['number'] == - 1 ) {
285
-			$this->__set( 'nopaging', true );
284
+		if ($this->args['number'] == - 1) {
285
+			$this->__set('nopaging', true);
286 286
 		} else {
287
-			$this->__set( 'posts_per_page', $this->args['number'] );
287
+			$this->__set('posts_per_page', $this->args['number']);
288 288
 		}
289 289
 
290
-		$this->__unset( 'number' );
290
+		$this->__unset('number');
291 291
 	}
292 292
 
293 293
 	/**
@@ -299,12 +299,12 @@  discard block
 block discarded – undo
299 299
 	 * @return void
300 300
 	 */
301 301
 	public function month() {
302
-		if ( ! isset ( $this->args['month'] ) ) {
302
+		if ( ! isset ($this->args['month'])) {
303 303
 			return;
304 304
 		}
305 305
 
306
-		$this->__set( 'monthnum', $this->args['month'] );
307
-		$this->__unset( 'month' );
306
+		$this->__set('monthnum', $this->args['month']);
307
+		$this->__unset('month');
308 308
 	}
309 309
 
310 310
 	/**
@@ -316,23 +316,23 @@  discard block
 block discarded – undo
316 316
 	 * @return void
317 317
 	 */
318 318
 	public function orderby() {
319
-		switch ( $this->args['orderby'] ) {
319
+		switch ($this->args['orderby']) {
320 320
 			case 'amount' :
321
-				$this->__set( 'orderby', 'meta_value_num' );
322
-				$this->__set( 'meta_key', '_give_payment_total' );
321
+				$this->__set('orderby', 'meta_value_num');
322
+				$this->__set('meta_key', '_give_payment_total');
323 323
 				break;
324 324
 
325 325
 			case 'status' :
326
-				$this->__set( 'orderby', 'post_status' );
326
+				$this->__set('orderby', 'post_status');
327 327
 				break;
328 328
 
329 329
 			case 'donation_form' :
330
-				$this->__set( 'orderby', 'meta_value' );
331
-				$this->__set( 'meta_key', '_give_payment_form_title' );
330
+				$this->__set('orderby', 'meta_value');
331
+				$this->__set('meta_key', '_give_payment_form_title');
332 332
 				break;
333 333
 
334 334
 			default :
335
-				$this->__set( 'orderby', $this->args['orderby'] );
335
+				$this->__set('orderby', $this->args['orderby']);
336 336
 				break;
337 337
 		}
338 338
 	}
@@ -349,15 +349,15 @@  discard block
 block discarded – undo
349 349
 	 *
350 350
 	 * @return mixed
351 351
 	 */
352
-	public function custom_orderby( $order, $query ) {
353
-		$post_types = is_array( $query->query['post_type'] ) ? $query->query['post_type'] : array( $query->query['post_type'] );
354
-		if ( ! in_array( 'give_payment', $post_types ) || is_array( $query->query['orderby'] ) ) {
352
+	public function custom_orderby($order, $query) {
353
+		$post_types = is_array($query->query['post_type']) ? $query->query['post_type'] : array($query->query['post_type']);
354
+		if ( ! in_array('give_payment', $post_types) || is_array($query->query['orderby'])) {
355 355
 			return $order;
356 356
 		}
357 357
 
358
-		switch ( $query->query['orderby'] ) {
358
+		switch ($query->query['orderby']) {
359 359
 			case 'post_status':
360
-				$order = 'wp_posts.post_status ' . strtoupper( $query->query['order'] );
360
+				$order = 'wp_posts.post_status '.strtoupper($query->query['order']);
361 361
 				break;
362 362
 		}
363 363
 
@@ -373,20 +373,20 @@  discard block
 block discarded – undo
373 373
 	 * @return void
374 374
 	 */
375 375
 	public function user() {
376
-		if ( is_null( $this->args['user'] ) ) {
376
+		if (is_null($this->args['user'])) {
377 377
 			return;
378 378
 		}
379 379
 
380
-		if ( is_numeric( $this->args['user'] ) ) {
380
+		if (is_numeric($this->args['user'])) {
381 381
 			$user_key = '_give_payment_user_id';
382 382
 		} else {
383 383
 			$user_key = '_give_payment_user_email';
384 384
 		}
385 385
 
386
-		$this->__set( 'meta_query', array(
386
+		$this->__set('meta_query', array(
387 387
 			'key'   => $user_key,
388 388
 			'value' => $this->args['user'],
389
-		) );
389
+		));
390 390
 	}
391 391
 
392 392
 	/**
@@ -399,33 +399,33 @@  discard block
 block discarded – undo
399 399
 	 */
400 400
 	public function search() {
401 401
 
402
-		if ( ! isset( $this->args['s'] ) ) {
402
+		if ( ! isset($this->args['s'])) {
403 403
 			return;
404 404
 		}
405 405
 
406
-		$search = trim( $this->args['s'] );
406
+		$search = trim($this->args['s']);
407 407
 
408
-		if ( empty( $search ) ) {
408
+		if (empty($search)) {
409 409
 			return;
410 410
 		}
411 411
 
412
-		$is_email = is_email( $search ) || strpos( $search, '@' ) !== false;
413
-		$is_user  = strpos( $search, strtolower( 'user:' ) ) !== false;
412
+		$is_email = is_email($search) || strpos($search, '@') !== false;
413
+		$is_user  = strpos($search, strtolower('user:')) !== false;
414 414
 
415
-		if ( ! empty( $this->args['search_in_notes'] ) ) {
415
+		if ( ! empty($this->args['search_in_notes'])) {
416 416
 
417
-			$notes = give_get_payment_notes( 0, $search );
417
+			$notes = give_get_payment_notes(0, $search);
418 418
 
419
-			if ( ! empty( $notes ) ) {
419
+			if ( ! empty($notes)) {
420 420
 
421
-				$payment_ids = wp_list_pluck( (array) $notes, 'comment_post_ID' );
421
+				$payment_ids = wp_list_pluck((array) $notes, 'comment_post_ID');
422 422
 
423
-				$this->__set( 'post__in', $payment_ids );
423
+				$this->__set('post__in', $payment_ids);
424 424
 			}
425 425
 
426
-			$this->__unset( 's' );
426
+			$this->__unset('s');
427 427
 
428
-		} elseif ( $is_email || strlen( $search ) == 32 ) {
428
+		} elseif ($is_email || strlen($search) == 32) {
429 429
 
430 430
 			$key         = $is_email ? '_give_payment_user_email' : '_give_payment_purchase_key';
431 431
 			$search_meta = array(
@@ -434,19 +434,19 @@  discard block
 block discarded – undo
434 434
 				'compare' => 'LIKE',
435 435
 			);
436 436
 
437
-			$this->__set( 'meta_query', $search_meta );
438
-			$this->__unset( 's' );
437
+			$this->__set('meta_query', $search_meta);
438
+			$this->__unset('s');
439 439
 
440
-		} elseif ( $is_user ) {
440
+		} elseif ($is_user) {
441 441
 
442 442
 			$search_meta = array(
443 443
 				'key'   => '_give_payment_user_id',
444
-				'value' => trim( str_replace( 'user:', '', strtolower( $search ) ) ),
444
+				'value' => trim(str_replace('user:', '', strtolower($search))),
445 445
 			);
446 446
 
447
-			$this->__set( 'meta_query', $search_meta );
447
+			$this->__set('meta_query', $search_meta);
448 448
 
449
-			if ( give_get_option( 'enable_sequential' ) ) {
449
+			if (give_get_option('enable_sequential')) {
450 450
 
451 451
 				$search_meta = array(
452 452
 					'key'     => '_give_payment_number',
@@ -454,19 +454,19 @@  discard block
 block discarded – undo
454 454
 					'compare' => 'LIKE',
455 455
 				);
456 456
 
457
-				$this->__set( 'meta_query', $search_meta );
457
+				$this->__set('meta_query', $search_meta);
458 458
 
459 459
 				$this->args['meta_query']['relation'] = 'OR';
460 460
 
461 461
 			}
462 462
 
463
-			$this->__unset( 's' );
463
+			$this->__unset('s');
464 464
 
465 465
 		} elseif (
466
-			give_get_option( 'enable_sequential' ) &&
466
+			give_get_option('enable_sequential') &&
467 467
 			(
468
-				false !== strpos( $search, give_get_option( 'sequential_prefix' ) ) ||
469
-				false !== strpos( $search, give_get_option( 'sequential_postfix' ) )
468
+				false !== strpos($search, give_get_option('sequential_prefix')) ||
469
+				false !== strpos($search, give_get_option('sequential_postfix'))
470 470
 			)
471 471
 		) {
472 472
 
@@ -476,29 +476,29 @@  discard block
 block discarded – undo
476 476
 				'compare' => 'LIKE',
477 477
 			);
478 478
 
479
-			$this->__set( 'meta_query', $search_meta );
480
-			$this->__unset( 's' );
479
+			$this->__set('meta_query', $search_meta);
480
+			$this->__unset('s');
481 481
 
482
-		} elseif ( is_numeric( $search ) ) {
482
+		} elseif (is_numeric($search)) {
483 483
 
484
-			$post = get_post( $search );
484
+			$post = get_post($search);
485 485
 
486
-			if ( is_object( $post ) && $post->post_type == 'give_payment' ) {
486
+			if (is_object($post) && $post->post_type == 'give_payment') {
487 487
 
488 488
 				$arr   = array();
489 489
 				$arr[] = $search;
490
-				$this->__set( 'post__in', $arr );
491
-				$this->__unset( 's' );
490
+				$this->__set('post__in', $arr);
491
+				$this->__unset('s');
492 492
 			}
493
-		} elseif ( '#' == substr( $search, 0, 1 ) ) {
493
+		} elseif ('#' == substr($search, 0, 1)) {
494 494
 
495
-			$search = str_replace( '#:', '', $search );
496
-			$search = str_replace( '#', '', $search );
497
-			$this->__set( 'give_forms', $search );
498
-			$this->__unset( 's' );
495
+			$search = str_replace('#:', '', $search);
496
+			$search = str_replace('#', '', $search);
497
+			$this->__set('give_forms', $search);
498
+			$this->__unset('s');
499 499
 
500 500
 		} else {
501
-			$this->__set( 's', $search );
501
+			$this->__set('s', $search);
502 502
 
503 503
 		}
504 504
 
@@ -513,16 +513,16 @@  discard block
 block discarded – undo
513 513
 	 * @return void
514 514
 	 */
515 515
 	public function mode() {
516
-		if ( empty( $this->args['mode'] ) || $this->args['mode'] == 'all' ) {
517
-			$this->__unset( 'mode' );
516
+		if (empty($this->args['mode']) || $this->args['mode'] == 'all') {
517
+			$this->__unset('mode');
518 518
 
519 519
 			return;
520 520
 		}
521 521
 
522
-		$this->__set( 'meta_query', array(
522
+		$this->__set('meta_query', array(
523 523
 			'key'   => '_give_payment_mode',
524 524
 			'value' => $this->args['mode'],
525
-		) );
525
+		));
526 526
 	}
527 527
 
528 528
 	/**
@@ -534,10 +534,10 @@  discard block
 block discarded – undo
534 534
 	 * @return void
535 535
 	 */
536 536
 	public function children() {
537
-		if ( empty( $this->args['children'] ) ) {
538
-			$this->__set( 'post_parent', 0 );
537
+		if (empty($this->args['children'])) {
538
+			$this->__set('post_parent', 0);
539 539
 		}
540
-		$this->__unset( 'children' );
540
+		$this->__unset('children');
541 541
 	}
542 542
 
543 543
 	/**
@@ -550,25 +550,25 @@  discard block
 block discarded – undo
550 550
 	 */
551 551
 	public function give_forms() {
552 552
 
553
-		if ( empty( $this->args['give_forms'] ) ) {
553
+		if (empty($this->args['give_forms'])) {
554 554
 			return;
555 555
 		}
556 556
 
557 557
 		$compare = '=';
558 558
 
559
-		if ( is_array( $this->args['give_forms'] ) ) {
559
+		if (is_array($this->args['give_forms'])) {
560 560
 			$compare = 'IN';
561 561
 		}
562 562
 
563
-		$this->__set( 'meta_query', array(
563
+		$this->__set('meta_query', array(
564 564
 			array(
565 565
 				'key'     => '_give_payment_form_id',
566 566
 				'value'   => $this->args['give_forms'],
567 567
 				'compare' => $compare,
568 568
 			),
569
-		) );
569
+		));
570 570
 
571
-		$this->__unset( 'give_forms' );
571
+		$this->__unset('give_forms');
572 572
 
573 573
 	}
574 574
 
Please login to merge, or discard this patch.
includes/admin/tools/class-settings-system-info.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_System_Info' ) ) :
16
+if ( ! class_exists('Give_Settings_System_Info')) :
17 17
 
18 18
 	/**
19 19
 	 * Give_Settings_System_Info.
@@ -43,15 +43,15 @@  discard block
 block discarded – undo
43 43
 		 */
44 44
 		public function __construct() {
45 45
 			$this->id    = 'system-info';
46
-			$this->label = esc_html__( 'System Info', 'give' );
46
+			$this->label = esc_html__('System Info', 'give');
47 47
 
48
-			add_filter( 'give-tools_tabs_array', array( $this, 'add_settings_page' ), 20 );
49
-			add_action( "give-tools_settings_{$this->id}_page", array( $this, 'output' ) );
48
+			add_filter('give-tools_tabs_array', array($this, 'add_settings_page'), 20);
49
+			add_action("give-tools_settings_{$this->id}_page", array($this, 'output'));
50 50
 
51 51
 			// Do not use main form for this tab.
52
-			if( give_get_current_setting_tab() === $this->id ) {
53
-				add_action( "give-tools_open_form", '__return_empty_string' );
54
-				add_action( "give-tools_close_form", '__return_empty_string' );
52
+			if (give_get_current_setting_tab() === $this->id) {
53
+				add_action("give-tools_open_form", '__return_empty_string');
54
+				add_action("give-tools_close_form", '__return_empty_string');
55 55
 			}
56 56
 		}
57 57
 
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 		 * @param  array $pages Lst of pages.
63 63
 		 * @return array
64 64
 		 */
65
-		public function add_settings_page( $pages ) {
66
-			$pages[ $this->id ] = $this->label;
65
+		public function add_settings_page($pages) {
66
+			$pages[$this->id] = $this->label;
67 67
 
68 68
 			return $pages;
69 69
 		}
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 		 */
77 77
 		public function output() {
78 78
 			$GLOBALS['give_hide_save_button'] = true;
79
-			include_once( 'views/html-admin-page-system-info.php' );
79
+			include_once('views/html-admin-page-system-info.php');
80 80
 		}
81 81
 	}
82 82
 
Please login to merge, or discard this patch.
includes/admin/tools/views/html-admin-page-system-info.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -586,9 +586,9 @@
 block discarded – undo
586 586
 					}
587 587
 
588 588
 					echo ' &ndash; '
589
-					     . sprintf( _x( 'by %s', 'by author', 'give' ), wp_kses( $author_name, wp_kses_allowed_html( 'post' ) ) )
590
-					     . ' &ndash; '
591
-					     . esc_html( $plugin_data['Version'] );
589
+						 . sprintf( _x( 'by %s', 'by author', 'give' ), wp_kses( $author_name, wp_kses_allowed_html( 'post' ) ) )
590
+						 . ' &ndash; '
591
+						 . esc_html( $plugin_data['Version'] );
592 592
 					?>
593 593
 				</td>
594 594
 			</tr>
Please login to merge, or discard this patch.
Braces   +16 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,7 +57,12 @@  discard block
 block discarded – undo
57 57
 		<tr>
58 58
 			<td data-export-label="WP Multisite"><?php _e( 'WP Multisite', 'give' ); ?>:</td>
59 59
 			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Whether or not you have WordPress Multisite enabled.', 'give' ) ); ?>"></span></td>
60
-			<td><?php if ( is_multisite() ) echo '<span class="dashicons dashicons-yes"></span>'; else echo '&ndash;'; ?></td>
60
+			<td><?php if ( is_multisite() ) {
61
+	echo '<span class="dashicons dashicons-yes"></span>';
62
+} else {
63
+	echo '&ndash;';
64
+}
65
+?></td>
61 66
 		</tr>
62 67
 		<tr>
63 68
 			<td data-export-label="WP Memory Limit"><?php _e( 'WP Memory Limit', 'give' ); ?>:</td>
@@ -85,9 +90,12 @@  discard block
 block discarded – undo
85 90
 			<td>
86 91
 				<?php if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) : ?>
87 92
 					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
88
-				<?php else : ?>
93
+				<?php else {
94
+	: ?>
89 95
 					<mark class="no">&ndash;</mark>
90
-				<?php endif; ?>
96
+				<?php endif;
97
+}
98
+?>
91 99
 			</td>
92 100
 		</tr>
93 101
 		<tr>
@@ -96,9 +104,12 @@  discard block
 block discarded – undo
96 104
 			<td>
97 105
 				<?php if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) : ?>
98 106
 					<mark class="no">&ndash;</mark>
99
-				<?php else : ?>
107
+				<?php else {
108
+	: ?>
100 109
 					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
101
-				<?php endif; ?>
110
+				<?php endif;
111
+}
112
+?>
102 113
 			</td>
103 114
 		</tr>
104 115
 		<tr>
Please login to merge, or discard this patch.
Spacing   +290 added lines, -290 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
  * Admin View: System Info
4 4
  */
5 5
 
6
-if ( ! defined( 'ABSPATH' ) ) {
6
+if ( ! defined('ABSPATH')) {
7 7
 	exit;
8 8
 }
9 9
 
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
 ?>
23 23
 
24 24
 <div class="give-debug-report-wrapper updated">
25
-	<p><?php _e( 'Please copy and paste this information in your ticket when contacting support:', 'give' ); ?> </p>
25
+	<p><?php _e('Please copy and paste this information in your ticket when contacting support:', 'give'); ?> </p>
26 26
 	<p class="submit">
27
-		<a class="button-primary js-give-debug-report-button" href="#"><?php _e( 'Get System Report', 'give' ); ?></a>
28
-		<a class="button-secondary docs" href="http://docs.givewp.com/settings-system-info" target="_blank"><?php _e( 'Understanding the System Report', 'give' ); ?></a>
27
+		<a class="button-primary js-give-debug-report-button" href="#"><?php _e('Get System Report', 'give'); ?></a>
28
+		<a class="button-secondary docs" href="http://docs.givewp.com/settings-system-info" target="_blank"><?php _e('Understanding the System Report', 'give'); ?></a>
29 29
 	</p>
30 30
 	<div class="give-debug-report js-give-debug-report">
31 31
 		<textarea readonly="readonly"></textarea>
@@ -35,55 +35,55 @@  discard block
 block discarded – undo
35 35
 <table class="give-status-table widefat" cellspacing="0" id="status">
36 36
 	<thead>
37 37
 		<tr>
38
-			<th colspan="3" data-export-label="WordPress Environment"><h2><?php _e( 'WordPress Environment', 'give' ); ?></h2></th>
38
+			<th colspan="3" data-export-label="WordPress Environment"><h2><?php _e('WordPress Environment', 'give'); ?></h2></th>
39 39
 		</tr>
40 40
 	</thead>
41 41
 	<tbody>
42 42
 		<tr>
43
-			<td data-export-label="Home URL"><?php _e( 'Home URL', 'give' ); ?>:</td>
44
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The URL of your site\'s homepage.', 'give' ) ); ?>"></span></td>
45
-			<td><?php form_option( 'home' ); ?></td>
43
+			<td data-export-label="Home URL"><?php _e('Home URL', 'give'); ?>:</td>
44
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The URL of your site\'s homepage.', 'give')); ?>"></span></td>
45
+			<td><?php form_option('home'); ?></td>
46 46
 		</tr>
47 47
 		<tr>
48
-			<td data-export-label="Site URL"><?php _e( 'Site URL', 'give' ); ?>:</td>
49
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The root URL of your site.', 'give' ) ); ?>"></span></td>
50
-			<td><?php form_option( 'siteurl' ); ?></td>
48
+			<td data-export-label="Site URL"><?php _e('Site URL', 'give'); ?>:</td>
49
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The root URL of your site.', 'give')); ?>"></span></td>
50
+			<td><?php form_option('siteurl'); ?></td>
51 51
 		</tr>
52 52
 		<tr>
53
-			<td data-export-label="WP Version"><?php _e( 'WP Version', 'give' ); ?>:</td>
54
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The version of WordPress installed on your site.', 'give' ) ); ?>"></span></td>
53
+			<td data-export-label="WP Version"><?php _e('WP Version', 'give'); ?>:</td>
54
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The version of WordPress installed on your site.', 'give')); ?>"></span></td>
55 55
 			<td><?php bloginfo('version'); ?></td>
56 56
 		</tr>
57 57
 		<tr>
58
-			<td data-export-label="WP Multisite"><?php _e( 'WP Multisite', 'give' ); ?>:</td>
59
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Whether or not you have WordPress Multisite enabled.', 'give' ) ); ?>"></span></td>
60
-			<td><?php if ( is_multisite() ) echo '<span class="dashicons dashicons-yes"></span>'; else echo '&ndash;'; ?></td>
58
+			<td data-export-label="WP Multisite"><?php _e('WP Multisite', 'give'); ?>:</td>
59
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Whether or not you have WordPress Multisite enabled.', 'give')); ?>"></span></td>
60
+			<td><?php if (is_multisite()) echo '<span class="dashicons dashicons-yes"></span>'; else echo '&ndash;'; ?></td>
61 61
 		</tr>
62 62
 		<tr>
63
-			<td data-export-label="WP Memory Limit"><?php _e( 'WP Memory Limit', 'give' ); ?>:</td>
64
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The maximum amount of memory (RAM) that your site can use at one time.', 'give' ) ); ?>"></span></td>
63
+			<td data-export-label="WP Memory Limit"><?php _e('WP Memory Limit', 'give'); ?>:</td>
64
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The maximum amount of memory (RAM) that your site can use at one time.', 'give')); ?>"></span></td>
65 65
 			<td>
66 66
 				<?php
67
-				$memory = give_let_to_num( WP_MEMORY_LIMIT );
67
+				$memory = give_let_to_num(WP_MEMORY_LIMIT);
68 68
 
69
-				if ( function_exists( 'memory_get_usage' ) ) {
70
-					$system_memory = give_let_to_num( @ini_get( 'memory_limit' ) );
71
-					$memory        = max( $memory, $system_memory );
69
+				if (function_exists('memory_get_usage')) {
70
+					$system_memory = give_let_to_num(@ini_get('memory_limit'));
71
+					$memory        = max($memory, $system_memory);
72 72
 				}
73 73
 
74
-				if ( $memory < 67108864 ) {
75
-					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( __( '%s - We recommend setting memory to at least 64 MB. See: %s', 'give' ), size_format( $memory ), '<a href="https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">' . __( 'Increasing memory allocated to PHP', 'give' ) . '</a>' ) . '</mark>';
74
+				if ($memory < 67108864) {
75
+					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> '.sprintf(__('%s - We recommend setting memory to at least 64 MB. See: %s', 'give'), size_format($memory), '<a href="https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">'.__('Increasing memory allocated to PHP', 'give').'</a>').'</mark>';
76 76
 				} else {
77
-					echo '<mark class="yes">' . size_format( $memory ) . '</mark>';
77
+					echo '<mark class="yes">'.size_format($memory).'</mark>';
78 78
 				}
79 79
 				?>
80 80
 			</td>
81 81
 		</tr>
82 82
 		<tr>
83
-			<td data-export-label="WP Debug Mode"><?php _e( 'WP Debug Mode', 'give' ); ?>:</td>
84
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Displays whether or not WordPress is in Debug Mode.', 'give' ) ); ?>"></span></td>
83
+			<td data-export-label="WP Debug Mode"><?php _e('WP Debug Mode', 'give'); ?>:</td>
84
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Displays whether or not WordPress is in Debug Mode.', 'give')); ?>"></span></td>
85 85
 			<td>
86
-				<?php if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) : ?>
86
+				<?php if (defined('WP_DEBUG') && WP_DEBUG) : ?>
87 87
 					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
88 88
 				<?php else : ?>
89 89
 					<mark class="no">&ndash;</mark>
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
 			</td>
92 92
 		</tr>
93 93
 		<tr>
94
-			<td data-export-label="WP Cron"><?php _e( 'WP Cron', 'give' ); ?>:</td>
95
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Displays whether or not WP Cron Jobs are enabled.', 'give' ) ); ?>"></span></td>
94
+			<td data-export-label="WP Cron"><?php _e('WP Cron', 'give'); ?>:</td>
95
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Displays whether or not WP Cron Jobs are enabled.', 'give')); ?>"></span></td>
96 96
 			<td>
97
-				<?php if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) : ?>
97
+				<?php if (defined('DISABLE_WP_CRON') && DISABLE_WP_CRON) : ?>
98 98
 					<mark class="no">&ndash;</mark>
99 99
 				<?php else : ?>
100 100
 					<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>
@@ -102,55 +102,55 @@  discard block
 block discarded – undo
102 102
 			</td>
103 103
 		</tr>
104 104
 		<tr>
105
-			<td data-export-label="Language"><?php _e( 'Language', 'give' ); ?>:</td>
106
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The current language used by WordPress. Default = English', 'give' ) ); ?>"></span></td>
105
+			<td data-export-label="Language"><?php _e('Language', 'give'); ?>:</td>
106
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The current language used by WordPress. Default = English', 'give')); ?>"></span></td>
107 107
 			<td><?php echo get_locale(); ?></td>
108 108
 		</tr>
109 109
 		<tr>
110
-			<td data-export-label="Permalink Structure"><?php _e( 'Permalink Structure', 'give' ); ?>:</td>
111
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The permalink structure as defined in Settings.', 'give' ) ); ?>"></span></td>
112
-			<td><?php echo esc_html( get_option( 'permalink_structure', __( 'Default', 'give' ) ) ); ?></td>
110
+			<td data-export-label="Permalink Structure"><?php _e('Permalink Structure', 'give'); ?>:</td>
111
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The permalink structure as defined in Settings.', 'give')); ?>"></span></td>
112
+			<td><?php echo esc_html(get_option('permalink_structure', __('Default', 'give'))); ?></td>
113 113
 		</tr>
114 114
 		<tr>
115
-			<td data-export-label="Show on Front"><?php _e( 'Show on Front', 'give' ); ?>:</td>
116
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Whether your front page is set to show posts or a static page.', 'give' ) ); ?>"></span></td>
117
-			<td><?php echo esc_html( get_option( 'show_on_front', '&ndash;' ) ); ?></td>
115
+			<td data-export-label="Show on Front"><?php _e('Show on Front', 'give'); ?>:</td>
116
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Whether your front page is set to show posts or a static page.', 'give')); ?>"></span></td>
117
+			<td><?php echo esc_html(get_option('show_on_front', '&ndash;')); ?></td>
118 118
 		</tr>
119
-		<?php if ( 'page' === get_option( 'show_on_front' ) ) : ?>
119
+		<?php if ('page' === get_option('show_on_front')) : ?>
120 120
 			<?php
121
-			$front_page_id = absint( get_option( 'page_on_front' ) );
122
-			$blog_page_id  = absint( get_option( 'page_for_posts' ) );
121
+			$front_page_id = absint(get_option('page_on_front'));
122
+			$blog_page_id  = absint(get_option('page_for_posts'));
123 123
 			?>
124 124
 			<tr>
125
-				<td data-export-label="Page on Front"><?php _e( 'Page on Front', 'give' ); ?>:</td>
126
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The page set to display as your front page.', 'give' ) ); ?>"></span></td>
127
-				<td><?php echo 0 !== $front_page_id ? esc_html( get_the_title( $front_page_id ) . ' (#' . $front_page_id . ')' ) : __( 'Unset', 'give' ); ?></td>
125
+				<td data-export-label="Page on Front"><?php _e('Page on Front', 'give'); ?>:</td>
126
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The page set to display as your front page.', 'give')); ?>"></span></td>
127
+				<td><?php echo 0 !== $front_page_id ? esc_html(get_the_title($front_page_id).' (#'.$front_page_id.')') : __('Unset', 'give'); ?></td>
128 128
 			</tr>
129 129
 			<tr>
130
-				<td data-export-label="Page for Posts"><?php _e( 'Page for Posts', 'give' ); ?>:</td>
131
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The page set to display your posts.', 'give' ) ); ?>"></span></td>
132
-				<td><?php echo 0 !== $blog_page_id ? esc_html( get_the_title( $blog_page_id ) . ' (#' . $blog_page_id . ')' ) : __( 'Unset', 'give' ); ?></td>
130
+				<td data-export-label="Page for Posts"><?php _e('Page for Posts', 'give'); ?>:</td>
131
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The page set to display your posts.', 'give')); ?>"></span></td>
132
+				<td><?php echo 0 !== $blog_page_id ? esc_html(get_the_title($blog_page_id).' (#'.$blog_page_id.')') : __('Unset', 'give'); ?></td>
133 133
 			</tr>
134
-		<?php endif;?>
134
+		<?php endif; ?>
135 135
 		<tr>
136
-			<td data-export-label="Table Prefix Length"><?php _e( 'Table Prefix Length', 'give' ); ?>:</td>
137
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The length of the table prefix used in your WordPress database.', 'give' ) ); ?>"></span></td>
138
-			<td><?php echo esc_html( strlen( $wpdb->prefix ) ); ?></td>
136
+			<td data-export-label="Table Prefix Length"><?php _e('Table Prefix Length', 'give'); ?>:</td>
137
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The length of the table prefix used in your WordPress database.', 'give')); ?>"></span></td>
138
+			<td><?php echo esc_html(strlen($wpdb->prefix)); ?></td>
139 139
 		</tr>
140 140
 		<tr>
141
-			<td data-export-label="Table Prefix Status"><?php _e( 'Table Prefix Status', 'give' ); ?>:</td>
142
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The status of the table prefix used in your WordPress database.', 'give' ) ); ?>"></span></td>
143
-			<td><?php echo strlen( $wpdb->prefix ) > 16 ? esc_html( 'Error: Too long', 'give' ) : esc_html( 'Acceptable', 'give' ); ?></td>
141
+			<td data-export-label="Table Prefix Status"><?php _e('Table Prefix Status', 'give'); ?>:</td>
142
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The status of the table prefix used in your WordPress database.', 'give')); ?>"></span></td>
143
+			<td><?php echo strlen($wpdb->prefix) > 16 ? esc_html('Error: Too long', 'give') : esc_html('Acceptable', 'give'); ?></td>
144 144
 		</tr>
145 145
 		<tr>
146
-			<td data-export-label="Admin AJAX"><?php _e( 'Admin AJAX', 'give' ); ?>:</td>
147
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Whether Admin AJAX is accessible.', 'give' ) ); ?>"></span></td>
148
-			<td><?php echo give_test_ajax_works() ? __( 'Accessible', 'give' ) : __( 'Inaccessible', 'give' ); ?></td>
146
+			<td data-export-label="Admin AJAX"><?php _e('Admin AJAX', 'give'); ?>:</td>
147
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Whether Admin AJAX is accessible.', 'give')); ?>"></span></td>
148
+			<td><?php echo give_test_ajax_works() ? __('Accessible', 'give') : __('Inaccessible', 'give'); ?></td>
149 149
 		</tr>
150 150
 		<tr>
151
-			<td data-export-label="Registered Post Stati"><?php _e( 'Registered Post Stati', 'give' ); ?>:</td>
152
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'A list of all registered post stati.', 'give' ) ); ?>"></span></td>
153
-			<td><?php echo esc_html( implode( ', ', get_post_stati() ) ); ?></td>
151
+			<td data-export-label="Registered Post Stati"><?php _e('Registered Post Stati', 'give'); ?>:</td>
152
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('A list of all registered post stati.', 'give')); ?>"></span></td>
153
+			<td><?php echo esc_html(implode(', ', get_post_stati())); ?></td>
154 154
 		</tr>
155 155
 	</tbody>
156 156
 </table>
@@ -158,71 +158,71 @@  discard block
 block discarded – undo
158 158
 <table class="give-status-table widefat" cellspacing="0">
159 159
 	<thead>
160 160
 		<tr>
161
-			<th colspan="3" data-export-label="Server Environment"><h2><?php _e( 'Server Environment', 'give' ); ?></h2></th>
161
+			<th colspan="3" data-export-label="Server Environment"><h2><?php _e('Server Environment', 'give'); ?></h2></th>
162 162
 		</tr>
163 163
 	</thead>
164 164
 	<tbody>
165 165
 		<tr>
166
-			<td data-export-label="Hosting Provider"><?php _e( 'Hosting Provider', 'give' ); ?>:</td>
167
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The hosting provider for this WordPress installation.', 'give' ) ); ?>"></span></td>
168
-			<td><?php echo give_get_host() ? esc_html( give_get_host() ) : __( 'Unknown', 'give' ); ?></td>
166
+			<td data-export-label="Hosting Provider"><?php _e('Hosting Provider', 'give'); ?>:</td>
167
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The hosting provider for this WordPress installation.', 'give')); ?>"></span></td>
168
+			<td><?php echo give_get_host() ? esc_html(give_get_host()) : __('Unknown', 'give'); ?></td>
169 169
 		</tr>
170 170
 		<tr>
171
-			<td data-export-label="Server Info"><?php _e( 'Server Info', 'give' ); ?>:</td>
172
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Information about the web server that is currently hosting your site.', 'give' ) ); ?>"></span></td>
173
-			<td><?php echo esc_html( $_SERVER['SERVER_SOFTWARE'] ); ?></td>
171
+			<td data-export-label="Server Info"><?php _e('Server Info', 'give'); ?>:</td>
172
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Information about the web server that is currently hosting your site.', 'give')); ?>"></span></td>
173
+			<td><?php echo esc_html($_SERVER['SERVER_SOFTWARE']); ?></td>
174 174
 		</tr>
175 175
 		<tr>
176
-			<td data-export-label="PHP Version"><?php _e( 'PHP Version', 'give' ); ?>:</td>
177
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The version of PHP installed on your hosting server.', 'give' ) ); ?>"></span></td>
176
+			<td data-export-label="PHP Version"><?php _e('PHP Version', 'give'); ?>:</td>
177
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The version of PHP installed on your hosting server.', 'give')); ?>"></span></td>
178 178
 			<td><?php
179 179
 				// Check if phpversion function exists.
180
-				if ( function_exists( 'phpversion' ) ) {
180
+				if (function_exists('phpversion')) {
181 181
 					$php_version = phpversion();
182 182
 
183
-					if ( version_compare( $php_version, '5.6', '<' ) ) {
184
-						echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( __( '%s - We recommend a minimum PHP version of 5.6. See: %s', 'give' ), esc_html( $php_version ), '<a href="http://docs.givewp.com/settings-system-info" target="_blank">' . __( 'PHP Requirements in Give', 'give' ) . '</a>' ) . '</mark>';
183
+					if (version_compare($php_version, '5.6', '<')) {
184
+						echo '<mark class="error"><span class="dashicons dashicons-warning"></span> '.sprintf(__('%s - We recommend a minimum PHP version of 5.6. See: %s', 'give'), esc_html($php_version), '<a href="http://docs.givewp.com/settings-system-info" target="_blank">'.__('PHP Requirements in Give', 'give').'</a>').'</mark>';
185 185
 					} else {
186
-						echo '<mark class="yes">' . esc_html( $php_version ) . '</mark>';
186
+						echo '<mark class="yes">'.esc_html($php_version).'</mark>';
187 187
 					}
188 188
 				} else {
189
-					_e( "Couldn't determine PHP version because phpversion() doesn't exist.", 'give' );
189
+					_e("Couldn't determine PHP version because phpversion() doesn't exist.", 'give');
190 190
 				}
191 191
 				?></td>
192 192
 		</tr>
193
-		<?php if ( function_exists( 'ini_get' ) ) : ?>
193
+		<?php if (function_exists('ini_get')) : ?>
194 194
 			<tr>
195
-				<td data-export-label="PHP Post Max Size"><?php _e( 'PHP Post Max Size', 'give' ); ?>:</td>
196
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The largest filesize that can be contained in one post.', 'give' ) ); ?>"></span></td>
197
-				<td><?php echo size_format( give_let_to_num( ini_get( 'post_max_size' ) ) ); ?></td>
195
+				<td data-export-label="PHP Post Max Size"><?php _e('PHP Post Max Size', 'give'); ?>:</td>
196
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The largest filesize that can be contained in one post.', 'give')); ?>"></span></td>
197
+				<td><?php echo size_format(give_let_to_num(ini_get('post_max_size'))); ?></td>
198 198
 			</tr>
199 199
 			<tr>
200
-				<td data-export-label="PHP Time Limit"><?php _e( 'PHP Time Limit', 'give' ); ?>:</td>
201
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups).', 'give' ) ); ?>"></span></td>
202
-				<td><?php echo ini_get( 'max_execution_time' ); ?></td>
200
+				<td data-export-label="PHP Time Limit"><?php _e('PHP Time Limit', 'give'); ?>:</td>
201
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The amount of time (in seconds) that your site will spend on a single operation before timing out (to avoid server lockups).', 'give')); ?>"></span></td>
202
+				<td><?php echo ini_get('max_execution_time'); ?></td>
203 203
 			</tr>
204 204
 			<tr>
205
-				<td data-export-label="PHP Max Input Vars"><?php _e( 'PHP Max Input Vars', 'give' ); ?>:</td>
206
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The maximum number of variables your server can use for a single function to avoid overloads.', 'give' ) ); ?>"></span></td>
207
-				<td><?php echo ini_get( 'max_input_vars' ); ?></td>
205
+				<td data-export-label="PHP Max Input Vars"><?php _e('PHP Max Input Vars', 'give'); ?>:</td>
206
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The maximum number of variables your server can use for a single function to avoid overloads.', 'give')); ?>"></span></td>
207
+				<td><?php echo ini_get('max_input_vars'); ?></td>
208 208
 			</tr>
209 209
 			<tr>
210
-				<td data-export-label="PHP Max Upload Size"><?php _e( 'PHP Max Upload Size', 'give' ); ?>:</td>
211
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The largest filesize that can be uploaded to your WordPress installation.', 'give' ) ); ?>"></span></td>
212
-				<td><?php echo size_format( wp_max_upload_size() ); ?></td>
210
+				<td data-export-label="PHP Max Upload Size"><?php _e('PHP Max Upload Size', 'give'); ?>:</td>
211
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The largest filesize that can be uploaded to your WordPress installation.', 'give')); ?>"></span></td>
212
+				<td><?php echo size_format(wp_max_upload_size()); ?></td>
213 213
 			</tr>
214 214
 			<tr>
215
-				<td data-export-label="cURL Version"><?php _e( 'cURL Version', 'give' ); ?>:</td>
216
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The version of cURL installed on your server.', 'give' ) ); ?>"></span></td>
215
+				<td data-export-label="cURL Version"><?php _e('cURL Version', 'give'); ?>:</td>
216
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The version of cURL installed on your server.', 'give')); ?>"></span></td>
217 217
 				<td>
218 218
 					<?php
219
-					if ( function_exists( 'curl_version' ) ) {
219
+					if (function_exists('curl_version')) {
220 220
 						$curl_version = curl_version();
221 221
 
222
-						if ( version_compare( $curl_version['version'], '7.40', '<' ) ) {
223
-							echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( __( '%s - We recommend a minimum cURL version of 7.40.', 'give' ), esc_html( $curl_version['version'] . ', ' . $curl_version['ssl_version'] ) ) . '</mark>';
222
+						if (version_compare($curl_version['version'], '7.40', '<')) {
223
+							echo '<mark class="error"><span class="dashicons dashicons-warning"></span> '.sprintf(__('%s - We recommend a minimum cURL version of 7.40.', 'give'), esc_html($curl_version['version'].', '.$curl_version['ssl_version'])).'</mark>';
224 224
 						} else {
225
-							echo '<mark class="yes">' . esc_html( $curl_version['version'] . ', ' . $curl_version['ssl_version'] ) . '</mark>';
225
+							echo '<mark class="yes">'.esc_html($curl_version['version'].', '.$curl_version['ssl_version']).'</mark>';
226 226
 						}
227 227
 					} else {
228 228
 						echo '&ndash';
@@ -231,42 +231,42 @@  discard block
 block discarded – undo
231 231
 				</td>
232 232
 			</tr>
233 233
 			<tr>
234
-				<td data-export-label="SUHOSIN Installed"><?php _e( 'SUHOSIN Installed', 'give' ); ?>:</td>
235
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Suhosin is an advanced protection system for PHP installations. It was designed to protect your servers on the one hand against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself. If enabled on your server, Suhosin may need to be configured to increase its data submission limits.', 'give' ) ); ?>"></span></td>
236
-				<td><?php echo extension_loaded( 'suhosin' ) ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;'; ?></td>
234
+				<td data-export-label="SUHOSIN Installed"><?php _e('SUHOSIN Installed', 'give'); ?>:</td>
235
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Suhosin is an advanced protection system for PHP installations. It was designed to protect your servers on the one hand against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself. If enabled on your server, Suhosin may need to be configured to increase its data submission limits.', 'give')); ?>"></span></td>
236
+				<td><?php echo extension_loaded('suhosin') ? '<span class="dashicons dashicons-yes"></span>' : '&ndash;'; ?></td>
237 237
 			</tr>
238 238
 		<?php endif;
239 239
 
240
-		if ( $wpdb->use_mysqli ) {
241
-			$ver = mysqli_get_server_info( $wpdb->dbh );
240
+		if ($wpdb->use_mysqli) {
241
+			$ver = mysqli_get_server_info($wpdb->dbh);
242 242
 		} else {
243 243
 			$ver = mysql_get_server_info();
244 244
 		}
245 245
 
246
-		if ( ! empty( $wpdb->is_mysql ) && ! stristr( $ver, 'MariaDB' ) ) : ?>
246
+		if ( ! empty($wpdb->is_mysql) && ! stristr($ver, 'MariaDB')) : ?>
247 247
 			<tr>
248
-				<td data-export-label="MySQL Version"><?php _e( 'MySQL Version', 'give' ); ?>:</td>
249
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The version of MySQL installed on your hosting server.', 'give' ) ); ?>"></span></td>
248
+				<td data-export-label="MySQL Version"><?php _e('MySQL Version', 'give'); ?>:</td>
249
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The version of MySQL installed on your hosting server.', 'give')); ?>"></span></td>
250 250
 				<td>
251 251
 					<?php
252 252
 					$mysql_version = $wpdb->db_version();
253 253
 
254
-					if ( version_compare( $mysql_version, '5.6', '<' ) ) {
255
-						echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( __( '%s - We recommend a minimum MySQL version of 5.6. See: %s', 'give' ), esc_html( $mysql_version ), '<a href="https://wordpress.org/about/requirements/" target="_blank">' . __( 'WordPress Requirements', 'give' ) . '</a>' ) . '</mark>';
254
+					if (version_compare($mysql_version, '5.6', '<')) {
255
+						echo '<mark class="error"><span class="dashicons dashicons-warning"></span> '.sprintf(__('%s - We recommend a minimum MySQL version of 5.6. See: %s', 'give'), esc_html($mysql_version), '<a href="https://wordpress.org/about/requirements/" target="_blank">'.__('WordPress Requirements', 'give').'</a>').'</mark>';
256 256
 					} else {
257
-						echo '<mark class="yes">' . esc_html( $mysql_version ) . '</mark>';
257
+						echo '<mark class="yes">'.esc_html($mysql_version).'</mark>';
258 258
 					}
259 259
 					?>
260 260
 				</td>
261 261
 			</tr>
262 262
 		<?php endif; ?>
263 263
 		<tr>
264
-			<td data-export-label="Default Timezone is UTC"><?php _e( 'Default Timezone is UTC', 'give' ); ?>:</td>
265
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The default timezone for your server.', 'give' ) ); ?>"></span></td>
264
+			<td data-export-label="Default Timezone is UTC"><?php _e('Default Timezone is UTC', 'give'); ?>:</td>
265
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The default timezone for your server.', 'give')); ?>"></span></td>
266 266
 			<td><?php
267 267
 				$default_timezone = date_default_timezone_get();
268
-				if ( 'UTC' !== $default_timezone ) {
269
-					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> ' . sprintf( __( 'Default timezone is %s - it should be UTC', 'give' ), $default_timezone ) . '</mark>';
268
+				if ('UTC' !== $default_timezone) {
269
+					echo '<mark class="error"><span class="dashicons dashicons-warning"></span> '.sprintf(__('Default timezone is %s - it should be UTC', 'give'), $default_timezone).'</mark>';
270 270
 				} else {
271 271
 					echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark>';
272 272
 				} ?>
@@ -277,118 +277,118 @@  discard block
 block discarded – undo
277 277
 
278 278
 		// fsockopen/cURL.
279 279
 		$posting['fsockopen_curl']['name'] = 'fsockopen/cURL';
280
-		$posting['fsockopen_curl']['help'] = __( 'Payment gateways can use cURL to communicate with remote servers to authorize payments, other plugins may also use it when communicating with remote services.', 'give' );
280
+		$posting['fsockopen_curl']['help'] = __('Payment gateways can use cURL to communicate with remote servers to authorize payments, other plugins may also use it when communicating with remote services.', 'give');
281 281
 
282
-		if ( function_exists( 'fsockopen' ) || function_exists( 'curl_init' ) ) {
282
+		if (function_exists('fsockopen') || function_exists('curl_init')) {
283 283
 			$posting['fsockopen_curl']['success'] = true;
284 284
 		} else {
285 285
 			$posting['fsockopen_curl']['success'] = false;
286
-			$posting['fsockopen_curl']['note']    = __( 'Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'give' );
286
+			$posting['fsockopen_curl']['note']    = __('Your server does not have fsockopen or cURL enabled - PayPal IPN and other scripts which communicate with other servers will not work. Contact your hosting provider.', 'give');
287 287
 		}
288 288
 
289 289
 		// SOAP.
290 290
 		$posting['soap_client']['name'] = 'SoapClient';
291
-		$posting['soap_client']['help'] = __( 'Some webservices like shipping use SOAP to get information from remote servers, for example, live shipping quotes from FedEx require SOAP to be installed.', 'give' );
291
+		$posting['soap_client']['help'] = __('Some webservices like shipping use SOAP to get information from remote servers, for example, live shipping quotes from FedEx require SOAP to be installed.', 'give');
292 292
 
293
-		if ( class_exists( 'SoapClient' ) ) {
293
+		if (class_exists('SoapClient')) {
294 294
 			$posting['soap_client']['success'] = true;
295 295
 		} else {
296 296
 			$posting['soap_client']['success'] = false;
297
-			$posting['soap_client']['note']    = sprintf( __( 'Your server does not have the %s class enabled - some gateway plugins which use SOAP may not work as expected.', 'give' ), '<a href="https://php.net/manual/en/class.soapclient.php">SoapClient</a>' );
297
+			$posting['soap_client']['note']    = sprintf(__('Your server does not have the %s class enabled - some gateway plugins which use SOAP may not work as expected.', 'give'), '<a href="https://php.net/manual/en/class.soapclient.php">SoapClient</a>');
298 298
 		}
299 299
 
300 300
 		// DOMDocument.
301 301
 		$posting['dom_document']['name'] = 'DOMDocument';
302
-		$posting['dom_document']['help'] = __( 'HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', 'give' );
302
+		$posting['dom_document']['help'] = __('HTML/Multipart emails use DOMDocument to generate inline CSS in templates.', 'give');
303 303
 
304
-		if ( class_exists( 'DOMDocument' ) ) {
304
+		if (class_exists('DOMDocument')) {
305 305
 			$posting['dom_document']['success'] = true;
306 306
 		} else {
307 307
 			$posting['dom_document']['success'] = false;
308
-			$posting['dom_document']['note']    = sprintf( __( 'Your server does not have the %s class enabled - HTML/Multipart emails, and also some extensions, will not work without DOMDocument.', 'give' ), '<a href="https://php.net/manual/en/class.domdocument.php">DOMDocument</a>' );
308
+			$posting['dom_document']['note']    = sprintf(__('Your server does not have the %s class enabled - HTML/Multipart emails, and also some extensions, will not work without DOMDocument.', 'give'), '<a href="https://php.net/manual/en/class.domdocument.php">DOMDocument</a>');
309 309
 		}
310 310
 
311 311
 		// gzip.
312 312
 		$posting['gzip']['name'] = 'gzip';
313
-		$posting['gzip']['help'] = __( 'gzip is used for file compression and decompression.', 'give' );
313
+		$posting['gzip']['help'] = __('gzip is used for file compression and decompression.', 'give');
314 314
 
315
-		if ( is_callable( 'gzopen' ) ) {
315
+		if (is_callable('gzopen')) {
316 316
 			$posting['gzip']['success'] = true;
317 317
 		} else {
318 318
 			$posting['gzip']['success'] = false;
319
-			$posting['gzip']['note']    = sprintf( __( 'Your server does not support the %s function - this is used for file compression and decompression.', 'give' ), '<a href="https://php.net/manual/en/zlib.installation.php">gzopen</a>' );
319
+			$posting['gzip']['note']    = sprintf(__('Your server does not support the %s function - this is used for file compression and decompression.', 'give'), '<a href="https://php.net/manual/en/zlib.installation.php">gzopen</a>');
320 320
 		}
321 321
 
322 322
 		// GD Graphics Library.
323 323
 		$posting['gd']['name'] = 'GD Graphics Library';
324
-		$posting['gd']['help'] = __( 'GD Graphics Library is used for dynamically manipulating images.', 'give' );
325
-		$posting['gd']['success'] = extension_loaded( 'gd' ) && function_exists( 'gd_info' ) ? true : false;
324
+		$posting['gd']['help'] = __('GD Graphics Library is used for dynamically manipulating images.', 'give');
325
+		$posting['gd']['success'] = extension_loaded('gd') && function_exists('gd_info') ? true : false;
326 326
 
327 327
 		// Multibyte String.
328 328
 		$posting['mbstring']['name'] = 'Multibyte String';
329
-		$posting['mbstring']['help'] = __( 'Multibyte String (mbstring) is used to convert character encoding, like for emails or converting characters to lowercase.', 'give' );
329
+		$posting['mbstring']['help'] = __('Multibyte String (mbstring) is used to convert character encoding, like for emails or converting characters to lowercase.', 'give');
330 330
 
331
-		if ( extension_loaded( 'mbstring' ) ) {
331
+		if (extension_loaded('mbstring')) {
332 332
 			$posting['mbstring']['success'] = true;
333 333
 		} else {
334 334
 			$posting['mbstring']['success'] = false;
335
-			$posting['mbstring']['note']    = sprintf( __( 'Your server does not support the %s functions - this is required for better character encoding. Some fallbacks will be used instead for it.', 'give' ), '<a href="https://php.net/manual/en/mbstring.installation.php">mbstring</a>' );
335
+			$posting['mbstring']['note']    = sprintf(__('Your server does not support the %s functions - this is required for better character encoding. Some fallbacks will be used instead for it.', 'give'), '<a href="https://php.net/manual/en/mbstring.installation.php">mbstring</a>');
336 336
 		}
337 337
 
338 338
 		// WP Remote Post Check.
339
-		$posting['wp_remote_post']['name'] = __( 'Remote Post', 'give');
340
-		$posting['wp_remote_post']['help'] = __( 'PayPal uses this method of communicating when sending back transaction information.', 'give' );
339
+		$posting['wp_remote_post']['name'] = __('Remote Post', 'give');
340
+		$posting['wp_remote_post']['help'] = __('PayPal uses this method of communicating when sending back transaction information.', 'give');
341 341
 
342
-		$response = wp_safe_remote_post( 'https://www.paypal.com/cgi-bin/webscr', array(
342
+		$response = wp_safe_remote_post('https://www.paypal.com/cgi-bin/webscr', array(
343 343
 			'timeout'     => 60,
344
-			'user-agent'  => 'Give/' . GIVE_VERSION,
344
+			'user-agent'  => 'Give/'.GIVE_VERSION,
345 345
 			'httpversion' => '1.1',
346 346
 			'body'        => array(
347 347
 				'cmd'     => '_notify-validate'
348 348
 			)
349
-		) );
349
+		));
350 350
 
351
-		if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
351
+		if ( ! is_wp_error($response) && $response['response']['code'] >= 200 && $response['response']['code'] < 300) {
352 352
 			$posting['wp_remote_post']['success'] = true;
353 353
 		} else {
354
-			$posting['wp_remote_post']['note']    = __( 'wp_remote_post() failed. PayPal IPN won\'t work with your server. Contact your hosting provider.', 'give' );
355
-			if ( is_wp_error( $response ) ) {
356
-				$posting['wp_remote_post']['note'] .= ' ' . sprintf( __( 'Error: %s', 'give' ), sanitize_text_field( $response->get_error_message() ) );
354
+			$posting['wp_remote_post']['note']    = __('wp_remote_post() failed. PayPal IPN won\'t work with your server. Contact your hosting provider.', 'give');
355
+			if (is_wp_error($response)) {
356
+				$posting['wp_remote_post']['note'] .= ' '.sprintf(__('Error: %s', 'give'), sanitize_text_field($response->get_error_message()));
357 357
 			} else {
358
-				$posting['wp_remote_post']['note'] .= ' ' . sprintf( __( 'Status code: %s', 'give' ), sanitize_text_field( $response['response']['code'] ) );
358
+				$posting['wp_remote_post']['note'] .= ' '.sprintf(__('Status code: %s', 'give'), sanitize_text_field($response['response']['code']));
359 359
 			}
360 360
 			$posting['wp_remote_post']['success'] = false;
361 361
 		}
362 362
 
363 363
 		// WP Remote Get Check.
364
-		$posting['wp_remote_get']['name'] = __( 'Remote Get', 'give');
365
-		$posting['wp_remote_get']['help'] = __( 'Give plugins may use this method of communication when checking for plugin updates.', 'give' );
364
+		$posting['wp_remote_get']['name'] = __('Remote Get', 'give');
365
+		$posting['wp_remote_get']['help'] = __('Give plugins may use this method of communication when checking for plugin updates.', 'give');
366 366
 
367
-		$response = wp_safe_remote_get( 'https://woocommerce.com/wc-api/product-key-api?request=ping&network=' . ( is_multisite() ? '1' : '0' ) );
367
+		$response = wp_safe_remote_get('https://woocommerce.com/wc-api/product-key-api?request=ping&network='.(is_multisite() ? '1' : '0'));
368 368
 
369
-		if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
369
+		if ( ! is_wp_error($response) && $response['response']['code'] >= 200 && $response['response']['code'] < 300) {
370 370
 			$posting['wp_remote_get']['success'] = true;
371 371
 		} else {
372
-			$posting['wp_remote_get']['note']    = __( 'wp_remote_get() failed. The WooCommerce plugin updater won\'t work with your server. Contact your hosting provider.', 'give' );
373
-			if ( is_wp_error( $response ) ) {
374
-				$posting['wp_remote_get']['note'] .= ' ' . sprintf( __( 'Error: %s', 'give' ), give_clean( $response->get_error_message() ) );
372
+			$posting['wp_remote_get']['note']    = __('wp_remote_get() failed. The WooCommerce plugin updater won\'t work with your server. Contact your hosting provider.', 'give');
373
+			if (is_wp_error($response)) {
374
+				$posting['wp_remote_get']['note'] .= ' '.sprintf(__('Error: %s', 'give'), give_clean($response->get_error_message()));
375 375
 			} else {
376
-				$posting['wp_remote_get']['note'] .= ' ' . sprintf( __( 'Status code: %s', 'give' ), give_clean( $response['response']['code'] ) );
376
+				$posting['wp_remote_get']['note'] .= ' '.sprintf(__('Status code: %s', 'give'), give_clean($response['response']['code']));
377 377
 			}
378 378
 			$posting['wp_remote_get']['success'] = false;
379 379
 		}
380 380
 
381
-		$posting = apply_filters( 'woocommerce_debug_posting', $posting );
381
+		$posting = apply_filters('woocommerce_debug_posting', $posting);
382 382
 
383
-		foreach ( $posting as $post ) {
384
-			$mark = ! empty( $post['success'] ) ? 'yes' : 'error';
383
+		foreach ($posting as $post) {
384
+			$mark = ! empty($post['success']) ? 'yes' : 'error';
385 385
 			?>
386 386
 			<tr>
387
-				<td data-export-label="<?php echo esc_html( $post['name'] ); ?>"><?php echo esc_html( $post['name'] ); ?>:</td>
388
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( isset( $post['help'] ) ? $post['help'] : '' ); ?>"></span></td>
387
+				<td data-export-label="<?php echo esc_html($post['name']); ?>"><?php echo esc_html($post['name']); ?>:</td>
388
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(isset($post['help']) ? $post['help'] : ''); ?>"></span></td>
389 389
 				<td>
390 390
 					<mark class="<?php echo $mark; ?>">
391
-						<?php echo ! empty( $post['success'] ) ? '<span class="dashicons dashicons-yes"></span>' : '<span class="dashicons dashicons-no-alt"></span>'; ?> <?php echo ! empty( $post['note'] ) ? wp_kses_data( $post['note'] ) : ''; ?>
391
+						<?php echo ! empty($post['success']) ? '<span class="dashicons dashicons-yes"></span>' : '<span class="dashicons dashicons-no-alt"></span>'; ?> <?php echo ! empty($post['note']) ? wp_kses_data($post['note']) : ''; ?>
392 392
 					</mark>
393 393
 				</td>
394 394
 			</tr>
@@ -401,102 +401,102 @@  discard block
 block discarded – undo
401 401
 <table class="give-status-table widefat" cellspacing="0">
402 402
 	<thead>
403 403
 		<tr>
404
-			<th colspan="3" data-export-label="Give Configuration"><h2><?php _e( 'Give Configuration', 'give' ); ?></h2></th>
404
+			<th colspan="3" data-export-label="Give Configuration"><h2><?php _e('Give Configuration', 'give'); ?></h2></th>
405 405
 		</tr>
406 406
 	</thead>
407 407
 	<tbody>
408 408
 		<tr>
409
-			<td data-export-label="Give Version"><?php _e( 'Give Version', 'give' ); ?>:</td>
410
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The version of Give installed on your site.', 'give' ) ); ?>"></span></td>
411
-			<td><?php echo esc_html( GIVE_VERSION ); ?></td>
409
+			<td data-export-label="Give Version"><?php _e('Give Version', 'give'); ?>:</td>
410
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The version of Give installed on your site.', 'give')); ?>"></span></td>
411
+			<td><?php echo esc_html(GIVE_VERSION); ?></td>
412 412
 		</tr>
413 413
 		<tr>
414
-			<td data-export-label="Upgraded From"><?php _e( 'Upgraded From', 'give' ); ?>:</td>
415
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The version of Give installed prior to the last update.', 'give' ) ); ?>"></span></td>
416
-			<td><?php echo esc_html( get_option( 'give_version_upgraded_from', '&ndash;' ) ); ?></td>
414
+			<td data-export-label="Upgraded From"><?php _e('Upgraded From', 'give'); ?>:</td>
415
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The version of Give installed prior to the last update.', 'give')); ?>"></span></td>
416
+			<td><?php echo esc_html(get_option('give_version_upgraded_from', '&ndash;')); ?></td>
417 417
 		</tr>
418 418
 		<tr>
419
-			<td data-export-label="Test Mode"><?php _e( 'Test Mode', 'give' ); ?>:</td>
420
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Whether Test Mode is enabled in Give settings.', 'give' ) ); ?>"></span></td>
421
-			<td><?php echo give_is_test_mode() ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
419
+			<td data-export-label="Test Mode"><?php _e('Test Mode', 'give'); ?>:</td>
420
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Whether Test Mode is enabled in Give settings.', 'give')); ?>"></span></td>
421
+			<td><?php echo give_is_test_mode() ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
422 422
 		</tr>
423 423
 		<tr>
424
-			<td data-export-label="Currency Code"><?php _e( 'Currency Code', 'give' ); ?>:</td>
425
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The currency code selected in Give settings.', 'give' ) ); ?>"></span></td>
426
-			<td><?php echo esc_html( give_get_currency() ); ?></td>
424
+			<td data-export-label="Currency Code"><?php _e('Currency Code', 'give'); ?>:</td>
425
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The currency code selected in Give settings.', 'give')); ?>"></span></td>
426
+			<td><?php echo esc_html(give_get_currency()); ?></td>
427 427
 		</tr>
428 428
 		<tr>
429
-			<td data-export-label="Currency Position"><?php _e( 'Currency Position', 'give' ); ?>:</td>
430
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The currency position selected in Give settings.', 'give' ) ); ?>"></span></td>
431
-			<td><?php echo 'before' === give_get_option( 'currency_position' ) ? __( 'Before', 'give' ) : __( 'After', 'give' ); ?></td>
429
+			<td data-export-label="Currency Position"><?php _e('Currency Position', 'give'); ?>:</td>
430
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The currency position selected in Give settings.', 'give')); ?>"></span></td>
431
+			<td><?php echo 'before' === give_get_option('currency_position') ? __('Before', 'give') : __('After', 'give'); ?></td>
432 432
 		</tr>
433 433
 		<tr>
434
-			<td data-export-label="Decimal Separator"><?php _e( 'Decimal Separator', 'give' ); ?>:</td>
435
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The decimal separator defined in Give settings.', 'give' ) ); ?>"></span></td>
436
-			<td><?php echo esc_html( give_get_option( 'decimal_separator', '.' ) ); ?></td>
434
+			<td data-export-label="Decimal Separator"><?php _e('Decimal Separator', 'give'); ?>:</td>
435
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The decimal separator defined in Give settings.', 'give')); ?>"></span></td>
436
+			<td><?php echo esc_html(give_get_option('decimal_separator', '.')); ?></td>
437 437
 		</tr>
438 438
 		<tr>
439
-			<td data-export-label="Thousands Separator"><?php _e( 'Thousands Separator', 'give' ); ?>:</td>
440
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The thousands separator defined in Give settings.', 'give' ) ); ?>"></span></td>
441
-			<td><?php echo esc_html( give_get_option( 'thousands_separator', ',' ) ); ?></td>
439
+			<td data-export-label="Thousands Separator"><?php _e('Thousands Separator', 'give'); ?>:</td>
440
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The thousands separator defined in Give settings.', 'give')); ?>"></span></td>
441
+			<td><?php echo esc_html(give_get_option('thousands_separator', ',')); ?></td>
442 442
 		</tr>
443 443
 		<tr>
444
-			<td data-export-label="Success Page"><?php _e( 'Success Page', 'give' ); ?>:</td>
445
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The page where donors land following a successful transaction.', 'give' ) ); ?>"></span></td>
446
-			<td><?php echo ! empty( $give_options['success_page'] ) ? esc_url( get_permalink( $give_options['success_page'] ) ) : '&ndash;'; ?></td>
444
+			<td data-export-label="Success Page"><?php _e('Success Page', 'give'); ?>:</td>
445
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The page where donors land following a successful transaction.', 'give')); ?>"></span></td>
446
+			<td><?php echo ! empty($give_options['success_page']) ? esc_url(get_permalink($give_options['success_page'])) : '&ndash;'; ?></td>
447 447
 		</tr>
448 448
 		<tr>
449
-			<td data-export-label="Failure Page"><?php _e( 'Failure Page', 'give' ); ?>:</td>
450
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The page where donors land following a failed transaction.', 'give' ) ); ?>"></span></td>
451
-			<td><?php echo ! empty( $give_options['failure_page'] ) ? esc_url( get_permalink( $give_options['failure_page'] ) ) : '&ndash;'; ?></td>
449
+			<td data-export-label="Failure Page"><?php _e('Failure Page', 'give'); ?>:</td>
450
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The page where donors land following a failed transaction.', 'give')); ?>"></span></td>
451
+			<td><?php echo ! empty($give_options['failure_page']) ? esc_url(get_permalink($give_options['failure_page'])) : '&ndash;'; ?></td>
452 452
 		</tr>
453 453
 		<tr>
454
-			<td data-export-label="Give Forms Slug"><?php _e( 'Give Forms Slug', 'give' ); ?>:</td>
455
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The slug used for Give donation forms.', 'give' ) ); ?>"></span></td>
456
-			<td><?php echo esc_html( defined( 'GIVE_SLUG' ) ? '/' . GIVE_SLUG . '/' : '/donations/' ); ?></td>
454
+			<td data-export-label="Give Forms Slug"><?php _e('Give Forms Slug', 'give'); ?>:</td>
455
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The slug used for Give donation forms.', 'give')); ?>"></span></td>
456
+			<td><?php echo esc_html(defined('GIVE_SLUG') ? '/'.GIVE_SLUG.'/' : '/donations/'); ?></td>
457 457
 		</tr>
458 458
 		<?php
459 459
 		$active_gateways = give_get_enabled_payment_gateways();
460 460
 		$enabled_gateways = $default_gateway = '';
461 461
 
462
-		if ( $active_gateways ) {
463
-			$default_gateway_is_active = give_is_gateway_active( give_get_default_gateway( null ) );
462
+		if ($active_gateways) {
463
+			$default_gateway_is_active = give_is_gateway_active(give_get_default_gateway(null));
464 464
 
465
-			if ( $default_gateway_is_active ) {
466
-				$default_gateway = give_get_default_gateway( null );
467
-				$default_gateway = $active_gateways[ $default_gateway ]['admin_label'];
465
+			if ($default_gateway_is_active) {
466
+				$default_gateway = give_get_default_gateway(null);
467
+				$default_gateway = $active_gateways[$default_gateway]['admin_label'];
468 468
 			} else {
469
-				$default_gateway = __( 'Test Donation', 'give' );
469
+				$default_gateway = __('Test Donation', 'give');
470 470
 			}
471 471
 
472 472
 			$gateways = array();
473 473
 
474
-			foreach ( $active_gateways as $gateway ) {
474
+			foreach ($active_gateways as $gateway) {
475 475
 				$gateways[] = $gateway['admin_label'];
476 476
 			}
477 477
 
478
-			$enabled_gateways = implode( ', ', $gateways );
478
+			$enabled_gateways = implode(', ', $gateways);
479 479
 		}
480 480
 		?>
481 481
 		<tr>
482
-			<td data-export-label="Enabled Payment Gateways"><?php _e( 'Enabled Payment Gateways', 'give' ); ?>:</td>
483
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'All payment gateways enabled in Give settings.', 'give' ) ); ?>"></span></td>
484
-			<td><?php echo esc_html( ! empty( $enabled_gateways ) ? $enabled_gateways : '&ndash;' ); ?></td>
482
+			<td data-export-label="Enabled Payment Gateways"><?php _e('Enabled Payment Gateways', 'give'); ?>:</td>
483
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('All payment gateways enabled in Give settings.', 'give')); ?>"></span></td>
484
+			<td><?php echo esc_html( ! empty($enabled_gateways) ? $enabled_gateways : '&ndash;'); ?></td>
485 485
 		</tr>
486 486
 		<tr>
487
-			<td data-export-label="Default Payment Gateway"><?php _e( 'Default Payment Gateway', 'give' ); ?>:</td>
488
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The default payment gateway selected in Give settings.', 'give' ) ); ?>"></span></td>
489
-			<td><?php echo esc_html( ! empty( $default_gateway ) ? $default_gateway : '&ndash;' ); ?></td>
487
+			<td data-export-label="Default Payment Gateway"><?php _e('Default Payment Gateway', 'give'); ?>:</td>
488
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The default payment gateway selected in Give settings.', 'give')); ?>"></span></td>
489
+			<td><?php echo esc_html( ! empty($default_gateway) ? $default_gateway : '&ndash;'); ?></td>
490 490
 		</tr>
491 491
 		<tr>
492
-			<td data-export-label="Admin Email Notifications"><?php _e( 'Admin Email Notifications', 'give' ); ?>:</td>
493
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Whether admins receive email notifications of transactions.', 'give' ) ); ?>"></span></td>
494
-			<td><?php echo 'enabled' === give_get_option( 'admin_notices' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
492
+			<td data-export-label="Admin Email Notifications"><?php _e('Admin Email Notifications', 'give'); ?>:</td>
493
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Whether admins receive email notifications of transactions.', 'give')); ?>"></span></td>
494
+			<td><?php echo 'enabled' === give_get_option('admin_notices') ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
495 495
 		</tr>
496 496
 		<tr>
497
-			<td data-export-label="Donor Email Access"><?php _e( 'Donor Email Access', 'give' ); ?>:</td>
498
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Whether donors can access their donation history using only email.', 'give' ) ); ?>"></span></td>
499
-			<td><?php echo 'enabled' === give_get_option( 'email_access' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
497
+			<td data-export-label="Donor Email Access"><?php _e('Donor Email Access', 'give'); ?>:</td>
498
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Whether donors can access their donation history using only email.', 'give')); ?>"></span></td>
499
+			<td><?php echo 'enabled' === give_get_option('email_access') ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
500 500
 		</tr>
501 501
 	</tbody>
502 502
 </table>
@@ -504,45 +504,45 @@  discard block
 block discarded – undo
504 504
 <table class="give-status-table widefat" cellspacing="0">
505 505
 	<thead>
506 506
 		<tr>
507
-			<th colspan="3" data-export-label="Session Configuration"><h2><?php _e( 'Session Configuration', 'give' ); ?></h2></th>
507
+			<th colspan="3" data-export-label="Session Configuration"><h2><?php _e('Session Configuration', 'give'); ?></h2></th>
508 508
 		</tr>
509 509
 	</thead>
510 510
 	<tbody>
511 511
 		<tr>
512
-			<td data-export-label="Give Use Sessions"><?php _e( 'Give Use Sessions', 'give' ); ?>:</td>
513
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Whether PHP sessions are enforced, enabled, or disabled.', 'give' ) ); ?>"></span></td>
514
-			<td><?php echo defined( 'GIVE_USE_PHP_SESSIONS' ) && GIVE_USE_PHP_SESSIONS ? __( 'Enforced', 'give' ) : ( Give()->session->use_php_sessions() ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ) ); ?></td>
512
+			<td data-export-label="Give Use Sessions"><?php _e('Give Use Sessions', 'give'); ?>:</td>
513
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Whether PHP sessions are enforced, enabled, or disabled.', 'give')); ?>"></span></td>
514
+			<td><?php echo defined('GIVE_USE_PHP_SESSIONS') && GIVE_USE_PHP_SESSIONS ? __('Enforced', 'give') : (Give()->session->use_php_sessions() ? __('Enabled', 'give') : __('Disabled', 'give')); ?></td>
515 515
 		</tr>
516 516
 		<tr>
517
-			<td data-export-label="Session"><?php _e( 'Session', 'give' ); ?>:</td>
518
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Whether a PHP session is currently set.', 'give' ) ); ?>"></span></td>
519
-			<td><?php echo isset( $_SESSION ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
517
+			<td data-export-label="Session"><?php _e('Session', 'give'); ?>:</td>
518
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Whether a PHP session is currently set.', 'give')); ?>"></span></td>
519
+			<td><?php echo isset($_SESSION) ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
520 520
 		</tr>
521
-		<?php if ( isset( $_SESSION ) ) { ?>
521
+		<?php if (isset($_SESSION)) { ?>
522 522
 			<tr>
523
-				<td data-export-label="Session Name"><?php _e( 'Session Name', 'give' ); ?>:</td>
524
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The name of the current PHP session.', 'give' ) ); ?>"></span></td>
525
-				<td><?php echo esc_html( ini_get( 'session.name' ) ); ?></td>
523
+				<td data-export-label="Session Name"><?php _e('Session Name', 'give'); ?>:</td>
524
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The name of the current PHP session.', 'give')); ?>"></span></td>
525
+				<td><?php echo esc_html(ini_get('session.name')); ?></td>
526 526
 			</tr>
527 527
 			<tr>
528
-				<td data-export-label="Cookie Path"><?php _e( 'Cookie Path', 'give' ); ?>:</td>
529
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The cookie path of the current PHP session.', 'give' ) ); ?>"></span></td>
530
-				<td><?php echo esc_html( ini_get( 'session.cookie_path' ) ); ?></td>
528
+				<td data-export-label="Cookie Path"><?php _e('Cookie Path', 'give'); ?>:</td>
529
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The cookie path of the current PHP session.', 'give')); ?>"></span></td>
530
+				<td><?php echo esc_html(ini_get('session.cookie_path')); ?></td>
531 531
 			</tr>
532 532
 			<tr>
533
-				<td data-export-label="Save Path"><?php _e( 'Save Path', 'give' ); ?>:</td>
534
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The save path of the current PHP session.', 'give' ) ); ?>"></span></td>
535
-				<td><?php echo esc_html( ini_get( 'session.save_path' ) ); ?></td>
533
+				<td data-export-label="Save Path"><?php _e('Save Path', 'give'); ?>:</td>
534
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The save path of the current PHP session.', 'give')); ?>"></span></td>
535
+				<td><?php echo esc_html(ini_get('session.save_path')); ?></td>
536 536
 			</tr>
537 537
 			<tr>
538
-				<td data-export-label="Use Cookies"><?php _e( 'Use Cookies', 'give' ); ?>:</td>
539
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Whether the current PHP session is set to use cookies.', 'give' ) ); ?>"></span></td>
540
-				<td><?php echo ini_get( 'session.use_cookies' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
538
+				<td data-export-label="Use Cookies"><?php _e('Use Cookies', 'give'); ?>:</td>
539
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Whether the current PHP session is set to use cookies.', 'give')); ?>"></span></td>
540
+				<td><?php echo ini_get('session.use_cookies') ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
541 541
 			</tr>
542 542
 			<tr>
543
-				<td data-export-label="Use Only Cookies"><?php _e( 'Use Only Cookies', 'give' ); ?>:</td>
544
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Whether the current PHP session is set to use only cookies.', 'give' ) ); ?>"></span></td>
545
-				<td><?php echo ini_get( 'session.use_only_cookies' ) ? __( 'Enabled', 'give' ) : __( 'Disabled', 'give' ); ?></td>
543
+				<td data-export-label="Use Only Cookies"><?php _e('Use Only Cookies', 'give'); ?>:</td>
544
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Whether the current PHP session is set to use only cookies.', 'give')); ?>"></span></td>
545
+				<td><?php echo ini_get('session.use_only_cookies') ? __('Enabled', 'give') : __('Disabled', 'give'); ?></td>
546 546
 			</tr>
547 547
 		<?php } ?>
548 548
 	</tbody>
@@ -551,13 +551,13 @@  discard block
 block discarded – undo
551 551
 <table class="give-status-table widefat" cellspacing="0">
552 552
 	<thead>
553 553
 	<tr>
554
-		<th colspan="3" data-export-label="Active Give Add-ons"><h2><?php _e( 'Active Give Add-ons', 'give' ); ?></h2></th>
554
+		<th colspan="3" data-export-label="Active Give Add-ons"><h2><?php _e('Active Give Add-ons', 'give'); ?></h2></th>
555 555
 	</tr>
556 556
 	</thead>
557 557
 	<tbody>
558 558
 		<?php
559
-		foreach ( $plugins as $plugin_data ) {
560
-			if ( 'active' != $plugin_data['Status'] ||  'add-on' != $plugin_data['Type'] ) {
559
+		foreach ($plugins as $plugin_data) {
560
+			if ('active' != $plugin_data['Status'] || 'add-on' != $plugin_data['Type']) {
561 561
 				continue;
562 562
 			}
563 563
 
@@ -565,30 +565,30 @@  discard block
 block discarded – undo
565 565
 			$author_name = $plugin_data['Author'];
566 566
 
567 567
 			// Link the plugin name to the plugin URL if available.
568
-			if ( ! empty( $plugin_data['PluginURI'] ) ) {
569
-				$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . esc_attr__( 'Visit plugin homepage' , 'give' ) . '">' . $plugin_name . '</a>';
568
+			if ( ! empty($plugin_data['PluginURI'])) {
569
+				$plugin_name = '<a href="'.esc_url($plugin_data['PluginURI']).'" title="'.esc_attr__('Visit plugin homepage', 'give').'">'.$plugin_name.'</a>';
570 570
 			}
571 571
 
572 572
 			// Link the author name to the author URL if available.
573
-			if ( ! empty( $plugin_data['AuthorURI'] ) ) {
574
-				$author_name = '<a href="' . esc_url( $plugin_data['AuthorURI'] ) . '" title="' . esc_attr__( 'Visit author homepage' , 'give' ) . '">' . $author_name . '</a>';
573
+			if ( ! empty($plugin_data['AuthorURI'])) {
574
+				$author_name = '<a href="'.esc_url($plugin_data['AuthorURI']).'" title="'.esc_attr__('Visit author homepage', 'give').'">'.$author_name.'</a>';
575 575
 			}
576 576
 			?>
577 577
 			<tr>
578
-				<td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td>
578
+				<td><?php echo wp_kses($plugin_name, wp_kses_allowed_html('post')); ?></td>
579 579
 				<td class="help">&nbsp;</td>
580 580
 				<td>
581 581
 					<?php
582
-					if ( true === $plugin_data['License'] ) {
583
-						echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark> ' . __( 'Licensed', 'give' );
582
+					if (true === $plugin_data['License']) {
583
+						echo '<mark class="yes"><span class="dashicons dashicons-yes"></span></mark> '.__('Licensed', 'give');
584 584
 					} else {
585
-						echo '<mark class="error"><span class="dashicons dashicons-no-alt"></span></mark> ' . __( 'Unlicensed', 'give' );
585
+						echo '<mark class="error"><span class="dashicons dashicons-no-alt"></span></mark> '.__('Unlicensed', 'give');
586 586
 					}
587 587
 
588 588
 					echo ' &ndash; '
589
-					     . sprintf( _x( 'by %s', 'by author', 'give' ), wp_kses( $author_name, wp_kses_allowed_html( 'post' ) ) )
589
+					     . sprintf(_x('by %s', 'by author', 'give'), wp_kses($author_name, wp_kses_allowed_html('post')))
590 590
 					     . ' &ndash; '
591
-					     . esc_html( $plugin_data['Version'] );
591
+					     . esc_html($plugin_data['Version']);
592 592
 					?>
593 593
 				</td>
594 594
 			</tr>
@@ -601,18 +601,18 @@  discard block
 block discarded – undo
601 601
 <table class="give-status-table widefat" cellspacing="0">
602 602
 	<thead>
603 603
 		<tr>
604
-			<th colspan="3" data-export-label="Other Active Plugins"><h2><?php _e( 'Other Active Plugins', 'give' ); ?></h2></th>
604
+			<th colspan="3" data-export-label="Other Active Plugins"><h2><?php _e('Other Active Plugins', 'give'); ?></h2></th>
605 605
 		</tr>
606 606
 	</thead>
607 607
 	<tbody>
608 608
 		<?php
609
-		foreach ( $plugins as $plugin_data ) {
610
-			if ( 'active' != $plugin_data['Status'] ||  'other' != $plugin_data['Type'] ) {
609
+		foreach ($plugins as $plugin_data) {
610
+			if ('active' != $plugin_data['Status'] || 'other' != $plugin_data['Type']) {
611 611
 				continue;
612 612
 			}
613 613
 
614 614
 			// Do not show Give core plugin.
615
-			if ( 'Give - Donation Plugin' === $plugin_data['Name'] ) {
615
+			if ('Give - Donation Plugin' === $plugin_data['Name']) {
616 616
 				continue;
617 617
 			}
618 618
 
@@ -620,19 +620,19 @@  discard block
 block discarded – undo
620 620
 			$author_name = $plugin_data['Author'];
621 621
 
622 622
 			// Link the plugin name to the plugin URL if available.
623
-			if ( ! empty( $plugin_data['PluginURI'] ) ) {
624
-				$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . esc_attr__( 'Visit plugin homepage' , 'give' ) . '">' . $plugin_name . '</a>';
623
+			if ( ! empty($plugin_data['PluginURI'])) {
624
+				$plugin_name = '<a href="'.esc_url($plugin_data['PluginURI']).'" title="'.esc_attr__('Visit plugin homepage', 'give').'">'.$plugin_name.'</a>';
625 625
 			}
626 626
 
627 627
 			// Link the author name to the author URL if available.
628
-			if ( ! empty( $plugin_data['AuthorURI'] ) ) {
629
-				$author_name = '<a href="' . esc_url( $plugin_data['AuthorURI'] ) . '" title="' . esc_attr__( 'Visit author homepage' , 'give' ) . '">' . $author_name . '</a>';
628
+			if ( ! empty($plugin_data['AuthorURI'])) {
629
+				$author_name = '<a href="'.esc_url($plugin_data['AuthorURI']).'" title="'.esc_attr__('Visit author homepage', 'give').'">'.$author_name.'</a>';
630 630
 			}
631 631
 			?>
632 632
 			<tr>
633
-				<td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td>
633
+				<td><?php echo wp_kses($plugin_name, wp_kses_allowed_html('post')); ?></td>
634 634
 				<td class="help">&nbsp;</td>
635
-				<td><?php echo sprintf( _x( 'by %s', 'by author', 'give' ), wp_kses( $author_name, wp_kses_allowed_html( 'post' ) ) ) . ' &ndash; ' . esc_html( $plugin_data['Version'] ); ?></td>
635
+				<td><?php echo sprintf(_x('by %s', 'by author', 'give'), wp_kses($author_name, wp_kses_allowed_html('post'))).' &ndash; '.esc_html($plugin_data['Version']); ?></td>
636 636
 			</tr>
637 637
 		<?php
638 638
 		}
@@ -643,13 +643,13 @@  discard block
 block discarded – undo
643 643
 <table class="give-status-table widefat" cellspacing="0">
644 644
 	<thead>
645 645
 		<tr>
646
-			<th colspan="3" data-export-label="Inactive Plugins"><h2><?php _e( 'Inactive Plugins', 'give' ); ?></h2></th>
646
+			<th colspan="3" data-export-label="Inactive Plugins"><h2><?php _e('Inactive Plugins', 'give'); ?></h2></th>
647 647
 		</tr>
648 648
 	</thead>
649 649
 	<tbody>
650 650
 		<?php
651
-		foreach ( $plugins as $plugin_data ) {
652
-			if ( 'inactive' != $plugin_data['Status'] ) {
651
+		foreach ($plugins as $plugin_data) {
652
+			if ('inactive' != $plugin_data['Status']) {
653 653
 				continue;
654 654
 			}
655 655
 
@@ -657,19 +657,19 @@  discard block
 block discarded – undo
657 657
 			$author_name = $plugin_data['Author'];
658 658
 
659 659
 			// Link the plugin name to the plugin URL if available.
660
-			if ( ! empty( $plugin_data['PluginURI'] ) ) {
661
-				$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . esc_attr__( 'Visit plugin homepage' , 'give' ) . '">' . $plugin_name . '</a>';
660
+			if ( ! empty($plugin_data['PluginURI'])) {
661
+				$plugin_name = '<a href="'.esc_url($plugin_data['PluginURI']).'" title="'.esc_attr__('Visit plugin homepage', 'give').'">'.$plugin_name.'</a>';
662 662
 			}
663 663
 
664 664
 			// Link the author name to the author URL if available.
665
-			if ( ! empty( $plugin_data['AuthorURI'] ) ) {
666
-				$author_name = '<a href="' . esc_url( $plugin_data['AuthorURI'] ) . '" title="' . esc_attr__( 'Visit author homepage' , 'give' ) . '">' . $author_name . '</a>';
665
+			if ( ! empty($plugin_data['AuthorURI'])) {
666
+				$author_name = '<a href="'.esc_url($plugin_data['AuthorURI']).'" title="'.esc_attr__('Visit author homepage', 'give').'">'.$author_name.'</a>';
667 667
 			}
668 668
 			?>
669 669
 			<tr>
670
-				<td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td>
670
+				<td><?php echo wp_kses($plugin_name, wp_kses_allowed_html('post')); ?></td>
671 671
 				<td class="help">&nbsp;</td>
672
-				<td><?php echo sprintf( _x( 'by %s', 'by author', 'give' ), wp_kses( $author_name, wp_kses_allowed_html( 'post' ) ) ) . ' &ndash; ' . esc_html( $plugin_data['Version'] ); ?></td>
672
+				<td><?php echo sprintf(_x('by %s', 'by author', 'give'), wp_kses($author_name, wp_kses_allowed_html('post'))).' &ndash; '.esc_html($plugin_data['Version']); ?></td>
673 673
 			</tr>
674 674
 			<?php
675 675
 		}
@@ -679,37 +679,37 @@  discard block
 block discarded – undo
679 679
 
680 680
 <?php
681 681
 $active_mu_plugins = (array) get_mu_plugins();
682
-if ( ! empty( $active_mu_plugins ) ) {
682
+if ( ! empty($active_mu_plugins)) {
683 683
 ?>
684 684
 	<table class="give-status-table widefat" cellspacing="0">
685 685
 		<thead>
686 686
 			<tr>
687
-				<th colspan="3" data-export-label="Active MU Plugins"><h2><?php _e( 'Active MU Plugins', 'give' ); ?></h2></th>
687
+				<th colspan="3" data-export-label="Active MU Plugins"><h2><?php _e('Active MU Plugins', 'give'); ?></h2></th>
688 688
 			</tr>
689 689
 		</thead>
690 690
 		<tbody>
691 691
 			<?php
692 692
 
693
-			foreach ( $active_mu_plugins as $mu_plugin_data ) {
694
-				if ( ! empty( $mu_plugin_data['Name'] ) ) {
693
+			foreach ($active_mu_plugins as $mu_plugin_data) {
694
+				if ( ! empty($mu_plugin_data['Name'])) {
695 695
 					// Link the plugin name to the plugin URL if available.
696
-					$plugin_name = esc_html( $mu_plugin_data['Name'] );
696
+					$plugin_name = esc_html($mu_plugin_data['Name']);
697 697
 
698
-					if ( ! empty( $mu_plugin_data['PluginURI'] ) ) {
699
-						$plugin_name = '<a href="' . esc_url( $mu_plugin_data['PluginURI'] ) . '" title="' . esc_attr__( 'Visit plugin homepage' , 'give' ) . '">' . $plugin_name . '</a>';
698
+					if ( ! empty($mu_plugin_data['PluginURI'])) {
699
+						$plugin_name = '<a href="'.esc_url($mu_plugin_data['PluginURI']).'" title="'.esc_attr__('Visit plugin homepage', 'give').'">'.$plugin_name.'</a>';
700 700
 					}
701 701
 
702 702
 					// Link the author name to the author URL if available.
703
-					$author_name = esc_html( $mu_plugin_data['Author'] );
703
+					$author_name = esc_html($mu_plugin_data['Author']);
704 704
 
705
-					if ( ! empty( $mu_plugin_data['AuthorURI'] ) ) {
706
-						$author_name = '<a href="' . esc_url( $mu_plugin_data['AuthorURI'] ) . '">' . $author_name . '</a>';
705
+					if ( ! empty($mu_plugin_data['AuthorURI'])) {
706
+						$author_name = '<a href="'.esc_url($mu_plugin_data['AuthorURI']).'">'.$author_name.'</a>';
707 707
 					}
708 708
 					?>
709 709
 					<tr>
710 710
 						<td><?php echo $plugin_name; ?></td>
711 711
 						<td class="help">&nbsp;</td>
712
-						<td><?php echo sprintf( _x( 'by %s', 'by author', 'give' ), $author_name ) . ' &ndash; ' . esc_html( $mu_plugin_data['Version'] ); ?></td>
712
+						<td><?php echo sprintf(_x('by %s', 'by author', 'give'), $author_name).' &ndash; '.esc_html($mu_plugin_data['Version']); ?></td>
713 713
 					</tr>
714 714
 			<?php
715 715
 				}
@@ -722,53 +722,53 @@  discard block
 block discarded – undo
722 722
 <table class="give-status-table widefat" cellspacing="0">
723 723
 	<thead>
724 724
 		<tr>
725
-			<th colspan="3" data-export-label="Theme"><h2><?php _e( 'Theme', 'give' ); ?></h2></th>
725
+			<th colspan="3" data-export-label="Theme"><h2><?php _e('Theme', 'give'); ?></h2></th>
726 726
 		</tr>
727 727
 	</thead>
728 728
 	<?php
729
-	include_once( ABSPATH . 'wp-admin/includes/theme-install.php' );
729
+	include_once(ABSPATH.'wp-admin/includes/theme-install.php');
730 730
 	$active_theme = wp_get_theme();
731 731
 	?>
732 732
 	<tbody>
733 733
 		<tr>
734
-			<td data-export-label="Name"><?php _e( 'Name', 'give' ); ?>:</td>
735
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The name of the current active theme.', 'give' ) ); ?>"></span></td>
736
-			<td><?php echo esc_html( $active_theme->Name ); ?></td>
734
+			<td data-export-label="Name"><?php _e('Name', 'give'); ?>:</td>
735
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The name of the current active theme.', 'give')); ?>"></span></td>
736
+			<td><?php echo esc_html($active_theme->Name); ?></td>
737 737
 		</tr>
738 738
 		<tr>
739
-			<td data-export-label="Version"><?php _e( 'Version', 'give' ); ?>:</td>
740
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The installed version of the current active theme.', 'give' ) ); ?>"></span></td>
741
-			<td><?php echo esc_html( $active_theme->Version ); ?></td>
739
+			<td data-export-label="Version"><?php _e('Version', 'give'); ?>:</td>
740
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The installed version of the current active theme.', 'give')); ?>"></span></td>
741
+			<td><?php echo esc_html($active_theme->Version); ?></td>
742 742
 		</tr>
743 743
 		<tr>
744
-			<td data-export-label="Author URL"><?php _e( 'Author URL', 'give' ); ?>:</td>
745
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The theme developer\'s URL.', 'give' ) ); ?>"></span></td>
744
+			<td data-export-label="Author URL"><?php _e('Author URL', 'give'); ?>:</td>
745
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The theme developer\'s URL.', 'give')); ?>"></span></td>
746 746
 			<td><?php echo $active_theme->{'Author URI'}; ?></td>
747 747
 		</tr>
748 748
 		<tr>
749
-			<td data-export-label="Child Theme"><?php _e( 'Child Theme', 'give' ); ?>:</td>
750
-			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'Whether the current theme is a child theme.', 'give' ) ); ?>"></span></td>
749
+			<td data-export-label="Child Theme"><?php _e('Child Theme', 'give'); ?>:</td>
750
+			<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('Whether the current theme is a child theme.', 'give')); ?>"></span></td>
751 751
 			<td><?php
752
-				echo is_child_theme() ? __( 'Yes', 'give' ) : __( 'No', 'give' ) . ' &ndash; ' . sprintf( __( 'If you\'re modifying Give on a parent theme you didn\'t build personally, then we recommend using a child theme. See: <a href="%s" target="_blank">How to Create a Child Theme</a>', 'give' ), 'https://codex.wordpress.org/Child_Themes' );
752
+				echo is_child_theme() ? __('Yes', 'give') : __('No', 'give').' &ndash; '.sprintf(__('If you\'re modifying Give on a parent theme you didn\'t build personally, then we recommend using a child theme. See: <a href="%s" target="_blank">How to Create a Child Theme</a>', 'give'), 'https://codex.wordpress.org/Child_Themes');
753 753
 				?></td>
754 754
 		</tr>
755 755
 		<?php
756
-		if( is_child_theme() ) {
757
-			$parent_theme = wp_get_theme( $active_theme->Template );
756
+		if (is_child_theme()) {
757
+			$parent_theme = wp_get_theme($active_theme->Template);
758 758
 		?>
759 759
 			<tr>
760
-				<td data-export-label="Parent Theme Name"><?php _e( 'Parent Theme Name', 'give' ); ?>:</td>
761
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The name of the parent theme.', 'give' ) ); ?>"></span></td>
762
-				<td><?php echo esc_html( $parent_theme->Name ); ?></td>
760
+				<td data-export-label="Parent Theme Name"><?php _e('Parent Theme Name', 'give'); ?>:</td>
761
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The name of the parent theme.', 'give')); ?>"></span></td>
762
+				<td><?php echo esc_html($parent_theme->Name); ?></td>
763 763
 			</tr>
764 764
 			<tr>
765
-				<td data-export-label="Parent Theme Version"><?php _e( 'Parent Theme Version', 'give' ); ?>:</td>
766
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The installed version of the parent theme.', 'give' ) ); ?>"></span></td>
767
-				<td><?php echo esc_html( $parent_theme->Version ); ?></td>
765
+				<td data-export-label="Parent Theme Version"><?php _e('Parent Theme Version', 'give'); ?>:</td>
766
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The installed version of the parent theme.', 'give')); ?>"></span></td>
767
+				<td><?php echo esc_html($parent_theme->Version); ?></td>
768 768
 			</tr>
769 769
 			<tr>
770
-				<td data-export-label="Parent Theme Author URL"><?php _e( 'Parent Theme Author URL', 'give' ); ?>:</td>
771
-				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr( __( 'The parent theme developers URL.', 'give' ) ); ?>"></span></td>
770
+				<td data-export-label="Parent Theme Author URL"><?php _e('Parent Theme Author URL', 'give'); ?>:</td>
771
+				<td class="help"><span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php echo esc_attr(__('The parent theme developers URL.', 'give')); ?>"></span></td>
772 772
 				<td><?php echo $parent_theme->{'Author URI'}; ?></td>
773 773
 			</tr>
774 774
 		<?php } ?>
Please login to merge, or discard this patch.
includes/admin/reporting/class-form-reports-table.php 1 patch
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@  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
 
17 17
 // Load WP_List_Table if not loaded
18
-if ( ! class_exists( 'WP_List_Table' ) ) {
19
-	require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
18
+if ( ! class_exists('WP_List_Table')) {
19
+	require_once ABSPATH.'wp-admin/includes/class-wp-list-table.php';
20 20
 }
21 21
 
22 22
 /**
@@ -50,13 +50,13 @@  discard block
 block discarded – undo
50 50
 		global $status, $page;
51 51
 
52 52
 		// Set parent defaults
53
-		parent::__construct( array(
54
-			'singular' => give_get_forms_label_singular(),    // Singular name of the listed records
55
-			'plural'   => give_get_forms_label_plural(),        // Plural name of the listed records
53
+		parent::__construct(array(
54
+			'singular' => give_get_forms_label_singular(), // Singular name of the listed records
55
+			'plural'   => give_get_forms_label_plural(), // Plural name of the listed records
56 56
 			'ajax'     => false                        // Does this table support ajax?
57
-		) );
57
+		));
58 58
 
59
-		add_action( 'give_report_view_actions', array( $this, 'category_filter' ) );
59
+		add_action('give_report_view_actions', array($this, 'category_filter'));
60 60
 		$this->query();
61 61
 
62 62
 	}
@@ -72,18 +72,18 @@  discard block
 block discarded – undo
72 72
 	 *
73 73
 	 * @return string Column Name
74 74
 	 */
75
-	public function column_default( $item, $column_name ) {
76
-		switch ( $column_name ) {
75
+	public function column_default($item, $column_name) {
76
+		switch ($column_name) {
77 77
 			case 'earnings' :
78
-				return give_currency_filter( give_format_amount( $item[ $column_name ] ) );
78
+				return give_currency_filter(give_format_amount($item[$column_name]));
79 79
 			case 'average_sales' :
80
-				return round( $item[ $column_name ] );
80
+				return round($item[$column_name]);
81 81
 			case 'average_earnings' :
82
-				return give_currency_filter( give_format_amount( $item[ $column_name ] ) );
82
+				return give_currency_filter(give_format_amount($item[$column_name]));
83 83
 			case 'details' :
84
-				return '<a href="' . admin_url( 'edit.php?post_type=give_forms&page=give-reports&tab=forms&form-id=' . $item['ID'] ) . '">' . esc_html__( 'View Detailed Report', 'give' ) . '</a>';
84
+				return '<a href="'.admin_url('edit.php?post_type=give_forms&page=give-reports&tab=forms&form-id='.$item['ID']).'">'.esc_html__('View Detailed Report', 'give').'</a>';
85 85
 			default:
86
-				return $item[ $column_name ];
86
+				return $item[$column_name];
87 87
 		}
88 88
 	}
89 89
 
@@ -96,12 +96,12 @@  discard block
 block discarded – undo
96 96
 	 */
97 97
 	public function get_columns() {
98 98
 		$columns = array(
99
-			'title'            => esc_html__( 'Form', 'give' ),
100
-			'sales'            => esc_html__( 'Donations', 'give' ),
101
-			'earnings'         => esc_html__( 'Income', 'give' ),
102
-			'average_sales'    => esc_html__( 'Monthly Average Donations', 'give' ),
103
-			'average_earnings' => esc_html__( 'Monthly Average Income', 'give' ),
104
-			'details'          => esc_html__( 'Detailed Report', 'give' )
99
+			'title'            => esc_html__('Form', 'give'),
100
+			'sales'            => esc_html__('Donations', 'give'),
101
+			'earnings'         => esc_html__('Income', 'give'),
102
+			'average_sales'    => esc_html__('Monthly Average Donations', 'give'),
103
+			'average_earnings' => esc_html__('Monthly Average Income', 'give'),
104
+			'details'          => esc_html__('Detailed Report', 'give')
105 105
 		);
106 106
 
107 107
 		return $columns;
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 	 */
117 117
 	public function get_sortable_columns() {
118 118
 		return array(
119
-			'title'    => array( 'title', true ),
120
-			'sales'    => array( 'sales', false ),
121
-			'earnings' => array( 'earnings', false ),
119
+			'title'    => array('title', true),
120
+			'sales'    => array('sales', false),
121
+			'earnings' => array('earnings', false),
122 122
 		);
123 123
 	}
124 124
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	 * @return int Current page number
131 131
 	 */
132 132
 	public function get_paged() {
133
-		return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1;
133
+		return isset($_GET['paged']) ? absint($_GET['paged']) : 1;
134 134
 	}
135 135
 
136 136
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	 * @return int Category ID
143 143
 	 */
144 144
 	public function get_category() {
145
-		return isset( $_GET['category'] ) ? absint( $_GET['category'] ) : 0;
145
+		return isset($_GET['category']) ? absint($_GET['category']) : 0;
146 146
 	}
147 147
 
148 148
 
@@ -155,8 +155,8 @@  discard block
 block discarded – undo
155 155
 	 */
156 156
 	public function get_total_forms() {
157 157
 		$total  = 0;
158
-		$counts = wp_count_posts( 'give_forms', 'readable' );
159
-		foreach ( $counts as $status => $count ) {
158
+		$counts = wp_count_posts('give_forms', 'readable');
159
+		foreach ($counts as $status => $count) {
160 160
 			$total += $count;
161 161
 		}
162 162
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	 * @since  1.0
171 171
 	 * @return void
172 172
 	 */
173
-	public function bulk_actions( $which = '' ) {
173
+	public function bulk_actions($which = '') {
174 174
 
175 175
 	}
176 176
 
@@ -182,27 +182,27 @@  discard block
 block discarded – undo
182 182
 	 *
183 183
 	 * @param string $which
184 184
 	 */
185
-	protected function display_tablenav( $which ) {
185
+	protected function display_tablenav($which) {
186 186
 
187
-		if ( 'top' === $which ) {
188
-			wp_nonce_field( 'bulk-' . $this->_args['plural'] );
187
+		if ('top' === $which) {
188
+			wp_nonce_field('bulk-'.$this->_args['plural']);
189 189
 		}
190 190
 		?>
191
-		<div class="tablenav give-clearfix <?php echo esc_attr( $which ); ?>">
191
+		<div class="tablenav give-clearfix <?php echo esc_attr($which); ?>">
192 192
 
193
-			<?php if ( 'top' === $which ) { ?>
193
+			<?php if ('top' === $which) { ?>
194 194
 				<h3 class="alignleft reports-earnings-title">
195
-					<span><?php esc_html_e( 'Donation Forms Report', 'give' ); ?></span>
195
+					<span><?php esc_html_e('Donation Forms Report', 'give'); ?></span>
196 196
 				</h3>
197 197
 			<?php } ?>
198 198
 
199 199
 			<div class="alignright tablenav-right">
200 200
 				<div class="actions bulkactions">
201
-					<?php $this->bulk_actions( $which ); ?>
201
+					<?php $this->bulk_actions($which); ?>
202 202
 				</div>
203 203
 				<?php
204
-				$this->extra_tablenav( $which );
205
-				$this->pagination( $which );
204
+				$this->extra_tablenav($which);
205
+				$this->pagination($which);
206 206
 				?>
207 207
 			</div>
208 208
 
@@ -222,9 +222,9 @@  discard block
 block discarded – undo
222 222
 	 */
223 223
 	public function category_filter() {
224 224
 
225
-		$categories = get_terms( 'form_category' );
226
-		if ( $categories && ! is_wp_error( $categories ) ) {
227
-			echo Give()->html->category_dropdown( 'category', $this->get_category() );
225
+		$categories = get_terms('form_category');
226
+		if ($categories && ! is_wp_error($categories)) {
227
+			echo Give()->html->category_dropdown('category', $this->get_category());
228 228
 		}
229 229
 	}
230 230
 
@@ -238,8 +238,8 @@  discard block
 block discarded – undo
238 238
 	 */
239 239
 	public function query() {
240 240
 
241
-		$orderby  = isset( $_GET['orderby'] ) ? $_GET['orderby'] : 'title';
242
-		$order    = isset( $_GET['order'] ) ? $_GET['order'] : 'DESC';
241
+		$orderby  = isset($_GET['orderby']) ? $_GET['orderby'] : 'title';
242
+		$order    = isset($_GET['order']) ? $_GET['order'] : 'DESC';
243 243
 		$category = $this->get_category();
244 244
 
245 245
 		$args = array(
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 			'suppress_filters' => true
253 253
 		);
254 254
 
255
-		if ( ! empty( $category ) ) {
255
+		if ( ! empty($category)) {
256 256
 			$args['tax_query'] = array(
257 257
 				array(
258 258
 					'taxonomy' => 'form_category',
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 			);
262 262
 		}
263 263
 
264
-		switch ( $orderby ) :
264
+		switch ($orderby) :
265 265
 			case 'title' :
266 266
 				$args['orderby'] = 'title';
267 267
 				break;
@@ -277,9 +277,9 @@  discard block
 block discarded – undo
277 277
 				break;
278 278
 		endswitch;
279 279
 
280
-		$args = apply_filters( 'give_form_reports_prepare_items_args', $args, $this );
280
+		$args = apply_filters('give_form_reports_prepare_items_args', $args, $this);
281 281
 
282
-		$this->products = new WP_Query( $args );
282
+		$this->products = new WP_Query($args);
283 283
 
284 284
 	}
285 285
 
@@ -295,15 +295,15 @@  discard block
 block discarded – undo
295 295
 
296 296
 		$give_forms = $this->products->posts;
297 297
 
298
-		if ( $give_forms ) {
299
-			foreach ( $give_forms as $form ) {
298
+		if ($give_forms) {
299
+			foreach ($give_forms as $form) {
300 300
 				$reports_data[] = array(
301 301
 					'ID'               => $form,
302
-					'title'            => get_the_title( $form ),
303
-					'sales'            => give_get_form_sales_stats( $form ),
304
-					'earnings'         => give_get_form_earnings_stats( $form ),
305
-					'average_sales'    => give_get_average_monthly_form_sales( $form ),
306
-					'average_earnings' => give_get_average_monthly_form_earnings( $form )
302
+					'title'            => get_the_title($form),
303
+					'sales'            => give_get_form_sales_stats($form),
304
+					'earnings'         => give_get_form_earnings_stats($form),
305
+					'average_sales'    => give_get_average_monthly_form_sales($form),
306
+					'average_earnings' => give_get_average_monthly_form_earnings($form)
307 307
 				);
308 308
 			}
309 309
 		}
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 
332 332
 		$sortable = $this->get_sortable_columns();
333 333
 
334
-		$this->_column_headers = array( $columns, $hidden, $sortable );
334
+		$this->_column_headers = array($columns, $hidden, $sortable);
335 335
 
336 336
 		$data = $this->reports_data();
337 337
 
@@ -339,10 +339,10 @@  discard block
 block discarded – undo
339 339
 
340 340
 		$this->items = $data;
341 341
 
342
-		$this->set_pagination_args( array(
342
+		$this->set_pagination_args(array(
343 343
 				'total_items' => $total_items,
344 344
 				'per_page'    => $this->per_page,
345
-				'total_pages' => ceil( $total_items / $this->per_page )
345
+				'total_pages' => ceil($total_items / $this->per_page)
346 346
 			)
347 347
 		);
348 348
 	}
Please login to merge, or discard this patch.
includes/admin/reporting/class-gateways-reports-table.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@  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
 
17 17
 // Load WP_List_Table if not loaded
18
-if ( ! class_exists( 'WP_List_Table' ) ) {
19
-	require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
18
+if ( ! class_exists('WP_List_Table')) {
19
+	require_once ABSPATH.'wp-admin/includes/class-wp-list-table.php';
20 20
 }
21 21
 
22 22
 /**
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 		global $status, $page;
46 46
 
47 47
 		// Set parent defaults
48
-		parent::__construct( array(
49
-			'singular' => give_get_forms_label_singular(),    // Singular name of the listed records
50
-			'plural'   => give_get_forms_label_plural(),        // Plural name of the listed records
48
+		parent::__construct(array(
49
+			'singular' => give_get_forms_label_singular(), // Singular name of the listed records
50
+			'plural'   => give_get_forms_label_plural(), // Plural name of the listed records
51 51
 			'ajax'     => false                        // Does this table support ajax?
52
-		) );
52
+		));
53 53
 
54 54
 	}
55 55
 
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
 	 *
65 65
 	 * @return string Column Name
66 66
 	 */
67
-	public function column_default( $item, $column_name ) {
68
-		switch ( $column_name ) {
67
+	public function column_default($item, $column_name) {
68
+		switch ($column_name) {
69 69
 			default:
70
-				return $item[ $column_name ];
70
+				return $item[$column_name];
71 71
 		}
72 72
 	}
73 73
 
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
 	 */
81 81
 	public function get_columns() {
82 82
 		$columns = array(
83
-			'label'           => esc_attr__( 'Gateway', 'give' ),
84
-			'complete_sales'  => esc_attr__( 'Complete Transactions', 'give' ),
85
-			'pending_sales'   => esc_attr__( 'Pending / Failed Transactions', 'give' ),
86
-			'total_sales'     => esc_attr__( 'Total Transactions', 'give' ),
87
-			'total_donations' => esc_attr__( 'Total Donated', 'give' )
83
+			'label'           => esc_attr__('Gateway', 'give'),
84
+			'complete_sales'  => esc_attr__('Complete Transactions', 'give'),
85
+			'pending_sales'   => esc_attr__('Pending / Failed Transactions', 'give'),
86
+			'total_sales'     => esc_attr__('Total Transactions', 'give'),
87
+			'total_donations' => esc_attr__('Total Donated', 'give')
88 88
 		);
89 89
 
90 90
 		return $columns;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 * @return int Current page number
100 100
 	 */
101 101
 	public function get_paged() {
102
-		return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1;
102
+		return isset($_GET['paged']) ? absint($_GET['paged']) : 1;
103 103
 	}
104 104
 
105 105
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	 * @since  1.0
111 111
 	 * @return void
112 112
 	 */
113
-	public function bulk_actions( $which = '' ) {
113
+	public function bulk_actions($which = '') {
114 114
 
115 115
 	}
116 116
 
@@ -122,27 +122,27 @@  discard block
 block discarded – undo
122 122
 	 *
123 123
 	 * @param string $which
124 124
 	 */
125
-	protected function display_tablenav( $which ) {
125
+	protected function display_tablenav($which) {
126 126
 
127
-		if ( 'top' === $which ) {
128
-			wp_nonce_field( 'bulk-' . $this->_args['plural'] );
127
+		if ('top' === $which) {
128
+			wp_nonce_field('bulk-'.$this->_args['plural']);
129 129
 		}
130 130
 		?>
131
-		<div class="tablenav gateways-report-tablenav give-clearfix <?php echo esc_attr( $which ); ?>">
131
+		<div class="tablenav gateways-report-tablenav give-clearfix <?php echo esc_attr($which); ?>">
132 132
 
133
-			<?php if ( 'top' === $which ) { ?>
133
+			<?php if ('top' === $which) { ?>
134 134
 				<h3 class="alignleft reports-earnings-title">
135
-					<span><?php esc_html_e( 'Donation Methods Report', 'give' ); ?></span>
135
+					<span><?php esc_html_e('Donation Methods Report', 'give'); ?></span>
136 136
 				</h3>
137 137
 			<?php } ?>
138 138
 
139 139
 			<div class="alignright tablenav-right">
140 140
 				<div class="actions bulkactions">
141
-					<?php $this->bulk_actions( $which ); ?>
141
+					<?php $this->bulk_actions($which); ?>
142 142
 				</div>
143 143
 				<?php
144
-				$this->extra_tablenav( $which );
145
-				$this->pagination( $which );
144
+				$this->extra_tablenav($which);
145
+				$this->pagination($which);
146 146
 				?>
147 147
 			</div>
148 148
 
@@ -167,18 +167,18 @@  discard block
 block discarded – undo
167 167
 		$gateways     = give_get_payment_gateways();
168 168
 		$stats        = new Give_Payment_Stats();
169 169
 
170
-		foreach ( $gateways as $gateway_id => $gateway ) {
170
+		foreach ($gateways as $gateway_id => $gateway) {
171 171
 
172
-			$complete_count = give_count_sales_by_gateway( $gateway_id, 'publish' );
173
-			$pending_count  = give_count_sales_by_gateway( $gateway_id, array( 'pending', 'failed' ) );
172
+			$complete_count = give_count_sales_by_gateway($gateway_id, 'publish');
173
+			$pending_count  = give_count_sales_by_gateway($gateway_id, array('pending', 'failed'));
174 174
 
175 175
 			$reports_data[] = array(
176 176
 				'ID'              => $gateway_id,
177 177
 				'label'           => $gateway['admin_label'],
178
-				'complete_sales'  => give_format_amount( $complete_count, false ),
179
-				'pending_sales'   => give_format_amount( $pending_count, false ),
180
-				'total_sales'     => give_format_amount( $complete_count + $pending_count, false ),
181
-				'total_donations' => give_currency_filter( give_format_amount( $stats->get_earnings( 0, 0, 0, $gateway_id ) ) )
178
+				'complete_sales'  => give_format_amount($complete_count, false),
179
+				'pending_sales'   => give_format_amount($pending_count, false),
180
+				'total_sales'     => give_format_amount($complete_count + $pending_count, false),
181
+				'total_donations' => give_currency_filter(give_format_amount($stats->get_earnings(0, 0, 0, $gateway_id)))
182 182
 			);
183 183
 		}
184 184
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 		$columns               = $this->get_columns();
201 201
 		$hidden                = array(); // No hidden columns
202 202
 		$sortable              = $this->get_sortable_columns();
203
-		$this->_column_headers = array( $columns, $hidden, $sortable );
203
+		$this->_column_headers = array($columns, $hidden, $sortable);
204 204
 		$this->items           = $this->reports_data();
205 205
 
206 206
 	}
Please login to merge, or discard this patch.
includes/admin/class-give-settings.php 3 patches
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -1181,23 +1181,23 @@  discard block
 block discarded – undo
1181 1181
 function give_license_key_callback( $field_object, $escaped_value, $object_id, $object_type, $field_type_object ) {
1182 1182
 	/* @var CMB2_Types $field_type_object */
1183 1183
 
1184
-    $id                   = $field_type_object->field->args['id'];
1184
+	$id                   = $field_type_object->field->args['id'];
1185 1185
 	$field_description    = $field_type_object->field->args['desc'];
1186 1186
 	$license              = $field_type_object->field->args['options']['license'];
1187
-    $license_key          = $escaped_value;
1188
-    $is_license_key       = apply_filters( 'give_is_license_key', ( is_object( $license ) && ! empty( $license ) ) );
1189
-    $is_valid_license     = apply_filters( 'give_is_valid_license', ( $is_license_key && property_exists( $license, 'license' ) && 'valid' === $license->license ) );
1190
-    $shortname            = $field_type_object->field->args['options']['shortname'];
1187
+	$license_key          = $escaped_value;
1188
+	$is_license_key       = apply_filters( 'give_is_license_key', ( is_object( $license ) && ! empty( $license ) ) );
1189
+	$is_valid_license     = apply_filters( 'give_is_valid_license', ( $is_license_key && property_exists( $license, 'license' ) && 'valid' === $license->license ) );
1190
+	$shortname            = $field_type_object->field->args['options']['shortname'];
1191 1191
 	$field_classes        = 'regular-text give-license-field';
1192 1192
 	$type                 = empty( $escaped_value ) || ! $is_valid_license ? 'text' : 'password';
1193
-    $custom_html          = '';
1194
-    $messages             = array();
1195
-    $class                = '';
1196
-    $account_page_link    = $field_type_object->field->args['options']['account_url'];
1197
-    $checkout_page_link   = $field_type_object->field->args['options']['checkout_url'];
1198
-    $addon_name           = $field_type_object->field->args['options']['item_name'];
1199
-    $license_status       = null;
1200
-    $is_in_subscription   = null;
1193
+	$custom_html          = '';
1194
+	$messages             = array();
1195
+	$class                = '';
1196
+	$account_page_link    = $field_type_object->field->args['options']['account_url'];
1197
+	$checkout_page_link   = $field_type_object->field->args['options']['checkout_url'];
1198
+	$addon_name           = $field_type_object->field->args['options']['item_name'];
1199
+	$license_status       = null;
1200
+	$is_in_subscription   = null;
1201 1201
 
1202 1202
 	// By default query on edd api url will return license object which contain status and message property, this can break below functionality.
1203 1203
 	// To combat that check if status is set to error or not, if yes then set $is_license_key to false.
@@ -1259,17 +1259,17 @@  discard block
 block discarded – undo
1259 1259
 
1260 1260
 		} elseif ( empty( $license->success ) && property_exists( $license, 'error' ) ) {
1261 1261
 
1262
-            // activate_license 'invalid' on anything other than valid, so if there was an error capture it
1263
-            switch(   $license->error ) {
1264
-                case 'expired' :
1265
-                    $class = $license->error;
1266
-                    $messages[] = sprintf(
1267
-                        __( 'Your license key expired on %s. Please <a href="%s" target="_blank" title="Renew your license key">renew your license key</a>.', 'give' ),
1268
-                        date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ),
1269
-                        $checkout_page_link . '?edd_license_key=' . $license_key . '&utm_campaign=admin&utm_source=licenses&utm_medium=expired'
1270
-                    );
1271
-                    $license_status = 'license-' . $class;
1272
-                    break;
1262
+			// activate_license 'invalid' on anything other than valid, so if there was an error capture it
1263
+			switch(   $license->error ) {
1264
+				case 'expired' :
1265
+					$class = $license->error;
1266
+					$messages[] = sprintf(
1267
+						__( 'Your license key expired on %s. Please <a href="%s" target="_blank" title="Renew your license key">renew your license key</a>.', 'give' ),
1268
+						date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ),
1269
+						$checkout_page_link . '?edd_license_key=' . $license_key . '&utm_campaign=admin&utm_source=licenses&utm_medium=expired'
1270
+					);
1271
+					$license_status = 'license-' . $class;
1272
+					break;
1273 1273
 
1274 1274
 				case 'missing' :
1275 1275
 					$class          = $license->error;
@@ -1300,11 +1300,11 @@  discard block
 block discarded – undo
1300 1300
 					$license_status = 'license-' . $class;
1301 1301
 					break;
1302 1302
 
1303
-                case 'item_name_mismatch' :
1304
-                    $class = $license->error;
1305
-                    $messages[] = sprintf( __( 'This license %s does not belong to %s.', 'give' ), $license_key, $addon_name );
1306
-                    $license_status = 'license-' . $class;
1307
-                    break;
1303
+				case 'item_name_mismatch' :
1304
+					$class = $license->error;
1305
+					$messages[] = sprintf( __( 'This license %s does not belong to %s.', 'give' ), $license_key, $addon_name );
1306
+					$license_status = 'license-' . $class;
1307
+					break;
1308 1308
 
1309 1309
 				case 'no_activations_left':
1310 1310
 					$class          = $license->error;
@@ -1359,7 +1359,7 @@  discard block
 block discarded – undo
1359 1359
 
1360 1360
 	// If license is active so show deactivate button.
1361 1361
 	if ( $is_valid_license ) {
1362
-        // Get input field html.
1362
+		// Get input field html.
1363 1363
 		$input_field_html = "<input type=\"{$type}\" name=\"{$id}\" class=\"{$field_classes}\" value=\"{$license_key}\" readonly=\"readonly\">";
1364 1364
 
1365 1365
 		$custom_html = '<input type="submit" class="button button-small give-license-deactivate" name="' . $id . '_deactivate" value="' . esc_attr__( 'Deactivate License', 'give' ) . '"/>';
@@ -1375,11 +1375,11 @@  discard block
 block discarded – undo
1375 1375
 		$messages[] = apply_filters( "{$shortname}_default_addon_notice", esc_html__( 'To receive updates, please enter your valid license key.', 'give' ) );
1376 1376
 	}
1377 1377
 
1378
-    foreach( $messages as $message ) {
1379
-        $custom_html .= '<div class="give-license-status-notice give-' . $license_status . '">';
1380
-        $custom_html .= '<p>' . $message . '</p>';
1381
-        $custom_html .= '</div>';
1382
-    }
1378
+	foreach( $messages as $message ) {
1379
+		$custom_html .= '<div class="give-license-status-notice give-' . $license_status . '">';
1380
+		$custom_html .= '<p>' . $message . '</p>';
1381
+		$custom_html .= '</div>';
1382
+	}
1383 1383
 
1384 1384
 
1385 1385
 	// Field html.
@@ -1388,8 +1388,8 @@  discard block
 block discarded – undo
1388 1388
 	// Nonce.
1389 1389
 	wp_nonce_field( $id . '-nonce', $id . '-nonce' );
1390 1390
 
1391
-    // Print field html.
1392
-    echo "<div class=\"give-license-key\"><label for=\"{$id}\">{$addon_name }</label></div><div class=\"give-license-block\">{$custom_html}</div>";
1391
+	// Print field html.
1392
+	echo "<div class=\"give-license-key\"><label for=\"{$id}\">{$addon_name }</label></div><div class=\"give-license-block\">{$custom_html}</div>";
1393 1393
 }
1394 1394
 
1395 1395
 
Please login to merge, or discard this patch.
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	 *
76 76
 	 * @param $url
77 77
 	 *
78
-	 * @return mixed
78
+	 * @return string
79 79
 	 */
80 80
 	public function give_update_cmb_meta_box_url( $url ) {
81 81
 		//Path to Give's CMB
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
  * @since 1.0
857 857
  *
858 858
  * @param string          $key   The Key to update
859
- * @param string|bool|int $value The value to set the key to
859
+ * @param integer $value The value to set the key to
860 860
  *
861 861
  * @return boolean True if updated, false if not.
862 862
  */
@@ -959,7 +959,7 @@  discard block
 block discarded – undo
959 959
  * @since      1.3.5
960 960
  *
961 961
  * @param $array
962
- * @param $position |int|string Expects an array key or 'id' of the settings field to appear after
962
+ * @param string $position |int|string Expects an array key or 'id' of the settings field to appear after
963 963
  * @param $insert   |array a valid array of options to insert
964 964
  *
965 965
  * @return array
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
  *
998 998
  * @since 1.0
999 999
  * @param array $field_arr
1000
- * @param array $saved_values
1000
+ * @param string|boolean $saved_values
1001 1001
  * @return void
1002 1002
  */
1003 1003
 function give_enabled_gateways_callback( $field_arr, $saved_values = array() ) {
@@ -1030,7 +1030,7 @@  discard block
 block discarded – undo
1030 1030
  *
1031 1031
  * @since  1.0
1032 1032
  * @param  array $field_arr
1033
- * @param  array $saved_value
1033
+ * @param  string|boolean $saved_value
1034 1034
  * @return void
1035 1035
  */
1036 1036
 function give_default_gateway_callback( $field_arr, $saved_value ) {
Please login to merge, or discard this patch.
Spacing   +362 added lines, -362 removed lines patch added patch discarded remove patch
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
 	public function __construct() {
47 47
 
48 48
 		//Custom CMB2 Settings Fields
49
-		add_action( 'cmb2_render_give_title', 'give_title_callback', 10, 5 );
50
-		add_action( 'cmb2_render_give_description', 'give_description_callback', 10, 5 );
51
-		add_action( 'cmb2_render_enabled_gateways', 'give_enabled_gateways_callback', 10, 5 );
52
-		add_action( 'cmb2_render_default_gateway', 'give_default_gateway_callback', 10, 5 );
53
-		add_action( 'cmb2_render_email_preview_buttons', 'give_email_preview_buttons_callback', 10, 5 );
54
-		add_action( 'cmb2_render_system_info', 'give_system_info_callback', 10, 5 );
55
-		add_action( 'cmb2_render_api', 'give_api_callback', 10, 5 );
56
-		add_action( 'cmb2_render_license_key', 'give_license_key_callback', 10, 5 );
49
+		add_action('cmb2_render_give_title', 'give_title_callback', 10, 5);
50
+		add_action('cmb2_render_give_description', 'give_description_callback', 10, 5);
51
+		add_action('cmb2_render_enabled_gateways', 'give_enabled_gateways_callback', 10, 5);
52
+		add_action('cmb2_render_default_gateway', 'give_default_gateway_callback', 10, 5);
53
+		add_action('cmb2_render_email_preview_buttons', 'give_email_preview_buttons_callback', 10, 5);
54
+		add_action('cmb2_render_system_info', 'give_system_info_callback', 10, 5);
55
+		add_action('cmb2_render_api', 'give_api_callback', 10, 5);
56
+		add_action('cmb2_render_license_key', 'give_license_key_callback', 10, 5);
57 57
 	}
58 58
 
59 59
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 * @since  1.0
64 64
 	 */
65 65
 	public function init() {
66
-		register_setting( $this->key, $this->key );
66
+		register_setting($this->key, $this->key);
67 67
 
68 68
 	}
69 69
 
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
 	 *
78 78
 	 * @return mixed
79 79
 	 */
80
-	public function give_update_cmb_meta_box_url( $url ) {
80
+	public function give_update_cmb_meta_box_url($url) {
81 81
 		//Path to Give's CMB
82
-		return GIVE_PLUGIN_URL . '/includes/libraries/cmb2';
82
+		return GIVE_PLUGIN_URL.'/includes/libraries/cmb2';
83 83
 	}
84 84
 
85 85
 
@@ -91,27 +91,27 @@  discard block
 block discarded – undo
91 91
 	 */
92 92
 	public function give_get_settings_tabs() {
93 93
 
94
-		$settings = $this->give_settings( null );
94
+		$settings = $this->give_settings(null);
95 95
 
96 96
 		$tabs             = array();
97
-		$tabs['general']  = esc_html__( 'General', 'give' );
98
-		$tabs['gateways'] = esc_html__( 'Payment Gateways', 'give' );
99
-		$tabs['display']  = esc_html__( 'Display Options', 'give' );
100
-		$tabs['emails']   = esc_html__( 'Emails', 'give' );
97
+		$tabs['general']  = esc_html__('General', 'give');
98
+		$tabs['gateways'] = esc_html__('Payment Gateways', 'give');
99
+		$tabs['display']  = esc_html__('Display Options', 'give');
100
+		$tabs['emails']   = esc_html__('Emails', 'give');
101 101
 
102
-		if ( ! empty( $settings['addons']['fields'] ) ) {
103
-			$tabs['addons'] = esc_html__( 'Add-ons', 'give' );
102
+		if ( ! empty($settings['addons']['fields'])) {
103
+			$tabs['addons'] = esc_html__('Add-ons', 'give');
104 104
 		}
105 105
 
106
-		if ( ! empty( $settings['licenses']['fields'] ) ) {
107
-			$tabs['licenses'] = esc_html__( 'Licenses', 'give' );
106
+		if ( ! empty($settings['licenses']['fields'])) {
107
+			$tabs['licenses'] = esc_html__('Licenses', 'give');
108 108
 		}
109 109
 
110
-		$tabs['advanced']    = esc_html__( 'Advanced', 'give' );
111
-		$tabs['api']         = esc_html__( 'API', 'give' );
112
-		$tabs['system_info'] = esc_html__( 'System Info', 'give' );
110
+		$tabs['advanced']    = esc_html__('Advanced', 'give');
111
+		$tabs['api']         = esc_html__('API', 'give');
112
+		$tabs['system_info'] = esc_html__('System Info', 'give');
113 113
 
114
-		return apply_filters( 'give_settings_tabs', $tabs );
114
+		return apply_filters('give_settings_tabs', $tabs);
115 115
 	}
116 116
 
117 117
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public function admin_page_display() {
123 123
 
124
-		$active_tab = isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $this->give_get_settings_tabs() ) ? $_GET['tab'] : 'general';
124
+		$active_tab = isset($_GET['tab']) && array_key_exists($_GET['tab'], $this->give_get_settings_tabs()) ? $_GET['tab'] : 'general';
125 125
 
126 126
 		?>
127 127
 
@@ -131,22 +131,22 @@  discard block
 block discarded – undo
131 131
 
132 132
 			<h2 class="nav-tab-wrapper">
133 133
 				<?php
134
-				foreach ( $this->give_get_settings_tabs() as $tab_id => $tab_name ) {
134
+				foreach ($this->give_get_settings_tabs() as $tab_id => $tab_name) {
135 135
 
136
-					$tab_url = esc_url( add_query_arg( array(
136
+					$tab_url = esc_url(add_query_arg(array(
137 137
 						'settings-updated' => false,
138 138
 						'tab'              => $tab_id
139
-					) ) );
139
+					)));
140 140
 
141 141
 					$active = $active_tab == $tab_id ? ' nav-tab-active' : '';
142 142
 
143
-					echo '<a href="' . esc_url( $tab_url ) . '" class="nav-tab' . $active . '" id="tab-' . $tab_id . '">' . esc_html( $tab_name ) . '</a>';
143
+					echo '<a href="'.esc_url($tab_url).'" class="nav-tab'.$active.'" id="tab-'.$tab_id.'">'.esc_html($tab_name).'</a>';
144 144
 
145 145
 				}
146 146
 				?>
147 147
 			</h2>
148 148
 
149
-			<?php cmb2_metabox_form( $this->give_settings( $active_tab ), $this->key ); ?>
149
+			<?php cmb2_metabox_form($this->give_settings($active_tab), $this->key); ?>
150 150
 
151 151
 		</div><!-- .wrap -->
152 152
 
@@ -168,12 +168,12 @@  discard block
 block discarded – undo
168 168
 	 *
169 169
 	 * @return string
170 170
 	 */
171
-	function give_modify_cmb2_form_output( $form_format, $object_id, $cmb ) {
171
+	function give_modify_cmb2_form_output($form_format, $object_id, $cmb) {
172 172
 
173 173
 		//only modify the give settings form
174
-		if ( 'give_settings' == $object_id ) {
174
+		if ('give_settings' == $object_id) {
175 175
 
176
-			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>';
176
+			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>';
177 177
 
178 178
 		}
179 179
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 	 *
191 191
 	 * @return array
192 192
 	 */
193
-	public function give_settings( $active_tab ) {
193
+	public function give_settings($active_tab) {
194 194
 
195 195
 		$give_settings = array(
196 196
 			/**
@@ -198,99 +198,99 @@  discard block
 block discarded – undo
198 198
 			 */
199 199
 			'general'     => array(
200 200
 				'id'         => 'general_settings',
201
-				'give_title' => esc_html__( 'General Settings', 'give' ),
202
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
203
-				'fields'     => apply_filters( 'give_settings_general', array(
201
+				'give_title' => esc_html__('General Settings', 'give'),
202
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
203
+				'fields'     => apply_filters('give_settings_general', array(
204 204
 						array(
205
-							'name' => esc_html__( 'General Settings', 'give' ),
205
+							'name' => esc_html__('General Settings', 'give'),
206 206
 							'desc' => '',
207 207
 							'type' => 'give_title',
208 208
 							'id'   => 'give_title_general_settings_1'
209 209
 						),
210 210
 						array(
211
-							'name'    => esc_html__( 'Success Page', 'give' ),
211
+							'name'    => esc_html__('Success Page', 'give'),
212 212
 							/* translators: %s: [give_receipt] */
213
-							'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>' ),
213
+							'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>'),
214 214
 							'id'      => 'success_page',
215 215
 							'type'    => 'select',
216
-							'options' => give_cmb2_get_post_options( array(
216
+							'options' => give_cmb2_get_post_options(array(
217 217
 								'post_type'   => 'page',
218
-								'numberposts' => - 1
219
-							) ),
218
+								'numberposts' => -1
219
+							)),
220 220
 						),
221 221
 						array(
222
-							'name'    => esc_html__( 'Failed Donation Page', 'give' ),
223
-							'desc'    => esc_html__( 'The page donors are sent to if their donation is cancelled or fails.', 'give' ),
222
+							'name'    => esc_html__('Failed Donation Page', 'give'),
223
+							'desc'    => esc_html__('The page donors are sent to if their donation is cancelled or fails.', 'give'),
224 224
 							'id'      => 'failure_page',
225 225
 							'type'    => 'select',
226
-							'options' => give_cmb2_get_post_options( array(
226
+							'options' => give_cmb2_get_post_options(array(
227 227
 								'post_type'   => 'page',
228
-								'numberposts' => - 1
229
-							) ),
228
+								'numberposts' => -1
229
+							)),
230 230
 						),
231 231
 						array(
232
-							'name'    => esc_html__( 'Donation History Page', 'give' ),
232
+							'name'    => esc_html__('Donation History Page', 'give'),
233 233
 							/* translators: %s: [donation_history] */
234
-							'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>' ),
234
+							'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>'),
235 235
 							'id'      => 'history_page',
236 236
 							'type'    => 'select',
237
-							'options' => give_cmb2_get_post_options( array(
237
+							'options' => give_cmb2_get_post_options(array(
238 238
 								'post_type'   => 'page',
239
-								'numberposts' => - 1
240
-							) ),
239
+								'numberposts' => -1
240
+							)),
241 241
 						),
242 242
 						array(
243
-							'name'    => esc_html__( 'Base Country', 'give' ),
244
-							'desc'    => esc_html__( 'The country your site operates from.', 'give' ),
243
+							'name'    => esc_html__('Base Country', 'give'),
244
+							'desc'    => esc_html__('The country your site operates from.', 'give'),
245 245
 							'id'      => 'base_country',
246 246
 							'type'    => 'select',
247 247
 							'options' => give_get_country_list(),
248 248
 						),
249 249
 						array(
250
-							'name' => esc_html__( 'Currency Settings', 'give' ),
250
+							'name' => esc_html__('Currency Settings', 'give'),
251 251
 							'desc' => '',
252 252
 							'type' => 'give_title',
253 253
 							'id'   => 'give_title_general_settings_2'
254 254
 						),
255 255
 						array(
256
-							'name'    => esc_html__( 'Currency', 'give' ),
257
-							'desc'    => esc_html__( 'The donation currency. Note that some payment gateways have currency restrictions.', 'give' ),
256
+							'name'    => esc_html__('Currency', 'give'),
257
+							'desc'    => esc_html__('The donation currency. Note that some payment gateways have currency restrictions.', 'give'),
258 258
 							'id'      => 'currency',
259 259
 							'type'    => 'select',
260 260
 							'options' => give_get_currencies(),
261 261
 							'default' => 'USD',
262 262
 						),
263 263
 						array(
264
-							'name'    => esc_html__( 'Currency Position', 'give' ),
265
-							'desc'    => esc_html__( 'The position of the currency symbol.', 'give' ),
264
+							'name'    => esc_html__('Currency Position', 'give'),
265
+							'desc'    => esc_html__('The position of the currency symbol.', 'give'),
266 266
 							'id'      => 'currency_position',
267 267
 							'type'    => 'select',
268 268
 							'options' => array(
269 269
 								/* translators: %s: currency symbol */
270
-								'before' => sprintf( esc_html__( 'Before - %s10', 'give' ), give_currency_symbol( give_get_currency() ) ),
270
+								'before' => sprintf(esc_html__('Before - %s10', 'give'), give_currency_symbol(give_get_currency())),
271 271
 								/* translators: %s: currency symbol */
272
-								'after'  => sprintf( esc_html__( 'After - 10%s', 'give' ), give_currency_symbol( give_get_currency() ) )
272
+								'after'  => sprintf(esc_html__('After - 10%s', 'give'), give_currency_symbol(give_get_currency()))
273 273
 							),
274 274
 							'default' => 'before',
275 275
 						),
276 276
 						array(
277
-							'name'            => esc_html__( 'Thousands Separator', 'give' ),
278
-							'desc'            => esc_html__( 'The symbol (usually , or .) to separate thousands.', 'give' ),
277
+							'name'            => esc_html__('Thousands Separator', 'give'),
278
+							'desc'            => esc_html__('The symbol (usually , or .) to separate thousands.', 'give'),
279 279
 							'id'              => 'thousands_separator',
280 280
 							'type'            => 'text_small',
281 281
 							'sanitization_cb' => 'give_sanitize_thousand_separator',
282 282
 							'default'         => ',',
283 283
 						),
284 284
 						array(
285
-							'name'    => esc_html__( 'Decimal Separator', 'give' ),
286
-							'desc'    => esc_html__( 'The symbol (usually , or .) to separate decimal points.', 'give' ),
285
+							'name'    => esc_html__('Decimal Separator', 'give'),
286
+							'desc'    => esc_html__('The symbol (usually , or .) to separate decimal points.', 'give'),
287 287
 							'id'      => 'decimal_separator',
288 288
 							'type'    => 'text_small',
289 289
 							'default' => '.',
290 290
 						),
291 291
 						array(
292
-							'name'            => esc_html__( 'Number of Decimals', 'give' ),
293
-							'desc'            => esc_html__( 'The number of decimal points displayed in amounts.', 'give' ),
292
+							'name'            => esc_html__('Number of Decimals', 'give'),
293
+							'desc'            => esc_html__('The number of decimal points displayed in amounts.', 'give'),
294 294
 							'id'              => 'number_decimals',
295 295
 							'type'            => 'text_small',
296 296
 							'default'         => 2,
@@ -304,83 +304,83 @@  discard block
 block discarded – undo
304 304
 			 */
305 305
 			'gateways'    => array(
306 306
 				'id'         => 'payment_gateways',
307
-				'give_title' => esc_html__( 'Payment Gateways', 'give' ),
308
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
309
-				'fields'     => apply_filters( 'give_settings_gateways', array(
307
+				'give_title' => esc_html__('Payment Gateways', 'give'),
308
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
309
+				'fields'     => apply_filters('give_settings_gateways', array(
310 310
 						array(
311
-							'name' => esc_html__( 'Gateways Settings', 'give' ),
311
+							'name' => esc_html__('Gateways Settings', 'give'),
312 312
 							'desc' => '',
313 313
 							'id'   => 'give_title_gateway_settings_1',
314 314
 							'type' => 'give_title'
315 315
 						),
316 316
 						array(
317
-							'name' => esc_html__( 'Test Mode', 'give' ),
318
-							'desc' => esc_html__( '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
+							'name' => esc_html__('Test Mode', 'give'),
318
+							'desc' => esc_html__('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'),
319 319
 							'id'   => 'test_mode',
320 320
 							'type' => 'checkbox'
321 321
 						),
322 322
 						array(
323
-							'name' => esc_html__( 'Enabled Gateways', 'give' ),
324
-							'desc' => esc_html__( 'Enable your payment gateway. Can be ordered by dragging.', 'give' ),
323
+							'name' => esc_html__('Enabled Gateways', 'give'),
324
+							'desc' => esc_html__('Enable your payment gateway. Can be ordered by dragging.', 'give'),
325 325
 							'id'   => 'gateways',
326 326
 							'type' => 'enabled_gateways'
327 327
 						),
328 328
 						array(
329
-							'name' => esc_html__( 'Default Gateway', 'give' ),
330
-							'desc' => esc_html__( 'The gateway that will be selected by default.', 'give' ),
329
+							'name' => esc_html__('Default Gateway', 'give'),
330
+							'desc' => esc_html__('The gateway that will be selected by default.', 'give'),
331 331
 							'id'   => 'default_gateway',
332 332
 							'type' => 'default_gateway'
333 333
 						),
334 334
 						array(
335
-							'name' => esc_html__( 'PayPal Standard', 'give' ),
335
+							'name' => esc_html__('PayPal Standard', 'give'),
336 336
 							'desc' => '',
337 337
 							'type' => 'give_title',
338 338
 							'id'   => 'give_title_gateway_settings_2',
339 339
 						),
340 340
 						array(
341
-							'name' => esc_html__( 'PayPal Email', 'give' ),
342
-							'desc' => esc_html__( 'Enter your PayPal account\'s email.', 'give' ),
341
+							'name' => esc_html__('PayPal Email', 'give'),
342
+							'desc' => esc_html__('Enter your PayPal account\'s email.', 'give'),
343 343
 							'id'   => 'paypal_email',
344 344
 							'type' => 'text_email',
345 345
 						),
346 346
 						array(
347
-							'name' => esc_html__( 'PayPal Page Style', 'give' ),
348
-							'desc' => esc_html__( 'Enter the name of the page style to use, or leave blank to use the default.', 'give' ),
347
+							'name' => esc_html__('PayPal Page Style', 'give'),
348
+							'desc' => esc_html__('Enter the name of the page style to use, or leave blank to use the default.', 'give'),
349 349
 							'id'   => 'paypal_page_style',
350 350
 							'type' => 'text',
351 351
 						),
352 352
 						array(
353
-							'name'    => esc_html__( 'PayPal Transaction Type', 'give' ),
354
-							'desc'    => esc_html__( '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
+							'name'    => esc_html__('PayPal Transaction Type', 'give'),
354
+							'desc'    => esc_html__('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'),
355 355
 							'id'      => 'paypal_button_type',
356 356
 							'type'    => 'radio_inline',
357 357
 							'options' => array(
358
-								'donation' => esc_html__( 'Donation', 'give' ),
359
-								'standard' => esc_html__( 'Standard Transaction', 'give' )
358
+								'donation' => esc_html__('Donation', 'give'),
359
+								'standard' => esc_html__('Standard Transaction', 'give')
360 360
 							),
361 361
 							'default' => 'donation',
362 362
 						),
363 363
 						array(
364
-							'name' => esc_html__( 'Disable PayPal IPN Verification', 'give' ),
365
-							'desc' => esc_html__( 'If donations are not getting marked as complete, use a slightly less secure method of verifying donations.', 'give' ),
364
+							'name' => esc_html__('Disable PayPal IPN Verification', 'give'),
365
+							'desc' => esc_html__('If donations are not getting marked as complete, use a slightly less secure method of verifying donations.', 'give'),
366 366
 							'id'   => 'disable_paypal_verification',
367 367
 							'type' => 'checkbox'
368 368
 						),
369 369
 						array(
370
-							'name' => esc_html__( 'Offline Donations', 'give' ),
370
+							'name' => esc_html__('Offline Donations', 'give'),
371 371
 							'desc' => '',
372 372
 							'type' => 'give_title',
373 373
 							'id'   => 'give_title_gateway_settings_3',
374 374
 						),
375 375
 						array(
376
-							'name' => esc_html__( 'Collect Billing Details', 'give' ),
377
-							'desc' => esc_html__( 'Enable to request billing details for offline donations. Will appear above offline donation instructions. Can be enabled/disabled per form.', 'give' ),
376
+							'name' => esc_html__('Collect Billing Details', 'give'),
377
+							'desc' => esc_html__('Enable to request billing details for offline donations. Will appear above offline donation instructions. Can be enabled/disabled per form.', 'give'),
378 378
 							'id'   => 'give_offline_donation_enable_billing_fields',
379 379
 							'type' => 'checkbox'
380 380
 						),
381 381
 						array(
382
-							'name'    => esc_html__( 'Offline Donation Instructions', 'give' ),
383
-							'desc'    => esc_html__( '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
+							'name'    => esc_html__('Offline Donation Instructions', 'give'),
383
+							'desc'    => esc_html__('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'),
384 384
 							'id'      => 'global_offline_donation_content',
385 385
 							'default' => give_get_default_offline_donation_content(),
386 386
 							'type'    => 'wysiwyg',
@@ -389,15 +389,15 @@  discard block
 block discarded – undo
389 389
 							)
390 390
 						),
391 391
 						array(
392
-							'name'    => esc_html__( 'Offline Donation Email Instructions Subject', 'give' ),
393
-							'desc'    => esc_html__( 'Enter the subject line for the donation receipt email.', 'give' ),
392
+							'name'    => esc_html__('Offline Donation Email Instructions Subject', 'give'),
393
+							'desc'    => esc_html__('Enter the subject line for the donation receipt email.', 'give'),
394 394
 							'id'      => 'offline_donation_subject',
395
-							'default' => esc_attr__( '{donation} - Offline Donation Instructions', 'give' ),
395
+							'default' => esc_attr__('{donation} - Offline Donation Instructions', 'give'),
396 396
 							'type'    => 'text'
397 397
 						),
398 398
 						array(
399
-							'name'    => esc_html__( 'Offline Donation Email Instructions', 'give' ),
400
-							'desc'    => esc_html__( '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
+							'name'    => esc_html__('Offline Donation Email Instructions', 'give'),
400
+							'desc'    => esc_html__('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'),
401 401
 							'id'      => 'global_offline_donation_email',
402 402
 							'default' => give_get_default_offline_donation_email_content(),
403 403
 							'type'    => 'wysiwyg',
@@ -411,100 +411,100 @@  discard block
 block discarded – undo
411 411
 			/** Display Settings */
412 412
 			'display'     => array(
413 413
 				'id'         => 'display_settings',
414
-				'give_title' => esc_html__( 'Display Settings', 'give' ),
415
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
416
-				'fields'     => apply_filters( 'give_settings_display', array(
414
+				'give_title' => esc_html__('Display Settings', 'give'),
415
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
416
+				'fields'     => apply_filters('give_settings_display', array(
417 417
 						array(
418
-							'name' => esc_html__( 'Display Settings', 'give' ),
418
+							'name' => esc_html__('Display Settings', 'give'),
419 419
 							'desc' => '',
420 420
 							'id'   => 'give_title_display_settings_1',
421 421
 							'type' => 'give_title'
422 422
 						),
423 423
 						array(
424
-							'name' => esc_html__( 'Disable CSS', 'give' ),
425
-							'desc' => esc_html__( 'Enable this option if you would like to disable all of Give\'s included CSS stylesheets.', 'give' ),
424
+							'name' => esc_html__('Disable CSS', 'give'),
425
+							'desc' => esc_html__('Enable this option if you would like to disable all of Give\'s included CSS stylesheets.', 'give'),
426 426
 							'id'   => 'disable_css',
427 427
 							'type' => 'checkbox'
428 428
 						),
429 429
 						array(
430
-							'name' => esc_html__( 'Enable Floating Labels', 'give' ),
430
+							'name' => esc_html__('Enable Floating Labels', 'give'),
431 431
 							/* translators: %s: http://docs.givewp.com/form-floating-labels */
432
-							'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( 'a' => array( 'href' => array(), 'target' => array() ) ) ), esc_url( 'http://docs.givewp.com/form-floating-labels' ) ),
432
+							'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('a' => array('href' => array(), 'target' => array()))), esc_url('http://docs.givewp.com/form-floating-labels')),
433 433
 							'id'   => 'floatlabels',
434 434
 							'type' => 'checkbox'
435 435
 						),
436 436
 						array(
437
-							'name' => esc_html__( 'Disable Welcome Screen', 'give' ),
437
+							'name' => esc_html__('Disable Welcome Screen', 'give'),
438 438
 							/* translators: %s: about page URL */
439
-							'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(
439
+							'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(
440 440
 								'a' => array(
441 441
 									'href'   => array(),
442 442
 									'target' => array()
443 443
 								)
444
-							) ), esc_url( admin_url( 'index.php?page=give-about' ) ) ),
444
+							)), esc_url(admin_url('index.php?page=give-about'))),
445 445
 							'id'   => 'disable_welcome',
446 446
 							'type' => 'checkbox'
447 447
 						),
448 448
 						array(
449
-							'name' => esc_html__( 'Post Types', 'give' ),
449
+							'name' => esc_html__('Post Types', 'give'),
450 450
 							'desc' => '',
451 451
 							'id'   => 'give_title_display_settings_2',
452 452
 							'type' => 'give_title'
453 453
 						),
454 454
 						array(
455
-							'name' => esc_html__( 'Disable Form Single Views', 'give' ),
456
-							'desc' => esc_html__( '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' ),
455
+							'name' => esc_html__('Disable Form Single Views', 'give'),
456
+							'desc' => esc_html__('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'),
457 457
 							'id'   => 'disable_forms_singular',
458 458
 							'type' => 'checkbox'
459 459
 						),
460 460
 						array(
461
-							'name' => esc_html__( 'Disable Form Archives', 'give' ),
462
-							'desc' => esc_html__( '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' ),
461
+							'name' => esc_html__('Disable Form Archives', 'give'),
462
+							'desc' => esc_html__('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'),
463 463
 							'id'   => 'disable_forms_archives',
464 464
 							'type' => 'checkbox'
465 465
 						),
466 466
 						array(
467
-							'name' => esc_html__( 'Disable Form Excerpts', 'give' ),
468
-							'desc' => esc_html__( 'The excerpt is an optional summary or description of a donation form; in short, a summary as to why the user should give.', 'give' ),
467
+							'name' => esc_html__('Disable Form Excerpts', 'give'),
468
+							'desc' => esc_html__('The excerpt is an optional summary or description of a donation form; in short, a summary as to why the user should give.', 'give'),
469 469
 							'id'   => 'disable_forms_excerpt',
470 470
 							'type' => 'checkbox'
471 471
 						),
472 472
 
473 473
 						array(
474
-							'name'    => esc_html__( 'Featured Image Size', 'give' ),
475
-							'desc'    => esc_html__( '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' ),
474
+							'name'    => esc_html__('Featured Image Size', 'give'),
475
+							'desc'    => esc_html__('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 476
 							'id'      => 'featured_image_size',
477 477
 							'type'    => 'select',
478 478
 							'default' => 'large',
479 479
 							'options' => give_get_featured_image_sizes()
480 480
 						),
481 481
 						array(
482
-							'name' => esc_html__( 'Disable Form Featured Image', 'give' ),
483
-							'desc' => esc_html__( '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' ),
482
+							'name' => esc_html__('Disable Form Featured Image', 'give'),
483
+							'desc' => esc_html__('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 484
 							'id'   => 'disable_form_featured_img',
485 485
 							'type' => 'checkbox'
486 486
 						),
487 487
 						array(
488
-							'name' => esc_html__( 'Disable Single Form Sidebar', 'give' ),
489
-							'desc' => esc_html__( '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' ),
488
+							'name' => esc_html__('Disable Single Form Sidebar', 'give'),
489
+							'desc' => esc_html__('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 490
 							'id'   => 'disable_form_sidebar',
491 491
 							'type' => 'checkbox'
492 492
 						),
493 493
 						array(
494
-							'name' => esc_html__( 'Taxonomies', 'give' ),
494
+							'name' => esc_html__('Taxonomies', 'give'),
495 495
 							'desc' => '',
496 496
 							'id'   => 'give_title_display_settings_3',
497 497
 							'type' => 'give_title'
498 498
 						),
499 499
 						array(
500
-							'name' => esc_html__( 'Enable Form Categories', 'give' ),
501
-							'desc' => esc_html__( 'Enables the "Category" taxonomy for all Give forms.', 'give' ),
500
+							'name' => esc_html__('Enable Form Categories', 'give'),
501
+							'desc' => esc_html__('Enables the "Category" taxonomy for all Give forms.', 'give'),
502 502
 							'id'   => 'categories',
503 503
 							'type' => 'checkbox'
504 504
 						),
505 505
 						array(
506
-							'name' => esc_html__( 'Enable Form Tags', 'give' ),
507
-							'desc' => esc_html__( 'Enables the "Tag" taxonomy for all Give forms.', 'give' ),
506
+							'name' => esc_html__('Enable Form Tags', 'give'),
507
+							'desc' => esc_html__('Enables the "Tag" taxonomy for all Give forms.', 'give'),
508 508
 							'id'   => 'tags',
509 509
 							'type' => 'checkbox'
510 510
 						),
@@ -538,101 +538,101 @@  discard block
 block discarded – undo
538 538
 			 */
539 539
 			'emails'      => array(
540 540
 				'id'         => 'email_settings',
541
-				'give_title' => esc_html__( 'Email Settings', 'give' ),
542
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
543
-				'fields'     => apply_filters( 'give_settings_emails', array(
541
+				'give_title' => esc_html__('Email Settings', 'give'),
542
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
543
+				'fields'     => apply_filters('give_settings_emails', array(
544 544
 						array(
545
-							'name' => esc_html__( 'Email Settings', 'give' ),
545
+							'name' => esc_html__('Email Settings', 'give'),
546 546
 							'desc' => '',
547 547
 							'id'   => 'give_title_email_settings_1',
548 548
 							'type' => 'give_title'
549 549
 						),
550 550
 						array(
551 551
 							'id'      => 'email_template',
552
-							'name'    => esc_html__( 'Email Template', 'give' ),
553
-							'desc'    => esc_html__( 'Choose a template. Click "Save Changes" then "Preview Donation Receipt" to see the new template.', 'give' ),
552
+							'name'    => esc_html__('Email Template', 'give'),
553
+							'desc'    => esc_html__('Choose a template. Click "Save Changes" then "Preview Donation Receipt" to see the new template.', 'give'),
554 554
 							'type'    => 'select',
555 555
 							'options' => give_get_email_templates()
556 556
 						),
557 557
 						array(
558 558
 							'id'   => 'email_logo',
559
-							'name' => esc_html__( 'Logo', 'give' ),
560
-							'desc' => esc_html__( 'Upload or choose a logo to be displayed at the top of the donation receipt emails. Displayed on HTML emails only.', 'give' ),
559
+							'name' => esc_html__('Logo', 'give'),
560
+							'desc' => esc_html__('Upload or choose a logo to be displayed at the top of the donation receipt emails. Displayed on HTML emails only.', 'give'),
561 561
 							'type' => 'file'
562 562
 						),
563 563
 						array(
564 564
 							'id'      => 'from_name',
565
-							'name'    => esc_html__( 'From Name', 'give' ),
566
-							'desc'    => esc_html__( 'The name that appears in the "From" field in donation receipt emails.', 'give' ),
567
-							'default' => get_bloginfo( 'name' ),
565
+							'name'    => esc_html__('From Name', 'give'),
566
+							'desc'    => esc_html__('The name that appears in the "From" field in donation receipt emails.', 'give'),
567
+							'default' => get_bloginfo('name'),
568 568
 							'type'    => 'text'
569 569
 						),
570 570
 						array(
571 571
 							'id'      => 'from_email',
572
-							'name'    => esc_html__( 'From Email', 'give' ),
573
-							'desc'    => esc_html__( 'Email to send donation receipts from. This will act as the "from" and "reply-to" address.', 'give' ),
574
-							'default' => get_bloginfo( 'admin_email' ),
572
+							'name'    => esc_html__('From Email', 'give'),
573
+							'desc'    => esc_html__('Email to send donation receipts from. This will act as the "from" and "reply-to" address.', 'give'),
574
+							'default' => get_bloginfo('admin_email'),
575 575
 							'type'    => 'text'
576 576
 						),
577 577
 						array(
578
-							'name' => esc_html__( 'Donation Receipt', 'give' ),
578
+							'name' => esc_html__('Donation Receipt', 'give'),
579 579
 							'desc' => '',
580 580
 							'id'   => 'give_title_email_settings_2',
581 581
 							'type' => 'give_title'
582 582
 						),
583 583
 						array(
584 584
 							'id'      => 'donation_subject',
585
-							'name'    => esc_html__( 'Donation Email Subject', 'give' ),
586
-							'desc'    => esc_html__( 'Enter the subject line for the donation receipt email.', 'give' ),
587
-							'default' => esc_attr__( 'Donation Receipt', 'give' ),
585
+							'name'    => esc_html__('Donation Email Subject', 'give'),
586
+							'desc'    => esc_html__('Enter the subject line for the donation receipt email.', 'give'),
587
+							'default' => esc_attr__('Donation Receipt', 'give'),
588 588
 							'type'    => 'text'
589 589
 						),
590 590
 						array(
591 591
 							'id'      => 'donation_receipt',
592
-							'name'    => esc_html__( 'Donation Receipt', 'give' ),
592
+							'name'    => esc_html__('Donation Receipt', 'give'),
593 593
 							'desc'    => sprintf(
594 594
 							/* translators: %s: emails tags list */
595
-								esc_html__( 'Enter the email that is sent to users after completing a successful donation. HTML is accepted. Available template tags: %s', 'give' ),
596
-								'<br/>' . give_get_emails_tags_list()
595
+								esc_html__('Enter the email that is sent to users after completing a successful donation. HTML is accepted. Available template tags: %s', 'give'),
596
+								'<br/>'.give_get_emails_tags_list()
597 597
 							),
598 598
 							'type'    => 'wysiwyg',
599 599
 							'default' => give_get_default_donation_receipt_email()
600 600
 						),
601 601
 						array(
602
-							'name' => esc_html__( 'New Donation Notification', 'give' ),
602
+							'name' => esc_html__('New Donation Notification', 'give'),
603 603
 							'desc' => '',
604 604
 							'id'   => 'give_title_email_settings_3',
605 605
 							'type' => 'give_title'
606 606
 						),
607 607
 						array(
608 608
 							'id'      => 'donation_notification_subject',
609
-							'name'    => esc_html__( 'Donation Notification Subject', 'give' ),
610
-							'desc'    => esc_html__( 'Enter the subject line for the donation notification email.', 'give' ),
609
+							'name'    => esc_html__('Donation Notification Subject', 'give'),
610
+							'desc'    => esc_html__('Enter the subject line for the donation notification email.', 'give'),
611 611
 							'type'    => 'text',
612
-							'default' => esc_attr__( 'New Donation - #{payment_id}', 'give' )
612
+							'default' => esc_attr__('New Donation - #{payment_id}', 'give')
613 613
 						),
614 614
 						array(
615 615
 							'id'      => 'donation_notification',
616
-							'name'    => esc_html__( 'Donation Notification', 'give' ),
616
+							'name'    => esc_html__('Donation Notification', 'give'),
617 617
 							'desc'    => sprintf(
618 618
 							/* translators: %s: emails tags list */
619
-								esc_html__( 'Enter the email that is sent to donation notification emails after completion of a donation. HTML is accepted. Available template tags: %s', 'give' ),
620
-								'<br/>' . give_get_emails_tags_list()
619
+								esc_html__('Enter the email that is sent to donation notification emails after completion of a donation. HTML is accepted. Available template tags: %s', 'give'),
620
+								'<br/>'.give_get_emails_tags_list()
621 621
 							),
622 622
 							'type'    => 'wysiwyg',
623 623
 							'default' => give_get_default_donation_notification_email()
624 624
 						),
625 625
 						array(
626 626
 							'id'      => 'admin_notice_emails',
627
-							'name'    => esc_html__( 'Donation Notification Emails', 'give' ),
628
-							'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' ),
627
+							'name'    => esc_html__('Donation Notification Emails', 'give'),
628
+							'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'),
629 629
 							'type'    => 'textarea',
630
-							'default' => get_bloginfo( 'admin_email' )
630
+							'default' => get_bloginfo('admin_email')
631 631
 						),
632 632
 						array(
633 633
 							'id'   => 'disable_admin_notices',
634
-							'name' => esc_html__( 'Disable Admin Notifications', 'give' ),
635
-							'desc' => esc_html__( 'Check this box if you do not want to receive emails when new donations are made.', 'give' ),
634
+							'name' => esc_html__('Disable Admin Notifications', 'give'),
635
+							'desc' => esc_html__('Check this box if you do not want to receive emails when new donations are made.', 'give'),
636 636
 							'type' => 'checkbox'
637 637
 						)
638 638
 					)
@@ -641,99 +641,99 @@  discard block
 block discarded – undo
641 641
 			/** Extension Settings */
642 642
 			'addons'      => array(
643 643
 				'id'         => 'addons',
644
-				'give_title' => esc_html__( 'Give Add-ons Settings', 'give' ),
645
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
646
-				'fields'     => apply_filters( 'give_settings_addons', array()
644
+				'give_title' => esc_html__('Give Add-ons Settings', 'give'),
645
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
646
+				'fields'     => apply_filters('give_settings_addons', array()
647 647
 				)
648 648
 			),
649 649
 			/** Licenses Settings */
650 650
 			'licenses'    => array(
651 651
 				'id'         => 'licenses',
652
-				'give_title' => esc_html__( 'Give Licenses', 'give' ),
653
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
654
-				'fields'     => apply_filters( 'give_settings_licenses', array()
652
+				'give_title' => esc_html__('Give Licenses', 'give'),
653
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
654
+				'fields'     => apply_filters('give_settings_licenses', array()
655 655
 				)
656 656
 			),
657 657
 			/** Advanced Options */
658 658
 			'advanced'    => array(
659 659
 				'id'         => 'advanced_options',
660
-				'give_title' => esc_html__( 'Advanced Options', 'give' ),
661
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
662
-				'fields'     => apply_filters( 'give_settings_advanced', array(
660
+				'give_title' => esc_html__('Advanced Options', 'give'),
661
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
662
+				'fields'     => apply_filters('give_settings_advanced', array(
663 663
 						array(
664
-							'name' => esc_html__( 'Access Control', 'give' ),
664
+							'name' => esc_html__('Access Control', 'give'),
665 665
 							'desc' => '',
666 666
 							'id'   => 'give_title_session_control_1',
667 667
 							'type' => 'give_title'
668 668
 						),
669 669
 						array(
670 670
 							'id'      => 'session_lifetime',
671
-							'name'    => esc_html__( 'Session Lifetime', 'give' ),
672
-							'desc'    => esc_html__( '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' ),
671
+							'name'    => esc_html__('Session Lifetime', 'give'),
672
+							'desc'    => esc_html__('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'),
673 673
 							'type'    => 'select',
674 674
 							'options' => array(
675
-								'86400'  => esc_html__( '24 Hours', 'give' ),
676
-								'172800' => esc_html__( '48 Hours', 'give' ),
677
-								'259200' => esc_html__( '72 Hours', 'give' ),
678
-								'604800' => esc_html__( '1 Week', 'give' ),
675
+								'86400'  => esc_html__('24 Hours', 'give'),
676
+								'172800' => esc_html__('48 Hours', 'give'),
677
+								'259200' => esc_html__('72 Hours', 'give'),
678
+								'604800' => esc_html__('1 Week', 'give'),
679 679
 							)
680 680
 						),
681 681
 						array(
682
-							'name' => esc_html__( 'Email Access', 'give' ),
683
-							'desc' => esc_html__( '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' ),
682
+							'name' => esc_html__('Email Access', 'give'),
683
+							'desc' => esc_html__('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'),
684 684
 							'id'   => 'email_access',
685 685
 							'type' => 'checkbox',
686 686
 						),
687 687
 						array(
688 688
 							'id'      => 'recaptcha_key',
689
-							'name'    => esc_html__( 'reCAPTCHA Site Key', 'give' ),
689
+							'name'    => esc_html__('reCAPTCHA Site Key', 'give'),
690 690
 							/* translators: %s: https://www.google.com/recaptcha/ */
691
-							'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/' ) ),
691
+							'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/')),
692 692
 							'default' => '',
693 693
 							'type'    => 'text'
694 694
 						),
695 695
 						array(
696 696
 							'id'      => 'recaptcha_secret',
697
-							'name'    => esc_html__( 'reCAPTCHA Secret Key', 'give' ),
698
-							'desc'    => esc_html__( 'Please paste the reCAPTCHA secret key here from your manage reCAPTCHA API Keys panel.', 'give' ),
697
+							'name'    => esc_html__('reCAPTCHA Secret Key', 'give'),
698
+							'desc'    => esc_html__('Please paste the reCAPTCHA secret key here from your manage reCAPTCHA API Keys panel.', 'give'),
699 699
 							'default' => '',
700 700
 							'type'    => 'text'
701 701
 						),
702 702
 						array(
703
-							'name' => esc_html__( 'Data Control', 'give' ),
703
+							'name' => esc_html__('Data Control', 'give'),
704 704
 							'desc' => '',
705 705
 							'id'   => 'give_title_data_control_2',
706 706
 							'type' => 'give_title'
707 707
 						),
708 708
 						array(
709
-							'name' => esc_html__( 'Remove All Data on Uninstall?', 'give' ),
710
-							'desc' => esc_html__( 'When the plugin is deleted, completely remove all Give data.', 'give' ),
709
+							'name' => esc_html__('Remove All Data on Uninstall?', 'give'),
710
+							'desc' => esc_html__('When the plugin is deleted, completely remove all Give data.', 'give'),
711 711
 							'id'   => 'uninstall_on_delete',
712 712
 							'type' => 'checkbox'
713 713
 						),
714 714
 						array(
715
-							'name' => esc_html__( 'Filter Control', 'give' ),
715
+							'name' => esc_html__('Filter Control', 'give'),
716 716
 							'desc' => '',
717 717
 							'id'   => 'give_title_filter_control',
718 718
 							'type' => 'give_title'
719 719
 						),
720 720
 						array(
721 721
 							/* translators: %s: the_content */
722
-							'name' => sprintf( __( 'Disable %s filter', 'give' ), '<code>the_content</code>' ),
722
+							'name' => sprintf(__('Disable %s filter', 'give'), '<code>the_content</code>'),
723 723
 							/* translators: 1: https://codex.wordpress.org/Plugin_API/Filter_Reference/the_content 2: the_content */
724
-							'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>' ),
724
+							'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>'),
725 725
 							'id'   => 'disable_the_content_filter',
726 726
 							'type' => 'checkbox'
727 727
 						),
728 728
 						array(
729
-							'name' => esc_html__( 'Script Loading', 'give' ),
729
+							'name' => esc_html__('Script Loading', 'give'),
730 730
 							'desc' => '',
731 731
 							'id'   => 'give_title_script_control',
732 732
 							'type' => 'give_title'
733 733
 						),
734 734
 						array(
735
-							'name' => esc_html__( 'Load Scripts in Footer?', 'give' ),
736
-							'desc' => esc_html__( 'Check this box if you would like Give to load all frontend JavaScript files in the footer.', 'give' ),
735
+							'name' => esc_html__('Load Scripts in Footer?', 'give'),
736
+							'desc' => esc_html__('Check this box if you would like Give to load all frontend JavaScript files in the footer.', 'give'),
737 737
 							'id'   => 'scripts_footer',
738 738
 							'type' => 'checkbox'
739 739
 						)
@@ -743,13 +743,13 @@  discard block
 block discarded – undo
743 743
 			/** API Settings */
744 744
 			'api'         => array(
745 745
 				'id'         => 'api',
746
-				'give_title' => esc_html__( 'API', 'give' ),
747
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
746
+				'give_title' => esc_html__('API', 'give'),
747
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
748 748
 				'show_names' => false, // Hide field names on the left
749
-				'fields'     => apply_filters( 'give_settings_system', array(
749
+				'fields'     => apply_filters('give_settings_system', array(
750 750
 						array(
751 751
 							'id'   => 'api',
752
-							'name' => esc_html__( 'API', 'give' ),
752
+							'name' => esc_html__('API', 'give'),
753 753
 							'type' => 'api'
754 754
 						)
755 755
 					)
@@ -758,13 +758,13 @@  discard block
 block discarded – undo
758 758
 			/** Licenses Settings */
759 759
 			'system_info' => array(
760 760
 				'id'         => 'system_info',
761
-				'give_title' => esc_html__( 'System Info', 'give' ),
762
-				'show_on'    => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),
763
-				'fields'     => apply_filters( 'give_settings_system', array(
761
+				'give_title' => esc_html__('System Info', 'give'),
762
+				'show_on'    => array('key' => 'options-page', 'value' => array($this->key,),),
763
+				'fields'     => apply_filters('give_settings_system', array(
764 764
 						array(
765 765
 							'id'   => 'system-info-textarea',
766
-							'name' => esc_html__( 'System Info', 'give' ),
767
-							'desc' => esc_html__( 'Please copy and paste this information in your ticket when contacting support.', 'give' ),
766
+							'name' => esc_html__('System Info', 'give'),
767
+							'desc' => esc_html__('Please copy and paste this information in your ticket when contacting support.', 'give'),
768 768
 							'type' => 'system_info'
769 769
 						)
770 770
 					)
@@ -772,16 +772,16 @@  discard block
 block discarded – undo
772 772
 			),
773 773
 		);
774 774
 
775
-		$give_settings = apply_filters( 'give_registered_settings', $give_settings );
775
+		$give_settings = apply_filters('give_registered_settings', $give_settings);
776 776
 
777 777
 		//Return all settings array if no active tab
778
-		if (  empty( $active_tab ) || ! isset( $give_settings[ $active_tab ] ) ) {
778
+		if (empty($active_tab) || ! isset($give_settings[$active_tab])) {
779 779
 			return $give_settings;
780 780
 		}
781 781
 
782 782
 
783 783
 		// Add other tabs and settings fields as needed
784
-		return $give_settings[ $active_tab ];
784
+		return $give_settings[$active_tab];
785 785
 
786 786
 	}
787 787
 
@@ -790,11 +790,11 @@  discard block
 block discarded – undo
790 790
 	 */
791 791
 	public function settings_notices() {
792 792
 
793
-		if ( ! isset( $_POST['give_settings_saved'] ) ) {
793
+		if ( ! isset($_POST['give_settings_saved'])) {
794 794
 			return;
795 795
 		}
796 796
 
797
-		add_settings_error( 'give-notices', 'global-settings-updated', esc_html__( 'Settings updated.', 'give' ), 'updated' );
797
+		add_settings_error('give-notices', 'global-settings-updated', esc_html__('Settings updated.', 'give'), 'updated');
798 798
 
799 799
 	}
800 800
 
@@ -809,17 +809,17 @@  discard block
 block discarded – undo
809 809
 	 * @return mixed         Field value or exception is thrown.
810 810
 	 * @throws Exception     Throws an exception if the field is invalid.
811 811
 	 */
812
-	public function __get( $field ) {
812
+	public function __get($field) {
813 813
 
814 814
 		// Allowed fields to retrieve
815
-		if ( in_array( $field, array( 'key', 'fields', 'give_title', 'options_page' ), true ) ) {
815
+		if (in_array($field, array('key', 'fields', 'give_title', 'options_page'), true)) {
816 816
 			return $this->{$field};
817 817
 		}
818
-		if ( 'option_metabox' === $field ) {
818
+		if ('option_metabox' === $field) {
819 819
 			return $this->option_metabox();
820 820
 		}
821 821
 
822
-		throw new Exception( sprintf( esc_html__( 'Invalid property: %s', 'give' ), $field ) );
822
+		throw new Exception(sprintf(esc_html__('Invalid property: %s', 'give'), $field));
823 823
 	}
824 824
 
825 825
 
@@ -837,12 +837,12 @@  discard block
 block discarded – undo
837 837
  *
838 838
  * @return mixed        Option value
839 839
  */
840
-function give_get_option( $key = '', $default = false ) {
840
+function give_get_option($key = '', $default = false) {
841 841
 	$give_options = give_get_settings();
842
-	$value        = ! empty( $give_options[ $key ] ) ? $give_options[ $key ] : $default;
843
-	$value        = apply_filters( 'give_get_option', $value, $key, $default );
842
+	$value        = ! empty($give_options[$key]) ? $give_options[$key] : $default;
843
+	$value        = apply_filters('give_get_option', $value, $key, $default);
844 844
 
845
-	return apply_filters( "give_get_option_{$key}", $value, $key, $default );
845
+	return apply_filters("give_get_option_{$key}", $value, $key, $default);
846 846
 }
847 847
 
848 848
 
@@ -860,33 +860,33 @@  discard block
 block discarded – undo
860 860
  *
861 861
  * @return boolean True if updated, false if not.
862 862
  */
863
-function give_update_option( $key = '', $value = false ) {
863
+function give_update_option($key = '', $value = false) {
864 864
 
865 865
 	// If no key, exit
866
-	if ( empty( $key ) ) {
866
+	if (empty($key)) {
867 867
 		return false;
868 868
 	}
869 869
 
870
-	if ( empty( $value ) ) {
871
-		$remove_option = give_delete_option( $key );
870
+	if (empty($value)) {
871
+		$remove_option = give_delete_option($key);
872 872
 
873 873
 		return $remove_option;
874 874
 	}
875 875
 
876 876
 	// First let's grab the current settings
877
-	$options = get_option( 'give_settings' );
877
+	$options = get_option('give_settings');
878 878
 
879 879
 	// Let's let devs alter that value coming in
880
-	$value = apply_filters( 'give_update_option', $value, $key );
880
+	$value = apply_filters('give_update_option', $value, $key);
881 881
 
882 882
 	// Next let's try to update the value
883
-	$options[ $key ] = $value;
884
-	$did_update      = update_option( 'give_settings', $options );
883
+	$options[$key] = $value;
884
+	$did_update      = update_option('give_settings', $options);
885 885
 
886 886
 	// If it updated, let's update the global variable
887
-	if ( $did_update ) {
887
+	if ($did_update) {
888 888
 		global $give_options;
889
-		$give_options[ $key ] = $value;
889
+		$give_options[$key] = $value;
890 890
 	}
891 891
 
892 892
 	return $did_update;
@@ -905,27 +905,27 @@  discard block
 block discarded – undo
905 905
  *
906 906
  * @return boolean True if updated, false if not.
907 907
  */
908
-function give_delete_option( $key = '' ) {
908
+function give_delete_option($key = '') {
909 909
 
910 910
 	// If no key, exit
911
-	if ( empty( $key ) ) {
911
+	if (empty($key)) {
912 912
 		return false;
913 913
 	}
914 914
 
915 915
 	// First let's grab the current settings
916
-	$options = get_option( 'give_settings' );
916
+	$options = get_option('give_settings');
917 917
 
918 918
 	// Next let's try to update the value
919
-	if ( isset( $options[ $key ] ) ) {
919
+	if (isset($options[$key])) {
920 920
 
921
-		unset( $options[ $key ] );
921
+		unset($options[$key]);
922 922
 
923 923
 	}
924 924
 
925
-	$did_update = update_option( 'give_settings', $options );
925
+	$did_update = update_option('give_settings', $options);
926 926
 
927 927
 	// If it updated, let's update the global variable
928
-	if ( $did_update ) {
928
+	if ($did_update) {
929 929
 		global $give_options;
930 930
 		$give_options = $options;
931 931
 	}
@@ -944,9 +944,9 @@  discard block
 block discarded – undo
944 944
  */
945 945
 function give_get_settings() {
946 946
 
947
-	$settings = get_option( 'give_settings' );
947
+	$settings = get_option('give_settings');
948 948
 
949
-	return (array) apply_filters( 'give_get_settings', $settings );
949
+	return (array) apply_filters('give_get_settings', $settings);
950 950
 
951 951
 }
952 952
 
@@ -964,25 +964,25 @@  discard block
 block discarded – undo
964 964
  *
965 965
  * @return array
966 966
  */
967
-function give_settings_array_insert( $array, $position, $insert ) {
968
-	if ( is_int( $position ) ) {
969
-		array_splice( $array, $position, 0, $insert );
967
+function give_settings_array_insert($array, $position, $insert) {
968
+	if (is_int($position)) {
969
+		array_splice($array, $position, 0, $insert);
970 970
 	} else {
971 971
 
972
-		foreach ( $array as $index => $subarray ) {
973
-			if ( isset( $subarray['id'] ) && $subarray['id'] == $position ) {
972
+		foreach ($array as $index => $subarray) {
973
+			if (isset($subarray['id']) && $subarray['id'] == $position) {
974 974
 				$pos = $index;
975 975
 			}
976 976
 		}
977 977
 
978
-		if ( ! isset( $pos ) ) {
978
+		if ( ! isset($pos)) {
979 979
 			return $array;
980 980
 		}
981 981
 
982 982
 		$array = array_merge(
983
-			array_slice( $array, 0, $pos ),
983
+			array_slice($array, 0, $pos),
984 984
 			$insert,
985
-			array_slice( $array, $pos )
985
+			array_slice($array, $pos)
986 986
 		);
987 987
 	}
988 988
 
@@ -1000,23 +1000,23 @@  discard block
 block discarded – undo
1000 1000
  * @param array $saved_values
1001 1001
  * @return void
1002 1002
  */
1003
-function give_enabled_gateways_callback( $field_arr, $saved_values = array() ) {
1003
+function give_enabled_gateways_callback($field_arr, $saved_values = array()) {
1004 1004
 
1005 1005
 	$id       = $field_arr['id'];
1006
-	$gateways = give_get_ordered_payment_gateways( give_get_payment_gateways() );
1006
+	$gateways = give_get_ordered_payment_gateways(give_get_payment_gateways());
1007 1007
 
1008 1008
 	echo '<ul class="give-checklist-fields give-payment-gatways-list">';
1009 1009
 
1010
-	foreach ( $gateways as $key => $option ) :
1010
+	foreach ($gateways as $key => $option) :
1011 1011
 
1012
-		if ( is_array( $saved_values ) && array_key_exists( $key, $saved_values ) ) {
1012
+		if (is_array($saved_values) && array_key_exists($key, $saved_values)) {
1013 1013
 			$enabled = '1';
1014 1014
 		} else {
1015 1015
 			$enabled = null;
1016 1016
 		}
1017 1017
 
1018
-		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;';
1019
-		echo '<label for="' . $id . '[' . $key . ']">' . $option['admin_label'] . '</label></li>';
1018
+		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;';
1019
+		echo '<label for="'.$id.'['.$key.']">'.$option['admin_label'].'</label></li>';
1020 1020
 
1021 1021
 	endforeach;
1022 1022
 
@@ -1033,16 +1033,16 @@  discard block
 block discarded – undo
1033 1033
  * @param  array $saved_value
1034 1034
  * @return void
1035 1035
  */
1036
-function give_default_gateway_callback( $field_arr, $saved_value ) {
1036
+function give_default_gateway_callback($field_arr, $saved_value) {
1037 1037
 	$id                = $field_arr['id'];
1038 1038
 	$gateways          = give_get_enabled_payment_gateways();
1039
-	$saved_value       = give_get_default_gateway( null );
1039
+	$saved_value       = give_get_default_gateway(null);
1040 1040
 
1041
-	echo '<select class="give-select" name="' . $id . '" id="' . $id . '">';
1041
+	echo '<select class="give-select" name="'.$id.'" id="'.$id.'">';
1042 1042
 
1043
-		foreach ( $gateways as $key => $option ) :
1044
-			$selected = isset( $saved_value ) ? selected( $key, $saved_value, false ) : '';
1045
-			echo '<option value="' . esc_attr( $key ) . '"' . $selected . '>' . esc_html( $option['admin_label'] ) . '</option>';
1043
+		foreach ($gateways as $key => $option) :
1044
+			$selected = isset($saved_value) ? selected($key, $saved_value, false) : '';
1045
+			echo '<option value="'.esc_attr($key).'"'.$selected.'>'.esc_html($option['admin_label']).'</option>';
1046 1046
 		endforeach;
1047 1047
 
1048 1048
 	echo '</select>';
@@ -1060,13 +1060,13 @@  discard block
 block discarded – undo
1060 1060
  *
1061 1061
  * @return void
1062 1062
  */
1063
-function give_title_callback( $field_object, $escaped_value, $object_id, $object_type, $field_type_object ) {
1063
+function give_title_callback($field_object, $escaped_value, $object_id, $object_type, $field_type_object) {
1064 1064
 
1065 1065
 	$id                = $field_type_object->field->args['id'];
1066 1066
 	$title             = $field_type_object->field->args['name'];
1067 1067
 	$field_description = $field_type_object->field->args['desc'];
1068 1068
 
1069
-	echo '<hr>' . $field_description;
1069
+	echo '<hr>'.$field_description;
1070 1070
 
1071 1071
 }
1072 1072
 
@@ -1081,7 +1081,7 @@  discard block
 block discarded – undo
1081 1081
  *
1082 1082
  * @return void
1083 1083
  */
1084
-function give_description_callback( $field_object, $escaped_value, $object_id, $object_type, $field_type_object ) {
1084
+function give_description_callback($field_object, $escaped_value, $object_id, $object_type, $field_type_object) {
1085 1085
 
1086 1086
 	$id                = $field_type_object->field->args['id'];
1087 1087
 	$title             = $field_type_object->field->args['name'];
@@ -1101,25 +1101,25 @@  discard block
 block discarded – undo
1101 1101
  * @see: https://github.com/WebDevStudios/CMB2/wiki/Adding-your-own-field-types
1102 1102
  * @return array An array of options that matches the CMB2 options array
1103 1103
  */
1104
-function give_cmb2_get_post_options( $query_args, $force = false ) {
1104
+function give_cmb2_get_post_options($query_args, $force = false) {
1105 1105
 
1106
-	$post_options = array( '' => '' ); // Blank option
1106
+	$post_options = array('' => ''); // Blank option
1107 1107
 
1108
-	if ( ( ! isset( $_GET['page'] ) || 'give-settings' != $_GET['page'] ) && ! $force ) {
1108
+	if (( ! isset($_GET['page']) || 'give-settings' != $_GET['page']) && ! $force) {
1109 1109
 		return $post_options;
1110 1110
 	}
1111 1111
 
1112
-	$args = wp_parse_args( $query_args, array(
1112
+	$args = wp_parse_args($query_args, array(
1113 1113
 		'post_type'   => 'page',
1114 1114
 		'numberposts' => 10,
1115
-	) );
1115
+	));
1116 1116
 
1117
-	$posts = get_posts( $args );
1117
+	$posts = get_posts($args);
1118 1118
 
1119
-	if ( $posts ) {
1120
-		foreach ( $posts as $post ) {
1119
+	if ($posts) {
1120
+		foreach ($posts as $post) {
1121 1121
 
1122
-			$post_options[ $post->ID ] = $post->post_title;
1122
+			$post_options[$post->ID] = $post->post_title;
1123 1123
 
1124 1124
 		}
1125 1125
 	}
@@ -1143,21 +1143,21 @@  discard block
 block discarded – undo
1143 1143
 	$get_sizes = get_intermediate_image_sizes();
1144 1144
 
1145 1145
 	// check whether intermediate image sizes exist first
1146
-	if ( empty( $get_sizes ) ) {
1147
-		$get_sizes = array( 'thumbnail', 'medium', 'medium_large', 'large' );
1146
+	if (empty($get_sizes)) {
1147
+		$get_sizes = array('thumbnail', 'medium', 'medium_large', 'large');
1148 1148
 	}
1149 1149
 
1150
-	foreach ( $get_sizes as $_size ) {
1150
+	foreach ($get_sizes as $_size) {
1151 1151
 
1152
-		if ( in_array( $_size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) {
1153
-			$sizes[ $_size ] = $_size . ' - ' . get_option( "{$_size}_size_w" ) . 'x' . get_option( "{$_size}_size_h" );
1154
-		} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {
1155
-			$sizes[ $_size ] = $_size . ' - ' . $_wp_additional_image_sizes[ $_size ]['width'] . 'x' . $_wp_additional_image_sizes[ $_size ]['height'];
1152
+		if (in_array($_size, array('thumbnail', 'medium', 'medium_large', 'large'))) {
1153
+			$sizes[$_size] = $_size.' - '.get_option("{$_size}_size_w").'x'.get_option("{$_size}_size_h");
1154
+		} elseif (isset($_wp_additional_image_sizes[$_size])) {
1155
+			$sizes[$_size] = $_size.' - '.$_wp_additional_image_sizes[$_size]['width'].'x'.$_wp_additional_image_sizes[$_size]['height'];
1156 1156
 		}
1157 1157
 
1158 1158
 	}
1159 1159
 
1160
-	return apply_filters( 'give_get_featured_image_sizes', $sizes );
1160
+	return apply_filters('give_get_featured_image_sizes', $sizes);
1161 1161
 }
1162 1162
 
1163 1163
 
@@ -1172,18 +1172,18 @@  discard block
 block discarded – undo
1172 1172
  *
1173 1173
  * @return void
1174 1174
  */
1175
-function give_license_key_callback( $field_object, $escaped_value, $object_id, $object_type, $field_type_object ) {
1175
+function give_license_key_callback($field_object, $escaped_value, $object_id, $object_type, $field_type_object) {
1176 1176
 	/* @var CMB2_Types $field_type_object */
1177 1177
 
1178 1178
     $id                   = $field_type_object->field->args['id'];
1179 1179
 	$field_description    = $field_type_object->field->args['desc'];
1180 1180
 	$license              = $field_type_object->field->args['options']['license'];
1181 1181
     $license_key          = $escaped_value;
1182
-    $is_license_key       = apply_filters( 'give_is_license_key', ( is_object( $license ) && ! empty( $license ) ) );
1183
-    $is_valid_license     = apply_filters( 'give_is_valid_license', ( $is_license_key && property_exists( $license, 'license' ) && 'valid' === $license->license ) );
1182
+    $is_license_key       = apply_filters('give_is_license_key', (is_object($license) && ! empty($license)));
1183
+    $is_valid_license     = apply_filters('give_is_valid_license', ($is_license_key && property_exists($license, 'license') && 'valid' === $license->license));
1184 1184
     $shortname            = $field_type_object->field->args['options']['shortname'];
1185 1185
 	$field_classes        = 'regular-text give-license-field';
1186
-	$type                 = empty( $escaped_value ) || ! $is_valid_license ? 'text' : 'password';
1186
+	$type                 = empty($escaped_value) || ! $is_valid_license ? 'text' : 'password';
1187 1187
     $custom_html          = '';
1188 1188
     $messages             = array();
1189 1189
     $class                = '';
@@ -1195,17 +1195,17 @@  discard block
 block discarded – undo
1195 1195
 
1196 1196
 	// By default query on edd api url will return license object which contain status and message property, this can break below functionality.
1197 1197
 	// To combat that check if status is set to error or not, if yes then set $is_license_key to false.
1198
-	if ( $is_license_key && property_exists( $license, 'status' ) && 'error' === $license->status ) {
1198
+	if ($is_license_key && property_exists($license, 'status') && 'error' === $license->status) {
1199 1199
 		$is_license_key = false;
1200 1200
 	}
1201 1201
 
1202 1202
 
1203 1203
 	// Check if current license is part of subscription or not.
1204
-	$subscriptions = get_option( 'give_subscriptions' );
1204
+	$subscriptions = get_option('give_subscriptions');
1205 1205
 
1206
-	if ( $is_license_key && $subscriptions ) {
1207
-		foreach ( $subscriptions as $subscription ) {
1208
-			if ( in_array( $license_key, $subscription['licenses'] ) ) {
1206
+	if ($is_license_key && $subscriptions) {
1207
+		foreach ($subscriptions as $subscription) {
1208
+			if (in_array($license_key, $subscription['licenses'])) {
1209 1209
 				$is_in_subscription = $subscription['id'];
1210 1210
 				break;
1211 1211
 			}
@@ -1213,121 +1213,121 @@  discard block
 block discarded – undo
1213 1213
 	}
1214 1214
 
1215 1215
 
1216
-	if ( $is_license_key ) {
1217
-		if ( $is_in_subscription ) {
1218
-			$subscription_expires = strtotime( $subscriptions[ $is_in_subscription ]['expires'] );
1219
-			$subscription_status  = esc_html__( 'renew', 'give' );
1216
+	if ($is_license_key) {
1217
+		if ($is_in_subscription) {
1218
+			$subscription_expires = strtotime($subscriptions[$is_in_subscription]['expires']);
1219
+			$subscription_status  = esc_html__('renew', 'give');
1220 1220
 
1221
-			if ( ( 'active' !== $subscriptions[ $is_in_subscription ]['status'] ) ) {
1222
-				$subscription_status = esc_html__( 'expire', 'give' );
1221
+			if (('active' !== $subscriptions[$is_in_subscription]['status'])) {
1222
+				$subscription_status = esc_html__('expire', 'give');
1223 1223
 			}
1224 1224
 
1225
-			if ( $subscription_expires < current_time( 'timestamp', 1 ) ) {
1226
-				$messages[]     = sprintf(
1227
-					__( 'Your subscription (<a href="%s" target="_blank">#%d</a>) expired. Please <a href="%s" target="_blank" title="Renew your license key">renew your license key</a>', 'give' ),
1228
-					urldecode( $subscriptions[ $is_in_subscription ]['invoice_url'] ),
1229
-					$subscriptions[ $is_in_subscription ]['payment_id'],
1230
-					$checkout_page_link . '?edd_license_key=' . $subscriptions[ $is_in_subscription ]['license_key'] . '&utm_campaign=admin&utm_source=licenses&utm_medium=expired'
1225
+			if ($subscription_expires < current_time('timestamp', 1)) {
1226
+				$messages[] = sprintf(
1227
+					__('Your subscription (<a href="%s" target="_blank">#%d</a>) expired. Please <a href="%s" target="_blank" title="Renew your license key">renew your license key</a>', 'give'),
1228
+					urldecode($subscriptions[$is_in_subscription]['invoice_url']),
1229
+					$subscriptions[$is_in_subscription]['payment_id'],
1230
+					$checkout_page_link.'?edd_license_key='.$subscriptions[$is_in_subscription]['license_key'].'&utm_campaign=admin&utm_source=licenses&utm_medium=expired'
1231 1231
 				);
1232 1232
 				$license_status = 'license-expired';
1233
-			} elseif ( strtotime( '- 7 days', $subscription_expires ) < current_time( 'timestamp', 1 ) ) {
1233
+			} elseif (strtotime('- 7 days', $subscription_expires) < current_time('timestamp', 1)) {
1234 1234
 				$messages[]     = sprintf(
1235
-					__( 'Your subscription (<a href="%s" target="_blank">#%d</a>) will %s in %s.', 'give' ),
1236
-					urldecode( $subscriptions[ $is_in_subscription ]['invoice_url'] ),
1237
-					$subscriptions[ $is_in_subscription ]['payment_id'],
1235
+					__('Your subscription (<a href="%s" target="_blank">#%d</a>) will %s in %s.', 'give'),
1236
+					urldecode($subscriptions[$is_in_subscription]['invoice_url']),
1237
+					$subscriptions[$is_in_subscription]['payment_id'],
1238 1238
 					$subscription_status,
1239
-					human_time_diff( current_time( 'timestamp', 1 ), strtotime( $subscriptions[ $is_in_subscription ]['expires'] ) )
1239
+					human_time_diff(current_time('timestamp', 1), strtotime($subscriptions[$is_in_subscription]['expires']))
1240 1240
 				);
1241 1241
 				$license_status = 'license-expires-soon';
1242 1242
 			} else {
1243 1243
 				$messages[]     = sprintf(
1244
-					__( 'Your subscription (<a href="%s" target="_blank">#%d</a>) will %s on %s.', 'give' ),
1245
-					urldecode( $subscriptions[ $is_in_subscription ]['invoice_url'] ),
1246
-					$subscriptions[ $is_in_subscription ]['payment_id'],
1244
+					__('Your subscription (<a href="%s" target="_blank">#%d</a>) will %s on %s.', 'give'),
1245
+					urldecode($subscriptions[$is_in_subscription]['invoice_url']),
1246
+					$subscriptions[$is_in_subscription]['payment_id'],
1247 1247
 					$subscription_status,
1248
-					date_i18n( get_option( 'date_format' ), strtotime( $subscriptions[ $is_in_subscription ]['expires'], current_time( 'timestamp' ) ) )
1248
+					date_i18n(get_option('date_format'), strtotime($subscriptions[$is_in_subscription]['expires'], current_time('timestamp')))
1249 1249
 				);
1250 1250
 				$license_status = 'license-expiration-date';
1251 1251
 			}
1252 1252
 
1253 1253
 
1254
-		} elseif ( empty( $license->success ) && property_exists( $license, 'error' ) ) {
1254
+		} elseif (empty($license->success) && property_exists($license, 'error')) {
1255 1255
 
1256 1256
             // activate_license 'invalid' on anything other than valid, so if there was an error capture it
1257
-            switch(   $license->error ) {
1257
+            switch ($license->error) {
1258 1258
                 case 'expired' :
1259 1259
                     $class = $license->error;
1260 1260
                     $messages[] = sprintf(
1261
-                        __( 'Your license key expired on %s. Please <a href="%s" target="_blank" title="Renew your license key">renew your license key</a>.', 'give' ),
1262
-                        date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ),
1263
-                        $checkout_page_link . '?edd_license_key=' . $license_key . '&utm_campaign=admin&utm_source=licenses&utm_medium=expired'
1261
+                        __('Your license key expired on %s. Please <a href="%s" target="_blank" title="Renew your license key">renew your license key</a>.', 'give'),
1262
+                        date_i18n(get_option('date_format'), strtotime($license->expires, current_time('timestamp'))),
1263
+                        $checkout_page_link.'?edd_license_key='.$license_key.'&utm_campaign=admin&utm_source=licenses&utm_medium=expired'
1264 1264
                     );
1265
-                    $license_status = 'license-' . $class;
1265
+                    $license_status = 'license-'.$class;
1266 1266
                     break;
1267 1267
 
1268 1268
 				case 'missing' :
1269 1269
 					$class          = $license->error;
1270 1270
 					$messages[]     = sprintf(
1271
-						__( 'Invalid license. Please <a href="%s" target="_blank" title="Visit account page">visit your account page</a> and verify it.', 'give' ),
1272
-						$account_page_link . '?utm_campaign=admin&utm_source=licenses&utm_medium=missing'
1271
+						__('Invalid license. Please <a href="%s" target="_blank" title="Visit account page">visit your account page</a> and verify it.', 'give'),
1272
+						$account_page_link.'?utm_campaign=admin&utm_source=licenses&utm_medium=missing'
1273 1273
 					);
1274
-					$license_status = 'license-' . $class;
1274
+					$license_status = 'license-'.$class;
1275 1275
 					break;
1276 1276
 
1277 1277
 				case 'invalid' :
1278 1278
 					$class          = $license->error;
1279 1279
 					$messages[]     = sprintf(
1280
-						__( 'Your %s is not active for this URL. Please <a href="%s" target="_blank" title="Visit account page">visit your account page</a> to manage your license key URLs.', 'give' ),
1280
+						__('Your %s is not active for this URL. Please <a href="%s" target="_blank" title="Visit account page">visit your account page</a> to manage your license key URLs.', 'give'),
1281 1281
 						$addon_name,
1282
-						$account_page_link . '?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'
1282
+						$account_page_link.'?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'
1283 1283
 					);
1284
-					$license_status = 'license-' . $class;
1284
+					$license_status = 'license-'.$class;
1285 1285
 					break;
1286 1286
 
1287 1287
 				case 'site_inactive' :
1288 1288
 					$class          = $license->error;
1289 1289
 					$messages[]     = sprintf(
1290
-						__( 'Your %s is not active for this URL. Please <a href="%s" target="_blank" title="Visit account page">visit your account page</a> to manage your license key URLs.', 'give' ),
1290
+						__('Your %s is not active for this URL. Please <a href="%s" target="_blank" title="Visit account page">visit your account page</a> to manage your license key URLs.', 'give'),
1291 1291
 						$addon_name,
1292
-						$account_page_link . '?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'
1292
+						$account_page_link.'?utm_campaign=admin&utm_source=licenses&utm_medium=invalid'
1293 1293
 					);
1294
-					$license_status = 'license-' . $class;
1294
+					$license_status = 'license-'.$class;
1295 1295
 					break;
1296 1296
 
1297 1297
                 case 'item_name_mismatch' :
1298 1298
                     $class = $license->error;
1299
-                    $messages[] = sprintf( __( 'This license %s does not belong to %s.', 'give' ), $license_key, $addon_name );
1300
-                    $license_status = 'license-' . $class;
1299
+                    $messages[] = sprintf(__('This license %s does not belong to %s.', 'give'), $license_key, $addon_name);
1300
+                    $license_status = 'license-'.$class;
1301 1301
                     break;
1302 1302
 
1303 1303
 				case 'no_activations_left':
1304 1304
 					$class          = $license->error;
1305
-					$messages[]     = sprintf( __( 'Your license key has reached it\'s activation limit. <a href="%s">View possible upgrades</a> now.', 'give' ), $account_page_link );
1306
-					$license_status = 'license-' . $class;
1305
+					$messages[]     = sprintf(__('Your license key has reached it\'s activation limit. <a href="%s">View possible upgrades</a> now.', 'give'), $account_page_link);
1306
+					$license_status = 'license-'.$class;
1307 1307
 					break;
1308 1308
 			}
1309 1309
 		} else {
1310
-			switch ( $license->license ) {
1310
+			switch ($license->license) {
1311 1311
 				case 'valid' :
1312 1312
 				default:
1313 1313
 					$class      = 'valid';
1314
-					$now        = current_time( 'timestamp' );
1315
-					$expiration = strtotime( $license->expires, current_time( 'timestamp' ) );
1314
+					$now        = current_time('timestamp');
1315
+					$expiration = strtotime($license->expires, current_time('timestamp'));
1316 1316
 
1317
-					if ( 'lifetime' === $license->expires ) {
1318
-						$messages[]     = esc_html__( 'License key never expires.', 'give' );
1317
+					if ('lifetime' === $license->expires) {
1318
+						$messages[]     = esc_html__('License key never expires.', 'give');
1319 1319
 						$license_status = 'license-lifetime-notice';
1320
-					} elseif ( $expiration > $now && $expiration - $now < ( DAY_IN_SECONDS * 30 ) ) {
1320
+					} elseif ($expiration > $now && $expiration - $now < (DAY_IN_SECONDS * 30)) {
1321 1321
 						$messages[]     = sprintf(
1322
-							__( 'Your license key expires soon! It expires on %s. <a href="%s" target="_blank" title="Renew license">Renew your license key</a>.', 'give' ),
1323
-							date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ),
1324
-							$checkout_page_link . '?edd_license_key=' . $value . '&utm_campaign=admin&utm_source=licenses&utm_medium=renew'
1322
+							__('Your license key expires soon! It expires on %s. <a href="%s" target="_blank" title="Renew license">Renew your license key</a>.', 'give'),
1323
+							date_i18n(get_option('date_format'), strtotime($license->expires, current_time('timestamp'))),
1324
+							$checkout_page_link.'?edd_license_key='.$value.'&utm_campaign=admin&utm_source=licenses&utm_medium=renew'
1325 1325
 						);
1326 1326
 						$license_status = 'license-expires-soon';
1327 1327
 					} else {
1328 1328
 						$messages[]     = sprintf(
1329
-							__( 'Your license key expires on %s.', 'give' ),
1330
-							date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) )
1329
+							__('Your license key expires on %s.', 'give'),
1330
+							date_i18n(get_option('date_format'), strtotime($license->expires, current_time('timestamp')))
1331 1331
 						);
1332 1332
 						$license_status = 'license-expiration-date';
1333 1333
 					}
@@ -1335,8 +1335,8 @@  discard block
 block discarded – undo
1335 1335
 			}
1336 1336
 		}
1337 1337
 	} else {
1338
-		$messages[]     = sprintf(
1339
-			__( 'To receive updates, please enter your valid %s license key.', 'give' ),
1338
+		$messages[] = sprintf(
1339
+			__('To receive updates, please enter your valid %s license key.', 'give'),
1340 1340
 			$addon_name
1341 1341
 		);
1342 1342
 		$license_status = 'inactive';
@@ -1344,7 +1344,7 @@  discard block
 block discarded – undo
1344 1344
 
1345 1345
 
1346 1346
 	// Add class for input field if license is active.
1347
-	if ( $is_valid_license ) {
1347
+	if ($is_valid_license) {
1348 1348
 		$field_classes .= ' give-license-active';
1349 1349
 	}
1350 1350
 
@@ -1352,35 +1352,35 @@  discard block
 block discarded – undo
1352 1352
 	$input_field_html = "<input type=\"{$type}\" name=\"{$id}\" class=\"{$field_classes}\" value=\"{$license_key}\">";
1353 1353
 
1354 1354
 	// If license is active so show deactivate button.
1355
-	if ( $is_valid_license ) {
1355
+	if ($is_valid_license) {
1356 1356
         // Get input field html.
1357 1357
 		$input_field_html = "<input type=\"{$type}\" name=\"{$id}\" class=\"{$field_classes}\" value=\"{$license_key}\" readonly=\"readonly\">";
1358 1358
 
1359
-		$custom_html = '<input type="submit" class="button button-small give-license-deactivate" name="' . $id . '_deactivate" value="' . esc_attr__( 'Deactivate License', 'give' ) . '"/>';
1359
+		$custom_html = '<input type="submit" class="button button-small give-license-deactivate" name="'.$id.'_deactivate" value="'.esc_attr__('Deactivate License', 'give').'"/>';
1360 1360
 
1361 1361
 
1362 1362
 	}
1363 1363
 
1364 1364
 	// Field description.
1365
-	$custom_html .= '<label for="give_settings[' . $id . ']"> ' . $field_description . '</label>';
1365
+	$custom_html .= '<label for="give_settings['.$id.']"> '.$field_description.'</label>';
1366 1366
 
1367 1367
 	// If no messages found then inform user that to get updated in future register yourself.
1368
-	if ( empty( $messages ) ) {
1369
-		$messages[] = apply_filters( "{$shortname}_default_addon_notice", esc_html__( 'To receive updates, please enter your valid license key.', 'give' ) );
1368
+	if (empty($messages)) {
1369
+		$messages[] = apply_filters("{$shortname}_default_addon_notice", esc_html__('To receive updates, please enter your valid license key.', 'give'));
1370 1370
 	}
1371 1371
 
1372
-    foreach( $messages as $message ) {
1373
-        $custom_html .= '<div class="give-license-status-notice give-' . $license_status . '">';
1374
-        $custom_html .= '<p>' . $message . '</p>';
1372
+    foreach ($messages as $message) {
1373
+        $custom_html .= '<div class="give-license-status-notice give-'.$license_status.'">';
1374
+        $custom_html .= '<p>'.$message.'</p>';
1375 1375
         $custom_html .= '</div>';
1376 1376
     }
1377 1377
 
1378 1378
 
1379 1379
 	// Field html.
1380
-	$custom_html = apply_filters( 'give_license_key_field_html', $input_field_html . $custom_html, $field_type_object );
1380
+	$custom_html = apply_filters('give_license_key_field_html', $input_field_html.$custom_html, $field_type_object);
1381 1381
 
1382 1382
 	// Nonce.
1383
-	wp_nonce_field( $id . '-nonce', $id . '-nonce' );
1383
+	wp_nonce_field($id.'-nonce', $id.'-nonce');
1384 1384
 
1385 1385
     // Print field html.
1386 1386
     echo "<div class=\"give-license-key\"><label for=\"{$id}\">{$addon_name }</label></div><div class=\"give-license-block\">{$custom_html}</div>";
@@ -1395,7 +1395,7 @@  discard block
 block discarded – undo
1395 1395
  */
1396 1396
 function give_api_callback() {
1397 1397
 
1398
-	if ( ! current_user_can( 'manage_give_settings' ) ) {
1398
+	if ( ! current_user_can('manage_give_settings')) {
1399 1399
 		return;
1400 1400
 	}
1401 1401
 
@@ -1404,9 +1404,9 @@  discard block
 block discarded – undo
1404 1404
 	 *
1405 1405
 	 * @since 1.0
1406 1406
 	 */
1407
-	do_action( 'give_tools_api_keys_before' );
1407
+	do_action('give_tools_api_keys_before');
1408 1408
 
1409
-	require_once GIVE_PLUGIN_DIR . 'includes/admin/class-api-keys-table.php';
1409
+	require_once GIVE_PLUGIN_DIR.'includes/admin/class-api-keys-table.php';
1410 1410
 
1411 1411
 	$api_keys_table = new Give_API_Keys_Table();
1412 1412
 	$api_keys_table->prepare_items();
@@ -1415,9 +1415,9 @@  discard block
 block discarded – undo
1415 1415
 	<span class="cmb2-metabox-description api-description">
1416 1416
 		<?php echo sprintf(
1417 1417
 		/* translators: 1: http://docs.givewp.com/api 2: http://docs.givewp.com/addon-zapier */
1418
-			__( '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' ),
1419
-			esc_url( 'http://docs.givewp.com/api' ),
1420
-			esc_url( 'http://docs.givewp.com/addon-zapier' )
1418
+			__('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'),
1419
+			esc_url('http://docs.givewp.com/api'),
1420
+			esc_url('http://docs.givewp.com/addon-zapier')
1421 1421
 		); ?>
1422 1422
 	</span>
1423 1423
 	<?php
@@ -1427,10 +1427,10 @@  discard block
 block discarded – undo
1427 1427
 	 *
1428 1428
 	 * @since 1.0
1429 1429
 	 */
1430
-	do_action( 'give_tools_api_keys_after' );
1430
+	do_action('give_tools_api_keys_after');
1431 1431
 }
1432 1432
 
1433
-add_action( 'give_settings_tab_api_keys', 'give_api_callback' );
1433
+add_action('give_settings_tab_api_keys', 'give_api_callback');
1434 1434
 
1435 1435
 /**
1436 1436
  * Hook Callback
@@ -1443,7 +1443,7 @@  discard block
 block discarded – undo
1443 1443
  *
1444 1444
  * @return void
1445 1445
  */
1446
-function give_hook_callback( $args ) {
1446
+function give_hook_callback($args) {
1447 1447
 
1448 1448
 	$id = $args['id'];
1449 1449
 
@@ -1452,7 +1452,7 @@  discard block
 block discarded – undo
1452 1452
 	 *
1453 1453
 	 * @since 1.0
1454 1454
 	 */
1455
-	do_action( "give_{$id}" );
1455
+	do_action("give_{$id}");
1456 1456
 
1457 1457
 }
1458 1458
 
@@ -1465,19 +1465,19 @@  discard block
 block discarded – undo
1465 1465
  * @param  string $compare_with
1466 1466
  * @return bool
1467 1467
  */
1468
-function give_is_setting_enabled( $value, $compare_with = null ) {
1469
-	if( ! is_null( $compare_with ) ) {
1468
+function give_is_setting_enabled($value, $compare_with = null) {
1469
+	if ( ! is_null($compare_with)) {
1470 1470
 
1471
-		if( is_array( $compare_with ) ) {
1471
+		if (is_array($compare_with)) {
1472 1472
 			// Output.
1473
-			return in_array( $value, $compare_with );
1473
+			return in_array($value, $compare_with);
1474 1474
 		}
1475 1475
 
1476 1476
 		// Output.
1477
-		return ( $value === $compare_with );
1477
+		return ($value === $compare_with);
1478 1478
 	}
1479 1479
 
1480 1480
 	// Backward compatibility: From version 1.8 most of setting is modified to enabled/disabled
1481 1481
 	// Output.
1482
-	return ( in_array( $value, array( 'enabled', 'on', 'yes' ) ) ? true : false );
1482
+	return (in_array($value, array('enabled', 'on', 'yes')) ? true : false);
1483 1483
 }
1484 1484
\ No newline at end of file
Please login to merge, or discard this patch.
includes/gateways/manual.php 1 patch
Spacing   +14 added lines, -14 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
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
  * @since 1.0
21 21
  * @return void
22 22
  */
23
-add_action( 'give_manual_cc_form', '__return_false' );
23
+add_action('give_manual_cc_form', '__return_false');
24 24
 
25 25
 /**
26 26
  * Processes the donation data and uses the Manual Payment gateway to record
@@ -32,17 +32,17 @@  discard block
 block discarded – undo
32 32
  *
33 33
  * @return void
34 34
  */
35
-function give_manual_payment( $purchase_data ) {
35
+function give_manual_payment($purchase_data) {
36 36
 
37
-	if ( ! wp_verify_nonce( $purchase_data['gateway_nonce'], 'give-gateway' ) ) {
38
-		wp_die( esc_html__( 'Nonce verification failed.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 403 ) );
37
+	if ( ! wp_verify_nonce($purchase_data['gateway_nonce'], 'give-gateway')) {
38
+		wp_die(esc_html__('Nonce verification failed.', 'give'), esc_html__('Error', 'give'), array('response' => 403));
39 39
 	}
40 40
 	
41 41
 	//Create payment_data array
42 42
 	$payment_data = array(
43 43
 		'price'           => $purchase_data['price'],
44 44
 		'give_form_title' => $purchase_data['post_data']['give-form-title'],
45
-		'give_form_id'    => intval( $purchase_data['post_data']['give-form-id'] ),
45
+		'give_form_id'    => intval($purchase_data['post_data']['give-form-id']),
46 46
 		'give_price_id'   => isset($purchase_data['post_data']['give-price-id']) ? $purchase_data['post_data']['give-price-id'] : '',
47 47
 		'date'            => $purchase_data['date'],
48 48
 		'user_email'      => $purchase_data['user_email'],
@@ -52,24 +52,24 @@  discard block
 block discarded – undo
52 52
 		'status'          => 'pending'
53 53
 	);
54 54
 	// Record the pending payment
55
-	$payment = give_insert_payment( $payment_data );
55
+	$payment = give_insert_payment($payment_data);
56 56
 
57
-	if ( $payment ) {
58
-		give_update_payment_status( $payment, 'publish' );
57
+	if ($payment) {
58
+		give_update_payment_status($payment, 'publish');
59 59
 		give_send_to_success_page();
60 60
 	} else {
61 61
 		give_record_gateway_error(
62
-			esc_html__( 'Payment Error', 'give' ),
62
+			esc_html__('Payment Error', 'give'),
63 63
 			sprintf(
64 64
 				/* translators: %s: payment data */
65
-				esc_html__( 'The payment creation failed while processing a manual (free or test) donation. Payment data: %s', 'give' ),
66
-				json_encode( $payment_data )
65
+				esc_html__('The payment creation failed while processing a manual (free or test) donation. Payment data: %s', 'give'),
66
+				json_encode($payment_data)
67 67
 			),
68 68
 			$payment
69 69
 		);
70 70
 		// If errors are present, send the user back to the donation page so they can be corrected
71
-		give_send_back_to_checkout( '?payment-mode=' . $purchase_data['post_data']['give-gateway'] );
71
+		give_send_back_to_checkout('?payment-mode='.$purchase_data['post_data']['give-gateway']);
72 72
 	}
73 73
 }
74 74
 
75
-add_action( 'give_gateway_manual', 'give_manual_payment' );
75
+add_action('give_gateway_manual', 'give_manual_payment');
Please login to merge, or discard this patch.