Test Failed
Pull Request — master (#2482)
by Devin
05:37
created
templates/shortcode-login.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -5,18 +5,18 @@  discard block
 block discarded – undo
5 5
 
6 6
 global $give_logout_redirect;
7 7
 
8
-if ( ! is_user_logged_in() ) {
8
+if ( ! is_user_logged_in()) {
9 9
 
10 10
 	$give_login_redirect = give_get_history_page_uri();
11
-	if ( ! empty( $_GET['payment_key'] ) ) {
12
-		$give_login_redirect = add_query_arg( 'payment_key', give_clean( $_GET['payment_key'] ) , give_get_history_page_uri() );
11
+	if ( ! empty($_GET['payment_key'])) {
12
+		$give_login_redirect = add_query_arg('payment_key', give_clean($_GET['payment_key']), give_get_history_page_uri());
13 13
 	}
14 14
 
15 15
 	// Show any error messages after form submission
16
-	Give()->notices->render_frontend_notices( 0 ); ?>
16
+	Give()->notices->render_frontend_notices(0); ?>
17 17
 	<form id="give-login-form" class="give-form" action="" method="post">
18 18
 		<fieldset>
19
-			<legend><?php _e( 'Log into Your Account', 'give' ); ?></legend>
19
+			<legend><?php _e('Log into Your Account', 'give'); ?></legend>
20 20
 			<?php
21 21
 			/**
22 22
 			 * Fires in the login shortcode, before the login fields.
@@ -25,27 +25,27 @@  discard block
 block discarded – undo
25 25
 			 *
26 26
 			 * @since 1.0
27 27
 			 */
28
-			do_action( 'give_login_fields_before' );
28
+			do_action('give_login_fields_before');
29 29
 			?>
30 30
 			<div class="give-login-username give-login">
31
-				<label for="give_user_login"><?php _e( 'Username', 'give' ); ?></label>
31
+				<label for="give_user_login"><?php _e('Username', 'give'); ?></label>
32 32
 				<input name="give_user_login" id="give_user_login" class="give-required give-input" type="text" required aria-required="true" />
33 33
 			</div>
34 34
 
35 35
 			<div class="give-login-password give-login">
36
-				<label for="give_user_pass"><?php _e( 'Password', 'give' ); ?></label>
36
+				<label for="give_user_pass"><?php _e('Password', 'give'); ?></label>
37 37
 				<input name="give_user_pass" id="give_user_pass" class="give-password give-required give-input" type="password" required aria-required="true" />
38 38
 			</div>
39 39
 
40 40
 			<div class="give-login-submit give-login">
41
-				<input type="hidden" name="give_login_redirect" value="<?php echo esc_url( $give_login_redirect ); ?>" />
42
-				<input type="hidden" name="give_login_nonce" value="<?php echo wp_create_nonce( 'give-login-nonce' ); ?>" />
41
+				<input type="hidden" name="give_login_redirect" value="<?php echo esc_url($give_login_redirect); ?>" />
42
+				<input type="hidden" name="give_login_nonce" value="<?php echo wp_create_nonce('give-login-nonce'); ?>" />
43 43
 				<input type="hidden" name="give_action" value="user_login" />
44
-				<input id="give_login_submit" type="submit" class="give_submit" value="<?php _e( 'Log In', 'give' ); ?>" />
44
+				<input id="give_login_submit" type="submit" class="give_submit" value="<?php _e('Log In', 'give'); ?>" />
45 45
 			</div>
46 46
 
47 47
 			<div class="give-lost-password give-login">
48
-				<a href="<?php echo wp_lostpassword_url(); ?>"><?php _e( 'Reset Password', 'give' ); ?></a>
48
+				<a href="<?php echo wp_lostpassword_url(); ?>"><?php _e('Reset Password', 'give'); ?></a>
49 49
 			</div>
50 50
 			<?php
51 51
 			/**
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
 			 *
56 56
 			 * @since 1.0
57 57
 			 */
58
-			do_action( 'give_login_fields_after' );
58
+			do_action('give_login_fields_after');
59 59
 			?>
60 60
 		</fieldset>
61 61
 	</form>
62
-<?php } elseif( isset( $_GET['give-login-success'] ) && true === (bool) $_GET['give-login-success'] ) { ?>
63
-	<?php Give()->notices->print_frontend_notice( apply_filters('give_successful_login_message', __( 'Login successful. Welcome!', 'give' )), true, 'success' ); ?>
62
+<?php } elseif (isset($_GET['give-login-success']) && true === (bool) $_GET['give-login-success']) { ?>
63
+	<?php Give()->notices->print_frontend_notice(apply_filters('give_successful_login_message', __('Login successful. Welcome!', 'give')), true, 'success'); ?>
64 64
 <?php } else { ?>
65
-	<?php Give()->notices->print_frontend_notice( apply_filters('give_already_logged_in_message', sprintf( __( 'You are already logged in to the site. <a href="%s">Click here</a> to logout.', 'give' ), esc_url( $give_logout_redirect ) ) ), true, 'warning' ); ?>
65
+	<?php Give()->notices->print_frontend_notice(apply_filters('give_already_logged_in_message', sprintf(__('You are already logged in to the site. <a href="%s">Click here</a> to logout.', 'give'), esc_url($give_logout_redirect))), true, 'warning'); ?>
66 66
 <?php } ?>
67 67
\ No newline at end of file
Please login to merge, or discard this patch.
templates/shortcode-goal.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -3,24 +3,24 @@  discard block
 block discarded – undo
3 3
  * This template is used to display the goal with [give_goal]
4 4
  */
5 5
 
6
-$form        = new Give_Donate_Form( $form_id );
7
-$goal_option = give_get_meta( $form->ID, '_give_goal_option', true );
6
+$form        = new Give_Donate_Form($form_id);
7
+$goal_option = give_get_meta($form->ID, '_give_goal_option', true);
8 8
 
9 9
 //Sanity check - ensure form has pass all condition to show goal.
10 10
 if (
11
-	( isset( $args['show_goal'] ) && ! filter_var( $args['show_goal'], FILTER_VALIDATE_BOOLEAN ) )
12
-	|| empty( $form->ID )
13
-	|| ( is_singular( 'give_forms' ) && ! give_is_setting_enabled( $goal_option ) )
14
-	|| ! give_is_setting_enabled( $goal_option )
11
+	(isset($args['show_goal']) && ! filter_var($args['show_goal'], FILTER_VALIDATE_BOOLEAN))
12
+	|| empty($form->ID)
13
+	|| (is_singular('give_forms') && ! give_is_setting_enabled($goal_option))
14
+	|| ! give_is_setting_enabled($goal_option)
15 15
 	|| 0 === $form->goal
16 16
 ) {
17 17
 	return false;
18 18
 }
19 19
 
20
-$goal_format = give_get_meta( $form_id, '_give_goal_format', true );
21
-$color       = give_get_meta( $form_id, '_give_goal_color', true );
22
-$show_text   = isset( $args['show_text'] ) ? filter_var( $args['show_text'], FILTER_VALIDATE_BOOLEAN ) : true;
23
-$show_bar    = isset( $args['show_bar'] ) ? filter_var( $args['show_bar'], FILTER_VALIDATE_BOOLEAN ) : true;
20
+$goal_format = give_get_meta($form_id, '_give_goal_format', true);
21
+$color       = give_get_meta($form_id, '_give_goal_color', true);
22
+$show_text   = isset($args['show_text']) ? filter_var($args['show_text'], FILTER_VALIDATE_BOOLEAN) : true;
23
+$show_bar    = isset($args['show_bar']) ? filter_var($args['show_bar'], FILTER_VALIDATE_BOOLEAN) : true;
24 24
 
25 25
 
26 26
 /**
@@ -28,14 +28,14 @@  discard block
 block discarded – undo
28 28
  *
29 29
  * @since 1.8.8
30 30
  */
31
-$income = apply_filters( 'give_goal_amount_raised_output', $form->get_earnings(), $form_id, $form );
31
+$income = apply_filters('give_goal_amount_raised_output', $form->get_earnings(), $form_id, $form);
32 32
 
33 33
 /**
34 34
  * Filter the form
35 35
  *
36 36
  * @since 1.8.8
37 37
  */
38
-$goal = apply_filters( 'give_goal_amount_target_output', $form->goal, $form_id, $form );
38
+$goal = apply_filters('give_goal_amount_target_output', $form->goal, $form_id, $form);
39 39
 
40 40
 
41 41
 /**
@@ -43,59 +43,59 @@  discard block
 block discarded – undo
43 43
  *
44 44
  * @since 1.8.8
45 45
  */
46
-$progress = apply_filters( 'give_goal_amount_funded_percentage_output', round( ( $income / $goal ) * 100, 2 ), $form_id, $form );
46
+$progress = apply_filters('give_goal_amount_funded_percentage_output', round(($income / $goal) * 100, 2), $form_id, $form);
47 47
 
48 48
 /**
49 49
  * Filter the give currency.
50 50
  *
51 51
  * @since 1.8.17
52 52
  */
53
-$form_currency = apply_filters( 'give_goal_form_currency', give_get_currency( $form_id ), $form_id );
53
+$form_currency = apply_filters('give_goal_form_currency', give_get_currency($form_id), $form_id);
54 54
 
55 55
 // Set progress to 100 percentage if income > goal.
56
-if ( $income >= $goal ) {
56
+if ($income >= $goal) {
57 57
 	$progress = 100;
58 58
 }
59 59
 
60 60
 ?>
61 61
 <div class="give-goal-progress">
62
-	<?php if ( ! empty( $show_text ) ) : ?>
62
+	<?php if ( ! empty($show_text)) : ?>
63 63
 		<div class="raised">
64 64
 			<?php
65
-			if ( $goal_format !== 'percentage' ) :
65
+			if ($goal_format !== 'percentage') :
66 66
 
67 67
 				/**
68 68
 				 * Filter the income formatting arguments.
69 69
 				 *
70 70
 				 * @since 1.8.17
71 71
 				 */
72
-				$income_format_args = apply_filters( 'give_goal_income_format_args', array( 'sanitize' => false, 'currency' => $form_currency, 'decimal' => false ), $form_id );
72
+				$income_format_args = apply_filters('give_goal_income_format_args', array('sanitize' => false, 'currency' => $form_currency, 'decimal' => false), $form_id);
73 73
 
74 74
 				/**
75 75
 				 * Filter the goal formatting arguments.
76 76
 				 *
77 77
 				 * @since 1.8.17
78 78
 				 */
79
-				$goal_format_args   = apply_filters( 'give_goal_amount_format_args', array( 'sanitize' => false, 'currency' => $form_currency, 'decimal' => false ), $form_id );
79
+				$goal_format_args = apply_filters('give_goal_amount_format_args', array('sanitize' => false, 'currency' => $form_currency, 'decimal' => false), $form_id);
80 80
 
81 81
 				// Get formatted amount.
82
-				$income = give_human_format_large_amount( give_format_amount( $income, $income_format_args ), array( 'currency' => $form_currency ) );
83
-				$goal   = give_human_format_large_amount( give_format_amount( $goal, $goal_format_args ), array( 'currency' => $form_currency ) );
82
+				$income = give_human_format_large_amount(give_format_amount($income, $income_format_args), array('currency' => $form_currency));
83
+				$goal   = give_human_format_large_amount(give_format_amount($goal, $goal_format_args), array('currency' => $form_currency));
84 84
 
85 85
 				echo sprintf(
86 86
 				/* translators: 1: amount of income raised 2: goal target amount. */
87
-					__( '%1$s of %2$s raised', 'give' ),
88
-					'<span class="income">' . give_currency_filter( $income, array( 'form_id' => $form_id ) ) . '</span>',
89
-					'<span class="goal-text">' . give_currency_filter( $goal, array( 'form_id' => $form_id ) ) . '</span>'
87
+					__('%1$s of %2$s raised', 'give'),
88
+					'<span class="income">'.give_currency_filter($income, array('form_id' => $form_id)).'</span>',
89
+					'<span class="goal-text">'.give_currency_filter($goal, array('form_id' => $form_id)).'</span>'
90 90
 				);
91 91
 
92 92
 
93
-			elseif ( $goal_format == 'percentage' ) :
93
+			elseif ($goal_format == 'percentage') :
94 94
 
95 95
 				echo sprintf(
96 96
 				/* translators: %s: percentage of the amount raised compared to the goal target */
97
-					__( '%s%% funded', 'give' ),
98
-					'<span class="give-percentage">' . round( $progress ) . '</span>'
97
+					__('%s%% funded', 'give'),
98
+					'<span class="give-percentage">'.round($progress).'</span>'
99 99
 				);
100 100
 
101 101
 			endif;
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
 	<?php endif; ?>
105 105
 
106 106
 
107
-	<?php if ( ! empty( $show_bar ) ) : ?>
108
-		<div class="give-progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="<?php echo esc_attr( $progress ); ?>">
109
-			<span style="width: <?php echo esc_attr( $progress ); ?>%;<?php if ( ! empty( $color ) ) {
110
-				echo 'background-color:' . $color;
107
+	<?php if ( ! empty($show_bar)) : ?>
108
+		<div class="give-progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="<?php echo esc_attr($progress); ?>">
109
+			<span style="width: <?php echo esc_attr($progress); ?>%;<?php if ( ! empty($color)) {
110
+				echo 'background-color:'.$color;
111 111
 			} ?>"></span>
112 112
 		</div><!-- /.give-progress-bar -->
113 113
 	<?php endif; ?>
Please login to merge, or discard this patch.
templates/history-donations.php 2 patches
Spacing   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -4,56 +4,56 @@  discard block
 block discarded – undo
4 4
  */
5 5
 
6 6
 $donations             = array();
7
-$donation_history_args = Give()->session->get( 'give_donation_history_args' );
7
+$donation_history_args = Give()->session->get('give_donation_history_args');
8 8
 
9 9
 // User's Donations.
10
-if ( is_user_logged_in() ) {
11
-	$donations = give_get_users_donations( get_current_user_id(), 20, true, 'any' );
12
-} elseif ( Give()->email_access->token_exists ) {
10
+if (is_user_logged_in()) {
11
+	$donations = give_get_users_donations(get_current_user_id(), 20, true, 'any');
12
+} elseif (Give()->email_access->token_exists) {
13 13
 	// Email Access Token?
14
-	$donations = give_get_users_donations( 0, 20, true, 'any' );
14
+	$donations = give_get_users_donations(0, 20, true, 'any');
15 15
 } elseif (
16 16
 	false !== Give()->session->get_session_expiration() ||
17 17
 	true === give_get_history_session()
18 18
 ) {
19 19
 	// Session active?
20
-	$email           = Give()->session->get( 'give_email' );
21
-	$donor           = Give()->donors->get_donor_by( 'email', $email );
22
-	$donations_count = count( explode( ',', $donor->payment_ids ) );
20
+	$email           = Give()->session->get('give_email');
21
+	$donor           = Give()->donors->get_donor_by('email', $email);
22
+	$donations_count = count(explode(',', $donor->payment_ids));
23 23
 
24
-	if( $donations_count > give_get_limit_display_donations() ) {
24
+	if ($donations_count > give_get_limit_display_donations()) {
25 25
 
26 26
 		// Restrict Security Email Access option, if donation count of a donor is less than or equal to limit.
27
-		if( true !== Give_Cache::get( "give_cache_email_throttle_limit_exhausted_{$donor->id}" ) ) {
28
-			add_action( 'give_donation_history_table_end', 'give_donation_history_table_end' );
27
+		if (true !== Give_Cache::get("give_cache_email_throttle_limit_exhausted_{$donor->id}")) {
28
+			add_action('give_donation_history_table_end', 'give_donation_history_table_end');
29 29
 		} else {
30 30
 			$value = Give()->email_access->verify_throttle / 60;
31 31
 
32
-			give_set_error( 'give-limited-throttle', sprintf(
33
-				__( 'Too many access email requests detected. Please wait %s before requesting a new donation history access link.', 'give' ),
34
-				sprintf( _n( '%s minute', '%s minutes', Give()->email_access->verify_throttle / 60, 'give' ), Give()->email_access->verify_throttle / 60 )
35
-			) );
32
+			give_set_error('give-limited-throttle', sprintf(
33
+				__('Too many access email requests detected. Please wait %s before requesting a new donation history access link.', 'give'),
34
+				sprintf(_n('%s minute', '%s minutes', Give()->email_access->verify_throttle / 60, 'give'), Give()->email_access->verify_throttle / 60)
35
+			));
36 36
 
37 37
 		}
38 38
 
39
-		$donations = give_get_users_donations( $email, give_get_limit_display_donations(), true, 'any' );
39
+		$donations = give_get_users_donations($email, give_get_limit_display_donations(), true, 'any');
40 40
 	} else {
41
-		$donations = give_get_users_donations( $email, 20, true, 'any' );
41
+		$donations = give_get_users_donations($email, 20, true, 'any');
42 42
 	}
43 43
 }
44 44
 
45
-Give()->notices->render_frontend_notices( 0 );
45
+Give()->notices->render_frontend_notices(0);
46 46
 
47
-if ( $donations ) : ?>
47
+if ($donations) : ?>
48 48
 	<?php
49 49
 	$table_headings = array(
50
-		'id'             => __( 'ID', 'give' ),
51
-		'date'           => __( 'Date', 'give' ),
52
-		'donor'          => __( 'Donor', 'give' ),
53
-		'amount'         => __( 'Amount', 'give' ),
54
-		'status'         => __( 'Status', 'give' ),
55
-		'payment_method' => __( 'Payment Method', 'give' ),
56
-		'details'        => __( 'Details', 'give' ),
50
+		'id'             => __('ID', 'give'),
51
+		'date'           => __('Date', 'give'),
52
+		'donor'          => __('Donor', 'give'),
53
+		'amount'         => __('Amount', 'give'),
54
+		'status'         => __('Status', 'give'),
55
+		'payment_method' => __('Payment Method', 'give'),
56
+		'details'        => __('Details', 'give'),
57 57
 	);
58 58
 	?>
59 59
 	<div class="give_user_history_main" >
@@ -69,14 +69,14 @@  discard block
 block discarded – undo
69 69
 				 *
70 70
 				 * @since 1.7
71 71
 				 */
72
-				do_action( 'give_donation_history_header_before' );
72
+				do_action('give_donation_history_header_before');
73 73
 
74
-				foreach ( $donation_history_args as $index => $value ) {
75
-					if ( filter_var( $donation_history_args[ $index ], FILTER_VALIDATE_BOOLEAN ) ) :
74
+				foreach ($donation_history_args as $index => $value) {
75
+					if (filter_var($donation_history_args[$index], FILTER_VALIDATE_BOOLEAN)) :
76 76
 						echo sprintf(
77 77
 							'<th scope="col" class="give-donation-%1$s>">%2$s</th>',
78 78
 							$index,
79
-							$table_headings[ $index ]
79
+							$table_headings[$index]
80 80
 						);
81 81
 					endif;
82 82
 				}
@@ -88,13 +88,13 @@  discard block
 block discarded – undo
88 88
 				 *
89 89
 				 * @since 1.7
90 90
 				 */
91
-				do_action( 'give_donation_history_header_after' );
91
+				do_action('give_donation_history_header_after');
92 92
 				?>
93 93
 			</tr>
94 94
 			</thead>
95
-			<?php foreach ( $donations as $post ) :
96
-				setup_postdata( $post );
97
-				$donation_data = give_get_payment_meta( $post->ID ); ?>
95
+			<?php foreach ($donations as $post) :
96
+				setup_postdata($post);
97
+				$donation_data = give_get_payment_meta($post->ID); ?>
98 98
 				<tr class="give-donation-row">
99 99
 					<?php
100 100
 					/**
@@ -107,36 +107,36 @@  discard block
 block discarded – undo
107 107
 					 * @param int   $post_id       The ID of the post.
108 108
 					 * @param mixed $donation_data Payment meta data.
109 109
 					 */
110
-					do_action( 'give_donation_history_row_start', $post->ID, $donation_data );
110
+					do_action('give_donation_history_row_start', $post->ID, $donation_data);
111 111
 
112
-					if ( filter_var( $donation_history_args['id'], FILTER_VALIDATE_BOOLEAN ) ) :
112
+					if (filter_var($donation_history_args['id'], FILTER_VALIDATE_BOOLEAN)) :
113 113
 						echo sprintf(
114 114
 							'<td class="give-donation-id">#%1$s</td>',
115
-							give_get_payment_number( $post->ID )
115
+							give_get_payment_number($post->ID)
116 116
 						);
117 117
 					endif;
118 118
 
119
-					if ( filter_var( $donation_history_args['date'], FILTER_VALIDATE_BOOLEAN ) ) :
119
+					if (filter_var($donation_history_args['date'], FILTER_VALIDATE_BOOLEAN)) :
120 120
 						echo sprintf(
121 121
 							'<td class="give-donation-date">%1$s</td>',
122
-							date_i18n( give_date_format(), strtotime( get_post_field( 'post_date', $post->ID ) ) )
122
+							date_i18n(give_date_format(), strtotime(get_post_field('post_date', $post->ID)))
123 123
 						);
124 124
 					endif;
125 125
 
126
-					if ( filter_var( $donation_history_args['donor'], FILTER_VALIDATE_BOOLEAN ) ) :
126
+					if (filter_var($donation_history_args['donor'], FILTER_VALIDATE_BOOLEAN)) :
127 127
 						echo sprintf(
128 128
 							'<td class="give-donation-donor">%1$s</td>',
129
-							give_get_donor_name_by( $post->ID )
129
+							give_get_donor_name_by($post->ID)
130 130
 						);
131 131
 					endif;
132 132
 					?>
133 133
 
134
-					<?php if ( filter_var( $donation_history_args['amount'], FILTER_VALIDATE_BOOLEAN ) ) : ?>
134
+					<?php if (filter_var($donation_history_args['amount'], FILTER_VALIDATE_BOOLEAN)) : ?>
135 135
 						<td class="give-donation-amount">
136 136
 						<span class="give-donation-amount">
137 137
 							<?php
138
-							$currency_code   = give_get_payment_currency_code( $post->ID );
139
-							$donation_amount = give_donation_amount( $post->ID, true );
138
+							$currency_code   = give_get_payment_currency_code($post->ID);
139
+							$donation_amount = give_donation_amount($post->ID, true);
140 140
 
141 141
 							/**
142 142
 							 * Filters the donation amount on Donation History Page.
@@ -148,42 +148,42 @@  discard block
 block discarded – undo
148 148
 							 *
149 149
 							 * @return int
150 150
 							 */
151
-							echo apply_filters( 'give_donation_history_row_amount', $donation_amount, $post->ID );
151
+							echo apply_filters('give_donation_history_row_amount', $donation_amount, $post->ID);
152 152
 							?>
153 153
 						</span>
154 154
 						</td>
155 155
 					<?php endif; ?>
156 156
 
157 157
 					<?php
158
-					if ( filter_var( $donation_history_args['status'], FILTER_VALIDATE_BOOLEAN ) ) :
158
+					if (filter_var($donation_history_args['status'], FILTER_VALIDATE_BOOLEAN)) :
159 159
 						echo sprintf(
160 160
 							'<td class="give-donation-status">%1$s</td>',
161
-							give_get_payment_status( $post, true )
161
+							give_get_payment_status($post, true)
162 162
 						);
163 163
 					endif;
164 164
 
165
-					if ( filter_var( $donation_history_args['payment_method'], FILTER_VALIDATE_BOOLEAN ) ) :
165
+					if (filter_var($donation_history_args['payment_method'], FILTER_VALIDATE_BOOLEAN)) :
166 166
 						echo sprintf(
167 167
 							'<td class="give-donation-payment-method">%1$s</td>',
168
-							give_get_gateway_checkout_label( give_get_payment_gateway( $post->ID ) )
168
+							give_get_gateway_checkout_label(give_get_payment_gateway($post->ID))
169 169
 						);
170 170
 					endif;
171 171
 					?>
172 172
 					<td class="give-donation-details">
173 173
 						<?php
174 174
 						// Display View Receipt or.
175
-						if ( 'publish' !== $post->post_status && 'subscription' !== $post->post_status ) :
175
+						if ('publish' !== $post->post_status && 'subscription' !== $post->post_status) :
176 176
 							echo sprintf(
177 177
 								'<a href="%1$s"><span class="give-donation-status %2$s">%3$s</span></a>',
178 178
 								esc_url(
179 179
 									add_query_arg(
180 180
 										'payment_key',
181
-										give_get_payment_key( $post->ID ),
181
+										give_get_payment_key($post->ID),
182 182
 										give_get_history_page_uri()
183 183
 									)
184 184
 								),
185 185
 								$post->post_status,
186
-								__( 'View', 'give' ) . ' ' . give_get_payment_status( $post, true ) . ' &raquo;'
186
+								__('View', 'give').' '.give_get_payment_status($post, true).' &raquo;'
187 187
 							);
188 188
 
189 189
 						else :
@@ -192,11 +192,11 @@  discard block
 block discarded – undo
192 192
 								esc_url(
193 193
 									add_query_arg(
194 194
 										'payment_key',
195
-										give_get_payment_key( $post->ID ),
195
+										give_get_payment_key($post->ID),
196 196
 										give_get_history_page_uri()
197 197
 									)
198 198
 								),
199
-								__( 'View Receipt &raquo;', 'give' )
199
+								__('View Receipt &raquo;', 'give')
200 200
 							);
201 201
 
202 202
 						endif;
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 					 * @param int   $post_id       The ID of the post.
214 214
 					 * @param mixed $donation_data Payment meta data.
215 215
 					 */
216
-					do_action( 'give_donation_history_row_end', $post->ID, $donation_data );
216
+					do_action('give_donation_history_row_end', $post->ID, $donation_data);
217 217
 					?>
218 218
 				</tr>
219 219
 			<?php endforeach; ?>
@@ -226,22 +226,22 @@  discard block
 block discarded – undo
226 226
 			 *
227 227
 			 * @since 1.8.17
228 228
 			 */
229
-			do_action( 'give_donation_history_table_end' );
229
+			do_action('give_donation_history_table_end');
230 230
 			?>
231 231
 		</table>
232 232
 		<div id="give-donation-history-pagination" class="give_pagination navigation">
233 233
 			<?php
234 234
 			$big = 999999;
235
-			echo paginate_links( array(
236
-				'base'    => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
235
+			echo paginate_links(array(
236
+				'base'    => str_replace($big, '%#%', esc_url(get_pagenum_link($big))),
237 237
 				'format'  => '?paged=%#%',
238
-				'current' => max( 1, get_query_var( 'paged' ) ),
239
-				'total'   => ceil( give_count_donations_of_donor() / 20 ) // 20 items per page
240
-			) );
238
+				'current' => max(1, get_query_var('paged')),
239
+				'total'   => ceil(give_count_donations_of_donor() / 20) // 20 items per page
240
+			));
241 241
 			?>
242 242
 		</div>
243 243
 	</div>
244 244
 	<?php wp_reset_postdata(); ?>
245 245
 <?php else : ?>
246
-	<?php Give()->notices->print_frontend_notice( __( 'It looks like you haven\'t made any donations.', 'give' ), true, 'success' ); ?>
246
+	<?php Give()->notices->print_frontend_notice(__('It looks like you haven\'t made any donations.', 'give'), true, 'success'); ?>
247 247
 <?php endif;
248 248
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -186,7 +186,8 @@  discard block
 block discarded – undo
186 186
 								__( 'View', 'give' ) . ' ' . give_get_payment_status( $post, true ) . ' &raquo;'
187 187
 							);
188 188
 
189
-						else :
189
+						else {
190
+							:
190 191
 							echo sprintf(
191 192
 								'<a href="%1$s">%2$s</a>',
192 193
 								esc_url(
@@ -198,6 +199,7 @@  discard block
 block discarded – undo
198 199
 								),
199 200
 								__( 'View Receipt &raquo;', 'give' )
200 201
 							);
202
+						}
201 203
 
202 204
 						endif;
203 205
 						?>
@@ -242,6 +244,9 @@  discard block
 block discarded – undo
242 244
 		</div>
243 245
 	</div>
244 246
 	<?php wp_reset_postdata(); ?>
245
-<?php else : ?>
246
-	<?php Give()->notices->print_frontend_notice( __( 'It looks like you haven\'t made any donations.', 'give' ), true, 'success' ); ?>
247
+<?php else {
248
+	: ?>
249
+	<?php Give()->notices->print_frontend_notice( __( 'It looks like you haven\'t made any donations.', 'give' ), true, 'success' );
250
+}
251
+?>
247 252
 <?php endif;
248 253
\ No newline at end of file
Please login to merge, or discard this patch.
templates/email-login-form.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -8,26 +8,26 @@  discard block
 block discarded – undo
8 8
 global $give_access_form_outputted;
9 9
 
10 10
 // Only output the form once.
11
-if ( $give_access_form_outputted ) {
11
+if ($give_access_form_outputted) {
12 12
 	return;
13 13
 }
14 14
 
15
-$recaptcha_key    = give_get_option( 'recaptcha_key' );
16
-$recaptcha_secret = give_get_option( 'recaptcha_secret' );
17
-$enable_recaptcha = ! empty( $recaptcha_key ) && ! empty( $recaptcha_secret ) ? true : false;
15
+$recaptcha_key    = give_get_option('recaptcha_key');
16
+$recaptcha_secret = give_get_option('recaptcha_secret');
17
+$enable_recaptcha = ! empty($recaptcha_key) && ! empty($recaptcha_secret) ? true : false;
18 18
 
19 19
 // Email already sent?
20
-if ( isset( $_POST['email-access-sent'] ) ) {
21
-	Give()->notices->print_frontend_notice( __( 'Please check your email and click on the link to access your complete donation history.', 'give' ), true, 'success' );
20
+if (isset($_POST['email-access-sent'])) {
21
+	Give()->notices->print_frontend_notice(__('Please check your email and click on the link to access your complete donation history.', 'give'), true, 'success');
22 22
 
23 23
 	return;
24
-} elseif ( isset( $_POST['email-access-exhausted'] ) ) {
24
+} elseif (isset($_POST['email-access-exhausted'])) {
25 25
 
26 26
 	// Too many emails sent?
27 27
 	Give()->notices->print_frontend_notice(
28 28
 		sprintf(
29
-			__( 'Too many access email requests detected. Please wait %s before requesting a new donation history access link.', 'give' ),
30
-			sprintf( _n( '%s minute', '%s minutes', Give()->email_access->verify_throttle / 60, 'give' ), Give()->email_access->verify_throttle / 60 )
29
+			__('Too many access email requests detected. Please wait %s before requesting a new donation history access link.', 'give'),
30
+			sprintf(_n('%s minute', '%s minutes', Give()->email_access->verify_throttle / 60, 'give'), Give()->email_access->verify_throttle / 60)
31 31
 		),
32 32
 		true,
33 33
 		'error'
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
  *
43 43
  * @since 1.8.17
44 44
  */
45
-do_action( 'give_email_access_form_login' );
45
+do_action('give_email_access_form_login');
46 46
 
47 47
 // Print any other messages & errors.
48 48
 Give()->notices->render_frontend_notices();
@@ -51,17 +51,17 @@  discard block
 block discarded – undo
51 51
 	<div class="give-form">
52 52
 		<form method="post" id="give-email-access-form">
53 53
 
54
-			<p><?php echo apply_filters( 'give_email_access_welcome_message', __( 'Please verify your email to access your donation history.', 'give' ) ); ?></p>
54
+			<p><?php echo apply_filters('give_email_access_welcome_message', __('Please verify your email to access your donation history.', 'give')); ?></p>
55 55
 
56
-			<label for="give-email"><?php _e( 'Donation Email:', 'give' ); ?></label>
56
+			<label for="give-email"><?php _e('Donation Email:', 'give'); ?></label>
57 57
 			<input id="give-email" type="email" name="give_email" value=""
58
-			       placeholder="<?php _e( 'Email Address', 'give' ); ?>" />
59
-			<input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce( 'give' ); ?>" />
58
+			       placeholder="<?php _e('Email Address', 'give'); ?>" />
59
+			<input type="hidden" name="_wpnonce" value="<?php echo wp_create_nonce('give'); ?>" />
60 60
 			<input type="hidden" name="give_action" value="email_access_form_login" />
61 61
 
62 62
 			<?php
63 63
 			// Enable reCAPTCHA?
64
-			if ( $enable_recaptcha ) :
64
+			if ($enable_recaptcha) :
65 65
 				?>
66 66
 				<script>
67 67
 									// IP verify for reCAPTCHA.
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 				<input type="hidden" name="give_ip" class="give_ip" value="" />
80 80
 			<?php endif; ?>
81 81
 
82
-			<input type="submit" class="give-submit" value="<?php _e( 'Verify Email', 'give' ); ?>" />
82
+			<input type="submit" class="give-submit" value="<?php _e('Verify Email', 'give'); ?>" />
83 83
 		</form>
84 84
 	</div>
85 85
 <?php
Please login to merge, or discard this patch.
templates/shortcode-receipt.php 1 patch
Spacing   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -6,25 +6,25 @@  discard block
 block discarded – undo
6 6
 global $give_receipt_args, $payment;
7 7
 
8 8
 // Validation: Ensure $payment var is set.
9
-if ( empty( $payment ) ) {
10
-	$payment = ! empty( $give_receipt_args['id'] ) ? get_post( $give_receipt_args['id'] ) : 0;
9
+if (empty($payment)) {
10
+	$payment = ! empty($give_receipt_args['id']) ? get_post($give_receipt_args['id']) : 0;
11 11
 }
12 12
 
13 13
 // Double-Validation: Check for $payment global.
14
-if ( empty( $payment ) ) {
15
-	Give()->notices->print_frontend_notice( __( 'The specified receipt ID appears to be invalid.', 'give' ) );
14
+if (empty($payment)) {
15
+	Give()->notices->print_frontend_notice(__('The specified receipt ID appears to be invalid.', 'give'));
16 16
 
17 17
 	return;
18 18
 }
19 19
 
20 20
 $donation_id  = $payment->ID;
21
-$form_id      = give_get_payment_meta( $donation_id, '_give_payment_form_id', true );
22
-$meta         = give_get_payment_meta( $donation_id );
23
-$donation     = give_get_payment_form_title( $meta );
24
-$user         = give_get_payment_meta_user_info( $donation_id );
25
-$email        = give_get_payment_user_email( $donation_id );
21
+$form_id      = give_get_payment_meta($donation_id, '_give_payment_form_id', true);
22
+$meta         = give_get_payment_meta($donation_id);
23
+$donation     = give_get_payment_form_title($meta);
24
+$user         = give_get_payment_meta_user_info($donation_id);
25
+$email        = give_get_payment_user_email($donation_id);
26 26
 $status       = $payment->post_status;
27
-$status_label = give_get_payment_status( $payment, true );
27
+$status_label = give_get_payment_status($payment, true);
28 28
 
29 29
 /**
30 30
  * Generate Donation Receipt Arguments.
@@ -35,50 +35,50 @@  discard block
 block discarded – undo
35 35
  * @since 1.8.8
36 36
  */
37 37
 $give_receipt_args['donation_receipt']['donor'] = array(
38
-	'name'    => __( 'Donor', 'give' ),
39
-	'value'   => $user['first_name'] . ' ' . $user['last_name'],
38
+	'name'    => __('Donor', 'give'),
39
+	'value'   => $user['first_name'].' '.$user['last_name'],
40 40
 	'display' => $give_receipt_args['donor'],
41 41
 );
42 42
 
43 43
 $give_receipt_args['donation_receipt']['date'] = array(
44
-	'name'    => __( 'Date', 'give' ),
45
-	'value'   => date_i18n( give_date_format(), strtotime( $meta['date'] ) ),
44
+	'name'    => __('Date', 'give'),
45
+	'value'   => date_i18n(give_date_format(), strtotime($meta['date'])),
46 46
 	'display' => $give_receipt_args['date'],
47 47
 );
48 48
 
49 49
 $give_receipt_args['donation_receipt']['total_donation'] = array(
50
-	'name'    => __( 'Total Donation', 'give' ),
51
-	'value'   => give_donation_amount( $donation_id, 'receipt' ),
50
+	'name'    => __('Total Donation', 'give'),
51
+	'value'   => give_donation_amount($donation_id, 'receipt'),
52 52
 	'display' => $give_receipt_args['price'],
53 53
 );
54 54
 
55 55
 $give_receipt_args['donation_receipt']['donation'] = array(
56
-	'name'    => __( 'Donation', 'give' ),
56
+	'name'    => __('Donation', 'give'),
57 57
 	'value'   => $donation,
58 58
 	'display' => true,
59 59
 );
60 60
 
61 61
 $give_receipt_args['donation_receipt']['donation_status'] = array(
62
-	'name'    => __( 'Donation Status', 'give' ),
63
-	'value'   => esc_attr( $status_label ),
62
+	'name'    => __('Donation Status', 'give'),
63
+	'value'   => esc_attr($status_label),
64 64
 	'display' => $give_receipt_args['payment_status'],
65 65
 );
66 66
 
67 67
 $give_receipt_args['donation_receipt']['donation_id'] = array(
68
-	'name'    => __( 'Donation ID', 'give' ),
68
+	'name'    => __('Donation ID', 'give'),
69 69
 	'value'   => $donation_id,
70 70
 	'display' => $give_receipt_args['payment_id'],
71 71
 );
72 72
 
73 73
 $give_receipt_args['donation_receipt']['payment_key'] = array(
74
-	'name'    => __( 'Payment Key', 'give' ),
75
-	'value'   => get_post_meta( $donation_id, '_give_payment_purchase_key', true ),
74
+	'name'    => __('Payment Key', 'give'),
75
+	'value'   => get_post_meta($donation_id, '_give_payment_purchase_key', true),
76 76
 	'display' => $give_receipt_args['payment_key'],
77 77
 );
78 78
 
79 79
 $give_receipt_args['donation_receipt']['payment_method'] = array(
80
-	'name'    => __( 'Payment Method', 'give' ),
81
-	'value'   => give_get_gateway_checkout_label( give_get_payment_gateway( $donation_id ) ),
80
+	'name'    => __('Payment Method', 'give'),
81
+	'value'   => give_get_gateway_checkout_label(give_get_payment_gateway($donation_id)),
82 82
 	'display' => $give_receipt_args['payment_method'],
83 83
 );
84 84
 
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
  *
94 94
  * @since 1.8.8
95 95
  */
96
-$give_receipt_args['donation_receipt'] = apply_filters( 'give_donation_receipt_args', $give_receipt_args['donation_receipt'], $donation_id, $form_id );
96
+$give_receipt_args['donation_receipt'] = apply_filters('give_donation_receipt_args', $give_receipt_args['donation_receipt'], $donation_id, $form_id);
97 97
 
98 98
 // When the donation were made through offline donation, We won't show receipt and payment status though.
99
-if ( 'offline' === give_get_payment_gateway( $payment->ID ) && 'pending' === $status ) {
99
+if ('offline' === give_get_payment_gateway($payment->ID) && 'pending' === $status) {
100 100
 
101 101
 	/**
102 102
 	 * Before the offline donation receipt content starts.
@@ -106,13 +106,13 @@  discard block
 block discarded – undo
106 106
 	 * @param Give_Payment $payment           Donation payment object.
107 107
 	 * @param array        $give_receipt_args Receipt Arguments.
108 108
 	 */
109
-	do_action( 'give_receipt_before_offline_payment', $payment, $give_receipt_args );
109
+	do_action('give_receipt_before_offline_payment', $payment, $give_receipt_args);
110 110
 	?>
111
-	<h2><?php echo apply_filters( 'give_receipt_offline_payment_heading', __( 'Your Donation is Almost Complete!', 'give' ) ); ?></h2>
112
-	<div id="give_donation_receipt" class="<?php echo esc_attr( apply_filters( 'give_receipt_offline_payment_classes', 'give_receipt_offline_payment' ) ); ?>">
111
+	<h2><?php echo apply_filters('give_receipt_offline_payment_heading', __('Your Donation is Almost Complete!', 'give')); ?></h2>
112
+	<div id="give_donation_receipt" class="<?php echo esc_attr(apply_filters('give_receipt_offline_payment_classes', 'give_receipt_offline_payment')); ?>">
113 113
 		<?php
114 114
 		// Instruction for offline donation.
115
-		$offline_instruction = give_get_offline_payment_instruction( $form_id, true );
115
+		$offline_instruction = give_get_offline_payment_instruction($form_id, true);
116 116
 
117 117
 		/**
118 118
 		 * Instruction for the offline donation.
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 		 * @param Give_Payment $payment             Payment object.
124 124
 		 * @param integer      $form_id             Donation form id.
125 125
 		 */
126
-		echo apply_filters( 'give_receipt_offline_payment_instruction', $offline_instruction, $payment, $form_id );
126
+		echo apply_filters('give_receipt_offline_payment_instruction', $offline_instruction, $payment, $form_id);
127 127
 		?>
128 128
 	</div>
129 129
 	<?php
@@ -135,52 +135,52 @@  discard block
 block discarded – undo
135 135
 	 * @param Give_Payment $payment           Donation payment object.
136 136
 	 * @param array        $give_receipt_args Receipt Arguments.
137 137
 	 */
138
-	do_action( 'give_receipt_after_offline_payment', $payment, $give_receipt_args );
138
+	do_action('give_receipt_after_offline_payment', $payment, $give_receipt_args);
139 139
 
140 140
 	return;
141 141
 }
142 142
 
143 143
 // Show payment status notice based on shortcode attribute.
144
-if ( filter_var( $give_receipt_args['status_notice'], FILTER_VALIDATE_BOOLEAN ) ) {
144
+if (filter_var($give_receipt_args['status_notice'], FILTER_VALIDATE_BOOLEAN)) {
145 145
 	$notice_message = '';
146 146
 	$notice_type    = 'warning';
147 147
 
148
-	switch ( $status ) {
148
+	switch ($status) {
149 149
 		case 'publish':
150
-			$notice_message = __( 'Payment Complete: Thank you for your donation.', 'give' );
150
+			$notice_message = __('Payment Complete: Thank you for your donation.', 'give');
151 151
 			$notice_type    = 'success';
152 152
 			break;
153 153
 		case 'pending':
154
-			$notice_message = __( 'Payment Pending: Your donation is currently processing.', 'give' );
154
+			$notice_message = __('Payment Pending: Your donation is currently processing.', 'give');
155 155
 			$notice_type    = 'warning';
156 156
 			break;
157 157
 		case 'refunded':
158
-			$notice_message = __( 'Payment Refunded: Your donation has been refunded.', 'give' );
158
+			$notice_message = __('Payment Refunded: Your donation has been refunded.', 'give');
159 159
 			$notice_type    = 'warning';
160 160
 			break;
161 161
 		case 'preapproval':
162
-			$notice_message = __( 'Payment Preapproved: Thank you for your donation.', 'give' );
162
+			$notice_message = __('Payment Preapproved: Thank you for your donation.', 'give');
163 163
 			$notice_type    = 'warning';
164 164
 			break;
165 165
 		case 'failed':
166
-			$notice_message = __( 'Payment Failed: Please contact the site owner for assistance.', 'give' );
166
+			$notice_message = __('Payment Failed: Please contact the site owner for assistance.', 'give');
167 167
 			$notice_type    = 'error';
168 168
 			break;
169 169
 		case 'cancelled':
170
-			$notice_message = __( 'Payment Cancelled: Your donation has been cancelled.', 'give' );
170
+			$notice_message = __('Payment Cancelled: Your donation has been cancelled.', 'give');
171 171
 			$notice_type    = 'error';
172 172
 			break;
173 173
 		case 'abandoned':
174
-			$notice_message = __( 'Payment Abandoned: This donation has not been completed.', 'give' );
174
+			$notice_message = __('Payment Abandoned: This donation has not been completed.', 'give');
175 175
 			$notice_type    = 'error';
176 176
 			break;
177 177
 		case 'revoked':
178
-			$notice_message = __( 'Payment Revoked: Please contact the site owner for assistance.', 'give' );
178
+			$notice_message = __('Payment Revoked: Please contact the site owner for assistance.', 'give');
179 179
 			$notice_type    = 'error';
180 180
 			break;
181 181
 	}
182 182
 
183
-	if ( ! empty( $notice_message ) ) {
183
+	if ( ! empty($notice_message)) {
184 184
 		/**
185 185
 		 * Filters payment status notice for receipts.
186 186
 		 *
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 		 * @param string $status Payment status.
196 196
 		 * @param array  $meta   Array of meta data related to the payment.
197 197
 		 */
198
-		echo apply_filters( 'give_receipt_status_notice', Give()->notices->print_frontend_notice( $notice_message, false, $notice_type ), $id, $status, $meta );
198
+		echo apply_filters('give_receipt_status_notice', Give()->notices->print_frontend_notice($notice_message, false, $notice_type), $id, $status, $meta);
199 199
 	}
200 200
 }// End if().
201 201
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
  * @param object $payment           The payment object.
210 210
  * @param array  $give_receipt_args Receipt_argument.
211 211
  */
212
-do_action( 'give_payment_receipt_before_table', $payment, $give_receipt_args );
212
+do_action('give_payment_receipt_before_table', $payment, $give_receipt_args);
213 213
 ?>
214 214
 
215 215
 <table id="give_donation_receipt" class="give-table">
@@ -225,11 +225,11 @@  discard block
 block discarded – undo
225 225
 	 * @param object $payment           The payment object.
226 226
 	 * @param array  $give_receipt_args Receipt_argument.
227 227
 	 */
228
-	do_action( 'give_payment_receipt_header_before', $payment, $give_receipt_args );
228
+	do_action('give_payment_receipt_header_before', $payment, $give_receipt_args);
229 229
 	?>
230 230
 	<tr>
231 231
 		<th scope="colgroup" colspan="2">
232
-			<span class="give-receipt-thead-text"><?php esc_html_e( 'Donation Receipt', 'give' ) ?></span>
232
+			<span class="give-receipt-thead-text"><?php esc_html_e('Donation Receipt', 'give') ?></span>
233 233
 		</th>
234 234
 	</tr>
235 235
 	<?php
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 	 * @param object $payment           The payment object.
244 244
 	 * @param array  $give_receipt_args Receipt_argument.
245 245
 	 */
246
-	do_action( 'give_payment_receipt_header_after', $payment, $give_receipt_args );
246
+	do_action('give_payment_receipt_header_after', $payment, $give_receipt_args);
247 247
 	?>
248 248
 	</thead>
249 249
 
@@ -259,11 +259,11 @@  discard block
 block discarded – undo
259 259
 	 * @param object $payment           The payment object.
260 260
 	 * @param array  $give_receipt_args Receipt_argument.
261 261
 	 */
262
-	do_action( 'give_payment_receipt_before', $payment, $give_receipt_args );
262
+	do_action('give_payment_receipt_before', $payment, $give_receipt_args);
263 263
 	?>
264 264
 
265
-	<?php foreach ( $give_receipt_args['donation_receipt'] as $receipt_item ) { ?>
266
-		<?php if ( filter_var( $receipt_item['display'], FILTER_VALIDATE_BOOLEAN ) ) : ?>
265
+	<?php foreach ($give_receipt_args['donation_receipt'] as $receipt_item) { ?>
266
+		<?php if (filter_var($receipt_item['display'], FILTER_VALIDATE_BOOLEAN)) : ?>
267 267
 			<tr>
268 268
 				<td scope="row"><strong><?php echo $receipt_item['name']; ?></strong></td>
269 269
 				<td><?php echo $receipt_item['value']; ?></td>
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 	 * @param object $payment           The payment object.
283 283
 	 * @param array  $give_receipt_args Receipt_argument.
284 284
 	 */
285
-	do_action( 'give_payment_receipt_after', $payment, $give_receipt_args );
285
+	do_action('give_payment_receipt_after', $payment, $give_receipt_args);
286 286
 	?>
287 287
 	</tbody>
288 288
 </table>
@@ -298,5 +298,5 @@  discard block
 block discarded – undo
298 298
  * @param object $payment           The payment object.
299 299
  * @param array  $give_receipt_args Receipt_argument.
300 300
  */
301
-do_action( 'give_payment_receipt_after_table', $payment, $give_receipt_args );
301
+do_action('give_payment_receipt_after_table', $payment, $give_receipt_args);
302 302
 ?>
Please login to merge, or discard this patch.
give.php 1 patch
Spacing   +151 added lines, -151 removed lines patch added patch discarded remove patch
@@ -40,11 +40,11 @@  discard block
 block discarded – undo
40 40
  */
41 41
 
42 42
 // Exit if accessed directly.
43
-if ( ! defined( 'ABSPATH' ) ) {
43
+if ( ! defined('ABSPATH')) {
44 44
 	exit;
45 45
 }
46 46
 
47
-if ( ! class_exists( 'Give' ) ) :
47
+if ( ! class_exists('Give')) :
48 48
 
49 49
 	/**
50 50
 	 * Main Give Class
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 		 * @return    Give
203 203
 		 */
204 204
 		public static function instance() {
205
-			if ( is_null( self::$_instance ) ) {
205
+			if (is_null(self::$_instance)) {
206 206
 				self::$_instance = new self();
207 207
 			}
208 208
 
@@ -214,13 +214,13 @@  discard block
 block discarded – undo
214 214
 		 */
215 215
 		public function __construct() {
216 216
 			// PHP version
217
-			if ( ! defined( 'GIVE_REQUIRED_PHP_VERSION' ) ) {
218
-				define( 'GIVE_REQUIRED_PHP_VERSION', '5.3' );
217
+			if ( ! defined('GIVE_REQUIRED_PHP_VERSION')) {
218
+				define('GIVE_REQUIRED_PHP_VERSION', '5.3');
219 219
 			}
220 220
 
221 221
 			// Bailout: Need minimum php version to load plugin.
222
-			if ( function_exists( 'phpversion' ) && version_compare( GIVE_REQUIRED_PHP_VERSION, phpversion(), '>' ) ) {
223
-				add_action( 'admin_notices', array( $this, 'minmum_phpversion_notice' ) );
222
+			if (function_exists('phpversion') && version_compare(GIVE_REQUIRED_PHP_VERSION, phpversion(), '>')) {
223
+				add_action('admin_notices', array($this, 'minmum_phpversion_notice'));
224 224
 
225 225
 				return;
226 226
 			}
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 			$this->includes();
231 231
 			$this->init_hooks();
232 232
 
233
-			do_action( 'give_loaded' );
233
+			do_action('give_loaded');
234 234
 		}
235 235
 
236 236
 		/**
@@ -239,8 +239,8 @@  discard block
 block discarded – undo
239 239
 		 * @since  1.8.9
240 240
 		 */
241 241
 		private function init_hooks() {
242
-			register_activation_hook( __FILE__, 'give_install' );
243
-			add_action( 'plugins_loaded', array( $this, 'init' ), 0 );
242
+			register_activation_hook(__FILE__, 'give_install');
243
+			add_action('plugins_loaded', array($this, 'init'), 0);
244 244
 		}
245 245
 		/**
246 246
 		 * Init Give when WordPress Initializes.
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 			 *
255 255
 			 * @since 1.8.9
256 256
 			 */
257
-			do_action( 'before_give_init' );
257
+			do_action('before_give_init');
258 258
 
259 259
 			// Set up localization.
260 260
 			$this->load_textdomain();
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 			 *
280 280
 			 * @since 1.8.7
281 281
 			 */
282
-			do_action( 'give_init', $this );
282
+			do_action('give_init', $this);
283 283
 
284 284
 		}
285 285
 
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 		 */
297 297
 		public function __clone() {
298 298
 			// Cloning instances of the class is forbidden.
299
-			_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'give' ), '1.0' );
299
+			_doing_it_wrong(__FUNCTION__, __('Cheatin&#8217; huh?', 'give'), '1.0');
300 300
 		}
301 301
 
302 302
 		/**
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 		 */
310 310
 		public function __wakeup() {
311 311
 			// Unserializing instances of the class is forbidden.
312
-			_doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'give' ), '1.0' );
312
+			_doing_it_wrong(__FUNCTION__, __('Cheatin&#8217; huh?', 'give'), '1.0');
313 313
 		}
314 314
 
315 315
 		/**
@@ -323,33 +323,33 @@  discard block
 block discarded – undo
323 323
 		private function setup_constants() {
324 324
 
325 325
 			// Plugin version
326
-			if ( ! defined( 'GIVE_VERSION' ) ) {
327
-				define( 'GIVE_VERSION', '1.8.17' );
326
+			if ( ! defined('GIVE_VERSION')) {
327
+				define('GIVE_VERSION', '1.8.17');
328 328
 			}
329 329
 
330 330
 			// Plugin Folder Path
331
-			if ( ! defined( 'GIVE_PLUGIN_DIR' ) ) {
332
-				define( 'GIVE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
331
+			if ( ! defined('GIVE_PLUGIN_DIR')) {
332
+				define('GIVE_PLUGIN_DIR', plugin_dir_path(__FILE__));
333 333
 			}
334 334
 
335 335
 			// Plugin Folder URL
336
-			if ( ! defined( 'GIVE_PLUGIN_URL' ) ) {
337
-				define( 'GIVE_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
336
+			if ( ! defined('GIVE_PLUGIN_URL')) {
337
+				define('GIVE_PLUGIN_URL', plugin_dir_url(__FILE__));
338 338
 			}
339 339
 
340 340
 			// Plugin Basename aka: "give/give.php"
341
-			if ( ! defined( 'GIVE_PLUGIN_BASENAME' ) ) {
342
-				define( 'GIVE_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
341
+			if ( ! defined('GIVE_PLUGIN_BASENAME')) {
342
+				define('GIVE_PLUGIN_BASENAME', plugin_basename(__FILE__));
343 343
 			}
344 344
 
345 345
 			// Plugin Root File
346
-			if ( ! defined( 'GIVE_PLUGIN_FILE' ) ) {
347
-				define( 'GIVE_PLUGIN_FILE', __FILE__ );
346
+			if ( ! defined('GIVE_PLUGIN_FILE')) {
347
+				define('GIVE_PLUGIN_FILE', __FILE__);
348 348
 			}
349 349
 
350 350
 			// Make sure CAL_GREGORIAN is defined
351
-			if ( ! defined( 'CAL_GREGORIAN' ) ) {
352
-				define( 'CAL_GREGORIAN', 1 );
351
+			if ( ! defined('CAL_GREGORIAN')) {
352
+				define('CAL_GREGORIAN', 1);
353 353
 			}
354 354
 		}
355 355
 
@@ -364,133 +364,133 @@  discard block
 block discarded – undo
364 364
 		private function includes() {
365 365
 			global $give_options;
366 366
 
367
-			require_once GIVE_PLUGIN_DIR . 'includes/admin/class-admin-settings.php';
368
-			require_once GIVE_PLUGIN_DIR . 'includes/admin/class-give-settings.php';
367
+			require_once GIVE_PLUGIN_DIR.'includes/admin/class-admin-settings.php';
368
+			require_once GIVE_PLUGIN_DIR.'includes/admin/class-give-settings.php';
369 369
 			$give_options = give_get_settings();
370 370
 
371
-			require_once GIVE_PLUGIN_DIR . 'includes/class-give-cron.php';
372
-			require_once GIVE_PLUGIN_DIR . 'includes/admin/give-metabox-functions.php';
373
-			require_once GIVE_PLUGIN_DIR . 'includes/class-give-cache.php';
374
-			require_once GIVE_PLUGIN_DIR . 'includes/post-types.php';
375
-			require_once GIVE_PLUGIN_DIR . 'includes/scripts.php';
376
-			require_once GIVE_PLUGIN_DIR . 'includes/ajax-functions.php';
377
-			require_once GIVE_PLUGIN_DIR . 'includes/actions.php';
378
-			require_once GIVE_PLUGIN_DIR . 'includes/filters.php';
379
-			require_once GIVE_PLUGIN_DIR . 'includes/api/class-give-api.php';
380
-			require_once GIVE_PLUGIN_DIR . 'includes/class-notices.php';
381
-
382
-			require_once GIVE_PLUGIN_DIR . 'includes/class-give-roles.php';
383
-			require_once GIVE_PLUGIN_DIR . 'includes/class-give-template-loader.php';
384
-			require_once GIVE_PLUGIN_DIR . 'includes/class-give-donate-form.php';
385
-			require_once GIVE_PLUGIN_DIR . 'includes/class-give-db.php';
386
-			require_once GIVE_PLUGIN_DIR . 'includes/class-give-db-donors.php';
387
-			require_once GIVE_PLUGIN_DIR . 'includes/class-give-db-donor-meta.php';
388
-			require_once GIVE_PLUGIN_DIR . 'includes/class-give-donor.php';
389
-			require_once GIVE_PLUGIN_DIR . 'includes/class-give-stats.php';
390
-			require_once GIVE_PLUGIN_DIR . 'includes/class-give-session.php';
391
-			require_once GIVE_PLUGIN_DIR . 'includes/class-give-html-elements.php';
392
-			require_once GIVE_PLUGIN_DIR . 'includes/class-give-logging.php';
393
-			require_once GIVE_PLUGIN_DIR . 'includes/class-give-license-handler.php';
394
-			require_once GIVE_PLUGIN_DIR . 'includes/class-give-email-access.php';
395
-
396
-			require_once GIVE_PLUGIN_DIR . 'includes/country-functions.php';
397
-			require_once GIVE_PLUGIN_DIR . 'includes/template-functions.php';
398
-			require_once GIVE_PLUGIN_DIR . 'includes/misc-functions.php';
399
-			require_once GIVE_PLUGIN_DIR . 'includes/import-functions.php';
400
-			require_once GIVE_PLUGIN_DIR . 'includes/forms/functions.php';
401
-			require_once GIVE_PLUGIN_DIR . 'includes/forms/template.php';
402
-			require_once GIVE_PLUGIN_DIR . 'includes/forms/widget.php';
403
-			require_once GIVE_PLUGIN_DIR . 'includes/shortcodes.php';
404
-			require_once GIVE_PLUGIN_DIR . 'includes/formatting.php';
405
-			require_once GIVE_PLUGIN_DIR . 'includes/currency-functions.php';
406
-			require_once GIVE_PLUGIN_DIR . 'includes/price-functions.php';
407
-			require_once GIVE_PLUGIN_DIR . 'includes/error-tracking.php';
408
-			require_once GIVE_PLUGIN_DIR . 'includes/process-donation.php';
409
-			require_once GIVE_PLUGIN_DIR . 'includes/login-register.php';
410
-			require_once GIVE_PLUGIN_DIR . 'includes/user-functions.php';
411
-			require_once GIVE_PLUGIN_DIR . 'includes/plugin-compatibility.php';
412
-			require_once GIVE_PLUGIN_DIR . 'includes/deprecated/deprecated-classes.php';
413
-			require_once GIVE_PLUGIN_DIR . 'includes/deprecated/deprecated-functions.php';
414
-			require_once GIVE_PLUGIN_DIR . 'includes/deprecated/deprecated-actions.php';
415
-			require_once GIVE_PLUGIN_DIR . 'includes/deprecated/deprecated-filters.php';
416
-
417
-			require_once GIVE_PLUGIN_DIR . 'includes/payments/functions.php';
418
-			require_once GIVE_PLUGIN_DIR . 'includes/payments/actions.php';
419
-			require_once GIVE_PLUGIN_DIR . 'includes/payments/class-payment-stats.php';
420
-			require_once GIVE_PLUGIN_DIR . 'includes/payments/class-payments-query.php';
421
-			require_once GIVE_PLUGIN_DIR . 'includes/payments/class-give-payment.php';
422
-
423
-			require_once GIVE_PLUGIN_DIR . 'includes/gateways/functions.php';
424
-			require_once GIVE_PLUGIN_DIR . 'includes/gateways/actions.php';
425
-			require_once GIVE_PLUGIN_DIR . 'includes/gateways/paypal-standard.php';
426
-			require_once GIVE_PLUGIN_DIR . 'includes/gateways/offline-donations.php';
427
-			require_once GIVE_PLUGIN_DIR . 'includes/gateways/manual.php';
428
-
429
-			require_once GIVE_PLUGIN_DIR . 'includes/emails/class-give-emails.php';
430
-			require_once GIVE_PLUGIN_DIR . 'includes/emails/class-give-email-tags.php';
431
-			require_once GIVE_PLUGIN_DIR . 'includes/emails/functions.php';
432
-			require_once GIVE_PLUGIN_DIR . 'includes/emails/template.php';
433
-			require_once GIVE_PLUGIN_DIR . 'includes/emails/actions.php';
434
-
435
-			require_once GIVE_PLUGIN_DIR . 'includes/donors/class-give-donors-query.php';
436
-
437
-			if ( defined( 'WP_CLI' ) && WP_CLI ) {
438
-				require_once GIVE_PLUGIN_DIR . 'includes/class-give-cli-commands.php';
371
+			require_once GIVE_PLUGIN_DIR.'includes/class-give-cron.php';
372
+			require_once GIVE_PLUGIN_DIR.'includes/admin/give-metabox-functions.php';
373
+			require_once GIVE_PLUGIN_DIR.'includes/class-give-cache.php';
374
+			require_once GIVE_PLUGIN_DIR.'includes/post-types.php';
375
+			require_once GIVE_PLUGIN_DIR.'includes/scripts.php';
376
+			require_once GIVE_PLUGIN_DIR.'includes/ajax-functions.php';
377
+			require_once GIVE_PLUGIN_DIR.'includes/actions.php';
378
+			require_once GIVE_PLUGIN_DIR.'includes/filters.php';
379
+			require_once GIVE_PLUGIN_DIR.'includes/api/class-give-api.php';
380
+			require_once GIVE_PLUGIN_DIR.'includes/class-notices.php';
381
+
382
+			require_once GIVE_PLUGIN_DIR.'includes/class-give-roles.php';
383
+			require_once GIVE_PLUGIN_DIR.'includes/class-give-template-loader.php';
384
+			require_once GIVE_PLUGIN_DIR.'includes/class-give-donate-form.php';
385
+			require_once GIVE_PLUGIN_DIR.'includes/class-give-db.php';
386
+			require_once GIVE_PLUGIN_DIR.'includes/class-give-db-donors.php';
387
+			require_once GIVE_PLUGIN_DIR.'includes/class-give-db-donor-meta.php';
388
+			require_once GIVE_PLUGIN_DIR.'includes/class-give-donor.php';
389
+			require_once GIVE_PLUGIN_DIR.'includes/class-give-stats.php';
390
+			require_once GIVE_PLUGIN_DIR.'includes/class-give-session.php';
391
+			require_once GIVE_PLUGIN_DIR.'includes/class-give-html-elements.php';
392
+			require_once GIVE_PLUGIN_DIR.'includes/class-give-logging.php';
393
+			require_once GIVE_PLUGIN_DIR.'includes/class-give-license-handler.php';
394
+			require_once GIVE_PLUGIN_DIR.'includes/class-give-email-access.php';
395
+
396
+			require_once GIVE_PLUGIN_DIR.'includes/country-functions.php';
397
+			require_once GIVE_PLUGIN_DIR.'includes/template-functions.php';
398
+			require_once GIVE_PLUGIN_DIR.'includes/misc-functions.php';
399
+			require_once GIVE_PLUGIN_DIR.'includes/import-functions.php';
400
+			require_once GIVE_PLUGIN_DIR.'includes/forms/functions.php';
401
+			require_once GIVE_PLUGIN_DIR.'includes/forms/template.php';
402
+			require_once GIVE_PLUGIN_DIR.'includes/forms/widget.php';
403
+			require_once GIVE_PLUGIN_DIR.'includes/shortcodes.php';
404
+			require_once GIVE_PLUGIN_DIR.'includes/formatting.php';
405
+			require_once GIVE_PLUGIN_DIR.'includes/currency-functions.php';
406
+			require_once GIVE_PLUGIN_DIR.'includes/price-functions.php';
407
+			require_once GIVE_PLUGIN_DIR.'includes/error-tracking.php';
408
+			require_once GIVE_PLUGIN_DIR.'includes/process-donation.php';
409
+			require_once GIVE_PLUGIN_DIR.'includes/login-register.php';
410
+			require_once GIVE_PLUGIN_DIR.'includes/user-functions.php';
411
+			require_once GIVE_PLUGIN_DIR.'includes/plugin-compatibility.php';
412
+			require_once GIVE_PLUGIN_DIR.'includes/deprecated/deprecated-classes.php';
413
+			require_once GIVE_PLUGIN_DIR.'includes/deprecated/deprecated-functions.php';
414
+			require_once GIVE_PLUGIN_DIR.'includes/deprecated/deprecated-actions.php';
415
+			require_once GIVE_PLUGIN_DIR.'includes/deprecated/deprecated-filters.php';
416
+
417
+			require_once GIVE_PLUGIN_DIR.'includes/payments/functions.php';
418
+			require_once GIVE_PLUGIN_DIR.'includes/payments/actions.php';
419
+			require_once GIVE_PLUGIN_DIR.'includes/payments/class-payment-stats.php';
420
+			require_once GIVE_PLUGIN_DIR.'includes/payments/class-payments-query.php';
421
+			require_once GIVE_PLUGIN_DIR.'includes/payments/class-give-payment.php';
422
+
423
+			require_once GIVE_PLUGIN_DIR.'includes/gateways/functions.php';
424
+			require_once GIVE_PLUGIN_DIR.'includes/gateways/actions.php';
425
+			require_once GIVE_PLUGIN_DIR.'includes/gateways/paypal-standard.php';
426
+			require_once GIVE_PLUGIN_DIR.'includes/gateways/offline-donations.php';
427
+			require_once GIVE_PLUGIN_DIR.'includes/gateways/manual.php';
428
+
429
+			require_once GIVE_PLUGIN_DIR.'includes/emails/class-give-emails.php';
430
+			require_once GIVE_PLUGIN_DIR.'includes/emails/class-give-email-tags.php';
431
+			require_once GIVE_PLUGIN_DIR.'includes/emails/functions.php';
432
+			require_once GIVE_PLUGIN_DIR.'includes/emails/template.php';
433
+			require_once GIVE_PLUGIN_DIR.'includes/emails/actions.php';
434
+
435
+			require_once GIVE_PLUGIN_DIR.'includes/donors/class-give-donors-query.php';
436
+
437
+			if (defined('WP_CLI') && WP_CLI) {
438
+				require_once GIVE_PLUGIN_DIR.'includes/class-give-cli-commands.php';
439 439
 			}
440 440
 
441
-			if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
441
+			if (is_admin() || (defined('WP_CLI') && WP_CLI)) {
442 442
 
443
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/admin-footer.php';
444
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/welcome.php';
445
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/admin-pages.php';
446
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/class-api-keys-table.php';
447
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/class-i18n-module.php';
448
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/admin-actions.php';
449
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/admin-filters.php';
450
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/add-ons.php';
451
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/plugins.php';
452
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/dashboard-widgets.php';
453
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/class-blank-slate.php';
443
+				require_once GIVE_PLUGIN_DIR.'includes/admin/admin-footer.php';
444
+				require_once GIVE_PLUGIN_DIR.'includes/admin/welcome.php';
445
+				require_once GIVE_PLUGIN_DIR.'includes/admin/admin-pages.php';
446
+				require_once GIVE_PLUGIN_DIR.'includes/admin/class-api-keys-table.php';
447
+				require_once GIVE_PLUGIN_DIR.'includes/admin/class-i18n-module.php';
448
+				require_once GIVE_PLUGIN_DIR.'includes/admin/admin-actions.php';
449
+				require_once GIVE_PLUGIN_DIR.'includes/admin/admin-filters.php';
450
+				require_once GIVE_PLUGIN_DIR.'includes/admin/add-ons.php';
451
+				require_once GIVE_PLUGIN_DIR.'includes/admin/plugins.php';
452
+				require_once GIVE_PLUGIN_DIR.'includes/admin/dashboard-widgets.php';
453
+				require_once GIVE_PLUGIN_DIR.'includes/admin/class-blank-slate.php';
454 454
 
455
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/payments/actions.php';
456
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/payments/payments-history.php';
455
+				require_once GIVE_PLUGIN_DIR.'includes/admin/payments/actions.php';
456
+				require_once GIVE_PLUGIN_DIR.'includes/admin/payments/payments-history.php';
457 457
 
458
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/donors/donors.php';
459
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/donors/donor-functions.php';
460
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/donors/donor-actions.php';
458
+				require_once GIVE_PLUGIN_DIR.'includes/admin/donors/donors.php';
459
+				require_once GIVE_PLUGIN_DIR.'includes/admin/donors/donor-functions.php';
460
+				require_once GIVE_PLUGIN_DIR.'includes/admin/donors/donor-actions.php';
461 461
 
462
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/forms/metabox.php';
463
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/forms/class-metabox-form-data.php';
464
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/forms/dashboard-columns.php';
462
+				require_once GIVE_PLUGIN_DIR.'includes/admin/forms/metabox.php';
463
+				require_once GIVE_PLUGIN_DIR.'includes/admin/forms/class-metabox-form-data.php';
464
+				require_once GIVE_PLUGIN_DIR.'includes/admin/forms/dashboard-columns.php';
465 465
 
466
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/export-functions.php';
467
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/class-export.php';
468
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/export-actions.php';
469
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/export/pdf-reports.php';
466
+				require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/export-functions.php';
467
+				require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/class-export.php';
468
+				require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/export-actions.php';
469
+				require_once GIVE_PLUGIN_DIR.'includes/admin/tools/export/pdf-reports.php';
470 470
 
471
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/reports/reports.php';
472
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/reports/class-give-graph.php';
473
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/reports/graphing.php';
471
+				require_once GIVE_PLUGIN_DIR.'includes/admin/reports/reports.php';
472
+				require_once GIVE_PLUGIN_DIR.'includes/admin/reports/class-give-graph.php';
473
+				require_once GIVE_PLUGIN_DIR.'includes/admin/reports/graphing.php';
474 474
 
475
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/logs/logs.php';
475
+				require_once GIVE_PLUGIN_DIR.'includes/admin/tools/logs/logs.php';
476 476
 
477
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/tools/data/tools-actions.php';
477
+				require_once GIVE_PLUGIN_DIR.'includes/admin/tools/data/tools-actions.php';
478 478
 
479
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/shortcodes/abstract-shortcode-generator.php';
480
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/shortcodes/class-shortcode-button.php';
481
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/shortcodes/shortcode-give-form.php';
482
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/shortcodes/shortcode-give-goal.php';
483
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/shortcodes/shortcode-give-login.php';
484
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/shortcodes/shortcode-give-register.php';
485
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/shortcodes/shortcode-give-profile-editor.php';
486
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/shortcodes/shortcode-give-donation-history.php';
487
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/shortcodes/shortcode-give-receipt.php';
479
+				require_once GIVE_PLUGIN_DIR.'includes/admin/shortcodes/abstract-shortcode-generator.php';
480
+				require_once GIVE_PLUGIN_DIR.'includes/admin/shortcodes/class-shortcode-button.php';
481
+				require_once GIVE_PLUGIN_DIR.'includes/admin/shortcodes/shortcode-give-form.php';
482
+				require_once GIVE_PLUGIN_DIR.'includes/admin/shortcodes/shortcode-give-goal.php';
483
+				require_once GIVE_PLUGIN_DIR.'includes/admin/shortcodes/shortcode-give-login.php';
484
+				require_once GIVE_PLUGIN_DIR.'includes/admin/shortcodes/shortcode-give-register.php';
485
+				require_once GIVE_PLUGIN_DIR.'includes/admin/shortcodes/shortcode-give-profile-editor.php';
486
+				require_once GIVE_PLUGIN_DIR.'includes/admin/shortcodes/shortcode-give-donation-history.php';
487
+				require_once GIVE_PLUGIN_DIR.'includes/admin/shortcodes/shortcode-give-receipt.php';
488 488
 
489
-				require_once GIVE_PLUGIN_DIR . 'includes/admin/upgrades/class-give-updates.php';
489
+				require_once GIVE_PLUGIN_DIR.'includes/admin/upgrades/class-give-updates.php';
490 490
 
491 491
 			}// End if().
492 492
 
493
-			require_once GIVE_PLUGIN_DIR . 'includes/install.php';
493
+			require_once GIVE_PLUGIN_DIR.'includes/install.php';
494 494
 
495 495
 		}
496 496
 
@@ -505,16 +505,16 @@  discard block
 block discarded – undo
505 505
 		public function load_textdomain() {
506 506
 
507 507
 			// Set filter for Give's languages directory
508
-			$give_lang_dir = dirname( plugin_basename( GIVE_PLUGIN_FILE ) ) . '/languages/';
509
-			$give_lang_dir = apply_filters( 'give_languages_directory', $give_lang_dir );
508
+			$give_lang_dir = dirname(plugin_basename(GIVE_PLUGIN_FILE)).'/languages/';
509
+			$give_lang_dir = apply_filters('give_languages_directory', $give_lang_dir);
510 510
 
511 511
 			// Traditional WordPress plugin locale filter.
512
-			$locale = is_admin() && function_exists( 'get_user_locale' ) ? get_user_locale() : get_locale();
513
-			$locale = apply_filters( 'plugin_locale', $locale, 'give' );
512
+			$locale = is_admin() && function_exists('get_user_locale') ? get_user_locale() : get_locale();
513
+			$locale = apply_filters('plugin_locale', $locale, 'give');
514 514
 
515
-			unload_textdomain( 'give' );
516
-			load_textdomain( 'give', WP_LANG_DIR . '/give/give-' . $locale . '.mo' );
517
-			load_plugin_textdomain( 'give', false, $give_lang_dir );
515
+			unload_textdomain('give');
516
+			load_textdomain('give', WP_LANG_DIR.'/give/give-'.$locale.'.mo');
517
+			load_plugin_textdomain('give', false, $give_lang_dir);
518 518
 
519 519
 		}
520 520
 
@@ -527,17 +527,17 @@  discard block
 block discarded – undo
527 527
 		 */
528 528
 		public function minmum_phpversion_notice() {
529 529
 			// Bailout.
530
-			if ( ! is_admin() ) {
530
+			if ( ! is_admin()) {
531 531
 				return;
532 532
 			}
533 533
 
534
-			$notice_desc = '<p><strong>' . __( 'Your site could be faster and more secure with a newer PHP version.', 'give' ) . '</strong></p>';
535
-			$notice_desc .= '<p>' . __( 'Hey, we\'ve noticed that you\'re running an outdated version of PHP. PHP is the programming language that WordPress and Give are built on. The version that is currently used for your site is no longer supported. Newer versions of PHP are both faster and more secure. In fact, your version of PHP no longer receives security updates, which is why we\'re sending you this notice.', 'give' ) . '</p>';
536
-			$notice_desc .= '<p>' . __( 'Hosts have the ability to update your PHP version, but sometimes they don\'t dare to do that because they\'re afraid they\'ll break your site.', 'give' ) . '</p>';
537
-			$notice_desc .= '<p><strong>' . __( 'To which version should I update?', 'give' ) . '</strong></p>';
538
-			$notice_desc .= '<p>' . __( 'You should update your PHP version to either 5.6 or to 7.0 or 7.1. On a normal WordPress site, switching to PHP 5.6 should never cause issues. We would however actually recommend you switch to PHP7. There are some plugins that are not ready for PHP7 though, so do some testing first. PHP7 is much faster than PHP 5.6. It\'s also the only PHP version still in active development and therefore the better option for your site in the long run.', 'give' ) . '</p>';
539
-			$notice_desc .= '<p><strong>' . __( 'Can\'t update? Ask your host!', 'give' ) . '</strong></p>';
540
-			$notice_desc .= '<p>' . sprintf( __( 'If you cannot upgrade your PHP version yourself, you can send an email to your host. If they don\'t want to upgrade your PHP version, we would suggest you switch hosts. Have a look at one of the recommended %1$sWordPress hosting partners%2$s.', 'give' ), sprintf( '<a href="%1$s" target="_blank">', esc_url( 'https://wordpress.org/hosting/' ) ), '</a>' ) . '</p>';
534
+			$notice_desc = '<p><strong>'.__('Your site could be faster and more secure with a newer PHP version.', 'give').'</strong></p>';
535
+			$notice_desc .= '<p>'.__('Hey, we\'ve noticed that you\'re running an outdated version of PHP. PHP is the programming language that WordPress and Give are built on. The version that is currently used for your site is no longer supported. Newer versions of PHP are both faster and more secure. In fact, your version of PHP no longer receives security updates, which is why we\'re sending you this notice.', 'give').'</p>';
536
+			$notice_desc .= '<p>'.__('Hosts have the ability to update your PHP version, but sometimes they don\'t dare to do that because they\'re afraid they\'ll break your site.', 'give').'</p>';
537
+			$notice_desc .= '<p><strong>'.__('To which version should I update?', 'give').'</strong></p>';
538
+			$notice_desc .= '<p>'.__('You should update your PHP version to either 5.6 or to 7.0 or 7.1. On a normal WordPress site, switching to PHP 5.6 should never cause issues. We would however actually recommend you switch to PHP7. There are some plugins that are not ready for PHP7 though, so do some testing first. PHP7 is much faster than PHP 5.6. It\'s also the only PHP version still in active development and therefore the better option for your site in the long run.', 'give').'</p>';
539
+			$notice_desc .= '<p><strong>'.__('Can\'t update? Ask your host!', 'give').'</strong></p>';
540
+			$notice_desc .= '<p>'.sprintf(__('If you cannot upgrade your PHP version yourself, you can send an email to your host. If they don\'t want to upgrade your PHP version, we would suggest you switch hosts. Have a look at one of the recommended %1$sWordPress hosting partners%2$s.', 'give'), sprintf('<a href="%1$s" target="_blank">', esc_url('https://wordpress.org/hosting/')), '</a>').'</p>';
541 541
 
542 542
 			echo sprintf(
543 543
 				'<div class="notice notice-error">%1$s</div>',
Please login to merge, or discard this patch.